dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1875 Commits

Author SHA1 Message Date
Michal Marek 239060b93b Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
We need to revert the temporary hack in 71ebc01, hence the merge.
2010-10-12 15:09:06 +02:00
David Howells df9ee29270 Fix IRQ flag handling naming
Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
it maps:

	local_irq_enable() -> raw_local_irq_enable()
	local_irq_disable() -> raw_local_irq_disable()
	local_irq_save() -> raw_local_irq_save()
	...

and under the other configuration, it maps:

	raw_local_irq_enable() -> local_irq_enable()
	raw_local_irq_disable() -> local_irq_disable()
	raw_local_irq_save() -> local_irq_save()
	...

This is quite confusing.  There should be one set of names expected of the
arch, and this should be wrapped to give another set of names that are expected
by users of this facility.

Change this to have the arch provide:

	flags = arch_local_save_flags()
	flags = arch_local_irq_save()
	arch_local_irq_restore(flags)
	arch_local_irq_disable()
	arch_local_irq_enable()
	arch_irqs_disabled_flags(flags)
	arch_irqs_disabled()
	arch_safe_halt()

Then linux/irqflags.h wraps these to provide:

	raw_local_save_flags(flags)
	raw_local_irq_save(flags)
	raw_local_irq_restore(flags)
	raw_local_irq_disable()
	raw_local_irq_enable()
	raw_irqs_disabled_flags(flags)
	raw_irqs_disabled()
	raw_safe_halt()

with type checking on the flags 'arguments', and then wraps those to provide:

	local_save_flags(flags)
	local_irq_save(flags)
	local_irq_restore(flags)
	local_irq_disable()
	local_irq_enable()
	irqs_disabled_flags(flags)
	irqs_disabled()
	safe_halt()

with tracing included if enabled.

The arch functions can now all be inline functions rather than some of them
having to be macros.

Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
Cc: starvik@axis.com [CRIS]
Cc: jesper.nilsson@axis.com [CRIS]
Cc: linux-cris-kernel@axis.com
2010-10-07 14:08:55 +01:00
David Howells 3b139cdb37 Blackfin: Rename IRQ flags handling functions
Rename h/w IRQ flags handling functions to be in line with what is expected for
the irq renaming patch.  This renames local_*_hw() to hard_local_*() using the
following perl command:

	perl -pi -e 's/local_irq_(restore|enable|disable)_hw/hard_local_irq_\1/ or s/local_irq_save_hw([_a-z]*)[(]flags[)]/flags = hard_local_irq_save\1()/' `find arch/blackfin/ -name "*.[ch]"`

and then fixing up asm/irqflags.h manually.

Additionally, arch/hard_local_save_flags() and arch/hard_local_irq_save() both
return the flags rather than passing it through the argument list.

Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-07 14:08:52 +01:00
David Howells 5c74874bc9 Blackfin: Add missing dep to asm/irqflags.h
Add a missing dependency (mach/blackfin.h) to asm/irqflags.h so that
bfin_read_IMASK() can be used by inline functions.

Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-07 14:08:51 +01:00
David Howells f3441945da Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header
Split the BF532 machine type BFIN_*_FIO_FLAG() functions to their own header
file to avoid circular #include problems as these functions require IRQ flag
handling, which requires asm/blackfin.h, which otherwise requires the header
file that defines these functions.

For good measure, also get rid of the inclusion of asm/blackfin.h from
mach/cdefBF532.h (which is circular) and defBF532.h (which is included by
asm/blackfin.h before including this header).

Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-07 14:08:50 +01:00
David Howells 3dcc1e7f9f Blackfin: Split PLL code from mach-specific cdef headers
Split the PLL control code from the Blackfin machine-specific cdef headers so
that the irqflags functions can be renamed without incurring a header loop.

Signed-off-by: David Howells <dhowells@redhat.com>
2010-10-07 14:08:49 +01:00
Arnaud Lacombe 838a2e55e6 kbuild: migrate all arch to the kconfig mainmenu upgrade
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Michal Marek <mmarek@suse.cz>
2010-09-19 22:54:11 -04:00
Barry Song 9e5610a995 Blackfin: bf52x/bf54x boards: drop unused nand page size
Now that the driver for the Blackfin on-chip NFC no longer uses/respects
the page_size from the platform resources (figures out the needs on the
fly), drop it from the platform resources.  This fixes some build errors
since the defines no longer exists.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-27 16:08:43 -04:00
Mike Frysinger ac0a5042be Blackfin: punt duplicate SPORT MMR defines
The common bfin_sport.h header now has unified definitions of these, so
stop polluting the global namespace.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-27 15:58:27 -04:00
Mike Frysinger f3411b16c7 Blackfin: wire up new fanotify/prlimit64 syscalls
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-23 04:24:09 -04:00
Mike Frysinger 97e94c3a57 Blackfin: fix hweight breakage
The recent commit to add constant optimization to hweight implicitly broke
the Blackfin arch.  Seems we were missed when all the other arches were
fixed with renames.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-23 04:24:08 -04:00
David Howells d7627467b7 Make do_execve() take a const filename pointer
Make do_execve() take a const filename pointer so that kernel_execve() compiles
correctly on ARM:

arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type

This also requires the argv and envp arguments to be consted twice, once for
the pointer array and once for the strings the array points to.  This is
because do_execve() passes a pointer to the filename (now const) to
copy_strings_kernel().  A simpler alternative would be to cast the filename
pointer in do_execve() when it's passed to copy_strings_kernel().

do_execve() may not change any of the strings it is passed as part of the argv
or envp lists as they are some of them in .rodata, so marking these strings as
const should be fine.

Further kernel_execve() and sys_execve() need to be changed to match.

This has been test built on x86_64, frv, arm and mips.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-17 18:07:43 -07:00
Linus Torvalds 7355a5a654 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  mtd/nand_ids: Fix buswidth
  mtd/m25p80: fix test for end of loop
  mtd/m25p80: retlen is never NULL
  MIPS: Fix gen_nand probe structures contents
  gen_nand: Test if nr_chips field is valid
  BFIN: Fix gen_nand probe structures contents
  nand/denali: move all hardware initialization work to denali_hw_init
  nand/denali: Add a page check in denali_read_page & denali_read_page_raw
  nand/denali: use cpu_relax() while waiting for hardware interrupt
  nand/denali: change read_status function method
  nand/denali: Fixed check patch warnings
  ARM: Fix gen_nand probe structures contents
  mtd/nand_base: fix kernel-doc warnings & typos
  nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
  nand/denali: Fixed handle ECC error bugs
  nand/denali: use iowrite32() to replace denali_write32()
  nand/denali: Fixed probe function bugs
2010-08-15 17:32:47 -07:00
Sam Ravnborg 8b1bb90701 defconfig reduction
Use the defconfig files generated by "make savedefconfig" for
remaining defconfig files.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2010-08-14 22:26:53 +02:00
Sam Ravnborg bf56fba670 archs: replace unifdef-y with header-y
unifdef-y and header-y have same semantic, so drop unifdef-y

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2010-08-14 22:26:51 +02:00
David Howells c788732523 Mark arguments to certain syscalls as being const
Mark arguments to certain system calls as being const where they should be but
aren't.  The list includes:

 (*) The filename arguments of various stat syscalls, execve(), various utimes
     syscalls and some mount syscalls.

 (*) The filename arguments of some syscall helpers relating to the above.

 (*) The buffer argument of various write syscalls.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-13 16:53:13 -07:00
