Commit graph

42 commits

Author SHA1 Message Date
Russell King 66a7f72d98 [ARM] pxa: remove pxa_set_cken()
pxa_set_cken() is now unused, remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-07-09 20:56:28 +01:00
Russell King 0b0a9df603 [ARM] pxa: separate out power manager and clock registers
The power manager and core clock registers aren't present in PXA3
CPUs.  Move them out of pxa-regs.h into pxa2xx-regs.h, and include
pxa2xx-regs.h where necessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-02 19:33:27 +01:00
eric miao ce4fb7b892 pxafb: convert fb driver to use ioremap() and __raw_{readl, writel}
This is part of the effort moving peripheral registers outside of pxa-regs.h,
and using ioremap() make it possible the same IP can be re-used on different
processors with different registers space

As a result, the fixed mapping in pxa_map_io() is removed.

The regs-lcd.h can actually moved to where closer to pxafb.c but some of its
bit definitions are directly used by various platform code, though this is not
a good style.

Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:31 -07:00
eric miao 663707c1a9 [ARM] pxa: move GPIO sysdev outside of generic.c into gpio.c
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-04-19 11:29:04 +01:00
Philipp Zabel 1c44f5f16f gpiolib support for the PXA architecture
This adds gpiolib support for the PXA architecture:
  - move all GPIO API functions from generic.c into gpio.c
  - convert the gpio_get/set_value macros into inline functions

This makes it easier to hook up GPIOs provided by external chips like
ASICs and CPLDs.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Eric Miao <eric.miao@marvell.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Minor ARM fixup from David Brownell folded into this ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:13 -08:00
eric miao 16dfdbf038 [ARM] pxa: introduce sysdev for GPIO register saving/restoring
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-04 13:17:33 +00:00
Russell King 7664c400cc [ARM] pxa: increase size of memory mapping
The mapping for physical address 0x48000000 is not sufficient
to allow access to the dynamic memory controller configuration
registers on PXA3.  These registers need to be accessed to
reconfigure the SDRAM when waking from a low power mode.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:54 +00:00
eric miao 8f58de7c39 [ARM] pxa: create arch/arm/mach-pxa/device.c for all on-chip devices
Considering that generic.c is getting more and more bloated by device
information, moving that part out side will be much cleaner.

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:52 +00:00
Bridge Wu 9a788c6b78 [ARM] 4711/1: pxa: mmc: move DMA specific code to platform layer
This patch is to move pxamci DMA specific code to corresponding
platform layer because using DRCMRRXMMC/DRCMRTXMMC in pxamci.c makes
the driver code dedicated to platform which is not extensible.

It is applicable to all pxa platforms.

