Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281788
b: refs/heads/master
c: 951c486
h: refs/heads/master
v: v3
  • Loading branch information
Haojian Zhuang authored and Haojian Zhuang committed Nov 15, 2011
1 parent 7d3c905 commit c2e3fb5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 389eda15e0f41112d7c44213b3c4f8bd1c9398bc
refs/heads/master: 951c486f62490e032da0ad17e93270b0cfb6687f
16 changes: 8 additions & 8 deletions trunk/drivers/pcmcia/pxa2xx_cm_x255.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <linux/gpio.h>
#include <linux/export.h>

#include <asm/mach-types.h>

#include "soc_common.h"

#define GPIO_PCMCIA_SKTSEL (54)
Expand All @@ -27,15 +25,15 @@
#define GPIO_PCMCIA_S1_RDYINT (8)
#define GPIO_PCMCIA_RESET (9)

#define PCMCIA_S0_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S0_CD_VALID)
#define PCMCIA_S1_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S1_CD_VALID)
#define PCMCIA_S0_RDYINT IRQ_GPIO(GPIO_PCMCIA_S0_RDYINT)
#define PCMCIA_S1_RDYINT IRQ_GPIO(GPIO_PCMCIA_S1_RDYINT)
#define PCMCIA_S0_CD_VALID gpio_to_irq(GPIO_PCMCIA_S0_CD_VALID)
#define PCMCIA_S1_CD_VALID gpio_to_irq(GPIO_PCMCIA_S1_CD_VALID)
#define PCMCIA_S0_RDYINT gpio_to_irq(GPIO_PCMCIA_S0_RDYINT)
#define PCMCIA_S1_RDYINT gpio_to_irq(GPIO_PCMCIA_S1_RDYINT)


static struct pcmcia_irqs irqs[] = {
{ 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" },
{ 1, PCMCIA_S1_CD_VALID, "PCMCIA1 CD" },
{ .sock = 0, .str = "PCMCIA0 CD" },
{ .sock = 1, .str = "PCMCIA1 CD" },
};

static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
Expand All @@ -46,6 +44,8 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
gpio_direction_output(GPIO_PCMCIA_RESET, 0);

skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
irqs[0].irq = PCMCIA_S0_CD_VALID;
irqs[1].irq = PCMCIA_S1_CD_VALID;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/pcmcia/pxa2xx_cm_x270.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
#include <linux/gpio.h>
#include <linux/export.h>

#include <asm/mach-types.h>

#include "soc_common.h"

#define GPIO_PCMCIA_S0_CD_VALID (84)
#define GPIO_PCMCIA_S0_RDYINT (82)
#define GPIO_PCMCIA_RESET (53)

#define PCMCIA_S0_CD_VALID IRQ_GPIO(GPIO_PCMCIA_S0_CD_VALID)
#define PCMCIA_S0_RDYINT IRQ_GPIO(GPIO_PCMCIA_S0_RDYINT)
#define PCMCIA_S0_CD_VALID gpio_to_irq(GPIO_PCMCIA_S0_CD_VALID)
#define PCMCIA_S0_RDYINT gpio_to_irq(GPIO_PCMCIA_S0_RDYINT)


static struct pcmcia_irqs irqs[] = {
{ 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" },
{ .sock = 0, .str = "PCMCIA0 CD" },
};

static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
Expand All @@ -40,6 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
gpio_direction_output(GPIO_PCMCIA_RESET, 0);

skt->socket.pci_irq = PCMCIA_S0_RDYINT;
irqs[0].irq = PCMCIA_S0_CD_VALID;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);
Expand Down

0 comments on commit c2e3fb5

Please sign in to comment.