Commit Graph

349 Commits (a80da7389891d0eeacbd568a9b54f665fd424d14)

Author SHA1 Message Date
Deepak Saxena a0d95af5c2 [ARM] 3191/1: Mark I/O pointer as const in __raw_reads[bwl]
Patch from Deepak Saxena

Mark the ioremap'd cookie/pointer in said functions as const since
we should not be actualy touching the data. This fixes a slew of
compile warnings on IXP4xx as our reads[bwl] already mark this
parameter as const.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-05 10:54:59 +00:00
Arthur Othieno 11849fe674 [ARM] sema_count() removal
sema_count() defined only for ARM but not used anywhere.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-01 20:58:01 +00:00
Russell King 00b4c90787 [ARM SMP] Use event instructions for spinlocks
ARMv6K CPUs have SEV (send event) and WFE (wait for event) instructions
which allow the CPU clock to be suspended until another CPU issues a
SEV, rather than spinning on the lock wasting power.  Make use of these
instructions.

Note that WFE does not wait if an event has been sent since the last WFE
cleared the event status, so although it may look racy, the instruction
implementation ensures that these are dealt with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-01 15:47:24 +00:00
Lucas Correia Villa Real 192cdc5809 [ARM] 3178/1: S3C2400 - adds GPIO registers definitions to regs-gpio.h
Patch from Lucas Correia Villa Real

This patch adds definitions to GPIO registers for the S3C2400 into
include/asm-arm/arch-s3c2410/regs-gpio.h.

Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 18:08:43 +00:00
Russell King 225937bd5d [ARM] Remove asm/hardware.h include from SA1100 io.h
Unfortunately, we have a symbol clash between the SA-1100 header and
some drivers.  Since everywhere which needs SA1100 specifics includes
asm/hardware.h, we don't need to include it in the SA1100 io.h header.

In file included from drivers/net/wireless/wavelan_cs.p.h:459,
                 from drivers/net/wireless/wavelan_cs.c:60:
drivers/net/wireless/wavelan_cs.h:97:1: warning: "LCSR" redefined
In file included from include/asm/arch/hardware.h:56,
                 from include/asm/hardware.h:16,
                 from include/asm/arch/io.h:13,
                 from include/asm/io.h:71,
                 from drivers/net/wireless/wavelan_cs.p.h:433,
                 from drivers/net/wireless/wavelan_cs.c:60:
include/asm/arch/SA-1100.h:1907:1: warning: this is the location of the previous definition

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:33:12 +00:00
Adam Brooks 3238c448c6 [ARM] 3173/1: Fix to allow 2.6.15-rc2 to compile for IOP3xx boards
Patch from Adam Brooks

Fixes an issue in 2.6.15-rc2 that prevented compilation of kernels for IOP3xx boards.

Signed-off-by: Adam Brooks <adam.j.brooks@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-23 22:45:27 +00:00
Russell King 30a09616df [ARM] ebsa110: __arch_ioremap should be 3 args
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:26:52 +00:00
Russell King 5aaf291056 [ARM] Add asm/memory.h to asm/numnodes.h
Since the defintion of NODES_SHIFT may be overridden in asm/arch/memory.h
it's important to include asm/memory.h into asm/numnodes.h to ensure
that the correct value is always defined.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:26:18 +00:00
Kenneth Tan 19f07be3b8 [ARM] 3171/1: To add missing QMGR region size for IXP4XX
Patch from Kenneth Tan

To add queue manager region size which is missing from ixp4xx-regs.h