Marek Vasut ef56609f9c BFIN: Fix gen_nand probe structures contents
These two platforms didn't properly fill nr_chips in gen_nand 
registration and therefore depended on gen_nand bug fixed by by commit
81cbb0b177 ("mtd: gen_nand: fix support for
multiple chips")

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-12 12:17:32 +01:00
FUJITA Tomonori 3b9c6c11f5 dma-mapping: remove dma_is_consistent API
Architectures implement dma_is_consistent() in different ways (some
misinterpret the definition of API in DMA-API.txt).  So it hasn't been so
useful for drivers.  We have only one user of the API in tree.  Unlikely
out-of-tree drivers use the API.

Even if we fix dma_is_consistent() in some architectures, it doesn't look
useful at all.  It was invented long ago for some old systems that can't
allocate coherent memory at all.  It's better to export only APIs that are
definitely necessary for drivers.

Let's remove this API.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11 08:59:21 -07:00
FUJITA Tomonori 4565f0170d dma-mapping: unify dma_get_cache_alignment implementations
dma_get_cache_alignment returns the minimum DMA alignment.  Architectures
defines it as ARCH_DMA_MINALIGN (formally ARCH_KMALLOC_MINALIGN).  So we
can unify dma_get_cache_alignment implementations.

Note that some architectures implement dma_get_cache_alignment wrongly.
dma_get_cache_alignment() should return the minimum DMA alignment.  So
fully-coherent architectures should return 1.  This patch also fixes this
issue.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11 08:59:21 -07:00
FUJITA Tomonori a6eb9fe105 dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
Now each architecture has the own dma_get_cache_alignment implementation.

dma_get_cache_alignment returns the minimum DMA alignment.  Architectures
define it as ARCH_KMALLOC_MINALIGN (it's used to make sure that malloc'ed
buffer is DMA-safe; the buffer doesn't share a cache with the others).  So
we can unify dma_get_cache_alignment implementations.

This patch:

dma_get_cache_alignment() needs to know if an architecture defines
ARCH_KMALLOC_MINALIGN or not (needs to know if architecture has DMA
alignment restriction).  However, slab.h define ARCH_KMALLOC_MINALIGN if
architectures doesn't define it.

Let's rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN.
ARCH_KMALLOC_MINALIGN is used only in the internals of slab/slob/slub
(except for crypto).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-11 08:59:21 -07:00
Jiri Kosina 6396fc3b3f Merge branch 'master' into for-next
Conflicts:
	fs/exofs/inode.c
2010-08-11 09:36:51 +02:00
Linus Torvalds 2f9e825d3e Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits)
  block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n
  xen-blkfront: fix missing out label
  blkdev: fix blkdev_issue_zeroout return value
  block: update request stacking methods to support discards
  block: fix missing export of blk_types.h
  writeback: fix bad _bh spinlock nesting
  drbd: revert "delay probes", feature is being re-implemented differently
  drbd: Initialize all members of sync_conf to their defaults [Bugz 315]
  drbd: Disable delay probes for the upcomming release
  writeback: cleanup bdi_register
  writeback: add new tracepoints
  writeback: remove unnecessary init_timer call
  writeback: optimize periodic bdi thread wakeups
  writeback: prevent unnecessary bdi threads wakeups
  writeback: move bdi threads exiting logic to the forker thread
  writeback: restructure bdi forker loop a little
  writeback: move last_active to bdi
  writeback: do not remove bdi from bdi_list
  writeback: simplify bdi code a little
  writeback: do not lose wake-ups in bdi threads
  ...

Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and
drivers/scsi/scsi_error.c as per Jens.
2010-08-10 15:22:42 -07:00
Linus Torvalds e8a89cebdb Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (79 commits)
  mtd: Remove obsolete <mtd/compatmac.h> include
  mtd: Update copyright notices
  jffs2: Update copyright notices
  mtd-physmap: add support users can assign the probe type in board files
  mtd: remove redwood map driver
  mxc_nand: Add v3 (i.MX51) Support
  mxc_nand: support 8bit ecc
  mxc_nand: fix correct_data function
  mxc_nand: add V1_V2 namespace to registers
  mxc_nand: factor out a check_int function
  mxc_nand: make some internally used functions overwriteable
  mxc_nand: rework get_dev_status
  mxc_nand: remove 0xe00 offset from registers
  mtd: denali: Add multi connected NAND support
  mtd: denali: Remove set_ecc_config function
  mtd: denali: Remove unuseful code in get_xx_nand_para functions
  mtd: denali: Remove device_info_tag structure
  mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip
  mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips
  mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips
  ...

Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to
redwood driver removal.
2010-08-10 11:49:21 -07:00
Jiri Kosina fb8231a8b1 Merge branch 'master' into for-next
Conflicts:
	arch/arm/mach-omap1/board-nokia770.c
2010-08-10 13:22:08 +02:00
Linus Torvalds 0fc2f13722 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (32 commits)
  Blackfin: gpio: add a debounce stub
  Blackfin: update defconfigs
  Blackfin: remove CONFIG_MEM_GENERIC_BOARD
  Blackfin: dpmc: punt unnecessary RTC_ISTAT clearing
  Blackfin: unify rotary encoder bitmasks
  Blackfin: unify SDH/RSI bitmasks
  Blackfin: BF54x: tweak DMAC MMR naming to match other ports
  Blackfin: TWI: clean up the MMR names
  Blackfin: add EVT_OVERRIDE/IPRIO core MMR helpers
  Blackfin: add support for dynamic ftrace
  Blackfin: add support for LZO compressed kernels
  Blackfin: portmux: fix peripheral map overflow when requesting pins
  Blackfin: document SPI CS limitations with CPHA=0
  Blackfin: remove useless and outdated documentation
  Blackfin: BF51x/BF52x: support GPIO Hysteresis/Schmitt Trigger options
  Blackfin: gpio/portmux: clean up whitespace corruption
  Blackfin: make sure mmiowb inserts a write barrier with SSYNC
  Blackfin: fix DMA/cache bug when resuming from suspend to RAM
  Blackfin: BF51x: fix handling of PH8 (the "internal" SPI0SEL4 pin)
  Blackfin: add a GPIO_DEFAULT_BOOT_SPI_CS
  ...
2010-08-09 21:01:11 -07:00
Stefan Weil eef35c2d41 Fix spelling fuction -> function in comments
To avoid more patches, I also fixed other spelling
and grammar bugs when they were in the same or
following line:

successfull -> successful
parse -> parses
controler -> controller
controlers -> controllers

Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-08-09 11:22:49 +02:00
FUJITA Tomonori 7e005f7979 remove needless ISA_DMA_THRESHOLD
Architectures don't need to define ISA_DMA_THRESHOLD anymore.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07 18:15:50 +02:00
Linus Torvalds b62ad9ab18 Merge branch 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  um: Fix read_persistent_clock fallout
  kgdb: Do not access xtime directly
  powerpc: Clean up obsolete code relating to decrementer and timebase
  powerpc: Rework VDSO gettimeofday to prevent time going backwards
  clocksource: Add __clocksource_updatefreq_hz/khz methods
  x86: Convert common clocksources to use clocksource_register_hz/khz
  timekeeping: Make xtime and wall_to_monotonic static
  hrtimer: Cleanup direct access to wall_to_monotonic
  um: Convert to use read_persistent_clock
  timkeeping: Fix update_vsyscall to provide wall_to_monotonic offset
  powerpc: Cleanup xtime usage
  powerpc: Simplify update_vsyscall
  time: Kill off CONFIG_GENERIC_TIME
  time: Implement timespec_add
  x86: Fix vtime/file timestamp inconsistencies

Trivial conflicts in Documentation/feature-removal-schedule.txt

Much less trivial conflicts in arch/powerpc/kernel/time.c resolved as
per Thomas' earlier merge commit 47916be4e2 ("Merge branch
'powerpc.cherry-picks' into timers/clocksource")
2010-08-06 13:18:29 -07:00
Mike Frysinger aab2393e2e Blackfin: gpio: add a debounce stub
The GPIO API was extended recently to include debounce functions, but
since the on-chip Blackfin GPIO modules don't support this stuff, make
a stub in the non-GPIOLIB case so drivers build properly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:58 -04:00
Mike Frysinger bad6b094ad Blackfin: update defconfigs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:58 -04:00
Christian Dietrich efbd24b5b0 Blackfin: remove CONFIG_MEM_GENERIC_BOARD
MEM_GENERIC_BOARD depends on GENERIC_BOARD, but this flag was removed
in 4f25eb85d6, therefore all references
to it from the source can be removed.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:57 -04:00
Michael Hennerich f619ddd4fe Blackfin: dpmc: punt unnecessary RTC_ISTAT clearing
The RTC ISTAT bits do not affect wakeups, and the RTC driver already
takes care of clearing this MMR when necessary.  So drop the useless
clearing in the core Blackfin power code.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:57 -04:00
Mike Frysinger 3975032405 Blackfin: unify rotary encoder bitmasks
Avoid duplication and ugly global namespace pollution.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:56 -04:00
Mike Frysinger c385acceb4 Blackfin: unify SDH/RSI bitmasks
Avoid duplication and ugly global namespace pollution.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:56 -04:00
Mike Frysinger 2b73a19f2d Blackfin: BF54x: tweak DMAC MMR naming to match other ports
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:55 -04:00
Mike Frysinger ba3f5973ce Blackfin: TWI: clean up the MMR names
The standard short name for control is CTL and not CTRL.  Use TWI0_xxx
even on parts that only have one TWI bus to keep things simple.  Drop
all the cdef helpers since the bus driver takes care of everything.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:55 -04:00
Mike Frysinger ada091729e Blackfin: add EVT_OVERRIDE/IPRIO core MMR helpers
These were partially defined, so fill out the def/cdef pieces properly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:54 -04:00
Mike Frysinger f507442962 Blackfin: add support for dynamic ftrace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:54 -04:00
Mike Frysinger 67df6cc665 Blackfin: add support for LZO compressed kernels
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:53 -04:00
Michael Hennerich 382dbe5b39 Blackfin: portmux: fix peripheral map overflow when requesting pins
Some processors have groups of pins that aren't an even number of 16.
This causes the array size calculation to under count the number of
needed entries due to integer truncation.  So on the BF51x, while we
should have 3 bitmaps (41 / 16), we end up with 2 and pin requests for
the 3rd bank end up scribbling over the top of the GPIO IRQ array.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:53 -04:00
Michael Hennerich 7a4a207e74 Blackfin: BF51x/BF52x: support GPIO Hysteresis/Schmitt Trigger options
Newer parts have optional Hysteresis/Schmitt Trigger options to help with
dirty signals.  So add some kconfig options for tuning this and enable it
by default for people.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:52 -04:00
Mike Frysinger 812ae98f08 Blackfin: gpio/portmux: clean up whitespace corruption
Random tabs instead of spaces, mixes of the two, and unicode spaces
instead of ascii spaces.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:51 -04:00
Michael Hennerich eb9649095f Blackfin: make sure mmiowb inserts a write barrier with SSYNC
Add SSYNC to our implementation of I/O write barrier to ensure ordering
of I/O space writes.  This will make sure that writes following the
barrier will arrive after all previous writes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:51 -04:00
Michael Hennerich d1401e1dc2 Blackfin: fix DMA/cache bug when resuming from suspend to RAM
The dma_memcpy() function takes care of flushing different caches for us.
Normally this is what we want, but when resuming from mem, we don't yet
have caches enabled.  If these functions happen to be placed into L1 mem
(which is what we're trying to relocate), then things aren't going to
work.  So define a non-cache dma_memcpy() variant to utilize in situations
like this.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:50 -04:00
Mike Frysinger 502c8a0e07 Blackfin: BF51x: fix handling of PH8 (the "internal" SPI0SEL4 pin)
Even though the PH8 pin is only internal to the processor packaging, it
can be controlled like any other GPIO pin.  Now that we have a proper GPIO
define, we can fix the SPI0 CS4 define for the internal SPI flash.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:49 -04:00
Mike Frysinger 306208f40c Blackfin: add a GPIO_DEFAULT_BOOT_SPI_CS
This is parallel to the existing P_DEFAULT_BOOT_SPI_CS, but in terms of
the GPIO value so it can be used with the normal gpio API.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:49 -04:00
Mike Frysinger a13265af99 Blackfin: fix typo in hweight asm
Run ONES on the incoming value rather than random garbage.  This fixes
random crashes with some networking code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:49 -04:00
Mike Frysinger 1ae9ab17e7 Blackfin: BF51x: fix typo in HWAIT pin define
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:48 -04:00
Mike Frysinger 399408276d Blackfin: BF54x: add ifdef protection to gpio header
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:48 -04:00
Mike Frysinger 332824b835 Blackfin: gpio: unify & clean up reserved map handling
The duplicated bit banging logic is getting out of hand, so unify the
local API to make management a lot easier.  This also makes the code
a lot easier to follow.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:47 -04:00
Mike Frysinger 74181295fb Blackfin: allow cache funcs to be in L1 for IFLUSH Anomaly 05000491
Anomaly 05000491 says that IFLUSH cannot have certain types of memory
stalls triggered before it has completed in order to function correctly.
One such condition is that it be in L1 instruction.  So add a config
option to move it there, default it to on, and throw up a warning when
it is turned off and this anomaly exists.

Since the anomaly should be worked around, we can drop the older method
of calling IFLUSH multiple times.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
2010-08-06 12:55:47 -04:00
Mike Frysinger dc7101bbae Blackfin: update anomaly lists to latest public info
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:46 -04:00
Mike Frysinger 5369fba136 Blackfin: merge anomalies 475 and 220 to follow official lists
Design found that these anomalies had the same root issue, so they've
merged 475 into 220.  We need to do the same to update to the latest
anomaly sheets.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:46 -04:00
Mike Frysinger 1ed181f248 Blackfin: move MPU anomaly check to common location
Keep all anomaly/arch checks in one place to keep logic simple.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:45 -04:00
Mike Frysinger d49e8e7e5a Blackfin: use common EXCEPTION_TABLE() in vmlinux.lds
Rather than do our own thing, use what common code provides.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:45 -04:00
Mike Frysinger 88a0ade952 Blackfin: stub fpregs dumping
The Blackfin processor has no FPU, so there are no FPU regs to dump.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:44 -04:00
Mike Frysinger f2521ce9ce Blackfin: new dynamic bfin read/write mmr helpers
These are useful when working with C structs of MMRs as the appropriate
size is selected based on the given argument.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:44 -04:00
Mike Frysinger 222f6eb66e Blackfin: punt NFC MMR bits
Now that the NFC driver has its own defines, scrub the ones from the
global namespace to avoid ugly collisions with common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06 12:55:43 -04:00
Linus Torvalds 4aed2fd8e3 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits)
  tracing/kprobes: unregister_trace_probe needs to be called under mutex
  perf: expose event__process function
  perf events: Fix mmap offset determination
  perf, powerpc: fsl_emb: Restore setting perf_sample_data.period
  perf, powerpc: Convert the FSL driver to use local64_t
  perf tools: Don't keep unreferenced maps when unmaps are detected
  perf session: Invalidate last_match when removing threads from rb_tree
  perf session: Free the ref_reloc_sym memory at the right place
  x86,mmiotrace: Add support for tracing STOS instruction
  perf, sched migration: Librarize task states and event headers helpers
  perf, sched migration: Librarize the GUI class
  perf, sched migration: Make the GUI class client agnostic
  perf, sched migration: Make it vertically scrollable
  perf, sched migration: Parameterize cpu height and spacing
  perf, sched migration: Fix key bindings
  perf, sched migration: Ignore unhandled task states
  perf, sched migration: Handle ignored migrate out events
  perf: New migration tool overview
  tracing: Drop cpparg() macro
  perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call
  ...

Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c
2010-08-06 09:30:52 -07:00
Barry Song 44299179c0 mtd: Blackfin NFC: fix handling of page sizes
Rather than forcing the platform resources to declare the desired page
size, simply use the existing information passed down to us by the higher
layers.  This way we work out of the box with all flash chips that the
kernel knows about.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-08-05 16:14:38 +01:00
Michal Marek 772320e845 Merge commit 'v2.6.35' into kbuild/kbuild
Conflicts:
	arch/powerpc/Makefile
2010-08-04 13:59:13 +02:00
Sam Ravnborg 6588169d51 kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command line
It is now possible to assign options to AS, CC and LD
on the command line - which is only used when building modules.

{A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile
in the arch makefiles, thus users had no way to specify
additional options to AS, CC, LD when building modules
without overriding the original value.

Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE
that is used by arch specific files and free up
{A,C,LD}FLAGS_MODULE so they can be assigned on
the command line.

All arch Makefiles that used the old variables has been updated.

Note: Previously we had a MODFLAGS variable for both
AS and CC. But in favour of consistency this was dropped.
So in some cases arch Makefile has one assignmnet replaced by
two assignmnets.

Note2: MODFLAGS was not documented and is dropped
without any notice. I do not expect much/any breakage
from this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-03 14:09:45 +02:00
John Stultz 592913ecb8 time: Kill off CONFIG_GENERIC_TIME
Now that all arches have been converted over to use generic time via
clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME
config option and simplify the generic code.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
LKML-Reference: <1279068988-21864-4-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-07-27 12:40:54 +02:00
Peter Zijlstra 1996bda2a4 arch: Implement local64_t
On 64bit, local_t is of size long, and thus we make local64_t an alias.
On 32bit, we fall back to atomic64_t. (architecture can provide optimized
32-bit version)

(This new facility is to be used by perf events optimizations.)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-arch@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-06-09 11:12:36 +02:00
FUJITA Tomonori 459d42b72c blackfin: use use asm-generic/scatterlist.h
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:55 -07:00
Mike Frysinger 9c1a125921 ptrace: unify FDPIC implementations
The Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in
their arch handlers (since they were probably copied & pasted).  Since
these ptrace interfaces are an arch independent aspect of the FDPIC code,
unify them in the common ptrace code so new FDPIC ports don't need to copy
and paste this fundamental stuff yet again.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:44 -07:00
Linus Torvalds 064e297c32 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (30 commits)
  Blackfin: SMP: fix continuation lines
  Blackfin: acvilon: fix timeout usage for I2C
  Blackfin: fix typo in BF537 IRQ comment
  Blackfin: unify duplicate MEM_MT48LC32M8A2_75 kconfig options
  Blackfin: set ARCH_KMALLOC_MINALIGN
  Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic
  Blackfin: another year of changes (update copyright in boot log)
  Blackfin: optimize strncpy a bit
  Blackfin: isram: clean up ITEST_COMMAND macro and improve the selftests
  Blackfin: move string functions to normal lib/ assembly
  Blackfin: SIC: cut down on IAR MMR reads a bit
  Blackfin: bf537-minotaur: fix build errors due to header changes
  Blackfin: kgdb: pass up the CC register instead of a 0 stub
  Blackfin: handle HW errors in the new "FAULT" printing code
  Blackfin: show the whole accumulator in the pseudo DBG insn
  Blackfin: support all possible registers in the pseudo instructions
  Blackfin: add support for the DBG (debug output) pseudo insn
  Blackfin: change the BUG opcode to an unused 16-bit opcode
  Blackfin: allow NMI watchdog to be used w/RETN as a scratch reg
  Blackfin: add support for the DBGA (debug assert) pseudo insn
  ...
2010-05-24 08:02:58 -07:00
Joe Perches db52ecc295 Blackfin: SMP: fix continuation lines
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:15 -04:00
Wolfram Sang efc5863eb5 Blackfin: acvilon: fix timeout usage for I2C
The timeout value is in jiffies, so it should be using HZ, not a plain
number. As '10000' is ambiguous, 1HZ is used as conservative default.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Valentin Yakovenkov <yakovenkov@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:15 -04:00
Michael Hennerich d016a21362 Blackfin: fix typo in BF537 IRQ comment
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:14 -04:00
Mike Frysinger 084f9ebfd0 Blackfin: unify duplicate MEM_MT48LC32M8A2_75 kconfig options
Reported-by: Christoph Egger <siccegge@cs.fau.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:13 -04:00
FUJITA Tomonori 76b99699a2 Blackfin: set ARCH_KMALLOC_MINALIGN
Architectures that handle DMA-non-coherent memory need to set
ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe:
the buffer doesn't share a cache with the others.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:13 -04:00
Mike Frysinger eb5400b613 Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic
Some drivers allocate L1 SRAM in atomic contexts, so make sure these
functions also use GFP_ATOMIC to avoid BUG()'s.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:12 -04:00
Mike Frysinger be1577e378 Blackfin: another year of changes (update copyright in boot log)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:11 -04:00
Robin Getz 648eee52cc Blackfin: optimize strncpy a bit
Add a little strncpy optimization which can easily cut boot time by 20%.

When the kernel is booting with initramfs, it builds up the filesystem
from a cpio archive by calling strncpy_from_user() via fs/namei.c's
do_getname() on every file in the archive (which can be lots) with a
length of PATH_MAX (1024).  This causes the dest of the strncpy to be
padded with many NUL bytes.

This optimization mostly causes these NUL bytes to be padded with a call
to memset() which is already optimized for filling memory quickly, but
the hardware loop helps a little bit as well.

Boot time measured with 'loglevel=0' so UART speed doesn't get in the way.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:11 -04:00
Mike Frysinger c70dcabc8e Blackfin: isram: clean up ITEST_COMMAND macro and improve the selftests
The IADDR2DTEST() macro had some duplicated logic with bit 11 and some
incorrect comments, so scrub all of that.

In order to verify these aren't a problem (and won't be in the future),
extend the self tests to operate on as much L1 SRAM as possible.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:10 -04:00
Robin Getz 479ba60358 Blackfin: move string functions to normal lib/ assembly
Since 'extern inline' doesn't work correctly in the context of the Linux
kernel (too many overriding defines), move the string functions to normal
lib/ assembly files (like the existing mem funcs).  This avoids the forced
inline all over the kernel and allows us to place them constantly in L1.

This also avoids some module failures when gcc inserts calls to string
functions but the kernel build system doesn't fully consult the library
archives.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:09 -04:00
Mike Frysinger 80fcdb9593 Blackfin: SIC: cut down on IAR MMR reads a bit
Tweak the for loops that operate on the SIC IAR system MMRs to avoid
re-reading them multiple times in a row.  System MMRs are a little
slower to access, so avoid the penalty when possible.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:09 -04:00
Mike Frysinger 11cabcb95e Blackfin: bf537-minotaur: fix build errors due to header changes
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:08 -04:00
Mike Frysinger d2db97bf6b Blackfin: kgdb: pass up the CC register instead of a 0 stub
While the CC pseudo register can be deduced from the ASTAT register, make
sure we set its value correctly instead of always stubbing it out as 0.
GDB itself looks at this pseudo register instead of ASTAT, so we have to
supply the right value.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:07 -04:00
Robin Getz a80d5f449d Blackfin: handle HW errors in the new "FAULT" printing code
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:07 -04:00
Robin Getz a6d9dbf5e4 Blackfin: show the whole accumulator in the pseudo DBG insn
Rather than print just part of the accumulator register, show the whole
40 bits.  This matches the simulator behavior better.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:06 -04:00
Robin Getz 5a132f7aeb Blackfin: support all possible registers in the pseudo instructions
Rather than decoding just the common R/P registers, handle all of them.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:05 -04:00
Robin Getz dc89d97fc7 Blackfin: add support for the DBG (debug output) pseudo insn
Another pseudo insn used by Blackfin simulators.  Also factor some now
common register lookup code out of the DBGA handlers.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:05 -04:00
Robin Getz 6a4110c2b3 Blackfin: change the BUG opcode to an unused 16-bit opcode
The current BUG opcode includes the bit that flags the insn as a 32bit
opcode, but it wasn't declaring it as 32bits.  So pick an unused 16bit.

URL: http://blackfin.uclinux.org/gf/tracker/5973
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:04 -04:00
Graf Yang c429886a70 Blackfin: allow NMI watchdog to be used w/RETN as a scratch reg
NMIs are not safe to return from because many anomaly workarounds are
implemented by disabling interrupts.  The NMI obviously violates this
assumption.  Since the NMI watchdog never returns, we don't have to
worry about it clobbering RETN when it is being used as a scratch register
with the exception stack.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:19:04 -04:00
Robin Getz 6ce3e9c2a2 Blackfin: add support for the DBGA (debug assert) pseudo insn
A few pseudo debug insns exist to make testing of simulators easier.
Since these don't actually exist in the hardware, we have to have the
exception handler take care of emulating these.  This allows sim test
cases to be executed unmodified under Linux and thus simplify debugging
greatly.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22 14:18:56 -04:00
Graf Yang 2620c83668 Blackfin: SMP: add flush_tlb_kernel_range stub
Newer code in mm/page_alloc.c requires this function now in arches.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:20 -04:00
Robin Getz 9a95e2f100 Blackfin: make hardware trace output a little more useful
Decode the vast majority of insns that appear in the trace buffer to get a
better idea of what's going on at a glance.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:19 -04:00
Robin Getz d60805ad47 Blackfin: print out the faulting insn in the trace output
Print out the faulting instruction so when people send traces as part of
bug reports, we have a better idea of what is going on.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:19 -04:00
Robin Getz d28cff4b61 Blackfin: remove CONFIG_DEBUG_VERBOSE from trace.c
Now that the split traps code has moved all the verbose output to the
trace.c file, we can unify all the CONFIG_DEBUG_VERBOSE handling.  This
gets rid of much of the crappy ifdef forest and enables usage of normal
pr_xxx functions so checkpatch stops complaining.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:18 -04:00
Robin Getz 2a12c4632d Blackfin: split kernel/traps.c
The current kernel/traps.c file has grown a bit unwieldy as more debugging
functionality has been added over time, so split it up into more logical
files.  There should be no functional changes here, just minor whitespace
tweaking.  This should make future extensions easier to manage.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:17 -04:00
Michael Hennerich bb84dbf69b Blackfin: punt Blackfin-specific GPIO wakeup API
This patch removes a custom GPIO wakeup API which allowed GPIOs to act
as wakeup sources, which are not configured as Interrupts.
This API is a leftover from the time before irq_wake was established.
From now on people must use enable_irq_wake(GPIO_IRQx) and the GPIO in
question needs to be configured as Interrupt.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:16 -04:00
Cliff Cai 85eb0e4b15 Blackfin: mark MUSB VRSEL as active high for appropriate boards
These boards all have the GPIO VRSEL hooked up as an active high.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:40:15 -04:00
Mike Frysinger def282d615 Blackfin: punt duplicated CAN MMRs
Now that there's a common header with everything unified, drop the defines
from the global namespace.  Pollution sucks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:34:37 -04:00
Mike Frysinger d012ce22a4 Blackfin: cleanup style/comments/etc... in paging_init()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:03:16 -04:00
Mike Frysinger f074e48e0a Blackfin: drop unused bad_page pages and move zero_page to the bss
The empty_bad_page/empty_bad_page_table pages are unused, so punt them.
The zero_page is always allocated, so push it out to the bss to speed up
the booting process a bit and pack data nicer.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21 09:03:15 -04:00
Jason Wessel e8861129d3 kgdb,blackfin: Add in kgdb_arch_set_pc for blackfin
The new debug core api requires all architectures that use to debug
core to implement a function to set the program counter.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-05-20 21:04:20 -05:00
Linus Torvalds f39d01be4c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
  vlynq: make whole Kconfig-menu dependant on architecture
  add descriptive comment for TIF_MEMDIE task flag declaration.
  EEPROM: max6875: Header file cleanup
  EEPROM: 93cx6: Header file cleanup
  EEPROM: Header file cleanup
  agp: use NULL instead of 0 when pointer is needed
  rtc-v3020: make bitfield unsigned
  PCI: make bitfield unsigned
  jbd2: use NULL instead of 0 when pointer is needed
  cciss: fix shadows sparse warning
  doc: inode uses a mutex instead of a semaphore.
  uml: i386: Avoid redefinition of NR_syscalls
  fix "seperate" typos in comments
  cocbalt_lcdfb: correct sections
  doc: Change urls for sparse
  Powerpc: wii: Fix typo in comment
  i2o: cleanup some exit paths
  Documentation/: it's -> its where appropriate
  UML: Fix compiler warning due to missing task_struct declaration
  UML: add kernel.h include to signal.c
  ...
2010-05-20 09:20:59 -07:00
Linus Torvalds 7d02093e29 Merge branch 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  avr32: Fix typo in read_persistent_clock()
  sparc: Convert sparc to use read/update_persistent_clock
  cris: Convert cris to use read/update_persistent_clock
  m68k: Convert m68k to use read/update_persistent_clock
  m32r: Convert m32r to use read/update_peristent_clock
  blackfin: Convert blackfin to use read/update_persistent_clock
  ia64: Convert ia64 to use read/update_persistent_clock
  avr32: Convert avr32 to use read/update_persistent_clock
  h8300: Convert h8300 to use read/update_persistent_clock
  frv: Convert frv to use read/update_persistent_clock
  mn10300: Convert mn10300 to use read/update_persistent_clock
  alpha: Convert alpha to use read/update_persistent_clock
  xtensa: Fix unnecessary setting of xtime
  time: Clean up direct xtime usage in xen
2010-05-19 17:10:06 -07:00
Andreas Dilger 0ddc9324b1 add descriptive comment for TIF_MEMDIE task flag declaration.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-05-14 11:13:27 +02:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Linus Torvalds 3971047930 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (96 commits)
  Blackfin: stop cleaning include/asm/asm-offsets.h
  Blackfin: scale calibration when cpu freq changes
  Blackfin: eat spurious space in asm/dpmc.h
  Blackfin: fix anomaly 283 handling with exact hardware error
  Blackfin: bf537-stamp: add example ADXL346 orientation resources
  Blackfin: bf537-stamp: add example AD2S1210 IIO resources
  Blackfin: don't support keypad wakeup from hibernate
  Blackfin: bf537-stamp: add example AD7416 IIO resources
  Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
  Blackfin: bf537-stamp: add example AD7414 temp sensor resources
  Blackfin: rename AD1836 to AD183X in board files
  Blackfin: bf537-stamp: add example AD2S120x resources
  Blackfin: add support for the on-chip MAC status interrupts
  Blackfin: asm/page.h: pull in asm-generic headers
  Blackfin: mark gpio lib functions static
  Blackfin: bf537-stamp: add example ADAU1361 resources
  Blackfin: GPIO: implement to_irq handler
  Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources
  Blackfin: bf537-stamp: add example AD2S90 resources
  Blackfin: bf537-stamp: add example AD5398 power regulator resources
  ...
2010-03-18 17:02:35 -07:00
John Stultz cb0e996378 blackfin: Convert blackfin to use read/update_persistent_clock
This patch converts the blackfin architecture to use the generic
read_persistent_clock and update_persistent_clock interfaces, reducing
the amount of arch specific code we have to maintain, and allowing for
further cleanups in the future.

I have not built or tested this patch, so help from arch maintainers
would be appreciated.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1267675049-12337-10-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-03-13 01:14:12 +01:00
Linus Torvalds c32da02342 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits)
  doc: fix typo in comment explaining rb_tree usage
  Remove fs/ntfs/ChangeLog
  doc: fix console doc typo
  doc: cpuset: Update the cpuset flag file
  Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed
  Remove drivers/parport/ChangeLog
  Remove drivers/char/ChangeLog
  doc: typo - Table 1-2 should refer to "status", not "statm"
  tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments
  No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h
  devres/irq: Fix devm_irq_match comment
  Remove reference to kthread_create_on_cpu
  tree-wide: Assorted spelling fixes
  tree-wide: fix 'lenght' typo in comments and code
  drm/kms: fix spelling in error message
  doc: capitalization and other minor fixes in pnp doc
  devres: typo fix s/dev/devm/
  Remove redundant trailing semicolons from macros
  fix typo "definetly" -> "definitely" in comment
  tree-wide: s/widht/width/g typo in comments
  ...

