diff options
Diffstat (limited to 'arch/arm/mach-mv78xx0')
-rw-r--r-- | arch/arm/mach-mv78xx0/addr-map.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/common.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/db78x00-bp-setup.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/include/mach/entry-macro.S | 18 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/include/mach/irqs.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/irq.c | 1 |
7 files changed, 36 insertions, 15 deletions
diff --git a/arch/arm/mach-mv78xx0/addr-map.c b/arch/arm/mach-mv78xx0/addr-map.c index 4004b672a2eb..311d5b0e9bc7 100644 --- a/arch/arm/mach-mv78xx0/addr-map.c +++ b/arch/arm/mach-mv78xx0/addr-map.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <asm/io.h> | 14 | #include <linux/io.h> |
15 | #include "common.h" | 15 | #include "common.h" |
16 | 16 | ||
17 | /* | 17 | /* |
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 953a26c469cb..238a2f8c2d52 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -285,6 +285,11 @@ static struct resource mv78xx0_ge00_shared_resources[] = { | |||
285 | .start = GE00_PHYS_BASE + 0x2000, | 285 | .start = GE00_PHYS_BASE + 0x2000, |
286 | .end = GE00_PHYS_BASE + 0x3fff, | 286 | .end = GE00_PHYS_BASE + 0x3fff, |
287 | .flags = IORESOURCE_MEM, | 287 | .flags = IORESOURCE_MEM, |
288 | }, { | ||
289 | .name = "ge err irq", | ||
290 | .start = IRQ_MV78XX0_GE_ERR, | ||
291 | .end = IRQ_MV78XX0_GE_ERR, | ||
292 | .flags = IORESOURCE_IRQ, | ||
288 | }, | 293 | }, |
289 | }; | 294 | }; |
290 | 295 | ||
@@ -294,7 +299,7 @@ static struct platform_device mv78xx0_ge00_shared = { | |||
294 | .dev = { | 299 | .dev = { |
295 | .platform_data = &mv78xx0_ge00_shared_data, | 300 | .platform_data = &mv78xx0_ge00_shared_data, |
296 | }, | 301 | }, |
297 | .num_resources = 1, | 302 | .num_resources = ARRAY_SIZE(mv78xx0_ge00_shared_resources), |
298 | .resource = mv78xx0_ge00_shared_resources, | 303 | .resource = mv78xx0_ge00_shared_resources, |
299 | }; | 304 | }; |
300 | 305 | ||
@@ -330,6 +335,7 @@ void __init mv78xx0_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
330 | struct mv643xx_eth_shared_platform_data mv78xx0_ge01_shared_data = { | 335 | struct mv643xx_eth_shared_platform_data mv78xx0_ge01_shared_data = { |
331 | .t_clk = 0, | 336 | .t_clk = 0, |
332 | .dram = &mv78xx0_mbus_dram_info, | 337 | .dram = &mv78xx0_mbus_dram_info, |
338 | .shared_smi = &mv78xx0_ge00_shared, | ||
333 | }; | 339 | }; |
334 | 340 | ||
335 | static struct resource mv78xx0_ge01_shared_resources[] = { | 341 | static struct resource mv78xx0_ge01_shared_resources[] = { |
@@ -370,7 +376,6 @@ static struct platform_device mv78xx0_ge01 = { | |||
370 | void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) | 376 | void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) |
371 | { | 377 | { |
372 | eth_data->shared = &mv78xx0_ge01_shared; | 378 | eth_data->shared = &mv78xx0_ge01_shared; |
373 | eth_data->shared_smi = &mv78xx0_ge00_shared; | ||
374 | mv78xx0_ge01.dev.platform_data = eth_data; | 379 | mv78xx0_ge01.dev.platform_data = eth_data; |
375 | 380 | ||
376 | platform_device_register(&mv78xx0_ge01_shared); | 381 | platform_device_register(&mv78xx0_ge01_shared); |
@@ -384,6 +389,7 @@ void __init mv78xx0_ge01_init(struct mv643xx_eth_platform_data *eth_data) | |||
384 | struct mv643xx_eth_shared_platform_data mv78xx0_ge10_shared_data = { | 389 | struct mv643xx_eth_shared_platform_data mv78xx0_ge10_shared_data = { |
385 | .t_clk = 0, | 390 | .t_clk = 0, |
386 | .dram = &mv78xx0_mbus_dram_info, | 391 | .dram = &mv78xx0_mbus_dram_info, |
392 | .shared_smi = &mv78xx0_ge00_shared, | ||
387 | }; | 393 | }; |
388 | 394 | ||
389 | static struct resource mv78xx0_ge10_shared_resources[] = { | 395 | static struct resource mv78xx0_ge10_shared_resources[] = { |
@@ -424,7 +430,6 @@ static struct platform_device mv78xx0_ge10 = { | |||
424 | void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) | 430 | void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) |
425 | { | 431 | { |
426 | eth_data->shared = &mv78xx0_ge10_shared; | 432 | eth_data->shared = &mv78xx0_ge10_shared; |
427 | eth_data->shared_smi = &mv78xx0_ge00_shared; | ||
428 | mv78xx0_ge10.dev.platform_data = eth_data; | 433 | mv78xx0_ge10.dev.platform_data = eth_data; |
429 | 434 | ||
430 | platform_device_register(&mv78xx0_ge10_shared); | 435 | platform_device_register(&mv78xx0_ge10_shared); |
@@ -438,6 +443,7 @@ void __init mv78xx0_ge10_init(struct mv643xx_eth_platform_data *eth_data) | |||
438 | struct mv643xx_eth_shared_platform_data mv78xx0_ge11_shared_data = { | 443 | struct mv643xx_eth_shared_platform_data mv78xx0_ge11_shared_data = { |
439 | .t_clk = 0, | 444 | .t_clk = 0, |
440 | .dram = &mv78xx0_mbus_dram_info, | 445 | .dram = &mv78xx0_mbus_dram_info, |
446 | .shared_smi = &mv78xx0_ge00_shared, | ||
441 | }; | 447 | }; |
442 | 448 | ||
443 | static struct resource mv78xx0_ge11_shared_resources[] = { | 449 | static struct resource mv78xx0_ge11_shared_resources[] = { |
@@ -478,7 +484,6 @@ static struct platform_device mv78xx0_ge11 = { | |||
478 | void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) | 484 | void __init mv78xx0_ge11_init(struct mv643xx_eth_platform_data *eth_data) |
479 | { | 485 | { |
480 | eth_data->shared = &mv78xx0_ge11_shared; | 486 | eth_data->shared = &mv78xx0_ge11_shared; |
481 | eth_data->shared_smi = &mv78xx0_ge00_shared; | ||
482 | mv78xx0_ge11.dev.platform_data = eth_data; | 487 | mv78xx0_ge11.dev.platform_data = eth_data; |
483 | 488 | ||
484 | platform_device_register(&mv78xx0_ge11_shared); | 489 | platform_device_register(&mv78xx0_ge11_shared); |
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c index a2d0c9783604..49f434c39eb7 100644 --- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c +++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c | |||
@@ -19,19 +19,19 @@ | |||
19 | #include "common.h" | 19 | #include "common.h" |
20 | 20 | ||
21 | static struct mv643xx_eth_platform_data db78x00_ge00_data = { | 21 | static struct mv643xx_eth_platform_data db78x00_ge00_data = { |
22 | .phy_addr = 8, | 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
23 | }; | 23 | }; |
24 | 24 | ||
25 | static struct mv643xx_eth_platform_data db78x00_ge01_data = { | 25 | static struct mv643xx_eth_platform_data db78x00_ge01_data = { |
26 | .phy_addr = 9, | 26 | .phy_addr = MV643XX_ETH_PHY_ADDR(9), |
27 | }; | 27 | }; |
28 | 28 | ||
29 | static struct mv643xx_eth_platform_data db78x00_ge10_data = { | 29 | static struct mv643xx_eth_platform_data db78x00_ge10_data = { |
30 | .phy_addr = -1, | 30 | .phy_addr = MV643XX_ETH_PHY_NONE, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static struct mv643xx_eth_platform_data db78x00_ge11_data = { | 33 | static struct mv643xx_eth_platform_data db78x00_ge11_data = { |
34 | .phy_addr = -1, | 34 | .phy_addr = MV643XX_ETH_PHY_NONE, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static struct mv_sata_platform_data db78x00_sata_data = { | 37 | static struct mv_sata_platform_data db78x00_sata_data = { |
diff --git a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S index ed4a46bcd3b0..fbfb2693ce6c 100644 --- a/arch/arm/mach-mv78xx0/include/mach/entry-macro.S +++ b/arch/arm/mach-mv78xx0/include/mach/entry-macro.S | |||
@@ -26,14 +26,22 @@ | |||
26 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] | 26 | ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] |
27 | mov \irqnr, #31 | 27 | mov \irqnr, #31 |
28 | ands \irqstat, \irqstat, \tmp | 28 | ands \irqstat, \irqstat, \tmp |
29 | bne 1001f | ||
29 | 30 | ||
30 | @ if no low interrupts set, check high interrupts | 31 | @ if no low interrupts set, check high interrupts |
31 | ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] | 32 | ldr \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] |
32 | ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF] | 33 | ldr \tmp, [\base, #IRQ_MASK_HIGH_OFF] |
33 | moveq \irqnr, #63 | 34 | mov \irqnr, #63 |
34 | andeqs \irqstat, \irqstat, \tmp | 35 | ands \irqstat, \irqstat, \tmp |
36 | bne 1001f | ||
37 | |||
38 | @ if no high interrupts set, check error interrupts | ||
39 | ldr \irqstat, [\base, #IRQ_CAUSE_ERR_OFF] | ||
40 | ldr \tmp, [\base, #IRQ_MASK_ERR_OFF] | ||
41 | mov \irqnr, #95 | ||
42 | ands \irqstat, \irqstat, \tmp | ||
35 | 43 | ||
36 | @ find first active interrupt source | 44 | @ find first active interrupt source |
37 | clzne \irqstat, \irqstat | 45 | 1001: clzne \irqstat, \irqstat |
38 | subne \irqnr, \irqnr, \irqstat | 46 | subne \irqnr, \irqnr, \irqstat |
39 | .endm | 47 | .endm |
diff --git a/arch/arm/mach-mv78xx0/include/mach/irqs.h b/arch/arm/mach-mv78xx0/include/mach/irqs.h index 995d7fb8d06f..bebc330281ec 100644 --- a/arch/arm/mach-mv78xx0/include/mach/irqs.h +++ b/arch/arm/mach-mv78xx0/include/mach/irqs.h | |||
@@ -80,9 +80,14 @@ | |||
80 | #define IRQ_MV78XX0_DB_OUT 61 | 80 | #define IRQ_MV78XX0_DB_OUT 61 |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * MV78xx0 Error Interrupt Controller | ||
84 | */ | ||
85 | #define IRQ_MV78XX0_GE_ERR 70 | ||
86 | |||
87 | /* | ||
83 | * MV78XX0 General Purpose Pins | 88 | * MV78XX0 General Purpose Pins |
84 | */ | 89 | */ |
85 | #define IRQ_MV78XX0_GPIO_START 64 | 90 | #define IRQ_MV78XX0_GPIO_START 96 |
86 | #define NR_GPIO_IRQS GPIO_MAX | 91 | #define NR_GPIO_IRQS GPIO_MAX |
87 | 92 | ||
88 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) | 93 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) |
diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h index ad664178d6e1..ee9c5593ee92 100644 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | |||
@@ -71,8 +71,10 @@ | |||
71 | #define BRIDGE_INT_TIMER1 0x0004 | 71 | #define BRIDGE_INT_TIMER1 0x0004 |
72 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) | 72 | #define BRIDGE_INT_TIMER1_CLR (~0x0004) |
73 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) | 73 | #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200) |
74 | #define IRQ_CAUSE_ERR_OFF 0x0000 | ||
74 | #define IRQ_CAUSE_LOW_OFF 0x0004 | 75 | #define IRQ_CAUSE_LOW_OFF 0x0004 |
75 | #define IRQ_CAUSE_HIGH_OFF 0x0008 | 76 | #define IRQ_CAUSE_HIGH_OFF 0x0008 |
77 | #define IRQ_MASK_ERR_OFF 0x000c | ||
76 | #define IRQ_MASK_LOW_OFF 0x0010 | 78 | #define IRQ_MASK_LOW_OFF 0x0010 |
77 | #define IRQ_MASK_HIGH_OFF 0x0014 | 79 | #define IRQ_MASK_HIGH_OFF 0x0014 |
78 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) | 80 | #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) |
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index 28248d37b999..503e5d195ae5 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -19,4 +19,5 @@ void __init mv78xx0_init_irq(void) | |||
19 | { | 19 | { |
20 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 20 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); |
21 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 21 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); |
22 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); | ||
22 | } | 23 | } |