Commit Graph

50 Commits

Author SHA1 Message Date
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
Magnus Damm 8e19608e8b clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources.  This
allows us to share the callback between multiple instances.

[hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-21 13:41:47 -07:00
Russell King ed40d0c472 Merge branch 'origin' into devel
Conflicts:
	sound/soc/pxa/pxa2xx-i2s.c
2009-03-28 20:29:51 +00:00
Russell King be093beb60 [ARM] pass reboot command line to arch_reset()
OMAP wishes to pass state to the boot loader upon reboot in order to
instruct it whether to wait for USB-based reflashing or not.  There is
already a facility to do this via the reboot() syscall, except we ignore
the string passed to machine_restart().

This patch fixes things to pass this string to arch_reset().  This means
that we keep the reboot mode limited to telling the kernel _how_ to
perform the reboot which should be independent of what we request the
boot loader to do.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-03-19 16:20:24 +00:00
Yinghai Lu 0b0f0b1c2c sparseirq: use kstat_irqs_cpu on non-x86 architectures too
so we could move kstat_irqs array to irq_desc struct.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-12 20:01:12 +01:00
Linus Torvalds b840d79631 Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
  x86: export vector_used_by_percpu_irq
  x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  sched: nominate preferred wakeup cpu, fix
  x86: fix lguest used_vectors breakage, -v2
  x86: fix warning in arch/x86/kernel/io_apic.c
  sched: fix warning in kernel/sched.c
  sched: move test_sd_parent() to an SMP section of sched.h
  sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
  sched: activate active load balancing in new idle cpus
  sched: bias task wakeups to preferred semi-idle packages
  sched: nominate preferred wakeup cpu
  sched: favour lower logical cpu number for sched_mc balance
  sched: framework for sched_mc/smt_power_savings=N
  sched: convert BALANCE_FOR_xx_POWER to inline functions
  x86: use possible_cpus=NUM to extend the possible cpus allowed
  x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
  x86: update io_apic.c to the new cpumask code
  x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
  x86: xen: use smp_call_function_many()
  x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
  ...

Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02 11:44:09 -08:00
Rusty Russell 320ab2b0b1 cpumask: convert struct clock_event_device to cpumask pointers.
Impact: change calling convention of existing clock_event APIs

struct clock_event_timer's cpumask field gets changed to take pointer,
as does the ->broadcast function.

Another single-patch change.  For safety, we BUG_ON() in
clockevents_register_device() if it's not set.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
2008-12-13 21:20:26 +10:30
Russell King 0560cf5aa5 [ARM] Add a common typesafe __io implementation
As Al did for Versatile in 2ad4f86b60,
add a typesafe __io implementation for platforms to use.  Convert
platforms to use this new simple typesafe implementation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-30 11:45:54 +00:00
Russell King dcea83adc6 [ARM] Hide ISA DMA API when ISA_DMA_API is unset
When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
so there's no point in publishing the prototypes via asm/dma.h, nor
including the machine dependent parts of that API.

This allows us to remove a lot of mach/dma.h files which don't contain
any useful code.  Unfortunately though, some platforms put their own
private non-ISA definitions into mach/dma.h, so we leave these behind
and fix the appropriate #include statments.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-29 18:42:40 +00:00
Russell King 92f3753f45 [ARM] ns9xxx: mach/hardware.h doesn't need asm/memory.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-28 23:20:37 +00:00
Nicolas Pitre b5ee900258 [ARM] remove a common set of __virt_to_bus definitions
Let's provide an overridable default instead of having every machine
class define __virt_to_bus and __bus_to_virt to the same thing.  What
most platforms are using is bus_addr == phys_addr so such is the default.

One exception is ebsa110 which has no DMA what so ever, so the actual
definition is not important except only for proper compilation.  Also
added a comment about the special footbridge bus translation.

Let's also remove comments alluding to set_dma_addr which is not
(and should not) be commonly used.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-11-28 15:36:49 +00:00
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