Commit Graph

411 Commits

Author SHA1 Message Date
Bernd Schmidt 2a0c4fdb66 [Blackfin] arch: fix bug - when using trace buffer with CONFIG_MPU enabled.
There were a couple of problems with the way the trace buffer state
is saved/restored in assembly.  The DEBUG_HWTRACE_SAVE/RESTORE macros
save a value to the stack, which is not immediately obvious; the CPLB
exception code needed changes to load the correct value of the stack
pointer.  The other problem is that the SAVE/RESTORE macros weren't
pushing and popping the value downwards on the stack, but rather moving
it _upwards_, which is of course completely broken.

We also need to make sure there's a matching DEBUG_HWTRACE_RESTORE in
the error case of the CPLB handler.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-23 07:17:34 +08:00
Bernd Schmidt dbfe44f02b [Blackfin] arch: fix up - CONFIG_BLKFIN_WT was renamed CONFIG_BFIN_WT while the MPU code was out-of-tree.
Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-04-23 07:11:55 +08:00
Robin Getz 904656cda1 [Blackfin] arch: fix bug - grab locks when not atomic
grab locks when not atomic - this fixes the issues
sometimes seen when using magic sysrq.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 09:17:43 +08:00
Robin Getz 9a62ca40fd [Blackfin] arch: fix bug - when we crash, current is not valid
Sometimes when we crash, current is not valid, (has been written
over), so the existing code causes a invalid read during exception
context - which is a unrecoverable double fault. This fixes this.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 09:15:58 +08:00
Bryan Wu 81d9c7f27d [Blackfin] arch: add i2c board info struct and move to new-style i2c interface
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 10:02:13 +08:00
Mike Frysinger d171c23327 [Blackfin] arch: fix up gpio code style -- no functional changes
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 08:35:46 +08:00
Mike Frysinger f85c4abdbc [Blackfin] arch: dump the stack before printing out an error otherwise the stack dump is useless as it shows us tracing through printk
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 08:34:23 +08:00
Mike Frysinger 793dc27b51 [Blackfin] arch: conditionally enable flash resources since it requests the async memory bank
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 08:09:12 +08:00
Yi Li 2e8d7965e6 [Blackfin] arch: add code to initialize globals declared in linux/bootmem.h: max_pfn, max_low_pfn, min_low_pfn.
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 07:08:12 +08:00
Bernd Schmidt 9df7a8f622 [Blackfin] arch: remove NOTES from linker script
Since
  r3658 | vapier | 2007-09-12 16:26:11 +0200 (Wed, 12 Sep 2007) | 1 line

  add more common defines for output sections

we've had a new line, NOTES, in our linker script, which causes upstream
binutils to complain about "missing phdr".  Currently the only other arch
that uses NOTES is i386, and the patch which added it also added
PHDRS {
	text PT_LOAD FLAGS(5);	/* R_E */
	data PT_LOAD FLAGS(7);	/* RWE */
	note PT_NOTE FLAGS(0);	/* ___ */
}
and a few other modifications to use ":text" and ":data" to the linker
script.

It seems that we don't need NOTES at all, so just remove it.

Signed-off-by: Bernd Schmidt <bernds_cb1@t-online.de>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 06:39:15 +08:00
Mike Frysinger 56ce835b60 [Blackfin] arch: add twi resources to CM_BF537 board as reported by Servaes Joordens
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-26 06:00:18 +08:00
Mike Frysinger f692940101 [Blackfin] arch: declare CHECKFLAGS to make sparse output more readable
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-07 02:43:48 +08:00
Mike Frysinger 0ddeeca25c [Blackfin] arch: add missing __user marking to ss_sp member of signalstack and a few userspace system functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-07 02:37:41 +08:00
Mike Frysinger 1307a65130 [Blackfin] arch: turn generic time on by default
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 12:26:41 +08:00
Mike Frysinger b4e2d18f73 [Blackfin] arch: add board bluetechnix kernel defconfigs to kernel
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 12:14:25 +08:00
Vitja Makarov 8b5f79f9d7 [Blackfin] arch: initial generic time and clock sources
This patch enables Hight-Res Timers and tickless kernel