Fix trivial conflict in Documentation/laptops/00-INDEX
2010-03-12 16:04:50 -08:00
FUJITA Tomonori 2b4f767af7 dma-mapping: blackfin: remove the obsolete and unnecessary DMA API comments
pci_dma_sync_single was obsoleted long ago.

All the comments are generic, not architecture specific, simply describes
some of the DMA-API (and the same comments are in other files).
Documentation/DMA-API.txt have more detailed descriptions.

This removes the above obsolete and unnecessary DMA API comments.  Let's
describe the DMA API in only Documentation/DMA-API.txt.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-12 15:52:42 -08:00
Mike Frysinger eb63e5d157 Blackfin: stop cleaning include/asm/asm-offsets.h
The file is no longer generated, so we don't want to clean it.

Reported-by: Vivi Li <vivi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 09:05:20 -05:00
Graf Yang 7998a8787a Blackfin: scale calibration when cpu freq changes
Need to make sure we update the loops_per_jiffy values when we start
changing the core clock.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Mike Frysinger f2b0cd61cf Blackfin: eat spurious space in asm/dpmc.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Robin Getz 2943bff69e Blackfin: fix anomaly 283 handling with exact hardware error
The exact hardware error handling code was added before the workaround
for anomaly 283 which caused the anomaly to be triggered in some cases
(an infinite core stall).  So re-order the code to avoid this.

Reported-by: Andrew Rook <andrew.rook@speakerbus.co.uk>
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Michael Hennerich 6ba255f4a8 Blackfin: bf537-stamp: add example ADXL346 orientation resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Graf Yang 848c51ccee Blackfin: bf537-stamp: add example AD2S1210 IIO resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Michael Hennerich ae4a8c1903 Blackfin: don't support keypad wakeup from hibernate
The on-chip keypad peripheral requires different registers to be setup
depending on the standby type (standby vs hibernation).  However, since
the power management framework doesn't differentiate between these types,
the driver doesn't know which registers to program and subsequently it
avoids doing so.

Always enabling the keyboard wakeup source causes misbehavior when the
pins are not assigned to the keypad.  If they happen to drive a certain
level, they'll trigger a wake up event which is not wanted.  So until
the aforementioned issue can be sorted out, drop support for the
wakeup source completely.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:53 -05:00
Sonic Zhang ef8873e06e Blackfin: bf537-stamp: add example AD7416 IIO resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Michael Hennerich 72fa2e9204 Blackfin: bf537-stamp: add example ADP8860 backlight/led resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang 5f0225948e Blackfin: bf537-stamp: add example AD7414 temp sensor resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Barry Song d40bd71f88 Blackfin: rename AD1836 to AD183X in board files
The ASoC codec driver was generalized and renamed, so update the board
resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Graf Yang df6a949b46 Blackfin: bf537-stamp: add example AD2S120x resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Michael Hennerich aec59c9113 Blackfin: add support for the on-chip MAC status interrupts
This patch provides infrastructure for MAC Wake-On-Lan and PHYINT use in
phylib.  New Interrupts added:

IRQ_MAC_PHYINT   /* PHY_INT Interrupt */
IRQ_MAC_MMCINT   /* MMC Counter Interrupt */
IRQ_MAC_RXFSINT  /* RX Frame-Status Interrupt */
IRQ_MAC_TXFSINT  /* TX Frame-Status Interrupt */
IRQ_MAC_WAKEDET  /* Wake-Up Interrupt */
IRQ_MAC_RXDMAERR /* RX DMA Direction Error Interrupt */
IRQ_MAC_TXDMAERR /* TX DMA Direction Error Interrupt */
IRQ_MAC_STMDONE  /* Station Mgt. Transfer Done Interrupt */

On BF537/6 the implementation is not straight forward since there are now
two chained chained_handlers.  A cleaner approach would have been to add
latter IRQs to the demux of IRQ_GENERIC_ERROR.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Mike Frysinger b274080145 Blackfin: asm/page.h: pull in asm-generic headers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Joachim Eastwood f9c29e872b Blackfin: mark gpio lib functions static
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Cliff Cai c48d767569 Blackfin: bf537-stamp: add example ADAU1361 resources
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Joachim Eastwood 7f4f69f991 Blackfin: GPIO: implement to_irq handler
This makes it possible to support IRQs coming from off-chip GPIO
controllers.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang f8e6dbffa7 Blackfin: bf537-stamp: add example ADP122/ADP150 power regulator resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Graf Yang f5f9531c7e Blackfin: bf537-stamp: add example AD2S90 resources
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:52 -05:00
Sonic Zhang f32792d045 Blackfin: bf537-stamp: add example AD5398 power regulator resources
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Frans Pop 2bc4affe9c Blackfin: remove trailing space in messages
Signed-off-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Michael Hennerich fe5b25c098 Blackfin: bf537-stamp: add example ADS7846 touchscreen resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger ddaebcabbc Blackfin: add support for restart_syscall()
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 9e228ee9ea Blackfin: check for bad syscalls after tracing it
We want to report all system calls (even invalid ones) to the tracing
layers, so check the NR only after we've notified.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 600482c13d Blackfin: fix single stepping over system calls
On Blackfin systems, the hardware single step exception triggers before
the system call exception, so we need to save this info to process it
later on.  Otherwise, single stepping in userspace misses a few insns
right after the system call.