Signed-off-by: Bridge Wu <bridge.wu@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:52 +00:00
eric miao d2b82dded8 [ARM] pxa: define SSP platform devices for pxa2xx/pxa3xx
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:51 +00:00
Russell King 03f5b2cee6 [ARM] pxa: avoid always registering MMC, I2C, IrDA and framebuffer devices
Only register the MMC, framebuffer, I2C and FICP devices when the
platform supplies the necessary platform data structures for the
devices.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26 15:07:50 +00:00
Russell King 3e0cc7ee04 [ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put()
pxa_gpio_mode() is a universal call that fiddles with the GAFR
(gpio alternate function register.)  GAFR does not exist on PXA3
CPUs, but instead the alternate functions are controlled via the
MFP support code.

Platforms are expected to configure the MFP according to their
needs in their platform support code rather than drivers.  We
extend this idea to the GAFR, and make the gpio_direction_*()
functions purely operate on the GPIO level.

This means platform support code is entirely responsible for
configuring the GPIOs alternate functions on all PXA CPU types.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-15 18:53:55 +01:00
eric miao 2c8086a5d0 [ARM] pxa: PXA3xx base support
Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-15 18:53:43 +01:00
eric miao 30f0b40844 [ARM] 4559/1: pxa: make PXA_LAST_GPIO a run-time variable
This definition produces processor specific code in generic function
pxa_gpio_mode(), thus creating inconsistencies for support of pxa25x
and pxa27x in a single zImage.

As David Brownell suggests, make it a run-time variable and initialize
at run-time according to the number of GPIOs on the processor. For now
the initialization happens in pxa_init_irq_gpio(),  since there is
already a parameter for that, besides, this is and MUST be earlier
than any subsequent calls to pxa_gpio_mode().

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:15:32 +01:00
Russell King a7073b8b47 [ARM] pxa: mark pxa_set_cken deprecated
Allow the generic clock support code to fiddle with the CKEN register
and mark pxa_set_cken() deprecated.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:15:26 +01:00
Russell King a88a447d44 [ARM] pxa: remove get_lcdclk_frequency_10khz()
get_lcdclk_frequency_10khz() is now redundant, remove it.  Hide
pxa27x_get_lcdclk_frequency_10khz() from public view.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:15:25 +01:00
Russell King 15a4033354 [ARM] pxa: fix naming of memory/lcd/core clock functions
Rename pxa25x and pxa27x memory/lcd/core clock functions, and
select the correct version at run time.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:14:52 +01:00
Russell King e259a3aecb [ARM] pxa: convert PXA serial drivers to use platform resources
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:14:49 +01:00
Nicolas Pitre 6c3a158316 [ARM] 4550/1: sched_clock on PXA should cope with run time clock rate selection
The previous implementation was relying on compile time optimizations
based on a constant clock rate.  However, support for different PXA
flavors in the same kernel binary requires that the clock be selected at
run time, so here it is.

Let's move this code to a more appropriate location while at it.

Signed-off-by: Nicolas Pitre <npitre@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12 21:14:35 +01:00
Eric Miao e09d02e123 [ARM] 4480/1: pxa: change the pxa device naming scheme
1. for common devices across all the pxa variants, the names
   are changed to be:
     "pxa_device_xxx"

2. for pxa25x or pxa27x specific devices, the names are
   changed to be:
     "pxa25x_device_xxx", or
     "pxa27x_device_xxx"

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20 09:57:18 +01:00
Russell King 46c41e62a1 [ARM] pxa: move platform devices to separate header file
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-12 14:28:21 +01:00
Russell King 34f3231f43 [ARM] pxa: move device registration into CPU-specific file
This allows individual CPU support to determine which platform
devices should be registered.  Also fix a copy-n-paste bug in
the I2C power platform device entry.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-12 14:28:21 +01:00
Russell King b23170c01f [ARM] pxa: introduce cpu_is_pxaXXX macros
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-12 14:28:04 +01:00
Eric Miao 7053acbd78 [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX
This patch removes the unnecessary bit number from CKENnn_XXXX
definitions for PXA, so that

	CKEN0_PWM0 --> CKEN_PWM0
	CKEN1_PWM1 --> CKEN_PWM1
	...
	CKEN24_CAMERA --> CKEN_CAMERA

The reasons for the change of these defitions are:

1. they do not scale - they are currently valid for pxa2xx, but
definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera
instead of bit 24

2. they are unnecessary - the peripheral name within the definition
has already announced its usage, we don't need those bit numbers
to know which peripheral we are going to enable/disable clock for

3. they are inconvenient - think about this: a driver programmer
for pxa has to remember which bit in the CKEN register to turn
on/off

Another change in the patch is to make the definitions equal to its
clock bit index, so that

   #define CKEN_CAMERA  (24)

instead of

   #define CKEN_CAMERA  (1 << 24)

this change, however, will add a run-time bit shift operation in
pxa_set_cken(), but the benefit of this change is that it scales
when bit index exceeds 32, e.g., pxa3xx has two registers CKENA
and CKENB, totally 64 bit for this, suppose CAMERA clock enabling
bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10)
and so that pxa_set_cken() need minimum change to adapt to that.

Signed-off-by: eric miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-04-21 23:14:01 +01:00
Philipp Zabel 3deac046e2 [PATCH] GPIO API: PXA wrapper cleanup
Based on the discussion last december (http://lkml.org/lkml/2006/12/20/242),
this patch:

  - moves the PXA_LAST_GPIO check into pxa_gpio_mode
  - fixes comment and includes in gpio.h
  - replaces the gpio_set/get_value macros with inline
    functions and adds a non-inline version to avoid
    code explosion when gpio is not a constant.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-20 17:10:16 -08:00
Guennadi Liakhovetski a7b4e5506d [ARM] 4144/1: Fix for patch #4099/1 with CONFIG_I2C_PXA_SLAVE set
Switch the i2c-pxa driver to actually using the platform device information and let it handle the power i2c bus on pxa27x too. Original version of this patch didn't compile with CONFIG_I2C_PXA_SLAVE set.

Signed-off-by: G. Liakhovetski <gl@dsa-ac.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-02-08 14:46:36 +00:00
Nicolas Pitre 0c48d314b1 [ARM] 4066/1: correct a comment about PXA's sched_clock range
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-30 17:05:07 +00:00
Nicolas Pitre 2dc20a51dc [ARM] 3981/1: sched_clock for PXA2xx
Here's a 63-bit implementation of shed_clock() for PXA2xx.  The actual
period depends on the value of CLOCK_TICK_RATE and whether or not
reduced scaling factors were provided for it.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-12-07 16:06:55 +00:00
Richard Purdie d14b272bc6 [ARM] 3848/1: pxafb: Add option of fixing video modes and spitz QVGA mode support
Add the ability to have pxafb use only certain fixed video modes
(selected on a per platform basis). This is useful on production
hardware such as the Zaurus cxx00 models where the valid modes are
known in advance and any other modes could result in hardware damage.

Following this, add support for the cxx00 QVGA mode. Mode information
is passed to the lcd_power call to allowing the panel drivers to
configure the display hardware accordingly (corgi_lcd already contains
the functionality for the cxx00 panel).

This mirrors the setup already used by w100fb.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-02 13:33:37 +01:00
Richard Purdie e842f1c8ff [PATCH] RTC subsystem: SA1100/PXA2XX driver
Add an RTC subsystem driver for the ARM SA1100/PXA2XX processor RTC.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-27 08:44:52 -08:00
Linus Torvalds 4fd5f8267d Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Manual #include fixups for clashes - there may be some unnecessary
2005-10-31 07:32:56 -08:00
Tim Schmielau 4e57b68178 [PATCH] fix missing includes
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.

In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch.  This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other.  So if any
hunk rejects or gets in the way of other patches, just drop it.  My scripts
will pick it up again in the next round.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:32 -08:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +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
Ian Campbell b572352159 [ARM] 3048/1: register i2s resources not i2c resources for the pxa i2s platform device
Patch from Ian Campbell

As noted by Uli Luckas in the comments of 3025 there is a typo in the i2s platform device. The i2s platform device refers to the i2c resources.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:31:48 +01:00
Deepak Saxena 6f9182eb32 [ARM] 2988/1: Replace map_desc.physical with map_desc.pfn: PXA
Patch from Deepak Saxena

PXA map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 15:19:01 +01:00
Matt Reimer b2640b420a [ARM] 3025/1: Add I2S platform device for PXA
Patch from Matt Reimer

Adds an I2S platform_device for PXA. I2S is used to interface
with sound chips on systems like iPAQ h1910/h2200/hx4700 and
Asus 716.

Signed-off-by: mreimer@vpop.net
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20 23:21:18 +01:00
Richard Purdie cb38c569e5 [ARM] 3011/1: pxafb: Add ability to set device parent + fix spitz compile error
Patch from Richard Purdie

Add a function to allow machines to set the parent of the pxa
framebuffer device. This means the power up/down sequence can be
controlled where required by the machine.

Update spitz to use the new function, fixing a compile error.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-14 16:07:25 +01:00
Russell King eb9181a2f8 [ARM] Fix warning in arch/arm/mach-pxa/generic.c
Fix
 arch/arm/mach-pxa/generic.c:242: warning: 'struct i2c_pxa_platform_data' declared inside parameter list
caused by missing asm/arch/i2c.h include.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-29 09:49:25 +01:00
Russell King bb9bffcbef [PATCH] ARM: PXA I2C: add platform device
Add the PXA I2C platform device.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-30 13:26:06 +01:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00