aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/embedded6xx
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /arch/powerpc/platforms/embedded6xx
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'arch/powerpc/platforms/embedded6xx')
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig4
-rw-r--r--arch/powerpc/platforms/embedded6xx/c2k.c1
-rw-r--r--arch/powerpc/platforms/embedded6xx/flipper-pic.c24
-rw-r--r--arch/powerpc/platforms/embedded6xx/hlwd-pic.c29
-rw-r--r--arch/powerpc/platforms/embedded6xx/holly.c27
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c19
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c28
-rw-r--r--arch/powerpc/platforms/embedded6xx/prpmc2800.c1
-rw-r--r--arch/powerpc/platforms/embedded6xx/storcenter.c28
-rw-r--r--arch/powerpc/platforms/embedded6xx/wii.c23
10 files changed, 134 insertions, 50 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 5a8f50a9afa..524d971a147 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -87,6 +87,10 @@ config MV64X60
87config MPC10X_OPENPIC 87config MPC10X_OPENPIC
88 bool 88 bool
89 89
90config MPC10X_STORE_GATHERING
91 bool "Enable MPC10x store gathering"
92 depends on MPC10X_BRIDGE
93
90config GAMECUBE_COMMON 94config GAMECUBE_COMMON
91 bool 95 bool
92 96
diff --git a/arch/powerpc/platforms/embedded6xx/c2k.c b/arch/powerpc/platforms/embedded6xx/c2k.c
index ebd3963fdf9..8cab5731850 100644
--- a/arch/powerpc/platforms/embedded6xx/c2k.c
+++ b/arch/powerpc/platforms/embedded6xx/c2k.c
@@ -23,6 +23,7 @@
23 23
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/prom.h> 25#include <asm/prom.h>
26#include <asm/system.h>
26#include <asm/time.h> 27#include <asm/time.h>
27 28
28#include <mm/mmu_decl.h> 29#include <mm/mmu_decl.h>
diff --git a/arch/powerpc/platforms/embedded6xx/flipper-pic.c b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
index 53d6eee0196..f61a2dd96b9 100644
--- a/arch/powerpc/platforms/embedded6xx/flipper-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/flipper-pic.c
@@ -96,9 +96,9 @@ static struct irq_chip flipper_pic = {
96 * 96 *
97 */ 97 */
98 98
99static struct irq_domain *flipper_irq_host; 99static struct irq_host *flipper_irq_host;
100 100
101static int flipper_pic_map(struct irq_domain *h, unsigned int virq, 101static int flipper_pic_map(struct irq_host *h, unsigned int virq,
102 irq_hw_number_t hwirq) 102 irq_hw_number_t hwirq)
103{ 103{
104 irq_set_chip_data(virq, h->host_data); 104 irq_set_chip_data(virq, h->host_data);
@@ -107,13 +107,13 @@ static int flipper_pic_map(struct irq_domain *h, unsigned int virq,
107 return 0; 107 return 0;
108} 108}
109 109
110static int flipper_pic_match(struct irq_domain *h, struct device_node *np) 110static int flipper_pic_match(struct irq_host *h, struct device_node *np)
111{ 111{
112 return 1; 112 return 1;
113} 113}
114 114
115 115
116static const struct irq_domain_ops flipper_irq_domain_ops = { 116static struct irq_host_ops flipper_irq_host_ops = {
117 .map = flipper_pic_map, 117 .map = flipper_pic_map,
118 .match = flipper_pic_match, 118 .match = flipper_pic_match,
119}; 119};
@@ -130,10 +130,10 @@ static void __flipper_quiesce(void __iomem *io_base)
130 out_be32(io_base + FLIPPER_ICR, 0xffffffff); 130 out_be32(io_base + FLIPPER_ICR, 0xffffffff);
131} 131}
132 132
133struct irq_domain * __init flipper_pic_init(struct device_node *np) 133struct irq_host * __init flipper_pic_init(struct device_node *np)
134{ 134{
135 struct device_node *pi; 135 struct device_node *pi;
136 struct irq_domain *irq_domain = NULL; 136 struct irq_host *irq_host = NULL;
137 struct resource res; 137 struct resource res;
138 void __iomem *io_base; 138 void __iomem *io_base;
139 int retval; 139 int retval;
@@ -159,15 +159,17 @@ struct irq_domain * __init flipper_pic_init(struct device_node *np)
159 159
160 __flipper_quiesce(io_base); 160 __flipper_quiesce(io_base);
161 161
162 irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, 162 irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, FLIPPER_NR_IRQS,
163 &flipper_irq_domain_ops, io_base); 163 &flipper_irq_host_ops, -1);
164 if (!irq_domain) { 164 if (!irq_host) {
165 pr_err("failed to allocate irq_domain\n"); 165 pr_err("failed to allocate irq_host\n");
166 return NULL; 166 return NULL;
167 } 167 }
168 168
169 irq_host->host_data = io_base;
170
169out: 171out:
170 return irq_domain; 172 return irq_host;
171} 173}
172 174
173unsigned int flipper_pic_get_irq(void) 175unsigned int flipper_pic_get_irq(void)
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index 3006b5117ec..e4919170c6b 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -89,9 +89,9 @@ static struct irq_chip hlwd_pic = {
89 * 89 *
90 */ 90 */
91 91
92static struct irq_domain *hlwd_irq_host; 92static struct irq_host *hlwd_irq_host;
93 93
94static int hlwd_pic_map(struct irq_domain *h, unsigned int virq, 94static int hlwd_pic_map(struct irq_host *h, unsigned int virq,
95 irq_hw_number_t hwirq) 95 irq_hw_number_t hwirq)
96{ 96{
97 irq_set_chip_data(virq, h->host_data); 97 irq_set_chip_data(virq, h->host_data);
@@ -100,11 +100,11 @@ static int hlwd_pic_map(struct irq_domain *h, unsigned int virq,
100 return 0; 100 return 0;
101} 101}
102 102
103static const struct irq_domain_ops hlwd_irq_domain_ops = { 103static struct irq_host_ops hlwd_irq_host_ops = {
104 .map = hlwd_pic_map, 104 .map = hlwd_pic_map,
105}; 105};
106 106
107static unsigned int __hlwd_pic_get_irq(struct irq_domain *h) 107static unsigned int __hlwd_pic_get_irq(struct irq_host *h)
108{ 108{
109 void __iomem *io_base = h->host_data; 109 void __iomem *io_base = h->host_data;
110 int irq; 110 int irq;
@@ -123,14 +123,14 @@ static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
123 struct irq_desc *desc) 123 struct irq_desc *desc)
124{ 124{
125 struct irq_chip *chip = irq_desc_get_chip(desc); 125 struct irq_chip *chip = irq_desc_get_chip(desc);
126 struct irq_domain *irq_domain = irq_get_handler_data(cascade_virq); 126 struct irq_host *irq_host = irq_get_handler_data(cascade_virq);
127 unsigned int virq; 127 unsigned int virq;
128 128
129 raw_spin_lock(&desc->lock); 129 raw_spin_lock(&desc->lock);
130 chip->irq_mask(&desc->irq_data); /* IRQ_LEVEL */ 130 chip->irq_mask(&desc->irq_data); /* IRQ_LEVEL */
131 raw_spin_unlock(&desc->lock); 131 raw_spin_unlock(&desc->lock);
132 132
133 virq = __hlwd_pic_get_irq(irq_domain); 133 virq = __hlwd_pic_get_irq(irq_host);
134 if (virq != NO_IRQ) 134 if (virq != NO_IRQ)
135 generic_handle_irq(virq); 135 generic_handle_irq(virq);
136 else 136 else
@@ -155,9 +155,9 @@ static void __hlwd_quiesce(void __iomem *io_base)
155 out_be32(io_base + HW_BROADWAY_ICR, 0xffffffff); 155 out_be32(io_base + HW_BROADWAY_ICR, 0xffffffff);
156} 156}
157 157
158struct irq_domain *hlwd_pic_init(struct device_node *np) 158struct irq_host *hlwd_pic_init(struct device_node *np)
159{ 159{
160 struct irq_domain *irq_domain; 160 struct irq_host *irq_host;
161 struct resource res; 161 struct resource res;
162 void __iomem *io_base; 162 void __iomem *io_base;
163 int retval; 163 int retval;
@@ -177,14 +177,15 @@ struct irq_domain *hlwd_pic_init(struct device_node *np)
177 177
178 __hlwd_quiesce(io_base); 178 __hlwd_quiesce(io_base);
179 179
180 irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS, 180 irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, HLWD_NR_IRQS,
181 &hlwd_irq_domain_ops, io_base); 181 &hlwd_irq_host_ops, -1);
182 if (!irq_domain) { 182 if (!irq_host) {
183 pr_err("failed to allocate irq_domain\n"); 183 pr_err("failed to allocate irq_host\n");
184 return NULL; 184 return NULL;
185 } 185 }
186 irq_host->host_data = io_base;
186 187
187 return irq_domain; 188 return irq_host;
188} 189}
189 190
190unsigned int hlwd_pic_get_irq(void) 191unsigned int hlwd_pic_get_irq(void)
@@ -199,7 +200,7 @@ unsigned int hlwd_pic_get_irq(void)
199 200
200void hlwd_pic_probe(void) 201void hlwd_pic_probe(void)
201{ 202{
202 struct irq_domain *host; 203 struct irq_host *host;
203 struct device_node *np; 204 struct device_node *np;
204 const u32 *interrupts; 205 const u32 *interrupts;
205 int cascade_virq; 206 int cascade_virq;
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index 8c305c7c897..487bda0d18d 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -26,8 +26,8 @@
26#include <linux/tty.h> 26#include <linux/tty.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/of_platform.h> 28#include <linux/of_platform.h>
29#include <linux/module.h>
30 29
30#include <asm/system.h>
31#include <asm/time.h> 31#include <asm/time.h>
32#include <asm/machdep.h> 32#include <asm/machdep.h>
33#include <asm/prom.h> 33#include <asm/prom.h>
@@ -147,20 +147,38 @@ static void __init holly_setup_arch(void)
147static void __init holly_init_IRQ(void) 147static void __init holly_init_IRQ(void)
148{ 148{
149 struct mpic *mpic; 149 struct mpic *mpic;
150 phys_addr_t mpic_paddr = 0;
151 struct device_node *tsi_pic;
150#ifdef CONFIG_PCI 152#ifdef CONFIG_PCI
151 unsigned int cascade_pci_irq; 153 unsigned int cascade_pci_irq;
152 struct device_node *tsi_pci; 154 struct device_node *tsi_pci;
153 struct device_node *cascade_node = NULL; 155 struct device_node *cascade_node = NULL;
154#endif 156#endif
155 157
156 mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 158 tsi_pic = of_find_node_by_type(NULL, "open-pic");
159 if (tsi_pic) {
160 unsigned int size;
161 const void *prop = of_get_property(tsi_pic, "reg", &size);
162 mpic_paddr = of_translate_address(tsi_pic, prop);
163 }
164
165 if (mpic_paddr == 0) {
166 printk(KERN_ERR "%s: No tsi108 PIC found !\n", __func__);
167 return;
168 }
169
170 pr_debug("%s: tsi108 pic phys_addr = 0x%x\n", __func__, (u32) mpic_paddr);
171
172 mpic = mpic_alloc(tsi_pic, mpic_paddr,
173 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
157 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, 174 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
158 24, 0, 175 24,
176 NR_IRQS-4, /* num_sources used */
159 "Tsi108_PIC"); 177 "Tsi108_PIC");
160 178
161 BUG_ON(mpic == NULL); 179 BUG_ON(mpic == NULL);
162 180
163 mpic_assign_isu(mpic, 0, mpic->paddr + 0x100); 181 mpic_assign_isu(mpic, 0, mpic_paddr + 0x100);
164 182
165 mpic_init(mpic); 183 mpic_init(mpic);
166 184
@@ -185,6 +203,7 @@ static void __init holly_init_IRQ(void)
185#endif 203#endif
186 /* Configure MPIC outputs to CPU0 */ 204 /* Configure MPIC outputs to CPU0 */
187 tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0); 205 tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
206 of_node_put(tsi_pic);
188} 207}
189 208
190void holly_show_cpuinfo(struct seq_file *m) 209void holly_show_cpuinfo(struct seq_file *m)
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 455e7c08742..244f997de79 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -81,18 +81,29 @@ static void __init linkstation_setup_arch(void)
81static void __init linkstation_init_IRQ(void) 81static void __init linkstation_init_IRQ(void)
82{ 82{
83 struct mpic *mpic; 83 struct mpic *mpic;
84 struct device_node *dnp;
85 const u32 *prop;
86 int size;
87 phys_addr_t paddr;
84 88
85 mpic = mpic_alloc(NULL, 0, 0, 4, 0, " EPIC "); 89 dnp = of_find_node_by_type(NULL, "open-pic");
90 if (dnp == NULL)
91 return;
92
93 prop = of_get_property(dnp, "reg", &size);
94 paddr = (phys_addr_t)of_translate_address(dnp, prop);
95
96 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET, 4, 32, " EPIC ");
86 BUG_ON(mpic == NULL); 97 BUG_ON(mpic == NULL);
87 98
88 /* PCI IRQs */ 99 /* PCI IRQs */
89 mpic_assign_isu(mpic, 0, mpic->paddr + 0x10200); 100 mpic_assign_isu(mpic, 0, paddr + 0x10200);
90 101
91 /* I2C */ 102 /* I2C */
92 mpic_assign_isu(mpic, 1, mpic->paddr + 0x11000); 103 mpic_assign_isu(mpic, 1, paddr + 0x11000);
93 104
94 /* ttyS0, ttyS1 */ 105 /* ttyS0, ttyS1 */
95 mpic_assign_isu(mpic, 2, mpic->paddr + 0x11100); 106 mpic_assign_isu(mpic, 2, paddr + 0x11100);
96 107
97 mpic_init(mpic); 108 mpic_init(mpic);
98} 109}
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index beeaf4a173e..1cb907c9435 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -23,7 +23,6 @@
23#include <linux/pci.h> 23#include <linux/pci.h>
24#include <linux/kdev_t.h> 24#include <linux/kdev_t.h>
25#include <linux/console.h> 25#include <linux/console.h>
26#include <linux/module.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/irq.h> 27#include <linux/irq.h>
29#include <linux/seq_file.h> 28#include <linux/seq_file.h>
@@ -32,6 +31,7 @@
32#include <linux/tty.h> 31#include <linux/tty.h>
33#include <linux/serial_core.h> 32#include <linux/serial_core.h>
34 33
34#include <asm/system.h>
35#include <asm/time.h> 35#include <asm/time.h>
36#include <asm/machdep.h> 36#include <asm/machdep.h>
37#include <asm/prom.h> 37#include <asm/prom.h>
@@ -101,20 +101,39 @@ static void __init mpc7448_hpc2_setup_arch(void)
101static void __init mpc7448_hpc2_init_IRQ(void) 101static void __init mpc7448_hpc2_init_IRQ(void)
102{ 102{
103 struct mpic *mpic; 103 struct mpic *mpic;
104 phys_addr_t mpic_paddr = 0;
105 struct device_node *tsi_pic;
104#ifdef CONFIG_PCI 106#ifdef CONFIG_PCI
105 unsigned int cascade_pci_irq; 107 unsigned int cascade_pci_irq;
106 struct device_node *tsi_pci; 108 struct device_node *tsi_pci;
107 struct device_node *cascade_node = NULL; 109 struct device_node *cascade_node = NULL;
108#endif 110#endif
109 111
110 mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN | 112 tsi_pic = of_find_node_by_type(NULL, "open-pic");
113 if (tsi_pic) {
114 unsigned int size;
115 const void *prop = of_get_property(tsi_pic, "reg", &size);
116 mpic_paddr = of_translate_address(tsi_pic, prop);
117 }
118
119 if (mpic_paddr == 0) {
120 printk("%s: No tsi108 PIC found !\n", __func__);
121 return;
122 }
123
124 DBG("%s: tsi108 pic phys_addr = 0x%x\n", __func__,
125 (u32) mpic_paddr);
126
127 mpic = mpic_alloc(tsi_pic, mpic_paddr,
128 MPIC_PRIMARY | MPIC_BIG_ENDIAN | MPIC_WANTS_RESET |
111 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108, 129 MPIC_SPV_EOI | MPIC_NO_PTHROU_DIS | MPIC_REGSET_TSI108,
112 24, 0, 130 24,
131 NR_IRQS-4, /* num_sources used */
113 "Tsi108_PIC"); 132 "Tsi108_PIC");
114 133
115 BUG_ON(mpic == NULL); 134 BUG_ON(mpic == NULL);
116 135
117 mpic_assign_isu(mpic, 0, mpic->paddr + 0x100); 136 mpic_assign_isu(mpic, 0, mpic_paddr + 0x100);
118 137
119 mpic_init(mpic); 138 mpic_init(mpic);
120 139
@@ -139,6 +158,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
139#endif 158#endif
140 /* Configure MPIC outputs to CPU0 */ 159 /* Configure MPIC outputs to CPU0 */
141 tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0); 160 tsi108_write_reg(TSI108_MPIC_OFFSET + 0x30c, 0);
161 of_node_put(tsi_pic);
142} 162}
143 163
144void mpc7448_hpc2_show_cpuinfo(struct seq_file *m) 164void mpc7448_hpc2_show_cpuinfo(struct seq_file *m)
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
index d455f08bea5..670035f49a6 100644
--- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c
+++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c
@@ -17,6 +17,7 @@
17 17
18#include <asm/machdep.h> 18#include <asm/machdep.h>
19#include <asm/prom.h> 19#include <asm/prom.h>
20#include <asm/system.h>
20#include <asm/time.h> 21#include <asm/time.h>
21 22
22#include <mm/mmu_decl.h> 23#include <mm/mmu_decl.h>
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c
index c458b60d14c..613070e9ddb 100644
--- a/arch/powerpc/platforms/embedded6xx/storcenter.c
+++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
@@ -16,6 +16,7 @@
16#include <linux/initrd.h> 16#include <linux/initrd.h>
17#include <linux/of_platform.h> 17#include <linux/of_platform.h>
18 18
19#include <asm/system.h>
19#include <asm/time.h> 20#include <asm/time.h>
20#include <asm/prom.h> 21#include <asm/prom.h>
21#include <asm/mpic.h> 22#include <asm/mpic.h>
@@ -76,22 +77,41 @@ static void __init storcenter_setup_arch(void)
76} 77}
77 78
78/* 79/*
79 * Interrupt setup and service. Interrupts on the turbostation come 80 * Interrupt setup and service. Interrrupts on the turbostation come
80 * from the four PCI slots plus onboard 8241 devices: I2C, DUART. 81 * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
81 */ 82 */
82static void __init storcenter_init_IRQ(void) 83static void __init storcenter_init_IRQ(void)
83{ 84{
84 struct mpic *mpic; 85 struct mpic *mpic;
86 struct device_node *dnp;
87 const void *prop;
88 int size;
89 phys_addr_t paddr;
90
91 dnp = of_find_node_by_type(NULL, "open-pic");
92 if (dnp == NULL)
93 return;
94
95 prop = of_get_property(dnp, "reg", &size);
96 if (prop == NULL) {
97 of_node_put(dnp);
98 return;
99 }
100
101 paddr = (phys_addr_t)of_translate_address(dnp, prop);
102 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
103 16, 32, " OpenPIC ");
104
105 of_node_put(dnp);
85 106
86 mpic = mpic_alloc(NULL, 0, 0, 16, 0, " OpenPIC ");
87 BUG_ON(mpic == NULL); 107 BUG_ON(mpic == NULL);
88 108
89 /* 109 /*
90 * 16 Serial Interrupts followed by 16 Internal Interrupts. 110 * 16 Serial Interrupts followed by 16 Internal Interrupts.
91 * I2C is the second internal, so it is at 17, 0x11020. 111 * I2C is the second internal, so it is at 17, 0x11020.
92 */ 112 */
93 mpic_assign_isu(mpic, 0, mpic->paddr + 0x10200); 113 mpic_assign_isu(mpic, 0, paddr + 0x10200);
94 mpic_assign_isu(mpic, 1, mpic->paddr + 0x11000); 114 mpic_assign_isu(mpic, 1, paddr + 0x11000);
95 115
96 mpic_init(mpic); 116 mpic_init(mpic);
97} 117}
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
index 6d8dadf19f0..1b5dc1a2e14 100644
--- a/arch/powerpc/platforms/embedded6xx/wii.c
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -79,18 +79,23 @@ void __init wii_memory_fixups(void)
79 BUG_ON(memblock.memory.cnt != 2); 79 BUG_ON(memblock.memory.cnt != 2);
80 BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); 80 BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base));
81 81
82 /* trim unaligned tail */ 82 p[0].size = _ALIGN_DOWN(p[0].size, PAGE_SIZE);
83 memblock_remove(ALIGN(p[1].base + p[1].size, PAGE_SIZE), 83 p[1].size = _ALIGN_DOWN(p[1].size, PAGE_SIZE);
84 (phys_addr_t)ULLONG_MAX);
85 84
86 /* determine hole, add & reserve them */ 85 wii_hole_start = p[0].base + p[0].size;
87 wii_hole_start = ALIGN(p[0].base + p[0].size, PAGE_SIZE);
88 wii_hole_size = p[1].base - wii_hole_start; 86 wii_hole_size = p[1].base - wii_hole_start;
89 memblock_add(wii_hole_start, wii_hole_size);
90 memblock_reserve(wii_hole_start, wii_hole_size);
91 87
92 BUG_ON(memblock.memory.cnt != 1); 88 pr_info("MEM1: <%08llx %08llx>\n", p[0].base, p[0].size);
93 __memblock_dump_all(); 89 pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size);
90 pr_info("MEM2: <%08llx %08llx>\n", p[1].base, p[1].size);
91
92 p[0].size += wii_hole_size + p[1].size;
93
94 memblock.memory.cnt = 1;
95 memblock_analyze();
96
97 /* reserve the hole */
98 memblock_reserve(wii_hole_start, wii_hole_size);
94 99
95 /* allow ioremapping the address space in the hole */ 100 /* allow ioremapping the address space in the hole */
96 __allow_ioremap_reserved = 1; 101 __allow_ioremap_reserved = 1;