diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/configs/mpc834x_itx_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/traps.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/Kconfig | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc8360e_pb.c | 19 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 1 | ||||
-rw-r--r-- | arch/ppc/kernel/time.c | 4 | ||||
-rw-r--r-- | arch/ppc/platforms/mpc8272ads_setup.c | 4 | ||||
-rw-r--r-- | arch/ppc/platforms/mpc866ads_setup.c | 4 | ||||
-rw-r--r-- | arch/ppc/platforms/mpc885ads_setup.c | 4 |
15 files changed, 75 insertions, 30 deletions
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig index cd3535e1a095..0561b73a918f 100644 --- a/arch/powerpc/configs/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/mpc834x_itx_defconfig | |||
@@ -1248,7 +1248,7 @@ CONFIG_PARTITION_ADVANCED=y | |||
1248 | # CONFIG_AMIGA_PARTITION is not set | 1248 | # CONFIG_AMIGA_PARTITION is not set |
1249 | # CONFIG_ATARI_PARTITION is not set | 1249 | # CONFIG_ATARI_PARTITION is not set |
1250 | # CONFIG_MAC_PARTITION is not set | 1250 | # CONFIG_MAC_PARTITION is not set |
1251 | # CONFIG_MSDOS_PARTITION is not set | 1251 | CONFIG_MSDOS_PARTITION=y |
1252 | # CONFIG_LDM_PARTITION is not set | 1252 | # CONFIG_LDM_PARTITION is not set |
1253 | # CONFIG_SGI_PARTITION is not set | 1253 | # CONFIG_SGI_PARTITION is not set |
1254 | # CONFIG_ULTRIX_PARTITION is not set | 1254 | # CONFIG_ULTRIX_PARTITION is not set |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 47a613cdd775..95382f994404 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -268,7 +268,7 @@ struct cpu_spec cpu_specs[] = { | |||
268 | .cpu_user_features = COMMON_USER_POWER6, | 268 | .cpu_user_features = COMMON_USER_POWER6, |
269 | .icache_bsize = 128, | 269 | .icache_bsize = 128, |
270 | .dcache_bsize = 128, | 270 | .dcache_bsize = 128, |
271 | .num_pmcs = 8, | 271 | .num_pmcs = 6, |
272 | .oprofile_cpu_type = "ppc64/power6", | 272 | .oprofile_cpu_type = "ppc64/power6", |
273 | .oprofile_type = PPC_OPROFILE_POWER4, | 273 | .oprofile_type = PPC_OPROFILE_POWER4, |
274 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, | 274 | .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 9b49f8691d29..0d9ff72e2852 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -441,14 +441,14 @@ update_bridge_base(struct pci_bus *bus, int i) | |||
441 | end = res->end - off; | 441 | end = res->end - off; |
442 | io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK; | 442 | io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK; |
443 | io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK; | 443 | io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK; |
444 | if (end > 0xffff) { | 444 | if (end > 0xffff) |
445 | pci_write_config_word(dev, PCI_IO_BASE_UPPER16, | ||
446 | start >> 16); | ||
447 | pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, | ||
448 | end >> 16); | ||
449 | io_base_lo |= PCI_IO_RANGE_TYPE_32; | 445 | io_base_lo |= PCI_IO_RANGE_TYPE_32; |
450 | } else | 446 | else |
451 | io_base_lo |= PCI_IO_RANGE_TYPE_16; | 447 | io_base_lo |= PCI_IO_RANGE_TYPE_16; |
448 | pci_write_config_word(dev, PCI_IO_BASE_UPPER16, | ||
449 | start >> 16); | ||
450 | pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, | ||
451 | end >> 16); | ||
452 | pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo); | 452 | pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo); |
453 | pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo); | 453 | pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo); |
454 | 454 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 78d3c0fc8dfb..9bae8a5bf671 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -199,8 +199,14 @@ struct pci_controller * pcibios_alloc_controller(struct device_node *dev) | |||
199 | pci_setup_pci_controller(phb); | 199 | pci_setup_pci_controller(phb); |
200 | phb->arch_data = dev; | 200 | phb->arch_data = dev; |
201 | phb->is_dynamic = mem_init_done; | 201 | phb->is_dynamic = mem_init_done; |
202 | if (dev) | 202 | if (dev) { |
203 | PHB_SET_NODE(phb, of_node_to_nid(dev)); | 203 | int nid = of_node_to_nid(dev); |
204 | |||
205 | if (nid < 0 || !node_online(nid)) | ||
206 | nid = -1; | ||
207 | |||
208 | PHB_SET_NODE(phb, nid); | ||
209 | } | ||
204 | return phb; | 210 | return phb; |
205 | } | 211 | } |
206 | 212 | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7b2f6452ba72..f3d4dd580dd6 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -341,13 +341,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
341 | 341 | ||
342 | static int instructions_to_print = 16; | 342 | static int instructions_to_print = 16; |
343 | 343 | ||
344 | #ifdef CONFIG_PPC64 | ||
345 | #define BAD_PC(pc) ((REGION_ID(pc) != KERNEL_REGION_ID) && \ | ||
346 | (REGION_ID(pc) != VMALLOC_REGION_ID)) | ||
347 | #else | ||
348 | #define BAD_PC(pc) ((pc) < KERNELBASE) | ||
349 | #endif | ||
350 | |||
351 | static void show_instructions(struct pt_regs *regs) | 344 | static void show_instructions(struct pt_regs *regs) |
352 | { | 345 | { |
353 | int i; | 346 | int i; |
@@ -366,7 +359,8 @@ static void show_instructions(struct pt_regs *regs) | |||
366 | * bad address because the pc *should* only be a | 359 | * bad address because the pc *should* only be a |
367 | * kernel address. | 360 | * kernel address. |
368 | */ | 361 | */ |
369 | if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) { | 362 | if (!__kernel_text_address(pc) || |
363 | __get_user(instr, (unsigned int __user *)pc)) { | ||
370 | printk("XXXXXXXX "); | 364 | printk("XXXXXXXX "); |
371 | } else { | 365 | } else { |
372 | if (regs->nip == pc) | 366 | if (regs->nip == pc) |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index d9f10f2fc372..5ed4c2ceb5ca 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -900,14 +900,13 @@ void kernel_fp_unavailable_exception(struct pt_regs *regs) | |||
900 | 900 | ||
901 | void altivec_unavailable_exception(struct pt_regs *regs) | 901 | void altivec_unavailable_exception(struct pt_regs *regs) |
902 | { | 902 | { |
903 | #if !defined(CONFIG_ALTIVEC) | ||
904 | if (user_mode(regs)) { | 903 | if (user_mode(regs)) { |
905 | /* A user program has executed an altivec instruction, | 904 | /* A user program has executed an altivec instruction, |
906 | but this kernel doesn't support altivec. */ | 905 | but this kernel doesn't support altivec. */ |
907 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); | 906 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); |
908 | return; | 907 | return; |
909 | } | 908 | } |
910 | #endif | 909 | |
911 | printk(KERN_EMERG "Unrecoverable VMX/Altivec Unavailable Exception " | 910 | printk(KERN_EMERG "Unrecoverable VMX/Altivec Unavailable Exception " |
912 | "%lx at %lx\n", regs->trap, regs->nip); | 911 | "%lx at %lx\n", regs->trap, regs->nip); |
913 | die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); | 912 | die("Unrecoverable VMX/Altivec Unavailable Exception", regs, SIGABRT); |
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index 0975e94ac7c4..7edb6b461382 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig | |||
@@ -32,6 +32,13 @@ config MPC834x_ITX | |||
32 | Be aware that PCI initialization is the bootloader's | 32 | Be aware that PCI initialization is the bootloader's |
33 | responsiblilty. | 33 | responsiblilty. |
34 | 34 | ||
35 | config MPC8360E_PB | ||
36 | bool "Freescale MPC8360E PB" | ||
37 | select DEFAULT_UIMAGE | ||
38 | select QUICC_ENGINE | ||
39 | help | ||
40 | This option enables support for the MPC836x EMDS Processor Board. | ||
41 | |||
35 | endchoice | 42 | endchoice |
36 | 43 | ||
37 | config PPC_MPC832x | 44 | config PPC_MPC832x |
@@ -46,4 +53,10 @@ config MPC834x | |||
46 | select PPC_INDIRECT_PCI | 53 | select PPC_INDIRECT_PCI |
47 | default y if MPC834x_SYS || MPC834x_ITX | 54 | default y if MPC834x_SYS || MPC834x_ITX |
48 | 55 | ||
56 | config PPC_MPC836x | ||
57 | bool | ||
58 | select PPC_UDBG_16550 | ||
59 | select PPC_INDIRECT_PCI | ||
60 | default y if MPC8360E_PB | ||
61 | |||
49 | endmenu | 62 | endmenu |
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index 9387a110d28a..f1aa7e24a938 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -5,3 +5,5 @@ obj-y := misc.o | |||
5 | obj-$(CONFIG_PCI) += pci.o | 5 | obj-$(CONFIG_PCI) += pci.o |
6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o | 6 | obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o |
7 | obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o | 7 | obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o |
8 | obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o | ||
9 | obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o | ||
diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c b/arch/powerpc/platforms/83xx/mpc8360e_pb.c index c0191900fc25..1a523c81c06e 100644 --- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c +++ b/arch/powerpc/platforms/83xx/mpc8360e_pb.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/root_dev.h> | 30 | #include <linux/root_dev.h> |
31 | #include <linux/initrd.h> | 31 | #include <linux/initrd.h> |
32 | 32 | ||
33 | #include <asm/of_device.h> | ||
33 | #include <asm/system.h> | 34 | #include <asm/system.h> |
34 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
35 | #include <asm/time.h> | 36 | #include <asm/time.h> |
@@ -141,6 +142,24 @@ static void __init mpc8360_sys_setup_arch(void) | |||
141 | #endif | 142 | #endif |
142 | } | 143 | } |
143 | 144 | ||
145 | static int __init mpc8360_declare_of_platform_devices(void) | ||
146 | { | ||
147 | struct device_node *np; | ||
148 | |||
149 | for (np = NULL; (np = of_find_compatible_node(np, "network", | ||
150 | "ucc_geth")) != NULL;) { | ||
151 | int ucc_num; | ||
152 | char bus_id[BUS_ID_SIZE]; | ||
153 | |||
154 | ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; | ||
155 | snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); | ||
156 | of_platform_device_create(np, bus_id, NULL); | ||
157 | } | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | device_initcall(mpc8360_declare_of_platform_devices); | ||
162 | |||
144 | void __init mpc8360_sys_init_IRQ(void) | 163 | void __init mpc8360_sys_init_IRQ(void) |
145 | { | 164 | { |
146 | 165 | ||
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index ccfd0c4db874..d0fb959e3ef1 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -781,6 +781,17 @@ static int __init create_spu(struct device_node *spe) | |||
781 | if (!spu) | 781 | if (!spu) |
782 | goto out; | 782 | goto out; |
783 | 783 | ||
784 | spu->node = find_spu_node_id(spe); | ||
785 | if (spu->node >= MAX_NUMNODES) { | ||
786 | printk(KERN_WARNING "SPE %s on node %d ignored," | ||
787 | " node number too big\n", spe->full_name, spu->node); | ||
788 | printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n"); | ||
789 | return -ENODEV; | ||
790 | } | ||
791 | spu->nid = of_node_to_nid(spe); | ||
792 | if (spu->nid == -1) | ||
793 | spu->nid = 0; | ||
794 | |||
784 | ret = spu_map_device(spu, spe); | 795 | ret = spu_map_device(spu, spe); |
785 | /* try old method */ | 796 | /* try old method */ |
786 | if (ret) | 797 | if (ret) |
@@ -788,10 +799,6 @@ static int __init create_spu(struct device_node *spe) | |||
788 | if (ret) | 799 | if (ret) |
789 | goto out_free; | 800 | goto out_free; |
790 | 801 | ||
791 | spu->node = find_spu_node_id(spe); | ||
792 | spu->nid = of_node_to_nid(spe); | ||
793 | if (spu->nid == -1) | ||
794 | spu->nid = 0; | ||
795 | ret = spu_map_interrupts(spu, spe); | 802 | ret = spu_map_interrupts(spu, spe); |
796 | if (ret) | 803 | if (ret) |
797 | ret = spu_map_interrupts_old(spu, spe); | 804 | ret = spu_map_interrupts_old(spu, spe); |
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index e0d730045260..0de8e114e6b6 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -246,6 +246,7 @@ static int spufs_cntl_open(struct inode *inode, struct file *file) | |||
246 | 246 | ||
247 | static struct file_operations spufs_cntl_fops = { | 247 | static struct file_operations spufs_cntl_fops = { |
248 | .open = spufs_cntl_open, | 248 | .open = spufs_cntl_open, |
249 | .release = simple_attr_close, | ||
249 | .read = simple_attr_read, | 250 | .read = simple_attr_read, |
250 | .write = simple_attr_write, | 251 | .write = simple_attr_write, |
251 | .mmap = spufs_cntl_mmap, | 252 | .mmap = spufs_cntl_mmap, |
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index d4b2cf74da6a..18ee851e33e3 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <asm/cache.h> | 62 | #include <asm/cache.h> |
63 | #include <asm/8xx_immap.h> | 63 | #include <asm/8xx_immap.h> |
64 | #include <asm/machdep.h> | 64 | #include <asm/machdep.h> |
65 | #include <asm/irq_regs.h> | ||
65 | 66 | ||
66 | #include <asm/time.h> | 67 | #include <asm/time.h> |
67 | 68 | ||
@@ -129,6 +130,7 @@ void wakeup_decrementer(void) | |||
129 | */ | 130 | */ |
130 | void timer_interrupt(struct pt_regs * regs) | 131 | void timer_interrupt(struct pt_regs * regs) |
131 | { | 132 | { |
133 | struct pt_regs *old_regs; | ||
132 | int next_dec; | 134 | int next_dec; |
133 | unsigned long cpu = smp_processor_id(); | 135 | unsigned long cpu = smp_processor_id(); |
134 | unsigned jiffy_stamp = last_jiffy_stamp(cpu); | 136 | unsigned jiffy_stamp = last_jiffy_stamp(cpu); |
@@ -137,6 +139,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
137 | if (atomic_read(&ppc_n_lost_interrupts) != 0) | 139 | if (atomic_read(&ppc_n_lost_interrupts) != 0) |
138 | do_IRQ(regs); | 140 | do_IRQ(regs); |
139 | 141 | ||
142 | old_regs = set_irq_regs(regs); | ||
140 | irq_enter(); | 143 | irq_enter(); |
141 | 144 | ||
142 | while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) { | 145 | while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) { |
@@ -188,6 +191,7 @@ void timer_interrupt(struct pt_regs * regs) | |||
188 | ppc_md.heartbeat(); | 191 | ppc_md.heartbeat(); |
189 | 192 | ||
190 | irq_exit(); | 193 | irq_exit(); |
194 | set_irq_regs(old_regs); | ||
191 | } | 195 | } |
192 | 196 | ||
193 | /* | 197 | /* |
diff --git a/arch/ppc/platforms/mpc8272ads_setup.c b/arch/ppc/platforms/mpc8272ads_setup.c index d7b3a6afa78f..1f9ea36837b1 100644 --- a/arch/ppc/platforms/mpc8272ads_setup.c +++ b/arch/ppc/platforms/mpc8272ads_setup.c | |||
@@ -196,7 +196,7 @@ static void __init mpc8272ads_fixup_enet_pdata(struct platform_device *pdev, | |||
196 | bd_t* bi = (void*)__res; | 196 | bd_t* bi = (void*)__res; |
197 | int fs_no = fsid_fcc1+pdev->id-1; | 197 | int fs_no = fsid_fcc1+pdev->id-1; |
198 | 198 | ||
199 | if(fs_no > ARRAY_SIZE(mpc82xx_enet_pdata)) { | 199 | if(fs_no >= ARRAY_SIZE(mpc82xx_enet_pdata)) { |
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | 202 | ||
@@ -222,7 +222,7 @@ static void mpc8272ads_fixup_uart_pdata(struct platform_device *pdev, | |||
222 | int id = fs_uart_id_scc2fsid(idx); | 222 | int id = fs_uart_id_scc2fsid(idx); |
223 | 223 | ||
224 | /* no need to alter anything if console */ | 224 | /* no need to alter anything if console */ |
225 | if ((id <= num) && (!pdev->dev.platform_data)) { | 225 | if ((id < num) && (!pdev->dev.platform_data)) { |
226 | pinfo = &mpc8272_uart_pdata[id]; | 226 | pinfo = &mpc8272_uart_pdata[id]; |
227 | pinfo->uart_clk = bd->bi_intfreq; | 227 | pinfo->uart_clk = bd->bi_intfreq; |
228 | pdev->dev.platform_data = pinfo; | 228 | pdev->dev.platform_data = pinfo; |
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c index 5f130dca3770..e95d2c111747 100644 --- a/arch/ppc/platforms/mpc866ads_setup.c +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -259,7 +259,7 @@ static void mpc866ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | |||
259 | /* Get pointer to Communication Processor */ | 259 | /* Get pointer to Communication Processor */ |
260 | cp = cpmp; | 260 | cp = cpmp; |
261 | 261 | ||
262 | if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) { | 262 | if(fs_no >= ARRAY_SIZE(mpc8xx_enet_pdata)) { |
263 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); | 263 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); |
264 | return; | 264 | return; |
265 | } | 265 | } |
@@ -305,7 +305,7 @@ static void __init mpc866ads_fixup_uart_pdata(struct platform_device *pdev, | |||
305 | int id = fs_uart_id_smc2fsid(idx); | 305 | int id = fs_uart_id_smc2fsid(idx); |
306 | 306 | ||
307 | /* no need to alter anything if console */ | 307 | /* no need to alter anything if console */ |
308 | if ((id <= num) && (!pdev->dev.platform_data)) { | 308 | if ((id < num) && (!pdev->dev.platform_data)) { |
309 | pinfo = &mpc866_uart_pdata[id]; | 309 | pinfo = &mpc866_uart_pdata[id]; |
310 | pinfo->uart_clk = bd->bi_intfreq; | 310 | pinfo->uart_clk = bd->bi_intfreq; |
311 | pdev->dev.platform_data = pinfo; | 311 | pdev->dev.platform_data = pinfo; |
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c index 02293141efb5..f8161f3557f5 100644 --- a/arch/ppc/platforms/mpc885ads_setup.c +++ b/arch/ppc/platforms/mpc885ads_setup.c | |||
@@ -263,7 +263,7 @@ static void mpc885ads_fixup_enet_pdata(struct platform_device *pdev, int fs_no) | |||
263 | char *e; | 263 | char *e; |
264 | int i; | 264 | int i; |
265 | 265 | ||
266 | if(fs_no > ARRAY_SIZE(mpc8xx_enet_pdata)) { | 266 | if(fs_no >= ARRAY_SIZE(mpc8xx_enet_pdata)) { |
267 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); | 267 | printk(KERN_ERR"No network-suitable #%d device on bus", fs_no); |
268 | return; | 268 | return; |
269 | } | 269 | } |
@@ -371,7 +371,7 @@ static void __init mpc885ads_fixup_uart_pdata(struct platform_device *pdev, | |||
371 | int id = fs_uart_id_smc2fsid(idx); | 371 | int id = fs_uart_id_smc2fsid(idx); |
372 | 372 | ||
373 | /* no need to alter anything if console */ | 373 | /* no need to alter anything if console */ |
374 | if ((id <= num) && (!pdev->dev.platform_data)) { | 374 | if ((id < num) && (!pdev->dev.platform_data)) { |
375 | pinfo = &mpc885_uart_pdata[id]; | 375 | pinfo = &mpc885_uart_pdata[id]; |
376 | pinfo->uart_clk = bd->bi_intfreq; | 376 | pinfo->uart_clk = bd->bi_intfreq; |
377 | pdev->dev.platform_data = pinfo; | 377 | pdev->dev.platform_data = pinfo; |