aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/zeus.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@misterjones.org>2009-11-14 07:39:13 -0500
committerEric Miao <eric.y.miao@gmail.com>2009-12-13 08:42:58 -0500
commitc2de1c382933fd9ef0a3db13b6747115e1e32c56 (patch)
treed9e0fa251d376fb7d5f9906952bf02f2f31570e0 /arch/arm/mach-pxa/zeus.c
parente491a11c77a4ed93ec14cc052b1f048bddc9e99a (diff)
[ARM] pxa/zeus: make Viper pcmcia support more generic to support Zeus
The Arcom Zeus CF slot requires the same kind of support as the Viper. To avoid code duplication, introduce a platform device that abstracts the differences. This also allows for the removal of the ugly export of viper_cf_rst(). Signed-off-by: Marc Zyngier <maz@misterjones.org> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/zeus.c')
-rw-r--r--arch/arm/mach-pxa/zeus.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ae1c3d2f6d5b..5b986a8bd9e6 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -43,6 +43,7 @@
43#include <mach/mfp-pxa27x.h> 43#include <mach/mfp-pxa27x.h>
44#include <mach/pm.h> 44#include <mach/pm.h>
45#include <mach/audio.h> 45#include <mach/audio.h>
46#include <mach/arcom-pcmcia.h>
46#include <mach/zeus.h> 47#include <mach/zeus.h>
47 48
48#include "generic.h" 49#include "generic.h"
@@ -428,6 +429,33 @@ static struct platform_device zeus_leds_device = {
428 }, 429 },
429}; 430};
430 431
432static void zeus_cf_reset(int state)
433{
434 u16 cpld_state = __raw_readw(ZEUS_CPLD_CONTROL);
435
436 if (state)
437 cpld_state |= ZEUS_CPLD_CONTROL_CF_RST;
438 else
439 cpld_state &= ~ZEUS_CPLD_CONTROL_CF_RST;
440
441 __raw_writew(cpld_state, ZEUS_CPLD_CONTROL);
442}
443
444static struct arcom_pcmcia_pdata zeus_pcmcia_info = {
445 .cd_gpio = ZEUS_CF_CD_GPIO,
446 .rdy_gpio = ZEUS_CF_RDY_GPIO,
447 .pwr_gpio = ZEUS_CF_PWEN_GPIO,
448 .reset = zeus_cf_reset,
449};
450
451static struct platform_device zeus_pcmcia_device = {
452 .name = "zeus-pcmcia",
453 .id = -1,
454 .dev = {
455 .platform_data = &zeus_pcmcia_info,
456 },
457};
458
431static struct platform_device *zeus_devices[] __initdata = { 459static struct platform_device *zeus_devices[] __initdata = {
432 &zeus_serial_device, 460 &zeus_serial_device,
433 &zeus_mtd_devices[0], 461 &zeus_mtd_devices[0],
@@ -436,6 +464,7 @@ static struct platform_device *zeus_devices[] __initdata = {
436 &zeus_sram_device, 464 &zeus_sram_device,
437 &pxa2xx_spi_ssp3_device, 465 &pxa2xx_spi_ssp3_device,
438 &zeus_leds_device, 466 &zeus_leds_device,
467 &zeus_pcmcia_device,
439}; 468};
440 469
441/* AC'97 */ 470/* AC'97 */