diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:52:26 -0400 |
commit | ccaa36f73544163ef6e15eb29a620130755f6001 (patch) | |
tree | b5cf50592c45e25edbd66fea451e6941e455fa83 /arch/powerpc/platforms | |
parent | b4a9071af62f95dc6d22040a0b37ac7225ce4d54 (diff) | |
parent | 5e980823581682d1566e7b5089cf827ddd5f3c94 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
[POWERPC] Fix rheap alignment problem
[POWERPC] Use check_legacy_ioport() for ISAPnP
[POWERPC] Avoid NULL pointer in gpio1_interrupt
[POWERPC] Enable generic rtc hook for the MPC8349 mITX
[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
[POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
[POWERPC] fix spin lock nesting in hvc_iseries
[POWERPC] EEH failure to mark pci slot as frozen.
[POWERPC] update powerpc defconfig files after libata kconfig breakage
[POWERPC] enable sysrq in pmac32_defconfig
[POWERPC] UPIO_TSI cleanup
[POWERPC] rewrite mkprep and mkbugboot in sane C
[POWERPC] maple/pci iomem annotations
[POWERPC] powerpc oprofile __user annotations
[POWERPC] cell spufs iomem annotations
[POWERPC] NULL noise removal: spufs
[POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
[POWERPC] update mpc8349_itx_defconfig and remove some debug settings
[POWERPC] Always call cede in pseries dedicated idle loop
[POWERPC] Fix loop logic in irq_alloc_virt()
...
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_itx.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 21 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 120 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.h | 61 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/hw_ops.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/maple/pci.c | 60 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 24 |
11 files changed, 252 insertions, 56 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 969fbb6d8c4..8c676d763bb 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -109,6 +109,10 @@ static int __init mpc834x_itx_probe(void) | |||
109 | return 1; | 109 | return 1; |
110 | } | 110 | } |
111 | 111 | ||
112 | #ifdef CONFIG_RTC_CLASS | ||
113 | late_initcall(rtc_class_hookup); | ||
114 | #endif | ||
115 | |||
112 | define_machine(mpc834x_itx) { | 116 | define_machine(mpc834x_itx) { |
113 | .name = "MPC834x ITX", | 117 | .name = "MPC834x ITX", |
114 | .probe = mpc834x_itx_probe, | 118 | .probe = mpc834x_itx_probe, |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index c3268d9877e..0584f3c7e88 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -11,6 +11,12 @@ config MPC8540_ADS | |||
11 | help | 11 | help |
12 | This option enables support for the MPC 8540 ADS board | 12 | This option enables support for the MPC 8540 ADS board |
13 | 13 | ||
14 | config MPC8560_ADS | ||
15 | bool "Freescale MPC8560 ADS" | ||
16 | select DEFAULT_UIMAGE | ||
17 | help | ||
18 | This option enables support for the MPC 8560 ADS board | ||
19 | |||
14 | config MPC85xx_CDS | 20 | config MPC85xx_CDS |
15 | bool "Freescale MPC85xx CDS" | 21 | bool "Freescale MPC85xx CDS" |
16 | select DEFAULT_UIMAGE | 22 | select DEFAULT_UIMAGE |
@@ -25,6 +31,11 @@ config MPC8540 | |||
25 | select PPC_INDIRECT_PCI | 31 | select PPC_INDIRECT_PCI |
26 | default y if MPC8540_ADS || MPC85xx_CDS | 32 | default y if MPC8540_ADS || MPC85xx_CDS |
27 | 33 | ||
34 | config MPC8560 | ||
35 | bool | ||
36 | select PPC_INDIRECT_PCI | ||
37 | default y if MPC8560_ADS | ||
38 | |||
28 | config PPC_INDIRECT_PCI_BE | 39 | config PPC_INDIRECT_PCI_BE |
29 | bool | 40 | bool |
30 | depends on PPC_85xx | 41 | depends on PPC_85xx |
@@ -34,4 +45,14 @@ config MPIC | |||
34 | bool | 45 | bool |
35 | default y | 46 | default y |
36 | 47 | ||
48 | config CPM2 | ||
49 | bool | ||
50 | depends on MPC8560 | ||
51 | default y | ||
52 | help | ||
53 | The CPM2 (Communications Processor Module) is a coprocessor on | ||
54 | embedded CPUs made by Motorola. Selecting this option means that | ||
55 | you wish to build a kernel for a machine with a CPM2 coprocessor | ||
56 | on it. | ||
57 | |||
37 | endmenu | 58 | endmenu |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 7615aa59c78..282f5d0d015 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -3,4 +3,5 @@ | |||
3 | # | 3 | # |
4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o | 4 | obj-$(CONFIG_PPC_85xx) += misc.o pci.o |
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | 5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o |
6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o | ||
6 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | 7 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index cae6b73357d..28070e7ae50 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -32,6 +32,13 @@ | |||
32 | #include <sysdev/fsl_soc.h> | 32 | #include <sysdev/fsl_soc.h> |
33 | #include "mpc85xx.h" | 33 | #include "mpc85xx.h" |
34 | 34 | ||
35 | #ifdef CONFIG_CPM2 | ||
36 | #include <linux/fs_enet_pd.h> | ||
37 | #include <asm/cpm2.h> | ||
38 | #include <sysdev/cpm2_pic.h> | ||
39 | #include <asm/fs_pd.h> | ||
40 | #endif | ||
41 | |||
35 | #ifndef CONFIG_PCI | 42 | #ifndef CONFIG_PCI |
36 | unsigned long isa_io_base = 0; | 43 | unsigned long isa_io_base = 0; |
37 | unsigned long isa_mem_base = 0; | 44 | unsigned long isa_mem_base = 0; |
@@ -57,12 +64,29 @@ mpc85xx_pcibios_fixup(void) | |||
57 | } | 64 | } |
58 | #endif /* CONFIG_PCI */ | 65 | #endif /* CONFIG_PCI */ |
59 | 66 | ||
67 | #ifdef CONFIG_CPM2 | ||
68 | |||
69 | static void cpm2_cascade(unsigned int irq, struct irq_desc *desc, | ||
70 | struct pt_regs *regs) | ||
71 | { | ||
72 | int cascade_irq; | ||
73 | |||
74 | while ((cascade_irq = cpm2_get_irq(regs)) >= 0) { | ||
75 | generic_handle_irq(cascade_irq, regs); | ||
76 | } | ||
77 | desc->chip->eoi(irq); | ||
78 | } | ||
79 | |||
80 | #endif /* CONFIG_CPM2 */ | ||
60 | 81 | ||
61 | void __init mpc85xx_ads_pic_init(void) | 82 | void __init mpc85xx_ads_pic_init(void) |
62 | { | 83 | { |
63 | struct mpic *mpic; | 84 | struct mpic *mpic; |
64 | struct resource r; | 85 | struct resource r; |
65 | struct device_node *np = NULL; | 86 | struct device_node *np = NULL; |
87 | #ifdef CONFIG_CPM2 | ||
88 | int irq; | ||
89 | #endif | ||
66 | 90 | ||
67 | np = of_find_node_by_type(np, "open-pic"); | 91 | np = of_find_node_by_type(np, "open-pic"); |
68 | 92 | ||
@@ -104,11 +128,103 @@ void __init mpc85xx_ads_pic_init(void) | |||
104 | mpic_assign_isu(mpic, 14, r.start + 0x10100); | 128 | mpic_assign_isu(mpic, 14, r.start + 0x10100); |
105 | 129 | ||
106 | mpic_init(mpic); | 130 | mpic_init(mpic); |
131 | |||
132 | #ifdef CONFIG_CPM2 | ||
133 | /* Setup CPM2 PIC */ | ||
134 | np = of_find_node_by_type(NULL, "cpm-pic"); | ||
135 | if (np == NULL) { | ||
136 | printk(KERN_ERR "PIC init: can not find cpm-pic node\n"); | ||
137 | return; | ||
138 | } | ||
139 | irq = irq_of_parse_and_map(np, 0); | ||
140 | |||
141 | cpm2_pic_init(np); | ||
142 | set_irq_chained_handler(irq, cpm2_cascade); | ||
143 | #endif | ||
107 | } | 144 | } |
108 | 145 | ||
109 | /* | 146 | /* |
110 | * Setup the architecture | 147 | * Setup the architecture |
111 | */ | 148 | */ |
149 | #ifdef CONFIG_CPM2 | ||
150 | void init_fcc_ioports(struct fs_platform_info *fpi) | ||
151 | { | ||
152 | struct io_port *io = cpm2_map(im_ioport); | ||
153 | int fcc_no = fs_get_fcc_index(fpi->fs_no); | ||
154 | int target; | ||
155 | u32 tempval; | ||
156 | |||
157 | switch(fcc_no) { | ||
158 | case 1: | ||
159 | tempval = in_be32(&io->iop_pdirb); | ||
160 | tempval &= ~PB2_DIRB0; | ||
161 | tempval |= PB2_DIRB1; | ||
162 | out_be32(&io->iop_pdirb, tempval); | ||
163 | |||
164 | tempval = in_be32(&io->iop_psorb); | ||
165 | tempval &= ~PB2_PSORB0; | ||
166 | tempval |= PB2_PSORB1; | ||
167 | out_be32(&io->iop_psorb, tempval); | ||
168 | |||
169 | tempval = in_be32(&io->iop_pparb); | ||
170 | tempval |= (PB2_DIRB0 | PB2_DIRB1); | ||
171 | out_be32(&io->iop_pparb, tempval); | ||
172 | |||
173 | target = CPM_CLK_FCC2; | ||
174 | break; | ||
175 | case 2: | ||
176 | tempval = in_be32(&io->iop_pdirb); | ||
177 | tempval &= ~PB3_DIRB0; | ||
178 | tempval |= PB3_DIRB1; | ||
179 | out_be32(&io->iop_pdirb, tempval); | ||
180 | |||
181 | tempval = in_be32(&io->iop_psorb); | ||
182 | tempval &= ~PB3_PSORB0; | ||
183 | tempval |= PB3_PSORB1; | ||
184 | out_be32(&io->iop_psorb, tempval); | ||
185 | |||
186 | tempval = in_be32(&io->iop_pparb); | ||
187 | tempval |= (PB3_DIRB0 | PB3_DIRB1); | ||
188 | out_be32(&io->iop_pparb, tempval); | ||
189 | |||
190 | tempval = in_be32(&io->iop_pdirc); | ||
191 | tempval |= PC3_DIRC1; | ||
192 | out_be32(&io->iop_pdirc, tempval); | ||
193 | |||
194 | tempval = in_be32(&io->iop_pparc); | ||
195 | tempval |= PC3_DIRC1; | ||
196 | out_be32(&io->iop_pparc, tempval); | ||
197 | |||
198 | target = CPM_CLK_FCC3; | ||
199 | break; | ||
200 | default: | ||
201 | printk(KERN_ERR "init_fcc_ioports: invalid FCC number\n"); | ||
202 | return; | ||
203 | } | ||
204 | |||
205 | /* Port C has clocks...... */ | ||
206 | tempval = in_be32(&io->iop_psorc); | ||
207 | tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8)); | ||
208 | out_be32(&io->iop_psorc, tempval); | ||
209 | |||
210 | tempval = in_be32(&io->iop_pdirc); | ||
211 | tempval &= ~(PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8)); | ||
212 | out_be32(&io->iop_pdirc, tempval); | ||
213 | tempval = in_be32(&io->iop_pparc); | ||
214 | tempval |= (PC_CLK(fpi->clk_rx - 8) | PC_CLK(fpi->clk_tx - 8)); | ||
215 | out_be32(&io->iop_pparc, tempval); | ||
216 | |||
217 | cpm2_unmap(io); | ||
218 | |||
219 | /* Configure Serial Interface clock routing. | ||
220 | * First, clear FCC bits to zero, | ||
221 | * then set the ones we want. | ||
222 | */ | ||
223 | cpm2_clk_setup(target, fpi->clk_rx, CPM_CLK_RX); | ||
224 | cpm2_clk_setup(target, fpi->clk_tx, CPM_CLK_TX); | ||
225 | } | ||
226 | #endif | ||
227 | |||
112 | static void __init mpc85xx_ads_setup_arch(void) | 228 | static void __init mpc85xx_ads_setup_arch(void) |
113 | { | 229 | { |
114 | struct device_node *cpu; | 230 | struct device_node *cpu; |
@@ -131,6 +247,10 @@ static void __init mpc85xx_ads_setup_arch(void) | |||
131 | of_node_put(cpu); | 247 | of_node_put(cpu); |
132 | } | 248 | } |
133 | 249 | ||
250 | #ifdef CONFIG_CPM2 | ||
251 | cpm2_reset(); | ||
252 | #endif | ||
253 | |||
134 | #ifdef CONFIG_PCI | 254 | #ifdef CONFIG_PCI |
135 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 255 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
136 | add_bridge(np); | 256 | add_bridge(np); |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.h b/arch/powerpc/platforms/85xx/mpc85xx_ads.h new file mode 100644 index 00000000000..effcbf78f85 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * MPC85xx ADS board definitions | ||
3 | * | ||
4 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
5 | * | ||
6 | * Copyright 2004 Freescale Semiconductor Inc. | ||
7 | * | ||
8 | * 2006 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __MACH_MPC85XXADS_H | ||
19 | #define __MACH_MPC85XXADS_H | ||
20 | |||
21 | #include <linux/config.h> | ||
22 | #include <linux/initrd.h> | ||
23 | #include <sysdev/fsl_soc.h> | ||
24 | |||
25 | #define BCSR_ADDR ((uint)0xf8000000) | ||
26 | #define BCSR_SIZE ((uint)(32 * 1024)) | ||
27 | |||
28 | #ifdef CONFIG_CPM2 | ||
29 | |||
30 | #define MPC85xx_CPM_OFFSET (0x80000) | ||
31 | |||
32 | #define CPM_MAP_ADDR (get_immrbase() + MPC85xx_CPM_OFFSET) | ||
33 | #define CPM_IRQ_OFFSET 60 | ||
34 | |||
35 | #define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET) | ||
36 | #define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET) | ||
37 | #define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET) | ||
38 | #define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET) | ||
39 | #define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET) | ||
40 | #define SIU_INT_SCC4 ((uint)0x2b+CPM_IRQ_OFFSET) | ||
41 | |||
42 | /* FCC1 Clock Source Configuration. These can be | ||
43 | * redefined in the board specific file. | ||
44 | * Can only choose from CLK9-12 */ | ||
45 | #define F1_RXCLK 12 | ||
46 | #define F1_TXCLK 11 | ||
47 | |||
48 | /* FCC2 Clock Source Configuration. These can be | ||
49 | * redefined in the board specific file. | ||
50 | * Can only choose from CLK13-16 */ | ||
51 | #define F2_RXCLK 13 | ||
52 | #define F2_TXCLK 14 | ||
53 | |||
54 | /* FCC3 Clock Source Configuration. These can be | ||
55 | * redefined in the board specific file. | ||
56 | * Can only choose from CLK13-16 */ | ||
57 | #define F3_RXCLK 15 | ||
58 | #define F3_TXCLK 16 | ||
59 | |||
60 | #endif /* CONFIG_CPM2 */ | ||
61 | #endif /* __MACH_MPC85XXADS_H */ | ||
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 3bd36d46ab4..0f5c8ebc7fc 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -538,7 +538,7 @@ static void __iomem * __init map_spe_prop(struct spu *spu, | |||
538 | 538 | ||
539 | const void *p; | 539 | const void *p; |
540 | int proplen; | 540 | int proplen; |
541 | void* ret = NULL; | 541 | void __iomem *ret = NULL; |
542 | int err = 0; | 542 | int err = 0; |
543 | 543 | ||
544 | p = get_property(n, name, &proplen); | 544 | p = get_property(n, name, &proplen); |
@@ -562,7 +562,7 @@ static void spu_unmap(struct spu *spu) | |||
562 | iounmap(spu->priv2); | 562 | iounmap(spu->priv2); |
563 | iounmap(spu->priv1); | 563 | iounmap(spu->priv1); |
564 | iounmap(spu->problem); | 564 | iounmap(spu->problem); |
565 | iounmap((u8 __iomem *)spu->local_store); | 565 | iounmap((__force u8 __iomem *)spu->local_store); |
566 | } | 566 | } |
567 | 567 | ||
568 | /* This function shall be abstracted for HV platforms */ | 568 | /* This function shall be abstracted for HV platforms */ |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 58e794f9da1..51fd197ab5d 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -1342,7 +1342,7 @@ static u64 spufs_id_get(void *data) | |||
1342 | 1342 | ||
1343 | return num; | 1343 | return num; |
1344 | } | 1344 | } |
1345 | DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, 0, "0x%llx\n") | 1345 | DEFINE_SIMPLE_ATTRIBUTE(spufs_id_ops, spufs_id_get, NULL, "0x%llx\n") |
1346 | 1346 | ||
1347 | struct tree_descr spufs_dir_contents[] = { | 1347 | struct tree_descr spufs_dir_contents[] = { |
1348 | { "mem", &spufs_mem_fops, 0666, }, | 1348 | { "mem", &spufs_mem_fops, 0666, }, |
diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c index c8670f51973..efc452e71ab 100644 --- a/arch/powerpc/platforms/cell/spufs/hw_ops.c +++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c | |||
@@ -234,7 +234,7 @@ static void spu_hw_runcntl_stop(struct spu_context *ctx) | |||
234 | 234 | ||
235 | static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode) | 235 | static int spu_hw_set_mfc_query(struct spu_context * ctx, u32 mask, u32 mode) |
236 | { | 236 | { |
237 | struct spu_problem *prob = ctx->spu->problem; | 237 | struct spu_problem __iomem *prob = ctx->spu->problem; |
238 | int ret; | 238 | int ret; |
239 | 239 | ||
240 | spin_lock_irq(&ctx->spu->register_lock); | 240 | spin_lock_irq(&ctx->spu->register_lock); |
@@ -263,7 +263,7 @@ static int spu_hw_send_mfc_command(struct spu_context *ctx, | |||
263 | struct mfc_dma_command *cmd) | 263 | struct mfc_dma_command *cmd) |
264 | { | 264 | { |
265 | u32 status; | 265 | u32 status; |
266 | struct spu_problem *prob = ctx->spu->problem; | 266 | struct spu_problem __iomem *prob = ctx->spu->problem; |
267 | 267 | ||
268 | spin_lock_irq(&ctx->spu->register_lock); | 268 | spin_lock_irq(&ctx->spu->register_lock); |
269 | out_be32(&prob->mfc_lsa_W, cmd->lsa); | 269 | out_be32(&prob->mfc_lsa_W, cmd->lsa); |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index c3aa46b8e2b..1b827618e05 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -96,14 +96,14 @@ static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) | |||
96 | 1UL; | 96 | 1UL; |
97 | } | 97 | } |
98 | 98 | ||
99 | static unsigned long u3_agp_cfg_access(struct pci_controller* hose, | 99 | static volatile void __iomem *u3_agp_cfg_access(struct pci_controller* hose, |
100 | u8 bus, u8 dev_fn, u8 offset) | 100 | u8 bus, u8 dev_fn, u8 offset) |
101 | { | 101 | { |
102 | unsigned int caddr; | 102 | unsigned int caddr; |
103 | 103 | ||
104 | if (bus == hose->first_busno) { | 104 | if (bus == hose->first_busno) { |
105 | if (dev_fn < (11 << 3)) | 105 | if (dev_fn < (11 << 3)) |
106 | return 0; | 106 | return NULL; |
107 | caddr = u3_agp_cfa0(dev_fn, offset); | 107 | caddr = u3_agp_cfa0(dev_fn, offset); |
108 | } else | 108 | } else |
109 | caddr = u3_agp_cfa1(bus, dev_fn, offset); | 109 | caddr = u3_agp_cfa1(bus, dev_fn, offset); |
@@ -114,14 +114,14 @@ static unsigned long u3_agp_cfg_access(struct pci_controller* hose, | |||
114 | } while (in_le32(hose->cfg_addr) != caddr); | 114 | } while (in_le32(hose->cfg_addr) != caddr); |
115 | 115 | ||
116 | offset &= 0x07; | 116 | offset &= 0x07; |
117 | return ((unsigned long)hose->cfg_data) + offset; | 117 | return hose->cfg_data + offset; |
118 | } | 118 | } |
119 | 119 | ||
120 | static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, | 120 | static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, |
121 | int offset, int len, u32 *val) | 121 | int offset, int len, u32 *val) |
122 | { | 122 | { |
123 | struct pci_controller *hose; | 123 | struct pci_controller *hose; |
124 | unsigned long addr; | 124 | volatile void __iomem *addr; |
125 | 125 | ||
126 | hose = pci_bus_to_host(bus); | 126 | hose = pci_bus_to_host(bus); |
127 | if (hose == NULL) | 127 | if (hose == NULL) |
@@ -136,13 +136,13 @@ static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, | |||
136 | */ | 136 | */ |
137 | switch (len) { | 137 | switch (len) { |
138 | case 1: | 138 | case 1: |
139 | *val = in_8((u8 *)addr); | 139 | *val = in_8(addr); |
140 | break; | 140 | break; |
141 | case 2: | 141 | case 2: |
142 | *val = in_le16((u16 *)addr); | 142 | *val = in_le16(addr); |
143 | break; | 143 | break; |
144 | default: | 144 | default: |
145 | *val = in_le32((u32 *)addr); | 145 | *val = in_le32(addr); |
146 | break; | 146 | break; |
147 | } | 147 | } |
148 | return PCIBIOS_SUCCESSFUL; | 148 | return PCIBIOS_SUCCESSFUL; |
@@ -152,7 +152,7 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
152 | int offset, int len, u32 val) | 152 | int offset, int len, u32 val) |
153 | { | 153 | { |
154 | struct pci_controller *hose; | 154 | struct pci_controller *hose; |
155 | unsigned long addr; | 155 | volatile void __iomem *addr; |
156 | 156 | ||
157 | hose = pci_bus_to_host(bus); | 157 | hose = pci_bus_to_host(bus); |
158 | if (hose == NULL) | 158 | if (hose == NULL) |
@@ -167,16 +167,16 @@ static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
167 | */ | 167 | */ |
168 | switch (len) { | 168 | switch (len) { |
169 | case 1: | 169 | case 1: |
170 | out_8((u8 *)addr, val); | 170 | out_8(addr, val); |
171 | (void) in_8((u8 *)addr); | 171 | (void) in_8(addr); |
172 | break; | 172 | break; |
173 | case 2: | 173 | case 2: |
174 | out_le16((u16 *)addr, val); | 174 | out_le16(addr, val); |
175 | (void) in_le16((u16 *)addr); | 175 | (void) in_le16(addr); |
176 | break; | 176 | break; |
177 | default: | 177 | default: |
178 | out_le32((u32 *)addr, val); | 178 | out_le32(addr, val); |
179 | (void) in_le32((u32 *)addr); | 179 | (void) in_le32(addr); |
180 | break; | 180 | break; |
181 | } | 181 | } |
182 | return PCIBIOS_SUCCESSFUL; | 182 | return PCIBIOS_SUCCESSFUL; |
@@ -198,22 +198,22 @@ static unsigned long u3_ht_cfa1(u8 bus, u8 devfn, u8 off) | |||
198 | return u3_ht_cfa0(devfn, off) + (bus << 16) + 0x01000000UL; | 198 | return u3_ht_cfa0(devfn, off) + (bus << 16) + 0x01000000UL; |
199 | } | 199 | } |
200 | 200 | ||
201 | static unsigned long u3_ht_cfg_access(struct pci_controller* hose, | 201 | static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, |
202 | u8 bus, u8 devfn, u8 offset) | 202 | u8 bus, u8 devfn, u8 offset) |
203 | { | 203 | { |
204 | if (bus == hose->first_busno) { | 204 | if (bus == hose->first_busno) { |
205 | if (PCI_SLOT(devfn) == 0) | 205 | if (PCI_SLOT(devfn) == 0) |
206 | return 0; | 206 | return NULL; |
207 | return ((unsigned long)hose->cfg_data) + u3_ht_cfa0(devfn, offset); | 207 | return hose->cfg_data + u3_ht_cfa0(devfn, offset); |
208 | } else | 208 | } else |
209 | return ((unsigned long)hose->cfg_data) + u3_ht_cfa1(bus, devfn, offset); | 209 | return hose->cfg_data + u3_ht_cfa1(bus, devfn, offset); |
210 | } | 210 | } |
211 | 211 | ||
212 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | 212 | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, |
213 | int offset, int len, u32 *val) | 213 | int offset, int len, u32 *val) |
214 | { | 214 | { |
215 | struct pci_controller *hose; | 215 | struct pci_controller *hose; |
216 | unsigned long addr; | 216 | volatile void __iomem *addr; |
217 | 217 | ||
218 | hose = pci_bus_to_host(bus); | 218 | hose = pci_bus_to_host(bus); |
219 | if (hose == NULL) | 219 | if (hose == NULL) |
@@ -232,13 +232,13 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, | |||
232 | */ | 232 | */ |
233 | switch (len) { | 233 | switch (len) { |
234 | case 1: | 234 | case 1: |
235 | *val = in_8((u8 *)addr); | 235 | *val = in_8(addr); |
236 | break; | 236 | break; |
237 | case 2: | 237 | case 2: |
238 | *val = in_le16((u16 *)addr); | 238 | *val = in_le16(addr); |
239 | break; | 239 | break; |
240 | default: | 240 | default: |
241 | *val = in_le32((u32 *)addr); | 241 | *val = in_le32(addr); |
242 | break; | 242 | break; |
243 | } | 243 | } |
244 | return PCIBIOS_SUCCESSFUL; | 244 | return PCIBIOS_SUCCESSFUL; |
@@ -248,7 +248,7 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
248 | int offset, int len, u32 val) | 248 | int offset, int len, u32 val) |
249 | { | 249 | { |
250 | struct pci_controller *hose; | 250 | struct pci_controller *hose; |
251 | unsigned long addr; | 251 | volatile void __iomem *addr; |
252 | 252 | ||
253 | hose = pci_bus_to_host(bus); | 253 | hose = pci_bus_to_host(bus); |
254 | if (hose == NULL) | 254 | if (hose == NULL) |
@@ -266,16 +266,16 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, | |||
266 | */ | 266 | */ |
267 | switch (len) { | 267 | switch (len) { |
268 | case 1: | 268 | case 1: |
269 | out_8((u8 *)addr, val); | 269 | out_8(addr, val); |
270 | (void) in_8((u8 *)addr); | 270 | (void) in_8(addr); |
271 | break; | 271 | break; |
272 | case 2: | 272 | case 2: |
273 | out_le16((u16 *)addr, val); | 273 | out_le16(addr, val); |
274 | (void) in_le16((u16 *)addr); | 274 | (void) in_le16(addr); |
275 | break; | 275 | break; |
276 | default: | 276 | default: |
277 | out_le32((u32 *)addr, val); | 277 | out_le32(addr, val); |
278 | (void) in_le32((u32 *)addr); | 278 | (void) in_le32(addr); |
279 | break; | 279 | break; |
280 | } | 280 | } |
281 | return PCIBIOS_SUCCESSFUL; | 281 | return PCIBIOS_SUCCESSFUL; |
@@ -315,7 +315,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
315 | * the reg address cell, we shall fix that by killing struct | 315 | * the reg address cell, we shall fix that by killing struct |
316 | * reg_property and using some accessor functions instead | 316 | * reg_property and using some accessor functions instead |
317 | */ | 317 | */ |
318 | hose->cfg_data = (volatile unsigned char *)ioremap(0xf2000000, 0x02000000); | 318 | hose->cfg_data = ioremap(0xf2000000, 0x02000000); |
319 | 319 | ||
320 | hose->first_busno = 0; | 320 | hose->first_busno = 0; |
321 | hose->last_busno = 0xef; | 321 | hose->last_busno = 0xef; |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 84bc8f7e17e..3c2d63ebf78 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -225,6 +225,7 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag) | |||
225 | 225 | ||
226 | void eeh_mark_slot (struct device_node *dn, int mode_flag) | 226 | void eeh_mark_slot (struct device_node *dn, int mode_flag) |
227 | { | 227 | { |
228 | struct pci_dev *dev; | ||
228 | dn = find_device_pe (dn); | 229 | dn = find_device_pe (dn); |
229 | 230 | ||
230 | /* Back up one, since config addrs might be shared */ | 231 | /* Back up one, since config addrs might be shared */ |
@@ -232,6 +233,12 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag) | |||
232 | dn = dn->parent; | 233 | dn = dn->parent; |
233 | 234 | ||
234 | PCI_DN(dn)->eeh_mode |= mode_flag; | 235 | PCI_DN(dn)->eeh_mode |= mode_flag; |
236 | |||
237 | /* Mark the pci device too */ | ||
238 | dev = PCI_DN(dn)->pcidev; | ||
239 | if (dev) | ||
240 | dev->error_state = pci_channel_io_frozen; | ||
241 | |||
235 | __eeh_mark_slot (dn->child, mode_flag); | 242 | __eeh_mark_slot (dn->child, mode_flag); |
236 | } | 243 | } |
237 | 244 | ||
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 4f0097f31bd..43dbf737698 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -477,7 +477,6 @@ static void pseries_dedicated_idle_sleep(void) | |||
477 | { | 477 | { |
478 | unsigned int cpu = smp_processor_id(); | 478 | unsigned int cpu = smp_processor_id(); |
479 | unsigned long start_snooze; | 479 | unsigned long start_snooze; |
480 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); | ||
481 | 480 | ||
482 | /* | 481 | /* |
483 | * Indicate to the HV that we are idle. Now would be | 482 | * Indicate to the HV that we are idle. Now would be |
@@ -490,9 +489,9 @@ static void pseries_dedicated_idle_sleep(void) | |||
490 | * has been checked recently. If we should poll for a little | 489 | * has been checked recently. If we should poll for a little |
491 | * while, do so. | 490 | * while, do so. |
492 | */ | 491 | */ |
493 | if (*smt_snooze_delay) { | 492 | if (__get_cpu_var(smt_snooze_delay)) { |
494 | start_snooze = get_tb() + | 493 | start_snooze = get_tb() + |
495 | *smt_snooze_delay * tb_ticks_per_usec; | 494 | __get_cpu_var(smt_snooze_delay) * tb_ticks_per_usec; |
496 | local_irq_enable(); | 495 | local_irq_enable(); |
497 | set_thread_flag(TIF_POLLING_NRFLAG); | 496 | set_thread_flag(TIF_POLLING_NRFLAG); |
498 | 497 | ||
@@ -512,24 +511,7 @@ static void pseries_dedicated_idle_sleep(void) | |||
512 | goto out; | 511 | goto out; |
513 | } | 512 | } |
514 | 513 | ||
515 | /* | 514 | cede_processor(); |
516 | * If not SMT, cede processor. If CPU is running SMT | ||
517 | * cede if the other thread is not idle, so that it can | ||
518 | * go single-threaded. If the other thread is idle, | ||
519 | * we ask the hypervisor if it has pending work it | ||
520 | * wants to do and cede if it does. Otherwise we keep | ||
521 | * polling in order to reduce interrupt latency. | ||
522 | * | ||
523 | * Doing the cede when the other thread is active will | ||
524 | * result in this thread going dormant, meaning the other | ||
525 | * thread gets to run in single-threaded (ST) mode, which | ||
526 | * is slightly faster than SMT mode with this thread at | ||
527 | * very low priority. The cede enables interrupts, which | ||
528 | * doesn't matter here. | ||
529 | */ | ||
530 | if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle | ||
531 | || poll_pending() == H_PENDING) | ||
532 | cede_processor(); | ||
533 | 515 | ||
534 | out: | 516 | out: |
535 | HMT_medium(); | 517 | HMT_medium(); |