aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r--arch/arm/mach-ixp4xx/Kconfig4
-rw-r--r--arch/arm/mach-ixp4xx/common.c20
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-power.c3
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c3
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-power.c3
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c13
6 files changed, 34 insertions, 12 deletions
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
index daadc78e271b..5bf50a2a737d 100644
--- a/arch/arm/mach-ixp4xx/Kconfig
+++ b/arch/arm/mach-ixp4xx/Kconfig
@@ -8,11 +8,9 @@ menu "Intel IXP4xx Implementation Options"
8 8
9comment "IXP4xx Platforms" 9comment "IXP4xx Platforms"
10 10
11# This entry is placed on top because otherwise it would have
12# been shown as a submenu.
13config MACH_NSLU2 11config MACH_NSLU2
14 bool 12 bool
15 prompt "NSLU2" if !(MACH_IXDP465 || MACH_IXDPG425 || ARCH_IXDP425 || ARCH_ADI_COYOTE || ARCH_AVILA || ARCH_IXCDP1100 || ARCH_PRPMC1100 || MACH_GTWX5715) 13 prompt "Linksys NSLU2"
16 help 14 help
17 Say 'Y' here if you want your kernel to support Linksys's 15 Say 'Y' here if you want your kernel to support Linksys's
18 NSLU2 NAS device. For more information on this platform, 16 NSLU2 NAS device. For more information on this platform,
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 4bdc9d4526cd..fbadf3021b9e 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -111,24 +111,30 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
111 if (line < 0) 111 if (line < 0)
112 return -EINVAL; 112 return -EINVAL;
113 113
114 if (type & IRQT_BOTHEDGE) { 114 switch (type){
115 case IRQT_BOTHEDGE:
115 int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL; 116 int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL;
116 irq_type = IXP4XX_IRQ_EDGE; 117 irq_type = IXP4XX_IRQ_EDGE;
117 } else if (type & IRQT_RISING) { 118 break;
119 case IRQT_RISING:
118 int_style = IXP4XX_GPIO_STYLE_RISING_EDGE; 120 int_style = IXP4XX_GPIO_STYLE_RISING_EDGE;
119 irq_type = IXP4XX_IRQ_EDGE; 121 irq_type = IXP4XX_IRQ_EDGE;
120 } else if (type & IRQT_FALLING) { 122 break;
123 case IRQT_FALLING:
121 int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE; 124 int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE;
122 irq_type = IXP4XX_IRQ_EDGE; 125 irq_type = IXP4XX_IRQ_EDGE;
123 } else if (type & IRQT_HIGH) { 126 break;
127 case IRQT_HIGH:
124 int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; 128 int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH;
125 irq_type = IXP4XX_IRQ_LEVEL; 129 irq_type = IXP4XX_IRQ_LEVEL;
126 } else if (type & IRQT_LOW) { 130 break;
131 case IRQT_LOW:
127 int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW; 132 int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW;
128 irq_type = IXP4XX_IRQ_LEVEL; 133 irq_type = IXP4XX_IRQ_LEVEL;
129 } else 134 break;
135 default:
130 return -EINVAL; 136 return -EINVAL;
131 137 }
132 ixp4xx_config_irq(irq, irq_type); 138 ixp4xx_config_irq(irq, irq_type);
133 139
134 if (line >= 8) { /* pins 8-15 */ 140 if (line >= 8) { /* pins 8-15 */
diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c
index 2bec69bfa715..99d333d7ebdd 100644
--- a/arch/arm/mach-ixp4xx/nas100d-power.c
+++ b/arch/arm/mach-ixp4xx/nas100d-power.c
@@ -56,6 +56,9 @@ static int __init nas100d_power_init(void)
56 56
57static void __exit nas100d_power_exit(void) 57static void __exit nas100d_power_exit(void)
58{ 58{
59 if (!(machine_is_nas100d()))
60 return;
61
59 free_irq(NAS100D_RB_IRQ, NULL); 62 free_irq(NAS100D_RB_IRQ, NULL);
60} 63}
61 64
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 856d56f3b2ae..a3b4c6ac5708 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -113,6 +113,9 @@ static void __init nas100d_init(void)
113{ 113{
114 ixp4xx_sys_init(); 114 ixp4xx_sys_init();
115 115
116 /* gpio 14 and 15 are _not_ clocks */
117 *IXP4XX_GPIO_GPCLKR = 0;
118
116 nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); 119 nas100d_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
117 nas100d_flash_resource.end = 120 nas100d_flash_resource.end =
118 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; 121 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c
index b0ad9e901f6e..d80c362bc539 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -77,6 +77,9 @@ static int __init nslu2_power_init(void)
77 77
78static void __exit nslu2_power_exit(void) 78static void __exit nslu2_power_exit(void)
79{ 79{
80 if (!(machine_is_nslu2()))
81 return;
82
80 free_irq(NSLU2_RB_IRQ, NULL); 83 free_irq(NSLU2_RB_IRQ, NULL);
81 free_irq(NSLU2_PB_IRQ, NULL); 84 free_irq(NSLU2_PB_IRQ, NULL);
82} 85}
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index da9340a53434..55411f21d838 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -27,8 +27,6 @@ static struct flash_platform_data nslu2_flash_data = {
27}; 27};
28 28
29static struct resource nslu2_flash_resource = { 29static struct resource nslu2_flash_resource = {
30 .start = NSLU2_FLASH_BASE,
31 .end = NSLU2_FLASH_BASE + NSLU2_FLASH_SIZE,
32 .flags = IORESOURCE_MEM, 30 .flags = IORESOURCE_MEM,
33}; 31};
34 32
@@ -52,6 +50,12 @@ static struct platform_device nslu2_i2c_controller = {
52 .num_resources = 0, 50 .num_resources = 0,
53}; 51};
54 52
53static struct platform_device nslu2_beeper = {
54 .name = "ixp4xx-beeper",
55 .id = NSLU2_GPIO_BUZZ,
56 .num_resources = 0,
57};
58
55static struct resource nslu2_uart_resources[] = { 59static struct resource nslu2_uart_resources[] = {
56 { 60 {
57 .start = IXP4XX_UART1_BASE_PHYS, 61 .start = IXP4XX_UART1_BASE_PHYS,
@@ -99,6 +103,7 @@ static struct platform_device *nslu2_devices[] __initdata = {
99 &nslu2_i2c_controller, 103 &nslu2_i2c_controller,
100 &nslu2_flash, 104 &nslu2_flash,
101 &nslu2_uart, 105 &nslu2_uart,
106 &nslu2_beeper,
102}; 107};
103 108
104static void nslu2_power_off(void) 109static void nslu2_power_off(void)
@@ -116,6 +121,10 @@ static void __init nslu2_init(void)
116{ 121{
117 ixp4xx_sys_init(); 122 ixp4xx_sys_init();
118 123
124 nslu2_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
125 nslu2_flash_resource.end =
126 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
127
119 pm_power_off = nslu2_power_off; 128 pm_power_off = nslu2_power_off;
120 129
121 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices)); 130 platform_add_devices(nslu2_devices, ARRAY_SIZE(nslu2_devices));