Signed-off-by: Vitja Makarov <vitja.makarov@gmail.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 12:24:23 +08:00
Jeff Garzik 349a2444cf [BLACKFIN] minor irq handler cleanups
- use standard irq_handler_t to define irq handler function arguments

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-20 18:45:27 -04:00
Matthew Wilcox 64ac24e738 Generic semaphore implementation
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility.  Thanks to Peter Zijlstra for fixing the lockdep
warning.  Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 10:42:34 -04:00
Mike Frysinger 11b0be7c2c [Blackfin] arch: fix atomic and32/xor32 comments and ENDPROC markings
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-03 17:44:14 -07:00
Michael Hennerich 3d7e6cf8f5 [Blackfin] arch: fix bug - allow SDH driver to be used as module
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-03 17:40:28 -07:00
Bryan Wu 2f775dbaa5 [Blackfin] arch: to kill syscalls missing warning by adding new timerfd syscalls
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-03-06 16:04:58 -07:00
Bryan Wu c051489df8 [Blackfin] arch: kill section mismatch warnings
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 12:02:10 +08:00
Mike Frysinger 8b07a2a1e5 [Blackfin] arch: handle the most common L1 shrinkage case (L1 does not exist for a part) so that any parts labeled for L1 instead get placed into external memory sections
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-29 11:57:35 +08:00
Mike Frysinger fee40119a2 [Blackfin] arch: make sure we have proper description/copyright/license lines
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 15:06:07 +08:00
Michael Hennerich 3927819d51 [Blackfin] arch: Fix CONFIG_PM support for BF561
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 14:39:50 +08:00
Michael Hennerich 9253d02041 [Blackfin] arch: Remove DPMC char driver option
Remove redundant/obsolete/dead code from DPMC driver

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 14:27:28 +08:00
Michael Hennerich 464abc5de6 [Blackfin] arch: Cleanup abd Simplify:
- Simplify init_arch_irq
 - Make code more readable
 - Remove useless SSYNCs
 - Fix comments

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 13:50:20 +08:00
Michael Hennerich ce3b7bb61c [Blackfin] arch: fix bug - linux-2.6.24 (delayed) disable IRQ feature not functional for handle_simple_irq
Bypass delayed disable feature by implementing chip->disable and
chip->enable.

http://lkml.org/lkml/2008/2/19/115

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 13:48:47 +08:00
Mike Frysinger d45118b14b [Blackfin] arch: make sure we export the _bfin_swrst symbol as modules (like the watchdog) need it
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 12:24:44 +08:00
Mike Frysinger 0db5d105cd [Blackfin] arch: punt the simple ad5304 spi driver now that the generic spidev driver lets you do it from userspace
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 12:19:57 +08:00
Michael Hennerich fe9ec9b969 [Blackfin] arch: fix bug - Move IWR Enable All to the end of init_arch_irq otherwise it fails
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 12:04:57 +08:00
Mike Frysinger 181afa9498 [Blackfin] arch: grab mac address from OTP on BF527-EZKIT
The bf527-ezkit stores the mac address in OTP,
so grab it from there rather than flash

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 11:42:17 +08:00
Sonic Zhang 549aaa8425 [Blackfin] arch: Fix bug - Setting peripheral_map only when dma channel is UART2/3.
Singed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 11:13:07 +08:00
Mike Frysinger cad2ab65dd [Blackfin] arch: add board resources for new simple-gpio char driver
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 17:01:31 +08:00
Mike Frysinger edf056417d [Blackfin] arch: fix bug - set right partition size in the board files
- set default u-boot partition size to 256k
 - modify the offset with the size change
 - use mtd defines (append for offset and full for size)
   where applicable rather than churning constants when we dont have to