This is based a bit on the SuperH code added in commit 4b505db9c4.

Reported-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger e8f263dfd3 Blackfin: initial tracehook support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger e50e2f25c5 Blackfin: initial regset support
We don't support core dumps (yet?), but this should make things easier.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger f2ce48024a Blackfin: simplify PTRACE_{PEEK,POKE}USR in preperation for regset support
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Mike Frysinger 5f09c77d2a Blackfin: simplify SYSCFG code a bit and ignore attempts to change it
We don't want to let user space modify the SYSCFG register arbitrarily as
the settings are system wide (SNEN/CNEN) and can cause misbehavior.  The
only other bit here (SSSTEP) has proper controls via PTRACE_SINGLESTEP.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Christoph Hellwig f5b99627a3 Blackfin: use generic ptrace_resume code
Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT,
PTRACE_KILL and PTRACE_SINGLESTEP.  This implies defining
arch_has_single_step in <asm/ptrace.h> and implementing the
user_enable_single_step and user_disable_single_step functions, which
also causes the breakpoint information to be cleared on fork, which
could be considered a bug fix.

Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL
which it previously wasn't which is consistent with all architectures
using the modern ptrace code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Barry Song ad6720c0b5 Blackfin: bf537-stamp: add example AD715{0,2}/AD774{5,6,7} IIO resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:51 -05:00
Graf Yang 718340f629 Blackfin: rewrite resync_core_{i,d}cache() SMP logic to avoid per_cpu data
This functions are implicitly called by core functions like cpu_relax(),
and since those functions may be called early on before common code has
initialized the per-cpu data area, we need to tweak the stats gathering.
Now the statistics are maintained in common bss which makes these funcs
safe to use as soon as the C runtime env is setup.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 6c2b7072a7 Blackfin: add support for cpufreq on SMP systems
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 3b82790c12 Blackfin: rename AD1938 to AD193X in board files
The ASoC codec driver was generalized and renamed, so update the board
resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Yi Li 7136d9c5e8 Blackfin: add CALLER_ADDR ftrace macros
Since GCC doesn't support __builtin_frame_address(n) where n!=0, add our
own function to walk the stack frame pointers.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger 652afdc340 Blackfin: move KGDB selection to the way other arches do it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 64b33a00dc Blackfin: split watchdog definitions into a dedicated header file
This allows things to be shared between the different watchdog sources.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 4ab069e535 Blackfin: add dma_disable_irq_nosync() API for irq handlers
Some IRQ handlers need to disable a DMA channel without waiting.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger 3750411fb7 Blackfin: fix whitespace damage in thread_info.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger b73faf7449 Blackfin: support new ftrace frame pointer semantics
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Mike Frysinger aebfef0324 Blackfin: implement ftrace mcount test
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Barry Song 6388d14eb2 Blackfin: implement ndelay()
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:50 -05:00
Graf Yang 60ffdb3654 Blackfin: implement nmi_watchdog for SMP on BF561
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 726e96561e Blackfin: respect the L1 kconfig optimization in the MPU code
Restore support for CONFIG_EXCPT_IRQ_SYSC_L1 in the MPU CPLB manager.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 336746ed8e Blackfin: bf537-stamp/bf527-ezkit: move ASoC SPORT resources to boards file
Rather than declaring pin resources in the drivers, do it in the board.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 439b486746 Blackfin: bf548-ezkit: add ASoC CPU DAI resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Michael Hennerich f3dec78333 Blackfin: increase NR_IRQS beyond NR on-chip IRQs
This makes room for off-chip IRQ controllers.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 5e8d3210b5 Blackfin: fill out the signal si_addr when sending a SIGBUS/SIGSEGV
Some userspace applications use this member in diagnosing crashes.  It
also makes some LTP tests pass (i.e. the Blackfin arch behaves more like
everyone else).

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Mike Frysinger 0531c467da Blackfin: bf537-stamp: move ADF7021 MAC storage into platform resources
Just generate a random MAC on the demo board since the ADF702x lacks
dedicated storage for such things.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Yi Li 441504df6b Blackfin: add support for irqflags tracing
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Harald Krapfenbauer 5aff1642ae Blackfin: tcm-bf518: new board port
Signed-off-by: Harald Krapfenbauer <harald.krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 38e7673f24 Blackfin: bf537-stamp: declare parallel flash as ROM with XIP kernel
When the kernel is executing out of parallel flash (XIP), we can't have
the flash go into an erase/programming cycle, otherwise the instruction
fetching steps fail and everything crashes.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Cliff Cai 29bb3bc0c7 Blackfin: bf527-ezkit/bf537-stamp: add example SSM2602 I2C resources
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Graf Yang c6669c223a Blackfin: fix up mm locking in address dumping
The locking code in the address dumper needs to grab the mm's mmap_sem
so that other CPUs do not get an inconsistent view.  On UP systems this
really wasn't a problem, but it is easy to trigger a race on SMP systems
when another CPU removes a mapping.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:49 -05:00
Barry Song 7e1082b7db Blackfin: bf533-{ezkit,stamp}: add sound platform devices
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Mike Frysinger 8d0177dbcb Blackfin: kgdb: mark all local funcs/structs static
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Roel Kluin 48a74f9d1b Blackfin: fix decoding of opcodes 41-47 in decode_instruction()
This condition allowed only decoding of opcode 0x0040

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song d86bfb1600 Blackfin: initial XIP support
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song aad16f3228 Blackfin: fix initial stack pointer setup
During very early init, the stack pointer is given a slightly incorrect
value (&init_thread_union).  The value is later adjusted to the right one
during early init (&init_thread_union + THREAD_SIZE), but it is used a few
times in between.  While the few functions used don't actually put things
onto the stack (due to optimization), it's best if we simply use the right
value from the start.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song 8916a1499d Blackfin: fix the section name of init_thread_union
Use the common attribute rather than setting the section name directly.
The common linker script defines expect the newer naming.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Barry Song 6feda3a653 Blackfin: replace harcoded define with proper THREAD_SIZE macro
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Jie Zhang 0afc272cc6 Blackfin: fix relocation errors with large initramfs images
Since we are now discarding .exit.text at runtime instead of link time, we
need to place all .text sections ahead of the .data sections.  Otherwise,
a really large attached initramfs may cause link errors as it pushes the
PC relative relocations behind the limits of the Blackfin ISA (~16meg).
The instructions in the .exit.text are unable to call back into the .text
sections leading to a link failure.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li cb191718fc Blackfin: try to simplify interrupt ifdef ugliness
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li 54536c5c6a Blackfin: simplify SMP handling in SRAM code
There is no need to use {get,put}_cpu() when we already have a spinlock to
protect against multiple processors running simultaneously.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Graf Yang 0b39db28b9 Blackfin: SMP: add PM/CPU hotplug support
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Yi Li 0d152c27e3 Blackfin: SMP: make core timers per-cpu clock events for HRT
SMP systems require per-cpu local clock event devices in order to enable
HRT support.  One a BF561, we can use local core timer for this purpose.
Originally, there was one global core-timer clock event device set up for
core A.

To accomplish this feat, we need to split the gptimer0/core timer logic
so that each is a standalone clock event.  There is no requirement that
we only have one clock event source anyways.  Once we have this, we just
define per-cpu clock event devices for each local core timer.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:48 -05:00
Graf Yang 682f5dc4ed Blackfin: drop cpu_callin_map on SMP systems
Common API already provides functions for managing online CPUs.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 0325f25a91 Blackfin: SMP: add support for IRQ affinity
Now that the Blackfin IRQ controller supports this, drivers get the normal
functionality of controlling which CPU to bind IRQs to.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger 69e1d8a61d Blackfin: unify MMR helpers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger f05ede3a94 Blackfin: isram: add unlikely to sanity checks
Don't want the compiler assuming the rare sanity checks are the norm and
optimize for those paths.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 0ea19c64e3 Blackfin: update defconfigs
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Michael Hennerich 0f7b468b6e Blackfin: add optimized version of Hamming Weight functions
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Valentin Yakovenkov 252077cf7d Blackfin: bf561-acvilon: save the smsc911x mac address
Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Sonic Zhang 7a9cc48907 Blackfin: bf537-stamp: unify duplicated ADP5588 headers
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger 01218654cd Blackfin: bf537-stamp: change CONFIG_USB_SL811_BFIN_IRQ to IRQ_PF4
The Kconfig option was never mainlined, so replace the define with the
actual pin that it is hooked up to by default.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Mike Frysinger 3b781de6dd Blackfin: drop unused SL811 platform resources from bf527/pnav boards
These platforms don't hook up to this USB controller, so no point in
declaring resources for it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Michael Hennerich 1dafdc513a Blackfin: BF51x: fix L1 Instruction SRAM size
The BF51x's Instruction SRAM is 32kB, not 48kB.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:47 -05:00
Michael Hennerich 244d34230b Blackfin: update AD7879 resources to match the new gpiolib driver support
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Michael Hennerich edd0799250 Blackfin: gpio: use shorter name
The gpio label size is 16 char, but the current code uses a longer name
resulting in chopped display.  So use a shorter name.

Reported-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Michael Hennerich 15435a2a55 Blackfin: pull in asm/bfin_can.h for interrupt masks
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Sonic Zhang a3a6a59019 Blackfin: dma-mapping: fix thinko in constant optimization
Make sure the non-constant version of the dma_sync functions actually
complete instead of recursively calling itself forever.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Mike Frysinger 0c270807db Blackfin: drop duplicate HOTPLUG Kconfig option
The option already exists for everyone in init/Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Mike Frysinger 0e64268ced Blackfin: merge common CAN defines into one headers
Rather than copy and paste the MMR defines and register layout,
consolidate everything in one place.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Mike Frysinger 360adee8a5 Blackfin: wire up the various memory related syscalls
These all just go to the stub syscall at the moment, so this is largely
future proofing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Graf Yang ead9b1156d Blackfin: SMP: enable HAVE_LEGACY_PER_CPU_AREA
The current Blackfin SMP code relies on the legacy cpu area code, so
select it until we port things to the newer code.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Sonic Zhang 5792ab2a0a Blackfin: MPU: handle caches for reserved memory
We weren't handling the user-specified cache behavior for the reserved
memory regions (via mem=/max_mem=).  The no-MPU code already takes care
of this, so add support to the MPU code as well.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Michael Hennerich d94a1aa44e Blackfin: extend bfin-lq035q1-fb resources to include PPI mode
This lets us support the new BF527-EZKIT V2.1 via platform resources
tweaks only.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Michael Hennerich 6924dfb058 Blackfin: bf527-ezkit: add support for V2.1 boards
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Barry Song e18e7dd334 Blackfin: fix MPU page permission masks overflow when dealing with async memory
Attempting to use the MPU while doing XIP out of parallel flash hooked up
to the async memory bus would often result in random crashes as the MPU
slowly corrupted memory.

The fallout here is that the async banks gain MPU protection from user
space too.  So any accesses have to go through the mmap() interface rather
than just using hardcoded pointers.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:46 -05:00
Yi Li c9784ebb23 Blackfin: flush caches on SMP when one core calls another via IPI
Sometimes a SMP system will randomly panic at boot.  This is due to caches
being out of sync when one core tries to signal the other.  So when one
core calls another via IPI, flush the data caches.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Mike Frysinger 3630ac34b0 Blackfin: bfin_sport: unify & standardize SPORT masks
Rather than have every SPORT driver copy & paste things, declare the C
structure and MMR bitmasks in one place for everyone to use.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Sonic Zhang c13ce9fd26 Blackfin: add UART/SPORT early platform resources
This lets people easily select the UART/SPORT consoles for early printk
while leveraging the pins declared in the boards file.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Sonic Zhang b635f1912d Blackfin: allow boards to register early devices
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Sonic Zhang df5de26130 Blackfin: move SPORT UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file.  This lets people easily select the specific pins/ports for
the normal emulated UART as well as GPIOs for CTS/RTS.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Barry Song 08a54bffaf Blackfin: bf537-stamp: ad1938: switch to GPIO CS
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Sonic Zhang 6bd1fbea2e Blackfin: move on-chip UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file.  This lets people easily select the specific pins/ports for
the normal UART as well as GPIOs for CTS/RTS.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09 00:30:45 -05:00
Jiri Kosina 318ae2edc3 Merge branch 'for-next' into for-linus
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
2010-03-08 16:55:37 +01:00
Stefan Weil 947af29435 Fix spelling of 'platform' in comments and doc
Replace platfrom -> platform.

This is a frequent spelling bug.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-05 12:22:34 +01:00
Tejun Heo ab386128f2 Merge branch 'master' into percpu 2010-02-02 14:38:15 +09:00
Sonic Zhang 7fe1a91281 blackfin,kgdb: Do not put PC in gdb_regs into retx.
In blackfin, kgdb is running in delayed exception IRQ5 other than in
exception IRQ3 directly.  Register reti other than retx in pt_regs is
the kgdb return address. So, don't put PC in gdb_regs into retx.

CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2010-01-07 11:58:37 -06:00
Jason Wessel 0fde663708 blackfin,kgdb,probe_kernel: Cleanup probe_kernel_read/write
Blackfin needs it own arch specific probe_kernel_read() and
probe_kernel_write().

This was moved out of the kgdb code and into the
arch/blackfin/maccess.c, because it is a generic kernel api.

The arch specific kgdb.c for blackfin was cleaned of all functions
which exist in the kgdb core that do the same thing after resolving
the probe_kernel_read() and probe_kernel_write().  This also
eliminated the need for most of the #include's.

CC: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-07 11:58:36 -06:00
Mike Frysinger 04e4f2b18c FDPIC: Respect PT_GNU_STACK exec protection markings when creating NOMMU stack
The current code will load the stack size and protection markings, but
then only use the markings in the MMU code path.  The NOMMU code path
always passes PROT_EXEC to the mmap() call.  While this doesn't matter
to most people whilst the code is running, it will cause a pointless
icache flush when starting every FDPIC application.  Typically this
icache flush will be of a region on the order of 128KB in size, or may
be the entire icache, depending on the facilities available on the CPU.

In the case where the arch default behaviour seems to be desired
(EXSTACK_DEFAULT), we probe VM_STACK_FLAGS for VM_EXEC to determine
whether we should be setting PROT_EXEC or not.

For arches that support an MPU (Memory Protection Unit - an MMU without
the virtual mapping capability), setting PROT_EXEC or not will make an
important difference.

It should be noted that this change also affects the executability of
the brk region, since ELF-FDPIC has that share with the stack.  However,
this is probably irrelevant as NOMMU programs aren't likely to use the
brk region, preferring instead allocation via mmap().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-06 18:16:02 -08:00
Tejun Heo 32032df6c2 Merge branch 'master' into percpu
Conflicts:
	arch/powerpc/platforms/pseries/hvCall.S
	include/linux/percpu.h