Signed-off-by: Kenneth Tan <chong.yin.tan@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:17:07 +00:00
Linus Torvalds 8ee3f40267 Merge master.kernel.org:/home/rmk/linux-2.6-serial 2005-11-19 15:25:23 -08:00
Russell King b63d4f0fb8 [SERIAL] Fix status reporting with PL011 serial driver
The receiver status register reports latched error conditions, which
must be cleared by writing to it.  However, the data register reports
unlatched conditions which are associated with the current character.
Use the data register to interpret error status rather than the RSR.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 11:10:35 +00:00
Russell King d2c5b69099 [ARM] Fix get_user when passed a const pointer
Unfortunately, later gcc versions error out when our get_user is passed
a const pointer, since we write to a temporary variable declared as
typeof(*(p)) which propagates the const-ness.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-18 14:22:03 +00:00
Russell King 67a1901ff4 [ARM] __ioremap doesn't use 4th argument
The "align" argument in ARMs __ioremap is unused and provides a
misleading expectation that it might do something.  It doesn't.
Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 16:48:00 +00:00
Russell King 5470dc6568 [ARM] No need to include asm/proc-fns.h into asm/system.h
In the old days when arm26/arm32 was combined into the same
architecture, proc-fns.h provided the xchg implementation for
arm26 CPUs.  Since we no longer combine these two, this include
is no longer required.  Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 18:36:49 +00:00
Russell King 49ee57a329 [ARM] Use unsigned long not u32 in atomic_cmpxchg
Since atomic.h does not include types.h, u32 may not be defined.
Since atomics are supposed to work on unsigned long quantities,
use unsigned long instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 18:03:10 +00:00
Russell King 1b12050f17 [ARM] Move zone adjustment for SA1111 on SA11x0 platforms
Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we
can't include asm/page.h into this file because then we have a circular
dependency.  Move the offending code to arch/arm/common/sa1111.c
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 17:38:40 +00:00
Russell King 8dc39b883e [ARM] Add linux/compiler.h includes where required
atomic.h, bitops.h and mmu_context.h are using likely/unlikely.
thread_info.h uses __attribute_const__.  Hence these files require
linux/compiler.h to be included.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 17:23:57 +00:00
Nicolas Pitre a7d0683361 [ARM] 3165/1: fix atomic_cmpxchg() implementation for ARMv6+
Patch from Nicolas Pitre

If 'old' and 'oldval' are different then 'res' never gets set.  In that
case, if ever %0 happened to contain anything but zero (rather likely)
then the code will loop forever (or until another CPU just come along
and change the atomic value to match 'old' which is rather unlikely).

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 15:05:11 +00:00
Russell King 0a5709b2dc [ARM] Include asm/hardware.h instead of asm/arch/hardware.h
Rationalise hardware.h include.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 14:51:20 +00:00
Russell King ce07d90aa8 [ARM] Fix arch-realview/system.h to use __io_address()
Move __io_address to arch-realview/hardware.h, drop core.h from platsmp.c
and localtimer.c, and include asm/io.h where required.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 14:38:19 +00:00
Linus Torvalds 70ac551651 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-13 18:17:54 -08:00
Nick Piggin 8426e1f6af [PATCH] atomic: inc_not_zero
Introduce an atomic_inc_not_zero operation.  Make this a special case of
atomic_add_unless because lockless pagecache actually wants
atomic_inc_not_negativeone due to its offset refcount.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:16 -08:00
Nick Piggin 4a6dae6d38 [PATCH] atomic: cmpxchg
Introduce an atomic_cmpxchg operation.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:16 -08:00
Richard Purdie 94cabd003e [ARM] 3149/1: SharpSL: Add Akita (SL-C1000) machine support
Patch from Richard Purdie

Add the core machine support for the Sharp SL-C1000 (Akita)
and enable the Kconfig selection for it.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-12 18:53:48 +00:00
Liam Girdwood b216c01829 [ARM] 3098/1: pxa2xx disable ssp irq
Patch from Liam Girdwood

This patch allows users of the pxa SSP driver to register their own irq
handlers instead of using the default SSP handler. It also cleans up the
CKEN clock and irq detection as the values are now stored in a table.

This patch replaces 2845/1

Changes:-
o Added flags parameter to ssp_init()
o Added SSP_NO_IRQ flag to disable registering of ssp irq handler (for
drivers that want to register their own handler)
o Cleaned up clock and irq detection, values are now stored in table.
o Added build changes to allow other drivers (e.g audio) to select the
ssp driver.
o corgi_ssp.c changed to use new interface.

Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-10 17:45:39 +00:00
Richard Purdie 078abcf95c [ARM] 3096/1: Add SharpSL Zaurus power and battery management core driver
Patch from Richard Purdie

This patch adds a power and battery management core driver which with
the addition of the right device files, supports the c7x0 and cxx00
series of Sharp Zaurus handhelds.

The driver is complex for several reasons. Battery charging is manually
monitored and controlled. When suspended, the device needs to
periodically partially resume, check the charging status and then
re-suspend. It does without bothering the higher linux layers as
a full resume and re-suspend is unnecessary. The code is carefully
written to avoid interrupts or calling code outside the module under
these circumstances. It also vets the various wake up sources and
monitors the device's power situation.

