diff options
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/goramo_mlr.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 6d68aed6548a..c751f2f35668 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -99,7 +99,7 @@ void __init ixp4xx_map_io(void) | |||
99 | #define IXP4XX_GPIO_CLK_0 14 | 99 | #define IXP4XX_GPIO_CLK_0 14 |
100 | #define IXP4XX_GPIO_CLK_1 15 | 100 | #define IXP4XX_GPIO_CLK_1 15 |
101 | 101 | ||
102 | static void gpio_line_config(u8 line, u32 direction) | 102 | void gpio_line_config(u8 line, u32 direction) |
103 | { | 103 | { |
104 | if (direction == IXP4XX_GPIO_IN) | 104 | if (direction == IXP4XX_GPIO_IN) |
105 | *IXP4XX_GPIO_GPOER |= (1 << line); | 105 | *IXP4XX_GPIO_GPOER |= (1 << line); |
@@ -107,12 +107,12 @@ static void gpio_line_config(u8 line, u32 direction) | |||
107 | *IXP4XX_GPIO_GPOER &= ~(1 << line); | 107 | *IXP4XX_GPIO_GPOER &= ~(1 << line); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void gpio_line_get(u8 line, int *value) | 110 | void gpio_line_get(u8 line, int *value) |
111 | { | 111 | { |
112 | *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1; | 112 | *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1; |
113 | } | 113 | } |
114 | 114 | ||
115 | static void gpio_line_set(u8 line, int value) | 115 | void gpio_line_set(u8 line, int value) |
116 | { | 116 | { |
117 | if (value == IXP4XX_GPIO_HIGH) | 117 | if (value == IXP4XX_GPIO_HIGH) |
118 | *IXP4XX_GPIO_GPOUTR |= (1 << line); | 118 | *IXP4XX_GPIO_GPOUTR |= (1 << line); |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index e54ff491c105..5a635c657ea2 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -17,6 +17,13 @@ | |||
17 | #include <asm/mach/pci.h> | 17 | #include <asm/mach/pci.h> |
18 | #include <asm/system_info.h> | 18 | #include <asm/system_info.h> |
19 | 19 | ||
20 | #define IXP4XX_GPIO_OUT 0x1 | ||
21 | #define IXP4XX_GPIO_IN 0x2 | ||
22 | |||
23 | void gpio_line_config(u8 line, u32 direction); | ||
24 | void gpio_line_get(u8 line, int *value); | ||
25 | void gpio_line_set(u8 line, int value); | ||
26 | |||
20 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ | 27 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ |
21 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ | 28 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ |
22 | #define SLOT_MPCI 0x0D /* IDSEL = AD19 */ | 29 | #define SLOT_MPCI 0x0D /* IDSEL = AD19 */ |