aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/8260_io/enet.c4
-rw-r--r--arch/ppc/8260_io/fcc_enet.c4
-rw-r--r--arch/ppc/8xx_io/enet.c4
-rw-r--r--arch/ppc/8xx_io/fec.c2
-rw-r--r--arch/ppc/Kconfig6
-rw-r--r--arch/ppc/kernel/misc.S8
-rw-r--r--arch/ppc/kernel/pci.c6
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c1
-rw-r--r--arch/ppc/kernel/setup.c2
-rw-r--r--arch/ppc/kernel/traps.c3
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S5
-rw-r--r--arch/ppc/mm/fault.c23
-rw-r--r--arch/ppc/mm/tlb.c1
-rw-r--r--arch/ppc/platforms/4xx/bamboo.c1
-rw-r--r--arch/ppc/platforms/4xx/bubinga.c1
-rw-r--r--arch/ppc/platforms/4xx/cpci405.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.c1
-rw-r--r--arch/ppc/platforms/4xx/luan.c1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c1
-rw-r--r--arch/ppc/platforms/4xx/taishan.c1
-rw-r--r--arch/ppc/platforms/4xx/yucca.c1
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c1
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/ev64260.c1
-rw-r--r--arch/ppc/platforms/prep_setup.c3
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c1
-rw-r--r--arch/ppc/platforms/spruce.c1
-rw-r--r--arch/ppc/syslib/Makefile1
-rw-r--r--arch/ppc/syslib/indirect_pci.c134
-rw-r--r--arch/ppc/syslib/mv64x60.c1
-rw-r--r--arch/ppc/syslib/virtex_devices.c38
-rw-r--r--arch/ppc/syslib/virtex_devices.h7
32 files changed, 211 insertions, 55 deletions
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index 4c0a7d732f69..615b6583d9b0 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -477,9 +477,9 @@ for (;;) {
477 } 477 }
478 else { 478 else {
479 skb_put(skb,pkt_len-4); /* Make room */ 479 skb_put(skb,pkt_len-4); /* Make room */
480 eth_copy_and_sum(skb, 480 skb_copy_to_linear_data(skb,
481 (unsigned char *)__va(bdp->cbd_bufaddr), 481 (unsigned char *)__va(bdp->cbd_bufaddr),
482 pkt_len-4, 0); 482 pkt_len-4);
483 skb->protocol=eth_type_trans(skb,dev); 483 skb->protocol=eth_type_trans(skb,dev);
484 netif_rx(skb); 484 netif_rx(skb);
485 } 485 }
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index cab395da25da..6f3ed6a72e0b 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -734,9 +734,9 @@ for (;;) {
734 } 734 }
735 else { 735 else {
736 skb_put(skb,pkt_len); /* Make room */ 736 skb_put(skb,pkt_len); /* Make room */
737 eth_copy_and_sum(skb, 737 skb_copy_to_linear_data(skb,
738 (unsigned char *)__va(bdp->cbd_bufaddr), 738 (unsigned char *)__va(bdp->cbd_bufaddr),
739 pkt_len, 0); 739 pkt_len);
740 skb->protocol=eth_type_trans(skb,dev); 740 skb->protocol=eth_type_trans(skb,dev);
741 netif_rx(skb); 741 netif_rx(skb);
742 } 742 }
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index e58288e14369..703d47eee436 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -506,9 +506,9 @@ for (;;) {
506 } 506 }
507 else { 507 else {
508 skb_put(skb,pkt_len-4); /* Make room */ 508 skb_put(skb,pkt_len-4); /* Make room */
509 eth_copy_and_sum(skb, 509 skb_copy_to_linear_data(skb,
510 cep->rx_vaddr[bdp - cep->rx_bd_base], 510 cep->rx_vaddr[bdp - cep->rx_bd_base],
511 pkt_len-4, 0); 511 pkt_len-4);
512 skb->protocol=eth_type_trans(skb,dev); 512 skb->protocol=eth_type_trans(skb,dev);
513 netif_rx(skb); 513 netif_rx(skb);
514 } 514 }
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index d38335d2d710..0288279be9aa 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -725,7 +725,7 @@ while (!(bdp->cbd_sc & BD_ENET_RX_EMPTY)) {
725 fep->stats.rx_dropped++; 725 fep->stats.rx_dropped++;
726 } else { 726 } else {
727 skb_put(skb,pkt_len-4); /* Make room */ 727 skb_put(skb,pkt_len-4); /* Make room */
728 eth_copy_and_sum(skb, data, pkt_len-4, 0); 728 skb_copy_to_linear_data(skb, data, pkt_len-4);
729 skb->protocol=eth_type_trans(skb,dev); 729 skb->protocol=eth_type_trans(skb,dev);
730 netif_rx(skb); 730 netif_rx(skb);
731 } 731 }
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index ccce2a4a1522..6bdeeb70b157 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1237,8 +1237,10 @@ config PCI
1237 infrastructure code to support PCI bus devices. 1237 infrastructure code to support PCI bus devices.
1238 1238
1239config PCI_DOMAINS 1239config PCI_DOMAINS
1240 bool 1240 def_bool PCI
1241 default PCI 1241
1242config PCI_SYSCALL
1243 def_bool PCI
1242 1244
1243config MPC83xx_PCI2 1245config MPC83xx_PCI2
1244 bool "Support for 2nd PCI host controller" 1246 bool "Support for 2nd PCI host controller"
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index d319f9ba2379..0da55368655c 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -328,7 +328,7 @@ BEGIN_FTR_SECTION
328 mtspr SPRN_L1CSR0,r3 328 mtspr SPRN_L1CSR0,r3
329 isync 329 isync
330 blr 330 blr
331END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 331END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
332 mfspr r3,SPRN_L1CSR1 332 mfspr r3,SPRN_L1CSR1
333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR 333 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
334 mtspr SPRN_L1CSR1,r3 334 mtspr SPRN_L1CSR1,r3
@@ -355,7 +355,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
355_GLOBAL(__flush_icache_range) 355_GLOBAL(__flush_icache_range)
356BEGIN_FTR_SECTION 356BEGIN_FTR_SECTION
357 blr /* for 601, do nothing */ 357 blr /* for 601, do nothing */
358END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 358END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
359 li r5,L1_CACHE_BYTES-1 359 li r5,L1_CACHE_BYTES-1
360 andc r3,r3,r5 360 andc r3,r3,r5
361 subf r4,r3,r4 361 subf r4,r3,r4
@@ -472,7 +472,7 @@ _GLOBAL(flush_dcache_all)
472_GLOBAL(__flush_dcache_icache) 472_GLOBAL(__flush_dcache_icache)
473BEGIN_FTR_SECTION 473BEGIN_FTR_SECTION
474 blr /* for 601, do nothing */ 474 blr /* for 601, do nothing */
475END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 475END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
476 rlwinm r3,r3,0,0,19 /* Get page base address */ 476 rlwinm r3,r3,0,0,19 /* Get page base address */
477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */ 477 li r4,4096/L1_CACHE_BYTES /* Number of lines in a page */
478 mtctr r4 478 mtctr r4
@@ -500,7 +500,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE)
500_GLOBAL(__flush_dcache_icache_phys) 500_GLOBAL(__flush_dcache_icache_phys)
501BEGIN_FTR_SECTION 501BEGIN_FTR_SECTION
502 blr /* for 601, do nothing */ 502 blr /* for 601, do nothing */
503END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) 503END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
504 mfmsr r10 504 mfmsr r10
505 rlwinm r0,r10,0,28,26 /* clear DR */ 505 rlwinm r0,r10,0,28,26 /* clear DR */
506 mtmsr r0 506 mtmsr r0
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 5e723c4c2571..c2ec13bea006 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -633,12 +633,6 @@ void pcibios_make_OF_bus_map(void)
633{ 633{
634} 634}
635 635
636/* Add sysfs properties */
637void pcibios_add_platform_entries(struct pci_dev *pdev)
638{
639}
640
641
642static int __init 636static int __init
643pcibios_init(void) 637pcibios_init(void)
644{ 638{
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index a4165209ac7c..63f0a987139b 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -64,7 +64,6 @@ extern unsigned long mm_ptov (unsigned long paddr);
64 64
65EXPORT_SYMBOL(clear_pages); 65EXPORT_SYMBOL(clear_pages);
66EXPORT_SYMBOL(clear_user_page); 66EXPORT_SYMBOL(clear_user_page);
67EXPORT_SYMBOL(do_signal);
68EXPORT_SYMBOL(transfer_to_handler); 67EXPORT_SYMBOL(transfer_to_handler);
69EXPORT_SYMBOL(do_IRQ); 68EXPORT_SYMBOL(do_IRQ);
70EXPORT_SYMBOL(machine_check_exception); 69EXPORT_SYMBOL(machine_check_exception);
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index c79704f5409c..967c1ef59a6b 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -526,7 +526,7 @@ void __init setup_arch(char **cmdline_p)
526 * Systems with OF can look in the properties on the cpu node(s) 526 * Systems with OF can look in the properties on the cpu node(s)
527 * for a possibly more accurate value. 527 * for a possibly more accurate value.
528 */ 528 */
529 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 529 if (! cpu_has_feature(CPU_FTR_UNIFIED_ID_CACHE)) {
530 dcache_bsize = cur_cpu_spec->dcache_bsize; 530 dcache_bsize = cur_cpu_spec->dcache_bsize;
531 icache_bsize = cur_cpu_spec->icache_bsize; 531 icache_bsize = cur_cpu_spec->icache_bsize;
532 ucache_bsize = 0; 532 ucache_bsize = 0;
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index aea100be52c8..3f3b292eb773 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -92,6 +92,7 @@ int die(const char * str, struct pt_regs * fp, long err)
92 if (nl) 92 if (nl)
93 printk("\n"); 93 printk("\n");
94 show_regs(fp); 94 show_regs(fp);
95 add_taint(TAINT_DIE);
95 spin_unlock_irq(&die_lock); 96 spin_unlock_irq(&die_lock);
96 /* do_exit() should take care of panic'ing from an interrupt 97 /* do_exit() should take care of panic'ing from an interrupt
97 * context so we don't handle it here 98 * context so we don't handle it here
@@ -619,7 +620,7 @@ void program_check_exception(struct pt_regs *regs)
619 return; 620 return;
620 621
621 if (!(regs->msr & MSR_PR) && /* not user-mode */ 622 if (!(regs->msr & MSR_PR) && /* not user-mode */
622 report_bug(regs->nip) == BUG_TRAP_TYPE_WARN) { 623 report_bug(regs->nip, regs) == BUG_TRAP_TYPE_WARN) {
623 regs->nip += 4; 624 regs->nip += 4;
624 return; 625 return;
625 } 626 }
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 19db8746ff14..c0aac3ff9e91 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -130,10 +130,7 @@ SECTIONS
130 __ftr_fixup : { *(__ftr_fixup) } 130 __ftr_fixup : { *(__ftr_fixup) }
131 __stop___ftr_fixup = .; 131 __stop___ftr_fixup = .;
132 132
133 . = ALIGN(4096); 133 PERCPU(4096)
134 __per_cpu_start = .;
135 .data.percpu : { *(.data.percpu) }
136 __per_cpu_end = .;
137 134
138#ifdef CONFIG_BLK_DEV_INITRD 135#ifdef CONFIG_BLK_DEV_INITRD
139 . = ALIGN(4096); 136 . = ALIGN(4096);
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 465f451f3bc3..b98244e277fb 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -96,6 +96,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
96 struct mm_struct *mm = current->mm; 96 struct mm_struct *mm = current->mm;
97 siginfo_t info; 97 siginfo_t info;
98 int code = SEGV_MAPERR; 98 int code = SEGV_MAPERR;
99 int fault;
99#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) 100#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
100 int is_write = error_code & ESR_DST; 101 int is_write = error_code & ESR_DST;
101#else 102#else
@@ -249,20 +250,18 @@ good_area:
249 * the fault. 250 * the fault.
250 */ 251 */
251 survive: 252 survive:
252 switch (handle_mm_fault(mm, vma, address, is_write)) { 253 fault = handle_mm_fault(mm, vma, address, is_write);
253 case VM_FAULT_MINOR: 254 if (unlikely(fault & VM_FAULT_ERROR)) {
254 current->min_flt++; 255 if (fault & VM_FAULT_OOM)
255 break; 256 goto out_of_memory;
256 case VM_FAULT_MAJOR: 257 else if (fault & VM_FAULT_SIGBUS)
257 current->maj_flt++; 258 goto do_sigbus;
258 break;
259 case VM_FAULT_SIGBUS:
260 goto do_sigbus;
261 case VM_FAULT_OOM:
262 goto out_of_memory;
263 default:
264 BUG(); 259 BUG();
265 } 260 }
261 if (fault & VM_FAULT_MAJOR)
262 current->maj_flt++;
263 else
264 current->min_flt++;
266 265
267 up_read(&mm->mmap_sem); 266 up_read(&mm->mmap_sem);
268 /* 267 /*
diff --git a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c
index fa29740a28f5..4ff260bc9dd1 100644
--- a/arch/ppc/mm/tlb.c
+++ b/arch/ppc/mm/tlb.c
@@ -27,6 +27,7 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/highmem.h> 29#include <linux/highmem.h>
30#include <linux/pagemap.h>
30#include <asm/tlbflush.h> 31#include <asm/tlbflush.h>
31#include <asm/tlb.h> 32#include <asm/tlb.h>
32 33
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c
index 349660b84a02..017623c9bc4b 100644
--- a/arch/ppc/platforms/4xx/bamboo.c
+++ b/arch/ppc/platforms/4xx/bamboo.c
@@ -29,6 +29,7 @@
29#include <linux/tty.h> 29#include <linux/tty.h>
30#include <linux/serial.h> 30#include <linux/serial.h>
31#include <linux/serial_core.h> 31#include <linux/serial_core.h>
32#include <linux/serial_8250.h>
32#include <linux/ethtool.h> 33#include <linux/ethtool.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c
index 1a7f075b754f..cd696be55aca 100644
--- a/arch/ppc/platforms/4xx/bubinga.c
+++ b/arch/ppc/platforms/4xx/bubinga.c
@@ -21,6 +21,7 @@
21#include <linux/tty.h> 21#include <linux/tty.h>
22#include <linux/serial.h> 22#include <linux/serial.h>
23#include <linux/serial_core.h> 23#include <linux/serial_core.h>
24#include <linux/serial_8250.h>
24 25
25#include <asm/system.h> 26#include <asm/system.h>
26#include <asm/pci-bridge.h> 27#include <asm/pci-bridge.h>
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c
index 8474b05b795a..2e7e25dd84cb 100644
--- a/arch/ppc/platforms/4xx/cpci405.c
+++ b/arch/ppc/platforms/4xx/cpci405.c
@@ -23,6 +23,7 @@
23#include <asm/todc.h> 23#include <asm/todc.h>
24#include <linux/serial.h> 24#include <linux/serial.h>
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
26#include <asm/ocp.h> 27#include <asm/ocp.h>
27#include <asm/ibm_ocp_pci.h> 28#include <asm/ibm_ocp_pci.h>
28#include <platforms/4xx/ibm405gp.h> 29#include <platforms/4xx/ibm405gp.h>
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index f0f9cc8480ca..05d7184d7e14 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -32,6 +32,7 @@
32#include <linux/tty.h> 32#include <linux/tty.h>
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_core.h> 34#include <linux/serial_core.h>
35#include <linux/serial_8250.h>
35 36
36#include <asm/system.h> 37#include <asm/system.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 61706ef37112..4b169610f154 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index 5e994e146ba8..fd0f971881d6 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33 34
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index 5d9af8ddb155..888c492b4a45 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -30,6 +30,7 @@
30#include <linux/tty.h> 30#include <linux/tty.h>
31#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/serial_core.h> 32#include <linux/serial_core.h>
33#include <linux/serial_8250.h>
33#include <linux/platform_device.h> 34#include <linux/platform_device.h>
34#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
35#include <linux/mtd/nand.h> 36#include <linux/mtd/nand.h>
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
index 346787df0ddb..a83b0baea011 100644
--- a/arch/ppc/platforms/4xx/yucca.c
+++ b/arch/ppc/platforms/4xx/yucca.c
@@ -31,6 +31,7 @@
31#include <linux/tty.h> 31#include <linux/tty.h>
32#include <linux/serial.h> 32#include <linux/serial.h>
33#include <linux/serial_core.h> 33#include <linux/serial_core.h>
34#include <linux/serial_8250.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
36#include <asm/pgtable.h> 37#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
index 1d10ab98f66d..3d7addbdecfd 100644
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.c
@@ -26,6 +26,7 @@
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */ 27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h> 28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
29#include <linux/initrd.h> 30#include <linux/initrd.h>
30#include <linux/module.h> 31#include <linux/module.h>
31#include <linux/fsl_devices.h> 32#include <linux/fsl_devices.h>
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index a764ae71cbcb..248684f50dd9 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -25,6 +25,7 @@
25#include <linux/ide.h> 25#include <linux/ide.h>
26#include <linux/serial.h> 26#include <linux/serial.h>
27#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/serial_8250.h>
28#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index 4957a7bcde22..976270d537c1 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> 36#include <linux/tty.h>
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#else 39#else
39#include <linux/mv643xx.h> 40#include <linux/mv643xx.h>
40#endif 41#endif
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 6f21110a9747..3c56654bfc6f 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -69,9 +69,6 @@
69 69
70TODC_ALLOC(); 70TODC_ALLOC();
71 71
72unsigned char ucBoardRev;
73unsigned char ucBoardRevMaj, ucBoardRevMin;
74
75extern unsigned char prep_nvram_read_val(int addr); 72extern unsigned char prep_nvram_read_val(int addr);
76extern void prep_nvram_write_val(int addr, 73extern void prep_nvram_write_val(int addr,
77 unsigned char val); 74 unsigned char val);
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index b55860734a72..44d4398a36ff 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -35,6 +35,7 @@
35#include <linux/serial.h> 35#include <linux/serial.h>
36#include <linux/tty.h> /* for linux/serial_core.h */ 36#include <linux/tty.h> /* for linux/serial_core.h */
37#include <linux/serial_core.h> 37#include <linux/serial_core.h>
38#include <linux/serial_8250.h>
38#include <linux/mv643xx.h> 39#include <linux/mv643xx.h>
39#include <linux/netdevice.h> 40#include <linux/netdevice.h>
40#include <linux/platform_device.h> 41#include <linux/platform_device.h>
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c
index 3c7842784876..f4de50ba292e 100644
--- a/arch/ppc/platforms/spruce.c
+++ b/arch/ppc/platforms/spruce.c
@@ -27,6 +27,7 @@
27#include <linux/serial.h> 27#include <linux/serial.h>
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/serial_core.h> 29#include <linux/serial_core.h>
30#include <linux/serial_8250.h>
30 31
31#include <asm/system.h> 32#include <asm/system.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 95694159b226..543795be58c8 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -7,6 +7,7 @@ CFLAGS_btext.o += -fPIC
7 7
8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o 8wdt-mpc8xx-$(CONFIG_8xx_WDT) += m8xx_wdt.o
9 9
10obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
10obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o 11obj-$(CONFIG_PPCBUG_NVRAM) += prep_nvram.o
11obj-$(CONFIG_PPC_OCP) += ocp.o 12obj-$(CONFIG_PPC_OCP) += ocp.o
12obj-$(CONFIG_IBM_OCP) += ibm_ocp.o 13obj-$(CONFIG_IBM_OCP) += ibm_ocp.o
diff --git a/arch/ppc/syslib/indirect_pci.c b/arch/ppc/syslib/indirect_pci.c
new file mode 100644
index 000000000000..83b323a7d029
--- /dev/null
+++ b/arch/ppc/syslib/indirect_pci.c
@@ -0,0 +1,134 @@
1/*
2 * Support for indirect PCI bridges.
3 *
4 * Copyright (C) 1998 Gabriel Paubert.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
10 */
11
12#include <linux/kernel.h>
13#include <linux/pci.h>
14#include <linux/delay.h>
15#include <linux/string.h>
16#include <linux/init.h>
17
18#include <asm/io.h>
19#include <asm/prom.h>
20#include <asm/pci-bridge.h>
21#include <asm/machdep.h>
22
23#ifdef CONFIG_PPC_INDIRECT_PCI_BE
24#define PCI_CFG_OUT out_be32
25#else
26#define PCI_CFG_OUT out_le32
27#endif
28
29static int
30indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
31 int len, u32 *val)
32{
33 struct pci_controller *hose = bus->sysdata;
34 volatile void __iomem *cfg_data;
35 u8 cfg_type = 0;
36
37 if (ppc_md.pci_exclude_device)
38 if (ppc_md.pci_exclude_device(bus->number, devfn))
39 return PCIBIOS_DEVICE_NOT_FOUND;
40
41 if (hose->set_cfg_type)
42 if (bus->number != hose->first_busno)
43 cfg_type = 1;
44
45 PCI_CFG_OUT(hose->cfg_addr,
46 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
47 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
48
49 /*
50 * Note: the caller has already checked that offset is
51 * suitably aligned and that len is 1, 2 or 4.
52 */
53 cfg_data = hose->cfg_data + (offset & 3);
54 switch (len) {
55 case 1:
56 *val = in_8(cfg_data);
57 break;
58 case 2:
59 *val = in_le16(cfg_data);
60 break;
61 default:
62 *val = in_le32(cfg_data);
63 break;
64 }
65 return PCIBIOS_SUCCESSFUL;
66}
67
68static int
69indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
70 int len, u32 val)
71{
72 struct pci_controller *hose = bus->sysdata;
73 volatile void __iomem *cfg_data;
74 u8 cfg_type = 0;
75
76 if (ppc_md.pci_exclude_device)
77 if (ppc_md.pci_exclude_device(bus->number, devfn))
78 return PCIBIOS_DEVICE_NOT_FOUND;
79
80 if (hose->set_cfg_type)
81 if (bus->number != hose->first_busno)
82 cfg_type = 1;
83
84 PCI_CFG_OUT(hose->cfg_addr,
85 (0x80000000 | ((bus->number - hose->bus_offset) << 16)
86 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
87
88 /*
89 * Note: the caller has already checked that offset is
90 * suitably aligned and that len is 1, 2 or 4.
91 */
92 cfg_data = hose->cfg_data + (offset & 3);
93 switch (len) {
94 case 1:
95 out_8(cfg_data, val);
96 break;
97 case 2:
98 out_le16(cfg_data, val);
99 break;
100 default:
101 out_le32(cfg_data, val);
102 break;
103 }
104 return PCIBIOS_SUCCESSFUL;
105}
106
107static struct pci_ops indirect_pci_ops =
108{
109 indirect_read_config,
110 indirect_write_config
111};
112
113void __init
114setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
115 void __iomem * cfg_data)
116{
117 hose->cfg_addr = cfg_addr;
118 hose->cfg_data = cfg_data;
119 hose->ops = &indirect_pci_ops;
120}
121
122void __init
123setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
124{
125 unsigned long base = cfg_addr & PAGE_MASK;
126 void __iomem *mbase, *addr, *data;
127
128 mbase = ioremap(base, PAGE_SIZE);
129 addr = mbase + (cfg_addr & ~PAGE_MASK);
130 if ((cfg_data & PAGE_MASK) != base)
131 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
132 data = mbase + (cfg_data & ~PAGE_MASK);
133 setup_indirect_pci_nomap(hose, addr, data);
134}
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c
index 8485a68cd475..032f4b7f4225 100644
--- a/arch/ppc/syslib/mv64x60.c
+++ b/arch/ppc/syslib/mv64x60.c
@@ -2415,7 +2415,6 @@ static struct bin_attribute mv64xxx_hs_reg_attr = { /* Hotswap register */
2415 .attr = { 2415 .attr = {
2416 .name = "hs_reg", 2416 .name = "hs_reg",
2417 .mode = S_IRUGO | S_IWUSR, 2417 .mode = S_IRUGO | S_IWUSR,
2418 .owner = THIS_MODULE,
2419 }, 2418 },
2420 .size = VAL_LEN_MAX, 2419 .size = VAL_LEN_MAX,
2421 .read = mv64xxx_hs_reg_read, 2420 .read = mv64xxx_hs_reg_read,
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c
index 16546788e23b..ace4ec08de51 100644
--- a/arch/ppc/syslib/virtex_devices.c
+++ b/arch/ppc/syslib/virtex_devices.c
@@ -71,6 +71,21 @@
71 }, \ 71 }, \
72} 72}
73 73
74/*
75 * ML300/ML403 Video Device: shortcut macro for single instance
76 */
77#define XPAR_TFT(num) { \
78 .name = "xilinxfb", \
79 .id = num, \
80 .num_resources = 1, \
81 .resource = (struct resource[]) { \
82 { \
83 .start = XPAR_TFT_##num##_BASEADDR, \
84 .end = XPAR_TFT_##num##_BASEADDR+7, \
85 .flags = IORESOURCE_IO, \
86 }, \
87 }, \
88}
74 89
75/* UART 8250 driver platform data table */ 90/* UART 8250 driver platform data table */
76struct plat_serial8250_port virtex_serial_platform_data[] = { 91struct plat_serial8250_port virtex_serial_platform_data[] = {
@@ -146,20 +161,17 @@ struct platform_device virtex_platform_devices[] = {
146 XPAR_SYSACE(1), 161 XPAR_SYSACE(1),
147#endif 162#endif
148 163
149 /* ML300/403 reference design framebuffer */
150#if defined(XPAR_TFT_0_BASEADDR) 164#if defined(XPAR_TFT_0_BASEADDR)
151 { 165 XPAR_TFT(0),
152 .name = "xilinxfb", 166#endif
153 .id = 0, 167#if defined(XPAR_TFT_1_BASEADDR)
154 .num_resources = 1, 168 XPAR_TFT(1),
155 .resource = (struct resource[]) { 169#endif
156 { 170#if defined(XPAR_TFT_2_BASEADDR)
157 .start = XPAR_TFT_0_BASEADDR, 171 XPAR_TFT(2),
158 .end = XPAR_TFT_0_BASEADDR+7, 172#endif
159 .flags = IORESOURCE_IO, 173#if defined(XPAR_TFT_3_BASEADDR)
160 }, 174 XPAR_TFT(3),
161 },
162 },
163#endif 175#endif
164}; 176};
165 177
diff --git a/arch/ppc/syslib/virtex_devices.h b/arch/ppc/syslib/virtex_devices.h
index 3d4be1412f60..9f38d92ae536 100644
--- a/arch/ppc/syslib/virtex_devices.h
+++ b/arch/ppc/syslib/virtex_devices.h
@@ -31,4 +31,11 @@ void __init virtex_early_serial_map(void);
31 */ 31 */
32int virtex_device_fixup(struct platform_device *dev); 32int virtex_device_fixup(struct platform_device *dev);
33 33
34/* SPI Controller IP */
35struct xspi_platform_data {
36 s16 bus_num;
37 u16 num_chipselect;
38 u32 speed_hz;
39};
40
34#endif /* __ASM_VIRTEX_DEVICES_H__ */ 41#endif /* __ASM_VIRTEX_DEVICES_H__ */