Hooks to limit the backlight intensity and to notify the battery
monitoring code of backlight events are connected/added as the
backlight is one of the biggest users of power on the device.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-10 17:42:29 +00:00
Tony Lindgren b1faebb672 [ARM] 3144/1: OMAP 5/5: Update omap H2 defconfig
Patch from Tony Lindgren

This patch updates omap H2 defconfig.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-10 14:26:54 +00:00
Tony Lindgren 9ad5897c26 [ARM] 3143/1: OMAP 4/5: Update omap include files
Patch from Tony Lindgren

This patch syncs the mainline kernel with linux-omap tree.

This patch contains changes to common header files for
omap1xxx and omap24xx by various omap developers, and
improved cpu detection by Imre Deak

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-10 14:26:53 +00:00
Alessandro Zummo a7918f39bb [ARM] 3140/1: NSLU2 machine support
Patch from Alessandro Zummo

This patch adds support for the LinkSys NSLU2 running with
both big and little-endian kernels. The LinkSys NSLU2 is
a cost engineered ARM, XScale 420 based system similar to
the the Intel IXDP425 evaluation board. It uses the
IXP4XX ARCH.

While this patch applies independently of other patches
the resultant kernel requires further patches to successfully
use onboard devices, including the onboard flash. Since these
patches are independent of this one they will be submitted
separately.

A defconfig is not included here because not all of
the required drivers are actually in the kernel.
We intend to provide one as soon as the patches
will be incorporated in mainstream.

This patch is the combined work of nslu2-linux.org

Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-10 14:05:04 +00:00
Kyungmin Park 861e37ad59 [ARM] 3057/1: Add memory control method to support OneNAND sync burst read
Patch from Kyungmin Park

This patch is required for OneNAND MTD to passing the OneNAND sync. burst read

Signed-off-by: Kyungmin Park
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-09 15:15:10 +00:00
Russell King 59d1ff3bfb [ARM] Clean up save_and_disable_irqs macro and allow use of ARMv6 CPSID
save_and_disable_irqs does not need to use mov + msr (which was
introduced to work around a documentation bug which was propagated
into binutils.)  Use msr with an immediate constant, and if we're
building for ARMv6 or later, use the new CPSID instruction.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-09 15:04:22 +00:00
Russell King be6eb9b79f Merge with ARM SMP tree 2005-11-09 14:57:32 +00:00
Russell King 2a98beb639 [ARM SMP] Add local timer support for Realview MPcore
Add platform specific parts for local timer support for the
Realview board.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-09 10:50:29 +00:00
Russell King 72274c9e24 Merge with ARM SMP tree 2005-11-08 22:43:44 +00:00
Ben Dooks f8c905d368 [ARM] 3132/1: S3C2410 - reset on decompression error
Patch from Ben Dooks

Force a watchdog reset if the system fails to
decompress properly.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-08 22:43:05 +00:00
Richard Purdie a63ae4427c [ARM] 3093/1: SharpSL PCMCIA Updates for Cxx00 models
Patch from Richard Purdie

The Sharp SL-Cxx00 models have a combined power control for the SD
and CF slot 0. This patch adds hooks to the scoop driver to allow
machines to provide a custom control function for this and such a
function is added for spitz/akita/borzoi.

It also moves the gpio init code into the machine files as this
is machine dependent and differs between some models. A couple of
warnings when compiling for collie are also fixed.

Signed-off-by: Richard Purdie
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-08 19:15:43 +00:00
Russell King 37ee16ae93 [ARM SMP] Add core ARM support for local timers
Add infrastructure for supporting per-cpu local timers to update
the profiling information and update system time accounting.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-08 19:08:05 +00:00
Russell King 3b6353fae0 [ARM] Declare asm entry points in asm/smp.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-08 15:35:23 +00:00
Russell King dbebb4cbe0 [ARM SMP] Add missing SMP timer handling for realview
Until we have local timer support, we need to broadcast the
timer interrupt to the other CPUs.  Also, add the missing
smp_send_timer() prototype to asm/smp.h

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-08 10:40:10 +00:00
Russell King 862184fe01 [ARM SMP] Add Realview MPcore SMP support
Add SMP support for the MPcore tile fitted to the Realview ARM
platform.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-07 21:05:42 +00:00
Russell King 9b1283bedd [ARM] Add support for Realview with MPcore tile
Add uniprocessor support for Realview platform fitted with the
MPcore (SMP) tile.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-07 21:01:06 +00:00
Russell King 4fe15ba08f [ARM] Fix second missing declaration of cache_is_vivt()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 19:47:04 +00:00
Russell King d3997abf69 [ARM] Fix another use of // as a comment
// disagrees with ld's script parsing ability.  Don't use it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 15:45:00 +00:00
Richard Purdie 756c7b7489 [ARM] 3113/1: PXA: Allow machines to override (and also reuse) pxa pm functions
Patch from Richard Purdie

