Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc

+139 -160
-12
arch/powerpc/kernel/cputable.c
··· 722 722 .oprofile_type = PPC_OPROFILE_G4, 723 723 .platform = "ppc7450", 724 724 }, 725 - { /* 8641 */ 726 - .pvr_mask = 0xffffffff, 727 - .pvr_value = 0x80040010, 728 - .cpu_name = "8641", 729 - .cpu_features = CPU_FTRS_7447A, 730 - .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP, 731 - .icache_bsize = 32, 732 - .dcache_bsize = 32, 733 - .num_pmcs = 6, 734 - .cpu_setup = __setup_cpu_745x 735 - }, 736 - 737 725 { /* 82xx (8240, 8245, 8260 are all 603e cores) */ 738 726 .pvr_mask = 0x7fff0000, 739 727 .pvr_value = 0x00810000,
+5 -3
arch/powerpc/platforms/86xx/mpc86xx.h
··· 15 15 * mpc86xx_* files. Mostly for use by mpc86xx_setup(). 16 16 */ 17 17 18 - extern int __init add_bridge(struct device_node *dev); 18 + extern int add_bridge(struct device_node *dev); 19 19 20 - extern void __init setup_indirect_pcie(struct pci_controller *hose, 20 + extern int mpc86xx_exclude_device(u_char bus, u_char devfn); 21 + 22 + extern void setup_indirect_pcie(struct pci_controller *hose, 21 23 u32 cfg_addr, u32 cfg_data); 22 - extern void __init setup_indirect_pcie_nomap(struct pci_controller *hose, 24 + extern void setup_indirect_pcie_nomap(struct pci_controller *hose, 23 25 void __iomem *cfg_addr, 24 26 void __iomem *cfg_data); 25 27
+122 -8
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
··· 35 35 #include <sysdev/fsl_soc.h> 36 36 37 37 #include "mpc86xx.h" 38 + #include "mpc8641_hpcn.h" 38 39 39 40 #ifndef CONFIG_PCI 40 41 unsigned long isa_io_base = 0; ··· 186 185 return PCI_IRQ_TABLE_LOOKUP + I8259_OFFSET; 187 186 } 188 187 189 - 190 - int 191 - mpc86xx_exclude_device(u_char bus, u_char devfn) 188 + static void __devinit quirk_ali1575(struct pci_dev *dev) 192 189 { 193 - #if !defined(CONFIG_PCI) 194 - if (bus == 0 && PCI_SLOT(devfn) == 0) 195 - return PCIBIOS_DEVICE_NOT_FOUND; 196 - #endif 190 + unsigned short temp; 197 191 198 - return PCIBIOS_SUCCESSFUL; 192 + /* 193 + * ALI1575 interrupts route table setup: 194 + * 195 + * IRQ pin IRQ# 196 + * PIRQA ---- 3 197 + * PIRQB ---- 4 198 + * PIRQC ---- 5 199 + * PIRQD ---- 6 200 + * PIRQE ---- 9 201 + * PIRQF ---- 10 202 + * PIRQG ---- 11 203 + * PIRQH ---- 12 204 + * 205 + * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD 206 + * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA 207 + */ 208 + pci_write_config_dword(dev, 0x48, 0xb9317542); 209 + 210 + /* USB 1.1 OHCI controller 1, interrupt: PIRQE */ 211 + pci_write_config_byte(dev, 0x86, 0x0c); 212 + 213 + /* USB 1.1 OHCI controller 2, interrupt: PIRQF */ 214 + pci_write_config_byte(dev, 0x87, 0x0d); 215 + 216 + /* USB 1.1 OHCI controller 3, interrupt: PIRQH */ 217 + pci_write_config_byte(dev, 0x88, 0x0f); 218 + 219 + /* USB 2.0 controller, interrupt: PIRQ7 */ 220 + pci_write_config_byte(dev, 0x74, 0x06); 221 + 222 + /* Audio controller, interrupt: PIRQE */ 223 + pci_write_config_byte(dev, 0x8a, 0x0c); 224 + 225 + /* Modem controller, interrupt: PIRQF */ 226 + pci_write_config_byte(dev, 0x8b, 0x0d); 227 + 228 + /* HD audio controller, interrupt: PIRQG */ 229 + pci_write_config_byte(dev, 0x8c, 0x0e); 230 + 231 + /* Serial ATA interrupt: PIRQD */ 232 + pci_write_config_byte(dev, 0x8d, 0x0b); 233 + 234 + /* SMB interrupt: PIRQH */ 235 + pci_write_config_byte(dev, 0x8e, 0x0f); 236 + 237 + /* PMU ACPI SCI interrupt: PIRQH */ 238 + pci_write_config_byte(dev, 0x8f, 0x0f); 239 + 240 + /* Primary PATA IDE IRQ: 14 241 + * Secondary PATA IDE IRQ: 15 242 + */ 243 + pci_write_config_byte(dev, 0x44, 0x3d); 244 + pci_write_config_byte(dev, 0x75, 0x0f); 245 + 246 + /* Set IRQ14 and IRQ15 to legacy IRQs */ 247 + pci_read_config_word(dev, 0x46, &temp); 248 + temp |= 0xc000; 249 + pci_write_config_word(dev, 0x46, temp); 250 + 251 + /* Set i8259 interrupt trigger 252 + * IRQ 3: Level 253 + * IRQ 4: Level 254 + * IRQ 5: Level 255 + * IRQ 6: Level 256 + * IRQ 7: Level 257 + * IRQ 9: Level 258 + * IRQ 10: Level 259 + * IRQ 11: Level 260 + * IRQ 12: Level 261 + * IRQ 14: Edge 262 + * IRQ 15: Edge 263 + */ 264 + outb(0xfa, 0x4d0); 265 + outb(0x1e, 0x4d1); 199 266 } 267 + 268 + static void __devinit quirk_uli5288(struct pci_dev *dev) 269 + { 270 + unsigned char c; 271 + 272 + pci_read_config_byte(dev,0x83,&c); 273 + c |= 0x80; 274 + pci_write_config_byte(dev, 0x83, c); 275 + 276 + pci_write_config_byte(dev, 0x09, 0x01); 277 + pci_write_config_byte(dev, 0x0a, 0x06); 278 + 279 + pci_read_config_byte(dev,0x83,&c); 280 + c &= 0x7f; 281 + pci_write_config_byte(dev, 0x83, c); 282 + 283 + pci_read_config_byte(dev,0x84,&c); 284 + c |= 0x01; 285 + pci_write_config_byte(dev, 0x84, c); 286 + } 287 + 288 + static void __devinit quirk_uli5229(struct pci_dev *dev) 289 + { 290 + unsigned short temp; 291 + pci_write_config_word(dev, 0x04, 0x0405); 292 + pci_read_config_word(dev, 0x4a, &temp); 293 + temp |= 0x1000; 294 + pci_write_config_word(dev, 0x4a, temp); 295 + } 296 + 297 + static void __devinit early_uli5249(struct pci_dev *dev) 298 + { 299 + unsigned char temp; 300 + pci_write_config_word(dev, 0x04, 0x0007); 301 + pci_read_config_byte(dev, 0x7c, &temp); 302 + pci_write_config_byte(dev, 0x7c, 0x80); 303 + pci_write_config_byte(dev, 0x09, 0x01); 304 + pci_write_config_byte(dev, 0x7c, temp); 305 + dev->class |= 0x1; 306 + } 307 + 308 + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_ali1575); 309 + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288); 310 + DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); 311 + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249); 200 312 #endif /* CONFIG_PCI */ 201 313 202 314
+4 -5
arch/powerpc/platforms/86xx/mpc86xx_smp.c
··· 33 33 static void __init 34 34 smp_86xx_release_core(int nr) 35 35 { 36 - void *mcm_vaddr; 37 - unsigned long vaddr, pcr; 36 + __be32 __iomem *mcm_vaddr; 37 + unsigned long pcr; 38 38 39 39 if (nr < 0 || nr >= NR_CPUS) 40 40 return; ··· 44 44 */ 45 45 mcm_vaddr = ioremap(get_immrbase() + MPC86xx_MCM_OFFSET, 46 46 MPC86xx_MCM_SIZE); 47 - vaddr = (unsigned long)mcm_vaddr + MCM_PORT_CONFIG_OFFSET; 48 - pcr = in_be32((volatile unsigned *)vaddr); 47 + pcr = in_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2)); 49 48 pcr |= 1 << (nr + 24); 50 - out_be32((volatile unsigned *)vaddr, pcr); 49 + out_be32(mcm_vaddr + (MCM_PORT_CONFIG_OFFSET >> 2), pcr); 51 50 } 52 51 53 52
+8 -128
arch/powerpc/platforms/86xx/pci.c
··· 121 121 static void __init 122 122 mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size) 123 123 { 124 - volatile struct ccsr_pex *pcie; 125 124 u16 cmd; 126 125 unsigned int temps; 127 126 128 127 DBG("PCIE host controller register offset 0x%08x, size 0x%08x.\n", 129 128 pcie_offset, pcie_size); 130 - 131 - pcie = ioremap(pcie_offset, pcie_size); 132 129 133 130 early_read_config_word(hose, 0, 0, PCI_COMMAND, &cmd); 134 131 cmd |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY ··· 138 141 early_read_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, &temps); 139 142 temps = (temps & 0xff000000) | (0xff) | (0x0 << 8) | (0xfe << 16); 140 143 early_write_config_dword(hose, 0, 0, PCI_PRIMARY_BUS, temps); 144 + } 145 + 146 + int mpc86xx_exclude_device(u_char bus, u_char devfn) 147 + { 148 + if (bus == 0 && PCI_SLOT(devfn) == 0) 149 + return PCIBIOS_DEVICE_NOT_FOUND; 150 + 151 + return PCIBIOS_SUCCESSFUL; 141 152 } 142 153 143 154 int __init add_bridge(struct device_node *dev) ··· 202 197 203 198 return 0; 204 199 } 205 - 206 - static void __devinit quirk_ali1575(struct pci_dev *dev) 207 - { 208 - unsigned short temp; 209 - 210 - /* 211 - * ALI1575 interrupts route table setup: 212 - * 213 - * IRQ pin IRQ# 214 - * PIRQA ---- 3 215 - * PIRQB ---- 4 216 - * PIRQC ---- 5 217 - * PIRQD ---- 6 218 - * PIRQE ---- 9 219 - * PIRQF ---- 10 220 - * PIRQG ---- 11 221 - * PIRQH ---- 12 222 - * 223 - * interrupts for PCI slot0 -- PIRQA / PIRQB / PIRQC / PIRQD 224 - * PCI slot1 -- PIRQB / PIRQC / PIRQD / PIRQA 225 - */ 226 - pci_write_config_dword(dev, 0x48, 0xb9317542); 227 - 228 - /* USB 1.1 OHCI controller 1, interrupt: PIRQE */ 229 - pci_write_config_byte(dev, 0x86, 0x0c); 230 - 231 - /* USB 1.1 OHCI controller 2, interrupt: PIRQF */ 232 - pci_write_config_byte(dev, 0x87, 0x0d); 233 - 234 - /* USB 1.1 OHCI controller 3, interrupt: PIRQH */ 235 - pci_write_config_byte(dev, 0x88, 0x0f); 236 - 237 - /* USB 2.0 controller, interrupt: PIRQ7 */ 238 - pci_write_config_byte(dev, 0x74, 0x06); 239 - 240 - /* Audio controller, interrupt: PIRQE */ 241 - pci_write_config_byte(dev, 0x8a, 0x0c); 242 - 243 - /* Modem controller, interrupt: PIRQF */ 244 - pci_write_config_byte(dev, 0x8b, 0x0d); 245 - 246 - /* HD audio controller, interrupt: PIRQG */ 247 - pci_write_config_byte(dev, 0x8c, 0x0e); 248 - 249 - /* Serial ATA interrupt: PIRQD */ 250 - pci_write_config_byte(dev, 0x8d, 0x0b); 251 - 252 - /* SMB interrupt: PIRQH */ 253 - pci_write_config_byte(dev, 0x8e, 0x0f); 254 - 255 - /* PMU ACPI SCI interrupt: PIRQH */ 256 - pci_write_config_byte(dev, 0x8f, 0x0f); 257 - 258 - /* Primary PATA IDE IRQ: 14 259 - * Secondary PATA IDE IRQ: 15 260 - */ 261 - pci_write_config_byte(dev, 0x44, 0x3d); 262 - pci_write_config_byte(dev, 0x75, 0x0f); 263 - 264 - /* Set IRQ14 and IRQ15 to legacy IRQs */ 265 - pci_read_config_word(dev, 0x46, &temp); 266 - temp |= 0xc000; 267 - pci_write_config_word(dev, 0x46, temp); 268 - 269 - /* Set i8259 interrupt trigger 270 - * IRQ 3: Level 271 - * IRQ 4: Level 272 - * IRQ 5: Level 273 - * IRQ 6: Level 274 - * IRQ 7: Level 275 - * IRQ 9: Level 276 - * IRQ 10: Level 277 - * IRQ 11: Level 278 - * IRQ 12: Level 279 - * IRQ 14: Edge 280 - * IRQ 15: Edge 281 - */ 282 - outb(0xfa, 0x4d0); 283 - outb(0x1e, 0x4d1); 284 - } 285 - 286 - static void __devinit quirk_uli5288(struct pci_dev *dev) 287 - { 288 - unsigned char c; 289 - 290 - pci_read_config_byte(dev,0x83,&c); 291 - c |= 0x80; 292 - pci_write_config_byte(dev, 0x83, c); 293 - 294 - pci_write_config_byte(dev, 0x09, 0x01); 295 - pci_write_config_byte(dev, 0x0a, 0x06); 296 - 297 - pci_read_config_byte(dev,0x83,&c); 298 - c &= 0x7f; 299 - pci_write_config_byte(dev, 0x83, c); 300 - 301 - pci_read_config_byte(dev,0x84,&c); 302 - c |= 0x01; 303 - pci_write_config_byte(dev, 0x84, c); 304 - } 305 - 306 - static void __devinit quirk_uli5229(struct pci_dev *dev) 307 - { 308 - unsigned short temp; 309 - pci_write_config_word(dev, 0x04, 0x0405); 310 - pci_read_config_word(dev, 0x4a, &temp); 311 - temp |= 0x1000; 312 - pci_write_config_word(dev, 0x4a, temp); 313 - } 314 - 315 - static void __devinit early_uli5249(struct pci_dev *dev) 316 - { 317 - unsigned char temp; 318 - pci_write_config_word(dev, 0x04, 0x0007); 319 - pci_read_config_byte(dev, 0x7c, &temp); 320 - pci_write_config_byte(dev, 0x7c, 0x80); 321 - pci_write_config_byte(dev, 0x09, 0x01); 322 - pci_write_config_byte(dev, 0x7c, temp); 323 - dev->class |= 0x1; 324 - } 325 - 326 - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_ali1575); 327 - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288); 328 - DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); 329 - DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, 0x5249, early_uli5249);
-4
include/asm-powerpc/mpc86xx.h
··· 19 19 20 20 #ifdef CONFIG_PPC_86xx 21 21 22 - #ifdef CONFIG_MPC8641_HPCN 23 - #include <platforms/86xx/mpc8641_hpcn.h> 24 - #endif 25 - 26 22 #define _IO_BASE isa_io_base 27 23 #define _ISA_MEM_BASE isa_mem_base 28 24 #ifdef CONFIG_PCI