aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/Kconfig69
-rw-r--r--arch/powerpc/Kconfig.debug18
-rw-r--r--arch/powerpc/boot/Makefile1
-rw-r--r--arch/powerpc/boot/dts/kuroboxHD.dts147
-rw-r--r--arch/powerpc/boot/dts/kuroboxHG.dts1
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts135
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts135
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts1
-rw-r--r--arch/powerpc/boot/dts/mpc8272ads.dts56
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts215
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts333
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts60
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts184
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts (renamed from arch/powerpc/boot/dts/mpc8349emds.dts)170
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts (renamed from arch/powerpc/boot/dts/mpc8360emds.dts)124
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts142
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts129
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts108
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts168
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts362
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts194
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts161
-rw-r--r--arch/powerpc/boot/dts/mpc885ads.dts184
-rw-r--r--arch/powerpc/configs/cell_defconfig1
-rw-r--r--arch/powerpc/configs/celleb_defconfig1408
-rw-r--r--arch/powerpc/configs/linkstation_defconfig118
-rw-r--r--arch/powerpc/configs/mpc8272_ads_defconfig848
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig1409
-rw-r--r--arch/powerpc/configs/mpc832x_mds_defconfig (renamed from arch/powerpc/configs/mpc8360emds_defconfig)8
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig237
-rw-r--r--arch/powerpc/configs/mpc834x_itxgp_defconfig1174
-rw-r--r--arch/powerpc/configs/mpc834x_mds_defconfig10
-rw-r--r--arch/powerpc/configs/mpc836x_mds_defconfig1099
-rw-r--r--arch/powerpc/configs/mpc8568mds_defconfig1010
-rw-r--r--arch/powerpc/configs/mpc866_ads_defconfig829
-rw-r--r--arch/powerpc/configs/mpc885_ads_defconfig827
-rw-r--r--arch/powerpc/configs/pasemi_defconfig1722
-rw-r--r--arch/powerpc/configs/ppc64_defconfig4
-rw-r--r--arch/powerpc/configs/ps3_defconfig269
-rw-r--r--arch/powerpc/configs/pseries_defconfig4
-rw-r--r--arch/powerpc/kernel/Makefile1
-rw-r--r--arch/powerpc/kernel/btext.c9
-rw-r--r--arch/powerpc/kernel/cpu_setup_pa6t.S44
-rw-r--r--arch/powerpc/kernel/cputable.c21
-rw-r--r--arch/powerpc/kernel/entry_64.S59
-rw-r--r--arch/powerpc/kernel/head_32.S5
-rw-r--r--arch/powerpc/kernel/head_44x.S2
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S7
-rw-r--r--arch/powerpc/kernel/idle.c13
-rw-r--r--arch/powerpc/kernel/iomap.c20
-rw-r--r--arch/powerpc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/kprobes.c8
-rw-r--r--arch/powerpc/kernel/legacy_serial.c17
-rw-r--r--arch/powerpc/kernel/lparcfg.c13
-rw-r--r--arch/powerpc/kernel/misc_64.S40
-rw-r--r--arch/powerpc/kernel/module_32.c7
-rw-r--r--arch/powerpc/kernel/nvram_64.c2
-rw-r--r--arch/powerpc/kernel/pci_32.c1
-rw-r--r--arch/powerpc/kernel/pci_64.c3
-rw-r--r--arch/powerpc/kernel/pmc.c37
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c1
-rw-r--r--arch/powerpc/kernel/proc_ppc64.c3
-rw-r--r--arch/powerpc/kernel/prom.c21
-rw-r--r--arch/powerpc/kernel/prom_init.c81
-rw-r--r--arch/powerpc/kernel/prom_parse.c40
-rw-r--r--arch/powerpc/kernel/ptrace.c24
-rw-r--r--arch/powerpc/kernel/rtas-proc.c14
-rw-r--r--arch/powerpc/kernel/rtas.c2
-rw-r--r--arch/powerpc/kernel/rtas_flash.c9
-rw-r--r--arch/powerpc/kernel/setup_32.c9
-rw-r--r--arch/powerpc/kernel/smp.c23
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c67
-rw-r--r--arch/powerpc/kernel/sysfs.c141
-rw-r--r--arch/powerpc/kernel/traps.c111
-rw-r--r--arch/powerpc/kernel/udbg.c8
-rw-r--r--arch/powerpc/kernel/udbg_16550.c24
-rw-r--r--arch/powerpc/kernel/vdso.c124
-rw-r--r--arch/powerpc/kernel/vio.c6
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S4
-rw-r--r--arch/powerpc/lib/Makefile4
-rw-r--r--arch/powerpc/lib/dma-noncoherent.c418
-rw-r--r--arch/powerpc/lib/rheap.c6
-rw-r--r--arch/powerpc/mm/hugetlbpage.c3
-rw-r--r--arch/powerpc/mm/mem.c27
-rw-r--r--arch/powerpc/mm/numa.c2
-rw-r--r--arch/powerpc/mm/pgtable_32.c5
-rw-r--r--arch/powerpc/mm/pgtable_64.c2
-rw-r--r--arch/powerpc/oprofile/common.c2
-rw-r--r--arch/powerpc/oprofile/op_model_7450.c10
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c149
-rw-r--r--arch/powerpc/oprofile/op_model_fsl_booke.c81
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c10
-rw-r--r--arch/powerpc/oprofile/op_model_rs64.c10
-rw-r--r--arch/powerpc/platforms/52xx/Makefile3
-rw-r--r--arch/powerpc/platforms/52xx/efika-pci.c119
-rw-r--r--arch/powerpc/platforms/52xx/efika-setup.c150
-rw-r--r--arch/powerpc/platforms/52xx/efika.c243
-rw-r--r--arch/powerpc/platforms/52xx/efika.h19
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c35
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c4
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c412
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c10
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx.c2
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c2
-rw-r--r--arch/powerpc/platforms/82xx/pq2ads.h5
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig32
-rw-r--r--arch/powerpc/platforms/83xx/Makefile5
-rw-r--r--arch/powerpc/platforms/83xx/misc.c29
-rw-r--r--arch/powerpc/platforms/83xx/mpc8313_rdb.c92
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c68
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c27
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c (renamed from arch/powerpc/platforms/83xx/mpc834x_sys.c)118
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.h23
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c (renamed from arch/powerpc/platforms/83xx/mpc8360e_pb.c)98
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h18
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig13
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c21
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c32
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c234
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c9
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_smp.c1
-rw-r--r--arch/powerpc/platforms/8xx/Kconfig300
-rw-r--r--arch/powerpc/platforms/8xx/Makefile6
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c303
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads.h95
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads_setup.c301
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads.h95
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c387
-rw-r--r--arch/powerpc/platforms/Makefile5
-rw-r--r--arch/powerpc/platforms/cell/Makefile7
-rw-r--r--arch/powerpc/platforms/cell/iommu.c5
-rw-r--r--arch/powerpc/platforms/cell/pmu.c14
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c3
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c366
-rw-r--r--arch/powerpc/platforms/cell/spu_priv1_mmio.c422
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c137
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c184
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c16
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c386
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h52
-rw-r--r--arch/powerpc/platforms/celleb/Makefile8
-rw-r--r--arch/powerpc/platforms/celleb/beat.c163
-rw-r--r--arch/powerpc/platforms/celleb/beat.h40
-rw-r--r--arch/powerpc/platforms/celleb/beat_syscall.h160
-rw-r--r--arch/powerpc/platforms/celleb/beat_wrapper.h220
-rw-r--r--arch/powerpc/platforms/celleb/htab.c308
-rw-r--r--arch/powerpc/platforms/celleb/hvCall.S287
-rw-r--r--arch/powerpc/platforms/celleb/interrupt.c274
-rw-r--r--arch/powerpc/platforms/celleb/interrupt.h33
-rw-r--r--arch/powerpc/platforms/celleb/iommu.c104
-rw-r--r--arch/powerpc/platforms/celleb/pci.c481
-rw-r--r--arch/powerpc/platforms/celleb/pci.h35
-rw-r--r--arch/powerpc/platforms/celleb/scc.h145
-rw-r--r--arch/powerpc/platforms/celleb/scc_epci.c409
-rw-r--r--arch/powerpc/platforms/celleb/scc_sio.c101
-rw-r--r--arch/powerpc/platforms/celleb/scc_uhc.c94
-rw-r--r--arch/powerpc/platforms/celleb/setup.c193
-rw-r--r--arch/powerpc/platforms/celleb/smp.c124
-rw-r--r--arch/powerpc/platforms/celleb/spu_priv1.c208
-rw-r--r--arch/powerpc/platforms/celleb/udbg_beat.c97
-rw-r--r--arch/powerpc/platforms/chrp/setup.c4
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/embedded6xx/linkstation.c12
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c2
-rw-r--r--arch/powerpc/platforms/iseries/mf.c6
-rw-r--r--arch/powerpc/platforms/iseries/proc.c2
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/maple/pci.c23
-rw-r--r--arch/powerpc/platforms/maple/setup.c3
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig10
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile3
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c88
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c281
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h12
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c13
-rw-r--r--arch/powerpc/platforms/pasemi/powersave.S80
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c105
-rw-r--r--arch/powerpc/platforms/powermac/pic.c2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c4
-rw-r--r--arch/powerpc/platforms/powermac/smp.c1
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig21
-rw-r--r--arch/powerpc/platforms/ps3/Makefile1
-rw-r--r--arch/powerpc/platforms/ps3/htab.c7
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c444
-rw-r--r--arch/powerpc/platforms/ps3/mm.c1
-rw-r--r--arch/powerpc/platforms/ps3/os-area.c22
-rw-r--r--arch/powerpc/platforms/ps3/platform.h151
-rw-r--r--arch/powerpc/platforms/ps3/repository.c220
-rw-r--r--arch/powerpc/platforms/ps3/setup.c86
-rw-r--r--arch/powerpc/platforms/ps3/smp.c3
-rw-r--r--arch/powerpc/platforms/ps3/spu.c62
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c384
-rw-r--r--arch/powerpc/platforms/pseries/Makefile3
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c21
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c3
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c1
-rw-r--r--arch/powerpc/platforms/pseries/firmware.h17
-rw-r--r--arch/powerpc/platforms/pseries/hvCall_inst.c2
-rw-r--r--arch/powerpc/platforms/pseries/kexec.c72
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c55
-rw-r--r--arch/powerpc/platforms/pseries/pci.c6
-rw-r--r--arch/powerpc/platforms/pseries/power.c87
-rw-r--r--arch/powerpc/platforms/pseries/pseries.h39
-rw-r--r--arch/powerpc/platforms/pseries/ras.c2
-rw-r--r--arch/powerpc/platforms/pseries/ras.h9
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c3
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c2
-rw-r--r--arch/powerpc/platforms/pseries/scanlog.c2
-rw-r--r--arch/powerpc/platforms/pseries/setup.c90
-rw-r--r--arch/powerpc/platforms/pseries/smp.c1
-rw-r--r--arch/powerpc/sysdev/Makefile3
-rw-r--r--arch/powerpc/sysdev/commproc.c398
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.c154
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.h2
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c367
-rw-r--r--arch/powerpc/sysdev/grackle.c2
-rw-r--r--arch/powerpc/sysdev/ipic.c17
-rw-r--r--arch/powerpc/sysdev/micropatch.c743
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.c197
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.h12
-rw-r--r--arch/powerpc/sysdev/mpic.c89
-rw-r--r--arch/powerpc/sysdev/pmi.c305
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c6
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c163
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c141
-rw-r--r--arch/powerpc/xmon/ppc-opc.c7
-rw-r--r--arch/powerpc/xmon/spu-dis.c2
-rw-r--r--arch/powerpc/xmon/spu-opc.c4
-rw-r--r--arch/powerpc/xmon/xmon.c1
234 files changed, 25558 insertions, 3876 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index d6abe495c6b0..6dfbd52694ab 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -173,6 +173,11 @@ config PPC_86xx
173 help 173 help
174 The Freescale E600 SoCs have 74xx cores. 174 The Freescale E600 SoCs have 74xx cores.
175 175
176config PPC_8xx
177 bool "Freescale 8xx"
178 select FSL_SOC
179 select 8xx
180
176config 40x 181config 40x
177 bool "AMCC 40x" 182 bool "AMCC 40x"
178 select PPC_DCR_NATIVE 183 select PPC_DCR_NATIVE
@@ -181,8 +186,6 @@ config 44x
181 bool "AMCC 44x" 186 bool "AMCC 44x"
182 select PPC_DCR_NATIVE 187 select PPC_DCR_NATIVE
183 188
184config 8xx
185 bool "Freescale 8xx"
186 189
187config E200 190config E200
188 bool "Freescale e200" 191 bool "Freescale e200"
@@ -211,6 +214,10 @@ config 6xx
211 bool 214 bool
212 215
213# this is temp to handle compat with arch=ppc 216# this is temp to handle compat with arch=ppc
217config 8xx
218 bool
219
220# this is temp to handle compat with arch=ppc
214config 83xx 221config 83xx
215 bool 222 bool
216 223
@@ -429,6 +436,21 @@ config PPC_MPC52xx
429 bool 436 bool
430 default n 437 default n
431 438
439config PPC_MPC5200
440 bool
441 select PPC_MPC52xx
442 default n
443
444config PPC_MPC5200_BUGFIX
445 bool "MPC5200 (L25R) bugfix support"
446 depends on PPC_MPC5200
447 default n
448 help
449 Enable workarounds for original MPC5200 errata. This is not required
450 for MPC5200B based boards.
451
452 It is safe to say 'Y' here
453
432config PPC_EFIKA 454config PPC_EFIKA
433 bool "bPlan Efika 5k2. MPC5200B based computer" 455 bool "bPlan Efika 5k2. MPC5200B based computer"
434 depends on PPC_MULTIPLATFORM && PPC32 456 depends on PPC_MULTIPLATFORM && PPC32
@@ -441,7 +463,7 @@ config PPC_EFIKA
441config PPC_LITE5200 463config PPC_LITE5200
442 bool "Freescale Lite5200 Eval Board" 464 bool "Freescale Lite5200 Eval Board"
443 depends on PPC_MULTIPLATFORM && PPC32 465 depends on PPC_MULTIPLATFORM && PPC32
444 select PPC_MPC52xx 466 select PPC_MPC5200
445 default n 467 default n
446 468
447config PPC_PMAC 469config PPC_PMAC
@@ -484,6 +506,7 @@ config PPC_MAPLE
484 select PPC_970_NAP 506 select PPC_970_NAP
485 select PPC_NATIVE 507 select PPC_NATIVE
486 select PPC_RTAS 508 select PPC_RTAS
509 select MMIO_NVRAM
487 select ATA_NONSTANDARD if ATA 510 select ATA_NONSTANDARD if ATA
488 default n 511 default n
489 help 512 help
@@ -529,6 +552,11 @@ config PPC_PS3
529 bool "Sony PS3 (incomplete)" 552 bool "Sony PS3 (incomplete)"
530 depends on PPC_MULTIPLATFORM && PPC64 553 depends on PPC_MULTIPLATFORM && PPC64
531 select PPC_CELL 554 select PPC_CELL
555 select USB_ARCH_HAS_OHCI
556 select USB_OHCI_LITTLE_ENDIAN
557 select USB_OHCI_BIG_ENDIAN_MMIO
558 select USB_ARCH_HAS_EHCI
559 select USB_EHCI_BIG_ENDIAN_MMIO
532 help 560 help
533 This option enables support for the Sony PS3 game console 561 This option enables support for the Sony PS3 game console
534 and other platforms using the PS3 hypervisor. 562 and other platforms using the PS3 hypervisor.
@@ -536,6 +564,16 @@ config PPC_PS3
536 enabling this will not result in a bootable kernel on a 564 enabling this will not result in a bootable kernel on a
537 PS3 system. 565 PS3 system.
538 566
567config PPC_CELLEB
568 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
569 depends on PPC_MULTIPLATFORM && PPC64
570 select PPC_CELL
571 select PPC_OF_PLATFORM_PCI
572 select HAS_TXX9_SERIAL
573 select PPC_UDBG_BEAT
574 select USB_OHCI_BIG_ENDIAN_MMIO
575 select USB_EHCI_BIG_ENDIAN_MMIO
576
539config PPC_NATIVE 577config PPC_NATIVE
540 bool 578 bool
541 depends on PPC_MULTIPLATFORM 579 depends on PPC_MULTIPLATFORM
@@ -549,6 +587,11 @@ config UDBG_RTAS_CONSOLE
549 depends on PPC_RTAS 587 depends on PPC_RTAS
550 default n 588 default n
551 589
590config PPC_UDBG_BEAT
591 bool "BEAT based debug console"
592 depends on PPC_CELLEB
593 default n
594
552config XICS 595config XICS
553 depends on PPC_PSERIES 596 depends on PPC_PSERIES
554 bool 597 bool
@@ -577,6 +620,15 @@ config RTAS_FLASH
577 tristate "Firmware flash interface" 620 tristate "Firmware flash interface"
578 depends on PPC64 && RTAS_PROC 621 depends on PPC64 && RTAS_PROC
579 622
623config PPC_PMI
624 tristate "Support for PMI"
625 depends PPC_IBM_CELL_BLADE
626 help
627 PMI (Platform Management Interrupt) is a way to
628 communicate with the BMC (Baseboard Mangement Controller).
629 It is used in some IBM Cell blades.
630 default m
631
580config MMIO_NVRAM 632config MMIO_NVRAM
581 bool 633 bool
582 default n 634 default n
@@ -702,6 +754,7 @@ source arch/powerpc/platforms/86xx/Kconfig
702source arch/powerpc/platforms/8xx/Kconfig 754source arch/powerpc/platforms/8xx/Kconfig
703source arch/powerpc/platforms/cell/Kconfig 755source arch/powerpc/platforms/cell/Kconfig
704source arch/powerpc/platforms/ps3/Kconfig 756source arch/powerpc/platforms/ps3/Kconfig
757source arch/powerpc/platforms/pasemi/Kconfig
705 758
706menu "Kernel options" 759menu "Kernel options"
707 760
@@ -724,7 +777,7 @@ config FORCE_MAX_ZONEORDER
724 777
725config MATH_EMULATION 778config MATH_EMULATION
726 bool "Math emulation" 779 bool "Math emulation"
727 depends on 4xx || 8xx || E200 || PPC_83xx || E500 780 depends on 4xx || 8xx || E200 || PPC_MPC832x || E500
728 ---help--- 781 ---help---
729 Some PowerPC chips designed for embedded applications do not have 782 Some PowerPC chips designed for embedded applications do not have
730 a floating-point unit and therefore do not implement the 783 a floating-point unit and therefore do not implement the
@@ -832,7 +885,7 @@ config ARCH_SPARSEMEM_ENABLE
832 885
833config ARCH_SPARSEMEM_DEFAULT 886config ARCH_SPARSEMEM_DEFAULT
834 def_bool y 887 def_bool y
835 depends on (SMP && PPC_PSERIES) || PPC_CELL 888 depends on (SMP && PPC_PSERIES) || PPC_PS3
836 889
837config ARCH_POPULATES_NODE_MAP 890config ARCH_POPULATES_NODE_MAP
838 def_bool y 891 def_bool y
@@ -933,6 +986,10 @@ config ISA
933 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If 986 have an IBM RS/6000 or pSeries machine or a PReP machine, say Y. If
934 you have an embedded board, consult your board documentation. 987 you have an embedded board, consult your board documentation.
935 988
989config ZONE_DMA
990 bool
991 default y
992
936config GENERIC_ISA_DMA 993config GENERIC_ISA_DMA
937 bool 994 bool
938 depends on PPC64 || POWER4 || 6xx && !CPM2 995 depends on PPC64 || POWER4 || 6xx && !CPM2
@@ -1182,7 +1239,7 @@ source "arch/powerpc/oprofile/Kconfig"
1182 1239
1183config KPROBES 1240config KPROBES
1184 bool "Kprobes (EXPERIMENTAL)" 1241 bool "Kprobes (EXPERIMENTAL)"
1185 depends on PPC64 && KALLSYMS && EXPERIMENTAL && MODULES 1242 depends on !BOOKE && !4xx && KALLSYMS && EXPERIMENTAL && MODULES
1186 help 1243 help
1187 Kprobes allows you to trap at almost any kernel address and 1244 Kprobes allows you to trap at almost any kernel address and
1188 execute a callback function. register_kprobe() establishes 1245 execute a callback function. register_kprobe() establishes
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index f0e51edde022..d39d13327e6d 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -4,14 +4,14 @@ source "lib/Kconfig.debug"
4 4
5config DEBUG_STACKOVERFLOW 5config DEBUG_STACKOVERFLOW
6 bool "Check for stack overflows" 6 bool "Check for stack overflows"
7 depends on DEBUG_KERNEL && PPC64 7 depends on DEBUG_KERNEL
8 help 8 help
9 This option will cause messages to be printed if free stack space 9 This option will cause messages to be printed if free stack space
10 drops below a certain limit. 10 drops below a certain limit.
11 11
12config DEBUG_STACK_USAGE 12config DEBUG_STACK_USAGE
13 bool "Stack utilization instrumentation" 13 bool "Stack utilization instrumentation"
14 depends on DEBUG_KERNEL && PPC64 14 depends on DEBUG_KERNEL
15 help 15 help
16 Enables the display of the minimum amount of free stack which each 16 Enables the display of the minimum amount of free stack which each
17 task has ever had available in the sysrq-T and sysrq-P debug output. 17 task has ever had available in the sysrq-T and sysrq-P debug output.
@@ -185,6 +185,20 @@ config PPC_EARLY_DEBUG_ISERIES
185 Select this to enable early debugging for legacy iSeries. You need 185 Select this to enable early debugging for legacy iSeries. You need
186 to hit "Ctrl-x Ctrl-x" to see the messages on the console. 186 to hit "Ctrl-x Ctrl-x" to see the messages on the console.
187 187
188config PPC_EARLY_DEBUG_PAS_REALMODE
189 bool "PA Semi real mode"
190 depends on PPC_PASEMI
191 help
192 Select this to enable early debugging for PA Semi.
193 Output will be on UART0.
194
195config PPC_EARLY_DEBUG_BEAT
196 bool "Beat HV Console"
197 depends on PPC_CELLEB
198 select PPC_UDBG_BEAT
199 help
200 Select this to enable early debugging for Celleb with Beat.
201
188endchoice 202endchoice
189 203
190endmenu 204endmenu
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 98392fb5f581..dc779407de14 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -162,6 +162,7 @@ image-$(CONFIG_PPC_PSERIES) += zImage.pseries
162image-$(CONFIG_PPC_MAPLE) += zImage.pseries 162image-$(CONFIG_PPC_MAPLE) += zImage.pseries
163image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries 163image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
164image-$(CONFIG_PPC_PS3) += zImage.ps3 164image-$(CONFIG_PPC_PS3) += zImage.ps3
165image-$(CONFIG_PPC_CELLEB) += zImage.pseries
165image-$(CONFIG_PPC_CHRP) += zImage.chrp 166image-$(CONFIG_PPC_CHRP) += zImage.chrp
166image-$(CONFIG_PPC_EFIKA) += zImage.chrp 167image-$(CONFIG_PPC_EFIKA) += zImage.chrp
167image-$(CONFIG_PPC_PMAC) += zImage.pmac 168image-$(CONFIG_PPC_PMAC) += zImage.pmac
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
new file mode 100644
index 000000000000..b89791802e86
--- /dev/null
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -0,0 +1,147 @@
1/*
2 * Device Tree Souce for Buffalo KuroboxHD
3 *
4 * Choose CONFIG_LINKSTATION to build a kernel for KuroboxHD, or use
5 * the default configuration linkstation_defconfig.
6 *
7 * Based on sandpoint.dts
8 *
9 * 2006 (c) G. Liakhovetski <g.liakhovetski@gmx.de>
10 *
11 * This file is licensed under
12 * the terms of the GNU General Public License version 2. This program
13 * is licensed "as is" without any warranty of any kind, whether express
14 * or implied.
15
16XXXX add flash parts, rtc, ??
17
18build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
19
20
21 */
22
23/ {
24 linux,phandle = <1000>;
25 model = "KuroboxHD";
26 compatible = "linkstation";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 cpus {
31 linux,phandle = <2000>;
32 #cpus = <1>;
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,603e { /* Really 8241 */
37 linux,phandle = <2100>;
38 device_type = "cpu";
39 reg = <0>;
40 clock-frequency = <bebc200>; /* Fixed by bootwrapper */
41 timebase-frequency = <1743000>; /* Fixed by bootwrapper */
42 bus-frequency = <0>; /* From bootloader */
43 /* Following required by dtc but not used */
44 i-cache-line-size = <0>;
45 d-cache-line-size = <0>;
46 i-cache-size = <4000>;
47 d-cache-size = <4000>;
48 };
49 };
50
51 memory {
52 linux,phandle = <3000>;
53 device_type = "memory";
54 reg = <00000000 04000000>;
55 };
56
57 soc10x { /* AFAICT need to make soc for 8245's uarts to be defined */
58 linux,phandle = <4000>;
59 #address-cells = <1>;
60 #size-cells = <1>;
61 #interrupt-cells = <2>;
62 device_type = "soc";
63 compatible = "mpc10x";
64 store-gathering = <0>; /* 0 == off, !0 == on */
65 reg = <80000000 00100000>;
66 ranges = <80000000 80000000 70000000 /* pci mem space */
67 fc000000 fc000000 00100000 /* EUMB */
68 fe000000 fe000000 00c00000 /* pci i/o space */
69 fec00000 fec00000 00300000 /* pci cfg regs */
70 fef00000 fef00000 00100000>; /* pci iack */
71
72 i2c@80003000 {
73 linux,phandle = <4300>;
74 device_type = "i2c";
75 compatible = "fsl-i2c";
76 reg = <80003000 1000>;
77 interrupts = <5 2>;
78 interrupt-parent = <4400>;
79 };
80
81 serial@80004500 {
82 linux,phandle = <4511>;
83 device_type = "serial";
84 compatible = "ns16550";
85 reg = <80004500 8>;
86 clock-frequency = <5d08d88>;
87 current-speed = <2580>;
88 interrupts = <9 2>;
89 interrupt-parent = <4400>;
90 };
91
92 serial@80004600 {
93 linux,phandle = <4512>;
94 device_type = "serial";
95 compatible = "ns16550";
96 reg = <80004600 8>;
97 clock-frequency = <5d08d88>;
98 current-speed = <e100>;
99 interrupts = <a 0>;
100 interrupt-parent = <4400>;
101 };
102
103 pic@80040000 {
104 linux,phandle = <4400>;
105 #interrupt-cells = <2>;
106 #address-cells = <0>;
107 device_type = "open-pic";
108 compatible = "chrp,open-pic";
109 interrupt-controller;
110 reg = <80040000 40000>;
111 built-in;
112 };
113
114 pci@fec00000 {
115 linux,phandle = <4500>;
116 #address-cells = <3>;
117 #size-cells = <2>;
118 #interrupt-cells = <1>;
119 device_type = "pci";
120 compatible = "mpc10x-pci";
121 reg = <fec00000 400000>;
122 ranges = <01000000 0 0 fe000000 0 00c00000
123 02000000 0 80000000 80000000 0 70000000>;
124 bus-range = <0 ff>;
125 clock-frequency = <7f28155>;
126 interrupt-parent = <4400>;
127 interrupt-map-mask = <f800 0 0 7>;
128 interrupt-map = <
129 /* IDSEL 0x11 - IRQ0 ETH */
130 5800 0 0 1 4400 0 1
131 5800 0 0 2 4400 1 1
132 5800 0 0 3 4400 2 1
133 5800 0 0 4 4400 3 1
134 /* IDSEL 0x12 - IRQ1 IDE0 */
135 6000 0 0 1 4400 1 1
136 6000 0 0 2 4400 2 1
137 6000 0 0 3 4400 3 1
138 6000 0 0 4 4400 0 1
139 /* IDSEL 0x14 - IRQ3 USB2.0 */
140 7000 0 0 1 4400 3 1
141 7000 0 0 2 4400 3 1
142 7000 0 0 3 4400 3 1
143 7000 0 0 4 4400 3 1
144 >;
145 };
146 };
147};
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index d06b0b018899..753102752d8b 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
35 35
36 PowerPC,603e { /* Really 8241 */ 36 PowerPC,603e { /* Really 8241 */
37 linux,phandle = <2100>; 37 linux,phandle = <2100>;
38 linux,boot-cpu;
39 device_type = "cpu"; 38 device_type = "cpu";
40 reg = <0>; 39 reg = <0>;
41 clock-frequency = <fdad680>; /* Fixed by bootwrapper */ 40 clock-frequency = <fdad680>; /* Fixed by bootwrapper */
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 186870704ad9..c03103c63285 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Lite5200 board Device Tree Source 2 * Lite5200 board Device Tree Source
3 * 3 *
4 * Copyright 2006 Secret Lab Technologies Ltd. 4 * Copyright 2006-2007 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca> 5 * Grant Likely <grant.likely@secretlab.ca>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
@@ -17,8 +17,9 @@
17 */ 17 */
18 18
19/ { 19/ {
20 model = "Lite5200"; 20 model = "fsl,lite5200";
21 compatible = "lite5200\0lite52xx\0mpc5200\0mpc52xx"; 21 // revision = "1.0";
22 compatible = "fsl,lite5200\0generic-mpc5200";
22 #address-cells = <1>; 23 #address-cells = <1>;
23 #size-cells = <1>; 24 #size-cells = <1>;
24 25
@@ -47,14 +48,17 @@
47 }; 48 };
48 49
49 soc5200@f0000000 { 50 soc5200@f0000000 {
51 model = "fsl,mpc5200";
52 revision = "" // from bootloader
50 #interrupt-cells = <3>; 53 #interrupt-cells = <3>;
51 device_type = "soc"; 54 device_type = "soc";
52 ranges = <0 f0000000 f0010000>; 55 ranges = <0 f0000000 f0010000>;
53 reg = <f0000000 00010000>; 56 reg = <f0000000 00010000>;
54 bus-frequency = <0>; // from bootloader 57 bus-frequency = <0>; // from bootloader
58 system-frequency = <0>; // from bootloader
55 59
56 cdm@200 { 60 cdm@200 {
57 compatible = "mpc5200-cdm\0mpc52xx-cdm"; 61 compatible = "mpc5200-cdm";
58 reg = <200 38>; 62 reg = <200 38>;
59 }; 63 };
60 64
@@ -64,77 +68,86 @@
64 interrupt-controller; 68 interrupt-controller;
65 #interrupt-cells = <3>; 69 #interrupt-cells = <3>;
66 device_type = "interrupt-controller"; 70 device_type = "interrupt-controller";
67 compatible = "mpc5200-pic\0mpc52xx-pic"; 71 compatible = "mpc5200-pic";
68 reg = <500 80>; 72 reg = <500 80>;
69 built-in; 73 built-in;
70 }; 74 };
71 75
72 gpt@600 { // General Purpose Timer 76 gpt@600 { // General Purpose Timer
73 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 77 compatible = "mpc5200-gpt";
74 device_type = "gpt"; 78 device_type = "gpt";
79 cell-index = <0>;
75 reg = <600 10>; 80 reg = <600 10>;
76 interrupts = <1 9 0>; 81 interrupts = <1 9 0>;
77 interrupt-parent = <500>; 82 interrupt-parent = <500>;
83 has-wdt;
78 }; 84 };
79 85
80 gpt@610 { // General Purpose Timer 86 gpt@610 { // General Purpose Timer
81 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 87 compatible = "mpc5200-gpt";
82 device_type = "gpt"; 88 device_type = "gpt";
89 cell-index = <1>;
83 reg = <610 10>; 90 reg = <610 10>;
84 interrupts = <1 a 0>; 91 interrupts = <1 a 0>;
85 interrupt-parent = <500>; 92 interrupt-parent = <500>;
86 }; 93 };
87 94
88 gpt@620 { // General Purpose Timer 95 gpt@620 { // General Purpose Timer
89 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 96 compatible = "mpc5200-gpt";
90 device_type = "gpt"; 97 device_type = "gpt";
98 cell-index = <2>;
91 reg = <620 10>; 99 reg = <620 10>;
92 interrupts = <1 b 0>; 100 interrupts = <1 b 0>;
93 interrupt-parent = <500>; 101 interrupt-parent = <500>;
94 }; 102 };
95 103
96 gpt@630 { // General Purpose Timer 104 gpt@630 { // General Purpose Timer
97 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 105 compatible = "mpc5200-gpt";
98 device_type = "gpt"; 106 device_type = "gpt";
107 cell-index = <3>;
99 reg = <630 10>; 108 reg = <630 10>;
100 interrupts = <1 c 0>; 109 interrupts = <1 c 0>;
101 interrupt-parent = <500>; 110 interrupt-parent = <500>;
102 }; 111 };
103 112
104 gpt@640 { // General Purpose Timer 113 gpt@640 { // General Purpose Timer
105 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 114 compatible = "mpc5200-gpt";
106 device_type = "gpt"; 115 device_type = "gpt";
116 cell-index = <4>;
107 reg = <640 10>; 117 reg = <640 10>;
108 interrupts = <1 d 0>; 118 interrupts = <1 d 0>;
109 interrupt-parent = <500>; 119 interrupt-parent = <500>;
110 }; 120 };
111 121
112 gpt@650 { // General Purpose Timer 122 gpt@650 { // General Purpose Timer
113 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 123 compatible = "mpc5200-gpt";
114 device_type = "gpt"; 124 device_type = "gpt";
125 cell-index = <5>;
115 reg = <650 10>; 126 reg = <650 10>;
116 interrupts = <1 e 0>; 127 interrupts = <1 e 0>;
117 interrupt-parent = <500>; 128 interrupt-parent = <500>;
118 }; 129 };
119 130
120 gpt@660 { // General Purpose Timer 131 gpt@660 { // General Purpose Timer
121 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 132 compatible = "mpc5200-gpt";
122 device_type = "gpt"; 133 device_type = "gpt";
134 cell-index = <6>;
123 reg = <660 10>; 135 reg = <660 10>;
124 interrupts = <1 f 0>; 136 interrupts = <1 f 0>;
125 interrupt-parent = <500>; 137 interrupt-parent = <500>;
126 }; 138 };
127 139
128 gpt@670 { // General Purpose Timer 140 gpt@670 { // General Purpose Timer
129 compatible = "mpc5200-gpt\0mpc52xx-gpt"; 141 compatible = "mpc5200-gpt";
130 device_type = "gpt"; 142 device_type = "gpt";
143 cell-index = <7>;
131 reg = <670 10>; 144 reg = <670 10>;
132 interrupts = <1 10 0>; 145 interrupts = <1 10 0>;
133 interrupt-parent = <500>; 146 interrupt-parent = <500>;
134 }; 147 };
135 148
136 rtc@800 { // Real time clock 149 rtc@800 { // Real time clock
137 compatible = "mpc5200-rtc\0mpc52xx-rtc"; 150 compatible = "mpc5200-rtc";
138 device_type = "rtc"; 151 device_type = "rtc";
139 reg = <800 100>; 152 reg = <800 100>;
140 interrupts = <1 5 0 1 6 0>; 153 interrupts = <1 5 0 1 6 0>;
@@ -143,7 +156,8 @@
143 156
144 mscan@900 { 157 mscan@900 {
145 device_type = "mscan"; 158 device_type = "mscan";
146 compatible = "mpc5200-mscan\0mpc52xx-mscan"; 159 compatible = "mpc5200-mscan";
160 cell-index = <0>;
147 interrupts = <2 11 0>; 161 interrupts = <2 11 0>;
148 interrupt-parent = <500>; 162 interrupt-parent = <500>;
149 reg = <900 80>; 163 reg = <900 80>;
@@ -151,21 +165,22 @@
151 165
152 mscan@980 { 166 mscan@980 {
153 device_type = "mscan"; 167 device_type = "mscan";
154 compatible = "mpc5200-mscan\0mpc52xx-mscan"; 168 compatible = "mpc5200-mscan";
169 cell-index = <1>;
155 interrupts = <1 12 0>; 170 interrupts = <1 12 0>;
156 interrupt-parent = <500>; 171 interrupt-parent = <500>;
157 reg = <980 80>; 172 reg = <980 80>;
158 }; 173 };
159 174
160 gpio@b00 { 175 gpio@b00 {
161 compatible = "mpc5200-gpio\0mpc52xx-gpio"; 176 compatible = "mpc5200-gpio";
162 reg = <b00 40>; 177 reg = <b00 40>;
163 interrupts = <1 7 0>; 178 interrupts = <1 7 0>;
164 interrupt-parent = <500>; 179 interrupt-parent = <500>;
165 }; 180 };
166 181
167 gpio-wkup@b00 { 182 gpio-wkup@b00 {
168 compatible = "mpc5200-gpio-wkup\0mpc52xx-gpio-wkup"; 183 compatible = "mpc5200-gpio-wkup";
169 reg = <c00 40>; 184 reg = <c00 40>;
170 interrupts = <1 8 0 0 3 0>; 185 interrupts = <1 8 0 0 3 0>;
171 interrupt-parent = <500>; 186 interrupt-parent = <500>;
@@ -176,7 +191,7 @@
176 #size-cells = <2>; 191 #size-cells = <2>;
177 #address-cells = <3>; 192 #address-cells = <3>;
178 device_type = "pci"; 193 device_type = "pci";
179 compatible = "mpc5200-pci\0mpc52xx-pci"; 194 compatible = "mpc5200-pci";
180 reg = <d00 100>; 195 reg = <d00 100>;
181 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
182 interrupt-map = <c000 0 0 1 500 0 0 3 197 interrupt-map = <c000 0 0 1 500 0 0 3
@@ -194,7 +209,7 @@
194 209
195 spi@f00 { 210 spi@f00 {
196 device_type = "spi"; 211 device_type = "spi";
197 compatible = "mpc5200-spi\0mpc52xx-spi"; 212 compatible = "mpc5200-spi";
198 reg = <f00 20>; 213 reg = <f00 20>;
199 interrupts = <2 d 0 2 e 0>; 214 interrupts = <2 d 0 2 e 0>;
200 interrupt-parent = <500>; 215 interrupt-parent = <500>;
@@ -202,7 +217,7 @@
202 217
203 usb@1000 { 218 usb@1000 {
204 device_type = "usb-ohci-be"; 219 device_type = "usb-ohci-be";
205 compatible = "mpc5200-ohci\0mpc52xx-ohci\0ohci-be"; 220 compatible = "mpc5200-ohci\0ohci-be";
206 reg = <1000 ff>; 221 reg = <1000 ff>;
207 interrupts = <2 6 0>; 222 interrupts = <2 6 0>;
208 interrupt-parent = <500>; 223 interrupt-parent = <500>;
@@ -210,7 +225,7 @@
210 225
211 bestcomm@1200 { 226 bestcomm@1200 {
212 device_type = "dma-controller"; 227 device_type = "dma-controller";
213 compatible = "mpc5200-bestcomm\0mpc52xx-bestcomm"; 228 compatible = "mpc5200-bestcomm";
214 reg = <1200 80>; 229 reg = <1200 80>;
215 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 230 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
216 3 4 0 3 5 0 3 6 0 3 7 0 231 3 4 0 3 5 0 3 6 0 3 7 0
@@ -220,67 +235,73 @@
220 }; 235 };
221 236
222 xlb@1f00 { 237 xlb@1f00 {
223 compatible = "mpc5200-xlb\0mpc52xx-xlb"; 238 compatible = "mpc5200-xlb";
224 reg = <1f00 100>; 239 reg = <1f00 100>;
225 }; 240 };
226 241
227 serial@2000 { // PSC1 242 serial@2000 { // PSC1
228 device_type = "serial"; 243 device_type = "serial";
229 compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 244 compatible = "mpc5200-psc-uart";
230 port-number = <0>; // Logical port assignment 245 port-number = <0>; // Logical port assignment
246 cell-index = <0>;
231 reg = <2000 100>; 247 reg = <2000 100>;
232 interrupts = <2 1 0>; 248 interrupts = <2 1 0>;
233 interrupt-parent = <500>; 249 interrupt-parent = <500>;
234 }; 250 };
235 251
236 // PSC2 in spi mode example 252 // PSC2 in ac97 mode example
237 spi@2200 { // PSC2 253 //ac97@2200 { // PSC2
238 device_type = "spi"; 254 // device_type = "sound";
239 compatible = "mpc5200-psc-spi\0mpc52xx-psc-spi"; 255 // compatible = "mpc5200-psc-ac97";
240 reg = <2200 100>; 256 // cell-index = <1>;
241 interrupts = <2 2 0>; 257 // reg = <2200 100>;
242 interrupt-parent = <500>; 258 // interrupts = <2 2 0>;
243 }; 259 // interrupt-parent = <500>;
260 //};
244 261
245 // PSC3 in CODEC mode example 262 // PSC3 in CODEC mode example
246 i2s@2400 { // PSC3 263 //i2s@2400 { // PSC3
247 device_type = "sound"; 264 // device_type = "sound";
248 compatible = "mpc5200-psc-i2s\0mpc52xx-psc-i2s"; 265 // compatible = "mpc5200-psc-i2s";
249 reg = <2400 100>; 266 // cell-index = <2>;
250 interrupts = <2 3 0>; 267 // reg = <2400 100>;
251 interrupt-parent = <500>; 268 // interrupts = <2 3 0>;
252 }; 269 // interrupt-parent = <500>;
270 //};
253 271
254 // PSC4 unconfigured 272 // PSC4 in uart mode example
255 //serial@2600 { // PSC4 273 //serial@2600 { // PSC4
256 // device_type = "serial"; 274 // device_type = "serial";
257 // compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 275 // compatible = "mpc5200-psc-uart";
276 // cell-index = <3>;
258 // reg = <2600 100>; 277 // reg = <2600 100>;
259 // interrupts = <2 b 0>; 278 // interrupts = <2 b 0>;
260 // interrupt-parent = <500>; 279 // interrupt-parent = <500>;
261 //}; 280 //};
262 281
263 // PSC5 unconfigured 282 // PSC5 in uart mode example
264 //serial@2800 { // PSC5 283 //serial@2800 { // PSC5
265 // device_type = "serial"; 284 // device_type = "serial";
266 // compatible = "mpc5200-psc-uart\0mpc52xx-psc-uart"; 285 // compatible = "mpc5200-psc-uart";
286 // cell-index = <4>;
267 // reg = <2800 100>; 287 // reg = <2800 100>;
268 // interrupts = <2 c 0>; 288 // interrupts = <2 c 0>;
269 // interrupt-parent = <500>; 289 // interrupt-parent = <500>;
270 //}; 290 //};
271 291
272 // PSC6 in AC97 mode example 292 // PSC6 in spi mode example
273 ac97@2c00 { // PSC6 293 //spi@2c00 { // PSC6
274 device_type = "sound"; 294 // device_type = "spi";
275 compatible = "mpc5200-psc-ac97\0mpc52xx-psc-ac97"; 295 // compatible = "mpc5200-psc-spi";
276 reg = <2c00 100>; 296 // cell-index = <5>;
277 interrupts = <2 4 0>; 297 // reg = <2c00 100>;
278 interrupt-parent = <500>; 298 // interrupts = <2 4 0>;
279 }; 299 // interrupt-parent = <500>;
300 //};
280 301
281 ethernet@3000 { 302 ethernet@3000 {
282 device_type = "network"; 303 device_type = "network";
283 compatible = "mpc5200-fec\0mpc52xx-fec"; 304 compatible = "mpc5200-fec";
284 reg = <3000 800>; 305 reg = <3000 800>;
285 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 306 mac-address = [ 02 03 04 05 06 07 ]; // Bad!
286 interrupts = <2 5 0>; 307 interrupts = <2 5 0>;
@@ -289,7 +310,7 @@
289 310
290 ata@3a00 { 311 ata@3a00 {
291 device_type = "ata"; 312 device_type = "ata";
292 compatible = "mpc5200-ata\0mpc52xx-ata"; 313 compatible = "mpc5200-ata";
293 reg = <3a00 100>; 314 reg = <3a00 100>;
294 interrupts = <2 7 0>; 315 interrupts = <2 7 0>;
295 interrupt-parent = <500>; 316 interrupt-parent = <500>;
@@ -297,7 +318,8 @@
297 318
298 i2c@3d00 { 319 i2c@3d00 {
299 device_type = "i2c"; 320 device_type = "i2c";
300 compatible = "mpc5200-i2c\0mpc52xx-i2c"; 321 compatible = "mpc5200-i2c";
322 cell-index = <0>;
301 reg = <3d00 40>; 323 reg = <3d00 40>;
302 interrupts = <2 f 0>; 324 interrupts = <2 f 0>;
303 interrupt-parent = <500>; 325 interrupt-parent = <500>;
@@ -305,14 +327,15 @@
305 327
306 i2c@3d40 { 328 i2c@3d40 {
307 device_type = "i2c"; 329 device_type = "i2c";
308 compatible = "mpc5200-i2c\0mpc52xx-i2c"; 330 compatible = "mpc5200-i2c";
331 cell-index = <1>;
309 reg = <3d40 40>; 332 reg = <3d40 40>;
310 interrupts = <2 10 0>; 333 interrupts = <2 10 0>;
311 interrupt-parent = <500>; 334 interrupt-parent = <500>;
312 }; 335 };
313 sram@8000 { 336 sram@8000 {
314 device_type = "sram"; 337 device_type = "sram";
315 compatible = "mpc5200-sram\0mpc52xx-sram\0sram"; 338 compatible = "mpc5200-sram\0sram";
316 reg = <8000 4000>; 339 reg = <8000 4000>;
317 }; 340 };
318 }; 341 };
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 5bb2760d7c30..3875ca9a9a62 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Lite5200B board Device Tree Source 2 * Lite5200B board Device Tree Source
3 * 3 *
4 * Copyright 2006 Secret Lab Technologies Ltd. 4 * Copyright 2006-2007 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca> 5 * Grant Likely <grant.likely@secretlab.ca>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
@@ -17,8 +17,9 @@
17 */ 17 */
18 18
19/ { 19/ {
20 model = "Lite5200b"; 20 model = "fsl,lite5200b";
21 compatible = "lite5200b\0lite52xx\0mpc5200b\0mpc52xx"; 21 // revision = "1.0";
22 compatible = "fsl,lite5200b\0generic-mpc5200";
22 #address-cells = <1>; 23 #address-cells = <1>;
23 #size-cells = <1>; 24 #size-cells = <1>;
24 25
@@ -47,14 +48,17 @@
47 }; 48 };
48 49
49 soc5200@f0000000 { 50 soc5200@f0000000 {
51 model = "fsl,mpc5200b";
52 revision = ""; // from bootloader
50 #interrupt-cells = <3>; 53 #interrupt-cells = <3>;
51 device_type = "soc"; 54 device_type = "soc";
52 ranges = <0 f0000000 f0010000>; 55 ranges = <0 f0000000 f0010000>;
53 reg = <f0000000 00010000>; 56 reg = <f0000000 00010000>;
54 bus-frequency = <0>; // from bootloader 57 bus-frequency = <0>; // from bootloader
58 system-frequency = <0>; // from bootloader
55 59
56 cdm@200 { 60 cdm@200 {
57 compatible = "mpc5200b-cdm\0mpc52xx-cdm"; 61 compatible = "mpc5200b-cdm\0mpc5200-cdm";
58 reg = <200 38>; 62 reg = <200 38>;
59 }; 63 };
60 64
@@ -64,77 +68,86 @@
64 interrupt-controller; 68 interrupt-controller;
65 #interrupt-cells = <3>; 69 #interrupt-cells = <3>;
66 device_type = "interrupt-controller"; 70 device_type = "interrupt-controller";
67 compatible = "mpc5200b-pic\0mpc52xx-pic"; 71 compatible = "mpc5200b-pic\0mpc5200-pic";
68 reg = <500 80>; 72 reg = <500 80>;
69 built-in; 73 built-in;
70 }; 74 };
71 75
72 gpt@600 { // General Purpose Timer 76 gpt@600 { // General Purpose Timer
73 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 77 compatible = "mpc5200b-gpt\0mpc5200-gpt";
74 device_type = "gpt"; 78 device_type = "gpt";
79 cell-index = <0>;
75 reg = <600 10>; 80 reg = <600 10>;
76 interrupts = <1 9 0>; 81 interrupts = <1 9 0>;
77 interrupt-parent = <500>; 82 interrupt-parent = <500>;
83 has-wdt;
78 }; 84 };
79 85
80 gpt@610 { // General Purpose Timer 86 gpt@610 { // General Purpose Timer
81 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 87 compatible = "mpc5200b-gpt\0mpc5200-gpt";
82 device_type = "gpt"; 88 device_type = "gpt";
89 cell-index = <1>;
83 reg = <610 10>; 90 reg = <610 10>;
84 interrupts = <1 a 0>; 91 interrupts = <1 a 0>;
85 interrupt-parent = <500>; 92 interrupt-parent = <500>;
86 }; 93 };
87 94
88 gpt@620 { // General Purpose Timer 95 gpt@620 { // General Purpose Timer
89 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 96 compatible = "mpc5200b-gpt\0mpc5200-gpt";
90 device_type = "gpt"; 97 device_type = "gpt";
98 cell-index = <2>;
91 reg = <620 10>; 99 reg = <620 10>;
92 interrupts = <1 b 0>; 100 interrupts = <1 b 0>;
93 interrupt-parent = <500>; 101 interrupt-parent = <500>;
94 }; 102 };
95 103
96 gpt@630 { // General Purpose Timer 104 gpt@630 { // General Purpose Timer
97 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 105 compatible = "mpc5200b-gpt\0mpc5200-gpt";
98 device_type = "gpt"; 106 device_type = "gpt";
107 cell-index = <3>;
99 reg = <630 10>; 108 reg = <630 10>;
100 interrupts = <1 c 0>; 109 interrupts = <1 c 0>;
101 interrupt-parent = <500>; 110 interrupt-parent = <500>;
102 }; 111 };
103 112
104 gpt@640 { // General Purpose Timer 113 gpt@640 { // General Purpose Timer
105 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 114 compatible = "mpc5200b-gpt\0mpc5200-gpt";
106 device_type = "gpt"; 115 device_type = "gpt";
116 cell-index = <4>;
107 reg = <640 10>; 117 reg = <640 10>;
108 interrupts = <1 d 0>; 118 interrupts = <1 d 0>;
109 interrupt-parent = <500>; 119 interrupt-parent = <500>;
110 }; 120 };
111 121
112 gpt@650 { // General Purpose Timer 122 gpt@650 { // General Purpose Timer
113 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 123 compatible = "mpc5200b-gpt\0mpc5200-gpt";
114 device_type = "gpt"; 124 device_type = "gpt";
125 cell-index = <5>;
115 reg = <650 10>; 126 reg = <650 10>;
116 interrupts = <1 e 0>; 127 interrupts = <1 e 0>;
117 interrupt-parent = <500>; 128 interrupt-parent = <500>;
118 }; 129 };
119 130
120 gpt@660 { // General Purpose Timer 131 gpt@660 { // General Purpose Timer
121 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 132 compatible = "mpc5200b-gpt\0mpc5200-gpt";
122 device_type = "gpt"; 133 device_type = "gpt";
134 cell-index = <6>;
123 reg = <660 10>; 135 reg = <660 10>;
124 interrupts = <1 f 0>; 136 interrupts = <1 f 0>;
125 interrupt-parent = <500>; 137 interrupt-parent = <500>;
126 }; 138 };
127 139
128 gpt@670 { // General Purpose Timer 140 gpt@670 { // General Purpose Timer
129 compatible = "mpc5200b-gpt\0mpc52xx-gpt"; 141 compatible = "mpc5200b-gpt\0mpc5200-gpt";
130 device_type = "gpt"; 142 device_type = "gpt";
143 cell-index = <7>;
131 reg = <670 10>; 144 reg = <670 10>;
132 interrupts = <1 10 0>; 145 interrupts = <1 10 0>;
133 interrupt-parent = <500>; 146 interrupt-parent = <500>;
134 }; 147 };
135 148
136 rtc@800 { // Real time clock 149 rtc@800 { // Real time clock
137 compatible = "mpc5200b-rtc\0mpc52xx-rtc"; 150 compatible = "mpc5200b-rtc\0mpc5200-rtc";
138 device_type = "rtc"; 151 device_type = "rtc";
139 reg = <800 100>; 152 reg = <800 100>;
140 interrupts = <1 5 0 1 6 0>; 153 interrupts = <1 5 0 1 6 0>;
@@ -143,7 +156,8 @@
143 156
144 mscan@900 { 157 mscan@900 {
145 device_type = "mscan"; 158 device_type = "mscan";
146 compatible = "mpc5200b-mscan\0mpc52xx-mscan"; 159 compatible = "mpc5200b-mscan\0mpc5200-mscan";
160 cell-index = <0>;
147 interrupts = <2 11 0>; 161 interrupts = <2 11 0>;
148 interrupt-parent = <500>; 162 interrupt-parent = <500>;
149 reg = <900 80>; 163 reg = <900 80>;
@@ -151,21 +165,22 @@
151 165
152 mscan@980 { 166 mscan@980 {
153 device_type = "mscan"; 167 device_type = "mscan";
154 compatible = "mpc5200b-mscan\0mpc52xx-mscan"; 168 compatible = "mpc5200b-mscan\0mpc5200-mscan";
169 cell-index = <1>;
155 interrupts = <1 12 0>; 170 interrupts = <1 12 0>;
156 interrupt-parent = <500>; 171 interrupt-parent = <500>;
157 reg = <980 80>; 172 reg = <980 80>;
158 }; 173 };
159 174
160 gpio@b00 { 175 gpio@b00 {
161 compatible = "mpc5200b-gpio\0mpc52xx-gpio"; 176 compatible = "mpc5200b-gpio\0mpc5200-gpio";
162 reg = <b00 40>; 177 reg = <b00 40>;
163 interrupts = <1 7 0>; 178 interrupts = <1 7 0>;
164 interrupt-parent = <500>; 179 interrupt-parent = <500>;
165 }; 180 };
166 181
167 gpio-wkup@b00 { 182 gpio-wkup@b00 {
168 compatible = "mpc5200b-gpio-wkup\0mpc52xx-gpio-wkup"; 183 compatible = "mpc5200b-gpio-wkup\0mpc5200-gpio-wkup";
169 reg = <c00 40>; 184 reg = <c00 40>;
170 interrupts = <1 8 0 0 3 0>; 185 interrupts = <1 8 0 0 3 0>;
171 interrupt-parent = <500>; 186 interrupt-parent = <500>;
@@ -176,7 +191,7 @@
176 #size-cells = <2>; 191 #size-cells = <2>;
177 #address-cells = <3>; 192 #address-cells = <3>;
178 device_type = "pci"; 193 device_type = "pci";
179 compatible = "mpc5200b-pci\0mpc52xx-pci"; 194 compatible = "mpc5200b-pci\0mpc5200-pci";
180 reg = <d00 100>; 195 reg = <d00 100>;
181 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
182 interrupt-map = <c000 0 0 1 500 0 0 3 // 1st slot 197 interrupt-map = <c000 0 0 1 500 0 0 3 // 1st slot
@@ -199,7 +214,7 @@
199 214
200 spi@f00 { 215 spi@f00 {
201 device_type = "spi"; 216 device_type = "spi";
202 compatible = "mpc5200b-spi\0mpc52xx-spi"; 217 compatible = "mpc5200b-spi\0mpc5200-spi";
203 reg = <f00 20>; 218 reg = <f00 20>;
204 interrupts = <2 d 0 2 e 0>; 219 interrupts = <2 d 0 2 e 0>;
205 interrupt-parent = <500>; 220 interrupt-parent = <500>;
@@ -207,7 +222,7 @@
207 222
208 usb@1000 { 223 usb@1000 {
209 device_type = "usb-ohci-be"; 224 device_type = "usb-ohci-be";
210 compatible = "mpc5200b-ohci\0mpc52xx-ohci\0ohci-be"; 225 compatible = "mpc5200b-ohci\0mpc5200-ohci\0ohci-be";
211 reg = <1000 ff>; 226 reg = <1000 ff>;
212 interrupts = <2 6 0>; 227 interrupts = <2 6 0>;
213 interrupt-parent = <500>; 228 interrupt-parent = <500>;
@@ -215,7 +230,7 @@
215 230
216 bestcomm@1200 { 231 bestcomm@1200 {
217 device_type = "dma-controller"; 232 device_type = "dma-controller";
218 compatible = "mpc5200b-bestcomm\0mpc52xx-bestcomm"; 233 compatible = "mpc5200b-bestcomm\0mpc5200-bestcomm";
219 reg = <1200 80>; 234 reg = <1200 80>;
220 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 235 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
221 3 4 0 3 5 0 3 6 0 3 7 0 236 3 4 0 3 5 0 3 6 0 3 7 0
@@ -225,67 +240,73 @@
225 }; 240 };
226 241
227 xlb@1f00 { 242 xlb@1f00 {
228 compatible = "mpc5200b-xlb\0mpc52xx-xlb"; 243 compatible = "mpc5200b-xlb\0mpc5200-xlb";
229 reg = <1f00 100>; 244 reg = <1f00 100>;
230 }; 245 };
231 246
232 serial@2000 { // PSC1 247 serial@2000 { // PSC1
233 device_type = "serial"; 248 device_type = "serial";
234 compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 249 compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
235 port-number = <0>; // Logical port assignment 250 port-number = <0>; // Logical port assignment
251 cell-index = <0>;
236 reg = <2000 100>; 252 reg = <2000 100>;
237 interrupts = <2 1 0>; 253 interrupts = <2 1 0>;
238 interrupt-parent = <500>; 254 interrupt-parent = <500>;
239 }; 255 };
240 256
241 // PSC2 in spi mode example 257 // PSC2 in ac97 mode example
242 spi@2200 { // PSC2 258 //ac97@2200 { // PSC2
243 device_type = "spi"; 259 // device_type = "sound";
244 compatible = "mpc5200b-psc-spi\0mpc52xx-psc-spi"; 260 // compatible = "mpc5200b-psc-ac97\0mpc5200-psc-ac97";
245 reg = <2200 100>; 261 // cell-index = <1>;
246 interrupts = <2 2 0>; 262 // reg = <2200 100>;
247 interrupt-parent = <500>; 263 // interrupts = <2 2 0>;
248 }; 264 // interrupt-parent = <500>;
265 //};
249 266
250 // PSC3 in CODEC mode example 267 // PSC3 in CODEC mode example
251 i2s@2400 { // PSC3 268 //i2s@2400 { // PSC3
252 device_type = "sound"; 269 // device_type = "sound";
253 compatible = "mpc5200b-psc-i2s\0mpc52xx-psc-i2s"; 270 // compatible = "mpc5200b-psc-i2s"; //not 5200 compatible
254 reg = <2400 100>; 271 // cell-index = <2>;
255 interrupts = <2 3 0>; 272 // reg = <2400 100>;
256 interrupt-parent = <500>; 273 // interrupts = <2 3 0>;
257 }; 274 // interrupt-parent = <500>;
275 //};
258 276
259 // PSC4 unconfigured 277 // PSC4 in uart mode example
260 //serial@2600 { // PSC4 278 //serial@2600 { // PSC4
261 // device_type = "serial"; 279 // device_type = "serial";
262 // compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 280 // compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
281 // cell-index = <3>;
263 // reg = <2600 100>; 282 // reg = <2600 100>;
264 // interrupts = <2 b 0>; 283 // interrupts = <2 b 0>;
265 // interrupt-parent = <500>; 284 // interrupt-parent = <500>;
266 //}; 285 //};
267 286
268 // PSC5 unconfigured 287 // PSC5 in uart mode example
269 //serial@2800 { // PSC5 288 //serial@2800 { // PSC5
270 // device_type = "serial"; 289 // device_type = "serial";
271 // compatible = "mpc5200b-psc-uart\0mpc52xx-psc-uart"; 290 // compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
291 // cell-index = <4>;
272 // reg = <2800 100>; 292 // reg = <2800 100>;
273 // interrupts = <2 c 0>; 293 // interrupts = <2 c 0>;
274 // interrupt-parent = <500>; 294 // interrupt-parent = <500>;
275 //}; 295 //};
276 296
277 // PSC6 in AC97 mode example 297 // PSC6 in spi mode example
278 ac97@2c00 { // PSC6 298 //spi@2c00 { // PSC6
279 device_type = "sound"; 299 // device_type = "spi";
280 compatible = "mpc5200b-psc-ac97\0mpc52xx-psc-ac97"; 300 // compatible = "mpc5200b-psc-spi\0mpc5200-psc-spi";
281 reg = <2c00 100>; 301 // cell-index = <5>;
282 interrupts = <2 4 0>; 302 // reg = <2c00 100>;
283 interrupt-parent = <500>; 303 // interrupts = <2 4 0>;
284 }; 304 // interrupt-parent = <500>;
305 //};
285 306
286 ethernet@3000 { 307 ethernet@3000 {
287 device_type = "network"; 308 device_type = "network";
288 compatible = "mpc5200b-fec\0mpc52xx-fec"; 309 compatible = "mpc5200b-fec\0mpc5200-fec";
289 reg = <3000 800>; 310 reg = <3000 800>;
290 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 311 mac-address = [ 02 03 04 05 06 07 ]; // Bad!
291 interrupts = <2 5 0>; 312 interrupts = <2 5 0>;
@@ -294,7 +315,7 @@
294 315
295 ata@3a00 { 316 ata@3a00 {
296 device_type = "ata"; 317 device_type = "ata";
297 compatible = "mpc5200b-ata\0mpc52xx-ata"; 318 compatible = "mpc5200b-ata\0mpc5200-ata";
298 reg = <3a00 100>; 319 reg = <3a00 100>;
299 interrupts = <2 7 0>; 320 interrupts = <2 7 0>;
300 interrupt-parent = <500>; 321 interrupt-parent = <500>;
@@ -302,7 +323,8 @@
302 323
303 i2c@3d00 { 324 i2c@3d00 {
304 device_type = "i2c"; 325 device_type = "i2c";
305 compatible = "mpc5200b-i2c\0mpc52xx-i2c"; 326 compatible = "mpc5200b-i2c\0mpc5200-i2c";
327 cell-index = <0>;
306 reg = <3d00 40>; 328 reg = <3d00 40>;
307 interrupts = <2 f 0>; 329 interrupts = <2 f 0>;
308 interrupt-parent = <500>; 330 interrupt-parent = <500>;
@@ -310,14 +332,15 @@
310 332
311 i2c@3d40 { 333 i2c@3d40 {
312 device_type = "i2c"; 334 device_type = "i2c";
313 compatible = "mpc5200b-i2c\0mpc52xx-i2c"; 335 compatible = "mpc5200b-i2c\0mpc5200-i2c";
336 cell-index = <1>;
314 reg = <3d40 40>; 337 reg = <3d40 40>;
315 interrupts = <2 10 0>; 338 interrupts = <2 10 0>;
316 interrupt-parent = <500>; 339 interrupt-parent = <500>;
317 }; 340 };
318 sram@8000 { 341 sram@8000 {
319 device_type = "sram"; 342 device_type = "sram";
320 compatible = "mpc5200b-sram\0mpc52xx-sram\0sram"; 343 compatible = "mpc5200b-sram\0mpc5200-sram\0sram";
321 reg = <8000 4000>; 344 reg = <8000 4000>;
322 }; 345 };
323 }; 346 };
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index c4d9562cbaad..41d0720c5900 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -36,7 +36,6 @@
36 bus-frequency = <0>; // From U-Boot 36 bus-frequency = <0>; // From U-Boot
37 32-bit; 37 32-bit;
38 linux,phandle = <201>; 38 linux,phandle = <201>;
39 linux,boot-cpu;
40 }; 39 };
41 }; 40 };
42 41
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 34efdd028c4f..260b2e447779 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -34,7 +34,6 @@
34 clock-frequency = <0>; 34 clock-frequency = <0>;
35 32-bit; 35 32-bit;
36 linux,phandle = <201>; 36 linux,phandle = <201>;
37 linux,boot-cpu;
38 }; 37 };
39 }; 38 };
40 39
@@ -53,13 +52,20 @@
53 reg = <00000000 4000000 f4500000 00000020>; 52 reg = <00000000 4000000 f4500000 00000020>;
54 }; 53 };
55 54
55 chosen {
56 name = "chosen";
57 linux,platform = <0>;
58 interrupt-controller = <10c00>;
59 linux,phandle = <400>;
60 };
61
56 soc8272@f0000000 { 62 soc8272@f0000000 {
57 #address-cells = <1>; 63 #address-cells = <1>;
58 #size-cells = <1>; 64 #size-cells = <1>;
59 #interrupt-cells = <2>; 65 #interrupt-cells = <2>;
60 device_type = "soc"; 66 device_type = "soc";
61 ranges = < 0 0 2 00000000 f0000000 00053000>; 67 ranges = <00000000 f0000000 00053000>;
62 reg = <f0000000 0>; 68 reg = <f0000000 10000>;
63 69
64 mdio@0 { 70 mdio@0 {
65 device_type = "mdio"; 71 device_type = "mdio";
@@ -71,7 +77,7 @@
71 ethernet-phy@0 { 77 ethernet-phy@0 {
72 linux,phandle = <2452000>; 78 linux,phandle = <2452000>;
73 interrupt-parent = <10c00>; 79 interrupt-parent = <10c00>;
74 interrupts = <19 1>; 80 interrupts = <17 4>;
75 reg = <0>; 81 reg = <0>;
76 bitbang = [ 12 12 13 02 02 01 ]; 82 bitbang = [ 12 12 13 02 02 01 ];
77 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
@@ -79,7 +85,7 @@
79 ethernet-phy@1 { 85 ethernet-phy@1 {
80 linux,phandle = <2452001>; 86 linux,phandle = <2452001>;
81 interrupt-parent = <10c00>; 87 interrupt-parent = <10c00>;
82 interrupts = <19 1>; 88 interrupts = <17 4>;
83 bitbang = [ 12 12 13 02 02 01 ]; 89 bitbang = [ 12 12 13 02 02 01 ];
84 reg = <3>; 90 reg = <3>;
85 device_type = "ethernet-phy"; 91 device_type = "ethernet-phy";
@@ -90,7 +96,7 @@
90 #address-cells = <1>; 96 #address-cells = <1>;
91 #size-cells = <0>; 97 #size-cells = <0>;
92 device_type = "network"; 98 device_type = "network";
93 device-id = <2>; 99 device-id = <1>;
94 compatible = "fs_enet"; 100 compatible = "fs_enet";
95 model = "FCC"; 101 model = "FCC";
96 reg = <11300 20 8400 100 11380 30>; 102 reg = <11300 20 8400 100 11380 30>;
@@ -104,7 +110,7 @@
104 110
105 ethernet@25000 { 111 ethernet@25000 {
106 device_type = "network"; 112 device_type = "network";
107 device-id = <3>; 113 device-id = <2>;
108 compatible = "fs_enet"; 114 compatible = "fs_enet";
109 model = "FCC"; 115 model = "FCC";
110 reg = <11320 20 8500 100 113b0 30>; 116 reg = <11320 20 8500 100 113b0 30>;
@@ -123,8 +129,8 @@
123 #interrupt-cells = <2>; 129 #interrupt-cells = <2>;
124 device_type = "cpm"; 130 device_type = "cpm";
125 model = "CPM2"; 131 model = "CPM2";
126 ranges = <00000000 00000000 3ffff>; 132 ranges = <00000000 00000000 20000>;
127 reg = <10d80 3280>; 133 reg = <0 20000>;
128 command-proc = <119c0>; 134 command-proc = <119c0>;
129 brg-frequency = <17D7840>; 135 brg-frequency = <17D7840>;
130 cpm_clk = <BEBC200>; 136 cpm_clk = <BEBC200>;
@@ -133,7 +139,7 @@
133 device_type = "serial"; 139 device_type = "serial";
134 compatible = "cpm_uart"; 140 compatible = "cpm_uart";
135 model = "SCC"; 141 model = "SCC";
136 device-id = <2>; 142 device-id = <1>;
137 reg = <11a00 20 8000 100>; 143 reg = <11a00 20 8000 100>;
138 current-speed = <1c200>; 144 current-speed = <1c200>;
139 interrupts = <28 2>; 145 interrupts = <28 2>;
@@ -147,7 +153,7 @@
147 device_type = "serial"; 153 device_type = "serial";
148 compatible = "cpm_uart"; 154 compatible = "cpm_uart";
149 model = "SCC"; 155 model = "SCC";
150 device-id = <5>; 156 device-id = <4>;
151 reg = <11a60 20 8300 100>; 157 reg = <11a60 20 8300 100>;
152 current-speed = <1c200>; 158 current-speed = <1c200>;
153 interrupts = <2b 2>; 159 interrupts = <2b 2>;
@@ -181,24 +187,24 @@
181 interrupt-map = < 187 interrupt-map = <
182 188
183 /* IDSEL 0x16 */ 189 /* IDSEL 0x16 */
184 b000 0 0 1 f8200000 40 0 190 b000 0 0 1 f8200000 40 8
185 b000 0 0 2 f8200000 41 0 191 b000 0 0 2 f8200000 41 8
186 b000 0 0 3 f8200000 42 0 192 b000 0 0 3 f8200000 42 8
187 b000 0 0 4 f8200000 43 0 193 b000 0 0 4 f8200000 43 8
188 194
189 /* IDSEL 0x17 */ 195 /* IDSEL 0x17 */
190 b800 0 0 1 f8200000 43 0 196 b800 0 0 1 f8200000 43 8
191 b800 0 0 2 f8200000 40 0 197 b800 0 0 2 f8200000 40 8
192 b800 0 0 3 f8200000 41 0 198 b800 0 0 3 f8200000 41 8
193 b800 0 0 4 f8200000 42 0 199 b800 0 0 4 f8200000 42 8
194 200
195 /* IDSEL 0x18 */ 201 /* IDSEL 0x18 */
196 c000 0 0 1 f8200000 42 0 202 c000 0 0 1 f8200000 42 8
197 c000 0 0 2 f8200000 43 0 203 c000 0 0 2 f8200000 43 8
198 c000 0 0 3 f8200000 40 0 204 c000 0 0 3 f8200000 40 8
199 c000 0 0 4 f8200000 41 0>; 205 c000 0 0 4 f8200000 41 8>;
200 interrupt-parent = <10c00>; 206 interrupt-parent = <10c00>;
201 interrupts = <14 3>; 207 interrupts = <14 8>;
202 bus-range = <0 0>; 208 bus-range = <0 0>;
203 ranges = <02000000 0 80000000 80000000 0 40000000 209 ranges = <02000000 0 80000000 80000000 0 40000000
204 01000000 0 00000000 f6000000 0 02000000>; 210 01000000 0 00000000 f6000000 0 02000000>;
@@ -210,7 +216,7 @@
210 model = "SEC2"; 216 model = "SEC2";
211 compatible = "talitos"; 217 compatible = "talitos";
212 reg = <30000 10000>; 218 reg = <30000 10000>;
213 interrupts = <b 0>; 219 interrupts = <b 2>;
214 interrupt-parent = <10c00>; 220 interrupt-parent = <10c00>;
215 num-channels = <4>; 221 num-channels = <4>;
216 channel-fifo-len = <18>; 222 channel-fifo-len = <18>;
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
new file mode 100644
index 000000000000..6d721900d00e
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -0,0 +1,215 @@
1/*
2 * MPC8313E RDB Device Tree Source
3 *
4 * Copyright 2005, 2006, 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8313ERDB";
14 compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8313@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <4000>; // L1, 16K
29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>; // from bootloader
31 bus-frequency = <0>; // from bootloader
32 clock-frequency = <0>; // from bootloader
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 08000000>; // 128MB at 0
40 };
41
42 soc8313@e0000000 {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 #interrupt-cells = <2>;
46 device_type = "soc";
47 ranges = <0 e0000000 00100000>;
48 reg = <e0000000 00000200>;
49 bus-frequency = <0>;
50
51 wdt@200 {
52 device_type = "watchdog";
53 compatible = "mpc83xx_wdt";
54 reg = <200 100>;
55 };
56
57 i2c@3000 {
58 device_type = "i2c";
59 compatible = "fsl-i2c";
60 reg = <3000 100>;
61 interrupts = <e 8>;
62 interrupt-parent = < &ipic >;
63 dfsrr;
64 };
65
66 i2c@3100 {
67 device_type = "i2c";
68 compatible = "fsl-i2c";
69 reg = <3100 100>;
70 interrupts = <f 8>;
71 interrupt-parent = < &ipic >;
72 dfsrr;
73 };
74
75 spi@7000 {
76 device_type = "spi";
77 compatible = "mpc83xx_spi";
78 reg = <7000 1000>;
79 interrupts = <10 8>;
80 interrupt-parent = < &ipic >;
81 mode = <0>;
82 };
83
84 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
85 usb@23000 {
86 device_type = "usb";
87 compatible = "fsl-usb2-dr";
88 reg = <23000 1000>;
89 #address-cells = <1>;
90 #size-cells = <0>;
91 interrupt-parent = < &ipic >;
92 interrupts = <26 8>;
93 phy_type = "utmi_wide";
94 };
95
96 mdio@24520 {
97 device_type = "mdio";
98 compatible = "gianfar";
99 reg = <24520 20>;
100 #address-cells = <1>;
101 #size-cells = <0>;
102 phy1: ethernet-phy@1 {
103 interrupt-parent = < &ipic >;
104 interrupts = <13 8>;
105 reg = <1>;
106 device_type = "ethernet-phy";
107 };
108 phy4: ethernet-phy@4 {
109 interrupt-parent = < &ipic >;
110 interrupts = <14 8>;
111 reg = <4>;
112 device_type = "ethernet-phy";
113 };
114 };
115
116 ethernet@24000 {
117 device_type = "network";
118 model = "eTSEC";
119 compatible = "gianfar";
120 reg = <24000 1000>;
121 local-mac-address = [ 00 00 00 00 00 00 ];
122 interrupts = <25 8 24 8 23 8>;
123 interrupt-parent = < &ipic >;
124 phy-handle = < &phy1 >;
125 };
126
127 ethernet@25000 {
128 device_type = "network";
129 model = "eTSEC";
130 compatible = "gianfar";
131 reg = <25000 1000>;
132 local-mac-address = [ 00 00 00 00 00 00 ];
133 interrupts = <22 8 21 8 20 8>;
134 interrupt-parent = < &ipic >;
135 phy-handle = < &phy4 >;
136 };
137
138 serial@4500 {
139 device_type = "serial";
140 compatible = "ns16550";
141 reg = <4500 100>;
142 clock-frequency = <0>;
143 interrupts = <9 8>;
144 interrupt-parent = < &ipic >;
145 };
146
147 serial@4600 {
148 device_type = "serial";
149 compatible = "ns16550";
150 reg = <4600 100>;
151 clock-frequency = <0>;
152 interrupts = <a 8>;
153 interrupt-parent = < &ipic >;
154 };
155
156 pci@8500 {
157 interrupt-map-mask = <f800 0 0 7>;
158 interrupt-map = <
159
160 /* IDSEL 0x0E -mini PCI */
161 7000 0 0 1 &ipic 12 8
162 7000 0 0 2 &ipic 12 8
163 7000 0 0 3 &ipic 12 8
164 7000 0 0 4 &ipic 12 8
165
166 /* IDSEL 0x0F - PCI slot */
167 7800 0 0 1 &ipic 11 8
168 7800 0 0 2 &ipic 12 8
169 7800 0 0 3 &ipic 11 8
170 7800 0 0 4 &ipic 12 8>;
171 interrupt-parent = < &ipic >;
172 interrupts = <42 8>;
173 bus-range = <0 0>;
174 ranges = <02000000 0 90000000 90000000 0 10000000
175 42000000 0 80000000 80000000 0 10000000
176 01000000 0 00000000 e2000000 0 00100000>;
177 clock-frequency = <3f940aa>;
178 #interrupt-cells = <1>;
179 #size-cells = <2>;
180 #address-cells = <3>;
181 reg = <8500 100>;
182 compatible = "83xx";
183 device_type = "pci";
184 };
185
186 crypto@30000 {
187 device_type = "crypto";
188 model = "SEC2";
189 compatible = "talitos";
190 reg = <30000 7000>;
191 interrupts = <b 8>;
192 interrupt-parent = < &ipic >;
193 /* Rev. 2.2 */
194 num-channels = <1>;
195 channel-fifo-len = <18>;
196 exec-units-mask = <0000004c>;
197 descriptor-types-mask = <0122003f>;
198 };
199
200 /* IPIC
201 * interrupts cell = <intr #, sense>
202 * sense values match linux IORESOURCE_IRQ_* defines:
203 * sense == 8: Level, low assertion
204 * sense == 2: Edge, high-to-low change
205 */
206 ipic: pic@700 {
207 interrupt-controller;
208 #address-cells = <0>;
209 #interrupt-cells = <2>;
210 reg = <700 100>;
211 built-in;
212 device_type = "ipic";
213 };
214 };
215};
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
new file mode 100644
index 000000000000..06b310698a02
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -0,0 +1,333 @@
1/*
2 * MPC8323E EMDS Device Tree Source
3 *
4 * Copyright 2006 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12/ {
13 model = "MPC8323EMDS";
14 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS";
15 #address-cells = <1>;
16 #size-cells = <1>;
17
18 cpus {
19 #cpus = <1>;
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,8323@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes
27 i-cache-line-size = <20>; // 32 bytes
28 d-cache-size = <4000>; // L1, 16K
29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>;
31 bus-frequency = <0>;
32 clock-frequency = <0>;
33 32-bit;
34 };
35 };
36
37 memory {
38 device_type = "memory";
39 reg = <00000000 08000000>;
40 };
41
42 bcsr@f8000000 {
43 device_type = "board-control";
44 reg = <f8000000 8000>;
45 };
46
47 soc8323@e0000000 {
48 #address-cells = <1>;
49 #size-cells = <1>;
50 #interrupt-cells = <2>;
51 device_type = "soc";
52 ranges = <0 e0000000 00100000>;
53 reg = <e0000000 00000200>;
54 bus-frequency = <7DE2900>;
55
56 wdt@200 {
57 device_type = "watchdog";
58 compatible = "mpc83xx_wdt";
59 reg = <200 100>;
60 };
61
62 i2c@3000 {
63 device_type = "i2c";
64 compatible = "fsl-i2c";
65 reg = <3000 100>;
66 interrupts = <e 8>;
67 interrupt-parent = < &ipic >;
68 dfsrr;
69 };
70
71 serial@4500 {
72 device_type = "serial";
73 compatible = "ns16550";
74 reg = <4500 100>;
75 clock-frequency = <0>;
76 interrupts = <9 8>;
77 interrupt-parent = < &ipic >;
78 };
79
80 serial@4600 {
81 device_type = "serial";
82 compatible = "ns16550";
83 reg = <4600 100>;
84 clock-frequency = <0>;
85 interrupts = <a 8>;
86 interrupt-parent = < &ipic >;
87 };
88
89 crypto@30000 {
90 device_type = "crypto";
91 model = "SEC2";
92 compatible = "talitos";
93 reg = <30000 7000>;
94 interrupts = <b 8>;
95 interrupt-parent = < &ipic >;
96 /* Rev. 2.2 */
97 num-channels = <1>;
98 channel-fifo-len = <18>;
99 exec-units-mask = <0000004c>;
100 descriptor-types-mask = <0122003f>;
101 };
102
103 pci@8500 {
104 interrupt-map-mask = <f800 0 0 7>;
105 interrupt-map = <
106 /* IDSEL 0x11 AD17 */
107 8800 0 0 1 &ipic 14 8
108 8800 0 0 2 &ipic 15 8
109 8800 0 0 3 &ipic 16 8
110 8800 0 0 4 &ipic 17 8
111
112 /* IDSEL 0x12 AD18 */
113 9000 0 0 1 &ipic 16 8
114 9000 0 0 2 &ipic 17 8
115 9000 0 0 3 &ipic 14 8
116 9000 0 0 4 &ipic 15 8
117
118 /* IDSEL 0x13 AD19 */
119 9800 0 0 1 &ipic 17 8
120 9800 0 0 2 &ipic 14 8
121 9800 0 0 3 &ipic 15 8
122 9800 0 0 4 &ipic 16 8
123
124 /* IDSEL 0x15 AD21*/
125 a800 0 0 1 &ipic 14 8
126 a800 0 0 2 &ipic 15 8
127 a800 0 0 3 &ipic 16 8
128 a800 0 0 4 &ipic 17 8
129
130 /* IDSEL 0x16 AD22*/
131 b000 0 0 1 &ipic 17 8
132 b000 0 0 2 &ipic 14 8
133 b000 0 0 3 &ipic 15 8
134 b000 0 0 4 &ipic 16 8
135
136 /* IDSEL 0x17 AD23*/
137 b800 0 0 1 &ipic 16 8
138 b800 0 0 2 &ipic 17 8
139 b800 0 0 3 &ipic 14 8
140 b800 0 0 4 &ipic 15 8
141
142 /* IDSEL 0x18 AD24*/
143 c000 0 0 1 &ipic 15 8
144 c000 0 0 2 &ipic 16 8
145 c000 0 0 3 &ipic 17 8
146 c000 0 0 4 &ipic 14 8>;
147 interrupt-parent = < &ipic >;
148 interrupts = <42 8>;
149 bus-range = <0 0>;
150 ranges = <02000000 0 a0000000 90000000 0 10000000
151 42000000 0 80000000 80000000 0 10000000
152 01000000 0 00000000 d0000000 0 00100000>;
153 clock-frequency = <0>;
154 #interrupt-cells = <1>;
155 #size-cells = <2>;
156 #address-cells = <3>;
157 reg = <8500 100>;
158 compatible = "83xx";
159 device_type = "pci";
160 };
161
162 ipic: pic@700 {
163 interrupt-controller;
164 #address-cells = <0>;
165 #interrupt-cells = <2>;
166 reg = <700 100>;
167 built-in;
168 device_type = "ipic";
169 };
170
171 par_io@1400 {
172 reg = <1400 100>;
173 device_type = "par_io";
174 num-ports = <7>;
175
176 pio3: ucc_pin@03 {
177 pio-map = <
178 /* port pin dir open_drain assignment has_irq */
179 3 4 3 0 2 0 /* MDIO */
180 3 5 1 0 2 0 /* MDC */
181 0 d 2 0 1 0 /* RX_CLK (CLK9) */
182 3 18 2 0 1 0 /* TX_CLK (CLK10) */
183 1 1 1 0 1 0 /* TxD1 */
184 1 0 1 0 1 0 /* TxD0 */
185 1 1 1 0 1 0 /* TxD1 */
186 1 2 1 0 1 0 /* TxD2 */
187 1 3 1 0 1 0 /* TxD3 */
188 1 4 2 0 1 0 /* RxD0 */
189 1 5 2 0 1 0 /* RxD1 */
190 1 6 2 0 1 0 /* RxD2 */
191 1 7 2 0 1 0 /* RxD3 */
192 1 8 2 0 1 0 /* RX_ER */
193 1 9 1 0 1 0 /* TX_ER */
194 1 a 2 0 1 0 /* RX_DV */
195 1 b 2 0 1 0 /* COL */
196 1 c 1 0 1 0 /* TX_EN */
197 1 d 2 0 1 0>;/* CRS */
198 };
199 pio4: ucc_pin@04 {
200 pio-map = <
201 /* port pin dir open_drain assignment has_irq */
202 3 1f 2 0 1 0 /* RX_CLK (CLK7) */
203 3 6 2 0 1 0 /* TX_CLK (CLK8) */
204 1 12 1 0 1 0 /* TxD0 */
205 1 13 1 0 1 0 /* TxD1 */
206 1 14 1 0 1 0 /* TxD2 */
207 1 15 1 0 1 0 /* TxD3 */
208 1 16 2 0 1 0 /* RxD0 */
209 1 17 2 0 1 0 /* RxD1 */
210 1 18 2 0 1 0 /* RxD2 */
211 1 19 2 0 1 0 /* RxD3 */
212 1 1a 2 0 1 0 /* RX_ER */
213 1 1b 1 0 1 0 /* TX_ER */
214 1 1c 2 0 1 0 /* RX_DV */
215 1 1d 2 0 1 0 /* COL */
216 1 1e 1 0 1 0 /* TX_EN */
217 1 1f 2 0 1 0>;/* CRS */
218 };
219 };
220 };
221
222 qe@e0100000 {
223 #address-cells = <1>;
224 #size-cells = <1>;
225 device_type = "qe";
226 model = "QE";
227 ranges = <0 e0100000 00100000>;
228 reg = <e0100000 480>;
229 brg-frequency = <0>;
230 bus-frequency = <BCD3D80>;
231
232 muram@10000 {
233 device_type = "muram";
234 ranges = <0 00010000 00004000>;
235
236 data-only@0 {
237 reg = <0 4000>;
238 };
239 };
240
241 spi@4c0 {
242 device_type = "spi";
243 compatible = "fsl_spi";
244 reg = <4c0 40>;
245 interrupts = <2>;
246 interrupt-parent = < &qeic >;
247 mode = "cpu";
248 };
249
250 spi@500 {
251 device_type = "spi";
252 compatible = "fsl_spi";
253 reg = <500 40>;
254 interrupts = <1>;
255 interrupt-parent = < &qeic >;
256 mode = "cpu";
257 };
258
259 usb@6c0 {
260 device_type = "usb";
261 compatible = "qe_udc";
262 reg = <6c0 40 8B00 100>;
263 interrupts = <b>;
264 interrupt-parent = < &qeic >;
265 mode = "slave";
266 };
267
268 ucc@2200 {
269 device_type = "network";
270 compatible = "ucc_geth";
271 model = "UCC";
272 device-id = <3>;
273 reg = <2200 200>;
274 interrupts = <22>;
275 interrupt-parent = < &qeic >;
276 mac-address = [ 00 04 9f 00 23 23 ];
277 rx-clock = <19>;
278 tx-clock = <1a>;
279 phy-handle = < &phy3 >;
280 pio-handle = < &pio3 >;
281 };
282
283 ucc@3200 {
284 device_type = "network";
285 compatible = "ucc_geth";
286 model = "UCC";
287 device-id = <4>;
288 reg = <3000 200>;
289 interrupts = <23>;
290 interrupt-parent = < &qeic >;
291 mac-address = [ 00 11 22 33 44 55 ];
292 rx-clock = <17>;
293 tx-clock = <18>;
294 phy-handle = < &phy4 >;
295 pio-handle = < &pio4 >;
296 };
297
298 mdio@2320 {
299 #address-cells = <1>;
300 #size-cells = <0>;
301 reg = <2320 18>;
302 device_type = "mdio";
303 compatible = "ucc_geth_phy";
304
305 phy3: ethernet-phy@03 {
306 interrupt-parent = < &ipic >;
307 interrupts = <11 8>;
308 reg = <3>;
309 device_type = "ethernet-phy";
310 interface = <3>; //ENET_100_MII
311 };
312 phy4: ethernet-phy@04 {
313 interrupt-parent = < &ipic >;
314 interrupts = <12 8>;
315 reg = <4>;
316 device_type = "ethernet-phy";
317 interface = <3>;
318 };
319 };
320
321 qeic: qeic@80 {
322 interrupt-controller;
323 device_type = "qeic";
324 #address-cells = <0>;
325 #interrupt-cells = <1>;
326 reg = <80 80>;
327 built-in;
328 big-endian;
329 interrupts = <20 8 21 8>; //high:32 low:33
330 interrupt-parent = < &ipic >;
331 };
332 };
333};
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 27807fc45888..61b550bf1645 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -10,7 +10,7 @@
10 */ 10 */
11/ { 11/ {
12 model = "MPC8349EMITX"; 12 model = "MPC8349EMITX";
13 compatible = "MPC834xMITX"; 13 compatible = "MPC8349EMITX", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>; 14 #address-cells = <1>;
15 #size-cells = <1>; 15 #size-cells = <1>;
16 16
@@ -58,7 +58,7 @@
58 compatible = "fsl-i2c"; 58 compatible = "fsl-i2c";
59 reg = <3000 100>; 59 reg = <3000 100>;
60 interrupts = <e 8>; 60 interrupts = <e 8>;
61 interrupt-parent = <700>; 61 interrupt-parent = < &ipic >;
62 dfsrr; 62 dfsrr;
63 }; 63 };
64 64
@@ -67,7 +67,7 @@
67 compatible = "fsl-i2c"; 67 compatible = "fsl-i2c";
68 reg = <3100 100>; 68 reg = <3100 100>;
69 interrupts = <f 8>; 69 interrupts = <f 8>;
70 interrupt-parent = <700>; 70 interrupt-parent = < &ipic >;
71 dfsrr; 71 dfsrr;
72 }; 72 };
73 73
@@ -76,7 +76,7 @@
76 compatible = "mpc83xx_spi"; 76 compatible = "mpc83xx_spi";
77 reg = <7000 1000>; 77 reg = <7000 1000>;
78 interrupts = <10 8>; 78 interrupts = <10 8>;
79 interrupt-parent = <700>; 79 interrupt-parent = < &ipic >;
80 mode = <0>; 80 mode = <0>;
81 }; 81 };
82 82
@@ -86,8 +86,8 @@
86 reg = <22000 1000>; 86 reg = <22000 1000>;
87 #address-cells = <1>; 87 #address-cells = <1>;
88 #size-cells = <0>; 88 #size-cells = <0>;
89 interrupt-parent = <700>; 89 interrupt-parent = < &ipic >;
90 interrupts = <27 2>; 90 interrupts = <27 8>;
91 phy_type = "ulpi"; 91 phy_type = "ulpi";
92 port1; 92 port1;
93 }; 93 };
@@ -98,8 +98,8 @@
98 reg = <23000 1000>; 98 reg = <23000 1000>;
99 #address-cells = <1>; 99 #address-cells = <1>;
100 #size-cells = <0>; 100 #size-cells = <0>;
101 interrupt-parent = <700>; 101 interrupt-parent = < &ipic >;
102 interrupts = <26 2>; 102 interrupts = <26 8>;
103 phy_type = "ulpi"; 103 phy_type = "ulpi";
104 }; 104 };
105 105
@@ -109,22 +109,19 @@
109 reg = <24520 20>; 109 reg = <24520 20>;
110 #address-cells = <1>; 110 #address-cells = <1>;
111 #size-cells = <0>; 111 #size-cells = <0>;
112 linux,phandle = <24520>;
113 112
114 /* Vitesse 8201 */ 113 /* Vitesse 8201 */
115 ethernet-phy@1c { 114 phy1c: ethernet-phy@1c {
116 linux,phandle = <245201c>; 115 interrupt-parent = < &ipic >;
117 interrupt-parent = <700>; 116 interrupts = <12 8>;
118 interrupts = <12 2>;
119 reg = <1c>; 117 reg = <1c>;
120 device_type = "ethernet-phy"; 118 device_type = "ethernet-phy";
121 }; 119 };
122 120
123 /* Vitesse 7385 */ 121 /* Vitesse 7385 */
124 ethernet-phy@1f { 122 phy1f: ethernet-phy@1f {
125 linux,phandle = <245201f>; 123 interrupt-parent = < &ipic >;
126 interrupt-parent = <700>; 124 interrupts = <12 8>;
127 interrupts = <12 2>;
128 reg = <1f>; 125 reg = <1f>;
129 device_type = "ethernet-phy"; 126 device_type = "ethernet-phy";
130 }; 127 };
@@ -138,8 +135,8 @@
138 address = [ 00 00 00 00 00 00 ]; 135 address = [ 00 00 00 00 00 00 ];
139 local-mac-address = [ 00 00 00 00 00 00 ]; 136 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <20 8 21 8 22 8>; 137 interrupts = <20 8 21 8 22 8>;
141 interrupt-parent = <700>; 138 interrupt-parent = < &ipic >;
142 phy-handle = <245201c>; 139 phy-handle = < &phy1c >;
143 }; 140 };
144 141
145 ethernet@25000 { 142 ethernet@25000 {
@@ -152,8 +149,8 @@
152 address = [ 00 00 00 00 00 00 ]; 149 address = [ 00 00 00 00 00 00 ];
153 local-mac-address = [ 00 00 00 00 00 00 ]; 150 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <23 8 24 8 25 8>; 151 interrupts = <23 8 24 8 25 8>;
155 interrupt-parent = <700>; 152 interrupt-parent = < &ipic >;
156 phy-handle = <245201f>; 153 phy-handle = < &phy1f >;
157 }; 154 };
158 155
159 serial@4500 { 156 serial@4500 {
@@ -162,7 +159,7 @@
162 reg = <4500 100>; 159 reg = <4500 100>;
163 clock-frequency = <0>; // from bootloader 160 clock-frequency = <0>; // from bootloader
164 interrupts = <9 8>; 161 interrupts = <9 8>;
165 interrupt-parent = <700>; 162 interrupt-parent = < &ipic >;
166 }; 163 };
167 164
168 serial@4600 { 165 serial@4600 {
@@ -171,16 +168,16 @@
171 reg = <4600 100>; 168 reg = <4600 100>;
172 clock-frequency = <0>; // from bootloader 169 clock-frequency = <0>; // from bootloader
173 interrupts = <a 8>; 170 interrupts = <a 8>;
174 interrupt-parent = <700>; 171 interrupt-parent = < &ipic >;
175 }; 172 };
176 173
177 pci@8500 { 174 pci@8500 {
178 interrupt-map-mask = <f800 0 0 7>; 175 interrupt-map-mask = <f800 0 0 7>;
179 interrupt-map = < 176 interrupt-map = <
180 /* IDSEL 0x10 - SATA */ 177 /* IDSEL 0x10 - SATA */
181 8000 0 0 1 700 16 8 /* SATA_INTA */ 178 8000 0 0 1 &ipic 16 8 /* SATA_INTA */
182 >; 179 >;
183 interrupt-parent = <700>; 180 interrupt-parent = < &ipic >;
184 interrupts = <42 8>; 181 interrupts = <42 8>;
185 bus-range = <0 0>; 182 bus-range = <0 0>;
186 ranges = <42000000 0 80000000 80000000 0 10000000 183 ranges = <42000000 0 80000000 80000000 0 10000000
@@ -199,13 +196,13 @@
199 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
200 interrupt-map = < 197 interrupt-map = <
201 /* IDSEL 0x0E - MiniPCI Slot */ 198 /* IDSEL 0x0E - MiniPCI Slot */
202 7000 0 0 1 700 15 8 /* PCI_INTA */ 199 7000 0 0 1 &ipic 15 8 /* PCI_INTA */
203 200
204 /* IDSEL 0x0F - PCI Slot */ 201 /* IDSEL 0x0F - PCI Slot */
205 7800 0 0 1 700 14 8 /* PCI_INTA */ 202 7800 0 0 1 &ipic 14 8 /* PCI_INTA */
206 7800 0 0 2 700 15 8 /* PCI_INTB */ 203 7800 0 0 2 &ipic 15 8 /* PCI_INTB */
207 >; 204 >;
208 interrupt-parent = <700>; 205 interrupt-parent = < &ipic >;
209 interrupts = <43 8>; 206 interrupts = <43 8>;
210 bus-range = <1 1>; 207 bus-range = <1 1>;
211 ranges = <42000000 0 a0000000 a0000000 0 10000000 208 ranges = <42000000 0 a0000000 a0000000 0 10000000
@@ -226,15 +223,14 @@
226 compatible = "talitos"; 223 compatible = "talitos";
227 reg = <30000 10000>; 224 reg = <30000 10000>;
228 interrupts = <b 8>; 225 interrupts = <b 8>;
229 interrupt-parent = <700>; 226 interrupt-parent = < &ipic >;
230 num-channels = <4>; 227 num-channels = <4>;
231 channel-fifo-len = <18>; 228 channel-fifo-len = <18>;
232 exec-units-mask = <0000007e>; 229 exec-units-mask = <0000007e>;
233 descriptor-types-mask = <01010ebf>; 230 descriptor-types-mask = <01010ebf>;
234 }; 231 };
235 232
236 pic@700 { 233 ipic: pic@700 {
237 linux,phandle = <700>;
238 interrupt-controller; 234 interrupt-controller;
239 #address-cells = <0>; 235 #address-cells = <0>;
240 #interrupt-cells = <2>; 236 #interrupt-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
new file mode 100644
index 000000000000..b2e1a5ec3779
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -0,0 +1,184 @@
1/*
2 * MPC8349E-mITX-GP Device Tree Source
3 *
4 * Copyright 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11/ {
12 model = "MPC8349EMITXGP";
13 compatible = "MPC8349EMITXGP", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>;
15 #size-cells = <1>;
16
17 cpus {
18 #cpus = <1>;
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 PowerPC,8349@0 {
23 device_type = "cpu";
24 reg = <0>;
25 d-cache-line-size = <20>;
26 i-cache-line-size = <20>;
27 d-cache-size = <8000>;
28 i-cache-size = <8000>;
29 timebase-frequency = <0>; // from bootloader
30 bus-frequency = <0>; // from bootloader
31 clock-frequency = <0>; // from bootloader
32 32-bit;
33 };
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <00000000 10000000>;
39 };
40
41 soc8349@e0000000 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 #interrupt-cells = <2>;
45 device_type = "soc";
46 ranges = <0 e0000000 00100000>;
47 reg = <e0000000 00000200>;
48 bus-frequency = <0>; // from bootloader
49
50 wdt@200 {
51 device_type = "watchdog";
52 compatible = "mpc83xx_wdt";
53 reg = <200 100>;
54 };
55
56 i2c@3000 {
57 device_type = "i2c";
58 compatible = "fsl-i2c";
59 reg = <3000 100>;
60 interrupts = <e 8>;
61 interrupt-parent = < &ipic >;
62 dfsrr;
63 };
64
65 i2c@3100 {
66 device_type = "i2c";
67 compatible = "fsl-i2c";
68 reg = <3100 100>;
69 interrupts = <f 8>;
70 interrupt-parent = < &ipic >;
71 dfsrr;
72 };
73
74 spi@7000 {
75 device_type = "spi";
76 compatible = "mpc83xx_spi";
77 reg = <7000 1000>;
78 interrupts = <10 8>;
79 interrupt-parent = < &ipic >;
80 mode = <0>;
81 };
82
83 usb@23000 {
84 device_type = "usb";
85 compatible = "fsl-usb2-dr";
86 reg = <23000 1000>;
87 #address-cells = <1>;
88 #size-cells = <0>;
89 interrupt-parent = < &ipic >;
90 interrupts = <26 8>;
91 dr_mode = "otg";
92 phy_type = "ulpi";
93 };
94
95 mdio@24520 {
96 device_type = "mdio";
97 compatible = "gianfar";
98 reg = <24520 20>;
99 #address-cells = <1>;
100 #size-cells = <0>;
101
102 /* Vitesse 8201 */
103 phy1c: ethernet-phy@1c {
104 interrupt-parent = < &ipic >;
105 interrupts = <12 8>;
106 reg = <1c>;
107 device_type = "ethernet-phy";
108 };
109 };
110
111 ethernet@24000 {
112 device_type = "network";
113 model = "TSEC";
114 compatible = "gianfar";
115 reg = <24000 1000>;
116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <20 8 21 8 22 8>;
118 interrupt-parent = < &ipic >;
119 phy-handle = < &phy1c >;
120 };
121
122 serial@4500 {
123 device_type = "serial";
124 compatible = "ns16550";
125 reg = <4500 100>;
126 clock-frequency = <0>; // from bootloader
127 interrupts = <9 8>;
128 interrupt-parent = < &ipic >;
129 };
130
131 serial@4600 {
132 device_type = "serial";
133 compatible = "ns16550";
134 reg = <4600 100>;
135 clock-frequency = <0>; // from bootloader
136 interrupts = <a 8>;
137 interrupt-parent = < &ipic >;
138 };
139
140 pci@8600 {
141 interrupt-map-mask = <f800 0 0 7>;
142 interrupt-map = <
143 /* IDSEL 0x0F - PCI Slot */
144 7800 0 0 1 &ipic 14 8 /* PCI_INTA */
145 7800 0 0 2 &ipic 15 8 /* PCI_INTB */
146 >;
147 interrupt-parent = < &ipic >;
148 interrupts = <43 8>;
149 bus-range = <1 1>;
150 ranges = <42000000 0 a0000000 a0000000 0 10000000
151 02000000 0 b0000000 b0000000 0 10000000
152 01000000 0 00000000 e3000000 0 01000000>;
153 clock-frequency = <3f940aa>;
154 #interrupt-cells = <1>;
155 #size-cells = <2>;
156 #address-cells = <3>;
157 reg = <8600 100>;
158 compatible = "83xx";
159 device_type = "pci";
160 };
161
162 crypto@30000 {
163 device_type = "crypto";
164 model = "SEC2";
165 compatible = "talitos";
166 reg = <30000 10000>;
167 interrupts = <b 8>;
168 interrupt-parent = < &ipic >;
169 num-channels = <4>;
170 channel-fifo-len = <18>;
171 exec-units-mask = <0000007e>;
172 descriptor-types-mask = <01010ebf>;
173 };
174
175 ipic: pic@700 {
176 interrupt-controller;
177 #address-cells = <0>;
178 #interrupt-cells = <2>;
179 reg = <700 100>;
180 built-in;
181 device_type = "ipic";
182 };
183 };
184};
diff --git a/arch/powerpc/boot/dts/mpc8349emds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index efceb3432653..e4b43c24bc0b 100644
--- a/arch/powerpc/boot/dts/mpc8349emds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -11,7 +11,7 @@
11 11
12/ { 12/ {
13 model = "MPC8349EMDS"; 13 model = "MPC8349EMDS";
14 compatible = "MPC834xMDS"; 14 compatible = "MPC8349EMDS", "MPC834xMDS", "MPC83xxMDS";
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 17
@@ -39,6 +39,11 @@
39 reg = <00000000 10000000>; // 256MB at 0 39 reg = <00000000 10000000>; // 256MB at 0
40 }; 40 };
41 41
42 bcsr@e2400000 {
43 device_type = "board-control";
44 reg = <e2400000 8000>;
45 };
46
42 soc8349@e0000000 { 47 soc8349@e0000000 {
43 #address-cells = <1>; 48 #address-cells = <1>;
44 #size-cells = <1>; 49 #size-cells = <1>;
@@ -59,7 +64,7 @@
59 compatible = "fsl-i2c"; 64 compatible = "fsl-i2c";
60 reg = <3000 100>; 65 reg = <3000 100>;
61 interrupts = <e 8>; 66 interrupts = <e 8>;
62 interrupt-parent = <700>; 67 interrupt-parent = < &ipic >;
63 dfsrr; 68 dfsrr;
64 }; 69 };
65 70
@@ -68,7 +73,7 @@
68 compatible = "fsl-i2c"; 73 compatible = "fsl-i2c";
69 reg = <3100 100>; 74 reg = <3100 100>;
70 interrupts = <f 8>; 75 interrupts = <f 8>;
71 interrupt-parent = <700>; 76 interrupt-parent = < &ipic >;
72 dfsrr; 77 dfsrr;
73 }; 78 };
74 79
@@ -77,7 +82,7 @@
77 compatible = "mpc83xx_spi"; 82 compatible = "mpc83xx_spi";
78 reg = <7000 1000>; 83 reg = <7000 1000>;
79 interrupts = <10 8>; 84 interrupts = <10 8>;
80 interrupt-parent = <700>; 85 interrupt-parent = < &ipic >;
81 mode = <0>; 86 mode = <0>;
82 }; 87 };
83 88
@@ -89,8 +94,8 @@
89 reg = <22000 1000>; 94 reg = <22000 1000>;
90 #address-cells = <1>; 95 #address-cells = <1>;
91 #size-cells = <0>; 96 #size-cells = <0>;
92 interrupt-parent = <700>; 97 interrupt-parent = < &ipic >;
93 interrupts = <27 2>; 98 interrupts = <27 8>;
94 phy_type = "ulpi"; 99 phy_type = "ulpi";
95 port1; 100 port1;
96 }; 101 };
@@ -101,8 +106,9 @@
101 reg = <23000 1000>; 106 reg = <23000 1000>;
102 #address-cells = <1>; 107 #address-cells = <1>;
103 #size-cells = <0>; 108 #size-cells = <0>;
104 interrupt-parent = <700>; 109 interrupt-parent = < &ipic >;
105 interrupts = <26 2>; 110 interrupts = <26 8>;
111 dr_mode = "otg";
106 phy_type = "ulpi"; 112 phy_type = "ulpi";
107 }; 113 };
108 114
@@ -112,18 +118,15 @@
112 reg = <24520 20>; 118 reg = <24520 20>;
113 #address-cells = <1>; 119 #address-cells = <1>;
114 #size-cells = <0>; 120 #size-cells = <0>;
115 linux,phandle = <24520>; 121 phy0: ethernet-phy@0 {
116 ethernet-phy@0 { 122 interrupt-parent = < &ipic >;
117 linux,phandle = <2452000>; 123 interrupts = <11 8>;
118 interrupt-parent = <700>;
119 interrupts = <11 2>;
120 reg = <0>; 124 reg = <0>;
121 device_type = "ethernet-phy"; 125 device_type = "ethernet-phy";
122 }; 126 };
123 ethernet-phy@1 { 127 phy1: ethernet-phy@1 {
124 linux,phandle = <2452001>; 128 interrupt-parent = < &ipic >;
125 interrupt-parent = <700>; 129 interrupts = <12 8>;
126 interrupts = <12 2>;
127 reg = <1>; 130 reg = <1>;
128 device_type = "ethernet-phy"; 131 device_type = "ethernet-phy";
129 }; 132 };
@@ -137,8 +140,8 @@
137 address = [ 00 00 00 00 00 00 ]; 140 address = [ 00 00 00 00 00 00 ];
138 local-mac-address = [ 00 00 00 00 00 00 ]; 141 local-mac-address = [ 00 00 00 00 00 00 ];
139 interrupts = <20 8 21 8 22 8>; 142 interrupts = <20 8 21 8 22 8>;
140 interrupt-parent = <700>; 143 interrupt-parent = < &ipic >;
141 phy-handle = <2452000>; 144 phy-handle = < &phy0 >;
142 }; 145 };
143 146
144 ethernet@25000 { 147 ethernet@25000 {
@@ -151,8 +154,8 @@
151 address = [ 00 00 00 00 00 00 ]; 154 address = [ 00 00 00 00 00 00 ];
152 local-mac-address = [ 00 00 00 00 00 00 ]; 155 local-mac-address = [ 00 00 00 00 00 00 ];
153 interrupts = <23 8 24 8 25 8>; 156 interrupts = <23 8 24 8 25 8>;
154 interrupt-parent = <700>; 157 interrupt-parent = < &ipic >;
155 phy-handle = <2452001>; 158 phy-handle = < &phy1 >;
156 }; 159 };
157 160
158 serial@4500 { 161 serial@4500 {
@@ -161,7 +164,7 @@
161 reg = <4500 100>; 164 reg = <4500 100>;
162 clock-frequency = <0>; 165 clock-frequency = <0>;
163 interrupts = <9 8>; 166 interrupts = <9 8>;
164 interrupt-parent = <700>; 167 interrupt-parent = < &ipic >;
165 }; 168 };
166 169
167 serial@4600 { 170 serial@4600 {
@@ -170,7 +173,7 @@
170 reg = <4600 100>; 173 reg = <4600 100>;
171 clock-frequency = <0>; 174 clock-frequency = <0>;
172 interrupts = <a 8>; 175 interrupts = <a 8>;
173 interrupt-parent = <700>; 176 interrupt-parent = < &ipic >;
174 }; 177 };
175 178
176 pci@8500 { 179 pci@8500 {
@@ -178,47 +181,47 @@
178 interrupt-map = < 181 interrupt-map = <
179 182
180 /* IDSEL 0x11 */ 183 /* IDSEL 0x11 */
181 8800 0 0 1 700 14 8 184 8800 0 0 1 &ipic 14 8
182 8800 0 0 2 700 15 8 185 8800 0 0 2 &ipic 15 8
183 8800 0 0 3 700 16 8 186 8800 0 0 3 &ipic 16 8
184 8800 0 0 4 700 17 8 187 8800 0 0 4 &ipic 17 8
185 188
186 /* IDSEL 0x12 */ 189 /* IDSEL 0x12 */
187 9000 0 0 1 700 16 8 190 9000 0 0 1 &ipic 16 8
188 9000 0 0 2 700 17 8 191 9000 0 0 2 &ipic 17 8
189 9000 0 0 3 700 14 8 192 9000 0 0 3 &ipic 14 8
190 9000 0 0 4 700 15 8 193 9000 0 0 4 &ipic 15 8
191 194
192 /* IDSEL 0x13 */ 195 /* IDSEL 0x13 */
193 9800 0 0 1 700 17 8 196 9800 0 0 1 &ipic 17 8
194 9800 0 0 2 700 14 8 197 9800 0 0 2 &ipic 14 8
195 9800 0 0 3 700 15 8 198 9800 0 0 3 &ipic 15 8
196 9800 0 0 4 700 16 8 199 9800 0 0 4 &ipic 16 8
197 200
198 /* IDSEL 0x15 */ 201 /* IDSEL 0x15 */
199 a800 0 0 1 700 14 8 202 a800 0 0 1 &ipic 14 8
200 a800 0 0 2 700 15 8 203 a800 0 0 2 &ipic 15 8
201 a800 0 0 3 700 16 8 204 a800 0 0 3 &ipic 16 8
202 a800 0 0 4 700 17 8 205 a800 0 0 4 &ipic 17 8
203 206
204 /* IDSEL 0x16 */ 207 /* IDSEL 0x16 */
205 b000 0 0 1 700 17 8 208 b000 0 0 1 &ipic 17 8
206 b000 0 0 2 700 14 8 209 b000 0 0 2 &ipic 14 8
207 b000 0 0 3 700 15 8 210 b000 0 0 3 &ipic 15 8
208 b000 0 0 4 700 16 8 211 b000 0 0 4 &ipic 16 8
209 212
210 /* IDSEL 0x17 */ 213 /* IDSEL 0x17 */
211 b800 0 0 1 700 16 8 214 b800 0 0 1 &ipic 16 8
212 b800 0 0 2 700 17 8 215 b800 0 0 2 &ipic 17 8
213 b800 0 0 3 700 14 8 216 b800 0 0 3 &ipic 14 8
214 b800 0 0 4 700 15 8 217 b800 0 0 4 &ipic 15 8
215 218
216 /* IDSEL 0x18 */ 219 /* IDSEL 0x18 */
217 c000 0 0 1 700 15 8 220 c000 0 0 1 &ipic 15 8
218 c000 0 0 2 700 16 8 221 c000 0 0 2 &ipic 16 8
219 c000 0 0 3 700 17 8 222 c000 0 0 3 &ipic 17 8
220 c000 0 0 4 700 14 8>; 223 c000 0 0 4 &ipic 14 8>;
221 interrupt-parent = <700>; 224 interrupt-parent = < &ipic >;
222 interrupts = <42 8>; 225 interrupts = <42 8>;
223 bus-range = <0 0>; 226 bus-range = <0 0>;
224 ranges = <02000000 0 a0000000 a0000000 0 10000000 227 ranges = <02000000 0 a0000000 a0000000 0 10000000
@@ -238,47 +241,47 @@
238 interrupt-map = < 241 interrupt-map = <
239 242
240 /* IDSEL 0x11 */ 243 /* IDSEL 0x11 */
241 8800 0 0 1 700 14 8 244 8800 0 0 1 &ipic 14 8
242 8800 0 0 2 700 15 8 245 8800 0 0 2 &ipic 15 8
243 8800 0 0 3 700 16 8 246 8800 0 0 3 &ipic 16 8
244 8800 0 0 4 700 17 8 247 8800 0 0 4 &ipic 17 8
245 248
246 /* IDSEL 0x12 */ 249 /* IDSEL 0x12 */
247 9000 0 0 1 700 16 8 250 9000 0 0 1 &ipic 16 8
248 9000 0 0 2 700 17 8 251 9000 0 0 2 &ipic 17 8
249 9000 0 0 3 700 14 8 252 9000 0 0 3 &ipic 14 8
250 9000 0 0 4 700 15 8 253 9000 0 0 4 &ipic 15 8
251 254
252 /* IDSEL 0x13 */ 255 /* IDSEL 0x13 */
253 9800 0 0 1 700 17 8 256 9800 0 0 1 &ipic 17 8
254 9800 0 0 2 700 14 8 257 9800 0 0 2 &ipic 14 8
255 9800 0 0 3 700 15 8 258 9800 0 0 3 &ipic 15 8
256 9800 0 0 4 700 16 8 259 9800 0 0 4 &ipic 16 8
257 260
258 /* IDSEL 0x15 */ 261 /* IDSEL 0x15 */
259 a800 0 0 1 700 14 8 262 a800 0 0 1 &ipic 14 8
260 a800 0 0 2 700 15 8 263 a800 0 0 2 &ipic 15 8
261 a800 0 0 3 700 16 8 264 a800 0 0 3 &ipic 16 8
262 a800 0 0 4 700 17 8 265 a800 0 0 4 &ipic 17 8
263 266
264 /* IDSEL 0x16 */ 267 /* IDSEL 0x16 */
265 b000 0 0 1 700 17 8 268 b000 0 0 1 &ipic 17 8
266 b000 0 0 2 700 14 8 269 b000 0 0 2 &ipic 14 8
267 b000 0 0 3 700 15 8 270 b000 0 0 3 &ipic 15 8
268 b000 0 0 4 700 16 8 271 b000 0 0 4 &ipic 16 8
269 272
270 /* IDSEL 0x17 */ 273 /* IDSEL 0x17 */
271 b800 0 0 1 700 16 8 274 b800 0 0 1 &ipic 16 8
272 b800 0 0 2 700 17 8 275 b800 0 0 2 &ipic 17 8
273 b800 0 0 3 700 14 8 276 b800 0 0 3 &ipic 14 8
274 b800 0 0 4 700 15 8 277 b800 0 0 4 &ipic 15 8
275 278
276 /* IDSEL 0x18 */ 279 /* IDSEL 0x18 */
277 c000 0 0 1 700 15 8 280 c000 0 0 1 &ipic 15 8
278 c000 0 0 2 700 16 8 281 c000 0 0 2 &ipic 16 8
279 c000 0 0 3 700 17 8 282 c000 0 0 3 &ipic 17 8
280 c000 0 0 4 700 14 8>; 283 c000 0 0 4 &ipic 14 8>;
281 interrupt-parent = <700>; 284 interrupt-parent = < &ipic >;
282 interrupts = <42 8>; 285 interrupts = <42 8>;
283 bus-range = <0 0>; 286 bus-range = <0 0>;
284 ranges = <02000000 0 b0000000 b0000000 0 10000000 287 ranges = <02000000 0 b0000000 b0000000 0 10000000
@@ -300,7 +303,7 @@
300 compatible = "talitos"; 303 compatible = "talitos";
301 reg = <30000 10000>; 304 reg = <30000 10000>;
302 interrupts = <b 8>; 305 interrupts = <b 8>;
303 interrupt-parent = <700>; 306 interrupt-parent = < &ipic >;
304 num-channels = <4>; 307 num-channels = <4>;
305 channel-fifo-len = <18>; 308 channel-fifo-len = <18>;
306 exec-units-mask = <0000007e>; 309 exec-units-mask = <0000007e>;
@@ -315,8 +318,7 @@
315 * sense == 8: Level, low assertion 318 * sense == 8: Level, low assertion
316 * sense == 2: Edge, high-to-low change 319 * sense == 2: Edge, high-to-low change
317 */ 320 */
318 pic@700 { 321 ipic: pic@700 {
319 linux,phandle = <700>;
320 interrupt-controller; 322 interrupt-controller;
321 #address-cells = <0>; 323 #address-cells = <0>;
322 #interrupt-cells = <2>; 324 #interrupt-cells = <2>;
diff --git a/arch/powerpc/boot/dts/mpc8360emds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 9022192155b9..4fe45c021848 100644
--- a/arch/powerpc/boot/dts/mpc8360emds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -15,17 +15,15 @@
15*/ 15*/
16 16
17/ { 17/ {
18 model = "MPC8360EPB"; 18 model = "MPC8360MDS";
19 compatible = "MPC83xx"; 19 compatible = "MPC8360EMDS", "MPC836xMDS", "MPC83xxMDS";
20 #address-cells = <1>; 20 #address-cells = <1>;
21 #size-cells = <1>; 21 #size-cells = <1>;
22 linux,phandle = <100>;
23 22
24 cpus { 23 cpus {
25 #cpus = <1>; 24 #cpus = <1>;
26 #address-cells = <1>; 25 #address-cells = <1>;
27 #size-cells = <0>; 26 #size-cells = <0>;
28 linux,phandle = <200>;
29 27
30 PowerPC,8360@0 { 28 PowerPC,8360@0 {
31 device_type = "cpu"; 29 device_type = "cpu";
@@ -38,14 +36,11 @@
38 bus-frequency = <FBC5200>; 36 bus-frequency = <FBC5200>;
39 clock-frequency = <1F78A400>; 37 clock-frequency = <1F78A400>;
40 32-bit; 38 32-bit;
41 linux,phandle = <201>;
42 linux,boot-cpu;
43 }; 39 };
44 }; 40 };
45 41
46 memory { 42 memory {
47 device_type = "memory"; 43 device_type = "memory";
48 linux,phandle = <300>;
49 reg = <00000000 10000000>; 44 reg = <00000000 10000000>;
50 }; 45 };
51 46
@@ -74,7 +69,7 @@
74 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
75 reg = <3000 100>; 70 reg = <3000 100>;
76 interrupts = <e 8>; 71 interrupts = <e 8>;
77 interrupt-parent = <700>; 72 interrupt-parent = < &ipic >;
78 dfsrr; 73 dfsrr;
79 }; 74 };
80 75
@@ -83,7 +78,7 @@
83 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
84 reg = <3100 100>; 79 reg = <3100 100>;
85 interrupts = <f 8>; 80 interrupts = <f 8>;
86 interrupt-parent = <700>; 81 interrupt-parent = < &ipic >;
87 dfsrr; 82 dfsrr;
88 }; 83 };
89 84
@@ -93,7 +88,7 @@
93 reg = <4500 100>; 88 reg = <4500 100>;
94 clock-frequency = <FBC5200>; 89 clock-frequency = <FBC5200>;
95 interrupts = <9 8>; 90 interrupts = <9 8>;
96 interrupt-parent = <700>; 91 interrupt-parent = < &ipic >;
97 }; 92 };
98 93
99 serial@4600 { 94 serial@4600 {
@@ -102,7 +97,7 @@
102 reg = <4600 100>; 97 reg = <4600 100>;
103 clock-frequency = <FBC5200>; 98 clock-frequency = <FBC5200>;
104 interrupts = <a 8>; 99 interrupts = <a 8>;
105 interrupt-parent = <700>; 100 interrupt-parent = < &ipic >;
106 }; 101 };
107 102
108 crypto@30000 { 103 crypto@30000 {
@@ -111,7 +106,7 @@
111 compatible = "talitos"; 106 compatible = "talitos";
112 reg = <30000 10000>; 107 reg = <30000 10000>;
113 interrupts = <b 8>; 108 interrupts = <b 8>;
114 interrupt-parent = <700>; 109 interrupt-parent = < &ipic >;
115 num-channels = <4>; 110 num-channels = <4>;
116 channel-fifo-len = <18>; 111 channel-fifo-len = <18>;
117 exec-units-mask = <0000007e>; 112 exec-units-mask = <0000007e>;
@@ -120,52 +115,51 @@
120 }; 115 };
121 116
122 pci@8500 { 117 pci@8500 {
123 linux,phandle = <8500>;
124 interrupt-map-mask = <f800 0 0 7>; 118 interrupt-map-mask = <f800 0 0 7>;
125 interrupt-map = < 119 interrupt-map = <
126 120
127 /* IDSEL 0x11 AD17 */ 121 /* IDSEL 0x11 AD17 */
128 8800 0 0 1 700 14 8 122 8800 0 0 1 &ipic 14 8
129 8800 0 0 2 700 15 8 123 8800 0 0 2 &ipic 15 8
130 8800 0 0 3 700 16 8 124 8800 0 0 3 &ipic 16 8
131 8800 0 0 4 700 17 8 125 8800 0 0 4 &ipic 17 8
132 126
133 /* IDSEL 0x12 AD18 */ 127 /* IDSEL 0x12 AD18 */
134 9000 0 0 1 700 16 8 128 9000 0 0 1 &ipic 16 8
135 9000 0 0 2 700 17 8 129 9000 0 0 2 &ipic 17 8
136 9000 0 0 3 700 14 8 130 9000 0 0 3 &ipic 14 8
137 9000 0 0 4 700 15 8 131 9000 0 0 4 &ipic 15 8
138 132
139 /* IDSEL 0x13 AD19 */ 133 /* IDSEL 0x13 AD19 */
140 9800 0 0 1 700 17 8 134 9800 0 0 1 &ipic 17 8
141 9800 0 0 2 700 14 8 135 9800 0 0 2 &ipic 14 8
142 9800 0 0 3 700 15 8 136 9800 0 0 3 &ipic 15 8
143 9800 0 0 4 700 16 8 137 9800 0 0 4 &ipic 16 8
144 138
145 /* IDSEL 0x15 AD21*/ 139 /* IDSEL 0x15 AD21*/
146 a800 0 0 1 700 14 8 140 a800 0 0 1 &ipic 14 8
147 a800 0 0 2 700 15 8 141 a800 0 0 2 &ipic 15 8
148 a800 0 0 3 700 16 8 142 a800 0 0 3 &ipic 16 8
149 a800 0 0 4 700 17 8 143 a800 0 0 4 &ipic 17 8
150 144
151 /* IDSEL 0x16 AD22*/ 145 /* IDSEL 0x16 AD22*/
152 b000 0 0 1 700 17 8 146 b000 0 0 1 &ipic 17 8
153 b000 0 0 2 700 14 8 147 b000 0 0 2 &ipic 14 8
154 b000 0 0 3 700 15 8 148 b000 0 0 3 &ipic 15 8
155 b000 0 0 4 700 16 8 149 b000 0 0 4 &ipic 16 8
156 150
157 /* IDSEL 0x17 AD23*/ 151 /* IDSEL 0x17 AD23*/
158 b800 0 0 1 700 16 8 152 b800 0 0 1 &ipic 16 8
159 b800 0 0 2 700 17 8 153 b800 0 0 2 &ipic 17 8
160 b800 0 0 3 700 14 8 154 b800 0 0 3 &ipic 14 8
161 b800 0 0 4 700 15 8 155 b800 0 0 4 &ipic 15 8
162 156
163 /* IDSEL 0x18 AD24*/ 157 /* IDSEL 0x18 AD24*/
164 c000 0 0 1 700 15 8 158 c000 0 0 1 &ipic 15 8
165 c000 0 0 2 700 16 8 159 c000 0 0 2 &ipic 16 8
166 c000 0 0 3 700 17 8 160 c000 0 0 3 &ipic 17 8
167 c000 0 0 4 700 14 8>; 161 c000 0 0 4 &ipic 14 8>;
168 interrupt-parent = <700>; 162 interrupt-parent = < &ipic >;
169 interrupts = <42 8>; 163 interrupts = <42 8>;
170 bus-range = <0 0>; 164 bus-range = <0 0>;
171 ranges = <02000000 0 a0000000 a0000000 0 10000000 165 ranges = <02000000 0 a0000000 a0000000 0 10000000
@@ -180,8 +174,7 @@
180 device_type = "pci"; 174 device_type = "pci";
181 }; 175 };
182 176
183 pic@700 { 177 ipic: pic@700 {
184 linux,phandle = <700>;
185 interrupt-controller; 178 interrupt-controller;
186 #address-cells = <0>; 179 #address-cells = <0>;
187 #interrupt-cells = <2>; 180 #interrupt-cells = <2>;
@@ -195,8 +188,7 @@
195 device_type = "par_io"; 188 device_type = "par_io";
196 num-ports = <7>; 189 num-ports = <7>;
197 190
198 ucc_pin@01 { 191 pio1: ucc_pin@01 {
199 linux,phandle = <140001>;
200 pio-map = < 192 pio-map = <
201 /* port pin dir open_drain assignment has_irq */ 193 /* port pin dir open_drain assignment has_irq */
202 0 3 1 0 1 0 /* TxD0 */ 194 0 3 1 0 1 0 /* TxD0 */
@@ -223,8 +215,7 @@
223 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ 215 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
224 2 8 2 0 1 0>; /* GTX125 - CLK9 */ 216 2 8 2 0 1 0>; /* GTX125 - CLK9 */
225 }; 217 };
226 ucc_pin@02 { 218 pio2: ucc_pin@02 {
227 linux,phandle = <140002>;
228 pio-map = < 219 pio-map = <
229 /* port pin dir open_drain assignment has_irq */ 220 /* port pin dir open_drain assignment has_irq */
230 0 11 1 0 1 0 /* TxD0 */ 221 0 11 1 0 1 0 /* TxD0 */
@@ -281,7 +272,7 @@
281 compatible = "fsl_spi"; 272 compatible = "fsl_spi";
282 reg = <4c0 40>; 273 reg = <4c0 40>;
283 interrupts = <2>; 274 interrupts = <2>;
284 interrupt-parent = <80>; 275 interrupt-parent = < &qeic >;
285 mode = "cpu"; 276 mode = "cpu";
286 }; 277 };
287 278
@@ -290,7 +281,7 @@
290 compatible = "fsl_spi"; 281 compatible = "fsl_spi";
291 reg = <500 40>; 282 reg = <500 40>;
292 interrupts = <1>; 283 interrupts = <1>;
293 interrupt-parent = <80>; 284 interrupt-parent = < &qeic >;
294 mode = "cpu"; 285 mode = "cpu";
295 }; 286 };
296 287
@@ -299,7 +290,7 @@
299 compatible = "qe_udc"; 290 compatible = "qe_udc";
300 reg = <6c0 40 8B00 100>; 291 reg = <6c0 40 8B00 100>;
301 interrupts = <b>; 292 interrupts = <b>;
302 interrupt-parent = <80>; 293 interrupt-parent = < &qeic >;
303 mode = "slave"; 294 mode = "slave";
304 }; 295 };
305 296
@@ -310,12 +301,12 @@
310 device-id = <1>; 301 device-id = <1>;
311 reg = <2000 200>; 302 reg = <2000 200>;
312 interrupts = <20>; 303 interrupts = <20>;
313 interrupt-parent = <80>; 304 interrupt-parent = < &qeic >;
314 mac-address = [ 00 04 9f 00 23 23 ]; 305 mac-address = [ 00 04 9f 00 23 23 ];
315 rx-clock = <0>; 306 rx-clock = <0>;
316 tx-clock = <19>; 307 tx-clock = <19>;
317 phy-handle = <212000>; 308 phy-handle = < &phy0 >;
318 pio-handle = <140001>; 309 pio-handle = < &pio1 >;
319 }; 310 };
320 311
321 ucc@3000 { 312 ucc@3000 {
@@ -325,12 +316,12 @@
325 device-id = <2>; 316 device-id = <2>;
326 reg = <3000 200>; 317 reg = <3000 200>;
327 interrupts = <21>; 318 interrupts = <21>;
328 interrupt-parent = <80>; 319 interrupt-parent = < &qeic >;
329 mac-address = [ 00 11 22 33 44 55 ]; 320 mac-address = [ 00 11 22 33 44 55 ];
330 rx-clock = <0>; 321 rx-clock = <0>;
331 tx-clock = <14>; 322 tx-clock = <14>;
332 phy-handle = <212001>; 323 phy-handle = < &phy1 >;
333 pio-handle = <140002>; 324 pio-handle = < &pio2 >;
334 }; 325 };
335 326
336 mdio@2120 { 327 mdio@2120 {
@@ -340,26 +331,23 @@
340 device_type = "mdio"; 331 device_type = "mdio";
341 compatible = "ucc_geth_phy"; 332 compatible = "ucc_geth_phy";
342 333
343 ethernet-phy@00 { 334 phy0: ethernet-phy@00 {
344 linux,phandle = <212000>; 335 interrupt-parent = < &ipic >;
345 interrupt-parent = <700>; 336 interrupts = <11 8>;
346 interrupts = <11 2>;
347 reg = <0>; 337 reg = <0>;
348 device_type = "ethernet-phy"; 338 device_type = "ethernet-phy";
349 interface = <6>; //ENET_1000_GMII 339 interface = <6>; //ENET_1000_GMII
350 }; 340 };
351 ethernet-phy@01 { 341 phy1: ethernet-phy@01 {
352 linux,phandle = <212001>; 342 interrupt-parent = < &ipic >;
353 interrupt-parent = <700>; 343 interrupts = <12 8>;
354 interrupts = <12 2>;
355 reg = <1>; 344 reg = <1>;
356 device_type = "ethernet-phy"; 345 device_type = "ethernet-phy";
357 interface = <6>; 346 interface = <6>;
358 }; 347 };
359 }; 348 };
360 349
361 qeic@80 { 350 qeic: qeic@80 {
362 linux,phandle = <80>;
363 interrupt-controller; 351 interrupt-controller;
364 device_type = "qeic"; 352 device_type = "qeic";
365 #address-cells = <0>; 353 #address-cells = <0>;
@@ -368,7 +356,7 @@
368 built-in; 356 built-in;
369 big-endian; 357 big-endian;
370 interrupts = <20 8 21 8>; //high:32 low:33 358 interrupts = <20 8 21 8>; //high:32 low:33
371 interrupt-parent = <700>; 359 interrupt-parent = < &ipic >;
372 }; 360 };
373 361
374 }; 362 };
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 5f41c1f7a5f3..3c0917fa791c 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8540ADS"; 14 model = "MPC8540ADS";
15 compatible = "MPC85xxADS"; 15 compatible = "MPC8540ADS", "MPC85xxADS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8540@0 { 24 PowerPC,8540@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,24 +64,20 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 1>; 69 interrupts = <35 1>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 1>; 75 interrupts = <35 1>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
85 }; 78 };
86 ethernet-phy@3 { 79 phy3: ethernet-phy@3 {
87 linux,phandle = <2452003>; 80 interrupt-parent = <&mpic>;
88 interrupt-parent = <40000>;
89 interrupts = <37 1>; 81 interrupts = <37 1>;
90 reg = <3>; 82 reg = <3>;
91 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
@@ -102,8 +94,8 @@
102 address = [ 00 E0 0C 00 73 00 ]; 94 address = [ 00 E0 0C 00 73 00 ];
103 local-mac-address = [ 00 E0 0C 00 73 00 ]; 95 local-mac-address = [ 00 E0 0C 00 73 00 ];
104 interrupts = <d 2 e 2 12 2>; 96 interrupts = <d 2 e 2 12 2>;
105 interrupt-parent = <40000>; 97 interrupt-parent = <&mpic>;
106 phy-handle = <2452000>; 98 phy-handle = <&phy0>;
107 }; 99 };
108 100
109 ethernet@25000 { 101 ethernet@25000 {
@@ -116,8 +108,8 @@
116 address = [ 00 E0 0C 00 73 01 ]; 108 address = [ 00 E0 0C 00 73 01 ];
117 local-mac-address = [ 00 E0 0C 00 73 01 ]; 109 local-mac-address = [ 00 E0 0C 00 73 01 ];
118 interrupts = <13 2 14 2 18 2>; 110 interrupts = <13 2 14 2 18 2>;
119 interrupt-parent = <40000>; 111 interrupt-parent = <&mpic>;
120 phy-handle = <2452001>; 112 phy-handle = <&phy1>;
121 }; 113 };
122 114
123 ethernet@26000 { 115 ethernet@26000 {
@@ -130,8 +122,8 @@
130 address = [ 00 E0 0C 00 73 02 ]; 122 address = [ 00 E0 0C 00 73 02 ];
131 local-mac-address = [ 00 E0 0C 00 73 02 ]; 123 local-mac-address = [ 00 E0 0C 00 73 02 ];
132 interrupts = <19 2>; 124 interrupts = <19 2>;
133 interrupt-parent = <40000>; 125 interrupt-parent = <&mpic>;
134 phy-handle = <2452003>; 126 phy-handle = <&phy3>;
135 }; 127 };
136 128
137 serial@4500 { 129 serial@4500 {
@@ -140,7 +132,7 @@
140 reg = <4500 100>; // reg base, size 132 reg = <4500 100>; // reg base, size
141 clock-frequency = <0>; // should we fill in in uboot? 133 clock-frequency = <0>; // should we fill in in uboot?
142 interrupts = <1a 2>; 134 interrupts = <1a 2>;
143 interrupt-parent = <40000>; 135 interrupt-parent = <&mpic>;
144 }; 136 };
145 137
146 serial@4600 { 138 serial@4600 {
@@ -149,85 +141,84 @@
149 reg = <4600 100>; // reg base, size 141 reg = <4600 100>; // reg base, size
150 clock-frequency = <0>; // should we fill in in uboot? 142 clock-frequency = <0>; // should we fill in in uboot?
151 interrupts = <1a 2>; 143 interrupts = <1a 2>;
152 interrupt-parent = <40000>; 144 interrupt-parent = <&mpic>;
153 }; 145 };
154 pci@8000 { 146 pci@8000 {
155 linux,phandle = <8000>;
156 interrupt-map-mask = <f800 0 0 7>; 147 interrupt-map-mask = <f800 0 0 7>;
157 interrupt-map = < 148 interrupt-map = <
158 149
159 /* IDSEL 0x02 */ 150 /* IDSEL 0x02 */
160 1000 0 0 1 40000 31 1 151 1000 0 0 1 &mpic 31 1
161 1000 0 0 2 40000 32 1 152 1000 0 0 2 &mpic 32 1
162 1000 0 0 3 40000 33 1 153 1000 0 0 3 &mpic 33 1
163 1000 0 0 4 40000 34 1 154 1000 0 0 4 &mpic 34 1
164 155
165 /* IDSEL 0x03 */ 156 /* IDSEL 0x03 */
166 1800 0 0 1 40000 34 1 157 1800 0 0 1 &mpic 34 1
167 1800 0 0 2 40000 31 1 158 1800 0 0 2 &mpic 31 1
168 1800 0 0 3 40000 32 1 159 1800 0 0 3 &mpic 32 1
169 1800 0 0 4 40000 33 1 160 1800 0 0 4 &mpic 33 1
170 161
171 /* IDSEL 0x04 */ 162 /* IDSEL 0x04 */
172 2000 0 0 1 40000 33 1 163 2000 0 0 1 &mpic 33 1
173 2000 0 0 2 40000 34 1 164 2000 0 0 2 &mpic 34 1
174 2000 0 0 3 40000 31 1 165 2000 0 0 3 &mpic 31 1
175 2000 0 0 4 40000 32 1 166 2000 0 0 4 &mpic 32 1
176 167
177 /* IDSEL 0x05 */ 168 /* IDSEL 0x05 */
178 2800 0 0 1 40000 32 1 169 2800 0 0 1 &mpic 32 1
179 2800 0 0 2 40000 33 1 170 2800 0 0 2 &mpic 33 1
180 2800 0 0 3 40000 34 1 171 2800 0 0 3 &mpic 34 1
181 2800 0 0 4 40000 31 1 172 2800 0 0 4 &mpic 31 1
182 173
183 /* IDSEL 0x0c */ 174 /* IDSEL 0x0c */
184 6000 0 0 1 40000 31 1 175 6000 0 0 1 &mpic 31 1
185 6000 0 0 2 40000 32 1 176 6000 0 0 2 &mpic 32 1
186 6000 0 0 3 40000 33 1 177 6000 0 0 3 &mpic 33 1
187 6000 0 0 4 40000 34 1 178 6000 0 0 4 &mpic 34 1
188 179
189 /* IDSEL 0x0d */ 180 /* IDSEL 0x0d */
190 6800 0 0 1 40000 34 1 181 6800 0 0 1 &mpic 34 1
191 6800 0 0 2 40000 31 1 182 6800 0 0 2 &mpic 31 1
192 6800 0 0 3 40000 32 1 183 6800 0 0 3 &mpic 32 1
193 6800 0 0 4 40000 33 1 184 6800 0 0 4 &mpic 33 1
194 185
195 /* IDSEL 0x0e */ 186 /* IDSEL 0x0e */
196 7000 0 0 1 40000 33 1 187 7000 0 0 1 &mpic 33 1
197 7000 0 0 2 40000 34 1 188 7000 0 0 2 &mpic 34 1
198 7000 0 0 3 40000 31 1 189 7000 0 0 3 &mpic 31 1
199 7000 0 0 4 40000 32 1 190 7000 0 0 4 &mpic 32 1
200 191
201 /* IDSEL 0x0f */ 192 /* IDSEL 0x0f */
202 7800 0 0 1 40000 32 1 193 7800 0 0 1 &mpic 32 1
203 7800 0 0 2 40000 33 1 194 7800 0 0 2 &mpic 33 1
204 7800 0 0 3 40000 34 1 195 7800 0 0 3 &mpic 34 1
205 7800 0 0 4 40000 31 1 196 7800 0 0 4 &mpic 31 1
206 197
207 /* IDSEL 0x12 */ 198 /* IDSEL 0x12 */
208 9000 0 0 1 40000 31 1 199 9000 0 0 1 &mpic 31 1
209 9000 0 0 2 40000 32 1 200 9000 0 0 2 &mpic 32 1
210 9000 0 0 3 40000 33 1 201 9000 0 0 3 &mpic 33 1
211 9000 0 0 4 40000 34 1 202 9000 0 0 4 &mpic 34 1
212 203
213 /* IDSEL 0x13 */ 204 /* IDSEL 0x13 */
214 9800 0 0 1 40000 34 1 205 9800 0 0 1 &mpic 34 1
215 9800 0 0 2 40000 31 1 206 9800 0 0 2 &mpic 31 1
216 9800 0 0 3 40000 32 1 207 9800 0 0 3 &mpic 32 1
217 9800 0 0 4 40000 33 1 208 9800 0 0 4 &mpic 33 1
218 209
219 /* IDSEL 0x14 */ 210 /* IDSEL 0x14 */
220 a000 0 0 1 40000 33 1 211 a000 0 0 1 &mpic 33 1
221 a000 0 0 2 40000 34 1 212 a000 0 0 2 &mpic 34 1
222 a000 0 0 3 40000 31 1 213 a000 0 0 3 &mpic 31 1
223 a000 0 0 4 40000 32 1 214 a000 0 0 4 &mpic 32 1
224 215
225 /* IDSEL 0x15 */ 216 /* IDSEL 0x15 */
226 a800 0 0 1 40000 32 1 217 a800 0 0 1 &mpic 32 1
227 a800 0 0 2 40000 33 1 218 a800 0 0 2 &mpic 33 1
228 a800 0 0 3 40000 34 1 219 a800 0 0 3 &mpic 34 1
229 a800 0 0 4 40000 31 1>; 220 a800 0 0 4 &mpic 31 1>;
230 interrupt-parent = <40000>; 221 interrupt-parent = <&mpic>;
231 interrupts = <08 2>; 222 interrupts = <08 2>;
232 bus-range = <0 0>; 223 bus-range = <0 0>;
233 ranges = <02000000 0 80000000 80000000 0 20000000 224 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -241,8 +232,7 @@
241 device_type = "pci"; 232 device_type = "pci";
242 }; 233 };
243 234
244 pic@40000 { 235 mpic: pic@40000 {
245 linux,phandle = <40000>;
246 clock-frequency = <0>; 236 clock-frequency = <0>;
247 interrupt-controller; 237 interrupt-controller;
248 #address-cells = <0>; 238 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index 7be0bc659e1c..2a1ae760ab3a 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8541CDS"; 14 model = "MPC8541CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8541CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8541@0 { 24 PowerPC,8541@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,17 +64,14 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
@@ -94,8 +87,8 @@
94 reg = <24000 1000>; 87 reg = <24000 1000>;
95 local-mac-address = [ 00 E0 0C 00 73 00 ]; 88 local-mac-address = [ 00 E0 0C 00 73 00 ];
96 interrupts = <d 2 e 2 12 2>; 89 interrupts = <d 2 e 2 12 2>;
97 interrupt-parent = <40000>; 90 interrupt-parent = <&mpic>;
98 phy-handle = <2452000>; 91 phy-handle = <&phy0>;
99 }; 92 };
100 93
101 ethernet@25000 { 94 ethernet@25000 {
@@ -107,8 +100,8 @@
107 reg = <25000 1000>; 100 reg = <25000 1000>;
108 local-mac-address = [ 00 E0 0C 00 73 01 ]; 101 local-mac-address = [ 00 E0 0C 00 73 01 ];
109 interrupts = <13 2 14 2 18 2>; 102 interrupts = <13 2 14 2 18 2>;
110 interrupt-parent = <40000>; 103 interrupt-parent = <&mpic>;
111 phy-handle = <2452001>; 104 phy-handle = <&phy1>;
112 }; 105 };
113 106
114 serial@4500 { 107 serial@4500 {
@@ -117,7 +110,7 @@
117 reg = <4500 100>; // reg base, size 110 reg = <4500 100>; // reg base, size
118 clock-frequency = <0>; // should we fill in in uboot? 111 clock-frequency = <0>; // should we fill in in uboot?
119 interrupts = <1a 2>; 112 interrupts = <1a 2>;
120 interrupt-parent = <40000>; 113 interrupt-parent = <&mpic>;
121 }; 114 };
122 115
123 serial@4600 { 116 serial@4600 {
@@ -126,57 +119,56 @@
126 reg = <4600 100>; // reg base, size 119 reg = <4600 100>; // reg base, size
127 clock-frequency = <0>; // should we fill in in uboot? 120 clock-frequency = <0>; // should we fill in in uboot?
128 interrupts = <1a 2>; 121 interrupts = <1a 2>;
129 interrupt-parent = <40000>; 122 interrupt-parent = <&mpic>;
130 }; 123 };
131 124
132 pci@8000 { 125 pci1: pci@8000 {
133 linux,phandle = <8000>;
134 interrupt-map-mask = <1f800 0 0 7>; 126 interrupt-map-mask = <1f800 0 0 7>;
135 interrupt-map = < 127 interrupt-map = <
136 128
137 /* IDSEL 0x10 */ 129 /* IDSEL 0x10 */
138 08000 0 0 1 40000 30 1 130 08000 0 0 1 &mpic 30 1
139 08000 0 0 2 40000 31 1 131 08000 0 0 2 &mpic 31 1
140 08000 0 0 3 40000 32 1 132 08000 0 0 3 &mpic 32 1
141 08000 0 0 4 40000 33 1 133 08000 0 0 4 &mpic 33 1
142 134
143 /* IDSEL 0x11 */ 135 /* IDSEL 0x11 */
144 08800 0 0 1 40000 30 1 136 08800 0 0 1 &mpic 30 1
145 08800 0 0 2 40000 31 1 137 08800 0 0 2 &mpic 31 1
146 08800 0 0 3 40000 32 1 138 08800 0 0 3 &mpic 32 1
147 08800 0 0 4 40000 33 1 139 08800 0 0 4 &mpic 33 1
148 140
149 /* IDSEL 0x12 (Slot 1) */ 141 /* IDSEL 0x12 (Slot 1) */
150 09000 0 0 1 40000 30 1 142 09000 0 0 1 &mpic 30 1
151 09000 0 0 2 40000 31 1 143 09000 0 0 2 &mpic 31 1
152 09000 0 0 3 40000 32 1 144 09000 0 0 3 &mpic 32 1
153 09000 0 0 4 40000 33 1 145 09000 0 0 4 &mpic 33 1
154 146
155 /* IDSEL 0x13 (Slot 2) */ 147 /* IDSEL 0x13 (Slot 2) */
156 09800 0 0 1 40000 31 1 148 09800 0 0 1 &mpic 31 1
157 09800 0 0 2 40000 32 1 149 09800 0 0 2 &mpic 32 1
158 09800 0 0 3 40000 33 1 150 09800 0 0 3 &mpic 33 1
159 09800 0 0 4 40000 30 1 151 09800 0 0 4 &mpic 30 1
160 152
161 /* IDSEL 0x14 (Slot 3) */ 153 /* IDSEL 0x14 (Slot 3) */
162 0a000 0 0 1 40000 32 1 154 0a000 0 0 1 &mpic 32 1
163 0a000 0 0 2 40000 33 1 155 0a000 0 0 2 &mpic 33 1
164 0a000 0 0 3 40000 30 1 156 0a000 0 0 3 &mpic 30 1
165 0a000 0 0 4 40000 31 1 157 0a000 0 0 4 &mpic 31 1
166 158
167 /* IDSEL 0x15 (Slot 4) */ 159 /* IDSEL 0x15 (Slot 4) */
168 0a800 0 0 1 40000 33 1 160 0a800 0 0 1 &mpic 33 1
169 0a800 0 0 2 40000 30 1 161 0a800 0 0 2 &mpic 30 1
170 0a800 0 0 3 40000 31 1 162 0a800 0 0 3 &mpic 31 1
171 0a800 0 0 4 40000 32 1 163 0a800 0 0 4 &mpic 32 1
172 164
173 /* Bus 1 (Tundra Bridge) */ 165 /* Bus 1 (Tundra Bridge) */
174 /* IDSEL 0x12 (ISA bridge) */ 166 /* IDSEL 0x12 (ISA bridge) */
175 19000 0 0 1 40000 30 1 167 19000 0 0 1 &mpic 30 1
176 19000 0 0 2 40000 31 1 168 19000 0 0 2 &mpic 31 1
177 19000 0 0 3 40000 32 1 169 19000 0 0 3 &mpic 32 1
178 19000 0 0 4 40000 33 1>; 170 19000 0 0 4 &mpic 33 1>;
179 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
180 interrupts = <08 2>; 172 interrupts = <08 2>;
181 bus-range = <0 0>; 173 bus-range = <0 0>;
182 ranges = <02000000 0 80000000 80000000 0 20000000 174 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -200,21 +192,20 @@
200 compatible = "chrp,iic"; 192 compatible = "chrp,iic";
201 big-endian; 193 big-endian;
202 interrupts = <1>; 194 interrupts = <1>;
203 interrupt-parent = <8000>; 195 interrupt-parent = <&pci1>;
204 }; 196 };
205 }; 197 };
206 198
207 pci@9000 { 199 pci@9000 {
208 linux,phandle = <9000>;
209 interrupt-map-mask = <f800 0 0 7>; 200 interrupt-map-mask = <f800 0 0 7>;
210 interrupt-map = < 201 interrupt-map = <
211 202
212 /* IDSEL 0x15 */ 203 /* IDSEL 0x15 */
213 a800 0 0 1 40000 3b 1 204 a800 0 0 1 &mpic 3b 1
214 a800 0 0 2 40000 3b 1 205 a800 0 0 2 &mpic 3b 1
215 a800 0 0 3 40000 3b 1 206 a800 0 0 3 &mpic 3b 1
216 a800 0 0 4 40000 3b 1>; 207 a800 0 0 4 &mpic 3b 1>;
217 interrupt-parent = <40000>; 208 interrupt-parent = <&mpic>;
218 interrupts = <09 2>; 209 interrupts = <09 2>;
219 bus-range = <0 0>; 210 bus-range = <0 0>;
220 ranges = <02000000 0 a0000000 a0000000 0 20000000 211 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -228,8 +219,7 @@
228 device_type = "pci"; 219 device_type = "pci";
229 }; 220 };
230 221
231 pic@40000 { 222 mpic: pic@40000 {
232 linux,phandle = <40000>;
233 clock-frequency = <0>; 223 clock-frequency = <0>;
234 interrupt-controller; 224 interrupt-controller;
235 #address-cells = <0>; 225 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 893d7957c174..7eb5d81d5eec 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8548CDS"; 14 model = "MPC8548CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8548CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8548@0 { 24 PowerPC,8548@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,32 +64,26 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
85 }; 78 };
86 79 phy2: ethernet-phy@2 {
87 ethernet-phy@2 { 80 interrupt-parent = <&mpic>;
88 linux,phandle = <2452002>;
89 interrupt-parent = <40000>;
90 interrupts = <35 0>; 81 interrupts = <35 0>;
91 reg = <2>; 82 reg = <2>;
92 device_type = "ethernet-phy"; 83 device_type = "ethernet-phy";
93 }; 84 };
94 ethernet-phy@3 { 85 phy3: ethernet-phy@3 {
95 linux,phandle = <2452003>; 86 interrupt-parent = <&mpic>;
96 interrupt-parent = <40000>;
97 interrupts = <35 0>; 87 interrupts = <35 0>;
98 reg = <3>; 88 reg = <3>;
99 device_type = "ethernet-phy"; 89 device_type = "ethernet-phy";
@@ -109,8 +99,8 @@
109 reg = <24000 1000>; 99 reg = <24000 1000>;
110 local-mac-address = [ 00 E0 0C 00 73 00 ]; 100 local-mac-address = [ 00 E0 0C 00 73 00 ];
111 interrupts = <d 2 e 2 12 2>; 101 interrupts = <d 2 e 2 12 2>;
112 interrupt-parent = <40000>; 102 interrupt-parent = <&mpic>;
113 phy-handle = <2452000>; 103 phy-handle = <&phy0>;
114 }; 104 };
115 105
116 ethernet@25000 { 106 ethernet@25000 {
@@ -122,10 +112,11 @@
122 reg = <25000 1000>; 112 reg = <25000 1000>;
123 local-mac-address = [ 00 E0 0C 00 73 01 ]; 113 local-mac-address = [ 00 E0 0C 00 73 01 ];
124 interrupts = <13 2 14 2 18 2>; 114 interrupts = <13 2 14 2 18 2>;
125 interrupt-parent = <40000>; 115 interrupt-parent = <&mpic>;
126 phy-handle = <2452001>; 116 phy-handle = <&phy1>;
127 }; 117 };
128 118
119/* eTSEC 3/4 are currently broken
129 ethernet@26000 { 120 ethernet@26000 {
130 #address-cells = <1>; 121 #address-cells = <1>;
131 #size-cells = <0>; 122 #size-cells = <0>;
@@ -135,11 +126,10 @@
135 reg = <26000 1000>; 126 reg = <26000 1000>;
136 local-mac-address = [ 00 E0 0C 00 73 02 ]; 127 local-mac-address = [ 00 E0 0C 00 73 02 ];
137 interrupts = <f 2 10 2 11 2>; 128 interrupts = <f 2 10 2 11 2>;
138 interrupt-parent = <40000>; 129 interrupt-parent = <&mpic>;
139 phy-handle = <2452001>; 130 phy-handle = <&phy2>;
140 }; 131 };
141 132
142/* eTSEC 4 is currently broken
143 ethernet@27000 { 133 ethernet@27000 {
144 #address-cells = <1>; 134 #address-cells = <1>;
145 #size-cells = <0>; 135 #size-cells = <0>;
@@ -149,8 +139,8 @@
149 reg = <27000 1000>; 139 reg = <27000 1000>;
150 local-mac-address = [ 00 E0 0C 00 73 03 ]; 140 local-mac-address = [ 00 E0 0C 00 73 03 ];
151 interrupts = <15 2 16 2 17 2>; 141 interrupts = <15 2 16 2 17 2>;
152 interrupt-parent = <40000>; 142 interrupt-parent = <&mpic>;
153 phy-handle = <2452001>; 143 phy-handle = <&phy3>;
154 }; 144 };
155 */ 145 */
156 146
@@ -160,7 +150,7 @@
160 reg = <4500 100>; // reg base, size 150 reg = <4500 100>; // reg base, size
161 clock-frequency = <0>; // should we fill in in uboot? 151 clock-frequency = <0>; // should we fill in in uboot?
162 interrupts = <1a 2>; 152 interrupts = <1a 2>;
163 interrupt-parent = <40000>; 153 interrupt-parent = <&mpic>;
164 }; 154 };
165 155
166 serial@4600 { 156 serial@4600 {
@@ -169,57 +159,56 @@
169 reg = <4600 100>; // reg base, size 159 reg = <4600 100>; // reg base, size
170 clock-frequency = <0>; // should we fill in in uboot? 160 clock-frequency = <0>; // should we fill in in uboot?
171 interrupts = <1a 2>; 161 interrupts = <1a 2>;
172 interrupt-parent = <40000>; 162 interrupt-parent = <&mpic>;
173 }; 163 };
174 164
175 pci@8000 { 165 pci1: pci@8000 {
176 linux,phandle = <8000>;
177 interrupt-map-mask = <1f800 0 0 7>; 166 interrupt-map-mask = <1f800 0 0 7>;
178 interrupt-map = < 167 interrupt-map = <
179 168
180 /* IDSEL 0x10 */ 169 /* IDSEL 0x10 */
181 08000 0 0 1 40000 30 1 170 08000 0 0 1 &mpic 30 1
182 08000 0 0 2 40000 31 1 171 08000 0 0 2 &mpic 31 1
183 08000 0 0 3 40000 32 1 172 08000 0 0 3 &mpic 32 1
184 08000 0 0 4 40000 33 1 173 08000 0 0 4 &mpic 33 1
185 174
186 /* IDSEL 0x11 */ 175 /* IDSEL 0x11 */
187 08800 0 0 1 40000 30 1 176 08800 0 0 1 &mpic 30 1
188 08800 0 0 2 40000 31 1 177 08800 0 0 2 &mpic 31 1
189 08800 0 0 3 40000 32 1 178 08800 0 0 3 &mpic 32 1
190 08800 0 0 4 40000 33 1 179 08800 0 0 4 &mpic 33 1
191 180
192 /* IDSEL 0x12 (Slot 1) */ 181 /* IDSEL 0x12 (Slot 1) */
193 09000 0 0 1 40000 30 1 182 09000 0 0 1 &mpic 30 1
194 09000 0 0 2 40000 31 1 183 09000 0 0 2 &mpic 31 1
195 09000 0 0 3 40000 32 1 184 09000 0 0 3 &mpic 32 1
196 09000 0 0 4 40000 33 1 185 09000 0 0 4 &mpic 33 1
197 186
198 /* IDSEL 0x13 (Slot 2) */ 187 /* IDSEL 0x13 (Slot 2) */
199 09800 0 0 1 40000 31 1 188 09800 0 0 1 &mpic 31 1
200 09800 0 0 2 40000 32 1 189 09800 0 0 2 &mpic 32 1
201 09800 0 0 3 40000 33 1 190 09800 0 0 3 &mpic 33 1
202 09800 0 0 4 40000 30 1 191 09800 0 0 4 &mpic 30 1
203 192
204 /* IDSEL 0x14 (Slot 3) */ 193 /* IDSEL 0x14 (Slot 3) */
205 0a000 0 0 1 40000 32 1 194 0a000 0 0 1 &mpic 32 1
206 0a000 0 0 2 40000 33 1 195 0a000 0 0 2 &mpic 33 1
207 0a000 0 0 3 40000 30 1 196 0a000 0 0 3 &mpic 30 1
208 0a000 0 0 4 40000 31 1 197 0a000 0 0 4 &mpic 31 1
209 198
210 /* IDSEL 0x15 (Slot 4) */ 199 /* IDSEL 0x15 (Slot 4) */
211 0a800 0 0 1 40000 33 1 200 0a800 0 0 1 &mpic 33 1
212 0a800 0 0 2 40000 30 1 201 0a800 0 0 2 &mpic 30 1
213 0a800 0 0 3 40000 31 1 202 0a800 0 0 3 &mpic 31 1
214 0a800 0 0 4 40000 32 1 203 0a800 0 0 4 &mpic 32 1
215 204
216 /* Bus 1 (Tundra Bridge) */ 205 /* Bus 1 (Tundra Bridge) */
217 /* IDSEL 0x12 (ISA bridge) */ 206 /* IDSEL 0x12 (ISA bridge) */
218 19000 0 0 1 40000 30 1 207 19000 0 0 1 &mpic 30 1
219 19000 0 0 2 40000 31 1 208 19000 0 0 2 &mpic 31 1
220 19000 0 0 3 40000 32 1 209 19000 0 0 3 &mpic 32 1
221 19000 0 0 4 40000 33 1>; 210 19000 0 0 4 &mpic 33 1>;
222 interrupt-parent = <40000>; 211 interrupt-parent = <&mpic>;
223 interrupts = <08 2>; 212 interrupts = <08 2>;
224 bus-range = <0 0>; 213 bus-range = <0 0>;
225 ranges = <02000000 0 80000000 80000000 0 20000000 214 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -243,21 +232,20 @@
243 compatible = "chrp,iic"; 232 compatible = "chrp,iic";
244 big-endian; 233 big-endian;
245 interrupts = <1>; 234 interrupts = <1>;
246 interrupt-parent = <8000>; 235 interrupt-parent = <&pci1>;
247 }; 236 };
248 }; 237 };
249 238
250 pci@9000 { 239 pci@9000 {
251 linux,phandle = <9000>;
252 interrupt-map-mask = <f800 0 0 7>; 240 interrupt-map-mask = <f800 0 0 7>;
253 interrupt-map = < 241 interrupt-map = <
254 242
255 /* IDSEL 0x15 */ 243 /* IDSEL 0x15 */
256 a800 0 0 1 40000 3b 1 244 a800 0 0 1 &mpic 3b 1
257 a800 0 0 2 40000 3b 1 245 a800 0 0 2 &mpic 3b 1
258 a800 0 0 3 40000 3b 1 246 a800 0 0 3 &mpic 3b 1
259 a800 0 0 4 40000 3b 1>; 247 a800 0 0 4 &mpic 3b 1>;
260 interrupt-parent = <40000>; 248 interrupt-parent = <&mpic>;
261 interrupts = <09 2>; 249 interrupts = <09 2>;
262 bus-range = <0 0>; 250 bus-range = <0 0>;
263 ranges = <02000000 0 a0000000 a0000000 0 20000000 251 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -271,8 +259,7 @@
271 device_type = "pci"; 259 device_type = "pci";
272 }; 260 };
273 261
274 pic@40000 { 262 mpic: pic@40000 {
275 linux,phandle = <40000>;
276 clock-frequency = <0>; 263 clock-frequency = <0>;
277 interrupt-controller; 264 interrupt-controller;
278 #address-cells = <0>; 265 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 118f5a887651..5f9c102a0ab4 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8555CDS"; 14 model = "MPC8555CDS";
15 compatible = "MPC85xxCDS"; 15 compatible = "MPC8555CDS", "MPC85xxCDS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8555@0 { 24 PowerPC,8555@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,13 +32,11 @@
34 bus-frequency = <0>; // 166 MHz 32 bus-frequency = <0>; // 166 MHz
35 clock-frequency = <0>; // 825 MHz, from uboot 33 clock-frequency = <0>; // 825 MHz, from uboot
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 }; 35 };
39 }; 36 };
40 37
41 memory { 38 memory {
42 device_type = "memory"; 39 device_type = "memory";
43 linux,phandle = <300>;
44 reg = <00000000 08000000>; // 128M at 0x0 40 reg = <00000000 08000000>; // 128M at 0x0
45 }; 41 };
46 42
@@ -58,7 +54,7 @@
58 compatible = "fsl-i2c"; 54 compatible = "fsl-i2c";
59 reg = <3000 100>; 55 reg = <3000 100>;
60 interrupts = <1b 2>; 56 interrupts = <1b 2>;
61 interrupt-parent = <40000>; 57 interrupt-parent = <&mpic>;
62 dfsrr; 58 dfsrr;
63 }; 59 };
64 60
@@ -68,17 +64,14 @@
68 device_type = "mdio"; 64 device_type = "mdio";
69 compatible = "gianfar"; 65 compatible = "gianfar";
70 reg = <24520 20>; 66 reg = <24520 20>;
71 linux,phandle = <24520>; 67 phy0: ethernet-phy@0 {
72 ethernet-phy@0 { 68 interrupt-parent = <&mpic>;
73 linux,phandle = <2452000>;
74 interrupt-parent = <40000>;
75 interrupts = <35 0>; 69 interrupts = <35 0>;
76 reg = <0>; 70 reg = <0>;
77 device_type = "ethernet-phy"; 71 device_type = "ethernet-phy";
78 }; 72 };
79 ethernet-phy@1 { 73 phy1: ethernet-phy@1 {
80 linux,phandle = <2452001>; 74 interrupt-parent = <&mpic>;
81 interrupt-parent = <40000>;
82 interrupts = <35 0>; 75 interrupts = <35 0>;
83 reg = <1>; 76 reg = <1>;
84 device_type = "ethernet-phy"; 77 device_type = "ethernet-phy";
@@ -94,8 +87,8 @@
94 reg = <24000 1000>; 87 reg = <24000 1000>;
95 local-mac-address = [ 00 E0 0C 00 73 00 ]; 88 local-mac-address = [ 00 E0 0C 00 73 00 ];
96 interrupts = <0d 2 0e 2 12 2>; 89 interrupts = <0d 2 0e 2 12 2>;
97 interrupt-parent = <40000>; 90 interrupt-parent = <&mpic>;
98 phy-handle = <2452000>; 91 phy-handle = <&phy0>;
99 }; 92 };
100 93
101 ethernet@25000 { 94 ethernet@25000 {
@@ -107,8 +100,8 @@
107 reg = <25000 1000>; 100 reg = <25000 1000>;
108 local-mac-address = [ 00 E0 0C 00 73 01 ]; 101 local-mac-address = [ 00 E0 0C 00 73 01 ];
109 interrupts = <13 2 14 2 18 2>; 102 interrupts = <13 2 14 2 18 2>;
110 interrupt-parent = <40000>; 103 interrupt-parent = <&mpic>;
111 phy-handle = <2452001>; 104 phy-handle = <&phy1>;
112 }; 105 };
113 106
114 serial@4500 { 107 serial@4500 {
@@ -117,7 +110,7 @@
117 reg = <4500 100>; // reg base, size 110 reg = <4500 100>; // reg base, size
118 clock-frequency = <0>; // should we fill in in uboot? 111 clock-frequency = <0>; // should we fill in in uboot?
119 interrupts = <1a 2>; 112 interrupts = <1a 2>;
120 interrupt-parent = <40000>; 113 interrupt-parent = <&mpic>;
121 }; 114 };
122 115
123 serial@4600 { 116 serial@4600 {
@@ -126,57 +119,56 @@
126 reg = <4600 100>; // reg base, size 119 reg = <4600 100>; // reg base, size
127 clock-frequency = <0>; // should we fill in in uboot? 120 clock-frequency = <0>; // should we fill in in uboot?
128 interrupts = <1a 2>; 121 interrupts = <1a 2>;
129 interrupt-parent = <40000>; 122 interrupt-parent = <&mpic>;
130 }; 123 };
131 124
132 pci@8000 { 125 pci1: pci@8000 {
133 linux,phandle = <8000>;
134 interrupt-map-mask = <1f800 0 0 7>; 126 interrupt-map-mask = <1f800 0 0 7>;
135 interrupt-map = < 127 interrupt-map = <
136 128
137 /* IDSEL 0x10 */ 129 /* IDSEL 0x10 */
138 08000 0 0 1 40000 30 1 130 08000 0 0 1 &mpic 30 1
139 08000 0 0 2 40000 31 1 131 08000 0 0 2 &mpic 31 1
140 08000 0 0 3 40000 32 1 132 08000 0 0 3 &mpic 32 1
141 08000 0 0 4 40000 33 1 133 08000 0 0 4 &mpic 33 1
142 134
143 /* IDSEL 0x11 */ 135 /* IDSEL 0x11 */
144 08800 0 0 1 40000 30 1 136 08800 0 0 1 &mpic 30 1
145 08800 0 0 2 40000 31 1 137 08800 0 0 2 &mpic 31 1
146 08800 0 0 3 40000 32 1 138 08800 0 0 3 &mpic 32 1
147 08800 0 0 4 40000 33 1 139 08800 0 0 4 &mpic 33 1
148 140
149 /* IDSEL 0x12 (Slot 1) */ 141 /* IDSEL 0x12 (Slot 1) */
150 09000 0 0 1 40000 30 1 142 09000 0 0 1 &mpic 30 1
151 09000 0 0 2 40000 31 1 143 09000 0 0 2 &mpic 31 1
152 09000 0 0 3 40000 32 1 144 09000 0 0 3 &mpic 32 1
153 09000 0 0 4 40000 33 1 145 09000 0 0 4 &mpic 33 1
154 146
155 /* IDSEL 0x13 (Slot 2) */ 147 /* IDSEL 0x13 (Slot 2) */
156 09800 0 0 1 40000 31 1 148 09800 0 0 1 &mpic 31 1
157 09800 0 0 2 40000 32 1 149 09800 0 0 2 &mpic 32 1
158 09800 0 0 3 40000 33 1 150 09800 0 0 3 &mpic 33 1
159 09800 0 0 4 40000 30 1 151 09800 0 0 4 &mpic 30 1
160 152
161 /* IDSEL 0x14 (Slot 3) */ 153 /* IDSEL 0x14 (Slot 3) */
162 0a000 0 0 1 40000 32 1 154 0a000 0 0 1 &mpic 32 1
163 0a000 0 0 2 40000 33 1 155 0a000 0 0 2 &mpic 33 1
164 0a000 0 0 3 40000 30 1 156 0a000 0 0 3 &mpic 30 1
165 0a000 0 0 4 40000 31 1 157 0a000 0 0 4 &mpic 31 1
166 158
167 /* IDSEL 0x15 (Slot 4) */ 159 /* IDSEL 0x15 (Slot 4) */
168 0a800 0 0 1 40000 33 1 160 0a800 0 0 1 &mpic 33 1
169 0a800 0 0 2 40000 30 1 161 0a800 0 0 2 &mpic 30 1
170 0a800 0 0 3 40000 31 1 162 0a800 0 0 3 &mpic 31 1
171 0a800 0 0 4 40000 32 1 163 0a800 0 0 4 &mpic 32 1
172 164
173 /* Bus 1 (Tundra Bridge) */ 165 /* Bus 1 (Tundra Bridge) */
174 /* IDSEL 0x12 (ISA bridge) */ 166 /* IDSEL 0x12 (ISA bridge) */
175 19000 0 0 1 40000 30 1 167 19000 0 0 1 &mpic 30 1
176 19000 0 0 2 40000 31 1 168 19000 0 0 2 &mpic 31 1
177 19000 0 0 3 40000 32 1 169 19000 0 0 3 &mpic 32 1
178 19000 0 0 4 40000 33 1>; 170 19000 0 0 4 &mpic 33 1>;
179 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
180 interrupts = <08 2>; 172 interrupts = <08 2>;
181 bus-range = <0 0>; 173 bus-range = <0 0>;
182 ranges = <02000000 0 80000000 80000000 0 20000000 174 ranges = <02000000 0 80000000 80000000 0 20000000
@@ -200,21 +192,20 @@
200 compatible = "chrp,iic"; 192 compatible = "chrp,iic";
201 big-endian; 193 big-endian;
202 interrupts = <1>; 194 interrupts = <1>;
203 interrupt-parent = <8000>; 195 interrupt-parent = <&pci1>;
204 }; 196 };
205 }; 197 };
206 198
207 pci@9000 { 199 pci@9000 {
208 linux,phandle = <9000>;
209 interrupt-map-mask = <f800 0 0 7>; 200 interrupt-map-mask = <f800 0 0 7>;
210 interrupt-map = < 201 interrupt-map = <
211 202
212 /* IDSEL 0x15 */ 203 /* IDSEL 0x15 */
213 a800 0 0 1 40000 3b 1 204 a800 0 0 1 &mpic 3b 1
214 a800 0 0 2 40000 3b 1 205 a800 0 0 2 &mpic 3b 1
215 a800 0 0 3 40000 3b 1 206 a800 0 0 3 &mpic 3b 1
216 a800 0 0 4 40000 3b 1>; 207 a800 0 0 4 &mpic 3b 1>;
217 interrupt-parent = <40000>; 208 interrupt-parent = <&mpic>;
218 interrupts = <09 2>; 209 interrupts = <09 2>;
219 bus-range = <0 0>; 210 bus-range = <0 0>;
220 ranges = <02000000 0 a0000000 a0000000 0 20000000 211 ranges = <02000000 0 a0000000 a0000000 0 20000000
@@ -228,8 +219,7 @@
228 device_type = "pci"; 219 device_type = "pci";
229 }; 220 };
230 221
231 pic@40000 { 222 mpic: pic@40000 {
232 linux,phandle = <40000>;
233 clock-frequency = <0>; 223 clock-frequency = <0>;
234 interrupt-controller; 224 interrupt-controller;
235 #address-cells = <0>; 225 #address-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 2b168486aeba..10502638b0e9 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -12,16 +12,14 @@
12 12
13/ { 13/ {
14 model = "MPC8560ADS"; 14 model = "MPC8560ADS";
15 compatible = "MPC85xxADS"; 15 compatible = "MPC8560ADS", "MPC85xxADS";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 linux,phandle = <100>;
19 18
20 cpus { 19 cpus {
21 #cpus = <1>; 20 #cpus = <1>;
22 #address-cells = <1>; 21 #address-cells = <1>;
23 #size-cells = <0>; 22 #size-cells = <0>;
24 linux,phandle = <200>;
25 23
26 PowerPC,8560@0 { 24 PowerPC,8560@0 {
27 device_type = "cpu"; 25 device_type = "cpu";
@@ -34,14 +32,11 @@
34 bus-frequency = <13ab6680>; 32 bus-frequency = <13ab6680>;
35 clock-frequency = <312c8040>; 33 clock-frequency = <312c8040>;
36 32-bit; 34 32-bit;
37 linux,phandle = <201>;
38 linux,boot-cpu;
39 }; 35 };
40 }; 36 };
41 37
42 memory { 38 memory {
43 device_type = "memory"; 39 device_type = "memory";
44 linux,phandle = <300>;
45 reg = <00000000 10000000>; 40 reg = <00000000 10000000>;
46 }; 41 };
47 42
@@ -58,33 +53,28 @@
58 device_type = "mdio"; 53 device_type = "mdio";
59 compatible = "gianfar"; 54 compatible = "gianfar";
60 reg = <24520 20>; 55 reg = <24520 20>;
61 linux,phandle = <24520>;
62 #address-cells = <1>; 56 #address-cells = <1>;
63 #size-cells = <0>; 57 #size-cells = <0>;
64 ethernet-phy@0 { 58 phy0: ethernet-phy@0 {
65 linux,phandle = <2452000>; 59 interrupt-parent = <&mpic>;
66 interrupt-parent = <40000>;
67 interrupts = <35 1>; 60 interrupts = <35 1>;
68 reg = <0>; 61 reg = <0>;
69 device_type = "ethernet-phy"; 62 device_type = "ethernet-phy";
70 }; 63 };
71 ethernet-phy@1 { 64 phy1: ethernet-phy@1 {
72 linux,phandle = <2452001>; 65 interrupt-parent = <&mpic>;
73 interrupt-parent = <40000>;
74 interrupts = <35 1>; 66 interrupts = <35 1>;
75 reg = <1>; 67 reg = <1>;
76 device_type = "ethernet-phy"; 68 device_type = "ethernet-phy";
77 }; 69 };
78 ethernet-phy@2 { 70 phy2: ethernet-phy@2 {
79 linux,phandle = <2452002>; 71 interrupt-parent = <&mpic>;
80 interrupt-parent = <40000>;
81 interrupts = <37 1>; 72 interrupts = <37 1>;
82 reg = <2>; 73 reg = <2>;
83 device_type = "ethernet-phy"; 74 device_type = "ethernet-phy";
84 }; 75 };
85 ethernet-phy@3 { 76 phy3: ethernet-phy@3 {
86 linux,phandle = <2452003>; 77 interrupt-parent = <&mpic>;
87 interrupt-parent = <40000>;
88 interrupts = <37 1>; 78 interrupts = <37 1>;
89 reg = <3>; 79 reg = <3>;
90 device_type = "ethernet-phy"; 80 device_type = "ethernet-phy";
@@ -98,8 +88,8 @@
98 reg = <24000 1000>; 88 reg = <24000 1000>;
99 address = [ 00 00 0C 00 00 FD ]; 89 address = [ 00 00 0C 00 00 FD ];
100 interrupts = <d 2 e 2 12 2>; 90 interrupts = <d 2 e 2 12 2>;
101 interrupt-parent = <40000>; 91 interrupt-parent = <&mpic>;
102 phy-handle = <2452000>; 92 phy-handle = <&phy0>;
103 }; 93 };
104 94
105 ethernet@25000 { 95 ethernet@25000 {
@@ -111,12 +101,11 @@
111 reg = <25000 1000>; 101 reg = <25000 1000>;
112 address = [ 00 00 0C 00 01 FD ]; 102 address = [ 00 00 0C 00 01 FD ];
113 interrupts = <13 2 14 2 18 2>; 103 interrupts = <13 2 14 2 18 2>;
114 interrupt-parent = <40000>; 104 interrupt-parent = <&mpic>;
115 phy-handle = <2452001>; 105 phy-handle = <&phy1>;
116 }; 106 };
117 107
118 pci@8000 { 108 pci@8000 {
119 linux,phandle = <8000>;
120 #interrupt-cells = <1>; 109 #interrupt-cells = <1>;
121 #size-cells = <2>; 110 #size-cells = <2>;
122 #address-cells = <3>; 111 #address-cells = <3>;
@@ -128,96 +117,94 @@
128 interrupt-map = < 117 interrupt-map = <
129 118
130 /* IDSEL 0x2 */ 119 /* IDSEL 0x2 */
131 1000 0 0 1 40000 31 1 120 1000 0 0 1 &mpic 31 1
132 1000 0 0 2 40000 32 1 121 1000 0 0 2 &mpic 32 1
133 1000 0 0 3 40000 33 1 122 1000 0 0 3 &mpic 33 1
134 1000 0 0 4 40000 34 1 123 1000 0 0 4 &mpic 34 1
135 124
136 /* IDSEL 0x3 */ 125 /* IDSEL 0x3 */
137 1800 0 0 1 40000 34 1 126 1800 0 0 1 &mpic 34 1
138 1800 0 0 2 40000 31 1 127 1800 0 0 2 &mpic 31 1
139 1800 0 0 3 40000 32 1 128 1800 0 0 3 &mpic 32 1
140 1800 0 0 4 40000 33 1 129 1800 0 0 4 &mpic 33 1
141 130
142 /* IDSEL 0x4 */ 131 /* IDSEL 0x4 */
143 2000 0 0 1 40000 33 1 132 2000 0 0 1 &mpic 33 1
144 2000 0 0 2 40000 34 1 133 2000 0 0 2 &mpic 34 1
145 2000 0 0 3 40000 31 1 134 2000 0 0 3 &mpic 31 1
146 2000 0 0 4 40000 32 1 135 2000 0 0 4 &mpic 32 1
147 136
148 /* IDSEL 0x5 */ 137 /* IDSEL 0x5 */
149 2800 0 0 1 40000 32 1 138 2800 0 0 1 &mpic 32 1
150 2800 0 0 2 40000 33 1 139 2800 0 0 2 &mpic 33 1
151 2800 0 0 3 40000 34 1 140 2800 0 0 3 &mpic 34 1
152 2800 0 0 4 40000 31 1 141 2800 0 0 4 &mpic 31 1
153 142
154 /* IDSEL 12 */ 143 /* IDSEL 12 */
155 6000 0 0 1 40000 31 1 144 6000 0 0 1 &mpic 31 1
156 6000 0 0 2 40000 32 1 145 6000 0 0 2 &mpic 32 1
157 6000 0 0 3 40000 33 1 146 6000 0 0 3 &mpic 33 1
158 6000 0 0 4 40000 34 1 147 6000 0 0 4 &mpic 34 1
159 148
160 /* IDSEL 13 */ 149 /* IDSEL 13 */
161 6800 0 0 1 40000 34 1 150 6800 0 0 1 &mpic 34 1
162 6800 0 0 2 40000 31 1 151 6800 0 0 2 &mpic 31 1
163 6800 0 0 3 40000 32 1 152 6800 0 0 3 &mpic 32 1
164 6800 0 0 4 40000 33 1 153 6800 0 0 4 &mpic 33 1
165 154
166 /* IDSEL 14*/ 155 /* IDSEL 14*/
167 7000 0 0 1 40000 33 1 156 7000 0 0 1 &mpic 33 1
168 7000 0 0 2 40000 34 1 157 7000 0 0 2 &mpic 34 1
169 7000 0 0 3 40000 31 1 158 7000 0 0 3 &mpic 31 1
170 7000 0 0 4 40000 32 1 159 7000 0 0 4 &mpic 32 1
171 160
172 /* IDSEL 15 */ 161 /* IDSEL 15 */
173 7800 0 0 1 40000 32 1 162 7800 0 0 1 &mpic 32 1
174 7800 0 0 2 40000 33 1 163 7800 0 0 2 &mpic 33 1
175 7800 0 0 3 40000 34 1 164 7800 0 0 3 &mpic 34 1
176 7800 0 0 4 40000 31 1 165 7800 0 0 4 &mpic 31 1
177 166
178 /* IDSEL 18 */ 167 /* IDSEL 18 */
179 9000 0 0 1 40000 31 1 168 9000 0 0 1 &mpic 31 1
180 9000 0 0 2 40000 32 1 169 9000 0 0 2 &mpic 32 1
181 9000 0 0 3 40000 33 1 170 9000 0 0 3 &mpic 33 1
182 9000 0 0 4 40000 34 1 171 9000 0 0 4 &mpic 34 1
183 172
184 /* IDSEL 19 */ 173 /* IDSEL 19 */
185 9800 0 0 1 40000 34 1 174 9800 0 0 1 &mpic 34 1
186 9800 0 0 2 40000 31 1 175 9800 0 0 2 &mpic 31 1
187 9800 0 0 3 40000 32 1 176 9800 0 0 3 &mpic 32 1
188 9800 0 0 4 40000 33 1 177 9800 0 0 4 &mpic 33 1
189 178
190 /* IDSEL 20 */ 179 /* IDSEL 20 */
191 a000 0 0 1 40000 33 1 180 a000 0 0 1 &mpic 33 1
192 a000 0 0 2 40000 34 1 181 a000 0 0 2 &mpic 34 1
193 a000 0 0 3 40000 31 1 182 a000 0 0 3 &mpic 31 1
194 a000 0 0 4 40000 32 1 183 a000 0 0 4 &mpic 32 1
195 184
196 /* IDSEL 21 */ 185 /* IDSEL 21 */
197 a800 0 0 1 40000 32 1 186 a800 0 0 1 &mpic 32 1
198 a800 0 0 2 40000 33 1 187 a800 0 0 2 &mpic 33 1
199 a800 0 0 3 40000 34 1 188 a800 0 0 3 &mpic 34 1
200 a800 0 0 4 40000 31 1>; 189 a800 0 0 4 &mpic 31 1>;
201 190
202 interrupt-parent = <40000>; 191 interrupt-parent = <&mpic>;
203 interrupts = <42 0>; 192 interrupts = <8 0>;
204 bus-range = <0 0>; 193 bus-range = <0 0>;
205 ranges = <02000000 0 80000000 80000000 0 20000000 194 ranges = <02000000 0 80000000 80000000 0 20000000
206 01000000 0 00000000 e2000000 0 01000000>; 195 01000000 0 00000000 e2000000 0 01000000>;
207 }; 196 };
208 197
209 pic@40000 { 198 mpic: pic@40000 {
210 linux,phandle = <40000>;
211 interrupt-controller; 199 interrupt-controller;
212 #address-cells = <0>; 200 #address-cells = <0>;
213 #interrupt-cells = <2>; 201 #interrupt-cells = <2>;
214 reg = <40000 20100>; 202 reg = <40000 40000>;
215 built-in; 203 built-in;
216 device_type = "open-pic"; 204 device_type = "open-pic";
217 }; 205 };
218 206
219 cpm@e0000000 { 207 cpm@e0000000 {
220 linux,phandle = <e0000000>;
221 #address-cells = <1>; 208 #address-cells = <1>;
222 #size-cells = <1>; 209 #size-cells = <1>;
223 #interrupt-cells = <2>; 210 #interrupt-cells = <2>;
@@ -228,13 +215,12 @@
228 command-proc = <919c0>; 215 command-proc = <919c0>;
229 brg-frequency = <9d5b340>; 216 brg-frequency = <9d5b340>;
230 217
231 pic@90c00 { 218 cpmpic: pic@90c00 {
232 linux,phandle = <90c00>;
233 interrupt-controller; 219 interrupt-controller;
234 #address-cells = <0>; 220 #address-cells = <0>;
235 #interrupt-cells = <2>; 221 #interrupt-cells = <2>;
236 interrupts = <1e 0>; 222 interrupts = <1e 0>;
237 interrupt-parent = <40000>; 223 interrupt-parent = <&mpic>;
238 reg = <90c00 80>; 224 reg = <90c00 80>;
239 built-in; 225 built-in;
240 device_type = "cpm-pic"; 226 device_type = "cpm-pic";
@@ -250,8 +236,8 @@
250 rx-clock = <1>; 236 rx-clock = <1>;
251 tx-clock = <1>; 237 tx-clock = <1>;
252 current-speed = <1c200>; 238 current-speed = <1c200>;
253 interrupts = <64 1>; 239 interrupts = <28 8>;
254 interrupt-parent = <90c00>; 240 interrupt-parent = <&cpmpic>;
255 }; 241 };
256 242
257 scc@91a20 { 243 scc@91a20 {
@@ -264,8 +250,8 @@
264 rx-clock = <2>; 250 rx-clock = <2>;
265 tx-clock = <2>; 251 tx-clock = <2>;
266 current-speed = <1c200>; 252 current-speed = <1c200>;
267 interrupts = <65 1>; 253 interrupts = <29 8>;
268 interrupt-parent = <90c00>; 254 interrupt-parent = <&cpmpic>;
269 }; 255 };
270 256
271 fcc@91320 { 257 fcc@91320 {
@@ -278,9 +264,9 @@
278 clock-setup = <ff00ffff 250000>; 264 clock-setup = <ff00ffff 250000>;
279 rx-clock = <15>; 265 rx-clock = <15>;
280 tx-clock = <16>; 266 tx-clock = <16>;
281 interrupts = <5d 1>; 267 interrupts = <21 8>;
282 interrupt-parent = <90c00>; 268 interrupt-parent = <&cpmpic>;
283 phy-handle = <2452002>; 269 phy-handle = <&phy2>;
284 }; 270 };
285 271
286 fcc@91340 { 272 fcc@91340 {
@@ -293,9 +279,9 @@
293 clock-setup = <ffff00ff 3700>; 279 clock-setup = <ffff00ff 3700>;
294 rx-clock = <17>; 280 rx-clock = <17>;
295 tx-clock = <18>; 281 tx-clock = <18>;
296 interrupts = <5e 1>; 282 interrupts = <22 8>;
297 interrupt-parent = <90c00>; 283 interrupt-parent = <&cpmpic>;
298 phy-handle = <2452003>; 284 phy-handle = <&phy3>;
299 }; 285 };
300 }; 286 };
301 }; 287 };
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
new file mode 100644
index 000000000000..bf49d8c997b9
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -0,0 +1,362 @@
1/*
2 * MPC8568E MDS Device Tree Source
3 *
4 * Copyright 2007 Freescale Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/*
14/memreserve/ 00000000 1000000;
15*/
16
17/ {
18 model = "MPC8568EMDS";
19 compatible = "MPC8568EMDS", "MPC85xxMDS";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 cpus {
24 #cpus = <1>;
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 PowerPC,8568@0 {
29 device_type = "cpu";
30 reg = <0>;
31 d-cache-line-size = <20>; // 32 bytes
32 i-cache-line-size = <20>; // 32 bytes
33 d-cache-size = <8000>; // L1, 32K
34 i-cache-size = <8000>; // L1, 32K
35 timebase-frequency = <0>;
36 bus-frequency = <0>;
37 clock-frequency = <0>;
38 32-bit;
39 };
40 };
41
42 memory {
43 device_type = "memory";
44 reg = <00000000 10000000>;
45 };
46
47 bcsr@f8000000 {
48 device_type = "board-control";
49 reg = <f8000000 8000>;
50 };
51
52 soc8568@e0000000 {
53 #address-cells = <1>;
54 #size-cells = <1>;
55 #interrupt-cells = <2>;
56 device_type = "soc";
57 ranges = <0 e0000000 00100000>;
58 reg = <e0000000 00100000>;
59 bus-frequency = <0>;
60
61 i2c@3000 {
62 device_type = "i2c";
63 compatible = "fsl-i2c";
64 reg = <3000 100>;
65 interrupts = <1b 2>;
66 interrupt-parent = <&mpic>;
67 dfsrr;
68 };
69
70 i2c@3100 {
71 device_type = "i2c";
72 compatible = "fsl-i2c";
73 reg = <3100 100>;
74 interrupts = <1b 2>;
75 interrupt-parent = <&mpic>;
76 dfsrr;
77 };
78
79 mdio@24520 {
80 #address-cells = <1>;
81 #size-cells = <0>;
82 device_type = "mdio";
83 compatible = "gianfar";
84 reg = <24520 20>;
85 phy0: ethernet-phy@0 {
86 interrupt-parent = <&mpic>;
87 interrupts = <31 1>;
88 reg = <0>;
89 device_type = "ethernet-phy";
90 };
91 phy1: ethernet-phy@1 {
92 interrupt-parent = <&mpic>;
93 interrupts = <32 1>;
94 reg = <1>;
95 device_type = "ethernet-phy";
96 };
97 phy2: ethernet-phy@2 {
98 interrupt-parent = <&mpic>;
99 interrupts = <31 1>;
100 reg = <2>;
101 device_type = "ethernet-phy";
102 };
103 phy3: ethernet-phy@3 {
104 interrupt-parent = <&mpic>;
105 interrupts = <32 1>;
106 reg = <3>;
107 device_type = "ethernet-phy";
108 };
109 };
110
111 ethernet@24000 {
112 #address-cells = <1>;
113 #size-cells = <0>;
114 device_type = "network";
115 model = "eTSEC";
116 compatible = "gianfar";
117 reg = <24000 1000>;
118 mac-address = [ 00 00 00 00 00 00 ];
119 interrupts = <d 2 e 2 12 2>;
120 interrupt-parent = <&mpic>;
121 phy-handle = <&phy2>;
122 };
123
124 ethernet@25000 {
125 #address-cells = <1>;
126 #size-cells = <0>;
127 device_type = "network";
128 model = "eTSEC";
129 compatible = "gianfar";
130 reg = <25000 1000>;
131 mac-address = [ 00 00 00 00 00 00];
132 interrupts = <13 2 14 2 18 2>;
133 interrupt-parent = <&mpic>;
134 phy-handle = <&phy3>;
135 };
136
137 serial@4500 {
138 device_type = "serial";
139 compatible = "ns16550";
140 reg = <4500 100>;
141 clock-frequency = <0>;
142 interrupts = <1a 2>;
143 interrupt-parent = <&mpic>;
144 };
145
146 serial@4600 {
147 device_type = "serial";
148 compatible = "ns16550";
149 reg = <4600 100>;
150 clock-frequency = <0>;
151 interrupts = <1a 2>;
152 interrupt-parent = <&mpic>;
153 };
154
155 crypto@30000 {
156 device_type = "crypto";
157 model = "SEC2";
158 compatible = "talitos";
159 reg = <30000 f000>;
160 interrupts = <1d 2>;
161 interrupt-parent = <&mpic>;
162 num-channels = <4>;
163 channel-fifo-len = <18>;
164 exec-units-mask = <000000fe>;
165 descriptor-types-mask = <012b0ebf>;
166 };
167
168 mpic: pic@40000 {
169 clock-frequency = <0>;
170 interrupt-controller;
171 #address-cells = <0>;
172 #interrupt-cells = <2>;
173 reg = <40000 40000>;
174 built-in;
175 compatible = "chrp,open-pic";
176 device_type = "open-pic";
177 big-endian;
178 };
179 par_io@e0100 {
180 reg = <e0100 100>;
181 device_type = "par_io";
182 num-ports = <7>;
183
184 pio1: ucc_pin@01 {
185 pio-map = <
186 /* port pin dir open_drain assignment has_irq */
187 4 0a 1 0 2 0 /* TxD0 */
188 4 09 1 0 2 0 /* TxD1 */
189 4 08 1 0 2 0 /* TxD2 */
190 4 07 1 0 2 0 /* TxD3 */
191 4 17 1 0 2 0 /* TxD4 */
192 4 16 1 0 2 0 /* TxD5 */
193 4 15 1 0 2 0 /* TxD6 */
194 4 14 1 0 2 0 /* TxD7 */
195 4 0f 2 0 2 0 /* RxD0 */
196 4 0e 2 0 2 0 /* RxD1 */
197 4 0d 2 0 2 0 /* RxD2 */
198 4 0c 2 0 2 0 /* RxD3 */
199 4 1d 2 0 2 0 /* RxD4 */
200 4 1c 2 0 2 0 /* RxD5 */
201 4 1b 2 0 2 0 /* RxD6 */
202 4 1a 2 0 2 0 /* RxD7 */
203 4 0b 1 0 2 0 /* TX_EN */
204 4 18 1 0 2 0 /* TX_ER */
205 4 0f 2 0 2 0 /* RX_DV */
206 4 1e 2 0 2 0 /* RX_ER */
207 4 11 2 0 2 0 /* RX_CLK */
208 4 13 1 0 2 0 /* GTX_CLK */
209 1 1f 2 0 3 0>; /* GTX125 */
210 };
211 pio2: ucc_pin@02 {
212 pio-map = <
213 /* port pin dir open_drain assignment has_irq */
214 5 0a 1 0 2 0 /* TxD0 */
215 5 09 1 0 2 0 /* TxD1 */
216 5 08 1 0 2 0 /* TxD2 */
217 5 07 1 0 2 0 /* TxD3 */
218 5 17 1 0 2 0 /* TxD4 */
219 5 16 1 0 2 0 /* TxD5 */
220 5 15 1 0 2 0 /* TxD6 */
221 5 14 1 0 2 0 /* TxD7 */
222 5 0f 2 0 2 0 /* RxD0 */
223 5 0e 2 0 2 0 /* RxD1 */
224 5 0d 2 0 2 0 /* RxD2 */
225 5 0c 2 0 2 0 /* RxD3 */
226 5 1d 2 0 2 0 /* RxD4 */
227 5 1c 2 0 2 0 /* RxD5 */
228 5 1b 2 0 2 0 /* RxD6 */
229 5 1a 2 0 2 0 /* RxD7 */
230 5 0b 1 0 2 0 /* TX_EN */
231 5 18 1 0 2 0 /* TX_ER */
232 5 10 2 0 2 0 /* RX_DV */
233 5 1e 2 0 2 0 /* RX_ER */
234 5 11 2 0 2 0 /* RX_CLK */
235 5 13 1 0 2 0 /* GTX_CLK */
236 1 1f 2 0 3 0 /* GTX125 */
237 4 06 3 0 2 0 /* MDIO */
238 4 05 1 0 2 0>; /* MDC */
239 };
240 };
241 };
242
243 qe@e0080000 {
244 #address-cells = <1>;
245 #size-cells = <1>;
246 device_type = "qe";
247 model = "QE";
248 ranges = <0 e0080000 00040000>;
249 reg = <e0080000 480>;
250 brg-frequency = <0>;
251 bus-frequency = <179A7B00>;
252
253 muram@10000 {
254 device_type = "muram";
255 ranges = <0 00010000 0000c000>;
256
257 data-only@0{
258 reg = <0 c000>;
259 };
260 };
261
262 spi@4c0 {
263 device_type = "spi";
264 compatible = "fsl_spi";
265 reg = <4c0 40>;
266 interrupts = <2>;
267 interrupt-parent = <&qeic>;
268 mode = "cpu";
269 };
270
271 spi@500 {
272 device_type = "spi";
273 compatible = "fsl_spi";
274 reg = <500 40>;
275 interrupts = <1>;
276 interrupt-parent = <&qeic>;
277 mode = "cpu";
278 };
279
280 ucc@2000 {
281 device_type = "network";
282 compatible = "ucc_geth";
283 model = "UCC";
284 device-id = <1>;
285 reg = <2000 200>;
286 interrupts = <20>;
287 interrupt-parent = <&qeic>;
288 mac-address = [ 00 04 9f 00 23 23 ];
289 rx-clock = <0>;
290 tx-clock = <19>;
291 phy-handle = <&qe_phy0>;
292 pio-handle = <&pio1>;
293 };
294
295 ucc@3000 {
296 device_type = "network";
297 compatible = "ucc_geth";
298 model = "UCC";
299 device-id = <2>;
300 reg = <3000 200>;
301 interrupts = <21>;
302 interrupt-parent = <&qeic>;
303 mac-address = [ 00 11 22 33 44 55 ];
304 rx-clock = <0>;
305 tx-clock = <14>;
306 phy-handle = <&qe_phy1>;
307 pio-handle = <&pio2>;
308 };
309
310 mdio@2120 {
311 #address-cells = <1>;
312 #size-cells = <0>;
313 reg = <2120 18>;
314 device_type = "mdio";
315 compatible = "ucc_geth_phy";
316
317 /* These are the same PHYs as on
318 * gianfar's MDIO bus */
319 qe_phy0: ethernet-phy@00 {
320 interrupt-parent = <&mpic>;
321 interrupts = <31 1>;
322 reg = <0>;
323 device_type = "ethernet-phy";
324 interface = <6>; //ENET_1000_GMII
325 };
326 qe_phy1: ethernet-phy@01 {
327 interrupt-parent = <&mpic>;
328 interrupts = <32 1>;
329 reg = <1>;
330 device_type = "ethernet-phy";
331 interface = <6>;
332 };
333 qe_phy2: ethernet-phy@02 {
334 interrupt-parent = <&mpic>;
335 interrupts = <31 1>;
336 reg = <2>;
337 device_type = "ethernet-phy";
338 interface = <6>; //ENET_1000_GMII
339 };
340 qe_phy3: ethernet-phy@03 {
341 interrupt-parent = <&mpic>;
342 interrupts = <32 1>;
343 reg = <3>;
344 device_type = "ethernet-phy";
345 interface = <6>; //ENET_1000_GMII
346 };
347 };
348
349 qeic: qeic@80 {
350 interrupt-controller;
351 device_type = "qeic";
352 #address-cells = <0>;
353 #interrupt-cells = <1>;
354 reg = <80 80>;
355 built-in;
356 big-endian;
357 interrupts = <1e 2 1e 2>; //high:30 low:30
358 interrupt-parent = <&mpic>;
359 };
360
361 };
362};
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index f0c7731743ea..8a4995a85ba0 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -32,7 +32,6 @@
32 bus-frequency = <0>; // From uboot 32 bus-frequency = <0>; // From uboot
33 clock-frequency = <0>; // From uboot 33 clock-frequency = <0>; // From uboot
34 32-bit; 34 32-bit;
35 linux,boot-cpu;
36 }; 35 };
37 PowerPC,8641@1 { 36 PowerPC,8641@1 {
38 device_type = "cpu"; 37 device_type = "cpu";
@@ -67,7 +66,7 @@
67 compatible = "fsl-i2c"; 66 compatible = "fsl-i2c";
68 reg = <3000 100>; 67 reg = <3000 100>;
69 interrupts = <2b 2>; 68 interrupts = <2b 2>;
70 interrupt-parent = <40000>; 69 interrupt-parent = <&mpic>;
71 dfsrr; 70 dfsrr;
72 }; 71 };
73 72
@@ -76,7 +75,7 @@
76 compatible = "fsl-i2c"; 75 compatible = "fsl-i2c";
77 reg = <3100 100>; 76 reg = <3100 100>;
78 interrupts = <2b 2>; 77 interrupts = <2b 2>;
79 interrupt-parent = <40000>; 78 interrupt-parent = <&mpic>;
80 dfsrr; 79 dfsrr;
81 }; 80 };
82 81
@@ -86,31 +85,26 @@
86 device_type = "mdio"; 85 device_type = "mdio";
87 compatible = "gianfar"; 86 compatible = "gianfar";
88 reg = <24520 20>; 87 reg = <24520 20>;
89 linux,phandle = <24520>; 88 phy0: ethernet-phy@0 {
90 ethernet-phy@0 { 89 interrupt-parent = <&mpic>;
91 linux,phandle = <2452000>;
92 interrupt-parent = <40000>;
93 interrupts = <4a 1>; 90 interrupts = <4a 1>;
94 reg = <0>; 91 reg = <0>;
95 device_type = "ethernet-phy"; 92 device_type = "ethernet-phy";
96 }; 93 };
97 ethernet-phy@1 { 94 phy1: ethernet-phy@1 {
98 linux,phandle = <2452001>; 95 interrupt-parent = <&mpic>;
99 interrupt-parent = <40000>;
100 interrupts = <4a 1>; 96 interrupts = <4a 1>;
101 reg = <1>; 97 reg = <1>;
102 device_type = "ethernet-phy"; 98 device_type = "ethernet-phy";
103 }; 99 };
104 ethernet-phy@2 { 100 phy2: ethernet-phy@2 {
105 linux,phandle = <2452002>; 101 interrupt-parent = <&mpic>;
106 interrupt-parent = <40000>;
107 interrupts = <4a 1>; 102 interrupts = <4a 1>;
108 reg = <2>; 103 reg = <2>;
109 device_type = "ethernet-phy"; 104 device_type = "ethernet-phy";
110 }; 105 };
111 ethernet-phy@3 { 106 phy3: ethernet-phy@3 {
112 linux,phandle = <2452003>; 107 interrupt-parent = <&mpic>;
113 interrupt-parent = <40000>;
114 interrupts = <4a 1>; 108 interrupts = <4a 1>;
115 reg = <3>; 109 reg = <3>;
116 device_type = "ethernet-phy"; 110 device_type = "ethernet-phy";
@@ -126,8 +120,8 @@
126 reg = <24000 1000>; 120 reg = <24000 1000>;
127 mac-address = [ 00 E0 0C 00 73 00 ]; 121 mac-address = [ 00 E0 0C 00 73 00 ];
128 interrupts = <1d 2 1e 2 22 2>; 122 interrupts = <1d 2 1e 2 22 2>;
129 interrupt-parent = <40000>; 123 interrupt-parent = <&mpic>;
130 phy-handle = <2452000>; 124 phy-handle = <&phy0>;
131 }; 125 };
132 126
133 ethernet@25000 { 127 ethernet@25000 {
@@ -139,8 +133,8 @@
139 reg = <25000 1000>; 133 reg = <25000 1000>;
140 mac-address = [ 00 E0 0C 00 73 01 ]; 134 mac-address = [ 00 E0 0C 00 73 01 ];
141 interrupts = <23 2 24 2 28 2>; 135 interrupts = <23 2 24 2 28 2>;
142 interrupt-parent = <40000>; 136 interrupt-parent = <&mpic>;
143 phy-handle = <2452001>; 137 phy-handle = <&phy1>;
144 }; 138 };
145 139
146 ethernet@26000 { 140 ethernet@26000 {
@@ -152,8 +146,8 @@
152 reg = <26000 1000>; 146 reg = <26000 1000>;
153 mac-address = [ 00 E0 0C 00 02 FD ]; 147 mac-address = [ 00 E0 0C 00 02 FD ];
154 interrupts = <1F 2 20 2 21 2>; 148 interrupts = <1F 2 20 2 21 2>;
155 interrupt-parent = <40000>; 149 interrupt-parent = <&mpic>;
156 phy-handle = <2452002>; 150 phy-handle = <&phy2>;
157 }; 151 };
158 152
159 ethernet@27000 { 153 ethernet@27000 {
@@ -165,8 +159,8 @@
165 reg = <27000 1000>; 159 reg = <27000 1000>;
166 mac-address = [ 00 E0 0C 00 03 FD ]; 160 mac-address = [ 00 E0 0C 00 03 FD ];
167 interrupts = <25 2 26 2 27 2>; 161 interrupts = <25 2 26 2 27 2>;
168 interrupt-parent = <40000>; 162 interrupt-parent = <&mpic>;
169 phy-handle = <2452003>; 163 phy-handle = <&phy3>;
170 }; 164 };
171 serial@4500 { 165 serial@4500 {
172 device_type = "serial"; 166 device_type = "serial";
@@ -174,7 +168,7 @@
174 reg = <4500 100>; 168 reg = <4500 100>;
175 clock-frequency = <0>; 169 clock-frequency = <0>;
176 interrupts = <2a 2>; 170 interrupts = <2a 2>;
177 interrupt-parent = <40000>; 171 interrupt-parent = <&mpic>;
178 }; 172 };
179 173
180 serial@4600 { 174 serial@4600 {
@@ -183,7 +177,7 @@
183 reg = <4600 100>; 177 reg = <4600 100>;
184 clock-frequency = <0>; 178 clock-frequency = <0>;
185 interrupts = <1c 2>; 179 interrupts = <1c 2>;
186 interrupt-parent = <40000>; 180 interrupt-parent = <&mpic>;
187 }; 181 };
188 182
189 pci@8000 { 183 pci@8000 {
@@ -197,103 +191,102 @@
197 ranges = <02000000 0 80000000 80000000 0 20000000 191 ranges = <02000000 0 80000000 80000000 0 20000000
198 01000000 0 00000000 e2000000 0 00100000>; 192 01000000 0 00000000 e2000000 0 00100000>;
199 clock-frequency = <1fca055>; 193 clock-frequency = <1fca055>;
200 interrupt-parent = <40000>; 194 interrupt-parent = <&mpic>;
201 interrupts = <18 2>; 195 interrupts = <18 2>;
202 interrupt-map-mask = <f800 0 0 7>; 196 interrupt-map-mask = <f800 0 0 7>;
203 interrupt-map = < 197 interrupt-map = <
204 /* IDSEL 0x11 */ 198 /* IDSEL 0x11 */
205 8800 0 0 1 4d0 3 2 199 8800 0 0 1 &i8259 3 2
206 8800 0 0 2 4d0 4 2 200 8800 0 0 2 &i8259 4 2
207 8800 0 0 3 4d0 5 2 201 8800 0 0 3 &i8259 5 2
208 8800 0 0 4 4d0 6 2 202 8800 0 0 4 &i8259 6 2
209 203
210 /* IDSEL 0x12 */ 204 /* IDSEL 0x12 */
211 9000 0 0 1 4d0 4 2 205 9000 0 0 1 &i8259 4 2
212 9000 0 0 2 4d0 5 2 206 9000 0 0 2 &i8259 5 2
213 9000 0 0 3 4d0 6 2 207 9000 0 0 3 &i8259 6 2
214 9000 0 0 4 4d0 3 2 208 9000 0 0 4 &i8259 3 2
215 209
216 /* IDSEL 0x13 */ 210 /* IDSEL 0x13 */
217 9800 0 0 1 4d0 0 0 211 9800 0 0 1 &i8259 0 0
218 9800 0 0 2 4d0 0 0 212 9800 0 0 2 &i8259 0 0
219 9800 0 0 3 4d0 0 0 213 9800 0 0 3 &i8259 0 0
220 9800 0 0 4 4d0 0 0 214 9800 0 0 4 &i8259 0 0
221 215
222 /* IDSEL 0x14 */ 216 /* IDSEL 0x14 */
223 a000 0 0 1 4d0 0 0 217 a000 0 0 1 &i8259 0 0
224 a000 0 0 2 4d0 0 0 218 a000 0 0 2 &i8259 0 0
225 a000 0 0 3 4d0 0 0 219 a000 0 0 3 &i8259 0 0
226 a000 0 0 4 4d0 0 0 220 a000 0 0 4 &i8259 0 0
227 221
228 /* IDSEL 0x15 */ 222 /* IDSEL 0x15 */
229 a800 0 0 1 4d0 0 0 223 a800 0 0 1 &i8259 0 0
230 a800 0 0 2 4d0 0 0 224 a800 0 0 2 &i8259 0 0
231 a800 0 0 3 4d0 0 0 225 a800 0 0 3 &i8259 0 0
232 a800 0 0 4 4d0 0 0 226 a800 0 0 4 &i8259 0 0
233 227
234 /* IDSEL 0x16 */ 228 /* IDSEL 0x16 */
235 b000 0 0 1 4d0 0 0 229 b000 0 0 1 &i8259 0 0
236 b000 0 0 2 4d0 0 0 230 b000 0 0 2 &i8259 0 0
237 b000 0 0 3 4d0 0 0 231 b000 0 0 3 &i8259 0 0
238 b000 0 0 4 4d0 0 0 232 b000 0 0 4 &i8259 0 0
239 233
240 /* IDSEL 0x17 */ 234 /* IDSEL 0x17 */
241 b800 0 0 1 4d0 0 0 235 b800 0 0 1 &i8259 0 0
242 b800 0 0 2 4d0 0 0 236 b800 0 0 2 &i8259 0 0
243 b800 0 0 3 4d0 0 0 237 b800 0 0 3 &i8259 0 0
244 b800 0 0 4 4d0 0 0 238 b800 0 0 4 &i8259 0 0
245 239
246 /* IDSEL 0x18 */ 240 /* IDSEL 0x18 */
247 c000 0 0 1 4d0 0 0 241 c000 0 0 1 &i8259 0 0
248 c000 0 0 2 4d0 0 0 242 c000 0 0 2 &i8259 0 0
249 c000 0 0 3 4d0 0 0 243 c000 0 0 3 &i8259 0 0
250 c000 0 0 4 4d0 0 0 244 c000 0 0 4 &i8259 0 0
251 245
252 /* IDSEL 0x19 */ 246 /* IDSEL 0x19 */
253 c800 0 0 1 4d0 0 0 247 c800 0 0 1 &i8259 0 0
254 c800 0 0 2 4d0 0 0 248 c800 0 0 2 &i8259 0 0
255 c800 0 0 3 4d0 0 0 249 c800 0 0 3 &i8259 0 0
256 c800 0 0 4 4d0 0 0 250 c800 0 0 4 &i8259 0 0
257 251
258 /* IDSEL 0x1a */ 252 /* IDSEL 0x1a */
259 d000 0 0 1 4d0 6 2 253 d000 0 0 1 &i8259 6 2
260 d000 0 0 2 4d0 3 2 254 d000 0 0 2 &i8259 3 2
261 d000 0 0 3 4d0 4 2 255 d000 0 0 3 &i8259 4 2
262 d000 0 0 4 4d0 5 2 256 d000 0 0 4 &i8259 5 2
263 257
264 258
265 /* IDSEL 0x1b */ 259 /* IDSEL 0x1b */
266 d800 0 0 1 4d0 5 2 260 d800 0 0 1 &i8259 5 2
267 d800 0 0 2 4d0 0 0 261 d800 0 0 2 &i8259 0 0
268 d800 0 0 3 4d0 0 0 262 d800 0 0 3 &i8259 0 0
269 d800 0 0 4 4d0 0 0 263 d800 0 0 4 &i8259 0 0
270 264
271 /* IDSEL 0x1c */ 265 /* IDSEL 0x1c */
272 e000 0 0 1 4d0 9 2 266 e000 0 0 1 &i8259 9 2
273 e000 0 0 2 4d0 a 2 267 e000 0 0 2 &i8259 a 2
274 e000 0 0 3 4d0 c 2 268 e000 0 0 3 &i8259 c 2
275 e000 0 0 4 4d0 7 2 269 e000 0 0 4 &i8259 7 2
276 270
277 /* IDSEL 0x1d */ 271 /* IDSEL 0x1d */
278 e800 0 0 1 4d0 9 2 272 e800 0 0 1 &i8259 9 2
279 e800 0 0 2 4d0 a 2 273 e800 0 0 2 &i8259 a 2
280 e800 0 0 3 4d0 b 2 274 e800 0 0 3 &i8259 b 2
281 e800 0 0 4 4d0 0 0 275 e800 0 0 4 &i8259 0 0
282 276
283 /* IDSEL 0x1e */ 277 /* IDSEL 0x1e */
284 f000 0 0 1 4d0 c 2 278 f000 0 0 1 &i8259 c 2
285 f000 0 0 2 4d0 0 0 279 f000 0 0 2 &i8259 0 0
286 f000 0 0 3 4d0 0 0 280 f000 0 0 3 &i8259 0 0
287 f000 0 0 4 4d0 0 0 281 f000 0 0 4 &i8259 0 0
288 282
289 /* IDSEL 0x1f */ 283 /* IDSEL 0x1f */
290 f800 0 0 1 4d0 6 2 284 f800 0 0 1 &i8259 6 2
291 f800 0 0 2 4d0 0 0 285 f800 0 0 2 &i8259 0 0
292 f800 0 0 3 4d0 0 0 286 f800 0 0 3 &i8259 0 0
293 f800 0 0 4 4d0 0 0 287 f800 0 0 4 &i8259 0 0
294 >; 288 >;
295 i8259@4d0 { 289 i8259: i8259@4d0 {
296 linux,phandle = <4d0>;
297 clock-frequency = <0>; 290 clock-frequency = <0>;
298 interrupt-controller; 291 interrupt-controller;
299 device_type = "interrupt-controller"; 292 device_type = "interrupt-controller";
@@ -303,12 +296,11 @@
303 compatible = "chrp,iic"; 296 compatible = "chrp,iic";
304 big-endian; 297 big-endian;
305 interrupts = <49 2>; 298 interrupts = <49 2>;
306 interrupt-parent = <40000>; 299 interrupt-parent = <&mpic>;
307 }; 300 };
308 301
309 }; 302 };
310 pic@40000 { 303 mpic: pic@40000 {
311 linux,phandle = <40000>;
312 clock-frequency = <0>; 304 clock-frequency = <0>;
313 interrupt-controller; 305 interrupt-controller;
314 #address-cells = <0>; 306 #address-cells = <0>;
@@ -317,23 +309,7 @@
317 built-in; 309 built-in;
318 compatible = "chrp,open-pic"; 310 compatible = "chrp,open-pic";
319 device_type = "open-pic"; 311 device_type = "open-pic";
320 big-endian; 312 big-endian;
321 interrupts = <
322 10 2 11 2 12 2 13 2
323 14 2 15 2 16 2 17 2
324 18 2 19 2 1a 2 1b 2
325 1c 2 1d 2 1e 2 1f 2
326 20 2 21 2 22 2 23 2
327 24 2 25 2 26 2 27 2
328 28 2 29 2 2a 2 2b 2
329 2c 2 2d 2 2e 2 2f 2
330 30 2 31 2 32 2 33 2
331 34 2 35 2 36 2 37 2
332 38 2 39 2 2a 2 3b 2
333 3c 2 3d 2 3e 2 3f 2
334 48 1 49 2 4a 1
335 >;
336 interrupt-parent = <40000>;
337 }; 313 };
338 }; 314 };
339}; 315};
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
new file mode 100644
index 000000000000..2b56b5df451a
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -0,0 +1,161 @@
1/*
2 * MPC866 ADS Device Tree Source
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/ {
14 model = "MPC866ADS";
15 compatible = "mpc8xx";
16 #address-cells = <1>;
17 #size-cells = <1>;
18 linux,phandle = <100>;
19
20 cpus {
21 #cpus = <1>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 linux,phandle = <200>;
25
26 PowerPC,866@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <20>; // 32 bytes
30 i-cache-line-size = <20>; // 32 bytes
31 d-cache-size = <2000>; // L1, 8K
32 i-cache-size = <4000>; // L1, 16K
33 timebase-frequency = <0>;
34 bus-frequency = <0>;
35 clock-frequency = <0>;
36 32-bit;
37 interrupts = <f 2>; // decrementer interrupt
38 interrupt-parent = <ff000000>;
39 linux,phandle = <201>;
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 linux,phandle = <300>;
46 reg = <00000000 800000>;
47 };
48
49 soc866@ff000000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 #interrupt-cells = <2>;
53 device_type = "soc";
54 ranges = <0 ff000000 00100000>;
55 reg = <ff000000 00000200>;
56 bus-frequency = <0>;
57 mdio@e80 {
58 device_type = "mdio";
59 compatible = "fs_enet";
60 reg = <e80 8>;
61 linux,phandle = <e80>;
62 #address-cells = <1>;
63 #size-cells = <0>;
64 ethernet-phy@f {
65 linux,phandle = <e800f>;
66 reg = <f>;
67 device_type = "ethernet-phy";
68 };
69 };
70
71 fec@e00 {
72 device_type = "network";
73 compatible = "fs_enet";
74 model = "FEC";
75 device-id = <1>;
76 reg = <e00 188>;
77 mac-address = [ 00 00 0C 00 01 FD ];
78 interrupts = <3 1>;
79 interrupt-parent = <ff000000>;
80 phy-handle = <e800f>;
81 };
82
83 pic@ff000000 {
84 linux,phandle = <ff000000>;
85 interrupt-controller;
86 #address-cells = <0>;
87 #interrupt-cells = <2>;
88 reg = <0 24>;
89 built-in;
90 device_type = "mpc8xx-pic";
91 compatible = "CPM";
92 };
93
94 cpm@ff000000 {
95 linux,phandle = <ff000000>;
96 #address-cells = <1>;
97 #size-cells = <1>;
98 #interrupt-cells = <2>;
99 device_type = "cpm";
100 model = "CPM";
101 ranges = <0 0 4000>;
102 reg = <860 f0>;
103 command-proc = <9c0>;
104 brg-frequency = <0>;
105 interrupts = <0 2>; // cpm error interrupt
106 interrupt-parent = <930>;
107
108 pic@930 {
109 linux,phandle = <930>;
110 interrupt-controller;
111 #address-cells = <0>;
112 #interrupt-cells = <2>;
113 interrupts = <5 2 0 2>;
114 interrupt-parent = <ff000000>;
115 reg = <930 20>;
116 built-in;
117 device_type = "cpm-pic";
118 compatible = "CPM";
119 };
120
121 smc@a80 {
122 device_type = "serial";
123 compatible = "cpm_uart";
124 model = "SMC";
125 device-id = <1>;
126 reg = <a80 10 3e80 40>;
127 clock-setup = <00ffffff 0>;
128 rx-clock = <1>;
129 tx-clock = <1>;
130 current-speed = <0>;
131 interrupts = <4 3>;
132 interrupt-parent = <930>;
133 };
134
135 smc@a90 {
136 device_type = "serial";
137 compatible = "cpm_uart";
138 model = "SMC";
139 device-id = <2>;
140 reg = <a90 20 3f80 40>;
141 clock-setup = <ff00ffff 90000>;
142 rx-clock = <2>;
143 tx-clock = <2>;
144 current-speed = <0>;
145 interrupts = <3 3>;
146 interrupt-parent = <930>;
147 };
148
149 scc@a00 {
150 device_type = "network";
151 compatible = "fs_enet";
152 model = "SCC";
153 device-id = <1>;
154 reg = <a00 18 3c00 80>;
155 mac-address = [ 00 00 0C 00 03 FD ];
156 interrupts = <1e 3>;
157 interrupt-parent = <930>;
158 };
159 };
160 };
161};
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
new file mode 100644
index 000000000000..faecd08c54da
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -0,0 +1,184 @@
1/*
2 * MPC885 ADS Device Tree Source
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11
12
13/ {
14 model = "MPC885ADS";
15 compatible = "mpc8xx";
16 #address-cells = <1>;
17 #size-cells = <1>;
18 linux,phandle = <100>;
19
20 cpus {
21 #cpus = <1>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24 linux,phandle = <200>;
25
26 PowerPC,885@0 {
27 device_type = "cpu";
28 reg = <0>;
29 d-cache-line-size = <20>; // 32 bytes
30 i-cache-line-size = <20>; // 32 bytes
31 d-cache-size = <2000>; // L1, 8K
32 i-cache-size = <2000>; // L1, 8K
33 timebase-frequency = <0>;
34 bus-frequency = <0>;
35 clock-frequency = <0>;
36 32-bit;
37 interrupts = <f 2>; // decrementer interrupt
38 interrupt-parent = <ff000000>;
39 linux,phandle = <201>;
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 linux,phandle = <300>;
46 reg = <00000000 800000>;
47 };
48
49 soc885@ff000000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 #interrupt-cells = <2>;
53 device_type = "soc";
54 ranges = <0 ff000000 00100000>;
55 reg = <ff000000 00000200>;
56 bus-frequency = <0>;
57 mdio@e80 {
58 device_type = "mdio";
59 compatible = "fs_enet";
60 reg = <e80 8>;
61 linux,phandle = <e80>;
62 #address-cells = <1>;
63 #size-cells = <0>;
64 ethernet-phy@0 {
65 linux,phandle = <e8000>;
66 reg = <0>;
67 device_type = "ethernet-phy";
68 };
69 ethernet-phy@1 {
70 linux,phandle = <e8001>;
71 reg = <1>;
72 device_type = "ethernet-phy";
73 };
74 ethernet-phy@2 {
75 linux,phandle = <e8002>;
76 reg = <2>;
77 device_type = "ethernet-phy";
78 };
79 };
80
81 fec@e00 {
82 device_type = "network";
83 compatible = "fs_enet";
84 model = "FEC";
85 device-id = <1>;
86 reg = <e00 188>;
87 mac-address = [ 00 00 0C 00 01 FD ];
88 interrupts = <3 1>;
89 interrupt-parent = <ff000000>;
90 phy-handle = <e8000>;
91 };
92
93 fec@1e00 {
94 device_type = "network";
95 compatible = "fs_enet";
96 model = "FEC";
97 device-id = <2>;
98 reg = <1e00 188>;
99 mac-address = [ 00 00 0C 00 02 FD ];
100 interrupts = <7 1>;
101 interrupt-parent = <ff000000>;
102 phy-handle = <e8001>;
103 };
104
105 pic@ff000000 {
106 linux,phandle = <ff000000>;
107 interrupt-controller;
108 #address-cells = <0>;
109 #interrupt-cells = <2>;
110 reg = <0 24>;
111 built-in;
112 device_type = "mpc8xx-pic";
113 compatible = "CPM";
114 };
115
116 cpm@ff000000 {
117 linux,phandle = <ff000000>;
118 #address-cells = <1>;
119 #size-cells = <1>;
120 #interrupt-cells = <2>;
121 device_type = "cpm";
122 model = "CPM";
123 ranges = <0 0 4000>;
124 reg = <860 f0>;
125 command-proc = <9c0>;
126 brg-frequency = <0>;
127 interrupts = <0 2>; // cpm error interrupt
128 interrupt-parent = <930>;
129
130 pic@930 {
131 linux,phandle = <930>;
132 interrupt-controller;
133 #address-cells = <0>;
134 #interrupt-cells = <2>;
135 interrupts = <5 2 0 2>;
136 interrupt-parent = <ff000000>;
137 reg = <930 20>;
138 built-in;
139 device_type = "cpm-pic";
140 compatible = "CPM";
141 };
142
143 smc@a80 {
144 device_type = "serial";
145 compatible = "cpm_uart";
146 model = "SMC";
147 device-id = <1>;
148 reg = <a80 10 3e80 40>;
149 clock-setup = <00ffffff 0>;
150 rx-clock = <1>;
151 tx-clock = <1>;
152 current-speed = <0>;
153 interrupts = <4 3>;
154 interrupt-parent = <930>;
155 };
156
157 smc@a90 {
158 device_type = "serial";
159 compatible = "cpm_uart";
160 model = "SMC";
161 device-id = <2>;
162 reg = <a90 20 3f80 40>;
163 clock-setup = <ff00ffff 90000>;
164 rx-clock = <2>;
165 tx-clock = <2>;
166 current-speed = <0>;
167 interrupts = <3 3>;
168 interrupt-parent = <930>;
169 };
170
171 scc@a40 {
172 device_type = "network";
173 compatible = "fs_enet";
174 model = "SCC";
175 device-id = <3>;
176 reg = <a40 18 3e00 80>;
177 mac-address = [ 00 00 0C 00 03 FD ];
178 interrupts = <1c 3>;
179 interrupt-parent = <930>;
180 phy-handle = <e8002>;
181 };
182 };
183 };
184};
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index e956548da00c..24367319ce24 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -147,6 +147,7 @@ CONFIG_PPC_RTAS=y
147# CONFIG_RTAS_ERROR_LOGGING is not set 147# CONFIG_RTAS_ERROR_LOGGING is not set
148CONFIG_RTAS_PROC=y 148CONFIG_RTAS_PROC=y
149CONFIG_RTAS_FLASH=y 149CONFIG_RTAS_FLASH=y
150CONFIG_PPC_PMI=m
150CONFIG_MMIO_NVRAM=y 151CONFIG_MMIO_NVRAM=y
151# CONFIG_PPC_MPC106 is not set 152# CONFIG_PPC_MPC106 is not set
152# CONFIG_PPC_970_NAP is not set 153# CONFIG_PPC_970_NAP is not set
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
new file mode 100644
index 000000000000..a1fe97197ead
--- /dev/null
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -0,0 +1,1408 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc4
4# Thu Jan 11 20:55:33 2007
5#
6CONFIG_PPC64=y
7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y
18CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y
21CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y
25# CONFIG_PPC_UDBG_16550 is not set
26# CONFIG_GENERIC_TBSYNC is not set
27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34# CONFIG_POWER4_ONLY is not set
35CONFIG_POWER3=y
36CONFIG_POWER4=y
37CONFIG_PPC_FPU=y
38# CONFIG_PPC_DCR_NATIVE is not set
39# CONFIG_PPC_DCR_MMIO is not set
40CONFIG_PPC_OF_PLATFORM_PCI=y
41CONFIG_ALTIVEC=y
42CONFIG_PPC_STD_MMU=y
43CONFIG_VIRT_CPU_ACCOUNTING=y
44CONFIG_SMP=y
45CONFIG_NR_CPUS=4
46CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
47
48#
49# Code maturity level options
50#
51CONFIG_EXPERIMENTAL=y
52CONFIG_LOCK_KERNEL=y
53CONFIG_INIT_ENV_ARG_LIMIT=32
54
55#
56# General setup
57#
58CONFIG_LOCALVERSION=""
59CONFIG_LOCALVERSION_AUTO=y
60CONFIG_SWAP=y
61CONFIG_SYSVIPC=y
62# CONFIG_IPC_NS is not set
63# CONFIG_POSIX_MQUEUE is not set
64# CONFIG_BSD_PROCESS_ACCT is not set
65# CONFIG_TASKSTATS is not set
66# CONFIG_UTS_NS is not set
67# CONFIG_AUDIT is not set
68CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y
70# CONFIG_CPUSETS is not set
71CONFIG_SYSFS_DEPRECATED=y
72# CONFIG_RELAY is not set
73CONFIG_INITRAMFS_SOURCE=""
74CONFIG_CC_OPTIMIZE_FOR_SIZE=y
75CONFIG_SYSCTL=y
76# CONFIG_EMBEDDED is not set
77CONFIG_SYSCTL_SYSCALL=y
78CONFIG_KALLSYMS=y
79# CONFIG_KALLSYMS_ALL is not set
80# CONFIG_KALLSYMS_EXTRA_PASS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87CONFIG_EPOLL=y
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102CONFIG_MODVERSIONS=y
103CONFIG_MODULE_SRCVERSION_ALL=y
104CONFIG_KMOD=y
105CONFIG_STOP_MACHINE=y
106
107#
108# Block layer
109#
110CONFIG_BLOCK=y
111# CONFIG_BLK_DEV_IO_TRACE is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125
126#
127# Platform support
128#
129CONFIG_PPC_MULTIPLATFORM=y
130# CONFIG_EMBEDDED6xx is not set
131# CONFIG_APUS is not set
132# CONFIG_PPC_PSERIES is not set
133# CONFIG_PPC_ISERIES is not set
134# CONFIG_PPC_MPC52xx is not set
135# CONFIG_PPC_PMAC is not set
136# CONFIG_PPC_MAPLE is not set
137# CONFIG_PPC_PASEMI is not set
138CONFIG_PPC_CELL=y
139# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PPC_IBM_CELL_BLADE is not set
141# CONFIG_PPC_PS3 is not set
142CONFIG_PPC_CELLEB=y
143CONFIG_PPC_UDBG_BEAT=y
144# CONFIG_U3_DART is not set
145# CONFIG_PPC_RTAS is not set
146# CONFIG_MMIO_NVRAM is not set
147# CONFIG_PPC_MPC106 is not set
148# CONFIG_PPC_970_NAP is not set
149# CONFIG_PPC_INDIRECT_IO is not set
150# CONFIG_GENERIC_IOMAP is not set
151# CONFIG_CPU_FREQ is not set
152# CONFIG_WANT_EARLY_SERIAL is not set
153# CONFIG_MPIC is not set
154
155#
156# Cell Broadband Engine options
157#
158CONFIG_SPU_FS=y
159CONFIG_SPU_BASE=y
160# CONFIG_CBE_RAS is not set
161
162#
163# Kernel options
164#
165# CONFIG_HZ_100 is not set
166CONFIG_HZ_250=y
167# CONFIG_HZ_300 is not set
168# CONFIG_HZ_1000 is not set
169CONFIG_HZ=250
170CONFIG_PREEMPT_NONE=y
171# CONFIG_PREEMPT_VOLUNTARY is not set
172# CONFIG_PREEMPT is not set
173CONFIG_PREEMPT_BKL=y
174CONFIG_BINFMT_ELF=y
175CONFIG_BINFMT_MISC=m
176CONFIG_FORCE_MAX_ZONEORDER=13
177# CONFIG_IOMMU_VMERGE is not set
178CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
179CONFIG_KEXEC=y
180# CONFIG_CRASH_DUMP is not set
181# CONFIG_IRQ_ALL_CPUS is not set
182CONFIG_NUMA=y
183CONFIG_NODES_SHIFT=4
184CONFIG_ARCH_SELECT_MEMORY_MODEL=y
185CONFIG_ARCH_SPARSEMEM_ENABLE=y
186CONFIG_ARCH_SPARSEMEM_DEFAULT=y
187CONFIG_ARCH_POPULATES_NODE_MAP=y
188CONFIG_SELECT_MEMORY_MODEL=y
189# CONFIG_FLATMEM_MANUAL is not set
190# CONFIG_DISCONTIGMEM_MANUAL is not set
191CONFIG_SPARSEMEM_MANUAL=y
192CONFIG_SPARSEMEM=y
193CONFIG_NEED_MULTIPLE_NODES=y
194CONFIG_HAVE_MEMORY_PRESENT=y
195# CONFIG_SPARSEMEM_STATIC is not set
196CONFIG_SPARSEMEM_EXTREME=y
197CONFIG_MEMORY_HOTPLUG=y
198CONFIG_MEMORY_HOTPLUG_SPARSE=y
199CONFIG_SPLIT_PTLOCK_CPUS=4
200CONFIG_MIGRATION=y
201CONFIG_RESOURCES_64BIT=y
202CONFIG_ARCH_MEMORY_PROBE=y
203CONFIG_NODES_SPAN_OTHER_NODES=y
204# CONFIG_PPC_64K_PAGES is not set
205# CONFIG_SCHED_SMT is not set
206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set
209CONFIG_SECCOMP=y
210CONFIG_ISA_DMA_API=y
211
212#
213# Bus options
214#
215CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217# CONFIG_PPC_I8259 is not set
218# CONFIG_PPC_INDIRECT_PCI is not set
219CONFIG_PCI=y
220CONFIG_PCI_DOMAINS=y
221# CONFIG_PCIEPORTBUS is not set
222# CONFIG_PCI_DEBUG is not set
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227# CONFIG_PCCARD is not set
228
229#
230# PCI Hotplug Support
231#
232# CONFIG_HOTPLUG_PCI is not set
233CONFIG_KERNEL_START=0xc000000000000000
234
235#
236# Networking
237#
238CONFIG_NET=y
239
240#
241# Networking options
242#
243# CONFIG_NETDEBUG is not set
244CONFIG_PACKET=y
245# CONFIG_PACKET_MMAP is not set
246CONFIG_UNIX=y
247CONFIG_XFRM=y
248# CONFIG_XFRM_USER is not set
249# CONFIG_XFRM_SUB_POLICY is not set
250# CONFIG_NET_KEY is not set
251CONFIG_INET=y
252CONFIG_IP_MULTICAST=y
253# CONFIG_IP_ADVANCED_ROUTER is not set
254CONFIG_IP_FIB_HASH=y
255# CONFIG_IP_PNP is not set
256# CONFIG_NET_IPIP is not set
257# CONFIG_NET_IPGRE is not set
258# CONFIG_IP_MROUTE is not set
259# CONFIG_ARPD is not set
260CONFIG_SYN_COOKIES=y
261# CONFIG_INET_AH is not set
262# CONFIG_INET_ESP is not set
263# CONFIG_INET_IPCOMP is not set
264# CONFIG_INET_XFRM_TUNNEL is not set
265# CONFIG_INET_TUNNEL is not set
266CONFIG_INET_XFRM_MODE_TRANSPORT=y
267CONFIG_INET_XFRM_MODE_TUNNEL=y
268CONFIG_INET_XFRM_MODE_BEET=y
269CONFIG_INET_DIAG=y
270CONFIG_INET_TCP_DIAG=y
271# CONFIG_TCP_CONG_ADVANCED is not set
272CONFIG_TCP_CONG_CUBIC=y
273CONFIG_DEFAULT_TCP_CONG="cubic"
274# CONFIG_TCP_MD5SIG is not set
275
276#
277# IP: Virtual Server Configuration
278#
279# CONFIG_IP_VS is not set
280CONFIG_IPV6=y
281# CONFIG_IPV6_PRIVACY is not set
282# CONFIG_IPV6_ROUTER_PREF is not set
283CONFIG_INET6_AH=m
284CONFIG_INET6_ESP=m
285CONFIG_INET6_IPCOMP=m
286# CONFIG_IPV6_MIP6 is not set
287CONFIG_INET6_XFRM_TUNNEL=m
288CONFIG_INET6_TUNNEL=m
289CONFIG_INET6_XFRM_MODE_TRANSPORT=y
290CONFIG_INET6_XFRM_MODE_TUNNEL=y
291CONFIG_INET6_XFRM_MODE_BEET=y
292# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
293CONFIG_IPV6_SIT=y
294CONFIG_IPV6_TUNNEL=m
295# CONFIG_IPV6_MULTIPLE_TABLES is not set
296# CONFIG_NETWORK_SECMARK is not set
297CONFIG_NETFILTER=y
298# CONFIG_NETFILTER_DEBUG is not set
299
300#
301# Core Netfilter Configuration
302#
303# CONFIG_NETFILTER_NETLINK is not set
304# CONFIG_NF_CONNTRACK_ENABLED is not set
305# CONFIG_NETFILTER_XTABLES is not set
306
307#
308# IP: Netfilter Configuration
309#
310CONFIG_IP_NF_QUEUE=m
311
312#
313# IPv6: Netfilter Configuration (EXPERIMENTAL)
314#
315# CONFIG_IP6_NF_QUEUE is not set
316
317#
318# DCCP Configuration (EXPERIMENTAL)
319#
320# CONFIG_IP_DCCP is not set
321
322#
323# SCTP Configuration (EXPERIMENTAL)
324#
325# CONFIG_IP_SCTP is not set
326
327#
328# TIPC Configuration (EXPERIMENTAL)
329#
330# CONFIG_TIPC is not set
331# CONFIG_ATM is not set
332# CONFIG_BRIDGE is not set
333# CONFIG_VLAN_8021Q is not set
334# CONFIG_DECNET is not set
335# CONFIG_LLC2 is not set
336# CONFIG_IPX is not set
337# CONFIG_ATALK is not set
338# CONFIG_X25 is not set
339# CONFIG_LAPB is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347
348#
349# Network testing
350#
351# CONFIG_NET_PKTGEN is not set
352# CONFIG_HAMRADIO is not set
353# CONFIG_IRDA is not set
354# CONFIG_BT is not set
355# CONFIG_IEEE80211 is not set
356
357#
358# Device Drivers
359#
360
361#
362# Generic Driver Options
363#
364CONFIG_STANDALONE=y
365CONFIG_PREVENT_FIRMWARE_BUILD=y
366CONFIG_FW_LOADER=y
367# CONFIG_DEBUG_DRIVER is not set
368# CONFIG_SYS_HYPERVISOR is not set
369
370#
371# Connector - unified userspace <-> kernelspace linker
372#
373# CONFIG_CONNECTOR is not set
374
375#
376# Memory Technology Devices (MTD)
377#
378# CONFIG_MTD is not set
379
380#
381# Parallel port support
382#
383# CONFIG_PARPORT is not set
384
385#
386# Plug and Play support
387#
388
389#
390# Block devices
391#
392# CONFIG_BLK_DEV_FD is not set
393# CONFIG_BLK_CPQ_DA is not set
394# CONFIG_BLK_CPQ_CISS_DA is not set
395# CONFIG_BLK_DEV_DAC960 is not set
396# CONFIG_BLK_DEV_UMEM is not set
397# CONFIG_BLK_DEV_COW_COMMON is not set
398CONFIG_BLK_DEV_LOOP=y
399# CONFIG_BLK_DEV_CRYPTOLOOP is not set
400# CONFIG_BLK_DEV_NBD is not set
401# CONFIG_BLK_DEV_SX8 is not set
402# CONFIG_BLK_DEV_UB is not set
403CONFIG_BLK_DEV_RAM=y
404CONFIG_BLK_DEV_RAM_COUNT=16
405CONFIG_BLK_DEV_RAM_SIZE=131072
406CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
407CONFIG_BLK_DEV_INITRD=y
408# CONFIG_CDROM_PKTCDVD is not set
409# CONFIG_ATA_OVER_ETH is not set
410
411#
412# Misc devices
413#
414# CONFIG_SGI_IOC4 is not set
415# CONFIG_TIFM_CORE is not set
416
417#
418# ATA/ATAPI/MFM/RLL support
419#
420CONFIG_IDE=y
421CONFIG_BLK_DEV_IDE=y
422
423#
424# Please see Documentation/ide.txt for help/info on IDE drives
425#
426# CONFIG_BLK_DEV_IDE_SATA is not set
427CONFIG_BLK_DEV_IDEDISK=y
428CONFIG_IDEDISK_MULTI_MODE=y
429CONFIG_BLK_DEV_IDECD=m
430# CONFIG_BLK_DEV_IDETAPE is not set
431# CONFIG_BLK_DEV_IDEFLOPPY is not set
432# CONFIG_BLK_DEV_IDESCSI is not set
433# CONFIG_IDE_TASK_IOCTL is not set
434
435#
436# IDE chipset support/bugfixes
437#
438CONFIG_IDE_GENERIC=y
439CONFIG_BLK_DEV_IDEPCI=y
440CONFIG_IDEPCI_SHARE_IRQ=y
441# CONFIG_BLK_DEV_OFFBOARD is not set
442CONFIG_BLK_DEV_GENERIC=y
443# CONFIG_BLK_DEV_OPTI621 is not set
444CONFIG_BLK_DEV_IDEDMA_PCI=y
445# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
446CONFIG_IDEDMA_PCI_AUTO=y
447# CONFIG_IDEDMA_ONLYDISK is not set
448# CONFIG_BLK_DEV_AEC62XX is not set
449# CONFIG_BLK_DEV_ALI15X3 is not set
450# CONFIG_BLK_DEV_AMD74XX is not set
451# CONFIG_BLK_DEV_CMD64X is not set
452# CONFIG_BLK_DEV_TRIFLEX is not set
453# CONFIG_BLK_DEV_CY82C693 is not set
454# CONFIG_BLK_DEV_CS5520 is not set
455# CONFIG_BLK_DEV_CS5530 is not set
456# CONFIG_BLK_DEV_HPT34X is not set
457# CONFIG_BLK_DEV_HPT366 is not set
458# CONFIG_BLK_DEV_JMICRON is not set
459# CONFIG_BLK_DEV_SC1200 is not set
460# CONFIG_BLK_DEV_PIIX is not set
461# CONFIG_BLK_DEV_IT821X is not set
462# CONFIG_BLK_DEV_NS87415 is not set
463# CONFIG_BLK_DEV_PDC202XX_OLD is not set
464# CONFIG_BLK_DEV_PDC202XX_NEW is not set
465# CONFIG_BLK_DEV_SVWKS is not set
466# CONFIG_BLK_DEV_SIIMAGE is not set
467# CONFIG_BLK_DEV_SL82C105 is not set
468# CONFIG_BLK_DEV_SLC90E66 is not set
469# CONFIG_BLK_DEV_TRM290 is not set
470# CONFIG_BLK_DEV_VIA82CXXX is not set
471CONFIG_BLK_DEV_IDE_CELLEB=y
472# CONFIG_IDE_ARM is not set
473CONFIG_BLK_DEV_IDEDMA=y
474# CONFIG_IDEDMA_IVB is not set
475CONFIG_IDEDMA_AUTO=y
476# CONFIG_BLK_DEV_HD is not set
477
478#
479# SCSI device support
480#
481# CONFIG_RAID_ATTRS is not set
482CONFIG_SCSI=m
483# CONFIG_SCSI_TGT is not set
484# CONFIG_SCSI_NETLINK is not set
485# CONFIG_SCSI_PROC_FS is not set
486
487#
488# SCSI support type (disk, tape, CD-ROM)
489#
490CONFIG_BLK_DEV_SD=m
491# CONFIG_CHR_DEV_ST is not set
492# CONFIG_CHR_DEV_OSST is not set
493CONFIG_BLK_DEV_SR=m
494# CONFIG_BLK_DEV_SR_VENDOR is not set
495CONFIG_CHR_DEV_SG=m
496# CONFIG_CHR_DEV_SCH is not set
497
498#
499# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
500#
501CONFIG_SCSI_MULTI_LUN=y
502# CONFIG_SCSI_CONSTANTS is not set
503# CONFIG_SCSI_LOGGING is not set
504# CONFIG_SCSI_SCAN_ASYNC is not set
505
506#
507# SCSI Transports
508#
509# CONFIG_SCSI_SPI_ATTRS is not set
510# CONFIG_SCSI_FC_ATTRS is not set
511# CONFIG_SCSI_ISCSI_ATTRS is not set
512# CONFIG_SCSI_SAS_ATTRS is not set
513# CONFIG_SCSI_SAS_LIBSAS is not set
514
515#
516# SCSI low-level drivers
517#
518# CONFIG_ISCSI_TCP is not set
519# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
520# CONFIG_SCSI_3W_9XXX is not set
521# CONFIG_SCSI_ACARD is not set
522# CONFIG_SCSI_AACRAID is not set
523# CONFIG_SCSI_AIC7XXX is not set
524# CONFIG_SCSI_AIC7XXX_OLD is not set
525# CONFIG_SCSI_AIC79XX is not set
526# CONFIG_SCSI_AIC94XX is not set
527# CONFIG_SCSI_ARCMSR is not set
528# CONFIG_MEGARAID_NEWGEN is not set
529# CONFIG_MEGARAID_LEGACY is not set
530# CONFIG_MEGARAID_SAS is not set
531# CONFIG_SCSI_HPTIOP is not set
532# CONFIG_SCSI_BUSLOGIC is not set
533# CONFIG_SCSI_DMX3191D is not set
534# CONFIG_SCSI_EATA is not set
535# CONFIG_SCSI_FUTURE_DOMAIN is not set
536# CONFIG_SCSI_GDTH is not set
537# CONFIG_SCSI_IPS is not set
538# CONFIG_SCSI_INITIO is not set
539# CONFIG_SCSI_INIA100 is not set
540# CONFIG_SCSI_STEX is not set
541# CONFIG_SCSI_SYM53C8XX_2 is not set
542# CONFIG_SCSI_QLOGIC_1280 is not set
543# CONFIG_SCSI_QLA_FC is not set
544# CONFIG_SCSI_QLA_ISCSI is not set
545# CONFIG_SCSI_LPFC is not set
546# CONFIG_SCSI_DC395x is not set
547# CONFIG_SCSI_DC390T is not set
548# CONFIG_SCSI_DEBUG is not set
549# CONFIG_SCSI_SRP is not set
550
551#
552# Serial ATA (prod) and Parallel ATA (experimental) drivers
553#
554# CONFIG_ATA is not set
555
556#
557# Multi-device support (RAID and LVM)
558#
559CONFIG_MD=y
560CONFIG_BLK_DEV_MD=m
561CONFIG_MD_LINEAR=m
562CONFIG_MD_RAID0=m
563CONFIG_MD_RAID1=m
564# CONFIG_MD_RAID10 is not set
565# CONFIG_MD_RAID456 is not set
566# CONFIG_MD_MULTIPATH is not set
567# CONFIG_MD_FAULTY is not set
568CONFIG_BLK_DEV_DM=m
569# CONFIG_DM_DEBUG is not set
570CONFIG_DM_CRYPT=m
571CONFIG_DM_SNAPSHOT=m
572CONFIG_DM_MIRROR=m
573CONFIG_DM_ZERO=m
574CONFIG_DM_MULTIPATH=m
575# CONFIG_DM_MULTIPATH_EMC is not set
576
577#
578# Fusion MPT device support
579#
580# CONFIG_FUSION is not set
581# CONFIG_FUSION_SPI is not set
582# CONFIG_FUSION_FC is not set
583# CONFIG_FUSION_SAS is not set
584
585#
586# IEEE 1394 (FireWire) support
587#
588# CONFIG_IEEE1394 is not set
589
590#
591# I2O device support
592#
593# CONFIG_I2O is not set
594
595#
596# Macintosh device drivers
597#
598# CONFIG_MAC_EMUMOUSEBTN is not set
599# CONFIG_WINDFARM is not set
600
601#
602# Network device support
603#
604CONFIG_NETDEVICES=y
605# CONFIG_DUMMY is not set
606# CONFIG_BONDING is not set
607# CONFIG_EQUALIZER is not set
608# CONFIG_TUN is not set
609
610#
611# ARCnet devices
612#
613# CONFIG_ARCNET is not set
614
615#
616# PHY device support
617#
618# CONFIG_PHYLIB is not set
619
620#
621# Ethernet (10 or 100Mbit)
622#
623CONFIG_NET_ETHERNET=y
624CONFIG_MII=y
625# CONFIG_HAPPYMEAL is not set
626# CONFIG_SUNGEM is not set
627# CONFIG_CASSINI is not set
628# CONFIG_NET_VENDOR_3COM is not set
629
630#
631# Tulip family network device support
632#
633# CONFIG_NET_TULIP is not set
634# CONFIG_HP100 is not set
635# CONFIG_NET_PCI is not set
636
637#
638# Ethernet (1000 Mbit)
639#
640# CONFIG_ACENIC is not set
641# CONFIG_DL2K is not set
642# CONFIG_E1000 is not set
643# CONFIG_NS83820 is not set
644# CONFIG_HAMACHI is not set
645# CONFIG_YELLOWFIN is not set
646# CONFIG_R8169 is not set
647# CONFIG_SIS190 is not set
648# CONFIG_SKGE is not set
649# CONFIG_SKY2 is not set
650# CONFIG_SK98LIN is not set
651# CONFIG_TIGON3 is not set
652# CONFIG_BNX2 is not set
653CONFIG_SPIDER_NET=y
654# CONFIG_QLA3XXX is not set
655
656#
657# Ethernet (10000 Mbit)
658#
659# CONFIG_CHELSIO_T1 is not set
660# CONFIG_IXGB is not set
661# CONFIG_S2IO is not set
662# CONFIG_MYRI10GE is not set
663# CONFIG_NETXEN_NIC is not set
664
665#
666# Token Ring devices
667#
668# CONFIG_TR is not set
669
670#
671# Wireless LAN (non-hamradio)
672#
673# CONFIG_NET_RADIO is not set
674
675#
676# Wan interfaces
677#
678# CONFIG_WAN is not set
679# CONFIG_FDDI is not set
680# CONFIG_HIPPI is not set
681# CONFIG_PPP is not set
682# CONFIG_SLIP is not set
683# CONFIG_NET_FC is not set
684# CONFIG_SHAPER is not set
685# CONFIG_NETCONSOLE is not set
686# CONFIG_NETPOLL is not set
687# CONFIG_NET_POLL_CONTROLLER is not set
688
689#
690# ISDN subsystem
691#
692# CONFIG_ISDN is not set
693
694#
695# Telephony Support
696#
697# CONFIG_PHONE is not set
698
699#
700# Input device support
701#
702CONFIG_INPUT=y
703# CONFIG_INPUT_FF_MEMLESS is not set
704
705#
706# Userland interfaces
707#
708CONFIG_INPUT_MOUSEDEV=y
709# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
710CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
711CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
712# CONFIG_INPUT_JOYDEV is not set
713# CONFIG_INPUT_TSDEV is not set
714# CONFIG_INPUT_EVDEV is not set
715# CONFIG_INPUT_EVBUG is not set
716
717#
718# Input Device Drivers
719#
720# CONFIG_INPUT_KEYBOARD is not set
721# CONFIG_INPUT_MOUSE is not set
722# CONFIG_INPUT_JOYSTICK is not set
723# CONFIG_INPUT_TOUCHSCREEN is not set
724# CONFIG_INPUT_MISC is not set
725
726#
727# Hardware I/O ports
728#
729CONFIG_SERIO=y
730# CONFIG_SERIO_I8042 is not set
731CONFIG_SERIO_SERPORT=y
732# CONFIG_SERIO_PCIPS2 is not set
733# CONFIG_SERIO_RAW is not set
734# CONFIG_GAMEPORT is not set
735
736#
737# Character devices
738#
739CONFIG_VT=y
740CONFIG_VT_CONSOLE=y
741CONFIG_HW_CONSOLE=y
742# CONFIG_VT_HW_CONSOLE_BINDING is not set
743CONFIG_SERIAL_NONSTANDARD=y
744# CONFIG_COMPUTONE is not set
745# CONFIG_ROCKETPORT is not set
746# CONFIG_CYCLADES is not set
747# CONFIG_DIGIEPCA is not set
748# CONFIG_MOXA_INTELLIO is not set
749# CONFIG_MOXA_SMARTIO is not set
750# CONFIG_MOXA_SMARTIO_NEW is not set
751# CONFIG_ISI is not set
752# CONFIG_SYNCLINK is not set
753# CONFIG_SYNCLINKMP is not set
754# CONFIG_SYNCLINK_GT is not set
755# CONFIG_N_HDLC is not set
756# CONFIG_SPECIALIX is not set
757# CONFIG_SX is not set
758# CONFIG_RIO is not set
759# CONFIG_STALDRV is not set
760
761#
762# Serial drivers
763#
764# CONFIG_SERIAL_8250 is not set
765
766#
767# Non-8250 serial port support
768#
769CONFIG_SERIAL_CORE=y
770CONFIG_SERIAL_CORE_CONSOLE=y
771CONFIG_SERIAL_TXX9=y
772CONFIG_HAS_TXX9_SERIAL=y
773CONFIG_SERIAL_TXX9_CONSOLE=y
774# CONFIG_SERIAL_TXX9_STDSERIAL is not set
775# CONFIG_SERIAL_JSM is not set
776CONFIG_UNIX98_PTYS=y
777# CONFIG_LEGACY_PTYS is not set
778CONFIG_HVC_DRIVER=y
779CONFIG_HVC_BEAT=y
780
781#
782# IPMI
783#
784# CONFIG_IPMI_HANDLER is not set
785
786#
787# Watchdog Cards
788#
789CONFIG_WATCHDOG=y
790# CONFIG_WATCHDOG_NOWAYOUT is not set
791
792#
793# Watchdog Device Drivers
794#
795# CONFIG_SOFT_WATCHDOG is not set
796
797#
798# PCI-based Watchdog Cards
799#
800# CONFIG_PCIPCWATCHDOG is not set
801# CONFIG_WDTPCI is not set
802
803#
804# USB-based Watchdog Cards
805#
806# CONFIG_USBPCWATCHDOG is not set
807# CONFIG_HW_RANDOM is not set
808CONFIG_GEN_RTC=y
809# CONFIG_GEN_RTC_X is not set
810# CONFIG_DTLK is not set
811# CONFIG_R3964 is not set
812# CONFIG_APPLICOM is not set
813# CONFIG_AGP is not set
814# CONFIG_DRM is not set
815# CONFIG_RAW_DRIVER is not set
816# CONFIG_HANGCHECK_TIMER is not set
817
818#
819# TPM devices
820#
821# CONFIG_TCG_TPM is not set
822
823#
824# I2C support
825#
826CONFIG_I2C=y
827# CONFIG_I2C_CHARDEV is not set
828
829#
830# I2C Algorithms
831#
832CONFIG_I2C_ALGOBIT=y
833# CONFIG_I2C_ALGOPCF is not set
834# CONFIG_I2C_ALGOPCA is not set
835
836#
837# I2C Hardware Bus support
838#
839# CONFIG_I2C_ALI1535 is not set
840# CONFIG_I2C_ALI1563 is not set
841# CONFIG_I2C_ALI15X3 is not set
842# CONFIG_I2C_AMD756 is not set
843# CONFIG_I2C_AMD8111 is not set
844# CONFIG_I2C_I801 is not set
845# CONFIG_I2C_I810 is not set
846# CONFIG_I2C_PIIX4 is not set
847# CONFIG_I2C_NFORCE2 is not set
848# CONFIG_I2C_OCORES is not set
849# CONFIG_I2C_PARPORT_LIGHT is not set
850# CONFIG_I2C_PROSAVAGE is not set
851# CONFIG_I2C_SAVAGE4 is not set
852# CONFIG_I2C_SIS5595 is not set
853# CONFIG_I2C_SIS630 is not set
854# CONFIG_I2C_SIS96X is not set
855# CONFIG_I2C_STUB is not set
856# CONFIG_I2C_VIA is not set
857# CONFIG_I2C_VIAPRO is not set
858# CONFIG_I2C_VOODOO3 is not set
859# CONFIG_I2C_PCA_ISA is not set
860
861#
862# Miscellaneous I2C Chip support
863#
864# CONFIG_SENSORS_DS1337 is not set
865# CONFIG_SENSORS_DS1374 is not set
866# CONFIG_SENSORS_EEPROM is not set
867# CONFIG_SENSORS_PCF8574 is not set
868# CONFIG_SENSORS_PCA9539 is not set
869# CONFIG_SENSORS_PCF8591 is not set
870# CONFIG_SENSORS_MAX6875 is not set
871# CONFIG_I2C_DEBUG_CORE is not set
872# CONFIG_I2C_DEBUG_ALGO is not set
873# CONFIG_I2C_DEBUG_BUS is not set
874# CONFIG_I2C_DEBUG_CHIP is not set
875
876#
877# SPI support
878#
879# CONFIG_SPI is not set
880# CONFIG_SPI_MASTER is not set
881
882#
883# Dallas's 1-wire bus
884#
885# CONFIG_W1 is not set
886
887#
888# Hardware Monitoring support
889#
890# CONFIG_HWMON is not set
891# CONFIG_HWMON_VID is not set
892
893#
894# Multimedia devices
895#
896# CONFIG_VIDEO_DEV is not set
897
898#
899# Digital Video Broadcasting Devices
900#
901# CONFIG_DVB is not set
902# CONFIG_USB_DABUSB is not set
903
904#
905# Graphics support
906#
907# CONFIG_FIRMWARE_EDID is not set
908# CONFIG_FB is not set
909# CONFIG_FB_IBM_GXT4500 is not set
910
911#
912# Console display driver support
913#
914# CONFIG_VGA_CONSOLE is not set
915CONFIG_DUMMY_CONSOLE=y
916# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
917
918#
919# Sound
920#
921# CONFIG_SOUND is not set
922
923#
924# HID Devices
925#
926CONFIG_HID=y
927
928#
929# USB support
930#
931CONFIG_USB_ARCH_HAS_HCD=y
932CONFIG_USB_ARCH_HAS_OHCI=y
933CONFIG_USB_ARCH_HAS_EHCI=y
934CONFIG_USB=y
935# CONFIG_USB_DEBUG is not set
936
937#
938# Miscellaneous USB options
939#
940CONFIG_USB_DEVICEFS=y
941# CONFIG_USB_BANDWIDTH is not set
942# CONFIG_USB_DYNAMIC_MINORS is not set
943# CONFIG_USB_MULTITHREAD_PROBE is not set
944# CONFIG_USB_OTG is not set
945
946#
947# USB Host Controller Drivers
948#
949CONFIG_USB_EHCI_HCD=m
950# CONFIG_USB_EHCI_SPLIT_ISO is not set
951# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
952# CONFIG_USB_EHCI_TT_NEWSCHED is not set
953CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
954# CONFIG_USB_ISP116X_HCD is not set
955CONFIG_USB_OHCI_HCD=m
956# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
957CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
958CONFIG_USB_OHCI_LITTLE_ENDIAN=y
959# CONFIG_USB_UHCI_HCD is not set
960# CONFIG_USB_SL811_HCD is not set
961
962#
963# USB Device Class drivers
964#
965# CONFIG_USB_ACM is not set
966# CONFIG_USB_PRINTER is not set
967
968#
969# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
970#
971
972#
973# may also be needed; see USB_STORAGE Help for more information
974#
975CONFIG_USB_STORAGE=m
976# CONFIG_USB_STORAGE_DEBUG is not set
977# CONFIG_USB_STORAGE_DATAFAB is not set
978# CONFIG_USB_STORAGE_FREECOM is not set
979# CONFIG_USB_STORAGE_ISD200 is not set
980# CONFIG_USB_STORAGE_DPCM is not set
981# CONFIG_USB_STORAGE_USBAT is not set
982# CONFIG_USB_STORAGE_SDDR09 is not set
983# CONFIG_USB_STORAGE_SDDR55 is not set
984# CONFIG_USB_STORAGE_JUMPSHOT is not set
985# CONFIG_USB_STORAGE_ALAUDA is not set
986# CONFIG_USB_STORAGE_KARMA is not set
987# CONFIG_USB_LIBUSUAL is not set
988
989#
990# USB Input Devices
991#
992CONFIG_USB_HID=y
993# CONFIG_USB_HIDINPUT_POWERBOOK is not set
994# CONFIG_HID_FF is not set
995CONFIG_USB_HIDDEV=y
996# CONFIG_USB_AIPTEK is not set
997# CONFIG_USB_WACOM is not set
998# CONFIG_USB_ACECAD is not set
999# CONFIG_USB_KBTAB is not set
1000# CONFIG_USB_POWERMATE is not set
1001# CONFIG_USB_TOUCHSCREEN is not set
1002# CONFIG_USB_YEALINK is not set
1003# CONFIG_USB_XPAD is not set
1004# CONFIG_USB_ATI_REMOTE is not set
1005# CONFIG_USB_ATI_REMOTE2 is not set
1006# CONFIG_USB_KEYSPAN_REMOTE is not set
1007# CONFIG_USB_APPLETOUCH is not set
1008
1009#
1010# USB Imaging devices
1011#
1012# CONFIG_USB_MDC800 is not set
1013# CONFIG_USB_MICROTEK is not set
1014
1015#
1016# USB Network Adapters
1017#
1018# CONFIG_USB_CATC is not set
1019# CONFIG_USB_KAWETH is not set
1020# CONFIG_USB_PEGASUS is not set
1021# CONFIG_USB_RTL8150 is not set
1022# CONFIG_USB_USBNET_MII is not set
1023# CONFIG_USB_USBNET is not set
1024CONFIG_USB_MON=y
1025
1026#
1027# USB port drivers
1028#
1029
1030#
1031# USB Serial Converter support
1032#
1033# CONFIG_USB_SERIAL is not set
1034
1035#
1036# USB Miscellaneous drivers
1037#
1038# CONFIG_USB_EMI62 is not set
1039# CONFIG_USB_EMI26 is not set
1040# CONFIG_USB_ADUTUX is not set
1041# CONFIG_USB_AUERSWALD is not set
1042# CONFIG_USB_RIO500 is not set
1043# CONFIG_USB_LEGOTOWER is not set
1044# CONFIG_USB_LCD is not set
1045# CONFIG_USB_LED is not set
1046# CONFIG_USB_CYPRESS_CY7C63 is not set
1047# CONFIG_USB_CYTHERM is not set
1048# CONFIG_USB_PHIDGET is not set
1049# CONFIG_USB_IDMOUSE is not set
1050# CONFIG_USB_FTDI_ELAN is not set
1051# CONFIG_USB_APPLEDISPLAY is not set
1052# CONFIG_USB_SISUSBVGA is not set
1053# CONFIG_USB_LD is not set
1054# CONFIG_USB_TRANCEVIBRATOR is not set
1055# CONFIG_USB_TEST is not set
1056
1057#
1058# USB DSL modem support
1059#
1060
1061#
1062# USB Gadget Support
1063#
1064# CONFIG_USB_GADGET is not set
1065
1066#
1067# MMC/SD Card support
1068#
1069# CONFIG_MMC is not set
1070
1071#
1072# LED devices
1073#
1074# CONFIG_NEW_LEDS is not set
1075
1076#
1077# LED drivers
1078#
1079
1080#
1081# LED Triggers
1082#
1083
1084#
1085# InfiniBand support
1086#
1087# CONFIG_INFINIBAND is not set
1088
1089#
1090# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1091#
1092
1093#
1094# Real Time Clock
1095#
1096# CONFIG_RTC_CLASS is not set
1097
1098#
1099# DMA Engine support
1100#
1101# CONFIG_DMA_ENGINE is not set
1102
1103#
1104# DMA Clients
1105#
1106
1107#
1108# DMA Devices
1109#
1110
1111#
1112# Virtualization
1113#
1114
1115#
1116# File systems
1117#
1118CONFIG_EXT2_FS=y
1119CONFIG_EXT2_FS_XATTR=y
1120CONFIG_EXT2_FS_POSIX_ACL=y
1121CONFIG_EXT2_FS_SECURITY=y
1122CONFIG_EXT2_FS_XIP=y
1123CONFIG_FS_XIP=y
1124CONFIG_EXT3_FS=y
1125CONFIG_EXT3_FS_XATTR=y
1126CONFIG_EXT3_FS_POSIX_ACL=y
1127CONFIG_EXT3_FS_SECURITY=y
1128# CONFIG_EXT4DEV_FS is not set
1129CONFIG_JBD=y
1130# CONFIG_JBD_DEBUG is not set
1131CONFIG_FS_MBCACHE=y
1132# CONFIG_REISERFS_FS is not set
1133# CONFIG_JFS_FS is not set
1134CONFIG_FS_POSIX_ACL=y
1135# CONFIG_XFS_FS is not set
1136# CONFIG_GFS2_FS is not set
1137# CONFIG_OCFS2_FS is not set
1138# CONFIG_MINIX_FS is not set
1139# CONFIG_ROMFS_FS is not set
1140CONFIG_INOTIFY=y
1141CONFIG_INOTIFY_USER=y
1142# CONFIG_QUOTA is not set
1143CONFIG_DNOTIFY=y
1144# CONFIG_AUTOFS_FS is not set
1145# CONFIG_AUTOFS4_FS is not set
1146# CONFIG_FUSE_FS is not set
1147
1148#
1149# CD-ROM/DVD Filesystems
1150#
1151CONFIG_ISO9660_FS=m
1152CONFIG_JOLIET=y
1153# CONFIG_ZISOFS is not set
1154CONFIG_UDF_FS=m
1155CONFIG_UDF_NLS=y
1156
1157#
1158# DOS/FAT/NT Filesystems
1159#
1160CONFIG_FAT_FS=m
1161CONFIG_MSDOS_FS=m
1162CONFIG_VFAT_FS=m
1163CONFIG_FAT_DEFAULT_CODEPAGE=437
1164CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1165# CONFIG_NTFS_FS is not set
1166
1167#
1168# Pseudo filesystems
1169#
1170CONFIG_PROC_FS=y
1171CONFIG_PROC_KCORE=y
1172CONFIG_PROC_SYSCTL=y
1173CONFIG_SYSFS=y
1174CONFIG_TMPFS=y
1175# CONFIG_TMPFS_POSIX_ACL is not set
1176CONFIG_HUGETLBFS=y
1177CONFIG_HUGETLB_PAGE=y
1178CONFIG_RAMFS=y
1179# CONFIG_CONFIGFS_FS is not set
1180
1181#
1182# Miscellaneous filesystems
1183#
1184# CONFIG_ADFS_FS is not set
1185# CONFIG_AFFS_FS is not set
1186# CONFIG_HFS_FS is not set
1187# CONFIG_HFSPLUS_FS is not set
1188# CONFIG_BEFS_FS is not set
1189# CONFIG_BFS_FS is not set
1190# CONFIG_EFS_FS is not set
1191# CONFIG_CRAMFS is not set
1192# CONFIG_VXFS_FS is not set
1193# CONFIG_HPFS_FS is not set
1194# CONFIG_QNX4FS_FS is not set
1195# CONFIG_SYSV_FS is not set
1196# CONFIG_UFS_FS is not set
1197
1198#
1199# Network File Systems
1200#
1201CONFIG_NFS_FS=m
1202CONFIG_NFS_V3=y
1203CONFIG_NFS_V3_ACL=y
1204# CONFIG_NFS_V4 is not set
1205# CONFIG_NFS_DIRECTIO is not set
1206CONFIG_NFSD=m
1207CONFIG_NFSD_V2_ACL=y
1208CONFIG_NFSD_V3=y
1209CONFIG_NFSD_V3_ACL=y
1210# CONFIG_NFSD_V4 is not set
1211CONFIG_NFSD_TCP=y
1212CONFIG_LOCKD=m
1213CONFIG_LOCKD_V4=y
1214CONFIG_EXPORTFS=m
1215CONFIG_NFS_ACL_SUPPORT=m
1216CONFIG_NFS_COMMON=y
1217CONFIG_SUNRPC=m
1218# CONFIG_RPCSEC_GSS_KRB5 is not set
1219# CONFIG_RPCSEC_GSS_SPKM3 is not set
1220# CONFIG_SMB_FS is not set
1221# CONFIG_CIFS is not set
1222# CONFIG_NCP_FS is not set
1223# CONFIG_CODA_FS is not set
1224# CONFIG_AFS_FS is not set
1225# CONFIG_9P_FS is not set
1226
1227#
1228# Partition Types
1229#
1230CONFIG_PARTITION_ADVANCED=y
1231# CONFIG_ACORN_PARTITION is not set
1232# CONFIG_OSF_PARTITION is not set
1233# CONFIG_AMIGA_PARTITION is not set
1234# CONFIG_ATARI_PARTITION is not set
1235# CONFIG_MAC_PARTITION is not set
1236CONFIG_MSDOS_PARTITION=y
1237# CONFIG_BSD_DISKLABEL is not set
1238# CONFIG_MINIX_SUBPARTITION is not set
1239# CONFIG_SOLARIS_X86_PARTITION is not set
1240# CONFIG_UNIXWARE_DISKLABEL is not set
1241# CONFIG_LDM_PARTITION is not set
1242# CONFIG_SGI_PARTITION is not set
1243# CONFIG_ULTRIX_PARTITION is not set
1244# CONFIG_SUN_PARTITION is not set
1245# CONFIG_KARMA_PARTITION is not set
1246CONFIG_EFI_PARTITION=y
1247
1248#
1249# Native Language Support
1250#
1251CONFIG_NLS=m
1252CONFIG_NLS_DEFAULT="iso8859-1"
1253# CONFIG_NLS_CODEPAGE_437 is not set
1254# CONFIG_NLS_CODEPAGE_737 is not set
1255# CONFIG_NLS_CODEPAGE_775 is not set
1256# CONFIG_NLS_CODEPAGE_850 is not set
1257# CONFIG_NLS_CODEPAGE_852 is not set
1258# CONFIG_NLS_CODEPAGE_855 is not set
1259# CONFIG_NLS_CODEPAGE_857 is not set
1260# CONFIG_NLS_CODEPAGE_860 is not set
1261# CONFIG_NLS_CODEPAGE_861 is not set
1262# CONFIG_NLS_CODEPAGE_862 is not set
1263# CONFIG_NLS_CODEPAGE_863 is not set
1264# CONFIG_NLS_CODEPAGE_864 is not set
1265# CONFIG_NLS_CODEPAGE_865 is not set
1266# CONFIG_NLS_CODEPAGE_866 is not set
1267# CONFIG_NLS_CODEPAGE_869 is not set
1268# CONFIG_NLS_CODEPAGE_936 is not set
1269# CONFIG_NLS_CODEPAGE_950 is not set
1270# CONFIG_NLS_CODEPAGE_932 is not set
1271# CONFIG_NLS_CODEPAGE_949 is not set
1272# CONFIG_NLS_CODEPAGE_874 is not set
1273# CONFIG_NLS_ISO8859_8 is not set
1274# CONFIG_NLS_CODEPAGE_1250 is not set
1275# CONFIG_NLS_CODEPAGE_1251 is not set
1276# CONFIG_NLS_ASCII is not set
1277CONFIG_NLS_ISO8859_1=m
1278CONFIG_NLS_ISO8859_2=m
1279CONFIG_NLS_ISO8859_3=m
1280CONFIG_NLS_ISO8859_4=m
1281CONFIG_NLS_ISO8859_5=m
1282CONFIG_NLS_ISO8859_6=m
1283CONFIG_NLS_ISO8859_7=m
1284CONFIG_NLS_ISO8859_9=m
1285CONFIG_NLS_ISO8859_13=m
1286CONFIG_NLS_ISO8859_14=m
1287CONFIG_NLS_ISO8859_15=m
1288# CONFIG_NLS_KOI8_R is not set
1289# CONFIG_NLS_KOI8_U is not set
1290# CONFIG_NLS_UTF8 is not set
1291
1292#
1293# Distributed Lock Manager
1294#
1295# CONFIG_DLM is not set
1296
1297#
1298# Library routines
1299#
1300CONFIG_BITREVERSE=y
1301# CONFIG_CRC_CCITT is not set
1302# CONFIG_CRC16 is not set
1303CONFIG_CRC32=y
1304CONFIG_LIBCRC32C=m
1305CONFIG_ZLIB_INFLATE=m
1306CONFIG_ZLIB_DEFLATE=m
1307CONFIG_PLIST=y
1308CONFIG_IOMAP_COPY=y
1309
1310#
1311# Instrumentation Support
1312#
1313# CONFIG_PROFILING is not set
1314# CONFIG_KPROBES is not set
1315
1316#
1317# Kernel hacking
1318#
1319# CONFIG_PRINTK_TIME is not set
1320CONFIG_ENABLE_MUST_CHECK=y
1321CONFIG_MAGIC_SYSRQ=y
1322# CONFIG_UNUSED_SYMBOLS is not set
1323CONFIG_DEBUG_FS=y
1324# CONFIG_HEADERS_CHECK is not set
1325CONFIG_DEBUG_KERNEL=y
1326CONFIG_LOG_BUF_SHIFT=15
1327CONFIG_DETECT_SOFTLOCKUP=y
1328# CONFIG_SCHEDSTATS is not set
1329# CONFIG_DEBUG_SLAB is not set
1330# CONFIG_DEBUG_RT_MUTEXES is not set
1331# CONFIG_RT_MUTEX_TESTER is not set
1332# CONFIG_DEBUG_SPINLOCK is not set
1333CONFIG_DEBUG_MUTEXES=y
1334# CONFIG_DEBUG_RWSEMS is not set
1335CONFIG_DEBUG_SPINLOCK_SLEEP=y
1336# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1337# CONFIG_DEBUG_KOBJECT is not set
1338CONFIG_DEBUG_BUGVERBOSE=y
1339# CONFIG_DEBUG_INFO is not set
1340# CONFIG_DEBUG_VM is not set
1341# CONFIG_DEBUG_LIST is not set
1342# CONFIG_FORCED_INLINING is not set
1343# CONFIG_RCU_TORTURE_TEST is not set
1344# CONFIG_DEBUG_STACKOVERFLOW is not set
1345# CONFIG_DEBUG_STACK_USAGE is not set
1346CONFIG_DEBUGGER=y
1347CONFIG_XMON=y
1348CONFIG_XMON_DEFAULT=y
1349CONFIG_XMON_DISASSEMBLY=y
1350CONFIG_IRQSTACKS=y
1351# CONFIG_BOOTX_TEXT is not set
1352CONFIG_PPC_EARLY_DEBUG=y
1353# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1354# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1355# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1356# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1357# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1358# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1359CONFIG_PPC_EARLY_DEBUG_BEAT=y
1360
1361#
1362# Security options
1363#
1364# CONFIG_KEYS is not set
1365# CONFIG_SECURITY is not set
1366
1367#
1368# Cryptographic options
1369#
1370CONFIG_CRYPTO=y
1371CONFIG_CRYPTO_ALGAPI=y
1372CONFIG_CRYPTO_BLKCIPHER=m
1373CONFIG_CRYPTO_HASH=y
1374CONFIG_CRYPTO_MANAGER=y
1375CONFIG_CRYPTO_HMAC=y
1376# CONFIG_CRYPTO_XCBC is not set
1377CONFIG_CRYPTO_NULL=m
1378CONFIG_CRYPTO_MD4=m
1379CONFIG_CRYPTO_MD5=y
1380CONFIG_CRYPTO_SHA1=m
1381CONFIG_CRYPTO_SHA256=m
1382CONFIG_CRYPTO_SHA512=m
1383CONFIG_CRYPTO_WP512=m
1384CONFIG_CRYPTO_TGR192=m
1385# CONFIG_CRYPTO_GF128MUL is not set
1386CONFIG_CRYPTO_ECB=m
1387CONFIG_CRYPTO_CBC=m
1388# CONFIG_CRYPTO_LRW is not set
1389CONFIG_CRYPTO_DES=m
1390CONFIG_CRYPTO_BLOWFISH=m
1391CONFIG_CRYPTO_TWOFISH=m
1392CONFIG_CRYPTO_TWOFISH_COMMON=m
1393CONFIG_CRYPTO_SERPENT=m
1394CONFIG_CRYPTO_AES=m
1395CONFIG_CRYPTO_CAST5=m
1396CONFIG_CRYPTO_CAST6=m
1397CONFIG_CRYPTO_TEA=m
1398CONFIG_CRYPTO_ARC4=m
1399CONFIG_CRYPTO_KHAZAD=m
1400CONFIG_CRYPTO_ANUBIS=m
1401CONFIG_CRYPTO_DEFLATE=m
1402CONFIG_CRYPTO_MICHAEL_MIC=m
1403CONFIG_CRYPTO_CRC32C=m
1404CONFIG_CRYPTO_TEST=m
1405
1406#
1407# Hardware crypto devices
1408#
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
index 405c1c908213..dde66a597a8d 100644
--- a/arch/powerpc/configs/linkstation_defconfig
+++ b/arch/powerpc/configs/linkstation_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.20-rc6
4# Mon Jan 22 22:17:58 2007 4# Sun Jan 28 23:13:56 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -58,7 +58,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
58# 58#
59# General setup 59# General setup
60# 60#
61CONFIG_LOCALVERSION="-kuroboxHG" 61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y 62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 64CONFIG_SYSVIPC=y
@@ -206,7 +206,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
206CONFIG_PROC_DEVICETREE=y 206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set 207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set 208# CONFIG_PM is not set
209# CONFIG_SECCOMP is not set 209CONFIG_SECCOMP=y
210CONFIG_ISA_DMA_API=y 210CONFIG_ISA_DMA_API=y
211 211
212# 212#
@@ -312,39 +312,40 @@ CONFIG_NF_CONNTRACK=m
312# CONFIG_NF_CT_ACCT is not set 312# CONFIG_NF_CT_ACCT is not set
313# CONFIG_NF_CONNTRACK_MARK is not set 313# CONFIG_NF_CONNTRACK_MARK is not set
314# CONFIG_NF_CONNTRACK_EVENTS is not set 314# CONFIG_NF_CONNTRACK_EVENTS is not set
315# CONFIG_NF_CT_PROTO_SCTP is not set 315CONFIG_NF_CT_PROTO_GRE=m
316# CONFIG_NF_CONNTRACK_AMANDA is not set 316CONFIG_NF_CT_PROTO_SCTP=m
317CONFIG_NF_CONNTRACK_AMANDA=m
317CONFIG_NF_CONNTRACK_FTP=m 318CONFIG_NF_CONNTRACK_FTP=m
318# CONFIG_NF_CONNTRACK_H323 is not set 319CONFIG_NF_CONNTRACK_H323=m
319CONFIG_NF_CONNTRACK_IRC=m 320CONFIG_NF_CONNTRACK_IRC=m
320# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set 321CONFIG_NF_CONNTRACK_NETBIOS_NS=m
321# CONFIG_NF_CONNTRACK_PPTP is not set 322CONFIG_NF_CONNTRACK_PPTP=m
322# CONFIG_NF_CONNTRACK_SIP is not set 323CONFIG_NF_CONNTRACK_SIP=m
323CONFIG_NF_CONNTRACK_TFTP=m 324CONFIG_NF_CONNTRACK_TFTP=m
324CONFIG_NETFILTER_XTABLES=m 325CONFIG_NETFILTER_XTABLES=m
325CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 326# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
326# CONFIG_NETFILTER_XT_TARGET_DSCP is not set 327# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
327CONFIG_NETFILTER_XT_TARGET_MARK=m 328# CONFIG_NETFILTER_XT_TARGET_MARK is not set
328# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set 329# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
329CONFIG_NETFILTER_XT_TARGET_NFLOG=m 330# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
330# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set 331# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
331# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set 332# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
332CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 333# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
333# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 334# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
334# CONFIG_NETFILTER_XT_MATCH_DSCP is not set 335# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
335CONFIG_NETFILTER_XT_MATCH_ESP=m 336# CONFIG_NETFILTER_XT_MATCH_ESP is not set
336CONFIG_NETFILTER_XT_MATCH_HELPER=m 337# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
337CONFIG_NETFILTER_XT_MATCH_LENGTH=m 338# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
338CONFIG_NETFILTER_XT_MATCH_LIMIT=m 339# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
339CONFIG_NETFILTER_XT_MATCH_MAC=m 340CONFIG_NETFILTER_XT_MATCH_MAC=m
340CONFIG_NETFILTER_XT_MATCH_MARK=m 341# CONFIG_NETFILTER_XT_MATCH_MARK is not set
341# CONFIG_NETFILTER_XT_MATCH_POLICY is not set 342# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
342CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m 343# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
343CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m 344CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
344# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set 345# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
345# CONFIG_NETFILTER_XT_MATCH_REALM is not set 346# CONFIG_NETFILTER_XT_MATCH_REALM is not set
346# CONFIG_NETFILTER_XT_MATCH_SCTP is not set 347# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
347# CONFIG_NETFILTER_XT_MATCH_STATE is not set 348CONFIG_NETFILTER_XT_MATCH_STATE=m
348# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set 349# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
349# CONFIG_NETFILTER_XT_MATCH_STRING is not set 350# CONFIG_NETFILTER_XT_MATCH_STRING is not set
350# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set 351# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
@@ -359,12 +360,12 @@ CONFIG_NF_CONNTRACK_PROC_COMPAT=y
359CONFIG_IP_NF_IPTABLES=m 360CONFIG_IP_NF_IPTABLES=m
360CONFIG_IP_NF_MATCH_IPRANGE=m 361CONFIG_IP_NF_MATCH_IPRANGE=m
361# CONFIG_IP_NF_MATCH_TOS is not set 362# CONFIG_IP_NF_MATCH_TOS is not set
362# CONFIG_IP_NF_MATCH_RECENT is not set 363CONFIG_IP_NF_MATCH_RECENT=m
363# CONFIG_IP_NF_MATCH_ECN is not set 364# CONFIG_IP_NF_MATCH_ECN is not set
364# CONFIG_IP_NF_MATCH_AH is not set 365# CONFIG_IP_NF_MATCH_AH is not set
365# CONFIG_IP_NF_MATCH_TTL is not set 366# CONFIG_IP_NF_MATCH_TTL is not set
366# CONFIG_IP_NF_MATCH_OWNER is not set 367CONFIG_IP_NF_MATCH_OWNER=m
367# CONFIG_IP_NF_MATCH_ADDRTYPE is not set 368CONFIG_IP_NF_MATCH_ADDRTYPE=m
368CONFIG_IP_NF_FILTER=m 369CONFIG_IP_NF_FILTER=m
369CONFIG_IP_NF_TARGET_REJECT=m 370CONFIG_IP_NF_TARGET_REJECT=m
370# CONFIG_IP_NF_TARGET_LOG is not set 371# CONFIG_IP_NF_TARGET_LOG is not set
@@ -374,16 +375,17 @@ CONFIG_NF_NAT=m
374CONFIG_NF_NAT_NEEDED=y 375CONFIG_NF_NAT_NEEDED=y
375CONFIG_IP_NF_TARGET_MASQUERADE=m 376CONFIG_IP_NF_TARGET_MASQUERADE=m
376CONFIG_IP_NF_TARGET_REDIRECT=m 377CONFIG_IP_NF_TARGET_REDIRECT=m
377CONFIG_IP_NF_TARGET_NETMAP=m 378# CONFIG_IP_NF_TARGET_NETMAP is not set
378CONFIG_IP_NF_TARGET_SAME=m 379# CONFIG_IP_NF_TARGET_SAME is not set
379# CONFIG_NF_NAT_SNMP_BASIC is not set 380# CONFIG_NF_NAT_SNMP_BASIC is not set
381CONFIG_NF_NAT_PROTO_GRE=m
380CONFIG_NF_NAT_FTP=m 382CONFIG_NF_NAT_FTP=m
381CONFIG_NF_NAT_IRC=m 383CONFIG_NF_NAT_IRC=m
382CONFIG_NF_NAT_TFTP=m 384CONFIG_NF_NAT_TFTP=m
383# CONFIG_NF_NAT_AMANDA is not set 385CONFIG_NF_NAT_AMANDA=m
384# CONFIG_NF_NAT_PPTP is not set 386CONFIG_NF_NAT_PPTP=m
385# CONFIG_NF_NAT_H323 is not set 387CONFIG_NF_NAT_H323=m
386# CONFIG_NF_NAT_SIP is not set 388CONFIG_NF_NAT_SIP=m
387CONFIG_IP_NF_MANGLE=m 389CONFIG_IP_NF_MANGLE=m
388CONFIG_IP_NF_TARGET_TOS=m 390CONFIG_IP_NF_TARGET_TOS=m
389CONFIG_IP_NF_TARGET_ECN=m 391CONFIG_IP_NF_TARGET_ECN=m
@@ -472,6 +474,7 @@ CONFIG_MTD_PARTITIONS=y
472# User Modules And Translation Layers 474# User Modules And Translation Layers
473# 475#
474CONFIG_MTD_CHAR=y 476CONFIG_MTD_CHAR=y
477CONFIG_MTD_BLKDEVS=y
475CONFIG_MTD_BLOCK=y 478CONFIG_MTD_BLOCK=y
476# CONFIG_FTL is not set 479# CONFIG_FTL is not set
477# CONFIG_NFTL is not set 480# CONFIG_NFTL is not set
@@ -518,6 +521,7 @@ CONFIG_MTD_PHYSMAP=y
518CONFIG_MTD_PHYSMAP_START=0xffc00000 521CONFIG_MTD_PHYSMAP_START=0xffc00000
519CONFIG_MTD_PHYSMAP_LEN=0x400000 522CONFIG_MTD_PHYSMAP_LEN=0x400000
520CONFIG_MTD_PHYSMAP_BANKWIDTH=1 523CONFIG_MTD_PHYSMAP_BANKWIDTH=1
524# CONFIG_MTD_PHYSMAP_OF is not set
521# CONFIG_MTD_PLATRAM is not set 525# CONFIG_MTD_PLATRAM is not set
522 526
523# 527#
@@ -540,6 +544,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1
540# NAND Flash Device Drivers 544# NAND Flash Device Drivers
541# 545#
542# CONFIG_MTD_NAND is not set 546# CONFIG_MTD_NAND is not set
547# CONFIG_MTD_NAND_CAFE is not set
543 548
544# 549#
545# OneNAND Flash Device Drivers 550# OneNAND Flash Device Drivers
@@ -696,7 +701,7 @@ CONFIG_ATA=y
696# CONFIG_PATA_HPT37X is not set 701# CONFIG_PATA_HPT37X is not set
697# CONFIG_PATA_HPT3X2N is not set 702# CONFIG_PATA_HPT3X2N is not set
698# CONFIG_PATA_HPT3X3 is not set 703# CONFIG_PATA_HPT3X3 is not set
699# CONFIG_PATA_IT821X is not set 704CONFIG_PATA_IT821X=y
700# CONFIG_PATA_JMICRON is not set 705# CONFIG_PATA_JMICRON is not set
701# CONFIG_PATA_TRIFLEX is not set 706# CONFIG_PATA_TRIFLEX is not set
702# CONFIG_PATA_MARVELL is not set 707# CONFIG_PATA_MARVELL is not set
@@ -763,11 +768,33 @@ CONFIG_TUN=m
763# 768#
764# PHY device support 769# PHY device support
765# 770#
771# CONFIG_PHYLIB is not set
766 772
767# 773#
768# Ethernet (10 or 100Mbit) 774# Ethernet (10 or 100Mbit)
769# 775#
770# CONFIG_NET_ETHERNET is not set 776CONFIG_NET_ETHERNET=y
777# CONFIG_MII is not set
778# CONFIG_HAPPYMEAL is not set
779# CONFIG_SUNGEM is not set
780# CONFIG_CASSINI is not set
781# CONFIG_NET_VENDOR_3COM is not set
782
783#
784# Tulip family network device support
785#
786CONFIG_NET_TULIP=y
787# CONFIG_DE2104X is not set
788CONFIG_TULIP=y
789# CONFIG_TULIP_MWI is not set
790CONFIG_TULIP_MMIO=y
791# CONFIG_TULIP_NAPI is not set
792# CONFIG_DE4X5 is not set
793# CONFIG_WINBOND_840 is not set
794# CONFIG_DM9102 is not set
795# CONFIG_ULI526X is not set
796# CONFIG_HP100 is not set
797# CONFIG_NET_PCI is not set
771 798
772# 799#
773# Ethernet (1000 Mbit) 800# Ethernet (1000 Mbit)
@@ -829,7 +856,8 @@ CONFIG_NET_RADIO=y
829# CONFIG_USB_ZD1201 is not set 856# CONFIG_USB_ZD1201 is not set
830# CONFIG_HOSTAP is not set 857# CONFIG_HOSTAP is not set
831# CONFIG_BCM43XX is not set 858# CONFIG_BCM43XX is not set
832# CONFIG_ZD1211RW is not set 859CONFIG_ZD1211RW=m
860# CONFIG_ZD1211RW_DEBUG is not set
833CONFIG_NET_WIRELESS=y 861CONFIG_NET_WIRELESS=y
834 862
835# 863#
@@ -1098,7 +1126,7 @@ CONFIG_DUMMY_CONSOLE=y
1098# 1126#
1099# HID Devices 1127# HID Devices
1100# 1128#
1101CONFIG_HID=y 1129CONFIG_HID=m
1102 1130
1103# 1131#
1104# USB support 1132# USB support
@@ -1115,7 +1143,6 @@ CONFIG_USB=y
1115CONFIG_USB_DEVICEFS=y 1143CONFIG_USB_DEVICEFS=y
1116# CONFIG_USB_BANDWIDTH is not set 1144# CONFIG_USB_BANDWIDTH is not set
1117# CONFIG_USB_DYNAMIC_MINORS is not set 1145# CONFIG_USB_DYNAMIC_MINORS is not set
1118# CONFIG_USB_MULTITHREAD_PROBE is not set
1119# CONFIG_USB_OTG is not set 1146# CONFIG_USB_OTG is not set
1120 1147
1121# 1148#
@@ -1136,7 +1163,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1136# USB Device Class drivers 1163# USB Device Class drivers
1137# 1164#
1138# CONFIG_USB_ACM is not set 1165# CONFIG_USB_ACM is not set
1139# CONFIG_USB_PRINTER is not set 1166CONFIG_USB_PRINTER=m
1140 1167
1141# 1168#
1142# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 1169# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1371,7 +1398,11 @@ CONFIG_FS_MBCACHE=y
1371# CONFIG_REISERFS_FS is not set 1398# CONFIG_REISERFS_FS is not set
1372# CONFIG_JFS_FS is not set 1399# CONFIG_JFS_FS is not set
1373CONFIG_FS_POSIX_ACL=y 1400CONFIG_FS_POSIX_ACL=y
1374# CONFIG_XFS_FS is not set 1401CONFIG_XFS_FS=m
1402# CONFIG_XFS_QUOTA is not set
1403# CONFIG_XFS_SECURITY is not set
1404# CONFIG_XFS_POSIX_ACL is not set
1405# CONFIG_XFS_RT is not set
1375# CONFIG_GFS2_FS is not set 1406# CONFIG_GFS2_FS is not set
1376# CONFIG_OCFS2_FS is not set 1407# CONFIG_OCFS2_FS is not set
1377# CONFIG_MINIX_FS is not set 1408# CONFIG_MINIX_FS is not set
@@ -1461,7 +1492,12 @@ CONFIG_SUNRPC_GSS=y
1461CONFIG_RPCSEC_GSS_KRB5=y 1492CONFIG_RPCSEC_GSS_KRB5=y
1462# CONFIG_RPCSEC_GSS_SPKM3 is not set 1493# CONFIG_RPCSEC_GSS_SPKM3 is not set
1463# CONFIG_SMB_FS is not set 1494# CONFIG_SMB_FS is not set
1464# CONFIG_CIFS is not set 1495CONFIG_CIFS=m
1496# CONFIG_CIFS_STATS is not set
1497# CONFIG_CIFS_WEAK_PW_HASH is not set
1498# CONFIG_CIFS_XATTR is not set
1499# CONFIG_CIFS_DEBUG2 is not set
1500# CONFIG_CIFS_EXPERIMENTAL is not set
1465# CONFIG_NCP_FS is not set 1501# CONFIG_NCP_FS is not set
1466# CONFIG_CODA_FS is not set 1502# CONFIG_CODA_FS is not set
1467# CONFIG_AFS_FS is not set 1503# CONFIG_AFS_FS is not set
@@ -1495,7 +1531,7 @@ CONFIG_NLS_CODEPAGE_437=m
1495# CONFIG_NLS_CODEPAGE_869 is not set 1531# CONFIG_NLS_CODEPAGE_869 is not set
1496# CONFIG_NLS_CODEPAGE_936 is not set 1532# CONFIG_NLS_CODEPAGE_936 is not set
1497# CONFIG_NLS_CODEPAGE_950 is not set 1533# CONFIG_NLS_CODEPAGE_950 is not set
1498# CONFIG_NLS_CODEPAGE_932 is not set 1534CONFIG_NLS_CODEPAGE_932=m
1499# CONFIG_NLS_CODEPAGE_949 is not set 1535# CONFIG_NLS_CODEPAGE_949 is not set
1500# CONFIG_NLS_CODEPAGE_874 is not set 1536# CONFIG_NLS_CODEPAGE_874 is not set
1501# CONFIG_NLS_ISO8859_8 is not set 1537# CONFIG_NLS_ISO8859_8 is not set
@@ -1526,12 +1562,14 @@ CONFIG_NLS_UTF8=m
1526# Library routines 1562# Library routines
1527# 1563#
1528CONFIG_BITREVERSE=y 1564CONFIG_BITREVERSE=y
1529# CONFIG_CRC_CCITT is not set 1565CONFIG_CRC_CCITT=m
1530# CONFIG_CRC16 is not set 1566# CONFIG_CRC16 is not set
1531CONFIG_CRC32=y 1567CONFIG_CRC32=y
1532CONFIG_LIBCRC32C=m 1568CONFIG_LIBCRC32C=m
1533CONFIG_ZLIB_INFLATE=m 1569CONFIG_ZLIB_INFLATE=m
1534CONFIG_ZLIB_DEFLATE=m 1570CONFIG_ZLIB_DEFLATE=m
1571CONFIG_TEXTSEARCH=y
1572CONFIG_TEXTSEARCH_KMP=m
1535CONFIG_PLIST=y 1573CONFIG_PLIST=y
1536CONFIG_IOMAP_COPY=y 1574CONFIG_IOMAP_COPY=y
1537 1575
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig
new file mode 100644
index 000000000000..2af45025082f
--- /dev/null
+++ b/arch/powerpc/configs/mpc8272_ads_defconfig
@@ -0,0 +1,848 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc5
4# Fri Jul 14 20:36:35 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24# CONFIG_DEFAULT_UIMAGE is not set
25
26#
27# Processor support
28#
29# CONFIG_CLASSIC32 is not set
30# CONFIG_PPC_52xx is not set
31CONFIG_PPC_82xx=y
32# CONFIG_PPC_83xx is not set
33# CONFIG_PPC_85xx is not set
34# CONFIG_40x is not set
35# CONFIG_44x is not set
36# CONFIG_8xx is not set
37# CONFIG_E200 is not set
38CONFIG_6xx=y
39CONFIG_PPC_FPU=y
40CONFIG_PPC_STD_MMU=y
41CONFIG_PPC_STD_MMU_32=y
42# CONFIG_SMP is not set
43
44#
45# Code maturity level options
46#
47# CONFIG_EXPERIMENTAL is not set
48CONFIG_BROKEN_ON_SMP=y
49CONFIG_INIT_ENV_ARG_LIMIT=32
50
51#
52# General setup
53#
54CONFIG_LOCALVERSION="powerpc8272"
55CONFIG_LOCALVERSION_AUTO=y
56CONFIG_SWAP=y
57CONFIG_SYSVIPC=y
58# CONFIG_BSD_PROCESS_ACCT is not set
59CONFIG_SYSCTL=y
60# CONFIG_AUDIT is not set
61CONFIG_IKCONFIG=y
62CONFIG_IKCONFIG_PROC=y
63# CONFIG_RELAY is not set
64CONFIG_INITRAMFS_SOURCE=""
65CONFIG_EMBEDDED=y
66CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y
68CONFIG_KALLSYMS_EXTRA_PASS=y
69CONFIG_HOTPLUG=y
70CONFIG_PRINTK=y
71CONFIG_BUG=y
72CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y
74CONFIG_FUTEX=y
75CONFIG_EPOLL=y
76CONFIG_SHMEM=y
77CONFIG_SLAB=y
78# CONFIG_TINY_SHMEM is not set
79CONFIG_BASE_SMALL=0
80# CONFIG_SLOB is not set
81
82#
83# Loadable module support
84#
85# CONFIG_MODULES is not set
86
87#
88# Block layer
89#
90# CONFIG_LBD is not set
91# CONFIG_BLK_DEV_IO_TRACE is not set
92# CONFIG_LSF is not set
93
94#
95# IO Schedulers
96#
97CONFIG_IOSCHED_NOOP=y
98CONFIG_IOSCHED_AS=y
99CONFIG_IOSCHED_DEADLINE=y
100CONFIG_IOSCHED_CFQ=y
101CONFIG_DEFAULT_AS=y
102# CONFIG_DEFAULT_DEADLINE is not set
103# CONFIG_DEFAULT_CFQ is not set
104# CONFIG_DEFAULT_NOOP is not set
105CONFIG_DEFAULT_IOSCHED="anticipatory"
106CONFIG_PQ2ADS=y
107CONFIG_8260=y
108CONFIG_8272=y
109CONFIG_CPM2=y
110# CONFIG_WANT_EARLY_SERIAL is not set
111CONFIG_EMBEDDEDBOOT=y
112
113#
114# Platform support
115#
116CONFIG_ADS8272=y
117
118#
119# Kernel options
120#
121# CONFIG_HIGHMEM is not set
122# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y
124# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y
127# CONFIG_PREEMPT_VOLUNTARY is not set
128# CONFIG_PREEMPT is not set
129CONFIG_BINFMT_ELF=y
130CONFIG_BINFMT_MISC=y
131# CONFIG_PC_KEYBOARD is not set
132CONFIG_ARCH_FLATMEM_ENABLE=y
133CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4
137CONFIG_PROC_DEVICETREE=y
138# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set
140# CONFIG_SOFTWARE_SUSPEND is not set
141CONFIG_SECCOMP=y
142CONFIG_ISA_DMA_API=y
143
144#
145# Bus options
146#
147# CONFIG_PPC_I8259 is not set
148CONFIG_FSL_SOC=y
149# CONFIG_PCI is not set
150# CONFIG_PCI_DOMAINS is not set
151
152#
153# PCCARD (PCMCIA/CardBus) support
154#
155# CONFIG_PCCARD is not set
156
157#
158# PCI Hotplug Support
159#
160
161#
162# Advanced setup
163#
164# CONFIG_ADVANCED_OPTIONS is not set
165
166#
167# Default settings for advanced configuration options are used
168#
169CONFIG_HIGHMEM_START=0xfe000000
170CONFIG_LOWMEM_SIZE=0x30000000
171CONFIG_KERNEL_START=0xc0000000
172CONFIG_TASK_SIZE=0x80000000
173CONFIG_BOOT_LOAD=0x00400000
174
175#
176# Networking
177#
178CONFIG_NET=y
179
180#
181# Networking options
182#
183# CONFIG_NETDEBUG is not set
184CONFIG_PACKET=y
185# CONFIG_PACKET_MMAP is not set
186CONFIG_UNIX=y
187# CONFIG_NET_KEY is not set
188CONFIG_INET=y
189CONFIG_IP_MULTICAST=y
190# CONFIG_IP_ADVANCED_ROUTER is not set
191CONFIG_IP_FIB_HASH=y
192CONFIG_IP_PNP=y
193CONFIG_IP_PNP_DHCP=y
194CONFIG_IP_PNP_BOOTP=y
195# CONFIG_IP_PNP_RARP is not set
196# CONFIG_NET_IPIP is not set
197# CONFIG_NET_IPGRE is not set
198# CONFIG_IP_MROUTE is not set
199CONFIG_SYN_COOKIES=y
200# CONFIG_INET_AH is not set
201# CONFIG_INET_ESP is not set
202# CONFIG_INET_IPCOMP is not set
203# CONFIG_INET_XFRM_TUNNEL is not set
204# CONFIG_INET_TUNNEL is not set
205CONFIG_INET_DIAG=y
206CONFIG_INET_TCP_DIAG=y
207# CONFIG_TCP_CONG_ADVANCED is not set
208CONFIG_TCP_CONG_BIC=y
209
210#
211# IP: Virtual Server Configuration
212#
213# CONFIG_IP_VS is not set
214CONFIG_IPV6=y
215# CONFIG_IPV6_PRIVACY is not set
216# CONFIG_IPV6_ROUTER_PREF is not set
217# CONFIG_INET6_AH is not set
218# CONFIG_INET6_ESP is not set
219# CONFIG_INET6_IPCOMP is not set
220# CONFIG_INET6_XFRM_TUNNEL is not set
221# CONFIG_INET6_TUNNEL is not set
222# CONFIG_IPV6_TUNNEL is not set
223CONFIG_NETFILTER=y
224# CONFIG_NETFILTER_DEBUG is not set
225
226#
227# Core Netfilter Configuration
228#
229# CONFIG_NETFILTER_NETLINK is not set
230# CONFIG_NETFILTER_XTABLES is not set
231
232#
233# IP: Netfilter Configuration
234#
235# CONFIG_IP_NF_CONNTRACK is not set
236# CONFIG_IP_NF_QUEUE is not set
237# CONFIG_BRIDGE is not set
238# CONFIG_VLAN_8021Q is not set
239# CONFIG_DECNET is not set
240# CONFIG_LLC2 is not set
241# CONFIG_IPX is not set
242# CONFIG_ATALK is not set
243
244#
245# QoS and/or fair queueing
246#
247# CONFIG_NET_SCHED is not set
248
249#
250# Network testing
251#
252# CONFIG_NET_PKTGEN is not set
253# CONFIG_HAMRADIO is not set
254# CONFIG_IRDA is not set
255# CONFIG_BT is not set
256# CONFIG_IEEE80211 is not set
257
258#
259# Device Drivers
260#
261
262#
263# Generic Driver Options
264#
265CONFIG_STANDALONE=y
266CONFIG_PREVENT_FIRMWARE_BUILD=y
267# CONFIG_FW_LOADER is not set
268# CONFIG_DEBUG_DRIVER is not set
269
270#
271# Connector - unified userspace <-> kernelspace linker
272#
273# CONFIG_CONNECTOR is not set
274
275#
276# Memory Technology Devices (MTD)
277#
278# CONFIG_MTD is not set
279
280#
281# Parallel port support
282#
283# CONFIG_PARPORT is not set
284
285#
286# Plug and Play support
287#
288
289#
290# Block devices
291#
292# CONFIG_BLK_DEV_FD is not set
293# CONFIG_BLK_DEV_COW_COMMON is not set
294CONFIG_BLK_DEV_LOOP=y
295# CONFIG_BLK_DEV_CRYPTOLOOP is not set
296# CONFIG_BLK_DEV_NBD is not set
297# CONFIG_BLK_DEV_RAM is not set
298# CONFIG_BLK_DEV_INITRD is not set
299# CONFIG_CDROM_PKTCDVD is not set
300# CONFIG_ATA_OVER_ETH is not set
301
302#
303# ATA/ATAPI/MFM/RLL support
304#
305CONFIG_IDE=y
306CONFIG_BLK_DEV_IDE=y
307
308#
309# Please see Documentation/ide.txt for help/info on IDE drives
310#
311# CONFIG_BLK_DEV_IDE_SATA is not set
312CONFIG_BLK_DEV_IDEDISK=y
313# CONFIG_IDEDISK_MULTI_MODE is not set
314# CONFIG_BLK_DEV_IDECD is not set
315# CONFIG_BLK_DEV_IDEFLOPPY is not set
316# CONFIG_IDE_TASK_IOCTL is not set
317
318#
319# IDE chipset support/bugfixes
320#
321# CONFIG_IDE_GENERIC is not set
322# CONFIG_IDE_ARM is not set
323# CONFIG_BLK_DEV_IDEDMA is not set
324# CONFIG_IDEDMA_AUTO is not set
325# CONFIG_BLK_DEV_HD is not set
326
327#
328# SCSI device support
329#
330# CONFIG_RAID_ATTRS is not set
331# CONFIG_SCSI is not set
332
333#
334# Multi-device support (RAID and LVM)
335#
336# CONFIG_MD is not set
337
338#
339# Fusion MPT device support
340#
341# CONFIG_FUSION is not set
342
343#
344# IEEE 1394 (FireWire) support
345#
346
347#
348# I2O device support
349#
350
351#
352# Macintosh device drivers
353#
354# CONFIG_WINDFARM is not set
355
356#
357# Network device support
358#
359CONFIG_NETDEVICES=y
360# CONFIG_DUMMY is not set
361# CONFIG_BONDING is not set
362# CONFIG_EQUALIZER is not set
363CONFIG_TUN=y
364
365#
366# PHY device support
367#
368CONFIG_PHYLIB=y
369
370#
371# MII PHY device drivers
372#
373# CONFIG_MARVELL_PHY is not set
374CONFIG_DAVICOM_PHY=y
375# CONFIG_QSEMI_PHY is not set
376# CONFIG_LXT_PHY is not set
377# CONFIG_CICADA_PHY is not set
378# CONFIG_FIXED_PHY is not set
379
380#
381# Ethernet (10 or 100Mbit)
382#
383CONFIG_NET_ETHERNET=y
384CONFIG_MII=y
385CONFIG_FS_ENET=y
386# CONFIG_FS_ENET_HAS_SCC is not set
387CONFIG_FS_ENET_HAS_FCC=y
388
389#
390# Ethernet (1000 Mbit)
391#
392
393#
394# Ethernet (10000 Mbit)
395#
396
397#
398# Token Ring devices
399#
400
401#
402# Wireless LAN (non-hamradio)
403#
404# CONFIG_NET_RADIO is not set
405
406#
407# Wan interfaces
408#
409# CONFIG_WAN is not set
410CONFIG_PPP=y
411# CONFIG_PPP_FILTER is not set
412CONFIG_PPP_ASYNC=y
413CONFIG_PPP_SYNC_TTY=y
414CONFIG_PPP_DEFLATE=y
415# CONFIG_PPP_BSDCOMP is not set
416# CONFIG_SLIP is not set
417# CONFIG_NETPOLL is not set
418# CONFIG_NET_POLL_CONTROLLER is not set
419
420#
421# ISDN subsystem
422#
423# CONFIG_ISDN is not set
424
425#
426# Telephony Support
427#
428# CONFIG_PHONE is not set
429
430#
431# Input device support
432#
433CONFIG_INPUT=y
434
435#
436# Userland interfaces
437#
438CONFIG_INPUT_MOUSEDEV=y
439CONFIG_INPUT_MOUSEDEV_PSAUX=y
440CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
441CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
442# CONFIG_INPUT_JOYDEV is not set
443# CONFIG_INPUT_TSDEV is not set
444CONFIG_INPUT_EVDEV=y
445# CONFIG_INPUT_EVBUG is not set
446
447#
448# Input Device Drivers
449#
450CONFIG_INPUT_KEYBOARD=y
451CONFIG_KEYBOARD_ATKBD=y
452# CONFIG_KEYBOARD_SUNKBD is not set
453# CONFIG_KEYBOARD_LKKBD is not set
454# CONFIG_KEYBOARD_XTKBD is not set
455# CONFIG_KEYBOARD_NEWTON is not set
456CONFIG_INPUT_MOUSE=y
457CONFIG_MOUSE_PS2=y
458# CONFIG_MOUSE_SERIAL is not set
459# CONFIG_MOUSE_VSXXXAA is not set
460# CONFIG_INPUT_JOYSTICK is not set
461# CONFIG_INPUT_TOUCHSCREEN is not set
462# CONFIG_INPUT_MISC is not set
463
464#
465# Hardware I/O ports
466#
467CONFIG_SERIO=y
468# CONFIG_SERIO_I8042 is not set
469CONFIG_SERIO_SERPORT=y
470CONFIG_SERIO_LIBPS2=y
471# CONFIG_SERIO_RAW is not set
472# CONFIG_GAMEPORT is not set
473
474#
475# Character devices
476#
477# CONFIG_VT is not set
478# CONFIG_SERIAL_NONSTANDARD is not set
479
480#
481# Serial drivers
482#
483# CONFIG_SERIAL_8250 is not set
484
485#
486# Non-8250 serial port support
487#
488CONFIG_SERIAL_CORE=y
489CONFIG_SERIAL_CORE_CONSOLE=y
490CONFIG_SERIAL_CPM=y
491CONFIG_SERIAL_CPM_CONSOLE=y
492CONFIG_SERIAL_CPM_SCC1=y
493# CONFIG_SERIAL_CPM_SCC2 is not set
494# CONFIG_SERIAL_CPM_SCC3 is not set
495CONFIG_SERIAL_CPM_SCC4=y
496# CONFIG_SERIAL_CPM_SMC1 is not set
497# CONFIG_SERIAL_CPM_SMC2 is not set
498CONFIG_UNIX98_PTYS=y
499CONFIG_LEGACY_PTYS=y
500CONFIG_LEGACY_PTY_COUNT=256
501
502#
503# IPMI
504#
505# CONFIG_IPMI_HANDLER is not set
506
507#
508# Watchdog Cards
509#
510# CONFIG_WATCHDOG is not set
511# CONFIG_NVRAM is not set
512# CONFIG_GEN_RTC is not set
513# CONFIG_DTLK is not set
514# CONFIG_R3964 is not set
515
516#
517# Ftape, the floppy tape device driver
518#
519# CONFIG_AGP is not set
520# CONFIG_RAW_DRIVER is not set
521
522#
523# TPM devices
524#
525
526#
527# I2C support
528#
529# CONFIG_I2C is not set
530
531#
532# SPI support
533#
534# CONFIG_SPI is not set
535# CONFIG_SPI_MASTER is not set
536
537#
538# Dallas's 1-wire bus
539#
540# CONFIG_W1 is not set
541
542#
543# Hardware Monitoring support
544#
545# CONFIG_HWMON is not set
546# CONFIG_HWMON_VID is not set
547
548#
549# Misc devices
550#
551
552#
553# Multimedia devices
554#
555# CONFIG_VIDEO_DEV is not set
556CONFIG_VIDEO_V4L2=y
557
558#
559# Digital Video Broadcasting Devices
560#
561# CONFIG_DVB is not set
562
563#
564# Graphics support
565#
566# CONFIG_FB is not set
567
568#
569# Sound
570#
571# CONFIG_SOUND is not set
572
573#
574# USB support
575#
576# CONFIG_USB_ARCH_HAS_HCD is not set
577# CONFIG_USB_ARCH_HAS_OHCI is not set
578# CONFIG_USB_ARCH_HAS_EHCI is not set
579
580#
581# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
582#
583
584#
585# USB Gadget Support
586#
587CONFIG_USB_GADGET=y
588# CONFIG_USB_GADGET_DEBUG_FILES is not set
589# CONFIG_USB_GADGET_NET2280 is not set
590# CONFIG_USB_GADGET_PXA2XX is not set
591# CONFIG_USB_GADGET_GOKU is not set
592# CONFIG_USB_GADGET_LH7A40X is not set
593# CONFIG_USB_GADGET_OMAP is not set
594# CONFIG_USB_GADGET_AT91 is not set
595# CONFIG_USB_GADGET_DUMMY_HCD is not set
596# CONFIG_USB_GADGET_DUALSPEED is not set
597
598#
599# MMC/SD Card support
600#
601# CONFIG_MMC is not set
602
603#
604# LED devices
605#
606# CONFIG_NEW_LEDS is not set
607
608#
609# LED drivers
610#
611
612#
613# LED Triggers
614#
615
616#
617# InfiniBand support
618#
619
620#
621# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
622#
623
624#
625# Real Time Clock
626#
627
628#
629# File systems
630#
631CONFIG_EXT2_FS=y
632# CONFIG_EXT2_FS_XATTR is not set
633# CONFIG_EXT2_FS_XIP is not set
634CONFIG_EXT3_FS=y
635CONFIG_EXT3_FS_XATTR=y
636# CONFIG_EXT3_FS_POSIX_ACL is not set
637# CONFIG_EXT3_FS_SECURITY is not set
638CONFIG_JBD=y
639# CONFIG_JBD_DEBUG is not set
640CONFIG_FS_MBCACHE=y
641# CONFIG_REISERFS_FS is not set
642# CONFIG_JFS_FS is not set
643CONFIG_FS_POSIX_ACL=y
644CONFIG_XFS_FS=y
645# CONFIG_XFS_QUOTA is not set
646# CONFIG_XFS_SECURITY is not set
647# CONFIG_XFS_POSIX_ACL is not set
648# CONFIG_MINIX_FS is not set
649# CONFIG_ROMFS_FS is not set
650CONFIG_INOTIFY=y
651# CONFIG_QUOTA is not set
652CONFIG_DNOTIFY=y
653# CONFIG_AUTOFS_FS is not set
654CONFIG_AUTOFS4_FS=y
655# CONFIG_FUSE_FS is not set
656
657#
658# CD-ROM/DVD Filesystems
659#
660# CONFIG_ISO9660_FS is not set
661# CONFIG_UDF_FS is not set
662
663#
664# DOS/FAT/NT Filesystems
665#
666# CONFIG_MSDOS_FS is not set
667# CONFIG_VFAT_FS is not set
668# CONFIG_NTFS_FS is not set
669
670#
671# Pseudo filesystems
672#
673CONFIG_PROC_FS=y
674CONFIG_PROC_KCORE=y
675CONFIG_SYSFS=y
676CONFIG_TMPFS=y
677# CONFIG_HUGETLB_PAGE is not set
678CONFIG_RAMFS=y
679
680#
681# Miscellaneous filesystems
682#
683# CONFIG_HFSPLUS_FS is not set
684CONFIG_CRAMFS=y
685# CONFIG_VXFS_FS is not set
686# CONFIG_HPFS_FS is not set
687# CONFIG_QNX4FS_FS is not set
688# CONFIG_SYSV_FS is not set
689# CONFIG_UFS_FS is not set
690
691#
692# Network File Systems
693#
694CONFIG_NFS_FS=y
695CONFIG_NFS_V3=y
696CONFIG_NFS_V3_ACL=y
697# CONFIG_NFSD is not set
698CONFIG_ROOT_NFS=y
699CONFIG_LOCKD=y
700CONFIG_LOCKD_V4=y
701CONFIG_NFS_ACL_SUPPORT=y
702CONFIG_NFS_COMMON=y
703CONFIG_SUNRPC=y
704CONFIG_SMB_FS=y
705# CONFIG_SMB_NLS_DEFAULT is not set
706# CONFIG_CIFS is not set
707# CONFIG_NCP_FS is not set
708# CONFIG_CODA_FS is not set
709
710#
711# Partition Types
712#
713CONFIG_PARTITION_ADVANCED=y
714# CONFIG_ACORN_PARTITION is not set
715# CONFIG_OSF_PARTITION is not set
716# CONFIG_AMIGA_PARTITION is not set
717# CONFIG_ATARI_PARTITION is not set
718# CONFIG_MAC_PARTITION is not set
719CONFIG_MSDOS_PARTITION=y
720# CONFIG_BSD_DISKLABEL is not set
721# CONFIG_MINIX_SUBPARTITION is not set
722# CONFIG_SOLARIS_X86_PARTITION is not set
723# CONFIG_UNIXWARE_DISKLABEL is not set
724# CONFIG_LDM_PARTITION is not set
725# CONFIG_SGI_PARTITION is not set
726# CONFIG_ULTRIX_PARTITION is not set
727# CONFIG_SUN_PARTITION is not set
728# CONFIG_KARMA_PARTITION is not set
729# CONFIG_EFI_PARTITION is not set
730
731#
732# Native Language Support
733#
734CONFIG_NLS=y
735CONFIG_NLS_DEFAULT="iso8859-1"
736CONFIG_NLS_CODEPAGE_437=y
737# CONFIG_NLS_CODEPAGE_737 is not set
738# CONFIG_NLS_CODEPAGE_775 is not set
739# CONFIG_NLS_CODEPAGE_850 is not set
740# CONFIG_NLS_CODEPAGE_852 is not set
741# CONFIG_NLS_CODEPAGE_855 is not set
742# CONFIG_NLS_CODEPAGE_857 is not set
743# CONFIG_NLS_CODEPAGE_860 is not set
744# CONFIG_NLS_CODEPAGE_861 is not set
745# CONFIG_NLS_CODEPAGE_862 is not set
746# CONFIG_NLS_CODEPAGE_863 is not set
747# CONFIG_NLS_CODEPAGE_864 is not set
748# CONFIG_NLS_CODEPAGE_865 is not set
749# CONFIG_NLS_CODEPAGE_866 is not set
750# CONFIG_NLS_CODEPAGE_869 is not set
751# CONFIG_NLS_CODEPAGE_936 is not set
752# CONFIG_NLS_CODEPAGE_950 is not set
753# CONFIG_NLS_CODEPAGE_932 is not set
754# CONFIG_NLS_CODEPAGE_949 is not set
755# CONFIG_NLS_CODEPAGE_874 is not set
756# CONFIG_NLS_ISO8859_8 is not set
757# CONFIG_NLS_CODEPAGE_1250 is not set
758# CONFIG_NLS_CODEPAGE_1251 is not set
759CONFIG_NLS_ASCII=y
760CONFIG_NLS_ISO8859_1=y
761# CONFIG_NLS_ISO8859_2 is not set
762# CONFIG_NLS_ISO8859_3 is not set
763# CONFIG_NLS_ISO8859_4 is not set
764# CONFIG_NLS_ISO8859_5 is not set
765# CONFIG_NLS_ISO8859_6 is not set
766# CONFIG_NLS_ISO8859_7 is not set
767# CONFIG_NLS_ISO8859_9 is not set
768# CONFIG_NLS_ISO8859_13 is not set
769# CONFIG_NLS_ISO8859_14 is not set
770# CONFIG_NLS_ISO8859_15 is not set
771# CONFIG_NLS_KOI8_R is not set
772# CONFIG_NLS_KOI8_U is not set
773CONFIG_NLS_UTF8=y
774
775#
776# Library routines
777#
778CONFIG_CRC_CCITT=y
779# CONFIG_CRC16 is not set
780CONFIG_CRC32=y
781# CONFIG_LIBCRC32C is not set
782CONFIG_ZLIB_INFLATE=y
783CONFIG_ZLIB_DEFLATE=y
784
785#
786# Kernel hacking
787#
788# CONFIG_PRINTK_TIME is not set
789# CONFIG_MAGIC_SYSRQ is not set
790CONFIG_DEBUG_KERNEL=y
791CONFIG_LOG_BUF_SHIFT=14
792CONFIG_DETECT_SOFTLOCKUP=y
793# CONFIG_SCHEDSTATS is not set
794# CONFIG_DEBUG_SLAB is not set
795# CONFIG_DEBUG_MUTEXES is not set
796# CONFIG_DEBUG_SPINLOCK is not set
797# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
798# CONFIG_DEBUG_KOBJECT is not set
799CONFIG_DEBUG_INFO=y
800# CONFIG_DEBUG_FS is not set
801# CONFIG_DEBUG_VM is not set
802# CONFIG_UNWIND_INFO is not set
803CONFIG_FORCED_INLINING=y
804# CONFIG_RCU_TORTURE_TEST is not set
805# CONFIG_DEBUGGER is not set
806# CONFIG_KGDB_CONSOLE is not set
807CONFIG_BDI_SWITCH=y
808# CONFIG_BOOTX_TEXT is not set
809# CONFIG_PPC_EARLY_DEBUG is not set
810
811#
812# Security options
813#
814# CONFIG_KEYS is not set
815# CONFIG_SECURITY is not set
816
817#
818# Cryptographic options
819#
820CONFIG_CRYPTO=y
821# CONFIG_CRYPTO_HMAC is not set
822# CONFIG_CRYPTO_NULL is not set
823# CONFIG_CRYPTO_MD4 is not set
824CONFIG_CRYPTO_MD5=y
825# CONFIG_CRYPTO_SHA1 is not set
826# CONFIG_CRYPTO_SHA256 is not set
827# CONFIG_CRYPTO_SHA512 is not set
828# CONFIG_CRYPTO_WP512 is not set
829# CONFIG_CRYPTO_TGR192 is not set
830CONFIG_CRYPTO_DES=y
831# CONFIG_CRYPTO_BLOWFISH is not set
832# CONFIG_CRYPTO_TWOFISH is not set
833# CONFIG_CRYPTO_SERPENT is not set
834# CONFIG_CRYPTO_AES is not set
835# CONFIG_CRYPTO_CAST5 is not set
836# CONFIG_CRYPTO_CAST6 is not set
837# CONFIG_CRYPTO_TEA is not set
838# CONFIG_CRYPTO_ARC4 is not set
839# CONFIG_CRYPTO_KHAZAD is not set
840# CONFIG_CRYPTO_ANUBIS is not set
841# CONFIG_CRYPTO_DEFLATE is not set
842# CONFIG_CRYPTO_MICHAEL_MIC is not set
843# CONFIG_CRYPTO_CRC32C is not set
844# CONFIG_CRYPTO_TEST is not set
845
846#
847# Hardware crypto devices
848#
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
new file mode 100644
index 000000000000..f87523716c44
--- /dev/null
+++ b/arch/powerpc/configs/mpc8313_rdb_defconfig
@@ -0,0 +1,1409 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Wed Feb 7 22:08:04 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set
74CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y
77CONFIG_EMBEDDED=y
78CONFIG_SYSCTL_SYSCALL=y
79# CONFIG_KALLSYMS is not set
80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y
82CONFIG_BUG=y
83CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y
86# CONFIG_EPOLL is not set
87CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94
95#
96# Loadable module support
97#
98CONFIG_MODULES=y
99CONFIG_MODULE_UNLOAD=y
100# CONFIG_MODULE_FORCE_UNLOAD is not set
101# CONFIG_MODVERSIONS is not set
102# CONFIG_MODULE_SRCVERSION_ALL is not set
103# CONFIG_KMOD is not set
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_LBD is not set
110# CONFIG_BLK_DEV_IO_TRACE is not set
111# CONFIG_LSF is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131CONFIG_MPC8313_RDB=y
132# CONFIG_MPC832x_MDS is not set
133# CONFIG_MPC834x_SYS is not set
134# CONFIG_MPC834x_ITX is not set
135# CONFIG_MPC8360E_PB is not set
136CONFIG_PPC_MPC831x=y
137# CONFIG_MPIC is not set
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_BINFMT_ELF=y
152# CONFIG_BINFMT_MISC is not set
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set
159# CONFIG_SPARSEMEM_MANUAL is not set
160CONFIG_FLATMEM=y
161CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set
165CONFIG_PROC_DEVICETREE=y
166# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set
168CONFIG_SECCOMP=y
169CONFIG_ISA_DMA_API=y
170
171#
172# Bus options
173#
174CONFIG_GENERIC_ISA_DMA=y
175# CONFIG_MPIC_WEIRD is not set
176# CONFIG_PPC_I8259 is not set
177CONFIG_PPC_INDIRECT_PCI=y
178CONFIG_FSL_SOC=y
179CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set
182# CONFIG_PCI_DEBUG is not set
183
184#
185# PCCARD (PCMCIA/CardBus) support
186#
187# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192# CONFIG_HOTPLUG_PCI is not set
193
194#
195# Advanced setup
196#
197# CONFIG_ADVANCED_OPTIONS is not set
198
199#
200# Default settings for advanced configuration options are used
201#
202CONFIG_HIGHMEM_START=0xfe000000
203CONFIG_LOWMEM_SIZE=0x30000000
204CONFIG_KERNEL_START=0xc0000000
205CONFIG_TASK_SIZE=0x80000000
206CONFIG_BOOT_LOAD=0x00800000
207
208#
209# Networking
210#
211CONFIG_NET=y
212
213#
214# Networking options
215#
216# CONFIG_NETDEBUG is not set
217CONFIG_PACKET=y
218# CONFIG_PACKET_MMAP is not set
219CONFIG_UNIX=y
220CONFIG_XFRM=y
221# CONFIG_XFRM_USER is not set
222# CONFIG_XFRM_SUB_POLICY is not set
223# CONFIG_NET_KEY is not set
224CONFIG_INET=y
225CONFIG_IP_MULTICAST=y
226# CONFIG_IP_ADVANCED_ROUTER is not set
227CONFIG_IP_FIB_HASH=y
228CONFIG_IP_PNP=y
229CONFIG_IP_PNP_DHCP=y
230CONFIG_IP_PNP_BOOTP=y
231# CONFIG_IP_PNP_RARP is not set
232# CONFIG_NET_IPIP is not set
233# CONFIG_NET_IPGRE is not set
234# CONFIG_IP_MROUTE is not set
235# CONFIG_ARPD is not set
236CONFIG_SYN_COOKIES=y
237# CONFIG_INET_AH is not set
238# CONFIG_INET_ESP is not set
239# CONFIG_INET_IPCOMP is not set
240# CONFIG_INET_XFRM_TUNNEL is not set
241# CONFIG_INET_TUNNEL is not set
242CONFIG_INET_XFRM_MODE_TRANSPORT=y
243CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_XFRM_MODE_BEET=y
245CONFIG_INET_DIAG=y
246CONFIG_INET_TCP_DIAG=y
247# CONFIG_TCP_CONG_ADVANCED is not set
248CONFIG_TCP_CONG_CUBIC=y
249CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set
252# CONFIG_INET6_XFRM_TUNNEL is not set
253# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set
271# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set
273# CONFIG_VLAN_8021Q is not set
274# CONFIG_DECNET is not set
275# CONFIG_LLC2 is not set
276# CONFIG_IPX is not set
277# CONFIG_ATALK is not set
278# CONFIG_X25 is not set
279# CONFIG_LAPB is not set
280# CONFIG_ECONET is not set
281# CONFIG_WAN_ROUTER is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287
288#
289# Network testing
290#
291# CONFIG_NET_PKTGEN is not set
292# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set
294# CONFIG_BT is not set
295# CONFIG_IEEE80211 is not set
296
297#
298# Device Drivers
299#
300
301#
302# Generic Driver Options
303#
304CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_SYS_HYPERVISOR is not set
309
310#
311# Connector - unified userspace <-> kernelspace linker
312#
313# CONFIG_CONNECTOR is not set
314
315#
316# Memory Technology Devices (MTD)
317#
318CONFIG_MTD=y
319# CONFIG_MTD_DEBUG is not set
320# CONFIG_MTD_CONCAT is not set
321# CONFIG_MTD_PARTITIONS is not set
322
323#
324# User Modules And Translation Layers
325#
326CONFIG_MTD_CHAR=y
327# CONFIG_MTD_BLKDEVS is not set
328# CONFIG_MTD_BLOCK is not set
329# CONFIG_MTD_BLOCK_RO is not set
330# CONFIG_FTL is not set
331# CONFIG_NFTL is not set
332# CONFIG_INFTL is not set
333# CONFIG_RFD_FTL is not set
334# CONFIG_SSFDC is not set
335
336#
337# RAM/ROM/Flash chip drivers
338#
339CONFIG_MTD_CFI=y
340# CONFIG_MTD_JEDECPROBE is not set
341CONFIG_MTD_GEN_PROBE=y
342# CONFIG_MTD_CFI_ADV_OPTIONS is not set
343CONFIG_MTD_MAP_BANK_WIDTH_1=y
344CONFIG_MTD_MAP_BANK_WIDTH_2=y
345CONFIG_MTD_MAP_BANK_WIDTH_4=y
346# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
347# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
348# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
349CONFIG_MTD_CFI_I1=y
350CONFIG_MTD_CFI_I2=y
351# CONFIG_MTD_CFI_I4 is not set
352# CONFIG_MTD_CFI_I8 is not set
353# CONFIG_MTD_CFI_INTELEXT is not set
354CONFIG_MTD_CFI_AMDSTD=y
355# CONFIG_MTD_CFI_STAA is not set
356CONFIG_MTD_CFI_UTIL=y
357# CONFIG_MTD_RAM is not set
358# CONFIG_MTD_ROM is not set
359# CONFIG_MTD_ABSENT is not set
360# CONFIG_MTD_OBSOLETE_CHIPS is not set
361
362#
363# Mapping drivers for chip access
364#
365# CONFIG_MTD_COMPLEX_MAPPINGS is not set
366CONFIG_MTD_PHYSMAP=y
367CONFIG_MTD_PHYSMAP_START=0xfe000000
368CONFIG_MTD_PHYSMAP_LEN=0x1000000
369CONFIG_MTD_PHYSMAP_BANKWIDTH=2
370# CONFIG_MTD_PHYSMAP_OF is not set
371# CONFIG_MTD_PLATRAM is not set
372
373#
374# Self-contained MTD device drivers
375#
376# CONFIG_MTD_PMC551 is not set
377# CONFIG_MTD_DATAFLASH is not set
378# CONFIG_MTD_M25P80 is not set
379# CONFIG_MTD_SLRAM is not set
380# CONFIG_MTD_PHRAM is not set
381# CONFIG_MTD_MTDRAM is not set
382# CONFIG_MTD_BLOCK2MTD is not set
383
384#
385# Disk-On-Chip Device Drivers
386#
387# CONFIG_MTD_DOC2000 is not set
388# CONFIG_MTD_DOC2001 is not set
389# CONFIG_MTD_DOC2001PLUS is not set
390
391#
392# NAND Flash Device Drivers
393#
394# CONFIG_MTD_NAND is not set
395# CONFIG_MTD_NAND_CAFE is not set
396
397#
398# OneNAND Flash Device Drivers
399#
400# CONFIG_MTD_ONENAND is not set
401
402#
403# Parallel port support
404#
405# CONFIG_PARPORT is not set
406
407#
408# Plug and Play support
409#
410
411#
412# Block devices
413#
414# CONFIG_BLK_DEV_FD is not set
415# CONFIG_BLK_CPQ_DA is not set
416# CONFIG_BLK_CPQ_CISS_DA is not set
417# CONFIG_BLK_DEV_DAC960 is not set
418# CONFIG_BLK_DEV_UMEM is not set
419# CONFIG_BLK_DEV_COW_COMMON is not set
420CONFIG_BLK_DEV_LOOP=y
421# CONFIG_BLK_DEV_CRYPTOLOOP is not set
422# CONFIG_BLK_DEV_NBD is not set
423# CONFIG_BLK_DEV_SX8 is not set
424# CONFIG_BLK_DEV_UB is not set
425CONFIG_BLK_DEV_RAM=y
426CONFIG_BLK_DEV_RAM_COUNT=16
427CONFIG_BLK_DEV_RAM_SIZE=32768
428CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
429CONFIG_BLK_DEV_INITRD=y
430# CONFIG_CDROM_PKTCDVD is not set
431# CONFIG_ATA_OVER_ETH is not set
432
433#
434# Misc devices
435#
436# CONFIG_SGI_IOC4 is not set
437# CONFIG_TIFM_CORE is not set
438
439#
440# ATA/ATAPI/MFM/RLL support
441#
442# CONFIG_IDE is not set
443
444#
445# SCSI device support
446#
447# CONFIG_RAID_ATTRS is not set
448CONFIG_SCSI=y
449# CONFIG_SCSI_TGT is not set
450# CONFIG_SCSI_NETLINK is not set
451CONFIG_SCSI_PROC_FS=y
452
453#
454# SCSI support type (disk, tape, CD-ROM)
455#
456# CONFIG_BLK_DEV_SD is not set
457# CONFIG_CHR_DEV_ST is not set
458# CONFIG_CHR_DEV_OSST is not set
459# CONFIG_BLK_DEV_SR is not set
460CONFIG_CHR_DEV_SG=y
461# CONFIG_CHR_DEV_SCH is not set
462
463#
464# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
465#
466# CONFIG_SCSI_MULTI_LUN is not set
467# CONFIG_SCSI_CONSTANTS is not set
468# CONFIG_SCSI_LOGGING is not set
469# CONFIG_SCSI_SCAN_ASYNC is not set
470
471#
472# SCSI Transports
473#
474CONFIG_SCSI_SPI_ATTRS=y
475# CONFIG_SCSI_FC_ATTRS is not set
476# CONFIG_SCSI_ISCSI_ATTRS is not set
477# CONFIG_SCSI_SAS_ATTRS is not set
478# CONFIG_SCSI_SAS_LIBSAS is not set
479
480#
481# SCSI low-level drivers
482#
483# CONFIG_ISCSI_TCP is not set
484# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
485# CONFIG_SCSI_3W_9XXX is not set
486# CONFIG_SCSI_ACARD is not set
487# CONFIG_SCSI_AACRAID is not set
488# CONFIG_SCSI_AIC7XXX is not set
489# CONFIG_SCSI_AIC7XXX_OLD is not set
490# CONFIG_SCSI_AIC79XX is not set
491# CONFIG_SCSI_AIC94XX is not set
492# CONFIG_SCSI_DPT_I2O is not set
493# CONFIG_SCSI_ARCMSR is not set
494# CONFIG_MEGARAID_NEWGEN is not set
495# CONFIG_MEGARAID_LEGACY is not set
496# CONFIG_MEGARAID_SAS is not set
497# CONFIG_SCSI_HPTIOP is not set
498# CONFIG_SCSI_BUSLOGIC is not set
499# CONFIG_SCSI_DMX3191D is not set
500# CONFIG_SCSI_EATA is not set
501# CONFIG_SCSI_FUTURE_DOMAIN is not set
502# CONFIG_SCSI_GDTH is not set
503# CONFIG_SCSI_IPS is not set
504# CONFIG_SCSI_INITIO is not set
505# CONFIG_SCSI_INIA100 is not set
506# CONFIG_SCSI_STEX is not set
507# CONFIG_SCSI_SYM53C8XX_2 is not set
508# CONFIG_SCSI_QLOGIC_1280 is not set
509# CONFIG_SCSI_QLA_FC is not set
510# CONFIG_SCSI_QLA_ISCSI is not set
511# CONFIG_SCSI_LPFC is not set
512# CONFIG_SCSI_DC395x is not set
513# CONFIG_SCSI_DC390T is not set
514# CONFIG_SCSI_NSP32 is not set
515# CONFIG_SCSI_DEBUG is not set
516# CONFIG_SCSI_SRP is not set
517
518#
519# Serial ATA (prod) and Parallel ATA (experimental) drivers
520#
521# CONFIG_ATA is not set
522
523#
524# Multi-device support (RAID and LVM)
525#
526CONFIG_MD=y
527CONFIG_BLK_DEV_MD=y
528CONFIG_MD_LINEAR=y
529CONFIG_MD_RAID0=y
530CONFIG_MD_RAID1=y
531# CONFIG_MD_RAID10 is not set
532# CONFIG_MD_RAID456 is not set
533# CONFIG_MD_MULTIPATH is not set
534# CONFIG_MD_FAULTY is not set
535# CONFIG_BLK_DEV_DM is not set
536
537#
538# Fusion MPT device support
539#
540# CONFIG_FUSION is not set
541# CONFIG_FUSION_SPI is not set
542# CONFIG_FUSION_FC is not set
543# CONFIG_FUSION_SAS is not set
544
545#
546# IEEE 1394 (FireWire) support
547#
548# CONFIG_IEEE1394 is not set
549
550#
551# I2O device support
552#
553# CONFIG_I2O is not set
554
555#
556# Macintosh device drivers
557#
558# CONFIG_MAC_EMUMOUSEBTN is not set
559# CONFIG_WINDFARM is not set
560
561#
562# Network device support
563#
564CONFIG_NETDEVICES=y
565# CONFIG_DUMMY is not set
566# CONFIG_BONDING is not set
567# CONFIG_EQUALIZER is not set
568# CONFIG_TUN is not set
569
570#
571# ARCnet devices
572#
573# CONFIG_ARCNET is not set
574
575#
576# PHY device support
577#
578CONFIG_PHYLIB=y
579
580#
581# MII PHY device drivers
582#
583# CONFIG_MARVELL_PHY is not set
584# CONFIG_DAVICOM_PHY is not set
585# CONFIG_QSEMI_PHY is not set
586# CONFIG_LXT_PHY is not set
587CONFIG_CICADA_PHY=y
588# CONFIG_VITESSE_PHY is not set
589# CONFIG_SMSC_PHY is not set
590# CONFIG_BROADCOM_PHY is not set
591# CONFIG_FIXED_PHY is not set
592
593#
594# Ethernet (10 or 100Mbit)
595#
596CONFIG_NET_ETHERNET=y
597CONFIG_MII=y
598# CONFIG_HAPPYMEAL is not set
599# CONFIG_SUNGEM is not set
600# CONFIG_CASSINI is not set
601# CONFIG_NET_VENDOR_3COM is not set
602
603#
604# Tulip family network device support
605#
606# CONFIG_NET_TULIP is not set
607# CONFIG_HP100 is not set
608CONFIG_NET_PCI=y
609# CONFIG_PCNET32 is not set
610# CONFIG_AMD8111_ETH is not set
611# CONFIG_ADAPTEC_STARFIRE is not set
612# CONFIG_B44 is not set
613# CONFIG_FORCEDETH is not set
614# CONFIG_DGRS is not set
615# CONFIG_EEPRO100 is not set
616CONFIG_E100=y
617# CONFIG_FEALNX is not set
618# CONFIG_NATSEMI is not set
619# CONFIG_NE2K_PCI is not set
620# CONFIG_8139CP is not set
621# CONFIG_8139TOO is not set
622# CONFIG_SIS900 is not set
623# CONFIG_EPIC100 is not set
624# CONFIG_SUNDANCE is not set
625# CONFIG_TLAN is not set
626# CONFIG_VIA_RHINE is not set
627
628#
629# Ethernet (1000 Mbit)
630#
631# CONFIG_ACENIC is not set
632# CONFIG_DL2K is not set
633# CONFIG_E1000 is not set
634# CONFIG_NS83820 is not set
635# CONFIG_HAMACHI is not set
636# CONFIG_YELLOWFIN is not set
637# CONFIG_R8169 is not set
638# CONFIG_SIS190 is not set
639# CONFIG_SKGE is not set
640# CONFIG_SKY2 is not set
641# CONFIG_SK98LIN is not set
642# CONFIG_VIA_VELOCITY is not set
643# CONFIG_TIGON3 is not set
644# CONFIG_BNX2 is not set
645CONFIG_GIANFAR=y
646CONFIG_GFAR_NAPI=y
647# CONFIG_QLA3XXX is not set
648
649#
650# Ethernet (10000 Mbit)
651#
652# CONFIG_CHELSIO_T1 is not set
653# CONFIG_IXGB is not set
654# CONFIG_S2IO is not set
655# CONFIG_MYRI10GE is not set
656# CONFIG_NETXEN_NIC is not set
657
658#
659# Token Ring devices
660#
661# CONFIG_TR is not set
662
663#
664# Wireless LAN (non-hamradio)
665#
666# CONFIG_NET_RADIO is not set
667
668#
669# Wan interfaces
670#
671# CONFIG_WAN is not set
672# CONFIG_FDDI is not set
673# CONFIG_HIPPI is not set
674# CONFIG_PPP is not set
675# CONFIG_SLIP is not set
676# CONFIG_NET_FC is not set
677# CONFIG_SHAPER is not set
678# CONFIG_NETCONSOLE is not set
679# CONFIG_NETPOLL is not set
680# CONFIG_NET_POLL_CONTROLLER is not set
681
682#
683# ISDN subsystem
684#
685# CONFIG_ISDN is not set
686
687#
688# Telephony Support
689#
690# CONFIG_PHONE is not set
691
692#
693# Input device support
694#
695CONFIG_INPUT=y
696# CONFIG_INPUT_FF_MEMLESS is not set
697
698#
699# Userland interfaces
700#
701# CONFIG_INPUT_MOUSEDEV is not set
702# CONFIG_INPUT_JOYDEV is not set
703# CONFIG_INPUT_TSDEV is not set
704# CONFIG_INPUT_EVDEV is not set
705# CONFIG_INPUT_EVBUG is not set
706
707#
708# Input Device Drivers
709#
710# CONFIG_INPUT_KEYBOARD is not set
711# CONFIG_INPUT_MOUSE is not set
712# CONFIG_INPUT_JOYSTICK is not set
713# CONFIG_INPUT_TOUCHSCREEN is not set
714# CONFIG_INPUT_MISC is not set
715
716#
717# Hardware I/O ports
718#
719# CONFIG_SERIO is not set
720# CONFIG_GAMEPORT is not set
721
722#
723# Character devices
724#
725# CONFIG_VT is not set
726# CONFIG_SERIAL_NONSTANDARD is not set
727
728#
729# Serial drivers
730#
731CONFIG_SERIAL_8250=y
732CONFIG_SERIAL_8250_CONSOLE=y
733CONFIG_SERIAL_8250_PCI=y
734CONFIG_SERIAL_8250_NR_UARTS=4
735CONFIG_SERIAL_8250_RUNTIME_UARTS=4
736# CONFIG_SERIAL_8250_EXTENDED is not set
737
738#
739# Non-8250 serial port support
740#
741# CONFIG_SERIAL_UARTLITE is not set
742CONFIG_SERIAL_CORE=y
743CONFIG_SERIAL_CORE_CONSOLE=y
744# CONFIG_SERIAL_JSM is not set
745CONFIG_UNIX98_PTYS=y
746CONFIG_LEGACY_PTYS=y
747CONFIG_LEGACY_PTY_COUNT=256
748
749#
750# IPMI
751#
752# CONFIG_IPMI_HANDLER is not set
753
754#
755# Watchdog Cards
756#
757CONFIG_WATCHDOG=y
758# CONFIG_WATCHDOG_NOWAYOUT is not set
759
760#
761# Watchdog Device Drivers
762#
763# CONFIG_SOFT_WATCHDOG is not set
764CONFIG_83xx_WDT=y
765
766#
767# PCI-based Watchdog Cards
768#
769# CONFIG_PCIPCWATCHDOG is not set
770# CONFIG_WDTPCI is not set
771
772#
773# USB-based Watchdog Cards
774#
775# CONFIG_USBPCWATCHDOG is not set
776CONFIG_HW_RANDOM=y
777# CONFIG_NVRAM is not set
778# CONFIG_GEN_RTC is not set
779# CONFIG_DTLK is not set
780# CONFIG_R3964 is not set
781# CONFIG_APPLICOM is not set
782# CONFIG_AGP is not set
783# CONFIG_DRM is not set
784# CONFIG_RAW_DRIVER is not set
785
786#
787# TPM devices
788#
789# CONFIG_TCG_TPM is not set
790
791#
792# I2C support
793#
794CONFIG_I2C=y
795CONFIG_I2C_CHARDEV=y
796
797#
798# I2C Algorithms
799#
800# CONFIG_I2C_ALGOBIT is not set
801# CONFIG_I2C_ALGOPCF is not set
802# CONFIG_I2C_ALGOPCA is not set
803
804#
805# I2C Hardware Bus support
806#
807# CONFIG_I2C_ALI1535 is not set
808# CONFIG_I2C_ALI1563 is not set
809# CONFIG_I2C_ALI15X3 is not set
810# CONFIG_I2C_AMD756 is not set
811# CONFIG_I2C_AMD8111 is not set
812# CONFIG_I2C_I801 is not set
813# CONFIG_I2C_I810 is not set
814# CONFIG_I2C_PIIX4 is not set
815CONFIG_I2C_MPC=y
816# CONFIG_I2C_NFORCE2 is not set
817# CONFIG_I2C_OCORES is not set
818# CONFIG_I2C_PARPORT_LIGHT is not set
819# CONFIG_I2C_PROSAVAGE is not set
820# CONFIG_I2C_SAVAGE4 is not set
821# CONFIG_I2C_SIS5595 is not set
822# CONFIG_I2C_SIS630 is not set
823# CONFIG_I2C_SIS96X is not set
824# CONFIG_I2C_STUB is not set
825# CONFIG_I2C_VIA is not set
826# CONFIG_I2C_VIAPRO is not set
827# CONFIG_I2C_VOODOO3 is not set
828# CONFIG_I2C_PCA_ISA is not set
829
830#
831# Miscellaneous I2C Chip support
832#
833# CONFIG_SENSORS_DS1337 is not set
834# CONFIG_SENSORS_DS1374 is not set
835# CONFIG_SENSORS_EEPROM is not set
836# CONFIG_SENSORS_PCF8574 is not set
837# CONFIG_SENSORS_PCA9539 is not set
838# CONFIG_SENSORS_PCF8591 is not set
839# CONFIG_SENSORS_M41T00 is not set
840# CONFIG_SENSORS_MAX6875 is not set
841# CONFIG_I2C_DEBUG_CORE is not set
842# CONFIG_I2C_DEBUG_ALGO is not set
843# CONFIG_I2C_DEBUG_BUS is not set
844# CONFIG_I2C_DEBUG_CHIP is not set
845
846#
847# SPI support
848#
849CONFIG_SPI=y
850# CONFIG_SPI_DEBUG is not set
851CONFIG_SPI_MASTER=y
852
853#
854# SPI Master Controller Drivers
855#
856CONFIG_SPI_BITBANG=y
857CONFIG_SPI_MPC83xx=y
858
859#
860# SPI Protocol Masters
861#
862
863#
864# Dallas's 1-wire bus
865#
866# CONFIG_W1 is not set
867
868#
869# Hardware Monitoring support
870#
871CONFIG_HWMON=y
872# CONFIG_HWMON_VID is not set
873# CONFIG_SENSORS_ABITUGURU is not set
874# CONFIG_SENSORS_ADM1021 is not set
875# CONFIG_SENSORS_ADM1025 is not set
876# CONFIG_SENSORS_ADM1026 is not set
877# CONFIG_SENSORS_ADM1031 is not set
878# CONFIG_SENSORS_ADM9240 is not set
879# CONFIG_SENSORS_ASB100 is not set
880# CONFIG_SENSORS_ATXP1 is not set
881# CONFIG_SENSORS_DS1621 is not set
882# CONFIG_SENSORS_F71805F is not set
883# CONFIG_SENSORS_FSCHER is not set
884# CONFIG_SENSORS_FSCPOS is not set
885# CONFIG_SENSORS_GL518SM is not set
886# CONFIG_SENSORS_GL520SM is not set
887# CONFIG_SENSORS_IT87 is not set
888# CONFIG_SENSORS_LM63 is not set
889# CONFIG_SENSORS_LM70 is not set
890# CONFIG_SENSORS_LM75 is not set
891# CONFIG_SENSORS_LM77 is not set
892# CONFIG_SENSORS_LM78 is not set
893# CONFIG_SENSORS_LM80 is not set
894# CONFIG_SENSORS_LM83 is not set
895# CONFIG_SENSORS_LM85 is not set
896# CONFIG_SENSORS_LM87 is not set
897# CONFIG_SENSORS_LM90 is not set
898# CONFIG_SENSORS_LM92 is not set
899# CONFIG_SENSORS_MAX1619 is not set
900# CONFIG_SENSORS_PC87360 is not set
901# CONFIG_SENSORS_PC87427 is not set
902# CONFIG_SENSORS_SIS5595 is not set
903# CONFIG_SENSORS_SMSC47M1 is not set
904# CONFIG_SENSORS_SMSC47M192 is not set
905# CONFIG_SENSORS_SMSC47B397 is not set
906# CONFIG_SENSORS_VIA686A is not set
907# CONFIG_SENSORS_VT1211 is not set
908# CONFIG_SENSORS_VT8231 is not set
909# CONFIG_SENSORS_W83781D is not set
910# CONFIG_SENSORS_W83791D is not set
911# CONFIG_SENSORS_W83792D is not set
912# CONFIG_SENSORS_W83793 is not set
913# CONFIG_SENSORS_W83L785TS is not set
914# CONFIG_SENSORS_W83627HF is not set
915# CONFIG_SENSORS_W83627EHF is not set
916# CONFIG_HWMON_DEBUG_CHIP is not set
917
918#
919# Multimedia devices
920#
921# CONFIG_VIDEO_DEV is not set
922
923#
924# Digital Video Broadcasting Devices
925#
926# CONFIG_DVB is not set
927# CONFIG_USB_DABUSB is not set
928
929#
930# Graphics support
931#
932CONFIG_FIRMWARE_EDID=y
933# CONFIG_FB is not set
934# CONFIG_FB_IBM_GXT4500 is not set
935# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
936
937#
938# Sound
939#
940# CONFIG_SOUND is not set
941
942#
943# HID Devices
944#
945CONFIG_HID=y
946
947#
948# USB support
949#
950CONFIG_USB_ARCH_HAS_HCD=y
951CONFIG_USB_ARCH_HAS_OHCI=y
952CONFIG_USB_ARCH_HAS_EHCI=y
953CONFIG_USB=y
954# CONFIG_USB_DEBUG is not set
955
956#
957# Miscellaneous USB options
958#
959CONFIG_USB_DEVICEFS=y
960# CONFIG_USB_BANDWIDTH is not set
961# CONFIG_USB_DYNAMIC_MINORS is not set
962# CONFIG_USB_OTG is not set
963
964#
965# USB Host Controller Drivers
966#
967CONFIG_USB_EHCI_HCD=y
968# CONFIG_USB_EHCI_SPLIT_ISO is not set
969# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
970# CONFIG_USB_EHCI_TT_NEWSCHED is not set
971# CONFIG_USB_ISP116X_HCD is not set
972CONFIG_USB_OHCI_HCD=y
973# CONFIG_USB_OHCI_BIG_ENDIAN is not set
974CONFIG_USB_OHCI_LITTLE_ENDIAN=y
975CONFIG_USB_UHCI_HCD=y
976# CONFIG_USB_SL811_HCD is not set
977
978#
979# USB Device Class drivers
980#
981# CONFIG_USB_ACM is not set
982# CONFIG_USB_PRINTER is not set
983
984#
985# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
986#
987
988#
989# may also be needed; see USB_STORAGE Help for more information
990#
991CONFIG_USB_STORAGE=y
992# CONFIG_USB_STORAGE_DEBUG is not set
993# CONFIG_USB_STORAGE_DATAFAB is not set
994# CONFIG_USB_STORAGE_FREECOM is not set
995# CONFIG_USB_STORAGE_DPCM is not set
996# CONFIG_USB_STORAGE_USBAT is not set
997# CONFIG_USB_STORAGE_SDDR09 is not set
998# CONFIG_USB_STORAGE_SDDR55 is not set
999# CONFIG_USB_STORAGE_JUMPSHOT is not set
1000# CONFIG_USB_STORAGE_ALAUDA is not set
1001# CONFIG_USB_STORAGE_KARMA is not set
1002# CONFIG_USB_LIBUSUAL is not set
1003
1004#
1005# USB Input Devices
1006#
1007# CONFIG_USB_HID is not set
1008
1009#
1010# USB HID Boot Protocol drivers
1011#
1012# CONFIG_USB_KBD is not set
1013# CONFIG_USB_MOUSE is not set
1014# CONFIG_USB_AIPTEK is not set
1015# CONFIG_USB_WACOM is not set
1016# CONFIG_USB_ACECAD is not set
1017# CONFIG_USB_KBTAB is not set
1018# CONFIG_USB_POWERMATE is not set
1019# CONFIG_USB_TOUCHSCREEN is not set
1020# CONFIG_USB_YEALINK is not set
1021# CONFIG_USB_XPAD is not set
1022# CONFIG_USB_ATI_REMOTE is not set
1023# CONFIG_USB_ATI_REMOTE2 is not set
1024# CONFIG_USB_KEYSPAN_REMOTE is not set
1025# CONFIG_USB_APPLETOUCH is not set
1026
1027#
1028# USB Imaging devices
1029#
1030# CONFIG_USB_MDC800 is not set
1031# CONFIG_USB_MICROTEK is not set
1032
1033#
1034# USB Network Adapters
1035#
1036# CONFIG_USB_CATC is not set
1037# CONFIG_USB_KAWETH is not set
1038# CONFIG_USB_PEGASUS is not set
1039# CONFIG_USB_RTL8150 is not set
1040# CONFIG_USB_USBNET_MII is not set
1041# CONFIG_USB_USBNET is not set
1042CONFIG_USB_MON=y
1043
1044#
1045# USB port drivers
1046#
1047
1048#
1049# USB Serial Converter support
1050#
1051# CONFIG_USB_SERIAL is not set
1052
1053#
1054# USB Miscellaneous drivers
1055#
1056# CONFIG_USB_EMI62 is not set
1057# CONFIG_USB_EMI26 is not set
1058# CONFIG_USB_ADUTUX is not set
1059# CONFIG_USB_AUERSWALD is not set
1060# CONFIG_USB_RIO500 is not set
1061# CONFIG_USB_LEGOTOWER is not set
1062# CONFIG_USB_LCD is not set
1063# CONFIG_USB_LED is not set
1064# CONFIG_USB_CYPRESS_CY7C63 is not set
1065# CONFIG_USB_CYTHERM is not set
1066# CONFIG_USB_PHIDGET is not set
1067# CONFIG_USB_IDMOUSE is not set
1068# CONFIG_USB_FTDI_ELAN is not set
1069# CONFIG_USB_APPLEDISPLAY is not set
1070# CONFIG_USB_SISUSBVGA is not set
1071# CONFIG_USB_LD is not set
1072# CONFIG_USB_TRANCEVIBRATOR is not set
1073# CONFIG_USB_TEST is not set
1074
1075#
1076# USB DSL modem support
1077#
1078
1079#
1080# USB Gadget Support
1081#
1082CONFIG_USB_GADGET=y
1083# CONFIG_USB_GADGET_DEBUG_FILES is not set
1084CONFIG_USB_GADGET_SELECTED=y
1085CONFIG_USB_GADGET_NET2280=y
1086CONFIG_USB_NET2280=y
1087# CONFIG_USB_GADGET_PXA2XX is not set
1088# CONFIG_USB_GADGET_GOKU is not set
1089# CONFIG_USB_GADGET_LH7A40X is not set
1090# CONFIG_USB_GADGET_OMAP is not set
1091# CONFIG_USB_GADGET_AT91 is not set
1092# CONFIG_USB_GADGET_DUMMY_HCD is not set
1093CONFIG_USB_GADGET_DUALSPEED=y
1094# CONFIG_USB_ZERO is not set
1095CONFIG_USB_ETH=y
1096CONFIG_USB_ETH_RNDIS=y
1097# CONFIG_USB_GADGETFS is not set
1098# CONFIG_USB_FILE_STORAGE is not set
1099# CONFIG_USB_G_SERIAL is not set
1100# CONFIG_USB_MIDI_GADGET is not set
1101
1102#
1103# MMC/SD Card support
1104#
1105# CONFIG_MMC is not set
1106
1107#
1108# LED devices
1109#
1110# CONFIG_NEW_LEDS is not set
1111
1112#
1113# LED drivers
1114#
1115
1116#
1117# LED Triggers
1118#
1119
1120#
1121# InfiniBand support
1122#
1123# CONFIG_INFINIBAND is not set
1124
1125#
1126# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1127#
1128
1129#
1130# Real Time Clock
1131#
1132CONFIG_RTC_LIB=y
1133CONFIG_RTC_CLASS=y
1134CONFIG_RTC_HCTOSYS=y
1135CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1136# CONFIG_RTC_DEBUG is not set
1137
1138#
1139# RTC interfaces
1140#
1141CONFIG_RTC_INTF_SYSFS=y
1142CONFIG_RTC_INTF_PROC=y
1143CONFIG_RTC_INTF_DEV=y
1144CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1145
1146#
1147# RTC drivers
1148#
1149# CONFIG_RTC_DRV_X1205 is not set
1150CONFIG_RTC_DRV_DS1307=y
1151# CONFIG_RTC_DRV_DS1553 is not set
1152# CONFIG_RTC_DRV_ISL1208 is not set
1153# CONFIG_RTC_DRV_DS1672 is not set
1154# CONFIG_RTC_DRV_DS1742 is not set
1155# CONFIG_RTC_DRV_PCF8563 is not set
1156# CONFIG_RTC_DRV_PCF8583 is not set
1157# CONFIG_RTC_DRV_RS5C348 is not set
1158# CONFIG_RTC_DRV_RS5C372 is not set
1159# CONFIG_RTC_DRV_M48T86 is not set
1160# CONFIG_RTC_DRV_TEST is not set
1161# CONFIG_RTC_DRV_MAX6902 is not set
1162# CONFIG_RTC_DRV_V3020 is not set
1163
1164#
1165# DMA Engine support
1166#
1167CONFIG_DMA_ENGINE=y
1168
1169#
1170# DMA Clients
1171#
1172CONFIG_NET_DMA=y
1173
1174#
1175# DMA Devices
1176#
1177CONFIG_INTEL_IOATDMA=y
1178
1179#
1180# Virtualization
1181#
1182
1183#
1184# File systems
1185#
1186CONFIG_EXT2_FS=y
1187# CONFIG_EXT2_FS_XATTR is not set
1188# CONFIG_EXT2_FS_XIP is not set
1189CONFIG_EXT3_FS=y
1190CONFIG_EXT3_FS_XATTR=y
1191# CONFIG_EXT3_FS_POSIX_ACL is not set
1192# CONFIG_EXT3_FS_SECURITY is not set
1193# CONFIG_EXT4DEV_FS is not set
1194CONFIG_JBD=y
1195# CONFIG_JBD_DEBUG is not set
1196CONFIG_FS_MBCACHE=y
1197# CONFIG_REISERFS_FS is not set
1198# CONFIG_JFS_FS is not set
1199# CONFIG_FS_POSIX_ACL is not set
1200# CONFIG_XFS_FS is not set
1201# CONFIG_GFS2_FS is not set
1202# CONFIG_OCFS2_FS is not set
1203# CONFIG_MINIX_FS is not set
1204# CONFIG_ROMFS_FS is not set
1205CONFIG_INOTIFY=y
1206CONFIG_INOTIFY_USER=y
1207# CONFIG_QUOTA is not set
1208CONFIG_DNOTIFY=y
1209# CONFIG_AUTOFS_FS is not set
1210# CONFIG_AUTOFS4_FS is not set
1211# CONFIG_FUSE_FS is not set
1212
1213#
1214# CD-ROM/DVD Filesystems
1215#
1216# CONFIG_ISO9660_FS is not set
1217# CONFIG_UDF_FS is not set
1218
1219#
1220# DOS/FAT/NT Filesystems
1221#
1222# CONFIG_MSDOS_FS is not set
1223# CONFIG_VFAT_FS is not set
1224# CONFIG_NTFS_FS is not set
1225
1226#
1227# Pseudo filesystems
1228#
1229CONFIG_PROC_FS=y
1230CONFIG_PROC_KCORE=y
1231CONFIG_PROC_SYSCTL=y
1232CONFIG_SYSFS=y
1233CONFIG_TMPFS=y
1234# CONFIG_TMPFS_POSIX_ACL is not set
1235# CONFIG_HUGETLB_PAGE is not set
1236CONFIG_RAMFS=y
1237# CONFIG_CONFIGFS_FS is not set
1238
1239#
1240# Miscellaneous filesystems
1241#
1242# CONFIG_ADFS_FS is not set
1243# CONFIG_AFFS_FS is not set
1244# CONFIG_HFS_FS is not set
1245# CONFIG_HFSPLUS_FS is not set
1246# CONFIG_BEFS_FS is not set
1247# CONFIG_BFS_FS is not set
1248# CONFIG_EFS_FS is not set
1249# CONFIG_JFFS2_FS is not set
1250# CONFIG_CRAMFS is not set
1251# CONFIG_VXFS_FS is not set
1252# CONFIG_HPFS_FS is not set
1253# CONFIG_QNX4FS_FS is not set
1254# CONFIG_SYSV_FS is not set
1255# CONFIG_UFS_FS is not set
1256
1257#
1258# Network File Systems
1259#
1260CONFIG_NFS_FS=y
1261CONFIG_NFS_V3=y
1262# CONFIG_NFS_V3_ACL is not set
1263CONFIG_NFS_V4=y
1264# CONFIG_NFS_DIRECTIO is not set
1265# CONFIG_NFSD is not set
1266CONFIG_ROOT_NFS=y
1267CONFIG_LOCKD=y
1268CONFIG_LOCKD_V4=y
1269CONFIG_NFS_COMMON=y
1270CONFIG_SUNRPC=y
1271CONFIG_SUNRPC_GSS=y
1272CONFIG_RPCSEC_GSS_KRB5=y
1273# CONFIG_RPCSEC_GSS_SPKM3 is not set
1274# CONFIG_SMB_FS is not set
1275# CONFIG_CIFS is not set
1276# CONFIG_NCP_FS is not set
1277# CONFIG_CODA_FS is not set
1278# CONFIG_AFS_FS is not set
1279# CONFIG_9P_FS is not set
1280
1281#
1282# Partition Types
1283#
1284CONFIG_PARTITION_ADVANCED=y
1285# CONFIG_ACORN_PARTITION is not set
1286# CONFIG_OSF_PARTITION is not set
1287# CONFIG_AMIGA_PARTITION is not set
1288# CONFIG_ATARI_PARTITION is not set
1289# CONFIG_MAC_PARTITION is not set
1290CONFIG_MSDOS_PARTITION=y
1291# CONFIG_BSD_DISKLABEL is not set
1292# CONFIG_MINIX_SUBPARTITION is not set
1293# CONFIG_SOLARIS_X86_PARTITION is not set
1294# CONFIG_UNIXWARE_DISKLABEL is not set
1295# CONFIG_LDM_PARTITION is not set
1296# CONFIG_SGI_PARTITION is not set
1297# CONFIG_ULTRIX_PARTITION is not set
1298# CONFIG_SUN_PARTITION is not set
1299# CONFIG_KARMA_PARTITION is not set
1300# CONFIG_EFI_PARTITION is not set
1301
1302#
1303# Native Language Support
1304#
1305# CONFIG_NLS is not set
1306
1307#
1308# Distributed Lock Manager
1309#
1310# CONFIG_DLM is not set
1311
1312#
1313# Library routines
1314#
1315CONFIG_BITREVERSE=y
1316# CONFIG_CRC_CCITT is not set
1317# CONFIG_CRC16 is not set
1318CONFIG_CRC32=y
1319# CONFIG_LIBCRC32C is not set
1320CONFIG_PLIST=y
1321CONFIG_IOMAP_COPY=y
1322
1323#
1324# Instrumentation Support
1325#
1326# CONFIG_PROFILING is not set
1327
1328#
1329# Kernel hacking
1330#
1331# CONFIG_PRINTK_TIME is not set
1332CONFIG_ENABLE_MUST_CHECK=y
1333# CONFIG_MAGIC_SYSRQ is not set
1334# CONFIG_UNUSED_SYMBOLS is not set
1335# CONFIG_DEBUG_FS is not set
1336# CONFIG_HEADERS_CHECK is not set
1337CONFIG_DEBUG_KERNEL=y
1338CONFIG_LOG_BUF_SHIFT=14
1339CONFIG_DETECT_SOFTLOCKUP=y
1340# CONFIG_SCHEDSTATS is not set
1341# CONFIG_DEBUG_SLAB is not set
1342# CONFIG_DEBUG_RT_MUTEXES is not set
1343# CONFIG_RT_MUTEX_TESTER is not set
1344# CONFIG_DEBUG_SPINLOCK is not set
1345# CONFIG_DEBUG_MUTEXES is not set
1346# CONFIG_DEBUG_RWSEMS is not set
1347# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1348# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1349# CONFIG_DEBUG_KOBJECT is not set
1350# CONFIG_DEBUG_BUGVERBOSE is not set
1351# CONFIG_DEBUG_INFO is not set
1352# CONFIG_DEBUG_VM is not set
1353# CONFIG_DEBUG_LIST is not set
1354CONFIG_FORCED_INLINING=y
1355# CONFIG_RCU_TORTURE_TEST is not set
1356# CONFIG_DEBUG_STACKOVERFLOW is not set
1357# CONFIG_DEBUG_STACK_USAGE is not set
1358# CONFIG_DEBUGGER is not set
1359# CONFIG_BDI_SWITCH is not set
1360# CONFIG_BOOTX_TEXT is not set
1361# CONFIG_SERIAL_TEXT_DEBUG is not set
1362# CONFIG_PPC_EARLY_DEBUG is not set
1363
1364#
1365# Security options
1366#
1367# CONFIG_KEYS is not set
1368# CONFIG_SECURITY is not set
1369
1370#
1371# Cryptographic options
1372#
1373CONFIG_CRYPTO=y
1374CONFIG_CRYPTO_ALGAPI=y
1375CONFIG_CRYPTO_BLKCIPHER=y
1376CONFIG_CRYPTO_MANAGER=y
1377# CONFIG_CRYPTO_HMAC is not set
1378# CONFIG_CRYPTO_XCBC is not set
1379# CONFIG_CRYPTO_NULL is not set
1380# CONFIG_CRYPTO_MD4 is not set
1381CONFIG_CRYPTO_MD5=y
1382# CONFIG_CRYPTO_SHA1 is not set
1383# CONFIG_CRYPTO_SHA256 is not set
1384# CONFIG_CRYPTO_SHA512 is not set
1385# CONFIG_CRYPTO_WP512 is not set
1386# CONFIG_CRYPTO_TGR192 is not set
1387# CONFIG_CRYPTO_GF128MUL is not set
1388# CONFIG_CRYPTO_ECB is not set
1389CONFIG_CRYPTO_CBC=y
1390# CONFIG_CRYPTO_LRW is not set
1391CONFIG_CRYPTO_DES=y
1392# CONFIG_CRYPTO_BLOWFISH is not set
1393# CONFIG_CRYPTO_TWOFISH is not set
1394# CONFIG_CRYPTO_SERPENT is not set
1395# CONFIG_CRYPTO_AES is not set
1396# CONFIG_CRYPTO_CAST5 is not set
1397# CONFIG_CRYPTO_CAST6 is not set
1398# CONFIG_CRYPTO_TEA is not set
1399# CONFIG_CRYPTO_ARC4 is not set
1400# CONFIG_CRYPTO_KHAZAD is not set
1401# CONFIG_CRYPTO_ANUBIS is not set
1402# CONFIG_CRYPTO_DEFLATE is not set
1403# CONFIG_CRYPTO_MICHAEL_MIC is not set
1404# CONFIG_CRYPTO_CRC32C is not set
1405# CONFIG_CRYPTO_TEST is not set
1406
1407#
1408# Hardware crypto devices
1409#
diff --git a/arch/powerpc/configs/mpc8360emds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig
index 58e6795dbfe5..e1b36de6b38c 100644
--- a/arch/powerpc/configs/mpc8360emds_defconfig
+++ b/arch/powerpc/configs/mpc832x_mds_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.20-rc5
4# Mon Jan 22 22:24:40 2007 4# Tue Jan 30 14:27:25 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -129,11 +129,11 @@ CONFIG_PPC_GEN550=y
129# 129#
130# Platform support 130# Platform support
131# 131#
132# CONFIG_MPC832x_MDS is not set 132CONFIG_MPC832x_MDS=y
133# CONFIG_MPC834x_SYS is not set 133# CONFIG_MPC834x_SYS is not set
134# CONFIG_MPC834x_ITX is not set 134# CONFIG_MPC834x_ITX is not set
135CONFIG_MPC8360E_PB=y 135# CONFIG_MPC8360E_PB is not set
136CONFIG_PPC_MPC836x=y 136CONFIG_PPC_MPC832x=y
137# CONFIG_MPIC is not set 137# CONFIG_MPIC is not set
138 138
139# 139#
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 45757b613702..23d8964846e0 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.20
4# Mon Jan 22 22:23:43 2007 4# Wed Feb 7 13:12:18 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34CONFIG_PPC_83xx=y 34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_83xx=y 42CONFIG_83xx=y
@@ -149,7 +149,6 @@ CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT is not set 149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y 150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set 151# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 152CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y 153CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y 154CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -179,7 +178,6 @@ CONFIG_FSL_SOC=y
179CONFIG_PCI=y 178CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 179CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 180# CONFIG_PCIEPORTBUS is not set
182# CONFIG_PCI_DEBUG is not set
183 181
184# 182#
185# PCCARD (PCMCIA/CardBus) support 183# PCCARD (PCMCIA/CardBus) support
@@ -304,7 +302,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
304CONFIG_STANDALONE=y 302CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y 303CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set 304# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_SYS_HYPERVISOR is not set 305# CONFIG_SYS_HYPERVISOR is not set
309 306
310# 307#
@@ -324,6 +321,7 @@ CONFIG_MTD=y
324# User Modules And Translation Layers 321# User Modules And Translation Layers
325# 322#
326CONFIG_MTD_CHAR=y 323CONFIG_MTD_CHAR=y
324# CONFIG_MTD_BLKDEVS is not set
327# CONFIG_MTD_BLOCK is not set 325# CONFIG_MTD_BLOCK is not set
328# CONFIG_MTD_BLOCK_RO is not set 326# CONFIG_MTD_BLOCK_RO is not set
329# CONFIG_FTL is not set 327# CONFIG_FTL is not set
@@ -366,6 +364,7 @@ CONFIG_MTD_PHYSMAP=y
366CONFIG_MTD_PHYSMAP_START=0xfe000000 364CONFIG_MTD_PHYSMAP_START=0xfe000000
367CONFIG_MTD_PHYSMAP_LEN=0x1000000 365CONFIG_MTD_PHYSMAP_LEN=0x1000000
368CONFIG_MTD_PHYSMAP_BANKWIDTH=2 366CONFIG_MTD_PHYSMAP_BANKWIDTH=2
367# CONFIG_MTD_PHYSMAP_OF is not set
369# CONFIG_MTD_PLATRAM is not set 368# CONFIG_MTD_PLATRAM is not set
370 369
371# 370#
@@ -390,6 +389,7 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
390# NAND Flash Device Drivers 389# NAND Flash Device Drivers
391# 390#
392# CONFIG_MTD_NAND is not set 391# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set
393 393
394# 394#
395# OneNAND Flash Device Drivers 395# OneNAND Flash Device Drivers
@@ -521,6 +521,7 @@ CONFIG_SCSI_SPI_ATTRS=y
521# Serial ATA (prod) and Parallel ATA (experimental) drivers 521# Serial ATA (prod) and Parallel ATA (experimental) drivers
522# 522#
523CONFIG_ATA=y 523CONFIG_ATA=y
524# CONFIG_ATA_NONSTANDARD is not set
524# CONFIG_SATA_AHCI is not set 525# CONFIG_SATA_AHCI is not set
525# CONFIG_SATA_SVW is not set 526# CONFIG_SATA_SVW is not set
526# CONFIG_ATA_PIIX is not set 527# CONFIG_ATA_PIIX is not set
@@ -645,37 +646,7 @@ CONFIG_CICADA_PHY=y
645# 646#
646# Ethernet (10 or 100Mbit) 647# Ethernet (10 or 100Mbit)
647# 648#
648CONFIG_NET_ETHERNET=y 649# CONFIG_NET_ETHERNET is not set
649CONFIG_MII=y
650# CONFIG_HAPPYMEAL is not set
651# CONFIG_SUNGEM is not set
652# CONFIG_CASSINI is not set
653# CONFIG_NET_VENDOR_3COM is not set
654
655#
656# Tulip family network device support
657#
658# CONFIG_NET_TULIP is not set
659# CONFIG_HP100 is not set
660CONFIG_NET_PCI=y
661# CONFIG_PCNET32 is not set
662# CONFIG_AMD8111_ETH is not set
663# CONFIG_ADAPTEC_STARFIRE is not set
664# CONFIG_B44 is not set
665# CONFIG_FORCEDETH is not set
666# CONFIG_DGRS is not set
667# CONFIG_EEPRO100 is not set
668CONFIG_E100=y
669# CONFIG_FEALNX is not set
670# CONFIG_NATSEMI is not set
671# CONFIG_NE2K_PCI is not set
672# CONFIG_8139CP is not set
673# CONFIG_8139TOO is not set
674# CONFIG_SIS900 is not set
675# CONFIG_EPIC100 is not set
676# CONFIG_SUNDANCE is not set
677# CONFIG_TLAN is not set
678# CONFIG_VIA_RHINE is not set
679 650
680# 651#
681# Ethernet (1000 Mbit) 652# Ethernet (1000 Mbit)
@@ -691,7 +662,6 @@ CONFIG_E100=y
691# CONFIG_SKGE is not set 662# CONFIG_SKGE is not set
692# CONFIG_SKY2 is not set 663# CONFIG_SKY2 is not set
693# CONFIG_SK98LIN is not set 664# CONFIG_SK98LIN is not set
694# CONFIG_VIA_VELOCITY is not set
695# CONFIG_TIGON3 is not set 665# CONFIG_TIGON3 is not set
696# CONFIG_BNX2 is not set 666# CONFIG_BNX2 is not set
697CONFIG_GIANFAR=y 667CONFIG_GIANFAR=y
@@ -744,26 +714,7 @@ CONFIG_GFAR_NAPI=y
744# 714#
745# Input device support 715# Input device support
746# 716#
747CONFIG_INPUT=y 717# CONFIG_INPUT is not set
748# CONFIG_INPUT_FF_MEMLESS is not set
749
750#
751# Userland interfaces
752#
753# CONFIG_INPUT_MOUSEDEV is not set
754# CONFIG_INPUT_JOYDEV is not set
755# CONFIG_INPUT_TSDEV is not set
756# CONFIG_INPUT_EVDEV is not set
757# CONFIG_INPUT_EVBUG is not set
758
759#
760# Input Device Drivers
761#
762# CONFIG_INPUT_KEYBOARD is not set
763# CONFIG_INPUT_MOUSE is not set
764# CONFIG_INPUT_JOYSTICK is not set
765# CONFIG_INPUT_TOUCHSCREEN is not set
766# CONFIG_INPUT_MISC is not set
767 718
768# 719#
769# Hardware I/O ports 720# Hardware I/O ports
@@ -782,7 +733,7 @@ CONFIG_INPUT=y
782# 733#
783CONFIG_SERIAL_8250=y 734CONFIG_SERIAL_8250=y
784CONFIG_SERIAL_8250_CONSOLE=y 735CONFIG_SERIAL_8250_CONSOLE=y
785CONFIG_SERIAL_8250_PCI=y 736# CONFIG_SERIAL_8250_PCI is not set
786CONFIG_SERIAL_8250_NR_UARTS=4 737CONFIG_SERIAL_8250_NR_UARTS=4
787CONFIG_SERIAL_8250_RUNTIME_UARTS=4 738CONFIG_SERIAL_8250_RUNTIME_UARTS=4
788# CONFIG_SERIAL_8250_EXTENDED is not set 739# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -885,7 +836,7 @@ CONFIG_I2C_MPC=y
885# CONFIG_SENSORS_DS1337 is not set 836# CONFIG_SENSORS_DS1337 is not set
886# CONFIG_SENSORS_DS1374 is not set 837# CONFIG_SENSORS_DS1374 is not set
887# CONFIG_SENSORS_EEPROM is not set 838# CONFIG_SENSORS_EEPROM is not set
888# CONFIG_SENSORS_PCF8574 is not set 839CONFIG_SENSORS_PCF8574=y
889# CONFIG_SENSORS_PCA9539 is not set 840# CONFIG_SENSORS_PCA9539 is not set
890# CONFIG_SENSORS_PCF8591 is not set 841# CONFIG_SENSORS_PCF8591 is not set
891# CONFIG_SENSORS_M41T00 is not set 842# CONFIG_SENSORS_M41T00 is not set
@@ -899,7 +850,6 @@ CONFIG_I2C_MPC=y
899# SPI support 850# SPI support
900# 851#
901CONFIG_SPI=y 852CONFIG_SPI=y
902# CONFIG_SPI_DEBUG is not set
903CONFIG_SPI_MASTER=y 853CONFIG_SPI_MASTER=y
904 854
905# 855#
@@ -920,52 +870,8 @@ CONFIG_SPI_MPC83xx=y
920# 870#
921# Hardware Monitoring support 871# Hardware Monitoring support
922# 872#
923CONFIG_HWMON=y 873# CONFIG_HWMON is not set
924# CONFIG_HWMON_VID is not set 874# CONFIG_HWMON_VID is not set
925# CONFIG_SENSORS_ABITUGURU is not set
926# CONFIG_SENSORS_ADM1021 is not set
927# CONFIG_SENSORS_ADM1025 is not set
928# CONFIG_SENSORS_ADM1026 is not set
929# CONFIG_SENSORS_ADM1031 is not set
930# CONFIG_SENSORS_ADM9240 is not set
931# CONFIG_SENSORS_ASB100 is not set
932# CONFIG_SENSORS_ATXP1 is not set
933# CONFIG_SENSORS_DS1621 is not set
934# CONFIG_SENSORS_F71805F is not set
935# CONFIG_SENSORS_FSCHER is not set
936# CONFIG_SENSORS_FSCPOS is not set
937# CONFIG_SENSORS_GL518SM is not set
938# CONFIG_SENSORS_GL520SM is not set
939# CONFIG_SENSORS_IT87 is not set
940# CONFIG_SENSORS_LM63 is not set
941# CONFIG_SENSORS_LM70 is not set
942# CONFIG_SENSORS_LM75 is not set
943# CONFIG_SENSORS_LM77 is not set
944# CONFIG_SENSORS_LM78 is not set
945# CONFIG_SENSORS_LM80 is not set
946# CONFIG_SENSORS_LM83 is not set
947# CONFIG_SENSORS_LM85 is not set
948# CONFIG_SENSORS_LM87 is not set
949# CONFIG_SENSORS_LM90 is not set
950# CONFIG_SENSORS_LM92 is not set
951# CONFIG_SENSORS_MAX1619 is not set
952# CONFIG_SENSORS_PC87360 is not set
953# CONFIG_SENSORS_PC87427 is not set
954# CONFIG_SENSORS_SIS5595 is not set
955# CONFIG_SENSORS_SMSC47M1 is not set
956# CONFIG_SENSORS_SMSC47M192 is not set
957# CONFIG_SENSORS_SMSC47B397 is not set
958# CONFIG_SENSORS_VIA686A is not set
959# CONFIG_SENSORS_VT1211 is not set
960# CONFIG_SENSORS_VT8231 is not set
961# CONFIG_SENSORS_W83781D is not set
962# CONFIG_SENSORS_W83791D is not set
963# CONFIG_SENSORS_W83792D is not set
964# CONFIG_SENSORS_W83793 is not set
965# CONFIG_SENSORS_W83L785TS is not set
966# CONFIG_SENSORS_W83627HF is not set
967# CONFIG_SENSORS_W83627EHF is not set
968# CONFIG_HWMON_DEBUG_CHIP is not set
969 875
970# 876#
971# Multimedia devices 877# Multimedia devices
@@ -981,7 +887,7 @@ CONFIG_HWMON=y
981# 887#
982# Graphics support 888# Graphics support
983# 889#
984CONFIG_FIRMWARE_EDID=y 890# CONFIG_FIRMWARE_EDID is not set
985# CONFIG_FB is not set 891# CONFIG_FB is not set
986# CONFIG_FB_IBM_GXT4500 is not set 892# CONFIG_FB_IBM_GXT4500 is not set
987# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 893# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
@@ -992,11 +898,6 @@ CONFIG_FIRMWARE_EDID=y
992# CONFIG_SOUND is not set 898# CONFIG_SOUND is not set
993 899
994# 900#
995# HID Devices
996#
997CONFIG_HID=y
998
999#
1000# USB support 901# USB support
1001# 902#
1002CONFIG_USB_ARCH_HAS_HCD=y 903CONFIG_USB_ARCH_HAS_HCD=y
@@ -1011,7 +912,6 @@ CONFIG_USB=y
1011CONFIG_USB_DEVICEFS=y 912CONFIG_USB_DEVICEFS=y
1012# CONFIG_USB_BANDWIDTH is not set 913# CONFIG_USB_BANDWIDTH is not set
1013# CONFIG_USB_DYNAMIC_MINORS is not set 914# CONFIG_USB_DYNAMIC_MINORS is not set
1014# CONFIG_USB_MULTITHREAD_PROBE is not set
1015# CONFIG_USB_OTG is not set 915# CONFIG_USB_OTG is not set
1016 916
1017# 917#
@@ -1022,10 +922,8 @@ CONFIG_USB_EHCI_HCD=y
1022# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 922# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1023# CONFIG_USB_EHCI_TT_NEWSCHED is not set 923# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1024# CONFIG_USB_ISP116X_HCD is not set 924# CONFIG_USB_ISP116X_HCD is not set
1025CONFIG_USB_OHCI_HCD=y 925# CONFIG_USB_OHCI_HCD is not set
1026# CONFIG_USB_OHCI_BIG_ENDIAN is not set 926# CONFIG_USB_UHCI_HCD is not set
1027CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1028CONFIG_USB_UHCI_HCD=y
1029# CONFIG_USB_SL811_HCD is not set 927# CONFIG_USB_SL811_HCD is not set
1030 928
1031# 929#
@@ -1057,25 +955,10 @@ CONFIG_USB_STORAGE=y
1057# 955#
1058# USB Input Devices 956# USB Input Devices
1059# 957#
1060# CONFIG_USB_HID is not set
1061 958
1062# 959#
1063# USB HID Boot Protocol drivers 960# USB HID Boot Protocol drivers
1064# 961#
1065# CONFIG_USB_KBD is not set
1066# CONFIG_USB_MOUSE is not set
1067# CONFIG_USB_AIPTEK is not set
1068# CONFIG_USB_WACOM is not set
1069# CONFIG_USB_ACECAD is not set
1070# CONFIG_USB_KBTAB is not set
1071# CONFIG_USB_POWERMATE is not set
1072# CONFIG_USB_TOUCHSCREEN is not set
1073# CONFIG_USB_YEALINK is not set
1074# CONFIG_USB_XPAD is not set
1075# CONFIG_USB_ATI_REMOTE is not set
1076# CONFIG_USB_ATI_REMOTE2 is not set
1077# CONFIG_USB_KEYSPAN_REMOTE is not set
1078# CONFIG_USB_APPLETOUCH is not set
1079 962
1080# 963#
1081# USB Imaging devices 964# USB Imaging devices
@@ -1132,25 +1015,7 @@ CONFIG_USB_MON=y
1132# 1015#
1133# USB Gadget Support 1016# USB Gadget Support
1134# 1017#
1135CONFIG_USB_GADGET=y 1018# CONFIG_USB_GADGET is not set
1136# CONFIG_USB_GADGET_DEBUG_FILES is not set
1137CONFIG_USB_GADGET_SELECTED=y
1138CONFIG_USB_GADGET_NET2280=y
1139CONFIG_USB_NET2280=y
1140# CONFIG_USB_GADGET_PXA2XX is not set
1141# CONFIG_USB_GADGET_GOKU is not set
1142# CONFIG_USB_GADGET_LH7A40X is not set
1143# CONFIG_USB_GADGET_OMAP is not set
1144# CONFIG_USB_GADGET_AT91 is not set
1145# CONFIG_USB_GADGET_DUMMY_HCD is not set
1146CONFIG_USB_GADGET_DUALSPEED=y
1147# CONFIG_USB_ZERO is not set
1148CONFIG_USB_ETH=y
1149CONFIG_USB_ETH_RNDIS=y
1150# CONFIG_USB_GADGETFS is not set
1151# CONFIG_USB_FILE_STORAGE is not set
1152# CONFIG_USB_G_SERIAL is not set
1153# CONFIG_USB_MIDI_GADGET is not set
1154 1019
1155# 1020#
1156# MMC/SD Card support 1021# MMC/SD Card support
@@ -1272,8 +1137,11 @@ CONFIG_DNOTIFY=y
1272# 1137#
1273# DOS/FAT/NT Filesystems 1138# DOS/FAT/NT Filesystems
1274# 1139#
1275# CONFIG_MSDOS_FS is not set 1140CONFIG_FAT_FS=y
1276# CONFIG_VFAT_FS is not set 1141CONFIG_MSDOS_FS=y
1142CONFIG_VFAT_FS=y
1143CONFIG_FAT_DEFAULT_CODEPAGE=437
1144CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1277# CONFIG_NTFS_FS is not set 1145# CONFIG_NTFS_FS is not set
1278 1146
1279# 1147#
@@ -1339,7 +1207,7 @@ CONFIG_PARTITION_ADVANCED=y
1339# CONFIG_OSF_PARTITION is not set 1207# CONFIG_OSF_PARTITION is not set
1340# CONFIG_AMIGA_PARTITION is not set 1208# CONFIG_AMIGA_PARTITION is not set
1341# CONFIG_ATARI_PARTITION is not set 1209# CONFIG_ATARI_PARTITION is not set
1342# CONFIG_MAC_PARTITION is not set 1210CONFIG_MAC_PARTITION=y
1343CONFIG_MSDOS_PARTITION=y 1211CONFIG_MSDOS_PARTITION=y
1344# CONFIG_BSD_DISKLABEL is not set 1212# CONFIG_BSD_DISKLABEL is not set
1345# CONFIG_MINIX_SUBPARTITION is not set 1213# CONFIG_MINIX_SUBPARTITION is not set
@@ -1355,7 +1223,46 @@ CONFIG_MSDOS_PARTITION=y
1355# 1223#
1356# Native Language Support 1224# Native Language Support
1357# 1225#
1358# CONFIG_NLS is not set 1226CONFIG_NLS=y
1227CONFIG_NLS_DEFAULT="iso8859-1"
1228# CONFIG_NLS_CODEPAGE_437 is not set
1229# CONFIG_NLS_CODEPAGE_737 is not set
1230# CONFIG_NLS_CODEPAGE_775 is not set
1231# CONFIG_NLS_CODEPAGE_850 is not set
1232# CONFIG_NLS_CODEPAGE_852 is not set
1233# CONFIG_NLS_CODEPAGE_855 is not set
1234# CONFIG_NLS_CODEPAGE_857 is not set
1235# CONFIG_NLS_CODEPAGE_860 is not set
1236# CONFIG_NLS_CODEPAGE_861 is not set
1237# CONFIG_NLS_CODEPAGE_862 is not set
1238# CONFIG_NLS_CODEPAGE_863 is not set
1239# CONFIG_NLS_CODEPAGE_864 is not set
1240# CONFIG_NLS_CODEPAGE_865 is not set
1241# CONFIG_NLS_CODEPAGE_866 is not set
1242# CONFIG_NLS_CODEPAGE_869 is not set
1243# CONFIG_NLS_CODEPAGE_936 is not set
1244# CONFIG_NLS_CODEPAGE_950 is not set
1245# CONFIG_NLS_CODEPAGE_932 is not set
1246# CONFIG_NLS_CODEPAGE_949 is not set
1247# CONFIG_NLS_CODEPAGE_874 is not set
1248# CONFIG_NLS_ISO8859_8 is not set
1249# CONFIG_NLS_CODEPAGE_1250 is not set
1250# CONFIG_NLS_CODEPAGE_1251 is not set
1251# CONFIG_NLS_ASCII is not set
1252# CONFIG_NLS_ISO8859_1 is not set
1253# CONFIG_NLS_ISO8859_2 is not set
1254# CONFIG_NLS_ISO8859_3 is not set
1255# CONFIG_NLS_ISO8859_4 is not set
1256# CONFIG_NLS_ISO8859_5 is not set
1257# CONFIG_NLS_ISO8859_6 is not set
1258# CONFIG_NLS_ISO8859_7 is not set
1259# CONFIG_NLS_ISO8859_9 is not set
1260# CONFIG_NLS_ISO8859_13 is not set
1261# CONFIG_NLS_ISO8859_14 is not set
1262# CONFIG_NLS_ISO8859_15 is not set
1263# CONFIG_NLS_KOI8_R is not set
1264# CONFIG_NLS_KOI8_U is not set
1265# CONFIG_NLS_UTF8 is not set
1359 1266
1360# 1267#
1361# Distributed Lock Manager 1268# Distributed Lock Manager
@@ -1387,27 +1294,9 @@ CONFIG_ENABLE_MUST_CHECK=y
1387# CONFIG_UNUSED_SYMBOLS is not set 1294# CONFIG_UNUSED_SYMBOLS is not set
1388# CONFIG_DEBUG_FS is not set 1295# CONFIG_DEBUG_FS is not set
1389# CONFIG_HEADERS_CHECK is not set 1296# CONFIG_HEADERS_CHECK is not set
1390CONFIG_DEBUG_KERNEL=y 1297# CONFIG_DEBUG_KERNEL is not set
1391CONFIG_LOG_BUF_SHIFT=14 1298CONFIG_LOG_BUF_SHIFT=14
1392CONFIG_DETECT_SOFTLOCKUP=y
1393# CONFIG_SCHEDSTATS is not set
1394# CONFIG_DEBUG_SLAB is not set
1395# CONFIG_DEBUG_RT_MUTEXES is not set
1396# CONFIG_RT_MUTEX_TESTER is not set
1397# CONFIG_DEBUG_SPINLOCK is not set
1398# CONFIG_DEBUG_MUTEXES is not set
1399# CONFIG_DEBUG_RWSEMS is not set
1400# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1401# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1402# CONFIG_DEBUG_KOBJECT is not set
1403# CONFIG_DEBUG_BUGVERBOSE is not set 1299# CONFIG_DEBUG_BUGVERBOSE is not set
1404# CONFIG_DEBUG_INFO is not set
1405# CONFIG_DEBUG_VM is not set
1406# CONFIG_DEBUG_LIST is not set
1407CONFIG_FORCED_INLINING=y
1408# CONFIG_RCU_TORTURE_TEST is not set
1409# CONFIG_DEBUGGER is not set
1410# CONFIG_BDI_SWITCH is not set
1411# CONFIG_BOOTX_TEXT is not set 1300# CONFIG_BOOTX_TEXT is not set
1412# CONFIG_SERIAL_TEXT_DEBUG is not set 1301# CONFIG_SERIAL_TEXT_DEBUG is not set
1413# CONFIG_PPC_EARLY_DEBUG is not set 1302# CONFIG_PPC_EARLY_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig
new file mode 100644
index 000000000000..4aa666c9cb94
--- /dev/null
+++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig
@@ -0,0 +1,1174 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Fri Feb 9 13:28:19 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_UTS_NS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_SYSFS_DEPRECATED=y
73# CONFIG_RELAY is not set
74CONFIG_INITRAMFS_SOURCE=""
75# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
76CONFIG_SYSCTL=y
77CONFIG_EMBEDDED=y
78CONFIG_SYSCTL_SYSCALL=y
79# CONFIG_KALLSYMS is not set
80CONFIG_HOTPLUG=y
81CONFIG_PRINTK=y
82CONFIG_BUG=y
83CONFIG_ELF_CORE=y
84CONFIG_BASE_FULL=y
85CONFIG_FUTEX=y
86# CONFIG_EPOLL is not set
87CONFIG_SHMEM=y
88CONFIG_SLAB=y
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_RT_MUTEXES=y
91# CONFIG_TINY_SHMEM is not set
92CONFIG_BASE_SMALL=0
93# CONFIG_SLOB is not set
94
95#
96# Loadable module support
97#
98CONFIG_MODULES=y
99CONFIG_MODULE_UNLOAD=y
100# CONFIG_MODULE_FORCE_UNLOAD is not set
101# CONFIG_MODVERSIONS is not set
102# CONFIG_MODULE_SRCVERSION_ALL is not set
103# CONFIG_KMOD is not set
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_LBD is not set
110# CONFIG_BLK_DEV_IO_TRACE is not set
111# CONFIG_LSF is not set
112
113#
114# IO Schedulers
115#
116CONFIG_IOSCHED_NOOP=y
117CONFIG_IOSCHED_AS=y
118CONFIG_IOSCHED_DEADLINE=y
119CONFIG_IOSCHED_CFQ=y
120CONFIG_DEFAULT_AS=y
121# CONFIG_DEFAULT_DEADLINE is not set
122# CONFIG_DEFAULT_CFQ is not set
123# CONFIG_DEFAULT_NOOP is not set
124CONFIG_DEFAULT_IOSCHED="anticipatory"
125CONFIG_PPC_GEN550=y
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131# CONFIG_MPC832x_MDS is not set
132# CONFIG_MPC834x_SYS is not set
133CONFIG_MPC834x_ITX=y
134# CONFIG_MPC8360E_PB is not set
135CONFIG_MPC834x=y
136# CONFIG_MPIC is not set
137
138#
139# Kernel options
140#
141# CONFIG_HIGHMEM is not set
142# CONFIG_HZ_100 is not set
143CONFIG_HZ_250=y
144# CONFIG_HZ_300 is not set
145# CONFIG_HZ_1000 is not set
146CONFIG_HZ=250
147CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set
152CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
153CONFIG_ARCH_FLATMEM_ENABLE=y
154CONFIG_ARCH_POPULATES_NODE_MAP=y
155CONFIG_SELECT_MEMORY_MODEL=y
156CONFIG_FLATMEM_MANUAL=y
157# CONFIG_DISCONTIGMEM_MANUAL is not set
158# CONFIG_SPARSEMEM_MANUAL is not set
159CONFIG_FLATMEM=y
160CONFIG_FLAT_NODE_MEM_MAP=y
161# CONFIG_SPARSEMEM_STATIC is not set
162CONFIG_SPLIT_PTLOCK_CPUS=4
163# CONFIG_RESOURCES_64BIT is not set
164CONFIG_PROC_DEVICETREE=y
165# CONFIG_CMDLINE_BOOL is not set
166# CONFIG_PM is not set
167CONFIG_SECCOMP=y
168CONFIG_ISA_DMA_API=y
169
170#
171# Bus options
172#
173CONFIG_GENERIC_ISA_DMA=y
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_PPC_INDIRECT_PCI=y
177CONFIG_FSL_SOC=y
178CONFIG_PCI=y
179CONFIG_PCI_DOMAINS=y
180# CONFIG_PCIEPORTBUS is not set
181
182#
183# PCCARD (PCMCIA/CardBus) support
184#
185# CONFIG_PCCARD is not set
186
187#
188# PCI Hotplug Support
189#
190# CONFIG_HOTPLUG_PCI is not set
191
192#
193# Advanced setup
194#
195# CONFIG_ADVANCED_OPTIONS is not set
196
197#
198# Default settings for advanced configuration options are used
199#
200CONFIG_HIGHMEM_START=0xfe000000
201CONFIG_LOWMEM_SIZE=0x30000000
202CONFIG_KERNEL_START=0xc0000000
203CONFIG_TASK_SIZE=0x80000000
204CONFIG_BOOT_LOAD=0x00800000
205
206#
207# Networking
208#
209CONFIG_NET=y
210
211#
212# Networking options
213#
214# CONFIG_NETDEBUG is not set
215CONFIG_PACKET=y
216# CONFIG_PACKET_MMAP is not set
217CONFIG_UNIX=y
218CONFIG_XFRM=y
219# CONFIG_XFRM_USER is not set
220# CONFIG_XFRM_SUB_POLICY is not set
221# CONFIG_NET_KEY is not set
222CONFIG_INET=y
223CONFIG_IP_MULTICAST=y
224# CONFIG_IP_ADVANCED_ROUTER is not set
225CONFIG_IP_FIB_HASH=y
226CONFIG_IP_PNP=y
227CONFIG_IP_PNP_DHCP=y
228CONFIG_IP_PNP_BOOTP=y
229# CONFIG_IP_PNP_RARP is not set
230# CONFIG_NET_IPIP is not set
231# CONFIG_NET_IPGRE is not set
232# CONFIG_IP_MROUTE is not set
233# CONFIG_ARPD is not set
234CONFIG_SYN_COOKIES=y
235# CONFIG_INET_AH is not set
236# CONFIG_INET_ESP is not set
237# CONFIG_INET_IPCOMP is not set
238# CONFIG_INET_XFRM_TUNNEL is not set
239# CONFIG_INET_TUNNEL is not set
240CONFIG_INET_XFRM_MODE_TRANSPORT=y
241CONFIG_INET_XFRM_MODE_TUNNEL=y
242CONFIG_INET_XFRM_MODE_BEET=y
243CONFIG_INET_DIAG=y
244CONFIG_INET_TCP_DIAG=y
245# CONFIG_TCP_CONG_ADVANCED is not set
246CONFIG_TCP_CONG_CUBIC=y
247CONFIG_DEFAULT_TCP_CONG="cubic"
248# CONFIG_TCP_MD5SIG is not set
249# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set
269# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set
271# CONFIG_VLAN_8021Q is not set
272# CONFIG_DECNET is not set
273# CONFIG_LLC2 is not set
274# CONFIG_IPX is not set
275# CONFIG_ATALK is not set
276# CONFIG_X25 is not set
277# CONFIG_LAPB is not set
278# CONFIG_ECONET is not set
279# CONFIG_WAN_ROUTER is not set
280
281#
282# QoS and/or fair queueing
283#
284# CONFIG_NET_SCHED is not set
285
286#
287# Network testing
288#
289# CONFIG_NET_PKTGEN is not set
290# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set
292# CONFIG_BT is not set
293# CONFIG_IEEE80211 is not set
294
295#
296# Device Drivers
297#
298
299#
300# Generic Driver Options
301#
302CONFIG_STANDALONE=y
303CONFIG_PREVENT_FIRMWARE_BUILD=y
304# CONFIG_FW_LOADER is not set
305# CONFIG_SYS_HYPERVISOR is not set
306
307#
308# Connector - unified userspace <-> kernelspace linker
309#
310# CONFIG_CONNECTOR is not set
311
312#
313# Memory Technology Devices (MTD)
314#
315CONFIG_MTD=y
316# CONFIG_MTD_DEBUG is not set
317# CONFIG_MTD_CONCAT is not set
318# CONFIG_MTD_PARTITIONS is not set
319
320#
321# User Modules And Translation Layers
322#
323CONFIG_MTD_CHAR=y
324# CONFIG_MTD_BLKDEVS is not set
325# CONFIG_MTD_BLOCK is not set
326# CONFIG_MTD_BLOCK_RO is not set
327# CONFIG_FTL is not set
328# CONFIG_NFTL is not set
329# CONFIG_INFTL is not set
330# CONFIG_RFD_FTL is not set
331# CONFIG_SSFDC is not set
332
333#
334# RAM/ROM/Flash chip drivers
335#
336CONFIG_MTD_CFI=y
337# CONFIG_MTD_JEDECPROBE is not set
338CONFIG_MTD_GEN_PROBE=y
339# CONFIG_MTD_CFI_ADV_OPTIONS is not set
340CONFIG_MTD_MAP_BANK_WIDTH_1=y
341CONFIG_MTD_MAP_BANK_WIDTH_2=y
342CONFIG_MTD_MAP_BANK_WIDTH_4=y
343# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
344# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
345# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
346CONFIG_MTD_CFI_I1=y
347CONFIG_MTD_CFI_I2=y
348# CONFIG_MTD_CFI_I4 is not set
349# CONFIG_MTD_CFI_I8 is not set
350# CONFIG_MTD_CFI_INTELEXT is not set
351CONFIG_MTD_CFI_AMDSTD=y
352# CONFIG_MTD_CFI_STAA is not set
353CONFIG_MTD_CFI_UTIL=y
354# CONFIG_MTD_RAM is not set
355# CONFIG_MTD_ROM is not set
356# CONFIG_MTD_ABSENT is not set
357# CONFIG_MTD_OBSOLETE_CHIPS is not set
358
359#
360# Mapping drivers for chip access
361#
362# CONFIG_MTD_COMPLEX_MAPPINGS is not set
363CONFIG_MTD_PHYSMAP=y
364CONFIG_MTD_PHYSMAP_START=0xfe000000
365CONFIG_MTD_PHYSMAP_LEN=0x800000
366CONFIG_MTD_PHYSMAP_BANKWIDTH=2
367# CONFIG_MTD_PHYSMAP_OF is not set
368# CONFIG_MTD_PLATRAM is not set
369
370#
371# Self-contained MTD device drivers
372#
373# CONFIG_MTD_PMC551 is not set
374# CONFIG_MTD_DATAFLASH is not set
375# CONFIG_MTD_M25P80 is not set
376# CONFIG_MTD_SLRAM is not set
377# CONFIG_MTD_PHRAM is not set
378# CONFIG_MTD_MTDRAM is not set
379# CONFIG_MTD_BLOCK2MTD is not set
380
381#
382# Disk-On-Chip Device Drivers
383#
384# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set
387
388#
389# NAND Flash Device Drivers
390#
391# CONFIG_MTD_NAND is not set
392# CONFIG_MTD_NAND_CAFE is not set
393
394#
395# OneNAND Flash Device Drivers
396#
397# CONFIG_MTD_ONENAND is not set
398
399#
400# Parallel port support
401#
402# CONFIG_PARPORT is not set
403
404#
405# Plug and Play support
406#
407
408#
409# Block devices
410#
411# CONFIG_BLK_DEV_FD is not set
412# CONFIG_BLK_CPQ_DA is not set
413# CONFIG_BLK_CPQ_CISS_DA is not set
414# CONFIG_BLK_DEV_DAC960 is not set
415# CONFIG_BLK_DEV_UMEM is not set
416# CONFIG_BLK_DEV_COW_COMMON is not set
417CONFIG_BLK_DEV_LOOP=y
418# CONFIG_BLK_DEV_CRYPTOLOOP is not set
419# CONFIG_BLK_DEV_NBD is not set
420# CONFIG_BLK_DEV_SX8 is not set
421CONFIG_BLK_DEV_RAM=y
422CONFIG_BLK_DEV_RAM_COUNT=16
423CONFIG_BLK_DEV_RAM_SIZE=32768
424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
425CONFIG_BLK_DEV_INITRD=y
426# CONFIG_CDROM_PKTCDVD is not set
427# CONFIG_ATA_OVER_ETH is not set
428
429#
430# Misc devices
431#
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
434
435#
436# ATA/ATAPI/MFM/RLL support
437#
438# CONFIG_IDE is not set
439
440#
441# SCSI device support
442#
443# CONFIG_RAID_ATTRS is not set
444CONFIG_SCSI=y
445# CONFIG_SCSI_TGT is not set
446# CONFIG_SCSI_NETLINK is not set
447CONFIG_SCSI_PROC_FS=y
448
449#
450# SCSI support type (disk, tape, CD-ROM)
451#
452CONFIG_BLK_DEV_SD=y
453# CONFIG_CHR_DEV_ST is not set
454# CONFIG_CHR_DEV_OSST is not set
455# CONFIG_BLK_DEV_SR is not set
456CONFIG_CHR_DEV_SG=y
457# CONFIG_CHR_DEV_SCH is not set
458
459#
460# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
461#
462# CONFIG_SCSI_MULTI_LUN is not set
463# CONFIG_SCSI_CONSTANTS is not set
464# CONFIG_SCSI_LOGGING is not set
465# CONFIG_SCSI_SCAN_ASYNC is not set
466
467#
468# SCSI Transports
469#
470CONFIG_SCSI_SPI_ATTRS=y
471# CONFIG_SCSI_FC_ATTRS is not set
472# CONFIG_SCSI_ISCSI_ATTRS is not set
473# CONFIG_SCSI_SAS_ATTRS is not set
474# CONFIG_SCSI_SAS_LIBSAS is not set
475
476#
477# SCSI low-level drivers
478#
479# CONFIG_ISCSI_TCP is not set
480# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
481# CONFIG_SCSI_3W_9XXX is not set
482# CONFIG_SCSI_ACARD is not set
483# CONFIG_SCSI_AACRAID is not set
484# CONFIG_SCSI_AIC7XXX is not set
485# CONFIG_SCSI_AIC7XXX_OLD is not set
486# CONFIG_SCSI_AIC79XX is not set
487# CONFIG_SCSI_AIC94XX is not set
488# CONFIG_SCSI_DPT_I2O is not set
489# CONFIG_SCSI_ARCMSR is not set
490# CONFIG_MEGARAID_NEWGEN is not set
491# CONFIG_MEGARAID_LEGACY is not set
492# CONFIG_MEGARAID_SAS is not set
493# CONFIG_SCSI_HPTIOP is not set
494# CONFIG_SCSI_BUSLOGIC is not set
495# CONFIG_SCSI_DMX3191D is not set
496# CONFIG_SCSI_EATA is not set
497# CONFIG_SCSI_FUTURE_DOMAIN is not set
498# CONFIG_SCSI_GDTH is not set
499# CONFIG_SCSI_IPS is not set
500# CONFIG_SCSI_INITIO is not set
501# CONFIG_SCSI_INIA100 is not set
502# CONFIG_SCSI_STEX is not set
503# CONFIG_SCSI_SYM53C8XX_2 is not set
504# CONFIG_SCSI_QLOGIC_1280 is not set
505# CONFIG_SCSI_QLA_FC is not set
506# CONFIG_SCSI_QLA_ISCSI is not set
507# CONFIG_SCSI_LPFC is not set
508# CONFIG_SCSI_DC395x is not set
509# CONFIG_SCSI_DC390T is not set
510# CONFIG_SCSI_NSP32 is not set
511# CONFIG_SCSI_DEBUG is not set
512# CONFIG_SCSI_SRP is not set
513
514#
515# Serial ATA (prod) and Parallel ATA (experimental) drivers
516#
517# CONFIG_ATA is not set
518
519#
520# Multi-device support (RAID and LVM)
521#
522# CONFIG_MD is not set
523
524#
525# Fusion MPT device support
526#
527# CONFIG_FUSION is not set
528# CONFIG_FUSION_SPI is not set
529# CONFIG_FUSION_FC is not set
530# CONFIG_FUSION_SAS is not set
531
532#
533# IEEE 1394 (FireWire) support
534#
535# CONFIG_IEEE1394 is not set
536
537#
538# I2O device support
539#
540# CONFIG_I2O is not set
541
542#
543# Macintosh device drivers
544#
545# CONFIG_MAC_EMUMOUSEBTN is not set
546# CONFIG_WINDFARM is not set
547
548#
549# Network device support
550#
551CONFIG_NETDEVICES=y
552# CONFIG_DUMMY is not set
553# CONFIG_BONDING is not set
554# CONFIG_EQUALIZER is not set
555# CONFIG_TUN is not set
556
557#
558# ARCnet devices
559#
560# CONFIG_ARCNET is not set
561
562#
563# PHY device support
564#
565CONFIG_PHYLIB=y
566
567#
568# MII PHY device drivers
569#
570# CONFIG_MARVELL_PHY is not set
571# CONFIG_DAVICOM_PHY is not set
572# CONFIG_QSEMI_PHY is not set
573# CONFIG_LXT_PHY is not set
574CONFIG_CICADA_PHY=y
575# CONFIG_VITESSE_PHY is not set
576# CONFIG_SMSC_PHY is not set
577# CONFIG_BROADCOM_PHY is not set
578# CONFIG_FIXED_PHY is not set
579
580#
581# Ethernet (10 or 100Mbit)
582#
583# CONFIG_NET_ETHERNET is not set
584
585#
586# Ethernet (1000 Mbit)
587#
588# CONFIG_ACENIC is not set
589# CONFIG_DL2K is not set
590# CONFIG_E1000 is not set
591# CONFIG_NS83820 is not set
592# CONFIG_HAMACHI is not set
593# CONFIG_YELLOWFIN is not set
594# CONFIG_R8169 is not set
595# CONFIG_SIS190 is not set
596# CONFIG_SKGE is not set
597# CONFIG_SKY2 is not set
598# CONFIG_SK98LIN is not set
599# CONFIG_TIGON3 is not set
600# CONFIG_BNX2 is not set
601CONFIG_GIANFAR=y
602CONFIG_GFAR_NAPI=y
603# CONFIG_QLA3XXX is not set
604
605#
606# Ethernet (10000 Mbit)
607#
608# CONFIG_CHELSIO_T1 is not set
609# CONFIG_IXGB is not set
610# CONFIG_S2IO is not set
611# CONFIG_MYRI10GE is not set
612# CONFIG_NETXEN_NIC is not set
613
614#
615# Token Ring devices
616#
617# CONFIG_TR is not set
618
619#
620# Wireless LAN (non-hamradio)
621#
622# CONFIG_NET_RADIO is not set
623
624#
625# Wan interfaces
626#
627# CONFIG_WAN is not set
628# CONFIG_FDDI is not set
629# CONFIG_HIPPI is not set
630# CONFIG_PPP is not set
631# CONFIG_SLIP is not set
632# CONFIG_NET_FC is not set
633# CONFIG_SHAPER is not set
634# CONFIG_NETCONSOLE is not set
635# CONFIG_NETPOLL is not set
636# CONFIG_NET_POLL_CONTROLLER is not set
637
638#
639# ISDN subsystem
640#
641# CONFIG_ISDN is not set
642
643#
644# Telephony Support
645#
646# CONFIG_PHONE is not set
647
648#
649# Input device support
650#
651# CONFIG_INPUT is not set
652
653#
654# Hardware I/O ports
655#
656# CONFIG_SERIO is not set
657# CONFIG_GAMEPORT is not set
658
659#
660# Character devices
661#
662# CONFIG_VT is not set
663# CONFIG_SERIAL_NONSTANDARD is not set
664
665#
666# Serial drivers
667#
668CONFIG_SERIAL_8250=y
669CONFIG_SERIAL_8250_CONSOLE=y
670# CONFIG_SERIAL_8250_PCI is not set
671CONFIG_SERIAL_8250_NR_UARTS=4
672CONFIG_SERIAL_8250_RUNTIME_UARTS=4
673# CONFIG_SERIAL_8250_EXTENDED is not set
674
675#
676# Non-8250 serial port support
677#
678# CONFIG_SERIAL_UARTLITE is not set
679CONFIG_SERIAL_CORE=y
680CONFIG_SERIAL_CORE_CONSOLE=y
681# CONFIG_SERIAL_JSM is not set
682CONFIG_UNIX98_PTYS=y
683CONFIG_LEGACY_PTYS=y
684CONFIG_LEGACY_PTY_COUNT=256
685
686#
687# IPMI
688#
689# CONFIG_IPMI_HANDLER is not set
690
691#
692# Watchdog Cards
693#
694CONFIG_WATCHDOG=y
695# CONFIG_WATCHDOG_NOWAYOUT is not set
696
697#
698# Watchdog Device Drivers
699#
700# CONFIG_SOFT_WATCHDOG is not set
701CONFIG_83xx_WDT=y
702
703#
704# PCI-based Watchdog Cards
705#
706# CONFIG_PCIPCWATCHDOG is not set
707# CONFIG_WDTPCI is not set
708CONFIG_HW_RANDOM=y
709# CONFIG_NVRAM is not set
710# CONFIG_GEN_RTC is not set
711# CONFIG_DTLK is not set
712# CONFIG_R3964 is not set
713# CONFIG_APPLICOM is not set
714# CONFIG_AGP is not set
715# CONFIG_DRM is not set
716# CONFIG_RAW_DRIVER is not set
717
718#
719# TPM devices
720#
721# CONFIG_TCG_TPM is not set
722
723#
724# I2C support
725#
726CONFIG_I2C=y
727CONFIG_I2C_CHARDEV=y
728
729#
730# I2C Algorithms
731#
732# CONFIG_I2C_ALGOBIT is not set
733# CONFIG_I2C_ALGOPCF is not set
734# CONFIG_I2C_ALGOPCA is not set
735
736#
737# I2C Hardware Bus support
738#
739# CONFIG_I2C_ALI1535 is not set
740# CONFIG_I2C_ALI1563 is not set
741# CONFIG_I2C_ALI15X3 is not set
742# CONFIG_I2C_AMD756 is not set
743# CONFIG_I2C_AMD8111 is not set
744# CONFIG_I2C_I801 is not set
745# CONFIG_I2C_I810 is not set
746# CONFIG_I2C_PIIX4 is not set
747CONFIG_I2C_MPC=y
748# CONFIG_I2C_NFORCE2 is not set
749# CONFIG_I2C_OCORES is not set
750# CONFIG_I2C_PARPORT_LIGHT is not set
751# CONFIG_I2C_PROSAVAGE is not set
752# CONFIG_I2C_SAVAGE4 is not set
753# CONFIG_I2C_SIS5595 is not set
754# CONFIG_I2C_SIS630 is not set
755# CONFIG_I2C_SIS96X is not set
756# CONFIG_I2C_STUB is not set
757# CONFIG_I2C_VIA is not set
758# CONFIG_I2C_VIAPRO is not set
759# CONFIG_I2C_VOODOO3 is not set
760# CONFIG_I2C_PCA_ISA is not set
761
762#
763# Miscellaneous I2C Chip support
764#
765# CONFIG_SENSORS_DS1337 is not set
766# CONFIG_SENSORS_DS1374 is not set
767# CONFIG_SENSORS_EEPROM is not set
768CONFIG_SENSORS_PCF8574=y
769# CONFIG_SENSORS_PCA9539 is not set
770# CONFIG_SENSORS_PCF8591 is not set
771# CONFIG_SENSORS_M41T00 is not set
772# CONFIG_SENSORS_MAX6875 is not set
773# CONFIG_I2C_DEBUG_CORE is not set
774# CONFIG_I2C_DEBUG_ALGO is not set
775# CONFIG_I2C_DEBUG_BUS is not set
776# CONFIG_I2C_DEBUG_CHIP is not set
777
778#
779# SPI support
780#
781CONFIG_SPI=y
782CONFIG_SPI_MASTER=y
783
784#
785# SPI Master Controller Drivers
786#
787CONFIG_SPI_BITBANG=y
788CONFIG_SPI_MPC83xx=y
789
790#
791# SPI Protocol Masters
792#
793
794#
795# Dallas's 1-wire bus
796#
797# CONFIG_W1 is not set
798
799#
800# Hardware Monitoring support
801#
802# CONFIG_HWMON is not set
803# CONFIG_HWMON_VID is not set
804
805#
806# Multimedia devices
807#
808# CONFIG_VIDEO_DEV is not set
809
810#
811# Digital Video Broadcasting Devices
812#
813# CONFIG_DVB is not set
814
815#
816# Graphics support
817#
818# CONFIG_FIRMWARE_EDID is not set
819# CONFIG_FB is not set
820# CONFIG_FB_IBM_GXT4500 is not set
821# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
822
823#
824# Sound
825#
826# CONFIG_SOUND is not set
827
828#
829# USB support
830#
831CONFIG_USB_ARCH_HAS_HCD=y
832CONFIG_USB_ARCH_HAS_OHCI=y
833CONFIG_USB_ARCH_HAS_EHCI=y
834# CONFIG_USB is not set
835
836#
837# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
838#
839
840#
841# USB Gadget Support
842#
843# CONFIG_USB_GADGET is not set
844
845#
846# MMC/SD Card support
847#
848# CONFIG_MMC is not set
849
850#
851# LED devices
852#
853# CONFIG_NEW_LEDS is not set
854
855#
856# LED drivers
857#
858
859#
860# LED Triggers
861#
862
863#
864# InfiniBand support
865#
866# CONFIG_INFINIBAND is not set
867
868#
869# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
870#
871
872#
873# Real Time Clock
874#
875CONFIG_RTC_LIB=y
876CONFIG_RTC_CLASS=y
877CONFIG_RTC_HCTOSYS=y
878CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
879# CONFIG_RTC_DEBUG is not set
880
881#
882# RTC interfaces
883#
884CONFIG_RTC_INTF_SYSFS=y
885CONFIG_RTC_INTF_PROC=y
886CONFIG_RTC_INTF_DEV=y
887CONFIG_RTC_INTF_DEV_UIE_EMUL=y
888
889#
890# RTC drivers
891#
892# CONFIG_RTC_DRV_X1205 is not set
893CONFIG_RTC_DRV_DS1307=y
894# CONFIG_RTC_DRV_DS1553 is not set
895# CONFIG_RTC_DRV_ISL1208 is not set
896# CONFIG_RTC_DRV_DS1672 is not set
897# CONFIG_RTC_DRV_DS1742 is not set
898# CONFIG_RTC_DRV_PCF8563 is not set
899# CONFIG_RTC_DRV_PCF8583 is not set
900# CONFIG_RTC_DRV_RS5C348 is not set
901# CONFIG_RTC_DRV_RS5C372 is not set
902# CONFIG_RTC_DRV_M48T86 is not set
903# CONFIG_RTC_DRV_TEST is not set
904# CONFIG_RTC_DRV_MAX6902 is not set
905# CONFIG_RTC_DRV_V3020 is not set
906
907#
908# DMA Engine support
909#
910CONFIG_DMA_ENGINE=y
911
912#
913# DMA Clients
914#
915CONFIG_NET_DMA=y
916
917#
918# DMA Devices
919#
920CONFIG_INTEL_IOATDMA=y
921
922#
923# Virtualization
924#
925
926#
927# File systems
928#
929CONFIG_EXT2_FS=y
930# CONFIG_EXT2_FS_XATTR is not set
931# CONFIG_EXT2_FS_XIP is not set
932CONFIG_EXT3_FS=y
933CONFIG_EXT3_FS_XATTR=y
934# CONFIG_EXT3_FS_POSIX_ACL is not set
935# CONFIG_EXT3_FS_SECURITY is not set
936# CONFIG_EXT4DEV_FS is not set
937CONFIG_JBD=y
938# CONFIG_JBD_DEBUG is not set
939CONFIG_FS_MBCACHE=y
940# CONFIG_REISERFS_FS is not set
941# CONFIG_JFS_FS is not set
942# CONFIG_FS_POSIX_ACL is not set
943# CONFIG_XFS_FS is not set
944# CONFIG_GFS2_FS is not set
945# CONFIG_OCFS2_FS is not set
946# CONFIG_MINIX_FS is not set
947# CONFIG_ROMFS_FS is not set
948CONFIG_INOTIFY=y
949CONFIG_INOTIFY_USER=y
950# CONFIG_QUOTA is not set
951CONFIG_DNOTIFY=y
952# CONFIG_AUTOFS_FS is not set
953# CONFIG_AUTOFS4_FS is not set
954# CONFIG_FUSE_FS is not set
955
956#
957# CD-ROM/DVD Filesystems
958#
959# CONFIG_ISO9660_FS is not set
960# CONFIG_UDF_FS is not set
961
962#
963# DOS/FAT/NT Filesystems
964#
965CONFIG_FAT_FS=y
966CONFIG_MSDOS_FS=y
967CONFIG_VFAT_FS=y
968CONFIG_FAT_DEFAULT_CODEPAGE=437
969CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
970# CONFIG_NTFS_FS is not set
971
972#
973# Pseudo filesystems
974#
975CONFIG_PROC_FS=y
976CONFIG_PROC_KCORE=y
977CONFIG_PROC_SYSCTL=y
978CONFIG_SYSFS=y
979CONFIG_TMPFS=y
980# CONFIG_TMPFS_POSIX_ACL is not set
981# CONFIG_HUGETLB_PAGE is not set
982CONFIG_RAMFS=y
983# CONFIG_CONFIGFS_FS is not set
984
985#
986# Miscellaneous filesystems
987#
988# CONFIG_ADFS_FS is not set
989# CONFIG_AFFS_FS is not set
990# CONFIG_HFS_FS is not set
991# CONFIG_HFSPLUS_FS is not set
992# CONFIG_BEFS_FS is not set
993# CONFIG_BFS_FS is not set
994# CONFIG_EFS_FS is not set
995# CONFIG_JFFS2_FS is not set
996# CONFIG_CRAMFS is not set
997# CONFIG_VXFS_FS is not set
998# CONFIG_HPFS_FS is not set
999# CONFIG_QNX4FS_FS is not set
1000# CONFIG_SYSV_FS is not set
1001# CONFIG_UFS_FS is not set
1002
1003#
1004# Network File Systems
1005#
1006CONFIG_NFS_FS=y
1007CONFIG_NFS_V3=y
1008# CONFIG_NFS_V3_ACL is not set
1009CONFIG_NFS_V4=y
1010# CONFIG_NFS_DIRECTIO is not set
1011# CONFIG_NFSD is not set
1012CONFIG_ROOT_NFS=y
1013CONFIG_LOCKD=y
1014CONFIG_LOCKD_V4=y
1015CONFIG_NFS_COMMON=y
1016CONFIG_SUNRPC=y
1017CONFIG_SUNRPC_GSS=y
1018CONFIG_RPCSEC_GSS_KRB5=y
1019# CONFIG_RPCSEC_GSS_SPKM3 is not set
1020# CONFIG_SMB_FS is not set
1021# CONFIG_CIFS is not set
1022# CONFIG_NCP_FS is not set
1023# CONFIG_CODA_FS is not set
1024# CONFIG_AFS_FS is not set
1025# CONFIG_9P_FS is not set
1026
1027#
1028# Partition Types
1029#
1030CONFIG_PARTITION_ADVANCED=y
1031# CONFIG_ACORN_PARTITION is not set
1032# CONFIG_OSF_PARTITION is not set
1033# CONFIG_AMIGA_PARTITION is not set
1034# CONFIG_ATARI_PARTITION is not set
1035CONFIG_MAC_PARTITION=y
1036CONFIG_MSDOS_PARTITION=y
1037# CONFIG_BSD_DISKLABEL is not set
1038# CONFIG_MINIX_SUBPARTITION is not set
1039# CONFIG_SOLARIS_X86_PARTITION is not set
1040# CONFIG_UNIXWARE_DISKLABEL is not set
1041# CONFIG_LDM_PARTITION is not set
1042# CONFIG_SGI_PARTITION is not set
1043# CONFIG_ULTRIX_PARTITION is not set
1044# CONFIG_SUN_PARTITION is not set
1045# CONFIG_KARMA_PARTITION is not set
1046# CONFIG_EFI_PARTITION is not set
1047
1048#
1049# Native Language Support
1050#
1051CONFIG_NLS=y
1052CONFIG_NLS_DEFAULT="iso8859-1"
1053# CONFIG_NLS_CODEPAGE_437 is not set
1054# CONFIG_NLS_CODEPAGE_737 is not set
1055# CONFIG_NLS_CODEPAGE_775 is not set
1056# CONFIG_NLS_CODEPAGE_850 is not set
1057# CONFIG_NLS_CODEPAGE_852 is not set
1058# CONFIG_NLS_CODEPAGE_855 is not set
1059# CONFIG_NLS_CODEPAGE_857 is not set
1060# CONFIG_NLS_CODEPAGE_860 is not set
1061# CONFIG_NLS_CODEPAGE_861 is not set
1062# CONFIG_NLS_CODEPAGE_862 is not set
1063# CONFIG_NLS_CODEPAGE_863 is not set
1064# CONFIG_NLS_CODEPAGE_864 is not set
1065# CONFIG_NLS_CODEPAGE_865 is not set
1066# CONFIG_NLS_CODEPAGE_866 is not set
1067# CONFIG_NLS_CODEPAGE_869 is not set
1068# CONFIG_NLS_CODEPAGE_936 is not set
1069# CONFIG_NLS_CODEPAGE_950 is not set
1070# CONFIG_NLS_CODEPAGE_932 is not set
1071# CONFIG_NLS_CODEPAGE_949 is not set
1072# CONFIG_NLS_CODEPAGE_874 is not set
1073# CONFIG_NLS_ISO8859_8 is not set
1074# CONFIG_NLS_CODEPAGE_1250 is not set
1075# CONFIG_NLS_CODEPAGE_1251 is not set
1076# CONFIG_NLS_ASCII is not set
1077# CONFIG_NLS_ISO8859_1 is not set
1078# CONFIG_NLS_ISO8859_2 is not set
1079# CONFIG_NLS_ISO8859_3 is not set
1080# CONFIG_NLS_ISO8859_4 is not set
1081# CONFIG_NLS_ISO8859_5 is not set
1082# CONFIG_NLS_ISO8859_6 is not set
1083# CONFIG_NLS_ISO8859_7 is not set
1084# CONFIG_NLS_ISO8859_9 is not set
1085# CONFIG_NLS_ISO8859_13 is not set
1086# CONFIG_NLS_ISO8859_14 is not set
1087# CONFIG_NLS_ISO8859_15 is not set
1088# CONFIG_NLS_KOI8_R is not set
1089# CONFIG_NLS_KOI8_U is not set
1090# CONFIG_NLS_UTF8 is not set
1091
1092#
1093# Distributed Lock Manager
1094#
1095# CONFIG_DLM is not set
1096
1097#
1098# Library routines
1099#
1100CONFIG_BITREVERSE=y
1101# CONFIG_CRC_CCITT is not set
1102# CONFIG_CRC16 is not set
1103CONFIG_CRC32=y
1104# CONFIG_LIBCRC32C is not set
1105CONFIG_PLIST=y
1106CONFIG_IOMAP_COPY=y
1107
1108#
1109# Instrumentation Support
1110#
1111# CONFIG_PROFILING is not set
1112
1113#
1114# Kernel hacking
1115#
1116# CONFIG_PRINTK_TIME is not set
1117CONFIG_ENABLE_MUST_CHECK=y
1118# CONFIG_MAGIC_SYSRQ is not set
1119# CONFIG_UNUSED_SYMBOLS is not set
1120# CONFIG_DEBUG_FS is not set
1121# CONFIG_HEADERS_CHECK is not set
1122# CONFIG_DEBUG_KERNEL is not set
1123CONFIG_LOG_BUF_SHIFT=14
1124# CONFIG_DEBUG_BUGVERBOSE is not set
1125# CONFIG_BOOTX_TEXT is not set
1126# CONFIG_SERIAL_TEXT_DEBUG is not set
1127# CONFIG_PPC_EARLY_DEBUG is not set
1128
1129#
1130# Security options
1131#
1132# CONFIG_KEYS is not set
1133# CONFIG_SECURITY is not set
1134
1135#
1136# Cryptographic options
1137#
1138CONFIG_CRYPTO=y
1139CONFIG_CRYPTO_ALGAPI=y
1140CONFIG_CRYPTO_BLKCIPHER=y
1141CONFIG_CRYPTO_MANAGER=y
1142# CONFIG_CRYPTO_HMAC is not set
1143# CONFIG_CRYPTO_XCBC is not set
1144# CONFIG_CRYPTO_NULL is not set
1145# CONFIG_CRYPTO_MD4 is not set
1146CONFIG_CRYPTO_MD5=y
1147# CONFIG_CRYPTO_SHA1 is not set
1148# CONFIG_CRYPTO_SHA256 is not set
1149# CONFIG_CRYPTO_SHA512 is not set
1150# CONFIG_CRYPTO_WP512 is not set
1151# CONFIG_CRYPTO_TGR192 is not set
1152# CONFIG_CRYPTO_GF128MUL is not set
1153# CONFIG_CRYPTO_ECB is not set
1154CONFIG_CRYPTO_CBC=y
1155# CONFIG_CRYPTO_LRW is not set
1156CONFIG_CRYPTO_DES=y
1157# CONFIG_CRYPTO_BLOWFISH is not set
1158# CONFIG_CRYPTO_TWOFISH is not set
1159# CONFIG_CRYPTO_SERPENT is not set
1160# CONFIG_CRYPTO_AES is not set
1161# CONFIG_CRYPTO_CAST5 is not set
1162# CONFIG_CRYPTO_CAST6 is not set
1163# CONFIG_CRYPTO_TEA is not set
1164# CONFIG_CRYPTO_ARC4 is not set
1165# CONFIG_CRYPTO_KHAZAD is not set
1166# CONFIG_CRYPTO_ANUBIS is not set
1167# CONFIG_CRYPTO_DEFLATE is not set
1168# CONFIG_CRYPTO_MICHAEL_MIC is not set
1169# CONFIG_CRYPTO_CRC32C is not set
1170# CONFIG_CRYPTO_TEST is not set
1171
1172#
1173# Hardware crypto devices
1174#
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig
index c24db58be457..2e3f8efb6ab1 100644
--- a/arch/powerpc/configs/mpc834x_mds_defconfig
+++ b/arch/powerpc/configs/mpc834x_mds_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.20
4# Mon Jan 22 22:24:10 2007 4# Thu Feb 8 01:00:48 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y 7CONFIG_PPC32=y
@@ -34,9 +34,9 @@ CONFIG_DEFAULT_UIMAGE=y
34CONFIG_PPC_83xx=y 34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set 35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set 36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
37# CONFIG_40x is not set 38# CONFIG_40x is not set
38# CONFIG_44x is not set 39# CONFIG_44x is not set
39# CONFIG_8xx is not set
40# CONFIG_E200 is not set 40# CONFIG_E200 is not set
41CONFIG_6xx=y 41CONFIG_6xx=y
42CONFIG_83xx=y 42CONFIG_83xx=y
@@ -128,8 +128,9 @@ CONFIG_PPC_GEN550=y
128# 128#
129# Platform support 129# Platform support
130# 130#
131# CONFIG_MPC8313_RDB is not set
131# CONFIG_MPC832x_MDS is not set 132# CONFIG_MPC832x_MDS is not set
132CONFIG_MPC834x_SYS=y 133CONFIG_MPC834x_MDS=y
133# CONFIG_MPC834x_ITX is not set 134# CONFIG_MPC834x_ITX is not set
134# CONFIG_MPC8360E_PB is not set 135# CONFIG_MPC8360E_PB is not set
135CONFIG_MPC834x=y 136CONFIG_MPC834x=y
@@ -149,7 +150,6 @@ CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT is not set 150# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y 151CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set 152# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y 154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y 155CONFIG_ARCH_POPULATES_NODE_MAP=y
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig
new file mode 100644
index 000000000000..8eb475cd0df0
--- /dev/null
+++ b/arch/powerpc/configs/mpc836x_mds_defconfig
@@ -0,0 +1,1099 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Sat Feb 17 10:09:26 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34CONFIG_PPC_83xx=y
35# CONFIG_PPC_85xx is not set
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_6xx=y
42CONFIG_83xx=y
43CONFIG_PPC_FPU=y
44# CONFIG_PPC_DCR_NATIVE is not set
45# CONFIG_PPC_DCR_MMIO is not set
46CONFIG_PPC_STD_MMU=y
47CONFIG_PPC_STD_MMU_32=y
48# CONFIG_SMP is not set
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
67# CONFIG_POSIX_MQUEUE is not set
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set
75CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y
78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
80# CONFIG_KALLSYMS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87# CONFIG_EPOLL is not set
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102# CONFIG_MODVERSIONS is not set
103# CONFIG_MODULE_SRCVERSION_ALL is not set
104# CONFIG_KMOD is not set
105
106#
107# Block layer
108#
109CONFIG_BLOCK=y
110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113
114#
115# IO Schedulers
116#
117CONFIG_IOSCHED_NOOP=y
118CONFIG_IOSCHED_AS=y
119CONFIG_IOSCHED_DEADLINE=y
120CONFIG_IOSCHED_CFQ=y
121CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_DEADLINE is not set
123# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory"
126CONFIG_QUICC_ENGINE=y
127CONFIG_PPC_GEN550=y
128# CONFIG_WANT_EARLY_SERIAL is not set
129
130#
131# Platform support
132#
133# CONFIG_MPC8313_RDB is not set
134# CONFIG_MPC832x_MDS is not set
135# CONFIG_MPC834x_MDS is not set
136# CONFIG_MPC834x_ITX is not set
137CONFIG_MPC836x_MDS=y
138CONFIG_PPC_MPC836x=y
139# CONFIG_MPIC is not set
140
141#
142# Kernel options
143#
144# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set
146CONFIG_HZ_250=y
147# CONFIG_HZ_300 is not set
148# CONFIG_HZ_1000 is not set
149CONFIG_HZ=250
150CONFIG_PREEMPT_NONE=y
151# CONFIG_PREEMPT_VOLUNTARY is not set
152# CONFIG_PREEMPT is not set
153CONFIG_BINFMT_ELF=y
154# CONFIG_BINFMT_MISC is not set
155CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
156CONFIG_ARCH_FLATMEM_ENABLE=y
157CONFIG_ARCH_POPULATES_NODE_MAP=y
158CONFIG_SELECT_MEMORY_MODEL=y
159CONFIG_FLATMEM_MANUAL=y
160# CONFIG_DISCONTIGMEM_MANUAL is not set
161# CONFIG_SPARSEMEM_MANUAL is not set
162CONFIG_FLATMEM=y
163CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ZONE_DMA_FLAG=1
168CONFIG_PROC_DEVICETREE=y
169# CONFIG_CMDLINE_BOOL is not set
170# CONFIG_PM is not set
171CONFIG_SECCOMP=y
172CONFIG_ISA_DMA_API=y
173
174#
175# Bus options
176#
177CONFIG_ZONE_DMA=y
178CONFIG_GENERIC_ISA_DMA=y
179# CONFIG_MPIC_WEIRD is not set
180# CONFIG_PPC_I8259 is not set
181CONFIG_PPC_INDIRECT_PCI=y
182CONFIG_FSL_SOC=y
183CONFIG_PCI=y
184CONFIG_PCI_DOMAINS=y
185# CONFIG_PCIEPORTBUS is not set
186
187#
188# PCCARD (PCMCIA/CardBus) support
189#
190# CONFIG_PCCARD is not set
191
192#
193# PCI Hotplug Support
194#
195# CONFIG_HOTPLUG_PCI is not set
196
197#
198# Advanced setup
199#
200# CONFIG_ADVANCED_OPTIONS is not set
201
202#
203# Default settings for advanced configuration options are used
204#
205CONFIG_HIGHMEM_START=0xfe000000
206CONFIG_LOWMEM_SIZE=0x30000000
207CONFIG_KERNEL_START=0xc0000000
208CONFIG_TASK_SIZE=0x80000000
209CONFIG_BOOT_LOAD=0x00800000
210
211#
212# Networking
213#
214CONFIG_NET=y
215
216#
217# Networking options
218#
219# CONFIG_NETDEBUG is not set
220CONFIG_PACKET=y
221# CONFIG_PACKET_MMAP is not set
222CONFIG_UNIX=y
223CONFIG_XFRM=y
224# CONFIG_XFRM_USER is not set
225# CONFIG_XFRM_SUB_POLICY is not set
226# CONFIG_XFRM_MIGRATE is not set
227# CONFIG_NET_KEY is not set
228CONFIG_INET=y
229CONFIG_IP_MULTICAST=y
230# CONFIG_IP_ADVANCED_ROUTER is not set
231CONFIG_IP_FIB_HASH=y
232CONFIG_IP_PNP=y
233CONFIG_IP_PNP_DHCP=y
234CONFIG_IP_PNP_BOOTP=y
235# CONFIG_IP_PNP_RARP is not set
236# CONFIG_NET_IPIP is not set
237# CONFIG_NET_IPGRE is not set
238# CONFIG_IP_MROUTE is not set
239# CONFIG_ARPD is not set
240CONFIG_SYN_COOKIES=y
241# CONFIG_INET_AH is not set
242# CONFIG_INET_ESP is not set
243# CONFIG_INET_IPCOMP is not set
244# CONFIG_INET_XFRM_TUNNEL is not set
245# CONFIG_INET_TUNNEL is not set
246CONFIG_INET_XFRM_MODE_TRANSPORT=y
247CONFIG_INET_XFRM_MODE_TUNNEL=y
248CONFIG_INET_XFRM_MODE_BEET=y
249CONFIG_INET_DIAG=y
250CONFIG_INET_TCP_DIAG=y
251# CONFIG_TCP_CONG_ADVANCED is not set
252CONFIG_TCP_CONG_CUBIC=y
253CONFIG_DEFAULT_TCP_CONG="cubic"
254# CONFIG_TCP_MD5SIG is not set
255# CONFIG_IPV6 is not set
256# CONFIG_INET6_XFRM_TUNNEL is not set
257# CONFIG_INET6_TUNNEL is not set
258# CONFIG_NETWORK_SECMARK is not set
259# CONFIG_NETFILTER is not set
260
261#
262# DCCP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_DCCP is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_SCTP is not set
270
271#
272# TIPC Configuration (EXPERIMENTAL)
273#
274# CONFIG_TIPC is not set
275# CONFIG_ATM is not set
276# CONFIG_BRIDGE is not set
277# CONFIG_VLAN_8021Q is not set
278# CONFIG_DECNET is not set
279# CONFIG_LLC2 is not set
280# CONFIG_IPX is not set
281# CONFIG_ATALK is not set
282# CONFIG_X25 is not set
283# CONFIG_LAPB is not set
284# CONFIG_ECONET is not set
285# CONFIG_WAN_ROUTER is not set
286
287#
288# QoS and/or fair queueing
289#
290# CONFIG_NET_SCHED is not set
291
292#
293# Network testing
294#
295# CONFIG_NET_PKTGEN is not set
296# CONFIG_HAMRADIO is not set
297# CONFIG_IRDA is not set
298# CONFIG_BT is not set
299# CONFIG_IEEE80211 is not set
300
301#
302# Device Drivers
303#
304
305#
306# Generic Driver Options
307#
308CONFIG_STANDALONE=y
309CONFIG_PREVENT_FIRMWARE_BUILD=y
310# CONFIG_FW_LOADER is not set
311# CONFIG_SYS_HYPERVISOR is not set
312
313#
314# Connector - unified userspace <-> kernelspace linker
315#
316# CONFIG_CONNECTOR is not set
317
318#
319# Memory Technology Devices (MTD)
320#
321# CONFIG_MTD is not set
322
323#
324# Parallel port support
325#
326# CONFIG_PARPORT is not set
327
328#
329# Plug and Play support
330#
331
332#
333# Block devices
334#
335# CONFIG_BLK_DEV_FD is not set
336# CONFIG_BLK_CPQ_DA is not set
337# CONFIG_BLK_CPQ_CISS_DA is not set
338# CONFIG_BLK_DEV_DAC960 is not set
339# CONFIG_BLK_DEV_UMEM is not set
340# CONFIG_BLK_DEV_COW_COMMON is not set
341CONFIG_BLK_DEV_LOOP=y
342# CONFIG_BLK_DEV_CRYPTOLOOP is not set
343# CONFIG_BLK_DEV_NBD is not set
344# CONFIG_BLK_DEV_SX8 is not set
345CONFIG_BLK_DEV_RAM=y
346CONFIG_BLK_DEV_RAM_COUNT=16
347CONFIG_BLK_DEV_RAM_SIZE=32768
348CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
349CONFIG_BLK_DEV_INITRD=y
350# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set
352
353#
354# Misc devices
355#
356# CONFIG_SGI_IOC4 is not set
357# CONFIG_TIFM_CORE is not set
358
359#
360# ATA/ATAPI/MFM/RLL support
361#
362# CONFIG_IDE is not set
363
364#
365# SCSI device support
366#
367# CONFIG_RAID_ATTRS is not set
368CONFIG_SCSI=y
369# CONFIG_SCSI_TGT is not set
370# CONFIG_SCSI_NETLINK is not set
371CONFIG_SCSI_PROC_FS=y
372
373#
374# SCSI support type (disk, tape, CD-ROM)
375#
376# CONFIG_BLK_DEV_SD is not set
377# CONFIG_CHR_DEV_ST is not set
378# CONFIG_CHR_DEV_OSST is not set
379# CONFIG_BLK_DEV_SR is not set
380# CONFIG_CHR_DEV_SG is not set
381# CONFIG_CHR_DEV_SCH is not set
382
383#
384# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
385#
386# CONFIG_SCSI_MULTI_LUN is not set
387# CONFIG_SCSI_CONSTANTS is not set
388# CONFIG_SCSI_LOGGING is not set
389# CONFIG_SCSI_SCAN_ASYNC is not set
390
391#
392# SCSI Transports
393#
394# CONFIG_SCSI_SPI_ATTRS is not set
395# CONFIG_SCSI_FC_ATTRS is not set
396# CONFIG_SCSI_ISCSI_ATTRS is not set
397# CONFIG_SCSI_SAS_ATTRS is not set
398# CONFIG_SCSI_SAS_LIBSAS is not set
399
400#
401# SCSI low-level drivers
402#
403# CONFIG_ISCSI_TCP is not set
404# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
405# CONFIG_SCSI_3W_9XXX is not set
406# CONFIG_SCSI_ACARD is not set
407# CONFIG_SCSI_AACRAID is not set
408# CONFIG_SCSI_AIC7XXX is not set
409# CONFIG_SCSI_AIC7XXX_OLD is not set
410# CONFIG_SCSI_AIC79XX is not set
411# CONFIG_SCSI_AIC94XX is not set
412# CONFIG_SCSI_DPT_I2O is not set
413# CONFIG_SCSI_ARCMSR is not set
414# CONFIG_MEGARAID_NEWGEN is not set
415# CONFIG_MEGARAID_LEGACY is not set
416# CONFIG_MEGARAID_SAS is not set
417# CONFIG_SCSI_HPTIOP is not set
418# CONFIG_SCSI_BUSLOGIC is not set
419# CONFIG_SCSI_DMX3191D is not set
420# CONFIG_SCSI_EATA is not set
421# CONFIG_SCSI_FUTURE_DOMAIN is not set
422# CONFIG_SCSI_GDTH is not set
423# CONFIG_SCSI_IPS is not set
424# CONFIG_SCSI_INITIO is not set
425# CONFIG_SCSI_INIA100 is not set
426# CONFIG_SCSI_STEX is not set
427# CONFIG_SCSI_SYM53C8XX_2 is not set
428# CONFIG_SCSI_QLOGIC_1280 is not set
429# CONFIG_SCSI_QLA_FC is not set
430# CONFIG_SCSI_QLA_ISCSI is not set
431# CONFIG_SCSI_LPFC is not set
432# CONFIG_SCSI_DC395x is not set
433# CONFIG_SCSI_DC390T is not set
434# CONFIG_SCSI_NSP32 is not set
435# CONFIG_SCSI_DEBUG is not set
436# CONFIG_SCSI_SRP is not set
437
438#
439# Serial ATA (prod) and Parallel ATA (experimental) drivers
440#
441# CONFIG_ATA is not set
442
443#
444# Multi-device support (RAID and LVM)
445#
446# CONFIG_MD is not set
447
448#
449# Fusion MPT device support
450#
451# CONFIG_FUSION is not set
452# CONFIG_FUSION_SPI is not set
453# CONFIG_FUSION_FC is not set
454# CONFIG_FUSION_SAS is not set
455
456#
457# IEEE 1394 (FireWire) support
458#
459# CONFIG_IEEE1394 is not set
460
461#
462# I2O device support
463#
464# CONFIG_I2O is not set
465
466#
467# Macintosh device drivers
468#
469# CONFIG_MAC_EMUMOUSEBTN is not set
470# CONFIG_WINDFARM is not set
471
472#
473# Network device support
474#
475CONFIG_NETDEVICES=y
476# CONFIG_DUMMY is not set
477# CONFIG_BONDING is not set
478# CONFIG_EQUALIZER is not set
479# CONFIG_TUN is not set
480
481#
482# ARCnet devices
483#
484# CONFIG_ARCNET is not set
485
486#
487# PHY device support
488#
489# CONFIG_PHYLIB is not set
490
491#
492# Ethernet (10 or 100Mbit)
493#
494CONFIG_NET_ETHERNET=y
495CONFIG_MII=y
496# CONFIG_HAPPYMEAL is not set
497# CONFIG_SUNGEM is not set
498# CONFIG_CASSINI is not set
499# CONFIG_NET_VENDOR_3COM is not set
500
501#
502# Tulip family network device support
503#
504# CONFIG_NET_TULIP is not set
505# CONFIG_HP100 is not set
506# CONFIG_NET_PCI is not set
507
508#
509# Ethernet (1000 Mbit)
510#
511# CONFIG_ACENIC is not set
512# CONFIG_DL2K is not set
513# CONFIG_E1000 is not set
514# CONFIG_NS83820 is not set
515# CONFIG_HAMACHI is not set
516# CONFIG_YELLOWFIN is not set
517# CONFIG_R8169 is not set
518# CONFIG_SIS190 is not set
519# CONFIG_SKGE is not set
520# CONFIG_SKY2 is not set
521# CONFIG_SK98LIN is not set
522# CONFIG_TIGON3 is not set
523# CONFIG_BNX2 is not set
524# CONFIG_GIANFAR is not set
525CONFIG_UCC_GETH=y
526# CONFIG_UGETH_NAPI is not set
527# CONFIG_UGETH_MAGIC_PACKET is not set
528# CONFIG_UGETH_FILTERING is not set
529# CONFIG_UGETH_TX_ON_DEMOND is not set
530# CONFIG_QLA3XXX is not set
531
532#
533# Ethernet (10000 Mbit)
534#
535# CONFIG_CHELSIO_T1 is not set
536# CONFIG_CHELSIO_T3 is not set
537# CONFIG_IXGB is not set
538# CONFIG_S2IO is not set
539# CONFIG_MYRI10GE is not set
540# CONFIG_NETXEN_NIC is not set
541
542#
543# Token Ring devices
544#
545# CONFIG_TR is not set
546
547#
548# Wireless LAN (non-hamradio)
549#
550# CONFIG_NET_RADIO is not set
551
552#
553# Wan interfaces
554#
555# CONFIG_WAN is not set
556# CONFIG_FDDI is not set
557# CONFIG_HIPPI is not set
558# CONFIG_PPP is not set
559# CONFIG_SLIP is not set
560# CONFIG_NET_FC is not set
561# CONFIG_SHAPER is not set
562# CONFIG_NETCONSOLE is not set
563# CONFIG_NETPOLL is not set
564# CONFIG_NET_POLL_CONTROLLER is not set
565
566#
567# ISDN subsystem
568#
569# CONFIG_ISDN is not set
570
571#
572# Telephony Support
573#
574# CONFIG_PHONE is not set
575
576#
577# Input device support
578#
579CONFIG_INPUT=y
580# CONFIG_INPUT_FF_MEMLESS is not set
581
582#
583# Userland interfaces
584#
585# CONFIG_INPUT_MOUSEDEV is not set
586# CONFIG_INPUT_JOYDEV is not set
587# CONFIG_INPUT_TSDEV is not set
588# CONFIG_INPUT_EVDEV is not set
589# CONFIG_INPUT_EVBUG is not set
590
591#
592# Input Device Drivers
593#
594# CONFIG_INPUT_KEYBOARD is not set
595# CONFIG_INPUT_MOUSE is not set
596# CONFIG_INPUT_JOYSTICK is not set
597# CONFIG_INPUT_TOUCHSCREEN is not set
598# CONFIG_INPUT_MISC is not set
599
600#
601# Hardware I/O ports
602#
603# CONFIG_SERIO is not set
604# CONFIG_GAMEPORT is not set
605
606#
607# Character devices
608#
609# CONFIG_VT is not set
610# CONFIG_SERIAL_NONSTANDARD is not set
611
612#
613# Serial drivers
614#
615CONFIG_SERIAL_8250=y
616CONFIG_SERIAL_8250_CONSOLE=y
617CONFIG_SERIAL_8250_PCI=y
618CONFIG_SERIAL_8250_NR_UARTS=4
619CONFIG_SERIAL_8250_RUNTIME_UARTS=4
620# CONFIG_SERIAL_8250_EXTENDED is not set
621
622#
623# Non-8250 serial port support
624#
625# CONFIG_SERIAL_UARTLITE is not set
626CONFIG_SERIAL_CORE=y
627CONFIG_SERIAL_CORE_CONSOLE=y
628# CONFIG_SERIAL_JSM is not set
629# CONFIG_SERIAL_OF_PLATFORM is not set
630CONFIG_UNIX98_PTYS=y
631CONFIG_LEGACY_PTYS=y
632CONFIG_LEGACY_PTY_COUNT=256
633
634#
635# IPMI
636#
637# CONFIG_IPMI_HANDLER is not set
638
639#
640# Watchdog Cards
641#
642CONFIG_WATCHDOG=y
643# CONFIG_WATCHDOG_NOWAYOUT is not set
644
645#
646# Watchdog Device Drivers
647#
648# CONFIG_SOFT_WATCHDOG is not set
649CONFIG_83xx_WDT=y
650
651#
652# PCI-based Watchdog Cards
653#
654# CONFIG_PCIPCWATCHDOG is not set
655# CONFIG_WDTPCI is not set
656CONFIG_HW_RANDOM=y
657# CONFIG_NVRAM is not set
658CONFIG_GEN_RTC=y
659# CONFIG_GEN_RTC_X is not set
660# CONFIG_DTLK is not set
661# CONFIG_R3964 is not set
662# CONFIG_APPLICOM is not set
663# CONFIG_AGP is not set
664# CONFIG_DRM is not set
665# CONFIG_RAW_DRIVER is not set
666
667#
668# TPM devices
669#
670# CONFIG_TCG_TPM is not set
671
672#
673# I2C support
674#
675CONFIG_I2C=y
676CONFIG_I2C_CHARDEV=y
677
678#
679# I2C Algorithms
680#
681# CONFIG_I2C_ALGOBIT is not set
682# CONFIG_I2C_ALGOPCF is not set
683# CONFIG_I2C_ALGOPCA is not set
684
685#
686# I2C Hardware Bus support
687#
688# CONFIG_I2C_ALI1535 is not set
689# CONFIG_I2C_ALI1563 is not set
690# CONFIG_I2C_ALI15X3 is not set
691# CONFIG_I2C_AMD756 is not set
692# CONFIG_I2C_AMD8111 is not set
693# CONFIG_I2C_I801 is not set
694# CONFIG_I2C_I810 is not set
695# CONFIG_I2C_PIIX4 is not set
696CONFIG_I2C_MPC=y
697# CONFIG_I2C_NFORCE2 is not set
698# CONFIG_I2C_OCORES is not set
699# CONFIG_I2C_PARPORT_LIGHT is not set
700# CONFIG_I2C_PASEMI is not set
701# CONFIG_I2C_PROSAVAGE is not set
702# CONFIG_I2C_SAVAGE4 is not set
703# CONFIG_I2C_SIS5595 is not set
704# CONFIG_I2C_SIS630 is not set
705# CONFIG_I2C_SIS96X is not set
706# CONFIG_I2C_STUB is not set
707# CONFIG_I2C_VIA is not set
708# CONFIG_I2C_VIAPRO is not set
709# CONFIG_I2C_VOODOO3 is not set
710# CONFIG_I2C_PCA_ISA is not set
711
712#
713# Miscellaneous I2C Chip support
714#
715# CONFIG_SENSORS_DS1337 is not set
716# CONFIG_SENSORS_DS1374 is not set
717# CONFIG_SENSORS_EEPROM is not set
718# CONFIG_SENSORS_PCF8574 is not set
719# CONFIG_SENSORS_PCA9539 is not set
720# CONFIG_SENSORS_PCF8591 is not set
721# CONFIG_SENSORS_M41T00 is not set
722# CONFIG_SENSORS_MAX6875 is not set
723# CONFIG_I2C_DEBUG_CORE is not set
724# CONFIG_I2C_DEBUG_ALGO is not set
725# CONFIG_I2C_DEBUG_BUS is not set
726# CONFIG_I2C_DEBUG_CHIP is not set
727
728#
729# SPI support
730#
731# CONFIG_SPI is not set
732# CONFIG_SPI_MASTER is not set
733
734#
735# Dallas's 1-wire bus
736#
737# CONFIG_W1 is not set
738
739#
740# Hardware Monitoring support
741#
742CONFIG_HWMON=y
743# CONFIG_HWMON_VID is not set
744# CONFIG_SENSORS_ABITUGURU is not set
745# CONFIG_SENSORS_ADM1021 is not set
746# CONFIG_SENSORS_ADM1025 is not set
747# CONFIG_SENSORS_ADM1026 is not set
748# CONFIG_SENSORS_ADM1031 is not set
749# CONFIG_SENSORS_ADM9240 is not set
750# CONFIG_SENSORS_ASB100 is not set
751# CONFIG_SENSORS_ATXP1 is not set
752# CONFIG_SENSORS_DS1621 is not set
753# CONFIG_SENSORS_F71805F is not set
754# CONFIG_SENSORS_FSCHER is not set
755# CONFIG_SENSORS_FSCPOS is not set
756# CONFIG_SENSORS_GL518SM is not set
757# CONFIG_SENSORS_GL520SM is not set
758# CONFIG_SENSORS_IT87 is not set
759# CONFIG_SENSORS_LM63 is not set
760# CONFIG_SENSORS_LM75 is not set
761# CONFIG_SENSORS_LM77 is not set
762# CONFIG_SENSORS_LM78 is not set
763# CONFIG_SENSORS_LM80 is not set
764# CONFIG_SENSORS_LM83 is not set
765# CONFIG_SENSORS_LM85 is not set
766# CONFIG_SENSORS_LM87 is not set
767# CONFIG_SENSORS_LM90 is not set
768# CONFIG_SENSORS_LM92 is not set
769# CONFIG_SENSORS_MAX1619 is not set
770# CONFIG_SENSORS_PC87360 is not set
771# CONFIG_SENSORS_PC87427 is not set
772# CONFIG_SENSORS_SIS5595 is not set
773# CONFIG_SENSORS_SMSC47M1 is not set
774# CONFIG_SENSORS_SMSC47M192 is not set
775# CONFIG_SENSORS_SMSC47B397 is not set
776# CONFIG_SENSORS_VIA686A is not set
777# CONFIG_SENSORS_VT1211 is not set
778# CONFIG_SENSORS_VT8231 is not set
779# CONFIG_SENSORS_W83781D is not set
780# CONFIG_SENSORS_W83791D is not set
781# CONFIG_SENSORS_W83792D is not set
782# CONFIG_SENSORS_W83793 is not set
783# CONFIG_SENSORS_W83L785TS is not set
784# CONFIG_SENSORS_W83627HF is not set
785# CONFIG_SENSORS_W83627EHF is not set
786# CONFIG_HWMON_DEBUG_CHIP is not set
787
788#
789# Multimedia devices
790#
791# CONFIG_VIDEO_DEV is not set
792
793#
794# Digital Video Broadcasting Devices
795#
796# CONFIG_DVB is not set
797
798#
799# Graphics support
800#
801CONFIG_FIRMWARE_EDID=y
802# CONFIG_FB is not set
803# CONFIG_FB_IBM_GXT4500 is not set
804# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
805
806#
807# Sound
808#
809# CONFIG_SOUND is not set
810
811#
812# HID Devices
813#
814CONFIG_HID=y
815# CONFIG_HID_DEBUG is not set
816
817#
818# USB support
819#
820CONFIG_USB_ARCH_HAS_HCD=y
821CONFIG_USB_ARCH_HAS_OHCI=y
822CONFIG_USB_ARCH_HAS_EHCI=y
823# CONFIG_USB is not set
824
825#
826# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
827#
828
829#
830# USB Gadget Support
831#
832# CONFIG_USB_GADGET is not set
833
834#
835# MMC/SD Card support
836#
837# CONFIG_MMC is not set
838
839#
840# LED devices
841#
842# CONFIG_NEW_LEDS is not set
843
844#
845# LED drivers
846#
847
848#
849# LED Triggers
850#
851
852#
853# InfiniBand support
854#
855# CONFIG_INFINIBAND is not set
856
857#
858# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
859#
860
861#
862# Real Time Clock
863#
864# CONFIG_RTC_CLASS is not set
865
866#
867# DMA Engine support
868#
869# CONFIG_DMA_ENGINE is not set
870
871#
872# DMA Clients
873#
874
875#
876# DMA Devices
877#
878
879#
880# Auxiliary Display support
881#
882
883#
884# Virtualization
885#
886
887#
888# File systems
889#
890CONFIG_EXT2_FS=y
891# CONFIG_EXT2_FS_XATTR is not set
892# CONFIG_EXT2_FS_XIP is not set
893CONFIG_EXT3_FS=y
894CONFIG_EXT3_FS_XATTR=y
895# CONFIG_EXT3_FS_POSIX_ACL is not set
896# CONFIG_EXT3_FS_SECURITY is not set
897# CONFIG_EXT4DEV_FS is not set
898CONFIG_JBD=y
899# CONFIG_JBD_DEBUG is not set
900CONFIG_FS_MBCACHE=y
901# CONFIG_REISERFS_FS is not set
902# CONFIG_JFS_FS is not set
903# CONFIG_FS_POSIX_ACL is not set
904# CONFIG_XFS_FS is not set
905# CONFIG_GFS2_FS is not set
906# CONFIG_OCFS2_FS is not set
907# CONFIG_MINIX_FS is not set
908# CONFIG_ROMFS_FS is not set
909CONFIG_INOTIFY=y
910CONFIG_INOTIFY_USER=y
911# CONFIG_QUOTA is not set
912CONFIG_DNOTIFY=y
913# CONFIG_AUTOFS_FS is not set
914# CONFIG_AUTOFS4_FS is not set
915# CONFIG_FUSE_FS is not set
916
917#
918# CD-ROM/DVD Filesystems
919#
920# CONFIG_ISO9660_FS is not set
921# CONFIG_UDF_FS is not set
922
923#
924# DOS/FAT/NT Filesystems
925#
926# CONFIG_MSDOS_FS is not set
927# CONFIG_VFAT_FS is not set
928# CONFIG_NTFS_FS is not set
929
930#
931# Pseudo filesystems
932#
933CONFIG_PROC_FS=y
934CONFIG_PROC_KCORE=y
935CONFIG_PROC_SYSCTL=y
936CONFIG_SYSFS=y
937CONFIG_TMPFS=y
938# CONFIG_TMPFS_POSIX_ACL is not set
939# CONFIG_HUGETLB_PAGE is not set
940CONFIG_RAMFS=y
941# CONFIG_CONFIGFS_FS is not set
942
943#
944# Miscellaneous filesystems
945#
946# CONFIG_ADFS_FS is not set
947# CONFIG_AFFS_FS is not set
948# CONFIG_HFS_FS is not set
949# CONFIG_HFSPLUS_FS is not set
950# CONFIG_BEFS_FS is not set
951# CONFIG_BFS_FS is not set
952# CONFIG_EFS_FS is not set
953# CONFIG_CRAMFS is not set
954# CONFIG_VXFS_FS is not set
955# CONFIG_HPFS_FS is not set
956# CONFIG_QNX4FS_FS is not set
957# CONFIG_SYSV_FS is not set
958# CONFIG_UFS_FS is not set
959
960#
961# Network File Systems
962#
963CONFIG_NFS_FS=y
964CONFIG_NFS_V3=y
965# CONFIG_NFS_V3_ACL is not set
966CONFIG_NFS_V4=y
967# CONFIG_NFS_DIRECTIO is not set
968# CONFIG_NFSD is not set
969CONFIG_ROOT_NFS=y
970CONFIG_LOCKD=y
971CONFIG_LOCKD_V4=y
972CONFIG_NFS_COMMON=y
973CONFIG_SUNRPC=y
974CONFIG_SUNRPC_GSS=y
975CONFIG_RPCSEC_GSS_KRB5=y
976# CONFIG_RPCSEC_GSS_SPKM3 is not set
977# CONFIG_SMB_FS is not set
978# CONFIG_CIFS is not set
979# CONFIG_NCP_FS is not set
980# CONFIG_CODA_FS is not set
981# CONFIG_AFS_FS is not set
982# CONFIG_9P_FS is not set
983
984#
985# Partition Types
986#
987CONFIG_PARTITION_ADVANCED=y
988# CONFIG_ACORN_PARTITION is not set
989# CONFIG_OSF_PARTITION is not set
990# CONFIG_AMIGA_PARTITION is not set
991# CONFIG_ATARI_PARTITION is not set
992# CONFIG_MAC_PARTITION is not set
993# CONFIG_MSDOS_PARTITION is not set
994# CONFIG_LDM_PARTITION is not set
995# CONFIG_SGI_PARTITION is not set
996# CONFIG_ULTRIX_PARTITION is not set
997# CONFIG_SUN_PARTITION is not set
998# CONFIG_KARMA_PARTITION is not set
999# CONFIG_EFI_PARTITION is not set
1000
1001#
1002# Native Language Support
1003#
1004# CONFIG_NLS is not set
1005
1006#
1007# Distributed Lock Manager
1008#
1009# CONFIG_DLM is not set
1010
1011#
1012# QE Options
1013#
1014CONFIG_UCC_SLOW=y
1015CONFIG_UCC_FAST=y
1016CONFIG_UCC=y
1017
1018#
1019# Library routines
1020#
1021CONFIG_BITREVERSE=y
1022# CONFIG_CRC_CCITT is not set
1023# CONFIG_CRC16 is not set
1024CONFIG_CRC32=y
1025# CONFIG_LIBCRC32C is not set
1026CONFIG_PLIST=y
1027CONFIG_HAS_IOMEM=y
1028CONFIG_HAS_IOPORT=y
1029
1030#
1031# Instrumentation Support
1032#
1033# CONFIG_PROFILING is not set
1034
1035#
1036# Kernel hacking
1037#
1038# CONFIG_PRINTK_TIME is not set
1039CONFIG_ENABLE_MUST_CHECK=y
1040# CONFIG_MAGIC_SYSRQ is not set
1041# CONFIG_UNUSED_SYMBOLS is not set
1042# CONFIG_DEBUG_FS is not set
1043# CONFIG_HEADERS_CHECK is not set
1044# CONFIG_DEBUG_KERNEL is not set
1045CONFIG_LOG_BUF_SHIFT=14
1046# CONFIG_DEBUG_BUGVERBOSE is not set
1047# CONFIG_BOOTX_TEXT is not set
1048# CONFIG_SERIAL_TEXT_DEBUG is not set
1049# CONFIG_PPC_EARLY_DEBUG is not set
1050
1051#
1052# Security options
1053#
1054# CONFIG_KEYS is not set
1055# CONFIG_SECURITY is not set
1056
1057#
1058# Cryptographic options
1059#
1060CONFIG_CRYPTO=y
1061CONFIG_CRYPTO_ALGAPI=y
1062CONFIG_CRYPTO_BLKCIPHER=y
1063CONFIG_CRYPTO_MANAGER=y
1064# CONFIG_CRYPTO_HMAC is not set
1065# CONFIG_CRYPTO_XCBC is not set
1066# CONFIG_CRYPTO_NULL is not set
1067# CONFIG_CRYPTO_MD4 is not set
1068CONFIG_CRYPTO_MD5=y
1069# CONFIG_CRYPTO_SHA1 is not set
1070# CONFIG_CRYPTO_SHA256 is not set
1071# CONFIG_CRYPTO_SHA512 is not set
1072# CONFIG_CRYPTO_WP512 is not set
1073# CONFIG_CRYPTO_TGR192 is not set
1074# CONFIG_CRYPTO_GF128MUL is not set
1075CONFIG_CRYPTO_ECB=m
1076CONFIG_CRYPTO_CBC=y
1077CONFIG_CRYPTO_PCBC=m
1078# CONFIG_CRYPTO_LRW is not set
1079CONFIG_CRYPTO_DES=y
1080# CONFIG_CRYPTO_FCRYPT is not set
1081# CONFIG_CRYPTO_BLOWFISH is not set
1082# CONFIG_CRYPTO_TWOFISH is not set
1083# CONFIG_CRYPTO_SERPENT is not set
1084# CONFIG_CRYPTO_AES is not set
1085# CONFIG_CRYPTO_CAST5 is not set
1086# CONFIG_CRYPTO_CAST6 is not set
1087# CONFIG_CRYPTO_TEA is not set
1088# CONFIG_CRYPTO_ARC4 is not set
1089# CONFIG_CRYPTO_KHAZAD is not set
1090# CONFIG_CRYPTO_ANUBIS is not set
1091# CONFIG_CRYPTO_DEFLATE is not set
1092# CONFIG_CRYPTO_MICHAEL_MIC is not set
1093# CONFIG_CRYPTO_CRC32C is not set
1094# CONFIG_CRYPTO_CAMELLIA is not set
1095# CONFIG_CRYPTO_TEST is not set
1096
1097#
1098# Hardware crypto devices
1099#
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig
new file mode 100644
index 000000000000..7b3800674cbf
--- /dev/null
+++ b/arch/powerpc/configs/mpc8568mds_defconfig
@@ -0,0 +1,1010 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20
4# Sat Feb 17 16:26:53 2007
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_CALIBRATE_DELAY=y
16CONFIG_GENERIC_FIND_NEXT_BIT=y
17CONFIG_PPC=y
18CONFIG_EARLY_PRINTK=y
19CONFIG_GENERIC_NVRAM=y
20CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
21CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y
24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
26CONFIG_GENERIC_BUG=y
27CONFIG_DEFAULT_UIMAGE=y
28
29#
30# Processor support
31#
32# CONFIG_CLASSIC32 is not set
33# CONFIG_PPC_82xx is not set
34# CONFIG_PPC_83xx is not set
35CONFIG_PPC_85xx=y
36# CONFIG_PPC_86xx is not set
37# CONFIG_PPC_8xx is not set
38# CONFIG_40x is not set
39# CONFIG_44x is not set
40# CONFIG_E200 is not set
41CONFIG_85xx=y
42CONFIG_E500=y
43# CONFIG_PPC_DCR_NATIVE is not set
44# CONFIG_PPC_DCR_MMIO is not set
45CONFIG_BOOKE=y
46CONFIG_FSL_BOOKE=y
47# CONFIG_PHYS_64BIT is not set
48CONFIG_SPE=y
49CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
50
51#
52# Code maturity level options
53#
54CONFIG_EXPERIMENTAL=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65# CONFIG_IPC_NS is not set
66CONFIG_SYSVIPC_SYSCTL=y
67# CONFIG_POSIX_MQUEUE is not set
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_UTS_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_SYSFS_DEPRECATED=y
74# CONFIG_RELAY is not set
75CONFIG_INITRAMFS_SOURCE=""
76# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
77CONFIG_SYSCTL=y
78CONFIG_EMBEDDED=y
79CONFIG_SYSCTL_SYSCALL=y
80# CONFIG_KALLSYMS is not set
81CONFIG_HOTPLUG=y
82CONFIG_PRINTK=y
83CONFIG_BUG=y
84CONFIG_ELF_CORE=y
85CONFIG_BASE_FULL=y
86CONFIG_FUTEX=y
87# CONFIG_EPOLL is not set
88CONFIG_SHMEM=y
89CONFIG_SLAB=y
90CONFIG_VM_EVENT_COUNTERS=y
91CONFIG_RT_MUTEXES=y
92# CONFIG_TINY_SHMEM is not set
93CONFIG_BASE_SMALL=0
94# CONFIG_SLOB is not set
95
96#
97# Loadable module support
98#
99CONFIG_MODULES=y
100CONFIG_MODULE_UNLOAD=y
101# CONFIG_MODULE_FORCE_UNLOAD is not set
102# CONFIG_MODVERSIONS is not set
103# CONFIG_MODULE_SRCVERSION_ALL is not set
104# CONFIG_KMOD is not set
105
106#
107# Block layer
108#
109CONFIG_BLOCK=y
110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113
114#
115# IO Schedulers
116#
117CONFIG_IOSCHED_NOOP=y
118CONFIG_IOSCHED_AS=y
119CONFIG_IOSCHED_DEADLINE=y
120CONFIG_IOSCHED_CFQ=y
121CONFIG_DEFAULT_AS=y
122# CONFIG_DEFAULT_DEADLINE is not set
123# CONFIG_DEFAULT_CFQ is not set
124# CONFIG_DEFAULT_NOOP is not set
125CONFIG_DEFAULT_IOSCHED="anticipatory"
126# CONFIG_WANT_EARLY_SERIAL is not set
127
128#
129# Platform support
130#
131# CONFIG_MPC8540_ADS is not set
132# CONFIG_MPC8560_ADS is not set
133# CONFIG_MPC85xx_CDS is not set
134CONFIG_MPC85xx_MDS=y
135CONFIG_MPC85xx=y
136CONFIG_PPC_INDIRECT_PCI_BE=y
137CONFIG_MPIC=y
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144CONFIG_HZ_250=y
145# CONFIG_HZ_300 is not set
146# CONFIG_HZ_1000 is not set
147CONFIG_HZ=250
148CONFIG_PREEMPT_NONE=y
149# CONFIG_PREEMPT_VOLUNTARY is not set
150# CONFIG_PREEMPT is not set
151CONFIG_BINFMT_ELF=y
152# CONFIG_BINFMT_MISC is not set
153CONFIG_MATH_EMULATION=y
154CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
155CONFIG_ARCH_FLATMEM_ENABLE=y
156CONFIG_ARCH_POPULATES_NODE_MAP=y
157CONFIG_SELECT_MEMORY_MODEL=y
158CONFIG_FLATMEM_MANUAL=y
159# CONFIG_DISCONTIGMEM_MANUAL is not set
160# CONFIG_SPARSEMEM_MANUAL is not set
161CONFIG_FLATMEM=y
162CONFIG_FLAT_NODE_MEM_MAP=y
163# CONFIG_SPARSEMEM_STATIC is not set
164CONFIG_SPLIT_PTLOCK_CPUS=4
165# CONFIG_RESOURCES_64BIT is not set
166CONFIG_ZONE_DMA_FLAG=1
167CONFIG_PROC_DEVICETREE=y
168# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set
170CONFIG_SECCOMP=y
171CONFIG_ISA_DMA_API=y
172
173#
174# Bus options
175#
176CONFIG_ZONE_DMA=y
177# CONFIG_MPIC_WEIRD is not set
178# CONFIG_PPC_I8259 is not set
179CONFIG_PPC_INDIRECT_PCI=y
180CONFIG_FSL_SOC=y
181# CONFIG_PCI is not set
182# CONFIG_PCI_DOMAINS is not set
183
184#
185# PCCARD (PCMCIA/CardBus) support
186#
187# CONFIG_PCCARD is not set
188
189#
190# PCI Hotplug Support
191#
192
193#
194# Advanced setup
195#
196# CONFIG_ADVANCED_OPTIONS is not set
197
198#
199# Default settings for advanced configuration options are used
200#
201CONFIG_HIGHMEM_START=0xfe000000
202CONFIG_LOWMEM_SIZE=0x30000000
203CONFIG_KERNEL_START=0xc0000000
204CONFIG_TASK_SIZE=0x80000000
205CONFIG_BOOT_LOAD=0x00800000
206
207#
208# Networking
209#
210CONFIG_NET=y
211
212#
213# Networking options
214#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y
219CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set
222# CONFIG_XFRM_MIGRATE is not set
223# CONFIG_NET_KEY is not set
224CONFIG_INET=y
225CONFIG_IP_MULTICAST=y
226# CONFIG_IP_ADVANCED_ROUTER is not set
227CONFIG_IP_FIB_HASH=y
228CONFIG_IP_PNP=y
229CONFIG_IP_PNP_DHCP=y
230CONFIG_IP_PNP_BOOTP=y
231# CONFIG_IP_PNP_RARP is not set
232# CONFIG_NET_IPIP is not set
233# CONFIG_NET_IPGRE is not set
234# CONFIG_IP_MROUTE is not set
235# CONFIG_ARPD is not set
236CONFIG_SYN_COOKIES=y
237# CONFIG_INET_AH is not set
238# CONFIG_INET_ESP is not set
239# CONFIG_INET_IPCOMP is not set
240# CONFIG_INET_XFRM_TUNNEL is not set
241# CONFIG_INET_TUNNEL is not set
242CONFIG_INET_XFRM_MODE_TRANSPORT=y
243CONFIG_INET_XFRM_MODE_TUNNEL=y
244CONFIG_INET_XFRM_MODE_BEET=y
245CONFIG_INET_DIAG=y
246CONFIG_INET_TCP_DIAG=y
247# CONFIG_TCP_CONG_ADVANCED is not set
248CONFIG_TCP_CONG_CUBIC=y
249CONFIG_DEFAULT_TCP_CONG="cubic"
250# CONFIG_TCP_MD5SIG is not set
251# CONFIG_IPV6 is not set
252# CONFIG_INET6_XFRM_TUNNEL is not set
253# CONFIG_INET6_TUNNEL is not set
254# CONFIG_NETWORK_SECMARK is not set
255# CONFIG_NETFILTER is not set
256
257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
263# SCTP Configuration (EXPERIMENTAL)
264#
265# CONFIG_IP_SCTP is not set
266
267#
268# TIPC Configuration (EXPERIMENTAL)
269#
270# CONFIG_TIPC is not set
271# CONFIG_ATM is not set
272# CONFIG_BRIDGE is not set
273# CONFIG_VLAN_8021Q is not set
274# CONFIG_DECNET is not set
275# CONFIG_LLC2 is not set
276# CONFIG_IPX is not set
277# CONFIG_ATALK is not set
278# CONFIG_X25 is not set
279# CONFIG_LAPB is not set
280# CONFIG_ECONET is not set
281# CONFIG_WAN_ROUTER is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287
288#
289# Network testing
290#
291# CONFIG_NET_PKTGEN is not set
292# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set
294# CONFIG_BT is not set
295# CONFIG_IEEE80211 is not set
296
297#
298# Device Drivers
299#
300
301#
302# Generic Driver Options
303#
304CONFIG_STANDALONE=y
305CONFIG_PREVENT_FIRMWARE_BUILD=y
306# CONFIG_FW_LOADER is not set
307# CONFIG_DEBUG_DRIVER is not set
308# CONFIG_DEBUG_DEVRES is not set
309# CONFIG_SYS_HYPERVISOR is not set
310
311#
312# Connector - unified userspace <-> kernelspace linker
313#
314# CONFIG_CONNECTOR is not set
315
316#
317# Memory Technology Devices (MTD)
318#
319# CONFIG_MTD is not set
320
321#
322# Parallel port support
323#
324# CONFIG_PARPORT is not set
325
326#
327# Plug and Play support
328#
329
330#
331# Block devices
332#
333# CONFIG_BLK_DEV_FD is not set
334# CONFIG_BLK_DEV_COW_COMMON is not set
335CONFIG_BLK_DEV_LOOP=y
336# CONFIG_BLK_DEV_CRYPTOLOOP is not set
337# CONFIG_BLK_DEV_NBD is not set
338CONFIG_BLK_DEV_RAM=y
339CONFIG_BLK_DEV_RAM_COUNT=16
340CONFIG_BLK_DEV_RAM_SIZE=32768
341CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
342CONFIG_BLK_DEV_INITRD=y
343# CONFIG_CDROM_PKTCDVD is not set
344# CONFIG_ATA_OVER_ETH is not set
345
346#
347# Misc devices
348#
349
350#
351# ATA/ATAPI/MFM/RLL support
352#
353# CONFIG_IDE is not set
354
355#
356# SCSI device support
357#
358# CONFIG_RAID_ATTRS is not set
359CONFIG_SCSI=y
360# CONFIG_SCSI_TGT is not set
361# CONFIG_SCSI_NETLINK is not set
362CONFIG_SCSI_PROC_FS=y
363
364#
365# SCSI support type (disk, tape, CD-ROM)
366#
367# CONFIG_BLK_DEV_SD is not set
368# CONFIG_CHR_DEV_ST is not set
369# CONFIG_CHR_DEV_OSST is not set
370# CONFIG_BLK_DEV_SR is not set
371# CONFIG_CHR_DEV_SG is not set
372# CONFIG_CHR_DEV_SCH is not set
373
374#
375# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
376#
377# CONFIG_SCSI_MULTI_LUN is not set
378# CONFIG_SCSI_CONSTANTS is not set
379# CONFIG_SCSI_LOGGING is not set
380# CONFIG_SCSI_SCAN_ASYNC is not set
381
382#
383# SCSI Transports
384#
385# CONFIG_SCSI_SPI_ATTRS is not set
386# CONFIG_SCSI_FC_ATTRS is not set
387# CONFIG_SCSI_ISCSI_ATTRS is not set
388# CONFIG_SCSI_SAS_ATTRS is not set
389# CONFIG_SCSI_SAS_LIBSAS is not set
390
391#
392# SCSI low-level drivers
393#
394# CONFIG_ISCSI_TCP is not set
395# CONFIG_SCSI_DEBUG is not set
396
397#
398# Serial ATA (prod) and Parallel ATA (experimental) drivers
399#
400# CONFIG_ATA is not set
401
402#
403# Multi-device support (RAID and LVM)
404#
405# CONFIG_MD is not set
406
407#
408# Fusion MPT device support
409#
410# CONFIG_FUSION is not set
411
412#
413# IEEE 1394 (FireWire) support
414#
415
416#
417# I2O device support
418#
419
420#
421# Macintosh device drivers
422#
423# CONFIG_MAC_EMUMOUSEBTN is not set
424# CONFIG_WINDFARM is not set
425
426#
427# Network device support
428#
429CONFIG_NETDEVICES=y
430# CONFIG_DUMMY is not set
431# CONFIG_BONDING is not set
432# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set
434
435#
436# PHY device support
437#
438CONFIG_PHYLIB=y
439
440#
441# MII PHY device drivers
442#
443CONFIG_MARVELL_PHY=y
444# CONFIG_DAVICOM_PHY is not set
445# CONFIG_QSEMI_PHY is not set
446# CONFIG_LXT_PHY is not set
447# CONFIG_CICADA_PHY is not set
448# CONFIG_VITESSE_PHY is not set
449# CONFIG_SMSC_PHY is not set
450# CONFIG_BROADCOM_PHY is not set
451# CONFIG_FIXED_PHY is not set
452
453#
454# Ethernet (10 or 100Mbit)
455#
456CONFIG_NET_ETHERNET=y
457CONFIG_MII=y
458
459#
460# Ethernet (1000 Mbit)
461#
462CONFIG_GIANFAR=y
463CONFIG_GFAR_NAPI=y
464
465#
466# Ethernet (10000 Mbit)
467#
468
469#
470# Token Ring devices
471#
472
473#
474# Wireless LAN (non-hamradio)
475#
476# CONFIG_NET_RADIO is not set
477
478#
479# Wan interfaces
480#
481# CONFIG_WAN is not set
482# CONFIG_PPP is not set
483# CONFIG_SLIP is not set
484# CONFIG_SHAPER is not set
485# CONFIG_NETCONSOLE is not set
486# CONFIG_NETPOLL is not set
487# CONFIG_NET_POLL_CONTROLLER is not set
488
489#
490# ISDN subsystem
491#
492# CONFIG_ISDN is not set
493
494#
495# Telephony Support
496#
497# CONFIG_PHONE is not set
498
499#
500# Input device support
501#
502CONFIG_INPUT=y
503# CONFIG_INPUT_FF_MEMLESS is not set
504
505#
506# Userland interfaces
507#
508# CONFIG_INPUT_MOUSEDEV is not set
509# CONFIG_INPUT_JOYDEV is not set
510# CONFIG_INPUT_TSDEV is not set
511# CONFIG_INPUT_EVDEV is not set
512# CONFIG_INPUT_EVBUG is not set
513
514#
515# Input Device Drivers
516#
517# CONFIG_INPUT_KEYBOARD is not set
518# CONFIG_INPUT_MOUSE is not set
519# CONFIG_INPUT_JOYSTICK is not set
520# CONFIG_INPUT_TOUCHSCREEN is not set
521# CONFIG_INPUT_MISC is not set
522
523#
524# Hardware I/O ports
525#
526# CONFIG_SERIO is not set
527# CONFIG_GAMEPORT is not set
528
529#
530# Character devices
531#
532# CONFIG_VT is not set
533# CONFIG_SERIAL_NONSTANDARD is not set
534
535#
536# Serial drivers
537#
538CONFIG_SERIAL_8250=y
539CONFIG_SERIAL_8250_CONSOLE=y
540CONFIG_SERIAL_8250_NR_UARTS=4
541CONFIG_SERIAL_8250_RUNTIME_UARTS=4
542# CONFIG_SERIAL_8250_EXTENDED is not set
543
544#
545# Non-8250 serial port support
546#
547# CONFIG_SERIAL_UARTLITE is not set
548CONFIG_SERIAL_CORE=y
549CONFIG_SERIAL_CORE_CONSOLE=y
550# CONFIG_SERIAL_OF_PLATFORM is not set
551CONFIG_UNIX98_PTYS=y
552CONFIG_LEGACY_PTYS=y
553CONFIG_LEGACY_PTY_COUNT=256
554
555#
556# IPMI
557#
558# CONFIG_IPMI_HANDLER is not set
559
560#
561# Watchdog Cards
562#
563CONFIG_WATCHDOG=y
564# CONFIG_WATCHDOG_NOWAYOUT is not set
565
566#
567# Watchdog Device Drivers
568#
569# CONFIG_SOFT_WATCHDOG is not set
570# CONFIG_BOOKE_WDT is not set
571CONFIG_HW_RANDOM=y
572# CONFIG_NVRAM is not set
573CONFIG_GEN_RTC=y
574# CONFIG_GEN_RTC_X is not set
575# CONFIG_DTLK is not set
576# CONFIG_R3964 is not set
577# CONFIG_RAW_DRIVER is not set
578
579#
580# TPM devices
581#
582# CONFIG_TCG_TPM is not set
583
584#
585# I2C support
586#
587CONFIG_I2C=y
588CONFIG_I2C_CHARDEV=y
589
590#
591# I2C Algorithms
592#
593# CONFIG_I2C_ALGOBIT is not set
594# CONFIG_I2C_ALGOPCF is not set
595# CONFIG_I2C_ALGOPCA is not set
596
597#
598# I2C Hardware Bus support
599#
600CONFIG_I2C_MPC=y
601# CONFIG_I2C_OCORES is not set
602# CONFIG_I2C_PARPORT_LIGHT is not set
603# CONFIG_I2C_STUB is not set
604# CONFIG_I2C_PCA_ISA is not set
605
606#
607# Miscellaneous I2C Chip support
608#
609# CONFIG_SENSORS_DS1337 is not set
610# CONFIG_SENSORS_DS1374 is not set
611# CONFIG_SENSORS_EEPROM is not set
612# CONFIG_SENSORS_PCF8574 is not set
613# CONFIG_SENSORS_PCA9539 is not set
614# CONFIG_SENSORS_PCF8591 is not set
615# CONFIG_SENSORS_M41T00 is not set
616# CONFIG_SENSORS_MAX6875 is not set
617# CONFIG_I2C_DEBUG_CORE is not set
618# CONFIG_I2C_DEBUG_ALGO is not set
619# CONFIG_I2C_DEBUG_BUS is not set
620# CONFIG_I2C_DEBUG_CHIP is not set
621
622#
623# SPI support
624#
625# CONFIG_SPI is not set
626# CONFIG_SPI_MASTER is not set
627
628#
629# Dallas's 1-wire bus
630#
631# CONFIG_W1 is not set
632
633#
634# Hardware Monitoring support
635#
636CONFIG_HWMON=y
637# CONFIG_HWMON_VID is not set
638# CONFIG_SENSORS_ABITUGURU is not set
639# CONFIG_SENSORS_ADM1021 is not set
640# CONFIG_SENSORS_ADM1025 is not set
641# CONFIG_SENSORS_ADM1026 is not set
642# CONFIG_SENSORS_ADM1031 is not set
643# CONFIG_SENSORS_ADM9240 is not set
644# CONFIG_SENSORS_ASB100 is not set
645# CONFIG_SENSORS_ATXP1 is not set
646# CONFIG_SENSORS_DS1621 is not set
647# CONFIG_SENSORS_F71805F is not set
648# CONFIG_SENSORS_FSCHER is not set
649# CONFIG_SENSORS_FSCPOS is not set
650# CONFIG_SENSORS_GL518SM is not set
651# CONFIG_SENSORS_GL520SM is not set
652# CONFIG_SENSORS_IT87 is not set
653# CONFIG_SENSORS_LM63 is not set
654# CONFIG_SENSORS_LM75 is not set
655# CONFIG_SENSORS_LM77 is not set
656# CONFIG_SENSORS_LM78 is not set
657# CONFIG_SENSORS_LM80 is not set
658# CONFIG_SENSORS_LM83 is not set
659# CONFIG_SENSORS_LM85 is not set
660# CONFIG_SENSORS_LM87 is not set
661# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set
663# CONFIG_SENSORS_MAX1619 is not set
664# CONFIG_SENSORS_PC87360 is not set
665# CONFIG_SENSORS_PC87427 is not set
666# CONFIG_SENSORS_SMSC47M1 is not set
667# CONFIG_SENSORS_SMSC47M192 is not set
668# CONFIG_SENSORS_SMSC47B397 is not set
669# CONFIG_SENSORS_VT1211 is not set
670# CONFIG_SENSORS_W83781D is not set
671# CONFIG_SENSORS_W83791D is not set
672# CONFIG_SENSORS_W83792D is not set
673# CONFIG_SENSORS_W83793 is not set
674# CONFIG_SENSORS_W83L785TS is not set
675# CONFIG_SENSORS_W83627HF is not set
676# CONFIG_SENSORS_W83627EHF is not set
677# CONFIG_HWMON_DEBUG_CHIP is not set
678
679#
680# Multimedia devices
681#
682# CONFIG_VIDEO_DEV is not set
683
684#
685# Digital Video Broadcasting Devices
686#
687# CONFIG_DVB is not set
688
689#
690# Graphics support
691#
692CONFIG_FIRMWARE_EDID=y
693# CONFIG_FB is not set
694# CONFIG_FB_IBM_GXT4500 is not set
695# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
696
697#
698# Sound
699#
700# CONFIG_SOUND is not set
701
702#
703# HID Devices
704#
705CONFIG_HID=y
706# CONFIG_HID_DEBUG is not set
707
708#
709# USB support
710#
711# CONFIG_USB_ARCH_HAS_HCD is not set
712# CONFIG_USB_ARCH_HAS_OHCI is not set
713# CONFIG_USB_ARCH_HAS_EHCI is not set
714
715#
716# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
717#
718
719#
720# USB Gadget Support
721#
722# CONFIG_USB_GADGET is not set
723
724#
725# MMC/SD Card support
726#
727# CONFIG_MMC is not set
728
729#
730# LED devices
731#
732# CONFIG_NEW_LEDS is not set
733
734#
735# LED drivers
736#
737
738#
739# LED Triggers
740#
741
742#
743# InfiniBand support
744#
745
746#
747# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
748#
749
750#
751# Real Time Clock
752#
753# CONFIG_RTC_CLASS is not set
754
755#
756# DMA Engine support
757#
758# CONFIG_DMA_ENGINE is not set
759
760#
761# DMA Clients
762#
763
764#
765# DMA Devices
766#
767
768#
769# Auxiliary Display support
770#
771
772#
773# Virtualization
774#
775
776#
777# File systems
778#
779CONFIG_EXT2_FS=y
780# CONFIG_EXT2_FS_XATTR is not set
781# CONFIG_EXT2_FS_XIP is not set
782CONFIG_EXT3_FS=y
783CONFIG_EXT3_FS_XATTR=y
784# CONFIG_EXT3_FS_POSIX_ACL is not set
785# CONFIG_EXT3_FS_SECURITY is not set
786# CONFIG_EXT4DEV_FS is not set
787CONFIG_JBD=y
788# CONFIG_JBD_DEBUG is not set
789CONFIG_FS_MBCACHE=y
790# CONFIG_REISERFS_FS is not set
791# CONFIG_JFS_FS is not set
792# CONFIG_FS_POSIX_ACL is not set
793# CONFIG_XFS_FS is not set
794# CONFIG_GFS2_FS is not set
795# CONFIG_OCFS2_FS is not set
796# CONFIG_MINIX_FS is not set
797# CONFIG_ROMFS_FS is not set
798CONFIG_INOTIFY=y
799CONFIG_INOTIFY_USER=y
800# CONFIG_QUOTA is not set
801CONFIG_DNOTIFY=y
802# CONFIG_AUTOFS_FS is not set
803# CONFIG_AUTOFS4_FS is not set
804# CONFIG_FUSE_FS is not set
805
806#
807# CD-ROM/DVD Filesystems
808#
809# CONFIG_ISO9660_FS is not set
810# CONFIG_UDF_FS is not set
811
812#
813# DOS/FAT/NT Filesystems
814#
815# CONFIG_MSDOS_FS is not set
816# CONFIG_VFAT_FS is not set
817# CONFIG_NTFS_FS is not set
818
819#
820# Pseudo filesystems
821#
822CONFIG_PROC_FS=y
823CONFIG_PROC_KCORE=y
824CONFIG_PROC_SYSCTL=y
825CONFIG_SYSFS=y
826CONFIG_TMPFS=y
827# CONFIG_TMPFS_POSIX_ACL is not set
828# CONFIG_HUGETLB_PAGE is not set
829CONFIG_RAMFS=y
830# CONFIG_CONFIGFS_FS is not set
831
832#
833# Miscellaneous filesystems
834#
835# CONFIG_ADFS_FS is not set
836# CONFIG_AFFS_FS is not set
837# CONFIG_HFS_FS is not set
838# CONFIG_HFSPLUS_FS is not set
839# CONFIG_BEFS_FS is not set
840# CONFIG_BFS_FS is not set
841# CONFIG_EFS_FS is not set
842# CONFIG_CRAMFS is not set
843# CONFIG_VXFS_FS is not set
844# CONFIG_HPFS_FS is not set
845# CONFIG_QNX4FS_FS is not set
846# CONFIG_SYSV_FS is not set
847# CONFIG_UFS_FS is not set
848
849#
850# Network File Systems
851#
852CONFIG_NFS_FS=y
853CONFIG_NFS_V3=y
854# CONFIG_NFS_V3_ACL is not set
855CONFIG_NFS_V4=y
856# CONFIG_NFS_DIRECTIO is not set
857# CONFIG_NFSD is not set
858CONFIG_ROOT_NFS=y
859CONFIG_LOCKD=y
860CONFIG_LOCKD_V4=y
861CONFIG_NFS_COMMON=y
862CONFIG_SUNRPC=y
863CONFIG_SUNRPC_GSS=y
864CONFIG_RPCSEC_GSS_KRB5=y
865# CONFIG_RPCSEC_GSS_SPKM3 is not set
866# CONFIG_SMB_FS is not set
867# CONFIG_CIFS is not set
868# CONFIG_NCP_FS is not set
869# CONFIG_CODA_FS is not set
870# CONFIG_AFS_FS is not set
871# CONFIG_9P_FS is not set
872
873#
874# Partition Types
875#
876CONFIG_PARTITION_ADVANCED=y
877# CONFIG_ACORN_PARTITION is not set
878# CONFIG_OSF_PARTITION is not set
879# CONFIG_AMIGA_PARTITION is not set
880# CONFIG_ATARI_PARTITION is not set
881# CONFIG_MAC_PARTITION is not set
882# CONFIG_MSDOS_PARTITION is not set
883# CONFIG_LDM_PARTITION is not set
884# CONFIG_SGI_PARTITION is not set
885# CONFIG_ULTRIX_PARTITION is not set
886# CONFIG_SUN_PARTITION is not set
887# CONFIG_KARMA_PARTITION is not set
888# CONFIG_EFI_PARTITION is not set
889
890#
891# Native Language Support
892#
893# CONFIG_NLS is not set
894
895#
896# Distributed Lock Manager
897#
898# CONFIG_DLM is not set
899
900#
901# Library routines
902#
903CONFIG_BITREVERSE=y
904# CONFIG_CRC_CCITT is not set
905# CONFIG_CRC16 is not set
906CONFIG_CRC32=y
907# CONFIG_LIBCRC32C is not set
908CONFIG_PLIST=y
909CONFIG_HAS_IOMEM=y
910CONFIG_HAS_IOPORT=y
911
912#
913# Instrumentation Support
914#
915CONFIG_PROFILING=y
916CONFIG_OPROFILE=y
917
918#
919# Kernel hacking
920#
921# CONFIG_PRINTK_TIME is not set
922CONFIG_ENABLE_MUST_CHECK=y
923# CONFIG_MAGIC_SYSRQ is not set
924# CONFIG_UNUSED_SYMBOLS is not set
925# CONFIG_DEBUG_FS is not set
926# CONFIG_HEADERS_CHECK is not set
927CONFIG_DEBUG_KERNEL=y
928# CONFIG_DEBUG_SHIRQ is not set
929CONFIG_LOG_BUF_SHIFT=14
930CONFIG_DETECT_SOFTLOCKUP=y
931# CONFIG_SCHEDSTATS is not set
932# CONFIG_DEBUG_SLAB is not set
933# CONFIG_DEBUG_RT_MUTEXES is not set
934# CONFIG_RT_MUTEX_TESTER is not set
935# CONFIG_DEBUG_SPINLOCK is not set
936# CONFIG_DEBUG_MUTEXES is not set
937# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
938# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
939# CONFIG_DEBUG_KOBJECT is not set
940# CONFIG_DEBUG_BUGVERBOSE is not set
941# CONFIG_DEBUG_INFO is not set
942# CONFIG_DEBUG_VM is not set
943# CONFIG_DEBUG_LIST is not set
944CONFIG_FORCED_INLINING=y
945# CONFIG_RCU_TORTURE_TEST is not set
946# CONFIG_DEBUG_STACKOVERFLOW is not set
947# CONFIG_DEBUG_STACK_USAGE is not set
948CONFIG_DEBUGGER=y
949# CONFIG_XMON is not set
950# CONFIG_BDI_SWITCH is not set
951CONFIG_BOOTX_TEXT=y
952CONFIG_PPC_EARLY_DEBUG=y
953# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
954# CONFIG_PPC_EARLY_DEBUG_G5 is not set
955# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
956# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
957# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
958# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
959# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
960# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
961
962#
963# Security options
964#
965# CONFIG_KEYS is not set
966# CONFIG_SECURITY is not set
967
968#
969# Cryptographic options
970#
971CONFIG_CRYPTO=y
972CONFIG_CRYPTO_ALGAPI=y
973CONFIG_CRYPTO_BLKCIPHER=y
974CONFIG_CRYPTO_MANAGER=y
975# CONFIG_CRYPTO_HMAC is not set
976# CONFIG_CRYPTO_XCBC is not set
977# CONFIG_CRYPTO_NULL is not set
978# CONFIG_CRYPTO_MD4 is not set
979CONFIG_CRYPTO_MD5=y
980# CONFIG_CRYPTO_SHA1 is not set
981# CONFIG_CRYPTO_SHA256 is not set
982# CONFIG_CRYPTO_SHA512 is not set
983# CONFIG_CRYPTO_WP512 is not set
984# CONFIG_CRYPTO_TGR192 is not set
985# CONFIG_CRYPTO_GF128MUL is not set
986CONFIG_CRYPTO_ECB=m
987CONFIG_CRYPTO_CBC=y
988CONFIG_CRYPTO_PCBC=m
989# CONFIG_CRYPTO_LRW is not set
990CONFIG_CRYPTO_DES=y
991# CONFIG_CRYPTO_FCRYPT is not set
992# CONFIG_CRYPTO_BLOWFISH is not set
993# CONFIG_CRYPTO_TWOFISH is not set
994# CONFIG_CRYPTO_SERPENT is not set
995# CONFIG_CRYPTO_AES is not set
996# CONFIG_CRYPTO_CAST5 is not set
997# CONFIG_CRYPTO_CAST6 is not set
998# CONFIG_CRYPTO_TEA is not set
999# CONFIG_CRYPTO_ARC4 is not set
1000# CONFIG_CRYPTO_KHAZAD is not set
1001# CONFIG_CRYPTO_ANUBIS is not set
1002# CONFIG_CRYPTO_DEFLATE is not set
1003# CONFIG_CRYPTO_MICHAEL_MIC is not set
1004# CONFIG_CRYPTO_CRC32C is not set
1005# CONFIG_CRYPTO_CAMELLIA is not set
1006# CONFIG_CRYPTO_TEST is not set
1007
1008#
1009# Hardware crypto devices
1010#
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig
new file mode 100644
index 000000000000..539d9e3d3668
--- /dev/null
+++ b/arch/powerpc/configs/mpc866_ads_defconfig
@@ -0,0 +1,829 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc6
4# Fri Nov 24 21:13:55 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set
26
27#
28# Processor support
29#
30# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41# CONFIG_PPC_DCR_NATIVE is not set
42# CONFIG_PPC_DCR_MMIO is not set
43CONFIG_NOT_COHERENT_CACHE=y
44CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
45
46#
47# Code maturity level options
48#
49CONFIG_EXPERIMENTAL=y
50CONFIG_BROKEN_ON_SMP=y
51CONFIG_INIT_ENV_ARG_LIMIT=32
52
53#
54# General setup
55#
56CONFIG_LOCALVERSION=""
57CONFIG_LOCALVERSION_AUTO=y
58# CONFIG_SWAP is not set
59CONFIG_SYSVIPC=y
60# CONFIG_IPC_NS is not set
61# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
64# CONFIG_UTS_NS is not set
65# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set
67# CONFIG_RELAY is not set
68CONFIG_INITRAMFS_SOURCE=""
69# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
70CONFIG_SYSCTL=y
71CONFIG_EMBEDDED=y
72# CONFIG_SYSCTL_SYSCALL is not set
73CONFIG_KALLSYMS=y
74# CONFIG_KALLSYMS_EXTRA_PASS is not set
75# CONFIG_HOTPLUG is not set
76CONFIG_PRINTK=y
77# CONFIG_BUG is not set
78CONFIG_ELF_CORE=y
79# CONFIG_BASE_FULL is not set
80CONFIG_FUTEX=y
81# CONFIG_EPOLL is not set
82CONFIG_SHMEM=y
83CONFIG_SLAB=y
84# CONFIG_VM_EVENT_COUNTERS is not set
85CONFIG_RT_MUTEXES=y
86# CONFIG_TINY_SHMEM is not set
87CONFIG_BASE_SMALL=1
88# CONFIG_SLOB is not set
89
90#
91# Loadable module support
92#
93# CONFIG_MODULES is not set
94
95#
96# Block layer
97#
98CONFIG_BLOCK=y
99# CONFIG_LBD is not set
100# CONFIG_BLK_DEV_IO_TRACE is not set
101# CONFIG_LSF is not set
102
103#
104# IO Schedulers
105#
106CONFIG_IOSCHED_NOOP=y
107CONFIG_IOSCHED_AS=y
108CONFIG_IOSCHED_DEADLINE=y
109CONFIG_IOSCHED_CFQ=y
110CONFIG_DEFAULT_AS=y
111# CONFIG_DEFAULT_DEADLINE is not set
112# CONFIG_DEFAULT_CFQ is not set
113# CONFIG_DEFAULT_NOOP is not set
114CONFIG_DEFAULT_IOSCHED="anticipatory"
115# CONFIG_WANT_EARLY_SERIAL is not set
116CONFIG_EMBEDDEDBOOT=y
117# CONFIG_MPIC is not set
118
119#
120# Platform support
121#
122CONFIG_CPM1=y
123# CONFIG_MPC8XXFADS is not set
124CONFIG_MPC86XADS=y
125# CONFIG_MPC885ADS is not set
126
127#
128# MPC8xx CPM Options
129#
130
131#
132# Generic MPC8xx Options
133#
134CONFIG_8xx_COPYBACK=y
135CONFIG_8xx_CPU6=y
136CONFIG_NO_UCODE_PATCH=y
137# CONFIG_USB_SOF_UCODE_PATCH is not set
138# CONFIG_I2C_SPI_UCODE_PATCH is not set
139# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
140
141#
142# Kernel options
143#
144# CONFIG_HIGHMEM is not set
145# CONFIG_HZ_100 is not set
146# CONFIG_HZ_250 is not set
147CONFIG_HZ_1000=y
148CONFIG_HZ=1000
149CONFIG_PREEMPT_NONE=y
150# CONFIG_PREEMPT_VOLUNTARY is not set
151# CONFIG_PREEMPT is not set
152CONFIG_BINFMT_ELF=y
153# CONFIG_BINFMT_MISC is not set
154CONFIG_MATH_EMULATION=y
155CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
156CONFIG_ARCH_FLATMEM_ENABLE=y
157CONFIG_ARCH_POPULATES_NODE_MAP=y
158CONFIG_SELECT_MEMORY_MODEL=y
159CONFIG_FLATMEM_MANUAL=y
160# CONFIG_DISCONTIGMEM_MANUAL is not set
161# CONFIG_SPARSEMEM_MANUAL is not set
162CONFIG_FLATMEM=y
163CONFIG_FLAT_NODE_MEM_MAP=y
164# CONFIG_SPARSEMEM_STATIC is not set
165CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set
167# CONFIG_PROC_DEVICETREE is not set
168# CONFIG_CMDLINE_BOOL is not set
169# CONFIG_PM is not set
170# CONFIG_SECCOMP is not set
171CONFIG_ISA_DMA_API=y
172
173#
174# Bus options
175#
176# CONFIG_MPIC_WEIRD is not set
177# CONFIG_PPC_I8259 is not set
178CONFIG_FSL_SOC=y
179# CONFIG_PCI is not set
180# CONFIG_PCI_DOMAINS is not set
181# CONFIG_PCI_QSPAN is not set
182
183#
184# PCCARD (PCMCIA/CardBus) support
185#
186
187#
188# PCI Hotplug Support
189#
190
191#
192# Advanced setup
193#
194# CONFIG_ADVANCED_OPTIONS is not set
195
196#
197# Default settings for advanced configuration options are used
198#
199CONFIG_HIGHMEM_START=0xfe000000
200CONFIG_LOWMEM_SIZE=0x30000000
201CONFIG_KERNEL_START=0xc0000000
202CONFIG_TASK_SIZE=0x80000000
203CONFIG_CONSISTENT_START=0xff100000
204CONFIG_CONSISTENT_SIZE=0x00200000
205CONFIG_BOOT_LOAD=0x00400000
206
207#
208# Networking
209#
210CONFIG_NET=y
211
212#
213# Networking options
214#
215# CONFIG_NETDEBUG is not set
216CONFIG_PACKET=y
217# CONFIG_PACKET_MMAP is not set
218CONFIG_UNIX=y
219CONFIG_XFRM=y
220# CONFIG_XFRM_USER is not set
221# CONFIG_XFRM_SUB_POLICY is not set
222# CONFIG_NET_KEY is not set
223CONFIG_INET=y
224CONFIG_IP_MULTICAST=y
225# CONFIG_IP_ADVANCED_ROUTER is not set
226CONFIG_IP_FIB_HASH=y
227CONFIG_IP_PNP=y
228# CONFIG_IP_PNP_DHCP is not set
229# CONFIG_IP_PNP_BOOTP is not set
230# CONFIG_IP_PNP_RARP is not set
231# CONFIG_NET_IPIP is not set
232# CONFIG_NET_IPGRE is not set
233# CONFIG_IP_MROUTE is not set
234# CONFIG_ARPD is not set
235CONFIG_SYN_COOKIES=y
236# CONFIG_INET_AH is not set
237# CONFIG_INET_ESP is not set
238# CONFIG_INET_IPCOMP is not set
239# CONFIG_INET_XFRM_TUNNEL is not set
240# CONFIG_INET_TUNNEL is not set
241CONFIG_INET_XFRM_MODE_TRANSPORT=y
242CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_XFRM_MODE_BEET=y
244CONFIG_INET_DIAG=y
245CONFIG_INET_TCP_DIAG=y
246# CONFIG_TCP_CONG_ADVANCED is not set
247CONFIG_TCP_CONG_CUBIC=y
248CONFIG_DEFAULT_TCP_CONG="cubic"
249# CONFIG_IPV6 is not set
250# CONFIG_INET6_XFRM_TUNNEL is not set
251# CONFIG_INET6_TUNNEL is not set
252# CONFIG_NETWORK_SECMARK is not set
253# CONFIG_NETFILTER is not set
254
255#
256# DCCP Configuration (EXPERIMENTAL)
257#
258# CONFIG_IP_DCCP is not set
259
260#
261# SCTP Configuration (EXPERIMENTAL)
262#
263# CONFIG_IP_SCTP is not set
264
265#
266# TIPC Configuration (EXPERIMENTAL)
267#
268# CONFIG_TIPC is not set
269# CONFIG_ATM is not set
270# CONFIG_BRIDGE is not set
271# CONFIG_VLAN_8021Q is not set
272# CONFIG_DECNET is not set
273# CONFIG_LLC2 is not set
274# CONFIG_IPX is not set
275# CONFIG_ATALK is not set
276# CONFIG_X25 is not set
277# CONFIG_LAPB is not set
278# CONFIG_ECONET is not set
279# CONFIG_WAN_ROUTER is not set
280
281#
282# QoS and/or fair queueing
283#
284# CONFIG_NET_SCHED is not set
285
286#
287# Network testing
288#
289# CONFIG_NET_PKTGEN is not set
290# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set
292# CONFIG_BT is not set
293# CONFIG_IEEE80211 is not set
294
295#
296# Device Drivers
297#
298
299#
300# Generic Driver Options
301#
302CONFIG_STANDALONE=y
303CONFIG_PREVENT_FIRMWARE_BUILD=y
304# CONFIG_SYS_HYPERVISOR is not set
305
306#
307# Connector - unified userspace <-> kernelspace linker
308#
309# CONFIG_CONNECTOR is not set
310
311#
312# Memory Technology Devices (MTD)
313#
314# CONFIG_MTD is not set
315
316#
317# Parallel port support
318#
319# CONFIG_PARPORT is not set
320
321#
322# Plug and Play support
323#
324
325#
326# Block devices
327#
328# CONFIG_BLK_DEV_FD is not set
329# CONFIG_BLK_DEV_COW_COMMON is not set
330CONFIG_BLK_DEV_LOOP=y
331# CONFIG_BLK_DEV_CRYPTOLOOP is not set
332# CONFIG_BLK_DEV_NBD is not set
333# CONFIG_BLK_DEV_RAM is not set
334# CONFIG_BLK_DEV_INITRD is not set
335# CONFIG_CDROM_PKTCDVD is not set
336# CONFIG_ATA_OVER_ETH is not set
337
338#
339# Misc devices
340#
341# CONFIG_TIFM_CORE is not set
342
343#
344# ATA/ATAPI/MFM/RLL support
345#
346# CONFIG_IDE is not set
347
348#
349# SCSI device support
350#
351# CONFIG_RAID_ATTRS is not set
352# CONFIG_SCSI is not set
353# CONFIG_SCSI_NETLINK is not set
354
355#
356# Serial ATA (prod) and Parallel ATA (experimental) drivers
357#
358# CONFIG_ATA is not set
359
360#
361# Multi-device support (RAID and LVM)
362#
363# CONFIG_MD is not set
364
365#
366# Fusion MPT device support
367#
368# CONFIG_FUSION is not set
369
370#
371# IEEE 1394 (FireWire) support
372#
373
374#
375# I2O device support
376#
377
378#
379# Macintosh device drivers
380#
381# CONFIG_WINDFARM is not set
382
383#
384# Network device support
385#
386CONFIG_NETDEVICES=y
387# CONFIG_DUMMY is not set
388# CONFIG_BONDING is not set
389# CONFIG_EQUALIZER is not set
390# CONFIG_TUN is not set
391
392#
393# PHY device support
394#
395CONFIG_PHYLIB=y
396
397#
398# MII PHY device drivers
399#
400# CONFIG_MARVELL_PHY is not set
401# CONFIG_DAVICOM_PHY is not set
402# CONFIG_QSEMI_PHY is not set
403# CONFIG_LXT_PHY is not set
404# CONFIG_CICADA_PHY is not set
405# CONFIG_VITESSE_PHY is not set
406# CONFIG_SMSC_PHY is not set
407CONFIG_FIXED_PHY=y
408CONFIG_FIXED_MII_10_FDX=y
409CONFIG_FIXED_MII_100_FDX=y
410
411#
412# Ethernet (10 or 100Mbit)
413#
414CONFIG_NET_ETHERNET=y
415CONFIG_MII=y
416# CONFIG_FEC_8XX is not set
417CONFIG_FS_ENET=y
418CONFIG_FS_ENET_HAS_SCC=y
419CONFIG_FS_ENET_HAS_FEC=y
420
421#
422# Ethernet (1000 Mbit)
423#
424
425#
426# Ethernet (10000 Mbit)
427#
428
429#
430# Token Ring devices
431#
432
433#
434# Wireless LAN (non-hamradio)
435#
436# CONFIG_NET_RADIO is not set
437
438#
439# Wan interfaces
440#
441# CONFIG_WAN is not set
442# CONFIG_PPP is not set
443# CONFIG_SLIP is not set
444# CONFIG_SHAPER is not set
445# CONFIG_NETCONSOLE is not set
446# CONFIG_NETPOLL is not set
447# CONFIG_NET_POLL_CONTROLLER is not set
448
449#
450# ISDN subsystem
451#
452# CONFIG_ISDN is not set
453
454#
455# Telephony Support
456#
457# CONFIG_PHONE is not set
458
459#
460# Input device support
461#
462CONFIG_INPUT=y
463# CONFIG_INPUT_FF_MEMLESS is not set
464
465#
466# Userland interfaces
467#
468CONFIG_INPUT_MOUSEDEV=y
469CONFIG_INPUT_MOUSEDEV_PSAUX=y
470CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
471CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
472# CONFIG_INPUT_JOYDEV is not set
473# CONFIG_INPUT_TSDEV is not set
474# CONFIG_INPUT_EVDEV is not set
475# CONFIG_INPUT_EVBUG is not set
476
477#
478# Input Device Drivers
479#
480CONFIG_INPUT_KEYBOARD=y
481CONFIG_KEYBOARD_ATKBD=y
482# CONFIG_KEYBOARD_SUNKBD is not set
483# CONFIG_KEYBOARD_LKKBD is not set
484# CONFIG_KEYBOARD_XTKBD is not set
485# CONFIG_KEYBOARD_NEWTON is not set
486# CONFIG_KEYBOARD_STOWAWAY is not set
487CONFIG_INPUT_MOUSE=y
488CONFIG_MOUSE_PS2=y
489# CONFIG_MOUSE_SERIAL is not set
490# CONFIG_MOUSE_VSXXXAA is not set
491# CONFIG_INPUT_JOYSTICK is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set
494
495#
496# Hardware I/O ports
497#
498CONFIG_SERIO=y
499CONFIG_SERIO_I8042=y
500CONFIG_SERIO_SERPORT=y
501CONFIG_SERIO_LIBPS2=y
502# CONFIG_SERIO_RAW is not set
503# CONFIG_GAMEPORT is not set
504
505#
506# Character devices
507#
508# CONFIG_VT is not set
509# CONFIG_SERIAL_NONSTANDARD is not set
510
511#
512# Serial drivers
513#
514# CONFIG_SERIAL_8250 is not set
515
516#
517# Non-8250 serial port support
518#
519CONFIG_SERIAL_CORE=y
520CONFIG_SERIAL_CORE_CONSOLE=y
521CONFIG_SERIAL_CPM=y
522CONFIG_SERIAL_CPM_CONSOLE=y
523# CONFIG_SERIAL_CPM_SCC1 is not set
524# CONFIG_SERIAL_CPM_SCC2 is not set
525# CONFIG_SERIAL_CPM_SCC3 is not set
526# CONFIG_SERIAL_CPM_SCC4 is not set
527CONFIG_SERIAL_CPM_SMC1=y
528CONFIG_SERIAL_CPM_SMC2=y
529CONFIG_UNIX98_PTYS=y
530# CONFIG_LEGACY_PTYS is not set
531
532#
533# IPMI
534#
535# CONFIG_IPMI_HANDLER is not set
536
537#
538# Watchdog Cards
539#
540# CONFIG_WATCHDOG is not set
541CONFIG_HW_RANDOM=y
542# CONFIG_NVRAM is not set
543CONFIG_GEN_RTC=y
544# CONFIG_GEN_RTC_X is not set
545# CONFIG_DTLK is not set
546# CONFIG_R3964 is not set
547
548#
549# Ftape, the floppy tape device driver
550#
551# CONFIG_RAW_DRIVER is not set
552
553#
554# TPM devices
555#
556# CONFIG_TCG_TPM is not set
557
558#
559# I2C support
560#
561# CONFIG_I2C is not set
562
563#
564# SPI support
565#
566# CONFIG_SPI is not set
567# CONFIG_SPI_MASTER is not set
568
569#
570# Dallas's 1-wire bus
571#
572# CONFIG_W1 is not set
573
574#
575# Hardware Monitoring support
576#
577CONFIG_HWMON=y
578# CONFIG_HWMON_VID is not set
579# CONFIG_SENSORS_ABITUGURU is not set
580# CONFIG_SENSORS_F71805F is not set
581# CONFIG_SENSORS_VT1211 is not set
582# CONFIG_HWMON_DEBUG_CHIP is not set
583
584#
585# Multimedia devices
586#
587# CONFIG_VIDEO_DEV is not set
588
589#
590# Digital Video Broadcasting Devices
591#
592# CONFIG_DVB is not set
593
594#
595# Graphics support
596#
597CONFIG_FIRMWARE_EDID=y
598# CONFIG_FB is not set
599# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
600
601#
602# Sound
603#
604# CONFIG_SOUND is not set
605
606#
607# USB support
608#
609# CONFIG_USB_ARCH_HAS_HCD is not set
610# CONFIG_USB_ARCH_HAS_OHCI is not set
611# CONFIG_USB_ARCH_HAS_EHCI is not set
612
613#
614# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
615#
616
617#
618# USB Gadget Support
619#
620# CONFIG_USB_GADGET is not set
621
622#
623# MMC/SD Card support
624#
625# CONFIG_MMC is not set
626
627#
628# LED devices
629#
630# CONFIG_NEW_LEDS is not set
631
632#
633# LED drivers
634#
635
636#
637# LED Triggers
638#
639
640#
641# InfiniBand support
642#
643
644#
645# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
646#
647
648#
649# Real Time Clock
650#
651# CONFIG_RTC_CLASS is not set
652
653#
654# DMA Engine support
655#
656# CONFIG_DMA_ENGINE is not set
657
658#
659# DMA Clients
660#
661
662#
663# DMA Devices
664#
665
666#
667# File systems
668#
669CONFIG_EXT2_FS=y
670CONFIG_EXT2_FS_XATTR=y
671# CONFIG_EXT2_FS_POSIX_ACL is not set
672# CONFIG_EXT2_FS_SECURITY is not set
673# CONFIG_EXT2_FS_XIP is not set
674CONFIG_EXT3_FS=y
675CONFIG_EXT3_FS_XATTR=y
676# CONFIG_EXT3_FS_POSIX_ACL is not set
677# CONFIG_EXT3_FS_SECURITY is not set
678# CONFIG_EXT4DEV_FS is not set
679CONFIG_JBD=y
680# CONFIG_JBD_DEBUG is not set
681CONFIG_FS_MBCACHE=y
682# CONFIG_REISERFS_FS is not set
683# CONFIG_JFS_FS is not set
684# CONFIG_FS_POSIX_ACL is not set
685# CONFIG_XFS_FS is not set
686# CONFIG_GFS2_FS is not set
687# CONFIG_OCFS2_FS is not set
688# CONFIG_MINIX_FS is not set
689# CONFIG_ROMFS_FS is not set
690CONFIG_INOTIFY=y
691CONFIG_INOTIFY_USER=y
692# CONFIG_QUOTA is not set
693CONFIG_DNOTIFY=y
694# CONFIG_AUTOFS_FS is not set
695# CONFIG_AUTOFS4_FS is not set
696# CONFIG_FUSE_FS is not set
697
698#
699# CD-ROM/DVD Filesystems
700#
701# CONFIG_ISO9660_FS is not set
702# CONFIG_UDF_FS is not set
703
704#
705# DOS/FAT/NT Filesystems
706#
707# CONFIG_MSDOS_FS is not set
708# CONFIG_VFAT_FS is not set
709# CONFIG_NTFS_FS is not set
710
711#
712# Pseudo filesystems
713#
714CONFIG_PROC_FS=y
715# CONFIG_PROC_KCORE is not set
716CONFIG_PROC_SYSCTL=y
717CONFIG_SYSFS=y
718CONFIG_TMPFS=y
719# CONFIG_TMPFS_POSIX_ACL is not set
720# CONFIG_HUGETLB_PAGE is not set
721CONFIG_RAMFS=y
722# CONFIG_CONFIGFS_FS is not set
723
724#
725# Miscellaneous filesystems
726#
727# CONFIG_ADFS_FS is not set
728# CONFIG_AFFS_FS is not set
729# CONFIG_HFS_FS is not set
730# CONFIG_HFSPLUS_FS is not set
731# CONFIG_BEFS_FS is not set
732# CONFIG_BFS_FS is not set
733# CONFIG_EFS_FS is not set
734CONFIG_CRAMFS=y
735# CONFIG_VXFS_FS is not set
736# CONFIG_HPFS_FS is not set
737# CONFIG_QNX4FS_FS is not set
738# CONFIG_SYSV_FS is not set
739# CONFIG_UFS_FS is not set
740
741#
742# Network File Systems
743#
744CONFIG_NFS_FS=y
745CONFIG_NFS_V3=y
746# CONFIG_NFS_V3_ACL is not set
747# CONFIG_NFS_V4 is not set
748# CONFIG_NFS_DIRECTIO is not set
749# CONFIG_NFSD is not set
750CONFIG_ROOT_NFS=y
751CONFIG_LOCKD=y
752CONFIG_LOCKD_V4=y
753CONFIG_NFS_COMMON=y
754CONFIG_SUNRPC=y
755# CONFIG_RPCSEC_GSS_KRB5 is not set
756# CONFIG_RPCSEC_GSS_SPKM3 is not set
757# CONFIG_SMB_FS is not set
758# CONFIG_CIFS is not set
759# CONFIG_NCP_FS is not set
760# CONFIG_CODA_FS is not set
761# CONFIG_AFS_FS is not set
762# CONFIG_9P_FS is not set
763
764#
765# Partition Types
766#
767CONFIG_PARTITION_ADVANCED=y
768# CONFIG_ACORN_PARTITION is not set
769# CONFIG_OSF_PARTITION is not set
770# CONFIG_AMIGA_PARTITION is not set
771# CONFIG_ATARI_PARTITION is not set
772# CONFIG_MAC_PARTITION is not set
773CONFIG_MSDOS_PARTITION=y
774# CONFIG_BSD_DISKLABEL is not set
775# CONFIG_MINIX_SUBPARTITION is not set
776# CONFIG_SOLARIS_X86_PARTITION is not set
777# CONFIG_UNIXWARE_DISKLABEL is not set
778# CONFIG_LDM_PARTITION is not set
779# CONFIG_SGI_PARTITION is not set
780# CONFIG_ULTRIX_PARTITION is not set
781# CONFIG_SUN_PARTITION is not set
782# CONFIG_KARMA_PARTITION is not set
783# CONFIG_EFI_PARTITION is not set
784
785#
786# Native Language Support
787#
788# CONFIG_NLS is not set
789
790#
791# Library routines
792#
793CONFIG_CRC_CCITT=y
794# CONFIG_CRC16 is not set
795CONFIG_CRC32=y
796# CONFIG_LIBCRC32C is not set
797CONFIG_ZLIB_INFLATE=y
798CONFIG_PLIST=y
799
800#
801# Instrumentation Support
802#
803# CONFIG_PROFILING is not set
804
805#
806# Kernel hacking
807#
808# CONFIG_PRINTK_TIME is not set
809CONFIG_ENABLE_MUST_CHECK=y
810# CONFIG_MAGIC_SYSRQ is not set
811# CONFIG_UNUSED_SYMBOLS is not set
812# CONFIG_DEBUG_KERNEL is not set
813CONFIG_LOG_BUF_SHIFT=14
814# CONFIG_DEBUG_FS is not set
815# CONFIG_UNWIND_INFO is not set
816# CONFIG_HEADERS_CHECK is not set
817# CONFIG_BOOTX_TEXT is not set
818# CONFIG_PPC_EARLY_DEBUG is not set
819
820#
821# Security options
822#
823# CONFIG_KEYS is not set
824# CONFIG_SECURITY is not set
825
826#
827# Cryptographic options
828#
829# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/mpc885_ads_defconfig b/arch/powerpc/configs/mpc885_ads_defconfig
new file mode 100644
index 000000000000..e2c17d8da4fc
--- /dev/null
+++ b/arch/powerpc/configs/mpc885_ads_defconfig
@@ -0,0 +1,827 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc4
4# Fri Nov 10 21:30:40 2006
5#
6# CONFIG_PPC64 is not set
7CONFIG_PPC32=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_GENERIC_HWEIGHT=y
14CONFIG_GENERIC_CALIBRATE_DELAY=y
15CONFIG_GENERIC_FIND_NEXT_BIT=y
16CONFIG_PPC=y
17CONFIG_EARLY_PRINTK=y
18CONFIG_GENERIC_NVRAM=y
19CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
20CONFIG_ARCH_MAY_HAVE_PC_FDC=y
21CONFIG_PPC_OF=y
22# CONFIG_PPC_UDBG_16550 is not set
23# CONFIG_GENERIC_TBSYNC is not set
24CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set
26
27#
28# Processor support
29#
30# CONFIG_CLASSIC32 is not set
31# CONFIG_PPC_52xx is not set
32# CONFIG_PPC_82xx is not set
33# CONFIG_PPC_83xx is not set
34# CONFIG_PPC_85xx is not set
35# CONFIG_PPC_86xx is not set
36CONFIG_PPC_8xx=y
37# CONFIG_40x is not set
38# CONFIG_44x is not set
39# CONFIG_E200 is not set
40CONFIG_8xx=y
41CONFIG_NOT_COHERENT_CACHE=y
42CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
43
44#
45# Code maturity level options
46#
47CONFIG_EXPERIMENTAL=y
48CONFIG_BROKEN_ON_SMP=y
49CONFIG_INIT_ENV_ARG_LIMIT=32
50
51#
52# General setup
53#
54CONFIG_LOCALVERSION=""
55CONFIG_LOCALVERSION_AUTO=y
56# CONFIG_SWAP is not set
57CONFIG_SYSVIPC=y
58# CONFIG_IPC_NS is not set
59# CONFIG_POSIX_MQUEUE is not set
60# CONFIG_BSD_PROCESS_ACCT is not set
61# CONFIG_TASKSTATS is not set
62# CONFIG_UTS_NS is not set
63# CONFIG_AUDIT is not set
64# CONFIG_IKCONFIG is not set
65# CONFIG_RELAY is not set
66CONFIG_INITRAMFS_SOURCE=""
67# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
68CONFIG_SYSCTL=y
69CONFIG_EMBEDDED=y
70# CONFIG_SYSCTL_SYSCALL is not set
71CONFIG_KALLSYMS=y
72# CONFIG_KALLSYMS_EXTRA_PASS is not set
73# CONFIG_HOTPLUG is not set
74CONFIG_PRINTK=y
75# CONFIG_BUG is not set
76CONFIG_ELF_CORE=y
77# CONFIG_BASE_FULL is not set
78CONFIG_FUTEX=y
79# CONFIG_EPOLL is not set
80CONFIG_SHMEM=y
81CONFIG_SLAB=y
82# CONFIG_VM_EVENT_COUNTERS is not set
83CONFIG_RT_MUTEXES=y
84# CONFIG_TINY_SHMEM is not set
85CONFIG_BASE_SMALL=1
86# CONFIG_SLOB is not set
87
88#
89# Loadable module support
90#
91# CONFIG_MODULES is not set
92
93#
94# Block layer
95#
96CONFIG_BLOCK=y
97# CONFIG_LBD is not set
98# CONFIG_BLK_DEV_IO_TRACE is not set
99# CONFIG_LSF is not set
100
101#
102# IO Schedulers
103#
104CONFIG_IOSCHED_NOOP=y
105CONFIG_IOSCHED_AS=y
106CONFIG_IOSCHED_DEADLINE=y
107CONFIG_IOSCHED_CFQ=y
108CONFIG_DEFAULT_AS=y
109# CONFIG_DEFAULT_DEADLINE is not set
110# CONFIG_DEFAULT_CFQ is not set
111# CONFIG_DEFAULT_NOOP is not set
112CONFIG_DEFAULT_IOSCHED="anticipatory"
113# CONFIG_WANT_EARLY_SERIAL is not set
114CONFIG_EMBEDDEDBOOT=y
115# CONFIG_MPIC is not set
116
117#
118# Platform support
119#
120CONFIG_CPM1=y
121# CONFIG_MPC8XXFADS is not set
122# CONFIG_MPC86XADS is not set
123CONFIG_MPC885ADS=y
124
125#
126# MPC8xx CPM Options
127#
128
129#
130# Generic MPC8xx Options
131#
132CONFIG_8xx_COPYBACK=y
133# CONFIG_8xx_CPU6 is not set
134CONFIG_NO_UCODE_PATCH=y
135# CONFIG_USB_SOF_UCODE_PATCH is not set
136# CONFIG_I2C_SPI_UCODE_PATCH is not set
137# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
138
139#
140# Kernel options
141#
142# CONFIG_HIGHMEM is not set
143# CONFIG_HZ_100 is not set
144# CONFIG_HZ_250 is not set
145CONFIG_HZ_1000=y
146CONFIG_HZ=1000
147CONFIG_PREEMPT_NONE=y
148# CONFIG_PREEMPT_VOLUNTARY is not set
149# CONFIG_PREEMPT is not set
150CONFIG_BINFMT_ELF=y
151# CONFIG_BINFMT_MISC is not set
152CONFIG_MATH_EMULATION=y
153CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
154CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set
159# CONFIG_SPARSEMEM_MANUAL is not set
160CONFIG_FLATMEM=y
161CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set
163CONFIG_SPLIT_PTLOCK_CPUS=4
164# CONFIG_RESOURCES_64BIT is not set
165# CONFIG_PROC_DEVICETREE is not set
166# CONFIG_CMDLINE_BOOL is not set
167# CONFIG_PM is not set
168# CONFIG_SECCOMP is not set
169CONFIG_ISA_DMA_API=y
170
171#
172# Bus options
173#
174# CONFIG_MPIC_WEIRD is not set
175# CONFIG_PPC_I8259 is not set
176CONFIG_FSL_SOC=y
177# CONFIG_PCI is not set
178# CONFIG_PCI_DOMAINS is not set
179# CONFIG_PCI_QSPAN is not set
180
181#
182# PCCARD (PCMCIA/CardBus) support
183#
184
185#
186# PCI Hotplug Support
187#
188
189#
190# Advanced setup
191#
192# CONFIG_ADVANCED_OPTIONS is not set
193
194#
195# Default settings for advanced configuration options are used
196#
197CONFIG_HIGHMEM_START=0xfe000000
198CONFIG_LOWMEM_SIZE=0x30000000
199CONFIG_KERNEL_START=0xc0000000
200CONFIG_TASK_SIZE=0x80000000
201CONFIG_CONSISTENT_START=0xff100000
202CONFIG_CONSISTENT_SIZE=0x00200000
203CONFIG_BOOT_LOAD=0x00400000
204
205#
206# Networking
207#
208CONFIG_NET=y
209
210#
211# Networking options
212#
213# CONFIG_NETDEBUG is not set
214CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y
217CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set
219# CONFIG_XFRM_SUB_POLICY is not set
220# CONFIG_NET_KEY is not set
221CONFIG_INET=y
222CONFIG_IP_MULTICAST=y
223# CONFIG_IP_ADVANCED_ROUTER is not set
224CONFIG_IP_FIB_HASH=y
225CONFIG_IP_PNP=y
226# CONFIG_IP_PNP_DHCP is not set
227# CONFIG_IP_PNP_BOOTP is not set
228# CONFIG_IP_PNP_RARP is not set
229# CONFIG_NET_IPIP is not set
230# CONFIG_NET_IPGRE is not set
231# CONFIG_IP_MROUTE is not set
232# CONFIG_ARPD is not set
233CONFIG_SYN_COOKIES=y
234# CONFIG_INET_AH is not set
235# CONFIG_INET_ESP is not set
236# CONFIG_INET_IPCOMP is not set
237# CONFIG_INET_XFRM_TUNNEL is not set
238# CONFIG_INET_TUNNEL is not set
239CONFIG_INET_XFRM_MODE_TRANSPORT=y
240CONFIG_INET_XFRM_MODE_TUNNEL=y
241CONFIG_INET_XFRM_MODE_BEET=y
242CONFIG_INET_DIAG=y
243CONFIG_INET_TCP_DIAG=y
244# CONFIG_TCP_CONG_ADVANCED is not set
245CONFIG_TCP_CONG_CUBIC=y
246CONFIG_DEFAULT_TCP_CONG="cubic"
247# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set
250# CONFIG_NETWORK_SECMARK is not set
251# CONFIG_NETFILTER is not set
252
253#
254# DCCP Configuration (EXPERIMENTAL)
255#
256# CONFIG_IP_DCCP is not set
257
258#
259# SCTP Configuration (EXPERIMENTAL)
260#
261# CONFIG_IP_SCTP is not set
262
263#
264# TIPC Configuration (EXPERIMENTAL)
265#
266# CONFIG_TIPC is not set
267# CONFIG_ATM is not set
268# CONFIG_BRIDGE is not set
269# CONFIG_VLAN_8021Q is not set
270# CONFIG_DECNET is not set
271# CONFIG_LLC2 is not set
272# CONFIG_IPX is not set
273# CONFIG_ATALK is not set
274# CONFIG_X25 is not set
275# CONFIG_LAPB is not set
276# CONFIG_ECONET is not set
277# CONFIG_WAN_ROUTER is not set
278
279#
280# QoS and/or fair queueing
281#
282# CONFIG_NET_SCHED is not set
283
284#
285# Network testing
286#
287# CONFIG_NET_PKTGEN is not set
288# CONFIG_HAMRADIO is not set
289# CONFIG_IRDA is not set
290# CONFIG_BT is not set
291# CONFIG_IEEE80211 is not set
292
293#
294# Device Drivers
295#
296
297#
298# Generic Driver Options
299#
300CONFIG_STANDALONE=y
301CONFIG_PREVENT_FIRMWARE_BUILD=y
302# CONFIG_SYS_HYPERVISOR is not set
303
304#
305# Connector - unified userspace <-> kernelspace linker
306#
307# CONFIG_CONNECTOR is not set
308
309#
310# Memory Technology Devices (MTD)
311#
312# CONFIG_MTD is not set
313
314#
315# Parallel port support
316#
317# CONFIG_PARPORT is not set
318
319#
320# Plug and Play support
321#
322
323#
324# Block devices
325#
326# CONFIG_BLK_DEV_FD is not set
327# CONFIG_BLK_DEV_COW_COMMON is not set
328CONFIG_BLK_DEV_LOOP=y
329# CONFIG_BLK_DEV_CRYPTOLOOP is not set
330# CONFIG_BLK_DEV_NBD is not set
331# CONFIG_BLK_DEV_RAM is not set
332# CONFIG_BLK_DEV_INITRD is not set
333# CONFIG_CDROM_PKTCDVD is not set
334# CONFIG_ATA_OVER_ETH is not set
335
336#
337# Misc devices
338#
339# CONFIG_TIFM_CORE is not set
340
341#
342# ATA/ATAPI/MFM/RLL support
343#
344# CONFIG_IDE is not set
345
346#
347# SCSI device support
348#
349# CONFIG_RAID_ATTRS is not set
350# CONFIG_SCSI is not set
351# CONFIG_SCSI_NETLINK is not set
352
353#
354# Serial ATA (prod) and Parallel ATA (experimental) drivers
355#
356# CONFIG_ATA is not set
357
358#
359# Multi-device support (RAID and LVM)
360#
361# CONFIG_MD is not set
362
363#
364# Fusion MPT device support
365#
366# CONFIG_FUSION is not set
367
368#
369# IEEE 1394 (FireWire) support
370#
371
372#
373# I2O device support
374#
375
376#
377# Macintosh device drivers
378#
379# CONFIG_WINDFARM is not set
380
381#
382# Network device support
383#
384CONFIG_NETDEVICES=y
385# CONFIG_DUMMY is not set
386# CONFIG_BONDING is not set
387# CONFIG_EQUALIZER is not set
388# CONFIG_TUN is not set
389
390#
391# PHY device support
392#
393CONFIG_PHYLIB=y
394
395#
396# MII PHY device drivers
397#
398# CONFIG_MARVELL_PHY is not set
399CONFIG_DAVICOM_PHY=y
400# CONFIG_QSEMI_PHY is not set
401# CONFIG_LXT_PHY is not set
402# CONFIG_CICADA_PHY is not set
403# CONFIG_VITESSE_PHY is not set
404# CONFIG_SMSC_PHY is not set
405CONFIG_FIXED_PHY=y
406CONFIG_FIXED_MII_10_FDX=y
407# CONFIG_FIXED_MII_100_FDX is not set
408
409#
410# Ethernet (10 or 100Mbit)
411#
412CONFIG_NET_ETHERNET=y
413CONFIG_MII=y
414# CONFIG_FEC_8XX is not set
415CONFIG_FS_ENET=y
416CONFIG_FS_ENET_HAS_SCC=y
417CONFIG_FS_ENET_HAS_FEC=y
418
419#
420# Ethernet (1000 Mbit)
421#
422
423#
424# Ethernet (10000 Mbit)
425#
426
427#
428# Token Ring devices
429#
430
431#
432# Wireless LAN (non-hamradio)
433#
434# CONFIG_NET_RADIO is not set
435
436#
437# Wan interfaces
438#
439# CONFIG_WAN is not set
440# CONFIG_PPP is not set
441# CONFIG_SLIP is not set
442# CONFIG_SHAPER is not set
443# CONFIG_NETCONSOLE is not set
444# CONFIG_NETPOLL is not set
445# CONFIG_NET_POLL_CONTROLLER is not set
446
447#
448# ISDN subsystem
449#
450# CONFIG_ISDN is not set
451
452#
453# Telephony Support
454#
455# CONFIG_PHONE is not set
456
457#
458# Input device support
459#
460CONFIG_INPUT=y
461# CONFIG_INPUT_FF_MEMLESS is not set
462
463#
464# Userland interfaces
465#
466CONFIG_INPUT_MOUSEDEV=y
467CONFIG_INPUT_MOUSEDEV_PSAUX=y
468CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
469CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
470# CONFIG_INPUT_JOYDEV is not set
471# CONFIG_INPUT_TSDEV is not set
472# CONFIG_INPUT_EVDEV is not set
473# CONFIG_INPUT_EVBUG is not set
474
475#
476# Input Device Drivers
477#
478CONFIG_INPUT_KEYBOARD=y
479CONFIG_KEYBOARD_ATKBD=y
480# CONFIG_KEYBOARD_SUNKBD is not set
481# CONFIG_KEYBOARD_LKKBD is not set
482# CONFIG_KEYBOARD_XTKBD is not set
483# CONFIG_KEYBOARD_NEWTON is not set
484# CONFIG_KEYBOARD_STOWAWAY is not set
485CONFIG_INPUT_MOUSE=y
486CONFIG_MOUSE_PS2=y
487# CONFIG_MOUSE_SERIAL is not set
488# CONFIG_MOUSE_VSXXXAA is not set
489# CONFIG_INPUT_JOYSTICK is not set
490# CONFIG_INPUT_TOUCHSCREEN is not set
491# CONFIG_INPUT_MISC is not set
492
493#
494# Hardware I/O ports
495#
496CONFIG_SERIO=y
497CONFIG_SERIO_I8042=y
498CONFIG_SERIO_SERPORT=y
499CONFIG_SERIO_LIBPS2=y
500# CONFIG_SERIO_RAW is not set
501# CONFIG_GAMEPORT is not set
502
503#
504# Character devices
505#
506# CONFIG_VT is not set
507# CONFIG_SERIAL_NONSTANDARD is not set
508
509#
510# Serial drivers
511#
512# CONFIG_SERIAL_8250 is not set
513
514#
515# Non-8250 serial port support
516#
517CONFIG_SERIAL_CORE=y
518CONFIG_SERIAL_CORE_CONSOLE=y
519CONFIG_SERIAL_CPM=y
520CONFIG_SERIAL_CPM_CONSOLE=y
521# CONFIG_SERIAL_CPM_SCC1 is not set
522# CONFIG_SERIAL_CPM_SCC2 is not set
523# CONFIG_SERIAL_CPM_SCC3 is not set
524# CONFIG_SERIAL_CPM_SCC4 is not set
525CONFIG_SERIAL_CPM_SMC1=y
526CONFIG_SERIAL_CPM_SMC2=y
527CONFIG_UNIX98_PTYS=y
528# CONFIG_LEGACY_PTYS is not set
529
530#
531# IPMI
532#
533# CONFIG_IPMI_HANDLER is not set
534
535#
536# Watchdog Cards
537#
538# CONFIG_WATCHDOG is not set
539CONFIG_HW_RANDOM=y
540# CONFIG_NVRAM is not set
541CONFIG_GEN_RTC=y
542# CONFIG_GEN_RTC_X is not set
543# CONFIG_DTLK is not set
544# CONFIG_R3964 is not set
545
546#
547# Ftape, the floppy tape device driver
548#
549# CONFIG_RAW_DRIVER is not set
550
551#
552# TPM devices
553#
554# CONFIG_TCG_TPM is not set
555
556#
557# I2C support
558#
559# CONFIG_I2C is not set
560
561#
562# SPI support
563#
564# CONFIG_SPI is not set
565# CONFIG_SPI_MASTER is not set
566
567#
568# Dallas's 1-wire bus
569#
570# CONFIG_W1 is not set
571
572#
573# Hardware Monitoring support
574#
575CONFIG_HWMON=y
576# CONFIG_HWMON_VID is not set
577# CONFIG_SENSORS_ABITUGURU is not set
578# CONFIG_SENSORS_F71805F is not set
579# CONFIG_SENSORS_VT1211 is not set
580# CONFIG_HWMON_DEBUG_CHIP is not set
581
582#
583# Multimedia devices
584#
585# CONFIG_VIDEO_DEV is not set
586
587#
588# Digital Video Broadcasting Devices
589#
590# CONFIG_DVB is not set
591
592#
593# Graphics support
594#
595CONFIG_FIRMWARE_EDID=y
596# CONFIG_FB is not set
597# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
598
599#
600# Sound
601#
602# CONFIG_SOUND is not set
603
604#
605# USB support
606#
607# CONFIG_USB_ARCH_HAS_HCD is not set
608# CONFIG_USB_ARCH_HAS_OHCI is not set
609# CONFIG_USB_ARCH_HAS_EHCI is not set
610
611#
612# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
613#
614
615#
616# USB Gadget Support
617#
618# CONFIG_USB_GADGET is not set
619
620#
621# MMC/SD Card support
622#
623# CONFIG_MMC is not set
624
625#
626# LED devices
627#
628# CONFIG_NEW_LEDS is not set
629
630#
631# LED drivers
632#
633
634#
635# LED Triggers
636#
637
638#
639# InfiniBand support
640#
641
642#
643# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
644#
645
646#
647# Real Time Clock
648#
649# CONFIG_RTC_CLASS is not set
650
651#
652# DMA Engine support
653#
654# CONFIG_DMA_ENGINE is not set
655
656#
657# DMA Clients
658#
659
660#
661# DMA Devices
662#
663
664#
665# File systems
666#
667CONFIG_EXT2_FS=y
668CONFIG_EXT2_FS_XATTR=y
669# CONFIG_EXT2_FS_POSIX_ACL is not set
670# CONFIG_EXT2_FS_SECURITY is not set
671# CONFIG_EXT2_FS_XIP is not set
672CONFIG_EXT3_FS=y
673CONFIG_EXT3_FS_XATTR=y
674# CONFIG_EXT3_FS_POSIX_ACL is not set
675# CONFIG_EXT3_FS_SECURITY is not set
676# CONFIG_EXT4DEV_FS is not set
677CONFIG_JBD=y
678# CONFIG_JBD_DEBUG is not set
679CONFIG_FS_MBCACHE=y
680# CONFIG_REISERFS_FS is not set
681# CONFIG_JFS_FS is not set
682# CONFIG_FS_POSIX_ACL is not set
683# CONFIG_XFS_FS is not set
684# CONFIG_GFS2_FS is not set
685# CONFIG_OCFS2_FS is not set
686# CONFIG_MINIX_FS is not set
687# CONFIG_ROMFS_FS is not set
688CONFIG_INOTIFY=y
689CONFIG_INOTIFY_USER=y
690# CONFIG_QUOTA is not set
691CONFIG_DNOTIFY=y
692# CONFIG_AUTOFS_FS is not set
693# CONFIG_AUTOFS4_FS is not set
694# CONFIG_FUSE_FS is not set
695
696#
697# CD-ROM/DVD Filesystems
698#
699# CONFIG_ISO9660_FS is not set
700# CONFIG_UDF_FS is not set
701
702#
703# DOS/FAT/NT Filesystems
704#
705# CONFIG_MSDOS_FS is not set
706# CONFIG_VFAT_FS is not set
707# CONFIG_NTFS_FS is not set
708
709#
710# Pseudo filesystems
711#
712CONFIG_PROC_FS=y
713# CONFIG_PROC_KCORE is not set
714CONFIG_PROC_SYSCTL=y
715CONFIG_SYSFS=y
716CONFIG_TMPFS=y
717# CONFIG_TMPFS_POSIX_ACL is not set
718# CONFIG_HUGETLB_PAGE is not set
719CONFIG_RAMFS=y
720# CONFIG_CONFIGFS_FS is not set
721
722#
723# Miscellaneous filesystems
724#
725# CONFIG_ADFS_FS is not set
726# CONFIG_AFFS_FS is not set
727# CONFIG_HFS_FS is not set
728# CONFIG_HFSPLUS_FS is not set
729# CONFIG_BEFS_FS is not set
730# CONFIG_BFS_FS is not set
731# CONFIG_EFS_FS is not set
732CONFIG_CRAMFS=y
733# CONFIG_VXFS_FS is not set
734# CONFIG_HPFS_FS is not set
735# CONFIG_QNX4FS_FS is not set
736# CONFIG_SYSV_FS is not set
737# CONFIG_UFS_FS is not set
738
739#
740# Network File Systems
741#
742CONFIG_NFS_FS=y
743CONFIG_NFS_V3=y
744# CONFIG_NFS_V3_ACL is not set
745# CONFIG_NFS_V4 is not set
746# CONFIG_NFS_DIRECTIO is not set
747# CONFIG_NFSD is not set
748CONFIG_ROOT_NFS=y
749CONFIG_LOCKD=y
750CONFIG_LOCKD_V4=y
751CONFIG_NFS_COMMON=y
752CONFIG_SUNRPC=y
753# CONFIG_RPCSEC_GSS_KRB5 is not set
754# CONFIG_RPCSEC_GSS_SPKM3 is not set
755# CONFIG_SMB_FS is not set
756# CONFIG_CIFS is not set
757# CONFIG_NCP_FS is not set
758# CONFIG_CODA_FS is not set
759# CONFIG_AFS_FS is not set
760# CONFIG_9P_FS is not set
761
762#
763# Partition Types
764#
765CONFIG_PARTITION_ADVANCED=y
766# CONFIG_ACORN_PARTITION is not set
767# CONFIG_OSF_PARTITION is not set
768# CONFIG_AMIGA_PARTITION is not set
769# CONFIG_ATARI_PARTITION is not set
770# CONFIG_MAC_PARTITION is not set
771CONFIG_MSDOS_PARTITION=y
772# CONFIG_BSD_DISKLABEL is not set
773# CONFIG_MINIX_SUBPARTITION is not set
774# CONFIG_SOLARIS_X86_PARTITION is not set
775# CONFIG_UNIXWARE_DISKLABEL is not set
776# CONFIG_LDM_PARTITION is not set
777# CONFIG_SGI_PARTITION is not set
778# CONFIG_ULTRIX_PARTITION is not set
779# CONFIG_SUN_PARTITION is not set
780# CONFIG_KARMA_PARTITION is not set
781# CONFIG_EFI_PARTITION is not set
782
783#
784# Native Language Support
785#
786# CONFIG_NLS is not set
787
788#
789# Library routines
790#
791CONFIG_CRC_CCITT=y
792# CONFIG_CRC16 is not set
793CONFIG_CRC32=y
794# CONFIG_LIBCRC32C is not set
795CONFIG_ZLIB_INFLATE=y
796CONFIG_PLIST=y
797
798#
799# Instrumentation Support
800#
801# CONFIG_PROFILING is not set
802
803#
804# Kernel hacking
805#
806# CONFIG_PRINTK_TIME is not set
807CONFIG_ENABLE_MUST_CHECK=y
808# CONFIG_MAGIC_SYSRQ is not set
809# CONFIG_UNUSED_SYMBOLS is not set
810# CONFIG_DEBUG_KERNEL is not set
811CONFIG_LOG_BUF_SHIFT=14
812# CONFIG_DEBUG_FS is not set
813# CONFIG_UNWIND_INFO is not set
814# CONFIG_HEADERS_CHECK is not set
815# CONFIG_BOOTX_TEXT is not set
816# CONFIG_PPC_EARLY_DEBUG is not set
817
818#
819# Security options
820#
821# CONFIG_KEYS is not set
822# CONFIG_SECURITY is not set
823
824#
825# Cryptographic options
826#
827# CONFIG_CRYPTO is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
new file mode 100644
index 000000000000..97a57e996663
--- /dev/null
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -0,0 +1,1722 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc6
4# Thu Feb 1 22:54:15 2007
5#
6CONFIG_PPC64=y
7CONFIG_64BIT=y
8CONFIG_PPC_MERGE=y
9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_IRQ_PER_CPU=y
12CONFIG_RWSEM_XCHGADD_ALGORITHM=y
13CONFIG_ARCH_HAS_ILOG2_U32=y
14CONFIG_ARCH_HAS_ILOG2_U64=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_FIND_NEXT_BIT=y
18CONFIG_PPC=y
19CONFIG_EARLY_PRINTK=y
20CONFIG_COMPAT=y
21CONFIG_SYSVIPC_COMPAT=y
22CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
23CONFIG_ARCH_MAY_HAVE_PC_FDC=y
24CONFIG_PPC_OF=y
25CONFIG_PPC_UDBG_16550=y
26CONFIG_GENERIC_TBSYNC=y
27CONFIG_AUDIT_ARCH=y
28CONFIG_GENERIC_BUG=y
29# CONFIG_DEFAULT_UIMAGE is not set
30
31#
32# Processor support
33#
34CONFIG_POWER4_ONLY=y
35CONFIG_POWER4=y
36CONFIG_PPC_FPU=y
37# CONFIG_PPC_DCR_NATIVE is not set
38# CONFIG_PPC_DCR_MMIO is not set
39# CONFIG_PPC_OF_PLATFORM_PCI is not set
40CONFIG_ALTIVEC=y
41CONFIG_PPC_STD_MMU=y
42# CONFIG_VIRT_CPU_ACCOUNTING is not set
43CONFIG_SMP=y
44CONFIG_NR_CPUS=2
45CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
46
47#
48# Code maturity level options
49#
50CONFIG_EXPERIMENTAL=y
51CONFIG_LOCK_KERNEL=y
52CONFIG_INIT_ENV_ARG_LIMIT=32
53
54#
55# General setup
56#
57CONFIG_LOCALVERSION=""
58CONFIG_LOCALVERSION_AUTO=y
59CONFIG_SWAP=y
60CONFIG_SYSVIPC=y
61# CONFIG_IPC_NS is not set
62# CONFIG_POSIX_MQUEUE is not set
63# CONFIG_BSD_PROCESS_ACCT is not set
64# CONFIG_TASKSTATS is not set
65# CONFIG_UTS_NS is not set
66# CONFIG_AUDIT is not set
67# CONFIG_IKCONFIG is not set
68# CONFIG_CPUSETS is not set
69CONFIG_SYSFS_DEPRECATED=y
70# CONFIG_RELAY is not set
71CONFIG_INITRAMFS_SOURCE=""
72# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
73CONFIG_SYSCTL=y
74# CONFIG_EMBEDDED is not set
75CONFIG_SYSCTL_SYSCALL=y
76CONFIG_KALLSYMS=y
77# CONFIG_KALLSYMS_ALL is not set
78# CONFIG_KALLSYMS_EXTRA_PASS is not set
79CONFIG_HOTPLUG=y
80CONFIG_PRINTK=y
81CONFIG_BUG=y
82CONFIG_ELF_CORE=y
83CONFIG_BASE_FULL=y
84CONFIG_FUTEX=y
85CONFIG_EPOLL=y
86CONFIG_SHMEM=y
87CONFIG_SLAB=y
88CONFIG_VM_EVENT_COUNTERS=y
89CONFIG_RT_MUTEXES=y
90# CONFIG_TINY_SHMEM is not set
91CONFIG_BASE_SMALL=0
92# CONFIG_SLOB is not set
93
94#
95# Loadable module support
96#
97CONFIG_MODULES=y
98CONFIG_MODULE_UNLOAD=y
99# CONFIG_MODULE_FORCE_UNLOAD is not set
100# CONFIG_MODVERSIONS is not set
101# CONFIG_MODULE_SRCVERSION_ALL is not set
102# CONFIG_KMOD is not set
103CONFIG_STOP_MACHINE=y
104
105#
106# Block layer
107#
108CONFIG_BLOCK=y
109# CONFIG_BLK_DEV_IO_TRACE is not set
110
111#
112# IO Schedulers
113#
114CONFIG_IOSCHED_NOOP=y
115CONFIG_IOSCHED_AS=y
116# CONFIG_IOSCHED_DEADLINE is not set
117# CONFIG_IOSCHED_CFQ is not set
118CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_DEADLINE is not set
120# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="anticipatory"
123
124#
125# Platform support
126#
127CONFIG_PPC_MULTIPLATFORM=y
128# CONFIG_EMBEDDED6xx is not set
129# CONFIG_APUS is not set
130CONFIG_PPC_PSERIES=y
131# CONFIG_PPC_ISERIES is not set
132# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_PMAC is not set
134# CONFIG_PPC_MAPLE is not set
135CONFIG_PPC_PASEMI=y
136# CONFIG_PPC_CELL is not set
137# CONFIG_PPC_CELL_NATIVE is not set
138# CONFIG_PPC_IBM_CELL_BLADE is not set
139# CONFIG_PPC_PS3 is not set
140CONFIG_PPC_NATIVE=y
141# CONFIG_UDBG_RTAS_CONSOLE is not set
142CONFIG_XICS=y
143# CONFIG_U3_DART is not set
144CONFIG_PPC_RTAS=y
145CONFIG_RTAS_ERROR_LOGGING=y
146CONFIG_RTAS_PROC=y
147# CONFIG_RTAS_FLASH is not set
148# CONFIG_MMIO_NVRAM is not set
149CONFIG_IBMVIO=y
150# CONFIG_IBMEBUS is not set
151# CONFIG_PPC_MPC106 is not set
152# CONFIG_PPC_970_NAP is not set
153# CONFIG_PPC_INDIRECT_IO is not set
154# CONFIG_GENERIC_IOMAP is not set
155# CONFIG_CPU_FREQ is not set
156# CONFIG_WANT_EARLY_SERIAL is not set
157CONFIG_MPIC=y
158
159#
160# PA Semi PWRficient options
161#
162CONFIG_PPC_PASEMI_IOMMU=y
163
164#
165# Kernel options
166#
167CONFIG_HZ_100=y
168# CONFIG_HZ_250 is not set
169# CONFIG_HZ_300 is not set
170# CONFIG_HZ_1000 is not set
171CONFIG_HZ=100
172CONFIG_PREEMPT_NONE=y
173# CONFIG_PREEMPT_VOLUNTARY is not set
174# CONFIG_PREEMPT is not set
175CONFIG_PREEMPT_BKL=y
176CONFIG_BINFMT_ELF=y
177# CONFIG_BINFMT_MISC is not set
178CONFIG_FORCE_MAX_ZONEORDER=13
179CONFIG_IOMMU_VMERGE=y
180# CONFIG_HOTPLUG_CPU is not set
181CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
182# CONFIG_KEXEC is not set
183# CONFIG_CRASH_DUMP is not set
184# CONFIG_IRQ_ALL_CPUS is not set
185# CONFIG_PPC_SPLPAR is not set
186CONFIG_EEH=y
187# CONFIG_SCANLOG is not set
188# CONFIG_LPARCFG is not set
189# CONFIG_NUMA is not set
190CONFIG_ARCH_SELECT_MEMORY_MODEL=y
191CONFIG_ARCH_FLATMEM_ENABLE=y
192CONFIG_ARCH_SPARSEMEM_ENABLE=y
193CONFIG_ARCH_SPARSEMEM_DEFAULT=y
194CONFIG_ARCH_POPULATES_NODE_MAP=y
195CONFIG_SELECT_MEMORY_MODEL=y
196CONFIG_FLATMEM_MANUAL=y
197# CONFIG_DISCONTIGMEM_MANUAL is not set
198# CONFIG_SPARSEMEM_MANUAL is not set
199CONFIG_FLATMEM=y
200CONFIG_FLAT_NODE_MEM_MAP=y
201# CONFIG_SPARSEMEM_STATIC is not set
202CONFIG_SPLIT_PTLOCK_CPUS=4
203CONFIG_RESOURCES_64BIT=y
204# CONFIG_PPC_64K_PAGES is not set
205# CONFIG_SCHED_SMT is not set
206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set
209# CONFIG_SECCOMP is not set
210CONFIG_ISA_DMA_API=y
211
212#
213# Bus options
214#
215CONFIG_GENERIC_ISA_DMA=y
216# CONFIG_MPIC_WEIRD is not set
217CONFIG_PPC_I8259=y
218# CONFIG_PPC_INDIRECT_PCI is not set
219CONFIG_PCI=y
220CONFIG_PCI_DOMAINS=y
221# CONFIG_PCIEPORTBUS is not set
222# CONFIG_PCI_DEBUG is not set
223
224#
225# PCCARD (PCMCIA/CardBus) support
226#
227CONFIG_PCCARD=y
228CONFIG_PCMCIA_DEBUG=y
229CONFIG_PCMCIA=y
230CONFIG_PCMCIA_LOAD_CIS=y
231CONFIG_PCMCIA_IOCTL=y
232CONFIG_CARDBUS=y
233
234#
235# PC-card bridges
236#
237# CONFIG_YENTA is not set
238# CONFIG_PD6729 is not set
239# CONFIG_I82092 is not set
240
241#
242# PCI Hotplug Support
243#
244# CONFIG_HOTPLUG_PCI is not set
245CONFIG_KERNEL_START=0xc000000000000000
246
247#
248# Networking
249#
250CONFIG_NET=y
251
252#
253# Networking options
254#
255# CONFIG_NETDEBUG is not set
256CONFIG_PACKET=y
257# CONFIG_PACKET_MMAP is not set
258CONFIG_UNIX=y
259CONFIG_XFRM=y
260# CONFIG_XFRM_USER is not set
261# CONFIG_XFRM_SUB_POLICY is not set
262CONFIG_NET_KEY=y
263CONFIG_INET=y
264CONFIG_IP_MULTICAST=y
265# CONFIG_IP_ADVANCED_ROUTER is not set
266CONFIG_IP_FIB_HASH=y
267CONFIG_IP_PNP=y
268CONFIG_IP_PNP_DHCP=y
269CONFIG_IP_PNP_BOOTP=y
270CONFIG_IP_PNP_RARP=y
271CONFIG_NET_IPIP=y
272# CONFIG_NET_IPGRE is not set
273# CONFIG_IP_MROUTE is not set
274# CONFIG_ARPD is not set
275CONFIG_SYN_COOKIES=y
276CONFIG_INET_AH=y
277CONFIG_INET_ESP=y
278# CONFIG_INET_IPCOMP is not set
279# CONFIG_INET_XFRM_TUNNEL is not set
280CONFIG_INET_TUNNEL=y
281CONFIG_INET_XFRM_MODE_TRANSPORT=y
282CONFIG_INET_XFRM_MODE_TUNNEL=y
283CONFIG_INET_XFRM_MODE_BEET=y
284CONFIG_INET_DIAG=y
285CONFIG_INET_TCP_DIAG=y
286# CONFIG_TCP_CONG_ADVANCED is not set
287CONFIG_TCP_CONG_CUBIC=y
288CONFIG_DEFAULT_TCP_CONG="cubic"
289# CONFIG_TCP_MD5SIG is not set
290# CONFIG_IPV6 is not set
291# CONFIG_INET6_XFRM_TUNNEL is not set
292# CONFIG_INET6_TUNNEL is not set
293# CONFIG_NETWORK_SECMARK is not set
294# CONFIG_NETFILTER is not set
295
296#
297# DCCP Configuration (EXPERIMENTAL)
298#
299# CONFIG_IP_DCCP is not set
300
301#
302# SCTP Configuration (EXPERIMENTAL)
303#
304# CONFIG_IP_SCTP is not set
305
306#
307# TIPC Configuration (EXPERIMENTAL)
308#
309# CONFIG_TIPC is not set
310# CONFIG_ATM is not set
311# CONFIG_BRIDGE is not set
312# CONFIG_VLAN_8021Q is not set
313# CONFIG_DECNET is not set
314# CONFIG_LLC2 is not set
315# CONFIG_IPX is not set
316# CONFIG_ATALK is not set
317# CONFIG_X25 is not set
318# CONFIG_LAPB is not set
319# CONFIG_ECONET is not set
320# CONFIG_WAN_ROUTER is not set
321
322#
323# QoS and/or fair queueing
324#
325# CONFIG_NET_SCHED is not set
326
327#
328# Network testing
329#
330# CONFIG_NET_PKTGEN is not set
331# CONFIG_HAMRADIO is not set
332# CONFIG_IRDA is not set
333# CONFIG_BT is not set
334# CONFIG_IEEE80211 is not set
335
336#
337# Device Drivers
338#
339
340#
341# Generic Driver Options
342#
343CONFIG_STANDALONE=y
344CONFIG_PREVENT_FIRMWARE_BUILD=y
345CONFIG_FW_LOADER=y
346# CONFIG_DEBUG_DRIVER is not set
347# CONFIG_SYS_HYPERVISOR is not set
348
349#
350# Connector - unified userspace <-> kernelspace linker
351#
352# CONFIG_CONNECTOR is not set
353
354#
355# Memory Technology Devices (MTD)
356#
357CONFIG_MTD=y
358# CONFIG_MTD_DEBUG is not set
359CONFIG_MTD_CONCAT=y
360# CONFIG_MTD_PARTITIONS is not set
361
362#
363# User Modules And Translation Layers
364#
365CONFIG_MTD_CHAR=y
366CONFIG_MTD_BLKDEVS=y
367CONFIG_MTD_BLOCK=y
368# CONFIG_FTL is not set
369# CONFIG_NFTL is not set
370# CONFIG_INFTL is not set
371# CONFIG_RFD_FTL is not set
372# CONFIG_SSFDC is not set
373
374#
375# RAM/ROM/Flash chip drivers
376#
377# CONFIG_MTD_CFI is not set
378# CONFIG_MTD_JEDECPROBE is not set
379CONFIG_MTD_MAP_BANK_WIDTH_1=y
380CONFIG_MTD_MAP_BANK_WIDTH_2=y
381CONFIG_MTD_MAP_BANK_WIDTH_4=y
382# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
383# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
384# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
385CONFIG_MTD_CFI_I1=y
386CONFIG_MTD_CFI_I2=y
387# CONFIG_MTD_CFI_I4 is not set
388# CONFIG_MTD_CFI_I8 is not set
389# CONFIG_MTD_RAM is not set
390# CONFIG_MTD_ROM is not set
391# CONFIG_MTD_ABSENT is not set
392# CONFIG_MTD_OBSOLETE_CHIPS is not set
393
394#
395# Mapping drivers for chip access
396#
397# CONFIG_MTD_COMPLEX_MAPPINGS is not set
398# CONFIG_MTD_PLATRAM is not set
399
400#
401# Self-contained MTD device drivers
402#
403# CONFIG_MTD_PMC551 is not set
404CONFIG_MTD_SLRAM=y
405CONFIG_MTD_PHRAM=y
406# CONFIG_MTD_MTDRAM is not set
407# CONFIG_MTD_BLOCK2MTD is not set
408
409#
410# Disk-On-Chip Device Drivers
411#
412# CONFIG_MTD_DOC2000 is not set
413# CONFIG_MTD_DOC2001 is not set
414# CONFIG_MTD_DOC2001PLUS is not set
415
416#
417# NAND Flash Device Drivers
418#
419# CONFIG_MTD_NAND is not set
420# CONFIG_MTD_NAND_CAFE is not set
421
422#
423# OneNAND Flash Device Drivers
424#
425# CONFIG_MTD_ONENAND is not set
426
427#
428# Parallel port support
429#
430# CONFIG_PARPORT is not set
431
432#
433# Plug and Play support
434#
435
436#
437# Block devices
438#
439# CONFIG_BLK_DEV_FD is not set
440# CONFIG_BLK_CPQ_DA is not set
441# CONFIG_BLK_CPQ_CISS_DA is not set
442# CONFIG_BLK_DEV_DAC960 is not set
443# CONFIG_BLK_DEV_UMEM is not set
444# CONFIG_BLK_DEV_COW_COMMON is not set
445CONFIG_BLK_DEV_LOOP=y
446# CONFIG_BLK_DEV_CRYPTOLOOP is not set
447# CONFIG_BLK_DEV_NBD is not set
448# CONFIG_BLK_DEV_SX8 is not set
449# CONFIG_BLK_DEV_UB is not set
450CONFIG_BLK_DEV_RAM=y
451CONFIG_BLK_DEV_RAM_COUNT=16
452CONFIG_BLK_DEV_RAM_SIZE=16384
453CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
454CONFIG_BLK_DEV_INITRD=y
455# CONFIG_CDROM_PKTCDVD is not set
456# CONFIG_ATA_OVER_ETH is not set
457
458#
459# Misc devices
460#
461# CONFIG_SGI_IOC4 is not set
462# CONFIG_TIFM_CORE is not set
463
464#
465# ATA/ATAPI/MFM/RLL support
466#
467CONFIG_IDE=y
468CONFIG_BLK_DEV_IDE=y
469
470#
471# Please see Documentation/ide.txt for help/info on IDE drives
472#
473# CONFIG_BLK_DEV_IDE_SATA is not set
474CONFIG_BLK_DEV_IDEDISK=y
475CONFIG_IDEDISK_MULTI_MODE=y
476# CONFIG_BLK_DEV_IDECS is not set
477CONFIG_BLK_DEV_IDECD=y
478# CONFIG_BLK_DEV_IDETAPE is not set
479# CONFIG_BLK_DEV_IDEFLOPPY is not set
480CONFIG_BLK_DEV_IDESCSI=y
481CONFIG_IDE_TASK_IOCTL=y
482
483#
484# IDE chipset support/bugfixes
485#
486# CONFIG_IDE_GENERIC is not set
487# CONFIG_BLK_DEV_IDEPCI is not set
488# CONFIG_IDE_ARM is not set
489# CONFIG_BLK_DEV_IDEDMA is not set
490# CONFIG_IDEDMA_AUTO is not set
491# CONFIG_BLK_DEV_HD is not set
492
493#
494# SCSI device support
495#
496# CONFIG_RAID_ATTRS is not set
497CONFIG_SCSI=y
498# CONFIG_SCSI_TGT is not set
499# CONFIG_SCSI_NETLINK is not set
500CONFIG_SCSI_PROC_FS=y
501
502#
503# SCSI support type (disk, tape, CD-ROM)
504#
505CONFIG_BLK_DEV_SD=y
506CONFIG_CHR_DEV_ST=y
507CONFIG_CHR_DEV_OSST=y
508CONFIG_BLK_DEV_SR=y
509CONFIG_BLK_DEV_SR_VENDOR=y
510CONFIG_CHR_DEV_SG=y
511CONFIG_CHR_DEV_SCH=y
512
513#
514# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
515#
516CONFIG_SCSI_MULTI_LUN=y
517CONFIG_SCSI_CONSTANTS=y
518CONFIG_SCSI_LOGGING=y
519# CONFIG_SCSI_SCAN_ASYNC is not set
520
521#
522# SCSI Transports
523#
524# CONFIG_SCSI_SPI_ATTRS is not set
525# CONFIG_SCSI_FC_ATTRS is not set
526# CONFIG_SCSI_ISCSI_ATTRS is not set
527# CONFIG_SCSI_SAS_ATTRS is not set
528# CONFIG_SCSI_SAS_LIBSAS is not set
529
530#
531# SCSI low-level drivers
532#
533# CONFIG_ISCSI_TCP is not set
534CONFIG_BLK_DEV_3W_XXXX_RAID=y
535CONFIG_SCSI_3W_9XXX=y
536# CONFIG_SCSI_ACARD is not set
537# CONFIG_SCSI_AACRAID is not set
538# CONFIG_SCSI_AIC7XXX is not set
539# CONFIG_SCSI_AIC7XXX_OLD is not set
540# CONFIG_SCSI_AIC79XX is not set
541# CONFIG_SCSI_AIC94XX is not set
542# CONFIG_SCSI_ARCMSR is not set
543# CONFIG_MEGARAID_NEWGEN is not set
544# CONFIG_MEGARAID_LEGACY is not set
545# CONFIG_MEGARAID_SAS is not set
546# CONFIG_SCSI_HPTIOP is not set
547# CONFIG_SCSI_BUSLOGIC is not set
548# CONFIG_SCSI_DMX3191D is not set
549# CONFIG_SCSI_EATA is not set
550# CONFIG_SCSI_FUTURE_DOMAIN is not set
551# CONFIG_SCSI_GDTH is not set
552# CONFIG_SCSI_IPS is not set
553# CONFIG_SCSI_IBMVSCSI is not set
554# CONFIG_SCSI_INITIO is not set
555# CONFIG_SCSI_INIA100 is not set
556# CONFIG_SCSI_STEX is not set
557# CONFIG_SCSI_SYM53C8XX_2 is not set
558# CONFIG_SCSI_IPR is not set
559# CONFIG_SCSI_QLOGIC_1280 is not set
560# CONFIG_SCSI_QLA_FC is not set
561# CONFIG_SCSI_QLA_ISCSI is not set
562# CONFIG_SCSI_LPFC is not set
563# CONFIG_SCSI_DC395x is not set
564# CONFIG_SCSI_DC390T is not set
565# CONFIG_SCSI_DEBUG is not set
566# CONFIG_SCSI_SRP is not set
567
568#
569# PCMCIA SCSI adapter support
570#
571# CONFIG_PCMCIA_FDOMAIN is not set
572# CONFIG_PCMCIA_QLOGIC is not set
573# CONFIG_PCMCIA_SYM53C500 is not set
574
575#
576# Serial ATA (prod) and Parallel ATA (experimental) drivers
577#
578CONFIG_ATA=y
579# CONFIG_ATA_NONSTANDARD is not set
580# CONFIG_SATA_AHCI is not set
581CONFIG_SATA_SVW=y
582# CONFIG_ATA_PIIX is not set
583CONFIG_SATA_MV=y
584# CONFIG_SATA_NV is not set
585# CONFIG_PDC_ADMA is not set
586# CONFIG_SATA_QSTOR is not set
587# CONFIG_SATA_PROMISE is not set
588# CONFIG_SATA_SX4 is not set
589CONFIG_SATA_SIL=y
590CONFIG_SATA_SIL24=y
591# CONFIG_SATA_SIS is not set
592# CONFIG_SATA_ULI is not set
593# CONFIG_SATA_VIA is not set
594# CONFIG_SATA_VITESSE is not set
595# CONFIG_PATA_ALI is not set
596# CONFIG_PATA_AMD is not set
597# CONFIG_PATA_ARTOP is not set
598# CONFIG_PATA_ATIIXP is not set
599# CONFIG_PATA_CMD64X is not set
600# CONFIG_PATA_CS5520 is not set
601# CONFIG_PATA_CS5530 is not set
602# CONFIG_PATA_CYPRESS is not set
603# CONFIG_PATA_EFAR is not set
604CONFIG_ATA_GENERIC=y
605# CONFIG_PATA_HPT366 is not set
606# CONFIG_PATA_HPT37X is not set
607# CONFIG_PATA_HPT3X2N is not set
608# CONFIG_PATA_HPT3X3 is not set
609# CONFIG_PATA_IT821X is not set
610# CONFIG_PATA_JMICRON is not set
611# CONFIG_PATA_TRIFLEX is not set
612# CONFIG_PATA_MARVELL is not set
613# CONFIG_PATA_MPIIX is not set
614# CONFIG_PATA_OLDPIIX is not set
615# CONFIG_PATA_NETCELL is not set
616# CONFIG_PATA_NS87410 is not set
617# CONFIG_PATA_OPTI is not set
618# CONFIG_PATA_OPTIDMA is not set
619# CONFIG_PATA_PCMCIA is not set
620# CONFIG_PATA_PDC_OLD is not set
621# CONFIG_PATA_RADISYS is not set
622# CONFIG_PATA_RZ1000 is not set
623# CONFIG_PATA_SC1200 is not set
624# CONFIG_PATA_SERVERWORKS is not set
625# CONFIG_PATA_PDC2027X is not set
626# CONFIG_PATA_SIL680 is not set
627# CONFIG_PATA_SIS is not set
628# CONFIG_PATA_VIA is not set
629# CONFIG_PATA_WINBOND is not set
630
631#
632# Multi-device support (RAID and LVM)
633#
634# CONFIG_MD is not set
635
636#
637# Fusion MPT device support
638#
639# CONFIG_FUSION is not set
640# CONFIG_FUSION_SPI is not set
641# CONFIG_FUSION_FC is not set
642# CONFIG_FUSION_SAS is not set
643
644#
645# IEEE 1394 (FireWire) support
646#
647CONFIG_IEEE1394=y
648
649#
650# Subsystem Options
651#
652# CONFIG_IEEE1394_VERBOSEDEBUG is not set
653# CONFIG_IEEE1394_OUI_DB is not set
654# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set
655# CONFIG_IEEE1394_EXPORT_FULL_API is not set
656
657#
658# Device Drivers
659#
660CONFIG_IEEE1394_PCILYNX=y
661CONFIG_IEEE1394_OHCI1394=y
662
663#
664# Protocol Drivers
665#
666# CONFIG_IEEE1394_VIDEO1394 is not set
667CONFIG_IEEE1394_SBP2=y
668# CONFIG_IEEE1394_ETH1394 is not set
669# CONFIG_IEEE1394_DV1394 is not set
670CONFIG_IEEE1394_RAWIO=y
671
672#
673# I2O device support
674#
675# CONFIG_I2O is not set
676
677#
678# Macintosh device drivers
679#
680# CONFIG_MAC_EMUMOUSEBTN is not set
681# CONFIG_WINDFARM is not set
682
683#
684# Network device support
685#
686CONFIG_NETDEVICES=y
687CONFIG_DUMMY=y
688# CONFIG_BONDING is not set
689# CONFIG_EQUALIZER is not set
690# CONFIG_TUN is not set
691
692#
693# ARCnet devices
694#
695# CONFIG_ARCNET is not set
696
697#
698# PHY device support
699#
700# CONFIG_PHYLIB is not set
701
702#
703# Ethernet (10 or 100Mbit)
704#
705CONFIG_NET_ETHERNET=y
706CONFIG_MII=y
707# CONFIG_HAPPYMEAL is not set
708# CONFIG_SUNGEM is not set
709# CONFIG_CASSINI is not set
710# CONFIG_NET_VENDOR_3COM is not set
711
712#
713# Tulip family network device support
714#
715# CONFIG_NET_TULIP is not set
716# CONFIG_HP100 is not set
717CONFIG_IBMVETH=y
718CONFIG_NET_PCI=y
719# CONFIG_PCNET32 is not set
720# CONFIG_AMD8111_ETH is not set
721# CONFIG_ADAPTEC_STARFIRE is not set
722# CONFIG_B44 is not set
723# CONFIG_FORCEDETH is not set
724# CONFIG_DGRS is not set
725CONFIG_EEPRO100=y
726# CONFIG_E100 is not set
727# CONFIG_FEALNX is not set
728# CONFIG_NATSEMI is not set
729# CONFIG_NE2K_PCI is not set
730# CONFIG_8139CP is not set
731# CONFIG_8139TOO is not set
732# CONFIG_SIS900 is not set
733# CONFIG_EPIC100 is not set
734# CONFIG_SUNDANCE is not set
735# CONFIG_VIA_RHINE is not set
736
737#
738# Ethernet (1000 Mbit)
739#
740# CONFIG_ACENIC is not set
741# CONFIG_DL2K is not set
742CONFIG_E1000=y
743CONFIG_E1000_NAPI=y
744# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
745# CONFIG_NS83820 is not set
746# CONFIG_HAMACHI is not set
747# CONFIG_YELLOWFIN is not set
748# CONFIG_R8169 is not set
749# CONFIG_SIS190 is not set
750# CONFIG_SKGE is not set
751# CONFIG_SKY2 is not set
752# CONFIG_SK98LIN is not set
753# CONFIG_VIA_VELOCITY is not set
754CONFIG_TIGON3=y
755# CONFIG_BNX2 is not set
756# CONFIG_QLA3XXX is not set
757
758#
759# Ethernet (10000 Mbit)
760#
761# CONFIG_CHELSIO_T1 is not set
762# CONFIG_IXGB is not set
763# CONFIG_S2IO is not set
764# CONFIG_MYRI10GE is not set
765# CONFIG_NETXEN_NIC is not set
766
767#
768# Token Ring devices
769#
770# CONFIG_TR is not set
771
772#
773# Wireless LAN (non-hamradio)
774#
775# CONFIG_NET_RADIO is not set
776
777#
778# PCMCIA network device support
779#
780# CONFIG_NET_PCMCIA is not set
781
782#
783# Wan interfaces
784#
785# CONFIG_WAN is not set
786# CONFIG_FDDI is not set
787# CONFIG_HIPPI is not set
788# CONFIG_PPP is not set
789# CONFIG_SLIP is not set
790# CONFIG_NET_FC is not set
791# CONFIG_SHAPER is not set
792# CONFIG_NETCONSOLE is not set
793# CONFIG_NETPOLL is not set
794# CONFIG_NET_POLL_CONTROLLER is not set
795
796#
797# ISDN subsystem
798#
799# CONFIG_ISDN is not set
800
801#
802# Telephony Support
803#
804# CONFIG_PHONE is not set
805
806#
807# Input device support
808#
809CONFIG_INPUT=y
810# CONFIG_INPUT_FF_MEMLESS is not set
811
812#
813# Userland interfaces
814#
815CONFIG_INPUT_MOUSEDEV=y
816CONFIG_INPUT_MOUSEDEV_PSAUX=y
817CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
818CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
819CONFIG_INPUT_JOYDEV=y
820# CONFIG_INPUT_TSDEV is not set
821CONFIG_INPUT_EVDEV=y
822# CONFIG_INPUT_EVBUG is not set
823
824#
825# Input Device Drivers
826#
827CONFIG_INPUT_KEYBOARD=y
828# CONFIG_KEYBOARD_ATKBD is not set
829# CONFIG_KEYBOARD_SUNKBD is not set
830# CONFIG_KEYBOARD_LKKBD is not set
831# CONFIG_KEYBOARD_XTKBD is not set
832# CONFIG_KEYBOARD_NEWTON is not set
833# CONFIG_KEYBOARD_STOWAWAY is not set
834CONFIG_INPUT_MOUSE=y
835# CONFIG_MOUSE_PS2 is not set
836# CONFIG_MOUSE_SERIAL is not set
837# CONFIG_MOUSE_VSXXXAA is not set
838# CONFIG_INPUT_JOYSTICK is not set
839# CONFIG_INPUT_TOUCHSCREEN is not set
840# CONFIG_INPUT_MISC is not set
841
842#
843# Hardware I/O ports
844#
845# CONFIG_SERIO is not set
846# CONFIG_GAMEPORT is not set
847
848#
849# Character devices
850#
851CONFIG_VT=y
852CONFIG_VT_CONSOLE=y
853CONFIG_HW_CONSOLE=y
854# CONFIG_VT_HW_CONSOLE_BINDING is not set
855# CONFIG_SERIAL_NONSTANDARD is not set
856
857#
858# Serial drivers
859#
860CONFIG_SERIAL_8250=y
861CONFIG_SERIAL_8250_CONSOLE=y
862CONFIG_SERIAL_8250_PCI=y
863# CONFIG_SERIAL_8250_CS is not set
864CONFIG_SERIAL_8250_NR_UARTS=4
865CONFIG_SERIAL_8250_RUNTIME_UARTS=4
866# CONFIG_SERIAL_8250_EXTENDED is not set
867
868#
869# Non-8250 serial port support
870#
871CONFIG_SERIAL_CORE=y
872CONFIG_SERIAL_CORE_CONSOLE=y
873# CONFIG_SERIAL_ICOM is not set
874# CONFIG_SERIAL_JSM is not set
875CONFIG_UNIX98_PTYS=y
876CONFIG_LEGACY_PTYS=y
877CONFIG_LEGACY_PTY_COUNT=4
878CONFIG_HVC_DRIVER=y
879CONFIG_HVC_CONSOLE=y
880CONFIG_HVC_RTAS=y
881# CONFIG_HVCS is not set
882
883#
884# IPMI
885#
886# CONFIG_IPMI_HANDLER is not set
887
888#
889# Watchdog Cards
890#
891# CONFIG_WATCHDOG is not set
892CONFIG_HW_RANDOM=y
893CONFIG_GEN_RTC=y
894CONFIG_GEN_RTC_X=y
895# CONFIG_DTLK is not set
896# CONFIG_R3964 is not set
897# CONFIG_APPLICOM is not set
898# CONFIG_AGP is not set
899# CONFIG_DRM is not set
900
901#
902# PCMCIA character devices
903#
904# CONFIG_SYNCLINK_CS is not set
905# CONFIG_CARDMAN_4000 is not set
906# CONFIG_CARDMAN_4040 is not set
907CONFIG_RAW_DRIVER=y
908CONFIG_MAX_RAW_DEVS=256
909# CONFIG_HANGCHECK_TIMER is not set
910
911#
912# TPM devices
913#
914# CONFIG_TCG_TPM is not set
915
916#
917# I2C support
918#
919CONFIG_I2C=y
920CONFIG_I2C_CHARDEV=y
921
922#
923# I2C Algorithms
924#
925CONFIG_I2C_ALGOBIT=y
926CONFIG_I2C_ALGOPCF=y
927CONFIG_I2C_ALGOPCA=y
928
929#
930# I2C Hardware Bus support
931#
932# CONFIG_I2C_ALI1535 is not set
933# CONFIG_I2C_ALI1563 is not set
934# CONFIG_I2C_ALI15X3 is not set
935# CONFIG_I2C_AMD756 is not set
936# CONFIG_I2C_AMD8111 is not set
937# CONFIG_I2C_I801 is not set
938# CONFIG_I2C_I810 is not set
939# CONFIG_I2C_PIIX4 is not set
940# CONFIG_I2C_NFORCE2 is not set
941# CONFIG_I2C_OCORES is not set
942# CONFIG_I2C_PARPORT_LIGHT is not set
943# CONFIG_I2C_PROSAVAGE is not set
944# CONFIG_I2C_SAVAGE4 is not set
945# CONFIG_I2C_SIS5595 is not set
946# CONFIG_I2C_SIS630 is not set
947# CONFIG_I2C_SIS96X is not set
948# CONFIG_I2C_STUB is not set
949# CONFIG_I2C_VIA is not set
950# CONFIG_I2C_VIAPRO is not set
951# CONFIG_I2C_VOODOO3 is not set
952# CONFIG_I2C_PCA_ISA is not set
953
954#
955# Miscellaneous I2C Chip support
956#
957# CONFIG_SENSORS_DS1337 is not set
958# CONFIG_SENSORS_DS1374 is not set
959CONFIG_SENSORS_EEPROM=y
960# CONFIG_SENSORS_PCF8574 is not set
961# CONFIG_SENSORS_PCA9539 is not set
962# CONFIG_SENSORS_PCF8591 is not set
963# CONFIG_SENSORS_MAX6875 is not set
964# CONFIG_I2C_DEBUG_CORE is not set
965# CONFIG_I2C_DEBUG_ALGO is not set
966CONFIG_I2C_DEBUG_BUS=y
967# CONFIG_I2C_DEBUG_CHIP is not set
968
969#
970# SPI support
971#
972# CONFIG_SPI is not set
973# CONFIG_SPI_MASTER is not set
974
975#
976# Dallas's 1-wire bus
977#
978# CONFIG_W1 is not set
979
980#
981# Hardware Monitoring support
982#
983CONFIG_HWMON=y
984CONFIG_HWMON_VID=y
985# CONFIG_SENSORS_ABITUGURU is not set
986# CONFIG_SENSORS_ADM1021 is not set
987# CONFIG_SENSORS_ADM1025 is not set
988# CONFIG_SENSORS_ADM1026 is not set
989# CONFIG_SENSORS_ADM1031 is not set
990# CONFIG_SENSORS_ADM9240 is not set
991# CONFIG_SENSORS_ASB100 is not set
992# CONFIG_SENSORS_ATXP1 is not set
993# CONFIG_SENSORS_DS1621 is not set
994# CONFIG_SENSORS_F71805F is not set
995# CONFIG_SENSORS_FSCHER is not set
996# CONFIG_SENSORS_FSCPOS is not set
997# CONFIG_SENSORS_GL518SM is not set
998# CONFIG_SENSORS_GL520SM is not set
999# CONFIG_SENSORS_IT87 is not set
1000# CONFIG_SENSORS_LM63 is not set
1001# CONFIG_SENSORS_LM75 is not set
1002# CONFIG_SENSORS_LM77 is not set
1003# CONFIG_SENSORS_LM78 is not set
1004# CONFIG_SENSORS_LM80 is not set
1005# CONFIG_SENSORS_LM83 is not set
1006CONFIG_SENSORS_LM85=y
1007# CONFIG_SENSORS_LM87 is not set
1008CONFIG_SENSORS_LM90=y
1009# CONFIG_SENSORS_LM92 is not set
1010# CONFIG_SENSORS_MAX1619 is not set
1011# CONFIG_SENSORS_PC87360 is not set
1012# CONFIG_SENSORS_PC87427 is not set
1013# CONFIG_SENSORS_SIS5595 is not set
1014# CONFIG_SENSORS_SMSC47M1 is not set
1015# CONFIG_SENSORS_SMSC47M192 is not set
1016# CONFIG_SENSORS_SMSC47B397 is not set
1017# CONFIG_SENSORS_VIA686A is not set
1018# CONFIG_SENSORS_VT1211 is not set
1019# CONFIG_SENSORS_VT8231 is not set
1020# CONFIG_SENSORS_W83781D is not set
1021# CONFIG_SENSORS_W83791D is not set
1022# CONFIG_SENSORS_W83792D is not set
1023# CONFIG_SENSORS_W83793 is not set
1024# CONFIG_SENSORS_W83L785TS is not set
1025# CONFIG_SENSORS_W83627HF is not set
1026# CONFIG_SENSORS_W83627EHF is not set
1027# CONFIG_HWMON_DEBUG_CHIP is not set
1028
1029#
1030# Multimedia devices
1031#
1032# CONFIG_VIDEO_DEV is not set
1033
1034#
1035# Digital Video Broadcasting Devices
1036#
1037# CONFIG_DVB is not set
1038# CONFIG_USB_DABUSB is not set
1039
1040#
1041# Graphics support
1042#
1043CONFIG_FIRMWARE_EDID=y
1044CONFIG_FB=y
1045CONFIG_FB_DDC=y
1046CONFIG_FB_CFB_FILLRECT=y
1047CONFIG_FB_CFB_COPYAREA=y
1048CONFIG_FB_CFB_IMAGEBLIT=y
1049CONFIG_FB_MACMODES=y
1050# CONFIG_FB_BACKLIGHT is not set
1051CONFIG_FB_MODE_HELPERS=y
1052CONFIG_FB_TILEBLITTING=y
1053# CONFIG_FB_CIRRUS is not set
1054# CONFIG_FB_PM2 is not set
1055# CONFIG_FB_CYBER2000 is not set
1056# CONFIG_FB_OF is not set
1057# CONFIG_FB_ASILIANT is not set
1058# CONFIG_FB_IMSTT is not set
1059CONFIG_FB_VGA16=y
1060# CONFIG_FB_S1D13XXX is not set
1061CONFIG_FB_NVIDIA=y
1062CONFIG_FB_NVIDIA_I2C=y
1063CONFIG_FB_RIVA=y
1064CONFIG_FB_RIVA_I2C=y
1065# CONFIG_FB_RIVA_DEBUG is not set
1066CONFIG_FB_MATROX=y
1067CONFIG_FB_MATROX_MILLENIUM=y
1068CONFIG_FB_MATROX_MYSTIQUE=y
1069CONFIG_FB_MATROX_G=y
1070CONFIG_FB_MATROX_I2C=y
1071CONFIG_FB_MATROX_MAVEN=y
1072CONFIG_FB_MATROX_MULTIHEAD=y
1073CONFIG_FB_RADEON=y
1074CONFIG_FB_RADEON_I2C=y
1075# CONFIG_FB_RADEON_DEBUG is not set
1076# CONFIG_FB_ATY128 is not set
1077# CONFIG_FB_ATY is not set
1078# CONFIG_FB_SAVAGE is not set
1079# CONFIG_FB_SIS is not set
1080# CONFIG_FB_NEOMAGIC is not set
1081# CONFIG_FB_KYRO is not set
1082# CONFIG_FB_3DFX is not set
1083# CONFIG_FB_VOODOO1 is not set
1084# CONFIG_FB_TRIDENT is not set
1085# CONFIG_FB_IBM_GXT4500 is not set
1086# CONFIG_FB_VIRTUAL is not set
1087
1088#
1089# Console display driver support
1090#
1091CONFIG_VGA_CONSOLE=y
1092CONFIG_VGACON_SOFT_SCROLLBACK=y
1093CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
1094CONFIG_DUMMY_CONSOLE=y
1095CONFIG_FRAMEBUFFER_CONSOLE=y
1096# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1097# CONFIG_FONTS is not set
1098CONFIG_FONT_8x8=y
1099CONFIG_FONT_8x16=y
1100
1101#
1102# Logo configuration
1103#
1104CONFIG_LOGO=y
1105CONFIG_LOGO_LINUX_MONO=y
1106CONFIG_LOGO_LINUX_VGA16=y
1107CONFIG_LOGO_LINUX_CLUT224=y
1108# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1109
1110#
1111# Sound
1112#
1113CONFIG_SOUND=y
1114
1115#
1116# Advanced Linux Sound Architecture
1117#
1118CONFIG_SND=y
1119CONFIG_SND_TIMER=y
1120CONFIG_SND_PCM=y
1121CONFIG_SND_HWDEP=y
1122CONFIG_SND_RAWMIDI=y
1123CONFIG_SND_SEQUENCER=y
1124# CONFIG_SND_SEQ_DUMMY is not set
1125CONFIG_SND_OSSEMUL=y
1126CONFIG_SND_MIXER_OSS=y
1127CONFIG_SND_PCM_OSS=y
1128CONFIG_SND_PCM_OSS_PLUGINS=y
1129CONFIG_SND_SEQUENCER_OSS=y
1130# CONFIG_SND_DYNAMIC_MINORS is not set
1131CONFIG_SND_SUPPORT_OLD_API=y
1132CONFIG_SND_VERBOSE_PROCFS=y
1133# CONFIG_SND_VERBOSE_PRINTK is not set
1134# CONFIG_SND_DEBUG is not set
1135
1136#
1137# Generic devices
1138#
1139# CONFIG_SND_DUMMY is not set
1140# CONFIG_SND_VIRMIDI is not set
1141# CONFIG_SND_MTPAV is not set
1142# CONFIG_SND_SERIAL_U16550 is not set
1143# CONFIG_SND_MPU401 is not set
1144
1145#
1146# PCI devices
1147#
1148# CONFIG_SND_AD1889 is not set
1149# CONFIG_SND_ALS300 is not set
1150# CONFIG_SND_ALS4000 is not set
1151# CONFIG_SND_ALI5451 is not set
1152# CONFIG_SND_ATIIXP is not set
1153# CONFIG_SND_ATIIXP_MODEM is not set
1154# CONFIG_SND_AU8810 is not set
1155# CONFIG_SND_AU8820 is not set
1156# CONFIG_SND_AU8830 is not set
1157# CONFIG_SND_AZT3328 is not set
1158# CONFIG_SND_BT87X is not set
1159# CONFIG_SND_CA0106 is not set
1160# CONFIG_SND_CMIPCI is not set
1161# CONFIG_SND_CS4281 is not set
1162# CONFIG_SND_CS46XX is not set
1163# CONFIG_SND_DARLA20 is not set
1164# CONFIG_SND_GINA20 is not set
1165# CONFIG_SND_LAYLA20 is not set
1166# CONFIG_SND_DARLA24 is not set
1167# CONFIG_SND_GINA24 is not set
1168# CONFIG_SND_LAYLA24 is not set
1169# CONFIG_SND_MONA is not set
1170# CONFIG_SND_MIA is not set
1171# CONFIG_SND_ECHO3G is not set
1172# CONFIG_SND_INDIGO is not set
1173# CONFIG_SND_INDIGOIO is not set
1174# CONFIG_SND_INDIGODJ is not set
1175# CONFIG_SND_EMU10K1 is not set
1176# CONFIG_SND_EMU10K1X is not set
1177# CONFIG_SND_ENS1370 is not set
1178# CONFIG_SND_ENS1371 is not set
1179# CONFIG_SND_ES1938 is not set
1180# CONFIG_SND_ES1968 is not set
1181# CONFIG_SND_FM801 is not set
1182# CONFIG_SND_HDA_INTEL is not set
1183# CONFIG_SND_HDSP is not set
1184# CONFIG_SND_HDSPM is not set
1185# CONFIG_SND_ICE1712 is not set
1186# CONFIG_SND_ICE1724 is not set
1187# CONFIG_SND_INTEL8X0 is not set
1188# CONFIG_SND_INTEL8X0M is not set
1189# CONFIG_SND_KORG1212 is not set
1190# CONFIG_SND_MAESTRO3 is not set
1191# CONFIG_SND_MIXART is not set
1192# CONFIG_SND_NM256 is not set
1193# CONFIG_SND_PCXHR is not set
1194# CONFIG_SND_RIPTIDE is not set
1195# CONFIG_SND_RME32 is not set
1196# CONFIG_SND_RME96 is not set
1197# CONFIG_SND_RME9652 is not set
1198# CONFIG_SND_SONICVIBES is not set
1199# CONFIG_SND_TRIDENT is not set
1200# CONFIG_SND_VIA82XX is not set
1201# CONFIG_SND_VIA82XX_MODEM is not set
1202# CONFIG_SND_VX222 is not set
1203# CONFIG_SND_YMFPCI is not set
1204
1205#
1206# ALSA PowerMac devices
1207#
1208
1209#
1210# USB devices
1211#
1212CONFIG_SND_USB_AUDIO=y
1213CONFIG_SND_USB_USX2Y=y
1214
1215#
1216# PCMCIA devices
1217#
1218# CONFIG_SND_VXPOCKET is not set
1219# CONFIG_SND_PDAUDIOCF is not set
1220
1221#
1222# Open Sound System
1223#
1224# CONFIG_SOUND_PRIME is not set
1225
1226#
1227# HID Devices
1228#
1229CONFIG_HID=y
1230
1231#
1232# USB support
1233#
1234CONFIG_USB_ARCH_HAS_HCD=y
1235CONFIG_USB_ARCH_HAS_OHCI=y
1236CONFIG_USB_ARCH_HAS_EHCI=y
1237CONFIG_USB=y
1238# CONFIG_USB_DEBUG is not set
1239
1240#
1241# Miscellaneous USB options
1242#
1243CONFIG_USB_DEVICEFS=y
1244# CONFIG_USB_BANDWIDTH is not set
1245# CONFIG_USB_DYNAMIC_MINORS is not set
1246# CONFIG_USB_OTG is not set
1247
1248#
1249# USB Host Controller Drivers
1250#
1251CONFIG_USB_EHCI_HCD=y
1252# CONFIG_USB_EHCI_SPLIT_ISO is not set
1253# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1254# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1255# CONFIG_USB_ISP116X_HCD is not set
1256CONFIG_USB_OHCI_HCD=y
1257# CONFIG_USB_OHCI_BIG_ENDIAN is not set
1258CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1259CONFIG_USB_UHCI_HCD=y
1260CONFIG_USB_SL811_HCD=y
1261# CONFIG_USB_SL811_CS is not set
1262
1263#
1264# USB Device Class drivers
1265#
1266# CONFIG_USB_ACM is not set
1267# CONFIG_USB_PRINTER is not set
1268
1269#
1270# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1271#
1272
1273#
1274# may also be needed; see USB_STORAGE Help for more information
1275#
1276CONFIG_USB_STORAGE=y
1277# CONFIG_USB_STORAGE_DEBUG is not set
1278# CONFIG_USB_STORAGE_DATAFAB is not set
1279# CONFIG_USB_STORAGE_FREECOM is not set
1280# CONFIG_USB_STORAGE_ISD200 is not set
1281# CONFIG_USB_STORAGE_DPCM is not set
1282# CONFIG_USB_STORAGE_USBAT is not set
1283# CONFIG_USB_STORAGE_SDDR09 is not set
1284# CONFIG_USB_STORAGE_SDDR55 is not set
1285# CONFIG_USB_STORAGE_JUMPSHOT is not set
1286# CONFIG_USB_STORAGE_ALAUDA is not set
1287# CONFIG_USB_STORAGE_ONETOUCH is not set
1288# CONFIG_USB_STORAGE_KARMA is not set
1289CONFIG_USB_LIBUSUAL=y
1290
1291#
1292# USB Input Devices
1293#
1294CONFIG_USB_HID=y
1295# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1296# CONFIG_HID_FF is not set
1297# CONFIG_USB_HIDDEV is not set
1298# CONFIG_USB_AIPTEK is not set
1299# CONFIG_USB_WACOM is not set
1300# CONFIG_USB_ACECAD is not set
1301# CONFIG_USB_KBTAB is not set
1302# CONFIG_USB_POWERMATE is not set
1303# CONFIG_USB_TOUCHSCREEN is not set
1304# CONFIG_USB_YEALINK is not set
1305# CONFIG_USB_XPAD is not set
1306# CONFIG_USB_ATI_REMOTE is not set
1307# CONFIG_USB_ATI_REMOTE2 is not set
1308# CONFIG_USB_KEYSPAN_REMOTE is not set
1309# CONFIG_USB_APPLETOUCH is not set
1310
1311#
1312# USB Imaging devices
1313#
1314# CONFIG_USB_MDC800 is not set
1315# CONFIG_USB_MICROTEK is not set
1316
1317#
1318# USB Network Adapters
1319#
1320# CONFIG_USB_CATC is not set
1321# CONFIG_USB_KAWETH is not set
1322# CONFIG_USB_PEGASUS is not set
1323# CONFIG_USB_RTL8150 is not set
1324# CONFIG_USB_USBNET_MII is not set
1325# CONFIG_USB_USBNET is not set
1326CONFIG_USB_MON=y
1327
1328#
1329# USB port drivers
1330#
1331
1332#
1333# USB Serial Converter support
1334#
1335# CONFIG_USB_SERIAL is not set
1336
1337#
1338# USB Miscellaneous drivers
1339#
1340# CONFIG_USB_EMI62 is not set
1341# CONFIG_USB_EMI26 is not set
1342# CONFIG_USB_ADUTUX is not set
1343# CONFIG_USB_AUERSWALD is not set
1344# CONFIG_USB_RIO500 is not set
1345# CONFIG_USB_LEGOTOWER is not set
1346# CONFIG_USB_LCD is not set
1347# CONFIG_USB_LED is not set
1348# CONFIG_USB_CYPRESS_CY7C63 is not set
1349# CONFIG_USB_CYTHERM is not set
1350# CONFIG_USB_PHIDGET is not set
1351# CONFIG_USB_IDMOUSE is not set
1352# CONFIG_USB_FTDI_ELAN is not set
1353# CONFIG_USB_APPLEDISPLAY is not set
1354# CONFIG_USB_SISUSBVGA is not set
1355# CONFIG_USB_LD is not set
1356# CONFIG_USB_TRANCEVIBRATOR is not set
1357# CONFIG_USB_TEST is not set
1358
1359#
1360# USB DSL modem support
1361#
1362
1363#
1364# USB Gadget Support
1365#
1366# CONFIG_USB_GADGET is not set
1367
1368#
1369# MMC/SD Card support
1370#
1371# CONFIG_MMC is not set
1372
1373#
1374# LED devices
1375#
1376# CONFIG_NEW_LEDS is not set
1377
1378#
1379# LED drivers
1380#
1381
1382#
1383# LED Triggers
1384#
1385
1386#
1387# InfiniBand support
1388#
1389# CONFIG_INFINIBAND is not set
1390
1391#
1392# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1393#
1394
1395#
1396# Real Time Clock
1397#
1398CONFIG_RTC_LIB=y
1399CONFIG_RTC_CLASS=y
1400CONFIG_RTC_HCTOSYS=y
1401CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1402# CONFIG_RTC_DEBUG is not set
1403
1404#
1405# RTC interfaces
1406#
1407CONFIG_RTC_INTF_SYSFS=y
1408CONFIG_RTC_INTF_PROC=y
1409CONFIG_RTC_INTF_DEV=y
1410# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1411
1412#
1413# RTC drivers
1414#
1415# CONFIG_RTC_DRV_X1205 is not set
1416CONFIG_RTC_DRV_DS1307=y
1417# CONFIG_RTC_DRV_DS1553 is not set
1418# CONFIG_RTC_DRV_ISL1208 is not set
1419# CONFIG_RTC_DRV_DS1672 is not set
1420# CONFIG_RTC_DRV_DS1742 is not set
1421# CONFIG_RTC_DRV_PCF8563 is not set
1422# CONFIG_RTC_DRV_PCF8583 is not set
1423# CONFIG_RTC_DRV_RS5C372 is not set
1424# CONFIG_RTC_DRV_M48T86 is not set
1425# CONFIG_RTC_DRV_TEST is not set
1426# CONFIG_RTC_DRV_V3020 is not set
1427
1428#
1429# DMA Engine support
1430#
1431# CONFIG_DMA_ENGINE is not set
1432
1433#
1434# DMA Clients
1435#
1436
1437#
1438# DMA Devices
1439#
1440
1441#
1442# Virtualization
1443#
1444
1445#
1446# File systems
1447#
1448CONFIG_EXT2_FS=y
1449CONFIG_EXT2_FS_XATTR=y
1450CONFIG_EXT2_FS_POSIX_ACL=y
1451# CONFIG_EXT2_FS_SECURITY is not set
1452# CONFIG_EXT2_FS_XIP is not set
1453CONFIG_EXT3_FS=y
1454CONFIG_EXT3_FS_XATTR=y
1455# CONFIG_EXT3_FS_POSIX_ACL is not set
1456# CONFIG_EXT3_FS_SECURITY is not set
1457# CONFIG_EXT4DEV_FS is not set
1458CONFIG_JBD=y
1459# CONFIG_JBD_DEBUG is not set
1460CONFIG_FS_MBCACHE=y
1461# CONFIG_REISERFS_FS is not set
1462# CONFIG_JFS_FS is not set
1463CONFIG_FS_POSIX_ACL=y
1464# CONFIG_XFS_FS is not set
1465# CONFIG_GFS2_FS is not set
1466# CONFIG_OCFS2_FS is not set
1467# CONFIG_MINIX_FS is not set
1468# CONFIG_ROMFS_FS is not set
1469# CONFIG_INOTIFY is not set
1470# CONFIG_QUOTA is not set
1471CONFIG_DNOTIFY=y
1472CONFIG_AUTOFS_FS=y
1473CONFIG_AUTOFS4_FS=y
1474# CONFIG_FUSE_FS is not set
1475
1476#
1477# CD-ROM/DVD Filesystems
1478#
1479CONFIG_ISO9660_FS=y
1480# CONFIG_JOLIET is not set
1481# CONFIG_ZISOFS is not set
1482CONFIG_UDF_FS=y
1483CONFIG_UDF_NLS=y
1484
1485#
1486# DOS/FAT/NT Filesystems
1487#
1488CONFIG_FAT_FS=y
1489CONFIG_MSDOS_FS=y
1490CONFIG_VFAT_FS=y
1491CONFIG_FAT_DEFAULT_CODEPAGE=437
1492CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1493# CONFIG_NTFS_FS is not set
1494
1495#
1496# Pseudo filesystems
1497#
1498CONFIG_PROC_FS=y
1499CONFIG_PROC_KCORE=y
1500CONFIG_PROC_SYSCTL=y
1501CONFIG_SYSFS=y
1502CONFIG_TMPFS=y
1503# CONFIG_TMPFS_POSIX_ACL is not set
1504CONFIG_HUGETLBFS=y
1505CONFIG_HUGETLB_PAGE=y
1506CONFIG_RAMFS=y
1507CONFIG_CONFIGFS_FS=y
1508
1509#
1510# Miscellaneous filesystems
1511#
1512# CONFIG_ADFS_FS is not set
1513# CONFIG_AFFS_FS is not set
1514# CONFIG_HFS_FS is not set
1515# CONFIG_HFSPLUS_FS is not set
1516# CONFIG_BEFS_FS is not set
1517# CONFIG_BFS_FS is not set
1518# CONFIG_EFS_FS is not set
1519# CONFIG_JFFS2_FS is not set
1520# CONFIG_CRAMFS is not set
1521# CONFIG_VXFS_FS is not set
1522# CONFIG_HPFS_FS is not set
1523# CONFIG_QNX4FS_FS is not set
1524# CONFIG_SYSV_FS is not set
1525# CONFIG_UFS_FS is not set
1526
1527#
1528# Network File Systems
1529#
1530CONFIG_NFS_FS=y
1531CONFIG_NFS_V3=y
1532# CONFIG_NFS_V3_ACL is not set
1533# CONFIG_NFS_V4 is not set
1534# CONFIG_NFS_DIRECTIO is not set
1535# CONFIG_NFSD is not set
1536CONFIG_ROOT_NFS=y
1537CONFIG_LOCKD=y
1538CONFIG_LOCKD_V4=y
1539CONFIG_NFS_COMMON=y
1540CONFIG_SUNRPC=y
1541# CONFIG_RPCSEC_GSS_KRB5 is not set
1542# CONFIG_RPCSEC_GSS_SPKM3 is not set
1543# CONFIG_SMB_FS is not set
1544# CONFIG_CIFS is not set
1545# CONFIG_NCP_FS is not set
1546# CONFIG_CODA_FS is not set
1547# CONFIG_AFS_FS is not set
1548# CONFIG_9P_FS is not set
1549
1550#
1551# Partition Types
1552#
1553CONFIG_PARTITION_ADVANCED=y
1554# CONFIG_ACORN_PARTITION is not set
1555# CONFIG_OSF_PARTITION is not set
1556# CONFIG_AMIGA_PARTITION is not set
1557# CONFIG_ATARI_PARTITION is not set
1558CONFIG_MAC_PARTITION=y
1559CONFIG_MSDOS_PARTITION=y
1560# CONFIG_BSD_DISKLABEL is not set
1561# CONFIG_MINIX_SUBPARTITION is not set
1562# CONFIG_SOLARIS_X86_PARTITION is not set
1563# CONFIG_UNIXWARE_DISKLABEL is not set
1564# CONFIG_LDM_PARTITION is not set
1565# CONFIG_SGI_PARTITION is not set
1566# CONFIG_ULTRIX_PARTITION is not set
1567# CONFIG_SUN_PARTITION is not set
1568# CONFIG_KARMA_PARTITION is not set
1569# CONFIG_EFI_PARTITION is not set
1570
1571#
1572# Native Language Support
1573#
1574CONFIG_NLS=y
1575CONFIG_NLS_DEFAULT="iso8859-1"
1576CONFIG_NLS_CODEPAGE_437=y
1577# CONFIG_NLS_CODEPAGE_737 is not set
1578# CONFIG_NLS_CODEPAGE_775 is not set
1579# CONFIG_NLS_CODEPAGE_850 is not set
1580# CONFIG_NLS_CODEPAGE_852 is not set
1581# CONFIG_NLS_CODEPAGE_855 is not set
1582# CONFIG_NLS_CODEPAGE_857 is not set
1583# CONFIG_NLS_CODEPAGE_860 is not set
1584# CONFIG_NLS_CODEPAGE_861 is not set
1585# CONFIG_NLS_CODEPAGE_862 is not set
1586# CONFIG_NLS_CODEPAGE_863 is not set
1587# CONFIG_NLS_CODEPAGE_864 is not set
1588# CONFIG_NLS_CODEPAGE_865 is not set
1589# CONFIG_NLS_CODEPAGE_866 is not set
1590# CONFIG_NLS_CODEPAGE_869 is not set
1591# CONFIG_NLS_CODEPAGE_936 is not set
1592# CONFIG_NLS_CODEPAGE_950 is not set
1593# CONFIG_NLS_CODEPAGE_932 is not set
1594# CONFIG_NLS_CODEPAGE_949 is not set
1595# CONFIG_NLS_CODEPAGE_874 is not set
1596# CONFIG_NLS_ISO8859_8 is not set
1597# CONFIG_NLS_CODEPAGE_1250 is not set
1598# CONFIG_NLS_CODEPAGE_1251 is not set
1599# CONFIG_NLS_ASCII is not set
1600CONFIG_NLS_ISO8859_1=y
1601# CONFIG_NLS_ISO8859_2 is not set
1602# CONFIG_NLS_ISO8859_3 is not set
1603# CONFIG_NLS_ISO8859_4 is not set
1604# CONFIG_NLS_ISO8859_5 is not set
1605# CONFIG_NLS_ISO8859_6 is not set
1606# CONFIG_NLS_ISO8859_7 is not set
1607# CONFIG_NLS_ISO8859_9 is not set
1608# CONFIG_NLS_ISO8859_13 is not set
1609# CONFIG_NLS_ISO8859_14 is not set
1610# CONFIG_NLS_ISO8859_15 is not set
1611# CONFIG_NLS_KOI8_R is not set
1612# CONFIG_NLS_KOI8_U is not set
1613# CONFIG_NLS_UTF8 is not set
1614
1615#
1616# Distributed Lock Manager
1617#
1618# CONFIG_DLM is not set
1619
1620#
1621# Library routines
1622#
1623CONFIG_BITREVERSE=y
1624CONFIG_CRC_CCITT=y
1625# CONFIG_CRC16 is not set
1626CONFIG_CRC32=y
1627# CONFIG_LIBCRC32C is not set
1628CONFIG_PLIST=y
1629CONFIG_IOMAP_COPY=y
1630
1631#
1632# Instrumentation Support
1633#
1634CONFIG_PROFILING=y
1635CONFIG_OPROFILE=y
1636# CONFIG_KPROBES is not set
1637
1638#
1639# Kernel hacking
1640#
1641# CONFIG_PRINTK_TIME is not set
1642CONFIG_ENABLE_MUST_CHECK=y
1643CONFIG_MAGIC_SYSRQ=y
1644# CONFIG_UNUSED_SYMBOLS is not set
1645# CONFIG_DEBUG_FS is not set
1646# CONFIG_HEADERS_CHECK is not set
1647CONFIG_DEBUG_KERNEL=y
1648CONFIG_LOG_BUF_SHIFT=17
1649CONFIG_DETECT_SOFTLOCKUP=y
1650# CONFIG_SCHEDSTATS is not set
1651# CONFIG_DEBUG_SLAB is not set
1652# CONFIG_DEBUG_RT_MUTEXES is not set
1653# CONFIG_RT_MUTEX_TESTER is not set
1654# CONFIG_DEBUG_SPINLOCK is not set
1655# CONFIG_DEBUG_MUTEXES is not set
1656# CONFIG_DEBUG_RWSEMS is not set
1657# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1658# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1659# CONFIG_DEBUG_KOBJECT is not set
1660CONFIG_DEBUG_BUGVERBOSE=y
1661CONFIG_DEBUG_INFO=y
1662# CONFIG_DEBUG_VM is not set
1663# CONFIG_DEBUG_LIST is not set
1664CONFIG_FORCED_INLINING=y
1665# CONFIG_RCU_TORTURE_TEST is not set
1666# CONFIG_DEBUG_STACKOVERFLOW is not set
1667# CONFIG_DEBUG_STACK_USAGE is not set
1668CONFIG_DEBUGGER=y
1669CONFIG_XMON=y
1670CONFIG_XMON_DEFAULT=y
1671CONFIG_XMON_DISASSEMBLY=y
1672# CONFIG_IRQSTACKS is not set
1673CONFIG_BOOTX_TEXT=y
1674# CONFIG_PPC_EARLY_DEBUG is not set
1675
1676#
1677# Security options
1678#
1679# CONFIG_KEYS is not set
1680# CONFIG_SECURITY is not set
1681
1682#
1683# Cryptographic options
1684#
1685CONFIG_CRYPTO=y
1686CONFIG_CRYPTO_ALGAPI=y
1687CONFIG_CRYPTO_BLKCIPHER=y
1688CONFIG_CRYPTO_HASH=y
1689CONFIG_CRYPTO_MANAGER=y
1690CONFIG_CRYPTO_HMAC=y
1691# CONFIG_CRYPTO_XCBC is not set
1692# CONFIG_CRYPTO_NULL is not set
1693# CONFIG_CRYPTO_MD4 is not set
1694CONFIG_CRYPTO_MD5=y
1695CONFIG_CRYPTO_SHA1=y
1696# CONFIG_CRYPTO_SHA256 is not set
1697# CONFIG_CRYPTO_SHA512 is not set
1698# CONFIG_CRYPTO_WP512 is not set
1699# CONFIG_CRYPTO_TGR192 is not set
1700# CONFIG_CRYPTO_GF128MUL is not set
1701CONFIG_CRYPTO_ECB=m
1702CONFIG_CRYPTO_CBC=y
1703# CONFIG_CRYPTO_LRW is not set
1704CONFIG_CRYPTO_DES=y
1705# CONFIG_CRYPTO_BLOWFISH is not set
1706# CONFIG_CRYPTO_TWOFISH is not set
1707# CONFIG_CRYPTO_SERPENT is not set
1708# CONFIG_CRYPTO_AES is not set
1709# CONFIG_CRYPTO_CAST5 is not set
1710# CONFIG_CRYPTO_CAST6 is not set
1711# CONFIG_CRYPTO_TEA is not set
1712# CONFIG_CRYPTO_ARC4 is not set
1713# CONFIG_CRYPTO_KHAZAD is not set
1714# CONFIG_CRYPTO_ANUBIS is not set
1715# CONFIG_CRYPTO_DEFLATE is not set
1716# CONFIG_CRYPTO_MICHAEL_MIC is not set
1717# CONFIG_CRYPTO_CRC32C is not set
1718# CONFIG_CRYPTO_TEST is not set
1719
1720#
1721# Hardware crypto devices
1722#
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index debac66e8258..a8da0aea3b87 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -500,7 +500,7 @@ CONFIG_BLK_DEV_AMD74XX=y
500# CONFIG_BLK_DEV_PDC202XX_NEW is not set 500# CONFIG_BLK_DEV_PDC202XX_NEW is not set
501# CONFIG_BLK_DEV_SVWKS is not set 501# CONFIG_BLK_DEV_SVWKS is not set
502# CONFIG_BLK_DEV_SIIMAGE is not set 502# CONFIG_BLK_DEV_SIIMAGE is not set
503CONFIG_BLK_DEV_SL82C105=y 503# CONFIG_BLK_DEV_SL82C105 is not set
504# CONFIG_BLK_DEV_SLC90E66 is not set 504# CONFIG_BLK_DEV_SLC90E66 is not set
505# CONFIG_BLK_DEV_TRM290 is not set 505# CONFIG_BLK_DEV_TRM290 is not set
506# CONFIG_BLK_DEV_VIA82CXXX is not set 506# CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -646,7 +646,7 @@ CONFIG_SATA_SVW=y
646# CONFIG_PATA_SIL680 is not set 646# CONFIG_PATA_SIL680 is not set
647# CONFIG_PATA_SIS is not set 647# CONFIG_PATA_SIS is not set
648# CONFIG_PATA_VIA is not set 648# CONFIG_PATA_VIA is not set
649# CONFIG_PATA_WINBOND is not set 649CONFIG_PATA_WINBOND=y
650 650
651# 651#
652# Multi-device support (RAID and LVM) 652# Multi-device support (RAID and LVM)
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 32560876c3dc..0345a2ceec59 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.20-rc5 3# Linux kernel version: 2.6.20-rc6
4# Mon Jan 22 22:29:11 2007 4# Thu Jan 25 13:35:34 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -70,10 +70,10 @@ CONFIG_SYSVIPC=y
70CONFIG_SYSFS_DEPRECATED=y 70CONFIG_SYSFS_DEPRECATED=y
71# CONFIG_RELAY is not set 71# CONFIG_RELAY is not set
72CONFIG_INITRAMFS_SOURCE="" 72CONFIG_INITRAMFS_SOURCE=""
73# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 73CONFIG_CC_OPTIMIZE_FOR_SIZE=y
74CONFIG_SYSCTL=y 74CONFIG_SYSCTL=y
75CONFIG_EMBEDDED=y 75# CONFIG_EMBEDDED is not set
76# CONFIG_SYSCTL_SYSCALL is not set 76CONFIG_SYSCTL_SYSCALL=y
77CONFIG_KALLSYMS=y 77CONFIG_KALLSYMS=y
78CONFIG_KALLSYMS_ALL=y 78CONFIG_KALLSYMS_ALL=y
79CONFIG_KALLSYMS_EXTRA_PASS=y 79CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -160,9 +160,10 @@ CONFIG_SPU_BASE=y
160# PS3 Platform Options 160# PS3 Platform Options
161# 161#
162CONFIG_PS3_HTAB_SIZE=20 162CONFIG_PS3_HTAB_SIZE=20
163CONFIG_PS3_DYNAMIC_DMA=y 163# CONFIG_PS3_DYNAMIC_DMA is not set
164CONFIG_PS3_USE_LPAR_ADDR=y 164CONFIG_PS3_USE_LPAR_ADDR=y
165CONFIG_PS3_VUART=y 165CONFIG_PS3_VUART=y
166CONFIG_PS3_PS3AV=y
166 167
167# 168#
168# Kernel options 169# Kernel options
@@ -207,7 +208,7 @@ CONFIG_PPC_64K_PAGES=y
207# CONFIG_SCHED_SMT is not set 208# CONFIG_SCHED_SMT is not set
208CONFIG_PROC_DEVICETREE=y 209CONFIG_PROC_DEVICETREE=y
209CONFIG_CMDLINE_BOOL=y 210CONFIG_CMDLINE_BOOL=y
210CONFIG_CMDLINE="root=/dev/nfs rw ip=dhcp" 211CONFIG_CMDLINE="root=/dev/sda1 ip=dhcp"
211# CONFIG_PM is not set 212# CONFIG_PM is not set
212# CONFIG_SECCOMP is not set 213# CONFIG_SECCOMP is not set
213CONFIG_ISA_DMA_API=y 214CONFIG_ISA_DMA_API=y
@@ -240,7 +241,8 @@ CONFIG_NET=y
240# Networking options 241# Networking options
241# 242#
242# CONFIG_NETDEBUG is not set 243# CONFIG_NETDEBUG is not set
243# CONFIG_PACKET is not set 244CONFIG_PACKET=y
245CONFIG_PACKET_MMAP=y
244CONFIG_UNIX=y 246CONFIG_UNIX=y
245# CONFIG_NET_KEY is not set 247# CONFIG_NET_KEY is not set
246CONFIG_INET=y 248CONFIG_INET=y
@@ -353,6 +355,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
353# CONFIG_BLK_DEV_COW_COMMON is not set 355# CONFIG_BLK_DEV_COW_COMMON is not set
354# CONFIG_BLK_DEV_LOOP is not set 356# CONFIG_BLK_DEV_LOOP is not set
355# CONFIG_BLK_DEV_NBD is not set 357# CONFIG_BLK_DEV_NBD is not set
358# CONFIG_BLK_DEV_UB is not set
356# CONFIG_BLK_DEV_RAM is not set 359# CONFIG_BLK_DEV_RAM is not set
357# CONFIG_BLK_DEV_INITRD is not set 360# CONFIG_BLK_DEV_INITRD is not set
358# CONFIG_CDROM_PKTCDVD is not set 361# CONFIG_CDROM_PKTCDVD is not set
@@ -380,10 +383,11 @@ CONFIG_SCSI_PROC_FS=y
380# 383#
381# SCSI support type (disk, tape, CD-ROM) 384# SCSI support type (disk, tape, CD-ROM)
382# 385#
383# CONFIG_BLK_DEV_SD is not set 386CONFIG_BLK_DEV_SD=y
384# CONFIG_CHR_DEV_ST is not set 387# CONFIG_CHR_DEV_ST is not set
385# CONFIG_CHR_DEV_OSST is not set 388# CONFIG_CHR_DEV_OSST is not set
386# CONFIG_BLK_DEV_SR is not set 389CONFIG_BLK_DEV_SR=y
390# CONFIG_BLK_DEV_SR_VENDOR is not set
387# CONFIG_CHR_DEV_SG is not set 391# CONFIG_CHR_DEV_SG is not set
388# CONFIG_CHR_DEV_SCH is not set 392# CONFIG_CHR_DEV_SCH is not set
389 393
@@ -456,6 +460,7 @@ CONFIG_NETDEVICES=y
456# Ethernet (10 or 100Mbit) 460# Ethernet (10 or 100Mbit)
457# 461#
458# CONFIG_NET_ETHERNET is not set 462# CONFIG_NET_ETHERNET is not set
463CONFIG_MII=y
459 464
460# 465#
461# Ethernet (1000 Mbit) 466# Ethernet (1000 Mbit)
@@ -504,10 +509,13 @@ CONFIG_INPUT=y
504# 509#
505# Userland interfaces 510# Userland interfaces
506# 511#
507# CONFIG_INPUT_MOUSEDEV is not set 512CONFIG_INPUT_MOUSEDEV=y
513# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
514CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
515CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
508# CONFIG_INPUT_JOYDEV is not set 516# CONFIG_INPUT_JOYDEV is not set
509# CONFIG_INPUT_TSDEV is not set 517# CONFIG_INPUT_TSDEV is not set
510CONFIG_INPUT_EVDEV=y 518# CONFIG_INPUT_EVDEV is not set
511# CONFIG_INPUT_EVBUG is not set 519# CONFIG_INPUT_EVBUG is not set
512 520
513# 521#
@@ -598,19 +606,46 @@ CONFIG_GEN_RTC=y
598# Digital Video Broadcasting Devices 606# Digital Video Broadcasting Devices
599# 607#
600# CONFIG_DVB is not set 608# CONFIG_DVB is not set
609# CONFIG_USB_DABUSB is not set
601 610
602# 611#
603# Graphics support 612# Graphics support
604# 613#
605# CONFIG_FIRMWARE_EDID is not set 614# CONFIG_FIRMWARE_EDID is not set
606# CONFIG_FB is not set 615CONFIG_FB=y
616CONFIG_FB_CFB_FILLRECT=y
617CONFIG_FB_CFB_COPYAREA=y
618CONFIG_FB_CFB_IMAGEBLIT=y
619# CONFIG_FB_MACMODES is not set
620# CONFIG_FB_BACKLIGHT is not set
621# CONFIG_FB_MODE_HELPERS is not set
622# CONFIG_FB_TILEBLITTING is not set
623# CONFIG_FB_OF is not set
624# CONFIG_FB_VGA16 is not set
625# CONFIG_FB_S1D13XXX is not set
607# CONFIG_FB_IBM_GXT4500 is not set 626# CONFIG_FB_IBM_GXT4500 is not set
627CONFIG_FB_PS3=y
628CONFIG_FB_PS3_DEFAULT_SIZE_M=18
629# CONFIG_FB_VIRTUAL is not set
608 630
609# 631#
610# Console display driver support 632# Console display driver support
611# 633#
612# CONFIG_VGA_CONSOLE is not set 634# CONFIG_VGA_CONSOLE is not set
613CONFIG_DUMMY_CONSOLE=y 635CONFIG_DUMMY_CONSOLE=y
636CONFIG_FRAMEBUFFER_CONSOLE=y
637# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
638# CONFIG_FONTS is not set
639CONFIG_FONT_8x8=y
640CONFIG_FONT_8x16=y
641
642#
643# Logo configuration
644#
645CONFIG_LOGO=y
646# CONFIG_LOGO_LINUX_MONO is not set
647# CONFIG_LOGO_LINUX_VGA16 is not set
648CONFIG_LOGO_LINUX_CLUT224=y
614# CONFIG_BACKLIGHT_LCD_SUPPORT is not set 649# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
615 650
616# 651#
@@ -626,15 +661,142 @@ CONFIG_HID=y
626# 661#
627# USB support 662# USB support
628# 663#
629# CONFIG_USB_ARCH_HAS_HCD is not set 664CONFIG_USB_ARCH_HAS_HCD=y
630# CONFIG_USB_ARCH_HAS_OHCI is not set 665CONFIG_USB_ARCH_HAS_OHCI=y
631# CONFIG_USB_ARCH_HAS_EHCI is not set 666CONFIG_USB_ARCH_HAS_EHCI=y
667CONFIG_USB=y
668CONFIG_USB_DEBUG=y
669
670#
671# Miscellaneous USB options
672#
673# CONFIG_USB_DEVICEFS is not set
674# CONFIG_USB_BANDWIDTH is not set
675# CONFIG_USB_DYNAMIC_MINORS is not set
676# CONFIG_USB_OTG is not set
677
678#
679# USB Host Controller Drivers
680#
681CONFIG_USB_EHCI_HCD=y
682# CONFIG_USB_EHCI_SPLIT_ISO is not set
683# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
684# CONFIG_USB_EHCI_TT_NEWSCHED is not set
685CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
686# CONFIG_USB_ISP116X_HCD is not set
687CONFIG_USB_OHCI_HCD=y
688# CONFIG_USB_OHCI_HCD_PPC_OF is not set
689# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
690CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
691CONFIG_USB_OHCI_LITTLE_ENDIAN=y
692# CONFIG_USB_SL811_HCD is not set
693
694#
695# USB Device Class drivers
696#
697# CONFIG_USB_ACM is not set
698# CONFIG_USB_PRINTER is not set
632 699
633# 700#
634# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 701# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
635# 702#
636 703
637# 704#
705# may also be needed; see USB_STORAGE Help for more information
706#
707CONFIG_USB_STORAGE=y
708# CONFIG_USB_STORAGE_DEBUG is not set
709# CONFIG_USB_STORAGE_DATAFAB is not set
710# CONFIG_USB_STORAGE_FREECOM is not set
711# CONFIG_USB_STORAGE_DPCM is not set
712# CONFIG_USB_STORAGE_USBAT is not set
713# CONFIG_USB_STORAGE_SDDR09 is not set
714# CONFIG_USB_STORAGE_SDDR55 is not set
715# CONFIG_USB_STORAGE_JUMPSHOT is not set
716# CONFIG_USB_STORAGE_ALAUDA is not set
717# CONFIG_USB_STORAGE_KARMA is not set
718# CONFIG_USB_LIBUSUAL is not set
719
720#
721# USB Input Devices
722#
723CONFIG_USB_HID=y
724# CONFIG_USB_HIDINPUT_POWERBOOK is not set
725# CONFIG_HID_FF is not set
726# CONFIG_USB_HIDDEV is not set
727# CONFIG_USB_AIPTEK is not set
728# CONFIG_USB_WACOM is not set
729# CONFIG_USB_ACECAD is not set
730# CONFIG_USB_KBTAB is not set
731# CONFIG_USB_POWERMATE is not set
732# CONFIG_USB_TOUCHSCREEN is not set
733# CONFIG_USB_YEALINK is not set
734# CONFIG_USB_XPAD is not set
735# CONFIG_USB_ATI_REMOTE is not set
736# CONFIG_USB_ATI_REMOTE2 is not set
737# CONFIG_USB_KEYSPAN_REMOTE is not set
738# CONFIG_USB_APPLETOUCH is not set
739
740#
741# USB Imaging devices
742#
743# CONFIG_USB_MDC800 is not set
744# CONFIG_USB_MICROTEK is not set
745
746#
747# USB Network Adapters
748#
749# CONFIG_USB_CATC is not set
750# CONFIG_USB_KAWETH is not set
751# CONFIG_USB_PEGASUS is not set
752# CONFIG_USB_RTL8150 is not set
753CONFIG_USB_USBNET_MII=y
754CONFIG_USB_USBNET=y
755CONFIG_USB_NET_CDCETHER=y
756# CONFIG_USB_NET_GL620A is not set
757# CONFIG_USB_NET_NET1080 is not set
758# CONFIG_USB_NET_PLUSB is not set
759CONFIG_USB_NET_MCS7830=y
760# CONFIG_USB_NET_RNDIS_HOST is not set
761# CONFIG_USB_NET_CDC_SUBSET is not set
762# CONFIG_USB_NET_ZAURUS is not set
763CONFIG_USB_MON=y
764
765#
766# USB port drivers
767#
768
769#
770# USB Serial Converter support
771#
772# CONFIG_USB_SERIAL is not set
773
774#
775# USB Miscellaneous drivers
776#
777# CONFIG_USB_EMI62 is not set
778# CONFIG_USB_EMI26 is not set
779# CONFIG_USB_ADUTUX is not set
780# CONFIG_USB_AUERSWALD is not set
781# CONFIG_USB_RIO500 is not set
782# CONFIG_USB_LEGOTOWER is not set
783# CONFIG_USB_LCD is not set
784# CONFIG_USB_LED is not set
785# CONFIG_USB_CYPRESS_CY7C63 is not set
786# CONFIG_USB_CYTHERM is not set
787# CONFIG_USB_PHIDGET is not set
788# CONFIG_USB_IDMOUSE is not set
789# CONFIG_USB_FTDI_ELAN is not set
790# CONFIG_USB_APPLEDISPLAY is not set
791# CONFIG_USB_SISUSBVGA is not set
792# CONFIG_USB_LD is not set
793# CONFIG_USB_TRANCEVIBRATOR is not set
794
795#
796# USB DSL modem support
797#
798
799#
638# USB Gadget Support 800# USB Gadget Support
639# 801#
640# CONFIG_USB_GADGET is not set 802# CONFIG_USB_GADGET is not set
@@ -691,8 +853,14 @@ CONFIG_HID=y
691# File systems 853# File systems
692# 854#
693# CONFIG_EXT2_FS is not set 855# CONFIG_EXT2_FS is not set
694# CONFIG_EXT3_FS is not set 856CONFIG_EXT3_FS=y
857CONFIG_EXT3_FS_XATTR=y
858# CONFIG_EXT3_FS_POSIX_ACL is not set
859# CONFIG_EXT3_FS_SECURITY is not set
695# CONFIG_EXT4DEV_FS is not set 860# CONFIG_EXT4DEV_FS is not set
861CONFIG_JBD=y
862# CONFIG_JBD_DEBUG is not set
863CONFIG_FS_MBCACHE=y
696# CONFIG_REISERFS_FS is not set 864# CONFIG_REISERFS_FS is not set
697# CONFIG_JFS_FS is not set 865# CONFIG_JFS_FS is not set
698# CONFIG_FS_POSIX_ACL is not set 866# CONFIG_FS_POSIX_ACL is not set
@@ -712,14 +880,20 @@ CONFIG_DNOTIFY=y
712# 880#
713# CD-ROM/DVD Filesystems 881# CD-ROM/DVD Filesystems
714# 882#
715# CONFIG_ISO9660_FS is not set 883CONFIG_ISO9660_FS=y
716# CONFIG_UDF_FS is not set 884CONFIG_JOLIET=y
885# CONFIG_ZISOFS is not set
886CONFIG_UDF_FS=y
887CONFIG_UDF_NLS=y
717 888
718# 889#
719# DOS/FAT/NT Filesystems 890# DOS/FAT/NT Filesystems
720# 891#
892CONFIG_FAT_FS=y
721# CONFIG_MSDOS_FS is not set 893# CONFIG_MSDOS_FS is not set
722# CONFIG_VFAT_FS is not set 894CONFIG_VFAT_FS=y
895CONFIG_FAT_DEFAULT_CODEPAGE=437
896CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
723# CONFIG_NTFS_FS is not set 897# CONFIG_NTFS_FS is not set
724 898
725# 899#
@@ -785,7 +959,46 @@ CONFIG_MSDOS_PARTITION=y
785# 959#
786# Native Language Support 960# Native Language Support
787# 961#
788# CONFIG_NLS is not set 962CONFIG_NLS=y
963CONFIG_NLS_DEFAULT="iso8859-1"
964CONFIG_NLS_CODEPAGE_437=y
965# CONFIG_NLS_CODEPAGE_737 is not set
966# CONFIG_NLS_CODEPAGE_775 is not set
967# CONFIG_NLS_CODEPAGE_850 is not set
968# CONFIG_NLS_CODEPAGE_852 is not set
969# CONFIG_NLS_CODEPAGE_855 is not set
970# CONFIG_NLS_CODEPAGE_857 is not set
971# CONFIG_NLS_CODEPAGE_860 is not set
972# CONFIG_NLS_CODEPAGE_861 is not set
973# CONFIG_NLS_CODEPAGE_862 is not set
974# CONFIG_NLS_CODEPAGE_863 is not set
975# CONFIG_NLS_CODEPAGE_864 is not set
976# CONFIG_NLS_CODEPAGE_865 is not set
977# CONFIG_NLS_CODEPAGE_866 is not set
978# CONFIG_NLS_CODEPAGE_869 is not set
979# CONFIG_NLS_CODEPAGE_936 is not set
980# CONFIG_NLS_CODEPAGE_950 is not set
981# CONFIG_NLS_CODEPAGE_932 is not set
982# CONFIG_NLS_CODEPAGE_949 is not set
983# CONFIG_NLS_CODEPAGE_874 is not set
984# CONFIG_NLS_ISO8859_8 is not set
985# CONFIG_NLS_CODEPAGE_1250 is not set
986# CONFIG_NLS_CODEPAGE_1251 is not set
987# CONFIG_NLS_ASCII is not set
988CONFIG_NLS_ISO8859_1=y
989# CONFIG_NLS_ISO8859_2 is not set
990# CONFIG_NLS_ISO8859_3 is not set
991# CONFIG_NLS_ISO8859_4 is not set
992# CONFIG_NLS_ISO8859_5 is not set
993# CONFIG_NLS_ISO8859_6 is not set
994# CONFIG_NLS_ISO8859_7 is not set
995# CONFIG_NLS_ISO8859_9 is not set
996# CONFIG_NLS_ISO8859_13 is not set
997# CONFIG_NLS_ISO8859_14 is not set
998# CONFIG_NLS_ISO8859_15 is not set
999# CONFIG_NLS_KOI8_R is not set
1000# CONFIG_NLS_KOI8_U is not set
1001# CONFIG_NLS_UTF8 is not set
789 1002
790# 1003#
791# Distributed Lock Manager 1004# Distributed Lock Manager
@@ -795,9 +1008,10 @@ CONFIG_MSDOS_PARTITION=y
795# 1008#
796# Library routines 1009# Library routines
797# 1010#
1011CONFIG_BITREVERSE=y
798# CONFIG_CRC_CCITT is not set 1012# CONFIG_CRC_CCITT is not set
799# CONFIG_CRC16 is not set 1013# CONFIG_CRC16 is not set
800# CONFIG_CRC32 is not set 1014CONFIG_CRC32=y
801# CONFIG_LIBCRC32C is not set 1015# CONFIG_LIBCRC32C is not set
802CONFIG_PLIST=y 1016CONFIG_PLIST=y
803CONFIG_IOMAP_COPY=y 1017CONFIG_IOMAP_COPY=y
@@ -821,22 +1035,23 @@ CONFIG_DEBUG_KERNEL=y
821CONFIG_LOG_BUF_SHIFT=17 1035CONFIG_LOG_BUF_SHIFT=17
822CONFIG_DETECT_SOFTLOCKUP=y 1036CONFIG_DETECT_SOFTLOCKUP=y
823# CONFIG_SCHEDSTATS is not set 1037# CONFIG_SCHEDSTATS is not set
824# CONFIG_DEBUG_SLAB is not set 1038CONFIG_DEBUG_SLAB=y
1039# CONFIG_DEBUG_SLAB_LEAK is not set
825# CONFIG_DEBUG_RT_MUTEXES is not set 1040# CONFIG_DEBUG_RT_MUTEXES is not set
826# CONFIG_RT_MUTEX_TESTER is not set 1041# CONFIG_RT_MUTEX_TESTER is not set
827CONFIG_DEBUG_SPINLOCK=y 1042CONFIG_DEBUG_SPINLOCK=y
828# CONFIG_DEBUG_MUTEXES is not set 1043CONFIG_DEBUG_MUTEXES=y
829# CONFIG_DEBUG_RWSEMS is not set 1044CONFIG_DEBUG_RWSEMS=y
830CONFIG_DEBUG_SPINLOCK_SLEEP=y 1045CONFIG_DEBUG_SPINLOCK_SLEEP=y
831# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1046# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
832# CONFIG_DEBUG_KOBJECT is not set 1047# CONFIG_DEBUG_KOBJECT is not set
833# CONFIG_DEBUG_BUGVERBOSE is not set 1048CONFIG_DEBUG_BUGVERBOSE=y
834CONFIG_DEBUG_INFO=y 1049CONFIG_DEBUG_INFO=y
835# CONFIG_DEBUG_VM is not set 1050# CONFIG_DEBUG_VM is not set
836CONFIG_DEBUG_LIST=y 1051CONFIG_DEBUG_LIST=y
837CONFIG_FORCED_INLINING=y 1052CONFIG_FORCED_INLINING=y
838# CONFIG_RCU_TORTURE_TEST is not set 1053# CONFIG_RCU_TORTURE_TEST is not set
839# CONFIG_DEBUG_STACKOVERFLOW is not set 1054CONFIG_DEBUG_STACKOVERFLOW=y
840# CONFIG_DEBUG_STACK_USAGE is not set 1055# CONFIG_DEBUG_STACK_USAGE is not set
841# CONFIG_DEBUGGER is not set 1056# CONFIG_DEBUGGER is not set
842CONFIG_IRQSTACKS=y 1057CONFIG_IRQSTACKS=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 1c794fe718fd..6e96e50c362d 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -483,7 +483,7 @@ CONFIG_BLK_DEV_AMD74XX=y
483# CONFIG_BLK_DEV_PDC202XX_NEW is not set 483# CONFIG_BLK_DEV_PDC202XX_NEW is not set
484# CONFIG_BLK_DEV_SVWKS is not set 484# CONFIG_BLK_DEV_SVWKS is not set
485# CONFIG_BLK_DEV_SIIMAGE is not set 485# CONFIG_BLK_DEV_SIIMAGE is not set
486CONFIG_BLK_DEV_SL82C105=y 486# CONFIG_BLK_DEV_SL82C105 is not set
487# CONFIG_BLK_DEV_SLC90E66 is not set 487# CONFIG_BLK_DEV_SLC90E66 is not set
488# CONFIG_BLK_DEV_TRM290 is not set 488# CONFIG_BLK_DEV_TRM290 is not set
489# CONFIG_BLK_DEV_VIA82CXXX is not set 489# CONFIG_BLK_DEV_VIA82CXXX is not set
@@ -628,7 +628,7 @@ CONFIG_ATA=y
628# CONFIG_PATA_SIL680 is not set 628# CONFIG_PATA_SIL680 is not set
629# CONFIG_PATA_SIS is not set 629# CONFIG_PATA_SIS is not set
630# CONFIG_PATA_VIA is not set 630# CONFIG_PATA_VIA is not set
631# CONFIG_PATA_WINBOND is not set 631CONFIG_PATA_WINBOND=y
632 632
633# 633#
634# Multi-device support (RAID and LVM) 634# Multi-device support (RAID and LVM)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index d2ded19e4064..8120d428ebfd 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -17,6 +17,7 @@ obj-y += vdso32/
17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
18 signal_64.o ptrace32.o \ 18 signal_64.o ptrace32.o \
19 paca.o cpu_setup_ppc970.o \ 19 paca.o cpu_setup_ppc970.o \
20 cpu_setup_pa6t.o \
20 firmware.o sysfs.o nvram_64.o 21 firmware.o sysfs.o nvram_64.o
21obj-$(CONFIG_PPC64) += vdso64/ 22obj-$(CONFIG_PPC64) += vdso64/
22obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 23obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 93f21aaf7c8e..3678997339d6 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -18,6 +18,7 @@
18#include <asm/io.h> 18#include <asm/io.h>
19#include <asm/lmb.h> 19#include <asm/lmb.h>
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <asm/udbg.h>
21 22
22#define NO_SCROLL 23#define NO_SCROLL
23 24
@@ -912,3 +913,11 @@ static unsigned char vga_font[cmapsz] = {
9120x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9130x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9130x00, 0x00, 0x00, 0x00, 9140x00, 0x00, 0x00, 0x00,
914}; 915};
916
917void __init udbg_init_btext(void)
918{
919 /* If btext is enabled, we might have a BAT setup for early display,
920 * thus we do enable some very basic udbg output
921 */
922 udbg_putc = btext_drawchar;
923}
diff --git a/arch/powerpc/kernel/cpu_setup_pa6t.S b/arch/powerpc/kernel/cpu_setup_pa6t.S
new file mode 100644
index 000000000000..4047be25c4d2
--- /dev/null
+++ b/arch/powerpc/kernel/cpu_setup_pa6t.S
@@ -0,0 +1,44 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#include <asm/processor.h>
22#include <asm/page.h>
23#include <asm/cputable.h>
24#include <asm/ppc_asm.h>
25#include <asm/asm-offsets.h>
26#include <asm/cache.h>
27
28/* Right now, restore and setup are the same thing */
29_GLOBAL(__restore_cpu_pa6t)
30_GLOBAL(__setup_cpu_pa6t)
31 /* Do nothing if not running in HV mode */
32 mfmsr r0
33 rldicl. r0,r0,4,63
34 beqlr
35
36 mfspr r0,SPRN_HID5
37 ori r0,r0,0x30
38 mtspr SPRN_HID5,r0
39
40 mfspr r0,SPRN_LPCR
41 ori r0,r0,0x7000
42 mtspr SPRN_LPCR,r0
43
44 blr
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index b742013bb9da..7ec4ac77c0fa 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -43,6 +43,8 @@ extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
43#ifdef CONFIG_PPC64 43#ifdef CONFIG_PPC64
44extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); 44extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
45extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec); 45extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
46extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
47extern void __restore_cpu_pa6t(void);
46extern void __restore_cpu_ppc970(void); 48extern void __restore_cpu_ppc970(void);
47#endif /* CONFIG_PPC64 */ 49#endif /* CONFIG_PPC64 */
48 50
@@ -86,6 +88,7 @@ static struct cpu_spec cpu_specs[] = {
86 .icache_bsize = 128, 88 .icache_bsize = 128,
87 .dcache_bsize = 128, 89 .dcache_bsize = 128,
88 .num_pmcs = 8, 90 .num_pmcs = 8,
91 .pmc_type = PPC_PMC_IBM,
89 .oprofile_cpu_type = "ppc64/power3", 92 .oprofile_cpu_type = "ppc64/power3",
90 .oprofile_type = PPC_OPROFILE_RS64, 93 .oprofile_type = PPC_OPROFILE_RS64,
91 .platform = "power3", 94 .platform = "power3",
@@ -99,6 +102,7 @@ static struct cpu_spec cpu_specs[] = {
99 .icache_bsize = 128, 102 .icache_bsize = 128,
100 .dcache_bsize = 128, 103 .dcache_bsize = 128,
101 .num_pmcs = 8, 104 .num_pmcs = 8,
105 .pmc_type = PPC_PMC_IBM,
102 .oprofile_cpu_type = "ppc64/power3", 106 .oprofile_cpu_type = "ppc64/power3",
103 .oprofile_type = PPC_OPROFILE_RS64, 107 .oprofile_type = PPC_OPROFILE_RS64,
104 .platform = "power3", 108 .platform = "power3",
@@ -112,6 +116,7 @@ static struct cpu_spec cpu_specs[] = {
112 .icache_bsize = 128, 116 .icache_bsize = 128,
113 .dcache_bsize = 128, 117 .dcache_bsize = 128,
114 .num_pmcs = 8, 118 .num_pmcs = 8,
119 .pmc_type = PPC_PMC_IBM,
115 .oprofile_cpu_type = "ppc64/rs64", 120 .oprofile_cpu_type = "ppc64/rs64",
116 .oprofile_type = PPC_OPROFILE_RS64, 121 .oprofile_type = PPC_OPROFILE_RS64,
117 .platform = "rs64", 122 .platform = "rs64",
@@ -125,6 +130,7 @@ static struct cpu_spec cpu_specs[] = {
125 .icache_bsize = 128, 130 .icache_bsize = 128,
126 .dcache_bsize = 128, 131 .dcache_bsize = 128,
127 .num_pmcs = 8, 132 .num_pmcs = 8,
133 .pmc_type = PPC_PMC_IBM,
128 .oprofile_cpu_type = "ppc64/rs64", 134 .oprofile_cpu_type = "ppc64/rs64",
129 .oprofile_type = PPC_OPROFILE_RS64, 135 .oprofile_type = PPC_OPROFILE_RS64,
130 .platform = "rs64", 136 .platform = "rs64",
@@ -138,6 +144,7 @@ static struct cpu_spec cpu_specs[] = {
138 .icache_bsize = 128, 144 .icache_bsize = 128,
139 .dcache_bsize = 128, 145 .dcache_bsize = 128,
140 .num_pmcs = 8, 146 .num_pmcs = 8,
147 .pmc_type = PPC_PMC_IBM,
141 .oprofile_cpu_type = "ppc64/rs64", 148 .oprofile_cpu_type = "ppc64/rs64",
142 .oprofile_type = PPC_OPROFILE_RS64, 149 .oprofile_type = PPC_OPROFILE_RS64,
143 .platform = "rs64", 150 .platform = "rs64",
@@ -151,6 +158,7 @@ static struct cpu_spec cpu_specs[] = {
151 .icache_bsize = 128, 158 .icache_bsize = 128,
152 .dcache_bsize = 128, 159 .dcache_bsize = 128,
153 .num_pmcs = 8, 160 .num_pmcs = 8,
161 .pmc_type = PPC_PMC_IBM,
154 .oprofile_cpu_type = "ppc64/rs64", 162 .oprofile_cpu_type = "ppc64/rs64",
155 .oprofile_type = PPC_OPROFILE_RS64, 163 .oprofile_type = PPC_OPROFILE_RS64,
156 .platform = "rs64", 164 .platform = "rs64",
@@ -164,6 +172,7 @@ static struct cpu_spec cpu_specs[] = {
164 .icache_bsize = 128, 172 .icache_bsize = 128,
165 .dcache_bsize = 128, 173 .dcache_bsize = 128,
166 .num_pmcs = 8, 174 .num_pmcs = 8,
175 .pmc_type = PPC_PMC_IBM,
167 .oprofile_cpu_type = "ppc64/power4", 176 .oprofile_cpu_type = "ppc64/power4",
168 .oprofile_type = PPC_OPROFILE_POWER4, 177 .oprofile_type = PPC_OPROFILE_POWER4,
169 .platform = "power4", 178 .platform = "power4",
@@ -177,6 +186,7 @@ static struct cpu_spec cpu_specs[] = {
177 .icache_bsize = 128, 186 .icache_bsize = 128,
178 .dcache_bsize = 128, 187 .dcache_bsize = 128,
179 .num_pmcs = 8, 188 .num_pmcs = 8,
189 .pmc_type = PPC_PMC_IBM,
180 .oprofile_cpu_type = "ppc64/power4", 190 .oprofile_cpu_type = "ppc64/power4",
181 .oprofile_type = PPC_OPROFILE_POWER4, 191 .oprofile_type = PPC_OPROFILE_POWER4,
182 .platform = "power4", 192 .platform = "power4",
@@ -191,6 +201,7 @@ static struct cpu_spec cpu_specs[] = {
191 .icache_bsize = 128, 201 .icache_bsize = 128,
192 .dcache_bsize = 128, 202 .dcache_bsize = 128,
193 .num_pmcs = 8, 203 .num_pmcs = 8,
204 .pmc_type = PPC_PMC_IBM,
194 .cpu_setup = __setup_cpu_ppc970, 205 .cpu_setup = __setup_cpu_ppc970,
195 .cpu_restore = __restore_cpu_ppc970, 206 .cpu_restore = __restore_cpu_ppc970,
196 .oprofile_cpu_type = "ppc64/970", 207 .oprofile_cpu_type = "ppc64/970",
@@ -207,6 +218,7 @@ static struct cpu_spec cpu_specs[] = {
207 .icache_bsize = 128, 218 .icache_bsize = 128,
208 .dcache_bsize = 128, 219 .dcache_bsize = 128,
209 .num_pmcs = 8, 220 .num_pmcs = 8,
221 .pmc_type = PPC_PMC_IBM,
210 .cpu_setup = __setup_cpu_ppc970, 222 .cpu_setup = __setup_cpu_ppc970,
211 .cpu_restore = __restore_cpu_ppc970, 223 .cpu_restore = __restore_cpu_ppc970,
212 .oprofile_cpu_type = "ppc64/970", 224 .oprofile_cpu_type = "ppc64/970",
@@ -239,6 +251,7 @@ static struct cpu_spec cpu_specs[] = {
239 .icache_bsize = 128, 251 .icache_bsize = 128,
240 .dcache_bsize = 128, 252 .dcache_bsize = 128,
241 .num_pmcs = 8, 253 .num_pmcs = 8,
254 .pmc_type = PPC_PMC_IBM,
242 .cpu_setup = __setup_cpu_ppc970, 255 .cpu_setup = __setup_cpu_ppc970,
243 .oprofile_cpu_type = "ppc64/970", 256 .oprofile_cpu_type = "ppc64/970",
244 .oprofile_type = PPC_OPROFILE_POWER4, 257 .oprofile_type = PPC_OPROFILE_POWER4,
@@ -253,6 +266,7 @@ static struct cpu_spec cpu_specs[] = {
253 .icache_bsize = 128, 266 .icache_bsize = 128,
254 .dcache_bsize = 128, 267 .dcache_bsize = 128,
255 .num_pmcs = 6, 268 .num_pmcs = 6,
269 .pmc_type = PPC_PMC_IBM,
256 .oprofile_cpu_type = "ppc64/power5", 270 .oprofile_cpu_type = "ppc64/power5",
257 .oprofile_type = PPC_OPROFILE_POWER4, 271 .oprofile_type = PPC_OPROFILE_POWER4,
258 /* SIHV / SIPR bits are implemented on POWER4+ (GQ) 272 /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
@@ -271,6 +285,7 @@ static struct cpu_spec cpu_specs[] = {
271 .icache_bsize = 128, 285 .icache_bsize = 128,
272 .dcache_bsize = 128, 286 .dcache_bsize = 128,
273 .num_pmcs = 6, 287 .num_pmcs = 6,
288 .pmc_type = PPC_PMC_IBM,
274 .oprofile_cpu_type = "ppc64/power5+", 289 .oprofile_cpu_type = "ppc64/power5+",
275 .oprofile_type = PPC_OPROFILE_POWER4, 290 .oprofile_type = PPC_OPROFILE_POWER4,
276 .oprofile_mmcra_sihv = MMCRA_SIHV, 291 .oprofile_mmcra_sihv = MMCRA_SIHV,
@@ -321,6 +336,7 @@ static struct cpu_spec cpu_specs[] = {
321 .icache_bsize = 128, 336 .icache_bsize = 128,
322 .dcache_bsize = 128, 337 .dcache_bsize = 128,
323 .num_pmcs = 6, 338 .num_pmcs = 6,
339 .pmc_type = PPC_PMC_IBM,
324 .oprofile_cpu_type = "ppc64/power6", 340 .oprofile_cpu_type = "ppc64/power6",
325 .oprofile_type = PPC_OPROFILE_POWER4, 341 .oprofile_type = PPC_OPROFILE_POWER4,
326 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV, 342 .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
@@ -340,6 +356,7 @@ static struct cpu_spec cpu_specs[] = {
340 .icache_bsize = 128, 356 .icache_bsize = 128,
341 .dcache_bsize = 128, 357 .dcache_bsize = 128,
342 .num_pmcs = 4, 358 .num_pmcs = 4,
359 .pmc_type = PPC_PMC_IBM,
343 .oprofile_cpu_type = "ppc64/cell-be", 360 .oprofile_cpu_type = "ppc64/cell-be",
344 .oprofile_type = PPC_OPROFILE_CELL, 361 .oprofile_type = PPC_OPROFILE_CELL,
345 .platform = "ppc-cell-be", 362 .platform = "ppc-cell-be",
@@ -353,6 +370,9 @@ static struct cpu_spec cpu_specs[] = {
353 .icache_bsize = 64, 370 .icache_bsize = 64,
354 .dcache_bsize = 64, 371 .dcache_bsize = 64,
355 .num_pmcs = 6, 372 .num_pmcs = 6,
373 .pmc_type = PPC_PMC_PA6T,
374 .cpu_setup = __setup_cpu_pa6t,
375 .cpu_restore = __restore_cpu_pa6t,
356 .platform = "pa6t", 376 .platform = "pa6t",
357 }, 377 },
358 { /* default match */ 378 { /* default match */
@@ -364,6 +384,7 @@ static struct cpu_spec cpu_specs[] = {
364 .icache_bsize = 128, 384 .icache_bsize = 128,
365 .dcache_bsize = 128, 385 .dcache_bsize = 128,
366 .num_pmcs = 6, 386 .num_pmcs = 6,
387 .pmc_type = PPC_PMC_IBM,
367 .platform = "power4", 388 .platform = "power4",
368 } 389 }
369#endif /* CONFIG_PPC64 */ 390#endif /* CONFIG_PPC64 */
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2551c0884afc..2b66d53dcc55 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -172,13 +172,18 @@ syscall_error_cont:
172 stdcx. r0,0,r1 /* to clear the reservation */ 172 stdcx. r0,0,r1 /* to clear the reservation */
173 andi. r6,r8,MSR_PR 173 andi. r6,r8,MSR_PR
174 ld r4,_LINK(r1) 174 ld r4,_LINK(r1)
175 /*
176 * Clear RI before restoring r13. If we are returning to
177 * userspace and we take an exception after restoring r13,
178 * we end up corrupting the userspace r13 value.
179 */
180 li r12,MSR_RI
181 andc r11,r10,r12
182 mtmsrd r11,1 /* clear MSR.RI */
175 beq- 1f 183 beq- 1f
176 ACCOUNT_CPU_USER_EXIT(r11, r12) 184 ACCOUNT_CPU_USER_EXIT(r11, r12)
177 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */ 185 ld r13,GPR13(r1) /* only restore r13 if returning to usermode */
1781: ld r2,GPR2(r1) 1861: ld r2,GPR2(r1)
179 li r12,MSR_RI
180 andc r11,r10,r12
181 mtmsrd r11,1 /* clear MSR.RI */
182 ld r1,GPR1(r1) 187 ld r1,GPR1(r1)
183 mtlr r4 188 mtlr r4
184 mtcr r5 189 mtcr r5
@@ -488,42 +493,44 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
488#endif 493#endif
489 stb r5,PACASOFTIRQEN(r13) 494 stb r5,PACASOFTIRQEN(r13)
490 495
496 /* extract EE bit and use it to restore paca->hard_enabled */
491 ld r3,_MSR(r1) 497 ld r3,_MSR(r1)
498 rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
499 stb r4,PACAHARDIRQEN(r13)
500
501 ld r4,_CTR(r1)
502 ld r0,_LINK(r1)
503 mtctr r4
504 mtlr r0
505 ld r4,_XER(r1)
506 mtspr SPRN_XER,r4
507
508 REST_8GPRS(5, r1)
509
492 andi. r0,r3,MSR_RI 510 andi. r0,r3,MSR_RI
493 beq- unrecov_restore 511 beq- unrecov_restore
494 512
495 /* extract EE bit and use it to restore paca->hard_enabled */ 513 stdcx. r0,0,r1 /* to clear the reservation */
496 rldicl r4,r3,49,63 /* r0 = (r3 >> 15) & 1 */
497 stb r4,PACAHARDIRQEN(r13)
498 514
499 andi. r0,r3,MSR_PR 515 /*
516 * Clear RI before restoring r13. If we are returning to
517 * userspace and we take an exception after restoring r13,
518 * we end up corrupting the userspace r13 value.
519 */
520 mfmsr r4
521 andc r4,r4,r0 /* r0 contains MSR_RI here */
522 mtmsrd r4,1
500 523
501 /* 524 /*
502 * r13 is our per cpu area, only restore it if we are returning to 525 * r13 is our per cpu area, only restore it if we are returning to
503 * userspace 526 * userspace
504 */ 527 */
528 andi. r0,r3,MSR_PR
505 beq 1f 529 beq 1f
506 ACCOUNT_CPU_USER_EXIT(r3, r4) 530 ACCOUNT_CPU_USER_EXIT(r2, r4)
507 REST_GPR(13, r1) 531 REST_GPR(13, r1)
5081: 5321:
509 ld r3,_CTR(r1) 533 mtspr SPRN_SRR1,r3
510 ld r0,_LINK(r1)
511 mtctr r3
512 mtlr r0
513 ld r3,_XER(r1)
514 mtspr SPRN_XER,r3
515
516 REST_8GPRS(5, r1)
517
518 stdcx. r0,0,r1 /* to clear the reservation */
519
520 mfmsr r0
521 li r2, MSR_RI
522 andc r0,r0,r2
523 mtmsrd r0,1
524
525 ld r0,_MSR(r1)
526 mtspr SPRN_SRR1,r0
527 534
528 ld r2,_CCR(r1) 535 ld r2,_CCR(r1)
529 mtcrf 0xFF,r2 536 mtcrf 0xFF,r2
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 9417cf5b4b7e..c897203198b1 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -344,12 +344,7 @@ i##n: \
344/* System reset */ 344/* System reset */
345/* core99 pmac starts the seconary here by changing the vector, and 345/* core99 pmac starts the seconary here by changing the vector, and
346 putting it back to what it was (unknown_exception) when done. */ 346 putting it back to what it was (unknown_exception) when done. */
347#if defined(CONFIG_GEMINI) && defined(CONFIG_SMP)
348 . = 0x100
349 b __secondary_start_gemini
350#else
351 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) 347 EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD)
352#endif
353 348
354/* Machine check */ 349/* Machine check */
355/* 350/*
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index accb39d49911..a15d4b8cce48 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -32,8 +32,6 @@
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/mmu.h> 33#include <asm/mmu.h>
34#include <asm/pgtable.h> 34#include <asm/pgtable.h>
35#include <asm/ibm4xx.h>
36#include <asm/ibm44x.h>
37#include <asm/cputable.h> 35#include <asm/cputable.h>
38#include <asm/thread_info.h> 36#include <asm/thread_info.h>
39#include <asm/ppc_asm.h> 37#include <asm/ppc_asm.h>
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 71b1fe58e9e4..97cedcd6c9b4 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -613,7 +613,7 @@ system_call_pSeries:
613/*** pSeries interrupt support ***/ 613/*** pSeries interrupt support ***/
614 614
615 /* moved from 0xf00 */ 615 /* moved from 0xf00 */
616 MASKABLE_EXCEPTION_PSERIES(., performance_monitor) 616 STD_EXCEPTION_PSERIES(., performance_monitor)
617 617
618/* 618/*
619 * An interrupt came in while soft-disabled; clear EE in SRR1, 619 * An interrupt came in while soft-disabled; clear EE in SRR1,
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 66877bdfe0b7..1f155d399d57 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */
206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ 206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
207 mtspr SPRN_MAS0,r7 207 mtspr SPRN_MAS0,r7
208 tlbre 208 tlbre
209 li r6,0 209 mfspr r6,SPRN_MAS1
210 rlwinm r6,r6,0,2,0 /* clear IPROT */
210 mtspr SPRN_MAS1,r6 211 mtspr SPRN_MAS1,r6
211 tlbwe 212 tlbwe
212 /* Invalidate TLB1 */ 213 /* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */
248 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ 249 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
249 mtspr SPRN_MAS0,r7 250 mtspr SPRN_MAS0,r7
250 tlbre 251 tlbre
252 mfspr r8,SPRN_MAS1
253 rlwinm r8,r8,0,2,0 /* clear IPROT */
251 mtspr SPRN_MAS1,r8 254 mtspr SPRN_MAS1,r8
252 tlbwe 255 tlbwe
253 /* Invalidate TLB1 */ 256 /* Invalidate TLB1 */
@@ -889,7 +892,6 @@ load_up_spe:
889 REST_GPR(9, r11) 892 REST_GPR(9, r11)
890 REST_GPR(12, r11) 893 REST_GPR(12, r11)
891 lwz r11,GPR11(r11) 894 lwz r11,GPR11(r11)
892 SYNC
893 rfi 895 rfi
894 896
895/* 897/*
@@ -953,7 +955,6 @@ _GLOBAL(giveup_altivec)
953_GLOBAL(giveup_spe) 955_GLOBAL(giveup_spe)
954 mfmsr r5 956 mfmsr r5
955 oris r5,r5,MSR_SPE@h 957 oris r5,r5,MSR_SPE@h
956 SYNC
957 mtmsr r5 /* enable use of SPE now */ 958 mtmsr r5 /* enable use of SPE now */
958 isync 959 isync
959 cmpi 0,r3,0 960 cmpi 0,r3,0
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 8994af327b47..6e7f50967bab 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -110,17 +110,22 @@ static ctl_table powersave_nap_ctl_table[]={
110 .mode = 0644, 110 .mode = 0644,
111 .proc_handler = &proc_dointvec, 111 .proc_handler = &proc_dointvec,
112 }, 112 },
113 { 0, }, 113 {}
114}; 114};
115static ctl_table powersave_nap_sysctl_root[] = { 115static ctl_table powersave_nap_sysctl_root[] = {
116 { 1, "kernel", NULL, 0, 0755, powersave_nap_ctl_table, }, 116 {
117 { 0,}, 117 .ctl_name = CTL_KERN,
118 .procname = "kernel",
119 .mode = 0755,
120 .child = powersave_nap_ctl_table,
121 },
122 {}
118}; 123};
119 124
120static int __init 125static int __init
121register_powersave_nap_sysctl(void) 126register_powersave_nap_sysctl(void)
122{ 127{
123 register_sysctl_table(powersave_nap_sysctl_root, 0); 128 register_sysctl_table(powersave_nap_sysctl_root);
124 129
125 return 0; 130 return 0;
126} 131}
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index c68113371050..601ef79a5916 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -12,23 +12,23 @@
12 * Here comes the ppc64 implementation of the IOMAP 12 * Here comes the ppc64 implementation of the IOMAP
13 * interfaces. 13 * interfaces.
14 */ 14 */
15unsigned int fastcall ioread8(void __iomem *addr) 15unsigned int ioread8(void __iomem *addr)
16{ 16{
17 return readb(addr); 17 return readb(addr);
18} 18}
19unsigned int fastcall ioread16(void __iomem *addr) 19unsigned int ioread16(void __iomem *addr)
20{ 20{
21 return readw(addr); 21 return readw(addr);
22} 22}
23unsigned int fastcall ioread16be(void __iomem *addr) 23unsigned int ioread16be(void __iomem *addr)
24{ 24{
25 return in_be16(addr); 25 return in_be16(addr);
26} 26}
27unsigned int fastcall ioread32(void __iomem *addr) 27unsigned int ioread32(void __iomem *addr)
28{ 28{
29 return readl(addr); 29 return readl(addr);
30} 30}
31unsigned int fastcall ioread32be(void __iomem *addr) 31unsigned int ioread32be(void __iomem *addr)
32{ 32{
33 return in_be32(addr); 33 return in_be32(addr);
34} 34}
@@ -38,23 +38,23 @@ EXPORT_SYMBOL(ioread16be);
38EXPORT_SYMBOL(ioread32); 38EXPORT_SYMBOL(ioread32);
39EXPORT_SYMBOL(ioread32be); 39EXPORT_SYMBOL(ioread32be);
40 40
41void fastcall iowrite8(u8 val, void __iomem *addr) 41void iowrite8(u8 val, void __iomem *addr)
42{ 42{
43 writeb(val, addr); 43 writeb(val, addr);
44} 44}
45void fastcall iowrite16(u16 val, void __iomem *addr) 45void iowrite16(u16 val, void __iomem *addr)
46{ 46{
47 writew(val, addr); 47 writew(val, addr);
48} 48}
49void fastcall iowrite16be(u16 val, void __iomem *addr) 49void iowrite16be(u16 val, void __iomem *addr)
50{ 50{
51 out_be16(addr, val); 51 out_be16(addr, val);
52} 52}
53void fastcall iowrite32(u32 val, void __iomem *addr) 53void iowrite32(u32 val, void __iomem *addr)
54{ 54{
55 writel(val, addr); 55 writel(val, addr);
56} 56}
57void fastcall iowrite32be(u32 val, void __iomem *addr) 57void iowrite32be(u32 val, void __iomem *addr)
58{ 58{
59 out_be32(addr, val); 59 out_be32(addr, val);
60} 60}
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 0bd8c7665834..919fbf568495 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -281,10 +281,10 @@ void do_IRQ(struct pt_regs *regs)
281 281
282 /* 282 /*
283 * Every platform is required to implement ppc_md.get_irq. 283 * Every platform is required to implement ppc_md.get_irq.
284 * This function will either return an irq number or -1 to 284 * This function will either return an irq number or NO_IRQ to
285 * indicate there are no more pending. 285 * indicate there are no more pending.
286 * The value -2 is for buggy hardware and means that this IRQ 286 * The value NO_IRQ_IGNORE is for buggy hardware and means that this
287 * has already been handled. -- Tom 287 * IRQ has already been handled. -- Tom
288 */ 288 */
289 irq = ppc_md.get_irq(); 289 irq = ppc_md.get_irq();
290 290
@@ -604,6 +604,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
604 */ 604 */
605 virq = irq_find_mapping(host, hwirq); 605 virq = irq_find_mapping(host, hwirq);
606 if (virq != IRQ_NONE) { 606 if (virq != IRQ_NONE) {
607 if (host->ops->remap)
608 host->ops->remap(host, virq, hwirq);
607 pr_debug("irq: -> existing mapping on virq %d\n", virq); 609 pr_debug("irq: -> existing mapping on virq %d\n", virq);
608 return virq; 610 return virq;
609 } 611 }
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 4657563f8813..dd2886f97e98 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -46,8 +46,8 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
46 if ((unsigned long)p->addr & 0x03) { 46 if ((unsigned long)p->addr & 0x03) {
47 printk("Attempt to register kprobe at an unaligned address\n"); 47 printk("Attempt to register kprobe at an unaligned address\n");
48 ret = -EINVAL; 48 ret = -EINVAL;
49 } else if (IS_MTMSRD(insn) || IS_RFID(insn)) { 49 } else if (IS_MTMSRD(insn) || IS_RFID(insn) || IS_RFI(insn)) {
50 printk("Cannot register a kprobe on rfid or mtmsrd\n"); 50 printk("Cannot register a kprobe on rfi/rfid or mtmsr[d]\n");
51 ret = -EINVAL; 51 ret = -EINVAL;
52 } 52 }
53 53
@@ -483,8 +483,12 @@ int __kprobes setjmp_pre_handler(struct kprobe *p, struct pt_regs *regs)
483 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs)); 483 memcpy(&kcb->jprobe_saved_regs, regs, sizeof(struct pt_regs));
484 484
485 /* setup return addr to the jprobe handler routine */ 485 /* setup return addr to the jprobe handler routine */
486#ifdef CONFIG_PPC64
486 regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry); 487 regs->nip = (unsigned long)(((func_descr_t *)jp->entry)->entry);
487 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc); 488 regs->gpr[2] = (unsigned long)(((func_descr_t *)jp->entry)->toc);
489#else
490 regs->nip = (unsigned long)jp->entry;
491#endif
488 492
489 return 1; 493 return 1;
490} 494}
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 5e6ddfa474c0..325f490a10cc 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -124,6 +124,10 @@ static int __init add_legacy_soc_port(struct device_node *np,
124 if (get_property(np, "clock-frequency", NULL) == NULL) 124 if (get_property(np, "clock-frequency", NULL) == NULL)
125 return -1; 125 return -1;
126 126
127 /* if rtas uses this device, don't try to use it as well */
128 if (get_property(np, "used-by-rtas", NULL) != NULL)
129 return -1;
130
127 /* Get the address */ 131 /* Get the address */
128 addrp = of_get_address(soc_dev, 0, NULL, NULL); 132 addrp = of_get_address(soc_dev, 0, NULL, NULL);
129 if (addrp == NULL) 133 if (addrp == NULL)
@@ -334,6 +338,17 @@ void __init find_legacy_serial_ports(void)
334 of_node_put(tsi); 338 of_node_put(tsi);
335 } 339 }
336 340
341 /* First fill our array with opb bus ports */
342 for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16750")) != NULL;) {
343 struct device_node *opb = of_get_parent(np);
344 if (opb && !strcmp(opb->type, "opb")) {
345 index = add_legacy_soc_port(np, np);
346 if (index >= 0 && np == stdout)
347 legacy_serial_console = index;
348 }
349 of_node_put(opb);
350 }
351
337#ifdef CONFIG_PCI 352#ifdef CONFIG_PCI
338 /* Next, try to locate PCI ports */ 353 /* Next, try to locate PCI ports */
339 for (np = NULL; (np = of_find_all_nodes(np));) { 354 for (np = NULL; (np = of_find_all_nodes(np));) {
@@ -498,7 +513,7 @@ static int __init check_legacy_serial_console(void)
498 DBG(" -> check_legacy_serial_console()\n"); 513 DBG(" -> check_legacy_serial_console()\n");
499 514
500 /* The user has requested a console so this is already set up. */ 515 /* The user has requested a console so this is already set up. */
501 if (strstr(saved_command_line, "console=")) { 516 if (strstr(boot_command_line, "console=")) {
502 DBG(" console was specified !\n"); 517 DBG(" console was specified !\n");
503 return -EBUSY; 518 return -EBUSY;
504 } 519 }
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 41c05dcd68f4..89486b631284 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -439,6 +439,10 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
439 439
440 ssize_t retval = -ENOMEM; 440 ssize_t retval = -ENOMEM;
441 441
442 if (!firmware_has_feature(FW_FEATURE_SPLPAR) ||
443 firmware_has_feature(FW_FEATURE_ISERIES))
444 return -EINVAL;
445
442 kbuf = kmalloc(count, GFP_KERNEL); 446 kbuf = kmalloc(count, GFP_KERNEL);
443 if (!kbuf) 447 if (!kbuf)
444 goto out; 448 goto out;
@@ -517,7 +521,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
517static ssize_t lparcfg_write(struct file *file, const char __user * buf, 521static ssize_t lparcfg_write(struct file *file, const char __user * buf,
518 size_t count, loff_t * off) 522 size_t count, loff_t * off)
519{ 523{
520 return count; 524 return -EINVAL;
521} 525}
522 526
523#endif /* CONFIG_PPC_PSERIES */ 527#endif /* CONFIG_PPC_PSERIES */
@@ -567,9 +571,10 @@ static int lparcfg_open(struct inode *inode, struct file *file)
567 return single_open(file, lparcfg_data, NULL); 571 return single_open(file, lparcfg_data, NULL);
568} 572}
569 573
570struct file_operations lparcfg_fops = { 574const struct file_operations lparcfg_fops = {
571 .owner = THIS_MODULE, 575 .owner = THIS_MODULE,
572 .read = seq_read, 576 .read = seq_read,
577 .write = lparcfg_write,
573 .open = lparcfg_open, 578 .open = lparcfg_open,
574 .release = single_release, 579 .release = single_release,
575}; 580};
@@ -581,10 +586,8 @@ int __init lparcfg_init(void)
581 586
582 /* Allow writing if we have FW_FEATURE_SPLPAR */ 587 /* Allow writing if we have FW_FEATURE_SPLPAR */
583 if (firmware_has_feature(FW_FEATURE_SPLPAR) && 588 if (firmware_has_feature(FW_FEATURE_SPLPAR) &&
584 !firmware_has_feature(FW_FEATURE_ISERIES)) { 589 !firmware_has_feature(FW_FEATURE_ISERIES))
585 lparcfg_fops.write = lparcfg_write;
586 mode |= S_IWUSR; 590 mode |= S_IWUSR;
587 }
588 591
589 ent = create_proc_entry("ppc64/lparcfg", mode, NULL); 592 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
590 if (ent) { 593 if (ent) {
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 21fd2c662a99..519861da0423 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -311,6 +311,46 @@ _GLOBAL(real_writeb)
311 blr 311 blr
312#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */ 312#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) */
313 313
314#ifdef CONFIG_PPC_PASEMI
315
316/* No support in all binutils for these yet, so use defines */
317#define LBZCIX(RT,RA,RB) .long (0x7c0006aa|(RT<<21)|(RA<<16)|(RB << 11))
318#define STBCIX(RS,RA,RB) .long (0x7c0007aa|(RS<<21)|(RA<<16)|(RB << 11))
319
320
321_GLOBAL(real_205_readb)
322 mfmsr r7
323 ori r0,r7,MSR_DR
324 xori r0,r0,MSR_DR
325 sync
326 mtmsrd r0
327 sync
328 isync
329 LBZCIX(r3,0,r3)
330 isync
331 mtmsrd r7
332 sync
333 isync
334 blr
335
336_GLOBAL(real_205_writeb)
337 mfmsr r7
338 ori r0,r7,MSR_DR
339 xori r0,r0,MSR_DR
340 sync
341 mtmsrd r0
342 sync
343 isync
344 STBCIX(r3,0,r4)
345 isync
346 mtmsrd r7
347 sync
348 isync
349 blr
350
351#endif /* CONFIG_PPC_PASEMI */
352
353
314#ifdef CONFIG_CPU_FREQ_PMAC64 354#ifdef CONFIG_CPU_FREQ_PMAC64
315/* 355/*
316 * SCOM access functions for 970 (FX only for now) 356 * SCOM access functions for 970 (FX only for now)
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
index 8339fd609de0..07a89a398639 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -224,7 +224,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
224 /* Low half of the symbol */ 224 /* Low half of the symbol */
225 *(uint16_t *)location = value; 225 *(uint16_t *)location = value;
226 break; 226 break;
227 227
228 case R_PPC_ADDR16_HI:
229 /* Higher half of the symbol */
230 *(uint16_t *)location = (value >> 16);
231 break;
232
228 case R_PPC_ADDR16_HA: 233 case R_PPC_ADDR16_HA:
229 /* Sign-adjusted lower 16 bits: PPC ELF ABI says: 234 /* Sign-adjusted lower 16 bits: PPC ELF ABI says:
230 (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF. 235 (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF.
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 869cebbba967..f9676f52c6d8 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -179,7 +179,7 @@ static int dev_nvram_ioctl(struct inode *inode, struct file *file,
179 } 179 }
180} 180}
181 181
182struct file_operations nvram_fops = { 182const struct file_operations nvram_fops = {
183 .owner = THIS_MODULE, 183 .owner = THIS_MODULE,
184 .llseek = dev_nvram_llseek, 184 .llseek = dev_nvram_llseek,
185 .read = dev_nvram_read, 185 .read = dev_nvram_read,
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index c54f3639c5ad..d8ef2e100505 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -1450,7 +1450,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1450 return -1; 1450 return -1;
1451 } 1451 }
1452 pci_dev->irq = virq; 1452 pci_dev->irq = virq;
1453 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
1454 1453
1455 return 0; 1454 return 0;
1456} 1455}
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 01f18c683407..7e97d71a5f8f 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -381,8 +381,6 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
381 381
382 pci_device_add(dev, bus); 382 pci_device_add(dev, bus);
383 383
384 /* XXX pci_scan_msi_device(dev); */
385
386 return dev; 384 return dev;
387} 385}
388EXPORT_SYMBOL(of_create_pci_dev); 386EXPORT_SYMBOL(of_create_pci_dev);
@@ -1325,7 +1323,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
1325 DBG(" -> mapped to linux irq %d\n", virq); 1323 DBG(" -> mapped to linux irq %d\n", virq);
1326 1324
1327 pci_dev->irq = virq; 1325 pci_dev->irq = virq;
1328 pci_write_config_byte(pci_dev, PCI_INTERRUPT_LINE, virq);
1329 1326
1330 return 0; 1327 return 0;
1331} 1328}
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index 3d8f6f44641e..24d7b7c99bb9 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -17,40 +17,25 @@
17#include <linux/module.h> 17#include <linux/module.h>
18 18
19#include <asm/processor.h> 19#include <asm/processor.h>
20#include <asm/cputable.h>
20#include <asm/pmc.h> 21#include <asm/pmc.h>
21 22
22#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200) 23#ifndef MMCR0_PMA0
23static void dummy_perf(struct pt_regs *regs) 24#define MMCR0_PMA0 0
24{
25 unsigned int pmgc0 = mfpmr(PMRN_PMGC0);
26
27 pmgc0 &= ~PMGC0_PMIE;
28 mtpmr(PMRN_PMGC0, pmgc0);
29}
30#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
31
32#ifndef MMCR0_PMAO
33#define MMCR0_PMAO 0
34#endif 25#endif
35 26
36/* Ensure exceptions are disabled */
37static void dummy_perf(struct pt_regs *regs) 27static void dummy_perf(struct pt_regs *regs)
38{ 28{
39 unsigned int mmcr0 = mfspr(SPRN_MMCR0); 29#if defined(CONFIG_FSL_BOOKE) && !defined(CONFIG_E200)
40 30 mtpmr(PMRN_PMGC0, mfpmr(PMRN_PMGC0) & ~PMGC0_PMIE);
41 mmcr0 &= ~(MMCR0_PMXE|MMCR0_PMAO); 31#elif defined(CONFIG_PPC64) || defined(CONFIG_6xx)
42 mtspr(SPRN_MMCR0, mmcr0); 32 if (cur_cpu_spec->pmc_type == PPC_PMC_IBM)
43} 33 mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~(MMCR0_PMXE|MMCR0_PMA0));
44#else 34#else
45/* Ensure exceptions are disabled */ 35 mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_PMXE);
46static void dummy_perf(struct pt_regs *regs)
47{
48 unsigned int mmcr0 = mfspr(SPRN_MMCR0);
49
50 mmcr0 &= ~(MMCR0_PMXE);
51 mtspr(SPRN_MMCR0, mmcr0);
52}
53#endif 36#endif
37}
38
54 39
55static DEFINE_SPINLOCK(pmc_owner_lock); 40static DEFINE_SPINLOCK(pmc_owner_lock);
56static void *pmc_owner_caller; /* mostly for debugging */ 41static void *pmc_owner_caller; /* mostly for debugging */
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 95776b6af4e2..ecee596d28f6 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -44,6 +44,7 @@
44#include <asm/btext.h> 44#include <asm/btext.h>
45#include <asm/div64.h> 45#include <asm/div64.h>
46#include <asm/signal.h> 46#include <asm/signal.h>
47#include <asm/dcr.h>
47 48
48#ifdef CONFIG_8xx 49#ifdef CONFIG_8xx
49#include <asm/commproc.h> 50#include <asm/commproc.h>
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c
index dd7001cacf75..f78dfce1b771 100644
--- a/arch/powerpc/kernel/proc_ppc64.c
+++ b/arch/powerpc/kernel/proc_ppc64.c
@@ -33,7 +33,7 @@ static ssize_t page_map_read( struct file *file, char __user *buf, size_t nbytes
33 loff_t *ppos); 33 loff_t *ppos);
34static int page_map_mmap( struct file *file, struct vm_area_struct *vma ); 34static int page_map_mmap( struct file *file, struct vm_area_struct *vma );
35 35
36static struct file_operations page_map_fops = { 36static const struct file_operations page_map_fops = {
37 .llseek = page_map_seek, 37 .llseek = page_map_seek,
38 .read = page_map_read, 38 .read = page_map_read,
39 .mmap = page_map_mmap 39 .mmap = page_map_mmap
@@ -71,7 +71,6 @@ static int __init proc_ppc64_init(void)
71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL); 71 pde = create_proc_entry("ppc64/systemcfg", S_IFREG|S_IRUGO, NULL);
72 if (!pde) 72 if (!pde)
73 return 1; 73 return 1;
74 pde->nlink = 1;
75 pde->data = vdso_data; 74 pde->data = vdso_data;
76 pde->size = PAGE_SIZE; 75 pde->size = PAGE_SIZE;
77 pde->proc_fops = &page_map_fops; 76 pde->proc_fops = &page_map_fops;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 1fc732a552db..8d52b23348bd 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -991,7 +991,7 @@ void __init early_init_devtree(void *params)
991 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 991 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
992 992
993 /* Save command line for /proc/cmdline and then parse parameters */ 993 /* Save command line for /proc/cmdline and then parse parameters */
994 strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE); 994 strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
995 parse_early_param(); 995 parse_early_param();
996 996
997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */ 997 /* Reserve LMB regions used by kernel, initrd, dt, etc... */
@@ -1221,8 +1221,7 @@ struct device_node *of_find_node_by_name(struct device_node *from,
1221 if (np->name != NULL && strcasecmp(np->name, name) == 0 1221 if (np->name != NULL && strcasecmp(np->name, name) == 0
1222 && of_node_get(np)) 1222 && of_node_get(np))
1223 break; 1223 break;
1224 if (from) 1224 of_node_put(from);
1225 of_node_put(from);
1226 read_unlock(&devtree_lock); 1225 read_unlock(&devtree_lock);
1227 return np; 1226 return np;
1228} 1227}
@@ -1250,8 +1249,7 @@ struct device_node *of_find_node_by_type(struct device_node *from,
1250 if (np->type != 0 && strcasecmp(np->type, type) == 0 1249 if (np->type != 0 && strcasecmp(np->type, type) == 0
1251 && of_node_get(np)) 1250 && of_node_get(np))
1252 break; 1251 break;
1253 if (from) 1252 of_node_put(from);
1254 of_node_put(from);
1255 read_unlock(&devtree_lock); 1253 read_unlock(&devtree_lock);
1256 return np; 1254 return np;
1257} 1255}
@@ -1285,8 +1283,7 @@ struct device_node *of_find_compatible_node(struct device_node *from,
1285 if (device_is_compatible(np, compatible) && of_node_get(np)) 1283 if (device_is_compatible(np, compatible) && of_node_get(np))
1286 break; 1284 break;
1287 } 1285 }
1288 if (from) 1286 of_node_put(from);
1289 of_node_put(from);
1290 read_unlock(&devtree_lock); 1287 read_unlock(&devtree_lock);
1291 return np; 1288 return np;
1292} 1289}
@@ -1329,8 +1326,7 @@ struct device_node *of_find_node_by_phandle(phandle handle)
1329 for (np = allnodes; np != 0; np = np->allnext) 1326 for (np = allnodes; np != 0; np = np->allnext)
1330 if (np->linux_phandle == handle) 1327 if (np->linux_phandle == handle)
1331 break; 1328 break;
1332 if (np) 1329 of_node_get(np);
1333 of_node_get(np);
1334 read_unlock(&devtree_lock); 1330 read_unlock(&devtree_lock);
1335 return np; 1331 return np;
1336} 1332}
@@ -1353,8 +1349,7 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
1353 for (; np != 0; np = np->allnext) 1349 for (; np != 0; np = np->allnext)
1354 if (of_node_get(np)) 1350 if (of_node_get(np))
1355 break; 1351 break;
1356 if (prev) 1352 of_node_put(prev);
1357 of_node_put(prev);
1358 read_unlock(&devtree_lock); 1353 read_unlock(&devtree_lock);
1359 return np; 1354 return np;
1360} 1355}
@@ -1399,8 +1394,7 @@ struct device_node *of_get_next_child(const struct device_node *node,
1399 for (; next != 0; next = next->sibling) 1394 for (; next != 0; next = next->sibling)
1400 if (of_node_get(next)) 1395 if (of_node_get(next))
1401 break; 1396 break;
1402 if (prev) 1397 of_node_put(prev);
1403 of_node_put(prev);
1404 read_unlock(&devtree_lock); 1398 read_unlock(&devtree_lock);
1405 return next; 1399 return next;
1406} 1400}
@@ -1605,6 +1599,7 @@ struct property *of_find_property(const struct device_node *np,
1605 1599
1606 return pp; 1600 return pp;
1607} 1601}
1602EXPORT_SYMBOL(of_find_property);
1608 1603
1609/* 1604/*
1610 * Find a property with a given name for a given node 1605 * Find a property with a given name for a given node
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 520ef42f642e..4fb5938ce6d3 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2117,11 +2117,92 @@ static void __init fixup_device_tree_pmac(void)
2117#define fixup_device_tree_pmac() 2117#define fixup_device_tree_pmac()
2118#endif 2118#endif
2119 2119
2120#ifdef CONFIG_PPC_EFIKA
2121/* The current fw of the Efika has a device tree needs quite a few
2122 * fixups to be compliant with the mpc52xx bindings. It's currently
2123 * unknown if it will ever be compliant (come on bPlan ...) so we do fixups.
2124 * NOTE that we (barely) tolerate it because the EFIKA was out before
2125 * the bindings were finished, for any new boards -> RTFM ! */
2126
2127struct subst_entry {
2128 char *path;
2129 char *property;
2130 void *value;
2131 int value_len;
2132};
2133
2134static void __init fixup_device_tree_efika(void)
2135{
2136 /* Substitution table */
2137 #define prop_cstr(x) x, sizeof(x)
2138 int prop_sound_irq[3] = { 2, 2, 0 };
2139 int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2140 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2141 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2142 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2143 struct subst_entry efika_subst_table[] = {
2144 { "/", "device_type", prop_cstr("efika") },
2145 { "/builtin", "compatible", prop_cstr("soc") },
2146 { "/builtin/ata", "compatible", prop_cstr("mpc5200b-ata\0mpc5200-ata"), },
2147 { "/builtin/bestcomm", "compatible", prop_cstr("mpc5200b-bestcomm\0mpc5200-bestcomm") },
2148 { "/builtin/bestcomm", "interrupts", prop_bcomm_irq, sizeof(prop_bcomm_irq) },
2149 { "/builtin/ethernet", "compatible", prop_cstr("mpc5200b-fec\0mpc5200-fec") },
2150 { "/builtin/pic", "compatible", prop_cstr("mpc5200b-pic\0mpc5200-pic") },
2151 { "/builtin/serial", "compatible", prop_cstr("mpc5200b-psc-uart\0mpc5200-psc-uart") },
2152 { "/builtin/sound", "compatible", prop_cstr("mpc5200b-psc-ac97\0mpc5200-psc-ac97") },
2153 { "/builtin/sound", "interrupts", prop_sound_irq, sizeof(prop_sound_irq) },
2154 { "/builtin/sram", "compatible", prop_cstr("mpc5200b-sram\0mpc5200-sram") },
2155 { "/builtin/sram", "device_type", prop_cstr("sram") },
2156 {}
2157 };
2158 #undef prop_cstr
2159
2160 /* Vars */
2161 u32 node;
2162 char prop[64];
2163 int rv, i;
2164
2165 /* Check if we're really running on a EFIKA */
2166 node = call_prom("finddevice", 1, 1, ADDR("/"));
2167 if (!PHANDLE_VALID(node))
2168 return;
2169
2170 rv = prom_getprop(node, "model", prop, sizeof(prop));
2171 if (rv == PROM_ERROR)
2172 return;
2173 if (strcmp(prop, "EFIKA5K2"))
2174 return;
2175
2176 prom_printf("Applying EFIKA device tree fixups\n");
2177
2178 /* Process substitution table */
2179 for (i=0; efika_subst_table[i].path; i++) {
2180 struct subst_entry *se = &efika_subst_table[i];
2181
2182 node = call_prom("finddevice", 1, 1, ADDR(se->path));
2183 if (!PHANDLE_VALID(node)) {
2184 prom_printf("fixup_device_tree_efika: ",
2185 "skipped entry %x - not found\n", i);
2186 continue;
2187 }
2188
2189 rv = prom_setprop(node, se->path, se->property,
2190 se->value, se->value_len );
2191 if (rv == PROM_ERROR)
2192 prom_printf("fixup_device_tree_efika: ",
2193 "skipped entry %x - setprop error\n", i);
2194 }
2195}
2196#else
2197#define fixup_device_tree_efika()
2198#endif
2199
2120static void __init fixup_device_tree(void) 2200static void __init fixup_device_tree(void)
2121{ 2201{
2122 fixup_device_tree_maple(); 2202 fixup_device_tree_maple();
2123 fixup_device_tree_chrp(); 2203 fixup_device_tree_chrp();
2124 fixup_device_tree_pmac(); 2204 fixup_device_tree_pmac();
2205 fixup_device_tree_efika();
2125} 2206}
2126 2207
2127static void __init prom_find_boot_cpu(void) 2208static void __init prom_find_boot_cpu(void)
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 12c51e4ad2b4..ea6fd552c7ea 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -5,6 +5,7 @@
5#include <linux/pci_regs.h> 5#include <linux/pci_regs.h>
6#include <linux/module.h> 6#include <linux/module.h>
7#include <linux/ioport.h> 7#include <linux/ioport.h>
8#include <linux/etherdevice.h>
8#include <asm/prom.h> 9#include <asm/prom.h>
9#include <asm/pci-bridge.h> 10#include <asm/pci-bridge.h>
10 11
@@ -1003,3 +1004,42 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq
1003 return res; 1004 return res;
1004} 1005}
1005EXPORT_SYMBOL_GPL(of_irq_map_one); 1006EXPORT_SYMBOL_GPL(of_irq_map_one);
1007
1008/**
1009 * Search the device tree for the best MAC address to use. 'mac-address' is
1010 * checked first, because that is supposed to contain to "most recent" MAC
1011 * address. If that isn't set, then 'local-mac-address' is checked next,
1012 * because that is the default address. If that isn't set, then the obsolete
1013 * 'address' is checked, just in case we're using an old device tree.
1014 *
1015 * Note that the 'address' property is supposed to contain a virtual address of
1016 * the register set, but some DTS files have redefined that property to be the
1017 * MAC address.
1018 *
1019 * All-zero MAC addresses are rejected, because those could be properties that
1020 * exist in the device tree, but were not set by U-Boot. For example, the
1021 * DTS could define 'mac-address' and 'local-mac-address', with zero MAC
1022 * addresses. Some older U-Boots only initialized 'local-mac-address'. In
1023 * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
1024 * but is all zeros.
1025*/
1026const void *of_get_mac_address(struct device_node *np)
1027{
1028 struct property *pp;
1029
1030 pp = of_find_property(np, "mac-address", NULL);
1031 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1032 return pp->value;
1033
1034 pp = of_find_property(np, "local-mac-address", NULL);
1035 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1036 return pp->value;
1037
1038 pp = of_find_property(np, "address", NULL);
1039 if (pp && (pp->length == 6) && is_valid_ether_addr(pp->value))
1040 return pp->value;
1041
1042 return NULL;
1043}
1044EXPORT_SYMBOL(of_get_mac_address);
1045
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 975102a020d9..cc44c7b975aa 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -532,16 +532,22 @@ void do_syscall_trace_enter(struct pt_regs *regs)
532 && (current->ptrace & PT_PTRACED)) 532 && (current->ptrace & PT_PTRACED))
533 do_syscall_trace(); 533 do_syscall_trace();
534 534
535 if (unlikely(current->audit_context)) 535 if (unlikely(current->audit_context)) {
536 audit_syscall_entry( 536#ifdef CONFIG_PPC64
537#ifdef CONFIG_PPC32 537 if (!test_thread_flag(TIF_32BIT))
538 AUDIT_ARCH_PPC, 538 audit_syscall_entry(AUDIT_ARCH_PPC64,
539#else 539 regs->gpr[0],
540 test_thread_flag(TIF_32BIT)?AUDIT_ARCH_PPC:AUDIT_ARCH_PPC64, 540 regs->gpr[3], regs->gpr[4],
541 regs->gpr[5], regs->gpr[6]);
542 else
541#endif 543#endif
542 regs->gpr[0], 544 audit_syscall_entry(AUDIT_ARCH_PPC,
543 regs->gpr[3], regs->gpr[4], 545 regs->gpr[0],
544 regs->gpr[5], regs->gpr[6]); 546 regs->gpr[3] & 0xffffffff,
547 regs->gpr[4] & 0xffffffff,
548 regs->gpr[5] & 0xffffffff,
549 regs->gpr[6] & 0xffffffff);
550 }
545} 551}
546 552
547void do_syscall_trace_leave(struct pt_regs *regs) 553void do_syscall_trace_leave(struct pt_regs *regs)
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 2fe82abf1c52..6cbf2ae5d7aa 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -160,7 +160,7 @@ static int sensors_open(struct inode *inode, struct file *file)
160 return single_open(file, ppc_rtas_sensors_show, NULL); 160 return single_open(file, ppc_rtas_sensors_show, NULL);
161} 161}
162 162
163struct file_operations ppc_rtas_sensors_operations = { 163const struct file_operations ppc_rtas_sensors_operations = {
164 .open = sensors_open, 164 .open = sensors_open,
165 .read = seq_read, 165 .read = seq_read,
166 .llseek = seq_lseek, 166 .llseek = seq_lseek,
@@ -172,7 +172,7 @@ static int poweron_open(struct inode *inode, struct file *file)
172 return single_open(file, ppc_rtas_poweron_show, NULL); 172 return single_open(file, ppc_rtas_poweron_show, NULL);
173} 173}
174 174
175struct file_operations ppc_rtas_poweron_operations = { 175const struct file_operations ppc_rtas_poweron_operations = {
176 .open = poweron_open, 176 .open = poweron_open,
177 .read = seq_read, 177 .read = seq_read,
178 .llseek = seq_lseek, 178 .llseek = seq_lseek,
@@ -185,7 +185,7 @@ static int progress_open(struct inode *inode, struct file *file)
185 return single_open(file, ppc_rtas_progress_show, NULL); 185 return single_open(file, ppc_rtas_progress_show, NULL);
186} 186}
187 187
188struct file_operations ppc_rtas_progress_operations = { 188const struct file_operations ppc_rtas_progress_operations = {
189 .open = progress_open, 189 .open = progress_open,
190 .read = seq_read, 190 .read = seq_read,
191 .llseek = seq_lseek, 191 .llseek = seq_lseek,
@@ -198,7 +198,7 @@ static int clock_open(struct inode *inode, struct file *file)
198 return single_open(file, ppc_rtas_clock_show, NULL); 198 return single_open(file, ppc_rtas_clock_show, NULL);
199} 199}
200 200
201struct file_operations ppc_rtas_clock_operations = { 201const struct file_operations ppc_rtas_clock_operations = {
202 .open = clock_open, 202 .open = clock_open,
203 .read = seq_read, 203 .read = seq_read,
204 .llseek = seq_lseek, 204 .llseek = seq_lseek,
@@ -211,7 +211,7 @@ static int tone_freq_open(struct inode *inode, struct file *file)
211 return single_open(file, ppc_rtas_tone_freq_show, NULL); 211 return single_open(file, ppc_rtas_tone_freq_show, NULL);
212} 212}
213 213
214struct file_operations ppc_rtas_tone_freq_operations = { 214const struct file_operations ppc_rtas_tone_freq_operations = {
215 .open = tone_freq_open, 215 .open = tone_freq_open,
216 .read = seq_read, 216 .read = seq_read,
217 .llseek = seq_lseek, 217 .llseek = seq_lseek,
@@ -224,7 +224,7 @@ static int tone_volume_open(struct inode *inode, struct file *file)
224 return single_open(file, ppc_rtas_tone_volume_show, NULL); 224 return single_open(file, ppc_rtas_tone_volume_show, NULL);
225} 225}
226 226
227struct file_operations ppc_rtas_tone_volume_operations = { 227const struct file_operations ppc_rtas_tone_volume_operations = {
228 .open = tone_volume_open, 228 .open = tone_volume_open,
229 .read = seq_read, 229 .read = seq_read,
230 .llseek = seq_lseek, 230 .llseek = seq_lseek,
@@ -237,7 +237,7 @@ static int rmo_buf_open(struct inode *inode, struct file *file)
237 return single_open(file, ppc_rtas_rmo_buf_show, NULL); 237 return single_open(file, ppc_rtas_rmo_buf_show, NULL);
238} 238}
239 239
240struct file_operations ppc_rtas_rmo_buf_ops = { 240const struct file_operations ppc_rtas_rmo_buf_ops = {
241 .open = rmo_buf_open, 241 .open = rmo_buf_open,
242 .read = seq_read, 242 .read = seq_read,
243 .llseek = seq_lseek, 243 .llseek = seq_lseek,
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 76b5d7ebdcc6..9d0735a54564 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -182,7 +182,7 @@ void rtas_progress(char *s, unsigned short hex)
182 char *os; 182 char *os;
183 static int display_character, set_indicator; 183 static int display_character, set_indicator;
184 static int display_width, display_lines, form_feed; 184 static int display_width, display_lines, form_feed;
185 const static int *row_width; 185 static const int *row_width;
186 static DEFINE_SPINLOCK(progress_lock); 186 static DEFINE_SPINLOCK(progress_lock);
187 static int current_line; 187 static int current_line;
188 static int pending_newline = 0; /* did last write end with unprinted newline? */ 188 static int pending_newline = 0; /* did last write end with unprinted newline? */
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index 0c4fcd34bfe5..f72118c0844f 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -702,13 +702,12 @@ static int initialize_flash_pde_data(const char *rtas_call_name,
702} 702}
703 703
704static struct proc_dir_entry *create_flash_pde(const char *filename, 704static struct proc_dir_entry *create_flash_pde(const char *filename,
705 struct file_operations *fops) 705 const struct file_operations *fops)
706{ 706{
707 struct proc_dir_entry *ent = NULL; 707 struct proc_dir_entry *ent = NULL;
708 708
709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL); 709 ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, NULL);
710 if (ent != NULL) { 710 if (ent != NULL) {
711 ent->nlink = 1;
712 ent->proc_fops = fops; 711 ent->proc_fops = fops;
713 ent->owner = THIS_MODULE; 712 ent->owner = THIS_MODULE;
714 } 713 }
@@ -716,21 +715,21 @@ static struct proc_dir_entry *create_flash_pde(const char *filename,
716 return ent; 715 return ent;
717} 716}
718 717
719static struct file_operations rtas_flash_operations = { 718static const struct file_operations rtas_flash_operations = {
720 .read = rtas_flash_read, 719 .read = rtas_flash_read,
721 .write = rtas_flash_write, 720 .write = rtas_flash_write,
722 .open = rtas_excl_open, 721 .open = rtas_excl_open,
723 .release = rtas_flash_release, 722 .release = rtas_flash_release,
724}; 723};
725 724
726static struct file_operations manage_flash_operations = { 725static const struct file_operations manage_flash_operations = {
727 .read = manage_flash_read, 726 .read = manage_flash_read,
728 .write = manage_flash_write, 727 .write = manage_flash_write,
729 .open = rtas_excl_open, 728 .open = rtas_excl_open,
730 .release = rtas_excl_release, 729 .release = rtas_excl_release,
731}; 730};
732 731
733static struct file_operations validate_flash_operations = { 732static const struct file_operations validate_flash_operations = {
734 .read = validate_flash_read, 733 .read = validate_flash_read,
735 .write = validate_flash_write, 734 .write = validate_flash_write,
736 .open = rtas_excl_open, 735 .open = rtas_excl_open,
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 61c65d19ef06..44a6a3c47feb 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -65,6 +65,7 @@ int have_of = 1;
65 65
66#ifdef CONFIG_VGA_CONSOLE 66#ifdef CONFIG_VGA_CONSOLE
67unsigned long vgacon_remap_base; 67unsigned long vgacon_remap_base;
68EXPORT_SYMBOL(vgacon_remap_base);
68#endif 69#endif
69 70
70/* 71/*
@@ -115,12 +116,8 @@ unsigned long __init early_init(unsigned long dt_ptr)
115 */ 116 */
116void __init machine_init(unsigned long dt_ptr, unsigned long phys) 117void __init machine_init(unsigned long dt_ptr, unsigned long phys)
117{ 118{
118 /* If btext is enabled, we might have a BAT setup for early display, 119 /* Enable early debugging if any specified (see udbg.h) */
119 * thus we do enable some very basic udbg output 120 udbg_early_init();
120 */
121#ifdef CONFIG_BOOTX_TEXT
122 udbg_putc = btext_drawchar;
123#endif
124 121
125 /* Do some early initialization based on the flat device tree */ 122 /* Do some early initialization based on the flat device tree */
126 early_init_devtree(__va(dt_ptr)); 123 early_init_devtree(__va(dt_ptr));
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 0e8beca460af..924d692bc8f9 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -78,29 +78,6 @@ int smt_enabled_at_boot = 1;
78 78
79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
80 80
81#ifdef CONFIG_MPIC
82int __init smp_mpic_probe(void)
83{
84 int nr_cpus;
85
86 DBG("smp_mpic_probe()...\n");
87
88 nr_cpus = cpus_weight(cpu_possible_map);
89
90 DBG("nr_cpus: %d\n", nr_cpus);
91
92 if (nr_cpus > 1)
93 mpic_request_ipis();
94
95 return nr_cpus;
96}
97
98void __devinit smp_mpic_setup_cpu(int cpu)
99{
100 mpic_setup_this_cpu();
101}
102#endif /* CONFIG_MPIC */
103
104#ifdef CONFIG_PPC64 81#ifdef CONFIG_PPC64
105void __devinit smp_generic_kick_cpu(int nr) 82void __devinit smp_generic_kick_cpu(int nr)
106{ 83{
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 03a2a2f30d66..673e8d9df7f5 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -198,73 +198,6 @@ static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
198 __put_user(i->tv_usec, &o->tv_usec))); 198 __put_user(i->tv_usec, &o->tv_usec)));
199} 199}
200 200
201struct sysinfo32 {
202 s32 uptime;
203 u32 loads[3];
204 u32 totalram;
205 u32 freeram;
206 u32 sharedram;
207 u32 bufferram;
208 u32 totalswap;
209 u32 freeswap;
210 unsigned short procs;
211 unsigned short pad;
212 u32 totalhigh;
213 u32 freehigh;
214 u32 mem_unit;
215 char _f[20-2*sizeof(int)-sizeof(int)];
216};
217
218asmlinkage long compat_sys_sysinfo(struct sysinfo32 __user *info)
219{
220 struct sysinfo s;
221 int ret, err;
222 int bitcount=0;
223 mm_segment_t old_fs = get_fs ();
224
225 /* The __user cast is valid due to set_fs() */
226 set_fs (KERNEL_DS);
227 ret = sys_sysinfo((struct sysinfo __user *)&s);
228 set_fs (old_fs);
229
230 /* Check to see if any memory value is too large for 32-bit and
231 * scale down if needed.
232 */
233 if ((s.totalram >> 32) || (s.totalswap >> 32)) {
234 while (s.mem_unit < PAGE_SIZE) {
235 s.mem_unit <<= 1;
236 bitcount++;
237 }
238 s.totalram >>=bitcount;
239 s.freeram >>= bitcount;
240 s.sharedram >>= bitcount;
241 s.bufferram >>= bitcount;
242 s.totalswap >>= bitcount;
243 s.freeswap >>= bitcount;
244 s.totalhigh >>= bitcount;
245 s.freehigh >>= bitcount;
246 }
247
248 err = put_user (s.uptime, &info->uptime);
249 err |= __put_user (s.loads[0], &info->loads[0]);
250 err |= __put_user (s.loads[1], &info->loads[1]);
251 err |= __put_user (s.loads[2], &info->loads[2]);
252 err |= __put_user (s.totalram, &info->totalram);
253 err |= __put_user (s.freeram, &info->freeram);
254 err |= __put_user (s.sharedram, &info->sharedram);
255 err |= __put_user (s.bufferram, &info->bufferram);
256 err |= __put_user (s.totalswap, &info->totalswap);
257 err |= __put_user (s.freeswap, &info->freeswap);
258 err |= __put_user (s.procs, &info->procs);
259 err |= __put_user (s.totalhigh, &info->totalhigh);
260 err |= __put_user (s.freehigh, &info->freehigh);
261 err |= __put_user (s.mem_unit, &info->mem_unit);
262 if (err)
263 return -EFAULT;
264
265 return ret;
266}
267
268 201
269 202
270 203
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 400ab2b946e7..d57818aea081 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -169,6 +169,11 @@ static ssize_t __attribute_used__ \
169 return count; \ 169 return count; \
170} 170}
171 171
172
173/* Let's define all possible registers, we'll only hook up the ones
174 * that are implemented on the current processor
175 */
176
172SYSFS_PMCSETUP(mmcr0, SPRN_MMCR0); 177SYSFS_PMCSETUP(mmcr0, SPRN_MMCR0);
173SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1); 178SYSFS_PMCSETUP(mmcr1, SPRN_MMCR1);
174SYSFS_PMCSETUP(mmcra, SPRN_MMCRA); 179SYSFS_PMCSETUP(mmcra, SPRN_MMCRA);
@@ -184,55 +189,87 @@ SYSFS_PMCSETUP(purr, SPRN_PURR);
184SYSFS_PMCSETUP(spurr, SPRN_SPURR); 189SYSFS_PMCSETUP(spurr, SPRN_SPURR);
185SYSFS_PMCSETUP(dscr, SPRN_DSCR); 190SYSFS_PMCSETUP(dscr, SPRN_DSCR);
186 191
187static SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0); 192SYSFS_PMCSETUP(pa6t_pmc0, PA6T_SPRN_PMC0);
188static SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1); 193SYSFS_PMCSETUP(pa6t_pmc1, PA6T_SPRN_PMC1);
194SYSFS_PMCSETUP(pa6t_pmc2, PA6T_SPRN_PMC2);
195SYSFS_PMCSETUP(pa6t_pmc3, PA6T_SPRN_PMC3);
196SYSFS_PMCSETUP(pa6t_pmc4, PA6T_SPRN_PMC4);
197SYSFS_PMCSETUP(pa6t_pmc5, PA6T_SPRN_PMC5);
198
199
189static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra); 200static SYSDEV_ATTR(mmcra, 0600, show_mmcra, store_mmcra);
190static SYSDEV_ATTR(pmc1, 0600, show_pmc1, store_pmc1);
191static SYSDEV_ATTR(pmc2, 0600, show_pmc2, store_pmc2);
192static SYSDEV_ATTR(pmc3, 0600, show_pmc3, store_pmc3);
193static SYSDEV_ATTR(pmc4, 0600, show_pmc4, store_pmc4);
194static SYSDEV_ATTR(pmc5, 0600, show_pmc5, store_pmc5);
195static SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6);
196static SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7);
197static SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8);
198static SYSDEV_ATTR(purr, 0600, show_purr, NULL);
199static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL); 201static SYSDEV_ATTR(spurr, 0600, show_spurr, NULL);
200static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr); 202static SYSDEV_ATTR(dscr, 0600, show_dscr, store_dscr);
203static SYSDEV_ATTR(purr, 0600, show_purr, store_purr);
204
205static struct sysdev_attribute ibm_common_attrs[] = {
206 _SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0),
207 _SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
208};
209
210static struct sysdev_attribute ibm_pmc_attrs[] = {
211 _SYSDEV_ATTR(pmc1, 0600, show_pmc1, store_pmc1),
212 _SYSDEV_ATTR(pmc2, 0600, show_pmc2, store_pmc2),
213 _SYSDEV_ATTR(pmc3, 0600, show_pmc3, store_pmc3),
214 _SYSDEV_ATTR(pmc4, 0600, show_pmc4, store_pmc4),
215 _SYSDEV_ATTR(pmc5, 0600, show_pmc5, store_pmc5),
216 _SYSDEV_ATTR(pmc6, 0600, show_pmc6, store_pmc6),
217 _SYSDEV_ATTR(pmc7, 0600, show_pmc7, store_pmc7),
218 _SYSDEV_ATTR(pmc8, 0600, show_pmc8, store_pmc8),
219};
220
221static struct sysdev_attribute pa6t_attrs[] = {
222 _SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0),
223 _SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
224 _SYSDEV_ATTR(pmc0, 0600, show_pa6t_pmc0, store_pa6t_pmc0),
225 _SYSDEV_ATTR(pmc1, 0600, show_pa6t_pmc1, store_pa6t_pmc1),
226 _SYSDEV_ATTR(pmc2, 0600, show_pa6t_pmc2, store_pa6t_pmc2),
227 _SYSDEV_ATTR(pmc3, 0600, show_pa6t_pmc3, store_pa6t_pmc3),
228 _SYSDEV_ATTR(pmc4, 0600, show_pa6t_pmc4, store_pa6t_pmc4),
229 _SYSDEV_ATTR(pmc5, 0600, show_pa6t_pmc5, store_pa6t_pmc5),
230};
231
201 232
202static void register_cpu_online(unsigned int cpu) 233static void register_cpu_online(unsigned int cpu)
203{ 234{
204 struct cpu *c = &per_cpu(cpu_devices, cpu); 235 struct cpu *c = &per_cpu(cpu_devices, cpu);
205 struct sys_device *s = &c->sysdev; 236 struct sys_device *s = &c->sysdev;
237 struct sysdev_attribute *attrs, *pmc_attrs;
238 int i, nattrs;
206 239
207 if (!firmware_has_feature(FW_FEATURE_ISERIES) && 240 if (!firmware_has_feature(FW_FEATURE_ISERIES) &&
208 cpu_has_feature(CPU_FTR_SMT)) 241 cpu_has_feature(CPU_FTR_SMT))
209 sysdev_create_file(s, &attr_smt_snooze_delay); 242 sysdev_create_file(s, &attr_smt_snooze_delay);
210 243
211 /* PMC stuff */ 244 /* PMC stuff */
245 switch (cur_cpu_spec->pmc_type) {
246 case PPC_PMC_IBM:
247 attrs = ibm_common_attrs;
248 nattrs = sizeof(ibm_common_attrs) / sizeof(struct sysdev_attribute);
249 pmc_attrs = ibm_pmc_attrs;
250 break;
251 case PPC_PMC_PA6T:
252 /* PA Semi starts counting at PMC0 */
253 attrs = pa6t_attrs;
254 nattrs = sizeof(pa6t_attrs) / sizeof(struct sysdev_attribute);
255 pmc_attrs = NULL;
256 break;
257 default:
258 attrs = NULL;
259 nattrs = 0;
260 pmc_attrs = NULL;
261 }
262
263 for (i = 0; i < nattrs; i++)
264 sysdev_create_file(s, &attrs[i]);
212 265
213 sysdev_create_file(s, &attr_mmcr0); 266 if (pmc_attrs)
214 sysdev_create_file(s, &attr_mmcr1); 267 for (i = 0; i < cur_cpu_spec->num_pmcs; i++)
268 sysdev_create_file(s, &pmc_attrs[i]);
215 269
216 if (cpu_has_feature(CPU_FTR_MMCRA)) 270 if (cpu_has_feature(CPU_FTR_MMCRA))
217 sysdev_create_file(s, &attr_mmcra); 271 sysdev_create_file(s, &attr_mmcra);
218 272
219 if (cur_cpu_spec->num_pmcs >= 1)
220 sysdev_create_file(s, &attr_pmc1);
221 if (cur_cpu_spec->num_pmcs >= 2)
222 sysdev_create_file(s, &attr_pmc2);
223 if (cur_cpu_spec->num_pmcs >= 3)
224 sysdev_create_file(s, &attr_pmc3);
225 if (cur_cpu_spec->num_pmcs >= 4)
226 sysdev_create_file(s, &attr_pmc4);
227 if (cur_cpu_spec->num_pmcs >= 5)
228 sysdev_create_file(s, &attr_pmc5);
229 if (cur_cpu_spec->num_pmcs >= 6)
230 sysdev_create_file(s, &attr_pmc6);
231 if (cur_cpu_spec->num_pmcs >= 7)
232 sysdev_create_file(s, &attr_pmc7);
233 if (cur_cpu_spec->num_pmcs >= 8)
234 sysdev_create_file(s, &attr_pmc8);
235
236 if (cpu_has_feature(CPU_FTR_PURR)) 273 if (cpu_has_feature(CPU_FTR_PURR))
237 sysdev_create_file(s, &attr_purr); 274 sysdev_create_file(s, &attr_purr);
238 275
@@ -248,6 +285,8 @@ static void unregister_cpu_online(unsigned int cpu)
248{ 285{
249 struct cpu *c = &per_cpu(cpu_devices, cpu); 286 struct cpu *c = &per_cpu(cpu_devices, cpu);
250 struct sys_device *s = &c->sysdev; 287 struct sys_device *s = &c->sysdev;
288 struct sysdev_attribute *attrs, *pmc_attrs;
289 int i, nattrs;
251 290
252 BUG_ON(!c->hotpluggable); 291 BUG_ON(!c->hotpluggable);
253 292
@@ -256,30 +295,34 @@ static void unregister_cpu_online(unsigned int cpu)
256 sysdev_remove_file(s, &attr_smt_snooze_delay); 295 sysdev_remove_file(s, &attr_smt_snooze_delay);
257 296
258 /* PMC stuff */ 297 /* PMC stuff */
298 switch (cur_cpu_spec->pmc_type) {
299 case PPC_PMC_IBM:
300 attrs = ibm_common_attrs;
301 nattrs = sizeof(ibm_common_attrs) / sizeof(struct sysdev_attribute);
302 pmc_attrs = ibm_pmc_attrs;
303 break;
304 case PPC_PMC_PA6T:
305 /* PA Semi starts counting at PMC0 */
306 attrs = pa6t_attrs;
307 nattrs = sizeof(pa6t_attrs) / sizeof(struct sysdev_attribute);
308 pmc_attrs = NULL;
309 break;
310 default:
311 attrs = NULL;
312 nattrs = 0;
313 pmc_attrs = NULL;
314 }
259 315
260 sysdev_remove_file(s, &attr_mmcr0); 316 for (i = 0; i < nattrs; i++)
261 sysdev_remove_file(s, &attr_mmcr1); 317 sysdev_remove_file(s, &attrs[i]);
318
319 if (pmc_attrs)
320 for (i = 0; i < cur_cpu_spec->num_pmcs; i++)
321 sysdev_remove_file(s, &pmc_attrs[i]);
262 322
263 if (cpu_has_feature(CPU_FTR_MMCRA)) 323 if (cpu_has_feature(CPU_FTR_MMCRA))
264 sysdev_remove_file(s, &attr_mmcra); 324 sysdev_remove_file(s, &attr_mmcra);
265 325
266 if (cur_cpu_spec->num_pmcs >= 1)
267 sysdev_remove_file(s, &attr_pmc1);
268 if (cur_cpu_spec->num_pmcs >= 2)
269 sysdev_remove_file(s, &attr_pmc2);
270 if (cur_cpu_spec->num_pmcs >= 3)
271 sysdev_remove_file(s, &attr_pmc3);
272 if (cur_cpu_spec->num_pmcs >= 4)
273 sysdev_remove_file(s, &attr_pmc4);
274 if (cur_cpu_spec->num_pmcs >= 5)
275 sysdev_remove_file(s, &attr_pmc5);
276 if (cur_cpu_spec->num_pmcs >= 6)
277 sysdev_remove_file(s, &attr_pmc6);
278 if (cur_cpu_spec->num_pmcs >= 7)
279 sysdev_remove_file(s, &attr_pmc7);
280 if (cur_cpu_spec->num_pmcs >= 8)
281 sysdev_remove_file(s, &attr_pmc8);
282
283 if (cpu_has_feature(CPU_FTR_PURR)) 326 if (cpu_has_feature(CPU_FTR_PURR))
284 sysdev_remove_file(s, &attr_purr); 327 sysdev_remove_file(s, &attr_purr);
285 328
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 535f50665647..dcc6f159fd94 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -174,7 +174,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr)
174 * generate the same exception over and over again and we get 174 * generate the same exception over and over again and we get
175 * nowhere. Better to kill it and let the kernel panic. 175 * nowhere. Better to kill it and let the kernel panic.
176 */ 176 */
177 if (current->pid == 1) { 177 if (is_init(current)) {
178 __sighandler_t handler; 178 __sighandler_t handler;
179 179
180 spin_lock_irq(&current->sighand->siglock); 180 spin_lock_irq(&current->sighand->siglock);
@@ -535,34 +535,40 @@ static void emulate_single_step(struct pt_regs *regs)
535 } 535 }
536} 536}
537 537
538static void parse_fpe(struct pt_regs *regs) 538static inline int __parse_fpscr(unsigned long fpscr)
539{ 539{
540 int code = 0; 540 int ret = 0;
541 unsigned long fpscr;
542
543 flush_fp_to_thread(current);
544
545 fpscr = current->thread.fpscr.val;
546 541
547 /* Invalid operation */ 542 /* Invalid operation */
548 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX)) 543 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX))
549 code = FPE_FLTINV; 544 ret = FPE_FLTINV;
550 545
551 /* Overflow */ 546 /* Overflow */
552 else if ((fpscr & FPSCR_OE) && (fpscr & FPSCR_OX)) 547 else if ((fpscr & FPSCR_OE) && (fpscr & FPSCR_OX))
553 code = FPE_FLTOVF; 548 ret = FPE_FLTOVF;
554 549
555 /* Underflow */ 550 /* Underflow */
556 else if ((fpscr & FPSCR_UE) && (fpscr & FPSCR_UX)) 551 else if ((fpscr & FPSCR_UE) && (fpscr & FPSCR_UX))
557 code = FPE_FLTUND; 552 ret = FPE_FLTUND;
558 553
559 /* Divide by zero */ 554 /* Divide by zero */
560 else if ((fpscr & FPSCR_ZE) && (fpscr & FPSCR_ZX)) 555 else if ((fpscr & FPSCR_ZE) && (fpscr & FPSCR_ZX))
561 code = FPE_FLTDIV; 556 ret = FPE_FLTDIV;
562 557
563 /* Inexact result */ 558 /* Inexact result */
564 else if ((fpscr & FPSCR_XE) && (fpscr & FPSCR_XX)) 559 else if ((fpscr & FPSCR_XE) && (fpscr & FPSCR_XX))
565 code = FPE_FLTRES; 560 ret = FPE_FLTRES;
561
562 return ret;
563}
564
565static void parse_fpe(struct pt_regs *regs)
566{
567 int code = 0;
568
569 flush_fp_to_thread(current);
570
571 code = __parse_fpscr(current->thread.fpscr.val);
566 572
567 _exception(SIGFPE, regs, code, regs->nip); 573 _exception(SIGFPE, regs, code, regs->nip);
568} 574}
@@ -739,20 +745,7 @@ void __kprobes program_check_exception(struct pt_regs *regs)
739 extern int do_mathemu(struct pt_regs *regs); 745 extern int do_mathemu(struct pt_regs *regs);
740 746
741 /* We can now get here via a FP Unavailable exception if the core 747 /* We can now get here via a FP Unavailable exception if the core
742 * has no FPU, in that case no reason flags will be set */ 748 * has no FPU, in that case the reason flags will be 0 */
743#ifdef CONFIG_MATH_EMULATION
744 /* (reason & REASON_ILLEGAL) would be the obvious thing here,
745 * but there seems to be a hardware bug on the 405GP (RevD)
746 * that means ESR is sometimes set incorrectly - either to
747 * ESR_DST (!?) or 0. In the process of chasing this with the
748 * hardware people - not sure if it can happen on any illegal
749 * instruction or only on FP instructions, whether there is a
750 * pattern to occurences etc. -dgibson 31/Mar/2003 */
751 if (!(reason & REASON_TRAP) && do_mathemu(regs) == 0) {
752 emulate_single_step(regs);
753 return;
754 }
755#endif /* CONFIG_MATH_EMULATION */
756 749
757 if (reason & REASON_FP) { 750 if (reason & REASON_FP) {
758 /* IEEE FP exception */ 751 /* IEEE FP exception */
@@ -778,6 +771,31 @@ void __kprobes program_check_exception(struct pt_regs *regs)
778 771
779 local_irq_enable(); 772 local_irq_enable();
780 773
774#ifdef CONFIG_MATH_EMULATION
775 /* (reason & REASON_ILLEGAL) would be the obvious thing here,
776 * but there seems to be a hardware bug on the 405GP (RevD)
777 * that means ESR is sometimes set incorrectly - either to
778 * ESR_DST (!?) or 0. In the process of chasing this with the
779 * hardware people - not sure if it can happen on any illegal
780 * instruction or only on FP instructions, whether there is a
781 * pattern to occurences etc. -dgibson 31/Mar/2003 */
782 switch (do_mathemu(regs)) {
783 case 0:
784 emulate_single_step(regs);
785 return;
786 case 1: {
787 int code = 0;
788 code = __parse_fpscr(current->thread.fpscr.val);
789 _exception(SIGFPE, regs, code, regs->nip);
790 return;
791 }
792 case -EFAULT:
793 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
794 return;
795 }
796 /* fall through on any other errors */
797#endif /* CONFIG_MATH_EMULATION */
798
781 /* Try to emulate it if we should. */ 799 /* Try to emulate it if we should. */
782 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) { 800 if (reason & (REASON_ILLEGAL | REASON_PRIVILEGED)) {
783 switch (emulate_instruction(regs)) { 801 switch (emulate_instruction(regs)) {
@@ -891,18 +909,39 @@ void SoftwareEmulation(struct pt_regs *regs)
891 909
892#ifdef CONFIG_MATH_EMULATION 910#ifdef CONFIG_MATH_EMULATION
893 errcode = do_mathemu(regs); 911 errcode = do_mathemu(regs);
912
913 switch (errcode) {
914 case 0:
915 emulate_single_step(regs);
916 return;
917 case 1: {
918 int code = 0;
919 code = __parse_fpscr(current->thread.fpscr.val);
920 _exception(SIGFPE, regs, code, regs->nip);
921 return;
922 }
923 case -EFAULT:
924 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
925 return;
926 default:
927 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
928 return;
929 }
930
894#else 931#else
895 errcode = Soft_emulate_8xx(regs); 932 errcode = Soft_emulate_8xx(regs);
896#endif 933 switch (errcode) {
897 if (errcode) { 934 case 0:
898 if (errcode > 0)
899 _exception(SIGFPE, regs, 0, 0);
900 else if (errcode == -EFAULT)
901 _exception(SIGSEGV, regs, 0, 0);
902 else
903 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
904 } else
905 emulate_single_step(regs); 935 emulate_single_step(regs);
936 return;
937 case 1:
938 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
939 return;
940 case -EFAULT:
941 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
942 return;
943 }
944#endif
906} 945}
907#endif /* CONFIG_8xx */ 946#endif /* CONFIG_8xx */
908 947
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 5730906b23d5..7e0971868fc2 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -45,6 +45,12 @@ void __init udbg_early_init(void)
45#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES) 45#elif defined(CONFIG_PPC_EARLY_DEBUG_ISERIES)
46 /* For iSeries - hit Ctrl-x Ctrl-x to see the output */ 46 /* For iSeries - hit Ctrl-x Ctrl-x to see the output */
47 udbg_init_iseries(); 47 udbg_init_iseries();
48#elif defined(CONFIG_PPC_EARLY_DEBUG_BEAT)
49 udbg_init_debug_beat();
50#elif defined(CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE)
51 udbg_init_pas_realmode();
52#elif defined(CONFIG_BOOTX_TEXT)
53 udbg_init_btext();
48#endif 54#endif
49} 55}
50 56
@@ -146,7 +152,7 @@ void __init disable_early_printk(void)
146{ 152{
147 if (!early_console_initialized) 153 if (!early_console_initialized)
148 return; 154 return;
149 if (strstr(saved_command_line, "udbg-immortal")) { 155 if (strstr(boot_command_line, "udbg-immortal")) {
150 printk(KERN_INFO "early console immortal !\n"); 156 printk(KERN_INFO "early console immortal !\n");
151 return; 157 return;
152 } 158 }
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 2d17f2b8eda7..e738f93b42fe 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -14,6 +14,8 @@
14 14
15extern u8 real_readb(volatile u8 __iomem *addr); 15extern u8 real_readb(volatile u8 __iomem *addr);
16extern void real_writeb(u8 data, volatile u8 __iomem *addr); 16extern void real_writeb(u8 data, volatile u8 __iomem *addr);
17extern u8 real_205_readb(volatile u8 __iomem *addr);
18extern void real_205_writeb(u8 data, volatile u8 __iomem *addr);
17 19
18struct NS16550 { 20struct NS16550 {
19 /* this struct must be packed */ 21 /* this struct must be packed */
@@ -167,3 +169,25 @@ void __init udbg_init_maple_realmode(void)
167 udbg_getc_poll = NULL; 169 udbg_getc_poll = NULL;
168} 170}
169#endif /* CONFIG_PPC_MAPLE */ 171#endif /* CONFIG_PPC_MAPLE */
172
173#ifdef CONFIG_PPC_PASEMI
174void udbg_pas_real_putc(char c)
175{
176 if (udbg_comport) {
177 while ((real_205_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
178 /* wait for idle */;
179 real_205_writeb(c, &udbg_comport->thr); eieio();
180 if (c == '\n')
181 udbg_pas_real_putc('\r');
182 }
183}
184
185void udbg_init_pas_realmode(void)
186{
187 udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8;
188
189 udbg_putc = udbg_pas_real_putc;
190 udbg_getc = NULL;
191 udbg_getc_poll = NULL;
192}
193#endif /* CONFIG_PPC_MAPLE */
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index ae0ede19879d..e46c31b36641 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -51,17 +51,21 @@
51 51
52extern char vdso32_start, vdso32_end; 52extern char vdso32_start, vdso32_end;
53static void *vdso32_kbase = &vdso32_start; 53static void *vdso32_kbase = &vdso32_start;
54unsigned int vdso32_pages; 54static unsigned int vdso32_pages;
55static struct page **vdso32_pagelist;
55unsigned long vdso32_sigtramp; 56unsigned long vdso32_sigtramp;
56unsigned long vdso32_rt_sigtramp; 57unsigned long vdso32_rt_sigtramp;
57 58
58#ifdef CONFIG_PPC64 59#ifdef CONFIG_PPC64
59extern char vdso64_start, vdso64_end; 60extern char vdso64_start, vdso64_end;
60static void *vdso64_kbase = &vdso64_start; 61static void *vdso64_kbase = &vdso64_start;
61unsigned int vdso64_pages; 62static unsigned int vdso64_pages;
63static struct page **vdso64_pagelist;
62unsigned long vdso64_rt_sigtramp; 64unsigned long vdso64_rt_sigtramp;
63#endif /* CONFIG_PPC64 */ 65#endif /* CONFIG_PPC64 */
64 66
67static int vdso_ready;
68
65/* 69/*
66 * The vdso data page (aka. systemcfg for old ppc64 fans) is here. 70 * The vdso data page (aka. systemcfg for old ppc64 fans) is here.
67 * Once the early boot kernel code no longer needs to muck around 71 * Once the early boot kernel code no longer needs to muck around
@@ -165,55 +169,6 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
165#endif /* DEBUG */ 169#endif /* DEBUG */
166 170
167/* 171/*
168 * Keep a dummy vma_close for now, it will prevent VMA merging.
169 */
170static void vdso_vma_close(struct vm_area_struct * vma)
171{
172}
173
174/*
175 * Our nopage() function, maps in the actual vDSO kernel pages, they will
176 * be mapped read-only by do_no_page(), and eventually COW'ed, either
177 * right away for an initial write access, or by do_wp_page().
178 */
179static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
180 unsigned long address, int *type)
181{
182 unsigned long offset = address - vma->vm_start;
183 struct page *pg;
184#ifdef CONFIG_PPC64
185 void *vbase = (vma->vm_mm->task_size > TASK_SIZE_USER32) ?
186 vdso64_kbase : vdso32_kbase;
187#else
188 void *vbase = vdso32_kbase;
189#endif
190
191 DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n",
192 current->comm, address, offset);
193
194 if (address < vma->vm_start || address > vma->vm_end)
195 return NOPAGE_SIGBUS;
196
197 /*
198 * Last page is systemcfg.
199 */
200 if ((vma->vm_end - address) <= PAGE_SIZE)
201 pg = virt_to_page(vdso_data);
202 else
203 pg = virt_to_page(vbase + offset);
204
205 get_page(pg);
206 DBG(" ->page count: %d\n", page_count(pg));
207
208 return pg;
209}
210
211static struct vm_operations_struct vdso_vmops = {
212 .close = vdso_vma_close,
213 .nopage = vdso_vma_nopage,
214};
215
216/*
217 * This is called from binfmt_elf, we create the special vma for the 172 * This is called from binfmt_elf, we create the special vma for the
218 * vDSO and insert it into the mm struct tree 173 * vDSO and insert it into the mm struct tree
219 */ 174 */
@@ -221,20 +176,26 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
221 int executable_stack) 176 int executable_stack)
222{ 177{
223 struct mm_struct *mm = current->mm; 178 struct mm_struct *mm = current->mm;
224 struct vm_area_struct *vma; 179 struct page **vdso_pagelist;
225 unsigned long vdso_pages; 180 unsigned long vdso_pages;
226 unsigned long vdso_base; 181 unsigned long vdso_base;
227 int rc; 182 int rc;
228 183
184 if (!vdso_ready)
185 return 0;
186
229#ifdef CONFIG_PPC64 187#ifdef CONFIG_PPC64
230 if (test_thread_flag(TIF_32BIT)) { 188 if (test_thread_flag(TIF_32BIT)) {
189 vdso_pagelist = vdso32_pagelist;
231 vdso_pages = vdso32_pages; 190 vdso_pages = vdso32_pages;
232 vdso_base = VDSO32_MBASE; 191 vdso_base = VDSO32_MBASE;
233 } else { 192 } else {
193 vdso_pagelist = vdso64_pagelist;
234 vdso_pages = vdso64_pages; 194 vdso_pages = vdso64_pages;
235 vdso_base = VDSO64_MBASE; 195 vdso_base = VDSO64_MBASE;
236 } 196 }
237#else 197#else
198 vdso_pagelist = vdso32_pagelist;
238 vdso_pages = vdso32_pages; 199 vdso_pages = vdso32_pages;
239 vdso_base = VDSO32_MBASE; 200 vdso_base = VDSO32_MBASE;
240#endif 201#endif
@@ -262,17 +223,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
262 goto fail_mmapsem; 223 goto fail_mmapsem;
263 } 224 }
264 225
265
266 /* Allocate a VMA structure and fill it up */
267 vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
268 if (vma == NULL) {
269 rc = -ENOMEM;
270 goto fail_mmapsem;
271 }
272 vma->vm_mm = mm;
273 vma->vm_start = vdso_base;
274 vma->vm_end = vma->vm_start + (vdso_pages << PAGE_SHIFT);
275
276 /* 226 /*
277 * our vma flags don't have VM_WRITE so by default, the process isn't 227 * our vma flags don't have VM_WRITE so by default, the process isn't
278 * allowed to write those pages. 228 * allowed to write those pages.
@@ -282,32 +232,26 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
282 * and your nice userland gettimeofday will be totally dead. 232 * and your nice userland gettimeofday will be totally dead.
283 * It's fine to use that for setting breakpoints in the vDSO code 233 * It's fine to use that for setting breakpoints in the vDSO code
284 * pages though 234 * pages though
285 */ 235 *
286 vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC;
287 /*
288 * Make sure the vDSO gets into every core dump. 236 * Make sure the vDSO gets into every core dump.
289 * Dumping its contents makes post-mortem fully interpretable later 237 * Dumping its contents makes post-mortem fully interpretable later
290 * without matching up the same kernel and hardware config to see 238 * without matching up the same kernel and hardware config to see
291 * what PC values meant. 239 * what PC values meant.
292 */ 240 */
293 vma->vm_flags |= VM_ALWAYSDUMP; 241 rc = install_special_mapping(mm, vdso_base, vdso_pages << PAGE_SHIFT,
294 vma->vm_flags |= mm->def_flags; 242 VM_READ|VM_EXEC|
295 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; 243 VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC|
296 vma->vm_ops = &vdso_vmops; 244 VM_ALWAYSDUMP,
297 245 vdso_pagelist);
298 /* Insert new VMA */
299 rc = insert_vm_struct(mm, vma);
300 if (rc) 246 if (rc)
301 goto fail_vma; 247 goto fail_mmapsem;
302 248
303 /* Put vDSO base into mm struct and account for memory usage */ 249 /* Put vDSO base into mm struct */
304 current->mm->context.vdso_base = vdso_base; 250 current->mm->context.vdso_base = vdso_base;
305 mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 251
306 up_write(&mm->mmap_sem); 252 up_write(&mm->mmap_sem);
307 return 0; 253 return 0;
308 254
309 fail_vma:
310 kmem_cache_free(vm_area_cachep, vma);
311 fail_mmapsem: 255 fail_mmapsem:
312 up_write(&mm->mmap_sem); 256 up_write(&mm->mmap_sem);
313 return rc; 257 return rc;
@@ -719,7 +663,7 @@ static void __init vdso_setup_syscall_map(void)
719} 663}
720 664
721 665
722void __init vdso_init(void) 666static int __init vdso_init(void)
723{ 667{
724 int i; 668 int i;
725 669
@@ -774,26 +718,44 @@ void __init vdso_init(void)
774#ifdef CONFIG_PPC64 718#ifdef CONFIG_PPC64
775 vdso64_pages = 0; 719 vdso64_pages = 0;
776#endif 720#endif
777 return; 721 return 0;
778 } 722 }
779 723
780 /* Make sure pages are in the correct state */ 724 /* Make sure pages are in the correct state */
725 vdso32_pagelist = kzalloc(sizeof(struct page *) * (vdso32_pages + 2),
726 GFP_KERNEL);
727 BUG_ON(vdso32_pagelist == NULL);
781 for (i = 0; i < vdso32_pages; i++) { 728 for (i = 0; i < vdso32_pages; i++) {
782 struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); 729 struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
783 ClearPageReserved(pg); 730 ClearPageReserved(pg);
784 get_page(pg); 731 get_page(pg);
785 732 vdso32_pagelist[i] = pg;
786 } 733 }
734 vdso32_pagelist[i++] = virt_to_page(vdso_data);
735 vdso32_pagelist[i] = NULL;
736
787#ifdef CONFIG_PPC64 737#ifdef CONFIG_PPC64
738 vdso64_pagelist = kzalloc(sizeof(struct page *) * (vdso64_pages + 2),
739 GFP_KERNEL);
740 BUG_ON(vdso64_pagelist == NULL);
788 for (i = 0; i < vdso64_pages; i++) { 741 for (i = 0; i < vdso64_pages; i++) {
789 struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); 742 struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
790 ClearPageReserved(pg); 743 ClearPageReserved(pg);
791 get_page(pg); 744 get_page(pg);
745 vdso64_pagelist[i] = pg;
792 } 746 }
747 vdso64_pagelist[i++] = virt_to_page(vdso_data);
748 vdso64_pagelist[i] = NULL;
793#endif /* CONFIG_PPC64 */ 749#endif /* CONFIG_PPC64 */
794 750
795 get_page(virt_to_page(vdso_data)); 751 get_page(virt_to_page(vdso_data));
752
753 smp_wmb();
754 vdso_ready = 1;
755
756 return 0;
796} 757}
758arch_initcall(vdso_init);
797 759
798int in_gate_area_no_task(unsigned long addr) 760int in_gate_area_no_task(unsigned long addr)
799{ 761{
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index a80f8f1d2e5d..2968ffeafdb6 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -199,10 +199,8 @@ EXPORT_SYMBOL(vio_unregister_driver);
199/* vio_dev refcount hit 0 */ 199/* vio_dev refcount hit 0 */
200static void __devinit vio_dev_release(struct device *dev) 200static void __devinit vio_dev_release(struct device *dev)
201{ 201{
202 if (dev->archdata.of_node) { 202 /* XXX should free TCE table */
203 /* XXX should free TCE table */ 203 of_node_put(dev->archdata.of_node);
204 of_node_put(dev->archdata.of_node);
205 }
206 kfree(to_vio_dev(dev)); 204 kfree(to_vio_dev(dev));
207} 205}
208 206
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 04b8e71bf5b0..7eefeb4a30e7 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -131,14 +131,14 @@ SECTIONS
131 __stop___fw_ftr_fixup = .; 131 __stop___fw_ftr_fixup = .;
132 } 132 }
133#endif 133#endif
134 134#ifdef CONFIG_BLK_DEV_INITRD
135 . = ALIGN(PAGE_SIZE); 135 . = ALIGN(PAGE_SIZE);
136 .init.ramfs : { 136 .init.ramfs : {
137 __initramfs_start = .; 137 __initramfs_start = .;
138 *(.init.ramfs) 138 *(.init.ramfs)
139 __initramfs_end = .; 139 __initramfs_end = .;
140 } 140 }
141 141#endif
142#ifdef CONFIG_PPC32 142#ifdef CONFIG_PPC32
143 . = ALIGN(32); 143 . = ALIGN(32);
144#else 144#else
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index a0360ae10d0c..4b1ba49fbd9e 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -16,13 +16,15 @@ obj-$(CONFIG_PPC64) += checksum_64.o copypage_64.o copyuser_64.o \
16 strcase.o 16 strcase.o
17obj-$(CONFIG_QUICC_ENGINE) += rheap.o 17obj-$(CONFIG_QUICC_ENGINE) += rheap.o
18obj-$(CONFIG_XMON) += sstep.o 18obj-$(CONFIG_XMON) += sstep.o
19obj-$(CONFIG_KPROBES) += sstep.o
20obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
19 21
20ifeq ($(CONFIG_PPC64),y) 22ifeq ($(CONFIG_PPC64),y)
21obj-$(CONFIG_SMP) += locks.o 23obj-$(CONFIG_SMP) += locks.o
22obj-$(CONFIG_DEBUG_KERNEL) += sstep.o
23endif 24endif
24 25
25# Temporary hack until we have migrated to asm-powerpc 26# Temporary hack until we have migrated to asm-powerpc
26ifeq ($(CONFIG_PPC_MERGE),y) 27ifeq ($(CONFIG_PPC_MERGE),y)
28obj-$(CONFIG_8xx) += rheap.o
27obj-$(CONFIG_CPM2) += rheap.o 29obj-$(CONFIG_CPM2) += rheap.o
28endif 30endif
diff --git a/arch/powerpc/lib/dma-noncoherent.c b/arch/powerpc/lib/dma-noncoherent.c
new file mode 100644
index 000000000000..48f3d13a3de5
--- /dev/null
+++ b/arch/powerpc/lib/dma-noncoherent.c
@@ -0,0 +1,418 @@
1/*
2 * PowerPC version derived from arch/arm/mm/consistent.c
3 * Copyright (C) 2001 Dan Malek (dmalek@jlc.net)
4 *
5 * Copyright (C) 2000 Russell King
6 *
7 * Consistent memory allocators. Used for DMA devices that want to
8 * share uncached memory with the processor core. The function return
9 * is the virtual address and 'dma_handle' is the physical address.
10 * Mostly stolen from the ARM port, with some changes for PowerPC.
11 * -- Dan
12 *
13 * Reorganized to get rid of the arch-specific consistent_* functions
14 * and provide non-coherent implementations for the DMA API. -Matt
15 *
16 * Added in_interrupt() safe dma_alloc_coherent()/dma_free_coherent()
17 * implementation. This is pulled straight from ARM and barely
18 * modified. -Matt
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License version 2 as
22 * published by the Free Software Foundation.
23 */
24
25#include <linux/sched.h>
26#include <linux/kernel.h>
27#include <linux/errno.h>
28#include <linux/string.h>
29#include <linux/types.h>
30#include <linux/highmem.h>
31#include <linux/dma-mapping.h>
32
33#include <asm/tlbflush.h>
34
35/*
36 * This address range defaults to a value that is safe for all
37 * platforms which currently set CONFIG_NOT_COHERENT_CACHE. It
38 * can be further configured for specific applications under
39 * the "Advanced Setup" menu. -Matt
40 */
41#define CONSISTENT_BASE (CONFIG_CONSISTENT_START)
42#define CONSISTENT_END (CONFIG_CONSISTENT_START + CONFIG_CONSISTENT_SIZE)
43#define CONSISTENT_OFFSET(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PAGE_SHIFT)
44
45/*
46 * This is the page table (2MB) covering uncached, DMA consistent allocations
47 */
48static pte_t *consistent_pte;
49static DEFINE_SPINLOCK(consistent_lock);
50
51/*
52 * VM region handling support.
53 *
54 * This should become something generic, handling VM region allocations for
55 * vmalloc and similar (ioremap, module space, etc).
56 *
57 * I envisage vmalloc()'s supporting vm_struct becoming:
58 *
59 * struct vm_struct {
60 * struct vm_region region;
61 * unsigned long flags;
62 * struct page **pages;
63 * unsigned int nr_pages;
64 * unsigned long phys_addr;
65 * };
66 *
67 * get_vm_area() would then call vm_region_alloc with an appropriate
68 * struct vm_region head (eg):
69 *
70 * struct vm_region vmalloc_head = {
71 * .vm_list = LIST_HEAD_INIT(vmalloc_head.vm_list),
72 * .vm_start = VMALLOC_START,
73 * .vm_end = VMALLOC_END,
74 * };
75 *
76 * However, vmalloc_head.vm_start is variable (typically, it is dependent on
77 * the amount of RAM found at boot time.) I would imagine that get_vm_area()
78 * would have to initialise this each time prior to calling vm_region_alloc().
79 */
80struct vm_region {
81 struct list_head vm_list;
82 unsigned long vm_start;
83 unsigned long vm_end;
84};
85
86static struct vm_region consistent_head = {
87 .vm_list = LIST_HEAD_INIT(consistent_head.vm_list),
88 .vm_start = CONSISTENT_BASE,
89 .vm_end = CONSISTENT_END,
90};
91
92static struct vm_region *
93vm_region_alloc(struct vm_region *head, size_t size, gfp_t gfp)
94{
95 unsigned long addr = head->vm_start, end = head->vm_end - size;
96 unsigned long flags;
97 struct vm_region *c, *new;
98
99 new = kmalloc(sizeof(struct vm_region), gfp);
100 if (!new)
101 goto out;
102
103 spin_lock_irqsave(&consistent_lock, flags);
104
105 list_for_each_entry(c, &head->vm_list, vm_list) {
106 if ((addr + size) < addr)
107 goto nospc;
108 if ((addr + size) <= c->vm_start)
109 goto found;
110 addr = c->vm_end;
111 if (addr > end)
112 goto nospc;
113 }
114
115 found:
116 /*
117 * Insert this entry _before_ the one we found.
118 */
119 list_add_tail(&new->vm_list, &c->vm_list);
120 new->vm_start = addr;
121 new->vm_end = addr + size;
122
123 spin_unlock_irqrestore(&consistent_lock, flags);
124 return new;
125
126 nospc:
127 spin_unlock_irqrestore(&consistent_lock, flags);
128 kfree(new);
129 out:
130 return NULL;
131}
132
133static struct vm_region *vm_region_find(struct vm_region *head, unsigned long addr)
134{
135 struct vm_region *c;
136
137 list_for_each_entry(c, &head->vm_list, vm_list) {
138 if (c->vm_start == addr)
139 goto out;
140 }
141 c = NULL;
142 out:
143 return c;
144}
145
146/*
147 * Allocate DMA-coherent memory space and return both the kernel remapped
148 * virtual and bus address for that space.
149 */
150void *
151__dma_alloc_coherent(size_t size, dma_addr_t *handle, gfp_t gfp)
152{
153 struct page *page;
154 struct vm_region *c;
155 unsigned long order;
156 u64 mask = 0x00ffffff, limit; /* ISA default */
157
158 if (!consistent_pte) {
159 printk(KERN_ERR "%s: not initialised\n", __func__);
160 dump_stack();
161 return NULL;
162 }
163
164 size = PAGE_ALIGN(size);
165 limit = (mask + 1) & ~mask;
166 if ((limit && size >= limit) || size >= (CONSISTENT_END - CONSISTENT_BASE)) {
167 printk(KERN_WARNING "coherent allocation too big (requested %#x mask %#Lx)\n",
168 size, mask);
169 return NULL;
170 }
171
172 order = get_order(size);
173
174 if (mask != 0xffffffff)
175 gfp |= GFP_DMA;
176
177 page = alloc_pages(gfp, order);
178 if (!page)
179 goto no_page;
180
181 /*
182 * Invalidate any data that might be lurking in the
183 * kernel direct-mapped region for device DMA.
184 */
185 {
186 unsigned long kaddr = (unsigned long)page_address(page);
187 memset(page_address(page), 0, size);
188 flush_dcache_range(kaddr, kaddr + size);
189 }
190
191 /*
192 * Allocate a virtual address in the consistent mapping region.
193 */
194 c = vm_region_alloc(&consistent_head, size,
195 gfp & ~(__GFP_DMA | __GFP_HIGHMEM));
196 if (c) {
197 unsigned long vaddr = c->vm_start;
198 pte_t *pte = consistent_pte + CONSISTENT_OFFSET(vaddr);
199 struct page *end = page + (1 << order);
200
201 split_page(page, order);
202
203 /*
204 * Set the "dma handle"
205 */
206 *handle = page_to_bus(page);
207
208 do {
209 BUG_ON(!pte_none(*pte));
210
211 SetPageReserved(page);
212 set_pte_at(&init_mm, vaddr,
213 pte, mk_pte(page, pgprot_noncached(PAGE_KERNEL)));
214 page++;
215 pte++;
216 vaddr += PAGE_SIZE;
217 } while (size -= PAGE_SIZE);
218
219 /*
220 * Free the otherwise unused pages.
221 */
222 while (page < end) {
223 __free_page(page);
224 page++;
225 }
226
227 return (void *)c->vm_start;
228 }
229
230 if (page)
231 __free_pages(page, order);
232 no_page:
233 return NULL;
234}
235EXPORT_SYMBOL(__dma_alloc_coherent);
236
237/*
238 * free a page as defined by the above mapping.
239 */
240void __dma_free_coherent(size_t size, void *vaddr)
241{
242 struct vm_region *c;
243 unsigned long flags, addr;
244 pte_t *ptep;
245
246 size = PAGE_ALIGN(size);
247
248 spin_lock_irqsave(&consistent_lock, flags);
249
250 c = vm_region_find(&consistent_head, (unsigned long)vaddr);
251 if (!c)
252 goto no_area;
253
254 if ((c->vm_end - c->vm_start) != size) {
255 printk(KERN_ERR "%s: freeing wrong coherent size (%ld != %d)\n",
256 __func__, c->vm_end - c->vm_start, size);
257 dump_stack();
258 size = c->vm_end - c->vm_start;
259 }
260
261 ptep = consistent_pte + CONSISTENT_OFFSET(c->vm_start);
262 addr = c->vm_start;
263 do {
264 pte_t pte = ptep_get_and_clear(&init_mm, addr, ptep);
265 unsigned long pfn;
266
267 ptep++;
268 addr += PAGE_SIZE;
269
270 if (!pte_none(pte) && pte_present(pte)) {
271 pfn = pte_pfn(pte);
272
273 if (pfn_valid(pfn)) {
274 struct page *page = pfn_to_page(pfn);
275 ClearPageReserved(page);
276
277 __free_page(page);
278 continue;
279 }
280 }
281
282 printk(KERN_CRIT "%s: bad page in kernel page table\n",
283 __func__);
284 } while (size -= PAGE_SIZE);
285
286 flush_tlb_kernel_range(c->vm_start, c->vm_end);
287
288 list_del(&c->vm_list);
289
290 spin_unlock_irqrestore(&consistent_lock, flags);
291
292 kfree(c);
293 return;
294
295 no_area:
296 spin_unlock_irqrestore(&consistent_lock, flags);
297 printk(KERN_ERR "%s: trying to free invalid coherent area: %p\n",
298 __func__, vaddr);
299 dump_stack();
300}
301EXPORT_SYMBOL(__dma_free_coherent);
302
303/*
304 * Initialise the consistent memory allocation.
305 */
306static int __init dma_alloc_init(void)
307{
308 pgd_t *pgd;
309 pmd_t *pmd;
310 pte_t *pte;
311 int ret = 0;
312
313 do {
314 pgd = pgd_offset(&init_mm, CONSISTENT_BASE);
315 pmd = pmd_alloc(&init_mm, pgd, CONSISTENT_BASE);
316 if (!pmd) {
317 printk(KERN_ERR "%s: no pmd tables\n", __func__);
318 ret = -ENOMEM;
319 break;
320 }
321 WARN_ON(!pmd_none(*pmd));
322
323 pte = pte_alloc_kernel(pmd, CONSISTENT_BASE);
324 if (!pte) {
325 printk(KERN_ERR "%s: no pte tables\n", __func__);
326 ret = -ENOMEM;
327 break;
328 }
329
330 consistent_pte = pte;
331 } while (0);
332
333 return ret;
334}
335
336core_initcall(dma_alloc_init);
337
338/*
339 * make an area consistent.
340 */
341void __dma_sync(void *vaddr, size_t size, int direction)
342{
343 unsigned long start = (unsigned long)vaddr;
344 unsigned long end = start + size;
345
346 switch (direction) {
347 case DMA_NONE:
348 BUG();
349 case DMA_FROM_DEVICE: /* invalidate only */
350 invalidate_dcache_range(start, end);
351 break;
352 case DMA_TO_DEVICE: /* writeback only */
353 clean_dcache_range(start, end);
354 break;
355 case DMA_BIDIRECTIONAL: /* writeback and invalidate */
356 flush_dcache_range(start, end);
357 break;
358 }
359}
360EXPORT_SYMBOL(__dma_sync);
361
362#ifdef CONFIG_HIGHMEM
363/*
364 * __dma_sync_page() implementation for systems using highmem.
365 * In this case, each page of a buffer must be kmapped/kunmapped
366 * in order to have a virtual address for __dma_sync(). This must
367 * not sleep so kmap_atomic()/kunmap_atomic() are used.
368 *
369 * Note: yes, it is possible and correct to have a buffer extend
370 * beyond the first page.
371 */
372static inline void __dma_sync_page_highmem(struct page *page,
373 unsigned long offset, size_t size, int direction)
374{
375 size_t seg_size = min((size_t)(PAGE_SIZE - offset), size);
376 size_t cur_size = seg_size;
377 unsigned long flags, start, seg_offset = offset;
378 int nr_segs = 1 + ((size - seg_size) + PAGE_SIZE - 1)/PAGE_SIZE;
379 int seg_nr = 0;
380
381 local_irq_save(flags);
382
383 do {
384 start = (unsigned long)kmap_atomic(page + seg_nr,
385 KM_PPC_SYNC_PAGE) + seg_offset;
386
387 /* Sync this buffer segment */
388 __dma_sync((void *)start, seg_size, direction);
389 kunmap_atomic((void *)start, KM_PPC_SYNC_PAGE);
390 seg_nr++;
391
392 /* Calculate next buffer segment size */
393 seg_size = min((size_t)PAGE_SIZE, size - cur_size);
394
395 /* Add the segment size to our running total */
396 cur_size += seg_size;
397 seg_offset = 0;
398 } while (seg_nr < nr_segs);
399
400 local_irq_restore(flags);
401}
402#endif /* CONFIG_HIGHMEM */
403
404/*
405 * __dma_sync_page makes memory consistent. identical to __dma_sync, but
406 * takes a struct page instead of a virtual address
407 */
408void __dma_sync_page(struct page *page, unsigned long offset,
409 size_t size, int direction)
410{
411#ifdef CONFIG_HIGHMEM
412 __dma_sync_page_highmem(page, offset, size, direction);
413#else
414 unsigned long start = (unsigned long)page_address(page) + offset;
415 __dma_sync((void *)start, size, direction);
416#endif
417}
418EXPORT_SYMBOL(__dma_sync_page);
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c
index 57bf991ccd6e..6c5c5dd183ee 100644
--- a/arch/powerpc/lib/rheap.c
+++ b/arch/powerpc/lib/rheap.c
@@ -14,6 +14,7 @@
14 */ 14 */
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/kernel.h>
17#include <linux/mm.h> 18#include <linux/mm.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19 20
@@ -85,7 +86,8 @@ static int grow(rh_info_t * info, int max_blocks)
85 info->flags &= ~RHIF_STATIC_BLOCK; 86 info->flags &= ~RHIF_STATIC_BLOCK;
86 87
87 /* add all new blocks to the free list */ 88 /* add all new blocks to the free list */
88 for (i = 0, blk = block + info->max_blocks; i < new_blocks; i++, blk++) 89 blk = block + info->max_blocks - new_blocks;
90 for (i = 0; i < new_blocks; i++, blk++)
89 list_add(&blk->list, &info->empty_list); 91 list_add(&blk->list, &info->empty_list);
90 92
91 return 0; 93 return 0;
@@ -670,7 +672,7 @@ void rh_dump(rh_info_t * info)
670 int maxnr; 672 int maxnr;
671 int i, nr; 673 int i, nr;
672 674
673 maxnr = sizeof(st) / sizeof(st[0]); 675 maxnr = ARRAY_SIZE(st);
674 676
675 printk(KERN_INFO 677 printk(KERN_INFO
676 "info @0x%p (%d slots empty / %d max)\n", 678 "info @0x%p (%d slots empty / %d max)\n",
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 1bb20d841080..8c77c791f87e 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -1014,7 +1014,6 @@ repeat:
1014 1014
1015 /* Primary is full, try the secondary */ 1015 /* Primary is full, try the secondary */
1016 if (unlikely(slot == -1)) { 1016 if (unlikely(slot == -1)) {
1017 new_pte |= _PAGE_F_SECOND;
1018 hpte_group = ((~hash & htab_hash_mask) * 1017 hpte_group = ((~hash & htab_hash_mask) *
1019 HPTES_PER_GROUP) & ~0x7UL; 1018 HPTES_PER_GROUP) & ~0x7UL;
1020 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 1019 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags,
@@ -1033,7 +1032,7 @@ repeat:
1033 if (unlikely(slot == -2)) 1032 if (unlikely(slot == -2))
1034 panic("hash_huge_page: pte_insert failed\n"); 1033 panic("hash_huge_page: pte_insert failed\n");
1035 1034
1036 new_pte |= (slot << 12) & _PAGE_F_GIX; 1035 new_pte |= (slot << 12) & (_PAGE_F_SECOND | _PAGE_F_GIX);
1037 } 1036 }
1038 1037
1039 /* 1038 /*
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index d1c0758c5611..52f397c108a7 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -61,10 +61,6 @@ unsigned long memory_limit;
61extern void hash_preload(struct mm_struct *mm, unsigned long ea, 61extern void hash_preload(struct mm_struct *mm, unsigned long ea,
62 unsigned long access, unsigned long trap); 62 unsigned long access, unsigned long trap);
63 63
64/*
65 * This is called by /dev/mem to know if a given address has to
66 * be mapped non-cacheable or not
67 */
68int page_is_ram(unsigned long pfn) 64int page_is_ram(unsigned long pfn)
69{ 65{
70 unsigned long paddr = (pfn << PAGE_SHIFT); 66 unsigned long paddr = (pfn << PAGE_SHIFT);
@@ -388,9 +384,6 @@ void __init mem_init(void)
388 initsize >> 10); 384 initsize >> 10);
389 385
390 mem_init_done = 1; 386 mem_init_done = 1;
391
392 /* Initialize the vDSO */
393 vdso_init();
394} 387}
395 388
396/* 389/*
@@ -490,19 +483,19 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
490 !cpu_has_feature(CPU_FTR_NOEXECUTE) && 483 !cpu_has_feature(CPU_FTR_NOEXECUTE) &&
491 pfn_valid(pfn)) { 484 pfn_valid(pfn)) {
492 struct page *page = pfn_to_page(pfn); 485 struct page *page = pfn_to_page(pfn);
486#ifdef CONFIG_8xx
487 /* On 8xx, cache control instructions (particularly
488 * "dcbst" from flush_dcache_icache) fault as write
489 * operation if there is an unpopulated TLB entry
490 * for the address in question. To workaround that,
491 * we invalidate the TLB here, thus avoiding dcbst
492 * misbehaviour.
493 */
494 _tlbie(address);
495#endif
493 if (!PageReserved(page) 496 if (!PageReserved(page)
494 && !test_bit(PG_arch_1, &page->flags)) { 497 && !test_bit(PG_arch_1, &page->flags)) {
495 if (vma->vm_mm == current->active_mm) { 498 if (vma->vm_mm == current->active_mm) {
496#ifdef CONFIG_8xx
497 /* On 8xx, cache control instructions (particularly
498 * "dcbst" from flush_dcache_icache) fault as write
499 * operation if there is an unpopulated TLB entry
500 * for the address in question. To workaround that,
501 * we invalidate the TLB here, thus avoiding dcbst
502 * misbehaviour.
503 */
504 _tlbie(address);
505#endif
506 __flush_dcache_icache((void *) address); 499 __flush_dcache_icache((void *) address);
507 } else 500 } else
508 flush_dcache_icache_page(page); 501 flush_dcache_icache_page(page);
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 262790910ff2..e86c37c82cfd 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -154,7 +154,7 @@ EXPORT_SYMBOL_GPL(of_node_to_nid);
154 * characteristics relative to its multiple connections. We ignore 154 * characteristics relative to its multiple connections. We ignore
155 * this for now. We also assume that all cpu and memory sets have 155 * this for now. We also assume that all cpu and memory sets have
156 * their distances represented at a common level. This won't be 156 * their distances represented at a common level. This won't be
157 * true for heirarchical NUMA. 157 * true for hierarchical NUMA.
158 * 158 *
159 * In any case the ibm,associativity-reference-points should give 159 * In any case the ibm,associativity-reference-points should give
160 * the correct depth for a normal NUMA system. 160 * the correct depth for a normal NUMA system.
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 1891dbeeb8e9..c284bdac9947 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -294,11 +294,8 @@ void __init mapin_ram(void)
294 } 294 }
295} 295}
296 296
297/* is x a power of 2? */
298#define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0))
299
300/* is x a power of 4? */ 297/* is x a power of 4? */
301#define is_power_of_4(x) ((x) != 0 && (((x) & (x-1)) == 0) && (ffs(x) & 1)) 298#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1)
302 299
303/* 300/*
304 * Set up a mapping for a block of I/O. 301 * Set up a mapping for a block of I/O.
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 16e4ee1c2318..1d443407423c 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -103,7 +103,7 @@ static int map_io_page(unsigned long ea, unsigned long pa, int flags)
103 * 103 *
104 */ 104 */
105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags, 105 if (htab_bolt_mapping(ea, ea + PAGE_SIZE, pa, flags,
106 mmu_virtual_psize)) { 106 mmu_io_psize)) {
107 printk(KERN_ERR "Failed to do bolted mapping IO " 107 printk(KERN_ERR "Failed to do bolted mapping IO "
108 "memory at %016lx !\n", pa); 108 "memory at %016lx !\n", pa);
109 return -ENOMEM; 109 return -ENOMEM;
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index b6d82390b6a6..fbd62eacfdf4 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -149,6 +149,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
149#ifdef CONFIG_PPC64 149#ifdef CONFIG_PPC64
150#ifdef CONFIG_PPC_CELL_NATIVE 150#ifdef CONFIG_PPC_CELL_NATIVE
151 case PPC_OPROFILE_CELL: 151 case PPC_OPROFILE_CELL:
152 if (firmware_has_feature(FW_FEATURE_LPAR))
153 return -ENODEV;
152 model = &op_model_cell; 154 model = &op_model_cell;
153 break; 155 break;
154#endif 156#endif
diff --git a/arch/powerpc/oprofile/op_model_7450.c b/arch/powerpc/oprofile/op_model_7450.c
index f481c0ed5e67..5d1bbaf35ccb 100644
--- a/arch/powerpc/oprofile/op_model_7450.c
+++ b/arch/powerpc/oprofile/op_model_7450.c
@@ -137,9 +137,9 @@ static void fsl7450_start(struct op_counter_config *ctr)
137 137
138 for (i = 0; i < NUM_CTRS; ++i) { 138 for (i = 0; i < NUM_CTRS; ++i) {
139 if (ctr[i].enabled) 139 if (ctr[i].enabled)
140 ctr_write(i, reset_value[i]); 140 classic_ctr_write(i, reset_value[i]);
141 else 141 else
142 ctr_write(i, 0); 142 classic_ctr_write(i, 0);
143 } 143 }
144 144
145 /* Clear the freeze bit, and enable the interrupt. 145 /* Clear the freeze bit, and enable the interrupt.
@@ -179,13 +179,13 @@ static void fsl7450_handle_interrupt(struct pt_regs *regs,
179 is_kernel = is_kernel_addr(pc); 179 is_kernel = is_kernel_addr(pc);
180 180
181 for (i = 0; i < NUM_CTRS; ++i) { 181 for (i = 0; i < NUM_CTRS; ++i) {
182 val = ctr_read(i); 182 val = classic_ctr_read(i);
183 if (val < 0) { 183 if (val < 0) {
184 if (oprofile_running && ctr[i].enabled) { 184 if (oprofile_running && ctr[i].enabled) {
185 oprofile_add_ext_sample(pc, regs, i, is_kernel); 185 oprofile_add_ext_sample(pc, regs, i, is_kernel);
186 ctr_write(i, reset_value[i]); 186 classic_ctr_write(i, reset_value[i]);
187 } else { 187 } else {
188 ctr_write(i, 0); 188 classic_ctr_write(i, 0);
189 } 189 }
190 } 190 }
191 } 191 }
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index 2eb15f388103..e08e1d7b3dc5 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -39,10 +39,17 @@
39#include "../platforms/cell/interrupt.h" 39#include "../platforms/cell/interrupt.h"
40 40
41#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */ 41#define PPU_CYCLES_EVENT_NUM 1 /* event number for CYCLES */
42#define PPU_CYCLES_GRP_NUM 1 /* special group number for identifying
43 * PPU_CYCLES event
44 */
42#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */ 45#define CBE_COUNT_ALL_CYCLES 0x42800000 /* PPU cycle event specifier */
43 46
44#define NUM_THREADS 2 47#define NUM_THREADS 2 /* number of physical threads in
45#define VIRT_CNTR_SW_TIME_NS 100000000 // 0.5 seconds 48 * physical processor
49 */
50#define NUM_TRACE_BUS_WORDS 4
51#define NUM_INPUT_BUS_WORDS 2
52
46 53
47struct pmc_cntrl_data { 54struct pmc_cntrl_data {
48 unsigned long vcntr; 55 unsigned long vcntr;
@@ -58,7 +65,7 @@ struct pmc_cntrl_data {
58struct pm_signal { 65struct pm_signal {
59 u16 cpu; /* Processor to modify */ 66 u16 cpu; /* Processor to modify */
60 u16 sub_unit; /* hw subunit this applies to (if applicable) */ 67 u16 sub_unit; /* hw subunit this applies to (if applicable) */
61 u16 signal_group; /* Signal Group to Enable/Disable */ 68 short int signal_group; /* Signal Group to Enable/Disable */
62 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event 69 u8 bus_word; /* Enable/Disable on this Trace/Trigger/Event
63 * Bus Word(s) (bitmask) 70 * Bus Word(s) (bitmask)
64 */ 71 */
@@ -93,7 +100,6 @@ static struct {
93 u32 pm07_cntrl[NR_PHYS_CTRS]; 100 u32 pm07_cntrl[NR_PHYS_CTRS];
94} pm_regs; 101} pm_regs;
95 102
96
97#define GET_SUB_UNIT(x) ((x & 0x0000f000) >> 12) 103#define GET_SUB_UNIT(x) ((x & 0x0000f000) >> 12)
98#define GET_BUS_WORD(x) ((x & 0x000000f0) >> 4) 104#define GET_BUS_WORD(x) ((x & 0x000000f0) >> 4)
99#define GET_BUS_TYPE(x) ((x & 0x00000300) >> 8) 105#define GET_BUS_TYPE(x) ((x & 0x00000300) >> 8)
@@ -101,7 +107,6 @@ static struct {
101#define GET_COUNT_CYCLES(x) (x & 0x00000001) 107#define GET_COUNT_CYCLES(x) (x & 0x00000001)
102#define GET_INPUT_CONTROL(x) ((x & 0x00000004) >> 2) 108#define GET_INPUT_CONTROL(x) ((x & 0x00000004) >> 2)
103 109
104
105static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values); 110static DEFINE_PER_CPU(unsigned long[NR_PHYS_CTRS], pmc_values);
106 111
107static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS]; 112static struct pmc_cntrl_data pmc_cntrl[NUM_THREADS][NR_PHYS_CTRS];
@@ -129,8 +134,8 @@ static spinlock_t virt_cntr_lock = SPIN_LOCK_UNLOCKED;
129 134
130static u32 ctr_enabled; 135static u32 ctr_enabled;
131 136
132static unsigned char trace_bus[4]; 137static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
133static unsigned char input_bus[2]; 138static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
134 139
135/* 140/*
136 * Firmware interface functions 141 * Firmware interface functions
@@ -177,25 +182,40 @@ static void pm_rtas_reset_signals(u32 node)
177static void pm_rtas_activate_signals(u32 node, u32 count) 182static void pm_rtas_activate_signals(u32 node, u32 count)
178{ 183{
179 int ret; 184 int ret;
180 int j; 185 int i, j;
181 struct pm_signal pm_signal_local[NR_PHYS_CTRS]; 186 struct pm_signal pm_signal_local[NR_PHYS_CTRS];
182 187
188 /* There is no debug setup required for the cycles event.
189 * Note that only events in the same group can be used.
190 * Otherwise, there will be conflicts in correctly routing
191 * the signals on the debug bus. It is the responsiblity
192 * of the OProfile user tool to check the events are in
193 * the same group.
194 */
195 i = 0;
183 for (j = 0; j < count; j++) { 196 for (j = 0; j < count; j++) {
184 /* fw expects physical cpu # */ 197 if (pm_signal[j].signal_group != PPU_CYCLES_GRP_NUM) {
185 pm_signal_local[j].cpu = node; 198
186 pm_signal_local[j].signal_group = pm_signal[j].signal_group; 199 /* fw expects physical cpu # */
187 pm_signal_local[j].bus_word = pm_signal[j].bus_word; 200 pm_signal_local[i].cpu = node;
188 pm_signal_local[j].sub_unit = pm_signal[j].sub_unit; 201 pm_signal_local[i].signal_group
189 pm_signal_local[j].bit = pm_signal[j].bit; 202 = pm_signal[j].signal_group;
203 pm_signal_local[i].bus_word = pm_signal[j].bus_word;
204 pm_signal_local[i].sub_unit = pm_signal[j].sub_unit;
205 pm_signal_local[i].bit = pm_signal[j].bit;
206 i++;
207 }
190 } 208 }
191 209
192 ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE, 210 if (i != 0) {
193 pm_signal_local, 211 ret = rtas_ibm_cbe_perftools(SUBFUNC_ACTIVATE, PASSTHRU_ENABLE,
194 count * sizeof(struct pm_signal)); 212 pm_signal_local,
213 i * sizeof(struct pm_signal));
195 214
196 if (ret) 215 if (ret)
197 printk(KERN_WARNING "%s: rtas returned: %d\n", 216 printk(KERN_WARNING "%s: rtas returned: %d\n",
198 __FUNCTION__, ret); 217 __FUNCTION__, ret);
218 }
199} 219}
200 220
201/* 221/*
@@ -212,7 +232,7 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
212 /* Special Event: Count all cpu cycles */ 232 /* Special Event: Count all cpu cycles */
213 pm_regs.pm07_cntrl[ctr] = CBE_COUNT_ALL_CYCLES; 233 pm_regs.pm07_cntrl[ctr] = CBE_COUNT_ALL_CYCLES;
214 p = &(pm_signal[ctr]); 234 p = &(pm_signal[ctr]);
215 p->signal_group = 21; 235 p->signal_group = PPU_CYCLES_GRP_NUM;
216 p->bus_word = 1; 236 p->bus_word = 1;
217 p->sub_unit = 0; 237 p->sub_unit = 0;
218 p->bit = 0; 238 p->bit = 0;
@@ -232,13 +252,21 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
232 252
233 p->signal_group = event / 100; 253 p->signal_group = event / 100;
234 p->bus_word = bus_word; 254 p->bus_word = bus_word;
235 p->sub_unit = unit_mask & 0x0000f000; 255 p->sub_unit = (unit_mask & 0x0000f000) >> 12;
236 256
237 pm_regs.pm07_cntrl[ctr] = 0; 257 pm_regs.pm07_cntrl[ctr] = 0;
238 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles); 258 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
239 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity); 259 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_POLARITY(polarity);
240 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control); 260 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_INPUT_CONTROL(input_control);
241 261
262 /* Some of the islands signal selection is based on 64 bit words.
263 * The debug bus words are 32 bits, the input words to the performance
264 * counters are defined as 32 bits. Need to convert the 64 bit island
265 * specification to the appropriate 32 input bit and bus word for the
266 * performance counter event selection. See the CELL Performance
267 * monitoring signals manual and the Perf cntr hardware descriptions
268 * for the details.
269 */
242 if (input_control == 0) { 270 if (input_control == 0) {
243 if (signal_bit > 31) { 271 if (signal_bit > 31) {
244 signal_bit -= 32; 272 signal_bit -= 32;
@@ -259,12 +287,12 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
259 p->bit = signal_bit; 287 p->bit = signal_bit;
260 } 288 }
261 289
262 for (i = 0; i < 4; i++) { 290 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) {
263 if (bus_word & (1 << i)) { 291 if (bus_word & (1 << i)) {
264 pm_regs.debug_bus_control |= 292 pm_regs.debug_bus_control |=
265 (bus_type << (31 - (2 * i) + 1)); 293 (bus_type << (31 - (2 * i) + 1));
266 294
267 for (j = 0; j < 2; j++) { 295 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
268 if (input_bus[j] == 0xff) { 296 if (input_bus[j] == 0xff) {
269 input_bus[j] = i; 297 input_bus[j] = i;
270 pm_regs.group_control |= 298 pm_regs.group_control |=
@@ -278,52 +306,58 @@ out:
278 ; 306 ;
279} 307}
280 308
281static void write_pm_cntrl(int cpu, struct pm_cntrl *pm_cntrl) 309static void write_pm_cntrl(int cpu)
282{ 310{
283 /* Oprofile will use 32 bit counters, set bits 7:10 to 0 */ 311 /* Oprofile will use 32 bit counters, set bits 7:10 to 0
312 * pmregs.pm_cntrl is a global
313 */
314
284 u32 val = 0; 315 u32 val = 0;
285 if (pm_cntrl->enable == 1) 316 if (pm_regs.pm_cntrl.enable == 1)
286 val |= CBE_PM_ENABLE_PERF_MON; 317 val |= CBE_PM_ENABLE_PERF_MON;
287 318
288 if (pm_cntrl->stop_at_max == 1) 319 if (pm_regs.pm_cntrl.stop_at_max == 1)
289 val |= CBE_PM_STOP_AT_MAX; 320 val |= CBE_PM_STOP_AT_MAX;
290 321
291 if (pm_cntrl->trace_mode == 1) 322 if (pm_regs.pm_cntrl.trace_mode == 1)
292 val |= CBE_PM_TRACE_MODE_SET(pm_cntrl->trace_mode); 323 val |= CBE_PM_TRACE_MODE_SET(pm_regs.pm_cntrl.trace_mode);
293 324
294 if (pm_cntrl->freeze == 1) 325 if (pm_regs.pm_cntrl.freeze == 1)
295 val |= CBE_PM_FREEZE_ALL_CTRS; 326 val |= CBE_PM_FREEZE_ALL_CTRS;
296 327
297 /* Routine set_count_mode must be called previously to set 328 /* Routine set_count_mode must be called previously to set
298 * the count mode based on the user selection of user and kernel. 329 * the count mode based on the user selection of user and kernel.
299 */ 330 */
300 val |= CBE_PM_COUNT_MODE_SET(pm_cntrl->count_mode); 331 val |= CBE_PM_COUNT_MODE_SET(pm_regs.pm_cntrl.count_mode);
301 cbe_write_pm(cpu, pm_control, val); 332 cbe_write_pm(cpu, pm_control, val);
302} 333}
303 334
304static inline void 335static inline void
305set_count_mode(u32 kernel, u32 user, struct pm_cntrl *pm_cntrl) 336set_count_mode(u32 kernel, u32 user)
306{ 337{
307 /* The user must specify user and kernel if they want them. If 338 /* The user must specify user and kernel if they want them. If
308 * neither is specified, OProfile will count in hypervisor mode 339 * neither is specified, OProfile will count in hypervisor mode.
340 * pm_regs.pm_cntrl is a global
309 */ 341 */
310 if (kernel) { 342 if (kernel) {
311 if (user) 343 if (user)
312 pm_cntrl->count_mode = CBE_COUNT_ALL_MODES; 344 pm_regs.pm_cntrl.count_mode = CBE_COUNT_ALL_MODES;
313 else 345 else
314 pm_cntrl->count_mode = CBE_COUNT_SUPERVISOR_MODE; 346 pm_regs.pm_cntrl.count_mode =
347 CBE_COUNT_SUPERVISOR_MODE;
315 } else { 348 } else {
316 if (user) 349 if (user)
317 pm_cntrl->count_mode = CBE_COUNT_PROBLEM_MODE; 350 pm_regs.pm_cntrl.count_mode = CBE_COUNT_PROBLEM_MODE;
318 else 351 else
319 pm_cntrl->count_mode = CBE_COUNT_HYPERVISOR_MODE; 352 pm_regs.pm_cntrl.count_mode =
353 CBE_COUNT_HYPERVISOR_MODE;
320 } 354 }
321} 355}
322 356
323static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl) 357static inline void enable_ctr(u32 cpu, u32 ctr, u32 * pm07_cntrl)
324{ 358{
325 359
326 pm07_cntrl[ctr] |= PM07_CTR_ENABLE(1); 360 pm07_cntrl[ctr] |= CBE_PM_CTR_ENABLE;
327 cbe_write_pm07_control(cpu, ctr, pm07_cntrl[ctr]); 361 cbe_write_pm07_control(cpu, ctr, pm07_cntrl[ctr]);
328} 362}
329 363
@@ -365,6 +399,14 @@ static void cell_virtual_cntr(unsigned long data)
365 hdw_thread = 1 ^ hdw_thread; 399 hdw_thread = 1 ^ hdw_thread;
366 next_hdw_thread = hdw_thread; 400 next_hdw_thread = hdw_thread;
367 401
402 for (i = 0; i < num_counters; i++)
403 /* There are some per thread events. Must do the
404 * set event, for the thread that is being started
405 */
406 set_pm_event(i,
407 pmc_cntrl[next_hdw_thread][i].evnts,
408 pmc_cntrl[next_hdw_thread][i].masks);
409
368 /* The following is done only once per each node, but 410 /* The following is done only once per each node, but
369 * we need cpu #, not node #, to pass to the cbe_xxx functions. 411 * we need cpu #, not node #, to pass to the cbe_xxx functions.
370 */ 412 */
@@ -385,12 +427,13 @@ static void cell_virtual_cntr(unsigned long data)
385 == 0xFFFFFFFF) 427 == 0xFFFFFFFF)
386 /* If the cntr value is 0xffffffff, we must 428 /* If the cntr value is 0xffffffff, we must
387 * reset that to 0xfffffff0 when the current 429 * reset that to 0xfffffff0 when the current
388 * thread is restarted. This will generate a new 430 * thread is restarted. This will generate a
389 * interrupt and make sure that we never restore 431 * new interrupt and make sure that we never
390 * the counters to the max value. If the counters 432 * restore the counters to the max value. If
391 * were restored to the max value, they do not 433 * the counters were restored to the max value,
392 * increment and no interrupts are generated. Hence 434 * they do not increment and no interrupts are
393 * no more samples will be collected on that cpu. 435 * generated. Hence no more samples will be
436 * collected on that cpu.
394 */ 437 */
395 cbe_write_ctr(cpu, i, 0xFFFFFFF0); 438 cbe_write_ctr(cpu, i, 0xFFFFFFF0);
396 else 439 else
@@ -410,9 +453,6 @@ static void cell_virtual_cntr(unsigned long data)
410 * Must do the set event, enable_cntr 453 * Must do the set event, enable_cntr
411 * for each cpu. 454 * for each cpu.
412 */ 455 */
413 set_pm_event(i,
414 pmc_cntrl[next_hdw_thread][i].evnts,
415 pmc_cntrl[next_hdw_thread][i].masks);
416 enable_ctr(cpu, i, 456 enable_ctr(cpu, i,
417 pm_regs.pm07_cntrl); 457 pm_regs.pm07_cntrl);
418 } else { 458 } else {
@@ -465,8 +505,7 @@ cell_reg_setup(struct op_counter_config *ctr,
465 pm_regs.pm_cntrl.trace_mode = 0; 505 pm_regs.pm_cntrl.trace_mode = 0;
466 pm_regs.pm_cntrl.freeze = 1; 506 pm_regs.pm_cntrl.freeze = 1;
467 507
468 set_count_mode(sys->enable_kernel, sys->enable_user, 508 set_count_mode(sys->enable_kernel, sys->enable_user);
469 &pm_regs.pm_cntrl);
470 509
471 /* Setup the thread 0 events */ 510 /* Setup the thread 0 events */
472 for (i = 0; i < num_ctrs; ++i) { 511 for (i = 0; i < num_ctrs; ++i) {
@@ -498,10 +537,10 @@ cell_reg_setup(struct op_counter_config *ctr,
498 pmc_cntrl[1][i].vcntr = i; 537 pmc_cntrl[1][i].vcntr = i;
499 } 538 }
500 539
501 for (i = 0; i < 4; i++) 540 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
502 trace_bus[i] = 0xff; 541 trace_bus[i] = 0xff;
503 542
504 for (i = 0; i < 2; i++) 543 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
505 input_bus[i] = 0xff; 544 input_bus[i] = 0xff;
506 545
507 /* Our counters count up, and "count" refers to 546 /* Our counters count up, and "count" refers to
@@ -560,7 +599,7 @@ static void cell_cpu_setup(struct op_counter_config *cntr)
560 cbe_write_pm(cpu, pm_start_stop, 0); 599 cbe_write_pm(cpu, pm_start_stop, 0);
561 cbe_write_pm(cpu, group_control, pm_regs.group_control); 600 cbe_write_pm(cpu, group_control, pm_regs.group_control);
562 cbe_write_pm(cpu, debug_bus_control, pm_regs.debug_bus_control); 601 cbe_write_pm(cpu, debug_bus_control, pm_regs.debug_bus_control);
563 write_pm_cntrl(cpu, &pm_regs.pm_cntrl); 602 write_pm_cntrl(cpu);
564 603
565 for (i = 0; i < num_counters; ++i) { 604 for (i = 0; i < num_counters; ++i) {
566 if (ctr_enabled & (1 << i)) { 605 if (ctr_enabled & (1 << i)) {
@@ -602,7 +641,7 @@ static void cell_global_start(struct op_counter_config *ctr)
602 } 641 }
603 } 642 }
604 643
605 cbe_clear_pm_interrupts(cpu); 644 cbe_get_and_clear_pm_interrupts(cpu);
606 cbe_enable_pm_interrupts(cpu, hdw_thread, interrupt_mask); 645 cbe_enable_pm_interrupts(cpu, hdw_thread, interrupt_mask);
607 cbe_enable_pm(cpu); 646 cbe_enable_pm(cpu);
608 } 647 }
@@ -672,7 +711,7 @@ cell_handle_interrupt(struct pt_regs *regs, struct op_counter_config *ctr)
672 711
673 cbe_disable_pm(cpu); 712 cbe_disable_pm(cpu);
674 713
675 interrupt_mask = cbe_clear_pm_interrupts(cpu); 714 interrupt_mask = cbe_get_and_clear_pm_interrupts(cpu);
676 715
677 /* If the interrupt mask has been cleared, then the virt cntr 716 /* If the interrupt mask has been cleared, then the virt cntr
678 * has cleared the interrupt. When the thread that generated 717 * has cleared the interrupt. When the thread that generated
diff --git a/arch/powerpc/oprofile/op_model_fsl_booke.c b/arch/powerpc/oprofile/op_model_fsl_booke.c
index 0b3c31f5209e..2267eb8c661b 100644
--- a/arch/powerpc/oprofile/op_model_fsl_booke.c
+++ b/arch/powerpc/oprofile/op_model_fsl_booke.c
@@ -32,6 +32,87 @@ static unsigned long reset_value[OP_MAX_COUNTER];
32static int num_counters; 32static int num_counters;
33static int oprofile_running; 33static int oprofile_running;
34 34
35static inline u32 get_pmlca(int ctr)
36{
37 u32 pmlca;
38
39 switch (ctr) {
40 case 0:
41 pmlca = mfpmr(PMRN_PMLCA0);
42 break;
43 case 1:
44 pmlca = mfpmr(PMRN_PMLCA1);
45 break;
46 case 2:
47 pmlca = mfpmr(PMRN_PMLCA2);
48 break;
49 case 3:
50 pmlca = mfpmr(PMRN_PMLCA3);
51 break;
52 default:
53 panic("Bad ctr number\n");
54 }
55
56 return pmlca;
57}
58
59static inline void set_pmlca(int ctr, u32 pmlca)
60{
61 switch (ctr) {
62 case 0:
63 mtpmr(PMRN_PMLCA0, pmlca);
64 break;
65 case 1:
66 mtpmr(PMRN_PMLCA1, pmlca);
67 break;
68 case 2:
69 mtpmr(PMRN_PMLCA2, pmlca);
70 break;
71 case 3:
72 mtpmr(PMRN_PMLCA3, pmlca);
73 break;
74 default:
75 panic("Bad ctr number\n");
76 }
77}
78
79static inline unsigned int ctr_read(unsigned int i)
80{
81 switch(i) {
82 case 0:
83 return mfpmr(PMRN_PMC0);
84 case 1:
85 return mfpmr(PMRN_PMC1);
86 case 2:
87 return mfpmr(PMRN_PMC2);
88 case 3:
89 return mfpmr(PMRN_PMC3);
90 default:
91 return 0;
92 }
93}
94
95static inline void ctr_write(unsigned int i, unsigned int val)
96{
97 switch(i) {
98 case 0:
99 mtpmr(PMRN_PMC0, val);
100 break;
101 case 1:
102 mtpmr(PMRN_PMC1, val);
103 break;
104 case 2:
105 mtpmr(PMRN_PMC2, val);
106 break;
107 case 3:
108 mtpmr(PMRN_PMC3, val);
109 break;
110 default:
111 break;
112 }
113}
114
115
35static void init_pmc_stop(int ctr) 116static void init_pmc_stop(int ctr)
36{ 117{
37 u32 pmlca = (PMLCA_FC | PMLCA_FCS | PMLCA_FCU | 118 u32 pmlca = (PMLCA_FC | PMLCA_FCS | PMLCA_FCU |
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index 356709d515b9..fe597a154d4f 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -121,9 +121,9 @@ static void power4_start(struct op_counter_config *ctr)
121 121
122 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { 122 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) {
123 if (ctr[i].enabled) { 123 if (ctr[i].enabled) {
124 ctr_write(i, reset_value[i]); 124 classic_ctr_write(i, reset_value[i]);
125 } else { 125 } else {
126 ctr_write(i, 0); 126 classic_ctr_write(i, 0);
127 } 127 }
128 } 128 }
129 129
@@ -254,13 +254,13 @@ static void power4_handle_interrupt(struct pt_regs *regs,
254 mtmsrd(mfmsr() | MSR_PMM); 254 mtmsrd(mfmsr() | MSR_PMM);
255 255
256 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) { 256 for (i = 0; i < cur_cpu_spec->num_pmcs; ++i) {
257 val = ctr_read(i); 257 val = classic_ctr_read(i);
258 if (val < 0) { 258 if (val < 0) {
259 if (oprofile_running && ctr[i].enabled) { 259 if (oprofile_running && ctr[i].enabled) {
260 oprofile_add_ext_sample(pc, regs, i, is_kernel); 260 oprofile_add_ext_sample(pc, regs, i, is_kernel);
261 ctr_write(i, reset_value[i]); 261 classic_ctr_write(i, reset_value[i]);
262 } else { 262 } else {
263 ctr_write(i, 0); 263 classic_ctr_write(i, 0);
264 } 264 }
265 } 265 }
266 } 266 }
diff --git a/arch/powerpc/oprofile/op_model_rs64.c b/arch/powerpc/oprofile/op_model_rs64.c
index 19c5ee089bc9..c731acbfb2a5 100644
--- a/arch/powerpc/oprofile/op_model_rs64.c
+++ b/arch/powerpc/oprofile/op_model_rs64.c
@@ -137,10 +137,10 @@ static void rs64_start(struct op_counter_config *ctr)
137 137
138 for (i = 0; i < num_counters; ++i) { 138 for (i = 0; i < num_counters; ++i) {
139 if (ctr[i].enabled) { 139 if (ctr[i].enabled) {
140 ctr_write(i, reset_value[i]); 140 classic_ctr_write(i, reset_value[i]);
141 ctrl_write(i, ctr[i].event); 141 ctrl_write(i, ctr[i].event);
142 } else { 142 } else {
143 ctr_write(i, 0); 143 classic_ctr_write(i, 0);
144 } 144 }
145 } 145 }
146 146
@@ -186,13 +186,13 @@ static void rs64_handle_interrupt(struct pt_regs *regs,
186 mtmsrd(mfmsr() | MSR_PMM); 186 mtmsrd(mfmsr() | MSR_PMM);
187 187
188 for (i = 0; i < num_counters; ++i) { 188 for (i = 0; i < num_counters; ++i) {
189 val = ctr_read(i); 189 val = classic_ctr_read(i);
190 if (val < 0) { 190 if (val < 0) {
191 if (ctr[i].enabled) { 191 if (ctr[i].enabled) {
192 oprofile_add_ext_sample(pc, regs, i, is_kernel); 192 oprofile_add_ext_sample(pc, regs, i, is_kernel);
193 ctr_write(i, reset_value[i]); 193 classic_ctr_write(i, reset_value[i]);
194 } else { 194 } else {
195 ctr_write(i, 0); 195 classic_ctr_write(i, 0);
196 } 196 }
197 } 197 }
198 } 198 }
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile
index a46184a0c750..07cdbcacf156 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -3,7 +3,8 @@
3# 3#
4ifeq ($(CONFIG_PPC_MERGE),y) 4ifeq ($(CONFIG_PPC_MERGE),y)
5obj-y += mpc52xx_pic.o mpc52xx_common.o 5obj-y += mpc52xx_pic.o mpc52xx_common.o
6obj-$(CONFIG_PCI) += mpc52xx_pci.o
6endif 7endif
7 8
8obj-$(CONFIG_PPC_EFIKA) += efika-setup.o efika-pci.o 9obj-$(CONFIG_PPC_EFIKA) += efika.o
9obj-$(CONFIG_PPC_LITE5200) += lite5200.o 10obj-$(CONFIG_PPC_LITE5200) += lite5200.o
diff --git a/arch/powerpc/platforms/52xx/efika-pci.c b/arch/powerpc/platforms/52xx/efika-pci.c
deleted file mode 100644
index 62e05b2a9227..000000000000
--- a/arch/powerpc/platforms/52xx/efika-pci.c
+++ /dev/null
@@ -1,119 +0,0 @@
1
2#include <linux/kernel.h>
3#include <linux/pci.h>
4#include <linux/string.h>
5#include <linux/init.h>
6
7#include <asm/io.h>
8#include <asm/irq.h>
9#include <asm/prom.h>
10#include <asm/machdep.h>
11#include <asm/sections.h>
12#include <asm/pci-bridge.h>
13#include <asm/rtas.h>
14
15#include "efika.h"
16
17#ifdef CONFIG_PCI
18/*
19 * Access functions for PCI config space using RTAS calls.
20 */
21static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
22 int len, u32 * val)
23{
24 struct pci_controller *hose = bus->sysdata;
25 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
26 | (((bus->number - hose->first_busno) & 0xff) << 16)
27 | (hose->index << 24);
28 int ret = -1;
29 int rval;
30
31 rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
32 *val = ret;
33 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
34}
35
36static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
37 int offset, int len, u32 val)
38{
39 struct pci_controller *hose = bus->sysdata;
40 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
41 | (((bus->number - hose->first_busno) & 0xff) << 16)
42 | (hose->index << 24);
43 int rval;
44
45 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
46 addr, len, val);
47 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
48}
49
50static struct pci_ops rtas_pci_ops = {
51 rtas_read_config,
52 rtas_write_config
53};
54
55void __init efika_pcisetup(void)
56{
57 const int *bus_range;
58 int len;
59 struct pci_controller *hose;
60 struct device_node *root;
61 struct device_node *pcictrl;
62
63 root = of_find_node_by_path("/");
64 if (root == NULL) {
65 printk(KERN_WARNING EFIKA_PLATFORM_NAME
66 ": Unable to find the root node\n");
67 return;
68 }
69
70 for (pcictrl = NULL;;) {
71 pcictrl = of_get_next_child(root, pcictrl);
72 if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
73 break;
74 }
75
76 of_node_put(root);
77
78 if (pcictrl == NULL) {
79 printk(KERN_WARNING EFIKA_PLATFORM_NAME
80 ": Unable to find the PCI bridge node\n");
81 return;
82 }
83
84 bus_range = get_property(pcictrl, "bus-range", &len);
85 if (bus_range == NULL || len < 2 * sizeof(int)) {
86 printk(KERN_WARNING EFIKA_PLATFORM_NAME
87 ": Can't get bus-range for %s\n", pcictrl->full_name);
88 return;
89 }
90
91 if (bus_range[1] == bus_range[0])
92 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
93 bus_range[0]);
94 else
95 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
96 bus_range[0], bus_range[1]);
97 printk(" controlled by %s\n", pcictrl->full_name);
98 printk("\n");
99
100 hose = pcibios_alloc_controller();
101 if (!hose) {
102 printk(KERN_WARNING EFIKA_PLATFORM_NAME
103 ": Can't allocate PCI controller structure for %s\n",
104 pcictrl->full_name);
105 return;
106 }
107
108 hose->arch_data = of_node_get(pcictrl);
109 hose->first_busno = bus_range[0];
110 hose->last_busno = bus_range[1];
111 hose->ops = &rtas_pci_ops;
112
113 pci_process_bridge_OF_ranges(hose, pcictrl, 0);
114}
115
116#else
117void __init efika_pcisetup(void)
118{}
119#endif
diff --git a/arch/powerpc/platforms/52xx/efika-setup.c b/arch/powerpc/platforms/52xx/efika-setup.c
deleted file mode 100644
index 110c980ed1e0..000000000000
--- a/arch/powerpc/platforms/52xx/efika-setup.c
+++ /dev/null
@@ -1,150 +0,0 @@
1/*
2 *
3 * Efika 5K2 platform setup
4 * Some code really inspired from the lite5200b platform.
5 *
6 * Copyright (C) 2006 bplan GmbH
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 *
12 */
13
14#include <linux/errno.h>
15#include <linux/kernel.h>
16#include <linux/slab.h>
17#include <linux/reboot.h>
18#include <linux/init.h>
19#include <linux/utsrelease.h>
20#include <linux/seq_file.h>
21#include <linux/root_dev.h>
22#include <linux/initrd.h>
23#include <linux/timer.h>
24#include <linux/pci.h>
25
26#include <asm/pgtable.h>
27#include <asm/prom.h>
28#include <asm/time.h>
29#include <asm/machdep.h>
30#include <asm/rtas.h>
31#include <asm/of_device.h>
32#include <asm/of_platform.h>
33#include <asm/mpc52xx.h>
34
35#include "efika.h"
36
37static void efika_show_cpuinfo(struct seq_file *m)
38{
39 struct device_node *root;
40 const char *revision = NULL;
41 const char *codegendescription = NULL;
42 const char *codegenvendor = NULL;
43
44 root = of_find_node_by_path("/");
45 if (root) {
46 revision = get_property(root, "revision", NULL);
47 codegendescription =
48 get_property(root, "CODEGEN,description", NULL);
49 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
50
51 of_node_put(root);
52 }
53
54 if (codegendescription)
55 seq_printf(m, "machine\t\t: %s\n", codegendescription);
56 else
57 seq_printf(m, "machine\t\t: Efika\n");
58
59 if (revision)
60 seq_printf(m, "revision\t: %s\n", revision);
61
62 if (codegenvendor)
63 seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
64
65 of_node_put(root);
66}
67
68static void __init efika_setup_arch(void)
69{
70 rtas_initialize();
71
72#ifdef CONFIG_BLK_DEV_INITRD
73 initrd_below_start_ok = 1;
74
75 if (initrd_start)
76 ROOT_DEV = Root_RAM0;
77 else
78#endif
79 ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
80
81 efika_pcisetup();
82
83 if (ppc_md.progress)
84 ppc_md.progress("Linux/PPC " UTS_RELEASE " runnung on Efika ;-)\n", 0x0);
85}
86
87static void __init efika_init(void)
88{
89 struct device_node *np;
90 struct device_node *cnp = NULL;
91 const u32 *base;
92
93 /* Find every child of the SOC node and add it to of_platform */
94 np = of_find_node_by_name(NULL, "builtin");
95 if (np) {
96 char name[BUS_ID_SIZE];
97 while ((cnp = of_get_next_child(np, cnp))) {
98 strcpy(name, cnp->name);
99
100 base = get_property(cnp, "reg", NULL);
101 if (base == NULL)
102 continue;
103
104 snprintf(name+strlen(name), BUS_ID_SIZE, "@%x", *base);
105 of_platform_device_create(cnp, name, NULL);
106
107 printk(KERN_INFO EFIKA_PLATFORM_NAME" : Added %s (type '%s' at '%s') to the known devices\n", name, cnp->type, cnp->full_name);
108 }
109 }
110
111 if (ppc_md.progress)
112 ppc_md.progress(" Have fun with your Efika! ", 0x7777);
113}
114
115static int __init efika_probe(void)
116{
117 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
118 "model", NULL);
119
120 if (model == NULL)
121 return 0;
122 if (strcmp(model, "EFIKA5K2"))
123 return 0;
124
125 ISA_DMA_THRESHOLD = ~0L;
126 DMA_MODE_READ = 0x44;
127 DMA_MODE_WRITE = 0x48;
128
129 return 1;
130}
131
132define_machine(efika)
133{
134 .name = EFIKA_PLATFORM_NAME,
135 .probe = efika_probe,
136 .setup_arch = efika_setup_arch,
137 .init = efika_init,
138 .show_cpuinfo = efika_show_cpuinfo,
139 .init_IRQ = mpc52xx_init_irq,
140 .get_irq = mpc52xx_get_irq,
141 .restart = rtas_restart,
142 .power_off = rtas_power_off,
143 .halt = rtas_halt,
144 .set_rtc_time = rtas_set_rtc_time,
145 .get_rtc_time = rtas_get_rtc_time,
146 .progress = rtas_progress,
147 .get_boot_time = rtas_get_boot_time,
148 .calibrate_decr = generic_calibrate_decr,
149 .phys_mem_access_prot = pci_phys_mem_access_prot,
150};
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
new file mode 100644
index 000000000000..8de034116681
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -0,0 +1,243 @@
1/*
2 * Efika 5K2 platform code
3 * Some code really inspired from the lite5200b platform.
4 *
5 * Copyright (C) 2006 bplan GmbH
6 *
7 * This file is licensed under the terms of the GNU General Public License
8 * version 2. This program is licensed "as is" without any warranty of any
9 * kind, whether express or implied.
10 */
11
12#include <linux/errno.h>
13#include <linux/kernel.h>
14#include <linux/slab.h>
15#include <linux/reboot.h>
16#include <linux/init.h>
17#include <linux/utsrelease.h>
18#include <linux/seq_file.h>
19#include <linux/string.h>
20#include <linux/root_dev.h>
21#include <linux/initrd.h>
22#include <linux/timer.h>
23#include <linux/pci.h>
24
25#include <asm/io.h>
26#include <asm/irq.h>
27#include <asm/sections.h>
28#include <asm/pci-bridge.h>
29#include <asm/pgtable.h>
30#include <asm/prom.h>
31#include <asm/time.h>
32#include <asm/machdep.h>
33#include <asm/rtas.h>
34#include <asm/of_device.h>
35#include <asm/of_platform.h>
36#include <asm/mpc52xx.h>
37
38
39#define EFIKA_PLATFORM_NAME "Efika"
40
41
42/* ------------------------------------------------------------------------ */
43/* PCI accesses thru RTAS */
44/* ------------------------------------------------------------------------ */
45
46#ifdef CONFIG_PCI
47
48/*
49 * Access functions for PCI config space using RTAS calls.
50 */
51static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
52 int len, u32 * val)
53{
54 struct pci_controller *hose = bus->sysdata;
55 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
56 | (((bus->number - hose->first_busno) & 0xff) << 16)
57 | (hose->index << 24);
58 int ret = -1;
59 int rval;
60
61 rval = rtas_call(rtas_token("read-pci-config"), 2, 2, &ret, addr, len);
62 *val = ret;
63 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
64}
65
66static int rtas_write_config(struct pci_bus *bus, unsigned int devfn,
67 int offset, int len, u32 val)
68{
69 struct pci_controller *hose = bus->sysdata;
70 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
71 | (((bus->number - hose->first_busno) & 0xff) << 16)
72 | (hose->index << 24);
73 int rval;
74
75 rval = rtas_call(rtas_token("write-pci-config"), 3, 1, NULL,
76 addr, len, val);
77 return rval ? PCIBIOS_DEVICE_NOT_FOUND : PCIBIOS_SUCCESSFUL;
78}
79
80static struct pci_ops rtas_pci_ops = {
81 rtas_read_config,
82 rtas_write_config
83};
84
85
86void __init efika_pcisetup(void)
87{
88 const int *bus_range;
89 int len;
90 struct pci_controller *hose;
91 struct device_node *root;
92 struct device_node *pcictrl;
93
94 root = of_find_node_by_path("/");
95 if (root == NULL) {
96 printk(KERN_WARNING EFIKA_PLATFORM_NAME
97 ": Unable to find the root node\n");
98 return;
99 }
100
101 for (pcictrl = NULL;;) {
102 pcictrl = of_get_next_child(root, pcictrl);
103 if ((pcictrl == NULL) || (strcmp(pcictrl->name, "pci") == 0))
104 break;
105 }
106
107 of_node_put(root);
108
109 if (pcictrl == NULL) {
110 printk(KERN_WARNING EFIKA_PLATFORM_NAME
111 ": Unable to find the PCI bridge node\n");
112 return;
113 }
114
115 bus_range = get_property(pcictrl, "bus-range", &len);
116 if (bus_range == NULL || len < 2 * sizeof(int)) {
117 printk(KERN_WARNING EFIKA_PLATFORM_NAME
118 ": Can't get bus-range for %s\n", pcictrl->full_name);
119 return;
120 }
121
122 if (bus_range[1] == bus_range[0])
123 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI bus %d",
124 bus_range[0]);
125 else
126 printk(KERN_INFO EFIKA_PLATFORM_NAME ": PCI buses %d..%d",
127 bus_range[0], bus_range[1]);
128 printk(" controlled by %s\n", pcictrl->full_name);
129 printk("\n");
130
131 hose = pcibios_alloc_controller();
132 if (!hose) {
133 printk(KERN_WARNING EFIKA_PLATFORM_NAME
134 ": Can't allocate PCI controller structure for %s\n",
135 pcictrl->full_name);
136 return;
137 }
138
139 hose->arch_data = of_node_get(pcictrl);
140 hose->first_busno = bus_range[0];
141 hose->last_busno = bus_range[1];
142 hose->ops = &rtas_pci_ops;
143
144 pci_process_bridge_OF_ranges(hose, pcictrl, 0);
145}
146
147#else
148void __init efika_pcisetup(void)
149{}
150#endif
151
152
153
154/* ------------------------------------------------------------------------ */
155/* Platform setup */
156/* ------------------------------------------------------------------------ */
157
158static void efika_show_cpuinfo(struct seq_file *m)
159{
160 struct device_node *root;
161 const char *revision = NULL;
162 const char *codegendescription = NULL;
163 const char *codegenvendor = NULL;
164
165 root = of_find_node_by_path("/");
166 if (!root)
167 return;
168
169 revision = get_property(root, "revision", NULL);
170 codegendescription =
171 get_property(root, "CODEGEN,description", NULL);
172 codegenvendor = get_property(root, "CODEGEN,vendor", NULL);
173
174 if (codegendescription)
175 seq_printf(m, "machine\t\t: %s\n", codegendescription);
176 else
177 seq_printf(m, "machine\t\t: Efika\n");
178
179 if (revision)
180 seq_printf(m, "revision\t: %s\n", revision);
181
182 if (codegenvendor)
183 seq_printf(m, "vendor\t\t: %s\n", codegenvendor);
184
185 of_node_put(root);
186}
187
188static void __init efika_setup_arch(void)
189{
190 rtas_initialize();
191
192#ifdef CONFIG_BLK_DEV_INITRD
193 initrd_below_start_ok = 1;
194
195 if (initrd_start)
196 ROOT_DEV = Root_RAM0;
197 else
198#endif
199 ROOT_DEV = Root_SDA2; /* sda2 (sda1 is for the kernel) */
200
201 efika_pcisetup();
202
203 if (ppc_md.progress)
204 ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
205}
206
207static int __init efika_probe(void)
208{
209 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
210 "model", NULL);
211
212 if (model == NULL)
213 return 0;
214 if (strcmp(model, "EFIKA5K2"))
215 return 0;
216
217 ISA_DMA_THRESHOLD = ~0L;
218 DMA_MODE_READ = 0x44;
219 DMA_MODE_WRITE = 0x48;
220
221 return 1;
222}
223
224define_machine(efika)
225{
226 .name = EFIKA_PLATFORM_NAME,
227 .probe = efika_probe,
228 .setup_arch = efika_setup_arch,
229 .init = mpc52xx_declare_of_platform_devices,
230 .show_cpuinfo = efika_show_cpuinfo,
231 .init_IRQ = mpc52xx_init_irq,
232 .get_irq = mpc52xx_get_irq,
233 .restart = rtas_restart,
234 .power_off = rtas_power_off,
235 .halt = rtas_halt,
236 .set_rtc_time = rtas_set_rtc_time,
237 .get_rtc_time = rtas_get_rtc_time,
238 .progress = rtas_progress,
239 .get_boot_time = rtas_get_boot_time,
240 .calibrate_decr = generic_calibrate_decr,
241 .phys_mem_access_prot = pci_phys_mem_access_prot,
242};
243
diff --git a/arch/powerpc/platforms/52xx/efika.h b/arch/powerpc/platforms/52xx/efika.h
deleted file mode 100644
index 2f060fd097d7..000000000000
--- a/arch/powerpc/platforms/52xx/efika.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * Efika 5K2 platform setup - Header file
3 *
4 * Copyright (C) 2006 bplan GmbH
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 *
10 */
11
12#ifndef __ARCH_POWERPC_EFIKA__
13#define __ARCH_POWERPC_EFIKA__
14
15#define EFIKA_PLATFORM_NAME "Efika"
16
17extern void __init efika_pcisetup(void);
18
19#endif
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 0f21bab33f6c..cc3b40de21dd 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -51,13 +51,13 @@
51 */ 51 */
52 52
53static void __init 53static void __init
54lite52xx_setup_cpu(void) 54lite5200_setup_cpu(void)
55{ 55{
56 struct mpc52xx_gpio __iomem *gpio; 56 struct mpc52xx_gpio __iomem *gpio;
57 u32 port_config; 57 u32 port_config;
58 58
59 /* Map zones */ 59 /* Map zones */
60 gpio = mpc52xx_find_and_map("mpc52xx-gpio"); 60 gpio = mpc52xx_find_and_map("mpc5200-gpio");
61 if (!gpio) { 61 if (!gpio) {
62 printk(KERN_ERR __FILE__ ": " 62 printk(KERN_ERR __FILE__ ": "
63 "Error while mapping GPIO register for port config. " 63 "Error while mapping GPIO register for port config. "
@@ -85,12 +85,12 @@ error:
85 iounmap(gpio); 85 iounmap(gpio);
86} 86}
87 87
88static void __init lite52xx_setup_arch(void) 88static void __init lite5200_setup_arch(void)
89{ 89{
90 struct device_node *np; 90 struct device_node *np;
91 91
92 if (ppc_md.progress) 92 if (ppc_md.progress)
93 ppc_md.progress("lite52xx_setup_arch()", 0); 93 ppc_md.progress("lite5200_setup_arch()", 0);
94 94
95 np = of_find_node_by_type(NULL, "cpu"); 95 np = of_find_node_by_type(NULL, "cpu");
96 if (np) { 96 if (np) {
@@ -105,7 +105,13 @@ static void __init lite52xx_setup_arch(void)
105 105
106 /* CPU & Port mux setup */ 106 /* CPU & Port mux setup */
107 mpc52xx_setup_cpu(); /* Generic */ 107 mpc52xx_setup_cpu(); /* Generic */
108 lite52xx_setup_cpu(); /* Platorm specific */ 108 lite5200_setup_cpu(); /* Platorm specific */
109
110#ifdef CONFIG_PCI
111 np = of_find_node_by_type(np, "pci");
112 if (np)
113 mpc52xx_add_bridge(np);
114#endif
109 115
110#ifdef CONFIG_BLK_DEV_INITRD 116#ifdef CONFIG_BLK_DEV_INITRD
111 if (initrd_start) 117 if (initrd_start)
@@ -120,7 +126,7 @@ static void __init lite52xx_setup_arch(void)
120 126
121} 127}
122 128
123void lite52xx_show_cpuinfo(struct seq_file *m) 129void lite5200_show_cpuinfo(struct seq_file *m)
124{ 130{
125 struct device_node* np = of_find_all_nodes(NULL); 131 struct device_node* np = of_find_all_nodes(NULL);
126 const char *model = NULL; 132 const char *model = NULL;
@@ -137,25 +143,26 @@ void lite52xx_show_cpuinfo(struct seq_file *m)
137/* 143/*
138 * Called very early, MMU is off, device-tree isn't unflattened 144 * Called very early, MMU is off, device-tree isn't unflattened
139 */ 145 */
140static int __init lite52xx_probe(void) 146static int __init lite5200_probe(void)
141{ 147{
142 unsigned long node = of_get_flat_dt_root(); 148 unsigned long node = of_get_flat_dt_root();
143 const char *model = of_get_flat_dt_prop(node, "model", NULL); 149 const char *model = of_get_flat_dt_prop(node, "model", NULL);
144 150
145 if (!of_flat_dt_is_compatible(node, "lite52xx")) 151 if (!of_flat_dt_is_compatible(node, "fsl,lite5200") &&
152 !of_flat_dt_is_compatible(node, "fsl,lite5200b"))
146 return 0; 153 return 0;
147 pr_debug("%s board w/ mpc52xx found\n", model ? model : "unknown"); 154 pr_debug("%s board found\n", model ? model : "unknown");
148 155
149 return 1; 156 return 1;
150} 157}
151 158
152define_machine(lite52xx) { 159define_machine(lite5200) {
153 .name = "lite52xx", 160 .name = "lite5200",
154 .probe = lite52xx_probe, 161 .probe = lite5200_probe,
155 .setup_arch = lite52xx_setup_arch, 162 .setup_arch = lite5200_setup_arch,
156 .init = mpc52xx_declare_of_platform_devices, 163 .init = mpc52xx_declare_of_platform_devices,
157 .init_IRQ = mpc52xx_init_irq, 164 .init_IRQ = mpc52xx_init_irq,
158 .get_irq = mpc52xx_get_irq, 165 .get_irq = mpc52xx_get_irq,
159 .show_cpuinfo = lite52xx_show_cpuinfo, 166 .show_cpuinfo = lite5200_show_cpuinfo,
160 .calibrate_decr = generic_calibrate_decr, 167 .calibrate_decr = generic_calibrate_decr,
161}; 168};
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index cc40889074bd..ed0cb694aea8 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -83,8 +83,8 @@ mpc52xx_setup_cpu(void)
83 struct mpc52xx_xlb __iomem *xlb; 83 struct mpc52xx_xlb __iomem *xlb;
84 84
85 /* Map zones */ 85 /* Map zones */
86 cdm = mpc52xx_find_and_map("mpc52xx-cdm"); 86 cdm = mpc52xx_find_and_map("mpc5200-cdm");
87 xlb = mpc52xx_find_and_map("mpc52xx-xlb"); 87 xlb = mpc52xx_find_and_map("mpc5200-xlb");
88 88
89 if (!cdm || !xlb) { 89 if (!cdm || !xlb) {
90 printk(KERN_ERR __FILE__ ": " 90 printk(KERN_ERR __FILE__ ": "
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
new file mode 100644
index 000000000000..faf161bdbc1c
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -0,0 +1,412 @@
1/*
2 * PCI code for the Freescale MPC52xx embedded CPU.
3 *
4 * Copyright (C) 2006 Secret Lab Technologies Ltd.
5 * Grant Likely <grant.likely@secretlab.ca>
6 * Copyright (C) 2004 Sylvain Munaut <tnt@246tNt.com>
7 *
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
11 */
12
13#undef DEBUG
14
15#include <asm/pci.h>
16#include <asm/mpc52xx.h>
17#include <asm/delay.h>
18#include <asm/machdep.h>
19#include <linux/kernel.h>
20
21
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 */
32/* ======================================================================== */
33
34#define MPC52xx_PCI_GSCR_BM 0x40000000
35#define MPC52xx_PCI_GSCR_PE 0x20000000
36#define MPC52xx_PCI_GSCR_SE 0x10000000
37#define MPC52xx_PCI_GSCR_XLB2PCI_MASK 0x07000000
38#define MPC52xx_PCI_GSCR_XLB2PCI_SHIFT 24
39#define MPC52xx_PCI_GSCR_IPG2PCI_MASK 0x00070000
40#define MPC52xx_PCI_GSCR_IPG2PCI_SHIFT 16
41#define MPC52xx_PCI_GSCR_BME 0x00004000
42#define MPC52xx_PCI_GSCR_PEE 0x00002000
43#define MPC52xx_PCI_GSCR_SEE 0x00001000
44#define MPC52xx_PCI_GSCR_PR 0x00000001
45
46
47#define MPC52xx_PCI_IWBTAR_TRANSLATION(proc_ad,pci_ad,size) \
48 ( ( (proc_ad) & 0xff000000 ) | \
49 ( (((size) - 1) >> 8) & 0x00ff0000 ) | \
50 ( ((pci_ad) >> 16) & 0x0000ff00 ) )
51
52#define MPC52xx_PCI_IWCR_PACK(win0,win1,win2) (((win0) << 24) | \
53 ((win1) << 16) | \
54 ((win2) << 8))
55
56#define MPC52xx_PCI_IWCR_DISABLE 0x0
57#define MPC52xx_PCI_IWCR_ENABLE 0x1
58#define MPC52xx_PCI_IWCR_READ 0x0
59#define MPC52xx_PCI_IWCR_READ_LINE 0x2
60#define MPC52xx_PCI_IWCR_READ_MULTI 0x4
61#define MPC52xx_PCI_IWCR_MEM 0x0
62#define MPC52xx_PCI_IWCR_IO 0x8
63
64#define MPC52xx_PCI_TCR_P 0x01000000
65#define MPC52xx_PCI_TCR_LD 0x00010000
66
67#define MPC52xx_PCI_TBATR_DISABLE 0x0
68#define MPC52xx_PCI_TBATR_ENABLE 0x1
69
70struct mpc52xx_pci {
71 u32 idr; /* PCI + 0x00 */
72 u32 scr; /* PCI + 0x04 */
73 u32 ccrir; /* PCI + 0x08 */
74 u32 cr1; /* PCI + 0x0C */
75 u32 bar0; /* PCI + 0x10 */
76 u32 bar1; /* PCI + 0x14 */
77 u8 reserved1[16]; /* PCI + 0x18 */
78 u32 ccpr; /* PCI + 0x28 */
79 u32 sid; /* PCI + 0x2C */
80 u32 erbar; /* PCI + 0x30 */
81 u32 cpr; /* PCI + 0x34 */
82 u8 reserved2[4]; /* PCI + 0x38 */
83 u32 cr2; /* PCI + 0x3C */
84 u8 reserved3[32]; /* PCI + 0x40 */
85 u32 gscr; /* PCI + 0x60 */
86 u32 tbatr0; /* PCI + 0x64 */
87 u32 tbatr1; /* PCI + 0x68 */
88 u32 tcr; /* PCI + 0x6C */
89 u32 iw0btar; /* PCI + 0x70 */
90 u32 iw1btar; /* PCI + 0x74 */
91 u32 iw2btar; /* PCI + 0x78 */
92 u8 reserved4[4]; /* PCI + 0x7C */
93 u32 iwcr; /* PCI + 0x80 */
94 u32 icr; /* PCI + 0x84 */
95 u32 isr; /* PCI + 0x88 */
96 u32 arb; /* PCI + 0x8C */
97 u8 reserved5[104]; /* PCI + 0x90 */
98 u32 car; /* PCI + 0xF8 */
99 u8 reserved6[4]; /* PCI + 0xFC */
100};
101
102
103/* ======================================================================== */
104/* PCI configuration acess */
105/* ======================================================================== */
106
107static int
108mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
109 int offset, int len, u32 *val)
110{
111 struct pci_controller *hose = bus->sysdata;
112 u32 value;
113
114 if (ppc_md.pci_exclude_device)
115 if (ppc_md.pci_exclude_device(bus->number, devfn))
116 return PCIBIOS_DEVICE_NOT_FOUND;
117
118 out_be32(hose->cfg_addr,
119 (1 << 31) |
120 ((bus->number - hose->bus_offset) << 16) |
121 (devfn << 8) |
122 (offset & 0xfc));
123 mb();
124
125#if defined(CONFIG_PPC_MPC5200_BUGFIX)
126 if (bus->number != hose->bus_offset) {
127 /* workaround for the bug 435 of the MPC5200 (L25R);
128 * Don't do 32 bits config access during type-1 cycles */
129 switch (len) {
130 case 1:
131 value = in_8(((u8 __iomem *)hose->cfg_data) +
132 (offset & 3));
133 break;
134 case 2:
135 value = in_le16(((u16 __iomem *)hose->cfg_data) +
136 ((offset>>1) & 1));
137 break;
138
139 default:
140 value = in_le16((u16 __iomem *)hose->cfg_data) |
141 (in_le16(((u16 __iomem *)hose->cfg_data) + 1) << 16);
142 break;
143 }
144 }
145 else
146#endif
147 {
148 value = in_le32(hose->cfg_data);
149
150 if (len != 4) {
151 value >>= ((offset & 0x3) << 3);
152 value &= 0xffffffff >> (32 - (len << 3));
153 }
154 }
155
156 *val = value;
157
158 out_be32(hose->cfg_addr, 0);
159 mb();
160
161 return PCIBIOS_SUCCESSFUL;
162}
163
164static int
165mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
166 int offset, int len, u32 val)
167{
168 struct pci_controller *hose = bus->sysdata;
169 u32 value, mask;
170
171 if (ppc_md.pci_exclude_device)
172 if (ppc_md.pci_exclude_device(bus->number, devfn))
173 return PCIBIOS_DEVICE_NOT_FOUND;
174
175 out_be32(hose->cfg_addr,
176 (1 << 31) |
177 ((bus->number - hose->bus_offset) << 16) |
178 (devfn << 8) |
179 (offset & 0xfc));
180 mb();
181
182#if defined(CONFIG_PPC_MPC5200_BUGFIX)
183 if (bus->number != hose->bus_offset) {
184 /* workaround for the bug 435 of the MPC5200 (L25R);
185 * Don't do 32 bits config access during type-1 cycles */
186 switch (len) {
187 case 1:
188 out_8(((u8 __iomem *)hose->cfg_data) +
189 (offset & 3), val);
190 break;
191 case 2:
192 out_le16(((u16 __iomem *)hose->cfg_data) +
193 ((offset>>1) & 1), val);
194 break;
195
196 default:
197 out_le16((u16 __iomem *)hose->cfg_data,
198 (u16)val);
199 out_le16(((u16 __iomem *)hose->cfg_data) + 1,
200 (u16)(val>>16));
201 break;
202 }
203 }
204 else
205#endif
206 {
207 if (len != 4) {
208 value = in_le32(hose->cfg_data);
209
210 offset = (offset & 0x3) << 3;
211 mask = (0xffffffff >> (32 - (len << 3)));
212 mask <<= offset;
213
214 value &= ~mask;
215 val = value | ((val << offset) & mask);
216 }
217
218 out_le32(hose->cfg_data, val);
219 }
220 mb();
221
222 out_be32(hose->cfg_addr, 0);
223 mb();
224
225 return PCIBIOS_SUCCESSFUL;
226}
227
228static struct pci_ops mpc52xx_pci_ops = {
229 .read = mpc52xx_pci_read_config,
230 .write = mpc52xx_pci_write_config
231};
232
233
234/* ======================================================================== */
235/* PCI setup */
236/* ======================================================================== */
237
238static void __init
239mpc52xx_pci_setup(struct pci_controller *hose,
240 struct mpc52xx_pci __iomem *pci_regs)
241{
242 struct resource *res;
243 u32 tmp;
244 int iwcr0 = 0, iwcr1 = 0, iwcr2 = 0;
245
246 pr_debug("mpc52xx_pci_setup(hose=%p, pci_regs=%p)\n", hose, pci_regs);
247
248 /* pci_process_bridge_OF_ranges() found all our addresses for us;
249 * now store them in the right places */
250 hose->cfg_addr = &pci_regs->car;
251 hose->cfg_data = hose->io_base_virt;
252
253 /* Control regs */
254 tmp = in_be32(&pci_regs->scr);
255 tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
256 out_be32(&pci_regs->scr, tmp);
257
258 /* Memory windows */
259 res = &hose->mem_resources[0];
260 if (res->flags) {
261 pr_debug("mem_resource[0] = {.start=%x, .end=%x, .flags=%lx}\n",
262 res->start, res->end, res->flags);
263 out_be32(&pci_regs->iw0btar,
264 MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
265 res->end - res->start + 1));
266 iwcr0 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
267 if (res->flags & IORESOURCE_PREFETCH)
268 iwcr0 |= MPC52xx_PCI_IWCR_READ_MULTI;
269 else
270 iwcr0 |= MPC52xx_PCI_IWCR_READ;
271 }
272
273 res = &hose->mem_resources[1];
274 if (res->flags) {
275 pr_debug("mem_resource[1] = {.start=%x, .end=%x, .flags=%lx}\n",
276 res->start, res->end, res->flags);
277 out_be32(&pci_regs->iw1btar,
278 MPC52xx_PCI_IWBTAR_TRANSLATION(res->start, res->start,
279 res->end - res->start + 1));
280 iwcr1 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_MEM;
281 if (res->flags & IORESOURCE_PREFETCH)
282 iwcr1 |= MPC52xx_PCI_IWCR_READ_MULTI;
283 else
284 iwcr1 |= MPC52xx_PCI_IWCR_READ;
285 }
286
287 /* IO resources */
288 res = &hose->io_resource;
289 if (!res) {
290 printk(KERN_ERR "%s: Didn't find IO resources\n", __FILE__);
291 return;
292 }
293 pr_debug(".io_resource={.start=%x,.end=%x,.flags=%lx} "
294 ".io_base_phys=0x%p\n",
295 res->start, res->end, res->flags, (void*)hose->io_base_phys);
296 out_be32(&pci_regs->iw2btar,
297 MPC52xx_PCI_IWBTAR_TRANSLATION(hose->io_base_phys,
298 res->start,
299 res->end - res->start + 1));
300 iwcr2 = MPC52xx_PCI_IWCR_ENABLE | MPC52xx_PCI_IWCR_IO;
301
302 /* Set all the IWCR fields at once; they're in the same reg */
303 out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2));
304
305 out_be32(&pci_regs->tbatr0,
306 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO );
307 out_be32(&pci_regs->tbatr1,
308 MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM );
309
310 out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD);
311
312 tmp = in_be32(&pci_regs->gscr);
313#if 0
314 /* Reset the exteral bus ( internal PCI controller is NOT resetted ) */
315 /* Not necessary and can be a bad thing if for example the bootloader
316 is displaying a splash screen or ... Just left here for
317 documentation purpose if anyone need it */
318 out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
319 udelay(50);
320#endif
321
322 /* Make sure the PCI bridge is out of reset */
323 out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
324}
325
326static void
327mpc52xx_pci_fixup_resources(struct pci_dev *dev)
328{
329 int i;
330
331 pr_debug("mpc52xx_pci_fixup_resources() %.4x:%.4x\n",
332 dev->vendor, dev->device);
333
334 /* We don't rely on boot loader for PCI and resets all
335 devices */
336 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
337 struct resource *res = &dev->resource[i];
338 if (res->end > res->start) { /* Only valid resources */
339 res->end -= res->start;
340 res->start = 0;
341 res->flags |= IORESOURCE_UNSET;
342 }
343 }
344
345 /* The PCI Host bridge of MPC52xx has a prefetch memory resource
346 fixed to 1Gb. Doesn't fit in the resource system so we remove it */
347 if ( (dev->vendor == PCI_VENDOR_ID_MOTOROLA) &&
348 ( dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200
349 || dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200B) ) {
350 struct resource *res = &dev->resource[1];
351 res->start = res->end = res->flags = 0;
352 }
353}
354
355int __init
356mpc52xx_add_bridge(struct device_node *node)
357{
358 int len;
359 struct mpc52xx_pci __iomem *pci_regs;
360 struct pci_controller *hose;
361 const int *bus_range;
362 struct resource rsrc;
363
364 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
365
366 pci_assign_all_buses = 1;
367
368 if (of_address_to_resource(node, 0, &rsrc) != 0) {
369 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
370 return -EINVAL;
371 }
372
373 bus_range = get_property(node, "bus-range", &len);
374 if (bus_range == NULL || len < 2 * sizeof(int)) {
375 printk(KERN_WARNING "Can't get %s bus-range, assume bus 0\n",
376 node->full_name);
377 bus_range = NULL;
378 }
379
380 /* There are some PCI quirks on the 52xx, register the hook to
381 * fix them. */
382 ppc_md.pcibios_fixup_resources = mpc52xx_pci_fixup_resources;
383
384 /* Alloc and initialize the pci controller. Values in the device
385 * tree are needed to configure the 52xx PCI controller. Rather
386 * than parse the tree here, let pci_process_bridge_OF_ranges()
387 * do it for us and extract the values after the fact */
388 hose = pcibios_alloc_controller();
389 if (!hose)
390 return -ENOMEM;
391
392 hose->arch_data = node;
393 hose->set_cfg_type = 1;
394
395 hose->first_busno = bus_range ? bus_range[0] : 0;
396 hose->last_busno = bus_range ? bus_range[1] : 0xff;
397
398 hose->bus_offset = 0;
399 hose->ops = &mpc52xx_pci_ops;
400
401 pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
402 if (!pci_regs)
403 return -ENOMEM;
404
405 pci_process_bridge_OF_ranges(hose, node, 1);
406
407 /* Finish setting up PCI using values obtained by
408 * pci_proces_bridge_OF_ranges */
409 mpc52xx_pci_setup(hose, pci_regs);
410
411 return 0;
412}
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index cd91a6c3aafa..c75192567e55 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -383,16 +383,16 @@ void __init mpc52xx_init_irq(void)
383 struct device_node *picnode; 383 struct device_node *picnode;
384 384
385 /* Remap the necessary zones */ 385 /* Remap the necessary zones */
386 picnode = of_find_compatible_node(NULL, NULL, "mpc52xx-pic"); 386 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic");
387 387
388 intr = mpc52xx_find_and_map("mpc52xx-pic"); 388 intr = mpc52xx_find_and_map("mpc5200-pic");
389 if (!intr) 389 if (!intr)
390 panic(__FILE__ ": find_and_map failed on 'mpc52xx-pic'. " 390 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
391 "Check node !"); 391 "Check node !");
392 392
393 sdma = mpc52xx_find_and_map("mpc52xx-bestcomm"); 393 sdma = mpc52xx_find_and_map("mpc5200-bestcomm");
394 if (!sdma) 394 if (!sdma)
395 panic(__FILE__ ": find_and_map failed on 'mpc52xx-bestcomm'. " 395 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
396 "Check node !"); 396 "Check node !");
397 397
398 /* Disable all interrupt sources. */ 398 /* Disable all interrupt sources. */
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c
index 0f5b30dc60da..74e7892cdfcf 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx.c
@@ -50,7 +50,7 @@
50#include <sysdev/fsl_soc.h> 50#include <sysdev/fsl_soc.h>
51#include <sysdev/cpm2_pic.h> 51#include <sysdev/cpm2_pic.h>
52 52
53#include "pq2ads_pd.h" 53#include "pq2ads.h"
54 54
55static int __init get_freq(char *name, unsigned long *val) 55static int __init get_freq(char *name, unsigned long *val)
56{ 56{
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index ea880f1f0dcd..7334c1a15b90 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -51,7 +51,7 @@
51#include <sysdev/fsl_soc.h> 51#include <sysdev/fsl_soc.h>
52#include <../sysdev/cpm2_pic.h> 52#include <../sysdev/cpm2_pic.h>
53 53
54#include "pq2ads_pd.h" 54#include "pq2ads.h"
55 55
56#ifdef CONFIG_PCI 56#ifdef CONFIG_PCI
57static uint pci_clk_frq; 57static uint pci_clk_frq;
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h
index fb2f92bcd770..5b5cca6c8c88 100644
--- a/arch/powerpc/platforms/82xx/pq2ads.h
+++ b/arch/powerpc/platforms/82xx/pq2ads.h
@@ -22,6 +22,7 @@
22#ifndef __MACH_ADS8260_DEFS 22#ifndef __MACH_ADS8260_DEFS
23#define __MACH_ADS8260_DEFS 23#define __MACH_ADS8260_DEFS
24 24
25#include <linux/seq_file.h>
25#include <asm/ppcboot.h> 26#include <asm/ppcboot.h>
26 27
27/* For our show_cpuinfo hooks. */ 28/* For our show_cpuinfo hooks. */
@@ -46,12 +47,12 @@
46#define BCSR1_RS232_EN1 ((uint)0x02000000) /* 0 ==enable */ 47#define BCSR1_RS232_EN1 ((uint)0x02000000) /* 0 ==enable */
47#define BCSR1_RS232_EN2 ((uint)0x01000000) /* 0 ==enable */ 48#define BCSR1_RS232_EN2 ((uint)0x01000000) /* 0 ==enable */
48#define BCSR3_FETHIEN2 ((uint)0x10000000) /* 0 == enable*/ 49#define BCSR3_FETHIEN2 ((uint)0x10000000) /* 0 == enable*/
49#define BCSR3_FETH2_RS ((uint)0x80000000) /* 0 == reset */ 50#define BCSR3_FETH2_RST ((uint)0x80000000) /* 0 == reset */
50 51
51/* cpm serial driver works with constants below */ 52/* cpm serial driver works with constants below */
52 53
53#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET) 54#define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET)
54#define SIU_INT_SMC2i ((uint)0x05+CPM_IRQ_OFFSET) 55#define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET)
55#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET) 56#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET)
56#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET) 57#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET)
57#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET) 58#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index edcd5b875b66..713b31a16ce9 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -3,7 +3,13 @@ menu "Platform support"
3 3
4choice 4choice
5 prompt "Machine Type" 5 prompt "Machine Type"
6 default MPC834x_SYS 6 default MPC834x_MDS
7
8config MPC8313_RDB
9 bool "Freescale MPC8313 RDB"
10 select DEFAULT_UIMAGE
11 help
12 This option enables support for the MPC8313 RDB board.
7 13
8config MPC832x_MDS 14config MPC832x_MDS
9 bool "Freescale MPC832x MDS" 15 bool "Freescale MPC832x MDS"
@@ -12,13 +18,13 @@ config MPC832x_MDS
12 help 18 help
13 This option enables support for the MPC832x MDS evaluation board. 19 This option enables support for the MPC832x MDS evaluation board.
14 20
15config MPC834x_SYS 21config MPC834x_MDS
16 bool "Freescale MPC834x SYS" 22 bool "Freescale MPC834x MDS"
17 select DEFAULT_UIMAGE 23 select DEFAULT_UIMAGE
18 help 24 help
19 This option enables support for the MPC 834x SYS evaluation board. 25 This option enables support for the MPC 834x MDS evaluation board.
20 26
21 Be aware that PCI buses can only function when SYS board is plugged 27 Be aware that PCI buses can only function when MDS board is plugged
22 into the PIB (Platform IO Board) board from Freescale which provide 28 into the PIB (Platform IO Board) board from Freescale which provide
23 3 PCI slots. The PIBs PCI initialization is the bootloader's 29 3 PCI slots. The PIBs PCI initialization is the bootloader's
24 responsibility. 30 responsibility.
@@ -32,15 +38,21 @@ config MPC834x_ITX
32 Be aware that PCI initialization is the bootloader's 38 Be aware that PCI initialization is the bootloader's
33 responsibility. 39 responsibility.
34 40
35config MPC8360E_PB 41config MPC836x_MDS
36 bool "Freescale MPC8360E PB" 42 bool "Freescale MPC836x MDS"
37 select DEFAULT_UIMAGE 43 select DEFAULT_UIMAGE
38 select QUICC_ENGINE 44 select QUICC_ENGINE
39 help 45 help
40 This option enables support for the MPC836x EMDS Processor Board. 46 This option enables support for the MPC836x MDS Processor Board.
41 47
42endchoice 48endchoice
43 49
50config PPC_MPC831x
51 bool
52 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI
54 default y if MPC8313_RDB
55
44config PPC_MPC832x 56config PPC_MPC832x
45 bool 57 bool
46 select PPC_UDBG_16550 58 select PPC_UDBG_16550
@@ -51,12 +63,12 @@ config MPC834x
51 bool 63 bool
52 select PPC_UDBG_16550 64 select PPC_UDBG_16550
53 select PPC_INDIRECT_PCI 65 select PPC_INDIRECT_PCI
54 default y if MPC834x_SYS || MPC834x_ITX 66 default y if MPC834x_MDS || MPC834x_ITX
55 67
56config PPC_MPC836x 68config PPC_MPC836x
57 bool 69 bool
58 select PPC_UDBG_16550 70 select PPC_UDBG_16550
59 select PPC_INDIRECT_PCI 71 select PPC_INDIRECT_PCI
60 default y if MPC8360E_PB 72 default y if MPC836x_MDS
61 73
62endmenu 74endmenu
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index f1aa7e24a938..dfc970d0df10 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -3,7 +3,8 @@
3# 3#
4obj-y := misc.o 4obj-y := misc.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o 6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
7obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o
7obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o 8obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
8obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o 9obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
9obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o 10obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index f0c6df61faa9..f01806c940e1 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -18,23 +18,36 @@
18 18
19#include "mpc83xx.h" 19#include "mpc83xx.h"
20 20
21static __be32 __iomem *restart_reg_base;
22
23static int __init mpc83xx_restart_init(void)
24{
25 /* map reset restart_reg_baseister space */
26 restart_reg_base = ioremap(get_immrbase() + 0x900, 0xff);
27
28 return 0;
29}
30
31arch_initcall(mpc83xx_restart_init);
32
21void mpc83xx_restart(char *cmd) 33void mpc83xx_restart(char *cmd)
22{ 34{
23#define RST_OFFSET 0x00000900 35#define RST_OFFSET 0x00000900
24#define RST_PROT_REG 0x00000018 36#define RST_PROT_REG 0x00000018
25#define RST_CTRL_REG 0x0000001c 37#define RST_CTRL_REG 0x0000001c
26 __be32 __iomem *reg;
27
28 /* map reset register space */
29 reg = ioremap(get_immrbase() + 0x900, 0xff);
30 38
31 local_irq_disable(); 39 local_irq_disable();
32 40
33 /* enable software reset "RSTE" */ 41 if (restart_reg_base) {
34 out_be32(reg + (RST_PROT_REG >> 2), 0x52535445); 42 /* enable software reset "RSTE" */
43 out_be32(restart_reg_base + (RST_PROT_REG >> 2), 0x52535445);
44
45 /* set software hard reset */
46 out_be32(restart_reg_base + (RST_CTRL_REG >> 2), 0x2);
47 } else {
48 printk (KERN_EMERG "Error: Restart registers not mapped, spinning!\n");
49 }
35 50
36 /* set software hard reset */
37 out_be32(reg + (RST_CTRL_REG >> 2), 0x2);
38 for (;;) ; 51 for (;;) ;
39} 52}
40 53
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
new file mode 100644
index 000000000000..32e9e9492841
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c
@@ -0,0 +1,92 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc8313_rdb.c
3 *
4 * Description: MPC8313x RDB board specific routines.
5 * This file is based on mpc834x_sys.c
6 * Author: Lo Wlison <r43300@freescale.com>
7 *
8 * Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/pci.h>
17
18#include <asm/time.h>
19#include <asm/ipic.h>
20#include <asm/udbg.h>
21
22#include "mpc83xx.h"
23
24#undef DEBUG
25#ifdef DEBUG
26#define DBG(fmt...) udbg_printf(fmt)
27#else
28#define DBG(fmt...)
29#endif
30
31#ifndef CONFIG_PCI
32unsigned long isa_io_base = 0;
33unsigned long isa_mem_base = 0;
34#endif
35
36/* ************************************************************************
37 *
38 * Setup the architecture
39 *
40 */
41static void __init mpc8313_rdb_setup_arch(void)
42{
43 struct device_node *np;
44
45 if (ppc_md.progress)
46 ppc_md.progress("mpc8313_rdb_setup_arch()", 0);
47
48#ifdef CONFIG_PCI
49 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
50 add_bridge(np);
51
52 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
53#endif
54}
55
56void __init mpc8313_rdb_init_IRQ(void)
57{
58 struct device_node *np;
59
60 np = of_find_node_by_type(NULL, "ipic");
61 if (!np)
62 return;
63
64 ipic_init(np, 0);
65
66 /* Initialize the default interrupt mapping priorities,
67 * in case the boot rom changed something on us.
68 */
69 ipic_set_default_priority();
70}
71
72/*
73 * Called very early, MMU is off, device-tree isn't unflattened
74 */
75static int __init mpc8313_rdb_probe(void)
76{
77 unsigned long root = of_get_flat_dt_root();
78
79 return of_flat_dt_is_compatible(root, "MPC8313ERDB");
80}
81
82define_machine(mpc8313_rdb) {
83 .name = "MPC8313 RDB",
84 .probe = mpc8313_rdb_probe,
85 .setup_arch = mpc8313_rdb_setup_arch,
86 .init_IRQ = mpc8313_rdb_init_IRQ,
87 .get_irq = ipic_get_irq,
88 .restart = mpc83xx_restart,
89 .time_init = mpc83xx_time_init,
90 .calibrate_decr = generic_calibrate_decr,
91 .progress = udbg_progress,
92};
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 4d471190be8d..17e3a3c6d8b4 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -25,6 +25,7 @@
25#include <linux/initrd.h> 25#include <linux/initrd.h>
26 26
27#include <asm/of_device.h> 27#include <asm/of_device.h>
28#include <asm/of_platform.h>
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/atomic.h> 30#include <asm/atomic.h>
30#include <asm/time.h> 31#include <asm/time.h>
@@ -56,11 +57,6 @@ unsigned long isa_mem_base = 0;
56 57
57static u8 *bcsr_regs = NULL; 58static u8 *bcsr_regs = NULL;
58 59
59u8 *get_bcsr(void)
60{
61 return bcsr_regs;
62}
63
64/* ************************************************************************ 60/* ************************************************************************
65 * 61 *
66 * Setup the architecture 62 * Setup the architecture
@@ -73,17 +69,6 @@ static void __init mpc832x_sys_setup_arch(void)
73 if (ppc_md.progress) 69 if (ppc_md.progress)
74 ppc_md.progress("mpc832x_sys_setup_arch()", 0); 70 ppc_md.progress("mpc832x_sys_setup_arch()", 0);
75 71
76 np = of_find_node_by_type(NULL, "cpu");
77 if (np != 0) {
78 unsigned int *fp =
79 (int *)get_property(np, "clock-frequency", NULL);
80 if (fp != 0)
81 loops_per_jiffy = *fp / HZ;
82 else
83 loops_per_jiffy = 50000000 / HZ;
84 of_node_put(np);
85 }
86
87 /* Map BCSR area */ 72 /* Map BCSR area */
88 np = of_find_node_by_name(NULL, "bcsr"); 73 np = of_find_node_by_name(NULL, "bcsr");
89 if (np != 0) { 74 if (np != 0) {
@@ -120,42 +105,30 @@ static void __init mpc832x_sys_setup_arch(void)
120 iounmap(bcsr_regs); 105 iounmap(bcsr_regs);
121 of_node_put(np); 106 of_node_put(np);
122 } 107 }
123
124#endif /* CONFIG_QUICC_ENGINE */ 108#endif /* CONFIG_QUICC_ENGINE */
125
126#ifdef CONFIG_BLK_DEV_INITRD
127 if (initrd_start)
128 ROOT_DEV = Root_RAM0;
129 else
130#endif
131#ifdef CONFIG_ROOT_NFS
132 ROOT_DEV = Root_NFS;
133#else
134 ROOT_DEV = Root_HDA1;
135#endif
136} 109}
137 110
111static struct of_device_id mpc832x_ids[] = {
112 { .type = "soc", },
113 { .compatible = "soc", },
114 { .type = "qe", },
115 {},
116};
117
138static int __init mpc832x_declare_of_platform_devices(void) 118static int __init mpc832x_declare_of_platform_devices(void)
139{ 119{
140 struct device_node *np; 120 if (!machine_is(mpc832x_mds))
141 121 return 0;
142 for (np = NULL; (np = of_find_compatible_node(np, "network",
143 "ucc_geth")) != NULL;) {
144 int ucc_num;
145 char bus_id[BUS_ID_SIZE];
146 122
147 ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; 123 /* Publish the QE devices */
148 snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); 124 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
149 of_platform_device_create(np, bus_id, NULL);
150 }
151 125
152 return 0; 126 return 0;
153} 127}
154device_initcall(mpc832x_declare_of_platform_devices); 128device_initcall(mpc832x_declare_of_platform_devices);
155 129
156void __init mpc832x_sys_init_IRQ(void) 130static void __init mpc832x_sys_init_IRQ(void)
157{ 131{
158
159 struct device_node *np; 132 struct device_node *np;
160 133
161 np = of_find_node_by_type(NULL, "ipic"); 134 np = of_find_node_by_type(NULL, "ipic");
@@ -188,6 +161,9 @@ static int __init mpc832x_rtc_hookup(void)
188{ 161{
189 struct timespec tv; 162 struct timespec tv;
190 163
164 if (!machine_is(mpc832x_mds))
165 return 0;
166
191 ppc_md.get_rtc_time = ds1374_get_rtc_time; 167 ppc_md.get_rtc_time = ds1374_get_rtc_time;
192 ppc_md.set_rtc_time = ds1374_set_rtc_time; 168 ppc_md.set_rtc_time = ds1374_set_rtc_time;
193 169
@@ -206,17 +182,9 @@ late_initcall(mpc832x_rtc_hookup);
206 */ 182 */
207static int __init mpc832x_sys_probe(void) 183static int __init mpc832x_sys_probe(void)
208{ 184{
209 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), 185 unsigned long root = of_get_flat_dt_root();
210 "model", NULL);
211
212 if (model == NULL)
213 return 0;
214 if (strcmp(model, "MPC8323EMDS"))
215 return 0;
216
217 DBG("%s found\n", model);
218 186
219 return 1; 187 return of_flat_dt_is_compatible(root, "MPC832xMDS");
220} 188}
221 189
222define_machine(mpc832x_mds) { 190define_machine(mpc832x_mds) {
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 314c42ac6048..3c009f6d4a4f 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -38,8 +38,6 @@
38 38
39#include "mpc83xx.h" 39#include "mpc83xx.h"
40 40
41#include <platforms/83xx/mpc834x_sys.h>
42
43#ifndef CONFIG_PCI 41#ifndef CONFIG_PCI
44unsigned long isa_io_base = 0; 42unsigned long isa_io_base = 0;
45unsigned long isa_mem_base = 0; 43unsigned long isa_mem_base = 0;
@@ -57,31 +55,15 @@ static void __init mpc834x_itx_setup_arch(void)
57 if (ppc_md.progress) 55 if (ppc_md.progress)
58 ppc_md.progress("mpc834x_itx_setup_arch()", 0); 56 ppc_md.progress("mpc834x_itx_setup_arch()", 0);
59 57
60 np = of_find_node_by_type(NULL, "cpu");
61 if (np != 0) {
62 const unsigned int *fp =
63 get_property(np, "clock-frequency", NULL);
64 if (fp != 0)
65 loops_per_jiffy = *fp / HZ;
66 else
67 loops_per_jiffy = 50000000 / HZ;
68 of_node_put(np);
69 }
70#ifdef CONFIG_PCI 58#ifdef CONFIG_PCI
71 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 59 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
72 add_bridge(np); 60 add_bridge(np);
73 61
74 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 62 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
75#endif 63#endif
76
77#ifdef CONFIG_ROOT_NFS
78 ROOT_DEV = Root_NFS;
79#else
80 ROOT_DEV = Root_HDA1;
81#endif
82} 64}
83 65
84void __init mpc834x_itx_init_IRQ(void) 66static void __init mpc834x_itx_init_IRQ(void)
85{ 67{
86 struct device_node *np; 68 struct device_node *np;
87 69
@@ -102,10 +84,9 @@ void __init mpc834x_itx_init_IRQ(void)
102 */ 84 */
103static int __init mpc834x_itx_probe(void) 85static int __init mpc834x_itx_probe(void)
104{ 86{
105 /* We always match for now, eventually we should look at the flat 87 unsigned long root = of_get_flat_dt_root();
106 dev tree to ensure this is the board we are suppose to run on 88
107 */ 89 return of_flat_dt_is_compatible(root, "MPC834xMITX");
108 return 1;
109} 90}
110 91
111define_machine(mpc834x_itx) { 92define_machine(mpc834x_itx) {
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 80b735a414d9..e5d819166874 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/powerpc/platforms/83xx/mpc834x_sys.c 2 * arch/powerpc/platforms/83xx/mpc834x_mds.c
3 * 3 *
4 * MPC834x SYS board specific routines 4 * MPC834x MDS board specific routines
5 * 5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org> 6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 * 7 *
@@ -43,28 +43,88 @@ unsigned long isa_io_base = 0;
43unsigned long isa_mem_base = 0; 43unsigned long isa_mem_base = 0;
44#endif 44#endif
45 45
46#define BCSR5_INT_USB 0x02
47/* Note: This is only for PB, not for PB+PIB
48 * On PB only port0 is connected using ULPI */
49static int mpc834x_usb_cfg(void)
50{
51 unsigned long sccr, sicrl;
52 void __iomem *immap;
53 void __iomem *bcsr_regs = NULL;
54 u8 bcsr5;
55 struct device_node *np = NULL;
56 int port0_is_dr = 0;
57
58 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL)
59 port0_is_dr = 1;
60 if ((np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL){
61 if (port0_is_dr) {
62 printk(KERN_WARNING
63 "There is only one USB port on PB board! \n");
64 return -1;
65 } else if (!port0_is_dr)
66 /* No usb port enabled */
67 return -1;
68 }
69
70 immap = ioremap(get_immrbase(), 0x1000);
71 if (!immap)
72 return -1;
73
74 /* Configure clock */
75 sccr = in_be32(immap + MPC83XX_SCCR_OFFS);
76 if (port0_is_dr)
77 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
78 else
79 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
80 out_be32(immap + MPC83XX_SCCR_OFFS, sccr);
81
82 /* Configure Pin */
83 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS);
84 /* set port0 only */
85 if (port0_is_dr)
86 sicrl |= MPC83XX_SICRL_USB0;
87 else
88 sicrl &= ~(MPC83XX_SICRL_USB0);
89 out_be32(immap + MPC83XX_SICRL_OFFS, sicrl);
90
91 iounmap(immap);
92
93 /* Map BCSR area */
94 np = of_find_node_by_name(NULL, "bcsr");
95 if (np != 0) {
96 struct resource res;
97
98 of_address_to_resource(np, 0, &res);
99 bcsr_regs = ioremap(res.start, res.end - res.start + 1);
100 of_node_put(np);
101 }
102 if (!bcsr_regs)
103 return -1;
104
105 /*
106 * if MDS board is plug into PIB board,
107 * force to use the PHY on MDS board
108 */
109 bcsr5 = in_8(bcsr_regs + 5);
110 if (!(bcsr5 & BCSR5_INT_USB))
111 out_8(bcsr_regs + 5, (bcsr5 | BCSR5_INT_USB));
112 iounmap(bcsr_regs);
113 return 0;
114}
115
46/* ************************************************************************ 116/* ************************************************************************
47 * 117 *
48 * Setup the architecture 118 * Setup the architecture
49 * 119 *
50 */ 120 */
51static void __init mpc834x_sys_setup_arch(void) 121static void __init mpc834x_mds_setup_arch(void)
52{ 122{
53 struct device_node *np; 123 struct device_node *np;
54 124
55 if (ppc_md.progress) 125 if (ppc_md.progress)
56 ppc_md.progress("mpc834x_sys_setup_arch()", 0); 126 ppc_md.progress("mpc834x_mds_setup_arch()", 0);
57 127
58 np = of_find_node_by_type(NULL, "cpu");
59 if (np != 0) {
60 const unsigned int *fp =
61 get_property(np, "clock-frequency", NULL);
62 if (fp != 0)
63 loops_per_jiffy = *fp / HZ;
64 else
65 loops_per_jiffy = 50000000 / HZ;
66 of_node_put(np);
67 }
68#ifdef CONFIG_PCI 128#ifdef CONFIG_PCI
69 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 129 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
70 add_bridge(np); 130 add_bridge(np);
@@ -72,14 +132,10 @@ static void __init mpc834x_sys_setup_arch(void)
72 ppc_md.pci_exclude_device = mpc83xx_exclude_device; 132 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
73#endif 133#endif
74 134
75#ifdef CONFIG_ROOT_NFS 135 mpc834x_usb_cfg();
76 ROOT_DEV = Root_NFS;
77#else
78 ROOT_DEV = Root_HDA1;
79#endif
80} 136}
81 137
82void __init mpc834x_sys_init_IRQ(void) 138static void __init mpc834x_mds_init_IRQ(void)
83{ 139{
84 struct device_node *np; 140 struct device_node *np;
85 141
@@ -103,6 +159,9 @@ static int __init mpc834x_rtc_hookup(void)
103{ 159{
104 struct timespec tv; 160 struct timespec tv;
105 161
162 if (!machine_is(mpc834x_mds))
163 return 0;
164
106 ppc_md.get_rtc_time = ds1374_get_rtc_time; 165 ppc_md.get_rtc_time = ds1374_get_rtc_time;
107 ppc_md.set_rtc_time = ds1374_set_rtc_time; 166 ppc_md.set_rtc_time = ds1374_set_rtc_time;
108 167
@@ -119,19 +178,18 @@ late_initcall(mpc834x_rtc_hookup);
119/* 178/*
120 * Called very early, MMU is off, device-tree isn't unflattened 179 * Called very early, MMU is off, device-tree isn't unflattened
121 */ 180 */
122static int __init mpc834x_sys_probe(void) 181static int __init mpc834x_mds_probe(void)
123{ 182{
124 /* We always match for now, eventually we should look at the flat 183 unsigned long root = of_get_flat_dt_root();
125 dev tree to ensure this is the board we are suppose to run on 184
126 */ 185 return of_flat_dt_is_compatible(root, "MPC834xMDS");
127 return 1;
128} 186}
129 187
130define_machine(mpc834x_sys) { 188define_machine(mpc834x_mds) {
131 .name = "MPC834x SYS", 189 .name = "MPC834x MDS",
132 .probe = mpc834x_sys_probe, 190 .probe = mpc834x_mds_probe,
133 .setup_arch = mpc834x_sys_setup_arch, 191 .setup_arch = mpc834x_mds_setup_arch,
134 .init_IRQ = mpc834x_sys_init_IRQ, 192 .init_IRQ = mpc834x_mds_init_IRQ,
135 .get_irq = ipic_get_irq, 193 .get_irq = ipic_get_irq,
136 .restart = mpc83xx_restart, 194 .restart = mpc83xx_restart,
137 .time_init = mpc83xx_time_init, 195 .time_init = mpc83xx_time_init,
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.h b/arch/powerpc/platforms/83xx/mpc834x_sys.h
deleted file mode 100644
index 7d5bbef084e7..000000000000
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc834x_sys.h
3 *
4 * MPC834X SYS common board definitions
5 *
6 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifndef __MACH_MPC83XX_SYS_H__
16#define __MACH_MPC83XX_SYS_H__
17
18#define PIRQA MPC83xx_IRQ_EXT4
19#define PIRQB MPC83xx_IRQ_EXT5
20#define PIRQC MPC83xx_IRQ_EXT6
21#define PIRQD MPC83xx_IRQ_EXT7
22
23#endif /* __MACH_MPC83XX_SYS_H__ */
diff --git a/arch/powerpc/platforms/83xx/mpc8360e_pb.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index 53b92a904e8e..526ed090a446 100644
--- a/arch/powerpc/platforms/83xx/mpc8360e_pb.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -5,12 +5,12 @@
5 * Yin Olivia <Hong-hua.Yin@freescale.com> 5 * Yin Olivia <Hong-hua.Yin@freescale.com>
6 * 6 *
7 * Description: 7 * Description:
8 * MPC8360E MDS PB board specific routines. 8 * MPC8360E MDS board specific routines.
9 * 9 *
10 * Changelog: 10 * Changelog:
11 * Jun 21, 2006 Initial version 11 * Jun 21, 2006 Initial version
12 * 12 *
13 * This program is free software; you can redistribute it and/or modify it 13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the 14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your 15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. 16 * option) any later version.
@@ -31,6 +31,7 @@
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32 32
33#include <asm/of_device.h> 33#include <asm/of_device.h>
34#include <asm/of_platform.h>
34#include <asm/system.h> 35#include <asm/system.h>
35#include <asm/atomic.h> 36#include <asm/atomic.h>
36#include <asm/time.h> 37#include <asm/time.h>
@@ -61,33 +62,17 @@ unsigned long isa_mem_base = 0;
61 62
62static u8 *bcsr_regs = NULL; 63static u8 *bcsr_regs = NULL;
63 64
64u8 *get_bcsr(void)
65{
66 return bcsr_regs;
67}
68
69/* ************************************************************************ 65/* ************************************************************************
70 * 66 *
71 * Setup the architecture 67 * Setup the architecture
72 * 68 *
73 */ 69 */
74static void __init mpc8360_sys_setup_arch(void) 70static void __init mpc836x_mds_setup_arch(void)
75{ 71{
76 struct device_node *np; 72 struct device_node *np;
77 73
78 if (ppc_md.progress) 74 if (ppc_md.progress)
79 ppc_md.progress("mpc8360_sys_setup_arch()", 0); 75 ppc_md.progress("mpc836x_mds_setup_arch()", 0);
80
81 np = of_find_node_by_type(NULL, "cpu");
82 if (np != 0) {
83 const unsigned int *fp =
84 get_property(np, "clock-frequency", NULL);
85 if (fp != 0)
86 loops_per_jiffy = *fp / HZ;
87 else
88 loops_per_jiffy = 50000000 / HZ;
89 of_node_put(np);
90 }
91 76
92 /* Map BCSR area */ 77 /* Map BCSR area */
93 np = of_find_node_by_name(NULL, "bcsr"); 78 np = of_find_node_by_name(NULL, "bcsr");
@@ -127,40 +112,29 @@ static void __init mpc8360_sys_setup_arch(void)
127 } 112 }
128 113
129#endif /* CONFIG_QUICC_ENGINE */ 114#endif /* CONFIG_QUICC_ENGINE */
130
131#ifdef CONFIG_BLK_DEV_INITRD
132 if (initrd_start)
133 ROOT_DEV = Root_RAM0;
134 else
135#endif
136#ifdef CONFIG_ROOT_NFS
137 ROOT_DEV = Root_NFS;
138#else
139 ROOT_DEV = Root_HDA1;
140#endif
141} 115}
142 116
143static int __init mpc8360_declare_of_platform_devices(void) 117static struct of_device_id mpc836x_ids[] = {
144{ 118 { .type = "soc", },
145 struct device_node *np; 119 { .compatible = "soc", },
120 { .type = "qe", },
121 {},
122};
146 123
147 for (np = NULL; (np = of_find_compatible_node(np, "network", 124static int __init mpc836x_declare_of_platform_devices(void)
148 "ucc_geth")) != NULL;) { 125{
149 int ucc_num; 126 if (!machine_is(mpc836x_mds))
150 char bus_id[BUS_ID_SIZE]; 127 return 0;
151 128
152 ucc_num = *((uint *) get_property(np, "device-id", NULL)) - 1; 129 /* Publish the QE devices */
153 snprintf(bus_id, BUS_ID_SIZE, "ucc_geth.%u", ucc_num); 130 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
154 of_platform_device_create(np, bus_id, NULL);
155 }
156 131
157 return 0; 132 return 0;
158} 133}
159device_initcall(mpc8360_declare_of_platform_devices); 134device_initcall(mpc836x_declare_of_platform_devices);
160 135
161void __init mpc8360_sys_init_IRQ(void) 136static void __init mpc836x_mds_init_IRQ(void)
162{ 137{
163
164 struct device_node *np; 138 struct device_node *np;
165 139
166 np = of_find_node_by_type(NULL, "ipic"); 140 np = of_find_node_by_type(NULL, "ipic");
@@ -193,6 +167,9 @@ static int __init mpc8360_rtc_hookup(void)
193{ 167{
194 struct timespec tv; 168 struct timespec tv;
195 169
170 if (!machine_is(mpc836x_mds))
171 return 0;
172
196 ppc_md.get_rtc_time = ds1374_get_rtc_time; 173 ppc_md.get_rtc_time = ds1374_get_rtc_time;
197 ppc_md.set_rtc_time = ds1374_set_rtc_time; 174 ppc_md.set_rtc_time = ds1374_set_rtc_time;
198 175
@@ -209,28 +186,21 @@ late_initcall(mpc8360_rtc_hookup);
209/* 186/*
210 * Called very early, MMU is off, device-tree isn't unflattened 187 * Called very early, MMU is off, device-tree isn't unflattened
211 */ 188 */
212static int __init mpc8360_sys_probe(void) 189static int __init mpc836x_mds_probe(void)
213{ 190{
214 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(), 191 unsigned long root = of_get_flat_dt_root();
215 "model", NULL);
216 if (model == NULL)
217 return 0;
218 if (strcmp(model, "MPC8360EPB"))
219 return 0;
220
221 DBG("MPC8360EMDS-PB found\n");
222 192
223 return 1; 193 return of_flat_dt_is_compatible(root, "MPC836xMDS");
224} 194}
225 195
226define_machine(mpc8360_sys) { 196define_machine(mpc836x_mds) {
227 .name = "MPC8360E PB", 197 .name = "MPC836x MDS",
228 .probe = mpc8360_sys_probe, 198 .probe = mpc836x_mds_probe,
229 .setup_arch = mpc8360_sys_setup_arch, 199 .setup_arch = mpc836x_mds_setup_arch,
230 .init_IRQ = mpc8360_sys_init_IRQ, 200 .init_IRQ = mpc836x_mds_init_IRQ,
231 .get_irq = ipic_get_irq, 201 .get_irq = ipic_get_irq,
232 .restart = mpc83xx_restart, 202 .restart = mpc83xx_restart,
233 .time_init = mpc83xx_time_init, 203 .time_init = mpc83xx_time_init,
234 .calibrate_decr = generic_calibrate_decr, 204 .calibrate_decr = generic_calibrate_decr,
235 .progress = udbg_progress, 205 .progress = udbg_progress,
236}; 206};
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 01cae106912b..9cd03b59c8f4 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -4,6 +4,24 @@
4#include <linux/init.h> 4#include <linux/init.h>
5#include <linux/device.h> 5#include <linux/device.h>
6 6
7/* System Clock Control Register */
8#define MPC83XX_SCCR_OFFS 0xA08
9#define MPC83XX_SCCR_USB_MPHCM_11 0x00c00000
10#define MPC83XX_SCCR_USB_MPHCM_01 0x00400000
11#define MPC83XX_SCCR_USB_MPHCM_10 0x00800000
12#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
13#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
14#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
15
16/* system i/o configuration register low */
17#define MPC83XX_SICRL_OFFS 0x114
18#define MPC83XX_SICRL_USB0 0x40000000
19#define MPC83XX_SICRL_USB1 0x20000000
20
21/* system i/o configuration register high */
22#define MPC83XX_SICRH_OFFS 0x118
23#define MPC83XX_SICRH_USB_UTMI 0x00020000
24
7/* 25/*
8 * Declaration for the various functions exported by the 26 * Declaration for the various functions exported by the
9 * mpc83xx_* files. Mostly for use by mpc83xx_setup 27 * mpc83xx_* files. Mostly for use by mpc83xx_setup
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 0584f3c7e884..eb661ccf2dab 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -23,6 +23,13 @@ config MPC85xx_CDS
23 help 23 help
24 This option enables support for the MPC85xx CDS board 24 This option enables support for the MPC85xx CDS board
25 25
26config MPC85xx_MDS
27 bool "Freescale MPC85xx MDS"
28 select DEFAULT_UIMAGE
29# select QUICC_ENGINE
30 help
31 This option enables support for the MPC85xx MDS board
32
26endchoice 33endchoice
27 34
28config MPC8540 35config MPC8540
@@ -36,6 +43,12 @@ config MPC8560
36 select PPC_INDIRECT_PCI 43 select PPC_INDIRECT_PCI
37 default y if MPC8560_ADS 44 default y if MPC8560_ADS
38 45
46config MPC85xx
47 bool
48 select PPC_UDBG_16550
49 select PPC_INDIRECT_PCI
50 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS
51
39config PPC_INDIRECT_PCI_BE 52config PPC_INDIRECT_PCI_BE
40 bool 53 bool
41 depends on PPC_85xx 54 depends on PPC_85xx
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 282f5d0d0152..4e63917ada9d 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_85xx) += misc.o pci.o
5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o 5obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o 6obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 7obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
8obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index bda2e55e6c4c..8ed034aeca5f 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -17,7 +17,6 @@
17#include <linux/kdev_t.h> 17#include <linux/kdev_t.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/seq_file.h> 19#include <linux/seq_file.h>
20#include <linux/root_dev.h>
21 20
22#include <asm/system.h> 21#include <asm/system.h>
23#include <asm/time.h> 22#include <asm/time.h>
@@ -45,8 +44,7 @@ unsigned long isa_mem_base = 0;
45#endif 44#endif
46 45
47#ifdef CONFIG_PCI 46#ifdef CONFIG_PCI
48int 47static int mpc85xx_exclude_device(u_char bus, u_char devfn)
49mpc85xx_exclude_device(u_char bus, u_char devfn)
50{ 48{
51 if (bus == 0 && PCI_SLOT(devfn) == 0) 49 if (bus == 0 && PCI_SLOT(devfn) == 0)
52 return PCIBIOS_DEVICE_NOT_FOUND; 50 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -69,7 +67,7 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
69 67
70#endif /* CONFIG_CPM2 */ 68#endif /* CONFIG_CPM2 */
71 69
72void __init mpc85xx_ads_pic_init(void) 70static void __init mpc85xx_ads_pic_init(void)
73{ 71{
74 struct mpic *mpic; 72 struct mpic *mpic;
75 struct resource r; 73 struct resource r;
@@ -246,15 +244,9 @@ static void __init mpc85xx_ads_setup_arch(void)
246 add_bridge(np); 244 add_bridge(np);
247 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 245 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
248#endif 246#endif
249
250#ifdef CONFIG_ROOT_NFS
251 ROOT_DEV = Root_NFS;
252#else
253 ROOT_DEV = Root_HDA1;
254#endif
255} 247}
256 248
257void mpc85xx_ads_show_cpuinfo(struct seq_file *m) 249static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
258{ 250{
259 uint pvid, svid, phid1; 251 uint pvid, svid, phid1;
260 uint memsize = total_memory; 252 uint memsize = total_memory;
@@ -280,10 +272,9 @@ void mpc85xx_ads_show_cpuinfo(struct seq_file *m)
280 */ 272 */
281static int __init mpc85xx_ads_probe(void) 273static int __init mpc85xx_ads_probe(void)
282{ 274{
283 /* We always match for now, eventually we should look at the flat 275 unsigned long root = of_get_flat_dt_root();
284 dev tree to ensure this is the board we are suppose to run on 276
285 */ 277 return of_flat_dt_is_compatible(root, "MPC85xxADS");
286 return 1;
287} 278}
288 279
289define_machine(mpc85xx_ads) { 280define_machine(mpc85xx_ads) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 953cd5dd3f54..4232686be441 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -22,7 +22,6 @@
22#include <linux/console.h> 22#include <linux/console.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/seq_file.h> 24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/initrd.h> 25#include <linux/initrd.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/fsl_devices.h> 27#include <linux/fsl_devices.h>
@@ -56,7 +55,6 @@ unsigned long isa_mem_base = 0;
56static int cds_pci_slot = 2; 55static int cds_pci_slot = 2;
57static volatile u8 *cadmus; 56static volatile u8 *cadmus;
58 57
59
60#ifdef CONFIG_PCI 58#ifdef CONFIG_PCI
61 59
62#define ARCADIA_HOST_BRIDGE_IDSEL 17 60#define ARCADIA_HOST_BRIDGE_IDSEL 17
@@ -64,8 +62,7 @@ static volatile u8 *cadmus;
64 62
65extern int mpc85xx_pci2_busno; 63extern int mpc85xx_pci2_busno;
66 64
67int 65static int mpc85xx_exclude_device(u_char bus, u_char devfn)
68mpc85xx_exclude_device(u_char bus, u_char devfn)
69{ 66{
70 if (bus == 0 && PCI_SLOT(devfn) == 0) 67 if (bus == 0 && PCI_SLOT(devfn) == 0)
71 return PCIBIOS_DEVICE_NOT_FOUND; 68 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -81,8 +78,7 @@ mpc85xx_exclude_device(u_char bus, u_char devfn)
81 return PCIBIOS_SUCCESSFUL; 78 return PCIBIOS_SUCCESSFUL;
82} 79}
83 80
84void __init 81static void __init mpc85xx_cds_pcibios_fixup(void)
85mpc85xx_cds_pcibios_fixup(void)
86{ 82{
87 struct pci_dev *dev; 83 struct pci_dev *dev;
88 u_char c; 84 u_char c;
@@ -144,7 +140,7 @@ static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
144#endif /* PPC_I8259 */ 140#endif /* PPC_I8259 */
145#endif /* CONFIG_PCI */ 141#endif /* CONFIG_PCI */
146 142
147void __init mpc85xx_cds_pic_init(void) 143static void __init mpc85xx_cds_pic_init(void)
148{ 144{
149 struct mpic *mpic; 145 struct mpic *mpic;
150 struct resource r; 146 struct resource r;
@@ -224,12 +220,10 @@ void __init mpc85xx_cds_pic_init(void)
224#endif /* CONFIG_PPC_I8259 */ 220#endif /* CONFIG_PPC_I8259 */
225} 221}
226 222
227
228/* 223/*
229 * Setup the architecture 224 * Setup the architecture
230 */ 225 */
231static void __init 226static void __init mpc85xx_cds_setup_arch(void)
232mpc85xx_cds_setup_arch(void)
233{ 227{
234 struct device_node *cpu; 228 struct device_node *cpu;
235#ifdef CONFIG_PCI 229#ifdef CONFIG_PCI
@@ -268,17 +262,9 @@ mpc85xx_cds_setup_arch(void)
268 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; 262 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
269 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 263 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
270#endif 264#endif
271
272#ifdef CONFIG_ROOT_NFS
273 ROOT_DEV = Root_NFS;
274#else
275 ROOT_DEV = Root_HDA1;
276#endif
277} 265}
278 266
279 267static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
280void
281mpc85xx_cds_show_cpuinfo(struct seq_file *m)
282{ 268{
283 uint pvid, svid, phid1; 269 uint pvid, svid, phid1;
284 uint memsize = total_memory; 270 uint memsize = total_memory;
@@ -305,11 +291,9 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
305 */ 291 */
306static int __init mpc85xx_cds_probe(void) 292static int __init mpc85xx_cds_probe(void)
307{ 293{
308 /* We always match for now, eventually we should look at 294 unsigned long root = of_get_flat_dt_root();
309 * the flat dev tree to ensure this is the board we are 295
310 * supposed to run on 296 return of_flat_dt_is_compatible(root, "MPC85xxCDS");
311 */
312 return 1;
313} 297}
314 298
315define_machine(mpc85xx_cds) { 299define_machine(mpc85xx_cds) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
new file mode 100644
index 000000000000..81144d2ae455
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -0,0 +1,234 @@
1/*
2 * Copyright (C) Freescale Semicondutor, Inc. 2006-2007. All rights reserved.
3 *
4 * Author: Andy Fleming <afleming@freescale.com>
5 *
6 * Based on 83xx/mpc8360e_pb.c by:
7 * Li Yang <LeoLi@freescale.com>
8 * Yin Olivia <Hong-hua.Yin@freescale.com>
9 *
10 * Description:
11 * MPC85xx MDS board specific routines.
12 *
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version.
17 */
18
19#include <linux/stddef.h>
20#include <linux/kernel.h>
21#include <linux/init.h>
22#include <linux/errno.h>
23#include <linux/reboot.h>
24#include <linux/pci.h>
25#include <linux/kdev_t.h>
26#include <linux/major.h>
27#include <linux/console.h>
28#include <linux/delay.h>
29#include <linux/seq_file.h>
30#include <linux/initrd.h>
31#include <linux/module.h>
32#include <linux/fsl_devices.h>
33
34#include <asm/of_device.h>
35#include <asm/of_platform.h>
36#include <asm/system.h>
37#include <asm/atomic.h>
38#include <asm/time.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/bootinfo.h>
42#include <asm/pci-bridge.h>
43#include <asm/mpc85xx.h>
44#include <asm/irq.h>
45#include <mm/mmu_decl.h>
46#include <asm/prom.h>
47#include <asm/udbg.h>
48#include <sysdev/fsl_soc.h>
49#include <asm/qe.h>
50#include <asm/qe_ic.h>
51#include <asm/mpic.h>
52
53#include "mpc85xx.h"
54
55#undef DEBUG
56#ifdef DEBUG
57#define DBG(fmt...) udbg_printf(fmt)
58#else
59#define DBG(fmt...)
60#endif
61
62#ifndef CONFIG_PCI
63unsigned long isa_io_base = 0;
64unsigned long isa_mem_base = 0;
65#endif
66
67/* ************************************************************************
68 *
69 * Setup the architecture
70 *
71 */
72static void __init mpc85xx_mds_setup_arch(void)
73{
74 struct device_node *np;
75 static u8 *bcsr_regs = NULL;
76
77 if (ppc_md.progress)
78 ppc_md.progress("mpc85xx_mds_setup_arch()", 0);
79
80 np = of_find_node_by_type(NULL, "cpu");
81 if (np != NULL) {
82 const unsigned int *fp =
83 get_property(np, "clock-frequency", NULL);
84 if (fp != NULL)
85 loops_per_jiffy = *fp / HZ;
86 else
87 loops_per_jiffy = 50000000 / HZ;
88 of_node_put(np);
89 }
90
91 /* Map BCSR area */
92 np = of_find_node_by_name(NULL, "bcsr");
93 if (np != NULL) {
94 struct resource res;
95
96 of_address_to_resource(np, 0, &res);
97 bcsr_regs = ioremap(res.start, res.end - res.start +1);
98 of_node_put(np);
99 }
100
101#ifdef CONFIG_PCI
102 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
103 add_bridge(np);
104 }
105 of_node_put(np);
106#endif
107
108#ifdef CONFIG_QUICC_ENGINE
109 if ((np = of_find_node_by_name(NULL, "qe")) != NULL) {
110 qe_reset();
111 of_node_put(np);
112 }
113
114 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) {
115 struct device_node *ucc = NULL;
116
117 par_io_init(np);
118 of_node_put(np);
119
120 for ( ;(ucc = of_find_node_by_name(ucc, "ucc")) != NULL;)
121 par_io_of_config(ucc);
122
123 of_node_put(ucc);
124 }
125
126 if (bcsr_regs) {
127 u8 bcsr_phy;
128
129 /* Reset the Ethernet PHY */
130 bcsr_phy = in_be8(&bcsr_regs[9]);
131 bcsr_phy &= ~0x20;
132 out_be8(&bcsr_regs[9], bcsr_phy);
133
134 udelay(1000);
135
136 bcsr_phy = in_be8(&bcsr_regs[9]);
137 bcsr_phy |= 0x20;
138 out_be8(&bcsr_regs[9], bcsr_phy);
139
140 iounmap(bcsr_regs);
141 }
142
143#endif /* CONFIG_QUICC_ENGINE */
144}
145
146static struct of_device_id mpc85xx_ids[] = {
147 { .type = "soc", },
148 { .compatible = "soc", },
149 { .type = "qe", },
150 {},
151};
152
153static int __init mpc85xx_publish_devices(void)
154{
155 if (!machine_is(mpc85xx_mds))
156 return 0;
157
158 /* Publish the QE devices */
159 of_platform_bus_probe(NULL,mpc85xx_ids,NULL);
160
161 return 0;
162}
163device_initcall(mpc85xx_publish_devices);
164
165static void __init mpc85xx_mds_pic_init(void)
166{
167 struct mpic *mpic;
168 struct resource r;
169 struct device_node *np = NULL;
170
171 np = of_find_node_by_type(NULL, "open-pic");
172 if (!np)
173 return;
174
175 if (of_address_to_resource(np, 0, &r)) {
176 printk(KERN_ERR "Failed to map mpic register space\n");
177 of_node_put(np);
178 return;
179 }
180
181 mpic = mpic_alloc(np, r.start,
182 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
183 4, 0, " OpenPIC ");
184 BUG_ON(mpic == NULL);
185 of_node_put(np);
186
187 /* Internal Interrupts */
188 mpic_assign_isu(mpic, 0, r.start + 0x10200);
189 mpic_assign_isu(mpic, 1, r.start + 0x10280);
190 mpic_assign_isu(mpic, 2, r.start + 0x10300);
191 mpic_assign_isu(mpic, 3, r.start + 0x10380);
192 mpic_assign_isu(mpic, 4, r.start + 0x10400);
193 mpic_assign_isu(mpic, 5, r.start + 0x10480);
194 mpic_assign_isu(mpic, 6, r.start + 0x10500);
195 mpic_assign_isu(mpic, 7, r.start + 0x10580);
196 mpic_assign_isu(mpic, 8, r.start + 0x10600);
197 mpic_assign_isu(mpic, 9, r.start + 0x10680);
198 mpic_assign_isu(mpic, 10, r.start + 0x10700);
199 mpic_assign_isu(mpic, 11, r.start + 0x10780);
200
201 /* External Interrupts */
202 mpic_assign_isu(mpic, 12, r.start + 0x10000);
203 mpic_assign_isu(mpic, 13, r.start + 0x10080);
204 mpic_assign_isu(mpic, 14, r.start + 0x10100);
205
206 mpic_init(mpic);
207
208#ifdef CONFIG_QUICC_ENGINE
209 np = of_find_node_by_type(NULL, "qeic");
210 if (!np)
211 return;
212
213 qe_ic_init(np, 0);
214 of_node_put(np);
215#endif /* CONFIG_QUICC_ENGINE */
216}
217
218static int __init mpc85xx_mds_probe(void)
219{
220 unsigned long root = of_get_flat_dt_root();
221
222 return of_flat_dt_is_compatible(root, "MPC85xxMDS");
223}
224
225define_machine(mpc85xx_mds) {
226 .name = "MPC85xx MDS",
227 .probe = mpc85xx_mds_probe,
228 .setup_arch = mpc85xx_mds_setup_arch,
229 .init_IRQ = mpc85xx_mds_pic_init,
230 .get_irq = mpic_get_irq,
231 .restart = mpc85xx_restart,
232 .calibrate_decr = generic_calibrate_decr,
233 .progress = udbg_progress,
234};
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index d1ecc0f9ab58..0c70944d0e37 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -8,6 +8,7 @@ choice
8config MPC8641_HPCN 8config MPC8641_HPCN
9 bool "Freescale MPC8641 HPCN" 9 bool "Freescale MPC8641 HPCN"
10 select PPC_I8259 10 select PPC_I8259
11 select DEFAULT_UIMAGE
11 help 12 help
12 This option enables support for the MPC8641 HPCN board. 13 This option enables support for the MPC8641 HPCN board.
13 14
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index f4dd5f2f8a28..f42f801cf84e 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -18,7 +18,6 @@
18#include <linux/kdev_t.h> 18#include <linux/kdev_t.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/seq_file.h> 20#include <linux/seq_file.h>
21#include <linux/root_dev.h>
22 21
23#include <asm/system.h> 22#include <asm/system.h>
24#include <asm/time.h> 23#include <asm/time.h>
@@ -120,6 +119,8 @@ mpc86xx_hpcn_init_irq(void)
120 DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq); 119 DBG("mpc86xxhpcn: cascade mapped to irq %d\n", cascade_irq);
121 120
122 i8259_init(cascade_node, 0); 121 i8259_init(cascade_node, 0);
122 of_node_put(cascade_node);
123
123 set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade); 124 set_irq_chained_handler(cascade_irq, mpc86xx_8259_cascade);
124#endif 125#endif
125} 126}
@@ -365,12 +366,6 @@ mpc86xx_hpcn_setup_arch(void)
365 366
366 printk("MPC86xx HPCN board from Freescale Semiconductor\n"); 367 printk("MPC86xx HPCN board from Freescale Semiconductor\n");
367 368
368#ifdef CONFIG_ROOT_NFS
369 ROOT_DEV = Root_NFS;
370#else
371 ROOT_DEV = Root_HDA1;
372#endif
373
374#ifdef CONFIG_SMP 369#ifdef CONFIG_SMP
375 mpc86xx_smp_init(); 370 mpc86xx_smp_init();
376#endif 371#endif
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_smp.c b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
index bb7fb41933ad..7ef0c6854799 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_smp.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_smp.c
@@ -65,7 +65,6 @@ smp_86xx_kick_cpu(int nr)
65 pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr); 65 pr_debug("smp_86xx_kick_cpu: kick CPU #%d\n", nr);
66 66
67 local_irq_save(flags); 67 local_irq_save(flags);
68 local_irq_disable();
69 68
70 /* Save reset vector */ 69 /* Save reset vector */
71 save_vector = *vector; 70 save_vector = *vector;
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index c8c0ba3cf8e8..beea6834bb7e 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -1,105 +1,16 @@
1menu "Platform support"
2 depends on PPC_8xx
3
1config FADS 4config FADS
2 bool 5 bool
3 6
7config CPM1
8 bool
9
4choice 10choice
5 prompt "8xx Machine Type" 11 prompt "8xx Machine Type"
6 depends on 8xx 12 depends on 8xx
7 default RPXLITE 13 default MPC885ADS
8
9config RPXLITE
10 bool "RPX-Lite"
11 ---help---
12 Single-board computers based around the PowerPC MPC8xx chips and
13 intended for embedded applications. The following types are
14 supported:
15
16 RPX-Lite:
17 Embedded Planet RPX Lite. PC104 form-factor SBC based on the MPC823.
18
19 RPX-Classic:
20 Embedded Planet RPX Classic Low-fat. Credit-card-size SBC based on
21 the MPC 860
22
23 BSE-IP:
24 Bright Star Engineering ip-Engine.
25
26 TQM823L:
27 TQM850L:
28 TQM855L:
29 TQM860L:
30 MPC8xx based family of mini modules, half credit card size,
31 up to 64 MB of RAM, 8 MB Flash, (Fast) Ethernet, 2 x serial ports,
32 2 x CAN bus interface, ...
33 Manufacturer: TQ Components, www.tq-group.de
34 Date of Release: October (?) 1999
35 End of Life: not yet :-)
36 URL:
37 - module: <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>
38 - starter kit: <http://www.denx.de/PDF/STK8xxLHWM201.pdf>
39 - images: <http://www.denx.de/embedded-ppc-en.html>
40
41 FPS850L:
42 FingerPrint Sensor System (based on TQM850L)
43 Manufacturer: IKENDI AG, <http://www.ikendi.com/>
44 Date of Release: November 1999
45 End of life: end 2000 ?
46 URL: see TQM850L
47
48 IVMS8:
49 MPC860 based board used in the "Integrated Voice Mail System",
50 Small Version (8 voice channels)
51 Manufacturer: Speech Design, <http://www.speech-design.de/>
52 Date of Release: December 2000 (?)
53 End of life: -
54 URL: <http://www.speech-design.de/>
55
56 IVML24:
57 MPC860 based board used in the "Integrated Voice Mail System",
58 Large Version (24 voice channels)
59 Manufacturer: Speech Design, <http://www.speech-design.de/>
60 Date of Release: March 2001 (?)
61 End of life: -
62 URL: <http://www.speech-design.de/>
63
64 HERMES:
65 Hermes-Pro ISDN/LAN router with integrated 8 x hub
66 Manufacturer: Multidata Gesellschaft fur Datentechnik und Informatik
67 <http://www.multidata.de/>
68 Date of Release: 2000 (?)
69 End of life: -
70 URL: <http://www.multidata.de/english/products/hpro.htm>
71
72 IP860:
73 VMEBus IP (Industry Pack) carrier board with MPC860
74 Manufacturer: MicroSys GmbH, <http://www.microsys.de/>
75 Date of Release: ?
76 End of life: -
77 URL: <http://www.microsys.de/html/ip860.html>
78
79 PCU_E:
80 PCU = Peripheral Controller Unit, Extended
81 Manufacturer: Siemens AG, ICN (Information and Communication Networks)
82 <http://www.siemens.de/page/1,3771,224315-1-999_2_226207-0,00.html>
83 Date of Release: April 2001
84 End of life: August 2001
85 URL: n. a.
86
87config RPXCLASSIC
88 bool "RPX-Classic"
89 help
90 The RPX-Classic is a single-board computer based on the Motorola
91 MPC860. It features 16MB of DRAM and a variable amount of flash,
92 I2C EEPROM, thermal monitoring, a PCMCIA slot, a DIP switch and two
93 LEDs. Variants with Ethernet ports exist. Say Y here to support it
94 directly.
95
96config BSEIP
97 bool "BSE-IP"
98 help
99 Say Y here to support the Bright Star Engineering ipEngine SBC.
100 This is a credit-card-sized device featuring a MPC823 processor,
101 26MB DRAM, 4MB flash, Ethernet, a 16K-gate FPGA, USB, an LCD/video
102 controller, and two RS232 ports.
103 14
104config MPC8XXFADS 15config MPC8XXFADS
105 bool "FADS" 16 bool "FADS"
@@ -107,110 +18,58 @@ config MPC8XXFADS
107 18
108config MPC86XADS 19config MPC86XADS
109 bool "MPC86XADS" 20 bool "MPC86XADS"
21 select CPM1
110 help 22 help
111 MPC86x Application Development System by Freescale Semiconductor. 23 MPC86x Application Development System by Freescale Semiconductor.
112 The MPC86xADS is meant to serve as a platform for s/w and h/w 24 The MPC86xADS is meant to serve as a platform for s/w and h/w
113 development around the MPC86X processor families. 25 development around the MPC86X processor families.
114 select FADS
115 26
116config MPC885ADS 27config MPC885ADS
117 bool "MPC885ADS" 28 bool "MPC885ADS"
29 select CPM1
118 help 30 help
119 Freescale Semiconductor MPC885 Application Development System (ADS). 31 Freescale Semiconductor MPC885 Application Development System (ADS).
120 Also known as DUET. 32 Also known as DUET.
121 The MPC885ADS is meant to serve as a platform for s/w and h/w 33 The MPC885ADS is meant to serve as a platform for s/w and h/w
122 development around the MPC885 processor family. 34 development around the MPC885 processor family.
123 35
124config TQM823L 36endchoice
125 bool "TQM823L"
126 help
127 Say Y here to support the TQM823L, one of an MPC8xx-based family of
128 mini SBCs (half credit-card size) from TQ Components first released
129 in late 1999. Technical references are at
130 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
131 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
132 <http://www.denx.de/embedded-ppc-en.html>.
133
134config TQM850L
135 bool "TQM850L"
136 help
137 Say Y here to support the TQM850L, one of an MPC8xx-based family of
138 mini SBCs (half credit-card size) from TQ Components first released
139 in late 1999. Technical references are at
140 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
141 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
142 <http://www.denx.de/embedded-ppc-en.html>.
143
144config TQM855L
145 bool "TQM855L"
146 help
147 Say Y here to support the TQM855L, one of an MPC8xx-based family of
148 mini SBCs (half credit-card size) from TQ Components first released
149 in late 1999. Technical references are at
150 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
151 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
152 <http://www.denx.de/embedded-ppc-en.html>.
153
154config TQM860L
155 bool "TQM860L"
156 help
157 Say Y here to support the TQM860L, one of an MPC8xx-based family of
158 mini SBCs (half credit-card size) from TQ Components first released
159 in late 1999. Technical references are at
160 <http://www.denx.de/PDF/TQM8xxLHWM201.pdf>, and
161 <http://www.denx.de/PDF/STK8xxLHWM201.pdf>, and an image at
162 <http://www.denx.de/embedded-ppc-en.html>.
163
164config FPS850L
165 bool "FPS850L"
166
167config IVMS8
168 bool "IVMS8"
169 help
170 Say Y here to support the Integrated Voice-Mail Small 8-channel SBC
171 from Speech Design, released March 2001. The manufacturer's website
172 is at <http://www.speech-design.de/>.
173
174config IVML24
175 bool "IVML24"
176 help
177 Say Y here to support the Integrated Voice-Mail Large 24-channel SBC
178 from Speech Design, released March 2001. The manufacturer's website
179 is at <http://www.speech-design.de/>.
180
181config HERMES_PRO
182 bool "HERMES"
183
184config IP860
185 bool "IP860"
186
187config LWMON
188 bool "LWMON"
189
190config PCU_E
191 bool "PCU_E"
192
193config CCM
194 bool "CCM"
195
196config LANTEC
197 bool "LANTEC"
198 37
199config MBX 38menu "Freescale Ethernet driver platform-specific options"
200 bool "MBX" 39 depends on (FS_ENET && MPC885ADS)
201 help 40
202 MBX is a line of Motorola single-board computer based around the 41 config MPC8xx_SECOND_ETH
203 MPC821 and MPC860 processors, and intended for embedded-controller 42 bool "Second Ethernet channel"
204 applications. Say Y here to support these boards directly. 43 depends on MPC885ADS
44 default y
45 help
46 This enables support for second Ethernet on MPC885ADS and MPC86xADS boards.
47 The latter will use SCC1, for 885ADS you can select it below.
48
49 choice
50 prompt "Second Ethernet channel"
51 depends on MPC8xx_SECOND_ETH
52 default MPC8xx_SECOND_ETH_FEC2
53
54 config MPC8xx_SECOND_ETH_FEC2
55 bool "FEC2"
56 depends on MPC885ADS
57 help
58 Enable FEC2 to serve as 2-nd Ethernet channel. Note that SMC2
59 (often 2-nd UART) will not work if this is enabled.
60
61 config MPC8xx_SECOND_ETH_SCC3
62 bool "SCC3"
63 depends on MPC885ADS
64 help
65 Enable SCC3 to serve as 2-nd Ethernet channel. Note that SMC1
66 (often 1-nd UART) will not work if this is enabled.
67
68 endchoice
205 69
206config WINCEPT 70endmenu
207 bool "WinCept"
208 help
209 The Wincept 100/110 is a Motorola single-board computer based on the
210 MPC821 PowerPC, introduced in 1998 and designed to be used in
211 thin-client machines. Say Y to support it directly.
212 71
213endchoice 72endmenu
214 73
215# 74#
216# MPC8xx Communication options 75# MPC8xx Communication options
@@ -219,79 +78,6 @@ endchoice
219menu "MPC8xx CPM Options" 78menu "MPC8xx CPM Options"
220 depends on 8xx 79 depends on 8xx
221 80
222config SCC_ENET
223 bool "CPM SCC Ethernet"
224 depends on NET_ETHERNET
225 help
226 Enable Ethernet support via the Motorola MPC8xx serial
227 communications controller.
228
229choice
230 prompt "SCC used for Ethernet"
231 depends on SCC_ENET
232 default SCC1_ENET
233
234config SCC1_ENET
235 bool "SCC1"
236 help
237 Use MPC8xx serial communications controller 1 to drive Ethernet
238 (default).
239
240config SCC2_ENET
241 bool "SCC2"
242 help
243 Use MPC8xx serial communications controller 2 to drive Ethernet.
244
245config SCC3_ENET
246 bool "SCC3"
247 help
248 Use MPC8xx serial communications controller 3 to drive Ethernet.
249
250endchoice
251
252config FEC_ENET
253 bool "860T FEC Ethernet"
254 depends on NET_ETHERNET
255 help
256 Enable Ethernet support via the Fast Ethernet Controller (FCC) on
257 the Motorola MPC8260.
258
259config USE_MDIO
260 bool "Use MDIO for PHY configuration"
261 depends on FEC_ENET
262 help
263 On some boards the hardware configuration of the ethernet PHY can be
264 used without any software interaction over the MDIO interface, so
265 all MII code can be omitted. Say N here if unsure or if you don't
266 need link status reports.
267
268config FEC_AM79C874
269 bool "Support AMD79C874 PHY"
270 depends on USE_MDIO
271
272config FEC_LXT970
273 bool "Support LXT970 PHY"
274 depends on USE_MDIO
275
276config FEC_LXT971
277 bool "Support LXT971 PHY"
278 depends on USE_MDIO
279
280config FEC_QS6612
281 bool "Support QS6612 PHY"
282 depends on USE_MDIO
283
284config ENET_BIG_BUFFERS
285 bool "Use Big CPM Ethernet Buffers"
286 depends on SCC_ENET || FEC_ENET
287 help
288 Allocate large buffers for MPC8xx Ethernet. Increases throughput
289 and decreases the likelihood of dropped packets, but costs memory.
290
291config HTDMSOUND
292 bool "Embedded Planet HIOX Audio"
293 depends on SOUND=y
294
295# This doesn't really belong here, but it is convenient to ask 81# This doesn't really belong here, but it is convenient to ask
296# 8xx specific questions. 82# 8xx specific questions.
297comment "Generic MPC8xx Options" 83comment "Generic MPC8xx Options"
diff --git a/arch/powerpc/platforms/8xx/Makefile b/arch/powerpc/platforms/8xx/Makefile
new file mode 100644
index 000000000000..5e2dae3afd2f
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/Makefile
@@ -0,0 +1,6 @@
1#
2# Makefile for the PowerPC 8xx linux kernel.
3#
4obj-$(CONFIG_PPC_8xx) += m8xx_setup.o
5obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
6obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
new file mode 100644
index 000000000000..9ed7125f0150
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -0,0 +1,303 @@
1/*
2 * Copyright (C) 1995 Linus Torvalds
3 * Adapted from 'alpha' version by Gary Thomas
4 * Modified by Cort Dougan (cort@cs.nmt.edu)
5 * Modified for MBX using prep/chrp/pmac functions by Dan (dmalek@jlc.net)
6 * Further modified for generic 8xx by Dan.
7 */
8
9/*
10 * bootup setup stuff..
11 */
12
13#include <linux/errno.h>
14#include <linux/sched.h>
15#include <linux/kernel.h>
16#include <linux/mm.h>
17#include <linux/stddef.h>
18#include <linux/unistd.h>
19#include <linux/ptrace.h>
20#include <linux/slab.h>
21#include <linux/user.h>
22#include <linux/a.out.h>
23#include <linux/tty.h>
24#include <linux/major.h>
25#include <linux/interrupt.h>
26#include <linux/reboot.h>
27#include <linux/init.h>
28#include <linux/initrd.h>
29#include <linux/ioport.h>
30#include <linux/bootmem.h>
31#include <linux/seq_file.h>
32#include <linux/root_dev.h>
33#include <linux/time.h>
34#include <linux/rtc.h>
35
36#include <asm/mmu.h>
37#include <asm/reg.h>
38#include <asm/residual.h>
39#include <asm/io.h>
40#include <asm/pgtable.h>
41#include <asm/mpc8xx.h>
42#include <asm/8xx_immap.h>
43#include <asm/machdep.h>
44#include <asm/bootinfo.h>
45#include <asm/time.h>
46#include <asm/prom.h>
47#include <asm/fs_pd.h>
48#include <mm/mmu_decl.h>
49
50#include "sysdev/mpc8xx_pic.h"
51
52void m8xx_calibrate_decr(void);
53extern void m8xx_wdt_handler_install(bd_t *bp);
54extern int cpm_pic_init(void);
55extern int cpm_get_irq(void);
56
57/* A place holder for time base interrupts, if they are ever enabled. */
58irqreturn_t timebase_interrupt(int irq, void * dev)
59{
60 printk ("timebase_interrupt()\n");
61
62 return IRQ_HANDLED;
63}
64
65static struct irqaction tbint_irqaction = {
66 .handler = timebase_interrupt,
67 .mask = CPU_MASK_NONE,
68 .name = "tbint",
69};
70
71/* per-board overridable init_internal_rtc() function. */
72void __init __attribute__ ((weak))
73init_internal_rtc(void)
74{
75 sit8xx_t *sys_tmr = (sit8xx_t *) immr_map(im_sit);
76
77 /* Disable the RTC one second and alarm interrupts. */
78 clrbits16(&sys_tmr->sit_rtcsc, (RTCSC_SIE | RTCSC_ALE));
79
80 /* Enable the RTC */
81 setbits16(&sys_tmr->sit_rtcsc, (RTCSC_RTF | RTCSC_RTE));
82 immr_unmap(sys_tmr);
83}
84
85static int __init get_freq(char *name, unsigned long *val)
86{
87 struct device_node *cpu;
88 unsigned int *fp;
89 int found = 0;
90
91 /* The cpu node should have timebase and clock frequency properties */
92 cpu = of_find_node_by_type(NULL, "cpu");
93
94 if (cpu) {
95 fp = (unsigned int *)get_property(cpu, name, NULL);
96 if (fp) {
97 found = 1;
98 *val = *fp++;
99 }
100
101 of_node_put(cpu);
102 }
103
104 return found;
105}
106
107/* The decrementer counts at the system (internal) clock frequency divided by
108 * sixteen, or external oscillator divided by four. We force the processor
109 * to use system clock divided by sixteen.
110 */
111void __init mpc8xx_calibrate_decr(void)
112{
113 struct device_node *cpu;
114 cark8xx_t *clk_r1;
115 car8xx_t *clk_r2;
116 sitk8xx_t *sys_tmr1;
117 sit8xx_t *sys_tmr2;
118 int irq, virq;
119
120 clk_r1 = (cark8xx_t *) immr_map(im_clkrstk);
121
122 /* Unlock the SCCR. */
123 out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY);
124 out_be32(&clk_r1->cark_sccrk, KAPWR_KEY);
125 immr_unmap(clk_r1);
126
127 /* Force all 8xx processors to use divide by 16 processor clock. */
128 clk_r2 = (car8xx_t *) immr_map(im_clkrst);
129 setbits32(&clk_r2->car_sccr, 0x02000000);
130 immr_unmap(clk_r2);
131
132 /* Processor frequency is MHz.
133 */
134 ppc_tb_freq = 50000000;
135 if (!get_freq("bus-frequency", &ppc_tb_freq)) {
136 printk(KERN_ERR "WARNING: Estimating decrementer frequency "
137 "(not found)\n");
138 }
139 ppc_tb_freq /= 16;
140 ppc_proc_freq = 50000000;
141 if (!get_freq("clock-frequency", &ppc_proc_freq))
142 printk(KERN_ERR "WARNING: Estimating processor frequency"
143 "(not found)\n");
144
145 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
146
147 /* Perform some more timer/timebase initialization. This used
148 * to be done elsewhere, but other changes caused it to get
149 * called more than once....that is a bad thing.
150 *
151 * First, unlock all of the registers we are going to modify.
152 * To protect them from corruption during power down, registers
153 * that are maintained by keep alive power are "locked". To
154 * modify these registers we have to write the key value to
155 * the key location associated with the register.
156 * Some boards power up with these unlocked, while others
157 * are locked. Writing anything (including the unlock code?)
158 * to the unlocked registers will lock them again. So, here
159 * we guarantee the registers are locked, then we unlock them
160 * for our use.
161 */
162 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
163 out_be32(&sys_tmr1->sitk_tbscrk, ~KAPWR_KEY);
164 out_be32(&sys_tmr1->sitk_rtcsck, ~KAPWR_KEY);
165 out_be32(&sys_tmr1->sitk_tbk, ~KAPWR_KEY);
166 out_be32(&sys_tmr1->sitk_tbscrk, KAPWR_KEY);
167 out_be32(&sys_tmr1->sitk_rtcsck, KAPWR_KEY);
168 out_be32(&sys_tmr1->sitk_tbk, KAPWR_KEY);
169 immr_unmap(sys_tmr1);
170
171 init_internal_rtc();
172
173 /* Enabling the decrementer also enables the timebase interrupts
174 * (or from the other point of view, to get decrementer interrupts
175 * we have to enable the timebase). The decrementer interrupt
176 * is wired into the vector table, nothing to do here for that.
177 */
178 cpu = of_find_node_by_type(NULL, "cpu");
179 virq= irq_of_parse_and_map(cpu, 0);
180 irq = irq_map[virq].hwirq;
181
182 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
183 out_be16(&sys_tmr2->sit_tbscr, ((1 << (7 - (irq/2))) << 8) |
184 (TBSCR_TBF | TBSCR_TBE));
185 immr_unmap(sys_tmr2);
186
187 if (setup_irq(virq, &tbint_irqaction))
188 panic("Could not allocate timer IRQ!");
189
190#ifdef CONFIG_8xx_WDT
191 /* Install watchdog timer handler early because it might be
192 * already enabled by the bootloader
193 */
194 m8xx_wdt_handler_install(binfo);
195#endif
196}
197
198/* The RTC on the MPC8xx is an internal register.
199 * We want to protect this during power down, so we need to unlock,
200 * modify, and re-lock.
201 */
202
203int mpc8xx_set_rtc_time(struct rtc_time *tm)
204{
205 sitk8xx_t *sys_tmr1;
206 sit8xx_t *sys_tmr2;
207 int time;
208
209 sys_tmr1 = (sitk8xx_t *) immr_map(im_sitk);
210 sys_tmr2 = (sit8xx_t *) immr_map(im_sit);
211 time = mktime(tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
212 tm->tm_hour, tm->tm_min, tm->tm_sec);
213
214 out_be32(&sys_tmr1->sitk_rtck, KAPWR_KEY);
215 out_be32(&sys_tmr2->sit_rtc, time);
216 out_be32(&sys_tmr1->sitk_rtck, ~KAPWR_KEY);
217
218 immr_unmap(sys_tmr2);
219 immr_unmap(sys_tmr1);
220 return 0;
221}
222
223void mpc8xx_get_rtc_time(struct rtc_time *tm)
224{
225 unsigned long data;
226 sit8xx_t *sys_tmr = (sit8xx_t *) immr_map(im_sit);
227
228 /* Get time from the RTC. */
229 data = in_be32(&sys_tmr->sit_rtc);
230 to_tm(data, tm);
231 tm->tm_year -= 1900;
232 tm->tm_mon -= 1;
233 immr_unmap(sys_tmr);
234 return;
235}
236
237void mpc8xx_restart(char *cmd)
238{
239 __volatile__ unsigned char dummy;
240 car8xx_t * clk_r = (car8xx_t *) immr_map(im_clkrst);
241
242
243 local_irq_disable();
244
245 setbits32(&clk_r->car_plprcr, 0x00000080);
246 /* Clear the ME bit in MSR to cause checkstop on machine check
247 */
248 mtmsr(mfmsr() & ~0x1000);
249
250 dummy = in_8(&clk_r->res[0]);
251 printk("Restart failed\n");
252 while(1);
253}
254
255void mpc8xx_show_cpuinfo(struct seq_file *m)
256{
257 struct device_node *root;
258 uint memsize = total_memory;
259 const char *model = "";
260
261 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
262
263 root = of_find_node_by_path("/");
264 if (root)
265 model = get_property(root, "model", NULL);
266 seq_printf(m, "Machine\t\t: %s\n", model);
267 of_node_put(root);
268
269 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
270}
271
272static void cpm_cascade(unsigned int irq, struct irq_desc *desc)
273{
274 int cascade_irq;
275
276 if ((cascade_irq = cpm_get_irq()) >= 0) {
277 struct irq_desc *cdesc = irq_desc + cascade_irq;
278
279 generic_handle_irq(cascade_irq);
280 cdesc->chip->eoi(cascade_irq);
281 }
282 desc->chip->eoi(irq);
283}
284
285/* Initialize the internal interrupt controller. The number of
286 * interrupts supported can vary with the processor type, and the
287 * 82xx family can have up to 64.
288 * External interrupts can be either edge or level triggered, and
289 * need to be initialized by the appropriate driver.
290 */
291void __init m8xx_pic_init(void)
292{
293 int irq;
294
295 if (mpc8xx_pic_init()) {
296 printk(KERN_ERR "Failed interrupt 8xx controller initialization\n");
297 return;
298 }
299
300 irq = cpm_pic_init();
301 if (irq != NO_IRQ)
302 set_irq_chained_handler(irq, cpm_cascade);
303}
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h
new file mode 100644
index 000000000000..b5d19dd0619c
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc86xads.h
@@ -0,0 +1,95 @@
1/*
2 * A collection of structures, addresses, and values associated with
3 * the Freescale MPC86xADS board.
4 * Copied from the FADS stuff.
5 *
6 * Author: MontaVista Software, Inc.
7 * source@mvista.com
8 *
9 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is licensed
11 * "as is" without any warranty of any kind, whether express or implied.
12 */
13
14#ifdef __KERNEL__
15#ifndef __ASM_MPC86XADS_H__
16#define __ASM_MPC86XADS_H__
17
18#include <asm/ppcboot.h>
19#include <sysdev/fsl_soc.h>
20
21/* U-Boot maps BCSR to 0xff080000 */
22#define BCSR_ADDR ((uint)0xff080000)
23#define BCSR_SIZE ((uint)32)
24#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
25#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
26#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
27#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
28#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
29
30#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
31#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
32
33#define IMAP_ADDR (get_immrbase())
34#define IMAP_SIZE ((uint)(64 * 1024))
35
36#define MPC8xx_CPM_OFFSET (0x9c0)
37#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
38#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
39
40#define PCMCIA_MEM_ADDR (uint)0xff020000)
41#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
42
43/* Bits of interest in the BCSRs.
44 */
45#define BCSR1_ETHEN ((uint)0x20000000)
46#define BCSR1_IRDAEN ((uint)0x10000000)
47#define BCSR1_RS232EN_1 ((uint)0x01000000)
48#define BCSR1_PCCEN ((uint)0x00800000)
49#define BCSR1_PCCVCC0 ((uint)0x00400000)
50#define BCSR1_PCCVPP0 ((uint)0x00200000)
51#define BCSR1_PCCVPP1 ((uint)0x00100000)
52#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
53#define BCSR1_RS232EN_2 ((uint)0x00040000)
54#define BCSR1_PCCVCC1 ((uint)0x00010000)
55#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
56
57#define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/
58#define BCSR4_USB_LO_SPD ((uint)0x04000000)
59#define BCSR4_USB_VCC ((uint)0x02000000)
60#define BCSR4_USB_FULL_SPD ((uint)0x00040000)
61#define BCSR4_USB_EN ((uint)0x00020000)
62
63#define BCSR5_MII2_EN 0x40
64#define BCSR5_MII2_RST 0x20
65#define BCSR5_T1_RST 0x10
66#define BCSR5_ATM155_RST 0x08
67#define BCSR5_ATM25_RST 0x04
68#define BCSR5_MII1_EN 0x02
69#define BCSR5_MII1_RST 0x01
70
71/* Interrupt level assignments */
72#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
73#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
74#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
75
76/* We don't use the 8259 */
77#define NR_8259_INTS 0
78
79/* CPM Ethernet through SCC1 */
80#define PA_ENET_RXD ((ushort)0x0001)
81#define PA_ENET_TXD ((ushort)0x0002)
82#define PA_ENET_TCLK ((ushort)0x0100)
83#define PA_ENET_RCLK ((ushort)0x0200)
84#define PB_ENET_TENA ((uint)0x00001000)
85#define PC_ENET_CLSN ((ushort)0x0010)
86#define PC_ENET_RENA ((ushort)0x0020)
87
88/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
89 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
90 */
91#define SICR_ENET_MASK ((uint)0x000000ff)
92#define SICR_ENET_CLKRT ((uint)0x0000002c)
93
94#endif /* __ASM_MPC86XADS_H__ */
95#endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
new file mode 100644
index 000000000000..ef52ce701b0e
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -0,0 +1,301 @@
1/*arch/ppc/platforms/mpc86xads-setup.c
2 *
3 * Platform setup for the Freescale mpc86xads board
4 *
5 * Vitaly Bordug <vbordug@ru.mvista.com>
6 *
7 * Copyright 2005 MontaVista Software Inc.
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 */
13
14#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/param.h>
17#include <linux/string.h>
18#include <linux/ioport.h>
19#include <linux/device.h>
20#include <linux/delay.h>
21#include <linux/root_dev.h>
22
23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h>
25#include <linux/mii.h>
26
27#include <asm/delay.h>
28#include <asm/io.h>
29#include <asm/machdep.h>
30#include <asm/page.h>
31#include <asm/processor.h>
32#include <asm/system.h>
33#include <asm/time.h>
34#include <asm/ppcboot.h>
35#include <asm/mpc8xx.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/fs_pd.h>
39#include <asm/prom.h>
40
41extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*);
43extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
46extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void);
49
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
51static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
52static void init_scc1_ioports(struct fs_platform_info* ptr);
53
54void __init mpc86xads_board_setup(void)
55{
56 cpm8xx_t *cp;
57 unsigned int *bcsr_io;
58 u8 tmpval8;
59
60 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
61 cp = (cpm8xx_t *)immr_map(im_cpm);
62
63 if (bcsr_io == NULL) {
64 printk(KERN_CRIT "Could not remap BCSR\n");
65 return;
66 }
67#ifdef CONFIG_SERIAL_CPM_SMC1
68 clrbits32(bcsr_io, BCSR1_RS232EN_1);
69 clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
70 tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
71 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
72 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
73#else
74 setbits32(bcsr_io,BCSR1_RS232EN_1);
75 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
76 out_8(&cp->cp_smc[0].smc_smce, 0);
77#endif
78
79#ifdef CONFIG_SERIAL_CPM_SMC2
80 clrbits32(bcsr_io,BCSR1_RS232EN_2);
81 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
82 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
83 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
84 out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
85 clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
86
87 init_smc2_uart_ioports(0);
88#else
89 setbits32(bcsr_io,BCSR1_RS232EN_2);
90 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
91 out_8(&cp->cp_smc[1].smc_smce, 0);
92#endif
93 immr_unmap(cp);
94 iounmap(bcsr_io);
95}
96
97
98static void init_fec1_ioports(struct fs_platform_info* ptr)
99{
100 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
101
102 /* configure FEC1 pins */
103
104 setbits16(&io_port->iop_pdpar, 0x1fff);
105 setbits16(&io_port->iop_pddir, 0x1fff);
106
107 immr_unmap(io_port);
108}
109
110void init_fec_ioports(struct fs_platform_info *fpi)
111{
112 int fec_no = fs_get_fec_index(fpi->fs_no);
113
114 switch (fec_no) {
115 case 0:
116 init_fec1_ioports(fpi);
117 break;
118 default:
119 printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
120 return;
121 }
122}
123
124static void init_scc1_ioports(struct fs_platform_info* fpi)
125{
126 unsigned *bcsr_io;
127 iop8xx_t *io_port;
128 cpm8xx_t *cp;
129
130 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
131 io_port = (iop8xx_t *)immr_map(im_ioport);
132 cp = (cpm8xx_t *)immr_map(im_cpm);
133
134 if (bcsr_io == NULL) {
135 printk(KERN_CRIT "Could not remap BCSR\n");
136 return;
137 }
138
139 /* Configure port A pins for Txd and Rxd.
140 */
141 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
142 clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
143 clrbits16(&io_port->iop_paodr, PA_ENET_TXD);
144
145 /* Configure port C pins to enable CLSN and RENA.
146 */
147 clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
148 clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
149 setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
150
151 /* Configure port A for TCLK and RCLK.
152 */
153 setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
154 clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
155 clrbits32(&cp->cp_pbpar, PB_ENET_TENA);
156 clrbits32(&cp->cp_pbdir, PB_ENET_TENA);
157
158 /* Configure Serial Interface clock routing.
159 * First, clear all SCC bits to zero, then set the ones we want.
160 */
161 clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
162 setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
163
164 /* In the original SCC enet driver the following code is placed at
165 the end of the initialization */
166 setbits32(&cp->cp_pbpar, PB_ENET_TENA);
167 setbits32(&cp->cp_pbdir, PB_ENET_TENA);
168
169 clrbits32(bcsr_io+1, BCSR1_ETHEN);
170 iounmap(bcsr_io);
171 immr_unmap(cp);
172 immr_unmap(io_port);
173}
174
175void init_scc_ioports(struct fs_platform_info *fpi)
176{
177 int scc_no = fs_get_scc_index(fpi->fs_no);
178
179 switch (scc_no) {
180 case 0:
181 init_scc1_ioports(fpi);
182 break;
183 default:
184 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
185 return;
186 }
187}
188
189
190
191static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
192{
193 unsigned *bcsr_io;
194 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
195
196 setbits32(&cp->cp_pbpar, 0x000000c0);
197 clrbits32(&cp->cp_pbdir, 0x000000c0);
198 clrbits16(&cp->cp_pbodr, 0x00c0);
199 immr_unmap(cp);
200
201 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
202
203 if (bcsr_io == NULL) {
204 printk(KERN_CRIT "Could not remap BCSR1\n");
205 return;
206 }
207 clrbits32(bcsr_io,BCSR1_RS232EN_1);
208 iounmap(bcsr_io);
209}
210
211static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
212{
213 unsigned *bcsr_io;
214 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
215
216 setbits32(&cp->cp_pbpar, 0x00000c00);
217 clrbits32(&cp->cp_pbdir, 0x00000c00);
218 clrbits16(&cp->cp_pbodr, 0x0c00);
219 immr_unmap(cp);
220
221 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
222
223 if (bcsr_io == NULL) {
224 printk(KERN_CRIT "Could not remap BCSR1\n");
225 return;
226 }
227 clrbits32(bcsr_io,BCSR1_RS232EN_2);
228 iounmap(bcsr_io);
229}
230
231void init_smc_ioports(struct fs_uart_platform_info *data)
232{
233 int smc_no = fs_uart_id_fsid2smc(data->fs_no);
234
235 switch (smc_no) {
236 case 0:
237 init_smc1_uart_ioports(data);
238 data->brg = data->clk_rx;
239 break;
240 case 1:
241 init_smc2_uart_ioports(data);
242 data->brg = data->clk_rx;
243 break;
244 default:
245 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
246 return;
247 }
248}
249
250int platform_device_skip(char *model, int id)
251{
252 return 0;
253}
254
255static void __init mpc86xads_setup_arch(void)
256{
257 struct device_node *cpu;
258
259 cpu = of_find_node_by_type(NULL, "cpu");
260 if (cpu != 0) {
261 const unsigned int *fp;
262
263 fp = get_property(cpu, "clock-frequency", NULL);
264 if (fp != 0)
265 loops_per_jiffy = *fp / HZ;
266 else
267 loops_per_jiffy = 50000000 / HZ;
268 of_node_put(cpu);
269 }
270
271 cpm_reset();
272
273 mpc86xads_board_setup();
274
275 ROOT_DEV = Root_NFS;
276}
277
278static int __init mpc86xads_probe(void)
279{
280 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
281 "model", NULL);
282 if (model == NULL)
283 return 0;
284 if (strcmp(model, "MPC866ADS"))
285 return 0;
286
287 return 1;
288}
289
290define_machine(mpc86x_ads) {
291 .name = "MPC86x ADS",
292 .probe = mpc86xads_probe,
293 .setup_arch = mpc86xads_setup_arch,
294 .init_IRQ = m8xx_pic_init,
295 .show_cpuinfo = mpc8xx_show_cpuinfo,
296 .get_irq = mpc8xx_get_irq,
297 .restart = mpc8xx_restart,
298 .calibrate_decr = mpc8xx_calibrate_decr,
299 .set_rtc_time = mpc8xx_set_rtc_time,
300 .get_rtc_time = mpc8xx_get_rtc_time,
301};
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h
new file mode 100644
index 000000000000..30cbebfe84c5
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc885ads.h
@@ -0,0 +1,95 @@
1/*
2 * A collection of structures, addresses, and values associated with
3 * the Freescale MPC885ADS board.
4 * Copied from the FADS stuff.
5 *
6 * Author: MontaVista Software, Inc.
7 * source@mvista.com
8 *
9 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is licensed
11 * "as is" without any warranty of any kind, whether express or implied.
12 */
13
14#ifdef __KERNEL__
15#ifndef __ASM_MPC885ADS_H__
16#define __ASM_MPC885ADS_H__
17
18#include <asm/ppcboot.h>
19#include <sysdev/fsl_soc.h>
20
21/* U-Boot maps BCSR to 0xff080000 */
22#define BCSR_ADDR ((uint)0xff080000)
23#define BCSR_SIZE ((uint)32)
24#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
25#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
26#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
27#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
28#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
29
30#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
31#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
32
33#define IMAP_ADDR (get_immrbase())
34#define IMAP_SIZE ((uint)(64 * 1024))
35
36#define MPC8xx_CPM_OFFSET (0x9c0)
37#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
38#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
39
40#define PCMCIA_MEM_ADDR (uint)0xff020000)
41#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
42
43/* Bits of interest in the BCSRs.
44 */
45#define BCSR1_ETHEN ((uint)0x20000000)
46#define BCSR1_IRDAEN ((uint)0x10000000)
47#define BCSR1_RS232EN_1 ((uint)0x01000000)
48#define BCSR1_PCCEN ((uint)0x00800000)
49#define BCSR1_PCCVCC0 ((uint)0x00400000)
50#define BCSR1_PCCVPP0 ((uint)0x00200000)
51#define BCSR1_PCCVPP1 ((uint)0x00100000)
52#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
53#define BCSR1_RS232EN_2 ((uint)0x00040000)
54#define BCSR1_PCCVCC1 ((uint)0x00010000)
55#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
56
57#define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/
58#define BCSR4_USB_LO_SPD ((uint)0x04000000)
59#define BCSR4_USB_VCC ((uint)0x02000000)
60#define BCSR4_USB_FULL_SPD ((uint)0x00040000)
61#define BCSR4_USB_EN ((uint)0x00020000)
62
63#define BCSR5_MII2_EN 0x40
64#define BCSR5_MII2_RST 0x20
65#define BCSR5_T1_RST 0x10
66#define BCSR5_ATM155_RST 0x08
67#define BCSR5_ATM25_RST 0x04
68#define BCSR5_MII1_EN 0x02
69#define BCSR5_MII1_RST 0x01
70
71/* Interrupt level assignments */
72#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
73#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
74#define SIU_INT_FEC2 SIU_LEVEL3 /* FEC2 interrupt */
75#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
76
77/* We don't use the 8259 */
78#define NR_8259_INTS 0
79
80/* CPM Ethernet through SCC3 */
81#define PA_ENET_RXD ((ushort)0x0040)
82#define PA_ENET_TXD ((ushort)0x0080)
83#define PE_ENET_TCLK ((uint)0x00004000)
84#define PE_ENET_RCLK ((uint)0x00008000)
85#define PE_ENET_TENA ((uint)0x00000010)
86#define PC_ENET_CLSN ((ushort)0x0400)
87#define PC_ENET_RENA ((ushort)0x0800)
88
89/* Control bits in the SICR to route TCLK (CLK5) and RCLK (CLK6) to
90 * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero */
91#define SICR_ENET_MASK ((uint)0x00ff0000)
92#define SICR_ENET_CLKRT ((uint)0x002c0000)
93
94#endif /* __ASM_MPC885ADS_H__ */
95#endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
new file mode 100644
index 000000000000..c5fefdf66c0a
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -0,0 +1,387 @@
1/*arch/ppc/platforms/mpc885ads-setup.c
2 *
3 * Platform setup for the Freescale mpc885ads board
4 *
5 * Vitaly Bordug <vbordug@ru.mvista.com>
6 *
7 * Copyright 2005 MontaVista Software Inc.
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 */
13
14#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/param.h>
17#include <linux/string.h>
18#include <linux/ioport.h>
19#include <linux/device.h>
20#include <linux/delay.h>
21#include <linux/root_dev.h>
22
23#include <linux/fs_enet_pd.h>
24#include <linux/fs_uart_pd.h>
25#include <linux/mii.h>
26
27#include <asm/delay.h>
28#include <asm/io.h>
29#include <asm/machdep.h>
30#include <asm/page.h>
31#include <asm/processor.h>
32#include <asm/system.h>
33#include <asm/time.h>
34#include <asm/ppcboot.h>
35#include <asm/mpc8xx.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/fs_pd.h>
39#include <asm/prom.h>
40
41extern void cpm_reset(void);
42extern void mpc8xx_show_cpuinfo(struct seq_file*);
43extern void mpc8xx_restart(char *cmd);
44extern void mpc8xx_calibrate_decr(void);
45extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
46extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
47extern void m8xx_pic_init(void);
48extern unsigned int mpc8xx_get_irq(void);
49
50static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi);
51static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi);
52static void init_scc3_ioports(struct fs_platform_info* ptr);
53
54void __init mpc885ads_board_setup(void)
55{
56 cpm8xx_t *cp;
57 unsigned int *bcsr_io;
58 u8 tmpval8;
59
60#ifdef CONFIG_FS_ENET
61 iop8xx_t *io_port;
62#endif
63
64 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
65 cp = (cpm8xx_t *)immr_map(im_cpm);
66
67 if (bcsr_io == NULL) {
68 printk(KERN_CRIT "Could not remap BCSR\n");
69 return;
70 }
71#ifdef CONFIG_SERIAL_CPM_SMC1
72 clrbits32(bcsr_io, BCSR1_RS232EN_1);
73 clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
74 tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
75 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
76 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN); /* brg1 */
77#else
78 setbits32(bcsr_io,BCSR1_RS232EN_1);
79 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
80 out_8(&cp->cp_smc[0].smc_smce, 0);
81#endif
82
83#ifdef CONFIG_SERIAL_CPM_SMC2
84 clrbits32(bcsr_io,BCSR1_RS232EN_2);
85 clrbits32(&cp->cp_simode, 0xe0000000 >> 1);
86 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */
87 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
88 out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
89 clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
90
91 init_smc2_uart_ioports(0);
92#else
93 setbits32(bcsr_io,BCSR1_RS232EN_2);
94 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
95 out_8(&cp->cp_smc[1].smc_smce, 0);
96#endif
97 immr_unmap(cp);
98 iounmap(bcsr_io);
99
100#ifdef CONFIG_FS_ENET
101 /* use MDC for MII (common) */
102 io_port = (iop8xx_t*)immr_map(im_ioport);
103 setbits16(&io_port->iop_pdpar, 0x0080);
104 clrbits16(&io_port->iop_pddir, 0x0080);
105
106 bcsr_io = ioremap(BCSR5, sizeof(unsigned long));
107 clrbits32(bcsr_io,BCSR5_MII1_EN);
108 clrbits32(bcsr_io,BCSR5_MII1_RST);
109#ifndef CONFIG_FC_ENET_HAS_SCC
110 clrbits32(bcsr_io,BCSR5_MII2_EN);
111 clrbits32(bcsr_io,BCSR5_MII2_RST);
112
113#endif
114 iounmap(bcsr_io);
115 immr_unmap(io_port);
116
117#endif
118}
119
120
121static void init_fec1_ioports(struct fs_platform_info* ptr)
122{
123 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
124 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
125
126 /* configure FEC1 pins */
127 setbits16(&io_port->iop_papar, 0xf830);
128 setbits16(&io_port->iop_padir, 0x0830);
129 clrbits16(&io_port->iop_padir, 0xf000);
130
131 setbits32(&cp->cp_pbpar, 0x00001001);
132 clrbits32(&cp->cp_pbdir, 0x00001001);
133
134 setbits16(&io_port->iop_pcpar, 0x000c);
135 clrbits16(&io_port->iop_pcdir, 0x000c);
136
137 setbits32(&cp->cp_pepar, 0x00000003);
138 setbits32(&cp->cp_pedir, 0x00000003);
139 clrbits32(&cp->cp_peso, 0x00000003);
140 clrbits32(&cp->cp_cptr, 0x00000100);
141
142 immr_unmap(io_port);
143 immr_unmap(cp);
144}
145
146
147static void init_fec2_ioports(struct fs_platform_info* ptr)
148{
149 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm);
150 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport);
151
152 /* configure FEC2 pins */
153 setbits32(&cp->cp_pepar, 0x0003fffc);
154 setbits32(&cp->cp_pedir, 0x0003fffc);
155 clrbits32(&cp->cp_peso, 0x000087fc);
156 setbits32(&cp->cp_peso, 0x00037800);
157 clrbits32(&cp->cp_cptr, 0x00000080);
158
159 immr_unmap(io_port);
160 immr_unmap(cp);
161}
162
163void init_fec_ioports(struct fs_platform_info *fpi)
164{
165 int fec_no = fs_get_fec_index(fpi->fs_no);
166
167 switch (fec_no) {
168 case 0:
169 init_fec1_ioports(fpi);
170 break;
171 case 1:
172 init_fec2_ioports(fpi);
173 break;
174 default:
175 printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
176 return;
177 }
178}
179
180static void init_scc3_ioports(struct fs_platform_info* fpi)
181{
182 unsigned *bcsr_io;
183 iop8xx_t *io_port;
184 cpm8xx_t *cp;
185
186 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE);
187 io_port = (iop8xx_t *)immr_map(im_ioport);
188 cp = (cpm8xx_t *)immr_map(im_cpm);
189
190 if (bcsr_io == NULL) {
191 printk(KERN_CRIT "Could not remap BCSR\n");
192 return;
193 }
194
195 /* Enable the PHY.
196 */
197 clrbits32(bcsr_io+4, BCSR4_ETH10_RST);
198 udelay(1000);
199 setbits32(bcsr_io+4, BCSR4_ETH10_RST);
200 /* Configure port A pins for Txd and Rxd.
201 */
202 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
203 clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
204
205 /* Configure port C pins to enable CLSN and RENA.
206 */
207 clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
208 clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
209 setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
210
211 /* Configure port E for TCLK and RCLK.
212 */
213 setbits32(&cp->cp_pepar, PE_ENET_TCLK | PE_ENET_RCLK);
214 clrbits32(&cp->cp_pepar, PE_ENET_TENA);
215 clrbits32(&cp->cp_pedir,
216 PE_ENET_TCLK | PE_ENET_RCLK | PE_ENET_TENA);
217 clrbits32(&cp->cp_peso, PE_ENET_TCLK | PE_ENET_RCLK);
218 setbits32(&cp->cp_peso, PE_ENET_TENA);
219
220 /* Configure Serial Interface clock routing.
221 * First, clear all SCC bits to zero, then set the ones we want.
222 */
223 clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
224 setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
225
226 /* Disable Rx and Tx. SMC1 sshould be stopped if SCC3 eternet are used.
227 */
228 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
229 /* On the MPC885ADS SCC ethernet PHY is initialized in the full duplex mode
230 * by H/W setting after reset. SCC ethernet controller support only half duplex.
231 * This discrepancy of modes causes a lot of carrier lost errors.
232 */
233
234 /* In the original SCC enet driver the following code is placed at
235 the end of the initialization */
236 setbits32(&cp->cp_pepar, PE_ENET_TENA);
237 clrbits32(&cp->cp_pedir, PE_ENET_TENA);
238 setbits32(&cp->cp_peso, PE_ENET_TENA);
239
240 setbits32(bcsr_io+4, BCSR1_ETHEN);
241 iounmap(bcsr_io);
242 immr_unmap(io_port);
243 immr_unmap(cp);
244}
245
246void init_scc_ioports(struct fs_platform_info *fpi)
247{
248 int scc_no = fs_get_scc_index(fpi->fs_no);
249
250 switch (scc_no) {
251 case 2:
252 init_scc3_ioports(fpi);
253 break;
254 default:
255 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
256 return;
257 }
258}
259
260
261
262static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
263{
264 unsigned *bcsr_io;
265 cpm8xx_t *cp;
266
267 cp = (cpm8xx_t *)immr_map(im_cpm);
268 setbits32(&cp->cp_pepar, 0x000000c0);
269 clrbits32(&cp->cp_pedir, 0x000000c0);
270 clrbits32(&cp->cp_peso, 0x00000040);
271 setbits32(&cp->cp_peso, 0x00000080);
272 immr_unmap(cp);
273
274 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
275
276 if (bcsr_io == NULL) {
277 printk(KERN_CRIT "Could not remap BCSR1\n");
278 return;
279 }
280 clrbits32(bcsr_io,BCSR1_RS232EN_1);
281 iounmap(bcsr_io);
282}
283
284static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi)
285{
286 unsigned *bcsr_io;
287 cpm8xx_t *cp;
288
289 cp = (cpm8xx_t *)immr_map(im_cpm);
290 setbits32(&cp->cp_pepar, 0x00000c00);
291 clrbits32(&cp->cp_pedir, 0x00000c00);
292 clrbits32(&cp->cp_peso, 0x00000400);
293 setbits32(&cp->cp_peso, 0x00000800);
294 immr_unmap(cp);
295
296 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
297
298 if (bcsr_io == NULL) {
299 printk(KERN_CRIT "Could not remap BCSR1\n");
300 return;
301 }
302 clrbits32(bcsr_io,BCSR1_RS232EN_2);
303 iounmap(bcsr_io);
304}
305
306void init_smc_ioports(struct fs_uart_platform_info *data)
307{
308 int smc_no = fs_uart_id_fsid2smc(data->fs_no);
309
310 switch (smc_no) {
311 case 0:
312 init_smc1_uart_ioports(data);
313 data->brg = data->clk_rx;
314 break;
315 case 1:
316 init_smc2_uart_ioports(data);
317 data->brg = data->clk_rx;
318 break;
319 default:
320 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
321 return;
322 }
323}
324
325int platform_device_skip(char *model, int id)
326{
327#ifdef CONFIG_MPC8xx_SECOND_ETH_SCC3
328 const char *dev = "FEC";
329 int n = 2;
330#else
331 const char *dev = "SCC";
332 int n = 3;
333#endif
334
335 if (!strcmp(model, dev) && n == id)
336 return 1;
337
338 return 0;
339}
340
341static void __init mpc885ads_setup_arch(void)
342{
343 struct device_node *cpu;
344
345 cpu = of_find_node_by_type(NULL, "cpu");
346 if (cpu != 0) {
347 const unsigned int *fp;
348
349 fp = get_property(cpu, "clock-frequency", NULL);
350 if (fp != 0)
351 loops_per_jiffy = *fp / HZ;
352 else
353 loops_per_jiffy = 50000000 / HZ;
354 of_node_put(cpu);
355 }
356
357 cpm_reset();
358
359 mpc885ads_board_setup();
360
361 ROOT_DEV = Root_NFS;
362}
363
364static int __init mpc885ads_probe(void)
365{
366 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
367 "model", NULL);
368 if (model == NULL)
369 return 0;
370 if (strcmp(model, "MPC885ADS"))
371 return 0;
372
373 return 1;
374}
375
376define_machine(mpc885_ads) {
377 .name = "MPC885 ADS",
378 .probe = mpc885ads_probe,
379 .setup_arch = mpc885ads_setup_arch,
380 .init_IRQ = m8xx_pic_init,
381 .show_cpuinfo = mpc8xx_show_cpuinfo,
382 .get_irq = mpc8xx_get_irq,
383 .restart = mpc8xx_restart,
384 .calibrate_decr = mpc8xx_calibrate_decr,
385 .set_rtc_time = mpc8xx_set_rtc_time,
386 .get_rtc_time = mpc8xx_get_rtc_time,
387};
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 507d1b98f270..452004283f17 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -5,9 +5,11 @@ ifeq ($(CONFIG_PPC64),y)
5obj-$(CONFIG_PPC_PMAC) += powermac/ 5obj-$(CONFIG_PPC_PMAC) += powermac/
6endif 6endif
7endif 7endif
8obj-$(CONFIG_PPC_MPC52xx) += 52xx/
9obj-$(CONFIG_PPC_CHRP) += chrp/ 8obj-$(CONFIG_PPC_CHRP) += chrp/
10obj-$(CONFIG_4xx) += 4xx/ 9obj-$(CONFIG_4xx) += 4xx/
10obj-$(CONFIG_PPC_MPC52xx) += 52xx/
11obj-$(CONFIG_PPC_8xx) += 8xx/
12obj-$(CONFIG_PPC_82xx) += 82xx/
11obj-$(CONFIG_PPC_83xx) += 83xx/ 13obj-$(CONFIG_PPC_83xx) += 83xx/
12obj-$(CONFIG_PPC_85xx) += 85xx/ 14obj-$(CONFIG_PPC_85xx) += 85xx/
13obj-$(CONFIG_PPC_86xx) += 86xx/ 15obj-$(CONFIG_PPC_86xx) += 86xx/
@@ -17,4 +19,5 @@ obj-$(CONFIG_PPC_MAPLE) += maple/
17obj-$(CONFIG_PPC_PASEMI) += pasemi/ 19obj-$(CONFIG_PPC_PASEMI) += pasemi/
18obj-$(CONFIG_PPC_CELL) += cell/ 20obj-$(CONFIG_PPC_CELL) += cell/
19obj-$(CONFIG_PPC_PS3) += ps3/ 21obj-$(CONFIG_PPC_PS3) += ps3/
22obj-$(CONFIG_PPC_CELLEB) += celleb/
20obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/ 23obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index f90e8337796c..869af89df6ff 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -14,7 +14,12 @@ endif
14spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o 14spufs-modular-$(CONFIG_SPU_FS) += spu_syscalls.o
15spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o 15spu-priv1-$(CONFIG_PPC_CELL_NATIVE) += spu_priv1_mmio.o
16 16
17spu-manage-$(CONFIG_PPC_CELLEB) += spu_manage.o
18spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o
19
17obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ 20obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
18 spu_coredump.o \ 21 spu_coredump.o \
19 $(spufs-modular-m) \ 22 $(spufs-modular-m) \
20 $(spu-priv1-y) spufs/ 23 $(spu-priv1-y) \
24 $(spu-manage-y) \
25 spufs/
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index b43466ba8096..67d617b60a23 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -149,7 +149,8 @@ static int cbe_nr_iommus;
149static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, 149static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte,
150 long n_ptes) 150 long n_ptes)
151{ 151{
152 unsigned long *reg, val; 152 unsigned long __iomem *reg;
153 unsigned long val;
153 long n; 154 long n;
154 155
155 reg = iommu->xlate_regs + IOC_IOPT_CacheInvd; 156 reg = iommu->xlate_regs + IOC_IOPT_CacheInvd;
@@ -592,7 +593,7 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
592 /* Init base fields */ 593 /* Init base fields */
593 i = cbe_nr_iommus++; 594 i = cbe_nr_iommus++;
594 iommu = &iommus[i]; 595 iommu = &iommus[i];
595 iommu->stab = 0; 596 iommu->stab = NULL;
596 iommu->nid = nid; 597 iommu->nid = nid;
597 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i); 598 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i);
598 INIT_LIST_HEAD(&iommu->windows); 599 INIT_LIST_HEAD(&iommu->windows);
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index d04ae1671e6c..66ca4b5a1dbc 100644
--- a/arch/powerpc/platforms/cell/pmu.c
+++ b/arch/powerpc/platforms/cell/pmu.c
@@ -345,18 +345,12 @@ EXPORT_SYMBOL_GPL(cbe_read_trace_buffer);
345 * Enabling/disabling interrupts for the entire performance monitoring unit. 345 * Enabling/disabling interrupts for the entire performance monitoring unit.
346 */ 346 */
347 347
348u32 cbe_query_pm_interrupts(u32 cpu) 348u32 cbe_get_and_clear_pm_interrupts(u32 cpu)
349{
350 return cbe_read_pm(cpu, pm_status);
351}
352EXPORT_SYMBOL_GPL(cbe_query_pm_interrupts);
353
354u32 cbe_clear_pm_interrupts(u32 cpu)
355{ 349{
356 /* Reading pm_status clears the interrupt bits. */ 350 /* Reading pm_status clears the interrupt bits. */
357 return cbe_query_pm_interrupts(cpu); 351 return cbe_read_pm(cpu, pm_status);
358} 352}
359EXPORT_SYMBOL_GPL(cbe_clear_pm_interrupts); 353EXPORT_SYMBOL_GPL(cbe_get_and_clear_pm_interrupts);
360 354
361void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask) 355void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask)
362{ 356{
@@ -371,7 +365,7 @@ EXPORT_SYMBOL_GPL(cbe_enable_pm_interrupts);
371 365
372void cbe_disable_pm_interrupts(u32 cpu) 366void cbe_disable_pm_interrupts(u32 cpu)
373{ 367{
374 cbe_clear_pm_interrupts(cpu); 368 cbe_get_and_clear_pm_interrupts(cpu);
375 cbe_write_pm(cpu, pm_status, 0); 369 cbe_write_pm(cpu, pm_status, 0);
376} 370}
377EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts); 371EXPORT_SYMBOL_GPL(cbe_disable_pm_interrupts);
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index bd7bffc3ddd0..c43999a10deb 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -170,9 +170,11 @@ int
170spu_irq_class_0_bottom(struct spu *spu) 170spu_irq_class_0_bottom(struct spu *spu)
171{ 171{
172 unsigned long stat, mask; 172 unsigned long stat, mask;
173 unsigned long flags;
173 174
174 spu->class_0_pending = 0; 175 spu->class_0_pending = 0;
175 176
177 spin_lock_irqsave(&spu->register_lock, flags);
176 mask = spu_int_mask_get(spu, 0); 178 mask = spu_int_mask_get(spu, 0);
177 stat = spu_int_stat_get(spu, 0); 179 stat = spu_int_stat_get(spu, 0);
178 180
@@ -188,6 +190,7 @@ spu_irq_class_0_bottom(struct spu *spu)
188 __spu_trap_error(spu); 190 __spu_trap_error(spu);
189 191
190 spu_int_stat_clear(spu, 0, stat); 192 spu_int_stat_clear(spu, 0, stat);
193 spin_unlock_irqrestore(&spu->register_lock, flags);
191 194
192 return (stat & 0x7) ? -EIO : 0; 195 return (stat & 0x7) ? -EIO : 0;
193} 196}
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
new file mode 100644
index 000000000000..e34599f53d28
--- /dev/null
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -0,0 +1,366 @@
1/*
2 * spu management operations for of based platforms
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 * Copyright 2006 Sony Corp.
6 * (C) Copyright 2007 TOSHIBA CORPORATION
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22#include <linux/interrupt.h>
23#include <linux/list.h>
24#include <linux/module.h>
25#include <linux/ptrace.h>
26#include <linux/slab.h>
27#include <linux/wait.h>
28#include <linux/mm.h>
29#include <linux/io.h>
30#include <linux/mutex.h>
31#include <linux/device.h>
32
33#include <asm/spu.h>
34#include <asm/spu_priv1.h>
35#include <asm/firmware.h>
36#include <asm/prom.h>
37
38#include "interrupt.h"
39
40struct device_node *spu_devnode(struct spu *spu)
41{
42 return spu->devnode;
43}
44
45EXPORT_SYMBOL_GPL(spu_devnode);
46
47static u64 __init find_spu_unit_number(struct device_node *spe)
48{
49 const unsigned int *prop;
50 int proplen;
51 prop = get_property(spe, "unit-id", &proplen);
52 if (proplen == 4)
53 return (u64)*prop;
54
55 prop = get_property(spe, "reg", &proplen);
56 if (proplen == 4)
57 return (u64)*prop;
58
59 return 0;
60}
61
62static void spu_unmap(struct spu *spu)
63{
64 if (!firmware_has_feature(FW_FEATURE_LPAR))
65 iounmap(spu->priv1);
66 iounmap(spu->priv2);
67 iounmap(spu->problem);
68 iounmap((__force u8 __iomem *)spu->local_store);
69}
70
71static int __init spu_map_interrupts_old(struct spu *spu,
72 struct device_node *np)
73{
74 unsigned int isrc;
75 const u32 *tmp;
76 int nid;
77
78 /* Get the interrupt source unit from the device-tree */
79 tmp = get_property(np, "isrc", NULL);
80 if (!tmp)
81 return -ENODEV;
82 isrc = tmp[0];
83
84 tmp = get_property(np->parent->parent, "node-id", NULL);
85 if (!tmp) {
86 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
87 nid = spu->node;
88 } else
89 nid = tmp[0];
90
91 /* Add the node number */
92 isrc |= nid << IIC_IRQ_NODE_SHIFT;
93
94 /* Now map interrupts of all 3 classes */
95 spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
96 spu->irqs[1] = irq_create_mapping(NULL, IIC_IRQ_CLASS_1 | isrc);
97 spu->irqs[2] = irq_create_mapping(NULL, IIC_IRQ_CLASS_2 | isrc);
98
99 /* Right now, we only fail if class 2 failed */
100 return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
101}
102
103static void __iomem * __init spu_map_prop_old(struct spu *spu,
104 struct device_node *n,
105 const char *name)
106{
107 const struct address_prop {
108 unsigned long address;
109 unsigned int len;
110 } __attribute__((packed)) *prop;
111 int proplen;
112
113 prop = get_property(n, name, &proplen);
114 if (prop == NULL || proplen != sizeof (struct address_prop))
115 return NULL;
116
117 return ioremap(prop->address, prop->len);
118}
119
120static int __init spu_map_device_old(struct spu *spu)
121{
122 struct device_node *node = spu->devnode;
123 const char *prop;
124 int ret;
125
126 ret = -ENODEV;
127 spu->name = get_property(node, "name", NULL);
128 if (!spu->name)
129 goto out;
130
131 prop = get_property(node, "local-store", NULL);
132 if (!prop)
133 goto out;
134 spu->local_store_phys = *(unsigned long *)prop;
135
136 /* we use local store as ram, not io memory */
137 spu->local_store = (void __force *)
138 spu_map_prop_old(spu, node, "local-store");
139 if (!spu->local_store)
140 goto out;
141
142 prop = get_property(node, "problem", NULL);
143 if (!prop)
144 goto out_unmap;
145 spu->problem_phys = *(unsigned long *)prop;
146
147 spu->problem = spu_map_prop_old(spu, node, "problem");
148 if (!spu->problem)
149 goto out_unmap;
150
151 spu->priv2 = spu_map_prop_old(spu, node, "priv2");
152 if (!spu->priv2)
153 goto out_unmap;
154
155 if (!firmware_has_feature(FW_FEATURE_LPAR)) {
156 spu->priv1 = spu_map_prop_old(spu, node, "priv1");
157 if (!spu->priv1)
158 goto out_unmap;
159 }
160
161 ret = 0;
162 goto out;
163
164out_unmap:
165 spu_unmap(spu);
166out:
167 return ret;
168}
169
170static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
171{
172 struct of_irq oirq;
173 int ret;
174 int i;
175
176 for (i=0; i < 3; i++) {
177 ret = of_irq_map_one(np, i, &oirq);
178 if (ret) {
179 pr_debug("spu_new: failed to get irq %d\n", i);
180 goto err;
181 }
182 ret = -EINVAL;
183 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0],
184 oirq.controller->full_name);
185 spu->irqs[i] = irq_create_of_mapping(oirq.controller,
186 oirq.specifier, oirq.size);
187 if (spu->irqs[i] == NO_IRQ) {
188 pr_debug("spu_new: failed to map it !\n");
189 goto err;
190 }
191 }
192 return 0;
193
194err:
195 pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier,
196 spu->name);
197 for (; i >= 0; i--) {
198 if (spu->irqs[i] != NO_IRQ)
199 irq_dispose_mapping(spu->irqs[i]);
200 }
201 return ret;
202}
203
204static int spu_map_resource(struct spu *spu, int nr,
205 void __iomem** virt, unsigned long *phys)
206{
207 struct device_node *np = spu->devnode;
208 struct resource resource = { };
209 unsigned long len;
210 int ret;
211
212 ret = of_address_to_resource(np, nr, &resource);
213 if (ret)
214 return ret;
215 if (phys)
216 *phys = resource.start;
217 len = resource.end - resource.start + 1;
218 *virt = ioremap(resource.start, len);
219 if (!*virt)
220 return -EINVAL;
221 return 0;
222}
223
224static int __init spu_map_device(struct spu *spu)
225{
226 struct device_node *np = spu->devnode;
227 int ret = -ENODEV;
228
229 spu->name = get_property(np, "name", NULL);
230 if (!spu->name)
231 goto out;
232
233 ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
234 &spu->local_store_phys);
235 if (ret) {
236 pr_debug("spu_new: failed to map %s resource 0\n",
237 np->full_name);
238 goto out;
239 }
240 ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
241 &spu->problem_phys);
242 if (ret) {
243 pr_debug("spu_new: failed to map %s resource 1\n",
244 np->full_name);
245 goto out_unmap;
246 }
247 ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
248 if (ret) {
249 pr_debug("spu_new: failed to map %s resource 2\n",
250 np->full_name);
251 goto out_unmap;
252 }
253 if (!firmware_has_feature(FW_FEATURE_LPAR))
254 ret = spu_map_resource(spu, 3,
255 (void __iomem**)&spu->priv1, NULL);
256 if (ret) {
257 pr_debug("spu_new: failed to map %s resource 3\n",
258 np->full_name);
259 goto out_unmap;
260 }
261 pr_debug("spu_new: %s maps:\n", np->full_name);
262 pr_debug(" local store : 0x%016lx -> 0x%p\n",
263 spu->local_store_phys, spu->local_store);
264 pr_debug(" problem state : 0x%016lx -> 0x%p\n",
265 spu->problem_phys, spu->problem);
266 pr_debug(" priv2 : 0x%p\n", spu->priv2);
267 pr_debug(" priv1 : 0x%p\n", spu->priv1);
268
269 return 0;
270
271out_unmap:
272 spu_unmap(spu);
273out:
274 pr_debug("failed to map spe %s: %d\n", spu->name, ret);
275 return ret;
276}
277
278static int __init of_enumerate_spus(int (*fn)(void *data))
279{
280 int ret;
281 struct device_node *node;
282
283 ret = -ENODEV;
284 for (node = of_find_node_by_type(NULL, "spe");
285 node; node = of_find_node_by_type(node, "spe")) {
286 ret = fn(node);
287 if (ret) {
288 printk(KERN_WARNING "%s: Error initializing %s\n",
289 __FUNCTION__, node->name);
290 break;
291 }
292 }
293 return ret;
294}
295
296static int __init of_create_spu(struct spu *spu, void *data)
297{
298 int ret;
299 struct device_node *spe = (struct device_node *)data;
300 static int legacy_map = 0, legacy_irq = 0;
301
302 spu->devnode = of_node_get(spe);
303 spu->spe_id = find_spu_unit_number(spe);
304
305 spu->node = of_node_to_nid(spe);
306 if (spu->node >= MAX_NUMNODES) {
307 printk(KERN_WARNING "SPE %s on node %d ignored,"
308 " node number too big\n", spe->full_name, spu->node);
309 printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
310 ret = -ENODEV;
311 goto out;
312 }
313
314 ret = spu_map_device(spu);
315 if (ret) {
316 if (!legacy_map) {
317 legacy_map = 1;
318 printk(KERN_WARNING "%s: Legacy device tree found, "
319 "trying to map old style\n", __FUNCTION__);
320 }
321 ret = spu_map_device_old(spu);
322 if (ret) {
323 printk(KERN_ERR "Unable to map %s\n",
324 spu->name);
325 goto out;
326 }
327 }
328
329 ret = spu_map_interrupts(spu, spe);
330 if (ret) {
331 if (!legacy_irq) {
332 legacy_irq = 1;
333 printk(KERN_WARNING "%s: Legacy device tree found, "
334 "trying old style irq\n", __FUNCTION__);
335 }
336 ret = spu_map_interrupts_old(spu, spe);
337 if (ret) {
338 printk(KERN_ERR "%s: could not map interrupts",
339 spu->name);
340 goto out_unmap;
341 }
342 }
343
344 pr_debug("Using SPE %s %p %p %p %p %d\n", spu->name,
345 spu->local_store, spu->problem, spu->priv1,
346 spu->priv2, spu->number);
347 goto out;
348
349out_unmap:
350 spu_unmap(spu);
351out:
352 return ret;
353}
354
355static int of_destroy_spu(struct spu *spu)
356{
357 spu_unmap(spu);
358 of_node_put(spu->devnode);
359 return 0;
360}
361
362const struct spu_management_ops spu_management_of_ops = {
363 .enumerate_spus = of_enumerate_spus,
364 .create_spu = of_create_spu,
365 .destroy_spu = of_destroy_spu,
366};
diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
index 910a926b61a2..67fa7247b80a 100644
--- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c
+++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
@@ -37,490 +37,112 @@
37#include "interrupt.h" 37#include "interrupt.h"
38#include "spu_priv1_mmio.h" 38#include "spu_priv1_mmio.h"
39 39
40static DEFINE_MUTEX(add_spumem_mutex);
41
42struct spu_pdata {
43 struct device_node *devnode;
44 struct spu_priv1 __iomem *priv1;
45};
46
47static struct spu_pdata *spu_get_pdata(struct spu *spu)
48{
49 BUG_ON(!spu->pdata);
50 return spu->pdata;
51}
52
53struct device_node *spu_devnode(struct spu *spu)
54{
55 return spu_get_pdata(spu)->devnode;
56}
57
58EXPORT_SYMBOL_GPL(spu_devnode);
59
60static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
61 const char *prop)
62{
63 const struct address_prop {
64 unsigned long address;
65 unsigned int len;
66 } __attribute__((packed)) *p;
67 int proplen;
68
69 unsigned long start_pfn, nr_pages;
70 struct pglist_data *pgdata;
71 struct zone *zone;
72 int ret;
73
74 p = get_property(spe, prop, &proplen);
75 WARN_ON(proplen != sizeof (*p));
76
77 start_pfn = p->address >> PAGE_SHIFT;
78 nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
79
80 pgdata = NODE_DATA(spu->node);
81 zone = pgdata->node_zones;
82
83 /* XXX rethink locking here */
84 mutex_lock(&add_spumem_mutex);
85 ret = __add_pages(zone, start_pfn, nr_pages);
86 mutex_unlock(&add_spumem_mutex);
87
88 return ret;
89}
90
91static void __iomem * __init map_spe_prop(struct spu *spu,
92 struct device_node *n, const char *name)
93{
94 const struct address_prop {
95 unsigned long address;
96 unsigned int len;
97 } __attribute__((packed)) *prop;
98
99 const void *p;
100 int proplen;
101 void __iomem *ret = NULL;
102 int err = 0;
103
104 p = get_property(n, name, &proplen);
105 if (proplen != sizeof (struct address_prop))
106 return NULL;
107
108 prop = p;
109
110 err = cell_spuprop_present(spu, n, name);
111 if (err && (err != -EEXIST))
112 goto out;
113
114 ret = ioremap(prop->address, prop->len);
115
116 out:
117 return ret;
118}
119
120static void spu_unmap(struct spu *spu)
121{
122 iounmap(spu->priv2);
123 iounmap(spu_get_pdata(spu)->priv1);
124 iounmap(spu->problem);
125 iounmap((__force u8 __iomem *)spu->local_store);
126}
127
128static int __init spu_map_interrupts_old(struct spu *spu,
129 struct device_node *np)
130{
131 unsigned int isrc;
132 const u32 *tmp;
133 int nid;
134
135 /* Get the interrupt source unit from the device-tree */
136 tmp = get_property(np, "isrc", NULL);
137 if (!tmp)
138 return -ENODEV;
139 isrc = tmp[0];
140
141 tmp = get_property(np->parent->parent, "node-id", NULL);
142 if (!tmp) {
143 printk(KERN_WARNING "%s: can't find node-id\n", __FUNCTION__);
144 nid = spu->node;
145 } else
146 nid = tmp[0];
147
148 /* Add the node number */
149 isrc |= nid << IIC_IRQ_NODE_SHIFT;
150
151 /* Now map interrupts of all 3 classes */
152 spu->irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
153 spu->irqs[1] = irq_create_mapping(NULL, IIC_IRQ_CLASS_1 | isrc);
154 spu->irqs[2] = irq_create_mapping(NULL, IIC_IRQ_CLASS_2 | isrc);
155
156 /* Right now, we only fail if class 2 failed */
157 return spu->irqs[2] == NO_IRQ ? -EINVAL : 0;
158}
159
160static int __init spu_map_device_old(struct spu *spu, struct device_node *node)
161{
162 const char *prop;
163 int ret;
164
165 ret = -ENODEV;
166 spu->name = get_property(node, "name", NULL);
167 if (!spu->name)
168 goto out;
169
170 prop = get_property(node, "local-store", NULL);
171 if (!prop)
172 goto out;
173 spu->local_store_phys = *(unsigned long *)prop;
174
175 /* we use local store as ram, not io memory */
176 spu->local_store = (void __force *)
177 map_spe_prop(spu, node, "local-store");
178 if (!spu->local_store)
179 goto out;
180
181 prop = get_property(node, "problem", NULL);
182 if (!prop)
183 goto out_unmap;
184 spu->problem_phys = *(unsigned long *)prop;
185
186 spu->problem= map_spe_prop(spu, node, "problem");
187 if (!spu->problem)
188 goto out_unmap;
189
190 spu_get_pdata(spu)->priv1= map_spe_prop(spu, node, "priv1");
191
192 spu->priv2= map_spe_prop(spu, node, "priv2");
193 if (!spu->priv2)
194 goto out_unmap;
195 ret = 0;
196 goto out;
197
198out_unmap:
199 spu_unmap(spu);
200out:
201 return ret;
202}
203
204static int __init spu_map_interrupts(struct spu *spu, struct device_node *np)
205{
206 struct of_irq oirq;
207 int ret;
208 int i;
209
210 for (i=0; i < 3; i++) {
211 ret = of_irq_map_one(np, i, &oirq);
212 if (ret) {
213 pr_debug("spu_new: failed to get irq %d\n", i);
214 goto err;
215 }
216 ret = -EINVAL;
217 pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0],
218 oirq.controller->full_name);
219 spu->irqs[i] = irq_create_of_mapping(oirq.controller,
220 oirq.specifier, oirq.size);
221 if (spu->irqs[i] == NO_IRQ) {
222 pr_debug("spu_new: failed to map it !\n");
223 goto err;
224 }
225 }
226 return 0;
227
228err:
229 pr_debug("failed to map irq %x for spu %s\n", *oirq.specifier,
230 spu->name);
231 for (; i >= 0; i--) {
232 if (spu->irqs[i] != NO_IRQ)
233 irq_dispose_mapping(spu->irqs[i]);
234 }
235 return ret;
236}
237
238static int spu_map_resource(struct spu *spu, int nr,
239 void __iomem** virt, unsigned long *phys)
240{
241 struct device_node *np = spu_get_pdata(spu)->devnode;
242 unsigned long start_pfn, nr_pages;
243 struct pglist_data *pgdata;
244 struct zone *zone;
245 struct resource resource = { };
246 unsigned long len;
247 int ret;
248
249 ret = of_address_to_resource(np, nr, &resource);
250 if (ret)
251 goto out;
252
253 if (phys)
254 *phys = resource.start;
255 len = resource.end - resource.start + 1;
256 *virt = ioremap(resource.start, len);
257 if (!*virt)
258 ret = -EINVAL;
259
260 start_pfn = resource.start >> PAGE_SHIFT;
261 nr_pages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
262
263 pgdata = NODE_DATA(spu->node);
264 zone = pgdata->node_zones;
265
266 /* XXX rethink locking here */
267 mutex_lock(&add_spumem_mutex);
268 ret = __add_pages(zone, start_pfn, nr_pages);
269 mutex_unlock(&add_spumem_mutex);
270
271out:
272 return ret;
273}
274
275static int __init spu_map_device(struct spu *spu)
276{
277 struct device_node *np = spu_get_pdata(spu)->devnode;
278 int ret = -ENODEV;
279
280 spu->name = get_property(np, "name", NULL);
281 if (!spu->name)
282 goto out;
283
284 ret = spu_map_resource(spu, 0, (void __iomem**)&spu->local_store,
285 &spu->local_store_phys);
286 if (ret) {
287 pr_debug("spu_new: failed to map %s resource 0\n",
288 np->full_name);
289 goto out;
290 }
291 ret = spu_map_resource(spu, 1, (void __iomem**)&spu->problem,
292 &spu->problem_phys);
293 if (ret) {
294 pr_debug("spu_new: failed to map %s resource 1\n",
295 np->full_name);
296 goto out_unmap;
297 }
298 ret = spu_map_resource(spu, 2, (void __iomem**)&spu->priv2, NULL);
299 if (ret) {
300 pr_debug("spu_new: failed to map %s resource 2\n",
301 np->full_name);
302 goto out_unmap;
303 }
304 if (!firmware_has_feature(FW_FEATURE_LPAR))
305 ret = spu_map_resource(spu, 3,
306 (void __iomem**)&spu_get_pdata(spu)->priv1, NULL);
307 if (ret) {
308 pr_debug("spu_new: failed to map %s resource 3\n",
309 np->full_name);
310 goto out_unmap;
311 }
312 pr_debug("spu_new: %s maps:\n", np->full_name);
313 pr_debug(" local store : 0x%016lx -> 0x%p\n",
314 spu->local_store_phys, spu->local_store);
315 pr_debug(" problem state : 0x%016lx -> 0x%p\n",
316 spu->problem_phys, spu->problem);
317 pr_debug(" priv2 : 0x%p\n", spu->priv2);
318 pr_debug(" priv1 : 0x%p\n",
319 spu_get_pdata(spu)->priv1);
320
321 return 0;
322
323out_unmap:
324 spu_unmap(spu);
325out:
326 pr_debug("failed to map spe %s: %d\n", spu->name, ret);
327 return ret;
328}
329
330static int __init of_enumerate_spus(int (*fn)(void *data))
331{
332 int ret;
333 struct device_node *node;
334
335 ret = -ENODEV;
336 for (node = of_find_node_by_type(NULL, "spe");
337 node; node = of_find_node_by_type(node, "spe")) {
338 ret = fn(node);
339 if (ret) {
340 printk(KERN_WARNING "%s: Error initializing %s\n",
341 __FUNCTION__, node->name);
342 break;
343 }
344 }
345 return ret;
346}
347
348static int __init of_create_spu(struct spu *spu, void *data)
349{
350 int ret;
351 struct device_node *spe = (struct device_node *)data;
352
353 spu->pdata = kzalloc(sizeof(struct spu_pdata),
354 GFP_KERNEL);
355 if (!spu->pdata) {
356 ret = -ENOMEM;
357 goto out;
358 }
359 spu_get_pdata(spu)->devnode = of_node_get(spe);
360
361 spu->node = of_node_to_nid(spe);
362 if (spu->node >= MAX_NUMNODES) {
363 printk(KERN_WARNING "SPE %s on node %d ignored,"
364 " node number too big\n", spe->full_name, spu->node);
365 printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n");
366 ret = -ENODEV;
367 goto out_free;
368 }
369
370 ret = spu_map_device(spu);
371 /* try old method */
372 if (ret)
373 ret = spu_map_device_old(spu, spe);
374 if (ret)
375 goto out_free;
376
377 ret = spu_map_interrupts(spu, spe);
378 if (ret)
379 ret = spu_map_interrupts_old(spu, spe);
380 if (ret)
381 goto out_unmap;
382
383 pr_debug(KERN_DEBUG "Using SPE %s %p %p %p %p %d\n", spu->name,
384 spu->local_store, spu->problem, spu_get_pdata(spu)->priv1,
385 spu->priv2, spu->number);
386 goto out;
387
388out_unmap:
389 spu_unmap(spu);
390out_free:
391 kfree(spu->pdata);
392 spu->pdata = NULL;
393out:
394 return ret;
395}
396
397static int of_destroy_spu(struct spu *spu)
398{
399 spu_unmap(spu);
400 of_node_put(spu_get_pdata(spu)->devnode);
401 kfree(spu->pdata);
402 spu->pdata = NULL;
403 return 0;
404}
405
406const struct spu_management_ops spu_management_of_ops = {
407 .enumerate_spus = of_enumerate_spus,
408 .create_spu = of_create_spu,
409 .destroy_spu = of_destroy_spu,
410};
411
412static void int_mask_and(struct spu *spu, int class, u64 mask) 40static void int_mask_and(struct spu *spu, int class, u64 mask)
413{ 41{
414 u64 old_mask; 42 u64 old_mask;
415 43
416 old_mask = in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 44 old_mask = in_be64(&spu->priv1->int_mask_RW[class]);
417 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], 45 out_be64(&spu->priv1->int_mask_RW[class], old_mask & mask);
418 old_mask & mask);
419} 46}
420 47
421static void int_mask_or(struct spu *spu, int class, u64 mask) 48static void int_mask_or(struct spu *spu, int class, u64 mask)
422{ 49{
423 u64 old_mask; 50 u64 old_mask;
424 51
425 old_mask = in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 52 old_mask = in_be64(&spu->priv1->int_mask_RW[class]);
426 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], 53 out_be64(&spu->priv1->int_mask_RW[class], old_mask | mask);
427 old_mask | mask);
428} 54}
429 55
430static void int_mask_set(struct spu *spu, int class, u64 mask) 56static void int_mask_set(struct spu *spu, int class, u64 mask)
431{ 57{
432 out_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class], mask); 58 out_be64(&spu->priv1->int_mask_RW[class], mask);
433} 59}
434 60
435static u64 int_mask_get(struct spu *spu, int class) 61static u64 int_mask_get(struct spu *spu, int class)
436{ 62{
437 return in_be64(&spu_get_pdata(spu)->priv1->int_mask_RW[class]); 63 return in_be64(&spu->priv1->int_mask_RW[class]);
438} 64}
439 65
440static void int_stat_clear(struct spu *spu, int class, u64 stat) 66static void int_stat_clear(struct spu *spu, int class, u64 stat)
441{ 67{
442 out_be64(&spu_get_pdata(spu)->priv1->int_stat_RW[class], stat); 68 out_be64(&spu->priv1->int_stat_RW[class], stat);
443} 69}
444 70
445static u64 int_stat_get(struct spu *spu, int class) 71static u64 int_stat_get(struct spu *spu, int class)
446{ 72{
447 return in_be64(&spu_get_pdata(spu)->priv1->int_stat_RW[class]); 73 return in_be64(&spu->priv1->int_stat_RW[class]);
448} 74}
449 75
450static void cpu_affinity_set(struct spu *spu, int cpu) 76static void cpu_affinity_set(struct spu *spu, int cpu)
451{ 77{
452 u64 target = iic_get_target_id(cpu); 78 u64 target = iic_get_target_id(cpu);
453 u64 route = target << 48 | target << 32 | target << 16; 79 u64 route = target << 48 | target << 32 | target << 16;
454 out_be64(&spu_get_pdata(spu)->priv1->int_route_RW, route); 80 out_be64(&spu->priv1->int_route_RW, route);
455} 81}
456 82
457static u64 mfc_dar_get(struct spu *spu) 83static u64 mfc_dar_get(struct spu *spu)
458{ 84{
459 return in_be64(&spu_get_pdata(spu)->priv1->mfc_dar_RW); 85 return in_be64(&spu->priv1->mfc_dar_RW);
460} 86}
461 87
462static u64 mfc_dsisr_get(struct spu *spu) 88static u64 mfc_dsisr_get(struct spu *spu)
463{ 89{
464 return in_be64(&spu_get_pdata(spu)->priv1->mfc_dsisr_RW); 90 return in_be64(&spu->priv1->mfc_dsisr_RW);
465} 91}
466 92
467static void mfc_dsisr_set(struct spu *spu, u64 dsisr) 93static void mfc_dsisr_set(struct spu *spu, u64 dsisr)
468{ 94{
469 out_be64(&spu_get_pdata(spu)->priv1->mfc_dsisr_RW, dsisr); 95 out_be64(&spu->priv1->mfc_dsisr_RW, dsisr);
470} 96}
471 97
472static void mfc_sdr_setup(struct spu *spu) 98static void mfc_sdr_setup(struct spu *spu)
473{ 99{
474 out_be64(&spu_get_pdata(spu)->priv1->mfc_sdr_RW, mfspr(SPRN_SDR1)); 100 out_be64(&spu->priv1->mfc_sdr_RW, mfspr(SPRN_SDR1));
475} 101}
476 102
477static void mfc_sr1_set(struct spu *spu, u64 sr1) 103static void mfc_sr1_set(struct spu *spu, u64 sr1)
478{ 104{
479 out_be64(&spu_get_pdata(spu)->priv1->mfc_sr1_RW, sr1); 105 out_be64(&spu->priv1->mfc_sr1_RW, sr1);
480} 106}
481 107
482static u64 mfc_sr1_get(struct spu *spu) 108static u64 mfc_sr1_get(struct spu *spu)
483{ 109{
484 return in_be64(&spu_get_pdata(spu)->priv1->mfc_sr1_RW); 110 return in_be64(&spu->priv1->mfc_sr1_RW);
485} 111}
486 112
487static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id) 113static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id)
488{ 114{
489 out_be64(&spu_get_pdata(spu)->priv1->mfc_tclass_id_RW, tclass_id); 115 out_be64(&spu->priv1->mfc_tclass_id_RW, tclass_id);
490} 116}
491 117
492static u64 mfc_tclass_id_get(struct spu *spu) 118static u64 mfc_tclass_id_get(struct spu *spu)
493{ 119{
494 return in_be64(&spu_get_pdata(spu)->priv1->mfc_tclass_id_RW); 120 return in_be64(&spu->priv1->mfc_tclass_id_RW);
495} 121}
496 122
497static void tlb_invalidate(struct spu *spu) 123static void tlb_invalidate(struct spu *spu)
498{ 124{
499 out_be64(&spu_get_pdata(spu)->priv1->tlb_invalidate_entry_W, 0ul); 125 out_be64(&spu->priv1->tlb_invalidate_entry_W, 0ul);
500} 126}
501 127
502static void resource_allocation_groupID_set(struct spu *spu, u64 id) 128static void resource_allocation_groupID_set(struct spu *spu, u64 id)
503{ 129{
504 out_be64(&spu_get_pdata(spu)->priv1->resource_allocation_groupID_RW, 130 out_be64(&spu->priv1->resource_allocation_groupID_RW, id);
505 id);
506} 131}
507 132
508static u64 resource_allocation_groupID_get(struct spu *spu) 133static u64 resource_allocation_groupID_get(struct spu *spu)
509{ 134{
510 return in_be64( 135 return in_be64(&spu->priv1->resource_allocation_groupID_RW);
511 &spu_get_pdata(spu)->priv1->resource_allocation_groupID_RW);
512} 136}
513 137
514static void resource_allocation_enable_set(struct spu *spu, u64 enable) 138static void resource_allocation_enable_set(struct spu *spu, u64 enable)
515{ 139{
516 out_be64(&spu_get_pdata(spu)->priv1->resource_allocation_enable_RW, 140 out_be64(&spu->priv1->resource_allocation_enable_RW, enable);
517 enable);
518} 141}
519 142
520static u64 resource_allocation_enable_get(struct spu *spu) 143static u64 resource_allocation_enable_get(struct spu *spu)
521{ 144{
522 return in_be64( 145 return in_be64(&spu->priv1->resource_allocation_enable_RW);
523 &spu_get_pdata(spu)->priv1->resource_allocation_enable_RW);
524} 146}
525 147
526const struct spu_priv1_ops spu_priv1_mmio_ops = 148const struct spu_priv1_ops spu_priv1_mmio_ops =
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 0870009f56db..04ad2e364e97 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -42,7 +42,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
42 } 42 }
43 spin_lock_init(&ctx->mmio_lock); 43 spin_lock_init(&ctx->mmio_lock);
44 kref_init(&ctx->kref); 44 kref_init(&ctx->kref);
45 init_rwsem(&ctx->state_sema); 45 mutex_init(&ctx->state_mutex);
46 init_MUTEX(&ctx->run_sema); 46 init_MUTEX(&ctx->run_sema);
47 init_waitqueue_head(&ctx->ibox_wq); 47 init_waitqueue_head(&ctx->ibox_wq);
48 init_waitqueue_head(&ctx->wbox_wq); 48 init_waitqueue_head(&ctx->wbox_wq);
@@ -53,6 +53,10 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
53 ctx->owner = get_task_mm(current); 53 ctx->owner = get_task_mm(current);
54 if (gang) 54 if (gang)
55 spu_gang_add_ctx(gang, ctx); 55 spu_gang_add_ctx(gang, ctx);
56 ctx->rt_priority = current->rt_priority;
57 ctx->policy = current->policy;
58 ctx->prio = current->prio;
59 INIT_DELAYED_WORK(&ctx->sched_work, spu_sched_tick);
56 goto out; 60 goto out;
57out_free: 61out_free:
58 kfree(ctx); 62 kfree(ctx);
@@ -65,9 +69,9 @@ void destroy_spu_context(struct kref *kref)
65{ 69{
66 struct spu_context *ctx; 70 struct spu_context *ctx;
67 ctx = container_of(kref, struct spu_context, kref); 71 ctx = container_of(kref, struct spu_context, kref);
68 down_write(&ctx->state_sema); 72 mutex_lock(&ctx->state_mutex);
69 spu_deactivate(ctx); 73 spu_deactivate(ctx);
70 up_write(&ctx->state_sema); 74 mutex_unlock(&ctx->state_mutex);
71 spu_fini_csa(&ctx->csa); 75 spu_fini_csa(&ctx->csa);
72 if (ctx->gang) 76 if (ctx->gang)
73 spu_gang_remove_ctx(ctx->gang, ctx); 77 spu_gang_remove_ctx(ctx->gang, ctx);
@@ -96,107 +100,102 @@ void spu_forget(struct spu_context *ctx)
96 spu_release(ctx); 100 spu_release(ctx);
97} 101}
98 102
99void spu_acquire(struct spu_context *ctx)
100{
101 down_read(&ctx->state_sema);
102}
103
104void spu_release(struct spu_context *ctx)
105{
106 up_read(&ctx->state_sema);
107}
108
109void spu_unmap_mappings(struct spu_context *ctx) 103void spu_unmap_mappings(struct spu_context *ctx)
110{ 104{
111 if (ctx->local_store) 105 if (ctx->local_store)
112 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1); 106 unmap_mapping_range(ctx->local_store, 0, LS_SIZE, 1);
113 if (ctx->mfc) 107 if (ctx->mfc)
114 unmap_mapping_range(ctx->mfc, 0, 0x4000, 1); 108 unmap_mapping_range(ctx->mfc, 0, 0x1000, 1);
115 if (ctx->cntl) 109 if (ctx->cntl)
116 unmap_mapping_range(ctx->cntl, 0, 0x4000, 1); 110 unmap_mapping_range(ctx->cntl, 0, 0x1000, 1);
117 if (ctx->signal1) 111 if (ctx->signal1)
118 unmap_mapping_range(ctx->signal1, 0, 0x4000, 1); 112 unmap_mapping_range(ctx->signal1, 0, PAGE_SIZE, 1);
119 if (ctx->signal2) 113 if (ctx->signal2)
120 unmap_mapping_range(ctx->signal2, 0, 0x4000, 1); 114 unmap_mapping_range(ctx->signal2, 0, PAGE_SIZE, 1);
115 if (ctx->mss)
116 unmap_mapping_range(ctx->mss, 0, 0x1000, 1);
117 if (ctx->psmap)
118 unmap_mapping_range(ctx->psmap, 0, 0x20000, 1);
121} 119}
122 120
121/**
122 * spu_acquire_exclusive - lock spu contex and protect against userspace access
123 * @ctx: spu contex to lock
124 *
125 * Note:
126 * Returns 0 and with the context locked on success
127 * Returns negative error and with the context _unlocked_ on failure.
128 */
123int spu_acquire_exclusive(struct spu_context *ctx) 129int spu_acquire_exclusive(struct spu_context *ctx)
124{ 130{
125 int ret = 0; 131 int ret = -EINVAL;
126 132
127 down_write(&ctx->state_sema); 133 spu_acquire(ctx);
128 /* ctx is about to be freed, can't acquire any more */ 134 /*
129 if (!ctx->owner) { 135 * Context is about to be freed, so we can't acquire it anymore.
130 ret = -EINVAL; 136 */
131 goto out; 137 if (!ctx->owner)
132 } 138 goto out_unlock;
133 139
134 if (ctx->state == SPU_STATE_SAVED) { 140 if (ctx->state == SPU_STATE_SAVED) {
135 ret = spu_activate(ctx, 0); 141 ret = spu_activate(ctx, 0);
136 if (ret) 142 if (ret)
137 goto out; 143 goto out_unlock;
138 ctx->state = SPU_STATE_RUNNABLE;
139 } else { 144 } else {
140 /* We need to exclude userspace access to the context. */ 145 /*
146 * We need to exclude userspace access to the context.
147 *
148 * To protect against memory access we invalidate all ptes
149 * and make sure the pagefault handlers block on the mutex.
150 */
141 spu_unmap_mappings(ctx); 151 spu_unmap_mappings(ctx);
142 } 152 }
143 153
144out: 154 return 0;
145 if (ret) 155
146 up_write(&ctx->state_sema); 156 out_unlock:
157 spu_release(ctx);
147 return ret; 158 return ret;
148} 159}
149 160
150int spu_acquire_runnable(struct spu_context *ctx) 161/**
162 * spu_acquire_runnable - lock spu contex and make sure it is in runnable state
163 * @ctx: spu contex to lock
164 *
165 * Note:
166 * Returns 0 and with the context locked on success
167 * Returns negative error and with the context _unlocked_ on failure.
168 */
169int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags)
151{ 170{
152 int ret = 0; 171 int ret = -EINVAL;
153
154 down_read(&ctx->state_sema);
155 if (ctx->state == SPU_STATE_RUNNABLE) {
156 ctx->spu->prio = current->prio;
157 return 0;
158 }
159 up_read(&ctx->state_sema);
160
161 down_write(&ctx->state_sema);
162 /* ctx is about to be freed, can't acquire any more */
163 if (!ctx->owner) {
164 ret = -EINVAL;
165 goto out;
166 }
167 172
173 spu_acquire(ctx);
168 if (ctx->state == SPU_STATE_SAVED) { 174 if (ctx->state == SPU_STATE_SAVED) {
169 ret = spu_activate(ctx, 0); 175 /*
176 * Context is about to be freed, so we can't acquire it anymore.
177 */
178 if (!ctx->owner)
179 goto out_unlock;
180 ret = spu_activate(ctx, flags);
170 if (ret) 181 if (ret)
171 goto out; 182 goto out_unlock;
172 ctx->state = SPU_STATE_RUNNABLE;
173 } 183 }
174 184
175 downgrade_write(&ctx->state_sema); 185 return 0;
176 /* On success, we return holding the lock */
177
178 return ret;
179out:
180 /* Release here, to simplify calling code. */
181 up_write(&ctx->state_sema);
182 186
187 out_unlock:
188 spu_release(ctx);
183 return ret; 189 return ret;
184} 190}
185 191
192/**
193 * spu_acquire_saved - lock spu contex and make sure it is in saved state
194 * @ctx: spu contex to lock
195 */
186void spu_acquire_saved(struct spu_context *ctx) 196void spu_acquire_saved(struct spu_context *ctx)
187{ 197{
188 down_read(&ctx->state_sema); 198 spu_acquire(ctx);
189 199 if (ctx->state != SPU_STATE_SAVED)
190 if (ctx->state == SPU_STATE_SAVED)
191 return;
192
193 up_read(&ctx->state_sema);
194 down_write(&ctx->state_sema);
195
196 if (ctx->state == SPU_STATE_RUNNABLE) {
197 spu_deactivate(ctx); 200 spu_deactivate(ctx);
198 ctx->state = SPU_STATE_SAVED;
199 }
200
201 downgrade_write(&ctx->state_sema);
202} 201}
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 347eff56fcbd..b00653d69c01 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -45,8 +45,8 @@ spufs_mem_open(struct inode *inode, struct file *file)
45 struct spufs_inode_info *i = SPUFS_I(inode); 45 struct spufs_inode_info *i = SPUFS_I(inode);
46 struct spu_context *ctx = i->i_ctx; 46 struct spu_context *ctx = i->i_ctx;
47 file->private_data = ctx; 47 file->private_data = ctx;
48 file->f_mapping = inode->i_mapping;
49 ctx->local_store = inode->i_mapping; 48 ctx->local_store = inode->i_mapping;
49 smp_wmb();
50 return 0; 50 return 0;
51} 51}
52 52
@@ -95,39 +95,38 @@ spufs_mem_write(struct file *file, const char __user *buffer,
95 return ret; 95 return ret;
96} 96}
97 97
98static struct page * 98static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
99spufs_mem_mmap_nopage(struct vm_area_struct *vma, 99 unsigned long address)
100 unsigned long address, int *type)
101{ 100{
102 struct page *page = NOPAGE_SIGBUS;
103
104 struct spu_context *ctx = vma->vm_file->private_data; 101 struct spu_context *ctx = vma->vm_file->private_data;
105 unsigned long offset = address - vma->vm_start; 102 unsigned long pfn, offset = address - vma->vm_start;
103
106 offset += vma->vm_pgoff << PAGE_SHIFT; 104 offset += vma->vm_pgoff << PAGE_SHIFT;
107 105
106 if (offset >= LS_SIZE)
107 return NOPFN_SIGBUS;
108
108 spu_acquire(ctx); 109 spu_acquire(ctx);
109 110
110 if (ctx->state == SPU_STATE_SAVED) { 111 if (ctx->state == SPU_STATE_SAVED) {
111 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 112 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
112 & ~_PAGE_NO_CACHE); 113 & ~_PAGE_NO_CACHE);
113 page = vmalloc_to_page(ctx->csa.lscsa->ls + offset); 114 pfn = vmalloc_to_pfn(ctx->csa.lscsa->ls + offset);
114 } else { 115 } else {
115 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 116 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
116 | _PAGE_NO_CACHE); 117 | _PAGE_NO_CACHE);
117 page = pfn_to_page((ctx->spu->local_store_phys + offset) 118 pfn = (ctx->spu->local_store_phys + offset) >> PAGE_SHIFT;
118 >> PAGE_SHIFT);
119 } 119 }
120 spu_release(ctx); 120 vm_insert_pfn(vma, address, pfn);
121 121
122 if (type) 122 spu_release(ctx);
123 *type = VM_FAULT_MINOR;
124 123
125 page_cache_get(page); 124 return NOPFN_REFAULT;
126 return page;
127} 125}
128 126
127
129static struct vm_operations_struct spufs_mem_mmap_vmops = { 128static struct vm_operations_struct spufs_mem_mmap_vmops = {
130 .nopage = spufs_mem_mmap_nopage, 129 .nopfn = spufs_mem_mmap_nopfn,
131}; 130};
132 131
133static int 132static int
@@ -136,7 +135,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
136 if (!(vma->vm_flags & VM_SHARED)) 135 if (!(vma->vm_flags & VM_SHARED))
137 return -EINVAL; 136 return -EINVAL;
138 137
139 vma->vm_flags |= VM_IO; 138 vma->vm_flags |= VM_IO | VM_PFNMAP;
140 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 139 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
141 | _PAGE_NO_CACHE); 140 | _PAGE_NO_CACHE);
142 141
@@ -144,7 +143,7 @@ spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
144 return 0; 143 return 0;
145} 144}
146 145
147static struct file_operations spufs_mem_fops = { 146static const struct file_operations spufs_mem_fops = {
148 .open = spufs_mem_open, 147 .open = spufs_mem_open,
149 .read = spufs_mem_read, 148 .read = spufs_mem_read,
150 .write = spufs_mem_write, 149 .write = spufs_mem_write,
@@ -152,49 +151,42 @@ static struct file_operations spufs_mem_fops = {
152 .mmap = spufs_mem_mmap, 151 .mmap = spufs_mem_mmap,
153}; 152};
154 153
155static struct page *spufs_ps_nopage(struct vm_area_struct *vma, 154static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
156 unsigned long address, 155 unsigned long address,
157 int *type, unsigned long ps_offs, 156 unsigned long ps_offs,
158 unsigned long ps_size) 157 unsigned long ps_size)
159{ 158{
160 struct page *page = NOPAGE_SIGBUS;
161 int fault_type = VM_FAULT_SIGBUS;
162 struct spu_context *ctx = vma->vm_file->private_data; 159 struct spu_context *ctx = vma->vm_file->private_data;
163 unsigned long offset = address - vma->vm_start; 160 unsigned long area, offset = address - vma->vm_start;
164 unsigned long area;
165 int ret; 161 int ret;
166 162
167 offset += vma->vm_pgoff << PAGE_SHIFT; 163 offset += vma->vm_pgoff << PAGE_SHIFT;
168 if (offset >= ps_size) 164 if (offset >= ps_size)
169 goto out; 165 return NOPFN_SIGBUS;
170 166
171 ret = spu_acquire_runnable(ctx); 167 /* error here usually means a signal.. we might want to test
168 * the error code more precisely though
169 */
170 ret = spu_acquire_runnable(ctx, 0);
172 if (ret) 171 if (ret)
173 goto out; 172 return NOPFN_REFAULT;
174 173
175 area = ctx->spu->problem_phys + ps_offs; 174 area = ctx->spu->problem_phys + ps_offs;
176 page = pfn_to_page((area + offset) >> PAGE_SHIFT); 175 vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
177 fault_type = VM_FAULT_MINOR;
178 page_cache_get(page);
179
180 spu_release(ctx); 176 spu_release(ctx);
181 177
182 out: 178 return NOPFN_REFAULT;
183 if (type)
184 *type = fault_type;
185
186 return page;
187} 179}
188 180
189#if SPUFS_MMAP_4K 181#if SPUFS_MMAP_4K
190static struct page *spufs_cntl_mmap_nopage(struct vm_area_struct *vma, 182static unsigned long spufs_cntl_mmap_nopfn(struct vm_area_struct *vma,
191 unsigned long address, int *type) 183 unsigned long address)
192{ 184{
193 return spufs_ps_nopage(vma, address, type, 0x4000, 0x1000); 185 return spufs_ps_nopfn(vma, address, 0x4000, 0x1000);
194} 186}
195 187
196static struct vm_operations_struct spufs_cntl_mmap_vmops = { 188static struct vm_operations_struct spufs_cntl_mmap_vmops = {
197 .nopage = spufs_cntl_mmap_nopage, 189 .nopfn = spufs_cntl_mmap_nopfn,
198}; 190};
199 191
200/* 192/*
@@ -205,7 +197,7 @@ static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma)
205 if (!(vma->vm_flags & VM_SHARED)) 197 if (!(vma->vm_flags & VM_SHARED))
206 return -EINVAL; 198 return -EINVAL;
207 199
208 vma->vm_flags |= VM_IO; 200 vma->vm_flags |= VM_IO | VM_PFNMAP;
209 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 201 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
210 | _PAGE_NO_CACHE | _PAGE_GUARDED); 202 | _PAGE_NO_CACHE | _PAGE_GUARDED);
211 203
@@ -243,13 +235,13 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
243 struct spu_context *ctx = i->i_ctx; 235 struct spu_context *ctx = i->i_ctx;
244 236
245 file->private_data = ctx; 237 file->private_data = ctx;
246 file->f_mapping = inode->i_mapping;
247 ctx->cntl = inode->i_mapping; 238 ctx->cntl = inode->i_mapping;
239 smp_wmb();
248 return simple_attr_open(inode, file, spufs_cntl_get, 240 return simple_attr_open(inode, file, spufs_cntl_get,
249 spufs_cntl_set, "0x%08lx"); 241 spufs_cntl_set, "0x%08lx");
250} 242}
251 243
252static struct file_operations spufs_cntl_fops = { 244static const struct file_operations spufs_cntl_fops = {
253 .open = spufs_cntl_open, 245 .open = spufs_cntl_open,
254 .release = simple_attr_close, 246 .release = simple_attr_close,
255 .read = simple_attr_read, 247 .read = simple_attr_read,
@@ -309,7 +301,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
309 return ret; 301 return ret;
310} 302}
311 303
312static struct file_operations spufs_regs_fops = { 304static const struct file_operations spufs_regs_fops = {
313 .open = spufs_regs_open, 305 .open = spufs_regs_open,
314 .read = spufs_regs_read, 306 .read = spufs_regs_read,
315 .write = spufs_regs_write, 307 .write = spufs_regs_write,
@@ -360,7 +352,7 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
360 return ret; 352 return ret;
361} 353}
362 354
363static struct file_operations spufs_fpcr_fops = { 355static const struct file_operations spufs_fpcr_fops = {
364 .open = spufs_regs_open, 356 .open = spufs_regs_open,
365 .read = spufs_fpcr_read, 357 .read = spufs_fpcr_read,
366 .write = spufs_fpcr_write, 358 .write = spufs_fpcr_write,
@@ -426,7 +418,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
426 return count; 418 return count;
427} 419}
428 420
429static struct file_operations spufs_mbox_fops = { 421static const struct file_operations spufs_mbox_fops = {
430 .open = spufs_pipe_open, 422 .open = spufs_pipe_open,
431 .read = spufs_mbox_read, 423 .read = spufs_mbox_read,
432}; 424};
@@ -452,7 +444,7 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
452 return 4; 444 return 4;
453} 445}
454 446
455static struct file_operations spufs_mbox_stat_fops = { 447static const struct file_operations spufs_mbox_stat_fops = {
456 .open = spufs_pipe_open, 448 .open = spufs_pipe_open,
457 .read = spufs_mbox_stat_read, 449 .read = spufs_mbox_stat_read,
458}; 450};
@@ -559,7 +551,7 @@ static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
559 return mask; 551 return mask;
560} 552}
561 553
562static struct file_operations spufs_ibox_fops = { 554static const struct file_operations spufs_ibox_fops = {
563 .open = spufs_pipe_open, 555 .open = spufs_pipe_open,
564 .read = spufs_ibox_read, 556 .read = spufs_ibox_read,
565 .poll = spufs_ibox_poll, 557 .poll = spufs_ibox_poll,
@@ -585,7 +577,7 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
585 return 4; 577 return 4;
586} 578}
587 579
588static struct file_operations spufs_ibox_stat_fops = { 580static const struct file_operations spufs_ibox_stat_fops = {
589 .open = spufs_pipe_open, 581 .open = spufs_pipe_open,
590 .read = spufs_ibox_stat_read, 582 .read = spufs_ibox_stat_read,
591}; 583};
@@ -692,7 +684,7 @@ static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
692 return mask; 684 return mask;
693} 685}
694 686
695static struct file_operations spufs_wbox_fops = { 687static const struct file_operations spufs_wbox_fops = {
696 .open = spufs_pipe_open, 688 .open = spufs_pipe_open,
697 .write = spufs_wbox_write, 689 .write = spufs_wbox_write,
698 .poll = spufs_wbox_poll, 690 .poll = spufs_wbox_poll,
@@ -718,7 +710,7 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
718 return 4; 710 return 4;
719} 711}
720 712
721static struct file_operations spufs_wbox_stat_fops = { 713static const struct file_operations spufs_wbox_stat_fops = {
722 .open = spufs_pipe_open, 714 .open = spufs_pipe_open,
723 .read = spufs_wbox_stat_read, 715 .read = spufs_wbox_stat_read,
724}; 716};
@@ -728,8 +720,8 @@ static int spufs_signal1_open(struct inode *inode, struct file *file)
728 struct spufs_inode_info *i = SPUFS_I(inode); 720 struct spufs_inode_info *i = SPUFS_I(inode);
729 struct spu_context *ctx = i->i_ctx; 721 struct spu_context *ctx = i->i_ctx;
730 file->private_data = ctx; 722 file->private_data = ctx;
731 file->f_mapping = inode->i_mapping;
732 ctx->signal1 = inode->i_mapping; 723 ctx->signal1 = inode->i_mapping;
724 smp_wmb();
733 return nonseekable_open(inode, file); 725 return nonseekable_open(inode, file);
734} 726}
735 727
@@ -791,23 +783,23 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
791 return 4; 783 return 4;
792} 784}
793 785
794static struct page *spufs_signal1_mmap_nopage(struct vm_area_struct *vma, 786static unsigned long spufs_signal1_mmap_nopfn(struct vm_area_struct *vma,
795 unsigned long address, int *type) 787 unsigned long address)
796{ 788{
797#if PAGE_SIZE == 0x1000 789#if PAGE_SIZE == 0x1000
798 return spufs_ps_nopage(vma, address, type, 0x14000, 0x1000); 790 return spufs_ps_nopfn(vma, address, 0x14000, 0x1000);
799#elif PAGE_SIZE == 0x10000 791#elif PAGE_SIZE == 0x10000
800 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 792 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
801 * signal 1 and 2 area 793 * signal 1 and 2 area
802 */ 794 */
803 return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000); 795 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
804#else 796#else
805#error unsupported page size 797#error unsupported page size
806#endif 798#endif
807} 799}
808 800
809static struct vm_operations_struct spufs_signal1_mmap_vmops = { 801static struct vm_operations_struct spufs_signal1_mmap_vmops = {
810 .nopage = spufs_signal1_mmap_nopage, 802 .nopfn = spufs_signal1_mmap_nopfn,
811}; 803};
812 804
813static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma) 805static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
@@ -815,7 +807,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
815 if (!(vma->vm_flags & VM_SHARED)) 807 if (!(vma->vm_flags & VM_SHARED))
816 return -EINVAL; 808 return -EINVAL;
817 809
818 vma->vm_flags |= VM_IO; 810 vma->vm_flags |= VM_IO | VM_PFNMAP;
819 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 811 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
820 | _PAGE_NO_CACHE | _PAGE_GUARDED); 812 | _PAGE_NO_CACHE | _PAGE_GUARDED);
821 813
@@ -823,7 +815,7 @@ static int spufs_signal1_mmap(struct file *file, struct vm_area_struct *vma)
823 return 0; 815 return 0;
824} 816}
825 817
826static struct file_operations spufs_signal1_fops = { 818static const struct file_operations spufs_signal1_fops = {
827 .open = spufs_signal1_open, 819 .open = spufs_signal1_open,
828 .read = spufs_signal1_read, 820 .read = spufs_signal1_read,
829 .write = spufs_signal1_write, 821 .write = spufs_signal1_write,
@@ -835,8 +827,8 @@ static int spufs_signal2_open(struct inode *inode, struct file *file)
835 struct spufs_inode_info *i = SPUFS_I(inode); 827 struct spufs_inode_info *i = SPUFS_I(inode);
836 struct spu_context *ctx = i->i_ctx; 828 struct spu_context *ctx = i->i_ctx;
837 file->private_data = ctx; 829 file->private_data = ctx;
838 file->f_mapping = inode->i_mapping;
839 ctx->signal2 = inode->i_mapping; 830 ctx->signal2 = inode->i_mapping;
831 smp_wmb();
840 return nonseekable_open(inode, file); 832 return nonseekable_open(inode, file);
841} 833}
842 834
@@ -899,23 +891,23 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
899} 891}
900 892
901#if SPUFS_MMAP_4K 893#if SPUFS_MMAP_4K
902static struct page *spufs_signal2_mmap_nopage(struct vm_area_struct *vma, 894static unsigned long spufs_signal2_mmap_nopfn(struct vm_area_struct *vma,
903 unsigned long address, int *type) 895 unsigned long address)
904{ 896{
905#if PAGE_SIZE == 0x1000 897#if PAGE_SIZE == 0x1000
906 return spufs_ps_nopage(vma, address, type, 0x1c000, 0x1000); 898 return spufs_ps_nopfn(vma, address, 0x1c000, 0x1000);
907#elif PAGE_SIZE == 0x10000 899#elif PAGE_SIZE == 0x10000
908 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole 900 /* For 64k pages, both signal1 and signal2 can be used to mmap the whole
909 * signal 1 and 2 area 901 * signal 1 and 2 area
910 */ 902 */
911 return spufs_ps_nopage(vma, address, type, 0x10000, 0x10000); 903 return spufs_ps_nopfn(vma, address, 0x10000, 0x10000);
912#else 904#else
913#error unsupported page size 905#error unsupported page size
914#endif 906#endif
915} 907}
916 908
917static struct vm_operations_struct spufs_signal2_mmap_vmops = { 909static struct vm_operations_struct spufs_signal2_mmap_vmops = {
918 .nopage = spufs_signal2_mmap_nopage, 910 .nopfn = spufs_signal2_mmap_nopfn,
919}; 911};
920 912
921static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma) 913static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
@@ -923,7 +915,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
923 if (!(vma->vm_flags & VM_SHARED)) 915 if (!(vma->vm_flags & VM_SHARED))
924 return -EINVAL; 916 return -EINVAL;
925 917
926 vma->vm_flags |= VM_IO; 918 vma->vm_flags |= VM_IO | VM_PFNMAP;
927 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 919 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
928 | _PAGE_NO_CACHE | _PAGE_GUARDED); 920 | _PAGE_NO_CACHE | _PAGE_GUARDED);
929 921
@@ -934,7 +926,7 @@ static int spufs_signal2_mmap(struct file *file, struct vm_area_struct *vma)
934#define spufs_signal2_mmap NULL 926#define spufs_signal2_mmap NULL
935#endif /* !SPUFS_MMAP_4K */ 927#endif /* !SPUFS_MMAP_4K */
936 928
937static struct file_operations spufs_signal2_fops = { 929static const struct file_operations spufs_signal2_fops = {
938 .open = spufs_signal2_open, 930 .open = spufs_signal2_open,
939 .read = spufs_signal2_read, 931 .read = spufs_signal2_read,
940 .write = spufs_signal2_write, 932 .write = spufs_signal2_write,
@@ -1000,14 +992,14 @@ DEFINE_SIMPLE_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
1000 spufs_signal2_type_set, "%llu"); 992 spufs_signal2_type_set, "%llu");
1001 993
1002#if SPUFS_MMAP_4K 994#if SPUFS_MMAP_4K
1003static struct page *spufs_mss_mmap_nopage(struct vm_area_struct *vma, 995static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma,
1004 unsigned long address, int *type) 996 unsigned long address)
1005{ 997{
1006 return spufs_ps_nopage(vma, address, type, 0x0000, 0x1000); 998 return spufs_ps_nopfn(vma, address, 0x0000, 0x1000);
1007} 999}
1008 1000
1009static struct vm_operations_struct spufs_mss_mmap_vmops = { 1001static struct vm_operations_struct spufs_mss_mmap_vmops = {
1010 .nopage = spufs_mss_mmap_nopage, 1002 .nopfn = spufs_mss_mmap_nopfn,
1011}; 1003};
1012 1004
1013/* 1005/*
@@ -1018,7 +1010,7 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
1018 if (!(vma->vm_flags & VM_SHARED)) 1010 if (!(vma->vm_flags & VM_SHARED))
1019 return -EINVAL; 1011 return -EINVAL;
1020 1012
1021 vma->vm_flags |= VM_IO; 1013 vma->vm_flags |= VM_IO | VM_PFNMAP;
1022 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1014 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1023 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1015 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1024 1016
@@ -1032,24 +1024,27 @@ static int spufs_mss_mmap(struct file *file, struct vm_area_struct *vma)
1032static int spufs_mss_open(struct inode *inode, struct file *file) 1024static int spufs_mss_open(struct inode *inode, struct file *file)
1033{ 1025{
1034 struct spufs_inode_info *i = SPUFS_I(inode); 1026 struct spufs_inode_info *i = SPUFS_I(inode);
1027 struct spu_context *ctx = i->i_ctx;
1035 1028
1036 file->private_data = i->i_ctx; 1029 file->private_data = i->i_ctx;
1030 ctx->mss = inode->i_mapping;
1031 smp_wmb();
1037 return nonseekable_open(inode, file); 1032 return nonseekable_open(inode, file);
1038} 1033}
1039 1034
1040static struct file_operations spufs_mss_fops = { 1035static const struct file_operations spufs_mss_fops = {
1041 .open = spufs_mss_open, 1036 .open = spufs_mss_open,
1042 .mmap = spufs_mss_mmap, 1037 .mmap = spufs_mss_mmap,
1043}; 1038};
1044 1039
1045static struct page *spufs_psmap_mmap_nopage(struct vm_area_struct *vma, 1040static unsigned long spufs_psmap_mmap_nopfn(struct vm_area_struct *vma,
1046 unsigned long address, int *type) 1041 unsigned long address)
1047{ 1042{
1048 return spufs_ps_nopage(vma, address, type, 0x0000, 0x20000); 1043 return spufs_ps_nopfn(vma, address, 0x0000, 0x20000);
1049} 1044}
1050 1045
1051static struct vm_operations_struct spufs_psmap_mmap_vmops = { 1046static struct vm_operations_struct spufs_psmap_mmap_vmops = {
1052 .nopage = spufs_psmap_mmap_nopage, 1047 .nopfn = spufs_psmap_mmap_nopfn,
1053}; 1048};
1054 1049
1055/* 1050/*
@@ -1060,7 +1055,7 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
1060 if (!(vma->vm_flags & VM_SHARED)) 1055 if (!(vma->vm_flags & VM_SHARED))
1061 return -EINVAL; 1056 return -EINVAL;
1062 1057
1063 vma->vm_flags |= VM_IO; 1058 vma->vm_flags |= VM_IO | VM_PFNMAP;
1064 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1059 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1065 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1060 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1066 1061
@@ -1071,26 +1066,29 @@ static int spufs_psmap_mmap(struct file *file, struct vm_area_struct *vma)
1071static int spufs_psmap_open(struct inode *inode, struct file *file) 1066static int spufs_psmap_open(struct inode *inode, struct file *file)
1072{ 1067{
1073 struct spufs_inode_info *i = SPUFS_I(inode); 1068 struct spufs_inode_info *i = SPUFS_I(inode);
1069 struct spu_context *ctx = i->i_ctx;
1074 1070
1075 file->private_data = i->i_ctx; 1071 file->private_data = i->i_ctx;
1072 ctx->psmap = inode->i_mapping;
1073 smp_wmb();
1076 return nonseekable_open(inode, file); 1074 return nonseekable_open(inode, file);
1077} 1075}
1078 1076
1079static struct file_operations spufs_psmap_fops = { 1077static const struct file_operations spufs_psmap_fops = {
1080 .open = spufs_psmap_open, 1078 .open = spufs_psmap_open,
1081 .mmap = spufs_psmap_mmap, 1079 .mmap = spufs_psmap_mmap,
1082}; 1080};
1083 1081
1084 1082
1085#if SPUFS_MMAP_4K 1083#if SPUFS_MMAP_4K
1086static struct page *spufs_mfc_mmap_nopage(struct vm_area_struct *vma, 1084static unsigned long spufs_mfc_mmap_nopfn(struct vm_area_struct *vma,
1087 unsigned long address, int *type) 1085 unsigned long address)
1088{ 1086{
1089 return spufs_ps_nopage(vma, address, type, 0x3000, 0x1000); 1087 return spufs_ps_nopfn(vma, address, 0x3000, 0x1000);
1090} 1088}
1091 1089
1092static struct vm_operations_struct spufs_mfc_mmap_vmops = { 1090static struct vm_operations_struct spufs_mfc_mmap_vmops = {
1093 .nopage = spufs_mfc_mmap_nopage, 1091 .nopfn = spufs_mfc_mmap_nopfn,
1094}; 1092};
1095 1093
1096/* 1094/*
@@ -1101,7 +1099,7 @@ static int spufs_mfc_mmap(struct file *file, struct vm_area_struct *vma)
1101 if (!(vma->vm_flags & VM_SHARED)) 1099 if (!(vma->vm_flags & VM_SHARED))
1102 return -EINVAL; 1100 return -EINVAL;
1103 1101
1104 vma->vm_flags |= VM_IO; 1102 vma->vm_flags |= VM_IO | VM_PFNMAP;
1105 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 1103 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
1106 | _PAGE_NO_CACHE | _PAGE_GUARDED); 1104 | _PAGE_NO_CACHE | _PAGE_GUARDED);
1107 1105
@@ -1125,6 +1123,8 @@ static int spufs_mfc_open(struct inode *inode, struct file *file)
1125 return -EBUSY; 1123 return -EBUSY;
1126 1124
1127 file->private_data = ctx; 1125 file->private_data = ctx;
1126 ctx->mfc = inode->i_mapping;
1127 smp_wmb();
1128 return nonseekable_open(inode, file); 1128 return nonseekable_open(inode, file);
1129} 1129}
1130 1130
@@ -1309,7 +1309,7 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
1309 if (ret) 1309 if (ret)
1310 goto out; 1310 goto out;
1311 1311
1312 spu_acquire_runnable(ctx); 1312 spu_acquire_runnable(ctx, 0);
1313 if (file->f_flags & O_NONBLOCK) { 1313 if (file->f_flags & O_NONBLOCK) {
1314 ret = ctx->ops->send_mfc_command(ctx, &cmd); 1314 ret = ctx->ops->send_mfc_command(ctx, &cmd);
1315 } else { 1315 } else {
@@ -1393,7 +1393,7 @@ static int spufs_mfc_fasync(int fd, struct file *file, int on)
1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync); 1393 return fasync_helper(fd, file, on, &ctx->mfc_fasync);
1394} 1394}
1395 1395
1396static struct file_operations spufs_mfc_fops = { 1396static const struct file_operations spufs_mfc_fops = {
1397 .open = spufs_mfc_open, 1397 .open = spufs_mfc_open,
1398 .read = spufs_mfc_read, 1398 .read = spufs_mfc_read,
1399 .write = spufs_mfc_write, 1399 .write = spufs_mfc_write,
@@ -1650,7 +1650,7 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
1650 return ret; 1650 return ret;
1651} 1651}
1652 1652
1653static struct file_operations spufs_mbox_info_fops = { 1653static const struct file_operations spufs_mbox_info_fops = {
1654 .open = spufs_info_open, 1654 .open = spufs_info_open,
1655 .read = spufs_mbox_info_read, 1655 .read = spufs_mbox_info_read,
1656 .llseek = generic_file_llseek, 1656 .llseek = generic_file_llseek,
@@ -1688,7 +1688,7 @@ static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
1688 return ret; 1688 return ret;
1689} 1689}
1690 1690
1691static struct file_operations spufs_ibox_info_fops = { 1691static const struct file_operations spufs_ibox_info_fops = {
1692 .open = spufs_info_open, 1692 .open = spufs_info_open,
1693 .read = spufs_ibox_info_read, 1693 .read = spufs_ibox_info_read,
1694 .llseek = generic_file_llseek, 1694 .llseek = generic_file_llseek,
@@ -1729,7 +1729,7 @@ static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf,
1729 return ret; 1729 return ret;
1730} 1730}
1731 1731
1732static struct file_operations spufs_wbox_info_fops = { 1732static const struct file_operations spufs_wbox_info_fops = {
1733 .open = spufs_info_open, 1733 .open = spufs_info_open,
1734 .read = spufs_wbox_info_read, 1734 .read = spufs_wbox_info_read,
1735 .llseek = generic_file_llseek, 1735 .llseek = generic_file_llseek,
@@ -1779,7 +1779,7 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
1779 return ret; 1779 return ret;
1780} 1780}
1781 1781
1782static struct file_operations spufs_dma_info_fops = { 1782static const struct file_operations spufs_dma_info_fops = {
1783 .open = spufs_info_open, 1783 .open = spufs_info_open,
1784 .read = spufs_dma_info_read, 1784 .read = spufs_dma_info_read,
1785}; 1785};
@@ -1830,7 +1830,7 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
1830 return ret; 1830 return ret;
1831} 1831}
1832 1832
1833static struct file_operations spufs_proxydma_info_fops = { 1833static const struct file_operations spufs_proxydma_info_fops = {
1834 .open = spufs_info_open, 1834 .open = spufs_info_open,
1835 .read = spufs_proxydma_info_read, 1835 .read = spufs_proxydma_info_read,
1836}; 1836};
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 738b9244382f..8079983ef94f 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -220,11 +220,11 @@ static int spufs_dir_close(struct inode *inode, struct file *file)
220 return dcache_dir_close(inode, file); 220 return dcache_dir_close(inode, file);
221} 221}
222 222
223struct inode_operations spufs_dir_inode_operations = { 223const struct inode_operations spufs_dir_inode_operations = {
224 .lookup = simple_lookup, 224 .lookup = simple_lookup,
225}; 225};
226 226
227struct file_operations spufs_context_fops = { 227const struct file_operations spufs_context_fops = {
228 .open = dcache_dir_open, 228 .open = dcache_dir_open,
229 .release = spufs_dir_close, 229 .release = spufs_dir_close,
230 .llseek = dcache_dir_lseek, 230 .llseek = dcache_dir_lseek,
@@ -372,7 +372,7 @@ static int spufs_gang_close(struct inode *inode, struct file *file)
372 return dcache_dir_close(inode, file); 372 return dcache_dir_close(inode, file);
373} 373}
374 374
375struct file_operations spufs_gang_fops = { 375const struct file_operations spufs_gang_fops = {
376 .open = dcache_dir_open, 376 .open = dcache_dir_open,
377 .release = spufs_gang_close, 377 .release = spufs_gang_close,
378 .llseek = dcache_dir_lseek, 378 .llseek = dcache_dir_lseek,
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 1acc2ffef8c8..353a8fa07ab8 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -133,7 +133,7 @@ out_drop_priv:
133 spu_mfc_sr1_set(ctx->spu, sr1); 133 spu_mfc_sr1_set(ctx->spu, sr1);
134 134
135out_unlock: 135out_unlock:
136 spu_release_exclusive(ctx); 136 spu_release(ctx);
137out: 137out:
138 return ret; 138 return ret;
139} 139}
@@ -143,7 +143,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
143 int ret; 143 int ret;
144 unsigned long runcntl = SPU_RUNCNTL_RUNNABLE; 144 unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
145 145
146 ret = spu_acquire_runnable(ctx); 146 ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
147 if (ret) 147 if (ret)
148 return ret; 148 return ret;
149 149
@@ -155,7 +155,7 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
155 spu_release(ctx); 155 spu_release(ctx);
156 ret = spu_setup_isolated(ctx); 156 ret = spu_setup_isolated(ctx);
157 if (!ret) 157 if (!ret)
158 ret = spu_acquire_runnable(ctx); 158 ret = spu_acquire_runnable(ctx, SPU_ACTIVATE_NOWAKE);
159 } 159 }
160 160
161 /* if userspace has set the runcntrl register (eg, to issue an 161 /* if userspace has set the runcntrl register (eg, to issue an
@@ -164,8 +164,10 @@ static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
164 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE); 164 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
165 if (runcntl == 0) 165 if (runcntl == 0)
166 runcntl = SPU_RUNCNTL_RUNNABLE; 166 runcntl = SPU_RUNCNTL_RUNNABLE;
167 } else 167 } else {
168 spu_start_tick(ctx);
168 ctx->ops->npc_write(ctx, *npc); 169 ctx->ops->npc_write(ctx, *npc);
170 }
169 171
170 ctx->ops->runcntl_write(ctx, runcntl); 172 ctx->ops->runcntl_write(ctx, runcntl);
171 return ret; 173 return ret;
@@ -176,6 +178,7 @@ static inline int spu_run_fini(struct spu_context *ctx, u32 * npc,
176{ 178{
177 int ret = 0; 179 int ret = 0;
178 180
181 spu_stop_tick(ctx);
179 *status = ctx->ops->status_read(ctx); 182 *status = ctx->ops->status_read(ctx);
180 *npc = ctx->ops->npc_read(ctx); 183 *npc = ctx->ops->npc_read(ctx);
181 spu_release(ctx); 184 spu_release(ctx);
@@ -329,8 +332,10 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx,
329 } 332 }
330 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 333 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
331 ret = spu_reacquire_runnable(ctx, npc, &status); 334 ret = spu_reacquire_runnable(ctx, npc, &status);
332 if (ret) 335 if (ret) {
336 spu_stop_tick(ctx);
333 goto out2; 337 goto out2;
338 }
334 continue; 339 continue;
335 } 340 }
336 ret = spu_process_events(ctx); 341 ret = spu_process_events(ctx);
@@ -361,4 +366,3 @@ out:
361 up(&ctx->run_sema); 366 up(&ctx->run_sema);
362 return ret; 367 return ret;
363} 368}
364
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index bd6fe4b7a84b..2f25e68b4bac 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -44,17 +44,18 @@
44#include <asm/spu_priv1.h> 44#include <asm/spu_priv1.h>
45#include "spufs.h" 45#include "spufs.h"
46 46
47#define SPU_MIN_TIMESLICE (100 * HZ / 1000) 47#define SPU_TIMESLICE (HZ)
48 48
49#define SPU_BITMAP_SIZE (((MAX_PRIO+BITS_PER_LONG)/BITS_PER_LONG)+1)
50struct spu_prio_array { 49struct spu_prio_array {
51 unsigned long bitmap[SPU_BITMAP_SIZE]; 50 DECLARE_BITMAP(bitmap, MAX_PRIO);
52 wait_queue_head_t waitq[MAX_PRIO]; 51 struct list_head runq[MAX_PRIO];
52 spinlock_t runq_lock;
53 struct list_head active_list[MAX_NUMNODES]; 53 struct list_head active_list[MAX_NUMNODES];
54 struct mutex active_mutex[MAX_NUMNODES]; 54 struct mutex active_mutex[MAX_NUMNODES];
55}; 55};
56 56
57static struct spu_prio_array *spu_prio; 57static struct spu_prio_array *spu_prio;
58static struct workqueue_struct *spu_sched_wq;
58 59
59static inline int node_allowed(int node) 60static inline int node_allowed(int node)
60{ 61{
@@ -68,6 +69,64 @@ static inline int node_allowed(int node)
68 return 1; 69 return 1;
69} 70}
70 71
72void spu_start_tick(struct spu_context *ctx)
73{
74 if (ctx->policy == SCHED_RR)
75 queue_delayed_work(spu_sched_wq, &ctx->sched_work, SPU_TIMESLICE);
76}
77
78void spu_stop_tick(struct spu_context *ctx)
79{
80 if (ctx->policy == SCHED_RR)
81 cancel_delayed_work(&ctx->sched_work);
82}
83
84void spu_sched_tick(struct work_struct *work)
85{
86 struct spu_context *ctx =
87 container_of(work, struct spu_context, sched_work.work);
88 struct spu *spu;
89 int rearm = 1;
90
91 mutex_lock(&ctx->state_mutex);
92 spu = ctx->spu;
93 if (spu) {
94 int best = sched_find_first_bit(spu_prio->bitmap);
95 if (best <= ctx->prio) {
96 spu_deactivate(ctx);
97 rearm = 0;
98 }
99 }
100 mutex_unlock(&ctx->state_mutex);
101
102 if (rearm)
103 spu_start_tick(ctx);
104}
105
106/**
107 * spu_add_to_active_list - add spu to active list
108 * @spu: spu to add to the active list
109 */
110static void spu_add_to_active_list(struct spu *spu)
111{
112 mutex_lock(&spu_prio->active_mutex[spu->node]);
113 list_add_tail(&spu->list, &spu_prio->active_list[spu->node]);
114 mutex_unlock(&spu_prio->active_mutex[spu->node]);
115}
116
117/**
118 * spu_remove_from_active_list - remove spu from active list
119 * @spu: spu to remove from the active list
120 */
121static void spu_remove_from_active_list(struct spu *spu)
122{
123 int node = spu->node;
124
125 mutex_lock(&spu_prio->active_mutex[node]);
126 list_del_init(&spu->list);
127 mutex_unlock(&spu_prio->active_mutex[node]);
128}
129
71static inline void mm_needs_global_tlbie(struct mm_struct *mm) 130static inline void mm_needs_global_tlbie(struct mm_struct *mm)
72{ 131{
73 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1; 132 int nr = (NR_CPUS > 1) ? NR_CPUS : NR_CPUS + 1;
@@ -94,8 +153,12 @@ int spu_switch_event_unregister(struct notifier_block * n)
94 return blocking_notifier_chain_unregister(&spu_switch_notifier, n); 153 return blocking_notifier_chain_unregister(&spu_switch_notifier, n);
95} 154}
96 155
97 156/**
98static inline void bind_context(struct spu *spu, struct spu_context *ctx) 157 * spu_bind_context - bind spu context to physical spu
158 * @spu: physical spu to bind to
159 * @ctx: context to bind
160 */
161static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
99{ 162{
100 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid, 163 pr_debug("%s: pid=%d SPU=%d NODE=%d\n", __FUNCTION__, current->pid,
101 spu->number, spu->node); 164 spu->number, spu->node);
@@ -104,7 +167,6 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
104 ctx->spu = spu; 167 ctx->spu = spu;
105 ctx->ops = &spu_hw_ops; 168 ctx->ops = &spu_hw_ops;
106 spu->pid = current->pid; 169 spu->pid = current->pid;
107 spu->prio = current->prio;
108 spu->mm = ctx->owner; 170 spu->mm = ctx->owner;
109 mm_needs_global_tlbie(spu->mm); 171 mm_needs_global_tlbie(spu->mm);
110 spu->ibox_callback = spufs_ibox_callback; 172 spu->ibox_callback = spufs_ibox_callback;
@@ -118,12 +180,21 @@ static inline void bind_context(struct spu *spu, struct spu_context *ctx)
118 spu->timestamp = jiffies; 180 spu->timestamp = jiffies;
119 spu_cpu_affinity_set(spu, raw_smp_processor_id()); 181 spu_cpu_affinity_set(spu, raw_smp_processor_id());
120 spu_switch_notify(spu, ctx); 182 spu_switch_notify(spu, ctx);
183 spu_add_to_active_list(spu);
184 ctx->state = SPU_STATE_RUNNABLE;
121} 185}
122 186
123static inline void unbind_context(struct spu *spu, struct spu_context *ctx) 187/**
188 * spu_unbind_context - unbind spu context from physical spu
189 * @spu: physical spu to unbind from
190 * @ctx: context to unbind
191 */
192static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
124{ 193{
125 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__, 194 pr_debug("%s: unbind pid=%d SPU=%d NODE=%d\n", __FUNCTION__,
126 spu->pid, spu->number, spu->node); 195 spu->pid, spu->number, spu->node);
196
197 spu_remove_from_active_list(spu);
127 spu_switch_notify(spu, NULL); 198 spu_switch_notify(spu, NULL);
128 spu_unmap_mappings(ctx); 199 spu_unmap_mappings(ctx);
129 spu_save(&ctx->csa, spu); 200 spu_save(&ctx->csa, spu);
@@ -136,95 +207,98 @@ static inline void unbind_context(struct spu *spu, struct spu_context *ctx)
136 spu->dma_callback = NULL; 207 spu->dma_callback = NULL;
137 spu->mm = NULL; 208 spu->mm = NULL;
138 spu->pid = 0; 209 spu->pid = 0;
139 spu->prio = MAX_PRIO;
140 ctx->ops = &spu_backing_ops; 210 ctx->ops = &spu_backing_ops;
141 ctx->spu = NULL; 211 ctx->spu = NULL;
142 spu->flags = 0; 212 spu->flags = 0;
143 spu->ctx = NULL; 213 spu->ctx = NULL;
144} 214}
145 215
146static inline void spu_add_wq(wait_queue_head_t * wq, wait_queue_t * wait, 216/**
147 int prio) 217 * spu_add_to_rq - add a context to the runqueue
218 * @ctx: context to add
219 */
220static void spu_add_to_rq(struct spu_context *ctx)
148{ 221{
149 prepare_to_wait_exclusive(wq, wait, TASK_INTERRUPTIBLE); 222 spin_lock(&spu_prio->runq_lock);
150 set_bit(prio, spu_prio->bitmap); 223 list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
224 set_bit(ctx->prio, spu_prio->bitmap);
225 spin_unlock(&spu_prio->runq_lock);
151} 226}
152 227
153static inline void spu_del_wq(wait_queue_head_t * wq, wait_queue_t * wait, 228/**
154 int prio) 229 * spu_del_from_rq - remove a context from the runqueue
230 * @ctx: context to remove
231 */
232static void spu_del_from_rq(struct spu_context *ctx)
155{ 233{
156 u64 flags; 234 spin_lock(&spu_prio->runq_lock);
157 235 list_del_init(&ctx->rq);
158 __set_current_state(TASK_RUNNING); 236 if (list_empty(&spu_prio->runq[ctx->prio]))
159 237 clear_bit(ctx->prio, spu_prio->bitmap);
160 spin_lock_irqsave(&wq->lock, flags); 238 spin_unlock(&spu_prio->runq_lock);
239}
161 240
162 remove_wait_queue_locked(wq, wait); 241/**
163 if (list_empty(&wq->task_list)) 242 * spu_grab_context - remove one context from the runqueue
164 clear_bit(prio, spu_prio->bitmap); 243 * @prio: priority of the context to be removed
244 *
245 * This function removes one context from the runqueue for priority @prio.
246 * If there is more than one context with the given priority the first
247 * task on the runqueue will be taken.
248 *
249 * Returns the spu_context it just removed.
250 *
251 * Must be called with spu_prio->runq_lock held.
252 */
253static struct spu_context *spu_grab_context(int prio)
254{
255 struct list_head *rq = &spu_prio->runq[prio];
165 256
166 spin_unlock_irqrestore(&wq->lock, flags); 257 if (list_empty(rq))
258 return NULL;
259 return list_entry(rq->next, struct spu_context, rq);
167} 260}
168 261
169static void spu_prio_wait(struct spu_context *ctx, u64 flags) 262static void spu_prio_wait(struct spu_context *ctx)
170{ 263{
171 int prio = current->prio;
172 wait_queue_head_t *wq = &spu_prio->waitq[prio];
173 DEFINE_WAIT(wait); 264 DEFINE_WAIT(wait);
174 265
175 if (ctx->spu) 266 set_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
176 return; 267 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
177
178 spu_add_wq(wq, &wait, prio);
179
180 if (!signal_pending(current)) { 268 if (!signal_pending(current)) {
181 up_write(&ctx->state_sema); 269 mutex_unlock(&ctx->state_mutex);
182 pr_debug("%s: pid=%d prio=%d\n", __FUNCTION__,
183 current->pid, current->prio);
184 schedule(); 270 schedule();
185 down_write(&ctx->state_sema); 271 mutex_lock(&ctx->state_mutex);
186 } 272 }
187 273 __set_current_state(TASK_RUNNING);
188 spu_del_wq(wq, &wait, prio); 274 remove_wait_queue(&ctx->stop_wq, &wait);
275 clear_bit(SPU_SCHED_WAKE, &ctx->sched_flags);
189} 276}
190 277
191static void spu_prio_wakeup(void) 278/**
279 * spu_reschedule - try to find a runnable context for a spu
280 * @spu: spu available
281 *
282 * This function is called whenever a spu becomes idle. It looks for the
283 * most suitable runnable spu context and schedules it for execution.
284 */
285static void spu_reschedule(struct spu *spu)
192{ 286{
193 int best = sched_find_first_bit(spu_prio->bitmap); 287 int best;
194 if (best < MAX_PRIO) {
195 wait_queue_head_t *wq = &spu_prio->waitq[best];
196 wake_up_interruptible_nr(wq, 1);
197 }
198}
199 288
200static int get_active_spu(struct spu *spu) 289 spu_free(spu);
201{
202 int node = spu->node;
203 struct spu *tmp;
204 int rc = 0;
205 290
206 mutex_lock(&spu_prio->active_mutex[node]); 291 spin_lock(&spu_prio->runq_lock);
207 list_for_each_entry(tmp, &spu_prio->active_list[node], list) { 292 best = sched_find_first_bit(spu_prio->bitmap);
208 if (tmp == spu) { 293 if (best < MAX_PRIO) {
209 list_del_init(&spu->list); 294 struct spu_context *ctx = spu_grab_context(best);
210 rc = 1; 295 if (ctx && test_bit(SPU_SCHED_WAKE, &ctx->sched_flags))
211 break; 296 wake_up(&ctx->stop_wq);
212 }
213 } 297 }
214 mutex_unlock(&spu_prio->active_mutex[node]); 298 spin_unlock(&spu_prio->runq_lock);
215 return rc;
216}
217
218static void put_active_spu(struct spu *spu)
219{
220 int node = spu->node;
221
222 mutex_lock(&spu_prio->active_mutex[node]);
223 list_add_tail(&spu->list, &spu_prio->active_list[node]);
224 mutex_unlock(&spu_prio->active_mutex[node]);
225} 299}
226 300
227static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags) 301static struct spu *spu_get_idle(struct spu_context *ctx)
228{ 302{
229 struct spu *spu = NULL; 303 struct spu *spu = NULL;
230 int node = cpu_to_node(raw_smp_processor_id()); 304 int node = cpu_to_node(raw_smp_processor_id());
@@ -241,87 +315,154 @@ static struct spu *spu_get_idle(struct spu_context *ctx, u64 flags)
241 return spu; 315 return spu;
242} 316}
243 317
244static inline struct spu *spu_get(struct spu_context *ctx, u64 flags) 318/**
319 * find_victim - find a lower priority context to preempt
320 * @ctx: canidate context for running
321 *
322 * Returns the freed physical spu to run the new context on.
323 */
324static struct spu *find_victim(struct spu_context *ctx)
245{ 325{
246 /* Future: spu_get_idle() if possible, 326 struct spu_context *victim = NULL;
247 * otherwise try to preempt an active 327 struct spu *spu;
248 * context. 328 int node, n;
329
330 /*
331 * Look for a possible preemption candidate on the local node first.
332 * If there is no candidate look at the other nodes. This isn't
333 * exactly fair, but so far the whole spu schedule tries to keep
334 * a strong node affinity. We might want to fine-tune this in
335 * the future.
249 */ 336 */
250 return spu_get_idle(ctx, flags); 337 restart:
338 node = cpu_to_node(raw_smp_processor_id());
339 for (n = 0; n < MAX_NUMNODES; n++, node++) {
340 node = (node < MAX_NUMNODES) ? node : 0;
341 if (!node_allowed(node))
342 continue;
343
344 mutex_lock(&spu_prio->active_mutex[node]);
345 list_for_each_entry(spu, &spu_prio->active_list[node], list) {
346 struct spu_context *tmp = spu->ctx;
347
348 if (tmp->rt_priority < ctx->rt_priority &&
349 (!victim || tmp->rt_priority < victim->rt_priority))
350 victim = spu->ctx;
351 }
352 mutex_unlock(&spu_prio->active_mutex[node]);
353
354 if (victim) {
355 /*
356 * This nests ctx->state_mutex, but we always lock
357 * higher priority contexts before lower priority
358 * ones, so this is safe until we introduce
359 * priority inheritance schemes.
360 */
361 if (!mutex_trylock(&victim->state_mutex)) {
362 victim = NULL;
363 goto restart;
364 }
365
366 spu = victim->spu;
367 if (!spu) {
368 /*
369 * This race can happen because we've dropped
370 * the active list mutex. No a problem, just
371 * restart the search.
372 */
373 mutex_unlock(&victim->state_mutex);
374 victim = NULL;
375 goto restart;
376 }
377 spu_unbind_context(spu, victim);
378 mutex_unlock(&victim->state_mutex);
379 return spu;
380 }
381 }
382
383 return NULL;
251} 384}
252 385
253/* The three externally callable interfaces 386/**
254 * for the scheduler begin here. 387 * spu_activate - find a free spu for a context and execute it
388 * @ctx: spu context to schedule
389 * @flags: flags (currently ignored)
255 * 390 *
256 * spu_activate - bind a context to SPU, waiting as needed. 391 * Tries to find a free spu to run @ctx. If no free spu is availble
257 * spu_deactivate - unbind a context from its SPU. 392 * add the context to the runqueue so it gets woken up once an spu
258 * spu_yield - yield an SPU if others are waiting. 393 * is available.
259 */ 394 */
260 395int spu_activate(struct spu_context *ctx, unsigned long flags)
261int spu_activate(struct spu_context *ctx, u64 flags)
262{ 396{
263 struct spu *spu;
264 int ret = 0;
265 397
266 for (;;) { 398 if (ctx->spu)
267 if (ctx->spu) 399 return 0;
400
401 do {
402 struct spu *spu;
403
404 spu = spu_get_idle(ctx);
405 /*
406 * If this is a realtime thread we try to get it running by
407 * preempting a lower priority thread.
408 */
409 if (!spu && ctx->rt_priority)
410 spu = find_victim(ctx);
411 if (spu) {
412 spu_bind_context(spu, ctx);
268 return 0; 413 return 0;
269 spu = spu_get(ctx, flags);
270 if (spu != NULL) {
271 if (ctx->spu != NULL) {
272 spu_free(spu);
273 spu_prio_wakeup();
274 break;
275 }
276 bind_context(spu, ctx);
277 put_active_spu(spu);
278 break;
279 } 414 }
280 spu_prio_wait(ctx, flags); 415
281 if (signal_pending(current)) { 416 spu_add_to_rq(ctx);
282 ret = -ERESTARTSYS; 417 if (!(flags & SPU_ACTIVATE_NOWAKE))
283 spu_prio_wakeup(); 418 spu_prio_wait(ctx);
284 break; 419 spu_del_from_rq(ctx);
285 } 420 } while (!signal_pending(current));
286 } 421
287 return ret; 422 return -ERESTARTSYS;
288} 423}
289 424
425/**
426 * spu_deactivate - unbind a context from it's physical spu
427 * @ctx: spu context to unbind
428 *
429 * Unbind @ctx from the physical spu it is running on and schedule
430 * the highest priority context to run on the freed physical spu.
431 */
290void spu_deactivate(struct spu_context *ctx) 432void spu_deactivate(struct spu_context *ctx)
291{ 433{
292 struct spu *spu; 434 struct spu *spu = ctx->spu;
293 int needs_idle;
294 435
295 spu = ctx->spu; 436 if (spu) {
296 if (!spu) 437 spu_unbind_context(spu, ctx);
297 return; 438 spu_reschedule(spu);
298 needs_idle = get_active_spu(spu);
299 unbind_context(spu, ctx);
300 if (needs_idle) {
301 spu_free(spu);
302 spu_prio_wakeup();
303 } 439 }
304} 440}
305 441
442/**
443 * spu_yield - yield a physical spu if others are waiting
444 * @ctx: spu context to yield
445 *
446 * Check if there is a higher priority context waiting and if yes
447 * unbind @ctx from the physical spu and schedule the highest
448 * priority context to run on the freed physical spu instead.
449 */
306void spu_yield(struct spu_context *ctx) 450void spu_yield(struct spu_context *ctx)
307{ 451{
308 struct spu *spu; 452 struct spu *spu;
309 int need_yield = 0; 453 int need_yield = 0;
310 454
311 if (down_write_trylock(&ctx->state_sema)) { 455 if (mutex_trylock(&ctx->state_mutex)) {
312 if ((spu = ctx->spu) != NULL) { 456 if ((spu = ctx->spu) != NULL) {
313 int best = sched_find_first_bit(spu_prio->bitmap); 457 int best = sched_find_first_bit(spu_prio->bitmap);
314 if (best < MAX_PRIO) { 458 if (best < MAX_PRIO) {
315 pr_debug("%s: yielding SPU %d NODE %d\n", 459 pr_debug("%s: yielding SPU %d NODE %d\n",
316 __FUNCTION__, spu->number, spu->node); 460 __FUNCTION__, spu->number, spu->node);
317 spu_deactivate(ctx); 461 spu_deactivate(ctx);
318 ctx->state = SPU_STATE_SAVED;
319 need_yield = 1; 462 need_yield = 1;
320 } else {
321 spu->prio = MAX_PRIO;
322 } 463 }
323 } 464 }
324 up_write(&ctx->state_sema); 465 mutex_unlock(&ctx->state_mutex);
325 } 466 }
326 if (unlikely(need_yield)) 467 if (unlikely(need_yield))
327 yield(); 468 yield();
@@ -331,14 +472,19 @@ int __init spu_sched_init(void)
331{ 472{
332 int i; 473 int i;
333 474
475 spu_sched_wq = create_singlethread_workqueue("spusched");
476 if (!spu_sched_wq)
477 return 1;
478
334 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL); 479 spu_prio = kzalloc(sizeof(struct spu_prio_array), GFP_KERNEL);
335 if (!spu_prio) { 480 if (!spu_prio) {
336 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n", 481 printk(KERN_WARNING "%s: Unable to allocate priority queue.\n",
337 __FUNCTION__); 482 __FUNCTION__);
483 destroy_workqueue(spu_sched_wq);
338 return 1; 484 return 1;
339 } 485 }
340 for (i = 0; i < MAX_PRIO; i++) { 486 for (i = 0; i < MAX_PRIO; i++) {
341 init_waitqueue_head(&spu_prio->waitq[i]); 487 INIT_LIST_HEAD(&spu_prio->runq[i]);
342 __clear_bit(i, spu_prio->bitmap); 488 __clear_bit(i, spu_prio->bitmap);
343 } 489 }
344 __set_bit(MAX_PRIO, spu_prio->bitmap); 490 __set_bit(MAX_PRIO, spu_prio->bitmap);
@@ -346,6 +492,7 @@ int __init spu_sched_init(void)
346 mutex_init(&spu_prio->active_mutex[i]); 492 mutex_init(&spu_prio->active_mutex[i]);
347 INIT_LIST_HEAD(&spu_prio->active_list[i]); 493 INIT_LIST_HEAD(&spu_prio->active_list[i]);
348 } 494 }
495 spin_lock_init(&spu_prio->runq_lock);
349 return 0; 496 return 0;
350} 497}
351 498
@@ -364,4 +511,5 @@ void __exit spu_sched_exit(void)
364 mutex_unlock(&spu_prio->active_mutex[node]); 511 mutex_unlock(&spu_prio->active_mutex[node]);
365 } 512 }
366 kfree(spu_prio); 513 kfree(spu_prio);
514 destroy_workqueue(spu_sched_wq);
367} 515}
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index 70fb13395c04..0c437891dfd5 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -23,7 +23,7 @@
23#define SPUFS_H 23#define SPUFS_H
24 24
25#include <linux/kref.h> 25#include <linux/kref.h>
26#include <linux/rwsem.h> 26#include <linux/mutex.h>
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/fs.h> 28#include <linux/fs.h>
29 29
@@ -37,11 +37,13 @@ enum {
37}; 37};
38 38
39struct spu_context_ops; 39struct spu_context_ops;
40
41#define SPU_CONTEXT_PREEMPT 0UL
42
43struct spu_gang; 40struct spu_gang;
44 41
42/* ctx->sched_flags */
43enum {
44 SPU_SCHED_WAKE = 0,
45};
46
45struct spu_context { 47struct spu_context {
46 struct spu *spu; /* pointer to a physical SPU */ 48 struct spu *spu; /* pointer to a physical SPU */
47 struct spu_state csa; /* SPU context save area. */ 49 struct spu_state csa; /* SPU context save area. */
@@ -51,10 +53,12 @@ struct spu_context {
51 struct address_space *cntl; /* 'control' area mappings. */ 53 struct address_space *cntl; /* 'control' area mappings. */
52 struct address_space *signal1; /* 'signal1' area mappings. */ 54 struct address_space *signal1; /* 'signal1' area mappings. */
53 struct address_space *signal2; /* 'signal2' area mappings. */ 55 struct address_space *signal2; /* 'signal2' area mappings. */
56 struct address_space *mss; /* 'mss' area mappings. */
57 struct address_space *psmap; /* 'psmap' area mappings. */
54 u64 object_id; /* user space pointer for oprofile */ 58 u64 object_id; /* user space pointer for oprofile */
55 59
56 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state; 60 enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
57 struct rw_semaphore state_sema; 61 struct mutex state_mutex;
58 struct semaphore run_sema; 62 struct semaphore run_sema;
59 63
60 struct mm_struct *owner; 64 struct mm_struct *owner;
@@ -75,6 +79,14 @@ struct spu_context {
75 79
76 struct list_head gang_list; 80 struct list_head gang_list;
77 struct spu_gang *gang; 81 struct spu_gang *gang;
82
83 /* scheduler fields */
84 struct list_head rq;
85 struct delayed_work sched_work;
86 unsigned long sched_flags;
87 unsigned long rt_priority;
88 int policy;
89 int prio;
78}; 90};
79 91
80struct spu_gang { 92struct spu_gang {
@@ -149,7 +161,7 @@ long spufs_run_spu(struct file *file,
149 struct spu_context *ctx, u32 *npc, u32 *status); 161 struct spu_context *ctx, u32 *npc, u32 *status);
150long spufs_create(struct nameidata *nd, 162long spufs_create(struct nameidata *nd,
151 unsigned int flags, mode_t mode); 163 unsigned int flags, mode_t mode);
152extern struct file_operations spufs_context_fops; 164extern const struct file_operations spufs_context_fops;
153 165
154/* gang management */ 166/* gang management */
155struct spu_gang *alloc_spu_gang(void); 167struct spu_gang *alloc_spu_gang(void);
@@ -159,6 +171,16 @@ void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx);
159void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx); 171void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
160 172
161/* context management */ 173/* context management */
174static inline void spu_acquire(struct spu_context *ctx)
175{
176 mutex_lock(&ctx->state_mutex);
177}
178
179static inline void spu_release(struct spu_context *ctx)
180{
181 mutex_unlock(&ctx->state_mutex);
182}
183
162struct spu_context * alloc_spu_context(struct spu_gang *gang); 184struct spu_context * alloc_spu_context(struct spu_gang *gang);
163void destroy_spu_context(struct kref *kref); 185void destroy_spu_context(struct kref *kref);
164struct spu_context * get_spu_context(struct spu_context *ctx); 186struct spu_context * get_spu_context(struct spu_context *ctx);
@@ -166,20 +188,18 @@ int put_spu_context(struct spu_context *ctx);
166void spu_unmap_mappings(struct spu_context *ctx); 188void spu_unmap_mappings(struct spu_context *ctx);
167 189
168void spu_forget(struct spu_context *ctx); 190void spu_forget(struct spu_context *ctx);
169void spu_acquire(struct spu_context *ctx); 191int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags);
170void spu_release(struct spu_context *ctx);
171int spu_acquire_runnable(struct spu_context *ctx);
172void spu_acquire_saved(struct spu_context *ctx); 192void spu_acquire_saved(struct spu_context *ctx);
173int spu_acquire_exclusive(struct spu_context *ctx); 193int spu_acquire_exclusive(struct spu_context *ctx);
174 194enum {
175static inline void spu_release_exclusive(struct spu_context *ctx) 195 SPU_ACTIVATE_NOWAKE = 1,
176{ 196};
177 up_write(&ctx->state_sema); 197int spu_activate(struct spu_context *ctx, unsigned long flags);
178}
179
180int spu_activate(struct spu_context *ctx, u64 flags);
181void spu_deactivate(struct spu_context *ctx); 198void spu_deactivate(struct spu_context *ctx);
182void spu_yield(struct spu_context *ctx); 199void spu_yield(struct spu_context *ctx);
200void spu_start_tick(struct spu_context *ctx);
201void spu_stop_tick(struct spu_context *ctx);
202void spu_sched_tick(struct work_struct *work);
183int __init spu_sched_init(void); 203int __init spu_sched_init(void);
184void __exit spu_sched_exit(void); 204void __exit spu_sched_exit(void);
185 205
diff --git a/arch/powerpc/platforms/celleb/Makefile b/arch/powerpc/platforms/celleb/Makefile
new file mode 100644
index 000000000000..f4f82520dc4f
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/Makefile
@@ -0,0 +1,8 @@
1obj-y += interrupt.o iommu.o setup.o \
2 htab.o beat.o pci.o \
3 scc_epci.o scc_uhc.o hvCall.o
4
5obj-$(CONFIG_SMP) += smp.o
6obj-$(CONFIG_PPC_UDBG_BEAT) += udbg_beat.o
7obj-$(CONFIG_HAS_TXX9_SERIAL) += scc_sio.o
8obj-$(CONFIG_SPU_BASE) += spu_priv1.o
diff --git a/arch/powerpc/platforms/celleb/beat.c b/arch/powerpc/platforms/celleb/beat.c
new file mode 100644
index 000000000000..99341ce8a697
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat.c
@@ -0,0 +1,163 @@
1/*
2 * Simple routines for Celleb/Beat
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/module.h>
22#include <linux/init.h>
23#include <linux/err.h>
24#include <linux/rtc.h>
25
26#include <asm/hvconsole.h>
27#include <asm/time.h>
28
29#include "beat_wrapper.h"
30#include "beat.h"
31
32void beat_restart(char *cmd)
33{
34 beat_shutdown_logical_partition(1);
35}
36
37void beat_power_off(void)
38{
39 beat_shutdown_logical_partition(0);
40}
41
42u64 beat_halt_code = 0x1000000000000000UL;
43
44void beat_halt(void)
45{
46 beat_shutdown_logical_partition(beat_halt_code);
47}
48
49int beat_set_rtc_time(struct rtc_time *rtc_time)
50{
51 u64 tim;
52 tim = mktime(rtc_time->tm_year+1900,
53 rtc_time->tm_mon+1, rtc_time->tm_mday,
54 rtc_time->tm_hour, rtc_time->tm_min, rtc_time->tm_sec);
55 if (beat_rtc_write(tim))
56 return -1;
57 return 0;
58}
59
60void beat_get_rtc_time(struct rtc_time *rtc_time)
61{
62 u64 tim;
63
64 if (beat_rtc_read(&tim))
65 tim = 0;
66 to_tm(tim, rtc_time);
67 rtc_time->tm_year -= 1900;
68 rtc_time->tm_mon -= 1;
69}
70
71#define BEAT_NVRAM_SIZE 4096
72
73ssize_t beat_nvram_read(char *buf, size_t count, loff_t *index)
74{
75 unsigned int i;
76 unsigned long len;
77 char *p = buf;
78
79 if (*index >= BEAT_NVRAM_SIZE)
80 return -ENODEV;
81 i = *index;
82 if (i + count > BEAT_NVRAM_SIZE)
83 count = BEAT_NVRAM_SIZE - i;
84
85 for (; count != 0; count -= len) {
86 len = count;
87 if (len > BEAT_NVRW_CNT)
88 len = BEAT_NVRW_CNT;
89 if (beat_eeprom_read(i, len, p)) {
90 return -EIO;
91 }
92
93 p += len;
94 i += len;
95 }
96 *index = i;
97 return p - buf;
98}
99
100ssize_t beat_nvram_write(char *buf, size_t count, loff_t *index)
101{
102 unsigned int i;
103 unsigned long len;
104 char *p = buf;
105
106 if (*index >= BEAT_NVRAM_SIZE)
107 return -ENODEV;
108 i = *index;
109 if (i + count > BEAT_NVRAM_SIZE)
110 count = BEAT_NVRAM_SIZE - i;
111
112 for (; count != 0; count -= len) {
113 len = count;
114 if (len > BEAT_NVRW_CNT)
115 len = BEAT_NVRW_CNT;
116 if (beat_eeprom_write(i, len, p)) {
117 return -EIO;
118 }
119
120 p += len;
121 i += len;
122 }
123 *index = i;
124 return p - buf;
125}
126
127ssize_t beat_nvram_get_size(void)
128{
129 return BEAT_NVRAM_SIZE;
130}
131
132int beat_set_xdabr(unsigned long dabr)
133{
134 if (beat_set_dabr(dabr, DABRX_KERNEL | DABRX_USER))
135 return -1;
136 return 0;
137}
138
139int64_t beat_get_term_char(u64 vterm, u64 *len, u64 *t1, u64 *t2)
140{
141 u64 db[2];
142 s64 ret;
143
144 ret = beat_get_characters_from_console(vterm, len, (u8*)db);
145 if (ret == 0) {
146 *t1 = db[0];
147 *t2 = db[1];
148 }
149 return ret;
150}
151
152int64_t beat_put_term_char(u64 vterm, u64 len, u64 t1, u64 t2)
153{
154 u64 db[2];
155
156 db[0] = t1;
157 db[1] = t2;
158 return beat_put_characters_to_console(vterm, len, (u8*)db);
159}
160
161EXPORT_SYMBOL(beat_get_term_char);
162EXPORT_SYMBOL(beat_put_term_char);
163EXPORT_SYMBOL(beat_halt_code);
diff --git a/arch/powerpc/platforms/celleb/beat.h b/arch/powerpc/platforms/celleb/beat.h
new file mode 100644
index 000000000000..2b16bf3bee89
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat.h
@@ -0,0 +1,40 @@
1/*
2 * Guest OS Interfaces.
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_BEAT_H
22#define _CELLEB_BEAT_H
23
24#define DABRX_KERNEL (1UL<<1)
25#define DABRX_USER (1UL<<0)
26
27int64_t beat_get_term_char(uint64_t,uint64_t*,uint64_t*,uint64_t*);
28int64_t beat_put_term_char(uint64_t,uint64_t,uint64_t,uint64_t);
29int64_t beat_repository_encode(int, const char *, uint64_t[4]);
30void beat_restart(char *);
31void beat_power_off(void);
32void beat_halt(void);
33int beat_set_rtc_time(struct rtc_time *);
34void beat_get_rtc_time(struct rtc_time *);
35ssize_t beat_nvram_get_size(void);
36ssize_t beat_nvram_read(char *, size_t, loff_t *);
37ssize_t beat_nvram_write(char *, size_t, loff_t *);
38int beat_set_xdabr(unsigned long);
39
40#endif /* _CELLEB_BEAT_H */
diff --git a/arch/powerpc/platforms/celleb/beat_syscall.h b/arch/powerpc/platforms/celleb/beat_syscall.h
new file mode 100644
index 000000000000..14e16974773f
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat_syscall.h
@@ -0,0 +1,160 @@
1/*
2 * Beat hypervisor call numbers
3 *
4 * (C) Copyright 2004-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef BEAT_BEAT_syscall_H
22#define BEAT_BEAT_syscall_H
23
24#ifdef __ASSEMBLY__
25#define __BEAT_ADD_VENDOR_ID(__x, __v) ((__v)<<60|(__x))
26#else
27#define __BEAT_ADD_VENDOR_ID(__x, __v) ((u64)(__v)<<60|(__x))
28#endif
29#define HV_allocate_memory __BEAT_ADD_VENDOR_ID(0, 0)
30#define HV_construct_virtual_address_space __BEAT_ADD_VENDOR_ID(2, 0)
31#define HV_destruct_virtual_address_space __BEAT_ADD_VENDOR_ID(10, 0)
32#define HV_get_virtual_address_space_id_of_ppe __BEAT_ADD_VENDOR_ID(4, 0)
33#define HV_query_logical_partition_address_region_info \
34 __BEAT_ADD_VENDOR_ID(6, 0)
35#define HV_release_memory __BEAT_ADD_VENDOR_ID(13, 0)
36#define HV_select_virtual_address_space __BEAT_ADD_VENDOR_ID(7, 0)
37#define HV_load_range_registers __BEAT_ADD_VENDOR_ID(68, 0)
38#define HV_set_ppe_l2cache_rmt_entry __BEAT_ADD_VENDOR_ID(70, 0)
39#define HV_set_ppe_tlb_rmt_entry __BEAT_ADD_VENDOR_ID(71, 0)
40#define HV_set_spe_tlb_rmt_entry __BEAT_ADD_VENDOR_ID(72, 0)
41#define HV_get_io_address_translation_fault_info __BEAT_ADD_VENDOR_ID(14, 0)
42#define HV_get_iopte __BEAT_ADD_VENDOR_ID(16, 0)
43#define HV_preload_iopt_cache __BEAT_ADD_VENDOR_ID(17, 0)
44#define HV_put_iopte __BEAT_ADD_VENDOR_ID(15, 0)
45#define HV_connect_event_ports __BEAT_ADD_VENDOR_ID(21, 0)
46#define HV_construct_event_receive_port __BEAT_ADD_VENDOR_ID(18, 0)
47#define HV_destruct_event_receive_port __BEAT_ADD_VENDOR_ID(19, 0)
48#define HV_destruct_event_send_port __BEAT_ADD_VENDOR_ID(22, 0)
49#define HV_get_state_of_event_send_port __BEAT_ADD_VENDOR_ID(25, 0)
50#define HV_request_to_connect_event_ports __BEAT_ADD_VENDOR_ID(20, 0)
51#define HV_send_event_externally __BEAT_ADD_VENDOR_ID(23, 0)
52#define HV_send_event_locally __BEAT_ADD_VENDOR_ID(24, 0)
53#define HV_construct_and_connect_irq_plug __BEAT_ADD_VENDOR_ID(28, 0)
54#define HV_destruct_irq_plug __BEAT_ADD_VENDOR_ID(29, 0)
55#define HV_detect_pending_interrupts __BEAT_ADD_VENDOR_ID(26, 0)
56#define HV_end_of_interrupt __BEAT_ADD_VENDOR_ID(27, 0)
57#define HV_assign_control_signal_notification_port __BEAT_ADD_VENDOR_ID(45, 0)
58#define HV_end_of_control_signal_processing __BEAT_ADD_VENDOR_ID(48, 0)
59#define HV_get_control_signal __BEAT_ADD_VENDOR_ID(46, 0)
60#define HV_set_irq_mask_for_spe __BEAT_ADD_VENDOR_ID(61, 0)
61#define HV_shutdown_logical_partition __BEAT_ADD_VENDOR_ID(44, 0)
62#define HV_connect_message_ports __BEAT_ADD_VENDOR_ID(35, 0)
63#define HV_destruct_message_port __BEAT_ADD_VENDOR_ID(36, 0)
64#define HV_receive_message __BEAT_ADD_VENDOR_ID(37, 0)
65#define HV_get_message_port_info __BEAT_ADD_VENDOR_ID(34, 0)
66#define HV_request_to_connect_message_ports __BEAT_ADD_VENDOR_ID(33, 0)
67#define HV_send_message __BEAT_ADD_VENDOR_ID(32, 0)
68#define HV_get_logical_ppe_id __BEAT_ADD_VENDOR_ID(69, 0)
69#define HV_pause __BEAT_ADD_VENDOR_ID(9, 0)
70#define HV_destruct_shared_memory_handle __BEAT_ADD_VENDOR_ID(51, 0)
71#define HV_get_shared_memory_info __BEAT_ADD_VENDOR_ID(52, 0)
72#define HV_permit_sharing_memory __BEAT_ADD_VENDOR_ID(50, 0)
73#define HV_request_to_attach_shared_memory __BEAT_ADD_VENDOR_ID(49, 0)
74#define HV_enable_logical_spe_execution __BEAT_ADD_VENDOR_ID(55, 0)
75#define HV_construct_logical_spe __BEAT_ADD_VENDOR_ID(53, 0)
76#define HV_disable_logical_spe_execution __BEAT_ADD_VENDOR_ID(56, 0)
77#define HV_destruct_logical_spe __BEAT_ADD_VENDOR_ID(54, 0)
78#define HV_sense_spe_execution_status __BEAT_ADD_VENDOR_ID(58, 0)
79#define HV_insert_htab_entry __BEAT_ADD_VENDOR_ID(101, 0)
80#define HV_read_htab_entries __BEAT_ADD_VENDOR_ID(95, 0)
81#define HV_write_htab_entry __BEAT_ADD_VENDOR_ID(94, 0)
82#define HV_assign_io_address_translation_fault_port \
83 __BEAT_ADD_VENDOR_ID(100, 0)
84#define HV_set_interrupt_mask __BEAT_ADD_VENDOR_ID(73, 0)
85#define HV_get_logical_partition_id __BEAT_ADD_VENDOR_ID(74, 0)
86#define HV_create_repository_node2 __BEAT_ADD_VENDOR_ID(90, 0)
87#define HV_create_repository_node __BEAT_ADD_VENDOR_ID(90, 0) /* alias */
88#define HV_get_repository_node_value2 __BEAT_ADD_VENDOR_ID(91, 0)
89#define HV_get_repository_node_value __BEAT_ADD_VENDOR_ID(91, 0) /* alias */
90#define HV_modify_repository_node_value2 __BEAT_ADD_VENDOR_ID(92, 0)
91#define HV_modify_repository_node_value __BEAT_ADD_VENDOR_ID(92, 0) /* alias */
92#define HV_remove_repository_node2 __BEAT_ADD_VENDOR_ID(93, 0)
93#define HV_remove_repository_node __BEAT_ADD_VENDOR_ID(93, 0) /* alias */
94#define HV_cancel_shared_memory __BEAT_ADD_VENDOR_ID(104, 0)
95#define HV_clear_interrupt_status_of_spe __BEAT_ADD_VENDOR_ID(206, 0)
96#define HV_construct_spe_irq_outlet __BEAT_ADD_VENDOR_ID(80, 0)
97#define HV_destruct_spe_irq_outlet __BEAT_ADD_VENDOR_ID(81, 0)
98#define HV_disconnect_ipspc_service __BEAT_ADD_VENDOR_ID(88, 0)
99#define HV_execute_ipspc_command __BEAT_ADD_VENDOR_ID(86, 0)
100#define HV_get_interrupt_status_of_spe __BEAT_ADD_VENDOR_ID(205, 0)
101#define HV_get_spe_privileged_state_1_registers __BEAT_ADD_VENDOR_ID(208, 0)
102#define HV_permit_use_of_ipspc_service __BEAT_ADD_VENDOR_ID(85, 0)
103#define HV_reinitialize_logical_spe __BEAT_ADD_VENDOR_ID(82, 0)
104#define HV_request_ipspc_service __BEAT_ADD_VENDOR_ID(84, 0)
105#define HV_stop_ipspc_command __BEAT_ADD_VENDOR_ID(87, 0)
106#define HV_set_spe_privileged_state_1_registers __BEAT_ADD_VENDOR_ID(204, 0)
107#define HV_get_status_of_ipspc_service __BEAT_ADD_VENDOR_ID(203, 0)
108#define HV_put_characters_to_console __BEAT_ADD_VENDOR_ID(0x101, 1)
109#define HV_get_characters_from_console __BEAT_ADD_VENDOR_ID(0x102, 1)
110#define HV_get_base_clock __BEAT_ADD_VENDOR_ID(0x111, 1)
111#define HV_set_base_clock __BEAT_ADD_VENDOR_ID(0x112, 1)
112#define HV_get_frame_cycle __BEAT_ADD_VENDOR_ID(0x114, 1)
113#define HV_disable_console __BEAT_ADD_VENDOR_ID(0x115, 1)
114#define HV_disable_all_console __BEAT_ADD_VENDOR_ID(0x116, 1)
115#define HV_oneshot_timer __BEAT_ADD_VENDOR_ID(0x117, 1)
116#define HV_set_dabr __BEAT_ADD_VENDOR_ID(0x118, 1)
117#define HV_get_dabr __BEAT_ADD_VENDOR_ID(0x119, 1)
118#define HV_start_hv_stats __BEAT_ADD_VENDOR_ID(0x21c, 1)
119#define HV_stop_hv_stats __BEAT_ADD_VENDOR_ID(0x21d, 1)
120#define HV_get_hv_stats __BEAT_ADD_VENDOR_ID(0x21e, 1)
121#define HV_get_hv_error_stats __BEAT_ADD_VENDOR_ID(0x221, 1)
122#define HV_get_stats __BEAT_ADD_VENDOR_ID(0x224, 1)
123#define HV_get_heap_stats __BEAT_ADD_VENDOR_ID(0x225, 1)
124#define HV_get_memory_stats __BEAT_ADD_VENDOR_ID(0x227, 1)
125#define HV_get_memory_detail __BEAT_ADD_VENDOR_ID(0x228, 1)
126#define HV_set_priority_of_irq_outlet __BEAT_ADD_VENDOR_ID(0x122, 1)
127#define HV_get_physical_spe_by_reservation_id __BEAT_ADD_VENDOR_ID(0x128, 1)
128#define HV_get_spe_context __BEAT_ADD_VENDOR_ID(0x129, 1)
129#define HV_set_spe_context __BEAT_ADD_VENDOR_ID(0x12a, 1)
130#define HV_downcount_of_interrupt __BEAT_ADD_VENDOR_ID(0x12e, 1)
131#define HV_peek_spe_context __BEAT_ADD_VENDOR_ID(0x12f, 1)
132#define HV_read_bpa_register __BEAT_ADD_VENDOR_ID(0x131, 1)
133#define HV_write_bpa_register __BEAT_ADD_VENDOR_ID(0x132, 1)
134#define HV_map_context_table_of_spe __BEAT_ADD_VENDOR_ID(0x137, 1)
135#define HV_get_slb_for_logical_spe __BEAT_ADD_VENDOR_ID(0x138, 1)
136#define HV_set_slb_for_logical_spe __BEAT_ADD_VENDOR_ID(0x139, 1)
137#define HV_init_pm __BEAT_ADD_VENDOR_ID(0x150, 1)
138#define HV_set_pm_signal __BEAT_ADD_VENDOR_ID(0x151, 1)
139#define HV_get_pm_signal __BEAT_ADD_VENDOR_ID(0x152, 1)
140#define HV_set_pm_config __BEAT_ADD_VENDOR_ID(0x153, 1)
141#define HV_get_pm_config __BEAT_ADD_VENDOR_ID(0x154, 1)
142#define HV_get_inner_trace_data __BEAT_ADD_VENDOR_ID(0x155, 1)
143#define HV_set_ext_trace_buffer __BEAT_ADD_VENDOR_ID(0x156, 1)
144#define HV_get_ext_trace_buffer __BEAT_ADD_VENDOR_ID(0x157, 1)
145#define HV_set_pm_interrupt __BEAT_ADD_VENDOR_ID(0x158, 1)
146#define HV_get_pm_interrupt __BEAT_ADD_VENDOR_ID(0x159, 1)
147#define HV_kick_pm __BEAT_ADD_VENDOR_ID(0x160, 1)
148#define HV_construct_pm_context __BEAT_ADD_VENDOR_ID(0x164, 1)
149#define HV_destruct_pm_context __BEAT_ADD_VENDOR_ID(0x165, 1)
150#define HV_be_slow __BEAT_ADD_VENDOR_ID(0x170, 1)
151#define HV_assign_ipspc_server_connection_status_notification_port \
152 __BEAT_ADD_VENDOR_ID(0x173, 1)
153#define HV_get_raid_of_physical_spe __BEAT_ADD_VENDOR_ID(0x174, 1)
154#define HV_set_physical_spe_to_rag __BEAT_ADD_VENDOR_ID(0x175, 1)
155#define HV_release_physical_spe_from_rag __BEAT_ADD_VENDOR_ID(0x176, 1)
156#define HV_rtc_read __BEAT_ADD_VENDOR_ID(0x190, 1)
157#define HV_rtc_write __BEAT_ADD_VENDOR_ID(0x191, 1)
158#define HV_eeprom_read __BEAT_ADD_VENDOR_ID(0x192, 1)
159#define HV_eeprom_write __BEAT_ADD_VENDOR_ID(0x193, 1)
160#endif
diff --git a/arch/powerpc/platforms/celleb/beat_wrapper.h b/arch/powerpc/platforms/celleb/beat_wrapper.h
new file mode 100644
index 000000000000..76ea0a6a9011
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/beat_wrapper.h
@@ -0,0 +1,220 @@
1/*
2 * Beat hypervisor call I/F
3 *
4 * (C) Copyright 2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/plpar_wrapper.h.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22#ifndef BEAT_HCALL
23#include "beat_syscall.h"
24
25/* defined in hvCall.S */
26extern s64 beat_hcall_norets(u64 opcode, ...);
27extern s64 beat_hcall_norets8(u64 opcode, u64 arg1, u64 arg2, u64 arg3,
28 u64 arg4, u64 arg5, u64 arg6, u64 arg7, u64 arg8);
29extern s64 beat_hcall1(u64 opcode, u64 retbuf[1], ...);
30extern s64 beat_hcall2(u64 opcode, u64 retbuf[2], ...);
31extern s64 beat_hcall3(u64 opcode, u64 retbuf[3], ...);
32extern s64 beat_hcall4(u64 opcode, u64 retbuf[4], ...);
33extern s64 beat_hcall5(u64 opcode, u64 retbuf[5], ...);
34extern s64 beat_hcall6(u64 opcode, u64 retbuf[6], ...);
35
36static inline s64 beat_downcount_of_interrupt(u64 plug_id)
37{
38 return beat_hcall_norets(HV_downcount_of_interrupt, plug_id);
39}
40
41static inline s64 beat_set_interrupt_mask(u64 index,
42 u64 val0, u64 val1, u64 val2, u64 val3)
43{
44 return beat_hcall_norets(HV_set_interrupt_mask, index,
45 val0, val1, val2, val3);
46}
47
48static inline s64 beat_destruct_irq_plug(u64 plug_id)
49{
50 return beat_hcall_norets(HV_destruct_irq_plug, plug_id);
51}
52
53static inline s64 beat_construct_and_connect_irq_plug(u64 plug_id,
54 u64 outlet_id)
55{
56 return beat_hcall_norets(HV_construct_and_connect_irq_plug, plug_id,
57 outlet_id);
58}
59
60static inline s64 beat_detect_pending_interrupts(u64 index, u64 *retbuf)
61{
62 return beat_hcall4(HV_detect_pending_interrupts, retbuf, index);
63}
64
65static inline s64 beat_pause(u64 style)
66{
67 return beat_hcall_norets(HV_pause, style);
68}
69
70static inline s64 beat_read_htab_entries(u64 htab_id, u64 index, u64 *retbuf)
71{
72 return beat_hcall5(HV_read_htab_entries, retbuf, htab_id, index);
73}
74
75static inline s64 beat_insert_htab_entry(u64 htab_id, u64 group,
76 u64 bitmask, u64 hpte_v, u64 hpte_r, u64 *slot)
77{
78 u64 dummy[3];
79 s64 ret;
80
81 ret = beat_hcall3(HV_insert_htab_entry, dummy, htab_id, group,
82 bitmask, hpte_v, hpte_r);
83 *slot = dummy[0];
84 return ret;
85}
86
87static inline s64 beat_write_htab_entry(u64 htab_id, u64 slot,
88 u64 hpte_v, u64 hpte_r, u64 mask_v, u64 mask_r,
89 u64 *ret_v, u64 *ret_r)
90{
91 u64 dummy[2];
92 s64 ret;
93
94 ret = beat_hcall2(HV_write_htab_entry, dummy, htab_id, slot,
95 hpte_v, hpte_r, mask_v, mask_r);
96 *ret_v = dummy[0];
97 *ret_r = dummy[1];
98 return ret;
99}
100
101static inline void beat_shutdown_logical_partition(u64 code)
102{
103 (void)beat_hcall_norets(HV_shutdown_logical_partition, code);
104}
105
106static inline s64 beat_rtc_write(u64 time_from_epoch)
107{
108 return beat_hcall_norets(HV_rtc_write, time_from_epoch);
109}
110
111static inline s64 beat_rtc_read(u64 *time_from_epoch)
112{
113 u64 dummy[1];
114 s64 ret;
115
116 ret = beat_hcall1(HV_rtc_read, dummy);
117 *time_from_epoch = dummy[0];
118 return ret;
119}
120
121#define BEAT_NVRW_CNT (sizeof(u64) * 6)
122
123static inline s64 beat_eeprom_write(u64 index, u64 length, u8 *buffer)
124{
125 u64 b[6];
126
127 if (length > BEAT_NVRW_CNT)
128 return -1;
129 memcpy(b, buffer, sizeof(b));
130 return beat_hcall_norets8(HV_eeprom_write, index, length,
131 b[0], b[1], b[2], b[3], b[4], b[5]);
132}
133
134static inline s64 beat_eeprom_read(u64 index, u64 length, u8 *buffer)
135{
136 u64 b[6];
137 s64 ret;
138
139 if (length > BEAT_NVRW_CNT)
140 return -1;
141 ret = beat_hcall6(HV_eeprom_read, b, index, length);
142 memcpy(buffer, b, length);
143 return ret;
144}
145
146static inline s64 beat_set_dabr(u64 value, u64 style)
147{
148 return beat_hcall_norets(HV_set_dabr, value, style);
149}
150
151static inline s64 beat_get_characters_from_console(u64 termno, u64 *len,
152 u8 *buffer)
153{
154 u64 dummy[3];
155 s64 ret;
156
157 ret = beat_hcall3(HV_get_characters_from_console, dummy, termno, len);
158 *len = dummy[0];
159 memcpy(buffer, dummy + 1, *len);
160 return ret;
161}
162
163static inline s64 beat_put_characters_to_console(u64 termno, u64 len,
164 u8 *buffer)
165{
166 u64 b[2];
167
168 memcpy(b, buffer, len);
169 return beat_hcall_norets(HV_put_characters_to_console, termno, len, b[0], b[1]);
170}
171
172static inline s64 beat_get_spe_privileged_state_1_registers(
173 u64 id, u64 offsetof, u64 *value)
174{
175 u64 dummy[1];
176 s64 ret;
177
178 ret = beat_hcall1(HV_get_spe_privileged_state_1_registers, dummy, id,
179 offsetof);
180 *value = dummy[0];
181 return ret;
182}
183
184static inline s64 beat_set_irq_mask_for_spe(u64 id, u64 class, u64 mask)
185{
186 return beat_hcall_norets(HV_set_irq_mask_for_spe, id, class, mask);
187}
188
189static inline s64 beat_clear_interrupt_status_of_spe(u64 id, u64 class,
190 u64 mask)
191{
192 return beat_hcall_norets(HV_clear_interrupt_status_of_spe,
193 id, class, mask);
194}
195
196static inline s64 beat_set_spe_privileged_state_1_registers(
197 u64 id, u64 offsetof, u64 value)
198{
199 return beat_hcall_norets(HV_set_spe_privileged_state_1_registers,
200 id, offsetof, value);
201}
202
203static inline s64 beat_get_interrupt_status_of_spe(u64 id, u64 class, u64 *val)
204{
205 u64 dummy[1];
206 s64 ret;
207
208 ret = beat_hcall1(HV_get_interrupt_status_of_spe, dummy, id, class);
209 *val = dummy[0];
210 return ret;
211}
212
213static inline s64 beat_put_iopte(u64 ioas_id, u64 io_addr, u64 real_addr,
214 u64 ioid, u64 flags)
215{
216 return beat_hcall_norets(HV_put_iopte, ioas_id, io_addr, real_addr,
217 ioid, flags);
218}
219
220#endif
diff --git a/arch/powerpc/platforms/celleb/htab.c b/arch/powerpc/platforms/celleb/htab.c
new file mode 100644
index 000000000000..279d7339e170
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/htab.c
@@ -0,0 +1,308 @@
1/*
2 * "Cell Reference Set" HTAB support.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/lpar.c:
7 * Copyright (C) 2001 Todd Inglett, IBM Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24#undef DEBUG_LOW
25
26#include <linux/kernel.h>
27#include <linux/spinlock.h>
28
29#include <asm/mmu.h>
30#include <asm/page.h>
31#include <asm/pgtable.h>
32#include <asm/machdep.h>
33#include <asm/udbg.h>
34
35#include "beat_wrapper.h"
36
37#ifdef DEBUG_LOW
38#define DBG_LOW(fmt...) do { udbg_printf(fmt); } while(0)
39#else
40#define DBG_LOW(fmt...) do { } while(0)
41#endif
42
43static DEFINE_SPINLOCK(beat_htab_lock);
44
45static inline unsigned int beat_read_mask(unsigned hpte_group)
46{
47 unsigned long hpte_v[5];
48 unsigned long rmask = 0;
49
50 beat_read_htab_entries(0, hpte_group + 0, hpte_v);
51 if (!(hpte_v[0] & HPTE_V_BOLTED))
52 rmask |= 0x8000;
53 if (!(hpte_v[1] & HPTE_V_BOLTED))
54 rmask |= 0x4000;
55 if (!(hpte_v[2] & HPTE_V_BOLTED))
56 rmask |= 0x2000;
57 if (!(hpte_v[3] & HPTE_V_BOLTED))
58 rmask |= 0x1000;
59 beat_read_htab_entries(0, hpte_group + 4, hpte_v);
60 if (!(hpte_v[0] & HPTE_V_BOLTED))
61 rmask |= 0x0800;
62 if (!(hpte_v[1] & HPTE_V_BOLTED))
63 rmask |= 0x0400;
64 if (!(hpte_v[2] & HPTE_V_BOLTED))
65 rmask |= 0x0200;
66 if (!(hpte_v[3] & HPTE_V_BOLTED))
67 rmask |= 0x0100;
68 hpte_group = ~hpte_group & (htab_hash_mask * HPTES_PER_GROUP);
69 beat_read_htab_entries(0, hpte_group + 0, hpte_v);
70 if (!(hpte_v[0] & HPTE_V_BOLTED))
71 rmask |= 0x80;
72 if (!(hpte_v[1] & HPTE_V_BOLTED))
73 rmask |= 0x40;
74 if (!(hpte_v[2] & HPTE_V_BOLTED))
75 rmask |= 0x20;
76 if (!(hpte_v[3] & HPTE_V_BOLTED))
77 rmask |= 0x10;
78 beat_read_htab_entries(0, hpte_group + 4, hpte_v);
79 if (!(hpte_v[0] & HPTE_V_BOLTED))
80 rmask |= 0x08;
81 if (!(hpte_v[1] & HPTE_V_BOLTED))
82 rmask |= 0x04;
83 if (!(hpte_v[2] & HPTE_V_BOLTED))
84 rmask |= 0x02;
85 if (!(hpte_v[3] & HPTE_V_BOLTED))
86 rmask |= 0x01;
87 return rmask;
88}
89
90static long beat_lpar_hpte_insert(unsigned long hpte_group,
91 unsigned long va, unsigned long pa,
92 unsigned long rflags, unsigned long vflags,
93 int psize)
94{
95 unsigned long lpar_rc;
96 unsigned long slot;
97 unsigned long hpte_v, hpte_r;
98
99 /* same as iseries */
100 if (vflags & HPTE_V_SECONDARY)
101 return -1;
102
103 if (!(vflags & HPTE_V_BOLTED))
104 DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, "
105 "rflags=%lx, vflags=%lx, psize=%d)\n",
106 hpte_group, va, pa, rflags, vflags, psize);
107
108 hpte_v = hpte_encode_v(va, psize) | vflags | HPTE_V_VALID;
109 hpte_r = hpte_encode_r(pa, psize) | rflags;
110
111 if (!(vflags & HPTE_V_BOLTED))
112 DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
113
114 if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
115 hpte_r &= ~_PAGE_COHERENT;
116
117 spin_lock(&beat_htab_lock);
118 if ((lpar_rc = beat_read_mask(hpte_group)) == 0) {
119 if (!(vflags & HPTE_V_BOLTED))
120 DBG_LOW(" full\n");
121 spin_unlock(&beat_htab_lock);
122 return -1;
123 }
124
125 lpar_rc = beat_insert_htab_entry(0, hpte_group, lpar_rc << 48,
126 hpte_v, hpte_r, &slot);
127 spin_unlock(&beat_htab_lock);
128
129 /*
130 * Since we try and ioremap PHBs we don't own, the pte insert
131 * will fail. However we must catch the failure in hash_page
132 * or we will loop forever, so return -2 in this case.
133 */
134 if (unlikely(lpar_rc != 0)) {
135 if (!(vflags & HPTE_V_BOLTED))
136 DBG_LOW(" lpar err %lx\n", lpar_rc);
137 return -2;
138 }
139 if (!(vflags & HPTE_V_BOLTED))
140 DBG_LOW(" -> slot: %lx\n", slot);
141
142 /* We have to pass down the secondary bucket bit here as well */
143 return (slot ^ hpte_group) & 15;
144}
145
146static long beat_lpar_hpte_remove(unsigned long hpte_group)
147{
148 DBG_LOW("hpte_remove(group=%lx)\n", hpte_group);
149 return -1;
150}
151
152static unsigned long beat_lpar_hpte_getword0(unsigned long slot)
153{
154 unsigned long dword0, dword[5];
155 unsigned long lpar_rc;
156
157 lpar_rc = beat_read_htab_entries(0, slot & ~3UL, dword);
158
159 dword0 = dword[slot&3];
160
161 BUG_ON(lpar_rc != 0);
162
163 return dword0;
164}
165
166static void beat_lpar_hptab_clear(void)
167{
168 unsigned long size_bytes = 1UL << ppc64_pft_size;
169 unsigned long hpte_count = size_bytes >> 4;
170 int i;
171 unsigned long dummy0, dummy1;
172
173 /* TODO: Use bulk call */
174 for (i = 0; i < hpte_count; i++)
175 beat_write_htab_entry(0, i, 0, 0, -1UL, -1UL, &dummy0, &dummy1);
176}
177
178/*
179 * NOTE: for updatepp ops we are fortunate that the linux "newpp" bits and
180 * the low 3 bits of flags happen to line up. So no transform is needed.
181 * We can probably optimize here and assume the high bits of newpp are
182 * already zero. For now I am paranoid.
183 */
184static long beat_lpar_hpte_updatepp(unsigned long slot,
185 unsigned long newpp,
186 unsigned long va,
187 int psize, int local)
188{
189 unsigned long lpar_rc;
190 unsigned long dummy0, dummy1, want_v;
191
192 want_v = hpte_encode_v(va, psize);
193
194 DBG_LOW(" update: "
195 "avpnv=%016lx, slot=%016lx, psize: %d, newpp %016lx ... ",
196 want_v & HPTE_V_AVPN, slot, psize, newpp);
197
198 spin_lock(&beat_htab_lock);
199 dummy0 = beat_lpar_hpte_getword0(slot);
200 if ((dummy0 & ~0x7FUL) != (want_v & ~0x7FUL)) {
201 DBG_LOW("not found !\n");
202 spin_unlock(&beat_htab_lock);
203 return -1;
204 }
205
206 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7, &dummy0,
207 &dummy1);
208 spin_unlock(&beat_htab_lock);
209 if (lpar_rc != 0 || dummy0 == 0) {
210 DBG_LOW("not found !\n");
211 return -1;
212 }
213
214 DBG_LOW("ok %lx %lx\n", dummy0, dummy1);
215
216 BUG_ON(lpar_rc != 0);
217
218 return 0;
219}
220
221static long beat_lpar_hpte_find(unsigned long va, int psize)
222{
223 unsigned long hash;
224 unsigned long i, j;
225 long slot;
226 unsigned long want_v, hpte_v;
227
228 hash = hpt_hash(va, mmu_psize_defs[psize].shift);
229 want_v = hpte_encode_v(va, psize);
230
231 for (j = 0; j < 2; j++) {
232 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
233 for (i = 0; i < HPTES_PER_GROUP; i++) {
234 hpte_v = beat_lpar_hpte_getword0(slot);
235
236 if (HPTE_V_COMPARE(hpte_v, want_v)
237 && (hpte_v & HPTE_V_VALID)
238 && (!!(hpte_v & HPTE_V_SECONDARY) == j)) {
239 /* HPTE matches */
240 if (j)
241 slot = -slot;
242 return slot;
243 }
244 ++slot;
245 }
246 hash = ~hash;
247 }
248
249 return -1;
250}
251
252static void beat_lpar_hpte_updateboltedpp(unsigned long newpp,
253 unsigned long ea,
254 int psize)
255{
256 unsigned long lpar_rc, slot, vsid, va, dummy0, dummy1;
257
258 vsid = get_kernel_vsid(ea);
259 va = (vsid << 28) | (ea & 0x0fffffff);
260
261 spin_lock(&beat_htab_lock);
262 slot = beat_lpar_hpte_find(va, psize);
263 BUG_ON(slot == -1);
264
265 lpar_rc = beat_write_htab_entry(0, slot, 0, newpp, 0, 7,
266 &dummy0, &dummy1);
267 spin_unlock(&beat_htab_lock);
268
269 BUG_ON(lpar_rc != 0);
270}
271
272static void beat_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
273 int psize, int local)
274{
275 unsigned long want_v;
276 unsigned long lpar_rc;
277 unsigned long dummy1, dummy2;
278 unsigned long flags;
279
280 DBG_LOW(" inval : slot=%lx, va=%016lx, psize: %d, local: %d\n",
281 slot, va, psize, local);
282 want_v = hpte_encode_v(va, psize);
283
284 spin_lock_irqsave(&beat_htab_lock, flags);
285 dummy1 = beat_lpar_hpte_getword0(slot);
286
287 if ((dummy1 & ~0x7FUL) != (want_v & ~0x7FUL)) {
288 DBG_LOW("not found !\n");
289 spin_unlock_irqrestore(&beat_htab_lock, flags);
290 return;
291 }
292
293 lpar_rc = beat_write_htab_entry(0, slot, 0, 0, HPTE_V_VALID, 0,
294 &dummy1, &dummy2);
295 spin_unlock_irqrestore(&beat_htab_lock, flags);
296
297 BUG_ON(lpar_rc != 0);
298}
299
300void __init hpte_init_beat(void)
301{
302 ppc_md.hpte_invalidate = beat_lpar_hpte_invalidate;
303 ppc_md.hpte_updatepp = beat_lpar_hpte_updatepp;
304 ppc_md.hpte_updateboltedpp = beat_lpar_hpte_updateboltedpp;
305 ppc_md.hpte_insert = beat_lpar_hpte_insert;
306 ppc_md.hpte_remove = beat_lpar_hpte_remove;
307 ppc_md.hpte_clear_all = beat_lpar_hptab_clear;
308}
diff --git a/arch/powerpc/platforms/celleb/hvCall.S b/arch/powerpc/platforms/celleb/hvCall.S
new file mode 100644
index 000000000000..74c817448948
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/hvCall.S
@@ -0,0 +1,287 @@
1/*
2 * Beat hypervisor call I/F
3 *
4 * (C) Copyright 2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/pseries/hvCall.S.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#include <asm/ppc_asm.h>
24
25#define STK_PARM(i) (48 + ((i)-3)*8)
26
27/* Not implemented on Beat, now */
28#define HCALL_INST_PRECALL
29#define HCALL_INST_POSTCALL
30
31 .text
32
33#define HVSC .long 0x44000022
34
35/* Note: takes only 7 input parameters at maximum */
36_GLOBAL(beat_hcall_norets)
37 HMT_MEDIUM
38
39 mfcr r0
40 stw r0,8(r1)
41
42 HCALL_INST_PRECALL
43
44 mr r11,r3
45 mr r3,r4
46 mr r4,r5
47 mr r5,r6
48 mr r6,r7
49 mr r7,r8
50 mr r8,r9
51
52 HVSC /* invoke the hypervisor */
53
54 HCALL_INST_POSTCALL
55
56 lwz r0,8(r1)
57 mtcrf 0xff,r0
58
59 blr /* return r3 = status */
60
61/* Note: takes 8 input parameters at maximum */
62_GLOBAL(beat_hcall_norets8)
63 HMT_MEDIUM
64
65 mfcr r0
66 stw r0,8(r1)
67
68 HCALL_INST_PRECALL
69
70 mr r11,r3
71 mr r3,r4
72 mr r4,r5
73 mr r5,r6
74 mr r6,r7
75 mr r7,r8
76 mr r8,r9
77 ld r10,STK_PARM(r10)(r1)
78
79 HVSC /* invoke the hypervisor */
80
81 HCALL_INST_POSTCALL
82
83 lwz r0,8(r1)
84 mtcrf 0xff,r0
85
86 blr /* return r3 = status */
87
88/* Note: takes only 6 input parameters, 1 output parameters at maximum */
89_GLOBAL(beat_hcall1)
90 HMT_MEDIUM
91
92 mfcr r0
93 stw r0,8(r1)
94
95 HCALL_INST_PRECALL
96
97 std r4,STK_PARM(r4)(r1) /* save ret buffer */
98
99 mr r11,r3
100 mr r3,r5
101 mr r4,r6
102 mr r5,r7
103 mr r6,r8
104 mr r7,r9
105 mr r8,r10
106
107 HVSC /* invoke the hypervisor */
108
109 HCALL_INST_POSTCALL
110
111 ld r12,STK_PARM(r4)(r1)
112 std r4, 0(r12)
113
114 lwz r0,8(r1)
115 mtcrf 0xff,r0
116
117 blr /* return r3 = status */
118
119/* Note: takes only 6 input parameters, 2 output parameters at maximum */
120_GLOBAL(beat_hcall2)
121 HMT_MEDIUM
122
123 mfcr r0
124 stw r0,8(r1)
125
126 HCALL_INST_PRECALL
127
128 std r4,STK_PARM(r4)(r1) /* save ret buffer */
129
130 mr r11,r3
131 mr r3,r5
132 mr r4,r6
133 mr r5,r7
134 mr r6,r8
135 mr r7,r9
136 mr r8,r10
137
138 HVSC /* invoke the hypervisor */
139
140 HCALL_INST_POSTCALL
141
142 ld r12,STK_PARM(r4)(r1)
143 std r4, 0(r12)
144 std r5, 8(r12)
145
146 lwz r0,8(r1)
147 mtcrf 0xff,r0
148
149 blr /* return r3 = status */
150
151/* Note: takes only 6 input parameters, 3 output parameters at maximum */
152_GLOBAL(beat_hcall3)
153 HMT_MEDIUM
154
155 mfcr r0
156 stw r0,8(r1)
157
158 HCALL_INST_PRECALL
159
160 std r4,STK_PARM(r4)(r1) /* save ret buffer */
161
162 mr r11,r3
163 mr r3,r5
164 mr r4,r6
165 mr r5,r7
166 mr r6,r8
167 mr r7,r9
168 mr r8,r10
169
170 HVSC /* invoke the hypervisor */
171
172 HCALL_INST_POSTCALL
173
174 ld r12,STK_PARM(r4)(r1)
175 std r4, 0(r12)
176 std r5, 8(r12)
177 std r6, 16(r12)
178
179 lwz r0,8(r1)
180 mtcrf 0xff,r0
181
182 blr /* return r3 = status */
183
184/* Note: takes only 6 input parameters, 4 output parameters at maximum */
185_GLOBAL(beat_hcall4)
186 HMT_MEDIUM
187
188 mfcr r0
189 stw r0,8(r1)
190
191 HCALL_INST_PRECALL
192
193 std r4,STK_PARM(r4)(r1) /* save ret buffer */
194
195 mr r11,r3
196 mr r3,r5
197 mr r4,r6
198 mr r5,r7
199 mr r6,r8
200 mr r7,r9
201 mr r8,r10
202
203 HVSC /* invoke the hypervisor */
204
205 HCALL_INST_POSTCALL
206
207 ld r12,STK_PARM(r4)(r1)
208 std r4, 0(r12)
209 std r5, 8(r12)
210 std r6, 16(r12)
211 std r7, 24(r12)
212
213 lwz r0,8(r1)
214 mtcrf 0xff,r0
215
216 blr /* return r3 = status */
217
218/* Note: takes only 6 input parameters, 5 output parameters at maximum */
219_GLOBAL(beat_hcall5)
220 HMT_MEDIUM
221
222 mfcr r0
223 stw r0,8(r1)
224
225 HCALL_INST_PRECALL
226
227 std r4,STK_PARM(r4)(r1) /* save ret buffer */
228
229 mr r11,r3
230 mr r3,r5
231 mr r4,r6
232 mr r5,r7
233 mr r6,r8
234 mr r7,r9
235 mr r8,r10
236
237 HVSC /* invoke the hypervisor */
238
239 HCALL_INST_POSTCALL
240
241 ld r12,STK_PARM(r4)(r1)
242 std r4, 0(r12)
243 std r5, 8(r12)
244 std r6, 16(r12)
245 std r7, 24(r12)
246 std r8, 32(r12)
247
248 lwz r0,8(r1)
249 mtcrf 0xff,r0
250
251 blr /* return r3 = status */
252
253/* Note: takes only 6 input parameters, 6 output parameters at maximum */
254_GLOBAL(beat_hcall6)
255 HMT_MEDIUM
256
257 mfcr r0
258 stw r0,8(r1)
259
260 HCALL_INST_PRECALL
261
262 std r4,STK_PARM(r4)(r1) /* save ret buffer */
263
264 mr r11,r3
265 mr r3,r5
266 mr r4,r6
267 mr r5,r7
268 mr r6,r8
269 mr r7,r9
270 mr r8,r10
271
272 HVSC /* invoke the hypervisor */
273
274 HCALL_INST_POSTCALL
275
276 ld r12,STK_PARM(r4)(r1)
277 std r4, 0(r12)
278 std r5, 8(r12)
279 std r6, 16(r12)
280 std r7, 24(r12)
281 std r8, 32(r12)
282 std r9, 40(r12)
283
284 lwz r0,8(r1)
285 mtcrf 0xff,r0
286
287 blr /* return r3 = status */
diff --git a/arch/powerpc/platforms/celleb/interrupt.c b/arch/powerpc/platforms/celleb/interrupt.c
new file mode 100644
index 000000000000..98e6665681d3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/interrupt.c
@@ -0,0 +1,274 @@
1/*
2 * Celleb/Beat Interrupt controller
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/irq.h>
24#include <linux/percpu.h>
25#include <linux/types.h>
26
27#include <asm/machdep.h>
28
29#include "interrupt.h"
30#include "beat_wrapper.h"
31
32#define MAX_IRQS NR_IRQS
33static DEFINE_SPINLOCK(beatic_irq_mask_lock);
34static uint64_t beatic_irq_mask_enable[(MAX_IRQS+255)/64];
35static uint64_t beatic_irq_mask_ack[(MAX_IRQS+255)/64];
36
37static struct irq_host *beatic_host = NULL;
38
39/*
40 * In this implementation, "virq" == "IRQ plug number",
41 * "(irq_hw_number_t)hwirq" == "IRQ outlet number".
42 */
43
44/* assumption: locked */
45static inline void beatic_update_irq_mask(unsigned int irq_plug)
46{
47 int off;
48 unsigned long masks[4];
49
50 off = (irq_plug / 256) * 4;
51 masks[0] = beatic_irq_mask_enable[off + 0]
52 & beatic_irq_mask_ack[off + 0];
53 masks[1] = beatic_irq_mask_enable[off + 1]
54 & beatic_irq_mask_ack[off + 1];
55 masks[2] = beatic_irq_mask_enable[off + 2]
56 & beatic_irq_mask_ack[off + 2];
57 masks[3] = beatic_irq_mask_enable[off + 3]
58 & beatic_irq_mask_ack[off + 3];
59 if (beat_set_interrupt_mask(irq_plug&~255UL,
60 masks[0], masks[1], masks[2], masks[3]) != 0)
61 panic("Failed to set mask IRQ!");
62}
63
64static void beatic_mask_irq(unsigned int irq_plug)
65{
66 unsigned long flags;
67
68 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
69 beatic_irq_mask_enable[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
70 beatic_update_irq_mask(irq_plug);
71 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
72}
73
74static void beatic_unmask_irq(unsigned int irq_plug)
75{
76 unsigned long flags;
77
78 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
79 beatic_irq_mask_enable[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
80 beatic_update_irq_mask(irq_plug);
81 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
82}
83
84static void beatic_ack_irq(unsigned int irq_plug)
85{
86 unsigned long flags;
87
88 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
89 beatic_irq_mask_ack[irq_plug/64] &= ~(1UL << (63 - (irq_plug%64)));
90 beatic_update_irq_mask(irq_plug);
91 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
92}
93
94static void beatic_end_irq(unsigned int irq_plug)
95{
96 s64 err;
97 unsigned long flags;
98
99 if ((err = beat_downcount_of_interrupt(irq_plug)) != 0) {
100 if ((err & 0xFFFFFFFF) != 0xFFFFFFF5) /* -11: wrong state */
101 panic("Failed to downcount IRQ! Error = %16lx", err);
102
103 printk(KERN_ERR "IRQ over-downcounted, plug %d\n", irq_plug);
104 }
105 spin_lock_irqsave(&beatic_irq_mask_lock, flags);
106 beatic_irq_mask_ack[irq_plug/64] |= 1UL << (63 - (irq_plug%64));
107 beatic_update_irq_mask(irq_plug);
108 spin_unlock_irqrestore(&beatic_irq_mask_lock, flags);
109}
110
111static struct irq_chip beatic_pic = {
112 .typename = " CELL-BEAT ",
113 .unmask = beatic_unmask_irq,
114 .mask = beatic_mask_irq,
115 .eoi = beatic_end_irq,
116};
117
118/*
119 * Dispose binding hardware IRQ number (hw) and Virtuql IRQ number (virq),
120 * update flags.
121 *
122 * Note that the number (virq) is already assigned at upper layer.
123 */
124static void beatic_pic_host_unmap(struct irq_host *h, unsigned int virq)
125{
126 beat_destruct_irq_plug(virq);
127}
128
129/*
130 * Create or update binding hardware IRQ number (hw) and Virtuql
131 * IRQ number (virq). This is called only once for a given mapping.
132 *
133 * Note that the number (virq) is already assigned at upper layer.
134 */
135static int beatic_pic_host_map(struct irq_host *h, unsigned int virq,
136 irq_hw_number_t hw)
137{
138 struct irq_desc *desc = get_irq_desc(virq);
139 int64_t err;
140
141 if ((err = beat_construct_and_connect_irq_plug(virq, hw)) < 0)
142 return -EIO;
143
144 desc->status |= IRQ_LEVEL;
145 set_irq_chip_and_handler(virq, &beatic_pic, handle_fasteoi_irq);
146 return 0;
147}
148
149/*
150 * Update binding hardware IRQ number (hw) and Virtuql
151 * IRQ number (virq). This is called only once for a given mapping.
152 */
153static void beatic_pic_host_remap(struct irq_host *h, unsigned int virq,
154 irq_hw_number_t hw)
155{
156 beat_construct_and_connect_irq_plug(virq, hw);
157}
158
159/*
160 * Translate device-tree interrupt spec to irq_hw_number_t style (ulong),
161 * to pass away to irq_create_mapping().
162 *
163 * Called from irq_create_of_mapping() only.
164 * Note: We have only 1 entry to translate.
165 */
166static int beatic_pic_host_xlate(struct irq_host *h, struct device_node *ct,
167 u32 *intspec, unsigned int intsize,
168 irq_hw_number_t *out_hwirq,
169 unsigned int *out_flags)
170{
171 u64 *intspec2 = (u64 *)intspec;
172
173 *out_hwirq = *intspec2;
174 *out_flags |= IRQ_TYPE_LEVEL_LOW;
175 return 0;
176}
177
178static struct irq_host_ops beatic_pic_host_ops = {
179 .map = beatic_pic_host_map,
180 .remap = beatic_pic_host_remap,
181 .unmap = beatic_pic_host_unmap,
182 .xlate = beatic_pic_host_xlate,
183};
184
185/*
186 * Get an IRQ number
187 * Note: returns VIRQ
188 */
189static inline unsigned int beatic_get_irq_plug(void)
190{
191 int i;
192 uint64_t pending[4], ub;
193
194 for (i = 0; i < MAX_IRQS; i += 256) {
195 beat_detect_pending_interrupts(i, pending);
196 __asm__ ("cntlzd %0,%1":"=r"(ub):
197 "r"(pending[0] & beatic_irq_mask_enable[i/64+0]
198 & beatic_irq_mask_ack[i/64+0]));
199 if (ub != 64)
200 return i + ub + 0;
201 __asm__ ("cntlzd %0,%1":"=r"(ub):
202 "r"(pending[1] & beatic_irq_mask_enable[i/64+1]
203 & beatic_irq_mask_ack[i/64+1]));
204 if (ub != 64)
205 return i + ub + 64;
206 __asm__ ("cntlzd %0,%1":"=r"(ub):
207 "r"(pending[2] & beatic_irq_mask_enable[i/64+2]
208 & beatic_irq_mask_ack[i/64+2]));
209 if (ub != 64)
210 return i + ub + 128;
211 __asm__ ("cntlzd %0,%1":"=r"(ub):
212 "r"(pending[3] & beatic_irq_mask_enable[i/64+3]
213 & beatic_irq_mask_ack[i/64+3]));
214 if (ub != 64)
215 return i + ub + 192;
216 }
217
218 return NO_IRQ;
219}
220unsigned int beatic_get_irq(void)
221{
222 unsigned int ret;
223
224 ret = beatic_get_irq_plug();
225 if (ret != NO_IRQ)
226 beatic_ack_irq(ret);
227 return ret;
228}
229
230/*
231 */
232void __init beatic_init_IRQ(void)
233{
234 int i;
235
236 memset(beatic_irq_mask_enable, 0, sizeof(beatic_irq_mask_enable));
237 memset(beatic_irq_mask_ack, 255, sizeof(beatic_irq_mask_ack));
238 for (i = 0; i < MAX_IRQS; i += 256)
239 beat_set_interrupt_mask(i, 0L, 0L, 0L, 0L);
240
241 /* Set out get_irq function */
242 ppc_md.get_irq = beatic_get_irq;
243
244 /* Allocate an irq host */
245 beatic_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0,
246 &beatic_pic_host_ops,
247 0);
248 BUG_ON(beatic_host == NULL);
249 irq_set_default_host(beatic_host);
250}
251
252#ifdef CONFIG_SMP
253
254/* Nullified to compile with SMP mode */
255void beatic_setup_cpu(int cpu)
256{
257}
258
259void beatic_cause_IPI(int cpu, int mesg)
260{
261}
262
263void beatic_request_IPIs(void)
264{
265}
266#endif /* CONFIG_SMP */
267
268void beatic_deinit_IRQ(void)
269{
270 int i;
271
272 for (i = 1; i < NR_IRQS; i++)
273 beat_destruct_irq_plug(i);
274}
diff --git a/arch/powerpc/platforms/celleb/interrupt.h b/arch/powerpc/platforms/celleb/interrupt.h
new file mode 100644
index 000000000000..b470fd0051f1
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/interrupt.h
@@ -0,0 +1,33 @@
1/*
2 * Celleb/Beat Interrupt controller
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef ASM_BEAT_PIC_H
22#define ASM_BEAT_PIC_H
23#ifdef __KERNEL__
24
25extern void beatic_init_IRQ(void);
26extern unsigned int beatic_get_irq(void);
27extern void beatic_cause_IPI(int cpu, int mesg);
28extern void beatic_request_IPIs(void);
29extern void beatic_setup_cpu(int);
30extern void beatic_deinit_IRQ(void);
31
32#endif
33#endif /* ASM_BEAT_PIC_H */
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
new file mode 100644
index 000000000000..f63b94c65353
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -0,0 +1,104 @@
1/*
2 * Support for IOMMU on Celleb platform.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/dma-mapping.h>
24#include <linux/pci.h>
25
26#include <asm/of_platform.h>
27
28#include "beat_wrapper.h"
29
30#define DMA_FLAGS 0xf800000000000000UL /* r/w permitted, coherency required,
31 strongest order */
32
33static int __init find_dma_window(u64 *io_space_id, u64 *ioid,
34 u64 *base, u64 *size, u64 *io_page_size)
35{
36 struct device_node *dn;
37 const unsigned long *dma_window;
38
39 for_each_node_by_type(dn, "ioif") {
40 dma_window = get_property(dn, "toshiba,dma-window", NULL);
41 if (dma_window) {
42 *io_space_id = (dma_window[0] >> 32) & 0xffffffffUL;
43 *ioid = dma_window[0] & 0x7ffUL;
44 *base = dma_window[1];
45 *size = dma_window[2];
46 *io_page_size = 1 << dma_window[3];
47 of_node_put(dn);
48 return 1;
49 }
50 }
51 return 0;
52}
53
54static void __init celleb_init_direct_mapping(void)
55{
56 u64 lpar_addr, io_addr;
57 u64 io_space_id, ioid, dma_base, dma_size, io_page_size;
58
59 if (!find_dma_window(&io_space_id, &ioid, &dma_base, &dma_size,
60 &io_page_size)) {
61 pr_info("No dma window found !\n");
62 return;
63 }
64
65 for (lpar_addr = 0; lpar_addr < dma_size; lpar_addr += io_page_size) {
66 io_addr = lpar_addr + dma_base;
67 (void)beat_put_iopte(io_space_id, io_addr, lpar_addr,
68 ioid, DMA_FLAGS);
69 }
70
71 dma_direct_offset = dma_base;
72}
73
74static int celleb_of_bus_notify(struct notifier_block *nb,
75 unsigned long action, void *data)
76{
77 struct device *dev = data;
78
79 /* We are only intereted in device addition */
80 if (action != BUS_NOTIFY_ADD_DEVICE)
81 return 0;
82
83 dev->archdata.dma_ops = pci_dma_ops;
84
85 return 0;
86}
87
88static struct notifier_block celleb_of_bus_notifier = {
89 .notifier_call = celleb_of_bus_notify
90};
91
92static int __init celleb_init_iommu(void)
93{
94 if (!machine_is(celleb))
95 return -ENODEV;
96
97 celleb_init_direct_mapping();
98 pci_dma_ops = &dma_direct_ops;
99 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
100
101 return 0;
102}
103
104arch_initcall(celleb_init_iommu);
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c
new file mode 100644
index 000000000000..98de836dfed3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/pci.c
@@ -0,0 +1,481 @@
1/*
2 * Support for PCI on Celleb platform.
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/kernel/rtas_pci.c:
7 * Copyright (C) 2001 Dave Engebretsen, IBM Corporation
8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 */
24
25#undef DEBUG
26
27#include <linux/kernel.h>
28#include <linux/threads.h>
29#include <linux/pci.h>
30#include <linux/string.h>
31#include <linux/init.h>
32#include <linux/bootmem.h>
33#include <linux/pci_regs.h>
34
35#include <asm/io.h>
36#include <asm/irq.h>
37#include <asm/prom.h>
38#include <asm/machdep.h>
39#include <asm/pci-bridge.h>
40#include <asm/ppc-pci.h>
41
42#include "pci.h"
43#include "interrupt.h"
44
45#define MAX_PCI_DEVICES 32
46#define MAX_PCI_FUNCTIONS 8
47#define MAX_PCI_BASE_ADDRS 3 /* use 64 bit address */
48
49/* definition for fake pci configuration area for GbE, .... ,and etc. */
50
51struct celleb_pci_resource {
52 struct resource r[MAX_PCI_BASE_ADDRS];
53};
54
55struct celleb_pci_private {
56 unsigned char *fake_config[MAX_PCI_DEVICES][MAX_PCI_FUNCTIONS];
57 struct celleb_pci_resource *res[MAX_PCI_DEVICES][MAX_PCI_FUNCTIONS];
58};
59
60static inline u8 celleb_fake_config_readb(void *addr)
61{
62 u8 *p = addr;
63 return *p;
64}
65
66static inline u16 celleb_fake_config_readw(void *addr)
67{
68 __le16 *p = addr;
69 return le16_to_cpu(*p);
70}
71
72static inline u32 celleb_fake_config_readl(void *addr)
73{
74 __le32 *p = addr;
75 return le32_to_cpu(*p);
76}
77
78static inline void celleb_fake_config_writeb(u32 val, void *addr)
79{
80 u8 *p = addr;
81 *p = val;
82}
83
84static inline void celleb_fake_config_writew(u32 val, void *addr)
85{
86 __le16 val16;
87 __le16 *p = addr;
88 val16 = cpu_to_le16(val);
89 *p = val16;
90}
91
92static inline void celleb_fake_config_writel(u32 val, void *addr)
93{
94 __le32 val32;
95 __le32 *p = addr;
96 val32 = cpu_to_le32(val);
97 *p = val32;
98}
99
100static unsigned char *get_fake_config_start(struct pci_controller *hose,
101 int devno, int fn)
102{
103 struct celleb_pci_private *private = hose->private_data;
104
105 if (private == NULL)
106 return NULL;
107
108 return private->fake_config[devno][fn];
109}
110
111static struct celleb_pci_resource *get_resource_start(
112 struct pci_controller *hose,
113 int devno, int fn)
114{
115 struct celleb_pci_private *private = hose->private_data;
116
117 if (private == NULL)
118 return NULL;
119
120 return private->res[devno][fn];
121}
122
123
124static void celleb_config_read_fake(unsigned char *config, int where,
125 int size, u32 *val)
126{
127 char *p = config + where;
128
129 switch (size) {
130 case 1:
131 *val = celleb_fake_config_readb(p);
132 break;
133 case 2:
134 *val = celleb_fake_config_readw(p);
135 break;
136 case 4:
137 *val = celleb_fake_config_readl(p);
138 break;
139 }
140
141 return;
142}
143
144static void celleb_config_write_fake(unsigned char *config, int where,
145 int size, u32 val)
146{
147 char *p = config + where;
148
149 switch (size) {
150 case 1:
151 celleb_fake_config_writeb(val, p);
152 break;
153 case 2:
154 celleb_fake_config_writew(val, p);
155 break;
156 case 4:
157 celleb_fake_config_writel(val, p);
158 break;
159 }
160 return;
161}
162
163static int celleb_fake_pci_read_config(struct pci_bus *bus,
164 unsigned int devfn, int where, int size, u32 *val)
165{
166 char *config;
167 struct device_node *node;
168 struct pci_controller *hose;
169 unsigned int devno = devfn >> 3;
170 unsigned int fn = devfn & 0x7;
171
172 /* allignment check */
173 BUG_ON(where % size);
174
175 pr_debug(" fake read: bus=0x%x, ", bus->number);
176 node = (struct device_node *)bus->sysdata;
177 hose = pci_find_hose_for_OF_device(node);
178 config = get_fake_config_start(hose, devno, fn);
179
180 pr_debug("devno=0x%x, where=0x%x, size=0x%x, ", devno, where, size);
181 if (!config) {
182 pr_debug("failed\n");
183 return PCIBIOS_DEVICE_NOT_FOUND;
184 }
185
186 celleb_config_read_fake(config, where, size, val);
187 pr_debug("val=0x%x\n", *val);
188
189 return PCIBIOS_SUCCESSFUL;
190}
191
192
193static int celleb_fake_pci_write_config(struct pci_bus *bus,
194 unsigned int devfn, int where, int size, u32 val)
195{
196 char *config;
197 struct device_node *node;
198 struct pci_controller *hose;
199 struct celleb_pci_resource *res;
200 unsigned int devno = devfn >> 3;
201 unsigned int fn = devfn & 0x7;
202
203 /* allignment check */
204 BUG_ON(where % size);
205
206 node = (struct device_node *)bus->sysdata;
207 hose = pci_find_hose_for_OF_device(node);
208 config = get_fake_config_start(hose, devno, fn);
209
210 if (!config)
211 return PCIBIOS_DEVICE_NOT_FOUND;
212
213 if (val == ~0) {
214 int i = (where - PCI_BASE_ADDRESS_0) >> 3;
215
216 switch (where) {
217 case PCI_BASE_ADDRESS_0:
218 case PCI_BASE_ADDRESS_2:
219 if (size != 4)
220 return PCIBIOS_DEVICE_NOT_FOUND;
221 res = get_resource_start(hose, devno, fn);
222 if (!res)
223 return PCIBIOS_DEVICE_NOT_FOUND;
224 celleb_config_write_fake(config, where, size,
225 (res->r[i].end - res->r[i].start));
226 return PCIBIOS_SUCCESSFUL;
227 case PCI_BASE_ADDRESS_1:
228 case PCI_BASE_ADDRESS_3:
229 case PCI_BASE_ADDRESS_4:
230 case PCI_BASE_ADDRESS_5:
231 break;
232 default:
233 break;
234 }
235 }
236
237 celleb_config_write_fake(config, where, size, val);
238 pr_debug(" fake write: where=%x, size=%d, val=%x\n",
239 where, size, val);
240
241 return PCIBIOS_SUCCESSFUL;
242}
243
244static struct pci_ops celleb_fake_pci_ops = {
245 celleb_fake_pci_read_config,
246 celleb_fake_pci_write_config
247};
248
249static inline void celleb_setup_pci_base_addrs(struct pci_controller *hose,
250 unsigned int devno, unsigned int fn,
251 unsigned int num_base_addr)
252{
253 u32 val;
254 unsigned char *config;
255 struct celleb_pci_resource *res;
256
257 config = get_fake_config_start(hose, devno, fn);
258 res = get_resource_start(hose, devno, fn);
259
260 if (!config || !res)
261 return;
262
263 switch (num_base_addr) {
264 case 3:
265 val = (res->r[2].start & 0xfffffff0)
266 | PCI_BASE_ADDRESS_MEM_TYPE_64;
267 celleb_config_write_fake(config, PCI_BASE_ADDRESS_4, 4, val);
268 val = res->r[2].start >> 32;
269 celleb_config_write_fake(config, PCI_BASE_ADDRESS_5, 4, val);
270 /* FALLTHROUGH */
271 case 2:
272 val = (res->r[1].start & 0xfffffff0)
273 | PCI_BASE_ADDRESS_MEM_TYPE_64;
274 celleb_config_write_fake(config, PCI_BASE_ADDRESS_2, 4, val);
275 val = res->r[1].start >> 32;
276 celleb_config_write_fake(config, PCI_BASE_ADDRESS_3, 4, val);
277 /* FALLTHROUGH */
278 case 1:
279 val = (res->r[0].start & 0xfffffff0)
280 | PCI_BASE_ADDRESS_MEM_TYPE_64;
281 celleb_config_write_fake(config, PCI_BASE_ADDRESS_0, 4, val);
282 val = res->r[0].start >> 32;
283 celleb_config_write_fake(config, PCI_BASE_ADDRESS_1, 4, val);
284 break;
285 }
286
287 val = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER;
288 celleb_config_write_fake(config, PCI_COMMAND, 2, val);
289}
290
291static int __devinit celleb_setup_fake_pci_device(struct device_node *node,
292 struct pci_controller *hose)
293{
294 unsigned int rlen;
295 int num_base_addr = 0;
296 u32 val;
297 const u32 *wi0, *wi1, *wi2, *wi3, *wi4;
298 unsigned int devno, fn;
299 struct celleb_pci_private *private = hose->private_data;
300 unsigned char **config = NULL;
301 struct celleb_pci_resource **res = NULL;
302 const char *name;
303 const unsigned long *li;
304 int size, result;
305
306 if (private == NULL) {
307 printk(KERN_ERR "PCI: "
308 "memory space for pci controller is not assigned\n");
309 goto error;
310 }
311
312 name = get_property(node, "model", &rlen);
313 if (!name) {
314 printk(KERN_ERR "PCI: model property not found.\n");
315 goto error;
316 }
317
318 wi4 = get_property(node, "reg", &rlen);
319 if (wi4 == NULL)
320 goto error;
321
322 devno = ((wi4[0] >> 8) & 0xff) >> 3;
323 fn = (wi4[0] >> 8) & 0x7;
324
325 pr_debug("PCI: celleb_setup_fake_pci() %s devno=%x fn=%x\n", name,
326 devno, fn);
327
328 size = 256;
329 config = &private->fake_config[devno][fn];
330 if (mem_init_done)
331 *config = kzalloc(size, GFP_KERNEL);
332 else
333 *config = alloc_bootmem(size);
334 if (*config == NULL) {
335 printk(KERN_ERR "PCI: "
336 "not enough memory for fake configuration space\n");
337 goto error;
338 }
339 pr_debug("PCI: fake config area assigned 0x%016lx\n",
340 (unsigned long)*config);
341
342 size = sizeof(struct celleb_pci_resource);
343 res = &private->res[devno][fn];
344 if (mem_init_done)
345 *res = kzalloc(size, GFP_KERNEL);
346 else
347 *res = alloc_bootmem(size);
348 if (*res == NULL) {
349 printk(KERN_ERR
350 "PCI: not enough memory for resource data space\n");
351 goto error;
352 }
353 pr_debug("PCI: res assigned 0x%016lx\n", (unsigned long)*res);
354
355 wi0 = get_property(node, "device-id", NULL);
356 wi1 = get_property(node, "vendor-id", NULL);
357 wi2 = get_property(node, "class-code", NULL);
358 wi3 = get_property(node, "revision-id", NULL);
359
360 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
361 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
362 pr_debug("class-code = 0x%08x\n", wi2[0]);
363
364 celleb_config_write_fake(*config, PCI_CLASS_PROG, 1, wi2[0] & 0xff);
365 celleb_config_write_fake(*config, PCI_CLASS_DEVICE, 2,
366 (wi2[0] >> 8) & 0xffff);
367 celleb_config_write_fake(*config, PCI_REVISION_ID, 1, wi3[0]);
368
369 while (num_base_addr < MAX_PCI_BASE_ADDRS) {
370 result = of_address_to_resource(node,
371 num_base_addr, &(*res)->r[num_base_addr]);
372 if (result)
373 break;
374 num_base_addr++;
375 }
376
377 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
378
379 li = get_property(node, "interrupts", &rlen);
380 val = li[0];
381 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
382 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
383
384#ifdef DEBUG
385 pr_debug("PCI: %s irq=%ld\n", name, li[0]);
386 for (i = 0; i < 6; i++) {
387 celleb_config_read_fake(*config,
388 PCI_BASE_ADDRESS_0 + 0x4 * i, 4,
389 &val);
390 pr_debug("PCI: %s fn=%d base_address_%d=0x%x\n",
391 name, fn, i, val);
392 }
393#endif
394
395 celleb_config_write_fake(*config, PCI_HEADER_TYPE, 1,
396 PCI_HEADER_TYPE_NORMAL);
397
398 return 0;
399
400error:
401 if (mem_init_done) {
402 if (config && *config)
403 kfree(*config);
404 if (res && *res)
405 kfree(*res);
406
407 } else {
408 if (config && *config) {
409 size = 256;
410 free_bootmem((unsigned long)(*config), size);
411 }
412 if (res && *res) {
413 size = sizeof(struct celleb_pci_resource);
414 free_bootmem((unsigned long)(*res), size);
415 }
416 }
417
418 return 1;
419}
420
421static int __devinit phb_set_bus_ranges(struct device_node *dev,
422 struct pci_controller *phb)
423{
424 const int *bus_range;
425 unsigned int len;
426
427 bus_range = get_property(dev, "bus-range", &len);
428 if (bus_range == NULL || len < 2 * sizeof(int))
429 return 1;
430
431 phb->first_busno = bus_range[0];
432 phb->last_busno = bus_range[1];
433
434 return 0;
435}
436
437static void __devinit celleb_alloc_private_mem(struct pci_controller *hose)
438{
439 if (mem_init_done)
440 hose->private_data =
441 kzalloc(sizeof(struct celleb_pci_private), GFP_KERNEL);
442 else
443 hose->private_data =
444 alloc_bootmem(sizeof(struct celleb_pci_private));
445}
446
447int __devinit celleb_setup_phb(struct pci_controller *phb)
448{
449 const char *name;
450 struct device_node *dev = phb->arch_data;
451 struct device_node *node;
452 unsigned int rlen;
453
454 name = get_property(dev, "name", &rlen);
455 if (!name)
456 return 1;
457
458 pr_debug("PCI: celleb_setup_phb() %s\n", name);
459 phb_set_bus_ranges(dev, phb);
460
461 if (strcmp(name, "epci") == 0) {
462 phb->ops = &celleb_epci_ops;
463 return celleb_setup_epci(dev, phb);
464
465 } else if (strcmp(name, "pci-pseudo") == 0) {
466 phb->ops = &celleb_fake_pci_ops;
467 celleb_alloc_private_mem(phb);
468 for (node = of_get_next_child(dev, NULL);
469 node != NULL; node = of_get_next_child(dev, node))
470 celleb_setup_fake_pci_device(node, phb);
471
472 } else
473 return 1;
474
475 return 0;
476}
477
478int celleb_pci_probe_mode(struct pci_bus *bus)
479{
480 return PCI_PROBE_DEVTREE;
481}
diff --git a/arch/powerpc/platforms/celleb/pci.h b/arch/powerpc/platforms/celleb/pci.h
new file mode 100644
index 000000000000..5340e348e297
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/pci.h
@@ -0,0 +1,35 @@
1/*
2 * pci prototypes for Celleb platform
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_PCI_H
22#define _CELLEB_PCI_H
23
24#include <linux/pci.h>
25
26#include <asm/pci-bridge.h>
27#include <asm/prom.h>
28
29extern int celleb_setup_phb(struct pci_controller *);
30extern int celleb_pci_probe_mode(struct pci_bus *);
31
32extern struct pci_ops celleb_epci_ops;
33extern int celleb_setup_epci(struct device_node *, struct pci_controller *);
34
35#endif /* _CELLEB_PCI_H */
diff --git a/arch/powerpc/platforms/celleb/scc.h b/arch/powerpc/platforms/celleb/scc.h
new file mode 100644
index 000000000000..e9ce8a7c1882
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc.h
@@ -0,0 +1,145 @@
1/*
2 * SCC (Super Companion Chip) definitions
3 *
4 * (C) Copyright 2004-2006 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _CELLEB_SCC_H
22#define _CELLEB_SCC_H
23
24#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
25#define PCI_DEVICE_ID_TOSHIBA_SCC_PCIEXC_BRIDGE 0x01b0
26#define PCI_DEVICE_ID_TOSHIBA_SCC_EPCI_BRIDGE 0x01b1
27#define PCI_DEVICE_ID_TOSHIBA_SCC_BRIDGE 0x01b2
28#define PCI_DEVICE_ID_TOSHIBA_SCC_GBE 0x01b3
29#define PCI_DEVICE_ID_TOSHIBA_SCC_ATA 0x01b4
30#define PCI_DEVICE_ID_TOSHIBA_SCC_USB2 0x01b5
31#define PCI_DEVICE_ID_TOSHIBA_SCC_USB 0x01b6
32#define PCI_DEVICE_ID_TOSHIBA_SCC_ENCDEC 0x01b7
33
34#define SCC_EPCI_REG 0x0000d000
35
36/* EPCI registers */
37#define SCC_EPCI_CNF10_REG 0x010
38#define SCC_EPCI_CNF14_REG 0x014
39#define SCC_EPCI_CNF18_REG 0x018
40#define SCC_EPCI_PVBAT 0x100
41#define SCC_EPCI_VPMBAT 0x104
42#define SCC_EPCI_VPIBAT 0x108
43#define SCC_EPCI_VCSR 0x110
44#define SCC_EPCI_VIENAB 0x114
45#define SCC_EPCI_VISTAT 0x118
46#define SCC_EPCI_VRDCOUNT 0x124
47#define SCC_EPCI_BAM0 0x12c
48#define SCC_EPCI_BAM1 0x134
49#define SCC_EPCI_BAM2 0x13c
50#define SCC_EPCI_IADR 0x164
51#define SCC_EPCI_CLKRST 0x800
52#define SCC_EPCI_INTSET 0x804
53#define SCC_EPCI_STATUS 0x808
54#define SCC_EPCI_ABTSET 0x80c
55#define SCC_EPCI_WATRP 0x810
56#define SCC_EPCI_DUMMYRADR 0x814
57#define SCC_EPCI_SWRESP 0x818
58#define SCC_EPCI_CNTOPT 0x81c
59#define SCC_EPCI_ECMODE 0xf00
60#define SCC_EPCI_IOM_AC_NUM 5
61#define SCC_EPCI_IOM_ACTE(n) (0xf10 + (n) * 4)
62#define SCC_EPCI_IOT_AC_NUM 4
63#define SCC_EPCI_IOT_ACTE(n) (0xf30 + (n) * 4)
64#define SCC_EPCI_MAEA 0xf50
65#define SCC_EPCI_MAEC 0xf54
66#define SCC_EPCI_CKCTRL 0xff0
67
68/* bits for SCC_EPCI_VCSR */
69#define SCC_EPCI_VCSR_FRE 0x00020000
70#define SCC_EPCI_VCSR_FWE 0x00010000
71#define SCC_EPCI_VCSR_DR 0x00000400
72#define SCC_EPCI_VCSR_SR 0x00000008
73#define SCC_EPCI_VCSR_AT 0x00000004
74
75/* bits for SCC_EPCI_VIENAB/SCC_EPCI_VISTAT */
76#define SCC_EPCI_VISTAT_PMPE 0x00000008
77#define SCC_EPCI_VISTAT_PMFE 0x00000004
78#define SCC_EPCI_VISTAT_PRA 0x00000002
79#define SCC_EPCI_VISTAT_PRD 0x00000001
80#define SCC_EPCI_VISTAT_ALL 0x0000000f
81
82#define SCC_EPCI_VIENAB_PMPEE 0x00000008
83#define SCC_EPCI_VIENAB_PMFEE 0x00000004
84#define SCC_EPCI_VIENAB_PRA 0x00000002
85#define SCC_EPCI_VIENAB_PRD 0x00000001
86#define SCC_EPCI_VIENAB_ALL 0x0000000f
87
88/* bits for SCC_EPCI_CLKRST */
89#define SCC_EPCI_CLKRST_CKS_MASK 0x00030000
90#define SCC_EPCI_CLKRST_CKS_2 0x00000000
91#define SCC_EPCI_CLKRST_CKS_4 0x00010000
92#define SCC_EPCI_CLKRST_CKS_8 0x00020000
93#define SCC_EPCI_CLKRST_PCICRST 0x00000400
94#define SCC_EPCI_CLKRST_BC 0x00000200
95#define SCC_EPCI_CLKRST_PCIRST 0x00000100
96#define SCC_EPCI_CLKRST_PCKEN 0x00000001
97
98/* bits for SCC_EPCI_INTSET/SCC_EPCI_STATUS */
99#define SCC_EPCI_INT_2M 0x01000000
100#define SCC_EPCI_INT_RERR 0x00200000
101#define SCC_EPCI_INT_SERR 0x00100000
102#define SCC_EPCI_INT_PRTER 0x00080000
103#define SCC_EPCI_INT_SER 0x00040000
104#define SCC_EPCI_INT_PER 0x00020000
105#define SCC_EPCI_INT_PAI 0x00010000
106#define SCC_EPCI_INT_1M 0x00000100
107#define SCC_EPCI_INT_PME 0x00000010
108#define SCC_EPCI_INT_INTD 0x00000008
109#define SCC_EPCI_INT_INTC 0x00000004
110#define SCC_EPCI_INT_INTB 0x00000002
111#define SCC_EPCI_INT_INTA 0x00000001
112#define SCC_EPCI_INT_DEVINT 0x0000000f
113#define SCC_EPCI_INT_ALL 0x003f001f
114#define SCC_EPCI_INT_ALLERR 0x003f0000
115
116/* bits for SCC_EPCI_CKCTRL */
117#define SCC_EPCI_CKCTRL_CRST0 0x00010000
118#define SCC_EPCI_CKCTRL_CRST1 0x00020000
119#define SCC_EPCI_CKCTRL_OCLKEN 0x00000100
120#define SCC_EPCI_CKCTRL_LCLKEN 0x00000001
121
122#define SCC_EPCI_IDSEL_AD_TO_SLOT(ad) ((ad) - 10)
123#define SCC_EPCI_MAX_DEVNU SCC_EPCI_IDSEL_AD_TO_SLOT(32)
124
125/* bits for SCC_EPCI_CNTOPT */
126#define SCC_EPCI_CNTOPT_O2PMB 0x00000002
127
128/* UHC registers */
129#define SCC_UHC_CKRCTRL 0xff0
130#define SCC_UHC_ECMODE 0xf00
131
132/* bits for SCC_UHC_CKRCTRL */
133#define SCC_UHC_F48MCKLEN 0x00000001
134#define SCC_UHC_P_SUSPEND 0x00000002
135#define SCC_UHC_PHY_SUSPEND_SEL 0x00000004
136#define SCC_UHC_HCLKEN 0x00000100
137#define SCC_UHC_USBEN 0x00010000
138#define SCC_UHC_USBCEN 0x00020000
139#define SCC_UHC_PHYEN 0x00040000
140
141/* bits for SCC_UHC_ECMODE */
142#define SCC_UHC_ECMODE_BY_BYTE 0x00000555
143#define SCC_UHC_ECMODE_BY_WORD 0x00000aaa
144
145#endif /* _CELLEB_SCC_H */
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c
new file mode 100644
index 000000000000..c11b39c3776a
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_epci.c
@@ -0,0 +1,409 @@
1/*
2 * Support for SCC external PCI
3 *
4 * (C) Copyright 2004-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#undef DEBUG
22
23#include <linux/kernel.h>
24#include <linux/threads.h>
25#include <linux/pci.h>
26#include <linux/init.h>
27#include <linux/pci_regs.h>
28#include <linux/bootmem.h>
29
30#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/prom.h>
33#include <asm/machdep.h>
34#include <asm/pci-bridge.h>
35#include <asm/ppc-pci.h>
36
37#include "scc.h"
38#include "pci.h"
39#include "interrupt.h"
40
41#define MAX_PCI_DEVICES 32
42#define MAX_PCI_FUNCTIONS 8
43
44#define iob() __asm__ __volatile__("eieio; sync":::"memory")
45
46
47#if 0 /* test code for epci dummy read */
48static void celleb_epci_dummy_read(struct pci_dev *dev)
49{
50 void __iomem *epci_base;
51 struct device_node *node;
52 struct pci_controller *hose;
53 u32 val;
54
55 node = (struct device_node *)dev->bus->sysdata;
56 hose = pci_find_hose_for_OF_device(node);
57
58 if (!hose)
59 return;
60
61 epci_base = hose->cfg_addr;
62
63 val = in_be32(epci_base + SCC_EPCI_WATRP);
64 iosync();
65
66 return;
67}
68#endif
69
70static inline void clear_and_disable_master_abort_interrupt(
71 struct pci_controller *hose)
72{
73 void __iomem *addr;
74 addr = hose->cfg_addr + PCI_COMMAND;
75 out_be32(addr, in_be32(addr) | (PCI_STATUS_REC_MASTER_ABORT << 16));
76}
77
78static int celleb_epci_check_abort(struct pci_controller *hose,
79 void __iomem *addr)
80{
81 void __iomem *reg, *epci_base;
82 u32 val;
83
84 iob();
85 epci_base = hose->cfg_addr;
86
87 reg = epci_base + PCI_COMMAND;
88 val = in_be32(reg);
89
90 if (val & (PCI_STATUS_REC_MASTER_ABORT << 16)) {
91 out_be32(reg,
92 (val & 0xffff) | (PCI_STATUS_REC_MASTER_ABORT << 16));
93
94 /* clear PCI Controller error, FRE, PMFE */
95 reg = epci_base + SCC_EPCI_STATUS;
96 out_be32(reg, SCC_EPCI_INT_PAI);
97
98 reg = epci_base + SCC_EPCI_VCSR;
99 val = in_be32(reg) & 0xffff;
100 val |= SCC_EPCI_VCSR_FRE;
101 out_be32(reg, val);
102
103 reg = epci_base + SCC_EPCI_VISTAT;
104 out_be32(reg, SCC_EPCI_VISTAT_PMFE);
105 return PCIBIOS_DEVICE_NOT_FOUND;
106 }
107
108 return PCIBIOS_SUCCESSFUL;
109}
110
111static void __iomem *celleb_epci_make_config_addr(struct pci_controller *hose,
112 unsigned int devfn, int where)
113{
114 void __iomem *addr;
115 struct pci_bus *bus = hose->bus;
116
117 if (bus->self)
118 addr = hose->cfg_data +
119 (((bus->number & 0xff) << 16)
120 | ((devfn & 0xff) << 8)
121 | (where & 0xff)
122 | 0x01000000);
123 else
124 addr = hose->cfg_data +
125 (((devfn & 0xff) << 8) | (where & 0xff));
126
127 pr_debug("EPCI: config_addr = 0x%p\n", addr);
128
129 return addr;
130}
131
132static int celleb_epci_read_config(struct pci_bus *bus,
133 unsigned int devfn, int where, int size, u32 * val)
134{
135 void __iomem *addr;
136 struct device_node *node;
137 struct pci_controller *hose;
138
139 /* allignment check */
140 BUG_ON(where % size);
141
142 node = (struct device_node *)bus->sysdata;
143 hose = pci_find_hose_for_OF_device(node);
144
145 if (!hose->cfg_data)
146 return PCIBIOS_DEVICE_NOT_FOUND;
147
148 if (bus->number == hose->first_busno && devfn == 0) {
149 /* EPCI controller self */
150
151 addr = hose->cfg_addr + where;
152
153 switch (size) {
154 case 1:
155 *val = in_8(addr);
156 break;
157 case 2:
158 *val = in_be16(addr);
159 break;
160 case 4:
161 *val = in_be32(addr);
162 break;
163 default:
164 return PCIBIOS_DEVICE_NOT_FOUND;
165 }
166
167 } else {
168
169 clear_and_disable_master_abort_interrupt(hose);
170 addr = celleb_epci_make_config_addr(hose, devfn, where);
171
172 switch (size) {
173 case 1:
174 *val = in_8(addr);
175 break;
176 case 2:
177 *val = in_le16(addr);
178 break;
179 case 4:
180 *val = in_le32(addr);
181 break;
182 default:
183 return PCIBIOS_DEVICE_NOT_FOUND;
184 }
185 }
186
187 pr_debug("EPCI: "
188 "addr=0x%lx, devfn=0x%x, where=0x%x, size=0x%x, val=0x%x\n",
189 addr, devfn, where, size, *val);
190
191 return celleb_epci_check_abort(hose, NULL);
192}
193
194static int celleb_epci_write_config(struct pci_bus *bus,
195 unsigned int devfn, int where, int size, u32 val)
196{
197 void __iomem *addr;
198 struct device_node *node;
199 struct pci_controller *hose;
200
201 /* allignment check */
202 BUG_ON(where % size);
203
204 node = (struct device_node *)bus->sysdata;
205 hose = pci_find_hose_for_OF_device(node);
206
207 if (!hose->cfg_data)
208 return PCIBIOS_DEVICE_NOT_FOUND;
209
210 if (bus->number == hose->first_busno && devfn == 0) {
211 /* EPCI controller self */
212
213 addr = hose->cfg_addr + where;
214
215 switch (size) {
216 case 1:
217 out_8(addr, val);
218 break;
219 case 2:
220 out_be16(addr, val);
221 break;
222 case 4:
223 out_be32(addr, val);
224 break;
225 default:
226 return PCIBIOS_DEVICE_NOT_FOUND;
227 }
228
229 } else {
230
231 clear_and_disable_master_abort_interrupt(hose);
232 addr = celleb_epci_make_config_addr(hose, devfn, where);
233
234 switch (size) {
235 case 1:
236 out_8(addr, val);
237 break;
238 case 2:
239 out_le16(addr, val);
240 break;
241 case 4:
242 out_le32(addr, val);
243 break;
244 default:
245 return PCIBIOS_DEVICE_NOT_FOUND;
246 }
247 }
248
249 return celleb_epci_check_abort(hose, addr);
250}
251
252struct pci_ops celleb_epci_ops = {
253 celleb_epci_read_config,
254 celleb_epci_write_config,
255};
256
257/* to be moved in FW */
258static int __devinit celleb_epci_init(struct pci_controller *hose)
259{
260 u32 val;
261 void __iomem *reg, *epci_base;
262 int hwres = 0;
263
264 epci_base = hose->cfg_addr;
265
266 /* PCI core reset(Internal bus and PCI clock) */
267 reg = epci_base + SCC_EPCI_CKCTRL;
268 val = in_be32(reg);
269 if (val == 0x00030101)
270 hwres = 1;
271 else {
272 val &= ~(SCC_EPCI_CKCTRL_CRST0 | SCC_EPCI_CKCTRL_CRST1);
273 out_be32(reg, val);
274
275 /* set PCI core clock */
276 val = in_be32(reg);
277 val |= (SCC_EPCI_CKCTRL_OCLKEN | SCC_EPCI_CKCTRL_LCLKEN);
278 out_be32(reg, val);
279
280 /* release PCI core reset (internal bus) */
281 val = in_be32(reg);
282 val |= SCC_EPCI_CKCTRL_CRST0;
283 out_be32(reg, val);
284
285 /* set PCI clock select */
286 reg = epci_base + SCC_EPCI_CLKRST;
287 val = in_be32(reg);
288 val &= ~SCC_EPCI_CLKRST_CKS_MASK;
289 val |= SCC_EPCI_CLKRST_CKS_2;
290 out_be32(reg, val);
291
292 /* set arbiter */
293 reg = epci_base + SCC_EPCI_ABTSET;
294 out_be32(reg, 0x0f1f001f); /* temporary value */
295
296 /* buffer on */
297 reg = epci_base + SCC_EPCI_CLKRST;
298 val = in_be32(reg);
299 val |= SCC_EPCI_CLKRST_BC;
300 out_be32(reg, val);
301
302 /* PCI clock enable */
303 val = in_be32(reg);
304 val |= SCC_EPCI_CLKRST_PCKEN;
305 out_be32(reg, val);
306
307 /* release PCI core reset (all) */
308 reg = epci_base + SCC_EPCI_CKCTRL;
309 val = in_be32(reg);
310 val |= (SCC_EPCI_CKCTRL_CRST0 | SCC_EPCI_CKCTRL_CRST1);
311 out_be32(reg, val);
312
313 /* set base translation registers. (already set by Beat) */
314
315 /* set base address masks. (already set by Beat) */
316 }
317
318 /* release interrupt masks and clear all interrupts */
319 reg = epci_base + SCC_EPCI_INTSET;
320 out_be32(reg, 0x013f011f); /* all interrupts enable */
321 reg = epci_base + SCC_EPCI_VIENAB;
322 val = SCC_EPCI_VIENAB_PMPEE | SCC_EPCI_VIENAB_PMFEE;
323 out_be32(reg, val);
324 reg = epci_base + SCC_EPCI_STATUS;
325 out_be32(reg, 0xffffffff);
326 reg = epci_base + SCC_EPCI_VISTAT;
327 out_be32(reg, 0xffffffff);
328
329 /* disable PCI->IB address translation */
330 reg = epci_base + SCC_EPCI_VCSR;
331 val = in_be32(reg);
332 val &= ~(SCC_EPCI_VCSR_DR | SCC_EPCI_VCSR_AT);
333 out_be32(reg, val);
334
335 /* set base addresses. (no need to set?) */
336
337 /* memory space, bus master enable */
338 reg = epci_base + PCI_COMMAND;
339 val = PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER;
340 out_be32(reg, val);
341
342 /* endian mode setup */
343 reg = epci_base + SCC_EPCI_ECMODE;
344 val = 0x00550155;
345 out_be32(reg, val);
346
347 /* set control option */
348 reg = epci_base + SCC_EPCI_CNTOPT;
349 val = in_be32(reg);
350 val |= SCC_EPCI_CNTOPT_O2PMB;
351 out_be32(reg, val);
352
353 /* XXX: temporay: set registers for address conversion setup */
354 reg = epci_base + SCC_EPCI_CNF10_REG;
355 out_be32(reg, 0x80000008);
356 reg = epci_base + SCC_EPCI_CNF14_REG;
357 out_be32(reg, 0x40000008);
358
359 reg = epci_base + SCC_EPCI_BAM0;
360 out_be32(reg, 0x80000000);
361 reg = epci_base + SCC_EPCI_BAM1;
362 out_be32(reg, 0xe0000000);
363
364 reg = epci_base + SCC_EPCI_PVBAT;
365 out_be32(reg, 0x80000000);
366
367 if (!hwres) {
368 /* release external PCI reset */
369 reg = epci_base + SCC_EPCI_CLKRST;
370 val = in_be32(reg);
371 val |= SCC_EPCI_CLKRST_PCIRST;
372 out_be32(reg, val);
373 }
374
375 return 0;
376}
377
378int __devinit celleb_setup_epci(struct device_node *node,
379 struct pci_controller *hose)
380{
381 struct resource r;
382
383 pr_debug("PCI: celleb_setup_epci()\n");
384
385 if (of_address_to_resource(node, 0, &r))
386 goto error;
387 hose->cfg_addr = ioremap(r.start, (r.end - r.start + 1));
388 if (!hose->cfg_addr)
389 goto error;
390 pr_debug("EPCI: cfg_addr map 0x%016lx->0x%016lx + 0x%016lx\n",
391 r.start, (unsigned long)hose->cfg_addr,
392 (r.end - r.start + 1));
393
394 if (of_address_to_resource(node, 2, &r))
395 goto error;
396 hose->cfg_data = ioremap(r.start, (r.end - r.start + 1));
397 if (!hose->cfg_data)
398 goto error;
399 pr_debug("EPCI: cfg_data map 0x%016lx->0x%016lx + 0x%016lx\n",
400 r.start, (unsigned long)hose->cfg_data,
401 (r.end - r.start + 1));
402
403 celleb_epci_init(hose);
404
405 return 0;
406
407error:
408 return 1;
409}
diff --git a/arch/powerpc/platforms/celleb/scc_sio.c b/arch/powerpc/platforms/celleb/scc_sio.c
new file mode 100644
index 000000000000..bcd25f54d986
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_sio.c
@@ -0,0 +1,101 @@
1/*
2 * setup serial port in SCC
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/tty.h>
22#include <linux/serial.h>
23#include <linux/serial_core.h>
24#include <linux/console.h>
25
26#include <asm/io.h>
27#include <asm/prom.h>
28
29/* sio irq0=0xb00010022 irq0=0xb00010023 irq2=0xb00010024
30 mmio=0xfff000-0x1000,0xff2000-0x1000 */
31static int txx9_serial_bitmap = 0;
32
33static struct {
34 uint32_t offset;
35 uint32_t index;
36} txx9_scc_tab[3] = {
37 { 0x300, 0 }, /* 0xFFF300 */
38 { 0x400, 0 }, /* 0xFFF400 */
39 { 0x800, 1 } /* 0xFF2800 */
40};
41
42static int txx9_serial_init(void)
43{
44 extern int early_serial_txx9_setup(struct uart_port *port);
45 struct device_node *node;
46 int i;
47 struct uart_port req;
48 struct of_irq irq;
49 struct resource res;
50
51 node = of_find_node_by_path("/ioif1/sio");
52 if (!node)
53 return 0;
54
55 for(i = 0; i < sizeof(txx9_scc_tab)/sizeof(txx9_scc_tab[0]); i++) {
56 if (!(txx9_serial_bitmap & (1<<i)))
57 continue;
58
59 if (of_irq_map_one(node, i, &irq))
60 continue;
61 if (of_address_to_resource(node, txx9_scc_tab[i].index, &res))
62 continue;
63
64 memset(&req, 0, sizeof(req));
65 req.line = i;
66 req.iotype = UPIO_MEM;
67 req.mapbase = res.start + txx9_scc_tab[i].offset;
68#ifdef CONFIG_SERIAL_TXX9_CONSOLE
69 req.membase = ioremap(req.mapbase, 0x24);
70#endif
71 req.irq = irq_create_of_mapping(irq.controller,
72 irq.specifier, irq.size);
73 req.flags |= UPF_IOREMAP | UPF_BUGGY_UART /*HAVE_CTS_LINE*/;
74 req.uartclk = 83300000;
75 early_serial_txx9_setup(&req);
76 }
77
78 of_node_put(node);
79 return 0;
80}
81
82static int txx9_serial_config(char *ptr)
83{
84 int i;
85
86 for (;;) {
87 switch(get_option(&ptr, &i)) {
88 default:
89 return 0;
90 case 2:
91 txx9_serial_bitmap |= 1 << i;
92 break;
93 case 1:
94 txx9_serial_bitmap |= 1 << i;
95 return 0;
96 }
97 }
98}
99__setup("txx9_serial=", txx9_serial_config);
100
101console_initcall(txx9_serial_init);
diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/celleb/scc_uhc.c
new file mode 100644
index 000000000000..a7c548bde2e3
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/scc_uhc.c
@@ -0,0 +1,94 @@
1/*
2 * SCC (Super Companion Chip) UHC setup
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/pci.h>
23
24#include <asm/delay.h>
25#include <asm/io.h>
26#include <asm/machdep.h>
27
28#include "scc.h"
29
30#define UHC_RESET_WAIT_MAX 10000
31
32static inline int uhc_clkctrl_ready(u32 val)
33{
34 const u32 mask = SCC_UHC_USBCEN | SCC_UHC_USBCEN;
35 return((val & mask) == mask);
36}
37
38/*
39 * UHC(usb host controler) enable function.
40 * affect to both of OHCI and EHCI core module.
41 */
42static void enable_scc_uhc(struct pci_dev *dev)
43{
44 void __iomem *uhc_base;
45 u32 __iomem *uhc_clkctrl;
46 u32 __iomem *uhc_ecmode;
47 u32 val = 0;
48 int i;
49
50 if (!machine_is(celleb))
51 return;
52
53 uhc_base = ioremap(pci_resource_start(dev, 0),
54 pci_resource_len(dev, 0));
55 if (!uhc_base) {
56 printk(KERN_ERR "failed to map UHC register base.\n");
57 return;
58 }
59 uhc_clkctrl = uhc_base + SCC_UHC_CKRCTRL;
60 uhc_ecmode = uhc_base + SCC_UHC_ECMODE;
61
62 /* setup for normal mode */
63 val |= SCC_UHC_F48MCKLEN;
64 out_be32(uhc_clkctrl, val);
65 val |= SCC_UHC_PHY_SUSPEND_SEL;
66 out_be32(uhc_clkctrl, val);
67 udelay(10);
68 val |= SCC_UHC_PHYEN;
69 out_be32(uhc_clkctrl, val);
70 udelay(50);
71
72 /* disable reset */
73 val |= SCC_UHC_HCLKEN;
74 out_be32(uhc_clkctrl, val);
75 val |= (SCC_UHC_USBCEN | SCC_UHC_USBEN);
76 out_be32(uhc_clkctrl, val);
77 i = 0;
78 while (!uhc_clkctrl_ready(in_be32(uhc_clkctrl))) {
79 udelay(10);
80 if (i++ > UHC_RESET_WAIT_MAX) {
81 printk(KERN_ERR "Failed to disable UHC reset %x\n",
82 in_be32(uhc_clkctrl));
83 break;
84 }
85 }
86
87 /* Endian Conversion Mode for Master ALL area */
88 out_be32(uhc_ecmode, SCC_UHC_ECMODE_BY_BYTE);
89
90 iounmap(uhc_base);
91}
92
93DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2,
94 PCI_DEVICE_ID_TOSHIBA_SCC_USB, enable_scc_uhc);
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
new file mode 100644
index 000000000000..5f4d0d933238
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -0,0 +1,193 @@
1/*
2 * Celleb setup code
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/cell/setup.c:
7 * Copyright (C) 1995 Linus Torvalds
8 * Adapted from 'alpha' version by Gary Thomas
9 * Modified by Cort Dougan (cort@cs.nmt.edu)
10 * Modified by PPC64 Team, IBM Corp
11 * Modified by Cell Team, IBM Deutschland Entwicklung GmbH
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 */
27
28#undef DEBUG
29
30#include <linux/cpu.h>
31#include <linux/sched.h>
32#include <linux/kernel.h>
33#include <linux/mm.h>
34#include <linux/stddef.h>
35#include <linux/unistd.h>
36#include <linux/reboot.h>
37#include <linux/init.h>
38#include <linux/delay.h>
39#include <linux/irq.h>
40#include <linux/seq_file.h>
41#include <linux/root_dev.h>
42#include <linux/console.h>
43
44#include <asm/mmu.h>
45#include <asm/processor.h>
46#include <asm/io.h>
47#include <asm/kexec.h>
48#include <asm/prom.h>
49#include <asm/machdep.h>
50#include <asm/cputable.h>
51#include <asm/irq.h>
52#include <asm/spu_priv1.h>
53#include <asm/firmware.h>
54#include <asm/of_platform.h>
55
56#include "interrupt.h"
57#include "beat_wrapper.h"
58#include "beat.h"
59#include "pci.h"
60
61static char celleb_machine_type[128] = "Celleb";
62
63static void celleb_show_cpuinfo(struct seq_file *m)
64{
65 struct device_node *root;
66 const char *model = "";
67
68 root = of_find_node_by_path("/");
69 if (root)
70 model = get_property(root, "model", NULL);
71 /* using "CHRP" is to trick anaconda into installing FCx into Celleb */
72 seq_printf(m, "machine\t\t: %s %s\n", celleb_machine_type, model);
73 of_node_put(root);
74}
75
76static int celleb_machine_type_hack(char *ptr)
77{
78 strncpy(celleb_machine_type, ptr, sizeof(celleb_machine_type));
79 celleb_machine_type[sizeof(celleb_machine_type)-1] = 0;
80 return 0;
81}
82
83__setup("celleb_machine_type_hack", celleb_machine_type_hack);
84
85static void celleb_progress(char *s, unsigned short hex)
86{
87 printk("*** %04x : %s\n", hex, s ? s : "");
88}
89
90static void __init celleb_setup_arch(void)
91{
92#ifdef CONFIG_SPU_BASE
93 spu_priv1_ops = &spu_priv1_beat_ops;
94 spu_management_ops = &spu_management_of_ops;
95#endif
96
97#ifdef CONFIG_SMP
98 smp_init_celleb();
99#endif
100
101 /* init to some ~sane value until calibrate_delay() runs */
102 loops_per_jiffy = 50000000;
103
104 if (ROOT_DEV == 0) {
105 printk("No ramdisk, default root is /dev/hda2\n");
106 ROOT_DEV = Root_HDA2;
107 }
108
109#ifdef CONFIG_DUMMY_CONSOLE
110 conswitchp = &dummy_con;
111#endif
112}
113
114static void beat_power_save(void)
115{
116 beat_pause(0);
117}
118
119static int __init celleb_probe(void)
120{
121 unsigned long root = of_get_flat_dt_root();
122
123 if (!of_flat_dt_is_compatible(root, "Beat"))
124 return 0;
125
126 powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE;
127 hpte_init_beat();
128 return 1;
129}
130
131/*
132 * Cell has no legacy IO; anything calling this function has to
133 * fail or bad things will happen
134 */
135static int celleb_check_legacy_ioport(unsigned int baseport)
136{
137 return -ENODEV;
138}
139
140#ifdef CONFIG_KEXEC
141static void celleb_kexec_cpu_down(int crash, int secondary)
142{
143 beatic_deinit_IRQ();
144}
145#endif
146
147static struct of_device_id celleb_bus_ids[] = {
148 { .type = "scc", },
149 { .type = "ioif", }, /* old style */
150 {},
151};
152
153static int __init celleb_publish_devices(void)
154{
155 if (!machine_is(celleb))
156 return 0;
157
158 /* Publish OF platform devices for southbridge IOs */
159 of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
160
161 return 0;
162}
163device_initcall(celleb_publish_devices);
164
165define_machine(celleb) {
166 .name = "Cell Reference Set",
167 .probe = celleb_probe,
168 .setup_arch = celleb_setup_arch,
169 .show_cpuinfo = celleb_show_cpuinfo,
170 .restart = beat_restart,
171 .power_off = beat_power_off,
172 .halt = beat_halt,
173 .get_rtc_time = beat_get_rtc_time,
174 .set_rtc_time = beat_set_rtc_time,
175 .calibrate_decr = generic_calibrate_decr,
176 .check_legacy_ioport = celleb_check_legacy_ioport,
177 .progress = celleb_progress,
178 .power_save = beat_power_save,
179 .nvram_size = beat_nvram_get_size,
180 .nvram_read = beat_nvram_read,
181 .nvram_write = beat_nvram_write,
182 .set_dabr = beat_set_xdabr,
183 .init_IRQ = beatic_init_IRQ,
184 .get_irq = beatic_get_irq,
185 .pci_probe_mode = celleb_pci_probe_mode,
186 .pci_setup_phb = celleb_setup_phb,
187#ifdef CONFIG_KEXEC
188 .kexec_cpu_down = celleb_kexec_cpu_down,
189 .machine_kexec = default_machine_kexec,
190 .machine_kexec_prepare = default_machine_kexec_prepare,
191 .machine_crash_shutdown = default_machine_crash_shutdown,
192#endif
193};
diff --git a/arch/powerpc/platforms/celleb/smp.c b/arch/powerpc/platforms/celleb/smp.c
new file mode 100644
index 000000000000..a7631250aeb4
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/smp.c
@@ -0,0 +1,124 @@
1/*
2 * SMP support for Celleb platform. (Incomplete)
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This code is based on arch/powerpc/platforms/cell/smp.c:
7 * Dave Engebretsen, Peter Bergner, and
8 * Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
9 * Plus various changes from other IBM teams...
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 */
25
26#undef DEBUG
27
28#include <linux/kernel.h>
29#include <linux/smp.h>
30#include <linux/interrupt.h>
31#include <linux/init.h>
32#include <linux/threads.h>
33#include <linux/cpu.h>
34
35#include <asm/irq.h>
36#include <asm/smp.h>
37#include <asm/machdep.h>
38#include <asm/udbg.h>
39
40#include "interrupt.h"
41
42#ifdef DEBUG
43#define DBG(fmt...) udbg_printf(fmt)
44#else
45#define DBG(fmt...)
46#endif
47
48/*
49 * The primary thread of each non-boot processor is recorded here before
50 * smp init.
51 */
52/* static cpumask_t of_spin_map; */
53
54/**
55 * smp_startup_cpu() - start the given cpu
56 *
57 * At boot time, there is nothing to do for primary threads which were
58 * started from Open Firmware. For anything else, call RTAS with the
59 * appropriate start location.
60 *
61 * Returns:
62 * 0 - failure
63 * 1 - success
64 */
65static inline int __devinit smp_startup_cpu(unsigned int lcpu)
66{
67 return 0;
68}
69
70static void smp_beatic_message_pass(int target, int msg)
71{
72 unsigned int i;
73
74 if (target < NR_CPUS) {
75 beatic_cause_IPI(target, msg);
76 } else {
77 for_each_online_cpu(i) {
78 if (target == MSG_ALL_BUT_SELF
79 && i == smp_processor_id())
80 continue;
81 beatic_cause_IPI(i, msg);
82 }
83 }
84}
85
86static int __init smp_beatic_probe(void)
87{
88 return cpus_weight(cpu_possible_map);
89}
90
91static void __devinit smp_beatic_setup_cpu(int cpu)
92{
93 beatic_setup_cpu(cpu);
94}
95
96static void __devinit smp_celleb_kick_cpu(int nr)
97{
98 BUG_ON(nr < 0 || nr >= NR_CPUS);
99
100 if (!smp_startup_cpu(nr))
101 return;
102}
103
104static int smp_celleb_cpu_bootable(unsigned int nr)
105{
106 return 1;
107}
108static struct smp_ops_t bpa_beatic_smp_ops = {
109 .message_pass = smp_beatic_message_pass,
110 .probe = smp_beatic_probe,
111 .kick_cpu = smp_celleb_kick_cpu,
112 .setup_cpu = smp_beatic_setup_cpu,
113 .cpu_bootable = smp_celleb_cpu_bootable,
114};
115
116/* This is called very early */
117void __init smp_init_celleb(void)
118{
119 DBG(" -> smp_init_celleb()\n");
120
121 smp_ops = &bpa_beatic_smp_ops;
122
123 DBG(" <- smp_init_celleb()\n");
124}
diff --git a/arch/powerpc/platforms/celleb/spu_priv1.c b/arch/powerpc/platforms/celleb/spu_priv1.c
new file mode 100644
index 000000000000..2bf6700f747a
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/spu_priv1.c
@@ -0,0 +1,208 @@
1/*
2 * spu hypervisor abstraction for Beat
3 *
4 * (C) Copyright 2006-2007 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/module.h>
22
23#include <asm/types.h>
24#include <asm/spu.h>
25#include <asm/spu_priv1.h>
26
27#include "beat_wrapper.h"
28
29static inline void _int_mask_set(struct spu *spu, int class, u64 mask)
30{
31 spu->shadow_int_mask_RW[class] = mask;
32 beat_set_irq_mask_for_spe(spu->spe_id, class, mask);
33}
34
35static inline u64 _int_mask_get(struct spu *spu, int class)
36{
37 return spu->shadow_int_mask_RW[class];
38}
39
40static void int_mask_set(struct spu *spu, int class, u64 mask)
41{
42 _int_mask_set(spu, class, mask);
43}
44
45static u64 int_mask_get(struct spu *spu, int class)
46{
47 return _int_mask_get(spu, class);
48}
49
50static void int_mask_and(struct spu *spu, int class, u64 mask)
51{
52 u64 old_mask;
53 old_mask = _int_mask_get(spu, class);
54 _int_mask_set(spu, class, old_mask & mask);
55}
56
57static void int_mask_or(struct spu *spu, int class, u64 mask)
58{
59 u64 old_mask;
60 old_mask = _int_mask_get(spu, class);
61 _int_mask_set(spu, class, old_mask | mask);
62}
63
64static void int_stat_clear(struct spu *spu, int class, u64 stat)
65{
66 beat_clear_interrupt_status_of_spe(spu->spe_id, class, stat);
67}
68
69static u64 int_stat_get(struct spu *spu, int class)
70{
71 u64 int_stat;
72 beat_get_interrupt_status_of_spe(spu->spe_id, class, &int_stat);
73 return int_stat;
74}
75
76static void cpu_affinity_set(struct spu *spu, int cpu)
77{
78 return;
79}
80
81static u64 mfc_dar_get(struct spu *spu)
82{
83 u64 dar;
84 beat_get_spe_privileged_state_1_registers(
85 spu->spe_id,
86 offsetof(struct spu_priv1, mfc_dar_RW), &dar);
87 return dar;
88}
89
90static u64 mfc_dsisr_get(struct spu *spu)
91{
92 u64 dsisr;
93 beat_get_spe_privileged_state_1_registers(
94 spu->spe_id,
95 offsetof(struct spu_priv1, mfc_dsisr_RW), &dsisr);
96 return dsisr;
97}
98
99static void mfc_dsisr_set(struct spu *spu, u64 dsisr)
100{
101 beat_set_spe_privileged_state_1_registers(
102 spu->spe_id,
103 offsetof(struct spu_priv1, mfc_dsisr_RW), dsisr);
104}
105
106static void mfc_sdr_setup(struct spu *spu)
107{
108 return;
109}
110
111static void mfc_sr1_set(struct spu *spu, u64 sr1)
112{
113 beat_set_spe_privileged_state_1_registers(
114 spu->spe_id,
115 offsetof(struct spu_priv1, mfc_sr1_RW), sr1);
116}
117
118static u64 mfc_sr1_get(struct spu *spu)
119{
120 u64 sr1;
121 beat_get_spe_privileged_state_1_registers(
122 spu->spe_id,
123 offsetof(struct spu_priv1, mfc_sr1_RW), &sr1);
124 return sr1;
125}
126
127static void mfc_tclass_id_set(struct spu *spu, u64 tclass_id)
128{
129 beat_set_spe_privileged_state_1_registers(
130 spu->spe_id,
131 offsetof(struct spu_priv1, mfc_tclass_id_RW), tclass_id);
132}
133
134static u64 mfc_tclass_id_get(struct spu *spu)
135{
136 u64 tclass_id;
137 beat_get_spe_privileged_state_1_registers(
138 spu->spe_id,
139 offsetof(struct spu_priv1, mfc_tclass_id_RW), &tclass_id);
140 return tclass_id;
141}
142
143static void tlb_invalidate(struct spu *spu)
144{
145 beat_set_spe_privileged_state_1_registers(
146 spu->spe_id,
147 offsetof(struct spu_priv1, tlb_invalidate_entry_W), 0ul);
148}
149
150static void resource_allocation_groupID_set(struct spu *spu, u64 id)
151{
152 beat_set_spe_privileged_state_1_registers(
153 spu->spe_id,
154 offsetof(struct spu_priv1, resource_allocation_groupID_RW),
155 id);
156}
157
158static u64 resource_allocation_groupID_get(struct spu *spu)
159{
160 u64 id;
161 beat_get_spe_privileged_state_1_registers(
162 spu->spe_id,
163 offsetof(struct spu_priv1, resource_allocation_groupID_RW),
164 &id);
165 return id;
166}
167
168static void resource_allocation_enable_set(struct spu *spu, u64 enable)
169{
170 beat_set_spe_privileged_state_1_registers(
171 spu->spe_id,
172 offsetof(struct spu_priv1, resource_allocation_enable_RW),
173 enable);
174}
175
176static u64 resource_allocation_enable_get(struct spu *spu)
177{
178 u64 enable;
179 beat_get_spe_privileged_state_1_registers(
180 spu->spe_id,
181 offsetof(struct spu_priv1, resource_allocation_enable_RW),
182 &enable);
183 return enable;
184}
185
186const struct spu_priv1_ops spu_priv1_beat_ops =
187{
188 .int_mask_and = int_mask_and,
189 .int_mask_or = int_mask_or,
190 .int_mask_set = int_mask_set,
191 .int_mask_get = int_mask_get,
192 .int_stat_clear = int_stat_clear,
193 .int_stat_get = int_stat_get,
194 .cpu_affinity_set = cpu_affinity_set,
195 .mfc_dar_get = mfc_dar_get,
196 .mfc_dsisr_get = mfc_dsisr_get,
197 .mfc_dsisr_set = mfc_dsisr_set,
198 .mfc_sdr_setup = mfc_sdr_setup,
199 .mfc_sr1_set = mfc_sr1_set,
200 .mfc_sr1_get = mfc_sr1_get,
201 .mfc_tclass_id_set = mfc_tclass_id_set,
202 .mfc_tclass_id_get = mfc_tclass_id_get,
203 .tlb_invalidate = tlb_invalidate,
204 .resource_allocation_groupID_set = resource_allocation_groupID_set,
205 .resource_allocation_groupID_get = resource_allocation_groupID_get,
206 .resource_allocation_enable_set = resource_allocation_enable_set,
207 .resource_allocation_enable_get = resource_allocation_enable_get,
208};
diff --git a/arch/powerpc/platforms/celleb/udbg_beat.c b/arch/powerpc/platforms/celleb/udbg_beat.c
new file mode 100644
index 000000000000..d888c4674c62
--- /dev/null
+++ b/arch/powerpc/platforms/celleb/udbg_beat.c
@@ -0,0 +1,97 @@
1/*
2 * udbg function for Beat
3 *
4 * (C) Copyright 2006 TOSHIBA CORPORATION
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/kernel.h>
22#include <linux/console.h>
23
24#include <asm/machdep.h>
25#include <asm/prom.h>
26#include <asm/udbg.h>
27
28#include "beat.h"
29
30#define celleb_vtermno 0
31
32static void udbg_putc_beat(char c)
33{
34 unsigned long rc;
35
36 if (c == '\n')
37 udbg_putc_beat('\r');
38
39 rc = beat_put_term_char(celleb_vtermno, 1, (uint64_t)c << 56, 0);
40}
41
42/* Buffered chars getc */
43static long inbuflen;
44static long inbuf[2]; /* must be 2 longs */
45
46static int udbg_getc_poll_beat(void)
47{
48 /* The interface is tricky because it may return up to 16 chars.
49 * We save them statically for future calls to udbg_getc().
50 */
51 char ch, *buf = (char *)inbuf;
52 int i;
53 long rc;
54 if (inbuflen == 0) {
55 /* get some more chars. */
56 inbuflen = 0;
57 rc = beat_get_term_char(celleb_vtermno, &inbuflen, inbuf+0, inbuf+1);
58 if (rc != 0)
59 inbuflen = 0; /* otherwise inbuflen is garbage */
60 }
61 if (inbuflen <= 0 || inbuflen > 16) {
62 /* Catch error case as well as other oddities (corruption) */
63 inbuflen = 0;
64 return -1;
65 }
66 ch = buf[0];
67 for (i = 1; i < inbuflen; i++) /* shuffle them down. */
68 buf[i-1] = buf[i];
69 inbuflen--;
70 return ch;
71}
72
73static int udbg_getc_beat(void)
74{
75 int ch;
76 for (;;) {
77 ch = udbg_getc_poll_beat();
78 if (ch == -1) {
79 /* This shouldn't be needed...but... */
80 volatile unsigned long delay;
81 for (delay=0; delay < 2000000; delay++)
82 ;
83 } else {
84 return ch;
85 }
86 }
87}
88
89/* call this from early_init() for a working debug console on
90 * vterm capable LPAR machines
91 */
92void __init udbg_init_debug_beat(void)
93{
94 udbg_putc = udbg_putc_beat;
95 udbg_getc = udbg_getc_beat;
96 udbg_getc_poll = udbg_getc_poll_beat;
97}
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index e1f51d455984..117c9a0055bd 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -75,7 +75,7 @@ extern irqreturn_t xmon_irq(int, void *);
75extern unsigned long loops_per_jiffy; 75extern unsigned long loops_per_jiffy;
76 76
77/* To be replaced by RTAS when available */ 77/* To be replaced by RTAS when available */
78static unsigned int *briq_SPOR; 78static unsigned int __iomem *briq_SPOR;
79 79
80#ifdef CONFIG_SMP 80#ifdef CONFIG_SMP
81extern struct smp_ops_t chrp_smp_ops; 81extern struct smp_ops_t chrp_smp_ops;
@@ -267,7 +267,7 @@ void __init chrp_setup_arch(void)
267 } else if (machine && strncmp(machine, "TotalImpact,BRIQ-1", 18) == 0) { 267 } else if (machine && strncmp(machine, "TotalImpact,BRIQ-1", 18) == 0) {
268 _chrp_type = _CHRP_briq; 268 _chrp_type = _CHRP_briq;
269 /* Map the SPOR register on briq and change the restart hook */ 269 /* Map the SPOR register on briq and change the restart hook */
270 briq_SPOR = (unsigned int *)ioremap(0xff0000e8, 4); 270 briq_SPOR = ioremap(0xff0000e8, 4);
271 ppc_md.restart = briq_restart; 271 ppc_md.restart = briq_restart;
272 } else { 272 } else {
273 /* Let's assume it is an IBM chrp if all else fails */ 273 /* Let's assume it is an IBM chrp if all else fails */
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index b3c2ce4cb7a8..886c522d78e9 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -104,15 +104,6 @@ config RADSTONE_PPC7D
104config PAL4 104config PAL4
105 bool "SBS-Palomar4" 105 bool "SBS-Palomar4"
106 106
107config GEMINI
108 bool "Synergy-Gemini"
109 select PPC_INDIRECT_PCI
110 depends on BROKEN
111 help
112 Select Gemini if configuring for a Synergy Microsystems' Gemini
113 series Single Board Computer. More information is available at:
114 <http://www.synergymicro.com/PressRel/97_10_15.html>.
115
116config EST8260 107config EST8260
117 bool "EST8260" 108 bool "EST8260"
118 ---help--- 109 ---help---
diff --git a/arch/powerpc/platforms/embedded6xx/linkstation.c b/arch/powerpc/platforms/embedded6xx/linkstation.c
index 61599d919ea8..3f6c4114f908 100644
--- a/arch/powerpc/platforms/embedded6xx/linkstation.c
+++ b/arch/powerpc/platforms/embedded6xx/linkstation.c
@@ -13,7 +13,6 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
15#include <linux/initrd.h> 15#include <linux/initrd.h>
16#include <linux/root_dev.h>
17#include <linux/mtd/physmap.h> 16#include <linux/mtd/physmap.h>
18 17
19#include <asm/time.h> 18#include <asm/time.h>
@@ -91,17 +90,6 @@ static void __init linkstation_setup_arch(void)
91 ARRAY_SIZE(linkstation_physmap_partitions)); 90 ARRAY_SIZE(linkstation_physmap_partitions));
92#endif 91#endif
93 92
94#ifdef CONFIG_BLK_DEV_INITRD
95 if (initrd_start)
96 ROOT_DEV = Root_RAM0;
97 else
98#endif
99#ifdef CONFIG_ROOT_NFS
100 ROOT_DEV = Root_NFS;
101#else
102 ROOT_DEV = Root_HDA1;
103#endif
104
105 /* Lookup PCI host bridges */ 93 /* Lookup PCI host bridges */
106 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) 94 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
107 add_bridge(np); 95 add_bridge(np);
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index c1f4502a3c6a..91df52a1899a 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -308,7 +308,7 @@ static int proc_lpevents_open(struct inode *inode, struct file *file)
308 return single_open(file, proc_lpevents_show, NULL); 308 return single_open(file, proc_lpevents_show, NULL);
309} 309}
310 310
311static struct file_operations proc_lpevents_operations = { 311static const struct file_operations proc_lpevents_operations = {
312 .open = proc_lpevents_open, 312 .open = proc_lpevents_open,
313 .read = seq_read, 313 .read = seq_read,
314 .llseek = seq_lseek, 314 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 1ad0e4aaad1a..b1187d95e3b2 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1224,7 +1224,7 @@ out:
1224 return rc; 1224 return rc;
1225} 1225}
1226 1226
1227static struct file_operations proc_vmlinux_operations = { 1227static const struct file_operations proc_vmlinux_operations = {
1228 .write = proc_mf_change_vmlinux, 1228 .write = proc_mf_change_vmlinux,
1229}; 1229};
1230 1230
@@ -1253,7 +1253,6 @@ static int __init mf_proc_init(void)
1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf); 1253 ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
1254 if (!ent) 1254 if (!ent)
1255 return 1; 1255 return 1;
1256 ent->nlink = 1;
1257 ent->data = (void *)(long)i; 1256 ent->data = (void *)(long)i;
1258 ent->read_proc = proc_mf_dump_cmdline; 1257 ent->read_proc = proc_mf_dump_cmdline;
1259 ent->write_proc = proc_mf_change_cmdline; 1258 ent->write_proc = proc_mf_change_cmdline;
@@ -1264,7 +1263,6 @@ static int __init mf_proc_init(void)
1264 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf); 1263 ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
1265 if (!ent) 1264 if (!ent)
1266 return 1; 1265 return 1;
1267 ent->nlink = 1;
1268 ent->data = (void *)(long)i; 1266 ent->data = (void *)(long)i;
1269 ent->proc_fops = &proc_vmlinux_operations; 1267 ent->proc_fops = &proc_vmlinux_operations;
1270 } 1268 }
@@ -1272,7 +1270,6 @@ static int __init mf_proc_init(void)
1272 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1270 ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1273 if (!ent) 1271 if (!ent)
1274 return 1; 1272 return 1;
1275 ent->nlink = 1;
1276 ent->data = (void *)0; 1273 ent->data = (void *)0;
1277 ent->read_proc = proc_mf_dump_side; 1274 ent->read_proc = proc_mf_dump_side;
1278 ent->write_proc = proc_mf_change_side; 1275 ent->write_proc = proc_mf_change_side;
@@ -1280,7 +1277,6 @@ static int __init mf_proc_init(void)
1280 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root); 1277 ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
1281 if (!ent) 1278 if (!ent)
1282 return 1; 1279 return 1;
1283 ent->nlink = 1;
1284 ent->data = (void *)0; 1280 ent->data = (void *)0;
1285 ent->read_proc = proc_mf_dump_src; 1281 ent->read_proc = proc_mf_dump_src;
1286 ent->write_proc = proc_mf_change_src; 1282 ent->write_proc = proc_mf_change_src;
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index b54e37101e69..f2cde4180204 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -101,7 +101,7 @@ static int proc_titantod_open(struct inode *inode, struct file *file)
101 return single_open(file, proc_titantod_show, NULL); 101 return single_open(file, proc_titantod_show, NULL);
102} 102}
103 103
104static struct file_operations proc_titantod_operations = { 104static const struct file_operations proc_titantod_operations = {
105 .open = proc_titantod_open, 105 .open = proc_titantod_open,
106 .read = seq_read, 106 .read = seq_read,
107 .llseek = seq_lseek, 107 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index a6799ed34a66..e2100ece9c65 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -173,7 +173,7 @@ static int proc_viopath_open(struct inode *inode, struct file *file)
173 return single_open(file, proc_viopath_show, NULL); 173 return single_open(file, proc_viopath_show, NULL);
174} 174}
175 175
176static struct file_operations proc_viopath_operations = { 176static const struct file_operations proc_viopath_operations = {
177 .open = proc_viopath_open, 177 .open = proc_viopath_open,
178 .read = seq_read, 178 .read = seq_read,
179 .llseek = seq_lseek, 179 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 3f6a69f67195..73c59904697f 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -425,14 +425,6 @@ static void __init setup_u4_pcie(struct pci_controller* hose)
425 hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); 425 hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
426 hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000); 426 hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000);
427 427
428 /* The bus contains a bridge from root -> device, we need to
429 * make it visible on bus 0 so that we pick the right type
430 * of config cycles. If we didn't, we would have to force all
431 * config cycles to be type 1. So we override the "bus-range"
432 * property here
433 */
434 hose->first_busno = 0x00;
435 hose->last_busno = 0xff;
436 u4_pcie = hose; 428 u4_pcie = hose;
437} 429}
438 430
@@ -560,13 +552,16 @@ void __init maple_pci_init(void)
560 return; 552 return;
561 } 553 }
562 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { 554 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) {
563 if (np->name == NULL) 555 if (!np->type)
564 continue; 556 continue;
565 if (!strcmp(np->name, "pci") || !strcmp(np->name, "pcie")) { 557 if (strcmp(np->type, "pci") && strcmp(np->type, "ht"))
566 if (add_bridge(np) == 0) 558 continue;
567 of_node_get(np); 559 if ((device_is_compatible(np, "u4-pcie") ||
568 } 560 device_is_compatible(np, "u3-agp")) &&
569 if (strcmp(np->name, "ht") == 0) { 561 add_bridge(np) == 0)
562 of_node_get(np);
563
564 if (device_is_compatible(np, "u3-ht")) {
570 of_node_get(np); 565 of_node_get(np);
571 ht = np; 566 ht = np;
572 } 567 }
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 50855d4fd5a0..82d3f9e28d7c 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -62,6 +62,7 @@
62#include <asm/mpic.h> 62#include <asm/mpic.h>
63#include <asm/rtas.h> 63#include <asm/rtas.h>
64#include <asm/udbg.h> 64#include <asm/udbg.h>
65#include <asm/nvram.h>
65 66
66#include "maple.h" 67#include "maple.h"
67 68
@@ -195,6 +196,8 @@ void __init maple_setup_arch(void)
195 maple_use_rtas_reboot_and_halt_if_present(); 196 maple_use_rtas_reboot_and_halt_if_present();
196 197
197 printk(KERN_DEBUG "Using native/NAP idle loop\n"); 198 printk(KERN_DEBUG "Using native/NAP idle loop\n");
199
200 mmio_nvram_init();
198} 201}
199 202
200/* 203/*
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
new file mode 100644
index 000000000000..68dc529dfd2f
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -0,0 +1,10 @@
1menu "PA Semi PWRficient options"
2 depends on PPC_PASEMI
3
4config PPC_PASEMI_IOMMU
5 bool "PA Semi IOMMU support"
6 depends on PPC_PASEMI
7 help
8 IOMMU support for PA6T-1682M
9
10endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index 1be1a993c5f5..e657ccae90a9 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1 +1,2 @@
1obj-y += setup.o pci.o time.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o
2
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
new file mode 100644
index 000000000000..1ca3ff381591
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -0,0 +1,88 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#undef DEBUG
22
23#include <linux/kernel.h>
24#include <linux/string.h>
25
26#include <asm/machdep.h>
27#include <asm/reg.h>
28
29#include "pasemi.h"
30
31struct sleep_mode {
32 char *name;
33 void (*entry)(void);
34};
35
36static struct sleep_mode modes[] = {
37 { .name = "spin", .entry = &idle_spin },
38 { .name = "doze", .entry = &idle_doze },
39};
40
41static int current_mode = 0;
42
43static int pasemi_system_reset_exception(struct pt_regs *regs)
44{
45 /* If we were woken up from power savings, we need to return
46 * to the calling function, since nip is not saved across
47 * all modes.
48 */
49
50 if (regs->msr & SRR1_WAKEMASK)
51 regs->nip = regs->link;
52
53 switch (regs->msr & SRR1_WAKEMASK) {
54 case SRR1_WAKEEE:
55 do_IRQ(regs);
56 break;
57 case SRR1_WAKEDEC:
58 timer_interrupt(regs);
59 break;
60 default:
61 /* do system reset */
62 return 0;
63 }
64 /* everything handled */
65 regs->msr |= MSR_RI;
66 return 1;
67}
68
69void __init pasemi_idle_init(void)
70{
71 ppc_md.system_reset_exception = pasemi_system_reset_exception;
72 ppc_md.power_save = modes[current_mode].entry;
73 printk(KERN_INFO "Using PA6T idle loop (%s)\n", modes[current_mode].name);
74}
75
76static int __init idle_param(char *p)
77{
78 int i;
79 for (i = 0; i < sizeof(modes)/sizeof(struct sleep_mode); i++) {
80 if (!strcmp(modes[i].name, p)) {
81 current_mode = i;
82 break;
83 }
84 }
85 return 0;
86}
87
88early_param("idle", idle_param);
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
new file mode 100644
index 000000000000..459a53b7d24d
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -0,0 +1,281 @@
1/*
2 * Copyright (C) 2005-2007, PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#undef DEBUG
21
22#include <linux/types.h>
23#include <linux/spinlock.h>
24#include <linux/pci.h>
25#include <asm/iommu.h>
26#include <asm/machdep.h>
27#include <asm/abs_addr.h>
28
29
30#define IOBMAP_PAGE_SHIFT 12
31#define IOBMAP_PAGE_SIZE (1 << IOBMAP_PAGE_SHIFT)
32#define IOBMAP_PAGE_MASK (IOBMAP_PAGE_SIZE - 1)
33
34#define IOBMAP_PAGE_FACTOR (PAGE_SHIFT - IOBMAP_PAGE_SHIFT)
35
36#define IOB_BASE 0xe0000000
37#define IOB_SIZE 0x3000
38/* Configuration registers */
39#define IOBCAP_REG 0x10
40#define IOBCOM_REG 0x40
41/* Enable IOB address translation */
42#define IOBCOM_ATEN 0x00000100
43
44/* Address decode configuration register */
45#define IOB_AD_REG 0x53
46/* IOBCOM_AD_REG fields */
47#define IOB_AD_VGPRT 0x00000e00
48#define IOB_AD_VGAEN 0x00000100
49/* Direct mapping settings */
50#define IOB_AD_MPSEL_MASK 0x00000030
51#define IOB_AD_MPSEL_B38 0x00000000
52#define IOB_AD_MPSEL_B40 0x00000010
53#define IOB_AD_MPSEL_B42 0x00000020
54/* Translation window size / enable */
55#define IOB_AD_TRNG_MASK 0x00000003
56#define IOB_AD_TRNG_256M 0x00000000
57#define IOB_AD_TRNG_2G 0x00000001
58#define IOB_AD_TRNG_128G 0x00000003
59
60#define IOB_TABLEBASE_REG 0x55
61
62/* Base of the 64 4-byte L1 registers */
63#define IOB_XLT_L1_REGBASE 0xac0
64
65/* Register to invalidate TLB entries */
66#define IOB_AT_INVAL_TLB_REG 0xb40
67
68/* The top two bits of the level 1 entry contains valid and type flags */
69#define IOBMAP_L1E_V 0x40000000
70#define IOBMAP_L1E_V_B 0x80000000
71
72/* For big page entries, the bottom two bits contains flags */
73#define IOBMAP_L1E_BIG_CACHED 0x00000002
74#define IOBMAP_L1E_BIG_PRIORITY 0x00000001
75
76/* For regular level 2 entries, top 2 bits contain valid and cache flags */
77#define IOBMAP_L2E_V 0x80000000
78#define IOBMAP_L2E_V_CACHED 0xc0000000
79
80static u32 *iob;
81static u32 iob_l1_emptyval;
82static u32 iob_l2_emptyval;
83static u32 *iob_l2_base;
84
85static struct iommu_table iommu_table_iobmap;
86static int iommu_table_iobmap_inited;
87
88static void iobmap_build(struct iommu_table *tbl, long index,
89 long npages, unsigned long uaddr,
90 enum dma_data_direction direction)
91{
92 u32 *ip;
93 u32 rpn;
94 unsigned long bus_addr;
95
96 pr_debug("iobmap: build at: %lx, %lx, addr: %lx\n", index, npages, uaddr);
97
98 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
99
100 npages <<= IOBMAP_PAGE_FACTOR;
101 index <<= IOBMAP_PAGE_FACTOR;
102
103 ip = ((u32 *)tbl->it_base) + index;
104
105 while (npages--) {
106 rpn = virt_to_abs(uaddr) >> IOBMAP_PAGE_SHIFT;
107
108 *(ip++) = IOBMAP_L2E_V | rpn;
109 /* invalidate tlb, can be optimized more */
110 out_le32(iob+IOB_AT_INVAL_TLB_REG, bus_addr >> 14);
111
112 uaddr += IOBMAP_PAGE_SIZE;
113 bus_addr += IOBMAP_PAGE_SIZE;
114 }
115}
116
117
118static void iobmap_free(struct iommu_table *tbl, long index,
119 long npages)
120{
121 u32 *ip;
122 unsigned long bus_addr;
123
124 pr_debug("iobmap: free at: %lx, %lx\n", index, npages);
125
126 bus_addr = (tbl->it_offset + index) << PAGE_SHIFT;
127
128 npages <<= IOBMAP_PAGE_FACTOR;
129 index <<= IOBMAP_PAGE_FACTOR;
130
131 ip = ((u32 *)tbl->it_base) + index;
132
133 while (npages--) {
134 *(ip++) = iob_l2_emptyval;
135 /* invalidate tlb, can be optimized more */
136 out_le32(iob+IOB_AT_INVAL_TLB_REG, bus_addr >> 14);
137 bus_addr += IOBMAP_PAGE_SIZE;
138 }
139}
140
141
142static void iommu_table_iobmap_setup(void)
143{
144 pr_debug(" -> %s\n", __func__);
145 iommu_table_iobmap.it_busno = 0;
146 iommu_table_iobmap.it_offset = 0;
147 /* it_size is in number of entries */
148 iommu_table_iobmap.it_size = 0x80000000 >> PAGE_SHIFT;
149
150 /* Initialize the common IOMMU code */
151 iommu_table_iobmap.it_base = (unsigned long)iob_l2_base;
152 iommu_table_iobmap.it_index = 0;
153 /* XXXOJN tune this to avoid IOB cache invals.
154 * Should probably be 8 (64 bytes)
155 */
156 iommu_table_iobmap.it_blocksize = 4;
157 iommu_init_table(&iommu_table_iobmap, 0);
158 pr_debug(" <- %s\n", __func__);
159}
160
161
162
163static void pci_dma_bus_setup_pasemi(struct pci_bus *bus)
164{
165 struct device_node *dn;
166
167 pr_debug("pci_dma_bus_setup, bus %p, bus->self %p\n", bus, bus->self);
168
169 if (!iommu_table_iobmap_inited) {
170 iommu_table_iobmap_inited = 1;
171 iommu_table_iobmap_setup();
172 }
173
174 dn = pci_bus_to_OF_node(bus);
175
176 if (dn)
177 PCI_DN(dn)->iommu_table = &iommu_table_iobmap;
178
179}
180
181
182static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
183{
184 pr_debug("pci_dma_dev_setup, dev %p (%s)\n", dev, pci_name(dev));
185
186 /* DMA device is untranslated, but all other PCI-e goes through
187 * the IOMMU
188 */
189 if (dev->vendor == 0x1959 && dev->device == 0xa007)
190 dev->dev.archdata.dma_ops = &dma_direct_ops;
191 else
192 dev->dev.archdata.dma_data = &iommu_table_iobmap;
193}
194
195static void pci_dma_bus_setup_null(struct pci_bus *b) { }
196static void pci_dma_dev_setup_null(struct pci_dev *d) { }
197
198int iob_init(struct device_node *dn)
199{
200 unsigned long tmp;
201 u32 regword;
202 int i;
203
204 pr_debug(" -> %s\n", __func__);
205
206 /* Allocate a spare page to map all invalid IOTLB pages. */
207 tmp = lmb_alloc(IOBMAP_PAGE_SIZE, IOBMAP_PAGE_SIZE);
208 if (!tmp)
209 panic("IOBMAP: Cannot allocate spare page!");
210 /* Empty l1 is marked invalid */
211 iob_l1_emptyval = 0;
212 /* Empty l2 is mapped to dummy page */
213 iob_l2_emptyval = IOBMAP_L2E_V | (tmp >> IOBMAP_PAGE_SHIFT);
214
215 iob = ioremap(IOB_BASE, IOB_SIZE);
216 if (!iob)
217 panic("IOBMAP: Cannot map registers!");
218
219 /* setup direct mapping of the L1 entries */
220 for (i = 0; i < 64; i++) {
221 /* Each L1 covers 32MB, i.e. 8K entries = 32K of ram */
222 regword = IOBMAP_L1E_V | (__pa(iob_l2_base + i*0x2000) >> 12);
223 out_le32(iob+IOB_XLT_L1_REGBASE+i, regword);
224 }
225
226 /* set 2GB translation window, based at 0 */
227 regword = in_le32(iob+IOB_AD_REG);
228 regword &= ~IOB_AD_TRNG_MASK;
229 regword |= IOB_AD_TRNG_2G;
230 out_le32(iob+IOB_AD_REG, regword);
231
232 /* Enable translation */
233 regword = in_le32(iob+IOBCOM_REG);
234 regword |= IOBCOM_ATEN;
235 out_le32(iob+IOBCOM_REG, regword);
236
237 pr_debug(" <- %s\n", __func__);
238
239 return 0;
240}
241
242
243/* These are called very early. */
244void iommu_init_early_pasemi(void)
245{
246 int iommu_off;
247
248#ifndef CONFIG_PPC_PASEMI_IOMMU
249 iommu_off = 1;
250#else
251 iommu_off = of_chosen &&
252 get_property(of_chosen, "linux,iommu-off", NULL);
253#endif
254 if (iommu_off) {
255 /* Direct I/O, IOMMU off */
256 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null;
257 ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null;
258 pci_dma_ops = &dma_direct_ops;
259
260 return;
261 }
262
263 iob_init(NULL);
264
265 ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_pasemi;
266 ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi;
267 ppc_md.tce_build = iobmap_build;
268 ppc_md.tce_free = iobmap_free;
269 pci_dma_ops = &dma_iommu_ops;
270}
271
272void __init alloc_iobmap_l2(void)
273{
274#ifndef CONFIG_PPC_PASEMI_IOMMU
275 return;
276#endif
277 /* For 2G space, 8x64 pages (2^21 bytes) is max total l2 size */
278 iob_l2_base = (u32 *)abs_to_virt(lmb_alloc_base(1UL<<21, 1UL<<21, 0x80000000));
279
280 printk(KERN_INFO "IOBMAP L2 allocated at: %p\n", iob_l2_base);
281}
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index 51c2a2397ecf..2d3927e6edb0 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -3,5 +3,17 @@
3 3
4extern unsigned long pas_get_boot_time(void); 4extern unsigned long pas_get_boot_time(void);
5extern void pas_pci_init(void); 5extern void pas_pci_init(void);
6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev);
7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev);
8
9extern void __init alloc_iobmap_l2(void);
10
11extern void __init pasemi_idle_init(void);
12
13/* Power savings modes, implemented in asm */
14extern void idle_spin(void);
15extern void idle_doze(void);
16
17
6 18
7#endif /* _PASEMI_PASEMI_H */ 19#endif /* _PASEMI_PASEMI_H */
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index faa618e04047..7ecb2ba24db9 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -163,6 +163,19 @@ static void __init pas_fixup_phb_resources(void)
163} 163}
164 164
165 165
166void __devinit pas_pci_irq_fixup(struct pci_dev *dev)
167{
168 /* DMA is special, 84 interrupts (128 -> 211), all but 128
169 * need to be mapped by hand here.
170 */
171 if (dev->vendor == 0x1959 && dev->device == 0xa007) {
172 int i;
173 for (i = 129; i < 212; i++)
174 irq_create_mapping(NULL, i);
175 }
176}
177
178
166void __init pas_pci_init(void) 179void __init pas_pci_init(void)
167{ 180{
168 struct device_node *np, *root; 181 struct device_node *np, *root;
diff --git a/arch/powerpc/platforms/pasemi/powersave.S b/arch/powerpc/platforms/pasemi/powersave.S
new file mode 100644
index 000000000000..6d0fba6aab17
--- /dev/null
+++ b/arch/powerpc/platforms/pasemi/powersave.S
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) 2006-2007 PA Semi, Inc
3 *
4 * Maintained by: Olof Johansson <olof@lixom.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21#include <asm/processor.h>
22#include <asm/page.h>
23#include <asm/ppc_asm.h>
24#include <asm/cputable.h>
25#include <asm/cache.h>
26#include <asm/thread_info.h>
27#include <asm/asm-offsets.h>
28
29/* Power savings opcodes since not all binutils have them at this time */
30#define DOZE .long 0x4c000324
31#define NAP .long 0x4c000364
32#define SLEEP .long 0x4c0003a4
33#define RVW .long 0x4c0003e4
34
35/* Common sequence to do before going to any of the
36 * powersavings modes.
37 */
38
39#define PRE_SLEEP_SEQUENCE \
40 std r3,8(r1); \
41 ptesync ; \
42 ld r3,8(r1); \
431: cmpd r3,r3; \
44 bne 1b
45
46_doze:
47 PRE_SLEEP_SEQUENCE
48 DOZE
49 b .
50
51
52_GLOBAL(idle_spin)
53 blr
54
55_GLOBAL(idle_doze)
56 LOAD_REG_ADDR(r3, _doze)
57 b sleep_common
58
59/* Add more modes here later */
60
61sleep_common:
62 mflr r0
63 std r0, 16(r1)
64 stdu r1,-64(r1)
65
66 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
67 mfmsr r4
68 andc r5,r4,r6
69 mtmsrd r5,0
70
71 mtctr r3
72 bctrl
73
74 mtmsrd r4,0
75
76 addi r1,r1,64
77 ld r0,16(r1)
78 mtlr r0
79 blr
80
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index bea7d1bb1a3b..449cf1a08291 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2006 PA Semi, Inc 2 * Copyright (C) 2006-2007 PA Semi, Inc
3 * 3 *
4 * Authors: Kip Walker, PA Semi 4 * Authors: Kip Walker, PA Semi
5 * Olof Johansson, PA Semi 5 * Olof Johansson, PA Semi
@@ -38,31 +38,46 @@
38 38
39#include "pasemi.h" 39#include "pasemi.h"
40 40
41static void __iomem *reset_reg;
42
41static void pas_restart(char *cmd) 43static void pas_restart(char *cmd)
42{ 44{
43 printk("restart unimplemented, looping...\n"); 45 printk("Restarting...\n");
44 for (;;) ; 46 while (1)
47 out_le32(reset_reg, 0x6000000);
45} 48}
46 49
47static void pas_power_off(void) 50#ifdef CONFIG_SMP
51static DEFINE_SPINLOCK(timebase_lock);
52
53static void __devinit pas_give_timebase(void)
48{ 54{
49 printk("power off unimplemented, looping...\n"); 55 unsigned long tb;
50 for (;;) ; 56
57 spin_lock(&timebase_lock);
58 mtspr(SPRN_TBCTL, TBCTL_FREEZE);
59 tb = mftb();
60 mtspr(SPRN_TBCTL, TBCTL_UPDATE_LOWER | (tb & 0xffffffff));
61 mtspr(SPRN_TBCTL, TBCTL_UPDATE_UPPER | (tb >> 32));
62 mtspr(SPRN_TBCTL, TBCTL_RESTART);
63 spin_unlock(&timebase_lock);
64 pr_debug("pas_give_timebase: cpu %d gave tb %lx\n",
65 smp_processor_id(), tb);
51} 66}
52 67
53static void pas_halt(void) 68static void __devinit pas_take_timebase(void)
54{ 69{
55 pas_power_off(); 70 pr_debug("pas_take_timebase: cpu %d has tb %lx\n",
71 smp_processor_id(), mftb());
56} 72}
57 73
58#ifdef CONFIG_SMP
59struct smp_ops_t pas_smp_ops = { 74struct smp_ops_t pas_smp_ops = {
60 .probe = smp_mpic_probe, 75 .probe = smp_mpic_probe,
61 .message_pass = smp_mpic_message_pass, 76 .message_pass = smp_mpic_message_pass,
62 .kick_cpu = smp_generic_kick_cpu, 77 .kick_cpu = smp_generic_kick_cpu,
63 .setup_cpu = smp_mpic_setup_cpu, 78 .setup_cpu = smp_mpic_setup_cpu,
64 .give_timebase = smp_generic_give_timebase, 79 .give_timebase = pas_give_timebase,
65 .take_timebase = smp_generic_take_timebase, 80 .take_timebase = pas_take_timebase,
66}; 81};
67#endif /* CONFIG_SMP */ 82#endif /* CONFIG_SMP */
68 83
@@ -72,9 +87,6 @@ void __init pas_setup_arch(void)
72 /* Setup SMP callback */ 87 /* Setup SMP callback */
73 smp_ops = &pas_smp_ops; 88 smp_ops = &pas_smp_ops;
74#endif 89#endif
75 /* no iommu yet */
76 pci_dma_ops = &dma_direct_ops;
77
78 /* Lookup PCI hosts */ 90 /* Lookup PCI hosts */
79 pas_pci_init(); 91 pas_pci_init();
80 92
@@ -82,7 +94,11 @@ void __init pas_setup_arch(void)
82 conswitchp = &dummy_con; 94 conswitchp = &dummy_con;
83#endif 95#endif
84 96
85 printk(KERN_DEBUG "Using default idle loop\n"); 97 /* Remap SDC register for doing reset */
98 /* XXXOJN This should maybe come out of the device tree */
99 reset_reg = ioremap(0xfc101100, 4);
100
101 pasemi_idle_init();
86} 102}
87 103
88/* No legacy IO on our parts */ 104/* No legacy IO on our parts */
@@ -130,8 +146,9 @@ static __init void pas_init_IRQ(void)
130 openpic_addr = of_read_number(opprop, naddr); 146 openpic_addr = of_read_number(opprop, naddr);
131 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 147 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
132 148
133 mpic = mpic_alloc(mpic_node, openpic_addr, MPIC_PRIMARY, 0, 0, 149 mpic = mpic_alloc(mpic_node, openpic_addr,
134 " PAS-OPIC "); 150 MPIC_PRIMARY|MPIC_LARGE_VECTORS,
151 0, 0, " PAS-OPIC ");
135 BUG_ON(!mpic); 152 BUG_ON(!mpic);
136 153
137 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000); 154 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
@@ -146,6 +163,53 @@ static void __init pas_progress(char *s, unsigned short hex)
146} 163}
147 164
148 165
166static int pas_machine_check_handler(struct pt_regs *regs)
167{
168 int cpu = smp_processor_id();
169 unsigned long srr0, srr1, dsisr;
170
171 srr0 = regs->nip;
172 srr1 = regs->msr;
173 dsisr = mfspr(SPRN_DSISR);
174 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
175 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
176 printk(KERN_ERR "DSISR 0x%016lx DAR 0x%016lx\n", dsisr, regs->dar);
177 printk(KERN_ERR "Cause:\n");
178
179 if (srr1 & 0x200000)
180 printk(KERN_ERR "Signalled by SDC\n");
181 if (srr1 & 0x100000) {
182 printk(KERN_ERR "Load/Store detected error:\n");
183 if (dsisr & 0x8000)
184 printk(KERN_ERR "D-cache ECC double-bit error or bus error\n");
185 if (dsisr & 0x4000)
186 printk(KERN_ERR "LSU snoop response error\n");
187 if (dsisr & 0x2000)
188 printk(KERN_ERR "MMU SLB multi-hit or invalid B field\n");
189 if (dsisr & 0x1000)
190 printk(KERN_ERR "Recoverable Duptags\n");
191 if (dsisr & 0x800)
192 printk(KERN_ERR "Recoverable D-cache parity error count overflow\n");
193 if (dsisr & 0x400)
194 printk(KERN_ERR "TLB parity error count overflow\n");
195 }
196 if (srr1 & 0x80000)
197 printk(KERN_ERR "Bus Error\n");
198 if (srr1 & 0x40000)
199 printk(KERN_ERR "I-side SLB multiple hit\n");
200 if (srr1 & 0x20000)
201 printk(KERN_ERR "I-cache parity error hit\n");
202
203 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
204 return !!(srr1 & 0x2);
205}
206
207static void __init pas_init_early(void)
208{
209 iommu_init_early_pasemi();
210}
211
212
149/* 213/*
150 * Called very early, MMU is off, device-tree isn't unflattened 214 * Called very early, MMU is off, device-tree isn't unflattened
151 */ 215 */
@@ -158,6 +222,8 @@ static int __init pas_probe(void)
158 222
159 hpte_init_native(); 223 hpte_init_native();
160 224
225 alloc_iobmap_l2();
226
161 return 1; 227 return 1;
162} 228}
163 229
@@ -165,13 +231,14 @@ define_machine(pas) {
165 .name = "PA Semi PA6T-1682M", 231 .name = "PA Semi PA6T-1682M",
166 .probe = pas_probe, 232 .probe = pas_probe,
167 .setup_arch = pas_setup_arch, 233 .setup_arch = pas_setup_arch,
234 .init_early = pas_init_early,
168 .init_IRQ = pas_init_IRQ, 235 .init_IRQ = pas_init_IRQ,
169 .get_irq = mpic_get_irq, 236 .get_irq = mpic_get_irq,
170 .restart = pas_restart, 237 .restart = pas_restart,
171 .power_off = pas_power_off,
172 .halt = pas_halt,
173 .get_boot_time = pas_get_boot_time, 238 .get_boot_time = pas_get_boot_time,
174 .calibrate_decr = generic_calibrate_decr, 239 .calibrate_decr = generic_calibrate_decr,
175 .check_legacy_ioport = pas_check_legacy_ioport, 240 .check_legacy_ioport = pas_check_legacy_ioport,
176 .progress = pas_progress, 241 .progress = pas_progress,
242 .machine_check_exception = pas_machine_check_handler,
243 .pci_irq_fixup = pas_pci_irq_fixup,
177}; 244};
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 39db12890214..5e5c0e4add91 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -305,8 +305,6 @@ static int pmac_pic_host_map(struct irq_host *h, unsigned int virq,
305 level = !!(level_mask[hw >> 5] & (1UL << (hw & 0x1f))); 305 level = !!(level_mask[hw >> 5] & (1UL << (hw & 0x1f)));
306 if (level) 306 if (level)
307 desc->status |= IRQ_LEVEL; 307 desc->status |= IRQ_LEVEL;
308 else
309 desc->status |= IRQ_DELAYED_DISABLE;
310 set_irq_chip_and_handler(virq, &pmac_pic, level ? 308 set_irq_chip_and_handler(virq, &pmac_pic, level ?
311 handle_level_irq : handle_edge_irq); 309 handle_level_irq : handle_edge_irq);
312 return 0; 310 return 0;
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index d949e9df41ef..651fa424ea06 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -506,8 +506,8 @@ void note_bootable_part(dev_t dev, int part, int goodness)
506 if ((goodness <= current_root_goodness) && 506 if ((goodness <= current_root_goodness) &&
507 ROOT_DEV != DEFAULT_ROOT_DEVICE) 507 ROOT_DEV != DEFAULT_ROOT_DEVICE)
508 return; 508 return;
509 p = strstr(saved_command_line, "root="); 509 p = strstr(boot_command_line, "root=");
510 if (p != NULL && (p == saved_command_line || p[-1] == ' ')) 510 if (p != NULL && (p == boot_command_line || p[-1] == ' '))
511 return; 511 return;
512 512
513 if (!found_boot) { 513 if (!found_boot) {
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index eeb2ae5ffc58..d73fb73802bb 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -795,7 +795,6 @@ static void __devinit smp_core99_kick_cpu(int nr)
795 ppc_md.progress("smp_core99_kick_cpu", 0x346); 795 ppc_md.progress("smp_core99_kick_cpu", 0x346);
796 796
797 local_irq_save(flags); 797 local_irq_save(flags);
798 local_irq_disable();
799 798
800 /* Save reset vector */ 799 /* Save reset vector */
801 save_vector = *vector; 800 save_vector = *vector;
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index de52ec4e9e58..d270a1e374d5 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -51,4 +51,25 @@ config PS3_VUART
51 including the System Manager and AV Settings. In 51 including the System Manager and AV Settings. In
52 general, all users will say Y. 52 general, all users will say Y.
53 53
54config PS3_PS3AV
55 tristate "PS3 AV settings driver"
56 depends on PPC_PS3
57 select PS3_VUART
58 default y
59 help
60 Include support for the PS3 AV Settings driver.
61
62 This support is required for graphics and sound. In
63 general, all users will say Y or M.
64
65config PS3_SYS_MANAGER
66 bool "PS3 System Manager driver"
67 select PS3_VUART
68 default y
69 help
70 Include support for the PS3 System Manager.
71
72 This support is required for system control. In
73 general, all users will say Y.
74
54endmenu 75endmenu
diff --git a/arch/powerpc/platforms/ps3/Makefile b/arch/powerpc/platforms/ps3/Makefile
index 1994904f580f..a0048fcf0866 100644
--- a/arch/powerpc/platforms/ps3/Makefile
+++ b/arch/powerpc/platforms/ps3/Makefile
@@ -1,5 +1,6 @@
1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o 1obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o
2obj-y += interrupt.o exports.o os-area.o 2obj-y += interrupt.o exports.o os-area.o
3obj-y += system-bus.o
3 4
4obj-$(CONFIG_SMP) += smp.o 5obj-$(CONFIG_SMP) += smp.o
5obj-$(CONFIG_SPU_BASE) += spu.o 6obj-$(CONFIG_SPU_BASE) += spu.o
diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc/platforms/ps3/htab.c
index 8fe1769655a3..e12e59fea13a 100644
--- a/arch/powerpc/platforms/ps3/htab.c
+++ b/arch/powerpc/platforms/ps3/htab.c
@@ -2,7 +2,7 @@
2 * PS3 pagetable management routines. 2 * PS3 pagetable management routines.
3 * 3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc. 4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp. 5 * Copyright 2006, 2007 Sony Corporation
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -23,8 +23,8 @@
23#include <asm/machdep.h> 23#include <asm/machdep.h>
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27#include <asm/lv1call.h> 26#include <asm/lv1call.h>
27#include <asm/ps3fb.h>
28 28
29#include "platform.h" 29#include "platform.h"
30 30
@@ -234,6 +234,9 @@ static void ps3_hpte_invalidate(unsigned long slot, unsigned long va,
234 234
235static void ps3_hpte_clear(void) 235static void ps3_hpte_clear(void)
236{ 236{
237 /* Make sure to clean up the frame buffer device first */
238 ps3fb_cleanup();
239
237 lv1_unmap_htab(htab_addr); 240 lv1_unmap_htab(htab_addr);
238} 241}
239 242
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 6f5de438b980..631c30095617 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -24,7 +24,6 @@
24 24
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/udbg.h> 26#include <asm/udbg.h>
27#include <asm/ps3.h>
28#include <asm/lv1call.h> 27#include <asm/lv1call.h>
29 28
30#include "platform.h" 29#include "platform.h"
@@ -36,15 +35,148 @@
36#endif 35#endif
37 36
38/** 37/**
38 * struct ps3_bmp - a per cpu irq status and mask bitmap structure
39 * @status: 256 bit status bitmap indexed by plug
40 * @unused_1:
41 * @mask: 256 bit mask bitmap indexed by plug
42 * @unused_2:
43 * @lock:
44 * @ipi_debug_brk_mask:
45 *
46 * The HV mantains per SMT thread mappings of HV outlet to HV plug on
47 * behalf of the guest. These mappings are implemented as 256 bit guest
48 * supplied bitmaps indexed by plug number. The addresses of the bitmaps
49 * are registered with the HV through lv1_configure_irq_state_bitmap().
50 * The HV requires that the 512 bits of status + mask not cross a page
51 * boundary. PS3_BMP_MINALIGN is used to define this minimal 64 byte
52 * alignment.
53 *
54 * The HV supports 256 plugs per thread, assigned as {0..255}, for a total
55 * of 512 plugs supported on a processor. To simplify the logic this
56 * implementation equates HV plug value to Linux virq value, constrains each
57 * interrupt to have a system wide unique plug number, and limits the range
58 * of the plug values to map into the first dword of the bitmaps. This
59 * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note
60 * that there is no constraint on how many in this set an individual thread
61 * can acquire.
62 */
63
64#define PS3_BMP_MINALIGN 64
65
66struct ps3_bmp {
67 struct {
68 u64 status;
69 u64 unused_1[3];
70 u64 mask;
71 u64 unused_2[3];
72 };
73 u64 ipi_debug_brk_mask;
74 spinlock_t lock;
75};
76
77/**
78 * struct ps3_private - a per cpu data structure
79 * @bmp: ps3_bmp structure
80 * @node: HV logical_ppe_id
81 * @cpu: HV thread_id
82 */
83
84struct ps3_private {
85 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
86 u64 node;
87 unsigned int cpu;
88};
89
90static DEFINE_PER_CPU(struct ps3_private, ps3_private);
91
92int ps3_alloc_irq(enum ps3_cpu_binding cpu, unsigned long outlet,
93 unsigned int *virq)
94{
95 int result;
96 struct ps3_private *pd;
97
98 /* This defines the default interrupt distribution policy. */
99
100 if (cpu == PS3_BINDING_CPU_ANY)
101 cpu = 0;
102
103 pd = &per_cpu(ps3_private, cpu);
104
105 *virq = irq_create_mapping(NULL, outlet);
106
107 if (*virq == NO_IRQ) {
108 pr_debug("%s:%d: irq_create_mapping failed: outlet %lu\n",
109 __func__, __LINE__, outlet);
110 result = -ENOMEM;
111 goto fail_create;
112 }
113
114 /* Binds outlet to cpu + virq. */
115
116 result = lv1_connect_irq_plug_ext(pd->node, pd->cpu, *virq, outlet, 0);
117
118 if (result) {
119 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
120 __func__, __LINE__, ps3_result(result));
121 result = -EPERM;
122 goto fail_connect;
123 }
124
125 pr_debug("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__,
126 outlet, cpu, *virq);
127
128 result = set_irq_chip_data(*virq, pd);
129
130 if (result) {
131 pr_debug("%s:%d: set_irq_chip_data failed\n",
132 __func__, __LINE__);
133 goto fail_set;
134 }
135
136 return result;
137
138fail_set:
139 lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, *virq);
140fail_connect:
141 irq_dispose_mapping(*virq);
142fail_create:
143 return result;
144}
145EXPORT_SYMBOL_GPL(ps3_alloc_irq);
146
147int ps3_free_irq(unsigned int virq)
148{
149 int result;
150 const struct ps3_private *pd = get_irq_chip_data(virq);
151
152 pr_debug("%s:%d: node %lu, cpu %d, virq %u\n", __func__, __LINE__,
153 pd->node, pd->cpu, virq);
154
155 result = lv1_disconnect_irq_plug_ext(pd->node, pd->cpu, virq);
156
157 if (result)
158 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
159 __func__, __LINE__, ps3_result(result));
160
161 set_irq_chip_data(virq, NULL);
162 irq_dispose_mapping(virq);
163 return result;
164}
165EXPORT_SYMBOL_GPL(ps3_free_irq);
166
167/**
39 * ps3_alloc_io_irq - Assign a virq to a system bus device. 168 * ps3_alloc_io_irq - Assign a virq to a system bus device.
40 * interrupt_id: The device interrupt id read from the system repository. 169 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
170 * serviced on.
171 * @interrupt_id: The device interrupt id read from the system repository.
41 * @virq: The assigned Linux virq. 172 * @virq: The assigned Linux virq.
42 * 173 *
43 * An io irq represents a non-virtualized device interrupt. interrupt_id 174 * An io irq represents a non-virtualized device interrupt. interrupt_id
44 * coresponds to the interrupt number of the interrupt controller. 175 * coresponds to the interrupt number of the interrupt controller.
45 */ 176 */
46 177
47int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq) 178int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
179 unsigned int *virq)
48{ 180{
49 int result; 181 int result;
50 unsigned long outlet; 182 unsigned long outlet;
@@ -57,13 +189,12 @@ int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq)
57 return result; 189 return result;
58 } 190 }
59 191
60 *virq = irq_create_mapping(NULL, outlet); 192 result = ps3_alloc_irq(cpu, outlet, virq);
61 193 BUG_ON(result);
62 pr_debug("%s:%d: interrupt_id %u => outlet %lu, virq %u\n",
63 __func__, __LINE__, interrupt_id, outlet, *virq);
64 194
65 return 0; 195 return result;
66} 196}
197EXPORT_SYMBOL_GPL(ps3_alloc_io_irq);
67 198
68int ps3_free_io_irq(unsigned int virq) 199int ps3_free_io_irq(unsigned int virq)
69{ 200{
@@ -75,13 +206,16 @@ int ps3_free_io_irq(unsigned int virq)
75 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 206 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
76 __func__, __LINE__, ps3_result(result)); 207 __func__, __LINE__, ps3_result(result));
77 208
78 irq_dispose_mapping(virq); 209 ps3_free_irq(virq);
79 210
80 return result; 211 return result;
81} 212}
213EXPORT_SYMBOL_GPL(ps3_free_io_irq);
82 214
83/** 215/**
84 * ps3_alloc_event_irq - Allocate a virq for use with a system event. 216 * ps3_alloc_event_irq - Allocate a virq for use with a system event.
217 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
218 * serviced on.
85 * @virq: The assigned Linux virq. 219 * @virq: The assigned Linux virq.
86 * 220 *
87 * The virq can be used with lv1_connect_interrupt_event_receive_port() to 221 * The virq can be used with lv1_connect_interrupt_event_receive_port() to
@@ -89,7 +223,7 @@ int ps3_free_io_irq(unsigned int virq)
89 * events. 223 * events.
90 */ 224 */
91 225
92int ps3_alloc_event_irq(unsigned int *virq) 226int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq)
93{ 227{
94 int result; 228 int result;
95 unsigned long outlet; 229 unsigned long outlet;
@@ -103,12 +237,10 @@ int ps3_alloc_event_irq(unsigned int *virq)
103 return result; 237 return result;
104 } 238 }
105 239
106 *virq = irq_create_mapping(NULL, outlet); 240 result = ps3_alloc_irq(cpu, outlet, virq);
107 241 BUG_ON(result);
108 pr_debug("%s:%d: outlet %lu, virq %u\n", __func__, __LINE__, outlet,
109 *virq);
110 242
111 return 0; 243 return result;
112} 244}
113 245
114int ps3_free_event_irq(unsigned int virq) 246int ps3_free_event_irq(unsigned int virq)
@@ -123,7 +255,7 @@ int ps3_free_event_irq(unsigned int virq)
123 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 255 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
124 __func__, __LINE__, ps3_result(result)); 256 __func__, __LINE__, ps3_result(result));
125 257
126 irq_dispose_mapping(virq); 258 ps3_free_irq(virq);
127 259
128 pr_debug(" <- %s:%d\n", __func__, __LINE__); 260 pr_debug(" <- %s:%d\n", __func__, __LINE__);
129 return result; 261 return result;
@@ -136,6 +268,8 @@ int ps3_send_event_locally(unsigned int virq)
136 268
137/** 269/**
138 * ps3_connect_event_irq - Assign a virq to a system bus device. 270 * ps3_connect_event_irq - Assign a virq to a system bus device.
271 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
272 * serviced on.
139 * @did: The HV device identifier read from the system repository. 273 * @did: The HV device identifier read from the system repository.
140 * @interrupt_id: The device interrupt id read from the system repository. 274 * @interrupt_id: The device interrupt id read from the system repository.
141 * @virq: The assigned Linux virq. 275 * @virq: The assigned Linux virq.
@@ -144,12 +278,13 @@ int ps3_send_event_locally(unsigned int virq)
144 * coresponds to the software interrupt number. 278 * coresponds to the software interrupt number.
145 */ 279 */
146 280
147int ps3_connect_event_irq(const struct ps3_device_id *did, 281int ps3_connect_event_irq(enum ps3_cpu_binding cpu,
148 unsigned int interrupt_id, unsigned int *virq) 282 const struct ps3_device_id *did, unsigned int interrupt_id,
283 unsigned int *virq)
149{ 284{
150 int result; 285 int result;
151 286
152 result = ps3_alloc_event_irq(virq); 287 result = ps3_alloc_event_irq(cpu, virq);
153 288
154 if (result) 289 if (result)
155 return result; 290 return result;
@@ -196,6 +331,8 @@ int ps3_disconnect_event_irq(const struct ps3_device_id *did,
196 331
197/** 332/**
198 * ps3_alloc_vuart_irq - Configure the system virtual uart virq. 333 * ps3_alloc_vuart_irq - Configure the system virtual uart virq.
334 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
335 * serviced on.
199 * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap. 336 * @virt_addr_bmp: The caller supplied virtual uart interrupt bitmap.
200 * @virq: The assigned Linux virq. 337 * @virq: The assigned Linux virq.
201 * 338 *
@@ -203,13 +340,14 @@ int ps3_disconnect_event_irq(const struct ps3_device_id *did,
203 * freeing the interrupt will return a wrong state error. 340 * freeing the interrupt will return a wrong state error.
204 */ 341 */
205 342
206int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq) 343int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
344 unsigned int *virq)
207{ 345{
208 int result; 346 int result;
209 unsigned long outlet; 347 unsigned long outlet;
210 unsigned long lpar_addr; 348 u64 lpar_addr;
211 349
212 BUG_ON(!is_kernel_addr((unsigned long)virt_addr_bmp)); 350 BUG_ON(!is_kernel_addr((u64)virt_addr_bmp));
213 351
214 lpar_addr = ps3_mm_phys_to_lpar(__pa(virt_addr_bmp)); 352 lpar_addr = ps3_mm_phys_to_lpar(__pa(virt_addr_bmp));
215 353
@@ -221,12 +359,10 @@ int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq)
221 return result; 359 return result;
222 } 360 }
223 361
224 *virq = irq_create_mapping(NULL, outlet); 362 result = ps3_alloc_irq(cpu, outlet, virq);
225 363 BUG_ON(result);
226 pr_debug("%s:%d: outlet %lu, virq %u\n", __func__, __LINE__,
227 outlet, *virq);
228 364
229 return 0; 365 return result;
230} 366}
231 367
232int ps3_free_vuart_irq(unsigned int virq) 368int ps3_free_vuart_irq(unsigned int virq)
@@ -241,21 +377,23 @@ int ps3_free_vuart_irq(unsigned int virq)
241 return result; 377 return result;
242 } 378 }
243 379
244 irq_dispose_mapping(virq); 380 ps3_free_irq(virq);
245 381
246 return result; 382 return result;
247} 383}
248 384
249/** 385/**
250 * ps3_alloc_spe_irq - Configure an spe virq. 386 * ps3_alloc_spe_irq - Configure an spe virq.
387 * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be
388 * serviced on.
251 * @spe_id: The spe_id returned from lv1_construct_logical_spe(). 389 * @spe_id: The spe_id returned from lv1_construct_logical_spe().
252 * @class: The spe interrupt class {0,1,2}. 390 * @class: The spe interrupt class {0,1,2}.
253 * @virq: The assigned Linux virq. 391 * @virq: The assigned Linux virq.
254 * 392 *
255 */ 393 */
256 394
257int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class, 395int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id,
258 unsigned int *virq) 396 unsigned int class, unsigned int *virq)
259{ 397{
260 int result; 398 int result;
261 unsigned long outlet; 399 unsigned long outlet;
@@ -270,73 +408,24 @@ int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class,
270 return result; 408 return result;
271 } 409 }
272 410
273 *virq = irq_create_mapping(NULL, outlet); 411 result = ps3_alloc_irq(cpu, outlet, virq);
274 412 BUG_ON(result);
275 pr_debug("%s:%d: spe_id %lu, class %u, outlet %lu, virq %u\n",
276 __func__, __LINE__, spe_id, class, outlet, *virq);
277 413
278 return 0; 414 return result;
279} 415}
280 416
281int ps3_free_spe_irq(unsigned int virq) 417int ps3_free_spe_irq(unsigned int virq)
282{ 418{
283 irq_dispose_mapping(virq); 419 ps3_free_irq(virq);
284 return 0; 420 return 0;
285} 421}
286 422
423
287#define PS3_INVALID_OUTLET ((irq_hw_number_t)-1) 424#define PS3_INVALID_OUTLET ((irq_hw_number_t)-1)
288#define PS3_PLUG_MAX 63 425#define PS3_PLUG_MAX 63
289 426
290/**
291 * struct bmp - a per cpu irq status and mask bitmap structure
292 * @status: 256 bit status bitmap indexed by plug
293 * @unused_1:
294 * @mask: 256 bit mask bitmap indexed by plug
295 * @unused_2:
296 * @lock:
297 * @ipi_debug_brk_mask:
298 *
299 * The HV mantains per SMT thread mappings of HV outlet to HV plug on
300 * behalf of the guest. These mappings are implemented as 256 bit guest
301 * supplied bitmaps indexed by plug number. The address of the bitmaps are
302 * registered with the HV through lv1_configure_irq_state_bitmap().
303 *
304 * The HV supports 256 plugs per thread, assigned as {0..255}, for a total
305 * of 512 plugs supported on a processor. To simplify the logic this
306 * implementation equates HV plug value to linux virq value, constrains each
307 * interrupt to have a system wide unique plug number, and limits the range
308 * of the plug values to map into the first dword of the bitmaps. This
309 * gives a usable range of plug values of {NUM_ISA_INTERRUPTS..63}. Note
310 * that there is no constraint on how many in this set an individual thread
311 * can aquire.
312 */
313
314struct bmp {
315 struct {
316 unsigned long status;
317 unsigned long unused_1[3];
318 unsigned long mask;
319 unsigned long unused_2[3];
320 } __attribute__ ((packed));
321 spinlock_t lock;
322 unsigned long ipi_debug_brk_mask;
323};
324
325/**
326 * struct private - a per cpu data structure
327 * @node: HV node id
328 * @cpu: HV thread id
329 * @bmp: an HV bmp structure
330 */
331
332struct private {
333 unsigned long node;
334 unsigned int cpu;
335 struct bmp bmp;
336};
337
338#if defined(DEBUG) 427#if defined(DEBUG)
339static void _dump_64_bmp(const char *header, const unsigned long *p, unsigned cpu, 428static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
340 const char* func, int line) 429 const char* func, int line)
341{ 430{
342 pr_debug("%s:%d: %s %u {%04lx_%04lx_%04lx_%04lx}\n", 431 pr_debug("%s:%d: %s %u {%04lx_%04lx_%04lx_%04lx}\n",
@@ -346,14 +435,14 @@ static void _dump_64_bmp(const char *header, const unsigned long *p, unsigned cp
346} 435}
347 436
348static void __attribute__ ((unused)) _dump_256_bmp(const char *header, 437static void __attribute__ ((unused)) _dump_256_bmp(const char *header,
349 const unsigned long *p, unsigned cpu, const char* func, int line) 438 const u64 *p, unsigned cpu, const char* func, int line)
350{ 439{
351 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n", 440 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n",
352 func, line, header, cpu, p[0], p[1], p[2], p[3]); 441 func, line, header, cpu, p[0], p[1], p[2], p[3]);
353} 442}
354 443
355#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__) 444#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__)
356static void _dump_bmp(struct private* pd, const char* func, int line) 445static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
357{ 446{
358 unsigned long flags; 447 unsigned long flags;
359 448
@@ -364,7 +453,7 @@ static void _dump_bmp(struct private* pd, const char* func, int line)
364} 453}
365 454
366#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 455#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
367static void __attribute__ ((unused)) _dump_mask(struct private* pd, 456static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd,
368 const char* func, int line) 457 const char* func, int line)
369{ 458{
370 unsigned long flags; 459 unsigned long flags;
@@ -374,109 +463,94 @@ static void __attribute__ ((unused)) _dump_mask(struct private* pd,
374 spin_unlock_irqrestore(&pd->bmp.lock, flags); 463 spin_unlock_irqrestore(&pd->bmp.lock, flags);
375} 464}
376#else 465#else
377static void dump_bmp(struct private* pd) {}; 466static void dump_bmp(struct ps3_private* pd) {};
378#endif /* defined(DEBUG) */ 467#endif /* defined(DEBUG) */
379 468
380static void chip_mask(unsigned int virq) 469static void ps3_chip_mask(unsigned int virq)
381{ 470{
471 struct ps3_private *pd = get_irq_chip_data(virq);
472 u64 bit = 0x8000000000000000UL >> virq;
473 u64 *p = &pd->bmp.mask;
474 u64 old;
382 unsigned long flags; 475 unsigned long flags;
383 struct private *pd = get_irq_chip_data(virq);
384 476
385 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 477 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
386 478
387 BUG_ON(virq < NUM_ISA_INTERRUPTS); 479 local_irq_save(flags);
388 BUG_ON(virq > PS3_PLUG_MAX); 480 asm volatile(
389 481 "1: ldarx %0,0,%3\n"
390 spin_lock_irqsave(&pd->bmp.lock, flags); 482 "andc %0,%0,%2\n"
391 pd->bmp.mask &= ~(0x8000000000000000UL >> virq); 483 "stdcx. %0,0,%3\n"
392 spin_unlock_irqrestore(&pd->bmp.lock, flags); 484 "bne- 1b"
485 : "=&r" (old), "+m" (*p)
486 : "r" (bit), "r" (p)
487 : "cc" );
393 488
394 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 489 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
490 local_irq_restore(flags);
395} 491}
396 492
397static void chip_unmask(unsigned int virq) 493static void ps3_chip_unmask(unsigned int virq)
398{ 494{
495 struct ps3_private *pd = get_irq_chip_data(virq);
496 u64 bit = 0x8000000000000000UL >> virq;
497 u64 *p = &pd->bmp.mask;
498 u64 old;
399 unsigned long flags; 499 unsigned long flags;
400 struct private *pd = get_irq_chip_data(virq);
401 500
402 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 501 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
403 502
404 BUG_ON(virq < NUM_ISA_INTERRUPTS); 503 local_irq_save(flags);
405 BUG_ON(virq > PS3_PLUG_MAX); 504 asm volatile(
406 505 "1: ldarx %0,0,%3\n"
407 spin_lock_irqsave(&pd->bmp.lock, flags); 506 "or %0,%0,%2\n"
408 pd->bmp.mask |= (0x8000000000000000UL >> virq); 507 "stdcx. %0,0,%3\n"
409 spin_unlock_irqrestore(&pd->bmp.lock, flags); 508 "bne- 1b"
509 : "=&r" (old), "+m" (*p)
510 : "r" (bit), "r" (p)
511 : "cc" );
410 512
411 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 513 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
514 local_irq_restore(flags);
412} 515}
413 516
414static void chip_eoi(unsigned int virq) 517static void ps3_chip_eoi(unsigned int virq)
415{ 518{
416 lv1_end_of_interrupt(virq); 519 const struct ps3_private *pd = get_irq_chip_data(virq);
520 lv1_end_of_interrupt_ext(pd->node, pd->cpu, virq);
417} 521}
418 522
419static struct irq_chip irq_chip = { 523static struct irq_chip irq_chip = {
420 .typename = "ps3", 524 .typename = "ps3",
421 .mask = chip_mask, 525 .mask = ps3_chip_mask,
422 .unmask = chip_unmask, 526 .unmask = ps3_chip_unmask,
423 .eoi = chip_eoi, 527 .eoi = ps3_chip_eoi,
424}; 528};
425 529
426static void host_unmap(struct irq_host *h, unsigned int virq) 530static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
427{ 531{
428 int result; 532 set_irq_chip_data(virq, NULL);
429
430 pr_debug("%s:%d: virq %d\n", __func__, __LINE__, virq);
431
432 lv1_disconnect_irq_plug(virq);
433
434 result = set_irq_chip_data(virq, NULL);
435 BUG_ON(result);
436} 533}
437 534
438static DEFINE_PER_CPU(struct private, private); 535static int ps3_host_map(struct irq_host *h, unsigned int virq,
439
440static int host_map(struct irq_host *h, unsigned int virq,
441 irq_hw_number_t hwirq) 536 irq_hw_number_t hwirq)
442{ 537{
443 int result; 538 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq,
444 unsigned int cpu;
445
446 pr_debug(" -> %s:%d\n", __func__, __LINE__);
447 pr_debug("%s:%d: hwirq %lu => virq %u\n", __func__, __LINE__, hwirq,
448 virq); 539 virq);
449 540
450 /* bind this virq to a cpu */
451
452 preempt_disable();
453 cpu = smp_processor_id();
454 result = lv1_connect_irq_plug(virq, hwirq);
455 preempt_enable();
456
457 if (result) {
458 pr_info("%s:%d: lv1_connect_irq_plug failed:"
459 " %s\n", __func__, __LINE__, ps3_result(result));
460 return -EPERM;
461 }
462
463 result = set_irq_chip_data(virq, &per_cpu(private, cpu));
464 BUG_ON(result);
465
466 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq); 541 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq);
467 542
468 pr_debug(" <- %s:%d\n", __func__, __LINE__); 543 return 0;
469 return result;
470} 544}
471 545
472static struct irq_host_ops host_ops = { 546static struct irq_host_ops ps3_host_ops = {
473 .map = host_map, 547 .map = ps3_host_map,
474 .unmap = host_unmap, 548 .unmap = ps3_host_unmap,
475}; 549};
476 550
477void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) 551void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
478{ 552{
479 struct private *pd = &per_cpu(private, cpu); 553 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
480 554
481 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; 555 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq;
482 556
@@ -484,57 +558,32 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
484 cpu, virq, pd->bmp.ipi_debug_brk_mask); 558 cpu, virq, pd->bmp.ipi_debug_brk_mask);
485} 559}
486 560
487static int bmp_get_and_clear_status_bit(struct bmp *m) 561unsigned int ps3_get_irq(void)
488{ 562{
489 unsigned long flags; 563 struct ps3_private *pd = &__get_cpu_var(ps3_private);
490 unsigned int bit; 564 u64 x = (pd->bmp.status & pd->bmp.mask);
491 unsigned long x; 565 unsigned int plug;
492
493 spin_lock_irqsave(&m->lock, flags);
494 566
495 /* check for ipi break first to stop this cpu ASAP */ 567 /* check for ipi break first to stop this cpu ASAP */
496 568
497 if (m->status & m->ipi_debug_brk_mask) { 569 if (x & pd->bmp.ipi_debug_brk_mask)
498 m->status &= ~m->ipi_debug_brk_mask; 570 x &= pd->bmp.ipi_debug_brk_mask;
499 spin_unlock_irqrestore(&m->lock, flags);
500 return __ilog2(m->ipi_debug_brk_mask);
501 }
502
503 x = (m->status & m->mask);
504 571
505 for (bit = NUM_ISA_INTERRUPTS, x <<= bit; x; bit++, x <<= 1) 572 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x));
506 if (x & 0x8000000000000000UL) { 573 plug &= 0x3f;
507 m->status &= ~(0x8000000000000000UL >> bit);
508 spin_unlock_irqrestore(&m->lock, flags);
509 return bit;
510 }
511 574
512 spin_unlock_irqrestore(&m->lock, flags); 575 if (unlikely(plug) == NO_IRQ) {
513
514 pr_debug("%s:%d: not found\n", __func__, __LINE__);
515 return -1;
516}
517
518unsigned int ps3_get_irq(void)
519{
520 int plug;
521
522 struct private *pd = &__get_cpu_var(private);
523
524 plug = bmp_get_and_clear_status_bit(&pd->bmp);
525
526 if (plug < 1) {
527 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 576 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__,
528 pd->cpu); 577 pd->cpu);
529 dump_bmp(&per_cpu(private, 0)); 578 dump_bmp(&per_cpu(ps3_private, 0));
530 dump_bmp(&per_cpu(private, 1)); 579 dump_bmp(&per_cpu(ps3_private, 1));
531 return NO_IRQ; 580 return NO_IRQ;
532 } 581 }
533 582
534#if defined(DEBUG) 583#if defined(DEBUG)
535 if (plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX) { 584 if (unlikely(plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX)) {
536 dump_bmp(&per_cpu(private, 0)); 585 dump_bmp(&per_cpu(ps3_private, 0));
537 dump_bmp(&per_cpu(private, 1)); 586 dump_bmp(&per_cpu(ps3_private, 1));
538 BUG(); 587 BUG();
539 } 588 }
540#endif 589#endif
@@ -544,26 +593,27 @@ unsigned int ps3_get_irq(void)
544void __init ps3_init_IRQ(void) 593void __init ps3_init_IRQ(void)
545{ 594{
546 int result; 595 int result;
547 unsigned long node;
548 unsigned cpu; 596 unsigned cpu;
549 struct irq_host *host; 597 struct irq_host *host;
550 598
551 lv1_get_logical_ppe_id(&node); 599 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
552
553 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &host_ops,
554 PS3_INVALID_OUTLET); 600 PS3_INVALID_OUTLET);
555 irq_set_default_host(host); 601 irq_set_default_host(host);
556 irq_set_virq_count(PS3_PLUG_MAX + 1); 602 irq_set_virq_count(PS3_PLUG_MAX + 1);
557 603
558 for_each_possible_cpu(cpu) { 604 for_each_possible_cpu(cpu) {
559 struct private *pd = &per_cpu(private, cpu); 605 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
560 606
561 pd->node = node; 607 lv1_get_logical_ppe_id(&pd->node);
562 pd->cpu = cpu; 608 pd->cpu = get_hard_smp_processor_id(cpu);
563 spin_lock_init(&pd->bmp.lock); 609 spin_lock_init(&pd->bmp.lock);
564 610
565 result = lv1_configure_irq_state_bitmap(node, cpu, 611 pr_debug("%s:%d: node %lu, cpu %d, bmp %lxh\n", __func__,
566 ps3_mm_phys_to_lpar(__pa(&pd->bmp.status))); 612 __LINE__, pd->node, pd->cpu,
613 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
614
615 result = lv1_configure_irq_state_bitmap(pd->node, pd->cpu,
616 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
567 617
568 if (result) 618 if (result)
569 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 619 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 49c0d010d491..42354de3f557 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -25,7 +25,6 @@
25#include <asm/firmware.h> 25#include <asm/firmware.h>
26#include <asm/lmb.h> 26#include <asm/lmb.h>
27#include <asm/udbg.h> 27#include <asm/udbg.h>
28#include <asm/ps3.h>
29#include <asm/lv1call.h> 28#include <asm/lv1call.h>
30 29
31#include "platform.h" 30#include "platform.h"
diff --git a/arch/powerpc/platforms/ps3/os-area.c b/arch/powerpc/platforms/ps3/os-area.c
index 58358305dc10..5c3da08bc0c4 100644
--- a/arch/powerpc/platforms/ps3/os-area.c
+++ b/arch/powerpc/platforms/ps3/os-area.c
@@ -22,7 +22,6 @@
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <asm/lmb.h> 24#include <asm/lmb.h>
25#include <asm/ps3.h>
26 25
27#include "platform.h" 26#include "platform.h"
28 27
@@ -59,7 +58,7 @@ struct os_area_header {
59 u32 ldr_format; 58 u32 ldr_format;
60 u32 ldr_size; 59 u32 ldr_size;
61 u32 _reserved_2[6]; 60 u32 _reserved_2[6];
62} __attribute__ ((packed)); 61};
63 62
64enum { 63enum {
65 PARAM_BOOT_FLAG_GAME_OS = 0, 64 PARAM_BOOT_FLAG_GAME_OS = 0,
@@ -67,13 +66,6 @@ enum {
67}; 66};
68 67
69enum { 68enum {
70 PARAM_AV_MULTI_OUT_NTSC = 0,
71 PARAM_AV_MULTI_OUT_PAL_RGB = 1,
72 PARAM_AV_MULTI_OUT_PAL_YCBCR = 2,
73 PARAM_AV_MULTI_OUT_SECAM = 3,
74};
75
76enum {
77 PARAM_CTRL_BUTTON_O_IS_YES = 0, 69 PARAM_CTRL_BUTTON_O_IS_YES = 0,
78 PARAM_CTRL_BUTTON_X_IS_YES = 1, 70 PARAM_CTRL_BUTTON_X_IS_YES = 1,
79}; 71};
@@ -114,7 +106,7 @@ struct os_area_params {
114 u8 dns_primary[4]; 106 u8 dns_primary[4];
115 u8 dns_secondary[4]; 107 u8 dns_secondary[4];
116 u8 _reserved_5[8]; 108 u8 _reserved_5[8];
117} __attribute__ ((packed)); 109};
118 110
119/** 111/**
120 * struct saved_params - Static working copies of data from the 'Other OS' area. 112 * struct saved_params - Static working copies of data from the 'Other OS' area.
@@ -257,3 +249,13 @@ u64 ps3_os_area_rtc_diff(void)
257{ 249{
258 return saved_params.rtc_diff ? saved_params.rtc_diff : 946684800UL; 250 return saved_params.rtc_diff ? saved_params.rtc_diff : 946684800UL;
259} 251}
252
253/**
254 * ps3_os_area_get_av_multi_out - Returns the default video mode.
255 */
256
257enum ps3_param_av_multi_out ps3_os_area_get_av_multi_out(void)
258{
259 return saved_params.av_multi_out;
260}
261EXPORT_SYMBOL_GPL(ps3_os_area_get_av_multi_out);
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 23b111bea9d0..ca04f03305c7 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -22,6 +22,9 @@
22#define _PS3_PLATFORM_H 22#define _PS3_PLATFORM_H
23 23
24#include <linux/rtc.h> 24#include <linux/rtc.h>
25#include <scsi/scsi.h>
26
27#include <asm/ps3.h>
25 28
26/* htab */ 29/* htab */
27 30
@@ -65,4 +68,152 @@ void ps3_spu_set_platform (void);
65static inline void ps3_spu_set_platform (void) {} 68static inline void ps3_spu_set_platform (void) {}
66#endif 69#endif
67 70
71/* repository bus info */
72
73enum ps3_bus_type {
74 PS3_BUS_TYPE_SB = 4,
75 PS3_BUS_TYPE_STORAGE = 5,
76};
77
78enum ps3_dev_type {
79 PS3_DEV_TYPE_STOR_DISK = TYPE_DISK, /* 0 */
80 PS3_DEV_TYPE_SB_GELIC = 3,
81 PS3_DEV_TYPE_SB_USB = 4,
82 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
83 PS3_DEV_TYPE_SB_GPIO = 6,
84 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
85};
86
87int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
88 u64 *value);
89int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id);
90int ps3_repository_read_bus_type(unsigned int bus_index,
91 enum ps3_bus_type *bus_type);
92int ps3_repository_read_bus_num_dev(unsigned int bus_index,
93 unsigned int *num_dev);
94
95/* repository bus device info */
96
97enum ps3_interrupt_type {
98 PS3_INTERRUPT_TYPE_EVENT_PORT = 2,
99 PS3_INTERRUPT_TYPE_SB_OHCI = 3,
100 PS3_INTERRUPT_TYPE_SB_EHCI = 4,
101 PS3_INTERRUPT_TYPE_OTHER = 5,
102};
103
104enum ps3_reg_type {
105 PS3_REG_TYPE_SB_OHCI = 3,
106 PS3_REG_TYPE_SB_EHCI = 4,
107 PS3_REG_TYPE_SB_GPIO = 5,
108};
109
110int ps3_repository_read_dev_str(unsigned int bus_index,
111 unsigned int dev_index, const char *dev_str, u64 *value);
112int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
113 unsigned int *dev_id);
114int ps3_repository_read_dev_type(unsigned int bus_index,
115 unsigned int dev_index, enum ps3_dev_type *dev_type);
116int ps3_repository_read_dev_intr(unsigned int bus_index,
117 unsigned int dev_index, unsigned int intr_index,
118 enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id);
119int ps3_repository_read_dev_reg_type(unsigned int bus_index,
120 unsigned int dev_index, unsigned int reg_index,
121 enum ps3_reg_type *reg_type);
122int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
123 unsigned int dev_index, unsigned int reg_index, u64 *bus_addr,
124 u64 *len);
125int ps3_repository_read_dev_reg(unsigned int bus_index,
126 unsigned int dev_index, unsigned int reg_index,
127 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len);
128
129/* repository bus enumerators */
130
131struct ps3_repository_device {
132 unsigned int bus_index;
133 unsigned int dev_index;
134 struct ps3_device_id did;
135};
136
137int ps3_repository_find_device(enum ps3_bus_type bus_type,
138 enum ps3_dev_type dev_type,
139 const struct ps3_repository_device *start_dev,
140 struct ps3_repository_device *dev);
141static inline int ps3_repository_find_first_device(
142 enum ps3_bus_type bus_type, enum ps3_dev_type dev_type,
143 struct ps3_repository_device *dev)
144{
145 return ps3_repository_find_device(bus_type, dev_type, NULL, dev);
146}
147int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
148 enum ps3_interrupt_type intr_type, unsigned int *interrupt_id);
149int ps3_repository_find_reg(const struct ps3_repository_device *dev,
150 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len);
151
152/* repository block device info */
153
154int ps3_repository_read_stor_dev_port(unsigned int bus_index,
155 unsigned int dev_index, u64 *port);
156int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
157 unsigned int dev_index, u64 *blk_size);
158int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
159 unsigned int dev_index, u64 *num_blocks);
160int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
161 unsigned int dev_index, unsigned int *num_regions);
162int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
163 unsigned int dev_index, unsigned int region_index,
164 unsigned int *region_id);
165int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
166 unsigned int dev_index, unsigned int region_index, u64 *region_size);
167int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
168 unsigned int dev_index, unsigned int region_index, u64 *region_start);
169int ps3_repository_read_stor_dev_info(unsigned int bus_index,
170 unsigned int dev_index, u64 *port, u64 *blk_size,
171 u64 *num_blocks, unsigned int *num_regions);
172int ps3_repository_read_stor_dev_region(unsigned int bus_index,
173 unsigned int dev_index, unsigned int region_index,
174 unsigned int *region_id, u64 *region_start, u64 *region_size);
175
176/* repository pu and memory info */
177
178int ps3_repository_read_num_pu(unsigned int *num_pu);
179int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id);
180int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
181int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
182int ps3_repository_read_region_total(u64 *region_total);
183int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
184 u64 *region_total);
185
186/* repository pme info */
187
188int ps3_repository_read_num_be(unsigned int *num_be);
189int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
190int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
191int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
192
193/* repository 'Other OS' area */
194
195int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
196int ps3_repository_read_boot_dat_size(unsigned int *size);
197int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size);
198
199/* repository spu info */
200
201/**
202 * enum spu_resource_type - Type of spu resource.
203 * @spu_resource_type_shared: Logical spu is shared with other partions.
204 * @spu_resource_type_exclusive: Logical spu is not shared with other partions.
205 *
206 * Returned by ps3_repository_read_spu_resource_id().
207 */
208
209enum ps3_spu_resource_type {
210 PS3_SPU_RESOURCE_TYPE_SHARED = 0,
211 PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL,
212};
213
214int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved);
215int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id);
216int ps3_repository_read_spu_resource_id(unsigned int res_index,
217 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id);
218
68#endif 219#endif
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 273a0d621bdd..ae586a0e5d3f 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -18,9 +18,10 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <asm/ps3.h>
22#include <asm/lv1call.h> 21#include <asm/lv1call.h>
23 22
23#include "platform.h"
24
24enum ps3_vendor_id { 25enum ps3_vendor_id {
25 PS3_VENDOR_ID_NONE = 0, 26 PS3_VENDOR_ID_NONE = 0,
26 PS3_VENDOR_ID_SONY = 0x8000000000000000UL, 27 PS3_VENDOR_ID_SONY = 0x8000000000000000UL,
@@ -257,7 +258,7 @@ int ps3_repository_read_dev_type(unsigned int bus_index,
257 258
258int ps3_repository_read_dev_intr(unsigned int bus_index, 259int ps3_repository_read_dev_intr(unsigned int bus_index,
259 unsigned int dev_index, unsigned int intr_index, 260 unsigned int dev_index, unsigned int intr_index,
260 unsigned int *intr_type, unsigned int* interrupt_id) 261 enum ps3_interrupt_type *intr_type, unsigned int* interrupt_id)
261{ 262{
262 int result; 263 int result;
263 u64 v1; 264 u64 v1;
@@ -275,7 +276,8 @@ int ps3_repository_read_dev_intr(unsigned int bus_index,
275} 276}
276 277
277int ps3_repository_read_dev_reg_type(unsigned int bus_index, 278int ps3_repository_read_dev_reg_type(unsigned int bus_index,
278 unsigned int dev_index, unsigned int reg_index, unsigned int *reg_type) 279 unsigned int dev_index, unsigned int reg_index,
280 enum ps3_reg_type *reg_type)
279{ 281{
280 int result; 282 int result;
281 u64 v1; 283 u64 v1;
@@ -302,8 +304,8 @@ int ps3_repository_read_dev_reg_addr(unsigned int bus_index,
302} 304}
303 305
304int ps3_repository_read_dev_reg(unsigned int bus_index, 306int ps3_repository_read_dev_reg(unsigned int bus_index,
305 unsigned int dev_index, unsigned int reg_index, unsigned int *reg_type, 307 unsigned int dev_index, unsigned int reg_index,
306 u64 *bus_addr, u64 *len) 308 enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len)
307{ 309{
308 int result = ps3_repository_read_dev_reg_type(bus_index, dev_index, 310 int result = ps3_repository_read_dev_reg_type(bus_index, dev_index,
309 reg_index, reg_type); 311 reg_index, reg_type);
@@ -343,7 +345,7 @@ int ps3_repository_dump_resource_info(unsigned int bus_index,
343 } 345 }
344 346
345 for (res_index = 0; res_index < 10; res_index++) { 347 for (res_index = 0; res_index < 10; res_index++) {
346 enum ps3_region_type reg_type; 348 enum ps3_reg_type reg_type;
347 u64 bus_addr; 349 u64 bus_addr;
348 u64 len; 350 u64 len;
349 351
@@ -367,7 +369,55 @@ int ps3_repository_dump_resource_info(unsigned int bus_index,
367 return result; 369 return result;
368} 370}
369 371
370static int dump_device_info(unsigned int bus_index, unsigned int num_dev) 372static int dump_stor_dev_info(unsigned int bus_index, unsigned int dev_index)
373{
374 int result = 0;
375 unsigned int num_regions, region_index;
376 u64 port, blk_size, num_blocks;
377
378 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
379 bus_index, dev_index);
380
381 result = ps3_repository_read_stor_dev_info(bus_index, dev_index, &port,
382 &blk_size, &num_blocks, &num_regions);
383 if (result) {
384 pr_debug("%s:%d ps3_repository_read_stor_dev_info"
385 " (%u:%u) failed\n", __func__, __LINE__,
386 bus_index, dev_index);
387 goto out;
388 }
389
390 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks "
391 "%lu, num_regions %u\n",
392 __func__, __LINE__, bus_index, dev_index, port,
393 blk_size, num_blocks, num_regions);
394
395 for (region_index = 0; region_index < num_regions; region_index++) {
396 unsigned int region_id;
397 u64 region_start, region_size;
398
399 result = ps3_repository_read_stor_dev_region(bus_index,
400 dev_index, region_index, &region_id, &region_start,
401 &region_size);
402 if (result) {
403 pr_debug("%s:%d ps3_repository_read_stor_dev_region"
404 " (%u:%u) failed\n", __func__, __LINE__,
405 bus_index, dev_index);
406 break;
407 }
408
409 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n",
410 __func__, __LINE__, bus_index, dev_index, region_id,
411 region_start, region_size);
412 }
413
414out:
415 pr_debug(" <- %s:%d\n", __func__, __LINE__);
416 return result;
417}
418
419static int dump_device_info(unsigned int bus_index, enum ps3_bus_type bus_type,
420 unsigned int num_dev)
371{ 421{
372 int result = 0; 422 int result = 0;
373 unsigned int dev_index; 423 unsigned int dev_index;
@@ -402,6 +452,9 @@ static int dump_device_info(unsigned int bus_index, unsigned int num_dev)
402 __LINE__, bus_index, dev_index, dev_type, dev_id); 452 __LINE__, bus_index, dev_index, dev_type, dev_id);
403 453
404 ps3_repository_dump_resource_info(bus_index, dev_index); 454 ps3_repository_dump_resource_info(bus_index, dev_index);
455
456 if (bus_type == PS3_BUS_TYPE_STORAGE)
457 dump_stor_dev_info(bus_index, dev_index);
405 } 458 }
406 459
407 pr_debug(" <- %s:%d\n", __func__, __LINE__); 460 pr_debug(" <- %s:%d\n", __func__, __LINE__);
@@ -452,7 +505,7 @@ int ps3_repository_dump_bus_info(void)
452 __func__, __LINE__, bus_index, bus_type, bus_id, 505 __func__, __LINE__, bus_index, bus_type, bus_id,
453 num_dev); 506 num_dev);
454 507
455 dump_device_info(bus_index, num_dev); 508 dump_device_info(bus_index, bus_type, num_dev);
456 } 509 }
457 510
458 pr_debug(" <- %s:%d\n", __func__, __LINE__); 511 pr_debug(" <- %s:%d\n", __func__, __LINE__);
@@ -487,7 +540,8 @@ static int find_device(unsigned int bus_index, unsigned int num_dev,
487 break; 540 break;
488 } 541 }
489 542
490 BUG_ON(dev_index == num_dev); 543 if (dev_index == num_dev)
544 return -1;
491 545
492 pr_debug("%s:%d: found dev_type %u at dev_index %u\n", 546 pr_debug("%s:%d: found dev_type %u at dev_index %u\n",
493 __func__, __LINE__, dev_type, dev_index); 547 __func__, __LINE__, dev_type, dev_index);
@@ -521,7 +575,7 @@ int ps3_repository_find_device (enum ps3_bus_type bus_type,
521 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__, 575 pr_debug("%s:%d: find bus_type %u, dev_type %u\n", __func__, __LINE__,
522 bus_type, dev_type); 576 bus_type, dev_type);
523 577
524 dev->bus_index = UINT_MAX; 578 BUG_ON(start_dev && start_dev->bus_index > 10);
525 579
526 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10; 580 for (bus_index = start_dev ? start_dev->bus_index : 0; bus_index < 10;
527 bus_index++) { 581 bus_index++) {
@@ -532,13 +586,15 @@ int ps3_repository_find_device (enum ps3_bus_type bus_type,
532 if (result) { 586 if (result) {
533 pr_debug("%s:%d read_bus_type failed\n", 587 pr_debug("%s:%d read_bus_type failed\n",
534 __func__, __LINE__); 588 __func__, __LINE__);
589 dev->bus_index = UINT_MAX;
535 return result; 590 return result;
536 } 591 }
537 if (x == bus_type) 592 if (x == bus_type)
538 break; 593 break;
539 } 594 }
540 595
541 BUG_ON(bus_index == 10); 596 if (bus_index >= 10)
597 return -ENODEV;
542 598
543 pr_debug("%s:%d: found bus_type %u at bus_index %u\n", 599 pr_debug("%s:%d: found bus_type %u at bus_index %u\n",
544 __func__, __LINE__, bus_type, bus_index); 600 __func__, __LINE__, bus_type, bus_index);
@@ -604,7 +660,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
604 } 660 }
605 } 661 }
606 662
607 BUG_ON(res_index == 10); 663 if (res_index == 10)
664 return -ENODEV;
608 665
609 pr_debug("%s:%d: found intr_type %u at res_index %u\n", 666 pr_debug("%s:%d: found intr_type %u at res_index %u\n",
610 __func__, __LINE__, intr_type, res_index); 667 __func__, __LINE__, intr_type, res_index);
@@ -612,8 +669,8 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *dev,
612 return result; 669 return result;
613} 670}
614 671
615int ps3_repository_find_region(const struct ps3_repository_device *dev, 672int ps3_repository_find_reg(const struct ps3_repository_device *dev,
616 enum ps3_region_type reg_type, u64 *bus_addr, u64 *len) 673 enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len)
617{ 674{
618 int result = 0; 675 int result = 0;
619 unsigned int res_index; 676 unsigned int res_index;
@@ -623,7 +680,7 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
623 *bus_addr = *len = 0; 680 *bus_addr = *len = 0;
624 681
625 for (res_index = 0; res_index < 10; res_index++) { 682 for (res_index = 0; res_index < 10; res_index++) {
626 enum ps3_region_type t; 683 enum ps3_reg_type t;
627 u64 a; 684 u64 a;
628 u64 l; 685 u64 l;
629 686
@@ -643,7 +700,8 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
643 } 700 }
644 } 701 }
645 702
646 BUG_ON(res_index == 10); 703 if (res_index == 10)
704 return -ENODEV;
647 705
648 pr_debug("%s:%d: found reg_type %u at res_index %u\n", 706 pr_debug("%s:%d: found reg_type %u at res_index %u\n",
649 __func__, __LINE__, reg_type, res_index); 707 __func__, __LINE__, reg_type, res_index);
@@ -651,6 +709,136 @@ int ps3_repository_find_region(const struct ps3_repository_device *dev,
651 return result; 709 return result;
652} 710}
653 711
712int ps3_repository_read_stor_dev_port(unsigned int bus_index,
713 unsigned int dev_index, u64 *port)
714{
715 return read_node(PS3_LPAR_ID_PME,
716 make_first_field("bus", bus_index),
717 make_field("dev", dev_index),
718 make_field("port", 0),
719 0, port, 0);
720}
721
722int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
723 unsigned int dev_index, u64 *blk_size)
724{
725 return read_node(PS3_LPAR_ID_PME,
726 make_first_field("bus", bus_index),
727 make_field("dev", dev_index),
728 make_field("blk_size", 0),
729 0, blk_size, 0);
730}
731
732int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
733 unsigned int dev_index, u64 *num_blocks)
734{
735 return read_node(PS3_LPAR_ID_PME,
736 make_first_field("bus", bus_index),
737 make_field("dev", dev_index),
738 make_field("n_blocks", 0),
739 0, num_blocks, 0);
740}
741
742int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
743 unsigned int dev_index, unsigned int *num_regions)
744{
745 int result;
746 u64 v1;
747
748 result = read_node(PS3_LPAR_ID_PME,
749 make_first_field("bus", bus_index),
750 make_field("dev", dev_index),
751 make_field("n_regs", 0),
752 0, &v1, 0);
753 *num_regions = v1;
754 return result;
755}
756
757int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
758 unsigned int dev_index, unsigned int region_index,
759 unsigned int *region_id)
760{
761 int result;
762 u64 v1;
763
764 result = read_node(PS3_LPAR_ID_PME,
765 make_first_field("bus", bus_index),
766 make_field("dev", dev_index),
767 make_field("region", region_index),
768 make_field("id", 0),
769 &v1, 0);
770 *region_id = v1;
771 return result;
772}
773
774int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
775 unsigned int dev_index, unsigned int region_index, u64 *region_size)
776{
777 return read_node(PS3_LPAR_ID_PME,
778 make_first_field("bus", bus_index),
779 make_field("dev", dev_index),
780 make_field("region", region_index),
781 make_field("size", 0),
782 region_size, 0);
783}
784
785int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
786 unsigned int dev_index, unsigned int region_index, u64 *region_start)
787{
788 return read_node(PS3_LPAR_ID_PME,
789 make_first_field("bus", bus_index),
790 make_field("dev", dev_index),
791 make_field("region", region_index),
792 make_field("start", 0),
793 region_start, 0);
794}
795
796int ps3_repository_read_stor_dev_info(unsigned int bus_index,
797 unsigned int dev_index, u64 *port, u64 *blk_size,
798 u64 *num_blocks, unsigned int *num_regions)
799{
800 int result;
801
802 result = ps3_repository_read_stor_dev_port(bus_index, dev_index, port);
803 if (result)
804 return result;
805
806 result = ps3_repository_read_stor_dev_blk_size(bus_index, dev_index,
807 blk_size);
808 if (result)
809 return result;
810
811 result = ps3_repository_read_stor_dev_num_blocks(bus_index, dev_index,
812 num_blocks);
813 if (result)
814 return result;
815
816 result = ps3_repository_read_stor_dev_num_regions(bus_index, dev_index,
817 num_regions);
818 return result;
819}
820
821int ps3_repository_read_stor_dev_region(unsigned int bus_index,
822 unsigned int dev_index, unsigned int region_index,
823 unsigned int *region_id, u64 *region_start, u64 *region_size)
824{
825 int result;
826
827 result = ps3_repository_read_stor_dev_region_id(bus_index, dev_index,
828 region_index, region_id);
829 if (result)
830 return result;
831
832 result = ps3_repository_read_stor_dev_region_start(bus_index, dev_index,
833 region_index, region_start);
834 if (result)
835 return result;
836
837 result = ps3_repository_read_stor_dev_region_size(bus_index, dev_index,
838 region_index, region_size);
839 return result;
840}
841
654int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size) 842int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
655{ 843{
656 return read_node(PS3_LPAR_ID_CURRENT, 844 return read_node(PS3_LPAR_ID_CURRENT,
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index d8b5cadbe80e..ac5df9688dcb 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -24,6 +24,7 @@
24#include <linux/root_dev.h> 24#include <linux/root_dev.h>
25#include <linux/console.h> 25#include <linux/console.h>
26#include <linux/kexec.h> 26#include <linux/kexec.h>
27#include <linux/bootmem.h>
27 28
28#include <asm/machdep.h> 29#include <asm/machdep.h>
29#include <asm/firmware.h> 30#include <asm/firmware.h>
@@ -41,10 +42,22 @@
41#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 42#define DBG(fmt...) do{if(0)printk(fmt);}while(0)
42#endif 43#endif
43 44
44static void ps3_show_cpuinfo(struct seq_file *m) 45#if !defined(CONFIG_SMP)
46static void smp_send_stop(void) {}
47#endif
48
49int ps3_get_firmware_version(union ps3_firmware_version *v)
45{ 50{
46 seq_printf(m, "machine\t\t: %s\n", ppc_md.name); 51 int result = lv1_get_version_info(&v->raw);
52
53 if (result) {
54 v->raw = 0;
55 return -1;
56 }
57
58 return result;
47} 59}
60EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
48 61
49static void ps3_power_save(void) 62static void ps3_power_save(void)
50{ 63{
@@ -57,25 +70,84 @@ static void ps3_power_save(void)
57 lv1_pause(0); 70 lv1_pause(0);
58} 71}
59 72
73static void ps3_restart(char *cmd)
74{
75 DBG("%s:%d cmd '%s'\n", __func__, __LINE__, cmd);
76
77 smp_send_stop();
78 ps3_sys_manager_restart(); /* never returns */
79}
80
81static void ps3_power_off(void)
82{
83 DBG("%s:%d\n", __func__, __LINE__);
84
85 smp_send_stop();
86 ps3_sys_manager_power_off(); /* never returns */
87}
88
60static void ps3_panic(char *str) 89static void ps3_panic(char *str)
61{ 90{
62 DBG("%s:%d %s\n", __func__, __LINE__, str); 91 DBG("%s:%d %s\n", __func__, __LINE__, str);
63 92
64#ifdef CONFIG_SMP
65 smp_send_stop(); 93 smp_send_stop();
66#endif
67 printk("\n"); 94 printk("\n");
68 printk(" System does not reboot automatically.\n"); 95 printk(" System does not reboot automatically.\n");
69 printk(" Please press POWER button.\n"); 96 printk(" Please press POWER button.\n");
70 printk("\n"); 97 printk("\n");
71 98
72 for (;;) ; 99 while(1);
100}
101
102static void prealloc(struct ps3_prealloc *p)
103{
104 if (!p->size)
105 return;
106
107 p->address = __alloc_bootmem(p->size, p->align, __pa(MAX_DMA_ADDRESS));
108 if (!p->address) {
109 printk(KERN_ERR "%s: Cannot allocate %s\n", __FUNCTION__,
110 p->name);
111 return;
112 }
113
114 printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
115 p->address);
73} 116}
74 117
118#ifdef CONFIG_FB_PS3
119struct ps3_prealloc ps3fb_videomemory = {
120 .name = "ps3fb videomemory",
121 .size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
122 .align = 1024*1024 /* the GPU requires 1 MiB alignment */
123};
124#define prealloc_ps3fb_videomemory() prealloc(&ps3fb_videomemory)
125
126static int __init early_parse_ps3fb(char *p)
127{
128 if (!p)
129 return 1;
130
131 ps3fb_videomemory.size = _ALIGN_UP(memparse(p, &p),
132 ps3fb_videomemory.align);
133 return 0;
134}
135early_param("ps3fb", early_parse_ps3fb);
136#else
137#define prealloc_ps3fb_videomemory() do { } while (0)
138#endif
139
140
75static void __init ps3_setup_arch(void) 141static void __init ps3_setup_arch(void)
76{ 142{
143 union ps3_firmware_version v;
144
77 DBG(" -> %s:%d\n", __func__, __LINE__); 145 DBG(" -> %s:%d\n", __func__, __LINE__);
78 146
147 ps3_get_firmware_version(&v);
148 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor,
149 v.rev);
150
79 ps3_spu_set_platform(); 151 ps3_spu_set_platform();
80 ps3_map_htab(); 152 ps3_map_htab();
81 153
@@ -87,6 +159,7 @@ static void __init ps3_setup_arch(void)
87 conswitchp = &dummy_con; 159 conswitchp = &dummy_con;
88#endif 160#endif
89 161
162 prealloc_ps3fb_videomemory();
90 ppc_md.power_save = ps3_power_save; 163 ppc_md.power_save = ps3_power_save;
91 164
92 DBG(" <- %s:%d\n", __func__, __LINE__); 165 DBG(" <- %s:%d\n", __func__, __LINE__);
@@ -156,7 +229,6 @@ define_machine(ps3) {
156 .name = "PS3", 229 .name = "PS3",
157 .probe = ps3_probe, 230 .probe = ps3_probe,
158 .setup_arch = ps3_setup_arch, 231 .setup_arch = ps3_setup_arch,
159 .show_cpuinfo = ps3_show_cpuinfo,
160 .init_IRQ = ps3_init_IRQ, 232 .init_IRQ = ps3_init_IRQ,
161 .panic = ps3_panic, 233 .panic = ps3_panic,
162 .get_boot_time = ps3_get_boot_time, 234 .get_boot_time = ps3_get_boot_time,
@@ -164,6 +236,8 @@ define_machine(ps3) {
164 .get_rtc_time = ps3_get_rtc_time, 236 .get_rtc_time = ps3_get_rtc_time,
165 .calibrate_decr = ps3_calibrate_decr, 237 .calibrate_decr = ps3_calibrate_decr,
166 .progress = ps3_progress, 238 .progress = ps3_progress,
239 .restart = ps3_restart,
240 .power_off = ps3_power_off,
167#if defined(CONFIG_KEXEC) 241#if defined(CONFIG_KEXEC)
168 .kexec_cpu_down = ps3_kexec_cpu_down, 242 .kexec_cpu_down = ps3_kexec_cpu_down,
169 .machine_kexec = ps3_machine_kexec, 243 .machine_kexec = ps3_machine_kexec,
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index 11d2080607ed..6fb887961a6d 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -23,7 +23,6 @@
23 23
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/ps3.h>
27 26
28#include "platform.h" 27#include "platform.h"
29 28
@@ -111,7 +110,7 @@ static void __init ps3_smp_setup_cpu(int cpu)
111 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3); 110 BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3);
112 111
113 for (i = 0; i < MSG_COUNT; i++) { 112 for (i = 0; i < MSG_COUNT; i++) {
114 result = ps3_alloc_event_irq(&virqs[i]); 113 result = ps3_alloc_event_irq(cpu, &virqs[i]);
115 114
116 if (result) 115 if (result)
117 continue; 116 continue;
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 644532c3b7c4..a397e4e17c13 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -26,9 +26,10 @@
26 26
27#include <asm/spu.h> 27#include <asm/spu.h>
28#include <asm/spu_priv1.h> 28#include <asm/spu_priv1.h>
29#include <asm/ps3.h>
30#include <asm/lv1call.h> 29#include <asm/lv1call.h>
31 30
31#include "platform.h"
32
32/* spu_management_ops */ 33/* spu_management_ops */
33 34
34/** 35/**
@@ -50,7 +51,7 @@ enum spe_type {
50 */ 51 */
51 52
52struct spe_shadow { 53struct spe_shadow {
53 u8 padding_0000[0x0140]; 54 u8 padding_0140[0x0140];
54 u64 int_status_class0_RW; /* 0x0140 */ 55 u64 int_status_class0_RW; /* 0x0140 */
55 u64 int_status_class1_RW; /* 0x0148 */ 56 u64 int_status_class1_RW; /* 0x0148 */
56 u64 int_status_class2_RW; /* 0x0150 */ 57 u64 int_status_class2_RW; /* 0x0150 */
@@ -67,8 +68,7 @@ struct spe_shadow {
67 u8 padding_0c08[0x0f00-0x0c08]; 68 u8 padding_0c08[0x0f00-0x0c08];
68 u64 spe_execution_status; /* 0x0f00 */ 69 u64 spe_execution_status; /* 0x0f00 */
69 u8 padding_0f08[0x1000-0x0f08]; 70 u8 padding_0f08[0x1000-0x0f08];
70} __attribute__ ((packed)); 71};
71
72 72
73/** 73/**
74 * enum spe_ex_state - Logical spe execution state. 74 * enum spe_ex_state - Logical spe execution state.
@@ -170,31 +170,6 @@ static int __init construct_spu(struct spu *spu)
170 return result; 170 return result;
171} 171}
172 172
173static int __init add_spu_pages(unsigned long start_addr, unsigned long size)
174{
175 int result;
176 unsigned long start_pfn;
177 unsigned long nr_pages;
178 struct pglist_data *pgdata;
179 struct zone *zone;
180
181 BUG_ON(!mem_init_done);
182
183 start_pfn = start_addr >> PAGE_SHIFT;
184 nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
185
186 pgdata = NODE_DATA(0);
187 zone = pgdata->node_zones;
188
189 result = __add_pages(zone, start_pfn, nr_pages);
190
191 if (result)
192 pr_debug("%s:%d: __add_pages failed: (%d)\n",
193 __func__, __LINE__, result);
194
195 return result;
196}
197
198static void spu_unmap(struct spu *spu) 173static void spu_unmap(struct spu *spu)
199{ 174{
200 iounmap(spu->priv2); 175 iounmap(spu->priv2);
@@ -206,19 +181,6 @@ static void spu_unmap(struct spu *spu)
206static int __init setup_areas(struct spu *spu) 181static int __init setup_areas(struct spu *spu)
207{ 182{
208 struct table {char* name; unsigned long addr; unsigned long size;}; 183 struct table {char* name; unsigned long addr; unsigned long size;};
209 int result;
210
211 /* setup pages */
212
213 result = add_spu_pages(spu->local_store_phys, LS_SIZE);
214 if (result)
215 goto fail_add;
216
217 result = add_spu_pages(spu->problem_phys, sizeof(struct spu_problem));
218 if (result)
219 goto fail_add;
220
221 /* ioremap */
222 184
223 spu_pdata(spu)->shadow = __ioremap( 185 spu_pdata(spu)->shadow = __ioremap(
224 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow), 186 spu_pdata(spu)->shadow_addr, sizeof(struct spe_shadow),
@@ -260,28 +222,28 @@ static int __init setup_areas(struct spu *spu)
260 222
261fail_ioremap: 223fail_ioremap:
262 spu_unmap(spu); 224 spu_unmap(spu);
263fail_add: 225
264 return result; 226 return -ENOMEM;
265} 227}
266 228
267static int __init setup_interrupts(struct spu *spu) 229static int __init setup_interrupts(struct spu *spu)
268{ 230{
269 int result; 231 int result;
270 232
271 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 0, 233 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
272 &spu->irqs[0]); 234 0, &spu->irqs[0]);
273 235
274 if (result) 236 if (result)
275 goto fail_alloc_0; 237 goto fail_alloc_0;
276 238
277 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 1, 239 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
278 &spu->irqs[1]); 240 1, &spu->irqs[1]);
279 241
280 if (result) 242 if (result)
281 goto fail_alloc_1; 243 goto fail_alloc_1;
282 244
283 result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 2, 245 result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
284 &spu->irqs[2]); 246 2, &spu->irqs[2]);
285 247
286 if (result) 248 if (result)
287 goto fail_alloc_2; 249 goto fail_alloc_2;
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
new file mode 100644
index 000000000000..a9f7e4a39a2a
--- /dev/null
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -0,0 +1,384 @@
1/*
2 * PS3 system bus driver.
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006 Sony Corp.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/dma-mapping.h>
25#include <linux/err.h>
26
27#include <asm/udbg.h>
28#include <asm/lv1call.h>
29#include <asm/firmware.h>
30
31#include "platform.h"
32
33#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
34static void _dump_mmio_region(const struct ps3_mmio_region* r,
35 const char* func, int line)
36{
37 pr_debug("%s:%d: dev %u:%u\n", func, line, r->did.bus_id,
38 r->did.dev_id);
39 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
40 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
41 pr_debug("%s:%d: lpar_addr %lxh\n", func, line, r->lpar_addr);
42}
43
44int ps3_mmio_region_create(struct ps3_mmio_region *r)
45{
46 int result;
47
48 result = lv1_map_device_mmio_region(r->did.bus_id, r->did.dev_id,
49 r->bus_addr, r->len, r->page_size, &r->lpar_addr);
50
51 if (result) {
52 pr_debug("%s:%d: lv1_map_device_mmio_region failed: %s\n",
53 __func__, __LINE__, ps3_result(result));
54 r->lpar_addr = 0;
55 }
56
57 dump_mmio_region(r);
58 return result;
59}
60EXPORT_SYMBOL_GPL(ps3_mmio_region_create);
61
62int ps3_free_mmio_region(struct ps3_mmio_region *r)
63{
64 int result;
65
66 result = lv1_unmap_device_mmio_region(r->did.bus_id, r->did.dev_id,
67 r->lpar_addr);
68
69 if (result)
70 pr_debug("%s:%d: lv1_unmap_device_mmio_region failed: %s\n",
71 __func__, __LINE__, ps3_result(result));
72
73 r->lpar_addr = 0;
74 return result;
75}
76EXPORT_SYMBOL_GPL(ps3_free_mmio_region);
77
78static int ps3_system_bus_match(struct device *_dev,
79 struct device_driver *_drv)
80{
81 int result;
82 struct ps3_system_bus_driver *drv = to_ps3_system_bus_driver(_drv);
83 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
84
85 result = dev->match_id == drv->match_id;
86
87 pr_info("%s:%d: dev=%u(%s), drv=%u(%s): %s\n", __func__, __LINE__,
88 dev->match_id, dev->core.bus_id, drv->match_id, drv->core.name,
89 (result ? "match" : "miss"));
90 return result;
91}
92
93static int ps3_system_bus_probe(struct device *_dev)
94{
95 int result;
96 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
97 struct ps3_system_bus_driver *drv =
98 to_ps3_system_bus_driver(_dev->driver);
99
100 result = lv1_open_device(dev->did.bus_id, dev->did.dev_id, 0);
101
102 if (result) {
103 pr_debug("%s:%d: lv1_open_device failed (%d)\n",
104 __func__, __LINE__, result);
105 result = -EACCES;
106 goto clean_none;
107 }
108
109 if (dev->d_region->did.bus_id) {
110 result = ps3_dma_region_create(dev->d_region);
111
112 if (result) {
113 pr_debug("%s:%d: ps3_dma_region_create failed (%d)\n",
114 __func__, __LINE__, result);
115 BUG_ON("check region type");
116 result = -EINVAL;
117 goto clean_device;
118 }
119 }
120
121 BUG_ON(!drv);
122
123 if (drv->probe)
124 result = drv->probe(dev);
125 else
126 pr_info("%s:%d: %s no probe method\n", __func__, __LINE__,
127 dev->core.bus_id);
128
129 if (result) {
130 pr_debug("%s:%d: drv->probe failed\n", __func__, __LINE__);
131 goto clean_dma;
132 }
133
134 return result;
135
136clean_dma:
137 ps3_dma_region_free(dev->d_region);
138clean_device:
139 lv1_close_device(dev->did.bus_id, dev->did.dev_id);
140clean_none:
141 return result;
142}
143
144static int ps3_system_bus_remove(struct device *_dev)
145{
146 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
147 struct ps3_system_bus_driver *drv =
148 to_ps3_system_bus_driver(_dev->driver);
149
150 if (drv->remove)
151 drv->remove(dev);
152 else
153 pr_info("%s:%d: %s no remove method\n", __func__, __LINE__,
154 dev->core.bus_id);
155
156 ps3_dma_region_free(dev->d_region);
157 ps3_free_mmio_region(dev->m_region);
158 lv1_close_device(dev->did.bus_id, dev->did.dev_id);
159
160 return 0;
161}
162
163struct bus_type ps3_system_bus_type = {
164 .name = "ps3_system_bus",
165 .match = ps3_system_bus_match,
166 .probe = ps3_system_bus_probe,
167 .remove = ps3_system_bus_remove,
168};
169
170int __init ps3_system_bus_init(void)
171{
172 int result;
173
174 if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
175 return 0;
176
177 result = bus_register(&ps3_system_bus_type);
178 BUG_ON(result);
179 return result;
180}
181
182core_initcall(ps3_system_bus_init);
183
184/* Allocates a contiguous real buffer and creates mappings over it.
185 * Returns the virtual address of the buffer and sets dma_handle
186 * to the dma address (mapping) of the first page.
187 */
188
189static void * ps3_alloc_coherent(struct device *_dev, size_t size,
190 dma_addr_t *dma_handle, gfp_t flag)
191{
192 int result;
193 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
194 unsigned long virt_addr;
195
196 BUG_ON(!dev->d_region->bus_addr);
197
198 flag &= ~(__GFP_DMA | __GFP_HIGHMEM);
199 flag |= __GFP_ZERO;
200
201 virt_addr = __get_free_pages(flag, get_order(size));
202
203 if (!virt_addr) {
204 pr_debug("%s:%d: get_free_pages failed\n", __func__, __LINE__);
205 goto clean_none;
206 }
207
208 result = ps3_dma_map(dev->d_region, virt_addr, size, dma_handle);
209
210 if (result) {
211 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
212 __func__, __LINE__, result);
213 BUG_ON("check region type");
214 goto clean_alloc;
215 }
216
217 return (void*)virt_addr;
218
219clean_alloc:
220 free_pages(virt_addr, get_order(size));
221clean_none:
222 dma_handle = NULL;
223 return NULL;
224}
225
226static void ps3_free_coherent(struct device *_dev, size_t size, void *vaddr,
227 dma_addr_t dma_handle)
228{
229 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
230
231 ps3_dma_unmap(dev->d_region, dma_handle, size);
232 free_pages((unsigned long)vaddr, get_order(size));
233}
234
235/* Creates TCEs for a user provided buffer. The user buffer must be
236 * contiguous real kernel storage (not vmalloc). The address of the buffer
237 * passed here is the kernel (virtual) address of the buffer. The buffer
238 * need not be page aligned, the dma_addr_t returned will point to the same
239 * byte within the page as vaddr.
240 */
241
242static dma_addr_t ps3_map_single(struct device *_dev, void *ptr, size_t size,
243 enum dma_data_direction direction)
244{
245 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
246 int result;
247 unsigned long bus_addr;
248
249 result = ps3_dma_map(dev->d_region, (unsigned long)ptr, size,
250 &bus_addr);
251
252 if (result) {
253 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
254 __func__, __LINE__, result);
255 }
256
257 return bus_addr;
258}
259
260static void ps3_unmap_single(struct device *_dev, dma_addr_t dma_addr,
261 size_t size, enum dma_data_direction direction)
262{
263 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
264 int result;
265
266 result = ps3_dma_unmap(dev->d_region, dma_addr, size);
267
268 if (result) {
269 pr_debug("%s:%d: ps3_dma_unmap failed (%d)\n",
270 __func__, __LINE__, result);
271 }
272}
273
274static int ps3_map_sg(struct device *_dev, struct scatterlist *sg, int nents,
275 enum dma_data_direction direction)
276{
277 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
278 int i;
279
280#if defined(CONFIG_PS3_DYNAMIC_DMA)
281 BUG_ON("do");
282 return -EPERM;
283#else
284 for (i = 0; i < nents; i++, sg++) {
285 int result = ps3_dma_map(dev->d_region,
286 page_to_phys(sg->page) + sg->offset, sg->length,
287 &sg->dma_address);
288
289 if (result) {
290 pr_debug("%s:%d: ps3_dma_map failed (%d)\n",
291 __func__, __LINE__, result);
292 return -EINVAL;
293 }
294
295 sg->dma_length = sg->length;
296 }
297
298 return nents;
299#endif
300}
301
302static void ps3_unmap_sg(struct device *_dev, struct scatterlist *sg,
303 int nents, enum dma_data_direction direction)
304{
305#if defined(CONFIG_PS3_DYNAMIC_DMA)
306 BUG_ON("do");
307#endif
308}
309
310static int ps3_dma_supported(struct device *_dev, u64 mask)
311{
312 return mask >= DMA_32BIT_MASK;
313}
314
315static struct dma_mapping_ops ps3_dma_ops = {
316 .alloc_coherent = ps3_alloc_coherent,
317 .free_coherent = ps3_free_coherent,
318 .map_single = ps3_map_single,
319 .unmap_single = ps3_unmap_single,
320 .map_sg = ps3_map_sg,
321 .unmap_sg = ps3_unmap_sg,
322 .dma_supported = ps3_dma_supported
323};
324
325/**
326 * ps3_system_bus_release_device - remove a device from the system bus
327 */
328
329static void ps3_system_bus_release_device(struct device *_dev)
330{
331 struct ps3_system_bus_device *dev = to_ps3_system_bus_device(_dev);
332 kfree(dev);
333}
334
335/**
336 * ps3_system_bus_device_register - add a device to the system bus
337 *
338 * ps3_system_bus_device_register() expects the dev object to be allocated
339 * dynamically by the caller. The system bus takes ownership of the dev
340 * object and frees the object in ps3_system_bus_release_device().
341 */
342
343int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
344{
345 int result;
346 static unsigned int dev_count = 1;
347
348 dev->core.parent = NULL;
349 dev->core.bus = &ps3_system_bus_type;
350 dev->core.release = ps3_system_bus_release_device;
351
352 dev->core.archdata.of_node = NULL;
353 dev->core.archdata.dma_ops = &ps3_dma_ops;
354 dev->core.archdata.numa_node = 0;
355
356 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), "sb_%02x",
357 dev_count++);
358
359 pr_debug("%s:%d add %s\n", __func__, __LINE__, dev->core.bus_id);
360
361 result = device_register(&dev->core);
362 return result;
363}
364
365EXPORT_SYMBOL_GPL(ps3_system_bus_device_register);
366
367int ps3_system_bus_driver_register(struct ps3_system_bus_driver *drv)
368{
369 int result;
370
371 drv->core.bus = &ps3_system_bus_type;
372
373 result = driver_register(&drv->core);
374 return result;
375}
376
377EXPORT_SYMBOL_GPL(ps3_system_bus_driver_register);
378
379void ps3_system_bus_driver_unregister(struct ps3_system_bus_driver *drv)
380{
381 driver_unregister(&drv->core);
382}
383
384EXPORT_SYMBOL_GPL(ps3_system_bus_driver_unregister);
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 69590fbf83da..2dfd05095a25 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -4,11 +4,12 @@ endif
4 4
5obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ 5obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \
6 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ 6 setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
7 firmware.o 7 firmware.o power.o
8obj-$(CONFIG_SMP) += smp.o 8obj-$(CONFIG_SMP) += smp.o
9obj-$(CONFIG_XICS) += xics.o 9obj-$(CONFIG_XICS) += xics.o
10obj-$(CONFIG_SCANLOG) += scanlog.o 10obj-$(CONFIG_SCANLOG) += scanlog.o
11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o 11obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o
12obj-$(CONFIG_KEXEC) += kexec.o
12 13
13obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o 14obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
14 15
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index da6e5362e7cd..6cedbc002e0f 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -747,6 +747,7 @@ struct eeh_early_enable_info {
747/* Enable eeh for the given device node. */ 747/* Enable eeh for the given device node. */
748static void *early_enable_eeh(struct device_node *dn, void *data) 748static void *early_enable_eeh(struct device_node *dn, void *data)
749{ 749{
750 unsigned int rets[3];
750 struct eeh_early_enable_info *info = data; 751 struct eeh_early_enable_info *info = data;
751 int ret; 752 int ret;
752 const char *status = get_property(dn, "status", NULL); 753 const char *status = get_property(dn, "status", NULL);
@@ -803,16 +804,14 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
803 regs[0], info->buid_hi, info->buid_lo, 804 regs[0], info->buid_hi, info->buid_lo,
804 EEH_ENABLE); 805 EEH_ENABLE);
805 806
807 enable = 0;
806 if (ret == 0) { 808 if (ret == 0) {
807 eeh_subsystem_enabled = 1;
808 pdn->eeh_mode |= EEH_MODE_SUPPORTED;
809 pdn->eeh_config_addr = regs[0]; 809 pdn->eeh_config_addr = regs[0];
810 810
811 /* If the newer, better, ibm,get-config-addr-info is supported, 811 /* If the newer, better, ibm,get-config-addr-info is supported,
812 * then use that instead. */ 812 * then use that instead. */
813 pdn->eeh_pe_config_addr = 0; 813 pdn->eeh_pe_config_addr = 0;
814 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) { 814 if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) {
815 unsigned int rets[2];
816 ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets, 815 ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets,
817 pdn->eeh_config_addr, 816 pdn->eeh_config_addr,
818 info->buid_hi, info->buid_lo, 817 info->buid_hi, info->buid_lo,
@@ -820,6 +819,20 @@ static void *early_enable_eeh(struct device_node *dn, void *data)
820 if (ret == 0) 819 if (ret == 0)
821 pdn->eeh_pe_config_addr = rets[0]; 820 pdn->eeh_pe_config_addr = rets[0];
822 } 821 }
822
823 /* Some older systems (Power4) allow the
824 * ibm,set-eeh-option call to succeed even on nodes
825 * where EEH is not supported. Verify support
826 * explicitly. */
827 ret = read_slot_reset_state(pdn, rets);
828 if ((ret == 0) && (rets[1] == 1))
829 enable = 1;
830 }
831
832 if (enable) {
833 eeh_subsystem_enabled = 1;
834 pdn->eeh_mode |= EEH_MODE_SUPPORTED;
835
823#ifdef DEBUG 836#ifdef DEBUG
824 printk(KERN_DEBUG "EEH: %s: eeh enabled, config=%x pe_config=%x\n", 837 printk(KERN_DEBUG "EEH: %s: eeh enabled, config=%x pe_config=%x\n",
825 dn->full_name, pdn->eeh_config_addr, pdn->eeh_pe_config_addr); 838 dn->full_name, pdn->eeh_config_addr, pdn->eeh_pe_config_addr);
@@ -1065,7 +1078,7 @@ static int proc_eeh_open(struct inode *inode, struct file *file)
1065 return single_open(file, proc_eeh_show, NULL); 1078 return single_open(file, proc_eeh_show, NULL);
1066} 1079}
1067 1080
1068static struct file_operations proc_eeh_operations = { 1081static const struct file_operations proc_eeh_operations = {
1069 .open = proc_eeh_open, 1082 .open = proc_eeh_open,
1070 .read = seq_read, 1083 .read = seq_read,
1071 .llseek = seq_lseek, 1084 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index cbd6b0711ab4..a4c0bf84ef2e 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -446,7 +446,8 @@ excess_failures:
446 */ 446 */
447 printk(KERN_ERR 447 printk(KERN_ERR
448 "EEH: PCI device at location=%s driver=%s pci addr=%s \n" 448 "EEH: PCI device at location=%s driver=%s pci addr=%s \n"
449 "has failed %d times and has been permanently disabled. \n" 449 "has failed %d times in the last hour "
450 "and has been permanently disabled. \n"
450 "Please try reseating this device or replacing it.\n", 451 "Please try reseating this device or replacing it.\n",
451 location, drv_str, pci_str, frozen_pdn->eeh_freeze_count); 452 location, drv_str, pci_str, frozen_pdn->eeh_freeze_count);
452 goto perm_error; 453 goto perm_error;
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 1c7b2baa5f73..90522e3c9d46 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -59,6 +59,7 @@ firmware_features_table[FIRMWARE_MAX_FEATURES] = {
59 {FW_FEATURE_XDABR, "hcall-xdabr"}, 59 {FW_FEATURE_XDABR, "hcall-xdabr"},
60 {FW_FEATURE_MULTITCE, "hcall-multi-tce"}, 60 {FW_FEATURE_MULTITCE, "hcall-multi-tce"},
61 {FW_FEATURE_SPLPAR, "hcall-splpar"}, 61 {FW_FEATURE_SPLPAR, "hcall-splpar"},
62 {FW_FEATURE_BULK_REMOVE, "hcall-bulk"},
62}; 63};
63 64
64/* Build up the firmware features bitmask using the contents of 65/* Build up the firmware features bitmask using the contents of
diff --git a/arch/powerpc/platforms/pseries/firmware.h b/arch/powerpc/platforms/pseries/firmware.h
deleted file mode 100644
index 714f56f55362..000000000000
--- a/arch/powerpc/platforms/pseries/firmware.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * Copyright 2006 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#ifndef _PSERIES_FIRMWARE_H
11#define _PSERIES_FIRMWARE_H
12
13#include <asm/firmware.h>
14
15extern void __init fw_feature_init(void);
16
17#endif /* _PSERIES_FIRMWARE_H */
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index 3ddc04925d50..eae51ef9af24 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -90,7 +90,7 @@ static int hcall_inst_seq_open(struct inode *inode, struct file *file)
90 return rc; 90 return rc;
91} 91}
92 92
93static struct file_operations hcall_inst_seq_fops = { 93static const struct file_operations hcall_inst_seq_fops = {
94 .open = hcall_inst_seq_open, 94 .open = hcall_inst_seq_open,
95 .read = seq_read, 95 .read = seq_read,
96 .llseek = seq_lseek, 96 .llseek = seq_lseek,
diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c
new file mode 100644
index 000000000000..af2685607458
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/kexec.c
@@ -0,0 +1,72 @@
1/*
2 * Copyright 2006 Michael Ellerman, IBM Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#include <asm/machdep.h>
11#include <asm/page.h>
12#include <asm/firmware.h>
13#include <asm/kexec.h>
14#include <asm/mpic.h>
15
16#include "pseries.h"
17#include "xics.h"
18#include "plpar_wrappers.h"
19
20static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
21{
22 /* Don't risk a hypervisor call if we're crashing */
23 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
24 unsigned long addr;
25
26 addr = __pa(get_slb_shadow());
27 if (unregister_slb_shadow(hard_smp_processor_id(), addr))
28 printk("SLB shadow buffer deregistration of "
29 "cpu %u (hw_cpu_id %d) failed\n",
30 smp_processor_id(),
31 hard_smp_processor_id());
32
33 addr = __pa(get_lppaca());
34 if (unregister_vpa(hard_smp_processor_id(), addr)) {
35 printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
36 "failed\n", smp_processor_id(),
37 hard_smp_processor_id());
38 }
39 }
40}
41
42static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
43{
44 pseries_kexec_cpu_down(crash_shutdown, secondary);
45 mpic_teardown_this_cpu(secondary);
46}
47
48void __init setup_kexec_cpu_down_mpic(void)
49{
50 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
51}
52
53static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
54{
55 pseries_kexec_cpu_down(crash_shutdown, secondary);
56 xics_teardown_cpu(secondary);
57}
58
59void __init setup_kexec_cpu_down_xics(void)
60{
61 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
62}
63
64static int __init pseries_kexec_setup(void)
65{
66 ppc_md.machine_kexec = default_machine_kexec;
67 ppc_md.machine_kexec_prepare = default_machine_kexec_prepare;
68 ppc_md.machine_crash_shutdown = default_machine_crash_shutdown;
69
70 return 0;
71}
72__initcall(pseries_kexec_setup);
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 721436db3ef0..7496005566ef 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -502,23 +502,70 @@ static void pSeries_lpar_hpte_invalidate(unsigned long slot, unsigned long va,
502 BUG_ON(lpar_rc != H_SUCCESS); 502 BUG_ON(lpar_rc != H_SUCCESS);
503} 503}
504 504
505/* Flag bits for H_BULK_REMOVE */
506#define HBR_REQUEST 0x4000000000000000UL
507#define HBR_RESPONSE 0x8000000000000000UL
508#define HBR_END 0xc000000000000000UL
509#define HBR_AVPN 0x0200000000000000UL
510#define HBR_ANDCOND 0x0100000000000000UL
511
505/* 512/*
506 * Take a spinlock around flushes to avoid bouncing the hypervisor tlbie 513 * Take a spinlock around flushes to avoid bouncing the hypervisor tlbie
507 * lock. 514 * lock.
508 */ 515 */
509static void pSeries_lpar_flush_hash_range(unsigned long number, int local) 516static void pSeries_lpar_flush_hash_range(unsigned long number, int local)
510{ 517{
511 int i; 518 unsigned long i, pix, rc;
512 unsigned long flags = 0; 519 unsigned long flags = 0;
513 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch); 520 struct ppc64_tlb_batch *batch = &__get_cpu_var(ppc64_tlb_batch);
514 int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE); 521 int lock_tlbie = !cpu_has_feature(CPU_FTR_LOCKLESS_TLBIE);
522 unsigned long param[9];
523 unsigned long va;
524 unsigned long hash, index, shift, hidx, slot;
525 real_pte_t pte;
526 int psize;
515 527
516 if (lock_tlbie) 528 if (lock_tlbie)
517 spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags); 529 spin_lock_irqsave(&pSeries_lpar_tlbie_lock, flags);
518 530
519 for (i = 0; i < number; i++) 531 psize = batch->psize;
520 flush_hash_page(batch->vaddr[i], batch->pte[i], 532 pix = 0;
521 batch->psize, local); 533 for (i = 0; i < number; i++) {
534 va = batch->vaddr[i];
535 pte = batch->pte[i];
536 pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
537 hash = hpt_hash(va, shift);
538 hidx = __rpte_to_hidx(pte, index);
539 if (hidx & _PTEIDX_SECONDARY)
540 hash = ~hash;
541 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
542 slot += hidx & _PTEIDX_GROUP_IX;
543 if (!firmware_has_feature(FW_FEATURE_BULK_REMOVE)) {
544 pSeries_lpar_hpte_invalidate(slot, va, psize,
545 local);
546 } else {
547 param[pix] = HBR_REQUEST | HBR_AVPN | slot;
548 param[pix+1] = hpte_encode_v(va, psize) &
549 HPTE_V_AVPN;
550 pix += 2;
551 if (pix == 8) {
552 rc = plpar_hcall9(H_BULK_REMOVE, param,
553 param[0], param[1], param[2],
554 param[3], param[4], param[5],
555 param[6], param[7]);
556 BUG_ON(rc != H_SUCCESS);
557 pix = 0;
558 }
559 }
560 } pte_iterate_hashed_end();
561 }
562 if (pix) {
563 param[pix] = HBR_END;
564 rc = plpar_hcall9(H_BULK_REMOVE, param, param[0], param[1],
565 param[2], param[3], param[4], param[5],
566 param[6], param[7]);
567 BUG_ON(rc != H_SUCCESS);
568 }
522 569
523 if (lock_tlbie) 570 if (lock_tlbie)
524 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags); 571 spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 715db5c89908..fa59124ce3fe 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -77,7 +77,7 @@ void __init pSeries_final_fixup(void)
77 77
78/* 78/*
79 * Assume the winbond 82c105 is the IDE controller on a 79 * Assume the winbond 82c105 is the IDE controller on a
80 * p610. We should probably be more careful in case 80 * p610/p615/p630. We should probably be more careful in case
81 * someone tries to plug in a similar adapter. 81 * someone tries to plug in a similar adapter.
82 */ 82 */
83static void fixup_winbond_82c105(struct pci_dev* dev) 83static void fixup_winbond_82c105(struct pci_dev* dev)
@@ -98,6 +98,10 @@ static void fixup_winbond_82c105(struct pci_dev* dev)
98 if (dev->resource[i].flags & IORESOURCE_IO 98 if (dev->resource[i].flags & IORESOURCE_IO
99 && dev->bus->number == 0 && dev->devfn == 0x81) 99 && dev->bus->number == 0 && dev->devfn == 0x81)
100 dev->resource[i].flags &= ~IORESOURCE_IO; 100 dev->resource[i].flags &= ~IORESOURCE_IO;
101 if (dev->resource[i].start == 0 && dev->resource[i].end) {
102 dev->resource[i].flags = 0;
103 dev->resource[i].end = 0;
104 }
101 } 105 }
102} 106}
103DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, 107DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c
new file mode 100644
index 000000000000..2624b71df73d
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/power.c
@@ -0,0 +1,87 @@
1/*
2 * Interface for power-management for ppc64 compliant platform
3 *
4 * Manish Ahuja <mahuja@us.ibm.com>
5 *
6 * Feb 2007
7 *
8 * Copyright (C) 2007 IBM Corporation.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 2 of the License.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#include <linux/kobject.h>
25#include <linux/string.h>
26#include <linux/errno.h>
27#include <linux/init.h>
28
29unsigned long rtas_poweron_auto; /* default and normal state is 0 */
30
31static ssize_t auto_poweron_show(struct subsystem *subsys, char *buf)
32{
33 return sprintf(buf, "%lu\n", rtas_poweron_auto);
34}
35
36static ssize_t
37auto_poweron_store(struct subsystem *subsys, const char *buf, size_t n)
38{
39 int ret;
40 unsigned long ups_restart;
41 ret = sscanf(buf, "%lu", &ups_restart);
42
43 if ((ret == 1) && ((ups_restart == 1) || (ups_restart == 0))){
44 rtas_poweron_auto = ups_restart;
45 return n;
46 }
47 return -EINVAL;
48}
49
50static struct subsys_attribute auto_poweron_attr = {
51 .attr = {
52 .name = __stringify(auto_poweron),
53 .mode = 0644,
54 },
55 .show = auto_poweron_show,
56 .store = auto_poweron_store,
57};
58
59#ifndef CONFIG_PM
60decl_subsys(power,NULL,NULL);
61
62static struct attribute *g[] = {
63 &auto_poweron_attr.attr,
64 NULL,
65};
66
67static struct attribute_group attr_group = {
68 .attrs = g,
69};
70
71static int __init pm_init(void)
72{
73 int error = subsystem_register(&power_subsys);
74 if (!error)
75 error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group);
76 return error;
77}
78core_initcall(pm_init);
79#else
80extern struct subsystem power_subsys;
81
82static int __init apo_pm_init(void)
83{
84 return (subsys_create_file(&power_subsys, &auto_poweron_attr));
85}
86__initcall(apo_pm_init);
87#endif
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h
new file mode 100644
index 000000000000..22bc01989749
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/pseries.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright 2006 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */
9
10#ifndef _PSERIES_PSERIES_H
11#define _PSERIES_PSERIES_H
12
13extern void __init fw_feature_init(void);
14
15struct pt_regs;
16
17extern int pSeries_system_reset_exception(struct pt_regs *regs);
18extern int pSeries_machine_check_exception(struct pt_regs *regs);
19
20#ifdef CONFIG_SMP
21extern void smp_init_pseries_mpic(void);
22extern void smp_init_pseries_xics(void);
23#else
24static inline smp_init_pseries_mpic(void) { };
25static inline smp_init_pseries_xics(void) { };
26#endif
27
28#ifdef CONFIG_KEXEC
29extern void setup_kexec_cpu_down_xics(void);
30extern void setup_kexec_cpu_down_mpic(void);
31#else
32static inline void setup_kexec_cpu_down_xics(void) { }
33static inline void setup_kexec_cpu_down_mpic(void) { }
34#endif
35
36/* Poweron flag used for enabling auto ups restart */
37extern unsigned long rtas_poweron_auto;
38
39#endif /* _PSERIES_PSERIES_H */
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index b1d3d161249e..edc038873113 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -51,7 +51,7 @@
51#include <asm/udbg.h> 51#include <asm/udbg.h>
52#include <asm/firmware.h> 52#include <asm/firmware.h>
53 53
54#include "ras.h" 54#include "pseries.h"
55 55
56static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX]; 56static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
57static DEFINE_SPINLOCK(ras_log_buf_lock); 57static DEFINE_SPINLOCK(ras_log_buf_lock);
diff --git a/arch/powerpc/platforms/pseries/ras.h b/arch/powerpc/platforms/pseries/ras.h
deleted file mode 100644
index 0e66b0da55e2..000000000000
--- a/arch/powerpc/platforms/pseries/ras.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _PSERIES_RAS_H
2#define _PSERIES_RAS_H
3
4struct pt_regs;
5
6extern int pSeries_system_reset_exception(struct pt_regs *regs);
7extern int pSeries_machine_check_exception(struct pt_regs *regs);
8
9#endif /* _PSERIES_RAS_H */
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 4ad33e41b008..5aa97aff3391 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -499,7 +499,7 @@ out:
499 return rv ? rv : count; 499 return rv ? rv : count;
500} 500}
501 501
502static struct file_operations ofdt_fops = { 502static const struct file_operations ofdt_fops = {
503 .write = ofdt_write 503 .write = ofdt_write
504}; 504};
505 505
@@ -513,7 +513,6 @@ static int proc_ppc64_create_ofdt(void)
513 513
514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL); 514 ent = create_proc_entry("ppc64/ofdt", S_IWUSR, NULL);
515 if (ent) { 515 if (ent) {
516 ent->nlink = 1;
517 ent->data = NULL; 516 ent->data = NULL;
518 ent->size = 0; 517 ent->size = 0;
519 ent->proc_fops = &ofdt_fops; 518 ent->proc_fops = &ofdt_fops;
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 8ca2612221d6..77d0937d5c07 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -331,7 +331,7 @@ static unsigned int rtas_log_poll(struct file *file, poll_table * wait)
331 return 0; 331 return 0;
332} 332}
333 333
334struct file_operations proc_rtas_log_operations = { 334const struct file_operations proc_rtas_log_operations = {
335 .read = rtas_log_read, 335 .read = rtas_log_read,
336 .poll = rtas_log_poll, 336 .poll = rtas_log_poll,
337 .open = rtas_log_open, 337 .open = rtas_log_open,
diff --git a/arch/powerpc/platforms/pseries/scanlog.c b/arch/powerpc/platforms/pseries/scanlog.c
index 45368a57d7dd..8e1ef168e2dd 100644
--- a/arch/powerpc/platforms/pseries/scanlog.c
+++ b/arch/powerpc/platforms/pseries/scanlog.c
@@ -184,7 +184,7 @@ static int scanlog_release(struct inode * inode, struct file * file)
184 return 0; 184 return 0;
185} 185}
186 186
187struct file_operations scanlog_fops = { 187const struct file_operations scanlog_fops = {
188 .owner = THIS_MODULE, 188 .owner = THIS_MODULE,
189 .read = scanlog_read, 189 .read = scanlog_read,
190 .write = scanlog_write, 190 .write = scanlog_write,
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 042ecae107ac..34aff47b1f55 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -55,7 +55,6 @@
55#include <asm/dma.h> 55#include <asm/dma.h>
56#include <asm/machdep.h> 56#include <asm/machdep.h>
57#include <asm/irq.h> 57#include <asm/irq.h>
58#include <asm/kexec.h>
59#include <asm/time.h> 58#include <asm/time.h>
60#include <asm/nvram.h> 59#include <asm/nvram.h>
61#include "xics.h" 60#include "xics.h"
@@ -65,10 +64,10 @@
65#include <asm/i8259.h> 64#include <asm/i8259.h>
66#include <asm/udbg.h> 65#include <asm/udbg.h>
67#include <asm/smp.h> 66#include <asm/smp.h>
67#include <asm/firmware.h>
68 68
69#include "plpar_wrappers.h" 69#include "plpar_wrappers.h"
70#include "ras.h" 70#include "pseries.h"
71#include "firmware.h"
72 71
73#ifdef DEBUG 72#ifdef DEBUG
74#define DBG(fmt...) udbg_printf(fmt) 73#define DBG(fmt...) udbg_printf(fmt)
@@ -77,8 +76,6 @@
77#endif 76#endif
78 77
79/* move those away to a .h */ 78/* move those away to a .h */
80extern void smp_init_pseries_mpic(void);
81extern void smp_init_pseries_xics(void);
82extern void find_udbg_vterm(void); 79extern void find_udbg_vterm(void);
83 80
84int fwnmi_active; /* TRUE if an FWNMI handler is present */ 81int fwnmi_active; /* TRUE if an FWNMI handler is present */
@@ -221,42 +218,6 @@ static void pseries_lpar_enable_pmcs(void)
221 get_lppaca()->pmcregs_in_use = 1; 218 get_lppaca()->pmcregs_in_use = 1;
222} 219}
223 220
224#ifdef CONFIG_KEXEC
225static void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
226{
227 /* Don't risk a hypervisor call if we're crashing */
228 if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
229 unsigned long addr;
230
231 addr = __pa(get_slb_shadow());
232 if (unregister_slb_shadow(hard_smp_processor_id(), addr))
233 printk("SLB shadow buffer deregistration of "
234 "cpu %u (hw_cpu_id %d) failed\n",
235 smp_processor_id(),
236 hard_smp_processor_id());
237
238 addr = __pa(get_lppaca());
239 if (unregister_vpa(hard_smp_processor_id(), addr)) {
240 printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
241 "failed\n", smp_processor_id(),
242 hard_smp_processor_id());
243 }
244 }
245}
246
247static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary)
248{
249 pseries_kexec_cpu_down(crash_shutdown, secondary);
250 mpic_teardown_this_cpu(secondary);
251}
252
253static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
254{
255 pseries_kexec_cpu_down(crash_shutdown, secondary);
256 xics_teardown_cpu(secondary);
257}
258#endif /* CONFIG_KEXEC */
259
260static void __init pseries_discover_pic(void) 221static void __init pseries_discover_pic(void)
261{ 222{
262 struct device_node *np; 223 struct device_node *np;
@@ -269,21 +230,13 @@ static void __init pseries_discover_pic(void)
269 pSeries_mpic_node = of_node_get(np); 230 pSeries_mpic_node = of_node_get(np);
270 ppc_md.init_IRQ = pseries_mpic_init_IRQ; 231 ppc_md.init_IRQ = pseries_mpic_init_IRQ;
271 ppc_md.get_irq = mpic_get_irq; 232 ppc_md.get_irq = mpic_get_irq;
272#ifdef CONFIG_KEXEC 233 setup_kexec_cpu_down_mpic();
273 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic;
274#endif
275#ifdef CONFIG_SMP
276 smp_init_pseries_mpic(); 234 smp_init_pseries_mpic();
277#endif
278 return; 235 return;
279 } else if (strstr(typep, "ppc-xicp")) { 236 } else if (strstr(typep, "ppc-xicp")) {
280 ppc_md.init_IRQ = xics_init_IRQ; 237 ppc_md.init_IRQ = xics_init_IRQ;
281#ifdef CONFIG_KEXEC 238 setup_kexec_cpu_down_xics();
282 ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics;
283#endif
284#ifdef CONFIG_SMP
285 smp_init_pseries_xics(); 239 smp_init_pseries_xics();
286#endif
287 return; 240 return;
288 } 241 }
289 } 242 }
@@ -533,6 +486,34 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
533 return PCI_PROBE_NORMAL; 486 return PCI_PROBE_NORMAL;
534} 487}
535 488
489/**
490 * pSeries_power_off - tell firmware about how to power off the system.
491 *
492 * This function calls either the power-off rtas token in normal cases
493 * or the ibm,power-off-ups token (if present & requested) in case of
494 * a power failure. If power-off token is used, power on will only be
495 * possible with power button press. If ibm,power-off-ups token is used
496 * it will allow auto poweron after power is restored.
497 */
498void pSeries_power_off(void)
499{
500 int rc;
501 int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups");
502
503 if (rtas_flash_term_hook)
504 rtas_flash_term_hook(SYS_POWER_OFF);
505
506 if (rtas_poweron_auto == 0 ||
507 rtas_poweroff_ups_token == RTAS_UNKNOWN_SERVICE) {
508 rc = rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1);
509 printk(KERN_INFO "RTAS power-off returned %d\n", rc);
510 } else {
511 rc = rtas_call(rtas_poweroff_ups_token, 0, 1, NULL);
512 printk(KERN_INFO "RTAS ibm,power-off-ups returned %d\n", rc);
513 }
514 for (;;);
515}
516
536define_machine(pseries) { 517define_machine(pseries) {
537 .name = "pSeries", 518 .name = "pSeries",
538 .probe = pSeries_probe, 519 .probe = pSeries_probe,
@@ -543,7 +524,7 @@ define_machine(pseries) {
543 .pcibios_fixup = pSeries_final_fixup, 524 .pcibios_fixup = pSeries_final_fixup,
544 .pci_probe_mode = pSeries_pci_probe_mode, 525 .pci_probe_mode = pSeries_pci_probe_mode,
545 .restart = rtas_restart, 526 .restart = rtas_restart,
546 .power_off = rtas_power_off, 527 .power_off = pSeries_power_off,
547 .halt = rtas_halt, 528 .halt = rtas_halt,
548 .panic = rtas_os_term, 529 .panic = rtas_os_term,
549 .get_boot_time = rtas_get_boot_time, 530 .get_boot_time = rtas_get_boot_time,
@@ -554,9 +535,4 @@ define_machine(pseries) {
554 .check_legacy_ioport = pSeries_check_legacy_ioport, 535 .check_legacy_ioport = pSeries_check_legacy_ioport,
555 .system_reset_exception = pSeries_system_reset_exception, 536 .system_reset_exception = pSeries_system_reset_exception,
556 .machine_check_exception = pSeries_machine_check_exception, 537 .machine_check_exception = pSeries_machine_check_exception,
557#ifdef CONFIG_KEXEC
558 .machine_kexec = default_machine_kexec,
559 .machine_kexec_prepare = default_machine_kexec_prepare,
560 .machine_crash_shutdown = default_machine_crash_shutdown,
561#endif
562}; 538};
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 4408518eaebe..116305b22a2b 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -48,6 +48,7 @@
48#include <asm/vdso_datapage.h> 48#include <asm/vdso_datapage.h>
49 49
50#include "plpar_wrappers.h" 50#include "plpar_wrappers.h"
51#include "pseries.h"
51 52
52#ifdef DEBUG 53#ifdef DEBUG
53#include <asm/udbg.h> 54#include <asm/udbg.h>
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 2621a7e72d2d..26ca3ffbc1de 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -7,6 +7,7 @@ obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
7obj-$(CONFIG_PPC_MPC106) += grackle.o 7obj-$(CONFIG_PPC_MPC106) += grackle.o
8obj-$(CONFIG_PPC_DCR) += dcr.o 8obj-$(CONFIG_PPC_DCR) += dcr.o
9obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o 9obj-$(CONFIG_PPC_DCR_NATIVE) += dcr-low.o
10obj-$(CONFIG_PPC_PMI) += pmi.o
10obj-$(CONFIG_U3_DART) += dart_iommu.o 11obj-$(CONFIG_U3_DART) += dart_iommu.o
11obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
12obj-$(CONFIG_FSL_SOC) += fsl_soc.o 13obj-$(CONFIG_FSL_SOC) += fsl_soc.o
@@ -22,4 +23,6 @@ endif
22ifeq ($(ARCH),powerpc) 23ifeq ($(ARCH),powerpc)
23obj-$(CONFIG_MTD) += rom.o 24obj-$(CONFIG_MTD) += rom.o
24obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o 25obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o
26obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o
27obj-$(CONFIG_UCODE_PATCH) += micropatch.o
25endif 28endif
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/commproc.c
new file mode 100644
index 000000000000..9b4fafd9a840
--- /dev/null
+++ b/arch/powerpc/sysdev/commproc.c
@@ -0,0 +1,398 @@
1/*
2 * General Purpose functions for the global management of the
3 * Communication Processor Module.
4 * Copyright (c) 1997 Dan error_act (dmalek@jlc.net)
5 *
6 * In addition to the individual control of the communication
7 * channels, there are a few functions that globally affect the
8 * communication processor.
9 *
10 * Buffer descriptors must be allocated from the dual ported memory
11 * space. The allocator for that is here. When the communication
12 * process is reset, we reclaim the memory available. There is
13 * currently no deallocator for this memory.
14 * The amount of space available is platform dependent. On the
15 * MBX, the EPPC software loads additional microcode into the
16 * communication processor, and uses some of the DP ram for this
17 * purpose. Current, the first 512 bytes and the last 256 bytes of
18 * memory are used. Right now I am conservative and only use the
19 * memory that can never be used for microcode. If there are
20 * applications that require more DP ram, we can expand the boundaries
21 * but then we have to be careful of any downloaded microcode.
22 */
23#include <linux/errno.h>
24#include <linux/sched.h>
25#include <linux/kernel.h>
26#include <linux/dma-mapping.h>
27#include <linux/param.h>
28#include <linux/string.h>
29#include <linux/mm.h>
30#include <linux/interrupt.h>
31#include <linux/irq.h>
32#include <linux/module.h>
33#include <asm/mpc8xx.h>
34#include <asm/page.h>
35#include <asm/pgtable.h>
36#include <asm/8xx_immap.h>
37#include <asm/commproc.h>
38#include <asm/io.h>
39#include <asm/tlbflush.h>
40#include <asm/rheap.h>
41#include <asm/prom.h>
42
43#include <asm/fs_pd.h>
44
45#define CPM_MAP_SIZE (0x4000)
46
47static void m8xx_cpm_dpinit(void);
48static uint host_buffer; /* One page of host buffer */
49static uint host_end; /* end + 1 */
50cpm8xx_t *cpmp; /* Pointer to comm processor space */
51cpic8xx_t *cpic_reg;
52
53static struct device_node *cpm_pic_node;
54static struct irq_host *cpm_pic_host;
55
56static void cpm_mask_irq(unsigned int irq)
57{
58 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
59
60 clrbits32(&cpic_reg->cpic_cimr, (1 << cpm_vec));
61}
62
63static void cpm_unmask_irq(unsigned int irq)
64{
65 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
66
67 setbits32(&cpic_reg->cpic_cimr, (1 << cpm_vec));
68}
69
70static void cpm_end_irq(unsigned int irq)
71{
72 unsigned int cpm_vec = (unsigned int)irq_map[irq].hwirq;
73
74 out_be32(&cpic_reg->cpic_cisr, (1 << cpm_vec));
75}
76
77static struct irq_chip cpm_pic = {
78 .typename = " CPM PIC ",
79 .mask = cpm_mask_irq,
80 .unmask = cpm_unmask_irq,
81 .eoi = cpm_end_irq,
82};
83
84int cpm_get_irq(void)
85{
86 int cpm_vec;
87
88 /* Get the vector by setting the ACK bit and then reading
89 * the register.
90 */
91 out_be16(&cpic_reg->cpic_civr, 1);
92 cpm_vec = in_be16(&cpic_reg->cpic_civr);
93 cpm_vec >>= 11;
94
95 return irq_linear_revmap(cpm_pic_host, cpm_vec);
96}
97
98static int cpm_pic_host_match(struct irq_host *h, struct device_node *node)
99{
100 return cpm_pic_node == node;
101}
102
103static int cpm_pic_host_map(struct irq_host *h, unsigned int virq,
104 irq_hw_number_t hw)
105{
106 pr_debug("cpm_pic_host_map(%d, 0x%lx)\n", virq, hw);
107
108 get_irq_desc(virq)->status |= IRQ_LEVEL;
109 set_irq_chip_and_handler(virq, &cpm_pic, handle_fasteoi_irq);
110 return 0;
111}
112
113/* The CPM can generate the error interrupt when there is a race condition
114 * between generating and masking interrupts. All we have to do is ACK it
115 * and return. This is a no-op function so we don't need any special
116 * tests in the interrupt handler.
117 */
118static irqreturn_t cpm_error_interrupt(int irq, void *dev)
119{
120 return IRQ_HANDLED;
121}
122
123static struct irqaction cpm_error_irqaction = {
124 .handler = cpm_error_interrupt,
125 .mask = CPU_MASK_NONE,
126 .name = "error",
127};
128
129static struct irq_host_ops cpm_pic_host_ops = {
130 .match = cpm_pic_host_match,
131 .map = cpm_pic_host_map,
132};
133
134unsigned int cpm_pic_init(void)
135{
136 struct device_node *np = NULL;
137 struct resource res;
138 unsigned int sirq = NO_IRQ, hwirq, eirq;
139 int ret;
140
141 pr_debug("cpm_pic_init\n");
142
143 np = of_find_compatible_node(NULL, "cpm-pic", "CPM");
144 if (np == NULL) {
145 printk(KERN_ERR "CPM PIC init: can not find cpm-pic node\n");
146 return sirq;
147 }
148 ret = of_address_to_resource(np, 0, &res);
149 if (ret)
150 goto end;
151
152 cpic_reg = (void *)ioremap(res.start, res.end - res.start + 1);
153 if (cpic_reg == NULL)
154 goto end;
155
156 sirq = irq_of_parse_and_map(np, 0);
157 if (sirq == NO_IRQ)
158 goto end;
159
160 /* Initialize the CPM interrupt controller. */
161 hwirq = (unsigned int)irq_map[sirq].hwirq;
162 out_be32(&cpic_reg->cpic_cicr,
163 (CICR_SCD_SCC4 | CICR_SCC_SCC3 | CICR_SCB_SCC2 | CICR_SCA_SCC1) |
164 ((hwirq/2) << 13) | CICR_HP_MASK);
165
166 out_be32(&cpic_reg->cpic_cimr, 0);
167
168 cpm_pic_node = of_node_get(np);
169
170 cpm_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm_pic_host_ops, 64);
171 if (cpm_pic_host == NULL) {
172 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
173 sirq = NO_IRQ;
174 goto end;
175 }
176 of_node_put(np);
177
178 /* Install our own error handler. */
179 np = of_find_node_by_type(NULL, "cpm");
180 if (np == NULL) {
181 printk(KERN_ERR "CPM PIC init: can not find cpm node\n");
182 goto end;
183 }
184 eirq= irq_of_parse_and_map(np, 0);
185 if (eirq == NO_IRQ)
186 goto end;
187
188 if (setup_irq(eirq, &cpm_error_irqaction))
189 printk(KERN_ERR "Could not allocate CPM error IRQ!");
190
191 setbits32(&cpic_reg->cpic_cicr, CICR_IEN);
192
193end:
194 of_node_put(np);
195 return sirq;
196}
197
198void cpm_reset(void)
199{
200 cpm8xx_t *commproc;
201 sysconf8xx_t *siu_conf;
202
203 commproc = (cpm8xx_t *)ioremap(CPM_MAP_ADDR, CPM_MAP_SIZE);
204
205#ifdef CONFIG_UCODE_PATCH
206 /* Perform a reset.
207 */
208 out_be16(&commproc->cp_cpcr, CPM_CR_RST | CPM_CR_FLG);
209
210 /* Wait for it.
211 */
212 while (in_be16(&commproc->cp_cpcr) & CPM_CR_FLG);
213
214 cpm_load_patch(commproc);
215#endif
216
217 /* Set SDMA Bus Request priority 5.
218 * On 860T, this also enables FEC priority 6. I am not sure
219 * this is what we realy want for some applications, but the
220 * manual recommends it.
221 * Bit 25, FAM can also be set to use FEC aggressive mode (860T).
222 */
223 siu_conf = (sysconf8xx_t*)immr_map(im_siu_conf);
224 out_be32(&siu_conf->sc_sdcr, 1);
225 immr_unmap(siu_conf);
226
227 /* Reclaim the DP memory for our use. */
228 m8xx_cpm_dpinit();
229
230 /* Tell everyone where the comm processor resides.
231 */
232 cpmp = commproc;
233}
234
235/* We used to do this earlier, but have to postpone as long as possible
236 * to ensure the kernel VM is now running.
237 */
238static void
239alloc_host_memory(void)
240{
241 dma_addr_t physaddr;
242
243 /* Set the host page for allocation.
244 */
245 host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
246 GFP_KERNEL);
247 host_end = host_buffer + PAGE_SIZE;
248}
249
250/* We also own one page of host buffer space for the allocation of
251 * UART "fifos" and the like.
252 */
253uint
254m8xx_cpm_hostalloc(uint size)
255{
256 uint retloc;
257
258 if (host_buffer == 0)
259 alloc_host_memory();
260
261 if ((host_buffer + size) >= host_end)
262 return(0);
263
264 retloc = host_buffer;
265 host_buffer += size;
266
267 return(retloc);
268}
269
270/* Set a baud rate generator. This needs lots of work. There are
271 * four BRGs, any of which can be wired to any channel.
272 * The internal baud rate clock is the system clock divided by 16.
273 * This assumes the baudrate is 16x oversampled by the uart.
274 */
275#define BRG_INT_CLK (get_brgfreq())
276#define BRG_UART_CLK (BRG_INT_CLK/16)
277#define BRG_UART_CLK_DIV16 (BRG_UART_CLK/16)
278
279void
280cpm_setbrg(uint brg, uint rate)
281{
282 volatile uint *bp;
283
284 /* This is good enough to get SMCs running.....
285 */
286 bp = (uint *)&cpmp->cp_brgc1;
287 bp += brg;
288 /* The BRG has a 12-bit counter. For really slow baud rates (or
289 * really fast processors), we may have to further divide by 16.
290 */
291 if (((BRG_UART_CLK / rate) - 1) < 4096)
292 *bp = (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN;
293 else
294 *bp = (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
295 CPM_BRG_EN | CPM_BRG_DIV16;
296}
297
298/*
299 * dpalloc / dpfree bits.
300 */
301static spinlock_t cpm_dpmem_lock;
302/*
303 * 16 blocks should be enough to satisfy all requests
304 * until the memory subsystem goes up...
305 */
306static rh_block_t cpm_boot_dpmem_rh_block[16];
307static rh_info_t cpm_dpmem_info;
308
309#define CPM_DPMEM_ALIGNMENT 8
310static u8* dpram_vbase;
311static uint dpram_pbase;
312
313void m8xx_cpm_dpinit(void)
314{
315 spin_lock_init(&cpm_dpmem_lock);
316
317 dpram_vbase = immr_map_size(im_cpm.cp_dpmem, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE);
318 dpram_pbase = (uint)&((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem;
319
320 /* Initialize the info header */
321 rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT,
322 sizeof(cpm_boot_dpmem_rh_block) /
323 sizeof(cpm_boot_dpmem_rh_block[0]),
324 cpm_boot_dpmem_rh_block);
325
326 /*
327 * Attach the usable dpmem area.
328 * XXX: This is actually crap. CPM_DATAONLY_BASE and
329 * CPM_DATAONLY_SIZE are a subset of the available dparm. It varies
330 * with the processor and the microcode patches applied / activated.
331 * But the following should be at least safe.
332 */
333 rh_attach_region(&cpm_dpmem_info, (void *)CPM_DATAONLY_BASE, CPM_DATAONLY_SIZE);
334}
335
336/*
337 * Allocate the requested size worth of DP memory.
338 * This function returns an offset into the DPRAM area.
339 * Use cpm_dpram_addr() to get the virtual address of the area.
340 */
341uint cpm_dpalloc(uint size, uint align)
342{
343 void *start;
344 unsigned long flags;
345
346 spin_lock_irqsave(&cpm_dpmem_lock, flags);
347 cpm_dpmem_info.alignment = align;
348 start = rh_alloc(&cpm_dpmem_info, size, "commproc");
349 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
350
351 return (uint)start;
352}
353EXPORT_SYMBOL(cpm_dpalloc);
354
355int cpm_dpfree(uint offset)
356{
357 int ret;
358 unsigned long flags;
359
360 spin_lock_irqsave(&cpm_dpmem_lock, flags);
361 ret = rh_free(&cpm_dpmem_info, (void *)offset);
362 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
363
364 return ret;
365}
366EXPORT_SYMBOL(cpm_dpfree);
367
368uint cpm_dpalloc_fixed(uint offset, uint size, uint align)
369{
370 void *start;
371 unsigned long flags;
372
373 spin_lock_irqsave(&cpm_dpmem_lock, flags);
374 cpm_dpmem_info.alignment = align;
375 start = rh_alloc_fixed(&cpm_dpmem_info, (void *)offset, size, "commproc");
376 spin_unlock_irqrestore(&cpm_dpmem_lock, flags);
377
378 return (uint)start;
379}
380EXPORT_SYMBOL(cpm_dpalloc_fixed);
381
382void cpm_dpdump(void)
383{
384 rh_dump(&cpm_dpmem_info);
385}
386EXPORT_SYMBOL(cpm_dpdump);
387
388void *cpm_dpram_addr(uint offset)
389{
390 return (void *)(dpram_vbase + offset);
391}
392EXPORT_SYMBOL(cpm_dpram_addr);
393
394uint cpm_dpram_phys(u8* addr)
395{
396 return (dpram_pbase + (uint)(addr - dpram_vbase));
397}
398EXPORT_SYMBOL(cpm_dpram_addr);
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index 767ee6651adc..eabfe06fe05c 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -36,9 +36,20 @@
36#include <asm/mpc8260.h> 36#include <asm/mpc8260.h>
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/prom.h> 38#include <asm/prom.h>
39#include <asm/fs_pd.h>
39 40
40#include "cpm2_pic.h" 41#include "cpm2_pic.h"
41 42
43/* External IRQS */
44#define CPM2_IRQ_EXT1 19
45#define CPM2_IRQ_EXT7 25
46
47/* Port C IRQS */
48#define CPM2_IRQ_PORTC15 48
49#define CPM2_IRQ_PORTC0 63
50
51static intctl_cpm2_t *cpm2_intctl;
52
42static struct device_node *cpm2_pic_node; 53static struct device_node *cpm2_pic_node;
43static struct irq_host *cpm2_pic_host; 54static struct irq_host *cpm2_pic_host;
44#define NR_MASK_WORDS ((NR_IRQS + 31) / 32) 55#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
@@ -68,68 +79,55 @@ static const u_char irq_to_siubit[] = {
68 24, 25, 26, 27, 28, 29, 30, 31, 79 24, 25, 26, 27, 28, 29, 30, 31,
69}; 80};
70 81
71static void cpm2_mask_irq(unsigned int irq_nr) 82static void cpm2_mask_irq(unsigned int virq)
72{ 83{
73 int bit, word; 84 int bit, word;
74 volatile uint *simr; 85 unsigned int irq_nr = virq_to_hw(virq);
75
76 irq_nr -= CPM_IRQ_OFFSET;
77 86
78 bit = irq_to_siubit[irq_nr]; 87 bit = irq_to_siubit[irq_nr];
79 word = irq_to_siureg[irq_nr]; 88 word = irq_to_siureg[irq_nr];
80 89
81 simr = &(cpm2_intctl->ic_simrh);
82 ppc_cached_irq_mask[word] &= ~(1 << bit); 90 ppc_cached_irq_mask[word] &= ~(1 << bit);
83 simr[word] = ppc_cached_irq_mask[word]; 91 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
84} 92}
85 93
86static void cpm2_unmask_irq(unsigned int irq_nr) 94static void cpm2_unmask_irq(unsigned int virq)
87{ 95{
88 int bit, word; 96 int bit, word;
89 volatile uint *simr; 97 unsigned int irq_nr = virq_to_hw(virq);
90
91 irq_nr -= CPM_IRQ_OFFSET;
92 98
93 bit = irq_to_siubit[irq_nr]; 99 bit = irq_to_siubit[irq_nr];
94 word = irq_to_siureg[irq_nr]; 100 word = irq_to_siureg[irq_nr];
95 101
96 simr = &(cpm2_intctl->ic_simrh);
97 ppc_cached_irq_mask[word] |= 1 << bit; 102 ppc_cached_irq_mask[word] |= 1 << bit;
98 simr[word] = ppc_cached_irq_mask[word]; 103 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
99} 104}
100 105
101static void cpm2_mask_and_ack(unsigned int irq_nr) 106static void cpm2_ack(unsigned int virq)
102{ 107{
103 int bit, word; 108 int bit, word;
104 volatile uint *simr, *sipnr; 109 unsigned int irq_nr = virq_to_hw(virq);
105
106 irq_nr -= CPM_IRQ_OFFSET;
107 110
108 bit = irq_to_siubit[irq_nr]; 111 bit = irq_to_siubit[irq_nr];
109 word = irq_to_siureg[irq_nr]; 112 word = irq_to_siureg[irq_nr];
110 113
111 simr = &(cpm2_intctl->ic_simrh); 114 out_be32(&cpm2_intctl->ic_sipnrh + word, 1 << bit);
112 sipnr = &(cpm2_intctl->ic_sipnrh);
113 ppc_cached_irq_mask[word] &= ~(1 << bit);
114 simr[word] = ppc_cached_irq_mask[word];
115 sipnr[word] = 1 << bit;
116} 115}
117 116
118static void cpm2_end_irq(unsigned int irq_nr) 117static void cpm2_end_irq(unsigned int virq)
119{ 118{
120 int bit, word; 119 int bit, word;
121 volatile uint *simr; 120 unsigned int irq_nr = virq_to_hw(virq);
122 121
123 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) 122 if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS))
124 && irq_desc[irq_nr].action) { 123 && irq_desc[irq_nr].action) {
125 124
126 irq_nr -= CPM_IRQ_OFFSET;
127 bit = irq_to_siubit[irq_nr]; 125 bit = irq_to_siubit[irq_nr];
128 word = irq_to_siureg[irq_nr]; 126 word = irq_to_siureg[irq_nr];
129 127
130 simr = &(cpm2_intctl->ic_simrh);
131 ppc_cached_irq_mask[word] |= 1 << bit; 128 ppc_cached_irq_mask[word] |= 1 << bit;
132 simr[word] = ppc_cached_irq_mask[word]; 129 out_be32(&cpm2_intctl->ic_simrh + word, ppc_cached_irq_mask[word]);
130
133 /* 131 /*
134 * Work around large numbers of spurious IRQs on PowerPC 82xx 132 * Work around large numbers of spurious IRQs on PowerPC 82xx
135 * systems. 133 * systems.
@@ -138,13 +136,59 @@ static void cpm2_end_irq(unsigned int irq_nr)
138 } 136 }
139} 137}
140 138
139static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type)
140{
141 unsigned int src = virq_to_hw(virq);
142 struct irq_desc *desc = get_irq_desc(virq);
143 unsigned int vold, vnew, edibit;
144
145 if (flow_type == IRQ_TYPE_NONE)
146 flow_type = IRQ_TYPE_LEVEL_LOW;
147
148 if (flow_type & IRQ_TYPE_EDGE_RISING) {
149 printk(KERN_ERR "CPM2 PIC: sense type 0x%x not supported\n",
150 flow_type);
151 return -EINVAL;
152 }
153
154 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
155 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
156 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
157 desc->status |= IRQ_LEVEL;
158 desc->handle_irq = handle_level_irq;
159 } else
160 desc->handle_irq = handle_edge_irq;
161
162 /* internal IRQ senses are LEVEL_LOW
163 * EXT IRQ and Port C IRQ senses are programmable
164 */
165 if (src >= CPM2_IRQ_EXT1 && src <= CPM2_IRQ_EXT7)
166 edibit = (14 - (src - CPM2_IRQ_EXT1));
167 else
168 if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0)
169 edibit = (31 - (src - CPM2_IRQ_PORTC15));
170 else
171 return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL;
172
173 vold = in_be32(&cpm2_intctl->ic_siexr);
174
175 if ((flow_type & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_FALLING)
176 vnew = vold | (1 << edibit);
177 else
178 vnew = vold & ~(1 << edibit);
179
180 if (vold != vnew)
181 out_be32(&cpm2_intctl->ic_siexr, vnew);
182 return 0;
183}
184
141static struct irq_chip cpm2_pic = { 185static struct irq_chip cpm2_pic = {
142 .typename = " CPM2 SIU ", 186 .typename = " CPM2 SIU ",
143 .enable = cpm2_unmask_irq, 187 .mask = cpm2_mask_irq,
144 .disable = cpm2_mask_irq,
145 .unmask = cpm2_unmask_irq, 188 .unmask = cpm2_unmask_irq,
146 .mask_ack = cpm2_mask_and_ack, 189 .ack = cpm2_ack,
147 .end = cpm2_end_irq, 190 .eoi = cpm2_end_irq,
191 .set_type = cpm2_set_irq_type,
148}; 192};
149 193
150unsigned int cpm2_get_irq(void) 194unsigned int cpm2_get_irq(void)
@@ -154,17 +198,17 @@ unsigned int cpm2_get_irq(void)
154 198
155 /* For CPM2, read the SIVEC register and shift the bits down 199 /* For CPM2, read the SIVEC register and shift the bits down
156 * to get the irq number. */ 200 * to get the irq number. */
157 bits = cpm2_intctl->ic_sivec; 201 bits = in_be32(&cpm2_intctl->ic_sivec);
158 irq = bits >> 26; 202 irq = bits >> 26;
159 203
160 if (irq == 0) 204 if (irq == 0)
161 return(-1); 205 return(-1);
162 return irq+CPM_IRQ_OFFSET; 206 return irq_linear_revmap(cpm2_pic_host, irq);
163} 207}
164 208
165static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node) 209static int cpm2_pic_host_match(struct irq_host *h, struct device_node *node)
166{ 210{
167 return cpm2_pic_node == NULL || cpm2_pic_node == node; 211 return cpm2_pic_node == node;
168} 212}
169 213
170static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq, 214static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq,
@@ -177,39 +221,21 @@ static int cpm2_pic_host_map(struct irq_host *h, unsigned int virq,
177 return 0; 221 return 0;
178} 222}
179 223
180static void cpm2_host_unmap(struct irq_host *h, unsigned int virq)
181{
182 /* Make sure irq is masked in hardware */
183 cpm2_mask_irq(virq);
184
185 /* remove chip and handler */
186 set_irq_chip_and_handler(virq, NULL, NULL);
187}
188
189static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct, 224static int cpm2_pic_host_xlate(struct irq_host *h, struct device_node *ct,
190 u32 *intspec, unsigned int intsize, 225 u32 *intspec, unsigned int intsize,
191 irq_hw_number_t *out_hwirq, unsigned int *out_flags) 226 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
192{ 227{
193 static const unsigned char map_cpm2_senses[4] = {
194 IRQ_TYPE_LEVEL_LOW,
195 IRQ_TYPE_LEVEL_HIGH,
196 IRQ_TYPE_EDGE_FALLING,
197 IRQ_TYPE_EDGE_RISING,
198 };
199
200 *out_hwirq = intspec[0]; 228 *out_hwirq = intspec[0];
201 if (intsize > 1 && intspec[1] < 4) 229 if (intsize > 1)
202 *out_flags = map_cpm2_senses[intspec[1]]; 230 *out_flags = intspec[1];
203 else 231 else
204 *out_flags = IRQ_TYPE_NONE; 232 *out_flags = IRQ_TYPE_NONE;
205
206 return 0; 233 return 0;
207} 234}
208 235
209static struct irq_host_ops cpm2_pic_host_ops = { 236static struct irq_host_ops cpm2_pic_host_ops = {
210 .match = cpm2_pic_host_match, 237 .match = cpm2_pic_host_match,
211 .map = cpm2_pic_host_map, 238 .map = cpm2_pic_host_map,
212 .unmap = cpm2_host_unmap,
213 .xlate = cpm2_pic_host_xlate, 239 .xlate = cpm2_pic_host_xlate,
214}; 240};
215 241
@@ -217,37 +243,37 @@ void cpm2_pic_init(struct device_node *node)
217{ 243{
218 int i; 244 int i;
219 245
246 cpm2_intctl = cpm2_map(im_intctl);
247
220 /* Clear the CPM IRQ controller, in case it has any bits set 248 /* Clear the CPM IRQ controller, in case it has any bits set
221 * from the bootloader 249 * from the bootloader
222 */ 250 */
223 251
224 /* Mask out everything */ 252 /* Mask out everything */
225 253
226 cpm2_intctl->ic_simrh = 0x00000000; 254 out_be32(&cpm2_intctl->ic_simrh, 0x00000000);
227 cpm2_intctl->ic_simrl = 0x00000000; 255 out_be32(&cpm2_intctl->ic_simrl, 0x00000000);
228 256
229 wmb(); 257 wmb();
230 258
231 /* Ack everything */ 259 /* Ack everything */
232 cpm2_intctl->ic_sipnrh = 0xffffffff; 260 out_be32(&cpm2_intctl->ic_sipnrh, 0xffffffff);
233 cpm2_intctl->ic_sipnrl = 0xffffffff; 261 out_be32(&cpm2_intctl->ic_sipnrl, 0xffffffff);
234 wmb(); 262 wmb();
235 263
236 /* Dummy read of the vector */ 264 /* Dummy read of the vector */
237 i = cpm2_intctl->ic_sivec; 265 i = in_be32(&cpm2_intctl->ic_sivec);
238 rmb(); 266 rmb();
239 267
240 /* Initialize the default interrupt mapping priorities, 268 /* Initialize the default interrupt mapping priorities,
241 * in case the boot rom changed something on us. 269 * in case the boot rom changed something on us.
242 */ 270 */
243 cpm2_intctl->ic_sicr = 0; 271 out_be16(&cpm2_intctl->ic_sicr, 0);
244 cpm2_intctl->ic_scprrh = 0x05309770; 272 out_be32(&cpm2_intctl->ic_scprrh, 0x05309770);
245 cpm2_intctl->ic_scprrl = 0x05309770; 273 out_be32(&cpm2_intctl->ic_scprrl, 0x05309770);
246 274
247 /* create a legacy host */ 275 /* create a legacy host */
248 if (node) 276 cpm2_pic_node = of_node_get(node);
249 cpm2_pic_node = of_node_get(node);
250
251 cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64); 277 cpm2_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &cpm2_pic_host_ops, 64);
252 if (cpm2_pic_host == NULL) { 278 if (cpm2_pic_host == NULL) {
253 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); 279 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n");
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
index 2840616529e4..30e5828a2781 100644
--- a/arch/powerpc/sysdev/cpm2_pic.h
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -1,8 +1,6 @@
1#ifndef _PPC_KERNEL_CPM2_H 1#ifndef _PPC_KERNEL_CPM2_H
2#define _PPC_KERNEL_CPM2_H 2#define _PPC_KERNEL_CPM2_H
3 3
4extern intctl_cpm2_t *cpm2_intctl;
5
6extern unsigned int cpm2_get_irq(void); 4extern unsigned int cpm2_get_irq(void);
7 5
8extern void cpm2_pic_init(struct device_node*); 6extern void cpm2_pic_init(struct device_node*);
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index ad31e56e892b..d20f02927f72 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -38,7 +38,8 @@
38#include <asm/cpm2.h> 38#include <asm/cpm2.h>
39 39
40extern void init_fcc_ioports(struct fs_platform_info*); 40extern void init_fcc_ioports(struct fs_platform_info*);
41extern void init_scc_ioports(struct fs_uart_platform_info*); 41extern void init_fec_ioports(struct fs_platform_info*);
42extern void init_smc_ioports(struct fs_uart_platform_info*);
42static phys_addr_t immrbase = -1; 43static phys_addr_t immrbase = -1;
43 44
44phys_addr_t get_immrbase(void) 45phys_addr_t get_immrbase(void)
@@ -63,7 +64,7 @@ phys_addr_t get_immrbase(void)
63 64
64EXPORT_SYMBOL(get_immrbase); 65EXPORT_SYMBOL(get_immrbase);
65 66
66#ifdef CONFIG_CPM2 67#if defined(CONFIG_CPM2) || defined(CONFIG_8xx)
67 68
68static u32 brgfreq = -1; 69static u32 brgfreq = -1;
69 70
@@ -232,14 +233,7 @@ static int __init gfar_of_init(void)
232 goto err; 233 goto err;
233 } 234 }
234 235
235 mac_addr = get_property(np, "local-mac-address", NULL); 236 mac_addr = of_get_mac_address(np);
236 if (mac_addr == NULL)
237 mac_addr = get_property(np, "mac-address", NULL);
238 if (mac_addr == NULL) {
239 /* Obsolete */
240 mac_addr = get_property(np, "address", NULL);
241 }
242
243 if (mac_addr) 237 if (mac_addr)
244 memcpy(gfar_data.mac_addr, mac_addr, 6); 238 memcpy(gfar_data.mac_addr, mac_addr, 6);
245 239
@@ -440,7 +434,8 @@ static int __init fsl_usb_of_init(void)
440{ 434{
441 struct device_node *np; 435 struct device_node *np;
442 unsigned int i; 436 unsigned int i;
443 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr = NULL; 437 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
438 *usb_dev_dr_client = NULL;
444 int ret; 439 int ret;
445 440
446 for (np = NULL, i = 0; 441 for (np = NULL, i = 0;
@@ -506,33 +501,72 @@ static int __init fsl_usb_of_init(void)
506 501
507 of_irq_to_resource(np, 0, &r[1]); 502 of_irq_to_resource(np, 0, &r[1]);
508 503
509 usb_dev_dr = 504 prop = get_property(np, "dr_mode", NULL);
510 platform_device_register_simple("fsl-ehci", i, r, 2); 505
511 if (IS_ERR(usb_dev_dr)) { 506 if (!prop || !strcmp(prop, "host")) {
512 ret = PTR_ERR(usb_dev_dr); 507 usb_data.operating_mode = FSL_USB2_DR_HOST;
508 usb_dev_dr_host = platform_device_register_simple(
509 "fsl-ehci", i, r, 2);
510 if (IS_ERR(usb_dev_dr_host)) {
511 ret = PTR_ERR(usb_dev_dr_host);
512 goto err;
513 }
514 } else if (prop && !strcmp(prop, "peripheral")) {
515 usb_data.operating_mode = FSL_USB2_DR_DEVICE;
516 usb_dev_dr_client = platform_device_register_simple(
517 "fsl-usb2-udc", i, r, 2);
518 if (IS_ERR(usb_dev_dr_client)) {
519 ret = PTR_ERR(usb_dev_dr_client);
520 goto err;
521 }
522 } else if (prop && !strcmp(prop, "otg")) {
523 usb_data.operating_mode = FSL_USB2_DR_OTG;
524 usb_dev_dr_host = platform_device_register_simple(
525 "fsl-ehci", i, r, 2);
526 if (IS_ERR(usb_dev_dr_host)) {
527 ret = PTR_ERR(usb_dev_dr_host);
528 goto err;
529 }
530 usb_dev_dr_client = platform_device_register_simple(
531 "fsl-usb2-udc", i, r, 2);
532 if (IS_ERR(usb_dev_dr_client)) {
533 ret = PTR_ERR(usb_dev_dr_client);
534 goto err;
535 }
536 } else {
537 ret = -EINVAL;
513 goto err; 538 goto err;
514 } 539 }
515 540
516 usb_dev_dr->dev.coherent_dma_mask = 0xffffffffUL;
517 usb_dev_dr->dev.dma_mask = &usb_dev_dr->dev.coherent_dma_mask;
518
519 usb_data.operating_mode = FSL_USB2_DR_HOST;
520
521 prop = get_property(np, "phy_type", NULL); 541 prop = get_property(np, "phy_type", NULL);
522 usb_data.phy_mode = determine_usb_phy(prop); 542 usb_data.phy_mode = determine_usb_phy(prop);
523 543
524 ret = 544 if (usb_dev_dr_host) {
525 platform_device_add_data(usb_dev_dr, &usb_data, 545 usb_dev_dr_host->dev.coherent_dma_mask = 0xffffffffUL;
526 sizeof(struct 546 usb_dev_dr_host->dev.dma_mask = &usb_dev_dr_host->
527 fsl_usb2_platform_data)); 547 dev.coherent_dma_mask;
528 if (ret) 548 if ((ret = platform_device_add_data(usb_dev_dr_host,
529 goto unreg_dr; 549 &usb_data, sizeof(struct
550 fsl_usb2_platform_data))))
551 goto unreg_dr;
552 }
553 if (usb_dev_dr_client) {
554 usb_dev_dr_client->dev.coherent_dma_mask = 0xffffffffUL;
555 usb_dev_dr_client->dev.dma_mask = &usb_dev_dr_client->
556 dev.coherent_dma_mask;
557 if ((ret = platform_device_add_data(usb_dev_dr_client,
558 &usb_data, sizeof(struct
559 fsl_usb2_platform_data))))
560 goto unreg_dr;
561 }
530 } 562 }
531 return 0; 563 return 0;
532 564
533unreg_dr: 565unreg_dr:
534 if (usb_dev_dr) 566 if (usb_dev_dr_host)
535 platform_device_unregister(usb_dev_dr); 567 platform_device_unregister(usb_dev_dr_host);
568 if (usb_dev_dr_client)
569 platform_device_unregister(usb_dev_dr_client);
536unreg_mph: 570unreg_mph:
537 if (usb_dev_mph) 571 if (usb_dev_mph)
538 platform_device_unregister(usb_dev_mph); 572 platform_device_unregister(usb_dev_mph);
@@ -544,6 +578,8 @@ arch_initcall(fsl_usb_of_init);
544 578
545#ifdef CONFIG_CPM2 579#ifdef CONFIG_CPM2
546 580
581extern void init_scc_ioports(struct fs_uart_platform_info*);
582
547static const char fcc_regs[] = "fcc_regs"; 583static const char fcc_regs[] = "fcc_regs";
548static const char fcc_regs_c[] = "fcc_regs_c"; 584static const char fcc_regs_c[] = "fcc_regs_c";
549static const char fcc_pram[] = "fcc_pram"; 585static const char fcc_pram[] = "fcc_pram";
@@ -603,8 +639,9 @@ static int __init fs_enet_of_init(void)
603 goto unreg; 639 goto unreg;
604 } 640 }
605 641
606 mac_addr = get_property(np, "mac-address", NULL); 642 mac_addr = of_get_mac_address(np);
607 memcpy(fs_enet_data.macaddr, mac_addr, 6); 643 if (mac_addr)
644 memcpy(fs_enet_data.macaddr, mac_addr, 6);
608 645
609 ph = get_property(np, "phy-handle", NULL); 646 ph = get_property(np, "phy-handle", NULL);
610 phy = of_find_node_by_phandle(*ph); 647 phy = of_find_node_by_phandle(*ph);
@@ -696,7 +733,7 @@ static int __init fs_enet_of_init(void)
696 if (ret) 733 if (ret)
697 goto unreg; 734 goto unreg;
698 } 735 }
699 736
700 of_node_put(phy); 737 of_node_put(phy);
701 of_node_put(mdio); 738 of_node_put(mdio);
702 739
@@ -792,3 +829,271 @@ err:
792 829
793arch_initcall(cpm_uart_of_init); 830arch_initcall(cpm_uart_of_init);
794#endif /* CONFIG_CPM2 */ 831#endif /* CONFIG_CPM2 */
832
833#ifdef CONFIG_8xx
834
835extern void init_scc_ioports(struct fs_platform_info*);
836extern int platform_device_skip(char *model, int id);
837
838static int __init fs_enet_mdio_of_init(void)
839{
840 struct device_node *np;
841 unsigned int i;
842 struct platform_device *mdio_dev;
843 struct resource res;
844 int ret;
845
846 for (np = NULL, i = 0;
847 (np = of_find_compatible_node(np, "mdio", "fs_enet")) != NULL;
848 i++) {
849 struct fs_mii_fec_platform_info mdio_data;
850
851 memset(&res, 0, sizeof(res));
852 memset(&mdio_data, 0, sizeof(mdio_data));
853
854 ret = of_address_to_resource(np, 0, &res);
855 if (ret)
856 goto err;
857
858 mdio_dev =
859 platform_device_register_simple("fsl-cpm-fec-mdio",
860 res.start, &res, 1);
861 if (IS_ERR(mdio_dev)) {
862 ret = PTR_ERR(mdio_dev);
863 goto err;
864 }
865
866 mdio_data.mii_speed = ((((ppc_proc_freq + 4999999) / 2500000) / 2) & 0x3F) << 1;
867
868 ret =
869 platform_device_add_data(mdio_dev, &mdio_data,
870 sizeof(struct fs_mii_fec_platform_info));
871 if (ret)
872 goto unreg;
873 }
874 return 0;
875
876unreg:
877 platform_device_unregister(mdio_dev);
878err:
879 return ret;
880}
881
882arch_initcall(fs_enet_mdio_of_init);
883
884static const char *enet_regs = "regs";
885static const char *enet_pram = "pram";
886static const char *enet_irq = "interrupt";
887static char bus_id[9][BUS_ID_SIZE];
888
889static int __init fs_enet_of_init(void)
890{
891 struct device_node *np;
892 unsigned int i;
893 struct platform_device *fs_enet_dev = NULL;
894 struct resource res;
895 int ret;
896
897 for (np = NULL, i = 0;
898 (np = of_find_compatible_node(np, "network", "fs_enet")) != NULL;
899 i++) {
900 struct resource r[4];
901 struct device_node *phy = NULL, *mdio = NULL;
902 struct fs_platform_info fs_enet_data;
903 unsigned int *id, *phy_addr;
904 void *mac_addr;
905 phandle *ph;
906 char *model;
907
908 memset(r, 0, sizeof(r));
909 memset(&fs_enet_data, 0, sizeof(fs_enet_data));
910
911 model = (char *)get_property(np, "model", NULL);
912 if (model == NULL) {
913 ret = -ENODEV;
914 goto unreg;
915 }
916
917 id = (u32 *) get_property(np, "device-id", NULL);
918 fs_enet_data.fs_no = *id;
919
920 if (platform_device_skip(model, *id))
921 continue;
922
923 ret = of_address_to_resource(np, 0, &r[0]);
924 if (ret)
925 goto err;
926 r[0].name = enet_regs;
927
928 mac_addr = of_get_mac_address(np);
929 if (mac_addr)
930 memcpy(fs_enet_data.macaddr, mac_addr, 6);
931
932 ph = (phandle *) get_property(np, "phy-handle", NULL);
933 if (ph != NULL)
934 phy = of_find_node_by_phandle(*ph);
935
936 if (phy != NULL) {
937 phy_addr = (u32 *) get_property(phy, "reg", NULL);
938 fs_enet_data.phy_addr = *phy_addr;
939 fs_enet_data.has_phy = 1;
940
941 mdio = of_get_parent(phy);
942 ret = of_address_to_resource(mdio, 0, &res);
943 if (ret) {
944 of_node_put(phy);
945 of_node_put(mdio);
946 goto unreg;
947 }
948 }
949
950 model = (char*)get_property(np, "model", NULL);
951 strcpy(fs_enet_data.fs_type, model);
952
953 if (strstr(model, "FEC")) {
954 r[1].start = r[1].end = irq_of_parse_and_map(np, 0);
955 r[1].flags = IORESOURCE_IRQ;
956 r[1].name = enet_irq;
957
958 fs_enet_dev =
959 platform_device_register_simple("fsl-cpm-fec", i, &r[0], 2);
960
961 if (IS_ERR(fs_enet_dev)) {
962 ret = PTR_ERR(fs_enet_dev);
963 goto err;
964 }
965
966 fs_enet_data.rx_ring = 128;
967 fs_enet_data.tx_ring = 16;
968 fs_enet_data.rx_copybreak = 240;
969 fs_enet_data.use_napi = 1;
970 fs_enet_data.napi_weight = 17;
971
972 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%x:%02x",
973 (u32)res.start, fs_enet_data.phy_addr);
974 fs_enet_data.bus_id = (char*)&bus_id[i];
975 fs_enet_data.init_ioports = init_fec_ioports;
976 }
977 if (strstr(model, "SCC")) {
978 ret = of_address_to_resource(np, 1, &r[1]);
979 if (ret)
980 goto err;
981 r[1].name = enet_pram;
982
983 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
984 r[2].flags = IORESOURCE_IRQ;
985 r[2].name = enet_irq;
986
987 fs_enet_dev =
988 platform_device_register_simple("fsl-cpm-scc", i, &r[0], 3);
989
990 if (IS_ERR(fs_enet_dev)) {
991 ret = PTR_ERR(fs_enet_dev);
992 goto err;
993 }
994
995 fs_enet_data.rx_ring = 64;
996 fs_enet_data.tx_ring = 8;
997 fs_enet_data.rx_copybreak = 240;
998 fs_enet_data.use_napi = 1;
999 fs_enet_data.napi_weight = 17;
1000
1001 snprintf((char*)&bus_id[i], BUS_ID_SIZE, "%s", "fixed@10:1");
1002 fs_enet_data.bus_id = (char*)&bus_id[i];
1003 fs_enet_data.init_ioports = init_scc_ioports;
1004 }
1005
1006 of_node_put(phy);
1007 of_node_put(mdio);
1008
1009 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
1010 sizeof(struct
1011 fs_platform_info));
1012 if (ret)
1013 goto unreg;
1014 }
1015 return 0;
1016
1017unreg:
1018 platform_device_unregister(fs_enet_dev);
1019err:
1020 return ret;
1021}
1022
1023arch_initcall(fs_enet_of_init);
1024
1025
1026static const char *smc_regs = "regs";
1027static const char *smc_pram = "pram";
1028
1029static int __init cpm_smc_uart_of_init(void)
1030{
1031 struct device_node *np;
1032 unsigned int i;
1033 struct platform_device *cpm_uart_dev;
1034 int ret;
1035
1036 for (np = NULL, i = 0;
1037 (np = of_find_compatible_node(np, "serial", "cpm_uart")) != NULL;
1038 i++) {
1039 struct resource r[3];
1040 struct fs_uart_platform_info cpm_uart_data;
1041 int *id;
1042 char *model;
1043
1044 memset(r, 0, sizeof(r));
1045 memset(&cpm_uart_data, 0, sizeof(cpm_uart_data));
1046
1047 ret = of_address_to_resource(np, 0, &r[0]);
1048 if (ret)
1049 goto err;
1050
1051 r[0].name = smc_regs;
1052
1053 ret = of_address_to_resource(np, 1, &r[1]);
1054 if (ret)
1055 goto err;
1056 r[1].name = smc_pram;
1057
1058 r[2].start = r[2].end = irq_of_parse_and_map(np, 0);
1059 r[2].flags = IORESOURCE_IRQ;
1060
1061 cpm_uart_dev =
1062 platform_device_register_simple("fsl-cpm-smc:uart", i, &r[0], 3);
1063
1064 if (IS_ERR(cpm_uart_dev)) {
1065 ret = PTR_ERR(cpm_uart_dev);
1066 goto err;
1067 }
1068
1069 model = (char*)get_property(np, "model", NULL);
1070 strcpy(cpm_uart_data.fs_type, model);
1071
1072 id = (int*)get_property(np, "device-id", NULL);
1073 cpm_uart_data.fs_no = *id;
1074 cpm_uart_data.uart_clk = ppc_proc_freq;
1075
1076 cpm_uart_data.tx_num_fifo = 4;
1077 cpm_uart_data.tx_buf_size = 32;
1078 cpm_uart_data.rx_num_fifo = 4;
1079 cpm_uart_data.rx_buf_size = 32;
1080
1081 ret =
1082 platform_device_add_data(cpm_uart_dev, &cpm_uart_data,
1083 sizeof(struct
1084 fs_uart_platform_info));
1085 if (ret)
1086 goto unreg;
1087 }
1088
1089 return 0;
1090
1091unreg:
1092 platform_device_unregister(cpm_uart_dev);
1093err:
1094 return ret;
1095}
1096
1097arch_initcall(cpm_smc_uart_of_init);
1098
1099#endif /* CONFIG_8xx */
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index b6ec793a23be..42053625f498 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -56,6 +56,8 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
56void __init setup_grackle(struct pci_controller *hose) 56void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000);
59 if (machine_is_compatible("PowerMac1,1"))
60 pci_assign_all_buses = 1;
59 if (machine_is_compatible("AAPL,PowerBook1998")) 61 if (machine_is_compatible("AAPL,PowerBook1998"))
60 grackle_set_loop_snoop(hose, 1); 62 grackle_set_loop_snoop(hose, 1);
61#if 0 /* Disabled for now, HW problems ??? */ 63#if 0 /* Disabled for now, HW problems ??? */
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 746f78c15375..473c415e9e25 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -557,8 +557,7 @@ static struct irq_host_ops ipic_host_ops = {
557 .xlate = ipic_host_xlate, 557 .xlate = ipic_host_xlate,
558}; 558};
559 559
560void __init ipic_init(struct device_node *node, 560struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
561 unsigned int flags)
562{ 561{
563 struct ipic *ipic; 562 struct ipic *ipic;
564 struct resource res; 563 struct resource res;
@@ -566,22 +565,24 @@ void __init ipic_init(struct device_node *node,
566 565
567 ipic = alloc_bootmem(sizeof(struct ipic)); 566 ipic = alloc_bootmem(sizeof(struct ipic));
568 if (ipic == NULL) 567 if (ipic == NULL)
569 return; 568 return NULL;
570 569
571 memset(ipic, 0, sizeof(struct ipic)); 570 memset(ipic, 0, sizeof(struct ipic));
572 ipic->of_node = node ? of_node_get(node) : NULL; 571 ipic->of_node = of_node_get(node);
573 572
574 ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 573 ipic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR,
575 NR_IPIC_INTS, 574 NR_IPIC_INTS,
576 &ipic_host_ops, 0); 575 &ipic_host_ops, 0);
577 if (ipic->irqhost == NULL) { 576 if (ipic->irqhost == NULL) {
578 of_node_put(node); 577 of_node_put(node);
579 return; 578 return NULL;
580 } 579 }
581 580
582 ret = of_address_to_resource(node, 0, &res); 581 ret = of_address_to_resource(node, 0, &res);
583 if (ret) 582 if (ret) {
584 return; 583 of_node_put(node);
584 return NULL;
585 }
585 586
586 ipic->regs = ioremap(res.start, res.end - res.start + 1); 587 ipic->regs = ioremap(res.start, res.end - res.start + 1);
587 588
@@ -625,6 +626,8 @@ void __init ipic_init(struct device_node *node,
625 626
626 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS, 627 printk ("IPIC (%d IRQ sources) at %p\n", NR_IPIC_INTS,
627 primary_ipic->regs); 628 primary_ipic->regs);
629
630 return ipic;
628} 631}
629 632
630int ipic_set_priority(unsigned int virq, unsigned int priority) 633int ipic_set_priority(unsigned int virq, unsigned int priority)
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
new file mode 100644
index 000000000000..712b10a55f87
--- /dev/null
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -0,0 +1,743 @@
1
2/* Microcode patches for the CPM as supplied by Motorola.
3 * This is the one for IIC/SPI. There is a newer one that
4 * also relocates SMC2, but this would require additional changes
5 * to uart.c, so I am holding off on that for a moment.
6 */
7#include <linux/errno.h>
8#include <linux/sched.h>
9#include <linux/kernel.h>
10#include <linux/param.h>
11#include <linux/string.h>
12#include <linux/mm.h>
13#include <linux/interrupt.h>
14#include <asm/irq.h>
15#include <asm/mpc8xx.h>
16#include <asm/page.h>
17#include <asm/pgtable.h>
18#include <asm/8xx_immap.h>
19#include <asm/commproc.h>
20
21/*
22 * I2C/SPI relocation patch arrays.
23 */
24
25#ifdef CONFIG_I2C_SPI_UCODE_PATCH
26
27uint patch_2000[] = {
28 0x7FFFEFD9,
29 0x3FFD0000,
30 0x7FFB49F7,
31 0x7FF90000,
32 0x5FEFADF7,
33 0x5F89ADF7,
34 0x5FEFAFF7,
35 0x5F89AFF7,
36 0x3A9CFBC8,
37 0xE7C0EDF0,
38 0x77C1E1BB,
39 0xF4DC7F1D,
40 0xABAD932F,
41 0x4E08FDCF,
42 0x6E0FAFF8,
43 0x7CCF76CF,
44 0xFD1FF9CF,
45 0xABF88DC6,
46 0xAB5679F7,
47 0xB0937383,
48 0xDFCE79F7,
49 0xB091E6BB,
50 0xE5BBE74F,
51 0xB3FA6F0F,
52 0x6FFB76CE,
53 0xEE0DF9CF,
54 0x2BFBEFEF,
55 0xCFEEF9CF,
56 0x76CEAD24,
57 0x90B2DF9A,
58 0x7FDDD0BF,
59 0x4BF847FD,
60 0x7CCF76CE,
61 0xCFEF7E1F,
62 0x7F1D7DFD,
63 0xF0B6EF71,
64 0x7FC177C1,
65 0xFBC86079,
66 0xE722FBC8,
67 0x5FFFDFFF,
68 0x5FB2FFFB,
69 0xFBC8F3C8,
70 0x94A67F01,
71 0x7F1D5F39,
72 0xAFE85F5E,
73 0xFFDFDF96,
74 0xCB9FAF7D,
75 0x5FC1AFED,
76 0x8C1C5FC1,
77 0xAFDD5FC3,
78 0xDF9A7EFD,
79 0xB0B25FB2,
80 0xFFFEABAD,
81 0x5FB2FFFE,
82 0x5FCE600B,
83 0xE6BB600B,
84 0x5FCEDFC6,
85 0x27FBEFDF,
86 0x5FC8CFDE,
87 0x3A9CE7C0,
88 0xEDF0F3C8,
89 0x7F0154CD,
90 0x7F1D2D3D,
91 0x363A7570,
92 0x7E0AF1CE,
93 0x37EF2E68,
94 0x7FEE10EC,
95 0xADF8EFDE,
96 0xCFEAE52F,
97 0x7D0FE12B,
98 0xF1CE5F65,
99 0x7E0A4DF8,
100 0xCFEA5F72,
101 0x7D0BEFEE,
102 0xCFEA5F74,
103 0xE522EFDE,
104 0x5F74CFDA,
105 0x0B627385,
106 0xDF627E0A,
107 0x30D8145B,
108 0xBFFFF3C8,
109 0x5FFFDFFF,
110 0xA7F85F5E,
111 0xBFFE7F7D,
112 0x10D31450,
113 0x5F36BFFF,
114 0xAF785F5E,
115 0xBFFDA7F8,
116 0x5F36BFFE,
117 0x77FD30C0,
118 0x4E08FDCF,
119 0xE5FF6E0F,
120 0xAFF87E1F,
121 0x7E0FFD1F,
122 0xF1CF5F1B,
123 0xABF80D5E,
124 0x5F5EFFEF,
125 0x79F730A2,
126 0xAFDD5F34,
127 0x47F85F34,
128 0xAFED7FDD,
129 0x50B24978,
130 0x47FD7F1D,
131 0x7DFD70AD,
132 0xEF717EC1,
133 0x6BA47F01,
134 0x2D267EFD,
135 0x30DE5F5E,
136 0xFFFD5F5E,
137 0xFFEF5F5E,
138 0xFFDF0CA0,
139 0xAFED0A9E,
140 0xAFDD0C3A,
141 0x5F3AAFBD,
142 0x7FBDB082,
143 0x5F8247F8
144};
145
146uint patch_2f00[] = {
147 0x3E303430,
148 0x34343737,
149 0xABF7BF9B,
150 0x994B4FBD,
151 0xBD599493,
152 0x349FFF37,
153 0xFB9B177D,
154 0xD9936956,
155 0xBBFDD697,
156 0xBDD2FD11,
157 0x31DB9BB3,
158 0x63139637,
159 0x93733693,
160 0x193137F7,
161 0x331737AF,
162 0x7BB9B999,
163 0xBB197957,
164 0x7FDFD3D5,
165 0x73B773F7,
166 0x37933B99,
167 0x1D115316,
168 0x99315315,
169 0x31694BF4,
170 0xFBDBD359,
171 0x31497353,
172 0x76956D69,
173 0x7B9D9693,
174 0x13131979,
175 0x79376935
176};
177#endif
178
179/*
180 * I2C/SPI/SMC1 relocation patch arrays.
181 */
182
183#ifdef CONFIG_I2C_SPI_SMC1_UCODE_PATCH
184
185uint patch_2000[] = {
186 0x3fff0000,
187 0x3ffd0000,
188 0x3ffb0000,
189 0x3ff90000,
190 0x5f13eff8,
191 0x5eb5eff8,
192 0x5f88adf7,
193 0x5fefadf7,
194 0x3a9cfbc8,
195 0x77cae1bb,
196 0xf4de7fad,
197 0xabae9330,
198 0x4e08fdcf,
199 0x6e0faff8,
200 0x7ccf76cf,
201 0xfdaff9cf,
202 0xabf88dc8,
203 0xab5879f7,
204 0xb0925d8d,
205 0xdfd079f7,
206 0xb090e6bb,
207 0xe5bbe74f,
208 0x9e046f0f,
209 0x6ffb76ce,
210 0xee0cf9cf,
211 0x2bfbefef,
212 0xcfeef9cf,
213 0x76cead23,
214 0x90b3df99,
215 0x7fddd0c1,
216 0x4bf847fd,
217 0x7ccf76ce,
218 0xcfef77ca,
219 0x7eaf7fad,
220 0x7dfdf0b7,
221 0xef7a7fca,
222 0x77cafbc8,
223 0x6079e722,
224 0xfbc85fff,
225 0xdfff5fb3,
226 0xfffbfbc8,
227 0xf3c894a5,
228 0xe7c9edf9,
229 0x7f9a7fad,
230 0x5f36afe8,
231 0x5f5bffdf,
232 0xdf95cb9e,
233 0xaf7d5fc3,
234 0xafed8c1b,
235 0x5fc3afdd,
236 0x5fc5df99,
237 0x7efdb0b3,
238 0x5fb3fffe,
239 0xabae5fb3,
240 0xfffe5fd0,
241 0x600be6bb,
242 0x600b5fd0,
243 0xdfc827fb,
244 0xefdf5fca,
245 0xcfde3a9c,
246 0xe7c9edf9,
247 0xf3c87f9e,
248 0x54ca7fed,
249 0x2d3a3637,
250 0x756f7e9a,
251 0xf1ce37ef,
252 0x2e677fee,
253 0x10ebadf8,
254 0xefdecfea,
255 0xe52f7d9f,
256 0xe12bf1ce,
257 0x5f647e9a,
258 0x4df8cfea,
259 0x5f717d9b,
260 0xefeecfea,
261 0x5f73e522,
262 0xefde5f73,
263 0xcfda0b61,
264 0x5d8fdf61,
265 0xe7c9edf9,
266 0x7e9a30d5,
267 0x1458bfff,
268 0xf3c85fff,
269 0xdfffa7f8,
270 0x5f5bbffe,
271 0x7f7d10d0,
272 0x144d5f33,
273 0xbfffaf78,
274 0x5f5bbffd,
275 0xa7f85f33,
276 0xbffe77fd,
277 0x30bd4e08,
278 0xfdcfe5ff,
279 0x6e0faff8,
280 0x7eef7e9f,
281 0xfdeff1cf,
282 0x5f17abf8,
283 0x0d5b5f5b,
284 0xffef79f7,
285 0x309eafdd,
286 0x5f3147f8,
287 0x5f31afed,
288 0x7fdd50af,
289 0x497847fd,
290 0x7f9e7fed,
291 0x7dfd70a9,
292 0xef7e7ece,
293 0x6ba07f9e,
294 0x2d227efd,
295 0x30db5f5b,
296 0xfffd5f5b,
297 0xffef5f5b,
298 0xffdf0c9c,
299 0xafed0a9a,
300 0xafdd0c37,
301 0x5f37afbd,
302 0x7fbdb081,
303 0x5f8147f8,
304 0x3a11e710,
305 0xedf0ccdd,
306 0xf3186d0a,
307 0x7f0e5f06,
308 0x7fedbb38,
309 0x3afe7468,
310 0x7fedf4fc,
311 0x8ffbb951,
312 0xb85f77fd,
313 0xb0df5ddd,
314 0xdefe7fed,
315 0x90e1e74d,
316 0x6f0dcbf7,
317 0xe7decfed,
318 0xcb74cfed,
319 0xcfeddf6d,
320 0x91714f74,
321 0x5dd2deef,
322 0x9e04e7df,
323 0xefbb6ffb,
324 0xe7ef7f0e,
325 0x9e097fed,
326 0xebdbeffa,
327 0xeb54affb,
328 0x7fea90d7,
329 0x7e0cf0c3,
330 0xbffff318,
331 0x5fffdfff,
332 0xac59efea,
333 0x7fce1ee5,
334 0xe2ff5ee1,
335 0xaffbe2ff,
336 0x5ee3affb,
337 0xf9cc7d0f,
338 0xaef8770f,
339 0x7d0fb0c6,
340 0xeffbbfff,
341 0xcfef5ede,
342 0x7d0fbfff,
343 0x5ede4cf8,
344 0x7fddd0bf,
345 0x49f847fd,
346 0x7efdf0bb,
347 0x7fedfffd,
348 0x7dfdf0b7,
349 0xef7e7e1e,
350 0x5ede7f0e,
351 0x3a11e710,
352 0xedf0ccab,
353 0xfb18ad2e,
354 0x1ea9bbb8,
355 0x74283b7e,
356 0x73c2e4bb,
357 0x2ada4fb8,
358 0xdc21e4bb,
359 0xb2a1ffbf,
360 0x5e2c43f8,
361 0xfc87e1bb,
362 0xe74ffd91,
363 0x6f0f4fe8,
364 0xc7ba32e2,
365 0xf396efeb,
366 0x600b4f78,
367 0xe5bb760b,
368 0x53acaef8,
369 0x4ef88b0e,
370 0xcfef9e09,
371 0xabf8751f,
372 0xefef5bac,
373 0x741f4fe8,
374 0x751e760d,
375 0x7fdbf081,
376 0x741cafce,
377 0xefcc7fce,
378 0x751e70ac,
379 0x741ce7bb,
380 0x3372cfed,
381 0xafdbefeb,
382 0xe5bb760b,
383 0x53f2aef8,
384 0xafe8e7eb,
385 0x4bf8771e,
386 0x7e247fed,
387 0x4fcbe2cc,
388 0x7fbc30a9,
389 0x7b0f7a0f,
390 0x34d577fd,
391 0x308b5db7,
392 0xde553e5f,
393 0xaf78741f,
394 0x741f30f0,
395 0xcfef5e2c,
396 0x741f3eac,
397 0xafb8771e,
398 0x5e677fed,
399 0x0bd3e2cc,
400 0x741ccfec,
401 0xe5ca53cd,
402 0x6fcb4f74,
403 0x5dadde4b,
404 0x2ab63d38,
405 0x4bb3de30,
406 0x751f741c,
407 0x6c42effa,
408 0xefea7fce,
409 0x6ffc30be,
410 0xefec3fca,
411 0x30b3de2e,
412 0xadf85d9e,
413 0xaf7daefd,
414 0x5d9ede2e,
415 0x5d9eafdd,
416 0x761f10ac,
417 0x1da07efd,
418 0x30adfffe,
419 0x4908fb18,
420 0x5fffdfff,
421 0xafbb709b,
422 0x4ef85e67,
423 0xadf814ad,
424 0x7a0f70ad,
425 0xcfef50ad,
426 0x7a0fde30,
427 0x5da0afed,
428 0x3c12780f,
429 0xefef780f,
430 0xefef790f,
431 0xa7f85e0f,
432 0xffef790f,
433 0xefef790f,
434 0x14adde2e,
435 0x5d9eadfd,
436 0x5e2dfffb,
437 0xe79addfd,
438 0xeff96079,
439 0x607ae79a,
440 0xddfceff9,
441 0x60795dff,
442 0x607acfef,
443 0xefefefdf,
444 0xefbfef7f,
445 0xeeffedff,
446 0xebffe7ff,
447 0xafefafdf,
448 0xafbfaf7f,
449 0xaeffadff,
450 0xabffa7ff,
451 0x6fef6fdf,
452 0x6fbf6f7f,
453 0x6eff6dff,
454 0x6bff67ff,
455 0x2fef2fdf,
456 0x2fbf2f7f,
457 0x2eff2dff,
458 0x2bff27ff,
459 0x4e08fd1f,
460 0xe5ff6e0f,
461 0xaff87eef,
462 0x7e0ffdef,
463 0xf11f6079,
464 0xabf8f542,
465 0x7e0af11c,
466 0x37cfae3a,
467 0x7fec90be,
468 0xadf8efdc,
469 0xcfeae52f,
470 0x7d0fe12b,
471 0xf11c6079,
472 0x7e0a4df8,
473 0xcfea5dc4,
474 0x7d0befec,
475 0xcfea5dc6,
476 0xe522efdc,
477 0x5dc6cfda,
478 0x4e08fd1f,
479 0x6e0faff8,
480 0x7c1f761f,
481 0xfdeff91f,
482 0x6079abf8,
483 0x761cee24,
484 0xf91f2bfb,
485 0xefefcfec,
486 0xf91f6079,
487 0x761c27fb,
488 0xefdf5da7,
489 0xcfdc7fdd,
490 0xd09c4bf8,
491 0x47fd7c1f,
492 0x761ccfcf,
493 0x7eef7fed,
494 0x7dfdf093,
495 0xef7e7f1e,
496 0x771efb18,
497 0x6079e722,
498 0xe6bbe5bb,
499 0xae0ae5bb,
500 0x600bae85,
501 0xe2bbe2bb,
502 0xe2bbe2bb,
503 0xaf02e2bb,
504 0xe2bb2ff9,
505 0x6079e2bb
506};
507
508uint patch_2f00[] = {
509 0x30303030,
510 0x3e3e3434,
511 0xabbf9b99,
512 0x4b4fbdbd,
513 0x59949334,
514 0x9fff37fb,
515 0x9b177dd9,
516 0x936956bb,
517 0xfbdd697b,
518 0xdd2fd113,
519 0x1db9f7bb,
520 0x36313963,
521 0x79373369,
522 0x3193137f,
523 0x7331737a,
524 0xf7bb9b99,
525 0x9bb19795,
526 0x77fdfd3d,
527 0x573b773f,
528 0x737933f7,
529 0xb991d115,
530 0x31699315,
531 0x31531694,
532 0xbf4fbdbd,
533 0x35931497,
534 0x35376956,
535 0xbd697b9d,
536 0x96931313,
537 0x19797937,
538 0x6935af78,
539 0xb9b3baa3,
540 0xb8788683,
541 0x368f78f7,
542 0x87778733,
543 0x3ffffb3b,
544 0x8e8f78b8,
545 0x1d118e13,
546 0xf3ff3f8b,
547 0x6bd8e173,
548 0xd1366856,
549 0x68d1687b,
550 0x3daf78b8,
551 0x3a3a3f87,
552 0x8f81378f,
553 0xf876f887,
554 0x77fd8778,
555 0x737de8d6,
556 0xbbf8bfff,
557 0xd8df87f7,
558 0xfd876f7b,
559 0x8bfff8bd,
560 0x8683387d,
561 0xb873d87b,
562 0x3b8fd7f8,
563 0xf7338883,
564 0xbb8ee1f8,
565 0xef837377,
566 0x3337b836,
567 0x817d11f8,
568 0x7378b878,
569 0xd3368b7d,
570 0xed731b7d,
571 0x833731f3,
572 0xf22f3f23
573};
574
575uint patch_2e00[] = {
576 0x27eeeeee,
577 0xeeeeeeee,
578 0xeeeeeeee,
579 0xeeeeeeee,
580 0xee4bf4fb,
581 0xdbd259bb,
582 0x1979577f,
583 0xdfd2d573,
584 0xb773f737,
585 0x4b4fbdbd,
586 0x25b9b177,
587 0xd2d17376,
588 0x956bbfdd,
589 0x697bdd2f,
590 0xff9f79ff,
591 0xff9ff22f
592};
593#endif
594
595/*
596 * USB SOF patch arrays.
597 */
598
599#ifdef CONFIG_USB_SOF_UCODE_PATCH
600
601uint patch_2000[] = {
602 0x7fff0000,
603 0x7ffd0000,
604 0x7ffb0000,
605 0x49f7ba5b,
606 0xba383ffb,
607 0xf9b8b46d,
608 0xe5ab4e07,
609 0xaf77bffe,
610 0x3f7bbf79,
611 0xba5bba38,
612 0xe7676076,
613 0x60750000
614};
615
616uint patch_2f00[] = {
617 0x3030304c,
618 0xcab9e441,
619 0xa1aaf220
620};
621#endif
622
623void
624cpm_load_patch(cpm8xx_t *cp)
625{
626 volatile uint *dp; /* Dual-ported RAM. */
627 volatile cpm8xx_t *commproc;
628 volatile iic_t *iip;
629 volatile spi_t *spp;
630 volatile smc_uart_t *smp;
631 int i;
632
633 commproc = cp;
634
635#ifdef CONFIG_USB_SOF_UCODE_PATCH
636 commproc->cp_rccr = 0;
637
638 dp = (uint *)(commproc->cp_dpmem);
639 for (i=0; i<(sizeof(patch_2000)/4); i++)
640 *dp++ = patch_2000[i];
641
642 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
643 for (i=0; i<(sizeof(patch_2f00)/4); i++)
644 *dp++ = patch_2f00[i];
645
646 commproc->cp_rccr = 0x0009;
647
648 printk("USB SOF microcode patch installed\n");
649#endif /* CONFIG_USB_SOF_UCODE_PATCH */
650
651#if defined(CONFIG_I2C_SPI_UCODE_PATCH) || \
652 defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
653
654 commproc->cp_rccr = 0;
655
656 dp = (uint *)(commproc->cp_dpmem);
657 for (i=0; i<(sizeof(patch_2000)/4); i++)
658 *dp++ = patch_2000[i];
659
660 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
661 for (i=0; i<(sizeof(patch_2f00)/4); i++)
662 *dp++ = patch_2f00[i];
663
664 iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
665# define RPBASE 0x0500
666 iip->iic_rpbase = RPBASE;
667
668 /* Put SPI above the IIC, also 32-byte aligned.
669 */
670 i = (RPBASE + sizeof(iic_t) + 31) & ~31;
671 spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
672 spp->spi_rpbase = i;
673
674# if defined(CONFIG_I2C_SPI_UCODE_PATCH)
675 commproc->cp_cpmcr1 = 0x802a;
676 commproc->cp_cpmcr2 = 0x8028;
677 commproc->cp_cpmcr3 = 0x802e;
678 commproc->cp_cpmcr4 = 0x802c;
679 commproc->cp_rccr = 1;
680
681 printk("I2C/SPI microcode patch installed.\n");
682# endif /* CONFIG_I2C_SPI_UCODE_PATCH */
683
684# if defined(CONFIG_I2C_SPI_SMC1_UCODE_PATCH)
685
686 dp = (uint *)&(commproc->cp_dpmem[0x0e00]);
687 for (i=0; i<(sizeof(patch_2e00)/4); i++)
688 *dp++ = patch_2e00[i];
689
690 commproc->cp_cpmcr1 = 0x8080;
691 commproc->cp_cpmcr2 = 0x808a;
692 commproc->cp_cpmcr3 = 0x8028;
693 commproc->cp_cpmcr4 = 0x802a;
694 commproc->cp_rccr = 3;
695
696 smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SMC1];
697 smp->smc_rpbase = 0x1FC0;
698
699 printk("I2C/SPI/SMC1 microcode patch installed.\n");
700# endif /* CONFIG_I2C_SPI_SMC1_UCODE_PATCH) */
701
702#endif /* some variation of the I2C/SPI patch was selected */
703}
704
705/*
706 * Take this entire routine out, since no one calls it and its
707 * logic is suspect.
708 */
709
710#if 0
711void
712verify_patch(volatile immap_t *immr)
713{
714 volatile uint *dp;
715 volatile cpm8xx_t *commproc;
716 int i;
717
718 commproc = (cpm8xx_t *)&immr->im_cpm;
719
720 printk("cp_rccr %x\n", commproc->cp_rccr);
721 commproc->cp_rccr = 0;
722
723 dp = (uint *)(commproc->cp_dpmem);
724 for (i=0; i<(sizeof(patch_2000)/4); i++)
725 if (*dp++ != patch_2000[i]) {
726 printk("patch_2000 bad at %d\n", i);
727 dp--;
728 printk("found 0x%X, wanted 0x%X\n", *dp, patch_2000[i]);
729 break;
730 }
731
732 dp = (uint *)&(commproc->cp_dpmem[0x0f00]);
733 for (i=0; i<(sizeof(patch_2f00)/4); i++)
734 if (*dp++ != patch_2f00[i]) {
735 printk("patch_2f00 bad at %d\n", i);
736 dp--;
737 printk("found 0x%X, wanted 0x%X\n", *dp, patch_2f00[i]);
738 break;
739 }
740
741 commproc->cp_rccr = 0x0009;
742}
743#endif
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
new file mode 100644
index 000000000000..2fc2bcd79b5e
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -0,0 +1,197 @@
1#include <linux/kernel.h>
2#include <linux/module.h>
3#include <linux/stddef.h>
4#include <linux/init.h>
5#include <linux/sched.h>
6#include <linux/signal.h>
7#include <linux/irq.h>
8#include <linux/dma-mapping.h>
9#include <asm/prom.h>
10#include <asm/irq.h>
11#include <asm/io.h>
12#include <asm/8xx_immap.h>
13#include <asm/mpc8xx.h>
14
15#include "mpc8xx_pic.h"
16
17
18#define PIC_VEC_SPURRIOUS 15
19
20extern int cpm_get_irq(struct pt_regs *regs);
21
22static struct device_node *mpc8xx_pic_node;
23static struct irq_host *mpc8xx_pic_host;
24#define NR_MASK_WORDS ((NR_IRQS + 31) / 32)
25static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
26static sysconf8xx_t *siu_reg;
27
28int cpm_get_irq(struct pt_regs *regs);
29
30static void mpc8xx_unmask_irq(unsigned int virq)
31{
32 int bit, word;
33 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
34
35 bit = irq_nr & 0x1f;
36 word = irq_nr >> 5;
37
38 ppc_cached_irq_mask[word] |= (1 << (31-bit));
39 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
40}
41
42static void mpc8xx_mask_irq(unsigned int virq)
43{
44 int bit, word;
45 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
46
47 bit = irq_nr & 0x1f;
48 word = irq_nr >> 5;
49
50 ppc_cached_irq_mask[word] &= ~(1 << (31-bit));
51 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
52}
53
54static void mpc8xx_ack(unsigned int virq)
55{
56 int bit;
57 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
58
59 bit = irq_nr & 0x1f;
60 out_be32(&siu_reg->sc_sipend, 1 << (31-bit));
61}
62
63static void mpc8xx_end_irq(unsigned int virq)
64{
65 int bit, word;
66 unsigned int irq_nr = (unsigned int)irq_map[virq].hwirq;
67
68 bit = irq_nr & 0x1f;
69 word = irq_nr >> 5;
70
71 ppc_cached_irq_mask[word] |= (1 << (31-bit));
72 out_be32(&siu_reg->sc_simask, ppc_cached_irq_mask[word]);
73}
74
75static int mpc8xx_set_irq_type(unsigned int virq, unsigned int flow_type)
76{
77 struct irq_desc *desc = get_irq_desc(virq);
78
79 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
80 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
81 if (flow_type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
82 desc->status |= IRQ_LEVEL;
83
84 if (flow_type & IRQ_TYPE_EDGE_FALLING) {
85 irq_hw_number_t hw = (unsigned int)irq_map[virq].hwirq;
86 unsigned int siel = in_be32(&siu_reg->sc_siel);
87
88 /* only external IRQ senses are programmable */
89 if ((hw & 1) == 0) {
90 siel |= (0x80000000 >> hw);
91 out_be32(&siu_reg->sc_siel, siel);
92 desc->handle_irq = handle_edge_irq;
93 }
94 }
95 return 0;
96}
97
98static struct irq_chip mpc8xx_pic = {
99 .typename = " MPC8XX SIU ",
100 .unmask = mpc8xx_unmask_irq,
101 .mask = mpc8xx_mask_irq,
102 .ack = mpc8xx_ack,
103 .eoi = mpc8xx_end_irq,
104 .set_type = mpc8xx_set_irq_type,
105};
106
107unsigned int mpc8xx_get_irq(void)
108{
109 int irq;
110
111 /* For MPC8xx, read the SIVEC register and shift the bits down
112 * to get the irq number.
113 */
114 irq = in_be32(&siu_reg->sc_sivec) >> 26;
115
116 if (irq == PIC_VEC_SPURRIOUS)
117 irq = NO_IRQ;
118
119 return irq_linear_revmap(mpc8xx_pic_host, irq);
120
121}
122
123static int mpc8xx_pic_host_match(struct irq_host *h, struct device_node *node)
124{
125 return mpc8xx_pic_node == node;
126}
127
128static int mpc8xx_pic_host_map(struct irq_host *h, unsigned int virq,
129 irq_hw_number_t hw)
130{
131 pr_debug("mpc8xx_pic_host_map(%d, 0x%lx)\n", virq, hw);
132
133 /* Set default irq handle */
134 set_irq_chip_and_handler(virq, &mpc8xx_pic, handle_level_irq);
135 return 0;
136}
137
138
139static int mpc8xx_pic_host_xlate(struct irq_host *h, struct device_node *ct,
140 u32 *intspec, unsigned int intsize,
141 irq_hw_number_t *out_hwirq, unsigned int *out_flags)
142{
143 static unsigned char map_pic_senses[4] = {
144 IRQ_TYPE_EDGE_RISING,
145 IRQ_TYPE_LEVEL_LOW,
146 IRQ_TYPE_LEVEL_HIGH,
147 IRQ_TYPE_EDGE_FALLING,
148 };
149
150 *out_hwirq = intspec[0];
151 if (intsize > 1 && intspec[1] < 4)
152 *out_flags = map_pic_senses[intspec[1]];
153 else
154 *out_flags = IRQ_TYPE_NONE;
155
156 return 0;
157}
158
159
160static struct irq_host_ops mpc8xx_pic_host_ops = {
161 .match = mpc8xx_pic_host_match,
162 .map = mpc8xx_pic_host_map,
163 .xlate = mpc8xx_pic_host_xlate,
164};
165
166int mpc8xx_pic_init(void)
167{
168 struct resource res;
169 struct device_node *np = NULL;
170 int ret;
171
172 np = of_find_node_by_type(np, "mpc8xx-pic");
173
174 if (np == NULL) {
175 printk(KERN_ERR "Could not find open-pic node\n");
176 return -ENOMEM;
177 }
178
179 mpc8xx_pic_node = of_node_get(np);
180
181 ret = of_address_to_resource(np, 0, &res);
182 of_node_put(np);
183 if (ret)
184 return ret;
185
186 siu_reg = (void *)ioremap(res.start, res.end - res.start + 1);
187 if (siu_reg == NULL)
188 return -EINVAL;
189
190 mpc8xx_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 64, &mpc8xx_pic_host_ops, 64);
191 if (mpc8xx_pic_host == NULL) {
192 printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n");
193 ret = -ENOMEM;
194 }
195
196 return ret;
197}
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.h b/arch/powerpc/sysdev/mpc8xx_pic.h
new file mode 100644
index 000000000000..afa2ee6717c1
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc8xx_pic.h
@@ -0,0 +1,12 @@
1#ifndef _PPC_KERNEL_MPC8xx_H
2#define _PPC_KERNEL_MPC8xx_H
3
4#include <linux/irq.h>
5#include <linux/interrupt.h>
6
7extern struct hw_interrupt_type mpc8xx_pic;
8
9int mpc8xx_pic_init(void);
10unsigned int mpc8xx_get_irq(void);
11
12#endif /* _PPC_KERNEL_PPC8xx_H */
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index d01ced11694d..bcfb900481f8 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -496,13 +496,18 @@ static void __init mpic_scan_ht_pics(struct mpic *mpic)
496static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi) 496static struct mpic *mpic_find(unsigned int irq, unsigned int *is_ipi)
497{ 497{
498 unsigned int src = mpic_irq_to_hw(irq); 498 unsigned int src = mpic_irq_to_hw(irq);
499 struct mpic *mpic;
499 500
500 if (irq < NUM_ISA_INTERRUPTS) 501 if (irq < NUM_ISA_INTERRUPTS)
501 return NULL; 502 return NULL;
503
504 mpic = irq_desc[irq].chip_data;
505
502 if (is_ipi) 506 if (is_ipi)
503 *is_ipi = (src >= MPIC_VEC_IPI_0 && src <= MPIC_VEC_IPI_3); 507 *is_ipi = (src >= mpic->ipi_vecs[0] &&
508 src <= mpic->ipi_vecs[3]);
504 509
505 return irq_desc[irq].chip_data; 510 return mpic;
506} 511}
507 512
508/* Convert a cpu mask from logical to physical cpu numbers. */ 513/* Convert a cpu mask from logical to physical cpu numbers. */
@@ -540,7 +545,11 @@ static inline void mpic_eoi(struct mpic *mpic)
540#ifdef CONFIG_SMP 545#ifdef CONFIG_SMP
541static irqreturn_t mpic_ipi_action(int irq, void *dev_id) 546static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
542{ 547{
543 smp_message_recv(mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0); 548 struct mpic *mpic;
549
550 mpic = mpic_find(irq, NULL);
551 smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
552
544 return IRQ_HANDLED; 553 return IRQ_HANDLED;
545} 554}
546#endif /* CONFIG_SMP */ 555#endif /* CONFIG_SMP */
@@ -663,7 +672,7 @@ static void mpic_end_ht_irq(unsigned int irq)
663static void mpic_unmask_ipi(unsigned int irq) 672static void mpic_unmask_ipi(unsigned int irq)
664{ 673{
665 struct mpic *mpic = mpic_from_ipi(irq); 674 struct mpic *mpic = mpic_from_ipi(irq);
666 unsigned int src = mpic_irq_to_hw(irq) - MPIC_VEC_IPI_0; 675 unsigned int src = mpic_irq_to_hw(irq) - mpic->ipi_vecs[0];
667 676
668 DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src); 677 DBG("%s: enable_ipi: %d (ipi %d)\n", mpic->name, irq, src);
669 mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK); 678 mpic_ipi_write(src, mpic_ipi_read(src) & ~MPIC_VECPRI_MASK);
@@ -807,11 +816,11 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
807 816
808 DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw); 817 DBG("mpic: map virq %d, hwirq 0x%lx\n", virq, hw);
809 818
810 if (hw == MPIC_VEC_SPURRIOUS) 819 if (hw == mpic->spurious_vec)
811 return -EINVAL; 820 return -EINVAL;
812 821
813#ifdef CONFIG_SMP 822#ifdef CONFIG_SMP
814 else if (hw >= MPIC_VEC_IPI_0) { 823 else if (hw >= mpic->ipi_vecs[0]) {
815 WARN_ON(!(mpic->flags & MPIC_PRIMARY)); 824 WARN_ON(!(mpic->flags & MPIC_PRIMARY));
816 825
817 DBG("mpic: mapping as IPI\n"); 826 DBG("mpic: mapping as IPI\n");
@@ -904,6 +913,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
904 u32 reg; 913 u32 reg;
905 const char *vers; 914 const char *vers;
906 int i; 915 int i;
916 int intvec_top;
907 u64 paddr = phys_addr; 917 u64 paddr = phys_addr;
908 918
909 mpic = alloc_bootmem(sizeof(struct mpic)); 919 mpic = alloc_bootmem(sizeof(struct mpic));
@@ -912,11 +922,11 @@ struct mpic * __init mpic_alloc(struct device_node *node,
912 922
913 memset(mpic, 0, sizeof(struct mpic)); 923 memset(mpic, 0, sizeof(struct mpic));
914 mpic->name = name; 924 mpic->name = name;
915 mpic->of_node = node ? of_node_get(node) : NULL; 925 mpic->of_node = of_node_get(node);
916 926
917 mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 256, 927 mpic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, isu_size,
918 &mpic_host_ops, 928 &mpic_host_ops,
919 MPIC_VEC_SPURRIOUS); 929 flags & MPIC_LARGE_VECTORS ? 2048 : 256);
920 if (mpic->irqhost == NULL) { 930 if (mpic->irqhost == NULL) {
921 of_node_put(node); 931 of_node_put(node);
922 return NULL; 932 return NULL;
@@ -944,6 +954,21 @@ struct mpic * __init mpic_alloc(struct device_node *node,
944 mpic->irq_count = irq_count; 954 mpic->irq_count = irq_count;
945 mpic->num_sources = 0; /* so far */ 955 mpic->num_sources = 0; /* so far */
946 956
957 if (flags & MPIC_LARGE_VECTORS)
958 intvec_top = 2047;
959 else
960 intvec_top = 255;
961
962 mpic->timer_vecs[0] = intvec_top - 8;
963 mpic->timer_vecs[1] = intvec_top - 7;
964 mpic->timer_vecs[2] = intvec_top - 6;
965 mpic->timer_vecs[3] = intvec_top - 5;
966 mpic->ipi_vecs[0] = intvec_top - 4;
967 mpic->ipi_vecs[1] = intvec_top - 3;
968 mpic->ipi_vecs[2] = intvec_top - 2;
969 mpic->ipi_vecs[3] = intvec_top - 1;
970 mpic->spurious_vec = intvec_top;
971
947 /* Check for "big-endian" in device-tree */ 972 /* Check for "big-endian" in device-tree */
948 if (node && get_property(node, "big-endian", NULL) != NULL) 973 if (node && get_property(node, "big-endian", NULL) != NULL)
949 mpic->flags |= MPIC_BIG_ENDIAN; 974 mpic->flags |= MPIC_BIG_ENDIAN;
@@ -1084,11 +1109,6 @@ void __init mpic_init(struct mpic *mpic)
1084 int i; 1109 int i;
1085 1110
1086 BUG_ON(mpic->num_sources == 0); 1111 BUG_ON(mpic->num_sources == 0);
1087 WARN_ON(mpic->num_sources > MPIC_VEC_IPI_0);
1088
1089 /* Sanitize source count */
1090 if (mpic->num_sources > MPIC_VEC_IPI_0)
1091 mpic->num_sources = MPIC_VEC_IPI_0;
1092 1112
1093 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources); 1113 printk(KERN_INFO "mpic: Initializing for %d sources\n", mpic->num_sources);
1094 1114
@@ -1104,7 +1124,7 @@ void __init mpic_init(struct mpic *mpic)
1104 i * MPIC_INFO(TIMER_STRIDE) + 1124 i * MPIC_INFO(TIMER_STRIDE) +
1105 MPIC_INFO(TIMER_VECTOR_PRI), 1125 MPIC_INFO(TIMER_VECTOR_PRI),
1106 MPIC_VECPRI_MASK | 1126 MPIC_VECPRI_MASK |
1107 (MPIC_VEC_TIMER_0 + i)); 1127 (mpic->timer_vecs[0] + i));
1108 } 1128 }
1109 1129
1110 /* Initialize IPIs to our reserved vectors and mark them disabled for now */ 1130 /* Initialize IPIs to our reserved vectors and mark them disabled for now */
@@ -1113,7 +1133,7 @@ void __init mpic_init(struct mpic *mpic)
1113 mpic_ipi_write(i, 1133 mpic_ipi_write(i,
1114 MPIC_VECPRI_MASK | 1134 MPIC_VECPRI_MASK |
1115 (10 << MPIC_VECPRI_PRIORITY_SHIFT) | 1135 (10 << MPIC_VECPRI_PRIORITY_SHIFT) |
1116 (MPIC_VEC_IPI_0 + i)); 1136 (mpic->ipi_vecs[0] + i));
1117 } 1137 }
1118 1138
1119 /* Initialize interrupt sources */ 1139 /* Initialize interrupt sources */
@@ -1136,8 +1156,8 @@ void __init mpic_init(struct mpic *mpic)
1136 1 << hard_smp_processor_id()); 1156 1 << hard_smp_processor_id());
1137 } 1157 }
1138 1158
1139 /* Init spurrious vector */ 1159 /* Init spurious vector */
1140 mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), MPIC_VEC_SPURRIOUS); 1160 mpic_write(mpic->gregs, MPIC_INFO(GREG_SPURIOUS), mpic->spurious_vec);
1141 1161
1142 /* Disable 8259 passthrough, if supported */ 1162 /* Disable 8259 passthrough, if supported */
1143 if (!(mpic->flags & MPIC_NO_PTHROU_DIS)) 1163 if (!(mpic->flags & MPIC_NO_PTHROU_DIS))
@@ -1184,9 +1204,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1184 1204
1185 spin_lock_irqsave(&mpic_lock, flags); 1205 spin_lock_irqsave(&mpic_lock, flags);
1186 if (is_ipi) { 1206 if (is_ipi) {
1187 reg = mpic_ipi_read(src - MPIC_VEC_IPI_0) & 1207 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
1188 ~MPIC_VECPRI_PRIORITY_MASK; 1208 ~MPIC_VECPRI_PRIORITY_MASK;
1189 mpic_ipi_write(src - MPIC_VEC_IPI_0, 1209 mpic_ipi_write(src - mpic->ipi_vecs[0],
1190 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 1210 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT));
1191 } else { 1211 } else {
1192 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) 1212 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI))
@@ -1207,7 +1227,7 @@ unsigned int mpic_irq_get_priority(unsigned int irq)
1207 1227
1208 spin_lock_irqsave(&mpic_lock, flags); 1228 spin_lock_irqsave(&mpic_lock, flags);
1209 if (is_ipi) 1229 if (is_ipi)
1210 reg = mpic_ipi_read(src = MPIC_VEC_IPI_0); 1230 reg = mpic_ipi_read(src = mpic->ipi_vecs[0]);
1211 else 1231 else
1212 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); 1232 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
1213 spin_unlock_irqrestore(&mpic_lock, flags); 1233 spin_unlock_irqrestore(&mpic_lock, flags);
@@ -1313,7 +1333,7 @@ unsigned int mpic_get_one_irq(struct mpic *mpic)
1313#ifdef DEBUG_LOW 1333#ifdef DEBUG_LOW
1314 DBG("%s: get_one_irq(): %d\n", mpic->name, src); 1334 DBG("%s: get_one_irq(): %d\n", mpic->name, src);
1315#endif 1335#endif
1316 if (unlikely(src == MPIC_VEC_SPURRIOUS)) 1336 if (unlikely(src == mpic->spurious_vec))
1317 return NO_IRQ; 1337 return NO_IRQ;
1318 return irq_linear_revmap(mpic->irqhost, src); 1338 return irq_linear_revmap(mpic->irqhost, src);
1319} 1339}
@@ -1345,12 +1365,12 @@ void mpic_request_ipis(void)
1345 1365
1346 for (i = 0; i < 4; i++) { 1366 for (i = 0; i < 4; i++) {
1347 unsigned int vipi = irq_create_mapping(mpic->irqhost, 1367 unsigned int vipi = irq_create_mapping(mpic->irqhost,
1348 MPIC_VEC_IPI_0 + i); 1368 mpic->ipi_vecs[0] + i);
1349 if (vipi == NO_IRQ) { 1369 if (vipi == NO_IRQ) {
1350 printk(KERN_ERR "Failed to map IPI %d\n", i); 1370 printk(KERN_ERR "Failed to map IPI %d\n", i);
1351 break; 1371 break;
1352 } 1372 }
1353 request_irq(vipi, mpic_ipi_action, IRQF_DISABLED, 1373 request_irq(vipi, mpic_ipi_action, IRQF_DISABLED|IRQF_PERCPU,
1354 ipi_names[i], mpic); 1374 ipi_names[i], mpic);
1355 } 1375 }
1356} 1376}
@@ -1375,4 +1395,25 @@ void smp_mpic_message_pass(int target, int msg)
1375 break; 1395 break;
1376 } 1396 }
1377} 1397}
1398
1399int __init smp_mpic_probe(void)
1400{
1401 int nr_cpus;
1402
1403 DBG("smp_mpic_probe()...\n");
1404
1405 nr_cpus = cpus_weight(cpu_possible_map);
1406
1407 DBG("nr_cpus: %d\n", nr_cpus);
1408
1409 if (nr_cpus > 1)
1410 mpic_request_ipis();
1411
1412 return nr_cpus;
1413}
1414
1415void __devinit smp_mpic_setup_cpu(int cpu)
1416{
1417 mpic_setup_this_cpu();
1418}
1378#endif /* CONFIG_SMP */ 1419#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
new file mode 100644
index 000000000000..a5282011d39e
--- /dev/null
+++ b/arch/powerpc/sysdev/pmi.c
@@ -0,0 +1,305 @@
1/*
2 * pmi driver
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2005
5 *
6 * PMI (Platform Management Interrupt) is a way to communicate
7 * with the BMC (Baseboard Management Controller) via interrupts.
8 * Unlike IPMI it is bidirectional and has a low latency.
9 *
10 * Author: Christian Krafft <krafft@de.ibm.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2, or (at your option)
15 * any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#include <linux/interrupt.h>
28#include <linux/completion.h>
29#include <linux/spinlock.h>
30#include <linux/workqueue.h>
31
32#include <asm/of_device.h>
33#include <asm/of_platform.h>
34#include <asm/io.h>
35#include <asm/pmi.h>
36
37
38struct pmi_data {
39 struct list_head handler;
40 spinlock_t handler_spinlock;
41 spinlock_t pmi_spinlock;
42 struct mutex msg_mutex;
43 pmi_message_t msg;
44 struct completion *completion;
45 struct of_device *dev;
46 int irq;
47 u8 __iomem *pmi_reg;
48 struct work_struct work;
49};
50
51
52
53static void __iomem *of_iomap(struct device_node *np)
54{
55 struct resource res;
56
57 if (of_address_to_resource(np, 0, &res))
58 return NULL;
59
60 pr_debug("Resource start: 0x%lx\n", res.start);
61 pr_debug("Resource end: 0x%lx\n", res.end);
62
63 return ioremap(res.start, 1 + res.end - res.start);
64}
65
66
67static int pmi_irq_handler(int irq, void *dev_id)
68{
69 struct pmi_data *data;
70 u8 type;
71 int rc;
72
73 data = dev_id;
74
75 spin_lock(&data->pmi_spinlock);
76
77 type = ioread8(data->pmi_reg + PMI_READ_TYPE);
78 pr_debug("pmi: got message of type %d\n", type);
79
80 if (type & PMI_ACK && !data->completion) {
81 printk(KERN_WARNING "pmi: got unexpected ACK message.\n");
82 rc = -EIO;
83 goto unlock;
84 }
85
86 if (data->completion && !(type & PMI_ACK)) {
87 printk(KERN_WARNING "pmi: expected ACK, but got %d\n", type);
88 rc = -EIO;
89 goto unlock;
90 }
91
92 data->msg.type = type;
93 data->msg.data0 = ioread8(data->pmi_reg + PMI_READ_DATA0);
94 data->msg.data1 = ioread8(data->pmi_reg + PMI_READ_DATA1);
95 data->msg.data2 = ioread8(data->pmi_reg + PMI_READ_DATA2);
96 rc = 0;
97unlock:
98 spin_unlock(&data->pmi_spinlock);
99
100 if (rc == -EIO) {
101 rc = IRQ_HANDLED;
102 goto out;
103 }
104
105 if (data->msg.type & PMI_ACK) {
106 complete(data->completion);
107 rc = IRQ_HANDLED;
108 goto out;
109 }
110
111 schedule_work(&data->work);
112
113 rc = IRQ_HANDLED;
114out:
115 return rc;
116}
117
118
119static struct of_device_id pmi_match[] = {
120 { .type = "ibm,pmi", .name = "ibm,pmi" },
121 {},
122};
123
124MODULE_DEVICE_TABLE(of, pmi_match);
125
126static void pmi_notify_handlers(struct work_struct *work)
127{
128 struct pmi_data *data;
129 struct pmi_handler *handler;
130
131 data = container_of(work, struct pmi_data, work);
132
133 spin_lock(&data->handler_spinlock);
134 list_for_each_entry(handler, &data->handler, node) {
135 pr_debug(KERN_INFO "pmi: notifying handler %p\n", handler);
136 if (handler->type == data->msg.type)
137 handler->handle_pmi_message(data->dev, data->msg);
138 }
139 spin_unlock(&data->handler_spinlock);
140}
141
142static int pmi_of_probe(struct of_device *dev,
143 const struct of_device_id *match)
144{
145 struct device_node *np = dev->node;
146 struct pmi_data *data;
147 int rc;
148
149 data = kzalloc(sizeof(struct pmi_data), GFP_KERNEL);
150 if (!data) {
151 printk(KERN_ERR "pmi: could not allocate memory.\n");
152 rc = -ENOMEM;
153 goto out;
154 }
155
156 data->pmi_reg = of_iomap(np);
157 if (!data->pmi_reg) {
158 printk(KERN_ERR "pmi: invalid register address.\n");
159 rc = -EFAULT;
160 goto error_cleanup_data;
161 }
162
163 INIT_LIST_HEAD(&data->handler);
164
165 mutex_init(&data->msg_mutex);
166 spin_lock_init(&data->pmi_spinlock);
167 spin_lock_init(&data->handler_spinlock);
168
169 INIT_WORK(&data->work, pmi_notify_handlers);
170
171 dev->dev.driver_data = data;
172 data->dev = dev;
173
174 data->irq = irq_of_parse_and_map(np, 0);
175 if (data->irq == NO_IRQ) {
176 printk(KERN_ERR "pmi: invalid interrupt.\n");
177 rc = -EFAULT;
178 goto error_cleanup_iomap;
179 }
180
181 rc = request_irq(data->irq, pmi_irq_handler, 0, "pmi", data);
182 if (rc) {
183 printk(KERN_ERR "pmi: can't request IRQ %d: returned %d\n",
184 data->irq, rc);
185 goto error_cleanup_iomap;
186 }
187
188 printk(KERN_INFO "pmi: found pmi device at addr %p.\n", data->pmi_reg);
189
190 goto out;
191
192error_cleanup_iomap:
193 iounmap(data->pmi_reg);
194
195error_cleanup_data:
196 kfree(data);
197
198out:
199 return rc;
200}
201
202static int pmi_of_remove(struct of_device *dev)
203{
204 struct pmi_data *data;
205 struct pmi_handler *handler, *tmp;
206
207 data = dev->dev.driver_data;
208
209 free_irq(data->irq, data);
210 iounmap(data->pmi_reg);
211
212 spin_lock(&data->handler_spinlock);
213
214 list_for_each_entry_safe(handler, tmp, &data->handler, node)
215 list_del(&handler->node);
216
217 spin_unlock(&data->handler_spinlock);
218
219 kfree(dev->dev.driver_data);
220
221 return 0;
222}
223
224static struct of_platform_driver pmi_of_platform_driver = {
225 .name = "pmi",
226 .match_table = pmi_match,
227 .probe = pmi_of_probe,
228 .remove = pmi_of_remove
229};
230
231static int __init pmi_module_init(void)
232{
233 return of_register_platform_driver(&pmi_of_platform_driver);
234}
235module_init(pmi_module_init);
236
237static void __exit pmi_module_exit(void)
238{
239 of_unregister_platform_driver(&pmi_of_platform_driver);
240}
241module_exit(pmi_module_exit);
242
243void pmi_send_message(struct of_device *device, pmi_message_t msg)
244{
245 struct pmi_data *data;
246 unsigned long flags;
247 DECLARE_COMPLETION_ONSTACK(completion);
248
249 data = device->dev.driver_data;
250
251 mutex_lock(&data->msg_mutex);
252
253 data->msg = msg;
254 pr_debug("pmi_send_message: msg is %08x\n", *(u32*)&msg);
255
256 data->completion = &completion;
257
258 spin_lock_irqsave(&data->pmi_spinlock, flags);
259 iowrite8(msg.data0, data->pmi_reg + PMI_WRITE_DATA0);
260 iowrite8(msg.data1, data->pmi_reg + PMI_WRITE_DATA1);
261 iowrite8(msg.data2, data->pmi_reg + PMI_WRITE_DATA2);
262 iowrite8(msg.type, data->pmi_reg + PMI_WRITE_TYPE);
263 spin_unlock_irqrestore(&data->pmi_spinlock, flags);
264
265 pr_debug("pmi_send_message: wait for completion\n");
266
267 wait_for_completion_interruptible_timeout(data->completion,
268 PMI_TIMEOUT);
269
270 data->completion = NULL;
271
272 mutex_unlock(&data->msg_mutex);
273}
274EXPORT_SYMBOL_GPL(pmi_send_message);
275
276void pmi_register_handler(struct of_device *device,
277 struct pmi_handler *handler)
278{
279 struct pmi_data *data;
280 data = device->dev.driver_data;
281
282 spin_lock(&data->handler_spinlock);
283 list_add_tail(&handler->node, &data->handler);
284 spin_unlock(&data->handler_spinlock);
285}
286EXPORT_SYMBOL_GPL(pmi_register_handler);
287
288void pmi_unregister_handler(struct of_device *device,
289 struct pmi_handler *handler)
290{
291 struct pmi_data *data;
292
293 pr_debug("pmi: unregistering handler %p\n", handler);
294
295 data = device->dev.driver_data;
296
297 spin_lock(&data->handler_spinlock);
298 list_del(&handler->node);
299 spin_unlock(&data->handler_spinlock);
300}
301EXPORT_SYMBOL_GPL(pmi_unregister_handler);
302
303MODULE_LICENSE("GPL");
304MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
305MODULE_DESCRIPTION("IBM Platform Management Interrupt driver");
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 74e48d94f27c..4d1dcb45963d 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -323,7 +323,7 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic)
323 return irq_linear_revmap(qe_ic->irqhost, irq); 323 return irq_linear_revmap(qe_ic->irqhost, irq);
324} 324}
325 325
326void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc) 326void qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
327{ 327{
328 struct qe_ic *qe_ic = desc->handler_data; 328 struct qe_ic *qe_ic = desc->handler_data;
329 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); 329 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -332,7 +332,7 @@ void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
332 generic_handle_irq(cascade_irq); 332 generic_handle_irq(cascade_irq);
333} 333}
334 334
335void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc) 335void qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc)
336{ 336{
337 struct qe_ic *qe_ic = desc->handler_data; 337 struct qe_ic *qe_ic = desc->handler_data;
338 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); 338 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
@@ -352,7 +352,7 @@ void __init qe_ic_init(struct device_node *node, unsigned int flags)
352 return; 352 return;
353 353
354 memset(qe_ic, 0, sizeof(struct qe_ic)); 354 memset(qe_ic, 0, sizeof(struct qe_ic));
355 qe_ic->of_node = node ? of_node_get(node) : NULL; 355 qe_ic->of_node = of_node_get(node);
356 356
357 qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, 357 qe_ic->irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR,
358 NR_QE_IC_INTS, &qe_ic_host_ops, 0); 358 NR_QE_IC_INTS, &qe_ic_host_ops, 0);
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index e657559bea93..a457ac1c6639 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -1,13 +1,12 @@
1/* 1/*
2 * arch/powerpc/sysdev/qe_lib/ucc_fast.c
3 *
4 * QE UCC Fast API Set - UCC Fast specific routines implementations.
5 *
6 * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. 2 * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved.
7 * 3 *
8 * Authors: Shlomi Gridish <gridish@freescale.com> 4 * Authors: Shlomi Gridish <gridish@freescale.com>
9 * Li Yang <leoli@freescale.com> 5 * Li Yang <leoli@freescale.com>
10 * 6 *
7 * Description:
8 * QE UCC Fast API Set - UCC Fast specific routines implementations.
9 *
11 * This program is free software; you can redistribute it and/or modify it 10 * 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 11 * 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 12 * Free Software Foundation; either version 2 of the License, or (at your
@@ -27,79 +26,61 @@
27#include <asm/ucc.h> 26#include <asm/ucc.h>
28#include <asm/ucc_fast.h> 27#include <asm/ucc_fast.h>
29 28
30#define uccf_printk(level, format, arg...) \
31 printk(level format "\n", ## arg)
32
33#define uccf_dbg(format, arg...) \
34 uccf_printk(KERN_DEBUG , format , ## arg)
35#define uccf_err(format, arg...) \
36 uccf_printk(KERN_ERR , format , ## arg)
37#define uccf_info(format, arg...) \
38 uccf_printk(KERN_INFO , format , ## arg)
39#define uccf_warn(format, arg...) \
40 uccf_printk(KERN_WARNING , format , ## arg)
41
42#ifdef UCCF_VERBOSE_DEBUG
43#define uccf_vdbg uccf_dbg
44#else
45#define uccf_vdbg(fmt, args...) do { } while (0)
46#endif /* UCCF_VERBOSE_DEBUG */
47
48void ucc_fast_dump_regs(struct ucc_fast_private * uccf) 29void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
49{ 30{
50 uccf_info("UCC%d Fast registers:", uccf->uf_info->ucc_num); 31 printk(KERN_INFO "UCC%d Fast registers:", uccf->uf_info->ucc_num);
51 uccf_info("Base address: 0x%08x", (u32) uccf->uf_regs); 32 printk(KERN_INFO "Base address: 0x%08x", (u32) uccf->uf_regs);
52 33
53 uccf_info("gumr : addr - 0x%08x, val - 0x%08x", 34 printk(KERN_INFO "gumr : addr - 0x%08x, val - 0x%08x",
54 (u32) & uccf->uf_regs->gumr, in_be32(&uccf->uf_regs->gumr)); 35 (u32) & uccf->uf_regs->gumr, in_be32(&uccf->uf_regs->gumr));
55 uccf_info("upsmr : addr - 0x%08x, val - 0x%08x", 36 printk(KERN_INFO "upsmr : addr - 0x%08x, val - 0x%08x",
56 (u32) & uccf->uf_regs->upsmr, in_be32(&uccf->uf_regs->upsmr)); 37 (u32) & uccf->uf_regs->upsmr, in_be32(&uccf->uf_regs->upsmr));
57 uccf_info("utodr : addr - 0x%08x, val - 0x%04x", 38 printk(KERN_INFO "utodr : addr - 0x%08x, val - 0x%04x",
58 (u32) & uccf->uf_regs->utodr, in_be16(&uccf->uf_regs->utodr)); 39 (u32) & uccf->uf_regs->utodr, in_be16(&uccf->uf_regs->utodr));
59 uccf_info("udsr : addr - 0x%08x, val - 0x%04x", 40 printk(KERN_INFO "udsr : addr - 0x%08x, val - 0x%04x",
60 (u32) & uccf->uf_regs->udsr, in_be16(&uccf->uf_regs->udsr)); 41 (u32) & uccf->uf_regs->udsr, in_be16(&uccf->uf_regs->udsr));
61 uccf_info("ucce : addr - 0x%08x, val - 0x%08x", 42 printk(KERN_INFO "ucce : addr - 0x%08x, val - 0x%08x",
62 (u32) & uccf->uf_regs->ucce, in_be32(&uccf->uf_regs->ucce)); 43 (u32) & uccf->uf_regs->ucce, in_be32(&uccf->uf_regs->ucce));
63 uccf_info("uccm : addr - 0x%08x, val - 0x%08x", 44 printk(KERN_INFO "uccm : addr - 0x%08x, val - 0x%08x",
64 (u32) & uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); 45 (u32) & uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm));
65 uccf_info("uccs : addr - 0x%08x, val - 0x%02x", 46 printk(KERN_INFO "uccs : addr - 0x%08x, val - 0x%02x",
66 (u32) & uccf->uf_regs->uccs, uccf->uf_regs->uccs); 47 (u32) & uccf->uf_regs->uccs, uccf->uf_regs->uccs);
67 uccf_info("urfb : addr - 0x%08x, val - 0x%08x", 48 printk(KERN_INFO "urfb : addr - 0x%08x, val - 0x%08x",
68 (u32) & uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); 49 (u32) & uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb));
69 uccf_info("urfs : addr - 0x%08x, val - 0x%04x", 50 printk(KERN_INFO "urfs : addr - 0x%08x, val - 0x%04x",
70 (u32) & uccf->uf_regs->urfs, in_be16(&uccf->uf_regs->urfs)); 51 (u32) & uccf->uf_regs->urfs, in_be16(&uccf->uf_regs->urfs));
71 uccf_info("urfet : addr - 0x%08x, val - 0x%04x", 52 printk(KERN_INFO "urfet : addr - 0x%08x, val - 0x%04x",
72 (u32) & uccf->uf_regs->urfet, in_be16(&uccf->uf_regs->urfet)); 53 (u32) & uccf->uf_regs->urfet, in_be16(&uccf->uf_regs->urfet));
73 uccf_info("urfset: addr - 0x%08x, val - 0x%04x", 54 printk(KERN_INFO "urfset: addr - 0x%08x, val - 0x%04x",
74 (u32) & uccf->uf_regs->urfset, 55 (u32) & uccf->uf_regs->urfset,
75 in_be16(&uccf->uf_regs->urfset)); 56 in_be16(&uccf->uf_regs->urfset));
76 uccf_info("utfb : addr - 0x%08x, val - 0x%08x", 57 printk(KERN_INFO "utfb : addr - 0x%08x, val - 0x%08x",
77 (u32) & uccf->uf_regs->utfb, in_be32(&uccf->uf_regs->utfb)); 58 (u32) & uccf->uf_regs->utfb, in_be32(&uccf->uf_regs->utfb));
78 uccf_info("utfs : addr - 0x%08x, val - 0x%04x", 59 printk(KERN_INFO "utfs : addr - 0x%08x, val - 0x%04x",
79 (u32) & uccf->uf_regs->utfs, in_be16(&uccf->uf_regs->utfs)); 60 (u32) & uccf->uf_regs->utfs, in_be16(&uccf->uf_regs->utfs));
80 uccf_info("utfet : addr - 0x%08x, val - 0x%04x", 61 printk(KERN_INFO "utfet : addr - 0x%08x, val - 0x%04x",
81 (u32) & uccf->uf_regs->utfet, in_be16(&uccf->uf_regs->utfet)); 62 (u32) & uccf->uf_regs->utfet, in_be16(&uccf->uf_regs->utfet));
82 uccf_info("utftt : addr - 0x%08x, val - 0x%04x", 63 printk(KERN_INFO "utftt : addr - 0x%08x, val - 0x%04x",
83 (u32) & uccf->uf_regs->utftt, in_be16(&uccf->uf_regs->utftt)); 64 (u32) & uccf->uf_regs->utftt, in_be16(&uccf->uf_regs->utftt));
84 uccf_info("utpt : addr - 0x%08x, val - 0x%04x", 65 printk(KERN_INFO "utpt : addr - 0x%08x, val - 0x%04x",
85 (u32) & uccf->uf_regs->utpt, in_be16(&uccf->uf_regs->utpt)); 66 (u32) & uccf->uf_regs->utpt, in_be16(&uccf->uf_regs->utpt));
86 uccf_info("urtry : addr - 0x%08x, val - 0x%08x", 67 printk(KERN_INFO "urtry : addr - 0x%08x, val - 0x%08x",
87 (u32) & uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); 68 (u32) & uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry));
88 uccf_info("guemr : addr - 0x%08x, val - 0x%02x", 69 printk(KERN_INFO "guemr : addr - 0x%08x, val - 0x%02x",
89 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr); 70 (u32) & uccf->uf_regs->guemr, uccf->uf_regs->guemr);
90} 71}
91 72
92u32 ucc_fast_get_qe_cr_subblock(int uccf_num) 73u32 ucc_fast_get_qe_cr_subblock(int uccf_num)
93{ 74{
94 switch (uccf_num) { 75 switch (uccf_num) {
95 case 0: return QE_CR_SUBBLOCK_UCCFAST1; 76 case 0: return QE_CR_SUBBLOCK_UCCFAST1;
96 case 1: return QE_CR_SUBBLOCK_UCCFAST2; 77 case 1: return QE_CR_SUBBLOCK_UCCFAST2;
97 case 2: return QE_CR_SUBBLOCK_UCCFAST3; 78 case 2: return QE_CR_SUBBLOCK_UCCFAST3;
98 case 3: return QE_CR_SUBBLOCK_UCCFAST4; 79 case 3: return QE_CR_SUBBLOCK_UCCFAST4;
99 case 4: return QE_CR_SUBBLOCK_UCCFAST5; 80 case 4: return QE_CR_SUBBLOCK_UCCFAST5;
100 case 5: return QE_CR_SUBBLOCK_UCCFAST6; 81 case 5: return QE_CR_SUBBLOCK_UCCFAST6;
101 case 6: return QE_CR_SUBBLOCK_UCCFAST7; 82 case 6: return QE_CR_SUBBLOCK_UCCFAST7;
102 case 7: return QE_CR_SUBBLOCK_UCCFAST8; 83 case 7: return QE_CR_SUBBLOCK_UCCFAST8;
103 default: return QE_CR_SUBBLOCK_INVALID; 84 default: return QE_CR_SUBBLOCK_INVALID;
104 } 85 }
105} 86}
@@ -153,84 +134,72 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
153{ 134{
154 struct ucc_fast_private *uccf; 135 struct ucc_fast_private *uccf;
155 struct ucc_fast *uf_regs; 136 struct ucc_fast *uf_regs;
156 u32 gumr = 0; 137 u32 gumr;
157 int ret; 138 int ret;
158 139
159 uccf_vdbg("%s: IN", __FUNCTION__);
160
161 if (!uf_info) 140 if (!uf_info)
162 return -EINVAL; 141 return -EINVAL;
163 142
164 /* check if the UCC port number is in range. */ 143 /* check if the UCC port number is in range. */
165 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) { 144 if ((uf_info->ucc_num < 0) || (uf_info->ucc_num > UCC_MAX_NUM - 1)) {
166 uccf_err("ucc_fast_init: Illegal UCC number!"); 145 printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__);
167 return -EINVAL; 146 return -EINVAL;
168 } 147 }
169 148
170 /* Check that 'max_rx_buf_length' is properly aligned (4). */ 149 /* Check that 'max_rx_buf_length' is properly aligned (4). */
171 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) { 150 if (uf_info->max_rx_buf_length & (UCC_FAST_MRBLR_ALIGNMENT - 1)) {
172 uccf_err("ucc_fast_init: max_rx_buf_length not aligned."); 151 printk(KERN_ERR "%s: max_rx_buf_length not aligned", __FUNCTION__);
173 return -EINVAL; 152 return -EINVAL;
174 } 153 }
175 154
176 /* Validate Virtual Fifo register values */ 155 /* Validate Virtual Fifo register values */
177 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) { 156 if (uf_info->urfs < UCC_FAST_URFS_MIN_VAL) {
178 uccf_err 157 printk(KERN_ERR "%s: urfs is too small", __FUNCTION__);
179 ("ucc_fast_init: Virtual Fifo register urfs too small.");
180 return -EINVAL; 158 return -EINVAL;
181 } 159 }
182 160
183 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 161 if (uf_info->urfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
184 uccf_err 162 printk(KERN_ERR "%s: urfs is not aligned", __FUNCTION__);
185 ("ucc_fast_init: Virtual Fifo register urfs not aligned.");
186 return -EINVAL; 163 return -EINVAL;
187 } 164 }
188 165
189 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 166 if (uf_info->urfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
190 uccf_err 167 printk(KERN_ERR "%s: urfet is not aligned.", __FUNCTION__);
191 ("ucc_fast_init: Virtual Fifo register urfet not aligned.");
192 return -EINVAL; 168 return -EINVAL;
193 } 169 }
194 170
195 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 171 if (uf_info->urfset & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
196 uccf_err 172 printk(KERN_ERR "%s: urfset is not aligned", __FUNCTION__);
197 ("ucc_fast_init: Virtual Fifo register urfset not aligned.");
198 return -EINVAL; 173 return -EINVAL;
199 } 174 }
200 175
201 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 176 if (uf_info->utfs & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
202 uccf_err 177 printk(KERN_ERR "%s: utfs is not aligned", __FUNCTION__);
203 ("ucc_fast_init: Virtual Fifo register utfs not aligned.");
204 return -EINVAL; 178 return -EINVAL;
205 } 179 }
206 180
207 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 181 if (uf_info->utfet & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
208 uccf_err 182 printk(KERN_ERR "%s: utfet is not aligned", __FUNCTION__);
209 ("ucc_fast_init: Virtual Fifo register utfet not aligned.");
210 return -EINVAL; 183 return -EINVAL;
211 } 184 }
212 185
213 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) { 186 if (uf_info->utftt & (UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT - 1)) {
214 uccf_err 187 printk(KERN_ERR "%s: utftt is not aligned", __FUNCTION__);
215 ("ucc_fast_init: Virtual Fifo register utftt not aligned.");
216 return -EINVAL; 188 return -EINVAL;
217 } 189 }
218 190
219 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); 191 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL);
220 if (!uccf) { 192 if (!uccf) {
221 uccf_err 193 printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__);
222 ("ucc_fast_init: No memory for UCC slow data structure!");
223 return -ENOMEM; 194 return -ENOMEM;
224 } 195 }
225 196
226 /* Fill fast UCC structure */ 197 /* Fill fast UCC structure */
227 uccf->uf_info = uf_info; 198 uccf->uf_info = uf_info;
228 /* Set the PHY base address */ 199 /* Set the PHY base address */
229 uccf->uf_regs = 200 uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast));
230 (struct ucc_fast *) ioremap(uf_info->regs, sizeof(struct ucc_fast));
231 if (uccf->uf_regs == NULL) { 201 if (uccf->uf_regs == NULL) {
232 uccf_err 202 printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__);
233 ("ucc_fast_init: No memory map for UCC slow controller!");
234 return -ENOMEM; 203 return -ENOMEM;
235 } 204 }
236 205
@@ -249,7 +218,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
249 218
250 /* Init Guemr register */ 219 /* Init Guemr register */
251 if ((ret = ucc_init_guemr((struct ucc_common *) (uf_regs)))) { 220 if ((ret = ucc_init_guemr((struct ucc_common *) (uf_regs)))) {
252 uccf_err("ucc_fast_init: Could not init the guemr register."); 221 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
253 ucc_fast_free(uccf); 222 ucc_fast_free(uccf);
254 return ret; 223 return ret;
255 } 224 }
@@ -258,7 +227,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
258 if ((ret = ucc_set_type(uf_info->ucc_num, 227 if ((ret = ucc_set_type(uf_info->ucc_num,
259 (struct ucc_common *) (uf_regs), 228 (struct ucc_common *) (uf_regs),
260 UCC_SPEED_TYPE_FAST))) { 229 UCC_SPEED_TYPE_FAST))) {
261 uccf_err("ucc_fast_init: Could not set type to fast."); 230 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
262 ucc_fast_free(uccf); 231 ucc_fast_free(uccf);
263 return ret; 232 return ret;
264 } 233 }
@@ -267,10 +236,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
267 236
268 /* Set GUMR */ 237 /* Set GUMR */
269 /* For more details see the hardware spec. */ 238 /* For more details see the hardware spec. */
270 /* gumr starts as zero. */ 239 gumr = uf_info->ttx_trx;
271 if (uf_info->tci) 240 if (uf_info->tci)
272 gumr |= UCC_FAST_GUMR_TCI; 241 gumr |= UCC_FAST_GUMR_TCI;
273 gumr |= uf_info->ttx_trx;
274 if (uf_info->cdp) 242 if (uf_info->cdp)
275 gumr |= UCC_FAST_GUMR_CDP; 243 gumr |= UCC_FAST_GUMR_CDP;
276 if (uf_info->ctsp) 244 if (uf_info->ctsp)
@@ -298,9 +266,7 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
298 uccf->ucc_fast_tx_virtual_fifo_base_offset = 266 uccf->ucc_fast_tx_virtual_fifo_base_offset =
299 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 267 qe_muram_alloc(uf_info->utfs, UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
300 if (IS_MURAM_ERR(uccf->ucc_fast_tx_virtual_fifo_base_offset)) { 268 if (IS_MURAM_ERR(uccf->ucc_fast_tx_virtual_fifo_base_offset)) {
301 uccf_err 269 printk(KERN_ERR "%s: cannot allocate MURAM for TX FIFO", __FUNCTION__);
302 ("ucc_fast_init: Can not allocate MURAM memory for "
303 "struct ucc_fastx_virtual_fifo_base_offset.");
304 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0; 270 uccf->ucc_fast_tx_virtual_fifo_base_offset = 0;
305 ucc_fast_free(uccf); 271 ucc_fast_free(uccf);
306 return -ENOMEM; 272 return -ENOMEM;
@@ -308,14 +274,11 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
308 274
309 /* Allocate memory for Rx Virtual Fifo */ 275 /* Allocate memory for Rx Virtual Fifo */
310 uccf->ucc_fast_rx_virtual_fifo_base_offset = 276 uccf->ucc_fast_rx_virtual_fifo_base_offset =
311 qe_muram_alloc(uf_info->urfs + 277 qe_muram_alloc(uf_info->urfs +
312 (u32)
313 UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR, 278 UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR,
314 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT); 279 UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT);
315 if (IS_MURAM_ERR(uccf->ucc_fast_rx_virtual_fifo_base_offset)) { 280 if (IS_MURAM_ERR(uccf->ucc_fast_rx_virtual_fifo_base_offset)) {
316 uccf_err 281 printk(KERN_ERR "%s: cannot allocate MURAM for RX FIFO", __FUNCTION__);
317 ("ucc_fast_init: Can not allocate MURAM memory for "
318 "ucc_fast_rx_virtual_fifo_base_offset.");
319 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0; 282 uccf->ucc_fast_rx_virtual_fifo_base_offset = 0;
320 ucc_fast_free(uccf); 283 ucc_fast_free(uccf);
321 return -ENOMEM; 284 return -ENOMEM;
@@ -342,26 +305,22 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
342 /* If NMSI (not Tsa), set Tx and Rx clock. */ 305 /* If NMSI (not Tsa), set Tx and Rx clock. */
343 if (!uf_info->tsa) { 306 if (!uf_info->tsa) {
344 /* Rx clock routing */ 307 /* Rx clock routing */
345 if (uf_info->rx_clock != QE_CLK_NONE) { 308 if ((uf_info->rx_clock != QE_CLK_NONE) &&
346 if (ucc_set_qe_mux_rxtx 309 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->rx_clock,
347 (uf_info->ucc_num, uf_info->rx_clock, 310 COMM_DIR_RX)) {
348 COMM_DIR_RX)) { 311 printk(KERN_ERR "%s: illegal value for RX clock",
349 uccf_err 312 __FUNCTION__);
350 ("ucc_fast_init: Illegal value for parameter 'RxClock'."); 313 ucc_fast_free(uccf);
351 ucc_fast_free(uccf); 314 return -EINVAL;
352 return -EINVAL;
353 }
354 } 315 }
355 /* Tx clock routing */ 316 /* Tx clock routing */
356 if (uf_info->tx_clock != QE_CLK_NONE) { 317 if ((uf_info->tx_clock != QE_CLK_NONE) &&
357 if (ucc_set_qe_mux_rxtx 318 ucc_set_qe_mux_rxtx(uf_info->ucc_num, uf_info->tx_clock,
358 (uf_info->ucc_num, uf_info->tx_clock, 319 COMM_DIR_TX)) {
359 COMM_DIR_TX)) { 320 printk(KERN_ERR "%s: illegal value for TX clock",
360 uccf_err 321 __FUNCTION__);
361 ("ucc_fast_init: Illegal value for parameter 'TxClock'."); 322 ucc_fast_free(uccf);
362 ucc_fast_free(uccf); 323 return -EINVAL;
363 return -EINVAL;
364 }
365 } 324 }
366 } 325 }
367 326
@@ -370,9 +329,9 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
370 329
371 /* First, clear anything pending at UCC level, 330 /* First, clear anything pending at UCC level,
372 * otherwise, old garbage may come through 331 * otherwise, old garbage may come through
373 * as soon as the dam is opened 332 * as soon as the dam is opened. */
374 * Writing '1' clears 333
375 */ 334 /* Writing '1' clears */
376 out_be32(&uf_regs->ucce, 0xffffffff); 335 out_be32(&uf_regs->ucce, 0xffffffff);
377 336
378 *uccf_ret = uccf; 337 *uccf_ret = uccf;
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 47b56203f47e..817df73ecf56 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -19,7 +19,6 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21 21
22#include <asm/irq.h>
23#include <asm/io.h> 22#include <asm/io.h>
24#include <asm/immap_qe.h> 23#include <asm/immap_qe.h>
25#include <asm/qe.h> 24#include <asm/qe.h>
@@ -27,24 +26,6 @@
27#include <asm/ucc.h> 26#include <asm/ucc.h>
28#include <asm/ucc_slow.h> 27#include <asm/ucc_slow.h>
29 28
30#define uccs_printk(level, format, arg...) \
31 printk(level format "\n", ## arg)
32
33#define uccs_dbg(format, arg...) \
34 uccs_printk(KERN_DEBUG , format , ## arg)
35#define uccs_err(format, arg...) \
36 uccs_printk(KERN_ERR , format , ## arg)
37#define uccs_info(format, arg...) \
38 uccs_printk(KERN_INFO , format , ## arg)
39#define uccs_warn(format, arg...) \
40 uccs_printk(KERN_WARNING , format , ## arg)
41
42#ifdef UCCS_VERBOSE_DEBUG
43#define uccs_vdbg uccs_dbg
44#else
45#define uccs_vdbg(fmt, args...) do { } while (0)
46#endif /* UCCS_VERBOSE_DEBUG */
47
48u32 ucc_slow_get_qe_cr_subblock(int uccs_num) 29u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
49{ 30{
50 switch (uccs_num) { 31 switch (uccs_num) {
@@ -135,51 +116,53 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
135 116
136int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret) 117int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** uccs_ret)
137{ 118{
119 struct ucc_slow_private *uccs;
138 u32 i; 120 u32 i;
139 struct ucc_slow *us_regs; 121 struct ucc_slow *us_regs;
140 u32 gumr; 122 u32 gumr;
141 u8 function_code = 0; 123 struct qe_bd *bd;
142 u8 *bd;
143 struct ucc_slow_private *uccs;
144 u32 id; 124 u32 id;
145 u32 command; 125 u32 command;
146 int ret; 126 int ret = 0;
147
148 uccs_vdbg("%s: IN", __FUNCTION__);
149 127
150 if (!us_info) 128 if (!us_info)
151 return -EINVAL; 129 return -EINVAL;
152 130
153 /* check if the UCC port number is in range. */ 131 /* check if the UCC port number is in range. */
154 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) { 132 if ((us_info->ucc_num < 0) || (us_info->ucc_num > UCC_MAX_NUM - 1)) {
155 uccs_err("ucc_slow_init: Illegal UCC number!"); 133 printk(KERN_ERR "%s: illegal UCC number", __FUNCTION__);
156 return -EINVAL; 134 return -EINVAL;
157 } 135 }
158 136
159 /* 137 /*
160 * Set mrblr 138 * Set mrblr
161 * Check that 'max_rx_buf_length' is properly aligned (4), unless 139 * Check that 'max_rx_buf_length' is properly aligned (4), unless
162 * rfw is 1, meaning that QE accepts one byte at a time, unlike normal 140 * rfw is 1, meaning that QE accepts one byte at a time, unlike normal
163 * case when QE accepts 32 bits at a time. 141 * case when QE accepts 32 bits at a time.
164 */ 142 */
165 if ((!us_info->rfw) && 143 if ((!us_info->rfw) &&
166 (us_info->max_rx_buf_length & (UCC_SLOW_MRBLR_ALIGNMENT - 1))) { 144 (us_info->max_rx_buf_length & (UCC_SLOW_MRBLR_ALIGNMENT - 1))) {
167 uccs_err("max_rx_buf_length not aligned."); 145 printk(KERN_ERR "max_rx_buf_length not aligned.");
168 return -EINVAL; 146 return -EINVAL;
169 } 147 }
170 148
171 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); 149 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL);
172 if (!uccs) { 150 if (!uccs) {
173 uccs_err 151 printk(KERN_ERR "%s: Cannot allocate private data", __FUNCTION__);
174 ("ucc_slow_init: No memory for UCC slow data structure!");
175 return -ENOMEM; 152 return -ENOMEM;
176 } 153 }
177 154
178 /* Fill slow UCC structure */ 155 /* Fill slow UCC structure */
179 uccs->us_info = us_info; 156 uccs->us_info = us_info;
157 /* Set the PHY base address */
158 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow));
159 if (uccs->us_regs == NULL) {
160 printk(KERN_ERR "%s: Cannot map UCC registers", __FUNCTION__);
161 return -ENOMEM;
162 }
163
180 uccs->saved_uccm = 0; 164 uccs->saved_uccm = 0;
181 uccs->p_rx_frame = 0; 165 uccs->p_rx_frame = 0;
182 uccs->us_regs = us_info->us_regs;
183 us_regs = uccs->us_regs; 166 us_regs = uccs->us_regs;
184 uccs->p_ucce = (u16 *) & (us_regs->ucce); 167 uccs->p_ucce = (u16 *) & (us_regs->ucce);
185 uccs->p_uccm = (u16 *) & (us_regs->uccm); 168 uccs->p_uccm = (u16 *) & (us_regs->uccm);
@@ -190,33 +173,31 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
190#endif /* STATISTICS */ 173#endif /* STATISTICS */
191 174
192 /* Get PRAM base */ 175 /* Get PRAM base */
193 uccs->us_pram_offset = qe_muram_alloc(UCC_SLOW_PRAM_SIZE, 176 uccs->us_pram_offset =
194 ALIGNMENT_OF_UCC_SLOW_PRAM); 177 qe_muram_alloc(UCC_SLOW_PRAM_SIZE, ALIGNMENT_OF_UCC_SLOW_PRAM);
195 if (IS_MURAM_ERR(uccs->us_pram_offset)) { 178 if (IS_MURAM_ERR(uccs->us_pram_offset)) {
196 uccs_err 179 printk(KERN_ERR "%s: cannot allocate MURAM for PRAM", __FUNCTION__);
197 ("ucc_slow_init: Can not allocate MURAM memory "
198 "for Slow UCC.");
199 ucc_slow_free(uccs); 180 ucc_slow_free(uccs);
200 return -ENOMEM; 181 return -ENOMEM;
201 } 182 }
202 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 183 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
203 qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, id, QE_CR_PROTOCOL_UNSPECIFIED, 184 qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, id, QE_CR_PROTOCOL_UNSPECIFIED,
204 (u32) uccs->us_pram_offset); 185 uccs->us_pram_offset);
205 186
206 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); 187 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset);
207 188
208 /* Init Guemr register */ 189 /* Init Guemr register */
209 if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->us_regs)))) { 190 if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) {
210 uccs_err("ucc_slow_init: Could not init the guemr register."); 191 printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__);
211 ucc_slow_free(uccs); 192 ucc_slow_free(uccs);
212 return ret; 193 return ret;
213 } 194 }
214 195
215 /* Set UCC to slow type */ 196 /* Set UCC to slow type */
216 if ((ret = ucc_set_type(us_info->ucc_num, 197 if ((ret = ucc_set_type(us_info->ucc_num,
217 (struct ucc_common *) (us_info->us_regs), 198 (struct ucc_common *) (us_info->regs),
218 UCC_SPEED_TYPE_SLOW))) { 199 UCC_SPEED_TYPE_SLOW))) {
219 uccs_err("ucc_slow_init: Could not init the guemr register."); 200 printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__);
220 ucc_slow_free(uccs); 201 ucc_slow_free(uccs);
221 return ret; 202 return ret;
222 } 203 }
@@ -230,7 +211,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
230 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd), 211 qe_muram_alloc(us_info->rx_bd_ring_len * sizeof(struct qe_bd),
231 QE_ALIGNMENT_OF_BD); 212 QE_ALIGNMENT_OF_BD);
232 if (IS_MURAM_ERR(uccs->rx_base_offset)) { 213 if (IS_MURAM_ERR(uccs->rx_base_offset)) {
233 uccs_err("ucc_slow_init: No memory for Rx BD's."); 214 printk(KERN_ERR "%s: cannot allocate RX BDs", __FUNCTION__);
234 uccs->rx_base_offset = 0; 215 uccs->rx_base_offset = 0;
235 ucc_slow_free(uccs); 216 ucc_slow_free(uccs);
236 return -ENOMEM; 217 return -ENOMEM;
@@ -240,7 +221,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
240 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd), 221 qe_muram_alloc(us_info->tx_bd_ring_len * sizeof(struct qe_bd),
241 QE_ALIGNMENT_OF_BD); 222 QE_ALIGNMENT_OF_BD);
242 if (IS_MURAM_ERR(uccs->tx_base_offset)) { 223 if (IS_MURAM_ERR(uccs->tx_base_offset)) {
243 uccs_err("ucc_slow_init: No memory for Tx BD's."); 224 printk(KERN_ERR "%s: cannot allocate TX BDs", __FUNCTION__);
244 uccs->tx_base_offset = 0; 225 uccs->tx_base_offset = 0;
245 ucc_slow_free(uccs); 226 ucc_slow_free(uccs);
246 return -ENOMEM; 227 return -ENOMEM;
@@ -248,34 +229,33 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
248 229
249 /* Init Tx bds */ 230 /* Init Tx bds */
250 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset); 231 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset);
251 for (i = 0; i < us_info->tx_bd_ring_len; i++) { 232 for (i = 0; i < us_info->tx_bd_ring_len - 1; i++) {
252 /* clear bd buffer */ 233 /* clear bd buffer */
253 out_be32(&(((struct qe_bd *)bd)->buf), 0); 234 out_be32(&bd->buf, 0);
254 /* set bd status and length */ 235 /* set bd status and length */
255 out_be32((u32*)bd, 0); 236 out_be32((u32 *) bd, 0);
256 bd += sizeof(struct qe_bd); 237 bd++;
257 } 238 }
258 bd -= sizeof(struct qe_bd); 239 /* for last BD set Wrap bit */
259 /* set bd status and length */ 240 out_be32(&bd->buf, 0);
260 out_be32((u32*)bd, T_W); /* for last BD set Wrap bit */ 241 out_be32((u32 *) bd, cpu_to_be32(T_W));
261 242
262 /* Init Rx bds */ 243 /* Init Rx bds */
263 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset); 244 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset);
264 for (i = 0; i < us_info->rx_bd_ring_len; i++) { 245 for (i = 0; i < us_info->rx_bd_ring_len - 1; i++) {
265 /* set bd status and length */ 246 /* set bd status and length */
266 out_be32((u32*)bd, 0); 247 out_be32((u32*)bd, 0);
267 /* clear bd buffer */ 248 /* clear bd buffer */
268 out_be32(&(((struct qe_bd *)bd)->buf), 0); 249 out_be32(&bd->buf, 0);
269 bd += sizeof(struct qe_bd); 250 bd++;
270 } 251 }
271 bd -= sizeof(struct qe_bd); 252 /* for last BD set Wrap bit */
272 /* set bd status and length */ 253 out_be32((u32*)bd, cpu_to_be32(R_W));
273 out_be32((u32*)bd, R_W); /* for last BD set Wrap bit */ 254 out_be32(&bd->buf, 0);
274 255
275 /* Set GUMR (For more details see the hardware spec.). */ 256 /* Set GUMR (For more details see the hardware spec.). */
276 /* gumr_h */ 257 /* gumr_h */
277 gumr = 0; 258 gumr = us_info->tcrc;
278 gumr |= us_info->tcrc;
279 if (us_info->cdp) 259 if (us_info->cdp)
280 gumr |= UCC_SLOW_GUMR_H_CDP; 260 gumr |= UCC_SLOW_GUMR_H_CDP;
281 if (us_info->ctsp) 261 if (us_info->ctsp)
@@ -295,7 +275,8 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
295 out_be32(&us_regs->gumr_h, gumr); 275 out_be32(&us_regs->gumr_h, gumr);
296 276
297 /* gumr_l */ 277 /* gumr_l */
298 gumr = 0; 278 gumr = us_info->tdcr | us_info->rdcr | us_info->tenc | us_info->renc |
279 us_info->diag | us_info->mode;
299 if (us_info->tci) 280 if (us_info->tci)
300 gumr |= UCC_SLOW_GUMR_L_TCI; 281 gumr |= UCC_SLOW_GUMR_L_TCI;
301 if (us_info->rinv) 282 if (us_info->rinv)
@@ -304,23 +285,14 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
304 gumr |= UCC_SLOW_GUMR_L_TINV; 285 gumr |= UCC_SLOW_GUMR_L_TINV;
305 if (us_info->tend) 286 if (us_info->tend)
306 gumr |= UCC_SLOW_GUMR_L_TEND; 287 gumr |= UCC_SLOW_GUMR_L_TEND;
307 gumr |= us_info->tdcr;
308 gumr |= us_info->rdcr;
309 gumr |= us_info->tenc;
310 gumr |= us_info->renc;
311 gumr |= us_info->diag;
312 gumr |= us_info->mode;
313 out_be32(&us_regs->gumr_l, gumr); 288 out_be32(&us_regs->gumr_l, gumr);
314 289
315 /* Function code registers */ 290 /* Function code registers */
316 /* function_code has initial value 0 */
317 291
318 /* if the data is in cachable memory, the 'global' */ 292 /* if the data is in cachable memory, the 'global' */
319 /* in the function code should be set. */ 293 /* in the function code should be set. */
320 function_code |= us_info->data_mem_part; 294 uccs->us_pram->tfcr = uccs->us_pram->rfcr =
321 function_code |= QE_BMR_BYTE_ORDER_BO_MOT; /* Required for QE */ 295 us_info->data_mem_part | QE_BMR_BYTE_ORDER_BO_MOT;
322 uccs->us_pram->tfcr = function_code;
323 uccs->us_pram->rfcr = function_code;
324 296
325 /* rbase, tbase are offsets from MURAM base */ 297 /* rbase, tbase are offsets from MURAM base */
326 out_be16(&uccs->us_pram->rbase, uccs->us_pram_offset); 298 out_be16(&uccs->us_pram->rbase, uccs->us_pram_offset);
@@ -336,34 +308,29 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
336 /* If NMSI (not Tsa), set Tx and Rx clock. */ 308 /* If NMSI (not Tsa), set Tx and Rx clock. */
337 if (!us_info->tsa) { 309 if (!us_info->tsa) {
338 /* Rx clock routing */ 310 /* Rx clock routing */
339 if (ucc_set_qe_mux_rxtx 311 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->rx_clock,
340 (us_info->ucc_num, us_info->rx_clock, COMM_DIR_RX)) { 312 COMM_DIR_RX)) {
341 uccs_err 313 printk(KERN_ERR "%s: illegal value for RX clock",
342 ("ucc_slow_init: Illegal value for parameter" 314 __FUNCTION__);
343 " 'RxClock'.");
344 ucc_slow_free(uccs); 315 ucc_slow_free(uccs);
345 return -EINVAL; 316 return -EINVAL;
346 } 317 }
347 /* Tx clock routing */ 318 /* Tx clock routing */
348 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, 319 if (ucc_set_qe_mux_rxtx(us_info->ucc_num, us_info->tx_clock,
349 us_info->tx_clock, COMM_DIR_TX)) { 320 COMM_DIR_TX)) {
350 uccs_err 321 printk(KERN_ERR "%s: illegal value for TX clock",
351 ("ucc_slow_init: Illegal value for parameter " 322 __FUNCTION__);
352 "'TxClock'.");
353 ucc_slow_free(uccs); 323 ucc_slow_free(uccs);
354 return -EINVAL; 324 return -EINVAL;
355 } 325 }
356 } 326 }
357 327
358 /*
359 * INTERRUPTS
360 */
361 /* Set interrupt mask register at UCC level. */ 328 /* Set interrupt mask register at UCC level. */
362 out_be16(&us_regs->uccm, us_info->uccm_mask); 329 out_be16(&us_regs->uccm, us_info->uccm_mask);
363 330
364 /* First, clear anything pending at UCC level, */ 331 /* First, clear anything pending at UCC level,
365 /* otherwise, old garbage may come through */ 332 * otherwise, old garbage may come through
366 /* as soon as the dam is opened. */ 333 * as soon as the dam is opened. */
367 334
368 /* Writing '1' clears */ 335 /* Writing '1' clears */
369 out_be16(&us_regs->ucce, 0xffff); 336 out_be16(&us_regs->ucce, 0xffff);
@@ -400,3 +367,5 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
400 367
401 kfree(uccs); 368 kfree(uccs);
402} 369}
370
371
diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c
index 5d841f4b3530..af3780e52e76 100644
--- a/arch/powerpc/xmon/ppc-opc.c
+++ b/arch/powerpc/xmon/ppc-opc.c
@@ -21,6 +21,7 @@
21 02110-1301, USA. */ 21 02110-1301, USA. */
22 22
23#include <linux/stddef.h> 23#include <linux/stddef.h>
24#include <linux/kernel.h>
24#include "nonstdio.h" 25#include "nonstdio.h"
25#include "ppc.h" 26#include "ppc.h"
26 27
@@ -4932,8 +4933,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
4932 4933
4933}; 4934};
4934 4935
4935const int powerpc_num_opcodes = 4936const int powerpc_num_opcodes = ARRAY_SIZE(powerpc_opcodes);
4936 sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
4937 4937
4938/* The macro table. This is only used by the assembler. */ 4938/* The macro table. This is only used by the assembler. */
4939 4939
@@ -4989,5 +4989,4 @@ const struct powerpc_macro powerpc_macros[] = {
4989{ "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" }, 4989{ "clrlslwi.",4, PPCCOM, "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
4990}; 4990};
4991 4991
4992const int powerpc_num_macros = 4992const int powerpc_num_macros = ARRAY_SIZE(powerpc_macros);
4993 sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/arch/powerpc/xmon/spu-dis.c b/arch/powerpc/xmon/spu-dis.c
index ee929c641bf3..e5f89837c82e 100644
--- a/arch/powerpc/xmon/spu-dis.c
+++ b/arch/powerpc/xmon/spu-dis.c
@@ -85,7 +85,7 @@ get_index_for_opcode (unsigned int insn)
85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0) 85 if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0)
86 return index; 86 return index;
87 87
88 return 0; 88 return NULL;
89} 89}
90 90
91/* Print a Spu instruction. */ 91/* Print a Spu instruction. */
diff --git a/arch/powerpc/xmon/spu-opc.c b/arch/powerpc/xmon/spu-opc.c
index efffde9edc6e..530df3d6d7b2 100644
--- a/arch/powerpc/xmon/spu-opc.c
+++ b/arch/powerpc/xmon/spu-opc.c
@@ -18,6 +18,7 @@
18 with this program; if not, write to the Free Software Foundation, Inc., 18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
20 20
21#include <linux/kernel.h>
21#include "spu.h" 22#include "spu.h"
22 23
23/* This file holds the Spu opcode table */ 24/* This file holds the Spu opcode table */
@@ -40,5 +41,4 @@ const struct spu_opcode spu_opcodes[] = {
40#undef APUOPFB 41#undef APUOPFB
41}; 42};
42 43
43const int spu_num_opcodes = 44const int spu_num_opcodes = ARRAY_SIZE(spu_opcodes);
44 sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 77540a2f7704..0183e5fbaf46 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2811,7 +2811,6 @@ static void dump_spu_fields(struct spu *spu)
2811 DUMP_FIELD(spu, "0x%lx", irqs[2]); 2811 DUMP_FIELD(spu, "0x%lx", irqs[2]);
2812 DUMP_FIELD(spu, "0x%x", slb_replace); 2812 DUMP_FIELD(spu, "0x%x", slb_replace);
2813 DUMP_FIELD(spu, "%d", pid); 2813 DUMP_FIELD(spu, "%d", pid);
2814 DUMP_FIELD(spu, "%d", prio);
2815 DUMP_FIELD(spu, "0x%p", mm); 2814 DUMP_FIELD(spu, "0x%p", mm);
2816 DUMP_FIELD(spu, "0x%p", ctx); 2815 DUMP_FIELD(spu, "0x%p", ctx);
2817 DUMP_FIELD(spu, "0x%p", rq); 2816 DUMP_FIELD(spu, "0x%p", rq);