diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 13:30:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-12 13:30:49 -0500 |
commit | a0a6da1a735ba66c04019b39cca8f79008d6c434 (patch) | |
tree | b3f3a3266ae09fdb2a3d24bb26faa4cb286eefa2 /arch/arm | |
parent | 7803c05429c7ca4e62fc3468791b7da224866305 (diff) | |
parent | 9395f6ea3c61d80ccc7a13668d27afbb8d9436ba (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: GIC: don't disable software generated interrupts
ARM: 6472/1: vexpress ct-ca9x4: only set twd_base if local timers are being used
ARM: arch/arm/kernel/traps.c: Convert sprintf_symbol to %pS
ARM: arch/arm/kernel/hw_breakpoint.c: Convert WARN_ON to WARN
ARM: 6462/1: EP93xx: Document DMA M2P API
ARM: 6470/1: atomic64: use generic implementation for OABI configurations
ARM: 6469/1: perf-events: squash compiler warning
ARM: 6468/1: backtrace: fix calculation of thread stack base
ARM: Fix DMA coherent allocator alignment
ARM: orion5x/kirkwood/mv78xx0: fix MPP configuration corner cases
[ARM] TS-78xxx NAND resource type should be IORESOURCE_MEM
ARM: pxa/saar: fix the building failure caused by typo
ARM: pxa/cm-x2xx: remove duplicate call to pxa27x_init_irq
ARM: pxa: fix the missing definition of IRQ_BOARD_END
ARM: mmp: fix cpuid detection on mmp2
[ARM] Kirkwood: restrict the scope of the PCIe reset workaround
[ARM] Kirkwood: fix timer initialization for LaCie boards
[ARM] Kirkwood: enhance TCLK detection
Diffstat (limited to 'arch/arm')
27 files changed, 168 insertions, 71 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a19a5266d5fc..8ae3d48d504c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -6,7 +6,7 @@ config ARM | |||
6 | select HAVE_MEMBLOCK | 6 | select HAVE_MEMBLOCK |
7 | select RTC_LIB | 7 | select RTC_LIB |
8 | select SYS_SUPPORTS_APM_EMULATION | 8 | select SYS_SUPPORTS_APM_EMULATION |
9 | select GENERIC_ATOMIC64 if (!CPU_32v6K) | 9 | select GENERIC_ATOMIC64 if (!CPU_32v6K || !AEABI) |
10 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) | 10 | select HAVE_OPROFILE if (HAVE_PERF_EVENTS) |
11 | select HAVE_ARCH_KGDB | 11 | select HAVE_ARCH_KGDB |
12 | select HAVE_KPROBES if (!XIP_KERNEL) | 12 | select HAVE_KPROBES if (!XIP_KERNEL) |
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index ada6359160eb..772f95f1aecd 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -251,15 +251,16 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, | |||
251 | writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); | 251 | writel(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); |
252 | 252 | ||
253 | /* | 253 | /* |
254 | * Set priority on all interrupts. | 254 | * Set priority on all global interrupts. |
255 | */ | 255 | */ |
256 | for (i = 0; i < max_irq; i += 4) | 256 | for (i = 32; i < max_irq; i += 4) |
257 | writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4); | 257 | writel(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4); |
258 | 258 | ||
259 | /* | 259 | /* |
260 | * Disable all interrupts. | 260 | * Disable all interrupts. Leave the PPI and SGIs alone |
261 | * as these enables are banked registers. | ||
261 | */ | 262 | */ |
262 | for (i = 0; i < max_irq; i += 32) | 263 | for (i = 32; i < max_irq; i += 32) |
263 | writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32); | 264 | writel(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32); |
264 | 265 | ||
265 | /* | 266 | /* |
@@ -277,11 +278,30 @@ void __init gic_dist_init(unsigned int gic_nr, void __iomem *base, | |||
277 | 278 | ||
278 | void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base) | 279 | void __cpuinit gic_cpu_init(unsigned int gic_nr, void __iomem *base) |
279 | { | 280 | { |
281 | void __iomem *dist_base; | ||
282 | int i; | ||
283 | |||
280 | if (gic_nr >= MAX_GIC_NR) | 284 | if (gic_nr >= MAX_GIC_NR) |
281 | BUG(); | 285 | BUG(); |
282 | 286 | ||
287 | dist_base = gic_data[gic_nr].dist_base; | ||
288 | BUG_ON(!dist_base); | ||
289 | |||
283 | gic_data[gic_nr].cpu_base = base; | 290 | gic_data[gic_nr].cpu_base = base; |
284 | 291 | ||
292 | /* | ||
293 | * Deal with the banked PPI and SGI interrupts - disable all | ||
294 | * PPI interrupts, ensure all SGI interrupts are enabled. | ||
295 | */ | ||
296 | writel(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); | ||
297 | writel(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); | ||
298 | |||
299 | /* | ||
300 | * Set priority on PPI and SGI interrupts | ||
301 | */ | ||
302 | for (i = 0; i < 32; i += 4) | ||
303 | writel(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); | ||
304 | |||
285 | writel(0xf0, base + GIC_CPU_PRIMASK); | 305 | writel(0xf0, base + GIC_CPU_PRIMASK); |
286 | writel(1, base + GIC_CPU_CTRL); | 306 | writel(1, base + GIC_CPU_CTRL); |
287 | } | 307 | } |
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index 6700c7fc7ebd..21fa272301f8 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
@@ -75,7 +75,7 @@ extern unsigned long it8152_base_address; | |||
75 | IT8152_PD_IRQ(1) USB (USBR) | 75 | IT8152_PD_IRQ(1) USB (USBR) |
76 | IT8152_PD_IRQ(0) Audio controller (ACR) | 76 | IT8152_PD_IRQ(0) Audio controller (ACR) |
77 | */ | 77 | */ |
78 | #define IT8152_IRQ(x) (IRQ_BOARD_END + (x)) | 78 | #define IT8152_IRQ(x) (IRQ_BOARD_START + (x)) |
79 | 79 | ||
80 | /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */ | 80 | /* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */ |
81 | #define IT8152_LD_IRQ_COUNT 9 | 81 | #define IT8152_LD_IRQ_COUNT 9 |
diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c index 54593b0c241b..21e3a4ab3b8c 100644 --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c | |||
@@ -748,8 +748,7 @@ static int hw_breakpoint_pending(unsigned long addr, unsigned int fsr, | |||
748 | breakpoint_handler(addr, regs); | 748 | breakpoint_handler(addr, regs); |
749 | break; | 749 | break; |
750 | case ARM_ENTRY_ASYNC_WATCHPOINT: | 750 | case ARM_ENTRY_ASYNC_WATCHPOINT: |
751 | WARN_ON("Asynchronous watchpoint exception taken. " | 751 | WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n"); |
752 | "Debugging results may be unreliable"); | ||
753 | case ARM_ENTRY_SYNC_WATCHPOINT: | 752 | case ARM_ENTRY_SYNC_WATCHPOINT: |
754 | watchpoint_handler(addr, regs); | 753 | watchpoint_handler(addr, regs); |
755 | break; | 754 | break; |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 49643b1467e6..07a50357492a 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -1749,7 +1749,7 @@ static inline int armv7_pmnc_has_overflowed(unsigned long pmnc) | |||
1749 | static inline int armv7_pmnc_counter_has_overflowed(unsigned long pmnc, | 1749 | static inline int armv7_pmnc_counter_has_overflowed(unsigned long pmnc, |
1750 | enum armv7_counters counter) | 1750 | enum armv7_counters counter) |
1751 | { | 1751 | { |
1752 | int ret; | 1752 | int ret = 0; |
1753 | 1753 | ||
1754 | if (counter == ARMV7_CYCLE_COUNTER) | 1754 | if (counter == ARMV7_CYCLE_COUNTER) |
1755 | ret = pmnc & ARMV7_FLAG_C; | 1755 | ret = pmnc & ARMV7_FLAG_C; |
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index 20b7411e47fd..c2e112e1a05f 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c | |||
@@ -28,7 +28,7 @@ int notrace unwind_frame(struct stackframe *frame) | |||
28 | 28 | ||
29 | /* only go to a higher address on the stack */ | 29 | /* only go to a higher address on the stack */ |
30 | low = frame->sp; | 30 | low = frame->sp; |
31 | high = ALIGN(low, THREAD_SIZE) + THREAD_SIZE; | 31 | high = ALIGN(low, THREAD_SIZE); |
32 | 32 | ||
33 | /* check current frame pointer is within bounds */ | 33 | /* check current frame pointer is within bounds */ |
34 | if (fp < (low + 12) || fp + 4 >= high) | 34 | if (fp < (low + 12) || fp + 4 >= high) |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index cda78d59aa31..446aee97436f 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -53,10 +53,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long); | |||
53 | void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) | 53 | void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) |
54 | { | 54 | { |
55 | #ifdef CONFIG_KALLSYMS | 55 | #ifdef CONFIG_KALLSYMS |
56 | char sym1[KSYM_SYMBOL_LEN], sym2[KSYM_SYMBOL_LEN]; | 56 | printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); |
57 | sprint_symbol(sym1, where); | ||
58 | sprint_symbol(sym2, from); | ||
59 | printk("[<%08lx>] (%s) from [<%08lx>] (%s)\n", where, sym1, from, sym2); | ||
60 | #else | 57 | #else |
61 | printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); | 58 | printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); |
62 | #endif | 59 | #endif |
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 2a161765f6d5..d2cb0b3c9872 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c | |||
@@ -279,7 +279,7 @@ int unwind_frame(struct stackframe *frame) | |||
279 | 279 | ||
280 | /* only go to a higher address on the stack */ | 280 | /* only go to a higher address on the stack */ |
281 | low = frame->sp; | 281 | low = frame->sp; |
282 | high = ALIGN(low, THREAD_SIZE) + THREAD_SIZE; | 282 | high = ALIGN(low, THREAD_SIZE); |
283 | 283 | ||
284 | pr_debug("%s(pc = %08lx lr = %08lx sp = %08lx)\n", __func__, | 284 | pr_debug("%s(pc = %08lx lr = %08lx sp = %08lx)\n", __func__, |
285 | frame->pc, frame->lr, frame->sp); | 285 | frame->pc, frame->lr, frame->sp); |
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h index 3a5961d3f3b1..5e31b2b25da9 100644 --- a/arch/arm/mach-ep93xx/include/mach/dma.h +++ b/arch/arm/mach-ep93xx/include/mach/dma.h | |||
@@ -1,5 +1,13 @@ | |||
1 | /* | 1 | /** |
2 | * arch/arm/mach-ep93xx/include/mach/dma.h | 2 | * DOC: EP93xx DMA M2P memory to peripheral and peripheral to memory engine |
3 | * | ||
4 | * The EP93xx DMA M2P subsystem handles DMA transfers between memory and | ||
5 | * peripherals. DMA M2P channels are available for audio, UARTs and IrDA. | ||
6 | * See chapter 10 of the EP93xx users guide for full details on the DMA M2P | ||
7 | * engine. | ||
8 | * | ||
9 | * See sound/soc/ep93xx/ep93xx-pcm.c for an example use of the DMA M2P code. | ||
10 | * | ||
3 | */ | 11 | */ |
4 | 12 | ||
5 | #ifndef __ASM_ARCH_DMA_H | 13 | #ifndef __ASM_ARCH_DMA_H |
@@ -8,12 +16,34 @@ | |||
8 | #include <linux/list.h> | 16 | #include <linux/list.h> |
9 | #include <linux/types.h> | 17 | #include <linux/types.h> |
10 | 18 | ||
19 | /** | ||
20 | * struct ep93xx_dma_buffer - Information about a buffer to be transferred | ||
21 | * using the DMA M2P engine | ||
22 | * | ||
23 | * @list: Entry in DMA buffer list | ||
24 | * @bus_addr: Physical address of the buffer | ||
25 | * @size: Size of the buffer in bytes | ||
26 | */ | ||
11 | struct ep93xx_dma_buffer { | 27 | struct ep93xx_dma_buffer { |
12 | struct list_head list; | 28 | struct list_head list; |
13 | u32 bus_addr; | 29 | u32 bus_addr; |
14 | u16 size; | 30 | u16 size; |
15 | }; | 31 | }; |
16 | 32 | ||
33 | /** | ||
34 | * struct ep93xx_dma_m2p_client - Information about a DMA M2P client | ||
35 | * | ||
36 | * @name: Unique name for this client | ||
37 | * @flags: Client flags | ||
38 | * @cookie: User data to pass to callback functions | ||
39 | * @buffer_started: Non NULL function to call when a transfer is started. | ||
40 | * The arguments are the user data cookie and the DMA | ||
41 | * buffer which is starting. | ||
42 | * @buffer_finished: Non NULL function to call when a transfer is completed. | ||
43 | * The arguments are the user data cookie, the DMA buffer | ||
44 | * which has completed, and a boolean flag indicating if | ||
45 | * the transfer had an error. | ||
46 | */ | ||
17 | struct ep93xx_dma_m2p_client { | 47 | struct ep93xx_dma_m2p_client { |
18 | char *name; | 48 | char *name; |
19 | u8 flags; | 49 | u8 flags; |
@@ -24,10 +54,11 @@ struct ep93xx_dma_m2p_client { | |||
24 | struct ep93xx_dma_buffer *buf, | 54 | struct ep93xx_dma_buffer *buf, |
25 | int bytes, int error); | 55 | int bytes, int error); |
26 | 56 | ||
27 | /* Internal to the DMA code. */ | 57 | /* private: Internal use only */ |
28 | void *channel; | 58 | void *channel; |
29 | }; | 59 | }; |
30 | 60 | ||
61 | /* DMA M2P ports */ | ||
31 | #define EP93XX_DMA_M2P_PORT_I2S1 0x00 | 62 | #define EP93XX_DMA_M2P_PORT_I2S1 0x00 |
32 | #define EP93XX_DMA_M2P_PORT_I2S2 0x01 | 63 | #define EP93XX_DMA_M2P_PORT_I2S2 0x01 |
33 | #define EP93XX_DMA_M2P_PORT_AAC1 0x02 | 64 | #define EP93XX_DMA_M2P_PORT_AAC1 0x02 |
@@ -39,18 +70,80 @@ struct ep93xx_dma_m2p_client { | |||
39 | #define EP93XX_DMA_M2P_PORT_UART3 0x08 | 70 | #define EP93XX_DMA_M2P_PORT_UART3 0x08 |
40 | #define EP93XX_DMA_M2P_PORT_IRDA 0x09 | 71 | #define EP93XX_DMA_M2P_PORT_IRDA 0x09 |
41 | #define EP93XX_DMA_M2P_PORT_MASK 0x0f | 72 | #define EP93XX_DMA_M2P_PORT_MASK 0x0f |
42 | #define EP93XX_DMA_M2P_TX 0x00 | ||
43 | #define EP93XX_DMA_M2P_RX 0x10 | ||
44 | #define EP93XX_DMA_M2P_ABORT_ON_ERROR 0x20 | ||
45 | #define EP93XX_DMA_M2P_IGNORE_ERROR 0x40 | ||
46 | #define EP93XX_DMA_M2P_ERROR_MASK 0x60 | ||
47 | 73 | ||
48 | int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p); | 74 | /* DMA M2P client flags */ |
75 | #define EP93XX_DMA_M2P_TX 0x00 /* Memory to peripheral */ | ||
76 | #define EP93XX_DMA_M2P_RX 0x10 /* Peripheral to memory */ | ||
77 | |||
78 | /* | ||
79 | * DMA M2P client error handling flags. See the EP93xx users guide | ||
80 | * documentation on the DMA M2P CONTROL register for more details | ||
81 | */ | ||
82 | #define EP93XX_DMA_M2P_ABORT_ON_ERROR 0x20 /* Abort on peripheral error */ | ||
83 | #define EP93XX_DMA_M2P_IGNORE_ERROR 0x40 /* Ignore peripheral errors */ | ||
84 | #define EP93XX_DMA_M2P_ERROR_MASK 0x60 /* Mask of error bits */ | ||
85 | |||
86 | /** | ||
87 | * ep93xx_dma_m2p_client_register - Register a client with the DMA M2P | ||
88 | * subsystem | ||
89 | * | ||
90 | * @m2p: Client information to register | ||
91 | * returns 0 on success | ||
92 | * | ||
93 | * The DMA M2P subsystem allocates a channel and an interrupt line for the DMA | ||
94 | * client | ||
95 | */ | ||
96 | int ep93xx_dma_m2p_client_register(struct ep93xx_dma_m2p_client *m2p); | ||
97 | |||
98 | /** | ||
99 | * ep93xx_dma_m2p_client_unregister - Unregister a client from the DMA M2P | ||
100 | * subsystem | ||
101 | * | ||
102 | * @m2p: Client to unregister | ||
103 | * | ||
104 | * Any transfers currently in progress will be completed in hardware, but | ||
105 | * ignored in software. | ||
106 | */ | ||
49 | void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p); | 107 | void ep93xx_dma_m2p_client_unregister(struct ep93xx_dma_m2p_client *m2p); |
108 | |||
109 | /** | ||
110 | * ep93xx_dma_m2p_submit - Submit a DMA M2P transfer | ||
111 | * | ||
112 | * @m2p: DMA Client to submit the transfer on | ||
113 | * @buf: DMA Buffer to submit | ||
114 | * | ||
115 | * If the current or next transfer positions are free on the M2P client then | ||
116 | * the transfer is started immediately. If not, the transfer is added to the | ||
117 | * list of pending transfers. This function must not be called from the | ||
118 | * buffer_finished callback for an M2P channel. | ||
119 | * | ||
120 | */ | ||
50 | void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p, | 121 | void ep93xx_dma_m2p_submit(struct ep93xx_dma_m2p_client *m2p, |
51 | struct ep93xx_dma_buffer *buf); | 122 | struct ep93xx_dma_buffer *buf); |
123 | |||
124 | /** | ||
125 | * ep93xx_dma_m2p_submit_recursive - Put a DMA transfer on the pending list | ||
126 | * for an M2P channel | ||
127 | * | ||
128 | * @m2p: DMA Client to submit the transfer on | ||
129 | * @buf: DMA Buffer to submit | ||
130 | * | ||
131 | * This function must only be called from the buffer_finished callback for an | ||
132 | * M2P channel. It is commonly used to add the next transfer in a chained list | ||
133 | * of DMA transfers. | ||
134 | */ | ||
52 | void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p, | 135 | void ep93xx_dma_m2p_submit_recursive(struct ep93xx_dma_m2p_client *m2p, |
53 | struct ep93xx_dma_buffer *buf); | 136 | struct ep93xx_dma_buffer *buf); |
137 | |||
138 | /** | ||
139 | * ep93xx_dma_m2p_flush - Flush all pending transfers on a DMA M2P client | ||
140 | * | ||
141 | * @m2p: DMA client to flush transfers on | ||
142 | * | ||
143 | * Any transfers currently in progress will be completed in hardware, but | ||
144 | * ignored in software. | ||
145 | * | ||
146 | */ | ||
54 | void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p); | 147 | void ep93xx_dma_m2p_flush(struct ep93xx_dma_m2p_client *m2p); |
55 | 148 | ||
56 | #endif /* __ASM_ARCH_DMA_H */ | 149 | #endif /* __ASM_ARCH_DMA_H */ |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 51ff23b72d3a..3688123b5ad8 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -854,10 +854,9 @@ int __init kirkwood_find_tclk(void) | |||
854 | 854 | ||
855 | kirkwood_pcie_id(&dev, &rev); | 855 | kirkwood_pcie_id(&dev, &rev); |
856 | 856 | ||
857 | if ((dev == MV88F6281_DEV_ID && (rev == MV88F6281_REV_A0 || | 857 | if (dev == MV88F6281_DEV_ID || dev == MV88F6282_DEV_ID) |
858 | rev == MV88F6281_REV_A1)) || | 858 | if (((readl(SAMPLE_AT_RESET) >> 21) & 1) == 0) |
859 | (dev == MV88F6282_DEV_ID)) | 859 | return 200000000; |
860 | return 200000000; | ||
861 | 860 | ||
862 | return 166666667; | 861 | return 166666667; |
863 | } | 862 | } |
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c index 4aa86e4a152c..a31c9499ab36 100644 --- a/arch/arm/mach-kirkwood/d2net_v2-setup.c +++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c | |||
@@ -225,5 +225,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") | |||
225 | .init_machine = d2net_v2_init, | 225 | .init_machine = d2net_v2_init, |
226 | .map_io = kirkwood_map_io, | 226 | .map_io = kirkwood_map_io, |
227 | .init_irq = kirkwood_init_irq, | 227 | .init_irq = kirkwood_init_irq, |
228 | .timer = &lacie_v2_timer, | 228 | .timer = &kirkwood_timer, |
229 | MACHINE_END | 229 | MACHINE_END |
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c index d3ea1b6c8a02..285edab776e9 100644 --- a/arch/arm/mach-kirkwood/lacie_v2-common.c +++ b/arch/arm/mach-kirkwood/lacie_v2-common.c | |||
@@ -111,17 +111,3 @@ void __init lacie_v2_hdd_power_init(int hdd_num) | |||
111 | pr_err("Failed to power up HDD%d\n", i + 1); | 111 | pr_err("Failed to power up HDD%d\n", i + 1); |
112 | } | 112 | } |
113 | } | 113 | } |
114 | |||
115 | /***************************************************************************** | ||
116 | * Timer | ||
117 | ****************************************************************************/ | ||
118 | |||
119 | static void lacie_v2_timer_init(void) | ||
120 | { | ||
121 | kirkwood_tclk = 166666667; | ||
122 | orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); | ||
123 | } | ||
124 | |||
125 | struct sys_timer lacie_v2_timer = { | ||
126 | .init = lacie_v2_timer_init, | ||
127 | }; | ||
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.h b/arch/arm/mach-kirkwood/lacie_v2-common.h index af521315b87b..fc64f578536e 100644 --- a/arch/arm/mach-kirkwood/lacie_v2-common.h +++ b/arch/arm/mach-kirkwood/lacie_v2-common.h | |||
@@ -13,6 +13,4 @@ void lacie_v2_register_flash(void); | |||
13 | void lacie_v2_register_i2c_devices(void); | 13 | void lacie_v2_register_i2c_devices(void); |
14 | void lacie_v2_hdd_power_init(int hdd_num); | 14 | void lacie_v2_hdd_power_init(int hdd_num); |
15 | 15 | ||
16 | extern struct sys_timer lacie_v2_timer; | ||
17 | |||
18 | #endif | 16 | #endif |
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c index 065187d177c6..27901f702feb 100644 --- a/arch/arm/mach-kirkwood/mpp.c +++ b/arch/arm/mach-kirkwood/mpp.c | |||
@@ -59,7 +59,7 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list) | |||
59 | } | 59 | } |
60 | printk("\n"); | 60 | printk("\n"); |
61 | 61 | ||
62 | while (*mpp_list) { | 62 | for ( ; *mpp_list; mpp_list++) { |
63 | unsigned int num = MPP_NUM(*mpp_list); | 63 | unsigned int num = MPP_NUM(*mpp_list); |
64 | unsigned int sel = MPP_SEL(*mpp_list); | 64 | unsigned int sel = MPP_SEL(*mpp_list); |
65 | int shift, gpio_mode; | 65 | int shift, gpio_mode; |
@@ -88,8 +88,6 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list) | |||
88 | if (sel != 0) | 88 | if (sel != 0) |
89 | gpio_mode = 0; | 89 | gpio_mode = 0; |
90 | orion_gpio_set_valid(num, gpio_mode); | 90 | orion_gpio_set_valid(num, gpio_mode); |
91 | |||
92 | mpp_list++; | ||
93 | } | 91 | } |
94 | 92 | ||
95 | printk(KERN_DEBUG " final MPP regs:"); | 93 | printk(KERN_DEBUG " final MPP regs:"); |
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c index 5ea66f1f4178..65ee21fd2f3b 100644 --- a/arch/arm/mach-kirkwood/netspace_v2-setup.c +++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c | |||
@@ -262,7 +262,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") | |||
262 | .init_machine = netspace_v2_init, | 262 | .init_machine = netspace_v2_init, |
263 | .map_io = kirkwood_map_io, | 263 | .map_io = kirkwood_map_io, |
264 | .init_irq = kirkwood_init_irq, | 264 | .init_irq = kirkwood_init_irq, |
265 | .timer = &lacie_v2_timer, | 265 | .timer = &kirkwood_timer, |
266 | MACHINE_END | 266 | MACHINE_END |
267 | #endif | 267 | #endif |
268 | 268 | ||
@@ -272,7 +272,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") | |||
272 | .init_machine = netspace_v2_init, | 272 | .init_machine = netspace_v2_init, |
273 | .map_io = kirkwood_map_io, | 273 | .map_io = kirkwood_map_io, |
274 | .init_irq = kirkwood_init_irq, | 274 | .init_irq = kirkwood_init_irq, |
275 | .timer = &lacie_v2_timer, | 275 | .timer = &kirkwood_timer, |
276 | MACHINE_END | 276 | MACHINE_END |
277 | #endif | 277 | #endif |
278 | 278 | ||
@@ -282,6 +282,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") | |||
282 | .init_machine = netspace_v2_init, | 282 | .init_machine = netspace_v2_init, |
283 | .map_io = kirkwood_map_io, | 283 | .map_io = kirkwood_map_io, |
284 | .init_irq = kirkwood_init_irq, | 284 | .init_irq = kirkwood_init_irq, |
285 | .timer = &lacie_v2_timer, | 285 | .timer = &kirkwood_timer, |
286 | MACHINE_END | 286 | MACHINE_END |
287 | #endif | 287 | #endif |
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c index a1b45d501aef..93afd3c8bfd8 100644 --- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c +++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c | |||
@@ -403,7 +403,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") | |||
403 | .init_machine = netxbig_v2_init, | 403 | .init_machine = netxbig_v2_init, |
404 | .map_io = kirkwood_map_io, | 404 | .map_io = kirkwood_map_io, |
405 | .init_irq = kirkwood_init_irq, | 405 | .init_irq = kirkwood_init_irq, |
406 | .timer = &lacie_v2_timer, | 406 | .timer = &kirkwood_timer, |
407 | MACHINE_END | 407 | MACHINE_END |
408 | #endif | 408 | #endif |
409 | 409 | ||
@@ -413,6 +413,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") | |||
413 | .init_machine = netxbig_v2_init, | 413 | .init_machine = netxbig_v2_init, |
414 | .map_io = kirkwood_map_io, | 414 | .map_io = kirkwood_map_io, |
415 | .init_irq = kirkwood_init_irq, | 415 | .init_irq = kirkwood_init_irq, |
416 | .timer = &lacie_v2_timer, | 416 | .timer = &kirkwood_timer, |
417 | MACHINE_END | 417 | MACHINE_END |
418 | #endif | 418 | #endif |
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c index 8be09a0ce4ac..3587a281d993 100644 --- a/arch/arm/mach-kirkwood/ts41x-setup.c +++ b/arch/arm/mach-kirkwood/ts41x-setup.c | |||
@@ -27,6 +27,10 @@ | |||
27 | #include "mpp.h" | 27 | #include "mpp.h" |
28 | #include "tsx1x-common.h" | 28 | #include "tsx1x-common.h" |
29 | 29 | ||
30 | /* for the PCIe reset workaround */ | ||
31 | #include <plat/pcie.h> | ||
32 | |||
33 | |||
30 | #define QNAP_TS41X_JUMPER_JP1 45 | 34 | #define QNAP_TS41X_JUMPER_JP1 45 |
31 | 35 | ||
32 | static struct i2c_board_info __initdata qnap_ts41x_i2c_rtc = { | 36 | static struct i2c_board_info __initdata qnap_ts41x_i2c_rtc = { |
@@ -140,8 +144,16 @@ static void __init qnap_ts41x_init(void) | |||
140 | 144 | ||
141 | static int __init ts41x_pci_init(void) | 145 | static int __init ts41x_pci_init(void) |
142 | { | 146 | { |
143 | if (machine_is_ts41x()) | 147 | if (machine_is_ts41x()) { |
148 | /* | ||
149 | * Without this explicit reset, the PCIe SATA controller | ||
150 | * (Marvell 88sx7042/sata_mv) is known to stop working | ||
151 | * after a few minutes. | ||
152 | */ | ||
153 | orion_pcie_reset((void __iomem *)PCIE_VIRT_BASE); | ||
154 | |||
144 | kirkwood_pcie_init(KW_PCIE0); | 155 | kirkwood_pcie_init(KW_PCIE0); |
156 | } | ||
145 | 157 | ||
146 | return 0; | 158 | return 0; |
147 | } | 159 | } |
diff --git a/arch/arm/mach-mmp/include/mach/cputype.h b/arch/arm/mach-mmp/include/mach/cputype.h index f43a68b213f1..8a3b56dfd35d 100644 --- a/arch/arm/mach-mmp/include/mach/cputype.h +++ b/arch/arm/mach-mmp/include/mach/cputype.h | |||
@@ -46,7 +46,8 @@ static inline int cpu_is_pxa910(void) | |||
46 | #ifdef CONFIG_CPU_MMP2 | 46 | #ifdef CONFIG_CPU_MMP2 |
47 | static inline int cpu_is_mmp2(void) | 47 | static inline int cpu_is_mmp2(void) |
48 | { | 48 | { |
49 | return (((cpu_readid_id() >> 8) & 0xff) == 0x58); | 49 | return (((read_cpuid_id() >> 8) & 0xff) == 0x58); |
50 | } | ||
50 | #else | 51 | #else |
51 | #define cpu_is_mmp2() (0) | 52 | #define cpu_is_mmp2() (0) |
52 | #endif | 53 | #endif |
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-mv78xx0/mpp.c index 354ac514eb89..84db2dfc475c 100644 --- a/arch/arm/mach-mv78xx0/mpp.c +++ b/arch/arm/mach-mv78xx0/mpp.c | |||
@@ -54,7 +54,7 @@ void __init mv78xx0_mpp_conf(unsigned int *mpp_list) | |||
54 | } | 54 | } |
55 | printk("\n"); | 55 | printk("\n"); |
56 | 56 | ||
57 | while (*mpp_list) { | 57 | for ( ; *mpp_list; mpp_list++) { |
58 | unsigned int num = MPP_NUM(*mpp_list); | 58 | unsigned int num = MPP_NUM(*mpp_list); |
59 | unsigned int sel = MPP_SEL(*mpp_list); | 59 | unsigned int sel = MPP_SEL(*mpp_list); |
60 | int shift, gpio_mode; | 60 | int shift, gpio_mode; |
@@ -83,8 +83,6 @@ void __init mv78xx0_mpp_conf(unsigned int *mpp_list) | |||
83 | if (sel != 0) | 83 | if (sel != 0) |
84 | gpio_mode = 0; | 84 | gpio_mode = 0; |
85 | orion_gpio_set_valid(num, gpio_mode); | 85 | orion_gpio_set_valid(num, gpio_mode); |
86 | |||
87 | mpp_list++; | ||
88 | } | 86 | } |
89 | 87 | ||
90 | printk(KERN_DEBUG " final MPP regs:"); | 88 | printk(KERN_DEBUG " final MPP regs:"); |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index bc4c3b9aaf83..db485d3b8144 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -127,7 +127,7 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | |||
127 | /* Initialize gpiolib. */ | 127 | /* Initialize gpiolib. */ |
128 | orion_gpio_init(); | 128 | orion_gpio_init(); |
129 | 129 | ||
130 | while (mode->mpp >= 0) { | 130 | for ( ; mode->mpp >= 0; mode++) { |
131 | u32 *reg; | 131 | u32 *reg; |
132 | int num_type; | 132 | int num_type; |
133 | int shift; | 133 | int shift; |
@@ -160,8 +160,6 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | |||
160 | orion_gpio_set_unused(mode->mpp); | 160 | orion_gpio_set_unused(mode->mpp); |
161 | 161 | ||
162 | orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); | 162 | orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); |
163 | |||
164 | mode++; | ||
165 | } | 163 | } |
166 | 164 | ||
167 | writel(mpp_0_7_ctrl, MPP_0_7_CTRL); | 165 | writel(mpp_0_7_ctrl, MPP_0_7_CTRL); |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 16f1bd5324be..c1c1cd04bdde 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -239,7 +239,7 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
239 | static struct resource ts78xx_ts_nand_resources = { | 239 | static struct resource ts78xx_ts_nand_resources = { |
240 | .start = TS_NAND_DATA, | 240 | .start = TS_NAND_DATA, |
241 | .end = TS_NAND_DATA + 4, | 241 | .end = TS_NAND_DATA + 4, |
242 | .flags = IORESOURCE_IO, | 242 | .flags = IORESOURCE_MEM, |
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct platform_device ts78xx_ts_nand_device = { | 245 | static struct platform_device ts78xx_ts_nand_device = { |
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index ac5598ce9724..d34b99febeb9 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
@@ -476,8 +476,6 @@ static void __init cmx2xx_init(void) | |||
476 | 476 | ||
477 | static void __init cmx2xx_init_irq(void) | 477 | static void __init cmx2xx_init_irq(void) |
478 | { | 478 | { |
479 | pxa27x_init_irq(); | ||
480 | |||
481 | if (cpu_is_pxa25x()) { | 479 | if (cpu_is_pxa25x()) { |
482 | pxa25x_init_irq(); | 480 | pxa25x_init_irq(); |
483 | cmx2xx_pci_init_irq(CMX255_GPIO_IT8152_IRQ); | 481 | cmx2xx_pci_init_irq(CMX255_GPIO_IT8152_IRQ); |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index 4b521e045d75..ffa50e633ee6 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -116,7 +116,7 @@ static struct platform_device smc91x_device = { | |||
116 | }, | 116 | }, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULE) | 119 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
120 | static uint16_t lcd_power_on[] = { | 120 | static uint16_t lcd_power_on[] = { |
121 | /* single frame */ | 121 | /* single frame */ |
122 | SMART_CMD_NOOP, | 122 | SMART_CMD_NOOP, |
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index c2e405a9e025..fd25ccd7272f 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -54,7 +54,9 @@ static struct map_desc ct_ca9x4_io_desc[] __initdata = { | |||
54 | 54 | ||
55 | static void __init ct_ca9x4_map_io(void) | 55 | static void __init ct_ca9x4_map_io(void) |
56 | { | 56 | { |
57 | #ifdef CONFIG_LOCAL_TIMERS | ||
57 | twd_base = MMIO_P2V(A9_MPCORE_TWD); | 58 | twd_base = MMIO_P2V(A9_MPCORE_TWD); |
59 | #endif | ||
58 | v2m_map_io(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); | 60 | v2m_map_io(ct_ca9x4_io_desc, ARRAY_SIZE(ct_ca9x4_io_desc)); |
59 | } | 61 | } |
60 | 62 | ||
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index e4dd0646e859..ac6a36142fcd 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -198,7 +198,7 @@ __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot) | |||
198 | * fragmentation of the DMA space, and also prevents allocations | 198 | * fragmentation of the DMA space, and also prevents allocations |
199 | * smaller than a section from crossing a section boundary. | 199 | * smaller than a section from crossing a section boundary. |
200 | */ | 200 | */ |
201 | bit = fls(size - 1) + 1; | 201 | bit = fls(size - 1); |
202 | if (bit > SECTION_SHIFT) | 202 | if (bit > SECTION_SHIFT) |
203 | bit = SECTION_SHIFT; | 203 | bit = SECTION_SHIFT; |
204 | align = 1 << bit; | 204 | align = 1 << bit; |
diff --git a/arch/arm/plat-orion/include/plat/pcie.h b/arch/arm/plat-orion/include/plat/pcie.h index 3ebfef72b4e7..cc99163e73fd 100644 --- a/arch/arm/plat-orion/include/plat/pcie.h +++ b/arch/arm/plat-orion/include/plat/pcie.h | |||
@@ -11,12 +11,15 @@ | |||
11 | #ifndef __PLAT_PCIE_H | 11 | #ifndef __PLAT_PCIE_H |
12 | #define __PLAT_PCIE_H | 12 | #define __PLAT_PCIE_H |
13 | 13 | ||
14 | struct pci_bus; | ||
15 | |||
14 | u32 orion_pcie_dev_id(void __iomem *base); | 16 | u32 orion_pcie_dev_id(void __iomem *base); |
15 | u32 orion_pcie_rev(void __iomem *base); | 17 | u32 orion_pcie_rev(void __iomem *base); |
16 | int orion_pcie_link_up(void __iomem *base); | 18 | int orion_pcie_link_up(void __iomem *base); |
17 | int orion_pcie_x4_mode(void __iomem *base); | 19 | int orion_pcie_x4_mode(void __iomem *base); |
18 | int orion_pcie_get_local_bus_nr(void __iomem *base); | 20 | int orion_pcie_get_local_bus_nr(void __iomem *base); |
19 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); | 21 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); |
22 | void orion_pcie_reset(void __iomem *base); | ||
20 | void orion_pcie_setup(void __iomem *base, | 23 | void orion_pcie_setup(void __iomem *base, |
21 | struct mbus_dram_target_info *dram); | 24 | struct mbus_dram_target_info *dram); |
22 | int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus, | 25 | int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus, |
diff --git a/arch/arm/plat-orion/pcie.c b/arch/arm/plat-orion/pcie.c index 779553a1595e..af2d733c50b5 100644 --- a/arch/arm/plat-orion/pcie.c +++ b/arch/arm/plat-orion/pcie.c | |||
@@ -182,11 +182,6 @@ void __init orion_pcie_setup(void __iomem *base, | |||
182 | u32 mask; | 182 | u32 mask; |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * soft reset PCIe unit | ||
186 | */ | ||
187 | orion_pcie_reset(base); | ||
188 | |||
189 | /* | ||
190 | * Point PCIe unit MBUS decode windows to DRAM space. | 185 | * Point PCIe unit MBUS decode windows to DRAM space. |
191 | */ | 186 | */ |
192 | orion_pcie_setup_wins(base, dram); | 187 | orion_pcie_setup_wins(base, dram); |