2010-01-05 09:17:33 +09:00
Linus Torvalds 5a865c0606 Merge branch 'for-33' of git://repo.or.cz/linux-kbuild
* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
  net: fix for utsrelease.h moving to generated
  gen_init_cpio: fixed fwrite warning
  kbuild: fix make clean after mismerge
  kbuild: generate modules.builtin
  genksyms: properly consider  EXPORT_UNUSED_SYMBOL{,_GPL}()
  score: add asm/asm-offsets.h wrapper
  unifdef: update to upstream revision 1.190
  kbuild: specify absolute paths for cscope
  kbuild: create include/generated in silentoldconfig
  scripts/package: deb-pkg: use fakeroot if available
  scripts/package: add KBUILD_PKG_ROOTCMD variable
  scripts/package: tar-pkg: use tar --owner=root
  Kbuild: clean up marker
  net: add net_tstamp.h to headers_install
  kbuild: move utsrelease.h to include/generated
  kbuild: move autoconf.h to include/generated
  drop explicit include of autoconf.h
  kbuild: move compile.h to include/generated
  kbuild: drop include/asm
  kbuild: do not check for include/asm-$ARCH
  ...

Fixed non-conflicting clean merge of modpost.c as per comments from
Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
that needed to be changed to generated/autoconf.h)
2009-12-17 07:23:42 -08:00
Linus Torvalds 525995d77c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (88 commits)
  Blackfin: Convert BUG() to use unreachable()
  Blackfin: define __NR_recvmmsg
  Blackfin: drop duplicate sched_clock
  Blackfin: NOMPU: skip DMA ICPLB hole when it is redundant
  Blackfin: MPU: add missing __init markings
  Blackfin: add support for TIF_NOTIFY_RESUME
  Blackfin: kgdb_test: clean up code a bit
  Blackfin: convert kgdbtest to proc_fops
  Blackfin: convert cyc2ns() to clocksource_cyc2ns()
  Blackfin: ip0x: pull in asm/portmux.h for P_xxx defines
  Blackfin: drop unused ax88180 resources
  Blackfin: bf537-stamp: add ADF702x network driver resources
  Blackfin: bf537-stamp: add CAN resources
  Blackfin: bf537-stamp: add AD5258 i2c address
  Blackfin: bf537-stamp: add adau1761 i2c address
  Blackfin: bf537-stamp: add adau1371 i2c address
  Blackfin: bf537-stamp: add ADP8870 resources
  Blackfin: bf537-stamp: kill AD714x board-specific Kconfigs
  Blackfin: bf537-stamp: update ADP5520 resources
  Blackfin: bf537-stamp: add ADXL346 orientation sensing support
  ...
2009-12-16 10:52:35 -08:00
Linus Torvalds 74f3ae7434 Merge branch 'module' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'module' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  modpost: fix segfault with short symbol names
  module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y
  Kbuild: clear marker out of modpost
  module: make MODULE_SYMBOL_PREFIX into a CONFIG option
  ARM: unexport symbols used to implement floating point emulation
  ARM: use unified discard definition in linker script
  x86: don't export inline function
  sparc64: don't export static inline pci_ functions
2009-12-16 10:47:24 -08:00
Christoph Hellwig 698ba7b5a3 elf: kill USE_ELF_CORE_DUMP
Currently all architectures but microblaze unconditionally define
USE_ELF_CORE_DUMP.  The microblaze omission seems like an error to me, so
let's kill this ifdef and make sure we are the same everywhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: <linux-arch@vger.kernel.org>
Cc: Michal Simek <michal.simek@petalogix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16 07:20:12 -08:00
Michael Hennerich 9cfe4a93e5 fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver
Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16 07:20:01 -08:00
David Daney 64a2b16802 Blackfin: Convert BUG() to use unreachable()
Use the new unreachable() macro instead of for(;;);

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 08:38:35 -05:00
Mike Frysinger 5540a44e3e Blackfin: define __NR_recvmmsg
Commit a2e2725541 added recvmmsg to a bunch of arches (including the
Blackfin entry.S), but didn't actually add the new __NR_ define for it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 04:07:32 -05:00
Alan Jenkins 9e1b9b8072 module: make MODULE_SYMBOL_PREFIX into a CONFIG option
The next commit will require the use of MODULE_SYMBOL_PREFIX in
.tmp_exports-asm.S.  Currently it is mixed in with C structure
definitions in "asm/module.h".  Move the definition of this arch option
into Kconfig, so it can be easily accessed by any code.

This also lets modpost.c use the same definition.  Previously modpost
relied on a hardcoded list of architectures in mk_elfconfig.c.

A build test for blackfin, one of the two MODULE_SYMBOL_PREFIX archs,
showed the generated code was unchanged.  vmlinux was identical save
for build ids, and an apparently randomized suffix on a single "__key"
symbol in the kallsyms data).

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Mike Frysinger <vapier@gentoo.org> (blackfin)
CC: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-12-15 16:28:26 +10:30
Mike Frysinger 8a833110f1 Blackfin: drop duplicate sched_clock
The Blackfin sched_clock() func is pretty much a duplicate of the common
version, so just punt it.

Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:56 -05:00
Mike Frysinger a797a0e242 Blackfin: NOMPU: skip DMA ICPLB hole when it is redundant
Normally there is no user-reserved memory after the DMA region which means
there is no user-reserved ICPLB coverage.  So the DMA hole can be covered
by the large hole that is always added to cover up to the async bank.  We
only need an explicit DMA whole when we also add an explicit mapping for
the user-reserved memory.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:54 -05:00
Mike Frysinger 0a68b5341d Blackfin: MPU: add missing __init markings
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:53 -05:00
Barry Song d1be2e485b Blackfin: add support for TIF_NOTIFY_RESUME
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:52 -05:00
Mike Frysinger 88f7c2fb0f Blackfin: kgdb_test: clean up code a bit
- document simple global symbols
- convert printk to pr_*
- clean up spurious whitespace
- use min_t()

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:50 -05:00
Alexey Dobriyan 397b761cc4 Blackfin: convert kgdbtest to proc_fops
The read_proc and write_proc interfaces are going to be removed in the
common kernel code.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:49 -05:00
Mike Frysinger c768a943fd Blackfin: convert cyc2ns() to clocksource_cyc2ns()
The former no longer exists.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:47 -05:00
Mike Frysinger 99e452e5d3 Blackfin: ip0x: pull in asm/portmux.h for P_xxx defines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:44 -05:00
Mike Frysinger caf0ea8582 Blackfin: drop unused ax88180 resources
The ax88180 driver was never merged, so drop the corresponding resources.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:43 -05:00
Michael Hennerich efaf7cd955 Blackfin: bf537-stamp: add ADF702x network driver resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:40 -05:00
Barry Song 706a01b1c6 Blackfin: bf537-stamp: add CAN resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:38 -05:00
Michael Hennerich 1f13f2fdca Blackfin: bf537-stamp: add AD5258 i2c address
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:35 -05:00
Cliff Cai 04267638e0 Blackfin: bf537-stamp: add adau1761 i2c address
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:32 -05:00
Cliff Cai d53127ffd6 Blackfin: bf537-stamp: add adau1371 i2c address
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:31 -05:00
Michael Hennerich 78756c6230 Blackfin: bf537-stamp: add ADP8870 resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:29 -05:00
Mike Frysinger 5b7c57751e Blackfin: bf537-stamp: kill AD714x board-specific Kconfigs
Include the AD714x SPI/I2C resources based on what is possible.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:25 -05:00
Michael Hennerich 1d23dc89f2 Blackfin: bf537-stamp: update ADP5520 resources
Matches feedback for driver changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:23 -05:00
Michael Hennerich 5db4036b46 Blackfin: bf537-stamp: add ADXL346 orientation sensing support
The ADXL34x driver was updated to include orientation sensing, so have the
bf537-stamp use it by default.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:20 -05:00
Michael Hennerich 57af8edf3f Blackfin: bf537-stamp/bf548-ezkit: update ADXL34x resources
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:18 -05:00
Mike Frysinger 31ad0e27ed Blackfin: BF51x: unify def/cdef headers
Whole lot of duplicated code here just went bye bye.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:16 -05:00
Mike Frysinger b1740549d4 Blackfin: BF52x: unify def/cdef headers
Whole lot of duplicated code here just went bye bye.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:13 -05:00
Mike Frysinger 7eb87fd3f1 Blackfin: BF537: push down error masks to avoid namespace pollution
The error masks are only needed in the BF537 demux error code, so instead
of needing all the short peripheral defines in global space, push these
masks into the one file where they are actually needed.  This fixes a
bunch of define collisions with common code (can/serial/etc...).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Barry Song <barry.song@analog.com>
2009-12-15 00:16:11 -05:00
Yi Li 578d36f5e1 Blackfin: SMP: don't start up core b until its state has been completely onlined
When testing PREEMPT_RT kernel on BF561-EZKit, the kernel blocks while
booting.  When the kernel initializes the ethernet driver, it sleeps and
never wakes up.

The issue happens when the kernel waits for a timer for Core B to timeout
(the timers are per-cpu based: static DEFINE_PER_CPU(struct tvec_base *,
tvec_bases) = &boot_tvec_bases).

However, the ksoftirqd thread for Core B (note, the ksoftirqd thread is
also per-cpu based) cannot work properly, and the timers for Core B never
times out.

When ksoftirqd() for the first time runs on core B, it is possible core A
is still initializing core B (see smp_init() -> cpu_up() -> __cpu_up()).
So the "cpu_is_offline()" check may return true and ksoftirqd moves to
"wait_to_die".

So delay the core b start up until the per-cpu timers have been set up
fully.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:09 -05:00
Barry Song ad774b7cb0 Blackfin: convert to asm-generic pci headers
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:07 -05:00
Mike Frysinger 2d40292b5a Blackfin: io.h: fix random busted whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:04 -05:00
Barry Song dd3b0e3e6a Blackfin: dma-mapping.h: flesh out missing DMA mapping functions
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:16:01 -05:00
Barry Song a00b4fe5ce Blackfin: workaround anomaly 05000310
While fetching instructions at the boundary of L1 instruction SRAM, a false
External Memory Addressing Error might be triggered.  We should ignore this
and continue on our way to avoid random crashes.

Because hardware errors are not exact in the Blackfin architecture, we need
to catch a few more common cases when the code flow changes and the signal
is finally delivered.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:59 -05:00
Mike Frysinger 340a1be1ee Blackfin: drop ptrace() write support for fixed code/bootrom
These regions are either read-only and won't work anyways (bootrom), or
we don't want people screwing with them because they're shared between
all processes (fixed code).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:57 -05:00
Barry Song e187837b6f Blackfin: MPU: support XIP in async flash memory
The NOMPU code already supported executing in the async banks, so this
brings the MPU code in line.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:54 -05:00
Barry Song d45e8db1b2 Blackfin: drop 4KB reserve at end of memory
The point of this small chunk was to avoid anomaly 05000310.  This never
really seemed to do what it was intended though -- no valid CPLBs exist
over the reserved memory, and there is often memory before it anyways (due
to the uClinux MTD and/or reserved DMA region).  Plus, it doesn't address
the L1 instruction case.

So drop this chunk as it wastes memory and is affront to humanity.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:50 -05:00
Barry Song c45c06596e Blackfin: support smaller uncached DMA chunks for memory constrained systems
When working with 8 meg systems, forcing a 1 meg DMA chunk heavily cuts
into the available resources.  So support smaller chunks to better cover
needs for these systems.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:48 -05:00
Mike Frysinger 5df326aca4 Blackfin: push BF5Xx configs down into mach-specific Kconfigs
While we're moving the BF54x code, have the BF54xM variants select the
normal BF54x values so that the rest of the Kconfig tree doesn't need to
check the BF54xM variant everytime it wants to check the BF54x.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:45 -05:00
Mike Frysinger 2f5a086402 Blackfin: finish_atomic_sections: optimize the RTS step
No point in returning to userspace just to have it immediately perform the
RTS step.  We have to update the PC anyways, so do the RTS too.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:42 -05:00
Sonic Zhang 0d5e35940b Blackfin: kgdb: punt dead code
None of these vars/funcs were being used.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:40 -05:00
Mike Frysinger e34132f40b Blackfin: reject NULL callback in set_dma_callback()
It makes no sense to call this function with a NULL callback.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:37 -05:00
Mike Frysinger 43acb9cdef Blackfin: punt dead/unused flash mem_init settings
I don't think these defines were ever used.  At any rate, we have common
bit defines for all parts as well as a Kconfig option to declare the EBIU
async timings, and no one has really complained about this so far.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:33 -05:00
Mike Frysinger 8c0b4351cc Blackfin: gptimers: use unsigned timer/group ids
Since we always use these ids as unsigned values, and we have some assert
code to make sure they don't exceed a limit, avoid signed issues.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:30 -05:00
Robin Getz dbc5e6989e Blackfin: don't walk VMAs when oopsing
If we're double faulting, then we have to assume the VMAs are not safe as
broken pointers here will prevent full trace output for the double fault.
Shouldn't be a big problem though as rarely is a double fault caused by
code in userspace.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:28 -05:00
Mike Frysinger e92d32fcb9 Blackfin: force BFD target when linking modules
This allows us to use any Blackfin toolchain to create kernel modules
(such as the FDPIC bfin-linux-uclibc toolchain).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:25 -05:00
Mike Frysinger ee3773367b Blackfin: comment the FDPIC PTRACE defines
This matches similar documentation for the FRV FDPIC code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:23 -05:00
Philippe Gerum 2c29661e0b Blackfin/ipipe: update version stamp
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Li Yi <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:21 -05:00
Philippe Gerum 4815b883ed Blackfin/ipipe: introduce support for CONFIG_MPU
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Li Yi <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:18 -05:00
Philippe Gerum 7d4a005c43 Blackfin/ipipe: fix forward ref to barrier()
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Li Yi <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:15 -05:00
Philippe Gerum d2685fb7b4 Blackfin/ipipe: prepare status bitops for SMP support
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Li Yi <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:12 -05:00
Valentin Yakovenkov ab843c7940 Blackfin: add support for the Acvilon BF561 board
Signed-off-by: Valentin Yakovenkov <yakovenkov@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:10 -05:00
Mike Frysinger b2e8dbd204 Blackfin: add an uncompressed vmImage target
This is useful for quick tests where networks are faster than compression,
and/or the compression code is broken.

