aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-kirkwood')
-rw-r--r--arch/arm/mach-kirkwood/common.c16
-rw-r--r--arch/arm/mach-kirkwood/common.h2
-rw-r--r--arch/arm/mach-kirkwood/d2net_v2-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/db88f6281-bp-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/dockstar-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/guruplug-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/include/mach/bridge-regs.h3
-rw-r--r--arch/arm/mach-kirkwood/include/mach/gpio.h29
-rw-r--r--arch/arm/mach-kirkwood/include/mach/kirkwood.h2
-rw-r--r--arch/arm/mach-kirkwood/irq.c22
-rw-r--r--arch/arm/mach-kirkwood/mpp.c3
-rw-r--r--arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/netspace_v2-setup.c3
-rw-r--r--arch/arm/mach-kirkwood/netxbig_v2-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/openrd-setup.c3
-rw-r--r--arch/arm/mach-kirkwood/pcie.c8
-rw-r--r--arch/arm/mach-kirkwood/rd88f6192-nas-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/rd88f6281-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/sheevaplug-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/t5325-setup.c18
-rw-r--r--arch/arm/mach-kirkwood/ts219-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/ts41x-setup.c9
22 files changed, 76 insertions, 54 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 3688123b5ad..20e71df3e3b 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -21,6 +21,7 @@
21#include <net/dsa.h> 21#include <net/dsa.h>
22#include <asm/page.h> 22#include <asm/page.h>
23#include <asm/timex.h> 23#include <asm/timex.h>
24#include <asm/kexec.h>
24#include <asm/mach/map.h> 25#include <asm/mach/map.h>
25#include <asm/mach/time.h> 26#include <asm/mach/time.h>
26#include <mach/kirkwood.h> 27#include <mach/kirkwood.h>
@@ -846,9 +847,14 @@ static void __init kirkwood_wdt_init(void)
846/***************************************************************************** 847/*****************************************************************************
847 * Time handling 848 * Time handling
848 ****************************************************************************/ 849 ****************************************************************************/
850void __init kirkwood_init_early(void)
851{
852 orion_time_set_base(TIMER_VIRT_BASE);
853}
854
849int kirkwood_tclk; 855int kirkwood_tclk;
850 856
851int __init kirkwood_find_tclk(void) 857static int __init kirkwood_find_tclk(void)
852{ 858{
853 u32 dev, rev; 859 u32 dev, rev;
854 860
@@ -864,7 +870,9 @@ int __init kirkwood_find_tclk(void)
864static void __init kirkwood_timer_init(void) 870static void __init kirkwood_timer_init(void)
865{ 871{
866 kirkwood_tclk = kirkwood_find_tclk(); 872 kirkwood_tclk = kirkwood_find_tclk();
867 orion_time_init(IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); 873
874 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
875 IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
868} 876}
869 877
870struct sys_timer kirkwood_timer = { 878struct sys_timer kirkwood_timer = {
@@ -1003,6 +1011,10 @@ void __init kirkwood_init(void)
1003 kirkwood_xor0_init(); 1011 kirkwood_xor0_init();
1004 kirkwood_xor1_init(); 1012 kirkwood_xor1_init();
1005 kirkwood_crypto_init(); 1013 kirkwood_crypto_init();
1014
1015#ifdef CONFIG_KEXEC
1016 kexec_reinit = kirkwood_enable_pcie;
1017#endif
1006} 1018}
1007 1019
1008static int __init kirkwood_clock_gate(void) 1020static int __init kirkwood_clock_gate(void)
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 95bb0a73adf..b9b0f0968a3 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -27,11 +27,13 @@ struct kirkwood_asoc_platform_data;
27 */ 27 */
28void kirkwood_map_io(void); 28void kirkwood_map_io(void);
29void kirkwood_init(void); 29void kirkwood_init(void);
30void kirkwood_init_early(void);
30void kirkwood_init_irq(void); 31void kirkwood_init_irq(void);
31 32
32extern struct mbus_dram_target_info kirkwood_mbus_dram_info; 33extern struct mbus_dram_target_info kirkwood_mbus_dram_info;
33void kirkwood_setup_cpu_mbus(void); 34void kirkwood_setup_cpu_mbus(void);
34 35
36void kirkwood_enable_pcie(void);
35void kirkwood_pcie_id(u32 *dev, u32 *rev); 37void kirkwood_pcie_id(u32 *dev, u32 *rev);
36 38
37void kirkwood_ehci_init(void); 39void kirkwood_ehci_init(void);
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
index a31c9499ab3..043cfd5e140 100644
--- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
+++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c
@@ -224,6 +224,7 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
224 .boot_params = 0x00000100, 224 .boot_params = 0x00000100,
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_early = kirkwood_init_early,
227 .init_irq = kirkwood_init_irq, 228 .init_irq = kirkwood_init_irq,
228 .timer = &kirkwood_timer, 229 .timer = &kirkwood_timer,
229MACHINE_END 230MACHINE_END
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
index 9ea71182d31..bff04e04d67 100644
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
@@ -100,6 +100,7 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
100 .boot_params = 0x00000100, 100 .boot_params = 0x00000100,
101 .init_machine = db88f6281_init, 101 .init_machine = db88f6281_init,
102 .map_io = kirkwood_map_io, 102 .map_io = kirkwood_map_io,
103 .init_early = kirkwood_init_early,
103 .init_irq = kirkwood_init_irq, 104 .init_irq = kirkwood_init_irq,
104 .timer = &kirkwood_timer, 105 .timer = &kirkwood_timer,
105MACHINE_END 106MACHINE_END
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
index 433ea368c06..f14dfb8508c 100644
--- a/arch/arm/mach-kirkwood/dockstar-setup.c
+++ b/arch/arm/mach-kirkwood/dockstar-setup.c
@@ -105,6 +105,7 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
105 .boot_params = 0x00000100, 105 .boot_params = 0x00000100,
106 .init_machine = dockstar_init, 106 .init_machine = dockstar_init,
107 .map_io = kirkwood_map_io, 107 .map_io = kirkwood_map_io,
108 .init_early = kirkwood_init_early,
108 .init_irq = kirkwood_init_irq, 109 .init_irq = kirkwood_init_irq,
109 .timer = &kirkwood_timer, 110 .timer = &kirkwood_timer,
110MACHINE_END 111MACHINE_END
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
index 8f47dc0a2fe..41d1b40696a 100644
--- a/arch/arm/mach-kirkwood/guruplug-setup.c
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -124,6 +124,7 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
124 .boot_params = 0x00000100, 124 .boot_params = 0x00000100,
125 .init_machine = guruplug_init, 125 .init_machine = guruplug_init,
126 .map_io = kirkwood_map_io, 126 .map_io = kirkwood_map_io,
127 .init_early = kirkwood_init_early,
127 .init_irq = kirkwood_init_irq, 128 .init_irq = kirkwood_init_irq,
128 .timer = &kirkwood_timer, 129 .timer = &kirkwood_timer,
129MACHINE_END 130MACHINE_END
diff --git a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
index aff0e1327e3..957bd7997d7 100644
--- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h
@@ -29,9 +29,6 @@
29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110) 29#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
30#define WDT_INT_REQ 0x0008 30#define WDT_INT_REQ 0x0008
31 31
32#define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
33#define BRIDGE_INT_TIMER0 0x0002
34#define BRIDGE_INT_TIMER1 0x0004
35#define BRIDGE_INT_TIMER1_CLR (~0x0004) 32#define BRIDGE_INT_TIMER1_CLR (~0x0004)
36 33
37#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) 34#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
diff --git a/arch/arm/mach-kirkwood/include/mach/gpio.h b/arch/arm/mach-kirkwood/include/mach/gpio.h
index 81b335eb62e..84f340b546c 100644
--- a/arch/arm/mach-kirkwood/include/mach/gpio.h
+++ b/arch/arm/mach-kirkwood/include/mach/gpio.h
@@ -6,33 +6,4 @@
6 * warranty of any kind, whether express or implied. 6 * warranty of any kind, whether express or implied.
7 */ 7 */
8 8
9#ifndef __ASM_ARCH_GPIO_H
10#define __ASM_ARCH_GPIO_H
11
12#include <mach/irqs.h>
13#include <plat/gpio.h> 9#include <plat/gpio.h>
14#include <asm-generic/gpio.h> /* cansleep wrappers */
15
16#define GPIO_MAX 50
17#define GPIO_OFF(pin) (((pin) >> 5) ? 0x0140 : 0x0100)
18#define GPIO_OUT(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x00)
19#define GPIO_IO_CONF(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x04)
20#define GPIO_BLINK_EN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x08)
21#define GPIO_IN_POL(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x0c)
22#define GPIO_DATA_IN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x10)
23#define GPIO_EDGE_CAUSE(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x14)
24#define GPIO_EDGE_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x18)
25#define GPIO_LEVEL_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x1c)
26
27static inline int gpio_to_irq(int pin)
28{
29 return pin + IRQ_KIRKWOOD_GPIO_START;
30}
31
32static inline int irq_to_gpio(int irq)
33{
34 return irq - IRQ_KIRKWOOD_GPIO_START;
35}
36
37
38#endif
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
index 6e924b39891..010bdeb4ac5 100644
--- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h
+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h
@@ -69,6 +69,8 @@
69#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000) 69#define DEV_BUS_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x10000)
70#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030) 70#define SAMPLE_AT_RESET (DEV_BUS_VIRT_BASE | 0x0030)
71#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034) 71#define DEVICE_ID (DEV_BUS_VIRT_BASE | 0x0034)
72#define GPIO_LOW_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x0100)
73#define GPIO_HIGH_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x0140)
72#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300) 74#define RTC_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0300)
73#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600) 75#define SPI_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x0600)
74#define I2C_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1000) 76#define I2C_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x1000)
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c
index 28020abf49e..cbdb5863d13 100644
--- a/arch/arm/mach-kirkwood/irq.c
+++ b/arch/arm/mach-kirkwood/irq.c
@@ -27,31 +27,21 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
27 27
28void __init kirkwood_init_irq(void) 28void __init kirkwood_init_irq(void)
29{ 29{
30 int i;
31
32 orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); 30 orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF));
33 orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); 31 orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF));
34 32
35 /* 33 /*
36 * Mask and clear GPIO IRQ interrupts. 34 * Initialize gpiolib for GPIOs 0-49.
37 */ 35 */
38 writel(0, GPIO_LEVEL_MASK(0)); 36 orion_gpio_init(0, 32, GPIO_LOW_VIRT_BASE, 0,
39 writel(0, GPIO_EDGE_MASK(0)); 37 IRQ_KIRKWOOD_GPIO_START);
40 writel(0, GPIO_EDGE_CAUSE(0));
41 writel(0, GPIO_LEVEL_MASK(32));
42 writel(0, GPIO_EDGE_MASK(32));
43 writel(0, GPIO_EDGE_CAUSE(32));
44
45 for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) {
46 set_irq_chip(i, &orion_gpio_irq_chip);
47 set_irq_handler(i, handle_level_irq);
48 irq_desc[i].status |= IRQ_LEVEL;
49 set_irq_flags(i, IRQF_VALID);
50 }
51 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_0_7, gpio_irq_handler); 38 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_0_7, gpio_irq_handler);
52 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_8_15, gpio_irq_handler); 39 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_8_15, gpio_irq_handler);
53 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_16_23, gpio_irq_handler); 40 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_16_23, gpio_irq_handler);
54 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_24_31, gpio_irq_handler); 41 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_24_31, gpio_irq_handler);
42
43 orion_gpio_init(32, 18, GPIO_HIGH_VIRT_BASE, 0,
44 IRQ_KIRKWOOD_GPIO_START + 32);
55 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_0_7, gpio_irq_handler); 45 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_0_7, gpio_irq_handler);
56 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_8_15, gpio_irq_handler); 46 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_8_15, gpio_irq_handler);
57 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_16_23, gpio_irq_handler); 47 set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_16_23, gpio_irq_handler);
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 27901f702fe..7ce20184806 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -49,9 +49,6 @@ void __init kirkwood_mpp_conf(unsigned int *mpp_list)
49 if (!variant_mask) 49 if (!variant_mask)
50 return; 50 return;
51 51
52 /* Initialize gpiolib. */
53 orion_gpio_init();
54
55 printk(KERN_DEBUG "initial MPP regs:"); 52 printk(KERN_DEBUG "initial MPP regs:");
56 for (i = 0; i < MPP_NR_REGS; i++) { 53 for (i = 0; i < MPP_NR_REGS; i++) {
57 mpp_ctrl[i] = readl(MPP_CTRL(i)); 54 mpp_ctrl[i] = readl(MPP_CTRL(i));
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f57e2..00cca22eca6 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -166,6 +166,7 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
166 .boot_params = 0x00000100, 166 .boot_params = 0x00000100,
167 .init_machine = mv88f6281gtw_ge_init, 167 .init_machine = mv88f6281gtw_ge_init,
168 .map_io = kirkwood_map_io, 168 .map_io = kirkwood_map_io,
169 .init_early = kirkwood_init_early,
169 .init_irq = kirkwood_init_irq, 170 .init_irq = kirkwood_init_irq,
170 .timer = &kirkwood_timer, 171 .timer = &kirkwood_timer,
171MACHINE_END 172MACHINE_END
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
index 65ee21fd2f3..7cdab577645 100644
--- a/arch/arm/mach-kirkwood/netspace_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
@@ -261,6 +261,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
261 .boot_params = 0x00000100, 261 .boot_params = 0x00000100,
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_early = kirkwood_init_early,
264 .init_irq = kirkwood_init_irq, 265 .init_irq = kirkwood_init_irq,
265 .timer = &kirkwood_timer, 266 .timer = &kirkwood_timer,
266MACHINE_END 267MACHINE_END
@@ -271,6 +272,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
271 .boot_params = 0x00000100, 272 .boot_params = 0x00000100,
272 .init_machine = netspace_v2_init, 273 .init_machine = netspace_v2_init,
273 .map_io = kirkwood_map_io, 274 .map_io = kirkwood_map_io,
275 .init_early = kirkwood_init_early,
274 .init_irq = kirkwood_init_irq, 276 .init_irq = kirkwood_init_irq,
275 .timer = &kirkwood_timer, 277 .timer = &kirkwood_timer,
276MACHINE_END 278MACHINE_END
@@ -281,6 +283,7 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
281 .boot_params = 0x00000100, 283 .boot_params = 0x00000100,
282 .init_machine = netspace_v2_init, 284 .init_machine = netspace_v2_init,
283 .map_io = kirkwood_map_io, 285 .map_io = kirkwood_map_io,
286 .init_early = kirkwood_init_early,
284 .init_irq = kirkwood_init_irq, 287 .init_irq = kirkwood_init_irq,
285 .timer = &kirkwood_timer, 288 .timer = &kirkwood_timer,
286MACHINE_END 289MACHINE_END
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
index 93afd3c8bfd..6be627deb0f 100644
--- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -402,6 +402,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
402 .boot_params = 0x00000100, 402 .boot_params = 0x00000100,
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_early = kirkwood_init_early,
405 .init_irq = kirkwood_init_irq, 406 .init_irq = kirkwood_init_irq,
406 .timer = &kirkwood_timer, 407 .timer = &kirkwood_timer,
407MACHINE_END 408MACHINE_END
@@ -412,6 +413,7 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
412 .boot_params = 0x00000100, 413 .boot_params = 0x00000100,
413 .init_machine = netxbig_v2_init, 414 .init_machine = netxbig_v2_init,
414 .map_io = kirkwood_map_io, 415 .map_io = kirkwood_map_io,
416 .init_early = kirkwood_init_early,
415 .init_irq = kirkwood_init_irq, 417 .init_irq = kirkwood_init_irq,
416 .timer = &kirkwood_timer, 418 .timer = &kirkwood_timer,
417MACHINE_END 419MACHINE_END
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index cfcca4174e2..f69beeff445 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -217,6 +217,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
217 .boot_params = 0x00000100, 217 .boot_params = 0x00000100,
218 .init_machine = openrd_init, 218 .init_machine = openrd_init,
219 .map_io = kirkwood_map_io, 219 .map_io = kirkwood_map_io,
220 .init_early = kirkwood_init_early,
220 .init_irq = kirkwood_init_irq, 221 .init_irq = kirkwood_init_irq,
221 .timer = &kirkwood_timer, 222 .timer = &kirkwood_timer,
222MACHINE_END 223MACHINE_END
@@ -228,6 +229,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
228 .boot_params = 0x00000100, 229 .boot_params = 0x00000100,
229 .init_machine = openrd_init, 230 .init_machine = openrd_init,
230 .map_io = kirkwood_map_io, 231 .map_io = kirkwood_map_io,
232 .init_early = kirkwood_init_early,
231 .init_irq = kirkwood_init_irq, 233 .init_irq = kirkwood_init_irq,
232 .timer = &kirkwood_timer, 234 .timer = &kirkwood_timer,
233MACHINE_END 235MACHINE_END
@@ -239,6 +241,7 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
239 .boot_params = 0x00000100, 241 .boot_params = 0x00000100,
240 .init_machine = openrd_init, 242 .init_machine = openrd_init,
241 .map_io = kirkwood_map_io, 243 .map_io = kirkwood_map_io,
244 .init_early = kirkwood_init_early,
242 .init_irq = kirkwood_init_irq, 245 .init_irq = kirkwood_init_irq,
243 .timer = &kirkwood_timer, 246 .timer = &kirkwood_timer,
244MACHINE_END 247MACHINE_END
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index 513ad3102d7..ca294ff6d5b 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -18,8 +18,16 @@
18#include <mach/bridge-regs.h> 18#include <mach/bridge-regs.h>
19#include "common.h" 19#include "common.h"
20 20
21void kirkwood_enable_pcie(void)
22{
23 u32 curr = readl(CLOCK_GATING_CTRL);
24 if (!(curr & CGC_PEX0))
25 writel(curr | CGC_PEX0, CLOCK_GATING_CTRL);
26}
27
21void __init kirkwood_pcie_id(u32 *dev, u32 *rev) 28void __init kirkwood_pcie_id(u32 *dev, u32 *rev)
22{ 29{
30 kirkwood_enable_pcie();
23 *dev = orion_pcie_dev_id((void __iomem *)PCIE_VIRT_BASE); 31 *dev = orion_pcie_dev_id((void __iomem *)PCIE_VIRT_BASE);
24 *rev = orion_pcie_rev((void __iomem *)PCIE_VIRT_BASE); 32 *rev = orion_pcie_rev((void __iomem *)PCIE_VIRT_BASE);
25} 33}
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614cd32..75c6601b8d8 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -82,6 +82,7 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
82 .boot_params = 0x00000100, 82 .boot_params = 0x00000100,
83 .init_machine = rd88f6192_init, 83 .init_machine = rd88f6192_init,
84 .map_io = kirkwood_map_io, 84 .map_io = kirkwood_map_io,
85 .init_early = kirkwood_init_early,
85 .init_irq = kirkwood_init_irq, 86 .init_irq = kirkwood_init_irq,
86 .timer = &kirkwood_timer, 87 .timer = &kirkwood_timer,
87MACHINE_END 88MACHINE_END
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index 0998a08cf42..0f75494d590 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -118,6 +118,7 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
118 .boot_params = 0x00000100, 118 .boot_params = 0x00000100,
119 .init_machine = rd88f6281_init, 119 .init_machine = rd88f6281_init,
120 .map_io = kirkwood_map_io, 120 .map_io = kirkwood_map_io,
121 .init_early = kirkwood_init_early,
121 .init_irq = kirkwood_init_irq, 122 .init_irq = kirkwood_init_irq,
122 .timer = &kirkwood_timer, 123 .timer = &kirkwood_timer,
123MACHINE_END 124MACHINE_END
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
index d2eec35dfe0..0a95063f6d3 100644
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -134,6 +134,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
134 .boot_params = 0x00000100, 134 .boot_params = 0x00000100,
135 .init_machine = sheevaplug_init, 135 .init_machine = sheevaplug_init,
136 .map_io = kirkwood_map_io, 136 .map_io = kirkwood_map_io,
137 .init_early = kirkwood_init_early,
137 .init_irq = kirkwood_init_irq, 138 .init_irq = kirkwood_init_irq,
138 .timer = &kirkwood_timer, 139 .timer = &kirkwood_timer,
139MACHINE_END 140MACHINE_END
@@ -144,6 +145,7 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
144 .boot_params = 0x00000100, 145 .boot_params = 0x00000100,
145 .init_machine = sheevaplug_init, 146 .init_machine = sheevaplug_init,
146 .map_io = kirkwood_map_io, 147 .map_io = kirkwood_map_io,
148 .init_early = kirkwood_init_early,
147 .init_irq = kirkwood_init_irq, 149 .init_irq = kirkwood_init_irq,
148 .timer = &kirkwood_timer, 150 .timer = &kirkwood_timer,
149MACHINE_END 151MACHINE_END
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61aac9..e6b9b1b22a3 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -23,6 +23,7 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/gpio_keys.h> 24#include <linux/gpio_keys.h>
25#include <linux/input.h> 25#include <linux/input.h>
26#include <sound/alc5623.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28#include <mach/kirkwood.h> 29#include <mach/kirkwood.h>
@@ -134,6 +135,7 @@ static unsigned int hp_t5325_mpp_config[] __initdata = {
134 MPP33_GE1_TXCTL, 135 MPP33_GE1_TXCTL,
135 MPP39_AU_I2SBCLK, 136 MPP39_AU_I2SBCLK,
136 MPP40_AU_I2SDO, 137 MPP40_AU_I2SDO,
138 MPP43_AU_I2SDI,
137 MPP41_AU_I2SLRCLK, 139 MPP41_AU_I2SLRCLK,
138 MPP42_AU_I2SMCLK, 140 MPP42_AU_I2SMCLK,
139 MPP45_GPIO, /* Power button */ 141 MPP45_GPIO, /* Power button */
@@ -141,6 +143,18 @@ static unsigned int hp_t5325_mpp_config[] __initdata = {
141 0 143 0
142}; 144};
143 145
146static struct alc5623_platform_data alc5621_data = {
147 .add_ctrl = 0x3700,
148 .jack_det_ctrl = 0x4810,
149};
150
151static struct i2c_board_info i2c_board_info[] __initdata = {
152 {
153 I2C_BOARD_INFO("alc5621", 0x1a),
154 .platform_data = &alc5621_data,
155 },
156};
157
144#define HP_T5325_GPIO_POWER_OFF 48 158#define HP_T5325_GPIO_POWER_OFF 48
145 159
146static void hp_t5325_power_off(void) 160static void hp_t5325_power_off(void)
@@ -166,6 +180,9 @@ static void __init hp_t5325_init(void)
166 kirkwood_ehci_init(); 180 kirkwood_ehci_init();
167 platform_device_register(&hp_t5325_button_device); 181 platform_device_register(&hp_t5325_button_device);
168 182
183 i2c_register_board_info(0, i2c_board_info, ARRAY_SIZE(i2c_board_info));
184 kirkwood_audio_init();
185
169 if (gpio_request(HP_T5325_GPIO_POWER_OFF, "power-off") == 0 && 186 if (gpio_request(HP_T5325_GPIO_POWER_OFF, "power-off") == 0 &&
170 gpio_direction_output(HP_T5325_GPIO_POWER_OFF, 0) == 0) 187 gpio_direction_output(HP_T5325_GPIO_POWER_OFF, 0) == 0)
171 pm_power_off = hp_t5325_power_off; 188 pm_power_off = hp_t5325_power_off;
@@ -187,6 +204,7 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
187 .boot_params = 0x00000100, 204 .boot_params = 0x00000100,
188 .init_machine = hp_t5325_init, 205 .init_machine = hp_t5325_init,
189 .map_io = kirkwood_map_io, 206 .map_io = kirkwood_map_io,
207 .init_early = kirkwood_init_early,
190 .init_irq = kirkwood_init_irq, 208 .init_irq = kirkwood_init_irq,
191 .timer = &kirkwood_timer, 209 .timer = &kirkwood_timer,
192MACHINE_END 210MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
index dc999c4c580..68f32f2bf55 100644
--- a/arch/arm/mach-kirkwood/ts219-setup.c
+++ b/arch/arm/mach-kirkwood/ts219-setup.c
@@ -135,6 +135,7 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
135 .boot_params = 0x00000100, 135 .boot_params = 0x00000100,
136 .init_machine = qnap_ts219_init, 136 .init_machine = qnap_ts219_init,
137 .map_io = kirkwood_map_io, 137 .map_io = kirkwood_map_io,
138 .init_early = kirkwood_init_early,
138 .init_irq = kirkwood_init_irq, 139 .init_irq = kirkwood_init_irq,
139 .timer = &kirkwood_timer, 140 .timer = &kirkwood_timer,
140MACHINE_END 141MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c
index 9a44029915e..d5d00997070 100644
--- a/arch/arm/mach-kirkwood/ts41x-setup.c
+++ b/arch/arm/mach-kirkwood/ts41x-setup.c
@@ -154,6 +154,8 @@ static void __init qnap_ts41x_init(void)
154static int __init ts41x_pci_init(void) 154static int __init ts41x_pci_init(void)
155{ 155{
156 if (machine_is_ts41x()) { 156 if (machine_is_ts41x()) {
157 u32 dev, rev;
158
157 /* 159 /*
158 * Without this explicit reset, the PCIe SATA controller 160 * Without this explicit reset, the PCIe SATA controller
159 * (Marvell 88sx7042/sata_mv) is known to stop working 161 * (Marvell 88sx7042/sata_mv) is known to stop working
@@ -161,7 +163,11 @@ static int __init ts41x_pci_init(void)
161 */ 163 */
162 orion_pcie_reset((void __iomem *)PCIE_VIRT_BASE); 164 orion_pcie_reset((void __iomem *)PCIE_VIRT_BASE);
163 165
164 kirkwood_pcie_init(KW_PCIE0); 166 kirkwood_pcie_id(&dev, &rev);
167 if (dev == MV88F6282_DEV_ID)
168 kirkwood_pcie_init(KW_PCIE1 | KW_PCIE0);
169 else
170 kirkwood_pcie_init(KW_PCIE0);
165 } 171 }
166 172
167 return 0; 173 return 0;
@@ -173,6 +179,7 @@ MACHINE_START(TS41X, "QNAP TS-41x")
173 .boot_params = 0x00000100, 179 .boot_params = 0x00000100,
174 .init_machine = qnap_ts41x_init, 180 .init_machine = qnap_ts41x_init,
175 .map_io = kirkwood_map_io, 181 .map_io = kirkwood_map_io,
182 .init_early = kirkwood_init_early,
176 .init_irq = kirkwood_init_irq, 183 .init_irq = kirkwood_init_irq,
177 .timer = &kirkwood_timer, 184 .timer = &kirkwood_timer,
178MACHINE_END 185MACHINE_END