aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 17:22:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-09 17:22:35 -0500
commita967e127d0233f2472af64597de3f3920872310c (patch)
treeebcdf53cfad97bb2a2168657585443eeed11e0ea
parentbb9b813bb665cdbe7019a4f1e93f7138e7bf59d0 (diff)
parentf194bda4ce7e71cc95535f494a4a5515cd91ed85 (diff)
Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] 85xx: Enable CONFIG_SERIAL_8250_SHARE_IRQ [POWERPC] Select u-image as default image for Linkstation [POWERPC] 83xx: Minor fixes for 834x_mds USB setup code [POWERPC] Fix warning in powermac pci.c [POWERPC] Fix warning in powermac feature.c [POWERPC] Fix warning in prom_parse.c of_irq_map_oldworld() [POWERPC] Celleb: bug fix caused by not casting pointer types [POWERPC] Add missing newline in xmon help output [POWERPC] No DEEPNAP on 970MP 1.0
-rw-r--r--arch/powerpc/kernel/cputable.c16
-rw-r--r--arch/powerpc/kernel/prom_parse.c2
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c8
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/celleb/scc_epci.c82
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/powermac/feature.c5
-rw-r--r--arch/powerpc/platforms/powermac/pci.c7
-rw-r--r--arch/powerpc/xmon/xmon.c2
9 files changed, 94 insertions, 30 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 7ec4ac77c0fa..e4006dc087ca 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -225,6 +225,22 @@ static struct cpu_spec cpu_specs[] = {
225 .oprofile_type = PPC_OPROFILE_POWER4, 225 .oprofile_type = PPC_OPROFILE_POWER4,
226 .platform = "ppc970", 226 .platform = "ppc970",
227 }, 227 },
228 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
229 .pvr_mask = 0xffffffff,
230 .pvr_value = 0x00440100,
231 .cpu_name = "PPC970MP",
232 .cpu_features = CPU_FTRS_PPC970,
233 .cpu_user_features = COMMON_USER_POWER4 |
234 PPC_FEATURE_HAS_ALTIVEC_COMP,
235 .icache_bsize = 128,
236 .dcache_bsize = 128,
237 .num_pmcs = 8,
238 .cpu_setup = __setup_cpu_ppc970,
239 .cpu_restore = __restore_cpu_ppc970,
240 .oprofile_cpu_type = "ppc64/970MP",
241 .oprofile_type = PPC_OPROFILE_POWER4,
242 .platform = "ppc970",
243 },
228 { /* PPC970MP */ 244 { /* PPC970MP */
229 .pvr_mask = 0xffff0000, 245 .pvr_mask = 0xffff0000,
230 .pvr_value = 0x00440000, 246 .pvr_value = 0x00440000,
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index ea6fd552c7ea..91b443c9a488 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -916,7 +916,7 @@ EXPORT_SYMBOL_GPL(of_irq_map_raw);
916static int of_irq_map_oldworld(struct device_node *device, int index, 916static int of_irq_map_oldworld(struct device_node *device, int index,
917 struct of_irq *out_irq) 917 struct of_irq *out_irq)
918{ 918{
919 const u32 *ints; 919 const u32 *ints = NULL;
920 int intlen; 920 int intlen;
921 921
922 /* 922 /*
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index e5d819166874..8aa9a93e2aa2 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -55,9 +55,9 @@ static int mpc834x_usb_cfg(void)
55 struct device_node *np = NULL; 55 struct device_node *np = NULL;
56 int port0_is_dr = 0; 56 int port0_is_dr = 0;
57 57
58 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL) 58 if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr")) != NULL)
59 port0_is_dr = 1; 59 port0_is_dr = 1;
60 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){ 60 if ((np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph")) != NULL){
61 if (port0_is_dr) { 61 if (port0_is_dr) {
62 printk(KERN_WARNING 62 printk(KERN_WARNING
63 "There is only one USB port on PB board! \n"); 63 "There is only one USB port on PB board! \n");
@@ -103,8 +103,8 @@ static int mpc834x_usb_cfg(void)
103 return -1; 103 return -1;
104 104
105 /* 105 /*
106 * if MDS board is plug into PIB board, 106 * if Processor Board is plugged into PIB board,
107 * force to use the PHY on MDS board 107 * force to use the PHY on Processor Board
108 */ 108 */
109 bcsr5 = in_8(bcsr_regs + 5); 109 bcsr5 = in_8(bcsr_regs + 5);
110 if (!(bcsr5 & BCSR5_INT_USB)) 110 if (!(bcsr5 & BCSR5_INT_USB))
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index eb661ccf2dab..e764c0aced88 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -47,6 +47,7 @@ config MPC85xx
47 bool 47 bool
48 select PPC_UDBG_16550 48 select PPC_UDBG_16550
49 select PPC_INDIRECT_PCI 49 select PPC_INDIRECT_PCI
50 select SERIAL_8250_SHARE_IRQ if SERIAL_8250
50 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS 51 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS
51 52
52config PPC_INDIRECT_PCI_BE 53config PPC_INDIRECT_PCI_BE
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c
index c11b39c3776a..fb23d53eb09c 100644
--- a/arch/powerpc/platforms/celleb/scc_epci.c
+++ b/arch/powerpc/platforms/celleb/scc_epci.c
@@ -43,11 +43,34 @@
43 43
44#define iob() __asm__ __volatile__("eieio; sync":::"memory") 44#define iob() __asm__ __volatile__("eieio; sync":::"memory")
45 45
46static inline volatile void __iomem *celleb_epci_get_epci_base(
47 struct pci_controller *hose)
48{
49 /*
50 * Note:
51 * Celleb epci uses cfg_addr as a base address for
52 * epci control registers.
53 */
54
55 return hose->cfg_addr;
56}
57
58static inline volatile void __iomem *celleb_epci_get_epci_cfg(
59 struct pci_controller *hose)
60{
61 /*
62 * Note:
63 * Celleb epci uses cfg_data as a base address for
64 * configuration area for epci devices.
65 */
66
67 return hose->cfg_data;
68}
46 69
47#if 0 /* test code for epci dummy read */ 70#if 0 /* test code for epci dummy read */
48static void celleb_epci_dummy_read(struct pci_dev *dev) 71static void celleb_epci_dummy_read(struct pci_dev *dev)
49{ 72{
50 void __iomem *epci_base; 73 volatile void __iomem *epci_base;
51 struct device_node *node; 74 struct device_node *node;
52 struct pci_controller *hose; 75 struct pci_controller *hose;
53 u32 val; 76 u32 val;
@@ -58,7 +81,7 @@ static void celleb_epci_dummy_read(struct pci_dev *dev)
58 if (!hose) 81 if (!hose)
59 return; 82 return;
60 83
61 epci_base = hose->cfg_addr; 84 epci_base = celleb_epci_get_epci_base(hose);
62 85
63 val = in_be32(epci_base + SCC_EPCI_WATRP); 86 val = in_be32(epci_base + SCC_EPCI_WATRP);
64 iosync(); 87 iosync();
@@ -70,19 +93,20 @@ static void celleb_epci_dummy_read(struct pci_dev *dev)
70static inline void clear_and_disable_master_abort_interrupt( 93static inline void clear_and_disable_master_abort_interrupt(
71 struct pci_controller *hose) 94 struct pci_controller *hose)
72{ 95{
73 void __iomem *addr; 96 volatile void __iomem *epci_base, *reg;
74 addr = hose->cfg_addr + PCI_COMMAND; 97 epci_base = celleb_epci_get_epci_base(hose);
75 out_be32(addr, in_be32(addr) | (PCI_STATUS_REC_MASTER_ABORT << 16)); 98 reg = epci_base + PCI_COMMAND;
99 out_be32(reg, in_be32(reg) | (PCI_STATUS_REC_MASTER_ABORT << 16));
76} 100}
77 101
78static int celleb_epci_check_abort(struct pci_controller *hose, 102static int celleb_epci_check_abort(struct pci_controller *hose,
79 void __iomem *addr) 103 volatile void __iomem *addr)
80{ 104{
81 void __iomem *reg, *epci_base; 105 volatile void __iomem *reg, *epci_base;
82 u32 val; 106 u32 val;
83 107
84 iob(); 108 iob();
85 epci_base = hose->cfg_addr; 109 epci_base = celleb_epci_get_epci_base(hose);
86 110
87 reg = epci_base + PCI_COMMAND; 111 reg = epci_base + PCI_COMMAND;
88 val = in_be32(reg); 112 val = in_be32(reg);
@@ -108,20 +132,21 @@ static int celleb_epci_check_abort(struct pci_controller *hose,
108 return PCIBIOS_SUCCESSFUL; 132 return PCIBIOS_SUCCESSFUL;
109} 133}
110 134
111static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose, 135static volatile void __iomem *celleb_epci_make_config_addr(
136 struct pci_controller *hose,
112 unsigned int devfn, int where) 137 unsigned int devfn, int where)
113{ 138{
114 void __iomem *addr; 139 volatile void __iomem *addr;
115 struct pci_bus *bus = hose->bus; 140 struct pci_bus *bus = hose->bus;
116 141
117 if (bus->self) 142 if (bus->self)
118 addr = hose->cfg_data + 143 addr = celleb_epci_get_epci_cfg(hose) +
119 (((bus->number & 0xff) << 16) 144 (((bus->number & 0xff) << 16)
120 | ((devfn & 0xff) << 8) 145 | ((devfn & 0xff) << 8)
121 | (where & 0xff) 146 | (where & 0xff)
122 | 0x01000000); 147 | 0x01000000);
123 else 148 else
124 addr = hose->cfg_data + 149 addr = celleb_epci_get_epci_cfg(hose) +
125 (((devfn & 0xff) << 8) | (where & 0xff)); 150 (((devfn & 0xff) << 8) | (where & 0xff));
126 151
127 pr_debug("EPCI: config_addr = 0x%p\n", addr); 152 pr_debug("EPCI: config_addr = 0x%p\n", addr);
@@ -132,7 +157,7 @@ static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose,
132static int celleb_epci_read_config(struct pci_bus *bus, 157static int celleb_epci_read_config(struct pci_bus *bus,
133 unsigned int devfn, int where, int size, u32 * val) 158 unsigned int devfn, int where, int size, u32 * val)
134{ 159{
135 void __iomem *addr; 160 volatile void __iomem *epci_base, *addr;
136 struct device_node *node; 161 struct device_node *node;
137 struct pci_controller *hose; 162 struct pci_controller *hose;
138 163
@@ -142,13 +167,14 @@ static int celleb_epci_read_config(struct pci_bus *bus,
142 node = (struct device_node *)bus->sysdata; 167 node = (struct device_node *)bus->sysdata;
143 hose = pci_find_hose_for_OF_device(node); 168 hose = pci_find_hose_for_OF_device(node);
144 169
145 if (!hose->cfg_data) 170 if (!celleb_epci_get_epci_cfg(hose))
146 return PCIBIOS_DEVICE_NOT_FOUND; 171 return PCIBIOS_DEVICE_NOT_FOUND;
147 172
148 if (bus->number == hose->first_busno && devfn == 0) { 173 if (bus->number == hose->first_busno && devfn == 0) {
149 /* EPCI controller self */ 174 /* EPCI controller self */
150 175
151 addr = hose->cfg_addr + where; 176 epci_base = celleb_epci_get_epci_base(hose);
177 addr = epci_base + where;
152 178
153 switch (size) { 179 switch (size) {
154 case 1: 180 case 1:
@@ -185,7 +211,7 @@ static int celleb_epci_read_config(struct pci_bus *bus,
185 } 211 }
186 212
187 pr_debug("EPCI: " 213 pr_debug("EPCI: "
188 "addr=0x%lx, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n", 214 "addr=0x%p, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n",
189 addr, devfn, where, size, *val); 215 addr, devfn, where, size, *val);
190 216
191 return celleb_epci_check_abort(hose, NULL); 217 return celleb_epci_check_abort(hose, NULL);
@@ -194,7 +220,7 @@ static int celleb_epci_read_config(struct pci_bus *bus,
194static int celleb_epci_write_config(struct pci_bus *bus, 220static int celleb_epci_write_config(struct pci_bus *bus,
195 unsigned int devfn, int where, int size, u32 val) 221 unsigned int devfn, int where, int size, u32 val)
196{ 222{
197 void __iomem *addr; 223 volatile void __iomem *epci_base, *addr;
198 struct device_node *node; 224 struct device_node *node;
199 struct pci_controller *hose; 225 struct pci_controller *hose;
200 226
@@ -204,13 +230,15 @@ static int celleb_epci_write_config(struct pci_bus *bus,
204 node = (struct device_node *)bus->sysdata; 230 node = (struct device_node *)bus->sysdata;
205 hose = pci_find_hose_for_OF_device(node); 231 hose = pci_find_hose_for_OF_device(node);
206 232
207 if (!hose->cfg_data) 233
234 if (!celleb_epci_get_epci_cfg(hose))
208 return PCIBIOS_DEVICE_NOT_FOUND; 235 return PCIBIOS_DEVICE_NOT_FOUND;
209 236
210 if (bus->number == hose->first_busno && devfn == 0) { 237 if (bus->number == hose->first_busno && devfn == 0) {
211 /* EPCI controller self */ 238 /* EPCI controller self */
212 239
213 addr = hose->cfg_addr + where; 240 epci_base = celleb_epci_get_epci_base(hose);
241 addr = epci_base + where;
214 242
215 switch (size) { 243 switch (size) {
216 case 1: 244 case 1:
@@ -258,10 +286,10 @@ struct pci_ops celleb_epci_ops = {
258static int __devinit celleb_epci_init(struct pci_controller *hose) 286static int __devinit celleb_epci_init(struct pci_controller *hose)
259{ 287{
260 u32 val; 288 u32 val;
261 void __iomem *reg, *epci_base; 289 volatile void __iomem *reg, *epci_base;
262 int hwres = 0; 290 int hwres = 0;
263 291
264 epci_base = hose->cfg_addr; 292 epci_base = celleb_epci_get_epci_base(hose);
265 293
266 /* PCI core reset(Internal bus and PCI clock) */ 294 /* PCI core reset(Internal bus and PCI clock) */
267 reg = epci_base + SCC_EPCI_CKCTRL; 295 reg = epci_base + SCC_EPCI_CKCTRL;
@@ -382,6 +410,18 @@ int __devinit celleb_setup_epci(struct device_node *node,
382 410
383 pr_debug("PCI: celleb_setup_epci()\n"); 411 pr_debug("PCI: celleb_setup_epci()\n");
384 412
413 /*
414 * Note:
415 * Celleb epci uses cfg_addr and cfg_data member of
416 * pci_controller structure in irregular way.
417 *
418 * cfg_addr is used to map for control registers of
419 * celleb epci.
420 *
421 * cfg_data is used for configuration area of devices
422 * on Celleb epci buses.
423 */
424
385 if (of_address_to_resource(node, 0, &r)) 425 if (of_address_to_resource(node, 0, &r))
386 goto error; 426 goto error;
387 hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1)); 427 hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1));
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 886c522d78e9..3410bcbc9dbe 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -79,6 +79,7 @@ config LINKSTATION
79 select MPIC 79 select MPIC
80 select FSL_SOC 80 select FSL_SOC
81 select PPC_UDBG_16550 if SERIAL_8250 81 select PPC_UDBG_16550 if SERIAL_8250
82 select DEFAULT_UIMAGE
82 help 83 help
83 Select LINKSTATION if configuring for one of PPC- (MPC8241) 84 Select LINKSTATION if configuring for one of PPC- (MPC8241)
84 based NAS systems from Buffalo Technology. So far only 85 based NAS systems from Buffalo Technology. So far only
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index c29a6a064d22..24cc50c1774a 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -810,6 +810,7 @@ core99_ata100_enable(struct device_node *node, long value)
810 unsigned long flags; 810 unsigned long flags;
811 struct pci_dev *pdev = NULL; 811 struct pci_dev *pdev = NULL;
812 u8 pbus, pid; 812 u8 pbus, pid;
813 int rc;
813 814
814 if (uninorth_rev < 0x24) 815 if (uninorth_rev < 0x24)
815 return -ENODEV; 816 return -ENODEV;
@@ -828,7 +829,9 @@ core99_ata100_enable(struct device_node *node, long value)
828 pdev = pci_find_slot(pbus, pid); 829 pdev = pci_find_slot(pbus, pid);
829 if (pdev == NULL) 830 if (pdev == NULL)
830 return 0; 831 return 0;
831 pci_enable_device(pdev); 832 rc = pci_enable_device(pdev);
833 if (rc)
834 return rc;
832 pci_set_master(pdev); 835 pci_set_master(pdev);
833 } 836 }
834 return 0; 837 return 0;
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index f42475b27c15..6fbac308ded6 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -1191,8 +1191,11 @@ void __init pmac_pcibios_after_init(void)
1191 * -- BenH 1191 * -- BenH
1192 */ 1192 */
1193 for_each_pci_dev(dev) { 1193 for_each_pci_dev(dev) {
1194 if ((dev->class >> 16) == PCI_BASE_CLASS_STORAGE) 1194 if ((dev->class >> 16) != PCI_BASE_CLASS_STORAGE)
1195 pci_enable_device(dev); 1195 continue;
1196 if (pci_enable_device(dev))
1197 printk(KERN_WARNING
1198 "pci: Failed to enable %s\n", pci_name(dev));
1196 } 1199 }
1197#endif /* CONFIG_BLK_DEV_IDE */ 1200#endif /* CONFIG_BLK_DEV_IDE */
1198 1201
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 0183e5fbaf46..bf299b66f3fc 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -218,7 +218,7 @@ Commands:\n\
218" ss stop execution on all spus\n\ 218" ss stop execution on all spus\n\
219 sr restore execution on stopped spus\n\ 219 sr restore execution on stopped spus\n\
220 sf # dump spu fields for spu # (in hex)\n\ 220 sf # dump spu fields for spu # (in hex)\n\
221 sd # dump spu local store for spu # (in hex)\ 221 sd # dump spu local store for spu # (in hex)\n\
222 sdi # disassemble spu local store for spu # (in hex)\n" 222 sdi # disassemble spu local store for spu # (in hex)\n"
223#endif 223#endif
224" S print special registers\n\ 224" S print special registers\n\