Reported-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:08 -05:00
Mike Frysinger 13a1320cf5 Blackfin: don't give CPU its own line in traps output
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:05 -05:00
Robin Getz 7a1a8cc190 Blackfin: announce current cpu rev when booting
User reports rarely include full information, so include this important
tidbit up front.  It's also good to know at a glance in general.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:15:01 -05:00
Mike Frysinger 00d2460454 Blackfin: unify DMA masks
Every Blackfin variant has the same DMA bit masks, so avoid duplicating
them over and over in each mach header.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:59 -05:00
Michael Hennerich c6feb76828 Blackfin: fix typo in isp1760 platform name
The driver changed from "isp1760-hcd" to "isp1760", so update resources
to match.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:55 -05:00
Mike Frysinger a8e8e49168 Blackfin: unify duplicated power masks
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:53 -05:00
Mike Frysinger 761ec44add Blackfin: pull in asm/dpmc.h for power defines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:50 -05:00
Mike Frysinger 2abdf79115 Blackfin: H8606/ip0x: drop redundant SPI ctl_reg settings
No need to set MSTR in .ctl_reg as the Blackfin SPI bus driver does this
already for all parts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:49 -05:00
Mike Frysinger cfed440997 Blackfin: BF54x: punt useless "masks" for count/address MMRs
There's no point in having mask defines when the entire MMR value is a
count or address.  i.e. applying a mask of -1 is pointless.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:45 -05:00
Mike Frysinger e153a97c21 Blackfin: punt unused MXVR masks
There are no MXVR device drivers, and if someday there is, we can put
these in a dedicated header rather than polluting the global namespace.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:43 -05:00
Mike Frysinger cd32cc7362 Blackfin: punt OTP MMRs
People should not be accessing OTP MMRs directly.  They should instead go
through the Blackfin ROM helper functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:40 -05:00
Mike Frysinger b1fa2e8f62 Blackfin: BF51x: dump non-existent SPI/NFC MMRs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:39 -05:00
Mike Frysinger 341a1fc0d1 Blackfin: scrub unused watchdog mmr masks
The watchdog code doesn't need these, and the other parts had these
punted, so keep the global namespace clean.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:36 -05:00
Mike Frysinger 1915b6c0ae Blackfin: scrub unused RTC masks
The RTC driver code doesn't need these, and the other parts had these
punted, so keep the global namespace clean.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:33 -05:00
Mike Frysinger 60883e28b3 Blackfin: unify BF547/8/9 headers
No point in duplicating entire lists when we can simply tail into other
parts for most of the MMRs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:31 -05:00
Mike Frysinger 4ed250a563 Blackfin: fix some BF547 header copy & paste typos
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:28 -05:00
Mike Frysinger 5da8a3dc48 Blackfin: rename BF542 host dma defines
All the other BF54x parts had these defines renamed to avoid collision,
but it looks the BF542 was missed somehow.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:25 -05:00
Mike Frysinger 17a1b5e374 Blackfin: coreb: switched to unlocked_ioctl
We don't need the BKL and now people will stop looking at this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:21 -05:00
Mike Frysinger d2e015d65f Blackfin: convert DMA mutex to an atomic and drop redundant code
The DMA channel status field was encoding redundant info wrt the DMA MMR
config register, and it was doing an incomplete job of checking all DMA
channels (some drivers write directly to the config register).  So drop
the tristate field in favor of a binary atomic field.  This simplifies
the code in general, removes the implicit need for sleeping, and forces
the suspend code to handle all channels properly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:18 -05:00
Michael Hennerich adfc046740 Blackfin: update bfin_rotary defines
The driver was moved during the merge process, so update the defines to
match the new location.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:16 -05:00
Mike Frysinger bbc51e97d3 Blackfin: push down asm/ includes and out of bfin-global.h
Avoid including unnecessary headers all the time as well as circular
includes with core requirements.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:14 -05:00
Mike Frysinger 872d024b40 Blackfin: pull in firmware Kconfig
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:12 -05:00
Mike Frysinger b6357116c4 Blackfin: BF51x/BF52x: fill out bfin_clear_PPI_STATUS()
All the arches define a helper macro to make things easy for driver code.

Reported-by: Frank Van Hooft <frank@frankvh.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:09 -05:00
Barry Song 6e3647554e Blackfin: bf537-stamp: need io.h for writeb() funcs
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:08 -05:00
Michael Hennerich 621dd24743 Blackfin: bf538: add support for extended GPIO banks
The GPIOs on ports C/D/E on the BF538/BF539 do not behave the same way as
the other ports on the part and the same way as all other Blackfin parts.
The MMRs are programmed slightly different and they cannot be used to
generate interrupts or wakeup a sleeping system.  Since these guys don't
fit into the existing code, create a simple gpiolib driver for them.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:05 -05:00
Graf Yang 46fe23ac39 Blackfin: add C define of trace_buffer_init()
Have the C API trace funcs match the assembly API trace funcs.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:03 -05:00
Michael Hennerich d887a1ce28 Blackfin: cpufreq: use a constant latency
PLL_LOCKCNT applies only to the PLL programming sequence which does not
apply to core and system clock dividers.  Writes to PLL_DIV to change the
CSEL/SSEL dividers take effect immediately.

There is still overhead in software in writing the new dividers, so just
use a value of 50us as this should be good enough.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:14:00 -05:00
Mike Frysinger 21b03cfe4c Blackfin: clean up isp1362 board resources
Drop the CONFIG_USB_ISP1362_BFIN_GPIO_IRQ Kconfig as it never made it into
mainline and it was a bad interface into the board resources.  For boards
that actually used this, replace it with an actual IRQ define.  For boards
that didn't, simply drop the resources.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:58 -05:00
Mike Frysinger 5cd82a6d58 Blackfin: calculate on-chip lengths at link time rather than run time
Since the link sizes never change at runtime, push the calculation out to
the linker script to save some useless calculation costs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:55 -05:00
Bernd Schmidt 13048f8866 Blackfin: improve async bank access checking (for cross-banks & XIP)
The access_ok() function did not accept ranges within the async banks
which made it impossible to do XIP in flash.  Fixing that also showed
that the current bfin_mem_access_type() code did not work with accesses
that spanned async banks (like a file system).  So split out and fix the
async bank checks so that all these scenarios work as expected.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:52 -05:00
Michael Hennerich cb5ae60f7a Blackfin: convert DMA code to a proper bitmap
Rather than using our own data structures that basically boil down to a
bitmap, use the standard bitmap functions.

Reported-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:51 -05:00
Michael Hennerich ddcd7cb857 Blackfin: clean up bf537-lq035 board resources
Now that the driver has been updated, convert the board resources to the
new i2c framework for managing slaves.

For boards that don't actually hook up to this hardware, simply drop the
resources altogether.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:48 -05:00
Barry Song 89e84eeace Blackfin: add some bounds checking to peripheral_request
The requested peripheral is turned into an index into some state arrays,
so make sure the calculated index doesn't exceed the index.  This occurs
when using bogus pin values or the define headers are screwed up.  Now
we'll notice right away that something needs fixing instead of trying to
track down random memory corruption.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:46 -05:00
Yi Li 298571249a Blackfin: use common code for cycle->nanosecond conversion
No point in redefining things that common code already does for us.  Also
use CYC2NS_SCALE_FACTOR to better reflect reality and for better precision.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:43 -05:00
Yi Li ceb33be95a Blackfin: unify sched_clock() handling between clock sources
Currently sched_clock() is only defined when using CYCLES as a clock
source.  Declare sched_clock() in common code and mark it with notrace to
prevent invoking sched_clock() recursively (because ftrace uses
sched_clock() to record time).

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:41 -05:00
Yi Li f7036d649c Blackfin: fix gptimer0 clock source compile warning
Some of the clocksource prototypes were updated, but the gptimer0 func was
missed in the process.  Not a big issue as the argument is ignored, but we
should fix the compile warning anyways.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:38 -05:00
Mike Frysinger 3a022ba9ac Blackfin: update defconfigs
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:37 -05:00
Mike Frysinger ddf9ddacef Blackfin: convert to generic checksum code
The Blackfin port only implemented an optimized version of the
csum_tcpudp_nofold function, so convert everything else to the new
generic code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15 00:13:32 -05:00
Thomas Gleixner 239007b844 genirq: Convert irq_desc.lock to raw_spinlock
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
2009-12-14 23:55:33 +01:00
Thomas Gleixner e5931943d0 locking: Convert raw_rwlock functions to arch_rwlock
Name space cleanup for rwlock functions. No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
Thomas Gleixner fb3a6bbc91 locking: Convert raw_rwlock to arch_rwlock
Not strictly necessary for -rt as -rt does not have non sleeping
rwlocks, but it's odd to not have a consistent naming convention.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
Thomas Gleixner 0199c4e68d locking: Convert __raw_spin* functions to arch_spin*
Name space cleanup. No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
Thomas Gleixner edc35bd72e locking: Rename __RAW_SPIN_LOCK_UNLOCKED to __ARCH_SPIN_LOCK_UNLOCKED
Further name space cleanup. No functional change

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
Thomas Gleixner 445c89514b locking: Convert raw_spinlock to arch_spinlock
The raw_spin* namespace was taken by lockdep for the architecture
specific implementations. raw_spin_* would be the ideal name space for
the spinlocks which are not converted to sleeping locks in preempt-rt.

Linus suggested to convert the raw_ to arch_ locks and cleanup the
name space instead of using an artifical name like core_spin,
atomic_spin or whatever

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: linux-arch@vger.kernel.org
2009-12-14 23:55:32 +01:00
Sam Ravnborg 559df2e021 kbuild: move asm-offsets.h to include/generated
The simplest method was to add an extra asm-offsets.h
file in arch/$ARCH/include/asm that references the generated file.

We can now migrate the architectures one-by-one to reference
the generated file direct - and when done we can delete the
temporary arch/$ARCH/include/asm/asm-offsets.h file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Linus Torvalds 3126c136bc Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: (21 commits)
  ext3: PTR_ERR return of wrong pointer in setup_new_group_blocks()
  ext3: Fix data / filesystem corruption when write fails to copy data
  ext4: Support for 64-bit quota format
  ext3: Support for vfsv1 quota format
  quota: Implement quota format with 64-bit space and inode limits
  quota: Move definition of QFMT_OCFS2 to linux/quota.h
  ext2: fix comment in ext2_find_entry about return values
  ext3: Unify log messages in ext3
  ext2: clear uptodate flag on super block I/O error
  ext2: Unify log messages in ext2
  ext3: make "norecovery" an alias for "noload"
  ext3: Don't update the superblock in ext3_statfs()
  ext3: journal all modifications in ext3_xattr_set_handle
  ext2: Explicitly assign values to on-disk enum of filetypes
  quota: Fix WARN_ON in lookup_one_len
  const: struct quota_format_ops
  ubifs: remove manual O_SYNC handling
  afs: remove manual O_SYNC handling
  kill wait_on_page_writeback_range
  vfs: Implement proper O_SYNC semantics
  ...
2009-12-11 15:31:13 -08:00
Al Viro f8b7256096 Unify sys_mmap*
New helper - sys_mmap_pgoff(); switch syscalls to using it.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-12-11 06:44:29 -05:00
Christoph Hellwig 6b2f3d1f76 vfs: Implement proper O_SYNC semantics
While Linux provided an O_SYNC flag basically since day 1, it took until
Linux 2.4.0-test12pre2 to actually get it implemented for filesystems,
since that day we had generic_osync_around with only minor changes and the
great "For now, when the user asks for O_SYNC, we'll actually give
O_DSYNC" comment.  This patch intends to actually give us real O_SYNC
semantics in addition to the O_DSYNC semantics.  After Jan's O_SYNC
patches which are required before this patch it's actually surprisingly
simple, we just need to figure out when to set the datasync flag to
vfs_fsync_range and when not.

This patch renames the existing O_SYNC flag to O_DSYNC while keeping it's
numerical value to keep binary compatibility, and adds a new real O_SYNC
flag.  To guarantee backwards compatiblity it is defined as expanding to
both the O_DSYNC and the new additional binary flag (__O_SYNC) to make
sure we are backwards-compatible when compiled against the new headers.

This also means that all places that don't care about the differences can
just check O_DSYNC and get the right behaviour for O_SYNC, too - only
places that actuall care need to check __O_SYNC in addition.  Drivers and
network filesystems have been updated in a fail safe way to always do the
full sync magic if O_DSYNC is set.  The few places setting O_SYNC for
lower layers are kept that way for now to stay failsafe.

We enforce that O_DSYNC is set when __O_SYNC is set early in the open path
to make sure we always get these sane options.

Note that parisc really screwed up their headers as they already define a
O_DSYNC that has always been a no-op.  We try to repair it by using it for
the new O_DSYNC and redefinining O_SYNC to send both the traditional
O_SYNC numerical value _and_ the O_DSYNC one.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jan Kara <jack@suse.cz>
2009-12-10 15:02:50 +01:00
Linus Torvalds 4ef58d4e2a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (42 commits)
  tree-wide: fix misspelling of "definition" in comments
  reiserfs: fix misspelling of "journaled"
  doc: Fix a typo in slub.txt.
  inotify: remove superfluous return code check
  hdlc: spelling fix in find_pvc() comment
  doc: fix regulator docs cut-and-pasteism
  mtd: Fix comment in Kconfig
  doc: Fix IRQ chip docs
  tree-wide: fix assorted typos all over the place
  drivers/ata/libata-sff.c: comment spelling fixes
  fix typos/grammos in Documentation/edac.txt
  sysctl: add missing comments
  fs/debugfs/inode.c: fix comment typos
  sgivwfb: Make use of ARRAY_SIZE.
  sky2: fix sky2_link_down copy/paste comment error
  tree-wide: fix typos "couter" -> "counter"
  tree-wide: fix typos "offest" -> "offset"
  fix kerneldoc for set_irq_msi()
  spidev: fix double "of of" in comment
  comment typo fix: sybsystem -> subsystem
  ...
2009-12-09 19:43:33 -08:00
Linus Torvalds 2588465bad Merge branch 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'bkl-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  mn10300: Remove the BKL from sys_execve
  m68knommu: Remove the BKL from sys_execve
  m68k: Remove the BKL from sys_execve
  h83000: Remove BKL from sys_execve
  frv: Remove the BKL from sys_execve
  blackfin: Remove the BKL from sys_execve
  um: Remove BKL from mmapper
  um: Remove BKL from random
  s390: Remove BKL from prng
2009-12-09 08:07:51 -08:00
Linus Torvalds 6035ccd8e9 Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block: (113 commits)
  cfq-iosched: Do not access cfqq after freeing it
  block: include linux/err.h to use ERR_PTR
  cfq-iosched: use call_rcu() instead of doing grace period stall on queue exit
  blkio: Allow CFQ group IO scheduling even when CFQ is a module
  blkio: Implement dynamic io controlling policy registration
  blkio: Export some symbols from blkio as its user CFQ can be a module
  block: Fix io_context leak after failure of clone with CLONE_IO
  block: Fix io_context leak after clone with CLONE_IO
  cfq-iosched: make nonrot check logic consistent
  io controller: quick fix for blk-cgroup and modular CFQ
  cfq-iosched: move IO controller declerations to a header file
  cfq-iosched: fix compile problem with !CONFIG_CGROUP
  blkio: Documentation
  blkio: Wait on sync-noidle queue even if rq_noidle = 1
  blkio: Implement group_isolation tunable
  blkio: Determine async workload length based on total number of queues
  blkio: Wait for cfq queue to get backlogged if group is empty
  blkio: Propagate cgroup weight updation to cfq groups
  blkio: Drop the reference to queue once the task changes cgroup
  blkio: Provide some isolation between groups
  ...
