aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/mach/irq.h4
-rw-r--r--arch/arm/include/asm/spinlock.h40
-rw-r--r--arch/arm/include/asm/spinlock_types.h8
-rw-r--r--arch/arm/kernel/irq.c12
-rw-r--r--arch/arm/mach-at91/include/mach/atmel-mci.h24
-rw-r--r--arch/arm/mach-kirkwood/Kconfig6
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/netspace_v2-setup.c325
-rw-r--r--arch/arm/mach-ns9xxx/irq.c8
-rw-r--r--arch/arm/mach-s3c2442/mach-gta02.c3
-rw-r--r--arch/arm/mm/proc-v6.S5
-rw-r--r--arch/arm/plat-omap/debug-leds.c2
-rw-r--r--arch/arm/plat-omap/gpio.c2
-rw-r--r--arch/arm/tools/mach-types44
14 files changed, 442 insertions, 42 deletions
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index acac5302e4ea..8920b2d6e3b8 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -26,9 +26,9 @@ extern int show_fiq_list(struct seq_file *, void *);
26 */ 26 */
27#define do_bad_IRQ(irq,desc) \ 27#define do_bad_IRQ(irq,desc) \
28do { \ 28do { \
29 spin_lock(&desc->lock); \ 29 raw_spin_lock(&desc->lock); \
30 handle_bad_irq(irq, desc); \ 30 handle_bad_irq(irq, desc); \
31 spin_unlock(&desc->lock); \ 31 raw_spin_unlock(&desc->lock); \
32} while(0) 32} while(0)
33 33
34#endif 34#endif
diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index c13681ac1ede..c91c64cab922 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -17,13 +17,13 @@
17 * Locked value: 1 17 * Locked value: 1
18 */ 18 */
19 19
20#define __raw_spin_is_locked(x) ((x)->lock != 0) 20#define arch_spin_is_locked(x) ((x)->lock != 0)
21#define __raw_spin_unlock_wait(lock) \ 21#define arch_spin_unlock_wait(lock) \
22 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0) 22 do { while (arch_spin_is_locked(lock)) cpu_relax(); } while (0)
23 23
24#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 24#define arch_spin_lock_flags(lock, flags) arch_spin_lock(lock)
25 25
26static inline void __raw_spin_lock(raw_spinlock_t *lock) 26static inline void arch_spin_lock(arch_spinlock_t *lock)
27{ 27{
28 unsigned long tmp; 28 unsigned long tmp;
29 29
@@ -43,7 +43,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
43 smp_mb(); 43 smp_mb();
44} 44}
45 45
46static inline int __raw_spin_trylock(raw_spinlock_t *lock) 46static inline int arch_spin_trylock(arch_spinlock_t *lock)
47{ 47{
48 unsigned long tmp; 48 unsigned long tmp;
49 49
@@ -63,7 +63,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
63 } 63 }
64} 64}
65 65
66static inline void __raw_spin_unlock(raw_spinlock_t *lock) 66static inline void arch_spin_unlock(arch_spinlock_t *lock)
67{ 67{
68 smp_mb(); 68 smp_mb();
69 69
@@ -86,7 +86,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
86 * just write zero since the lock is exclusively held. 86 * just write zero since the lock is exclusively held.
87 */ 87 */
88 88
89static inline void __raw_write_lock(raw_rwlock_t *rw) 89static inline void arch_write_lock(arch_rwlock_t *rw)
90{ 90{
91 unsigned long tmp; 91 unsigned long tmp;
92 92
@@ -106,7 +106,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw)
106 smp_mb(); 106 smp_mb();
107} 107}
108 108
109static inline int __raw_write_trylock(raw_rwlock_t *rw) 109static inline int arch_write_trylock(arch_rwlock_t *rw)
110{ 110{
111 unsigned long tmp; 111 unsigned long tmp;
112 112
@@ -126,7 +126,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw)
126 } 126 }
127} 127}
128 128
129static inline void __raw_write_unlock(raw_rwlock_t *rw) 129static inline void arch_write_unlock(arch_rwlock_t *rw)
130{ 130{
131 smp_mb(); 131 smp_mb();
132 132
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
142} 142}
143 143
144/* write_can_lock - would write_trylock() succeed? */ 144/* write_can_lock - would write_trylock() succeed? */
145#define __raw_write_can_lock(x) ((x)->lock == 0) 145#define arch_write_can_lock(x) ((x)->lock == 0)
146 146
147/* 147/*
148 * Read locks are a bit more hairy: 148 * Read locks are a bit more hairy:
@@ -156,7 +156,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
156 * currently active. However, we know we won't have any write 156 * currently active. However, we know we won't have any write
157 * locks. 157 * locks.
158 */ 158 */
159static inline void __raw_read_lock(raw_rwlock_t *rw) 159static inline void arch_read_lock(arch_rwlock_t *rw)
160{ 160{
161 unsigned long tmp, tmp2; 161 unsigned long tmp, tmp2;
162 162
@@ -176,7 +176,7 @@ static inline void __raw_read_lock(raw_rwlock_t *rw)
176 smp_mb(); 176 smp_mb();
177} 177}
178 178
179static inline void __raw_read_unlock(raw_rwlock_t *rw) 179static inline void arch_read_unlock(arch_rwlock_t *rw)
180{ 180{
181 unsigned long tmp, tmp2; 181 unsigned long tmp, tmp2;
182 182
@@ -198,7 +198,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
198 : "cc"); 198 : "cc");
199} 199}
200 200
201static inline int __raw_read_trylock(raw_rwlock_t *rw) 201static inline int arch_read_trylock(arch_rwlock_t *rw)
202{ 202{
203 unsigned long tmp, tmp2 = 1; 203 unsigned long tmp, tmp2 = 1;
204 204
@@ -215,13 +215,13 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
215} 215}
216 216
217/* read_can_lock - would read_trylock() succeed? */ 217/* read_can_lock - would read_trylock() succeed? */
218#define __raw_read_can_lock(x) ((x)->lock < 0x80000000) 218#define arch_read_can_lock(x) ((x)->lock < 0x80000000)
219 219
220#define __raw_read_lock_flags(lock, flags) __raw_read_lock(lock) 220#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
221#define __raw_write_lock_flags(lock, flags) __raw_write_lock(lock) 221#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
222 222
223#define _raw_spin_relax(lock) cpu_relax() 223#define arch_spin_relax(lock) cpu_relax()
224#define _raw_read_relax(lock) cpu_relax() 224#define arch_read_relax(lock) cpu_relax()
225#define _raw_write_relax(lock) cpu_relax() 225#define arch_write_relax(lock) cpu_relax()
226 226
227#endif /* __ASM_SPINLOCK_H */ 227#endif /* __ASM_SPINLOCK_H */
diff --git a/arch/arm/include/asm/spinlock_types.h b/arch/arm/include/asm/spinlock_types.h
index 43e83f6d2ee5..d14d197ae04a 100644
--- a/arch/arm/include/asm/spinlock_types.h
+++ b/arch/arm/include/asm/spinlock_types.h
@@ -7,14 +7,14 @@
7 7
8typedef struct { 8typedef struct {
9 volatile unsigned int lock; 9 volatile unsigned int lock;
10} raw_spinlock_t; 10} arch_spinlock_t;
11 11
12#define __RAW_SPIN_LOCK_UNLOCKED { 0 } 12#define __ARCH_SPIN_LOCK_UNLOCKED { 0 }
13 13
14typedef struct { 14typedef struct {
15 volatile unsigned int lock; 15 volatile unsigned int lock;
16} raw_rwlock_t; 16} arch_rwlock_t;
17 17
18#define __RAW_RW_LOCK_UNLOCKED { 0 } 18#define __ARCH_RW_LOCK_UNLOCKED { 0 }
19 19
20#endif 20#endif
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index c9a8619f3856..b7cb45bb91e8 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
69 } 69 }
70 70
71 if (i < NR_IRQS) { 71 if (i < NR_IRQS) {
72 spin_lock_irqsave(&irq_desc[i].lock, flags); 72 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
73 action = irq_desc[i].action; 73 action = irq_desc[i].action;
74 if (!action) 74 if (!action)
75 goto unlock; 75 goto unlock;
@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v)
84 84
85 seq_putc(p, '\n'); 85 seq_putc(p, '\n');
86unlock: 86unlock:
87 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 87 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
88 } else if (i == NR_IRQS) { 88 } else if (i == NR_IRQS) {
89#ifdef CONFIG_FIQ 89#ifdef CONFIG_FIQ
90 show_fiq_list(p, v); 90 show_fiq_list(p, v);
@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
139 } 139 }
140 140
141 desc = irq_desc + irq; 141 desc = irq_desc + irq;
142 spin_lock_irqsave(&desc->lock, flags); 142 raw_spin_lock_irqsave(&desc->lock, flags);
143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
144 if (iflags & IRQF_VALID) 144 if (iflags & IRQF_VALID)
145 desc->status &= ~IRQ_NOREQUEST; 145 desc->status &= ~IRQ_NOREQUEST;
@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
147 desc->status &= ~IRQ_NOPROBE; 147 desc->status &= ~IRQ_NOPROBE;
148 if (!(iflags & IRQF_NOAUTOEN)) 148 if (!(iflags & IRQF_NOAUTOEN))
149 desc->status &= ~IRQ_NOAUTOEN; 149 desc->status &= ~IRQ_NOAUTOEN;
150 spin_unlock_irqrestore(&desc->lock, flags); 150 raw_spin_unlock_irqrestore(&desc->lock, flags);
151} 151}
152 152
153void __init init_IRQ(void) 153void __init init_IRQ(void)
@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
166{ 166{
167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); 167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu);
168 168
169 spin_lock_irq(&desc->lock); 169 raw_spin_lock_irq(&desc->lock);
170 desc->chip->set_affinity(irq, cpumask_of(cpu)); 170 desc->chip->set_affinity(irq, cpumask_of(cpu));
171 spin_unlock_irq(&desc->lock); 171 raw_spin_unlock_irq(&desc->lock);
172} 172}
173 173
174/* 174/*
diff --git a/arch/arm/mach-at91/include/mach/atmel-mci.h b/arch/arm/mach-at91/include/mach/atmel-mci.h
new file mode 100644
index 000000000000..998cb0c07135
--- /dev/null
+++ b/arch/arm/mach-at91/include/mach/atmel-mci.h
@@ -0,0 +1,24 @@
1#ifndef __MACH_ATMEL_MCI_H
2#define __MACH_ATMEL_MCI_H
3
4#include <mach/at_hdmac.h>
5
6/**
7 * struct mci_dma_data - DMA data for MCI interface
8 */
9struct mci_dma_data {
10 struct at_dma_slave sdata;
11};
12
13/* accessor macros */
14#define slave_data_ptr(s) (&(s)->sdata)
15#define find_slave_dev(s) ((s)->sdata.dma_dev)
16
17#define setup_dma_addr(s, t, r) do { \
18 if (s) { \
19 (s)->sdata.tx_reg = (t); \
20 (s)->sdata.rx_reg = (r); \
21 } \
22} while (0)
23
24#endif /* __MACH_ATMEL_MCI_H */
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 8bf09ae5b347..f6c6196a51fa 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -52,6 +52,12 @@ config MACH_OPENRD_BASE
52 Say 'Y' here if you want your kernel to support the 52 Say 'Y' here if you want your kernel to support the
53 Marvell OpenRD Base Board. 53 Marvell OpenRD Base Board.
54 54
55config MACH_NETSPACE_V2
56 bool "LaCie Network Space v2 NAS Board"
57 help
58 Say 'Y' here if you want your kernel to support the
59 LaCie Network Space v2 NAS.
60
55endmenu 61endmenu
56 62
57endif 63endif
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 9f2f67b2b63d..d4d7f53b0fb9 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -8,5 +8,6 @@ obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
8obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 8obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
9obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 9obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
10obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o 10obj-$(CONFIG_MACH_OPENRD_BASE) += openrd_base-setup.o
11obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o
11 12
12obj-$(CONFIG_CPU_IDLE) += cpuidle.o 13obj-$(CONFIG_CPU_IDLE) += cpuidle.o
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
new file mode 100644
index 000000000000..9a064065bebe
--- /dev/null
+++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
@@ -0,0 +1,325 @@
1/*
2 * arch/arm/mach-kirkwood/netspace_v2-setup.c
3 *
4 * LaCie Network Space v2 board setup
5 *
6 * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
7 * Copyright (C) 2009 Benoît Canet <benoit.canet@gmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/kernel.h>
25#include <linux/init.h>
26#include <linux/platform_device.h>
27#include <linux/mtd/physmap.h>
28#include <linux/spi/flash.h>
29#include <linux/spi/spi.h>
30#include <linux/ata_platform.h>
31#include <linux/mv643xx_eth.h>
32#include <linux/i2c.h>
33#include <linux/i2c/at24.h>
34#include <linux/input.h>
35#include <linux/gpio.h>
36#include <linux/gpio_keys.h>
37#include <linux/leds.h>
38#include <asm/mach-types.h>
39#include <asm/mach/arch.h>
40#include <asm/mach/time.h>
41#include <mach/kirkwood.h>
42#include <plat/time.h>
43#include "common.h"
44#include "mpp.h"
45
46/*****************************************************************************
47 * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
48 ****************************************************************************/
49
50static struct mtd_partition netspace_v2_flash_parts[] = {
51 {
52 .name = "u-boot",
53 .size = MTDPART_SIZ_FULL,
54 .offset = 0,
55 .mask_flags = MTD_WRITEABLE, /* force read-only */
56 },
57};
58
59static const struct flash_platform_data netspace_v2_flash = {
60 .type = "mx25l4005a",
61 .name = "spi_flash",
62 .parts = netspace_v2_flash_parts,
63 .nr_parts = ARRAY_SIZE(netspace_v2_flash_parts),
64};
65
66static struct spi_board_info __initdata netspace_v2_spi_slave_info[] = {
67 {
68 .modalias = "m25p80",
69 .platform_data = &netspace_v2_flash,
70 .irq = -1,
71 .max_speed_hz = 20000000,
72 .bus_num = 0,
73 .chip_select = 0,
74 },
75};
76
77/*****************************************************************************
78 * Ethernet
79 ****************************************************************************/
80
81static struct mv643xx_eth_platform_data netspace_v2_ge00_data = {
82 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
83};
84
85/*****************************************************************************
86 * I2C devices
87 ****************************************************************************/
88
89static struct at24_platform_data at24c04 = {
90 .byte_len = SZ_4K / 8,
91 .page_size = 16,
92};
93
94/*
95 * i2c addr | chip | description
96 * 0x50 | HT24LC04 | eeprom (512B)
97 */
98
99static struct i2c_board_info __initdata netspace_v2_i2c_info[] = {
100 {
101 I2C_BOARD_INFO("24c04", 0x50),
102 .platform_data = &at24c04,
103 }
104};
105
106/*****************************************************************************
107 * SATA
108 ****************************************************************************/
109
110static struct mv_sata_platform_data netspace_v2_sata_data = {
111 .n_ports = 2,
112};
113
114#define NETSPACE_V2_GPIO_SATA0_POWER 16
115#define NETSPACE_V2_GPIO_SATA1_POWER 17
116
117static void __init netspace_v2_sata_power_init(void)
118{
119 int err;
120
121 err = gpio_request(NETSPACE_V2_GPIO_SATA0_POWER, "SATA0 power");
122 if (err == 0) {
123 err = gpio_direction_output(NETSPACE_V2_GPIO_SATA0_POWER, 1);
124 if (err)
125 gpio_free(NETSPACE_V2_GPIO_SATA0_POWER);
126 }
127 if (err)
128 pr_err("netspace_v2: failed to setup SATA0 power\n");
129}
130
131/*****************************************************************************
132 * GPIO keys
133 ****************************************************************************/
134
135#define NETSPACE_V2_PUSH_BUTTON 32
136
137static struct gpio_keys_button netspace_v2_buttons[] = {
138 [0] = {
139 .code = KEY_POWER,
140 .gpio = NETSPACE_V2_PUSH_BUTTON,
141 .desc = "Power push button",
142 .active_low = 0,
143 },
144};
145
146static struct gpio_keys_platform_data netspace_v2_button_data = {
147 .buttons = netspace_v2_buttons,
148 .nbuttons = ARRAY_SIZE(netspace_v2_buttons),
149};
150
151static struct platform_device netspace_v2_gpio_buttons = {
152 .name = "gpio-keys",
153 .id = -1,
154 .dev = {
155 .platform_data = &netspace_v2_button_data,
156 },
157};
158
159/*****************************************************************************
160 * GPIO LEDs
161 ****************************************************************************/
162
163/*
164 * The blue front LED is wired to a CPLD and can blink in relation with the
165 * SATA activity.
166 *
167 * The following array detail the different LED registers and the combination
168 * of their possible values:
169 *
170 * cmd_led | slow_led | /SATA active | LED state
171 * | | |
172 * 1 | 0 | x | off
173 * - | 1 | x | on
174 * 0 | 0 | 1 | on
175 * 0 | 0 | 0 | blink (rate 300ms)
176 */
177
178#define NETSPACE_V2_GPIO_RED_LED 12
179#define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29
180#define NETSPACE_V2_GPIO_BLUE_LED_CMD 30
181
182
183static struct gpio_led netspace_v2_gpio_led_pins[] = {
184 {
185 .name = "ns_v2:red:fail",
186 .gpio = NETSPACE_V2_GPIO_RED_LED,
187 },
188};
189
190static struct gpio_led_platform_data netspace_v2_gpio_leds_data = {
191 .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins),
192 .leds = netspace_v2_gpio_led_pins,
193};
194
195static struct platform_device netspace_v2_gpio_leds = {
196 .name = "leds-gpio",
197 .id = -1,
198 .dev = {
199 .platform_data = &netspace_v2_gpio_leds_data,
200 },
201};
202
203static void __init netspace_v2_gpio_leds_init(void)
204{
205 platform_device_register(&netspace_v2_gpio_leds);
206
207 /*
208 * Configure the front blue LED to blink in relation with the SATA
209 * activity.
210 */
211 if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_SLOW,
212 "SATA blue LED slow") != 0)
213 return;
214 if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_SLOW, 0) != 0)
215 goto err_free_1;
216 if (gpio_request(NETSPACE_V2_GPIO_BLUE_LED_CMD,
217 "SATA blue LED command") != 0)
218 goto err_free_1;
219 if (gpio_direction_output(NETSPACE_V2_GPIO_BLUE_LED_CMD, 0) != 0)
220 goto err_free_2;
221
222 return;
223
224err_free_2:
225 gpio_free(NETSPACE_V2_GPIO_BLUE_LED_CMD);
226err_free_1:
227 gpio_free(NETSPACE_V2_GPIO_BLUE_LED_SLOW);
228 pr_err("netspace_v2: failed to configure SATA blue LED\n");
229}
230
231/*****************************************************************************
232 * Timer
233 ****************************************************************************/
234
235static void netspace_v2_timer_init(void)
236{
237 kirkwood_tclk = 166666667;
238 orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
239}
240
241struct sys_timer netspace_v2_timer = {
242 .init = netspace_v2_timer_init,
243};
244
245/*****************************************************************************
246 * General Setup
247 ****************************************************************************/
248
249static unsigned int netspace_v2_mpp_config[] __initdata = {
250 MPP0_SPI_SCn,
251 MPP1_SPI_MOSI,
252 MPP2_SPI_SCK,
253 MPP3_SPI_MISO,
254 MPP4_NF_IO6,
255 MPP5_NF_IO7,
256 MPP6_SYSRST_OUTn,
257 MPP8_TW_SDA,
258 MPP9_TW_SCK,
259 MPP10_UART0_TXD,
260 MPP11_UART0_RXD,
261 MPP12_GPO, /* Red led */
262 MPP14_GPIO, /* USB fuse */
263 MPP16_GPIO, /* SATA 0 power */
264 MPP18_NF_IO0,
265 MPP19_NF_IO1,
266 MPP20_SATA1_ACTn,
267 MPP21_SATA0_ACTn,
268 MPP24_GPIO, /* USB mode select */
269 MPP25_GPIO, /* Fan rotation fail */
270 MPP26_GPIO, /* USB device vbus */
271 MPP28_GPIO, /* USB enable host vbus */
272 MPP29_GPIO, /* Blue led (slow register) */
273 MPP30_GPIO, /* Blue led (command register) */
274 MPP31_GPIO, /* Board power off */
275 MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
276 0
277};
278
279#define NETSPACE_V2_GPIO_POWER_OFF 31
280
281static void netspace_v2_power_off(void)
282{
283 gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1);
284}
285
286static void __init netspace_v2_init(void)
287{
288 /*
289 * Basic setup. Needs to be called early.
290 */
291 kirkwood_init();
292 kirkwood_mpp_conf(netspace_v2_mpp_config);
293
294 netspace_v2_sata_power_init();
295
296 kirkwood_ehci_init();
297 kirkwood_ge00_init(&netspace_v2_ge00_data);
298 kirkwood_sata_init(&netspace_v2_sata_data);
299 kirkwood_uart0_init();
300 spi_register_board_info(netspace_v2_spi_slave_info,
301 ARRAY_SIZE(netspace_v2_spi_slave_info));
302 kirkwood_spi_init();
303 kirkwood_i2c_init();
304 i2c_register_board_info(0, netspace_v2_i2c_info,
305 ARRAY_SIZE(netspace_v2_i2c_info));
306
307 netspace_v2_gpio_leds_init();
308 platform_device_register(&netspace_v2_gpio_buttons);
309
310 if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 &&
311 gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0)
312 pm_power_off = netspace_v2_power_off;
313 else
314 pr_err("netspace_v2: failed to configure power-off GPIO\n");
315}
316
317MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
318 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
319 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
320 .boot_params = 0x00000100,
321 .init_machine = netspace_v2_init,
322 .map_io = kirkwood_map_io,
323 .init_irq = kirkwood_init_irq,
324 .timer = &netspace_v2_timer,
325MACHINE_END
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index feb0e54a91de..038f24d47023 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -66,7 +66,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
66 struct irqaction *action; 66 struct irqaction *action;
67 irqreturn_t action_ret; 67 irqreturn_t action_ret;
68 68
69 spin_lock(&desc->lock); 69 raw_spin_lock(&desc->lock);
70 70
71 BUG_ON(desc->status & IRQ_INPROGRESS); 71 BUG_ON(desc->status & IRQ_INPROGRESS);
72 72
@@ -78,7 +78,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
78 goto out_mask; 78 goto out_mask;
79 79
80 desc->status |= IRQ_INPROGRESS; 80 desc->status |= IRQ_INPROGRESS;
81 spin_unlock(&desc->lock); 81 raw_spin_unlock(&desc->lock);
82 82
83 action_ret = handle_IRQ_event(irq, action); 83 action_ret = handle_IRQ_event(irq, action);
84 84
@@ -87,7 +87,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
87 * Maybe this function should go to kernel/irq/chip.c? */ 87 * Maybe this function should go to kernel/irq/chip.c? */
88 note_interrupt(irq, desc, action_ret); 88 note_interrupt(irq, desc, action_ret);
89 89
90 spin_lock(&desc->lock); 90 raw_spin_lock(&desc->lock);
91 desc->status &= ~IRQ_INPROGRESS; 91 desc->status &= ~IRQ_INPROGRESS;
92 92
93 if (desc->status & IRQ_DISABLED) 93 if (desc->status & IRQ_DISABLED)
@@ -97,7 +97,7 @@ out_mask:
97 /* ack unconditionally to unmask lower prio irqs */ 97 /* ack unconditionally to unmask lower prio irqs */
98 desc->chip->ack(irq); 98 desc->chip->ack(irq);
99 99
100 spin_unlock(&desc->lock); 100 raw_spin_unlock(&desc->lock);
101} 101}
102#define handle_irq handle_prio_irq 102#define handle_irq handle_prio_irq
103#endif 103#endif
diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index f76d6ff4aeb9..0b4a3a03071f 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -268,6 +268,9 @@ struct pcf50633_platform_data gta02_pcf_pdata = {
268 268
269 .batteries = gta02_batteries, 269 .batteries = gta02_batteries,
270 .num_batteries = ARRAY_SIZE(gta02_batteries), 270 .num_batteries = ARRAY_SIZE(gta02_batteries),
271
272 .charger_reference_current_ma = 1000,
273
271 .reg_init_data = { 274 .reg_init_data = {
272 [PCF50633_REGULATOR_AUTO] = { 275 [PCF50633_REGULATOR_AUTO] = {
273 .constraints = { 276 .constraints = {
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 5485c821101c..395cc90c6613 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -254,10 +254,9 @@ __pj4_v6_proc_info:
254 .long 0x560f5810 254 .long 0x560f5810
255 .long 0xff0ffff0 255 .long 0xff0ffff0
256 .long PMD_TYPE_SECT | \ 256 .long PMD_TYPE_SECT | \
257 PMD_SECT_BUFFERABLE | \
258 PMD_SECT_CACHEABLE | \
259 PMD_SECT_AP_WRITE | \ 257 PMD_SECT_AP_WRITE | \
260 PMD_SECT_AP_READ 258 PMD_SECT_AP_READ | \
259 PMD_FLAGS
261 .long PMD_TYPE_SECT | \ 260 .long PMD_TYPE_SECT | \
262 PMD_SECT_XN | \ 261 PMD_SECT_XN | \
263 PMD_SECT_AP_WRITE | \ 262 PMD_SECT_AP_WRITE | \
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 6c768b71ad64..53fcef7c5201 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -293,7 +293,7 @@ static int fpga_resume_noirq(struct device *dev)
293 return 0; 293 return 0;
294} 294}
295 295
296static struct dev_pm_ops fpga_dev_pm_ops = { 296static const struct dev_pm_ops fpga_dev_pm_ops = {
297 .suspend_noirq = fpga_suspend_noirq, 297 .suspend_noirq = fpga_suspend_noirq,
298 .resume_noirq = fpga_resume_noirq, 298 .resume_noirq = fpga_resume_noirq,
299}; 299};
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 055160e0620e..04846811d0aa 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1431,7 +1431,7 @@ static int omap_mpuio_resume_noirq(struct device *dev)
1431 return 0; 1431 return 0;
1432} 1432}
1433 1433
1434static struct dev_pm_ops omap_mpuio_dev_pm_ops = { 1434static const struct dev_pm_ops omap_mpuio_dev_pm_ops = {
1435 .suspend_noirq = omap_mpuio_suspend_noirq, 1435 .suspend_noirq = omap_mpuio_suspend_noirq,
1436 .resume_noirq = omap_mpuio_resume_noirq, 1436 .resume_noirq = omap_mpuio_resume_noirq,
1437}; 1437};
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 07b976da6174..c3a74ce24ef6 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Wed Nov 25 22:14:58 2009 15# Last update: Wed Dec 16 20:06:34 2009
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1776,6 +1776,7 @@ cybook3 MACH_CYBOOK3 CYBOOK3 1784
1776wdg002 MACH_WDG002 WDG002 1785 1776wdg002 MACH_WDG002 WDG002 1785
1777sg560adsl MACH_SG560ADSL SG560ADSL 1786 1777sg560adsl MACH_SG560ADSL SG560ADSL 1786
1778nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787 1778nextio_n2800_ica MACH_NEXTIO_N2800_ICA NEXTIO_N2800_ICA 1787
1779dove_db MACH_DOVE_DB DOVE_DB 1788
1779marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789 1780marvell_newdb MACH_MARVELL_NEWDB MARVELL_NEWDB 1789
1780vandihud MACH_VANDIHUD VANDIHUD 1790 1781vandihud MACH_VANDIHUD VANDIHUD 1790
1781magx_e8 MACH_MAGX_E8 MAGX_E8 1791 1782magx_e8 MACH_MAGX_E8 MAGX_E8 1791
@@ -2536,3 +2537,44 @@ c3ax03 MACH_C3AX03 C3AX03 2549
2536mxt_td60 MACH_MXT_TD60 MXT_TD60 2550 2537mxt_td60 MACH_MXT_TD60 MXT_TD60 2550
2537esyx MACH_ESYX ESYX 2551 2538esyx MACH_ESYX ESYX 2551
2538bulldog MACH_BULLDOG BULLDOG 2553 2539bulldog MACH_BULLDOG BULLDOG 2553
2540derell_me2000 MACH_DERELL_ME2000 DERELL_ME2000 2554
2541bcmring_base MACH_BCMRING_BASE BCMRING_BASE 2555
2542bcmring_evm MACH_BCMRING_EVM BCMRING_EVM 2556
2543bcmring_evm_jazz MACH_BCMRING_EVM_JAZZ BCMRING_EVM_JAZZ 2557
2544bcmring_sp MACH_BCMRING_SP BCMRING_SP 2558
2545bcmring_sv MACH_BCMRING_SV BCMRING_SV 2559
2546bcmring_sv_jazz MACH_BCMRING_SV_JAZZ BCMRING_SV_JAZZ 2560
2547bcmring_tablet MACH_BCMRING_TABLET BCMRING_TABLET 2561
2548bcmring_vp MACH_BCMRING_VP BCMRING_VP 2562
2549bcmring_evm_seikor MACH_BCMRING_EVM_SEIKOR BCMRING_EVM_SEIKOR 2563
2550bcmring_sp_wqvga MACH_BCMRING_SP_WQVGA BCMRING_SP_WQVGA 2564
2551bcmring_custom MACH_BCMRING_CUSTOM BCMRING_CUSTOM 2565
2552acer_s200 MACH_ACER_S200 ACER_S200 2566
2553bt270 MACH_BT270 BT270 2567
2554iseo MACH_ISEO ISEO 2568
2555cezanne MACH_CEZANNE CEZANNE 2569
2556lucca MACH_LUCCA LUCCA 2570
2557supersmart MACH_SUPERSMART SUPERSMART 2571
2558magnolia2 MACH_MAGNOLIA2 MAGNOLIA2 2573
2559emxx MACH_EMXX EMXX 2574
2560outlaw MACH_OUTLAW OUTLAW 2575
2561riot_bei2 MACH_RIOT_BEI2 RIOT_BEI2 2576
2562riot_vox MACH_RIOT_VOX RIOT_VOX 2577
2563riot_x37 MACH_RIOT_X37 RIOT_X37 2578
2564mega25mx MACH_MEGA25MX MEGA25MX 2579
2565benzina2 MACH_BENZINA2 BENZINA2 2580
2566ignite MACH_IGNITE IGNITE 2581
2567foggia MACH_FOGGIA FOGGIA 2582
2568arezzo MACH_AREZZO AREZZO 2583
2569leica_skywalker MACH_LEICA_SKYWALKER LEICA_SKYWALKER 2584
2570jacinto2_jamr MACH_JACINTO2_JAMR JACINTO2_JAMR 2585
2571gts_nova MACH_GTS_NOVA GTS_NOVA 2586
2572p3600 MACH_P3600 P3600 2587
2573dlt2 MACH_DLT2 DLT2 2588
2574df3120 MACH_DF3120 DF3120 2589
2575ecucore_9g20 MACH_ECUCORE_9G20 ECUCORE_9G20 2590
2576nautel_lpc3240 MACH_NAUTEL_LPC3240 NAUTEL_LPC3240 2591
2577glacier MACH_GLACIER GLACIER 2592
2578phrazer_bulldog MACH_PHRAZER_BULLDOG PHRAZER_BULLDOG 2593
2579omap3_bulldog MACH_OMAP3_BULLDOG OMAP3_BULLDOG 2594
2580pca101 MACH_PCA101 PCA101 2595