aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/viper.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/viper.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/viper.c')
-rw-r--r--arch/arm/mach-pxa/viper.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index cf0d71b7797e..5352b4e5a7dd 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -47,6 +47,7 @@
47#include <mach/pxafb.h> 47#include <mach/pxafb.h>
48#include <plat/i2c.h> 48#include <plat/i2c.h>
49#include <mach/regs-uart.h> 49#include <mach/regs-uart.h>
50#include <mach/arcom-pcmcia.h>
50#include <mach/viper.h> 51#include <mach/viper.h>
51 52
52#include <asm/setup.h> 53#include <asm/setup.h>
@@ -76,14 +77,28 @@ static void viper_icr_clear_bit(unsigned int bit)
76} 77}
77 78
78/* This function is used from the pcmcia module to reset the CF */ 79/* This function is used from the pcmcia module to reset the CF */
79void viper_cf_rst(int state) 80static void viper_cf_reset(int state)
80{ 81{
81 if (state) 82 if (state)
82 viper_icr_set_bit(VIPER_ICR_CF_RST); 83 viper_icr_set_bit(VIPER_ICR_CF_RST);
83 else 84 else
84 viper_icr_clear_bit(VIPER_ICR_CF_RST); 85 viper_icr_clear_bit(VIPER_ICR_CF_RST);
85} 86}
86EXPORT_SYMBOL(viper_cf_rst); 87
88static struct arcom_pcmcia_pdata viper_pcmcia_info = {
89 .cd_gpio = VIPER_CF_CD_GPIO,
90 .rdy_gpio = VIPER_CF_RDY_GPIO,
91 .pwr_gpio = VIPER_CF_POWER_GPIO,
92 .reset = viper_cf_reset,
93};
94
95static struct platform_device viper_pcmcia_device = {
96 .name = "viper-pcmcia",
97 .id = -1,
98 .dev = {
99 .platform_data = &viper_pcmcia_info,
100 },
101};
87 102
88/* 103/*
89 * The CPLD version register was not present on VIPER boards prior to 104 * The CPLD version register was not present on VIPER boards prior to
@@ -685,6 +700,7 @@ static struct platform_device *viper_devs[] __initdata = {
685 &viper_mtd_devices[0], 700 &viper_mtd_devices[0],
686 &viper_mtd_devices[1], 701 &viper_mtd_devices[1],
687 &viper_backlight_device, 702 &viper_backlight_device,
703 &viper_pcmcia_device,
688}; 704};
689 705
690static mfp_cfg_t viper_pin_config[] __initdata = { 706static mfp_cfg_t viper_pin_config[] __initdata = {