2009-12-08 08:19:16 -08:00
Jiri Kosina d014d04386 Merge branch 'for-next' into for-linus
Conflicts:

	kernel/irq/chip.c
2009-12-07 18:36:35 +01:00
André Goddard Rosa af901ca181 tree-wide: fix assorted typos all over the place
That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-12-04 15:39:55 +01:00
Jens Axboe 220d0b1dbf Merge branch 'master' into for-2.6.33 2009-12-03 13:49:39 +01:00
David S. Miller ff9c38bba3 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	net/mac80211/ht.c
2009-12-01 22:13:38 -08:00
Ilya Loginov 2d4dc890b5 block: add helpers to run flush_dcache_page() against a bio and a request's pages
Mtdblock driver doesn't call flush_dcache_page for pages in request.  So,
this causes problems on architectures where the icache doesn't fill from
the dcache or with dcache aliases.  The patch fixes this.

The ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE symbol was introduced to avoid
pointless empty cache-thrashing loops on architectures for which
flush_dcache_page() is a no-op.  Every architecture was provided with this
flush pages on architectires where ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE is
equal 1 or do nothing otherwise.

See "fix mtd_blkdevs problem with caches on some architectures" discussion
on LKML for more information.

Signed-off-by: Ilya Loginov <isloginov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Peter Horton <phorton@bitbox.co.uk>
Cc: "Ed L. Cashin" <ecashin@coraid.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-26 09:16:19 +01:00
Graf Yang aa23531ce5 Blackfin: fix SMP build error in start_thread()
Commit d5ce528c8e (Blackfin: convert irq/process to asm-generic)
incorrectly merged the smp and non-smp cases of start_thread() causing the
L1 stack to be setup on the SMP port instead of the UP port.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:38:01 -05:00
Roel Kluin 05bad36ce7 Blackfin: fix memset in smp_send_reschedule() and -stop()
To set zeroes the sizeof the struct should be used rather
than sizeof the pointer, kzalloc does that.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:45 -05:00
Jie Zhang 46b60faf8c Blackfin: fix typo in ptrace poking
Commit c014e15a2f (Blackfin: convert ptrace to new memory functions)
introduced a copy & paste typo in the ptrace poke data/text handling.  The
access_process_vm() function call was telling it to read instead of write.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:43 -05:00
Mike Frysinger a2ca78cee1 Blackfin: check for anomaly 05000475
Parts that have on-chip L2 SRAM cannot safely utilize writeback caching
mode, so reject any attempts to use it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:41 -05:00
Mike Frysinger f99e8c1d0f Blackfin: work around testset anomaly 05000477
Ironically, the atomic testset instruction cannot be interrupted else it
will produce incorrect results.  So disable interrupts to help it out.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:39 -05:00
Mike Frysinger af5d7fc7e4 Blackfin: update anomaly lists
Add some recently documented anomalies (473, 474, 475, 477).  Also stick
a "do not edit" notice in here so people know these are copies of some
master version.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:37 -05:00
André Goddard Rosa 7bae2c4898 Blackfin: fix cache Kconfig typo
The Kconfig option is "BFIN_EXTMEM_WRITETHROUGH", not "..._WRITETROUGH".

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:35 -05:00
Michael Hennerich 865bddfbf7 Blackfin: fix suspend/resume failure with some on-chip ROMs
Some Blackfin on-chip ROMs utilize some MDMA channels during the suspend
and resume process, but don't clean up after themselves.  So manually
clear all DMA channels when resuming since no DMA could have been running
at this point in time.  Now Linux should be able to work regardless of any
laziness on the part of the on-chip ROM or boot loader.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-25 02:35:33 -05:00
David S. Miller 3505d1a9fd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/sfc/sfe4001.c
	drivers/net/wireless/libertas/cmd.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/rtl8187se/Kconfig
	drivers/staging/rtl8192e/Kconfig
2009-11-18 22:19:03 -08:00
Rusty Russell dd17c8f729 percpu: remove per_cpu__ prefix.
Now that the return from alloc_percpu is compatible with the address
of per-cpu vars, it makes sense to hand around the address of per-cpu
variables.  To make this sane, we remove the per_cpu__ prefix we used
created to stop people accidentally using these vars directly.

Now we have sparse, we can use that (next patch).

tj: * Updated to convert stuff which were missed by or added after the
      original patch.

    * Kill per_cpu_var() macro.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
2009-10-29 22:34:15 +09:00
John Kacur 25708a5fe7 blackfin: Remove the BKL from sys_execve
This looks like a cut-and-paste job. For example, compare this
function to sys_execve in arch/x86/kernel/process_64.c and it is
almost line by line the same, except the one in x86 nolonger has the
big kernel lock. All of the functions called between the lock are
generic and not specific to blackfin - thus, I believe it is safe to
remove the bkl here.

Signed-off-by: John Kacur <jkacur@redhat.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
LKML-Reference: <alpine.LFD.2.00.0910130007240.3658@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-10-14 17:18:14 +02:00
Arnaldo Carvalho de Melo a2e2725541 net: Introduce recvmmsg socket syscall
Meaning receive multiple messages, reducing the number of syscalls and
net stack entry/exit operations.

Next patches will introduce mechanisms where protocols that want to
optimize this operation will provide an unlocked_recvmsg operation.

This takes into account comments made by:

. Paul Moore: sock_recvmsg is called only for the first datagram,
  sock_recvmsg_nosec is used for the rest.

. Caitlin Bestler: recvmmsg now has a struct timespec timeout, that
  works in the same fashion as the ppoll one.

  If the underlying protocol returns a datagram with MSG_OOB set, this
  will make recvmmsg return right away with as many datagrams (+ the OOB
  one) it has received so far.

. Rémi Denis-Courmont & Steven Whitehouse: If we receive N < vlen
  datagrams and then recvmsg returns an error, recvmmsg will return
  the successfully received datagrams, store the error and return it
  in the next call.

This paves the way for a subsequent optimization, sk_prot->unlocked_recvmsg,
where we will be able to acquire the lock only at batch start and end, not at
every underlying recvmsg call.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 23:40:10 -07:00
Alexey Dobriyan d43c36dc6b headers: remove sched.h from interrupt.h
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-11 11:20:58 -07:00
Michael Hennerich 796dada9f5 Blackfin: convert to GENERIC_HARDIRQS_NO__DO_IRQ
Blackfin already sets proper flow handlers on all IRQs, and we don't rely
on __do_IRQ, therefore we can simply select GENERIC_HARDIRQS_NO__DO_IRQ.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:20 -04:00
Mike Frysinger 282246dae8 Blackfin: drop all simple-gpio board resources
The simple-gpio has been replaced by the gpio sysfs interface, so drop the
unused simple-gpio resources from all Blackfin boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:18 -04:00
Thomas Chou 59bd00c850 Blackfin: fix framebuffer mmap bug for nommu
The patch added a special get_unmapped_area for framebuffer which
was hooked to the file ops in drivers/video/fbmem.c.

This is needed since v2.6.29-rc1 where nommu vma management was
updated, and mmap of framebuffer caused kernel BUG panic. You may turn
on "Debug the global anon/private NOMMU mapping region tree" config to
such message.

As Documentation/nommu-mmap.txt said,
"To provide shareable character device support, a driver must provide
a file->f_op->get_unmapped_area() operation. The mmap() routines will
call this to get a proposed address for the mapping."

With this change, user space should call mmap for framebuffer using
shared map. Or it can try shared map first, then private map if
failed. This shared map usage is now consistent between mmu and nommu.

The sys_ file may not be a good place for this patch. But there is a
similar one for sparc. I tested a similar patch on nios2nommu, though
I don't have a blackfin board to test.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:15 -04:00
Jaswinder Singh Rajput 4a7bcb4fe9 Blackfin: includecheck fix: mach-bf548, ezkit.c
Fix the following 'make includecheck' warning:

  arch/blackfin/mach-bf548/boards/ezkit.c: linux/input.h is included more than once.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:13 -04:00
Mike Frysinger 5a2b0d7315 Blackfin: drop cs_change_per_word setting
Structs get initialized to 0 already, and we want to punt this field, so
scrub it from all of our boards.

Reported-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:11 -04:00
Mike Frysinger 7036c61fe0 Blackfin: bf533-ezkit: convert to physmap/jedec_probe
Now that the common jedec_probe supports the ST PSD4256G6V, no need to
use the custom stm_flash driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:58:07 -04:00
Michael Hennerich 50c4c0861a Blackfin: convert adv7393 resources to new i2c framework
Now that the driver has been updated, convert the board resources to the
new i2c framework for managing slaves.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-08 00:57:54 -04:00
Graf Yang 19a3b6034a Blackfin: fix missed cache config renames
Looks like the big Kconfig cache split/rename missed one spot in the SMP
cache lock headers.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07 04:48:08 -04:00
Mike Frysinger 48dee09325 Blackfin: cplbinfo: drop d_path() hacks
The cplbinfo was using d_path() to figure out which cpu/cplb was being
parsed.  As Al pointed out, this isn't exactly reliable as it assumes the
static VFS path to be unchanged, and it's just poor form.  So use the
proc_create_data() to properly (and internally) pass the exact cpu/cplb
requested to the parser function.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07 04:48:04 -04:00
Mike Frysinger d586e833f9 Blackfin: asm/irq.h: pull in mach/anomaly.h for anomaly defines
The asm/irq.h header uses anomaly defines, but doesn't make sure to
explicitly include the anomaly header for them.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07 04:48:01 -04:00
Barry Song 6206f709d9 Blackfin: BF51x: add PTP MMR defines 2009-10-07 04:47:57 -04:00
Robin Getz 96f1050d3d Blackfin: mass clean up of copyright/licensing info
Bill Gatliff & David Brownell pointed out we were missing some
copyrights, and licensing terms in some of the files in
./arch/blackfin, so this fixes things, and cleans them up.

It also removes:
 - verbose GPL text(refer to the top level ./COPYING file)
 - file names (you are looking at the file)
 - bug url (it's in the ./MAINTAINERS file)
 - "or later" on GPL-2, when we did not have that right

It also allows some Blackfin-specific assembly files to be under a BSD
like license (for people to use them outside of Linux).

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07 04:36:26 -04:00
john stultz 10f03f1a24 Blackfin: convert to use arch_gettimeoffset()
Convert Blackfin to use GENERIC_TIME via the arch_getoffset()
infrastructure, reducing the amount of arch specific code we need to
maintain.

I've taken my best swing at converting this, but I'm not 100% confident
I got it right.  My cross-compiler is now out of date (gcc4.2) so I
wasn't able to check if it compiled. Any assistance from arch
maintainers or testers to get this merged would be great.

Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07 04:36:20 -04:00
Alexey Dobriyan 828c09509b const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:11 -07:00
Tim Abbott 4a5e35135d blackfin: Cleanup linker script using new linker script macros.
Signed-off-by: Tim Abbott <tabbott@ksplice.com>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24 17:16:22 -07:00
Linus Torvalds c37efa9325 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits)
  Use macros for .data.page_aligned section.
  Use macros for .bss.page_aligned section.
  Use new __init_task_data macro in arch init_task.c files.
  kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.
  arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
  kbuild: add static to prototypes
  kbuild: fail build if recordmcount.pl fails
  kbuild: set -fconserve-stack option for gcc 4.5
  kbuild: echo the record_mcount command
  gconfig: disable "typeahead find" search in treeviews
  kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
  checkincludes.pl: add option to remove duplicates in place
  markup_oops: use modinfo to avoid confusion with underscored module names
  checkincludes.pl: provide usage helper
  checkincludes.pl: close file as soon as we're done with it
  ctags: usability fix
  kernel hacking: move STRIP_ASM_SYMS from General
  gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma
  kbuild: Check if linker supports the -X option
  kbuild: introduce ld-option
  ...

Fix trivial conflict in scripts/basic/fixdep.c
2009-09-23 15:37:02 -07:00
Mike Frysinger e56770fbc4 Blackfin: override text/data checking functions
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 07:39:32 -07:00
Linus Torvalds 342ff1a1b5 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  trivial: fix typo in aic7xxx comment
  trivial: fix comment typo in drivers/ata/pata_hpt37x.c
  trivial: typo in kernel-parameters.txt
  trivial: fix typo in tracing documentation
  trivial: add __init/__exit macros in drivers/gpio/bt8xxgpio.c
  trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
  trivial: remove unnecessary semicolons
  trivial: Fix duplicated word "options" in comment
  trivial: kbuild: remove extraneous blank line after declaration of usage()
  trivial: improve help text for mm debug config options
  trivial: doc: hpfall: accept disk device to unload as argument
  trivial: doc: hpfall: reduce risk that hpfall can do harm
  trivial: SubmittingPatches: Fix reference to renumbered step
  trivial: fix typos "man[ae]g?ment" -> "management"
  trivial: media/video/cx88: add __init/__exit macros to cx88 drivers
  trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
  trivial: fix missing printk space in amd_k7_smp_check
  trivial: fix typo s/ketymap/keymap/ in comment
  trivial: fix typo "to to" in multiple files
  trivial: fix typos in comments s/DGBU/DBGU/
  ...
2009-09-22 07:51:45 -07:00
Anand Gadiyar 411c940385 trivial: fix typo "for for" in multiple files
trivial: fix typo "for for" in multiple files

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:54 +02:00
Ingo Molnar cdd6c482c9 perf: Do the big rename: Performance Counters -> Performance Events
Bye-bye Performance Counters, welcome Performance Events!

In the past few months the perfcounters subsystem has grown out its
initial role of counting hardware events, and has become (and is
becoming) a much broader generic event enumeration, reporting, logging,
monitoring, analysis facility.

Naming its core object 'perf_counter' and naming the subsystem
'perfcounters' has become more and more of a misnomer. With pending
code like hw-breakpoints support the 'counter' name is less and
less appropriate.

All in one, we've decided to rename the subsystem to 'performance
events' and to propagate this rename through all fields, variables
and API names. (in an ABI compatible fashion)

The word 'event' is also a bit shorter than 'counter' - which makes
it slightly more convenient to write/handle as well.

Thanks goes to Stephane Eranian who first observed this misnomer and
suggested a rename.

User-space tooling and ABI compatibility is not affected - this patch
should be function-invariant. (Also, defconfigs were not touched to
keep the size down.)