Signed-off-by: Grace Pan <grace.pan@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-25 11:38:11 +08:00
Sonic Zhang 32320ea0a6 [Blackfin] arch: Update default config
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 16:43:45 +08:00
Mike Frysinger 8929ecf84d [Blackfin] arch: add fixed code to the memory map output
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 16:35:20 +08:00
Mike Frysinger c63d4e6408 [Blackfin] arch: add handling for the mach symlink in the `make V=1` case
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 16:12:01 +08:00
Mike Frysinger 4d94bf6746 [Blackfin] arch: respect `make -s` when creating the asm/mach symlink
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 16:03:54 +08:00
Mike Frysinger 7aa475cfb7 [Blackfin] arch: fix bug add missing header file
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-02-22 16:01:50 +08:00
Jan Blunck cf28b4863f d_path: Make d_path() use a struct path
d_path() is used on a <dentry,vfsmount> pair.  Lets use a struct path to
reflect this.

[akpm@linux-foundation.org: fix build in mm/memory.c]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 21:17:09 -08:00
Peter Zijlstra aa02cd2d9b xtime_lock vs update_process_times
Commit d3d74453c3 ("hrtimer: fixup the
HRTIMER_CB_IRQSAFE_NO_SOFTIRQ fallback") broke several archs, and since
only Russell bothered to merge the fix, and Greg to ACK his arch, I'm
sending this for merger.

I have confirmation that the Alpha bit results in a booting kernel.
That leaves: blackfin, frv, sh and sparc untested.

The deadlock in question was found by Russell:

  IRQ handle
    -> timer_tick() - xtime seqlock held for write
      -> update_process_times()
        -> run_local_timers()
          -> hrtimer_run_queues()
            -> hrtimer_get_softirq_time() - tries to get a read lock

Now, Thomas assures me the fix is trivial, only do_timer() needs to be
done under the xtime_lock, and update_process_times() can savely be
removed from under it.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Greg Ungerer <gerg@uclinux.org>
CC: Richard Henderson <rth@twiddle.net>
CC: Bryan Wu <bryan.wu@analog.com>
CC: David Howells <dhowells@redhat.com>
CC: Paul Mundt <lethal@linux-sh.org>
CC: William Irwin <wli@holomorphy.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-13 13:29:25 -08:00
Sam Ravnborg ec7748b59e ide: introduce HAVE_IDE
To allow flexible configuration of IDE introduce HAVE_IDE.
All archs except arm, um and s390 unconditionally select it.
For arm the actual configuration determine if IDE is supported.

This is a step towards introducing drivers/Kconfig for arm.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-09 10:46:40 +01:00
Mike Frysinger 67f2d33ec0 [Blackfin] arch: fix build fails only include header files when enabled
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 01:49:23 +08:00
Mike Frysinger 16e6da4fc3 [Blackfin] arch: declare default INSTALL_PATH for Blackfin ports
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-07 14:15:37 +08:00
Michael Hennerich 6e668936db [Blackfin] arch: Encourage users to use the spidev character driver: Provide platform support
- Enable kernel generic spidev driver for blackfin SPI ADC
 - spi_adc driver, document and test sample not synced

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 01:54:09 +08:00
Sonic Zhang 8b01eaff4f [Blackfin] arch: Enable UART2 and UART3 for bf548
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 16:31:00 +08:00
Michael Hennerich 83d9cde08b [Blackfin] arch: Enable NET2272 on BF561-EZkit - remove request_mem_region
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 16:25:17 +08:00
Michael Hennerich f1bceb47b3 [Blackfin] arch:Fix BUG [#3876] pfbutton test for BTN3 on bf533 don't show complete info
- Buttons on the BF533-STAMP board are not inverted
 - Fix spurious GPIO Interrupt caused during set irq_type for edge triggered interrupts

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 16:17:52 +08:00
Mike Frysinger c0eab3b784 [Blackfin] arch: fix building with mtd uclinux by putting the mtd_phys option into the function it actually gets used in
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:36:11 +08:00
Mike Frysinger 550d553838 [Blackfin] arch: simpler header and update dates
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:55:37 +08:00
Mike Frysinger b7627acc43 [Blackfin] arch: move the init sections to the end of memory
Move the init sections to the end of memory so that after they
are free, run time memory is all continugous - this should help decrease
memory fragementation.

When doing this, we also pack some of the other sections a little closer
together, to make sure we don't waste memory. To make this happen,
we need to rename the .data.init_task section to .init_task.data, so
it doesn't get picked up by the linker script glob.

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:53:17 +08:00
Mike Frysinger 80f31c8a03 [Blackfin] arch: change the trace buffer control start/stop logic in the exception handlers
To save/restore the trace buffer control so that if we take an exception
after turning off the trace buffer at a higher level we dont inadvertently
turn the trace buffer back on

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:47:24 +08:00
Mike Frysinger a3acf52885 [Blackfin] arch: fix typo in printk message
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:45:27 +08:00
Mike Frysinger a01d7a76d8 [Blackfin] arch: this is an ezkit, not a stamp, so fixup the init function name
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:34:56 +08:00
Mike Frysinger cf93425d40 [Blackfin] arch: add slightly better help text for CPLB_INFO
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:32:40 +08:00
Michael Hennerich 6cda2e9058 [Blackfin] arch: Fix BUG - Enable ISP1362 driver to work ok with BF561
This fixes a bug (zero pointer access) only seen on BF561, during USB
Mass Storage/SCSI Host initialization.

It appears to be related to registering a none existing CPU

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:10:51 +08:00
Michael Hennerich a680ae9bdd [Blackfin] arch: Fix header file information
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 15:04:38 +08:00
Michael Hennerich e9d76c2d08 [Blackfin] arch: Add Support for ISP1362
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 14:55:28 +08:00
Mike Frysinger c827902311 [Blackfin] arch: add support for cmdline partitioning to the BF533-STAMP flash map driver and enable it as a module by default
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 04:13:15 +08:00
Michael Hennerich cfefe3c683 [Blackfin] arch: hook up set_irq_wake in Blackfin's irq code
- Add support for irq_wake on system and gpio interrupts
 - Remove outdated kernel options
 - Add option to select default PM mode
 - Fix various places where SIC_IWRx was only handled partially

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 04:12:37 +08:00
Michael Hennerich 2c4f829b0c [Blackfin] arch: Merge BF561 support into ints-priority
Merge single core ints-priority-sc.c and dual core ints-priority-dc.c
into one common code ints-priority.c

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 04:11:14 +08:00
Yi Li 856783b37a [Blackfin] arch: add "memmap=nn[KMG]@ss[KMG]" and "memmap=nn[KMG]$ss[KMG]" options to blackfin, based on arch/i386/kernel/e820.c
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-09 02:26:01 +08:00
Mike Frysinger c605999bd9 [Blackfin] arch: error out if ANOMALY_05000263 applies while enabling the MPU
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-02-02 12:28:23 +08:00
Jan Engelhardt 03a44825be procfs: constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-By: David Howells <dhowells@redhat.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.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>
2008-02-08 09:22:38 -08:00
David Howells 1eb1141123 aout: remove unnecessary inclusions of {asm, linux}/a.out.h
Remove now unnecessary inclusions of {asm,linux}/a.out.h.

[akpm@linux-foundation.org: fix alpha build]
Signed-off-by: David Howells <dhowells@redhat.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>
2008-02-08 09:22:30 -08:00
Bernhard Walle 72a7fe3967 Introduce flags for reserve_bootmem()
This patchset adds a flags variable to reserve_bootmem() and uses the
BOOTMEM_EXCLUSIVE flag in crashkernel reservation code to detect collisions
between crashkernel area and already used memory.

This patch:

Change the reserve_bootmem() function to accept a new flag BOOTMEM_EXCLUSIVE.
If that flag is set, the function returns with -EBUSY if the memory already
has been reserved in the past.  This is to avoid conflicts.

Because that code runs before SMP initialisation, there's no race condition
inside reserve_bootmem_core().

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: <linux-arch@vger.kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07 08:42:25 -08:00
Jeff Garzik 0a87e3e92b Rename: linux/pata_platform.h to linux/ata_platform.h
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-02-06 06:54:17 -05:00
Davide Libenzi 4d672e7ac7 timerfd: new timerfd API
This is the new timerfd API as it is implemented by the following patch:

int timerfd_create(int clockid, int flags);
int timerfd_settime(int ufd, int flags,
		    const struct itimerspec *utmr,
		    struct itimerspec *otmr);
int timerfd_gettime(int ufd, struct itimerspec *otmr);

The timerfd_create() API creates an un-programmed timerfd fd.  The "clockid"
parameter can be either CLOCK_MONOTONIC or CLOCK_REALTIME.

The timerfd_settime() API give new settings by the timerfd fd, by optionally
retrieving the previous expiration time (in case the "otmr" parameter is not
NULL).

The time value specified in "utmr" is absolute, if the TFD_TIMER_ABSTIME bit
is set in the "flags" parameter.  Otherwise it's a relative time.

The timerfd_gettime() API returns the next expiration time of the timer, or
{0, 0} if the timerfd has not been set yet.

Like the previous timerfd API implementation, read(2) and poll(2) are
supported (with the same interface).  Here's a simple test program I used to
exercise the new timerfd APIs:

http://www.xmailserver.org/timerfd-test2.c

[akpm@linux-foundation.org: coding-style cleanups]
[akpm@linux-foundation.org: fix ia64 build]
[akpm@linux-foundation.org: fix m68k build]
[akpm@linux-foundation.org: fix mips build]
[akpm@linux-foundation.org: fix alpha, arm, blackfin, cris, m68k, s390, sparc and sparc64 builds]
[heiko.carstens@de.ibm.com: fix s390]
[akpm@linux-foundation.org: fix powerpc build]
[akpm@linux-foundation.org: fix sparc64 more]
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:07 -08:00
Mathieu Desnoyers 125e564582 Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig
Move the instrumentation Kconfig to

arch/Kconfig for architecture dependent options
  - oprofile
  - kprobes

and

init/Kconfig for architecture independent options
  - profiling
  - markers

Remove the "Instrumentation Support" menu. Everything moves to "General setup".
Delete the kernel/Kconfig.instrumentation file.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:08 +01:00
Mathieu Desnoyers 42d4b839c8 Add HAVE_OPROFILE
Linus:
On the per-architecture side, I do think it would be better to *not* have
internal architecture knowledge in a generic file, and as such a line like

        depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32

really shouldn't exist in a file like kernel/Kconfig.instrumentation.

It would be much better to do

        depends on ARCH_SUPPORTS_KPROBES

in that generic file, and then architectures that do support it would just
have a

        bool ARCH_SUPPORTS_KPROBES
                default y

in *their* architecture files. That would seem to be much more logical,
and is readable both for arch maintainers *and* for people who have no
clue - and don't care - about which architecture is supposed to support
which interface...

Changelog:

Actually, I know I gave this as the magic incantation, but now that I see
it, I realize that I should have told you to just use

        config ARCH_SUPPORTS_KPROBES
                def_bool y

instead, which is a bit denser.

We seem to use both kinds of syntax for these things, but this is really
what "def_bool" is there for...

Changelog :

- Moving to HAVE_*.
- Add AVR32 oprofile.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-02-03 08:58:07 +01:00
Johannes Berg f4cb570076 Suspend: Clean up Kconfig (V2)
This cleans up the suspend Kconfig and removes the need to
declare centrally which architectures support suspend. All
architectures that currently support suspend are modified
accordingly.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:55 -05:00
Sam Ravnborg 01ba2bdc6b all archs: consolidate init and exit sections in vmlinux.lds.h
This patch consolidate all definitions of .init.text, .init.data
and .exit.text, .exit.data section definitions in
the generic vmlinux.lds.h.

This is a preparational patch - alone it does not buy
us much good.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28 23:21:17 +01:00
Bernd Schmidt fc97551db9 [Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it.
Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 19:56:43 +08:00
Yi Li ee7883b746 [Blackfin] arch: fix bug kernel boot message: memory information is not reasonable
Some of the information in kernel boot message is not reasonable.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3846

 - use _rambase as the start of kernel image.
   kernel is in the region [_rambase, _ramstart]
 - count in pages in per-cpu-page list as available memory
 - reserved memory now include: [0 - 4K] for bad pointer catching,
   memory reserved for abnormaly 05000263, memory reserved by kernel itself.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 19:56:17 +08:00
Mike Frysinger de8c43f2fc [Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-24 17:14:04 +08:00
Michael Hennerich 96a5c6f9be [Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up
writes to I/DMEM_CONTROL must be followed by SSYNC

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 19:23:50 +08:00
Sonic Zhang 03c5732855 [Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 18:45:10 +08:00
Michael Hennerich 444ad82bc3 [Blackfin] arch: Add proper SW System Reset delay sequence
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 18:38:02 +08:00
Michael Hennerich a628a8bcd8 [Blackfin] arch: Update copyright date
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 17:29:16 +08:00
Michael Hennerich a2c8cfef6a [Blackfin] arch: GPIO API cleanup and anomaly update
- Add anomaly workaround for bfin_gpio_reset_spi0_ssel1
 - Fix style
 - Update copyright
 - Remove BUG_ON checks for functions intended to be used only by arch
   support. GPIO users should only access using the generic GPIO API
 - Make all GPIO identifier unsigned int

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 17:20:10 +08:00
Michael Hennerich acbcd26319 [Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface
signef-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 18:36:20 +08:00
Bernd Schmidt b97b8a9983 [Blackfin] arch: Initial checkin of the memory protection support.
Enable it with CONFIG_MPU.

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 18:39:16 +08:00
Michael Hennerich 2047e40d72 [Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-22 15:29:18 +08:00
Michael Hennerich 4521ef42de [Blackfin] arch: Add some comments - fix semicolons
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-11 17:21:41 +08:00
Bernd Schmidt 7a1a6d0061 [Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/
Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-11 16:58:44 +08:00
Robin Getz aee3a29240 [Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-11 16:53:00 +08:00
Bryan Wu e31639540d [Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-24 16:19:15 +08:00
Robin Getz 6b5eace2f1 [Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
Don't oops_in_progress if single step is comming from the
kernel, which happens if a single step occurs after a exception cause.
This fixes up the remaining issues in the toolchain bug.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-10 17:57:56 +08:00
Michael Hennerich a546b0ac59 [Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on
Make sure the SYSTEM reset completes before we issue the CORE reset

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 20:19:51 +08:00
Joe Perches 79f1ec862a [Blackfin] arch: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 20:03:51 +08:00
Enrik Berkhan 76a7f40492 [Blackfin] arch: fix bug when DMA operation related core B of BF561
- Before DMA'ing data to core B L1 memory, caches have to be flushed.
- Before DMA'ing data from core B L1 memory, caches have to be invalidated.
- Fix lock/unlock.

Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:51:31 +08:00
Sonic Zhang 37931db5bd [Blackfin] arch: Restore default DMA priority over core on bf54x.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:43:39 +08:00
Mike Frysinger 43f73fef07 [Blackfin] arch: pull in linux/etherdevice.h for random_ether_addr() used in bfin_get_ether_addr()
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:35:35 +08:00
Martin Strubel 7285846ff8 [Blackfin] arch: disable bfin_get_ether_addr fucntion for boards when do not use MAC driver
Signed-off-by: Martin Strubel <hackfin@section5.ch>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 19:12:32 +08:00
Michael Hennerich 8baf560b4c [Blackfin] arch: Enable both edge triggered GPIO IRQs on BF54x and use irq_to_gpio()
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 18:51:34 +08:00
Martin Strubel 471b9a6c73 [Blackfin] arch: added Minotaur BSP
Signed-off-by: Martin Strubel <hackfin@section5.ch>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 19:54:20 +08:00
Michael Hennerich 2463ef22bf [Blackfin] arch: replace current blackfin specific pfbutton driver with kernel generic gpio key driver
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2008-01-27 16:49:48 +08:00
Michael Hennerich 6fce6a8d69 [Blackfin] arch: append IRQ Number to label string
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 16:56:12 +08:00
Michael Hennerich fac3cf432e [Blackfin] arch: Fix gpio label handling
early serial init also utilizes the peripheral request api - however
at this point bfin_gpio_init didn't allocate memory for the labels.
So we always have two zombies (allocated pin functions without labels)

This happens before the initcalls - We now allocate memory statically.
Define MAX_RESOURCES individually for each cpu.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-12-24 20:07:03 +08:00