Update the PXA pm.c file to allow machines (such as the Sharp
Zaurus) to override the standard pm functions but reuse/wrap them
where needed.

The init call is made slightly earlier to give machine code an init
level to override them in removing any race.

Signed-off-by: Richard Purdie
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 15:03:23 +00:00
Dirk Opfer 8459c159f7 [ARM] 3088/1: PXA: Add machine support for the Sharp SL-6000x series of PDAs
Patch from Dirk Opfer

This patch adds basic machine support for the Sharp SL-6000x (Tosa) PDAs.

Signed-off-by: Dirk Opfer
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-06 14:27:52 +00:00
Russell King d56c524afa [PATCH] ARM: Reverted 2918/1: [update] Base port of Comdial MP1000 platfrom
No longer maintained
2005-11-04 17:28:34 +00:00
Dave Jiang 7866f64928 [ARM] 3086/1: ixp2xxx error irq handling
Patch from Dave Jiang

This provides support for IXP2xxx error interrupt handling. Previously there was a patch to remove this (although the original stuff was broken). Well, now the error bits are needed again. These are used extensively by the micro-engine drivers according to Deepak and also we will need it for the new EDAC code that Alan Cox is trying to push into the main kernel.

Re-submit of 3072/1, generated against git tree pulled today. AFAICT, this git tree pulled in all the ARM changes that's in arm.diff. Please let me know if there are additional changes. Thx!

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-04 17:15:44 +00:00
Russell King 5f8b1178e2 [ARM] Merge SMP tree 2005-11-03 21:02:39 +00:00
Russell King 7e5e6e9a50 [ARM SMP] Do not clear cpu_vm_mask for VIPT caches
Since we do not invalidate TLBs/caches on MM switches, we should not
clear the cpu_vm_mask for the CPU.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-03 20:32:45 +00:00
Russell King 089311e117 [ARM] Fix another build error with IOP3xx platforms
ld doesn't like comments starting with // in its scripts

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-03 11:04:53 +00:00
Russell King a054a81159 [ARM SMP] Add hotplug CPU infrastructure
This patch adds the infrastructure to support hotplug CPU on ARM
platforms.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 22:24:33 +00:00
Russell King 71f512e897 [ARM SMP] Track CPU idle threads
Track the idle thread task_struct for each CPU.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 21:51:40 +00:00
Russell King 7e86df2732 [ARM] Fix ARM rwlock implementations
fb1c8f93d8 broke the ARM rwlock code since
it only partially updated the rwlock implementation.  Properly update it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 15:09:31 +00:00
John Bowler bfca94590b [ARM] 3083/1: include/asm-arm/arch-ixp4xx/io.h: eliminate warnings for pointer passed to integral function argument
Patch from John Bowler

Fix for a compiler warning, this wasn't apparent in 2.6.12, I
believe the compiler options have been changed (somewhere) so
that passing a (void*) to a (u32) argument is now warned.

This accounts for the majority of the warnings in my builds of
the 2.6.14 kernel for NSLU2.

The patch changes pointer parameters declared as u32 to be
declared as either, for read parameters:

const volatile void __iomem *

and for write parameters:

volatile void __iomem *

Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 11:55:12 +00:00
Russell King 9dc2d0f55f [ARM] Fix realview machine type for patch 3060/1
Realview was missed in this cleanup...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-02 11:51:15 +00:00
Lennert Buytenhek d01e8897fc [ARM] 3052/1: add ixp2000 microcode loader
Patch from Lennert Buytenhek

This patch adds a microcode loader for the ixp2000 architecture.

The ixp2000 is an xscale-based CPU with a number of additional small
CPUs ('microengines') on die that can be programmed to do various
things.  Depending on the ixp2000 model, there are between 2 and 16
microengines.

