Commit Graph

39 Commits

Author SHA1 Message Date
Uwe Kleine-König
9c6568501c [ARM] gpio_free might sleep, arm architecture
According to the documentation gpio_free should only be called from task
context only.  To make this more explicit add a might sleep to all
implementations.

This patch changes the gpio_free implementations for the arm architecture.
 DaVinci is skipped on purpose to simplify the merge process for patches
switching it over to use gpiolib as per request by David Brownell.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-30 14:41:50 +00:00
Russell King
3f30a09a61 Merge branch 'pxa-all' into devel
Conflicts:

	arch/arm/mach-pxa/Kconfig
	arch/arm/mach-pxa/corgi.c
	arch/arm/mach-pxa/include/mach/hardware.h
	arch/arm/mach-pxa/spitz.c
2008-10-09 21:33:02 +01:00
Dmitry Baryshkov
d8aa0251f1 [ARM] 5298/1: Drop desc_handle_irq()
desc_handle_irq() was declared as obsolete since long ago.
Replace it with generic_handle_irq()

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-10-09 15:00:36 +01:00
Russell King
fbd3bdb213 [ARM] Convert asm/bitops.h to linux/bitops.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:13:59 +01:00
Russell King
fced80c735 [ARM] Convert asm/io.h to linux/io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-09-06 12:10:45 +01:00
Russell King
a09e64fbc0 [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
This just leaves include/asm-arm/plat-* to deal with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:55:48 +01:00
Russell King
0f8469a54f [ARM] Eliminate useless includes of asm/mach-types.h
There are 43 includes of asm/mach-types.h by files that don't
reference anything from that file.  Remove these unnecessary
includes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-07 09:40:04 +01:00
Russell King
bccf650270 [ARM] Fix explicit asm(-arm)?/arch-foo references
No file should be explicitly referencing its own platform headers
by specifying an absolute include path.  Fix these paths to use
standard <asm/arch/...> includes.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-08-02 22:35:16 +01:00
Matthew Wilcox
6310e47271 Remove use of asm/semaphore.h
Change to use linux/semaphore.h

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-07-24 08:31:00 -04:00
Russell King
d9cadb0d2f Merge branch 'irq-fix' of git://www.modarm9.com/gitsrc/pub/people/ukleinek/linux-2.6.git 2008-05-07 21:55:01 +01:00
Uwe Kleine-König
21f20b69a5 ns9xxx: fix sparse warning
The actual warning is
	arch/arm/mach-ns9xxx/irq.c:65:6: warning: symbol 'handle_prio_irq' was not declared. Should it be static?

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-04-25 15:45:09 +02:00
Uwe Kleine-König
a57a0b1d0f ns9xxx: check for irq lockups
When I copy-adapted handle_level_irq I skipped note_interrupt because
I considered it unimportant.  If I had understand its importance I would
have saved myself some ours of debugging.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-04-25 15:45:08 +02:00
Uwe Kleine-König
a13c819524 ns9xxx: fix handle_prio_irq to unmask irqs with lower priority
When an irq is reported all lower prio irqs are masked until the current
irq is acked.  So never leave handle_prio_irq without acking.

desc->status & IRQ_INPROGRESS should never become true because the current
irq is masked until it is acked, too.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-04-25 15:45:08 +02:00
Uwe Kleine-König
04c366f063 ns9xxx: add clock api
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 10:33:25 +02:00
Uwe Kleine-König
ed6f598723 ns9xxx: add support for irq priorisation
prio2irq(0) is the highest prioritized interrupt.  For now there is no
binary change intended.

If you intend to change the priorisation, you have to assert:

	∀ x ∈ {0, 1, ⋯ 31}: (irq2prio ∘ prio2irq)(x) = x

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 10:33:11 +02:00
Uwe Kleine-König
5e69b945f2 ns9xxx: make use of the chip's irq priorisation
The irq controller automatically masks the current and all lower prioritised
tasks until the current irq is acked.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 08:17:01 +02:00
Uwe Kleine-König
724ce5ee15 ns9xxx: prepare for adding support for Digi ns921x processors
The hardware team changed some things that were taken as being common to
all ns9xxx processors up to now.

This patch addresses:

- irqs: s/IRQ_/IRQ_NS9360_/

- system module registers: some registers are still general, their
  definition lives now in include/asm-arm/arch-ns9xxx/regs-sys-common.h.
  The ns9360 specific ones are in .../regs-sys-ns9360.h
  As a result ns9360_systemclock cannot be static inline any more as its
  definition needs regs-sys-ns9360.h.  This becomes a real problem when
  adding support for ns9215 as this will need regs-sys-ns9215.h and
  including both files will not work.  For the same reason
  ns9360_reset() is now non-inline and gpio functions live in their own
  file.

- register mapping: s/ns9xxx_map_io/ns9360_map_io/

- timer registers:  move time.c to time-ns9360.c;
  s/ns9xxx_timer/ns9360_timer/

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 08:17:01 +02:00
Uwe Kleine-König
13f429bd1b ns9xxx: introduce a config variable for the cc9p9360 module
Moreover now it's the module that selects the processor, and not the machine
anymore.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 08:17:01 +02:00
Uwe Kleine-König
c1a9e91e42 ns9xxx: use default text offset
Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 08:17:00 +02:00
Uwe Kleine-König
210b94e864 ns9xxx: move registration of serial8250 to a dedicated file
Now the needed structs are allocated dynamically from __init code reducing
memory usage if the kernel runs on a board different from a9m9750dev.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
2008-03-31 08:17:00 +02:00
Uwe Kleine-König
ac5bbf21bf [ARM] 4851/1: ns9xxx: fix size of gpiores
GPIO_MAX is the number of the last gpio, not the number of gpios.  So
the bitmap must provide GPIO_MAX + 1 bits.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-03-08 15:53:45 +00:00
Uwe Kleine-König
361c7ad607 [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32
As a consequence registers are now accessed with __raw_{read,write}[bl].

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:41 +01:00
Uwe Kleine-König
c54ecb2481 [ARM] 4594/1: ns9xxx: use the new gpio functions
Up to now only board-a9m9750dev.c used GPIOs.  It just wrote directly into the
corresponding registers.  Now it properly reserves the gpio and uses the API
function to configure it.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:39 +01:00
Uwe Kleine-König
c0bb87f7b8 [ARM] 4593/1: ns9xxx: implement generic clockevents
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:37 +01:00
Uwe Kleine-König
cef5975d45 [ARM] 4592/1: ns9xxx: clocksource driver
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:37 +01:00
Uwe Kleine-König
689f2a01e6 [ARM] 4590/1: ns9xxx: add gpio handling functions
This implementation conforms to the general GPIO API
introduced in 2.6.21.

This patch was signed-of by David Brownell before I exported the functions
using EXPORT_SYMBOL.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:36 +01:00
Uwe Kleine-König
ba7d850a02 [ARM] 4589/1: ns9xxx: acknowledge IRQ_EXT2 in the demux routine for FPGA irqs
The FPGA on the a9m9750dev board interrupts the CPU via EXT2. So
to acknowledge any FPGA interrupt IRQ_EXT2 must be acknowledged.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:34 +01:00
Uwe Kleine-König
bf62e86269 [ARM] 4545/1: ns9xxx: simplify irq ack'ing
Now the drivers are responsible to clear the irq in the respective
device, which seems to be the normal thing to do.

So the ack'ing of the timer irq moved to time.c.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 23:43:11 +01:00
Uwe Kleine-König
26c671c6b7 [ARM] 4493/1: ns9xxx: disable a non-reloading timer before ack'ing its irq
The HRM states that is must be done this way ...

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:01:37 +01:00
Uwe Kleine-König
3945a567d0 [ARM] 4487/1: ns9xxx: complete definition of GPIO related registers
I changed the naming to be more obvious---unfortunately the HRM
doesn't specify these.

Moreover the numbering is changed to be zero indexed as this is more
natural.

Adjust all callers.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:00:42 +01:00
Uwe Kleine-König
f4ae6413f4 [ARM] 4486/1: ns9xxx: fix a typo in the register definitions.
Fixed all users.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:00:41 +01:00
Uwe Kleine-König
cebfaf5f1c [ARM] 4485/1: ns9xxx: pass the correct irq number to the interrupt handlers
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:00:41 +01:00
Uwe Kleine-König
aa4db079f7 [ARM] 4483/1: ns9xxx: fix three sparse warnings: symbol 'xyz' was not declared.
make ns9xxx_ack_irq_functions static and add one include to get declarations
for ns9xxx_map_io and ns9xxx_init_machine.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:00:41 +01:00
Uwe Kleine-König
3f20246bb6 [ARM] 4482/1: ns9xxx: fix compilation for mach-type CC9P9360JS
I must have written the patch introducing support for this machine
deep in the night...

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 10:00:41 +01:00
Simon Arlott
6cbdc8c535 [ARM] spelling fixes
Spelling fixes in arch/arm/.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-05-20 20:10:32 +01:00
Bernhard Walle
b30fabadae Add IRQF_IRQPOLL flag on arm
Add IRQF_IRQPOLL for each timer interrupt.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:22 -07:00
Uwe Kleine-König
13ea55b04e [ARM] 4301/1: add mach type cc9p9360js
The support for that machine is not yet complete, but it's enough to
be useful as a test platform for the serial and ethernet driver.

Moreover a typo in the product name is fixed that I missed in the
last patch.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-04-21 20:52:30 +01:00
Uwe Kleine-König
ce2b5ec353 [ARM] 4247/1: Fix long name for cc9p9360dev
The Product Manager of the cc9p insist on using the correct product names.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-03-08 13:33:56 +00:00
Uwe Kleine-König
9918cda523 [ARM] 4210/1: base for new machine type "NetSilicon NS9360"
Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-17 20:05:45 +00:00