aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-11 03:22:04 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-11 03:22:04 -0500
commit95fd4845ed0ffcab305b4f30ce1c12dc34f1b56c (patch)
treeaa2aac22a5b329b778a6771a87bbf1945ad49bbd /arch/powerpc/platforms
parentd278c48435625cb6b7edcf6a547620768b175709 (diff)
parent8e4921515c1a379539607eb443d51c30f4f7f338 (diff)
Merge commit 'v2.6.29-rc4' into perfcounters/core
Conflicts: arch/x86/kernel/setup_percpu.c arch/x86/mm/fault.c drivers/acpi/processor_idle.c kernel/irq/handle.c
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/44x/Makefile1
-rw-r--r--arch/powerpc/platforms/44x/warp-nand.c135
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c24
-rw-r--r--arch/powerpc/platforms/83xx/mpc831x_rdb.c1
-rw-r--r--arch/powerpc/platforms/pseries/phyp_dump.c26
5 files changed, 24 insertions, 163 deletions
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile
index 698133180aee..01f51daace13 100644
--- a/arch/powerpc/platforms/44x/Makefile
+++ b/arch/powerpc/platforms/44x/Makefile
@@ -3,5 +3,4 @@ obj-$(CONFIG_PPC44x_SIMPLE) += ppc44x_simple.o
3obj-$(CONFIG_EBONY) += ebony.o 3obj-$(CONFIG_EBONY) += ebony.o
4obj-$(CONFIG_SAM440EP) += sam440ep.o 4obj-$(CONFIG_SAM440EP) += sam440ep.o
5obj-$(CONFIG_WARP) += warp.o 5obj-$(CONFIG_WARP) += warp.o
6obj-$(CONFIG_WARP) += warp-nand.o
7obj-$(CONFIG_XILINX_VIRTEX_5_FXT) += virtex.o 6obj-$(CONFIG_XILINX_VIRTEX_5_FXT) += virtex.o
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
deleted file mode 100644
index 89ecd76127d8..000000000000
--- a/arch/powerpc/platforms/44x/warp-nand.c
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * PIKA Warp(tm) NAND flash specific routines
3 *
4 * Copyright (c) 2008 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
6 */
7
8#include <linux/platform_device.h>
9#include <linux/mtd/mtd.h>
10#include <linux/mtd/map.h>
11#include <linux/mtd/partitions.h>
12#include <linux/mtd/nand.h>
13#include <linux/mtd/ndfc.h>
14#include <linux/of.h>
15#include <asm/machdep.h>
16
17
18#ifdef CONFIG_MTD_NAND_NDFC
19
20#define CS_NAND_0 1 /* use chip select 1 for NAND device 0 */
21
22#define WARP_NAND_FLASH_REG_ADDR 0xD0000000UL
23#define WARP_NAND_FLASH_REG_SIZE 0x2000
24
25static struct resource warp_ndfc = {
26 .start = WARP_NAND_FLASH_REG_ADDR,
27 .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE - 1,
28 .flags = IORESOURCE_MEM,
29};
30
31static struct mtd_partition nand_parts[] = {
32 {
33 .name = "kernel",
34 .offset = 0,
35 .size = 0x0200000
36 },
37 {
38 .name = "root",
39 .offset = 0x0200000,
40 .size = 0x3E00000
41 },
42 {
43 .name = "persistent",
44 .offset = 0x4000000,
45 .size = 0x4000000
46 },
47 {
48 .name = "persistent1",
49 .offset = 0x8000000,
50 .size = 0x4000000
51 },
52 {
53 .name = "persistent2",
54 .offset = 0xC000000,
55 .size = 0x4000000
56 }
57};
58
59struct ndfc_controller_settings warp_ndfc_settings = {
60 .ccr_settings = (NDFC_CCR_BS(CS_NAND_0) | NDFC_CCR_ARAC1),
61 .ndfc_erpn = 0,
62};
63
64static struct ndfc_chip_settings warp_chip0_settings = {
65 .bank_settings = 0x80002222,
66};
67
68struct platform_nand_ctrl warp_nand_ctrl = {
69 .priv = &warp_ndfc_settings,
70};
71
72static struct platform_device warp_ndfc_device = {
73 .name = "ndfc-nand",
74 .id = 0,
75 .dev = {
76 .platform_data = &warp_nand_ctrl,
77 },
78 .num_resources = 1,
79 .resource = &warp_ndfc,
80};
81
82/* Do NOT set the ecclayout: let it default so it is correct for both
83 * 64M and 256M flash chips.
84 */
85static struct platform_nand_chip warp_nand_chip0 = {
86 .nr_chips = 1,
87 .chip_offset = CS_NAND_0,
88 .nr_partitions = ARRAY_SIZE(nand_parts),
89 .partitions = nand_parts,
90 .chip_delay = 20,
91 .priv = &warp_chip0_settings,
92};
93
94static struct platform_device warp_nand_device = {
95 .name = "ndfc-chip",
96 .id = 0,
97 .num_resources = 0,
98 .dev = {
99 .platform_data = &warp_nand_chip0,
100 .parent = &warp_ndfc_device.dev,
101 }
102};
103
104static int warp_setup_nand_flash(void)
105{
106 struct device_node *np;
107
108 /* Try to detect a rev A based on NOR size. */
109 np = of_find_compatible_node(NULL, NULL, "cfi-flash");
110 if (np) {
111 struct property *pp;
112
113 pp = of_find_property(np, "reg", NULL);
114 if (pp && (pp->length == 12)) {
115 u32 *v = pp->value;
116 if (v[2] == 0x4000000) {
117 /* Rev A = 64M NAND */
118 warp_nand_chip0.nr_partitions = 3;
119
120 nand_parts[1].size = 0x3000000;
121 nand_parts[2].offset = 0x3200000;
122 nand_parts[2].size = 0x0e00000;
123 }
124 }
125 of_node_put(np);
126 }
127
128 platform_device_register(&warp_ndfc_device);
129 platform_device_register(&warp_nand_device);
130
131 return 0;
132}
133machine_device_initcall(warp, warp_setup_nand_flash);
134
135#endif
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index c3f2c21024e3..87ff522f28b5 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -20,14 +20,6 @@
20 20
21 21
22/* ======================================================================== */ 22/* ======================================================================== */
23/* PCI windows config */
24/* ======================================================================== */
25
26#define MPC52xx_PCI_TARGET_IO 0xf0000000
27#define MPC52xx_PCI_TARGET_MEM 0x00000000
28
29
30/* ======================================================================== */
31/* Structures mapping & Defines for PCI Unit */ 23/* Structures mapping & Defines for PCI Unit */
32/* ======================================================================== */ 24/* ======================================================================== */
33 25
@@ -244,7 +236,7 @@ static struct pci_ops mpc52xx_pci_ops = {
244 236
245static void __init 237static void __init
246mpc52xx_pci_setup(struct pci_controller *hose, 238mpc52xx_pci_setup(struct pci_controller *hose,
247 struct mpc52xx_pci __iomem *pci_regs) 239 struct mpc52xx_pci __iomem *pci_regs, phys_addr_t pci_phys)
248{ 240{
249 struct resource *res; 241 struct resource *res;
250 u32 tmp; 242 u32 tmp;
@@ -314,10 +306,14 @@ mpc52xx_pci_setup(struct pci_controller *hose,
314 /* Set all the IWCR fields at once; they're in the same reg */ 306 /* Set all the IWCR fields at once; they're in the same reg */
315 out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2)); 307 out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2));
316 308
317 out_be32(&pci_regs->tbatr0, 309 /* Map IMMR onto PCI bus */
318 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO ); 310 pci_phys &= 0xfffc0000; /* bar0 has only 14 significant bits */
319 out_be32(&pci_regs->tbatr1, 311 out_be32(&pci_regs->tbatr0, MPC52xx_PCI_TBATR_ENABLE | pci_phys);
320 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM ); 312 out_be32(&pci_regs->bar0, PCI_BASE_ADDRESS_MEM_PREFETCH | pci_phys);
313
314 /* Map memory onto PCI bus */
315 out_be32(&pci_regs->tbatr1, MPC52xx_PCI_TBATR_ENABLE);
316 out_be32(&pci_regs->bar1, PCI_BASE_ADDRESS_MEM_PREFETCH);
321 317
322 out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8); 318 out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8);
323 319
@@ -414,7 +410,7 @@ mpc52xx_add_bridge(struct device_node *node)
414 410
415 /* Finish setting up PCI using values obtained by 411 /* Finish setting up PCI using values obtained by
416 * pci_proces_bridge_OF_ranges */ 412 * pci_proces_bridge_OF_ranges */
417 mpc52xx_pci_setup(hose, pci_regs); 413 mpc52xx_pci_setup(hose, pci_regs, rsrc.start);
418 414
419 return 0; 415 return 0;
420} 416}
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index 5177bdd2c62a..91a2c80b9d72 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -71,6 +71,7 @@ static int __init mpc831x_rdb_probe(void)
71 71
72static struct of_device_id __initdata of_bus_ids[] = { 72static struct of_device_id __initdata of_bus_ids[] = {
73 { .compatible = "simple-bus" }, 73 { .compatible = "simple-bus" },
74 { .compatible = "gianfar" },
74 {}, 75 {},
75}; 76};
76 77
diff --git a/arch/powerpc/platforms/pseries/phyp_dump.c b/arch/powerpc/platforms/pseries/phyp_dump.c
index 6cf35cd8d0b5..15eb6107bcd2 100644
--- a/arch/powerpc/platforms/pseries/phyp_dump.c
+++ b/arch/powerpc/platforms/pseries/phyp_dump.c
@@ -144,8 +144,8 @@ static void print_dump_header(const struct phyp_dump_header *ph)
144 ph->first_offset_section); 144 ph->first_offset_section);
145 printk(KERN_INFO "dump disk sections should be zero\n"); 145 printk(KERN_INFO "dump disk sections should be zero\n");
146 printk(KERN_INFO "dump disk section = %d\n", ph->dump_disk_section); 146 printk(KERN_INFO "dump disk section = %d\n", ph->dump_disk_section);
147 printk(KERN_INFO "block num = %ld\n", ph->block_num_dd); 147 printk(KERN_INFO "block num = %lld\n", ph->block_num_dd);
148 printk(KERN_INFO "number of blocks = %ld\n", ph->num_of_blocks_dd); 148 printk(KERN_INFO "number of blocks = %lld\n", ph->num_of_blocks_dd);
149 printk(KERN_INFO "dump disk offset = %d\n", ph->offset_dd); 149 printk(KERN_INFO "dump disk offset = %d\n", ph->offset_dd);
150 printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto); 150 printk(KERN_INFO "Max auto time= %d\n", ph->maxtime_to_auto);
151 151
@@ -154,33 +154,33 @@ static void print_dump_header(const struct phyp_dump_header *ph)
154 printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags); 154 printk(KERN_INFO "cpu dump_flags =%d\n", ph->cpu_data.dump_flags);
155 printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type); 155 printk(KERN_INFO "cpu source_type =%d\n", ph->cpu_data.source_type);
156 printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags); 156 printk(KERN_INFO "cpu error_flags =%d\n", ph->cpu_data.error_flags);
157 printk(KERN_INFO "cpu source_address =%lx\n", 157 printk(KERN_INFO "cpu source_address =%llx\n",
158 ph->cpu_data.source_address); 158 ph->cpu_data.source_address);
159 printk(KERN_INFO "cpu source_length =%lx\n", 159 printk(KERN_INFO "cpu source_length =%llx\n",
160 ph->cpu_data.source_length); 160 ph->cpu_data.source_length);
161 printk(KERN_INFO "cpu length_copied =%lx\n", 161 printk(KERN_INFO "cpu length_copied =%llx\n",
162 ph->cpu_data.length_copied); 162 ph->cpu_data.length_copied);
163 163
164 printk(KERN_INFO " HPTE AREA \n"); 164 printk(KERN_INFO " HPTE AREA \n");
165 printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags); 165 printk(KERN_INFO "HPTE dump_flags =%d\n", ph->hpte_data.dump_flags);
166 printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type); 166 printk(KERN_INFO "HPTE source_type =%d\n", ph->hpte_data.source_type);
167 printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags); 167 printk(KERN_INFO "HPTE error_flags =%d\n", ph->hpte_data.error_flags);
168 printk(KERN_INFO "HPTE source_address =%lx\n", 168 printk(KERN_INFO "HPTE source_address =%llx\n",
169 ph->hpte_data.source_address); 169 ph->hpte_data.source_address);
170 printk(KERN_INFO "HPTE source_length =%lx\n", 170 printk(KERN_INFO "HPTE source_length =%llx\n",
171 ph->hpte_data.source_length); 171 ph->hpte_data.source_length);
172 printk(KERN_INFO "HPTE length_copied =%lx\n", 172 printk(KERN_INFO "HPTE length_copied =%llx\n",
173 ph->hpte_data.length_copied); 173 ph->hpte_data.length_copied);
174 174
175 printk(KERN_INFO " SRSD AREA \n"); 175 printk(KERN_INFO " SRSD AREA \n");
176 printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags); 176 printk(KERN_INFO "SRSD dump_flags =%d\n", ph->kernel_data.dump_flags);
177 printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type); 177 printk(KERN_INFO "SRSD source_type =%d\n", ph->kernel_data.source_type);
178 printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags); 178 printk(KERN_INFO "SRSD error_flags =%d\n", ph->kernel_data.error_flags);
179 printk(KERN_INFO "SRSD source_address =%lx\n", 179 printk(KERN_INFO "SRSD source_address =%llx\n",
180 ph->kernel_data.source_address); 180 ph->kernel_data.source_address);
181 printk(KERN_INFO "SRSD source_length =%lx\n", 181 printk(KERN_INFO "SRSD source_length =%llx\n",
182 ph->kernel_data.source_length); 182 ph->kernel_data.source_length);
183 printk(KERN_INFO "SRSD length_copied =%lx\n", 183 printk(KERN_INFO "SRSD length_copied =%llx\n",
184 ph->kernel_data.length_copied); 184 ph->kernel_data.length_copied);
185#endif 185#endif
186} 186}
@@ -367,8 +367,8 @@ static ssize_t show_release_region(struct kobject *kobj,
367 /* total reserved size - start of scratch area */ 367 /* total reserved size - start of scratch area */
368 second_addr_range = phyp_dump_info->init_reserve_size - 368 second_addr_range = phyp_dump_info->init_reserve_size -
369 phyp_dump_info->reserved_scratch_size; 369 phyp_dump_info->reserved_scratch_size;
370 return sprintf(buf, "CPU:0x%lx-0x%lx: HPTE:0x%lx-0x%lx:" 370 return sprintf(buf, "CPU:0x%llx-0x%llx: HPTE:0x%llx-0x%llx:"
371 " DUMP:0x%lx-0x%lx, 0x%lx-0x%lx:\n", 371 " DUMP:0x%llx-0x%llx, 0x%lx-0x%llx:\n",
372 phdr.cpu_data.destination_address, 372 phdr.cpu_data.destination_address,
373 phdr.cpu_data.length_copied, 373 phdr.cpu_data.length_copied,
374 phdr.hpte_data.destination_address, 374 phdr.hpte_data.destination_address,