This patch has been generated via the following script:

  FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

  sed -i \
    -e 's/PERF_EVENT_/PERF_RECORD_/g' \
    -e 's/PERF_COUNTER/PERF_EVENT/g' \
    -e 's/perf_counter/perf_event/g' \
    -e 's/nb_counters/nb_events/g' \
    -e 's/swcounter/swevent/g' \
    -e 's/tpcounter_event/tp_event/g' \
    $FILES

  for N in $(find . -name perf_counter.[ch]); do
    M=$(echo $N | sed 's/perf_counter/perf_event/g')
    mv $N $M
  done

  FILES=$(find . -name perf_event.*)

  sed -i \
    -e 's/COUNTER_MASK/REG_MASK/g' \
    -e 's/COUNTER/EVENT/g' \
    -e 's/\<event\>/event_id/g' \
    -e 's/counter/event/g' \
    -e 's/Counter/Event/g' \
    $FILES

... to keep it as correct as possible. This script can also be
used by anyone who has pending perfcounters patches - it converts
a Linux kernel tree over to the new naming. We tried to time this
change to the point in time where the amount of pending patches
is the smallest: the end of the merge window.

Namespace clashes were fixed up in a preparatory patch - and some
stylistic fallout will be fixed up in a subsequent patch.

( NOTE: 'counters' are still the proper terminology when we deal
  with hardware registers - and these sed scripts are a bit
  over-eager in renaming them. I've undone some of that, but
  in case there's something left where 'counter' would be
  better than 'event' we can undo that on an individual basis
  instead of touching an otherwise nicely automated patch. )

Suggested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-21 14:28:04 +02:00
Sam Ravnborg caa27b66bd kbuild: use INSTALLKERNEL to select customized installkernel script
Replace the use of CROSS_COMPILE to select a customized
installkernel script with the possibility to set INSTALLKERNEL
to select a custom installkernel script when running make:

    make INSTALLKERNEL=arm-installkernel install

With this patch we are now more consistent across
different architectures - they did not all support use
of CROSS_COMPILE.

The use of CROSS_COMPILE was a hack as this really belongs
to gcc/binutils and the installkernel script does not change
just because we change toolchain.

The use of CROSS_COMPILE caused troubles with an upcoming patch
that saves CROSS_COMPILE when a kernel is built - it would no
longer be installable.
[Thanks to Peter Z. for this hint]

This patch undos what Ian did in commit:

  0f8e2d62fa
  ("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh")

The patch has been lightly tested on x86 only - but all changes
looks obvious.

Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Russell King <linux@arm.linux.org.uk> [arm]
Acked-by: Paul Mundt <lethal@linux-sh.org> [sh]
Acked-by: "H. Peter Anvin" <hpa@zytor.com> [x86]
Cc: Ian Campbell <icampbell@arcom.com>
Cc: Tony Luck <tony.luck@intel.com> [ia64]
Cc: Fenghua Yu <fenghua.yu@intel.com> [ia64]
Cc: Hirokazu Takata <takata@linux-m32r.org> [m32r]
Cc: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Cc: Kyle McMartin <kyle@mcmartin.ca> [parisc]
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc]
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
Cc: Thomas Gleixner <tglx@linutronix.de> [x86]
Cc: Ingo Molnar <mingo@redhat.com> [x86]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20 12:18:14 +02:00
Yi Li 5bf9cbef99 Blackfin: update ftrace for latest toolchain
The mcount support that was finally added to the Blackfin gcc port isn't
exactly the same as what ftrace was developed against.  Now that the final
gcc version is in place, update the ftrace code to match.

While updating this, fix the swapped arguments to the tracer (signature is
(ip, parent_ip) while we were passing (parent_ip, ip)).

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:52 -04:00
Mike Frysinger 3b67d91b3e Blackfin: fix elf_fpregset_t definition
The elf_fpregset_t type relied on an empty struct in the asm/user.h, but
the transition to asm-generic/user.h dropped that empty struct.  Rather
than restore this useless struct, define the only user (elf_fpregset_t)
as an empty struct itself.  This fixes building when ELF dump support is
enabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:51 -04:00
Mike Frysinger ea426e6c62 Blackfin: unify cache init functions
The CPLB implementations (mpu/nompu) had exact copies of the cacheinit
code.  Even the i/d cache functions are largely the same.  So unify them
both in the common kernel cache code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:49 -04:00
Graf Yang e78feaaeeb Blackfin: swap clocksource ratings for gptimer/cycles
The cycles clocksource is a higher resolution than the gptimer one, so
make sure the ratings field reflects this.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:48 -04:00
Mike Frysinger 3289651a97 Blackfin: update ftrace_push_return_trace() breakage
Commit 71e308a239 updated ftrace_push_return_trace() prototype but didn't
update the Blackfin ftrace code, so things broke.  Since we don't support
the new stuff yet, call it with stub values.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:47 -04:00
Harald Krapfenbauer 9c21453e37 Blackfin: update cm board resources
Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:46 -04:00
Harald Krapfenbauer 6058434468 Blackfin: cm-bf537u: split board from cm-bf537e
The cm-bf537u module, while similar to the cm-bf537e, is different enough
to warrant its own resources.  It has a USB controller but no PHY.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:45 -04:00
Barry Song 769cfc0d08 Blackfin: bf538-ezkit: add SPI IRQ resources
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:43 -04:00
Sonic Zhang 88c28b2df9 Blackfin: increase default async timings for parallel flashes
The default async timings are a little too fast for the parallel flash
that is attached by default to the async banks.  So slow things down a bit
so accessing the hardware is stable.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:42 -04:00
Bernd Schmidt 4663f6ef25 Blackfin: add ICPLB coverage for async banks
When doing XIP, we need to execute out of the async banks, so we need
ICPLBs to allow this.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:42 -04:00
Mingquan Pan 4a3e53c1c4 Blackfin: use KERN_ALERT in all kgdb_test output
Most messages are already using KERN_ALERT, so be consistent to make
things easier to check with test scripts.

Signed-off-by: Mingquan Pan <grace.pan@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:40 -04:00
Yi Li 4e4d496ee3 Blackfin: fix BF54x SPI CS resources
The BF54x has three slave select signals for SPI0/SPI1, not eight.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:39 -04:00
Robin Getz 774b80229f Blackfin: fix typo in isram_write()
The DTEST write bit is 2, not 1.  Improve comments in the related macro
while we're here.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:38 -04:00
Michael Hennerich ba877d4491 Blackfin: bf537-stamp: add adp5588 gpio resources
For the adp5588 GPIO daughter card.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:37 -04:00
Mike Frysinger c40cdb2cbd Blackfin: add some isram-driver self tests
Make it easy to figure out if code changes here are correct.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:36 -04:00
Robin Getz dedfd5d7f2 Blackfin: workaround anomaly 05000283
Make sure our interrupt entry code with exact hardware errors handles
anomaly 05000283 (infinite stall in system MMR kill) so we don't stall
while under load.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:34 -04:00
Michael Hennerich 05d17dfaab Blackfin: fix spelling in a few comments
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:33 -04:00
Yi Li b6dbde27dd Blackfin: use raw_smp_processor_id() in exception code
When preempt debugging is enabled, smp_processor_id() may utilize the
"current" structure.  This may not be safe to access under all exceptions
due to it being in dynamically allocated memory.  So in exception code,
make sure we use raw_smp_processor_id() instead to get at the real value
directly.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:32 -04:00
Michael Hennerich 00dd66d012 Blackfin: remove useless duplicated assignment in gpio code
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:31 -04:00
Ingo Molnar 8d7ac69ffa Blackfin: Fix link errors with binutils 2.19 and GCC 4.3
Not sure whether this has been reported/fixed before.

Today I built a Blackfin tool-chain from scratch for -tip testing,
and it triggers:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.data_a_l1' referenced in expression

and:

 arch/blackfin/kernel/vmlinux.lds:1238: undefined section `.text_data_l1'
referenced in expression

Now i dont have any way to test this linker script, but it now at
least builds fine after fixing what appears to be typos in those
assert statements.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:30 -04:00
Graf Yang 1794131471 Blackfin: handle the core timer interrupt with handle_percpu_irq on SMP
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:29 -04:00
Mike Frysinger 926494943b Blackfin: optimize fixed code handling for the most common case
The majority of the time we are returning to user space, it is not in the
fixed atomic code region.  So rather than branch to a function where we
check the PC and return, do the check inline and branch only when needed.

Also, tweak some of the fixed code handling based on assumptions we are
aware of but cannot be expressed in C.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:28 -04:00
Barry Song dac981740f Blackfin: delete '-spi' suffix in ad1836/ad1938 driver name
The ASoC drivers have dropped the redundant "-spi" suffix in the driver
name, so update the board resources accordingly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:27 -04:00
Mike Frysinger 3aa670419a Blackfin: punt dead cache locking code
No one uses these functions, and some are duplicate of existing C code.  So
just punt the whole thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:25 -04:00
Mike Frysinger 0198b3bcae Blackfin: drop board resources for dead devices (pbx/ad9960)
These hardware devices are dead and the drivers never cleaned up/merged,
so punt the useless board resource info.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:24 -04:00
Yi Li c4baebf268 Blackfin: do not trace the exception handler
Since the exception handler cannot cause exceptions, we cannot trace it
without easily causing double faults and crashing the system.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:23 -04:00
Mike Frysinger 7b06263bd7 Blackfin: fix BF522/BF523 max VCO mixup
The BF522 and BF523 had their real max VCO values swapped.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:22 -04:00
Graf Yang ad46163ac2 Blackfin: SMP port does not yet support cpu frequency scaling
We have an item to get this fixed, but in the mean time, disable selection
via Kconfig dependencies.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:21 -04:00
Yi Li eb7bd9c461 Blackfin: cleanup sync handling when enabling/disabling cplbs
The handling of updating the [DI]MEM_CONTROL MMRs does not follow proper
sync procedures as laid out in the Blackfin programming manual.  So rather
than audit/fix every call location, create helper functions that do the
right things in order to safely update these MMRs.  Then convert all call
sites to use these new helper functions.

While we're fixing the code, drop the workaround for anomaly 05000125 as
that anomaly applies to old versions of silicon that we do not support.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:19 -04:00
Barry Song 8312440e05 Blackfin: bf537-stamp: update ad1836 resources
Update the ad1836 resources for the new ASoC driver.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:18 -04:00
Yi Li bd411b15cc Blackfin: update anomaly lists
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:16 -04:00
Barry Song f1cb64625c Blackfin: bf538-ezkit: add resources for parallel flash
The board has some parallel flash hooked up to the async banks, so add
appropriate physmap resources for it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:15 -04:00
Roel Kluin ac860751eb Blackfin: fix read buffer overflow
Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:13 -04:00
Stefan Pledl 0e101ec12e Blackfin: bf548-ezkit: fix incorrect LCD size parameters
I think we have to use the physical dimensions [mm] of the display for
.width and .heigth in struct bfin_bf54xfb_mach_info bf54x_lq043_data which
are copied to fbinfo->var.height/.width in bf54x-lq043fb.c.

linux/fb.h describes this values as 'height/weight of picture in mm'

Otherwise QT calcs the wrong dpi value and the displayed fonts are very
small.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:12 -04:00
Barry Song b3dec4a4ff Blackfin: cm-bf527/bf537-stamp: fix dm9000 resources
The dm9000 driver expects two IORESOURCE_MEM to get at the device, so make
sure we declare things properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:10:10 -04:00
Mike Frysinger 8d71e07596 Blackfin: drop unused MMR defines that only cause bad code to be written
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 22:09:55 -04:00
Michael Hennerich 61f09b5a09 Blackfin: convert boards to use platform data with smc91x
Latest smc91x driver allows you to specify settings in board resources
rather than needing CONFIG_BLACKFIN in the drivers/net/smc91x.h header.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:32:00 -04:00
Barry Song 2fff7f8800 Blackfin: bf537-stamp: drop ATA interrupt probe workaround
The interrupt probe workaround doesn't work without hacks to common code,
and the add-on card only needs a simple resistor to fix the problem, so
drop the board-specific hack.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:58 -04:00
Graf Yang 01b9f4b0ed Blackfin: improve double fault debug handling
Since the hardware only provides reporting for the last exception handled,
and the values are valid only when executing the exception handler, we
need to save the context for reporting at a later point.  While we do this
for one exception, it doesn't work properly when handling a second one as
the original exception is clobbered by the double fault.  So when double
fault debugging is enabled, create a dedicated shadow of these values and
save/restore out of there.  Now the crash report properly displays the
first exception as well as the second one.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:57 -04:00
Cliff Cai 858c5e9abc Blackfin: bf533-stamp: fix typo in SPI frequency for ad1836 codec
One too many zeros means we run way faster than the codec can handle.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:56 -04:00
Graf Yang 36b8412886 Blackfin: fix MPU handling of invalid memory accesses
The protect_page() function was incorrectly setting up the hardware tables
based on possible access capabilities rather than the actual requested
values.  This means we would grant more access to mmap-ed pages than we
should have.  Once we fix this, we need to tweak the signal generated by
such accesses to aline ourselves with other ports.  This allows the LTP
mmap0{5,6,7} cases to run properly.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:55 -04:00
Jean Delvare 8fc4dd9e87 Blackfin: clean up duplicate I2C device type definitions
I2C_BOARD_INFO() already sets .type, no need to set it again.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:53 -04:00
Barry Song 427f277e5f Blackfin: bf537-stamp: update AD714x resources
Push the device table to the board resources as data interpretation can be
changed on a per-board basis.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:51 -04:00
Sonic Zhang 407505dc01 Blackfin: do not try displaying the end of the stack
The end of the stack may not be valid (and that could be OK), so do not
attempt to parse it.  If we do, we might use a bad pointer in kernel space
which makes things panic().

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:50 -04:00
Yi Li 2120b68f31 Blackfin: bf533-stamp: add resources for mmc_spi card
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:49 -04:00
Barry Song f41e2fded0 Blackfin: bf538: add bfin_clear_PPI_STATUS() helper
Add the bf538 version of bfin_clear_PPI_STATUS() to match all other ports.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:47 -04:00
Stefan Pledl a2f78cfc65 Blackfin: fix BF548 UART0 DMA IRQ translation
The initial BF54x port included some defines to keep code simple across
different processors, but it just ended up causing the UART0 DMA IRQs to
be set to the UART1 channels.

Signed-off-by: Stefan Pledl <stefan.pledl@mesutronic.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:46 -04:00
Robin Getz 837ec2d56c Blackfin: catch hardware errors earlier during booting
Allow hardware errors to be caught during early portions of booting, and
leave something in the shadow console that people can use to debug their
system with (to be printed out by the bootloader on next reset).

This enables the hardare error interrupts in head.S, allowing us to find
hardware errors when they happen (well, as much as you can with a hardware
error) and prints out the trace if it is enabled.  This will catch errors
(like booting the wrong image on a 533) which previously resulted in a
infinite loop/hang, as well as random hardware errors before before
setup_arch().

To disable this debug only feature - turn off EARLY_PRINTK.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16 21:31:44 -04:00