This code provides an API that allows configuring the microengines,
loading code into them, and starting and stopping them and reading
out a number of status registers, and is used by the microengine
network driver that was recently announced to netdev.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:53:50 +00:00
Ben Dooks 4ebc3364de [ARM] 3077/1: S3C2410 - regs-iis.h missing mask for IISMOD_FS
Patch from Ben Dooks

Add definition for S3C2410_IISMOD_FS_MASK

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:44:30 +00:00
Lennert Buytenhek fa87cedd4e [ARM] 3065/1: ixp2000 typo and whitespace fixes
Patch from Lennert Buytenhek

Misc ixp2000 typo and whitespace fixes.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:44:27 +00:00
Lennert Buytenhek e9b72e43d9 [ARM] 3064/1: start using ixp2000_reg_wrb
Patch from Lennert Buytenhek

Switch the users of ixp2000_reg_write that depend on writes being
flushed out of the write buffer by the time that function returns
over to ixp2000_reg_wrb.

When using XCB=101, writes to the same functional unit are still
guaranteed to complete in order, so we only need to protect against:
- reordering of writes to different functional units
- masking an interrupt and then reenabling the IRQ bit in CPSR

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:44:26 +00:00
Lennert Buytenhek 69a857610a [ARM] 3063/1: allow slave ixp2000 cpu reset
Patch from Lennert Buytenhek

On the ixdp2x00, the slave CPU is currently not allowed to reset itself
for fear that it will do something 'funky' on the PCI bus.  This fear is
ungrounded -- the slave CPU is wired up such that a CPU reset will not
cause a PCI bus reset to be done.  This patch changes arch_reset() so
that the slave CPU also executes the reset sequence, allowing it to
reboot itself using /sbin/reboot.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:44:25 +00:00
Lennert Buytenhek a6f1063b38 [ARM] 3062/1: map in various enp2611 peripherals for the ixp2000 netdev driver
Patch from Lennert Buytenhek

The enp2611 version of the ixp2000 netdev driver needs to be able to
access a number of on-board peripherals.  ioremap() is not suitable
for this, as that will cause XCB=000 mappings to be done, which will
make the cpu susceptible to crashing on ixp2400 erratum #66.  Properly
aligned iotable mappings with MT_IXP2000_DEVICE will cause section
mappings with XCB=101 to be done, which is safe.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-01 19:44:24 +00:00
Catalin Marinas 8ad68bbf7a [ARM] Add support for ARM RealView board
Support for RealView EB.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-31 14:25:02 +00:00
Linus Torvalds 1480d0a31d Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-10-30 17:48:00 -08:00
Arthur Othieno 727a53bd53 [PATCH] semaphore: Remove __MUTEX_INITIALIZER()
__MUTEX_INITIALIZER() has no users, and equates to the more commonly used
DECLARE_MUTEX(), thus making it pretty much redundant.  Remove it for good.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:27 -08:00
Tejun Heo 1426d7a81d [PATCH] vm: remove unused/broken page_pte[_prot] macros
This patch removes page_pte_prot and page_pte macros from all
architectures.  Some architectures define both, some only page_pte (broken)
and others none.  These macros are not used anywhere.

page_pte_prot(page, prot) is identical to mk_pte(page, prot) and
page_pte(page) is identical to page_pte_prot(page, __pgprot(0)).

* The following architectures define both page_pte_prot and page_pte

  arm, arm26, ia64, sh64, sparc, sparc64

* The following architectures define only page_pte (broken)

  frv, i386, m32r, mips, sh, x86-64

* All other architectures define neither

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:22 -08:00
Christoph Hellwig dfb7dac3af [PATCH] unify sys_ptrace prototype
Make sure we always return, as all syscalls should.  Also move the common
prototype to <linux/syscalls.h>

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:20 -08:00
John Bowler 46595ffbfc [ARM] arch-ixp4xx/io.h: make const args const to remove compiler warning
Compiler warning fix; the inline callers of these APIs were changed
to have const vaddr parameters.

Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-30 23:40:26 +00:00
Deepak Saxena 7012f9084e [ARM] fix bogus cast in IXP2000 I/O macro
Physical addresses are not valid pointers of any sort and should
not be cast to such.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-30 23:35:58 +00:00
Hugh Dickins fc2acab31b [PATCH] mm: tlb_finish_mmu forget rss
zap_pte_range has been counting the pages it frees in tlb->freed, then
tlb_finish_mmu has used that to update the mm's rss.  That got stranger when I
added anon_rss, yet updated it by a different route; and stranger when rss and
anon_rss became mm_counters with special access macros.  And it would no
longer be viable if we're relying on page_table_lock to stabilize the
mm_counter, but calling tlb_finish_mmu outside that lock.

