aboutsummaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-pxa
AgeCommit message (Collapse)Author
2008-02-05gpiolib support for the PXA architecturePhilipp Zabel
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-04Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits) [ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option [ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c [ARM] 4820/1: RealView: Select the timer IRQ at run-time [ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms [ARM] 4818/1: RealView: Add core-tile detection [ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c [ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h [ARM] 4815/1: RealView: Add clockevents suport for the local timers [ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore [ARM] 4813/1: Add SMP helper functions for clockevents support [ARM] 4812/1: RealView: clockevents support for the RealView platforms [ARM] 4811/1: RealView: clocksource support for the RealView platforms [ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags [ARM] 4798/1: pcm027: fix missing header file [ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1 [ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h [ARM] pxa: introduce sysdev for pxa3xx static memory controller [ARM] pxa: add preliminary suspend/resume code for pxa3xx [ARM] pxa: introduce sysdev for GPIO register saving/restoring [ARM] pxa: introduce sysdev for IRQ register saving/restoring ...
2008-02-04[ARM] pxa: add preliminary suspend/resume code for pxa3xxeric miao
1. clear RDH bit after resuming back from D3, otherwise, the multi function pins will retain the low power state 2. save/restore essential system registers Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-03include/asm-arm/: Spelling fixesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-28Merge branch 'pxa-plat' into develRussell King
* pxa-plat: (53 commits) [ARM] 4762/1: Basic support for Toradex Colibri module [ARM] pxa: fix mci_init functions returning -1 [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270 [ARM] 4746/1: pcm027: network support for phyCORE-PXA270 [ARM] 4745/1: pcm027: default configuration [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module [NET] smc91x: Make smc91x use IRQ resource trigger flags [ARM] pxa: add default config for littleton [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform) [ARM] 4664/1: Add basic support for HTC Magician PDA phones [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs. [ARM] pxa: skip registers saving/restoring if entering standby mode [ARM] pxa: fix PXA27x resume [ARM] pxa: Avoid fiddling with CKEN register on suspend [ARM] pxa: Add PXA3 standby code hooked into the IRQ wake scheme [ARM] pxa: Add zylonite MFP wakeup configurations [ARM] pxa: program MFPs for low power mode when suspending [ARM] pxa: make MFP configuration processor independent [ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functions ... Conflicts: arch/arm/mach-pxa/ssp.c Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] 4762/1: Basic support for Toradex Colibri moduleDaniel Mack
This patch adds support for Toradex' PXA27x based Colibri module. It's kept as simple as possible to only provide basic functionality. A default config is also included. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfixRichard Purdie
This patch refactors the code in corgi_lcd.c moving it to the board specific corgi and spitz files where appropriate instead of the existing ifdef mess which hinders readability. Fix spitz_get_hsync_len() to call get_hsync_invperiod so pxafb can be compiled as a module. The confusing variables which represent the inverse horizintal sync period are renamed to "invperiod" consistently. An incorrect comment in corgi_ts.c is also corrected. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270Robert Schwebel
This patch adds baseboard support for the phyCORE-PXA270 development kit (aka PCM-990). This example shows how to use some phyCORE-PXA270 CPU module features on a baseboard in a standard manner. It could be used as a starting point for custom baseboard development. V2: After comments by Eric Miao: - IRQ chained handler fixed - video/graphic support moved to separate patch - ifdef/endif hell reduced ;-) V3: After comments by Russell King - initialise the mmci platform data statically V4: After comments by Russell King - wrong return value in pcm990_mci_init() fixed Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU moduleRobert Schwebel
This patch adds main support for the generic phyCORE-PXA270 CPU module (aka PCM-027). Its as generic as possible to support any kind of baseboard. Note: Neither the CPU module nor the pcm027.c implementation can work without a baseboard support. Baseboard support can be added by the PCM-990 or any custom variant. V2: After comments by Eric Miao: - Currently unsupported devices moved into separate patch - direct call of baseboard initialisation V3: After comments by Russell King - sort include files - setting RTC bit for power control removed - style problems fixed (discovered by checkpatch.pl) Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform)eric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-28[ARM] 4664/1: Add basic support for HTC Magician PDA phonesPhilipp Zabel
This includes irda, gpio keys, pxafb, backlight, ohci and flash (read-only). Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-27i2c-pxa: Add polling transferMike Rapoport
Add polling I2C transfer implementation for PXA I2C. This is needed for cases where I2C transactions have to occur at times interrups are disabled. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: eric miao <eric.miao@marvell.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-26[ARM] pxa: Add PXA3 standby code hooked into the IRQ wake schemeRussell King
Wakeup sources on PXA3 are enabled at two levels. First, the MFP configuration has to be set to enable which edges a specific pin will trigger a wakeup. The pin also has to be routed to a functional unit. Lastly, the functional unit must be enabled as a wakeup source in the appropriate AD*ER registers (AD2D0ER for standby resume.) This doesn't fit well with the IRQ wake scheme - we currently do a best effort conversion from IRQ numbers to functional unit wake enable bits. For instance, there's several USB client related enable bits but there's no corresponding IRQs to determine which you'd want. Conversely, there's a single enable bit covering several functional units. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: make MFP configuration processor independenteric miao
There are two reasons for making the MFP configuration to be processor independent, i.e. removing the relationship of configuration bits with actual MFPR register settings: 1. power management sometimes requires the MFP to be configured differently when in run mode or in low power mode 2. for future integration of pxa{25x,27x} GPIO configurations The modifications include: 1. introducing of processor independent MFP configuration bits, as defined in [include/asm-arm/arch-pxa/mfp.h]: bit 0.. 9 - MFP Pin Number (1024 Pins Maximum) bit 10..12 - Alternate Function Selection bit 13..15 - Drive Strength bit 16..18 - Low Power Mode State bit 19..20 - Low Power Mode Edge Detection bit 21..22 - Run Mode Pull State and so on, 2. moving the processor dependent code from mfp.h into mfp-pxa3xx.h 3. cleaning up of the MFPR bit definitions 4. mapping of processor independent MFP configuration into processor specific MFPR register settings is now totally encapsulated within pxa3xx_mfp_config() 5. using of "unsigned long" instead of invented type of "mfp_cfg_t" according to Documentation/CodingStyle Chapter 5, usage of this in platform code will be slowly removed in later patches Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functionseric miao
pxa3xx_mfp_set_xxx() functions are originally provided for overwriting MFP configurations performed by pxa3xx_mfp_config(), the usage of such a dirtry trick is not recommended, since there is currently no user of these functions, they are safely removed Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: introduce a new file mfp-pxa3xx.h for common pin configurationseric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: move memory controller registers into pxa2xx-regs.hRussell King
PXA3 has a different memory controller from PXA2 platforms. Avoid clashing definitions by moving the PXA2 definitions to pxa2xx-regs.h Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: make OHCI register definitions available to both pxa27x and pxa3xxeric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: mmc: add 3rd host controller support for pxa310Bridge Wu
This patch is to add the third mmc controller support _only_ for pxa310. On zylonite, the third controller support one slot. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: mmc: add 2nd host controller support for pxa3xxBridge Wu
This patch is to add the second mmc controller support for pxa3xx. It's valid for pxa3[0|1|2]0. On zylonite, the second controller has no slot. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: mmc: add 1st host controller support for pxa3xxBridge Wu
This patchis to add the first mmc controller support for pxa3xx. It's valid for pxa3[0|1|2]0. On zylonite, the first controller supports two slots, this patch only support the first one right now. Signed-off-by: Bridge Wu <bridge.wu@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] 4718/1: Fix redefinition warnings in PXA uncompressor codePhilipp Zabel
FFUART and friends are already defined as __REG(x) in pxa-regs.h. Instead of redefining them here, we can just provide the __REG macro. Including asm/arch/hardware.h is not an option because this physical addresses are needed here. This is a fix for the compiler warnings generated by 4663/1. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: make pxa2xx_spi driver use ssp_request()/ssp_free()eric miao
1. make pxa2xx_spi.c use ssp_request() and ssp_free() to get the common information of the designated SSP port. 2. remove those IRQ/memory request code, ssp_request() has done that for the driver 3. the SPI platform device is thus made psuedo, no resource (memory/IRQ) has to be defined, all will be retreived by ssp_request() 4. introduce ssp_get_clk_div() to handle controller difference in clock divisor setting 5. use clk_xxx() API for clock enable/disable, and clk_get_rate() to handle the different SSP clock frequency between different processors Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: use __raw_writel()/__raw_readl() for ssp_xxxx()eric miao
1. change SSP register definitions from absolute virtual addresses to offsets 2. use __raw_writel()/__raw_readl() for functions of ssp_xxxx() Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: move SSP register definitions from pxa-regs.h to regs-ssp.heric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] pxa: define "struct ssp_device" and add ssp_request()/ssp_free()eric miao
1. define "struct ssp_device" for SSP information, which is requested and released by function ssp_request()/ssp_free() 2. modify the ssp_init() and ssp_exit() to use the interface Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-26[ARM] 4663/1: Only putc uncompressor output into FFUART if it was enabled by ↵Philipp Zabel
the bootloader Also, use existing register and bit definitions instead of numbers. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-01-10[ARM] pxa: silence warnings from cpu_is_xxx() macrosRussell King
If only a single CPU type is selected, __cpu_is_xxx() doesn't use its argument. This causes the compiler to issue a warning about an unused variable in the parent function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-12-08[ARM] 4690/1: PXA: fix CKEN corruption in PXA27x AC97 cold reset codeMichael Brunner
Fix CKEN register corruption in the PXA27x cold reset code located in sound/arm/pxa27x-ac97.c. The problem has been introduced with a pxa_set_cken() function change in linux 2.6.23. This patch is based on patch 4527/1 that fixes the same problem in the ASoC PXA-AC97 driver. Additionally a definition for the CKEN index value is added and applied to both PXA AC97 drivers. Signed-off-by: Michael Brunner <mibru@gmx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-29[ARM] 4674/1: pxa: increase LCD PCLK drive strength to fast 2mA for ↵eric miao
PXA300/PXA310 Some platforms (e.g. Littleton) requires LCD PCLK drive strength to be higher than default to cope with the fast PCLK frequency. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-29[ARM] 4673/1: pxa: add missing IRQ_SSP4 definitions for PXA3xxeric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-29[ARM] 4672/1: pxa: fix DRCMR(n) to support PXA27x and later processorseric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26[ARM] 4654/1: pxa: update default MFP register valueeric miao
1. update default MFPR value to drive strength fast 3mA and edge detection logic disabled 2. update impacted MFP_CFG_xxx() macros Signed-off-by: bridge wu <bridge.wu@marvell.com> Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26[ARM] 4653/1: pxa: fix a gpio typo in mfp-pxa320.heric miao
Signed-off-by: bridge wu <bridge.wu@marvell.com> Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-11-26[ARM] 4651/1: pxa: add PXA3xx specific IRQ definitionseric miao
add missing IRQ_xxx definitions for PXA3xx Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31[ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.comeric miao
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-18PM: Move definition of struct pm_ops to suspend.hRafael J. Wysocki
Move the definition of 'struct pm_ops' and related functions from <linux/pm.h> to <linux/suspend.h> . There are, at least, the following reasons to do that: * 'struct pm_ops' is specifically related to suspend and not to the power management in general. * As long as 'struct pm_ops' is defined in <linux/pm.h>, any modification of it causes the entire kernel to be recompiled, which is unnecessary and annoying. * Some suspend-related features are already defined in <linux/suspend.h>, so it is logical to move the definition of 'struct pm_ops' into there. * 'struct hibernation_ops', being the hibernation-related counterpart of 'struct pm_ops', is defined in <linux/suspend.h> . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16pxafb: Add support for other palette formatsHans J. Koch
This patch adds support for the other three palette formats possible with the PXA LCD controller. This is required on boards where an LCD is connected with all its 18 bits. With this patch, it's possible to use an 8-bit mode with 18-bit palette entries. This used to be possible in 2.4 kernels but disappeared in 2.6. With current kernels, you can only get wrong colours out of an LCD connected this way. Users can choose the palette format by doing something like this in their board definition: static struct pxafb_mach_info my_fb_info = { [...] .lccr3 = LCCR3_OutEnH | LCCR3_PixFlEdg | LCCR3_PDFOR_3, .lccr4 = LCCR4_PAL_FOR_2, [...] }; Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-15[ARM] 4576/1: CM-X270 machine supportMike Rapoport
This patch provides core support for CM-X270 platform. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-15[ARM] pxa: Avoid pxa_gpio_mode() in gpio_direction_{in,out}put()Russell King
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[ARM] pxa: Make cpu_is_pxaXXX dependent on configuration symbolsRussell King
Make the cpu_is_pxaXXX() macros define to zero when support for a particular CPU is disabled. This allows us to eliminate code for CPUs which aren't enabled. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-15[ARM] pxa: PXA3xx base supporteric miao
Signed-off-by: eric miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12[ARM] 4559/1: pxa: make PXA_LAST_GPIO a run-time variableeric miao
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[ARM] pxa: add PXA3 cpu_is_xxx() macroseric miao
Extracted from patch by Eric Miao, this adds the cpu_is_xxx() macros for identifying PXA3 SoCs. Signed-off-by: eric miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-12[ARM] pxa: mark pxa_set_cken deprecatedRussell King
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[ARM] pxa: remove get_lcdclk_frequency_10khz()Russell King
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-11backlight: Convert corgi backlight driver into a more generic driverRichard Purdie
Convert the corgi backlight driver to a more generic version so it can be reused by other code rather than being Zaurus/PXA specific. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-20[ARM] 4489/1: pxa: split pxa_cpu_suspend to processor specific onesEric Miao
1. split pxa_cpu_suspend to pxa25x_cpu_suspend and pxa27x_cpu_suspend and make pxa25x_cpu_pm_enter() and pxa27x_cpu_pm_enter() to invoke the corresponding _suspend functions, thus remove all those ugly #ifdef .. #endif out of sleep.S 2. move the declarations of those suspend functions to pm.h note: this is not a clean enough solution until all the pxa25x and pxa27x specific part is further removed out of sleep.S, sleep.S is supposed to contain generic code only Signed-off-by: eric miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-07-20[ARM] 4488/1: pxa: move pxa25x/pxa27x specific code out of pm.cEric Miao
1. introduce a structure pxa_cpu_pm_fns for pxa25x/pxa27x specific operations as follows: struct pxa_cpu_pm_fns { int save_size; void (*save)(unsigned long *); void (*restore)(unsigned long *); int (*valid)(suspend_state_t state); void (*enter)(suspend_state_t state); } 2. processor specific registers saving and restoring are performed by calling the corresponding (*save) and (*restore) 3. pxa_cpu_pm_fns->save_size should be initialized to the required size for processor specific registers saving, the allocated memory address will be passed to (*save) and (*restore) memory allocation happens early in pxa_pm_init(), and save_size should be assigned prior to this (which is usually true, since pxa_pm_init() happens in device_initcall() 4. there're some redundancies for those SLEEP_SAVE_XXX and related macros, will be fixed later, one way possible is for the system devices to handle the specific registers saving and restoring Signed-off-by: eric miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>