1 --- a/arch/arm/mach-ixp4xx/common.c
2 +++ b/arch/arm/mach-ixp4xx/common.c
3 @@ -93,22 +93,7 @@ void __init ixp4xx_map_io(void)
8 - * The following converted to the real HW bits the gpio_line_config
11 -#define IXP4XX_GPIO_OUT 0x1
12 -#define IXP4XX_GPIO_IN 0x2
14 -/* GPIO signal types */
15 -#define IXP4XX_GPIO_LOW 0
16 -#define IXP4XX_GPIO_HIGH 1
19 -#define IXP4XX_GPIO_CLK_0 14
20 -#define IXP4XX_GPIO_CLK_1 15
22 -static void gpio_line_config(u8 line, u32 direction)
23 +void gpio_line_config(u8 line, u32 direction)
25 if (direction == IXP4XX_GPIO_IN)
26 *IXP4XX_GPIO_GPOER |= (1 << line);
27 @@ -116,17 +101,17 @@ static void gpio_line_config(u8 line, u3
28 *IXP4XX_GPIO_GPOER &= ~(1 << line);
31 -static void gpio_line_get(u8 line, int *value)
32 +void gpio_line_get(u8 line, int *value)
34 *value = (*IXP4XX_GPIO_GPINR >> line) & 0x1;
37 -static void gpio_line_set(u8 line, int value)
38 +void gpio_line_set(u8 line, int value)
40 - if (value == IXP4XX_GPIO_HIGH)
41 - *IXP4XX_GPIO_GPOUTR |= (1 << line);
42 - else if (value == IXP4XX_GPIO_LOW)
43 + if (value == IXP4XX_GPIO_LOW)
44 *IXP4XX_GPIO_GPOUTR &= ~(1 << line);
46 + *IXP4XX_GPIO_GPOUTR |= (1 << line);
49 /*************************************************************************
50 --- a/arch/arm/mach-ixp4xx/include/mach/platform.h
51 +++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
52 @@ -131,5 +131,21 @@ struct pci_sys_data;
53 extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
54 extern struct pci_ops ixp4xx_ops;
57 +#define IXP4XX_GPIO_OUT 0x1
58 +#define IXP4XX_GPIO_IN 0x2
60 +/* GPIO signal types */
61 +#define IXP4XX_GPIO_LOW 0
62 +#define IXP4XX_GPIO_HIGH 1
65 +#define IXP4XX_GPIO_CLK_0 14
66 +#define IXP4XX_GPIO_CLK_1 15
68 +void gpio_line_config(u8 line, u32 direction);
69 +void gpio_line_get(u8 line, int *value);
70 +void gpio_line_set(u8 line, int value);
72 #endif // __ASSEMBLY__