Remove the mmu_gather's freed field, let tlb_finish_mmu stick to its own
business, just decrement the rss mm_counter in zap_pte_range (yes, there was
some point to batching the update, and a subsequent patch restores that).  And
forget the anal paranoia of first reading the counter to avoid going negative
- if rss does go negative, just fix that bug.

Remove the mmu_gather's flushes and avoided_flushes from arm and arm26: no use
was being made of them.  But arm26 alone was actually using the freed, in the
way some others use need_flush: give it a need_flush.  arm26 seems to prefer
spaces to tabs here: respect that.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:37 -07:00
Hugh Dickins 4d6ddfa924 [PATCH] mm: tlb_is_full_mm was obscure
tlb_is_full_mm?  What does that mean?  The TLB is full?  No, it means that the
mm's last user has gone and the whole mm is being torn down.  And it's an
inline function because sparc64 uses a different (slightly better)
"tlb_frozen" name for the flag others call "fullmm".

And now the ptep_get_and_clear_full macro used in zap_pte_range refers
directly to tlb->fullmm, which would be wrong for sparc64.  Rather than
correct that, I'd prefer to scrap tlb_is_full_mm altogether, and change
sparc64 to just use the same poor name as everyone else - is that okay?

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:37 -07:00
Hugh Dickins 15a23ffa2f [PATCH] mm: tlb_gather_mmu get_cpu_var
tlb_gather_mmu dates from before kernel preemption was allowed, and uses
smp_processor_id or __get_cpu_var to find its per-cpu mmu_gather.  That works
because it's currently only called after getting page_table_lock, which is not
dropped until after the matching tlb_finish_mmu.  But don't rely on that, it
will soon change: now disable preemption internally by proper get_cpu_var in
tlb_gather_mmu, put_cpu_var in tlb_finish_mmu.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29 21:40:37 -07:00
Nicolas Pitre 37d07b72ef [ARM] 3061/1: cleanup the XIP link address mess
Patch from Nicolas Pitre

