diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2010-07-27 15:48:10 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-08-05 02:32:45 -0400 |
commit | a9c0629cdefd9c26746ece510fcc88357869685e (patch) | |
tree | 196d0c32e643ee1ce89907ba5d90be94dfcd5e81 /arch/arm/mach-pxa | |
parent | 12a2449c79686964a36b17175970a8e1c19b4cf7 (diff) |
[ARM] pxa/balloon3: PCMCIA Support
This driver adds support for the on-board CF socket.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/balloon3.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/balloon3.h | 36 |
2 files changed, 31 insertions, 18 deletions
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 572525c26cac..91ad56d6e929 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -88,6 +88,18 @@ static unsigned long balloon3_pin_config[] __initdata = { | |||
88 | /* USB Host */ | 88 | /* USB Host */ |
89 | GPIO88_USBH1_PWR, | 89 | GPIO88_USBH1_PWR, |
90 | GPIO89_USBH1_PEN, | 90 | GPIO89_USBH1_PEN, |
91 | |||
92 | /* PC Card */ | ||
93 | GPIO48_nPOE, | ||
94 | GPIO49_nPWE, | ||
95 | GPIO50_nPIOR, | ||
96 | GPIO51_nPIOW, | ||
97 | GPIO85_nPCE_1, | ||
98 | GPIO54_nPCE_2, | ||
99 | GPIO79_PSKTSEL, | ||
100 | GPIO55_nPREG, | ||
101 | GPIO56_nPWAIT, | ||
102 | GPIO57_nIOIS16, | ||
91 | }; | 103 | }; |
92 | 104 | ||
93 | /****************************************************************************** | 105 | /****************************************************************************** |
@@ -405,7 +417,6 @@ static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) | |||
405 | { | 417 | { |
406 | unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & | 418 | unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & |
407 | balloon3_irq_enabled; | 419 | balloon3_irq_enabled; |
408 | |||
409 | do { | 420 | do { |
410 | /* clear useless edge notification */ | 421 | /* clear useless edge notification */ |
411 | if (desc->chip->ack) | 422 | if (desc->chip->ack) |
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index 1a741065045f..d5dcf750c1ef 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h | |||
@@ -26,10 +26,12 @@ enum balloon3_features { | |||
26 | #define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */ | 26 | #define BALLOON3_FPGA_VIRT (0xf1000000) /* as per balloon2 */ |
27 | #define BALLOON3_FPGA_LENGTH 0x01000000 | 27 | #define BALLOON3_FPGA_LENGTH 0x01000000 |
28 | 28 | ||
29 | /* FPGA/CPLD registers */ | 29 | /* FPGA / CPLD registers for CF socket */ |
30 | #define BALLOON3_PCMCIA0_REG (BALLOON3_FPGA_VIRT + 0x00e00008) | 30 | #define BALLOON3_CF_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00e00008) |
31 | /* fixme - same for now */ | 31 | #define BALLOON3_CF_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e00008) |
32 | #define BALLOON3_PCMCIA1_REG (BALLOON3_FPGA_VIRT + 0x00e00008) | 32 | /* FPGA / CPLD version register */ |
33 | #define BALLOON3_FPGA_VER (BALLOON3_FPGA_VIRT + 0x00e0001c) | ||
34 | |||
33 | #define BALLOON3_NANDIO_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000) | 35 | #define BALLOON3_NANDIO_IO_REG (BALLOON3_FPGA_VIRT + 0x00e00000) |
34 | /* fpga/cpld interrupt control register */ | 36 | /* fpga/cpld interrupt control register */ |
35 | #define BALLOON3_INT_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e0000C) | 37 | #define BALLOON3_INT_CONTROL_REG (BALLOON3_FPGA_VIRT + 0x00e0000C) |
@@ -41,6 +43,19 @@ enum balloon3_features { | |||
41 | #define BALLOON3_SAMOSA_DATA_REG (BALLOON3_FPGA_VIRT + 0x00c00004) | 43 | #define BALLOON3_SAMOSA_DATA_REG (BALLOON3_FPGA_VIRT + 0x00c00004) |
42 | #define BALLOON3_SAMOSA_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00c0001c) | 44 | #define BALLOON3_SAMOSA_STATUS_REG (BALLOON3_FPGA_VIRT + 0x00c0001c) |
43 | 45 | ||
46 | /* CF Status Register bits (read-only) bits */ | ||
47 | #define BALLOON3_CF_nIRQ (1 << 0) | ||
48 | #define BALLOON3_CF_nSTSCHG_BVD1 (1 << 1) | ||
49 | |||
50 | /* CF Control Set Register bits / CF Control Clear Register bits (write-only) */ | ||
51 | #define BALLOON3_CF_RESET (1 << 0) | ||
52 | #define BALLOON3_CF_ENABLE (1 << 1) | ||
53 | #define BALLOON3_CF_ADD_ENABLE (1 << 2) | ||
54 | |||
55 | /* CF Interrupt sources */ | ||
56 | #define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0) | ||
57 | #define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1) | ||
58 | |||
44 | /* GPIOs for irqs */ | 59 | /* GPIOs for irqs */ |
45 | #define BALLOON3_GPIO_AUX_NIRQ (94) | 60 | #define BALLOON3_GPIO_AUX_NIRQ (94) |
46 | #define BALLOON3_GPIO_CODEC_IRQ (95) | 61 | #define BALLOON3_GPIO_CODEC_IRQ (95) |
@@ -58,16 +73,6 @@ enum balloon3_features { | |||
58 | #define BALLOON3_INT_S0_IRQ (1 << 0) /* PCMCIA 0 IRQ */ | 73 | #define BALLOON3_INT_S0_IRQ (1 << 0) /* PCMCIA 0 IRQ */ |
59 | #define BALLOON3_INT_S0_STSCHG (1 << 1) /* PCMCIA 0 status changed */ | 74 | #define BALLOON3_INT_S0_STSCHG (1 << 1) /* PCMCIA 0 status changed */ |
60 | 75 | ||
61 | /* CF Status Register */ | ||
62 | #define BALLOON3_PCMCIA_nIRQ (1 << 0) /* IRQ / ready signal */ | ||
63 | #define BALLOON3_PCMCIA_nSTSCHG_BVD1 (1 << 1) | ||
64 | /* VDD sense / card status changed */ | ||
65 | |||
66 | /* CF control register (write) */ | ||
67 | #define BALLOON3_PCMCIA_RESET (1 << 0) /* Card reset signal */ | ||
68 | #define BALLOON3_PCMCIA_ENABLE (1 << 1) | ||
69 | #define BALLOON3_PCMCIA_ADD_ENABLE (1 << 2) | ||
70 | |||
71 | /* CPLD (and FPGA) interface definitions */ | 76 | /* CPLD (and FPGA) interface definitions */ |
72 | #define CPLD_LCD0_DATA_SET 0x00 | 77 | #define CPLD_LCD0_DATA_SET 0x00 |
73 | #define CPLD_LCD0_DATA_CLR 0x10 | 78 | #define CPLD_LCD0_DATA_CLR 0x10 |
@@ -132,9 +137,6 @@ enum balloon3_features { | |||
132 | /* Balloon3 Interrupts */ | 137 | /* Balloon3 Interrupts */ |
133 | #define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x)) | 138 | #define BALLOON3_IRQ(x) (IRQ_BOARD_START + (x)) |
134 | 139 | ||
135 | #define BALLOON3_BP_CF_NRDY_IRQ BALLOON3_IRQ(0) | ||
136 | #define BALLOON3_BP_NSTSCHG_IRQ BALLOON3_IRQ(1) | ||
137 | |||
138 | #define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ) | 140 | #define BALLOON3_AUX_NIRQ IRQ_GPIO(BALLOON3_GPIO_AUX_NIRQ) |
139 | #define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ) | 141 | #define BALLOON3_CODEC_IRQ IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ) |
140 | #define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD) | 142 | #define BALLOON3_S0_CD_IRQ IRQ_GPIO(BALLOON3_GPIO_S0_CD) |