Since vmlinux.lds.S is preprocessed, we can use the defines already
present in asm/memory.h (allowed by patch #3060) for the XIP kernel link
address instead of relying on a duplicated Makefile hardcoded value, and
also get rid of its dependency on awk to handle it at the same time.

While at it let's clean XIP stuff even further and make things clearer
in head.S with a nice code reduction.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 21:44:56 +01:00
Nicolas Pitre f09b997999 [ARM] 3060/1: allow constants found in asm/memory.h to be used in asm code
Patch from Nicolas Pitre

This patch allows for assorted type of cleanups by letting assembly code
use the same set of defines for constant values and avoid duplicated
definitions that might not always be in sync, or that might simply be
confusing due to the different names for the same thing.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 21:44:55 +01:00
Kenneth Tan c514e58cb8 [ARM] 3022/1: Missing peripheral devices memory mapping definition for IXP46X processor
Patch from Kenneth Tan

Defining IXP46X peripheral devices memory mapping definitions that have
been missed out:
o Peripheral virtual base address is being adjusted to allow more headroom to add extra peripheral device addresses
o Peripheral size is being increased to address the above needs
o Virtual address of expansion bus and PCI configuration register needs to be adjusted as new peripheral device memory space is overlapping with their virtual address space

Signed-off-by: Kenneth Tan <chong.yin.tan@intel.com>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:32:14 +01:00
Lennert Buytenhek b4a1f67fbf [ARM] 3053/1: introduce ixp2000_reg_wrb (ixp2000_reg_write plus readback)
Patch from Lennert Buytenhek

Introduce ixp2000_reg_wrb, which is a variant of ixp2000_reg_write
that does a readback from the target register, to make sure that
the write has been flushed out of the write buffer.

Unlike the previous (ineffective) readback in ixp2000_reg_write, this
readback is followed by an instruction that depends on the value of
the readback so that the CPU actually stalls until the readback has
completed.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:28:28 +01:00
Lennert Buytenhek ecbea7a2da [ARM] 3051/1: turn ixp2000_reg_read into an inline function
Patch from Lennert Buytenhek

Turn ixp2000_reg_read into an inline function.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:28:27 +01:00
Lennert Buytenhek 931db7d688 [ARM] 3050/1: remove ixp2000_reg_write erratum #66 workaround
Patch from Lennert Buytenhek

The workaround that we do for avoiding triggering ixp2400 erratum #66
involves mapping I/O pages using XCB=101 instead of XCB=000 so that we
prevent the I/O signal to the gasket from being asserted (which can
cause data corruption.)  But XCB=101 mappings are write-buffered while
mappings using XCB=000 are not, which is why if we use XCB=101 mappings
we do a readback for every CSR store in an attempt to make sure that
the store has been pushed out of the xscale core and the gasket.

Unfortunately, there are two issues with this:
- we do a readback for every CSR store, which is wrong, because the
  register we are writing to might have unwanted side-effects on read,
  for example, in the case of the scratchpad ring enqueue/dequeue
  registers; and
- the readback is totally ineffective in the way we currently do it,
  because we just issue a load but do not issue any instruction that
  depends on the return value of that load, so the xscale core does
  not wait for the load to complete before continuing.

See this linux-arm-kernel mailing list post for further information:
	http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-September/031314.html

This means that my ixp2400 boxes have been running for many months
without a working readback in ixp2000_reg_write, without any apparent
adverse effects.  Two of them have been running for a week now with
the actual readback deleted from ixp2000_reg_write, also without any
apparent ill effects.

So, because in its current form it does more harm than good, the
readback in ixp2000_reg_write should simply be killed, as the patch
below does.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:28:26 +01:00
Russell King 14e66f767f [ARM] Allow MTD device name to be passed via platform data
Allow SA1100 devices to pass the name of the flash device to the
SA1100 map driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 16:08:31 +01:00
Russell King 8c18fe2562 [ARM] Fix buggy __phys_to_pfn / __pfn_to_phys
Macro arguments should _always_ be surrounded by parentheses
when used to prevent unexpected problems with operator precedence.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 13:18:10 +01:00
Russell King fb31690fba [ARM] Ensure machine information structures aren't optimised away
Since the machine information structures are now static, the
compiler might optimise them away.  Mark them with
__attribute_used__ to prevent this occuring.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-29 13:15:10 +01:00
Linus Torvalds 83928e17b9 Merge master.kernel.org:/home/rmk/linux-2.6-arm
Minor manual fixups for gfp_t clashes.
2005-10-28 09:24:22 -07:00
Bellido Nicolas 049eb3298a [ARM] 3041/1: AAEC-2000 - CLCD controller platform glue
Patch from Bellido Nicolas

The AAEC-2000 has an ARM PrimeCell PL110 Color LCD Controller.
This patch contains the platform glue that will be used by specific boards.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:44 +01:00
Bellido Nicolas 4a91ca2eb6 [ARM] 3039/1: AAEC-2000 - Add MTD support
Patch from Bellido Nicolas

This adds platform code for MTD devices on AAEC-2000.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:42 +01:00
Bellido Nicolas f0904e2936 [ARM] 3038/1: AAEC-2000 - Proper includes in hardware.h
Patch from Bellido Nicolas

linux/config.h is not necessary in hardware.h, while asm/sizes.h and asm/arch//aaec2000.h will be used later.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:41 +01:00
Bellido Nicolas 4028ef4cc1 [ARM] 3037/1: AAED-2000 - Add defines for GPIO registers on external port.
Patch from Bellido Nicolas

The AAED-2000 board has GPIO pins on an external port.
This patch adds the defines, and do the necessary mapping.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:40 +01:00
Bellido Nicolas 13b1d677d2 [ARM] 3036/1: AAEC-2000 - Add defines for GPIO registers
Patch from Bellido Nicolas

Add defines for GPIO registers on the AAEC-2000 processor.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:51:40 +01:00
Nicolas Pitre 6f475c0133 [ARM] 2897/2: PXA2xx IRDA support
Patch from Nicolas Pitre

This is the PXA2xx common IRDA driver, plus platform support
for Lubbock and Mainstone.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:39:33 +01:00
Matt Reimer d9e2964987 [ARM] 3029/1: Add HWUART support for PXA 255/26x
Patch from Matt Reimer

Adds support for HWUART on PXA 255 / 26x. This patch originally came from
http://svn.rungie.com/svn/gumstix-buildroot/trunk/sources/kernel-patches/000-gumstix-hwuart.patch
and has been tweaked by me.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:25:02 +01:00
Todd Poynor 80a18573ce [ARM] 2787/2: PXA27x low power modes support
Patch from Todd Poynor

Add symbols for PXA2xx PWRMODE register M field that selects low-power
mode, replace unadorned constants.  Honor power mode parameter of
pxa_cpu_suspend(mode), no longer force to 3 (sleep).  Full Deep Sleep
low-power mode support for PXA27x is pending generic PM interfaces to
select more than 2 suspend-to-RAM-style power modes, but this is
expected soon. This can be hardcoded in the meantime by replacing the
pxa_cpu_suspend() parameter value.  From David Burrage and Todd Poynor.
Try #2 removes one of the register copies and moves the code to save the
pxa_cpu_suspend parameter to immediately surround the call that requires
the parameter value be preserved.

Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:25:01 +01:00
Jon Ringle 0b83f1400f [ARM] 2918/1: [update] Base port of Comdial MP1000 platfrom
Patch from Jon Ringle

Updated 2898/1 per comments:
- Removed fixup
- Moved code in mach-mp1000/ to mach-clps711x/
- Cleaned up code in mp1000-seprom.c. Eliminated code that displayed the contents of the eeprom
Please comment.

Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:19:37 +01:00
Al Viro f9e3214a79 [PATCH] gfp_t: dma-mapping (arm)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:47 -07:00
Ben Dooks 893b03094c [ARM] 3045/2: S3C2410 - change init for lcd platform data
Patch from Ben Dooks

Change set_s3c2410fb_info to s3c2410_fb_set_platdata
and use kmalloc() for the copy of the information it
is passed.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:45 +01:00
Lennert Buytenhek 3b90c9c333 [ARM] 2908/1: add register definitions for ixp2000 msf
Patch from Lennert Buytenhek

We already had a mapping for the msf, but we didn't have any
register definitions for it yet.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:45 +01:00
Ian Campbell 63a4b52c9d [ARM] 3044/1: Fix sparse warnings about incompatible pointer types for register defined in pxa-regs.h
Patch from Ian Campbell

The sparse warning initially surfaced in sound/arm/pxa2xx-ac97.c
because it was using u32 * variables to hold the unsigned long *
register addresses.

I submitted an ALSA patch for this http://thread.gmane.org/gmane.linux.alsa.devel/27804 issue and it was suggested that it might be preferable to change the register
definitions to use u32.

Most other subarches seem to use u32 for their register type, at least
the ones which use a __REG macro (like the PXA) do. Nico indicated in
the thread above that he wouldn't mind this patch.

Changing the type required fixes for opposite warnings in the pxa2xx usb
gadget code but that was the only new warning introduced on defconfig
or lubbock, mainstone and our own PXA255 boards.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:26:42 +01:00
Ben Dooks 42d3a120fe [ARM] 3033/1: S3C2410 - add generic gpio_cfgpin options
Patch from Ben Dooks

Add generic values for the parameters to the
s3c2410_gpio_cfgpin() function, so that a caller
does not need to know the exact constant for
the specified pin.

This is very useful for the case where a driver
is passed a gpio pin number and needs to reconfigure
the pin's function.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:26:41 +01:00
Deepak Saxena 9769c2468d [ARM] 3016/1: Replace map_desc.physical with map_desc.pfn
Patch from Deepak Saxena

Convert map_desc.physical to map_desc.pfn. This allows us to add
support for 36-bit addressed physical devices in the static maps
without having to resort to u64 variables.

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:11 +01:00
Russell King f339ab3d6c [ARM] Fix sparse warnings
Fix sparse warnings in arch/arm/kernel/module.c,
arch/arm/mm/consistent.c, drivers/pcmcia/sa1111_generic.c,
and platform support files.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:29:43 +01:00
Russell King 674c045382 [ARM] 3/4: Remove asm/hardware.h from SA1100 io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:25:28 +01:00
Russell King c6b8fdad14 [ARM] 3/4: Remove asm/hardware.h from Versatile and Integrator io.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 14:05:16 +01:00
Russell King 766529fa2c [ARM] 2/4: Remove asm/hardware.h from asm-arm/arch-ebsa110/io.h
EBSA110 only requires hardware.h to be included for a couple of
files.  Move the include there.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 10:29:21 +01:00