aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-30 21:37:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-30 21:37:27 -0500
commit8af03e782cae1e0a0f530ddd22301cdd12cf9dc0 (patch)
treec4af13a38bd3cc1a811a37f2358491f171052070 /arch
parent6232665040f9a23fafd9d94d4ae8d5a2dc850f65 (diff)
parent99e139126ab2e84be67969650f92eb37c12ab5cd (diff)
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (454 commits) [POWERPC] Cell IOMMU fixed mapping support [POWERPC] Split out the ioid fetching/checking logic [POWERPC] Add support to cell_iommu_setup_page_tables() for multiple windows [POWERPC] Split out the IOMMU logic from cell_dma_dev_setup() [POWERPC] Split cell_iommu_setup_hardware() into two parts [POWERPC] Split out the logic that allocates struct iommus [POWERPC] Allocate the hash table under 1G on cell [POWERPC] Add set_dma_ops() to match get_dma_ops() [POWERPC] 83xx: Clean up / convert mpc83xx board DTS files to v1 format. [POWERPC] 85xx: Only invalidate TLB0 and TLB1 [POWERPC] 83xx: Fix typo in mpc837x compatible entries [POWERPC] 85xx: convert sbc85* boards to use machine_device_initcall [POWERPC] 83xx: rework platform Kconfig [POWERPC] 85xx: rework platform Kconfig [POWERPC] 86xx: Remove unused IRQ defines [POWERPC] QE: Explicitly set address-cells and size cells for muram [POWERPC] Convert StorCenter DTS file to /dts-v1/ format. [POWERPC] 86xx: Convert all 86xx DTS files to /dts-v1/ format. [PPC] Remove 85xx from arch/ppc [PPC] Remove 83xx from arch/ppc ...
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/Kconfig17
-rw-r--r--arch/powerpc/Kconfig.debug26
-rw-r--r--arch/powerpc/Makefile3
-rw-r--r--arch/powerpc/boot/.gitignore2
-rw-r--r--arch/powerpc/boot/4xx.c476
-rw-r--r--arch/powerpc/boot/4xx.h14
-rw-r--r--arch/powerpc/boot/Makefile118
-rw-r--r--arch/powerpc/boot/bamboo.c6
-rw-r--r--arch/powerpc/boot/cuboot-52xx.c2
-rw-r--r--arch/powerpc/boot/cuboot-824x.c53
-rw-r--r--arch/powerpc/boot/cuboot-83xx.c5
-rw-r--r--arch/powerpc/boot/cuboot-85xx-cpm2.c66
-rw-r--r--arch/powerpc/boot/cuboot-85xx.c7
-rw-r--r--arch/powerpc/boot/cuboot-8xx.c2
-rw-r--r--arch/powerpc/boot/cuboot-hpc2.c2
-rw-r--r--arch/powerpc/boot/cuboot-katmai.c56
-rw-r--r--arch/powerpc/boot/cuboot-pq2.c2
-rw-r--r--arch/powerpc/boot/cuboot-rainier.c56
-rw-r--r--arch/powerpc/boot/cuboot-sequoia.c4
-rw-r--r--arch/powerpc/boot/cuboot-taishan.c54
-rw-r--r--arch/powerpc/boot/cuboot-warp.c39
-rw-r--r--arch/powerpc/boot/dcr.h59
-rw-r--r--arch/powerpc/boot/devtree.c14
-rw-r--r--arch/powerpc/boot/dtc-src/.gitignore3
-rw-r--r--arch/powerpc/boot/dtc-src/Makefile.dtc25
-rw-r--r--arch/powerpc/boot/dtc-src/checks.c750
-rw-r--r--arch/powerpc/boot/dtc-src/data.c321
-rw-r--r--arch/powerpc/boot/dtc-src/dtc-lexer.l328
-rw-r--r--arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped2174
-rw-r--r--arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped1983
-rw-r--r--arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped111
-rw-r--r--arch/powerpc/boot/dtc-src/dtc-parser.y336
-rw-r--r--arch/powerpc/boot/dtc-src/dtc.c231
-rw-r--r--arch/powerpc/boot/dtc-src/dtc.h269
-rw-r--r--arch/powerpc/boot/dtc-src/flattree.c968
-rw-r--r--arch/powerpc/boot/dtc-src/fstree.c94
-rw-r--r--arch/powerpc/boot/dtc-src/livetree.c305
-rw-r--r--arch/powerpc/boot/dtc-src/srcpos.c105
-rw-r--r--arch/powerpc/boot/dtc-src/srcpos.h75
-rw-r--r--arch/powerpc/boot/dtc-src/treesource.c275
-rw-r--r--arch/powerpc/boot/dtc-src/version_gen.h1
-rw-r--r--arch/powerpc/boot/dts/adder875-redboot.dts184
-rw-r--r--arch/powerpc/boot/dts/adder875-uboot.dts183
-rw-r--r--arch/powerpc/boot/dts/bamboo.dts62
-rw-r--r--arch/powerpc/boot/dts/cm5200.dts234
-rw-r--r--arch/powerpc/boot/dts/ebony.dts58
-rw-r--r--arch/powerpc/boot/dts/ep405.dts228
-rw-r--r--arch/powerpc/boot/dts/ep8248e.dts207
-rw-r--r--arch/powerpc/boot/dts/haleakala.dts274
-rw-r--r--arch/powerpc/boot/dts/katmai.dts400
-rw-r--r--arch/powerpc/boot/dts/kilauea.dts99
-rw-r--r--arch/powerpc/boot/dts/kuroboxHD.dts16
-rw-r--r--arch/powerpc/boot/dts/kuroboxHG.dts16
-rw-r--r--arch/powerpc/boot/dts/lite5200.dts104
-rw-r--r--arch/powerpc/boot/dts/lite5200b.dts101
-rw-r--r--arch/powerpc/boot/dts/makalu.dts347
-rw-r--r--arch/powerpc/boot/dts/motionpro.dts301
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts217
-rw-r--r--arch/powerpc/boot/dts/mpc8315erdb.dts287
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts352
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts224
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts231
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitxgp.dts144
-rw-r--r--arch/powerpc/boot/dts/mpc834x_mds.dts311
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts335
-rw-r--r--arch/powerpc/boot/dts/mpc8377_mds.dts280
-rw-r--r--arch/powerpc/boot/dts/mpc8377_rdb.dts296
-rw-r--r--arch/powerpc/boot/dts/mpc8378_mds.dts266
-rw-r--r--arch/powerpc/boot/dts/mpc8378_rdb.dts282
-rw-r--r--arch/powerpc/boot/dts/mpc8379_mds.dts294
-rw-r--r--arch/powerpc/boot/dts/mpc8379_rdb.dts310
-rw-r--r--arch/powerpc/boot/dts/mpc8540ads.dts59
-rw-r--r--arch/powerpc/boot/dts/mpc8541cds.dts41
-rw-r--r--arch/powerpc/boot/dts/mpc8544ds.dts65
-rw-r--r--arch/powerpc/boot/dts/mpc8548cds.dts68
-rw-r--r--arch/powerpc/boot/dts/mpc8555cds.dts41
-rw-r--r--arch/powerpc/boot/dts/mpc8560ads.dts59
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts104
-rw-r--r--arch/powerpc/boot/dts/mpc8572ds.dts66
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts256
-rw-r--r--arch/powerpc/boot/dts/mpc8641_hpcn.dts433
-rw-r--r--arch/powerpc/boot/dts/mpc866ads.dts156
-rw-r--r--arch/powerpc/boot/dts/rainier.dts353
-rw-r--r--arch/powerpc/boot/dts/sbc8349.dts244
-rw-r--r--arch/powerpc/boot/dts/sbc8548.dts244
-rw-r--r--arch/powerpc/boot/dts/sbc8560.dts330
-rw-r--r--arch/powerpc/boot/dts/sequoia.dts49
-rw-r--r--arch/powerpc/boot/dts/storcenter.dts141
-rw-r--r--arch/powerpc/boot/dts/stx_gp3_8560.dts228
-rw-r--r--arch/powerpc/boot/dts/taishan.dts383
-rw-r--r--arch/powerpc/boot/dts/tqm5200.dts177
-rw-r--r--arch/powerpc/boot/dts/tqm8540.dts204
-rw-r--r--arch/powerpc/boot/dts/tqm8541.dts228
-rw-r--r--arch/powerpc/boot/dts/tqm8555.dts228
-rw-r--r--arch/powerpc/boot/dts/tqm8560.dts245
-rw-r--r--arch/powerpc/boot/dts/walnut.dts55
-rw-r--r--arch/powerpc/boot/dts/warp.dts239
-rw-r--r--arch/powerpc/boot/ebony.c64
-rw-r--r--arch/powerpc/boot/ep405.c74
-rw-r--r--arch/powerpc/boot/ep8248e.c55
-rw-r--r--arch/powerpc/boot/ep88xc.c2
-rw-r--r--arch/powerpc/boot/flatdevtree.c1036
-rw-r--r--arch/powerpc/boot/flatdevtree.h113
-rw-r--r--arch/powerpc/boot/flatdevtree_misc.c79
-rw-r--r--arch/powerpc/boot/holly.c2
-rw-r--r--arch/powerpc/boot/libfdt-wrapper.c193
-rw-r--r--arch/powerpc/boot/libfdt/Makefile.libfdt14
-rw-r--r--arch/powerpc/boot/libfdt/fdt.c156
-rw-r--r--arch/powerpc/boot/libfdt/fdt.h60
-rw-r--r--arch/powerpc/boot/libfdt/fdt_ro.c583
-rw-r--r--arch/powerpc/boot/libfdt/fdt_rw.c447
-rw-r--r--arch/powerpc/boot/libfdt/fdt_strerror.c96
-rw-r--r--arch/powerpc/boot/libfdt/fdt_sw.c258
-rw-r--r--arch/powerpc/boot/libfdt/fdt_wip.c144
-rw-r--r--arch/powerpc/boot/libfdt/libfdt.h721
-rw-r--r--arch/powerpc/boot/libfdt/libfdt_internal.h89
-rw-r--r--arch/powerpc/boot/libfdt_env.h17
-rw-r--r--arch/powerpc/boot/main.c1
-rw-r--r--arch/powerpc/boot/ops.h27
-rw-r--r--arch/powerpc/boot/prpmc2800.c3
-rw-r--r--arch/powerpc/boot/ps3.c2
-rw-r--r--arch/powerpc/boot/redboot-8xx.c58
-rw-r--r--arch/powerpc/boot/redboot.h56
-rw-r--r--arch/powerpc/boot/reg.h8
-rw-r--r--arch/powerpc/boot/serial.c5
-rw-r--r--arch/powerpc/boot/treeboot-walnut.c53
-rwxr-xr-xarch/powerpc/boot/wrapper21
-rw-r--r--arch/powerpc/configs/adder875-redboot_defconfig798
-rw-r--r--arch/powerpc/configs/adder875-uboot_defconfig798
-rw-r--r--arch/powerpc/configs/bamboo_defconfig26
-rw-r--r--arch/powerpc/configs/celleb_defconfig38
-rw-r--r--arch/powerpc/configs/ebony_defconfig8
-rw-r--r--arch/powerpc/configs/ep405_defconfig952
-rw-r--r--arch/powerpc/configs/ep8248e_defconfig821
-rw-r--r--arch/powerpc/configs/katmai_defconfig790
-rw-r--r--arch/powerpc/configs/kilauea_defconfig74
-rw-r--r--arch/powerpc/configs/makalu_defconfig812
-rw-r--r--arch/powerpc/configs/mpc5200_defconfig1286
-rw-r--r--arch/powerpc/configs/mpc8313_rdb_defconfig48
-rw-r--r--arch/powerpc/configs/mpc8315_rdb_defconfig1417
-rw-r--r--arch/powerpc/configs/mpc834x_itx_defconfig3
-rw-r--r--arch/powerpc/configs/mpc837x_mds_defconfig878
-rw-r--r--arch/powerpc/configs/mpc837x_rdb_defconfig887
-rw-r--r--arch/powerpc/configs/mpc83xx_defconfig887
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig1523
-rw-r--r--arch/powerpc/configs/mpc8610_hpcd_defconfig171
-rw-r--r--arch/powerpc/configs/pasemi_defconfig32
-rw-r--r--arch/powerpc/configs/ppc64_defconfig8
-rw-r--r--arch/powerpc/configs/ps3_defconfig49
-rw-r--r--arch/powerpc/configs/rainier_defconfig873
-rw-r--r--arch/powerpc/configs/sbc834x_defconfig800
-rw-r--r--arch/powerpc/configs/sbc8548_defconfig (renamed from arch/ppc/configs/mpc834x_sys_defconfig)715
-rw-r--r--arch/powerpc/configs/sbc8560_defconfig764
-rw-r--r--arch/powerpc/configs/sequoia_defconfig34
-rw-r--r--arch/powerpc/configs/storcenter_defconfig1174
-rw-r--r--arch/powerpc/configs/stx_gp3_defconfig (renamed from arch/ppc/configs/stx_gp3_defconfig)990
-rw-r--r--arch/powerpc/configs/taishan_defconfig (renamed from arch/powerpc/configs/lite5200_defconfig)389
-rw-r--r--arch/powerpc/configs/tqm8540_defconfig (renamed from arch/ppc/configs/TQM8540_defconfig)587
-rw-r--r--arch/powerpc/configs/tqm8541_defconfig (renamed from arch/ppc/configs/TQM8541_defconfig)608
-rw-r--r--arch/powerpc/configs/tqm8555_defconfig (renamed from arch/ppc/configs/TQM8555_defconfig)605
-rw-r--r--arch/powerpc/configs/tqm8560_defconfig (renamed from arch/ppc/configs/TQM8560_defconfig)598
-rw-r--r--arch/powerpc/configs/walnut_defconfig94
-rw-r--r--arch/powerpc/configs/warp_defconfig1057
-rw-r--r--arch/powerpc/kernel/Makefile13
-rw-r--r--arch/powerpc/kernel/btext.c2
-rw-r--r--arch/powerpc/kernel/cpu_setup_44x.S15
-rw-r--r--arch/powerpc/kernel/cputable.c149
-rw-r--r--arch/powerpc/kernel/crash.c101
-rw-r--r--arch/powerpc/kernel/dma_64.c19
-rw-r--r--arch/powerpc/kernel/head_44x.S14
-rw-r--r--arch/powerpc/kernel/head_64.S1
-rw-r--r--arch/powerpc/kernel/head_booke.h2
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S20
-rw-r--r--arch/powerpc/kernel/ibmebus.c12
-rw-r--r--arch/powerpc/kernel/iommu.c8
-rw-r--r--arch/powerpc/kernel/isa-bridge.c6
-rw-r--r--arch/powerpc/kernel/legacy_serial.c51
-rw-r--r--arch/powerpc/kernel/lparcfg.c12
-rw-r--r--arch/powerpc/kernel/misc.S73
-rw-r--r--arch/powerpc/kernel/misc_32.S56
-rw-r--r--arch/powerpc/kernel/misc_64.S7
-rw-r--r--arch/powerpc/kernel/module_32.c77
-rw-r--r--arch/powerpc/kernel/module_64.c81
-rw-r--r--arch/powerpc/kernel/of_device.c2
-rw-r--r--arch/powerpc/kernel/of_platform.c33
-rw-r--r--arch/powerpc/kernel/pci-common.c774
-rw-r--r--arch/powerpc/kernel/pci_32.c969
-rw-r--r--arch/powerpc/kernel/pci_64.c444
-rw-r--r--arch/powerpc/kernel/pci_dn.c7
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c1
-rw-r--r--arch/powerpc/kernel/prom.c52
-rw-r--r--arch/powerpc/kernel/prom_init.c149
-rw-r--r--arch/powerpc/kernel/prom_parse.c22
-rw-r--r--arch/powerpc/kernel/rio.c (renamed from arch/ppc/kernel/rio.c)0
-rw-r--r--arch/powerpc/kernel/rtas_pci.c13
-rw-r--r--arch/powerpc/kernel/setup-common.c78
-rw-r--r--arch/powerpc/kernel/signal_32.c3
-rw-r--r--arch/powerpc/kernel/smp.c49
-rw-r--r--arch/powerpc/kernel/systbl_chk.c58
-rw-r--r--arch/powerpc/kernel/systbl_chk.sh33
-rw-r--r--arch/powerpc/kernel/time.c91
-rw-r--r--arch/powerpc/kernel/traps.c87
-rw-r--r--arch/powerpc/kernel/udbg.c7
-rw-r--r--arch/powerpc/kernel/udbg_16550.c43
-rw-r--r--arch/powerpc/math-emu/op-4.h40
-rw-r--r--arch/powerpc/mm/Makefile1
-rw-r--r--arch/powerpc/mm/fault.c8
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c6
-rw-r--r--arch/powerpc/mm/hash_low_64.S16
-rw-r--r--arch/powerpc/mm/hash_utils_64.c107
-rw-r--r--arch/powerpc/mm/hugetlbpage.c119
-rw-r--r--arch/powerpc/mm/lmb.c13
-rw-r--r--arch/powerpc/mm/mem.c21
-rw-r--r--arch/powerpc/mm/slb.c3
-rw-r--r--arch/powerpc/mm/slb_low.S5
-rw-r--r--arch/powerpc/mm/subpage-prot.c213
-rw-r--r--arch/powerpc/oprofile/op_model_cell.c20
-rw-r--r--arch/powerpc/platforms/40x/Kconfig40
-rw-r--r--arch/powerpc/platforms/40x/Makefile2
-rw-r--r--arch/powerpc/platforms/40x/ep405.c123
-rw-r--r--arch/powerpc/platforms/40x/kilauea.c10
-rw-r--r--arch/powerpc/platforms/40x/makalu.c58
-rw-r--r--arch/powerpc/platforms/40x/virtex.c17
-rw-r--r--arch/powerpc/platforms/40x/walnut.c12
-rw-r--r--arch/powerpc/platforms/44x/Kconfig61
-rw-r--r--arch/powerpc/platforms/44x/Makefile7
-rw-r--r--arch/powerpc/platforms/44x/bamboo.c11
-rw-r--r--arch/powerpc/platforms/44x/ebony.c12
-rw-r--r--arch/powerpc/platforms/44x/katmai.c63
-rw-r--r--arch/powerpc/platforms/44x/rainier.c62
-rw-r--r--arch/powerpc/platforms/44x/sequoia.c11
-rw-r--r--arch/powerpc/platforms/44x/taishan.c73
-rw-r--r--arch/powerpc/platforms/44x/warp-nand.c105
-rw-r--r--arch/powerpc/platforms/44x/warp.c153
-rw-r--r--arch/powerpc/platforms/52xx/Kconfig50
-rw-r--r--arch/powerpc/platforms/52xx/Makefile1
-rw-r--r--arch/powerpc/platforms/52xx/efika.c3
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c46
-rw-r--r--arch/powerpc/platforms/52xx/lite5200_pm.c13
-rw-r--r--arch/powerpc/platforms/52xx/mpc5200_simple.c85
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c154
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pci.c20
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pic.c22
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_pm.c15
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig13
-rw-r--r--arch/powerpc/platforms/82xx/Makefile1
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c324
-rw-r--r--arch/powerpc/platforms/82xx/mpc8272_ads.c5
-rw-r--r--arch/powerpc/platforms/82xx/pq2.c4
-rw-r--r--arch/powerpc/platforms/82xx/pq2fads.c7
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig63
-rw-r--r--arch/powerpc/platforms/83xx/Makefile5
-rw-r--r--arch/powerpc/platforms/83xx/mpc831x_rdb.c (renamed from arch/powerpc/platforms/83xx/mpc8313_rdb.c)51
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c20
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c23
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c12
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c18
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c20
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_mds.c147
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c99
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h3
-rw-r--r--arch/powerpc/platforms/83xx/pci.c2
-rw-r--r--arch/powerpc/platforms/83xx/sbc834x.c115
-rw-r--r--arch/powerpc/platforms/83xx/usb.c50
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig87
-rw-r--r--arch/powerpc/platforms/85xx/Makefile4
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c18
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c6
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c43
-rw-r--r--arch/powerpc/platforms/85xx/sbc8548.c167
-rw-r--r--arch/powerpc/platforms/85xx/sbc8560.c283
-rw-r--r--arch/powerpc/platforms/85xx/stx_gp3.c183
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c187
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c17
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c16
-rw-r--r--arch/powerpc/platforms/8xx/Kconfig10
-rw-r--r--arch/powerpc/platforms/8xx/Makefile1
-rw-r--r--arch/powerpc/platforms/8xx/adder875.c118
-rw-r--r--arch/powerpc/platforms/8xx/ep88xc.c10
-rw-r--r--arch/powerpc/platforms/8xx/m8xx_setup.c13
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads.h44
-rw-r--r--arch/powerpc/platforms/8xx/mpc86xads_setup.c294
-rw-r--r--arch/powerpc/platforms/8xx/mpc885ads_setup.c12
-rw-r--r--arch/powerpc/platforms/8xx/mpc8xx.h21
-rw-r--r--arch/powerpc/platforms/Kconfig18
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype11
-rw-r--r--arch/powerpc/platforms/cell/Makefile2
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq.c3
-rw-r--r--arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c3
-rw-r--r--arch/powerpc/platforms/cell/cbe_regs.c5
-rw-r--r--arch/powerpc/platforms/cell/io-workarounds.c9
-rw-r--r--arch/powerpc/platforms/cell/iommu.c398
-rw-r--r--arch/powerpc/platforms/cell/pmu.c7
-rw-r--r--arch/powerpc/platforms/cell/setup.c7
-rw-r--r--arch/powerpc/platforms/cell/smp.c3
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c224
-rw-r--r--arch/powerpc/platforms/cell/spu_fault.c98
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c28
-rw-r--r--arch/powerpc/platforms/cell/spufs/Makefile2
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c31
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c53
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c8
-rw-r--r--arch/powerpc/platforms/cell/spufs/fault.c187
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c429
-rw-r--r--arch/powerpc/platforms/cell/spufs/hw_ops.c33
-rw-r--r--arch/powerpc/platforms/cell/spufs/lscsa_alloc.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/run.c190
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c361
-rw-r--r--arch/powerpc/platforms/cell/spufs/spufs.h64
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c73
-rw-r--r--arch/powerpc/platforms/celleb/Kconfig2
-rw-r--r--arch/powerpc/platforms/celleb/io-workarounds.c7
-rw-r--r--arch/powerpc/platforms/celleb/iommu.c26
-rw-r--r--arch/powerpc/platforms/celleb/pci.c14
-rw-r--r--arch/powerpc/platforms/celleb/scc_epci.c2
-rw-r--r--arch/powerpc/platforms/celleb/scc_uhc.c3
-rw-r--r--arch/powerpc/platforms/celleb/setup.c147
-rw-r--r--arch/powerpc/platforms/chrp/pci.c6
-rw-r--r--arch/powerpc/platforms/chrp/setup.c65
-rw-r--r--arch/powerpc/platforms/embedded6xx/Kconfig23
-rw-r--r--arch/powerpc/platforms/embedded6xx/Makefile1
-rw-r--r--arch/powerpc/platforms/embedded6xx/holly.c3
-rw-r--r--arch/powerpc/platforms/embedded6xx/ls_uart.c5
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c2
-rw-r--r--arch/powerpc/platforms/embedded6xx/storcenter.c192
-rw-r--r--arch/powerpc/platforms/iseries/Makefile2
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c4
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c2
-rw-r--r--arch/powerpc/platforms/iseries/pci.c670
-rw-r--r--arch/powerpc/platforms/iseries/pci.h27
-rw-r--r--arch/powerpc/platforms/iseries/setup.c61
-rw-r--r--arch/powerpc/platforms/iseries/setup.h1
-rw-r--r--arch/powerpc/platforms/iseries/vpdinfo.c275
-rw-r--r--arch/powerpc/platforms/maple/Kconfig1
-rw-r--r--arch/powerpc/platforms/maple/pci.c2
-rw-r--r--arch/powerpc/platforms/maple/setup.c2
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig12
-rw-r--r--arch/powerpc/platforms/pasemi/Makefile1
-rw-r--r--arch/powerpc/platforms/pasemi/cpufreq.c19
-rw-r--r--arch/powerpc/platforms/pasemi/electra_ide.c96
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c96
-rw-r--r--arch/powerpc/platforms/pasemi/idle.c5
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h6
-rw-r--r--arch/powerpc/platforms/pasemi/powersave.S11
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c61
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c10
-rw-r--r--arch/powerpc/platforms/powermac/pci.c248
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c3
-rw-r--r--arch/powerpc/platforms/powermac/pic.c3
-rw-r--r--arch/powerpc/platforms/powermac/pmac.h2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c21
-rw-r--r--arch/powerpc/platforms/powermac/time.c2
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig24
-rw-r--r--arch/powerpc/platforms/ps3/device-init.c531
-rw-r--r--arch/powerpc/platforms/ps3/mm.c24
-rw-r--r--arch/powerpc/platforms/ps3/platform.h34
-rw-r--r--arch/powerpc/platforms/ps3/repository.c320
-rw-r--r--arch/powerpc/platforms/ps3/spu.c27
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c19
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c46
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c19
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c28
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c14
-rw-r--r--arch/powerpc/platforms/pseries/plpar_wrappers.h5
-rw-r--r--arch/powerpc/platforms/pseries/smp.c3
-rw-r--r--arch/powerpc/platforms/pseries/xics.c59
-rw-r--r--arch/powerpc/platforms/pseries/xics.h3
-rw-r--r--arch/powerpc/sysdev/Kconfig8
-rw-r--r--arch/powerpc/sysdev/Makefile13
-rw-r--r--arch/powerpc/sysdev/axonram.c5
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.c16
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.h2
-rw-r--r--arch/powerpc/sysdev/commproc.h12
-rw-r--r--arch/powerpc/sysdev/cpm1.c (renamed from arch/powerpc/sysdev/commproc.c)71
-rw-r--r--arch/powerpc/sysdev/cpm2.c (renamed from arch/powerpc/sysdev/cpm2_common.c)28
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c154
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c (renamed from arch/ppc/syslib/ppc85xx_rio.c)0
-rw-r--r--arch/powerpc/sysdev/fsl_rio.h (renamed from arch/ppc/syslib/ppc85xx_rio.h)0
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c232
-rw-r--r--arch/powerpc/sysdev/grackle.c2
-rw-r--r--arch/powerpc/sysdev/ipic.c287
-rw-r--r--arch/powerpc/sysdev/ipic.h13
-rw-r--r--arch/powerpc/sysdev/micropatch.c2
-rw-r--r--arch/powerpc/sysdev/mmio_nvram.c2
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.c1
-rw-r--r--arch/powerpc/sysdev/mpic.c70
-rw-r--r--arch/powerpc/sysdev/mpic.h10
-rw-r--r--arch/powerpc/sysdev/mpic_pasemi_msi.c172
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c24
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c4
-rw-r--r--arch/powerpc/sysdev/mv64x60_udbg.c4
-rw-r--r--arch/powerpc/sysdev/of_rtc.c59
-rw-r--r--arch/powerpc/sysdev/pmi.c4
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.c1528
-rw-r--r--arch/powerpc/sysdev/ppc4xx_pci.h369
-rw-r--r--arch/powerpc/sysdev/qe_lib/Kconfig2
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c356
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_slow.c10
-rw-r--r--arch/powerpc/sysdev/tsi108_dev.c9
-rw-r--r--arch/powerpc/sysdev/uic.c132
-rw-r--r--arch/powerpc/sysdev/xilinx_intc.c8
-rw-r--r--arch/powerpc/xmon/setjmp.S61
-rw-r--r--arch/powerpc/xmon/xmon.c75
-rw-r--r--arch/ppc/8260_io/enet.c2
-rw-r--r--arch/ppc/8xx_io/commproc.c40
-rw-r--r--arch/ppc/8xx_io/enet.c6
-rw-r--r--arch/ppc/8xx_io/fec.c2
-rw-r--r--arch/ppc/8xx_io/micropatch.c2
-rw-r--r--arch/ppc/Kconfig91
-rw-r--r--arch/ppc/Makefile9
-rw-r--r--arch/ppc/boot/simple/iic.c2
-rw-r--r--arch/ppc/boot/simple/m8xx_tty.c2
-rw-r--r--arch/ppc/configs/mpc8540_ads_defconfig706
-rw-r--r--arch/ppc/configs/mpc8548_cds_defconfig658
-rw-r--r--arch/ppc/configs/mpc8555_cds_defconfig784
-rw-r--r--arch/ppc/configs/mpc8560_ads_defconfig769
-rw-r--r--arch/ppc/kernel/Makefile2
-rw-r--r--arch/ppc/kernel/asm-offsets.c6
-rw-r--r--arch/ppc/kernel/entry.S12
-rw-r--r--arch/ppc/kernel/head_44x.S2
-rw-r--r--arch/ppc/kernel/head_booke.h55
-rw-r--r--arch/ppc/kernel/head_fsl_booke.S1065
-rw-r--r--arch/ppc/kernel/misc.S46
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c11
-rw-r--r--arch/ppc/kernel/setup.c4
-rw-r--r--arch/ppc/kernel/traps.c185
-rw-r--r--arch/ppc/mm/44x_mmu.c51
-rw-r--r--arch/ppc/mm/Makefile1
-rw-r--r--arch/ppc/mm/fsl_booke_mmu.c236
-rw-r--r--arch/ppc/mm/init.c6
-rw-r--r--arch/ppc/mm/mmu_context.c2
-rw-r--r--arch/ppc/mm/mmu_decl.h6
-rw-r--r--arch/ppc/mm/pgtable.c28
-rw-r--r--arch/ppc/mm/ppc_mmu.c2
-rw-r--r--arch/ppc/platforms/83xx/Makefile4
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.c326
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.h54
-rw-r--r--arch/ppc/platforms/85xx/Kconfig106
-rw-r--r--arch/ppc/platforms/85xx/Makefile13
-rw-r--r--arch/ppc/platforms/85xx/mpc8540_ads.c226
-rw-r--r--arch/ppc/platforms/85xx/mpc8540_ads.h22
-rw-r--r--arch/ppc/platforms/85xx/mpc8555_cds.h23
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.c303
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.h24
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_ads_common.c198
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_ads_common.h67
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.c601
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.h80
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c234
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.h47
-rw-r--r--arch/ppc/platforms/85xx/sbc85xx.c166
-rw-r--r--arch/ppc/platforms/85xx/sbc85xx.h70
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.c340
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.h69
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.c391
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.h53
-rw-r--r--arch/ppc/platforms/ev64260.c4
-rw-r--r--arch/ppc/platforms/mpc866ads_setup.c2
-rw-r--r--arch/ppc/platforms/mpc885ads_setup.c2
-rw-r--r--arch/ppc/platforms/prep_pci.c1
-rw-r--r--arch/ppc/syslib/Makefile14
-rw-r--r--arch/ppc/syslib/gt64260_pic.c1
-rw-r--r--arch/ppc/syslib/ipic.c646
-rw-r--r--arch/ppc/syslib/ipic.h47
-rw-r--r--arch/ppc/syslib/mpc52xx_pic.c1
-rw-r--r--arch/ppc/syslib/mpc52xx_setup.c36
-rw-r--r--arch/ppc/syslib/mpc83xx_devices.c251
-rw-r--r--arch/ppc/syslib/mpc83xx_sys.c122
-rw-r--r--arch/ppc/syslib/mpc85xx_devices.c826
-rw-r--r--arch/ppc/syslib/mpc85xx_sys.c233
-rw-r--r--arch/ppc/syslib/mpc8xx_devices.c2
-rw-r--r--arch/ppc/syslib/mv64360_pic.c1
-rw-r--r--arch/ppc/syslib/ocp.c4
-rw-r--r--arch/ppc/syslib/open_pic.c2
-rw-r--r--arch/ppc/syslib/ppc83xx_pci.h151
-rw-r--r--arch/ppc/syslib/ppc83xx_setup.c411
-rw-r--r--arch/ppc/syslib/ppc83xx_setup.h55
-rw-r--r--arch/ppc/syslib/ppc85xx_common.c38
-rw-r--r--arch/ppc/syslib/ppc85xx_common.h22
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.c367
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.h56
-rw-r--r--arch/ppc/syslib/ppc8xx_pic.c2
-rw-r--r--arch/ppc/syslib/ppc8xx_pic.h1
-rw-r--r--arch/ppc/syslib/ppc_sys.c2
-rw-r--r--arch/ppc/xmon/start.c1
-rw-r--r--arch/ppc/xmon/start_8xx.c2
487 files changed, 53988 insertions, 21578 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index bb16443b6817..9c44af3db8d9 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -148,6 +148,9 @@ config DEFAULT_UIMAGE
148 Used to allow a board to specify it wants a uImage built by default 148 Used to allow a board to specify it wants a uImage built by default
149 default n 149 default n
150 150
151config REDBOOT
152 bool
153
151config PPC64_SWSUSP 154config PPC64_SWSUSP
152 bool 155 bool
153 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL)) 156 depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
@@ -168,11 +171,13 @@ config PPC_DCR
168 171
169config PPC_OF_PLATFORM_PCI 172config PPC_OF_PLATFORM_PCI
170 bool 173 bool
174 depends on PCI
171 depends on PPC64 # not supported on 32 bits yet 175 depends on PPC64 # not supported on 32 bits yet
172 default n 176 default n
173 177
174source "init/Kconfig" 178source "init/Kconfig"
175 179
180source "arch/powerpc/sysdev/Kconfig"
176source "arch/powerpc/platforms/Kconfig" 181source "arch/powerpc/platforms/Kconfig"
177 182
178menu "Kernel options" 183menu "Kernel options"
@@ -348,6 +353,14 @@ config PPC_64K_PAGES
348 while on hardware with such support, it will be used to map 353 while on hardware with such support, it will be used to map
349 normal application pages. 354 normal application pages.
350 355
356config PPC_SUBPAGE_PROT
357 bool "Support setting protections for 4k subpages"
358 depends on PPC_64K_PAGES
359 help
360 This option adds support for a system call to allow user programs
361 to set access permissions (read/write, readonly, or no access)
362 on the 4k subpages of each 64k page.
363
351config SCHED_SMT 364config SCHED_SMT
352 bool "SMT (Hyperthreading) scheduler support" 365 bool "SMT (Hyperthreading) scheduler support"
353 depends on PPC64 && SMP 366 depends on PPC64 && SMP
@@ -425,7 +438,7 @@ endmenu
425 438
426config ISA_DMA_API 439config ISA_DMA_API
427 bool 440 bool
428 default y 441 default !PPC_ISERIES || PCI
429 442
430menu "Bus options" 443menu "Bus options"
431 444
@@ -475,7 +488,7 @@ config MCA
475config PCI 488config PCI
476 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 489 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
477 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ 490 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
478 || PPC_PS3 491 || PPC_PS3 || 44x
479 default y if !40x && !CPM2 && !8xx && !PPC_83xx \ 492 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
480 && !PPC_85xx && !PPC_86xx 493 && !PPC_85xx && !PPC_86xx
481 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx 494 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 6a79fe43e229..db7cc34c24d4 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -151,6 +151,13 @@ config BOOTX_TEXT
151 151
152config PPC_EARLY_DEBUG 152config PPC_EARLY_DEBUG
153 bool "Early debugging (dangerous)" 153 bool "Early debugging (dangerous)"
154 help
155 Say Y to enable some early debugging facilities that may be available
156 for your processor/board combination. Those facilities are hacks
157 intended to debug problems early during boot, this should not be
158 enabled in a production kernel.
159 Note that enabling this will also cause the kernel default log level
160 to be pushed to max automatically very early during boot
154 161
155choice 162choice
156 prompt "Early debugging console" 163 prompt "Early debugging console"
@@ -218,7 +225,16 @@ config PPC_EARLY_DEBUG_44x
218 depends on 44x 225 depends on 44x
219 help 226 help
220 Select this to enable early debugging for IBM 44x chips via the 227 Select this to enable early debugging for IBM 44x chips via the
221 inbuilt serial port. 228 inbuilt serial port. If you enable this, ensure you set
229 PPC_EARLY_DEBUG_44x_PHYSLOW below to suit your target board.
230
231config PPC_EARLY_DEBUG_40x
232 bool "Early serial debugging for IBM/AMCC 40x CPUs"
233 depends on 40x
234 help
235 Select this to enable early debugging for IBM 40x chips via the
236 inbuilt serial port. This works on chips with a 16550 compatible
237 UART. Xilinx chips with uartlite cannot use this option.
222 238
223config PPC_EARLY_DEBUG_CPM 239config PPC_EARLY_DEBUG_CPM
224 bool "Early serial debugging for Freescale CPM-based serial ports" 240 bool "Early serial debugging for Freescale CPM-based serial ports"
@@ -235,12 +251,20 @@ config PPC_EARLY_DEBUG_44x_PHYSLOW
235 hex "Low 32 bits of early debug UART physical address" 251 hex "Low 32 bits of early debug UART physical address"
236 depends on PPC_EARLY_DEBUG_44x 252 depends on PPC_EARLY_DEBUG_44x
237 default "0x40000200" 253 default "0x40000200"
254 help
255 You probably want 0x40000200 for ebony boards and
256 0x40000300 for taishan
238 257
239config PPC_EARLY_DEBUG_44x_PHYSHIGH 258config PPC_EARLY_DEBUG_44x_PHYSHIGH
240 hex "EPRN of early debug UART physical address" 259 hex "EPRN of early debug UART physical address"
241 depends on PPC_EARLY_DEBUG_44x 260 depends on PPC_EARLY_DEBUG_44x
242 default "0x1" 261 default "0x1"
243 262
263config PPC_EARLY_DEBUG_40x_PHYSADDR
264 hex "Early debug UART physical address"
265 depends on PPC_EARLY_DEBUG_40x
266 default "0xef600300"
267
244config PPC_EARLY_DEBUG_CPM_ADDR 268config PPC_EARLY_DEBUG_CPM_ADDR
245 hex "CPM UART early debug transmit descriptor address" 269 hex "CPM UART early debug transmit descriptor address"
246 depends on PPC_EARLY_DEBUG_CPM 270 depends on PPC_EARLY_DEBUG_CPM
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index bd87626c1f60..f70df9b64f8f 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -167,6 +167,9 @@ boot := arch/$(ARCH)/boot
167$(BOOT_TARGETS): vmlinux 167$(BOOT_TARGETS): vmlinux
168 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) 168 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
169 169
170bootwrapper_install:
171 $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
172
170define archhelp 173define archhelp
171 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)' 174 @echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
172 @echo ' install - Install kernel using' 175 @echo ' install - Install kernel using'
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
index 65f4118cbe78..5ef2bdf8d189 100644
--- a/arch/powerpc/boot/.gitignore
+++ b/arch/powerpc/boot/.gitignore
@@ -1,4 +1,5 @@
1addnote 1addnote
2dtc
2empty.c 3empty.c
3hack-coff 4hack-coff
4infblock.c 5infblock.c
@@ -30,6 +31,7 @@ zImage.*lds
30zImage.miboot 31zImage.miboot
31zImage.pmac 32zImage.pmac
32zImage.pseries 33zImage.pseries
34zImage.redboot*
33zImage.sandpoint 35zImage.sandpoint
34zImage.vmode 36zImage.vmode
35zconf.h 37zconf.h
diff --git a/arch/powerpc/boot/4xx.c b/arch/powerpc/boot/4xx.c
index ebf9e217612d..758edf1c5815 100644
--- a/arch/powerpc/boot/4xx.c
+++ b/arch/powerpc/boot/4xx.c
@@ -22,16 +22,14 @@
22#include "dcr.h" 22#include "dcr.h"
23 23
24/* Read the 4xx SDRAM controller to get size of system memory. */ 24/* Read the 4xx SDRAM controller to get size of system memory. */
25void ibm4xx_fixup_memsize(void) 25void ibm4xx_sdram_fixup_memsize(void)
26{ 26{
27 int i; 27 int i;
28 unsigned long memsize, bank_config; 28 unsigned long memsize, bank_config;
29 29
30 memsize = 0; 30 memsize = 0;
31 for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) { 31 for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) {
32 mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]); 32 bank_config = SDRAM0_READ(sdram_bxcr[i]);
33 bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);
34
35 if (bank_config & SDRAM_CONFIG_BANK_ENABLE) 33 if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
36 memsize += SDRAM_CONFIG_BANK_SIZE(bank_config); 34 memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
37 } 35 }
@@ -39,6 +37,69 @@ void ibm4xx_fixup_memsize(void)
39 dt_fixup_memory(0, memsize); 37 dt_fixup_memory(0, memsize);
40} 38}
41 39
40/* Read the 440SPe MQ controller to get size of system memory. */
41#define DCRN_MQ0_B0BAS 0x40
42#define DCRN_MQ0_B1BAS 0x41
43#define DCRN_MQ0_B2BAS 0x42
44#define DCRN_MQ0_B3BAS 0x43
45
46static u64 ibm440spe_decode_bas(u32 bas)
47{
48 u64 base = ((u64)(bas & 0xFFE00000u)) << 2;
49
50 /* open coded because I'm paranoid about invalid values */
51 switch ((bas >> 4) & 0xFFF) {
52 case 0:
53 return 0;
54 case 0xffc:
55 return base + 0x000800000ull;
56 case 0xff8:
57 return base + 0x001000000ull;
58 case 0xff0:
59 return base + 0x002000000ull;
60 case 0xfe0:
61 return base + 0x004000000ull;
62 case 0xfc0:
63 return base + 0x008000000ull;
64 case 0xf80:
65 return base + 0x010000000ull;
66 case 0xf00:
67 return base + 0x020000000ull;
68 case 0xe00:
69 return base + 0x040000000ull;
70 case 0xc00:
71 return base + 0x080000000ull;
72 case 0x800:
73 return base + 0x100000000ull;
74 }
75 printf("Memory BAS value 0x%08x unsupported !\n", bas);
76 return 0;
77}
78
79void ibm440spe_fixup_memsize(void)
80{
81 u64 banktop, memsize = 0;
82
83 /* Ultimately, we should directly construct the memory node
84 * so we are able to handle holes in the memory address space
85 */
86 banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B0BAS));
87 if (banktop > memsize)
88 memsize = banktop;
89 banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B1BAS));
90 if (banktop > memsize)
91 memsize = banktop;
92 banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B2BAS));
93 if (banktop > memsize)
94 memsize = banktop;
95 banktop = ibm440spe_decode_bas(mfdcr(DCRN_MQ0_B3BAS));
96 if (banktop > memsize)
97 memsize = banktop;
98
99 dt_fixup_memory(0, memsize);
100}
101
102
42/* 4xx DDR1/2 Denali memory controller support */ 103/* 4xx DDR1/2 Denali memory controller support */
43/* DDR0 registers */ 104/* DDR0 registers */
44#define DDR0_02 2 105#define DDR0_02 2
@@ -77,19 +138,13 @@ void ibm4xx_fixup_memsize(void)
77 138
78#define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask)) 139#define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
79 140
80static inline u32 mfdcr_sdram0(u32 reg)
81{
82 mtdcr(DCRN_SDRAM0_CFGADDR, reg);
83 return mfdcr(DCRN_SDRAM0_CFGDATA);
84}
85
86void ibm4xx_denali_fixup_memsize(void) 141void ibm4xx_denali_fixup_memsize(void)
87{ 142{
88 u32 val, max_cs, max_col, max_row; 143 u32 val, max_cs, max_col, max_row;
89 u32 cs, col, row, bank, dpath; 144 u32 cs, col, row, bank, dpath;
90 unsigned long memsize; 145 unsigned long memsize;
91 146
92 val = mfdcr_sdram0(DDR0_02); 147 val = SDRAM0_READ(DDR0_02);
93 if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT)) 148 if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT))
94 fatal("DDR controller is not initialized\n"); 149 fatal("DDR controller is not initialized\n");
95 150
@@ -99,12 +154,12 @@ void ibm4xx_denali_fixup_memsize(void)
99 max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT); 154 max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
100 155
101 /* get CS value */ 156 /* get CS value */
102 val = mfdcr_sdram0(DDR0_10); 157 val = SDRAM0_READ(DDR0_10);
103 158
104 val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT); 159 val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
105 cs = 0; 160 cs = 0;
106 while (val) { 161 while (val) {
107 if (val && 0x1) 162 if (val & 0x1)
108 cs++; 163 cs++;
109 val = val >> 1; 164 val = val >> 1;
110 } 165 }
@@ -115,15 +170,15 @@ void ibm4xx_denali_fixup_memsize(void)
115 fatal("DDR wrong CS configuration\n"); 170 fatal("DDR wrong CS configuration\n");
116 171
117 /* get data path bytes */ 172 /* get data path bytes */
118 val = mfdcr_sdram0(DDR0_14); 173 val = SDRAM0_READ(DDR0_14);
119 174
120 if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT)) 175 if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
121 dpath = 8; /* 64 bits */ 176 dpath = 8; /* 64 bits */
122 else 177 else
123 dpath = 4; /* 32 bits */ 178 dpath = 4; /* 32 bits */
124 179
125 /* get adress pins (rows) */ 180 /* get address pins (rows) */
126 val = mfdcr_sdram0(DDR0_42); 181 val = SDRAM0_READ(DDR0_42);
127 182
128 row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT); 183 row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
129 if (row > max_row) 184 if (row > max_row)
@@ -131,7 +186,7 @@ void ibm4xx_denali_fixup_memsize(void)
131 row = max_row - row; 186 row = max_row - row;
132 187
133 /* get collomn size and banks */ 188 /* get collomn size and banks */
134 val = mfdcr_sdram0(DDR0_43); 189 val = SDRAM0_READ(DDR0_43);
135 190
136 col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT); 191 col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
137 if (col > max_col) 192 if (col > max_col)
@@ -179,13 +234,17 @@ void ibm40x_dbcr_reset(void)
179#define EMAC_RESET 0x20000000 234#define EMAC_RESET 0x20000000
180void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1) 235void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
181{ 236{
182 /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */ 237 /* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't
238 * do this for us
239 */
183 if (emac0) 240 if (emac0)
184 *emac0 = EMAC_RESET; 241 *emac0 = EMAC_RESET;
185 if (emac1) 242 if (emac1)
186 *emac1 = EMAC_RESET; 243 *emac1 = EMAC_RESET;
187 244
188 mtdcr(DCRN_MAL0_CFG, MAL_RESET); 245 mtdcr(DCRN_MAL0_CFG, MAL_RESET);
246 while (mfdcr(DCRN_MAL0_CFG) & MAL_RESET)
247 ; /* loop until reset takes effect */
189} 248}
190 249
191/* Read 4xx EBC bus bridge registers to get mappings of the peripheral 250/* Read 4xx EBC bus bridge registers to get mappings of the peripheral
@@ -217,84 +276,335 @@ void ibm4xx_fixup_ebc_ranges(const char *ebc)
217 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32)); 276 setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
218} 277}
219 278
220#define SPRN_CCR1 0x378 279/* Calculate 440GP clocks */
221void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk) 280void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
222{ 281{
223 u32 cpu, plb, opb, ebc, tb, uart0, m, vco; 282 u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
224 u32 reg; 283 u32 cr0 = mfdcr(DCRN_CPC0_CR0);
225 u32 fwdva, fwdvb, fbdv, lfbdv, opbdv0, perdv0, spcid0, prbdv0, tmp; 284 u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
226 285 u32 opdv = CPC0_SYS0_OPDV(sys0);
227 mtdcr(DCRN_CPR0_ADDR, CPR0_PLLD0); 286 u32 epdv = CPC0_SYS0_EPDV(sys0);
228 reg = mfdcr(DCRN_CPR0_DATA); 287
229 tmp = (reg & 0x000F0000) >> 16; 288 if (sys0 & CPC0_SYS0_BYPASS) {
230 fwdva = tmp ? tmp : 16; 289 /* Bypass system PLL */
231 tmp = (reg & 0x00000700) >> 8; 290 cpu = plb = sys_clk;
232 fwdvb = tmp ? tmp : 8; 291 } else {
233 tmp = (reg & 0x1F000000) >> 24; 292 if (sys0 & CPC0_SYS0_EXTSL)
234 fbdv = tmp ? tmp : 32; 293 /* PerClk */
235 lfbdv = (reg & 0x0000007F); 294 m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
236
237 mtdcr(DCRN_CPR0_ADDR, CPR0_OPBD0);
238 reg = mfdcr(DCRN_CPR0_DATA);
239 tmp = (reg & 0x03000000) >> 24;
240 opbdv0 = tmp ? tmp : 4;
241
242 mtdcr(DCRN_CPR0_ADDR, CPR0_PERD0);
243 reg = mfdcr(DCRN_CPR0_DATA);
244 tmp = (reg & 0x07000000) >> 24;
245 perdv0 = tmp ? tmp : 8;
246
247 mtdcr(DCRN_CPR0_ADDR, CPR0_PRIMBD0);
248 reg = mfdcr(DCRN_CPR0_DATA);
249 tmp = (reg & 0x07000000) >> 24;
250 prbdv0 = tmp ? tmp : 8;
251
252 mtdcr(DCRN_CPR0_ADDR, CPR0_SCPID);
253 reg = mfdcr(DCRN_CPR0_DATA);
254 tmp = (reg & 0x03000000) >> 24;
255 spcid0 = tmp ? tmp : 4;
256
257 /* Calculate M */
258 mtdcr(DCRN_CPR0_ADDR, CPR0_PLLC0);
259 reg = mfdcr(DCRN_CPR0_DATA);
260 tmp = (reg & 0x03000000) >> 24;
261 if (tmp == 0) { /* PLL output */
262 tmp = (reg & 0x20000000) >> 29;
263 if (!tmp) /* PLLOUTA */
264 m = fbdv * lfbdv * fwdva;
265 else 295 else
266 m = fbdv * lfbdv * fwdvb; 296 /* CPU clock */
297 m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
298 cpu = sys_clk * m / CPC0_SYS0_FWDVA(sys0);
299 plb = sys_clk * m / CPC0_SYS0_FWDVB(sys0);
267 } 300 }
268 else if (tmp == 1) /* CPU output */ 301
269 m = fbdv * fwdva; 302 opb = plb / opdv;
303 ebc = opb / epdv;
304
305 /* FIXME: Check if this is for all 440GP, or just Ebony */
306 if ((mfpvr() & 0xf0000fff) == 0x40000440)
307 /* Rev. B 440GP, use external system clock */
308 tb = sys_clk;
270 else 309 else
271 m = perdv0 * opbdv0 * fwdvb; 310 /* Rev. C 440GP, errata force us to use internal clock */
311 tb = cpu;
272 312
273 vco = (m * sysclk) + (m >> 1); 313 if (cr0 & CPC0_CR0_U0EC)
274 cpu = vco / fwdva; 314 /* External UART clock */
275 plb = vco / fwdvb / prbdv0; 315 uart0 = ser_clk;
276 opb = plb / opbdv0; 316 else
277 ebc = plb / perdv0; 317 /* Internal UART clock */
318 uart0 = plb / CPC0_CR0_UDIV(cr0);
319
320 if (cr0 & CPC0_CR0_U1EC)
321 /* External UART clock */
322 uart1 = ser_clk;
323 else
324 /* Internal UART clock */
325 uart1 = plb / CPC0_CR0_UDIV(cr0);
278 326
279 /* FIXME */ 327 printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
280 uart0 = ser_clk; 328 (sys_clk + 500000) / 1000000, sys_clk);
329
330 dt_fixup_cpu_clocks(cpu, tb, 0);
331
332 dt_fixup_clock("/plb", plb);
333 dt_fixup_clock("/plb/opb", opb);
334 dt_fixup_clock("/plb/opb/ebc", ebc);
335 dt_fixup_clock("/plb/opb/serial@40000200", uart0);
336 dt_fixup_clock("/plb/opb/serial@40000300", uart1);
337}
338
339#define SPRN_CCR1 0x378
340
341static inline u32 __fix_zero(u32 v, u32 def)
342{
343 return v ? v : def;
344}
345
346static unsigned int __ibm440eplike_fixup_clocks(unsigned int sys_clk,
347 unsigned int tmr_clk,
348 int per_clk_from_opb)
349{
350 /* PLL config */
351 u32 pllc = CPR0_READ(DCRN_CPR0_PLLC);
352 u32 plld = CPR0_READ(DCRN_CPR0_PLLD);
353
354 /* Dividers */
355 u32 fbdv = __fix_zero((plld >> 24) & 0x1f, 32);
356 u32 fwdva = __fix_zero((plld >> 16) & 0xf, 16);
357 u32 fwdvb = __fix_zero((plld >> 8) & 7, 8);
358 u32 lfbdv = __fix_zero(plld & 0x3f, 64);
359 u32 pradv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMAD) >> 24) & 7, 8);
360 u32 prbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PRIMBD) >> 24) & 7, 8);
361 u32 opbdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_OPBD) >> 24) & 3, 4);
362 u32 perdv0 = __fix_zero((CPR0_READ(DCRN_CPR0_PERD) >> 24) & 3, 4);
363
364 /* Input clocks for primary dividers */
365 u32 clk_a, clk_b;
366
367 /* Resulting clocks */
368 u32 cpu, plb, opb, ebc, vco;
369
370 /* Timebase */
371 u32 ccr1, tb = tmr_clk;
372
373 if (pllc & 0x40000000) {
374 u32 m;
375
376 /* Feedback path */
377 switch ((pllc >> 24) & 7) {
378 case 0:
379 /* PLLOUTx */
380 m = ((pllc & 0x20000000) ? fwdvb : fwdva) * lfbdv;
381 break;
382 case 1:
383 /* CPU */
384 m = fwdva * pradv0;
385 break;
386 case 5:
387 /* PERClk */
388 m = fwdvb * prbdv0 * opbdv0 * perdv0;
389 break;
390 default:
391 printf("WARNING ! Invalid PLL feedback source !\n");
392 goto bypass;
393 }
394 m *= fbdv;
395 vco = sys_clk * m;
396 clk_a = vco / fwdva;
397 clk_b = vco / fwdvb;
398 } else {
399bypass:
400 /* Bypass system PLL */
401 vco = 0;
402 clk_a = clk_b = sys_clk;
403 }
404
405 cpu = clk_a / pradv0;
406 plb = clk_b / prbdv0;
407 opb = plb / opbdv0;
408 ebc = (per_clk_from_opb ? opb : plb) / perdv0;
281 409
282 /* Figure out timebase. Either CPU or default TmrClk */ 410 /* Figure out timebase. Either CPU or default TmrClk */
283 asm volatile ( 411 ccr1 = mfspr(SPRN_CCR1);
284 "mfspr %0,%1\n" 412
285 : 413 /* If passed a 0 tmr_clk, force CPU clock */
286 "=&r"(reg) : "i"(SPRN_CCR1)); 414 if (tb == 0) {
287 if (reg & 0x0080) 415 ccr1 &= ~0x80u;
288 tb = 25000000; /* TmrClk is 25MHz */ 416 mtspr(SPRN_CCR1, ccr1);
289 else 417 }
418 if ((ccr1 & 0x0080) == 0)
290 tb = cpu; 419 tb = cpu;
291 420
292 dt_fixup_cpu_clocks(cpu, tb, 0); 421 dt_fixup_cpu_clocks(cpu, tb, 0);
293 dt_fixup_clock("/plb", plb); 422 dt_fixup_clock("/plb", plb);
294 dt_fixup_clock("/plb/opb", opb); 423 dt_fixup_clock("/plb/opb", opb);
295 dt_fixup_clock("/plb/opb/ebc", ebc); 424 dt_fixup_clock("/plb/opb/ebc", ebc);
425
426 return plb;
427}
428
429static void eplike_fixup_uart_clk(int index, const char *path,
430 unsigned int ser_clk,
431 unsigned int plb_clk)
432{
433 unsigned int sdr;
434 unsigned int clock;
435
436 switch (index) {
437 case 0:
438 sdr = SDR0_READ(DCRN_SDR0_UART0);
439 break;
440 case 1:
441 sdr = SDR0_READ(DCRN_SDR0_UART1);
442 break;
443 case 2:
444 sdr = SDR0_READ(DCRN_SDR0_UART2);
445 break;
446 case 3:
447 sdr = SDR0_READ(DCRN_SDR0_UART3);
448 break;
449 default:
450 return;
451 }
452
453 if (sdr & 0x00800000u)
454 clock = ser_clk;
455 else
456 clock = plb_clk / __fix_zero(sdr & 0xff, 256);
457
458 dt_fixup_clock(path, clock);
459}
460
461void ibm440ep_fixup_clocks(unsigned int sys_clk,
462 unsigned int ser_clk,
463 unsigned int tmr_clk)
464{
465 unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 0);
466
467 /* serial clocks beed fixup based on int/ext */
468 eplike_fixup_uart_clk(0, "/plb/opb/serial@ef600300", ser_clk, plb_clk);
469 eplike_fixup_uart_clk(1, "/plb/opb/serial@ef600400", ser_clk, plb_clk);
470 eplike_fixup_uart_clk(2, "/plb/opb/serial@ef600500", ser_clk, plb_clk);
471 eplike_fixup_uart_clk(3, "/plb/opb/serial@ef600600", ser_clk, plb_clk);
472}
473
474void ibm440gx_fixup_clocks(unsigned int sys_clk,
475 unsigned int ser_clk,
476 unsigned int tmr_clk)
477{
478 unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
479
480 /* serial clocks beed fixup based on int/ext */
481 eplike_fixup_uart_clk(0, "/plb/opb/serial@40000200", ser_clk, plb_clk);
482 eplike_fixup_uart_clk(1, "/plb/opb/serial@40000300", ser_clk, plb_clk);
483}
484
485void ibm440spe_fixup_clocks(unsigned int sys_clk,
486 unsigned int ser_clk,
487 unsigned int tmr_clk)
488{
489 unsigned int plb_clk = __ibm440eplike_fixup_clocks(sys_clk, tmr_clk, 1);
490
491 /* serial clocks beed fixup based on int/ext */
492 eplike_fixup_uart_clk(0, "/plb/opb/serial@10000200", ser_clk, plb_clk);
493 eplike_fixup_uart_clk(1, "/plb/opb/serial@10000300", ser_clk, plb_clk);
494 eplike_fixup_uart_clk(2, "/plb/opb/serial@10000600", ser_clk, plb_clk);
495}
496
497void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk)
498{
499 u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
500 u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
501 u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
502 u32 psr = mfdcr(DCRN_405_CPC0_PSR);
503 u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
504 u32 fwdv, fwdvb, fbdv, cbdv, opdv, epdv, ppdv, udiv;
505
506 fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
507 fbdv = (pllmr & 0x1e000000) >> 25;
508 if (fbdv == 0)
509 fbdv = 16;
510 cbdv = ((pllmr & 0x00060000) >> 17) + 1; /* CPU:PLB */
511 opdv = ((pllmr & 0x00018000) >> 15) + 1; /* PLB:OPB */
512 ppdv = ((pllmr & 0x00001800) >> 13) + 1; /* PLB:PCI */
513 epdv = ((pllmr & 0x00001800) >> 11) + 2; /* PLB:EBC */
514 udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
515
516 /* check for 405GPr */
517 if ((mfpvr() & 0xfffffff0) == (0x50910951 & 0xfffffff0)) {
518 fwdvb = 8 - (pllmr & 0x00000007);
519 if (!(psr & 0x00001000)) /* PCI async mode enable == 0 */
520 if (psr & 0x00000020) /* New mode enable */
521 m = fwdvb * 2 * ppdv;
522 else
523 m = fwdvb * cbdv * ppdv;
524 else if (psr & 0x00000020) /* New mode enable */
525 if (psr & 0x00000800) /* PerClk synch mode */
526 m = fwdvb * 2 * epdv;
527 else
528 m = fbdv * fwdv;
529 else if (epdv == fbdv)
530 m = fbdv * cbdv * epdv;
531 else
532 m = fbdv * fwdvb * cbdv;
533
534 cpu = sys_clk * m / fwdv;
535 plb = sys_clk * m / (fwdvb * cbdv);
536 } else {
537 m = fwdv * fbdv * cbdv;
538 cpu = sys_clk * m / fwdv;
539 plb = cpu / cbdv;
540 }
541 opb = plb / opdv;
542 ebc = plb / epdv;
543
544 if (cpc0_cr0 & 0x80)
545 /* uart0 uses the external clock */
546 uart0 = ser_clk;
547 else
548 uart0 = cpu / udiv;
549
550 if (cpc0_cr0 & 0x40)
551 /* uart1 uses the external clock */
552 uart1 = ser_clk;
553 else
554 uart1 = cpu / udiv;
555
556 /* setup the timebase clock to tick at the cpu frequency */
557 cpc0_cr1 = cpc0_cr1 & ~0x00800000;
558 mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
559 tb = cpu;
560
561 dt_fixup_cpu_clocks(cpu, tb, 0);
562 dt_fixup_clock("/plb", plb);
563 dt_fixup_clock("/plb/opb", opb);
564 dt_fixup_clock("/plb/ebc", ebc);
565 dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
566 dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
567}
568
569
570void ibm405ep_fixup_clocks(unsigned int sys_clk)
571{
572 u32 pllmr0 = mfdcr(DCRN_CPC0_PLLMR0);
573 u32 pllmr1 = mfdcr(DCRN_CPC0_PLLMR1);
574 u32 cpc0_ucr = mfdcr(DCRN_CPC0_UCR);
575 u32 cpu, plb, opb, ebc, uart0, uart1;
576 u32 fwdva, fwdvb, fbdv, cbdv, opdv, epdv;
577 u32 pllmr0_ccdv, tb, m;
578
579 fwdva = 8 - ((pllmr1 & 0x00070000) >> 16);
580 fwdvb = 8 - ((pllmr1 & 0x00007000) >> 12);
581 fbdv = (pllmr1 & 0x00f00000) >> 20;
582 if (fbdv == 0)
583 fbdv = 16;
584
585 cbdv = ((pllmr0 & 0x00030000) >> 16) + 1; /* CPU:PLB */
586 epdv = ((pllmr0 & 0x00000300) >> 8) + 2; /* PLB:EBC */
587 opdv = ((pllmr0 & 0x00003000) >> 12) + 1; /* PLB:OPB */
588
589 m = fbdv * fwdvb;
590
591 pllmr0_ccdv = ((pllmr0 & 0x00300000) >> 20) + 1;
592 if (pllmr1 & 0x80000000)
593 cpu = sys_clk * m / (fwdva * pllmr0_ccdv);
594 else
595 cpu = sys_clk / pllmr0_ccdv;
596
597 plb = cpu / cbdv;
598 opb = plb / opdv;
599 ebc = plb / epdv;
600 tb = cpu;
601 uart0 = cpu / (cpc0_ucr & 0x0000007f);
602 uart1 = cpu / ((cpc0_ucr & 0x00007f00) >> 8);
603
604 dt_fixup_cpu_clocks(cpu, tb, 0);
605 dt_fixup_clock("/plb", plb);
606 dt_fixup_clock("/plb/opb", opb);
607 dt_fixup_clock("/plb/ebc", ebc);
296 dt_fixup_clock("/plb/opb/serial@ef600300", uart0); 608 dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
297 dt_fixup_clock("/plb/opb/serial@ef600400", uart0); 609 dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
298 dt_fixup_clock("/plb/opb/serial@ef600500", uart0);
299 dt_fixup_clock("/plb/opb/serial@ef600600", uart0);
300} 610}
diff --git a/arch/powerpc/boot/4xx.h b/arch/powerpc/boot/4xx.h
index adba6a599a93..2606e64f0c4b 100644
--- a/arch/powerpc/boot/4xx.h
+++ b/arch/powerpc/boot/4xx.h
@@ -11,12 +11,22 @@
11#ifndef _POWERPC_BOOT_4XX_H_ 11#ifndef _POWERPC_BOOT_4XX_H_
12#define _POWERPC_BOOT_4XX_H_ 12#define _POWERPC_BOOT_4XX_H_
13 13
14void ibm4xx_fixup_memsize(void); 14void ibm4xx_sdram_fixup_memsize(void);
15void ibm440spe_fixup_memsize(void);
15void ibm4xx_denali_fixup_memsize(void); 16void ibm4xx_denali_fixup_memsize(void);
16void ibm44x_dbcr_reset(void); 17void ibm44x_dbcr_reset(void);
17void ibm40x_dbcr_reset(void); 18void ibm40x_dbcr_reset(void);
18void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1); 19void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
19void ibm4xx_fixup_ebc_ranges(const char *ebc); 20void ibm4xx_fixup_ebc_ranges(const char *ebc);
20void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk); 21
22void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
23void ibm405ep_fixup_clocks(unsigned int sys_clk);
24void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
25void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
26 unsigned int tmr_clk);
27void ibm440gx_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
28 unsigned int tmr_clk);
29void ibm440spe_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
30 unsigned int tmr_clk);
21 31
22#endif /* _POWERPC_BOOT_4XX_H_ */ 32#endif /* _POWERPC_BOOT_4XX_H_ */
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 4b1d98b8135e..122a27078998 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -33,12 +33,15 @@ ifeq ($(call cc-option-yn, -fstack-protector),y)
33BOOTCFLAGS += -fno-stack-protector 33BOOTCFLAGS += -fno-stack-protector
34endif 34endif
35 35
36BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) 36BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
37 37
38$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440 38$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
39$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 39$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
40$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
41$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
40$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 42$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
41 43
44
42zlib := inffast.c inflate.c inftrees.c 45zlib := inffast.c inflate.c inftrees.c
43zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h 46zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
44zliblinuxheader := zlib.h zconf.h zutil.h 47zliblinuxheader := zlib.h zconf.h zutil.h
@@ -46,17 +49,21 @@ zliblinuxheader := zlib.h zconf.h zutil.h
46$(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ 49$(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
47 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) 50 $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
48 51
49src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ 52src-libfdt := fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
53src-wlib := string.S crt0.S stdio.c main.c \
54 $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \
50 ns16550.c serial.c simple_alloc.c div64.S util.S \ 55 ns16550.c serial.c simple_alloc.c div64.S util.S \
51 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ 56 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
52 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ 57 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \
53 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ 58 cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
54 fsl-soc.c mpc8xx.c pq2.c 59 fsl-soc.c mpc8xx.c pq2.c
55src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \ 60src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
56 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ 61 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
57 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ 62 ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
58 cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \ 63 cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \
59 fixed-head.S ep88xc.c cuboot-hpc2.c 64 fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c cuboot-taishan.c \
65 cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
66 cuboot-warp.c cuboot-85xx-cpm2.c
60src-boot := $(src-wlib) $(src-plat) empty.c 67src-boot := $(src-wlib) $(src-plat) empty.c
61 68
62src-boot := $(addprefix $(obj)/, $(src-boot)) 69src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -101,24 +108,61 @@ quiet_cmd_bootar = BOOTAR $@
101 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@ 108 cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
102 109
103$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE 110$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE
111 $(Q)mkdir -p $(dir $@)
104 $(call if_changed_dep,bootcc) 112 $(call if_changed_dep,bootcc)
105$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE 113$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
114 $(Q)mkdir -p $(dir $@)
106 $(call if_changed_dep,bootas) 115 $(call if_changed_dep,bootas)
107 116
108$(obj)/wrapper.a: $(obj-wlib) FORCE 117$(obj)/wrapper.a: $(obj-wlib) FORCE
109 $(call if_changed,bootar) 118 $(call if_changed,bootar)
110 119
111hostprogs-y := addnote addRamDisk hack-coff mktree 120hostprogs-y := addnote addRamDisk hack-coff mktree dtc
112 121
113targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) 122targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
114extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 123extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
115 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds 124 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
116 125
117wrapper :=$(srctree)/$(src)/wrapper 126wrapper :=$(srctree)/$(src)/wrapper
118wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 127wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \
119 $(wrapper) FORCE 128 $(wrapper) FORCE
120 129
121############# 130#############
131# Bits for building dtc
132# DTC_GENPARSER := 1 # Uncomment to rebuild flex/bison output
133
134dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o srcpos.o checks.o
135dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
136dtc-objs := $(addprefix dtc-src/, $(dtc-objs))
137
138# prerequisites on generated files needs to be explicit
139$(obj)/dtc-src/dtc-parser.tab.o: $(obj)/dtc-src/dtc-parser.tab.c $(obj)/dtc-src/dtc-parser.tab.h
140$(obj)/dtc-src/dtc-lexer.lex.o: $(obj)/dtc-src/dtc-lexer.lex.c $(obj)/dtc-src/dtc-parser.tab.h
141
142HOSTCFLAGS += -I$(src)/dtc-src/ -I$(src)/libfdt/
143
144targets += dtc-src/dtc-parser.tab.c
145targets += dtc-src/dtc-lexer.lex.c
146
147ifdef DTC_GENPARSER
148BISON = bison
149FLEX = flex
150
151quiet_cmd_bison = BISON $@
152 cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
153quiet_cmd_flex = FLEX $@
154 cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
155
156$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
157 $(call if_changed,bison)
158
159$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
160
161$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
162 $(call if_changed,flex)
163endif
164
165#############
122# Bits for building various flavours of zImage 166# Bits for building various flavours of zImage
123 167
124ifneq ($(CROSS32_COMPILE),) 168ifneq ($(CROSS32_COMPILE),)
@@ -150,15 +194,29 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage
150ifneq ($(CONFIG_DEVICE_TREE),"") 194ifneq ($(CONFIG_DEVICE_TREE),"")
151image-$(CONFIG_PPC_8xx) += cuImage.8xx 195image-$(CONFIG_PPC_8xx) += cuImage.8xx
152image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc 196image-$(CONFIG_PPC_EP88XC) += zImage.ep88xc
197image-$(CONFIG_EP405) += zImage.ep405
153image-$(CONFIG_8260) += cuImage.pq2 198image-$(CONFIG_8260) += cuImage.pq2
199image-$(CONFIG_EP8248E) += zImage.ep8248e
154image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx 200image-$(CONFIG_PPC_MPC52xx) += cuImage.52xx
201image-$(CONFIG_STORCENTER) += cuImage.824x
155image-$(CONFIG_PPC_83xx) += cuImage.83xx 202image-$(CONFIG_PPC_83xx) += cuImage.83xx
156image-$(CONFIG_PPC_85xx) += cuImage.85xx 203image-$(CONFIG_PPC_85xx) += cuImage.85xx
204ifeq ($(CONFIG_CPM2),y)
205image-$(CONFIG_PPC_85xx) += cuImage.85xx-cpm2
206endif
157image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2 207image-$(CONFIG_MPC7448HPC2) += cuImage.hpc2
158image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony 208image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
159image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo 209image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo
160image-$(CONFIG_SEQUOIA) += cuImage.sequoia 210image-$(CONFIG_SEQUOIA) += cuImage.sequoia
211image-$(CONFIG_RAINIER) += cuImage.rainier
161image-$(CONFIG_WALNUT) += treeImage.walnut 212image-$(CONFIG_WALNUT) += treeImage.walnut
213image-$(CONFIG_TAISHAN) += cuImage.taishan
214image-$(CONFIG_KATMAI) += cuImage.katmai
215image-$(CONFIG_WARP) += cuImage.warp
216endif
217
218ifneq ($(CONFIG_REDBOOT),"")
219image-$(CONFIG_PPC_8xx) += zImage.redboot-8xx
162endif 220endif
163 221
164# For 32-bit powermacs, build the COFF and miboot images 222# For 32-bit powermacs, build the COFF and miboot images
@@ -243,3 +301,51 @@ clean-kernel := vmlinux.strip vmlinux.bin
243clean-kernel += $(addsuffix .gz,$(clean-kernel)) 301clean-kernel += $(addsuffix .gz,$(clean-kernel))
244# If not absolute clean-files are relative to $(obj). 302# If not absolute clean-files are relative to $(obj).
245clean-files += $(addprefix $(objtree)/, $(clean-kernel)) 303clean-files += $(addprefix $(objtree)/, $(clean-kernel))
304
305WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
306WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
307WRAPPER_BINDIR := /usr/sbin
308INSTALL := install
309
310extra-installed := $(patsubst $(obj)/%, $(DESTDIR)$(WRAPPER_OBJDIR)/%, $(extra-y))
311hostprogs-installed := $(patsubst %, $(DESTDIR)$(WRAPPER_BINDIR)/%, $(hostprogs-y))
312wrapper-installed := $(DESTDIR)$(WRAPPER_BINDIR)/wrapper
313dts-installed := $(patsubst $(obj)/dts/%, $(DESTDIR)$(WRAPPER_DTSDIR)/%, $(wildcard $(obj)/dts/*.dts))
314
315all-installed := $(extra-installed) $(hostprogs-installed) $(wrapper-installed) $(dts-installed)
316
317quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
318 cmd_mkdir = mkdir -p $@
319
320quiet_cmd_install = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,%,$@)
321 cmd_install = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_OBJDIR)/%,$(obj)/%,$@) $@
322
323quiet_cmd_install_dts = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,dts/%,$@)
324 cmd_install_dts = $(INSTALL) -m0644 $(patsubst $(DESTDIR)$(WRAPPER_DTSDIR)/%,$(srctree)/$(obj)/dts/%,$@) $@
325
326quiet_cmd_install_exe = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
327 cmd_install_exe = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(obj)/%,$@) $@
328
329quiet_cmd_install_wrapper = INSTALL $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,%,$@)
330 cmd_install_wrapper = $(INSTALL) -m0755 $(patsubst $(DESTDIR)$(WRAPPER_BINDIR)/%,$(srctree)/$(obj)/%,$@) $@ ;\
331 sed -i $@ -e 's%^object=.*%object=$(WRAPPER_OBJDIR)%' \
332 -e 's%^objbin=.*%objbin=$(WRAPPER_BINDIR)%' \
333
334
335$(DESTDIR)$(WRAPPER_OBJDIR) $(DESTDIR)$(WRAPPER_DTSDIR) $(DESTDIR)$(WRAPPER_BINDIR):
336 $(call cmd,mkdir)
337
338$(extra-installed) : $(DESTDIR)$(WRAPPER_OBJDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_OBJDIR)
339 $(call cmd,install)
340
341$(hostprogs-installed) : $(DESTDIR)$(WRAPPER_BINDIR)/% : $(obj)/% | $(DESTDIR)$(WRAPPER_BINDIR)
342 $(call cmd,install_exe)
343
344$(dts-installed) : $(DESTDIR)$(WRAPPER_DTSDIR)/% : $(srctree)/$(obj)/dts/% | $(DESTDIR)$(WRAPPER_DTSDIR)
345 $(call cmd,install_dts)
346
347$(wrapper-installed): $(DESTDIR)$(WRAPPER_BINDIR) $(srctree)/$(obj)/wrapper | $(DESTDIR)$(WRAPPER_BINDIR)
348 $(call cmd,install_wrapper)
349
350$(obj)/bootwrapper_install: $(all-installed)
351
diff --git a/arch/powerpc/boot/bamboo.c b/arch/powerpc/boot/bamboo.c
index f61fcdab1c7c..54b33f1500e2 100644
--- a/arch/powerpc/boot/bamboo.c
+++ b/arch/powerpc/boot/bamboo.c
@@ -30,8 +30,8 @@ static void bamboo_fixups(void)
30{ 30{
31 unsigned long sysclk = 33333333; 31 unsigned long sysclk = 33333333;
32 32
33 ibm440ep_fixup_clocks(sysclk, 11059200); 33 ibm440ep_fixup_clocks(sysclk, 11059200, 25000000);
34 ibm4xx_fixup_memsize(); 34 ibm4xx_sdram_fixup_memsize();
35 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00); 35 ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
36 dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1); 36 dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
37} 37}
@@ -42,6 +42,6 @@ void bamboo_init(void *mac0, void *mac1)
42 platform_ops.exit = ibm44x_dbcr_reset; 42 platform_ops.exit = ibm44x_dbcr_reset;
43 bamboo_mac0 = mac0; 43 bamboo_mac0 = mac0;
44 bamboo_mac1 = mac1; 44 bamboo_mac1 = mac1;
45 ft_init(_dtb_start, 0, 32); 45 fdt_init(_dtb_start);
46 serial_console_init(); 46 serial_console_init();
47} 47}
diff --git a/arch/powerpc/boot/cuboot-52xx.c b/arch/powerpc/boot/cuboot-52xx.c
index 9256a26d40e4..a8611546a656 100644
--- a/arch/powerpc/boot/cuboot-52xx.c
+++ b/arch/powerpc/boot/cuboot-52xx.c
@@ -53,7 +53,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7) 53 unsigned long r6, unsigned long r7)
54{ 54{
55 CUBOOT_INIT(); 55 CUBOOT_INIT();
56 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 56 fdt_init(_dtb_start);
57 serial_console_init(); 57 serial_console_init();
58 platform_ops.fixups = platform_fixups; 58 platform_ops.fixups = platform_fixups;
59} 59}
diff --git a/arch/powerpc/boot/cuboot-824x.c b/arch/powerpc/boot/cuboot-824x.c
new file mode 100644
index 000000000000..ced90c53de48
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-824x.c
@@ -0,0 +1,53 @@
1/*
2 * Old U-boot compatibility for 824x
3 *
4 * Copyright (c) 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 version 2 as published
8 * by the Free Software Foundation.
9 */
10
11#include "ops.h"
12#include "stdio.h"
13#include "cuboot.h"
14
15#define TARGET_824x
16#include "ppcboot.h"
17
18static bd_t bd;
19
20
21static void platform_fixups(void)
22{
23 void *soc;
24
25 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
26 dt_fixup_mac_addresses(bd.bi_enetaddr);
27 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
28
29 soc = find_node_by_devtype(NULL, "soc");
30 if (soc) {
31 void *serial = NULL;
32
33 setprop(soc, "bus-frequency", &bd.bi_busfreq,
34 sizeof(bd.bi_busfreq));
35
36 while ((serial = find_node_by_devtype(serial, "serial"))) {
37 if (get_parent(serial) != soc)
38 continue;
39
40 setprop(serial, "clock-frequency", &bd.bi_busfreq,
41 sizeof(bd.bi_busfreq));
42 }
43 }
44}
45
46void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
47 unsigned long r6, unsigned long r7)
48{
49 CUBOOT_INIT();
50 fdt_init(_dtb_start);
51 serial_console_init();
52 platform_ops.fixups = platform_fixups;
53}
diff --git a/arch/powerpc/boot/cuboot-83xx.c b/arch/powerpc/boot/cuboot-83xx.c
index a0505509abcc..61af1c1e8255 100644
--- a/arch/powerpc/boot/cuboot-83xx.c
+++ b/arch/powerpc/boot/cuboot-83xx.c
@@ -24,7 +24,8 @@ static void platform_fixups(void)
24 void *soc; 24 void *soc;
25 25
26 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); 26 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
27 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr); 27 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
28 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
28 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq); 29 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
29 30
30 /* Unfortunately, the specific model number is encoded in the 31 /* Unfortunately, the specific model number is encoded in the
@@ -52,7 +53,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
52 unsigned long r6, unsigned long r7) 53 unsigned long r6, unsigned long r7)
53{ 54{
54 CUBOOT_INIT(); 55 CUBOOT_INIT();
55 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 56 fdt_init(_dtb_start);
56 serial_console_init(); 57 serial_console_init();
57 platform_ops.fixups = platform_fixups; 58 platform_ops.fixups = platform_fixups;
58} 59}
diff --git a/arch/powerpc/boot/cuboot-85xx-cpm2.c b/arch/powerpc/boot/cuboot-85xx-cpm2.c
new file mode 100644
index 000000000000..723872ddd447
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-85xx-cpm2.c
@@ -0,0 +1,66 @@
1/*
2 * Old U-boot compatibility for 85xx
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 *
6 * Copyright (c) 2007 Freescale Semiconductor, Inc.
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 version 2 as published
10 * by the Free Software Foundation.
11 */
12
13#include "ops.h"
14#include "stdio.h"
15#include "cuboot.h"
16
17#define TARGET_85xx
18#define TARGET_CPM2
19#include "ppcboot.h"
20
21static bd_t bd;
22
23static void platform_fixups(void)
24{
25 void *devp;
26
27 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
28 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
29 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
30 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
31 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
32
33 /* Unfortunately, the specific model number is encoded in the
34 * soc node name in existing dts files -- once that is fixed,
35 * this can do a simple path lookup.
36 */
37 devp = find_node_by_devtype(NULL, "soc");
38 if (devp) {
39 void *serial = NULL;
40
41 setprop(devp, "bus-frequency", &bd.bi_busfreq,
42 sizeof(bd.bi_busfreq));
43
44 while ((serial = find_node_by_devtype(serial, "serial"))) {
45 if (get_parent(serial) != devp)
46 continue;
47
48 setprop(serial, "clock-frequency", &bd.bi_busfreq,
49 sizeof(bd.bi_busfreq));
50 }
51 }
52
53 devp = find_node_by_compatible(NULL, "fsl,cpm2-brg");
54 if (devp)
55 setprop(devp, "clock-frequency", &bd.bi_brgfreq,
56 sizeof(bd.bi_brgfreq));
57}
58
59void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
60 unsigned long r6, unsigned long r7)
61{
62 CUBOOT_INIT();
63 fdt_init(_dtb_start);
64 serial_console_init();
65 platform_ops.fixups = platform_fixups;
66}
diff --git a/arch/powerpc/boot/cuboot-85xx.c b/arch/powerpc/boot/cuboot-85xx.c
index 345dcbecef0f..6776a1a29f13 100644
--- a/arch/powerpc/boot/cuboot-85xx.c
+++ b/arch/powerpc/boot/cuboot-85xx.c
@@ -24,8 +24,9 @@ static void platform_fixups(void)
24 void *soc; 24 void *soc;
25 25
26 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize); 26 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
27 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr, 27 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
28 bd.bi_enet2addr); 28 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
29 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
29 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq); 30 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
30 31
31 /* Unfortunately, the specific model number is encoded in the 32 /* Unfortunately, the specific model number is encoded in the
@@ -53,7 +54,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7) 54 unsigned long r6, unsigned long r7)
54{ 55{
55 CUBOOT_INIT(); 56 CUBOOT_INIT();
56 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 57 fdt_init(_dtb_start);
57 serial_console_init(); 58 serial_console_init();
58 platform_ops.fixups = platform_fixups; 59 platform_ops.fixups = platform_fixups;
59} 60}
diff --git a/arch/powerpc/boot/cuboot-8xx.c b/arch/powerpc/boot/cuboot-8xx.c
index 0e82015a5f95..c202c8868bd6 100644
--- a/arch/powerpc/boot/cuboot-8xx.c
+++ b/arch/powerpc/boot/cuboot-8xx.c
@@ -41,7 +41,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
41 unsigned long r6, unsigned long r7) 41 unsigned long r6, unsigned long r7)
42{ 42{
43 CUBOOT_INIT(); 43 CUBOOT_INIT();
44 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 44 fdt_init(_dtb_start);
45 serial_console_init(); 45 serial_console_init();
46 platform_ops.fixups = platform_fixups; 46 platform_ops.fixups = platform_fixups;
47} 47}
diff --git a/arch/powerpc/boot/cuboot-hpc2.c b/arch/powerpc/boot/cuboot-hpc2.c
index d333898bca30..1b8953259d75 100644
--- a/arch/powerpc/boot/cuboot-hpc2.c
+++ b/arch/powerpc/boot/cuboot-hpc2.c
@@ -42,7 +42,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
42 unsigned long r6, unsigned long r7) 42 unsigned long r6, unsigned long r7)
43{ 43{
44 CUBOOT_INIT(); 44 CUBOOT_INIT();
45 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 45 fdt_init(_dtb_start);
46 serial_console_init(); 46 serial_console_init();
47 platform_ops.fixups = platform_fixups; 47 platform_ops.fixups = platform_fixups;
48} 48}
diff --git a/arch/powerpc/boot/cuboot-katmai.c b/arch/powerpc/boot/cuboot-katmai.c
new file mode 100644
index 000000000000..c021167f9381
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-katmai.c
@@ -0,0 +1,56 @@
1/*
2 * Old U-boot compatibility for Katmai
3 *
4 * Author: Hugh Blemings <hugh@au.ibm.com>
5 *
6 * Copyright 2007 Hugh Blemings, IBM Corporation.
7 * Based on cuboot-ebony.c which is:
8 * Copyright 2007 David Gibson, IBM Corporation.
9 * Based on cuboot-83xx.c, which is:
10 * Copyright (c) 2007 Freescale Semiconductor, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License version 2 as published
14 * by the Free Software Foundation.
15 */
16
17#include "ops.h"
18#include "stdio.h"
19#include "reg.h"
20#include "dcr.h"
21#include "4xx.h"
22#include "44x.h"
23#include "cuboot.h"
24
25#define TARGET_44x
26#include "ppcboot.h"
27
28static bd_t bd;
29
30BSS_STACK(4096);
31
32static void katmai_fixups(void)
33{
34 unsigned long sysclk = 33333000;
35
36 /* 440SP Clock logic is all but identical to 440GX
37 * so we just use that code for now at least
38 */
39 ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
40
41 ibm440spe_fixup_memsize();
42
43 dt_fixup_mac_address(0, bd.bi_enetaddr);
44
45 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
46}
47
48void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
49 unsigned long r6, unsigned long r7)
50{
51 CUBOOT_INIT();
52
53 platform_ops.fixups = katmai_fixups;
54 fdt_init(_dtb_start);
55 serial_console_init();
56}
diff --git a/arch/powerpc/boot/cuboot-pq2.c b/arch/powerpc/boot/cuboot-pq2.c
index 61574f3272dd..f56ac6cae9f3 100644
--- a/arch/powerpc/boot/cuboot-pq2.c
+++ b/arch/powerpc/boot/cuboot-pq2.c
@@ -255,7 +255,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
255 unsigned long r6, unsigned long r7) 255 unsigned long r6, unsigned long r7)
256{ 256{
257 CUBOOT_INIT(); 257 CUBOOT_INIT();
258 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 258 fdt_init(_dtb_start);
259 serial_console_init(); 259 serial_console_init();
260 platform_ops.fixups = pq2_platform_fixups; 260 platform_ops.fixups = pq2_platform_fixups;
261} 261}
diff --git a/arch/powerpc/boot/cuboot-rainier.c b/arch/powerpc/boot/cuboot-rainier.c
new file mode 100644
index 000000000000..cf452b66dce8
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-rainier.c
@@ -0,0 +1,56 @@
1/*
2 * Old U-boot compatibility for Rainier
3 *
4 * Valentine Barshak <vbarshak@ru.mvista.com>
5 * Copyright 2007 MontaVista Software, Inc
6 *
7 * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
8 * Copyright IBM Corporation, 2007
9 *
10 * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
11 * Copyright IBM Corporation, 2007
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; version 2 of the License
16 */
17
18#include <stdarg.h>
19#include <stddef.h>
20#include "types.h"
21#include "elf.h"
22#include "string.h"
23#include "stdio.h"
24#include "page.h"
25#include "ops.h"
26#include "dcr.h"
27#include "4xx.h"
28#include "44x.h"
29#include "cuboot.h"
30
31#define TARGET_4xx
32#define TARGET_44x
33#include "ppcboot.h"
34
35static bd_t bd;
36
37
38static void rainier_fixups(void)
39{
40 unsigned long sysclk = 33333333;
41
42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
44 ibm4xx_denali_fixup_memsize();
45 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
46}
47
48void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
49 unsigned long r6, unsigned long r7)
50{
51 CUBOOT_INIT();
52 platform_ops.fixups = rainier_fixups;
53 platform_ops.exit = ibm44x_dbcr_reset;
54 fdt_init(_dtb_start);
55 serial_console_init();
56}
diff --git a/arch/powerpc/boot/cuboot-sequoia.c b/arch/powerpc/boot/cuboot-sequoia.c
index ec635e0bd4ec..f555575a44de 100644
--- a/arch/powerpc/boot/cuboot-sequoia.c
+++ b/arch/powerpc/boot/cuboot-sequoia.c
@@ -39,7 +39,7 @@ static void sequoia_fixups(void)
39{ 39{
40 unsigned long sysclk = 33333333; 40 unsigned long sysclk = 33333333;
41 41
42 ibm440ep_fixup_clocks(sysclk, 11059200); 42 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
44 ibm4xx_denali_fixup_memsize(); 44 ibm4xx_denali_fixup_memsize();
45 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr); 45 dt_fixup_mac_addresses(&bd.bi_enetaddr, &bd.bi_enet1addr);
@@ -51,6 +51,6 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
51 CUBOOT_INIT(); 51 CUBOOT_INIT();
52 platform_ops.fixups = sequoia_fixups; 52 platform_ops.fixups = sequoia_fixups;
53 platform_ops.exit = ibm44x_dbcr_reset; 53 platform_ops.exit = ibm44x_dbcr_reset;
54 ft_init(_dtb_start, 0, 32); 54 fdt_init(_dtb_start);
55 serial_console_init(); 55 serial_console_init();
56} 56}
diff --git a/arch/powerpc/boot/cuboot-taishan.c b/arch/powerpc/boot/cuboot-taishan.c
new file mode 100644
index 000000000000..f66455a45ab1
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-taishan.c
@@ -0,0 +1,54 @@
1/*
2 * Old U-boot compatibility for Taishan
3 *
4 * Author: Hugh Blemings <hugh@au.ibm.com>
5 *
6 * Copyright 2007 Hugh Blemings, IBM Corporation.
7 * Based on cuboot-ebony.c which is:
8 * Copyright 2007 David Gibson, IBM Corporation.
9 * Based on cuboot-83xx.c, which is:
10 * Copyright (c) 2007 Freescale Semiconductor, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License version 2 as published
14 * by the Free Software Foundation.
15 */
16
17#include "ops.h"
18#include "stdio.h"
19#include "cuboot.h"
20#include "reg.h"
21#include "dcr.h"
22#include "4xx.h"
23
24#define TARGET_44x
25#include "ppcboot.h"
26
27static bd_t bd;
28
29BSS_STACK(4096);
30
31static void taishan_fixups(void)
32{
33 /* FIXME: sysclk should be derived by reading the FPGA
34 registers */
35 unsigned long sysclk = 33000000;
36
37 ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
38
39 ibm4xx_sdram_fixup_memsize();
40
41 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
42
43 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
44}
45
46void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
47 unsigned long r6, unsigned long r7)
48{
49 CUBOOT_INIT();
50
51 platform_ops.fixups = taishan_fixups;
52 fdt_init(_dtb_start);
53 serial_console_init();
54}
diff --git a/arch/powerpc/boot/cuboot-warp.c b/arch/powerpc/boot/cuboot-warp.c
new file mode 100644
index 000000000000..bdedebe1bc14
--- /dev/null
+++ b/arch/powerpc/boot/cuboot-warp.c
@@ -0,0 +1,39 @@
1/*
2 * Copyright (c) 2008 PIKA Technologies
3 * Sean MacLennan <smaclennan@pikatech.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published
7 * by the Free Software Foundation.
8 */
9
10#include "ops.h"
11#include "4xx.h"
12#include "cuboot.h"
13
14#define TARGET_44x
15#include "ppcboot.h"
16
17static bd_t bd;
18
19static void warp_fixups(void)
20{
21 unsigned long sysclk = 66000000;
22
23 ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
24 ibm4xx_sdram_fixup_memsize();
25 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
26 dt_fixup_mac_addresses(&bd.bi_enetaddr);
27}
28
29
30void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
31 unsigned long r6, unsigned long r7)
32{
33 CUBOOT_INIT();
34
35 platform_ops.fixups = warp_fixups;
36 platform_ops.exit = ibm44x_dbcr_reset;
37 fdt_init(_dtb_start);
38 serial_console_init();
39}
diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h
index 83b88aa92888..95b9f5344016 100644
--- a/arch/powerpc/boot/dcr.h
+++ b/arch/powerpc/boot/dcr.h
@@ -14,12 +14,20 @@
14#define DCRN_SDRAM0_CFGADDR 0x010 14#define DCRN_SDRAM0_CFGADDR 0x010
15#define DCRN_SDRAM0_CFGDATA 0x011 15#define DCRN_SDRAM0_CFGDATA 0x011
16 16
17#define SDRAM0_READ(offset) ({\
18 mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
19 mfdcr(DCRN_SDRAM0_CFGDATA); })
20#define SDRAM0_WRITE(offset, data) ({\
21 mtdcr(DCRN_SDRAM0_CFGADDR, offset); \
22 mtdcr(DCRN_SDRAM0_CFGDATA, data); })
23
17#define SDRAM0_B0CR 0x40 24#define SDRAM0_B0CR 0x40
18#define SDRAM0_B1CR 0x44 25#define SDRAM0_B1CR 0x44
19#define SDRAM0_B2CR 0x48 26#define SDRAM0_B2CR 0x48
20#define SDRAM0_B3CR 0x4c 27#define SDRAM0_B3CR 0x4c
21 28
22static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2CR, SDRAM0_B3CR }; 29static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR,
30 SDRAM0_B2CR, SDRAM0_B3CR };
23 31
24#define SDRAM_CONFIG_BANK_ENABLE 0x00000001 32#define SDRAM_CONFIG_BANK_ENABLE 0x00000001
25#define SDRAM_CONFIG_SIZE_MASK 0x000e0000 33#define SDRAM_CONFIG_SIZE_MASK 0x000e0000
@@ -138,5 +146,54 @@ static const unsigned long sdram_bxcr[] = { SDRAM0_B0CR, SDRAM0_B1CR, SDRAM0_B2C
138#define DCRN_CPC0_PLLMR 0xb0 146#define DCRN_CPC0_PLLMR 0xb0
139#define DCRN_405_CPC0_CR0 0xb1 147#define DCRN_405_CPC0_CR0 0xb1
140#define DCRN_405_CPC0_CR1 0xb2 148#define DCRN_405_CPC0_CR1 0xb2
149#define DCRN_405_CPC0_PSR 0xb4
150
151/* 405EP Clocking/Power Management/Chip Control regs */
152#define DCRN_CPC0_PLLMR0 0xf0
153#define DCRN_CPC0_PLLMR1 0xf4
154#define DCRN_CPC0_UCR 0xf5
155
156/* 440GX Clock control etc */
157
158
159#define DCRN_CPR0_CLKUPD 0x020
160#define DCRN_CPR0_PLLC 0x040
161#define DCRN_CPR0_PLLD 0x060
162#define DCRN_CPR0_PRIMAD 0x080
163#define DCRN_CPR0_PRIMBD 0x0a0
164#define DCRN_CPR0_OPBD 0x0c0
165#define DCRN_CPR0_PERD 0x0e0
166#define DCRN_CPR0_MALD 0x100
167
168#define DCRN_SDR0_CONFIG_ADDR 0xe
169#define DCRN_SDR0_CONFIG_DATA 0xf
170
171/* SDR read/write helper macros */
172#define SDR0_READ(offset) ({\
173 mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
174 mfdcr(DCRN_SDR0_CONFIG_DATA); })
175#define SDR0_WRITE(offset, data) ({\
176 mtdcr(DCRN_SDR0_CONFIG_ADDR, offset); \
177 mtdcr(DCRN_SDR0_CONFIG_DATA, data); })
178
179#define DCRN_SDR0_UART0 0x0120
180#define DCRN_SDR0_UART1 0x0121
181#define DCRN_SDR0_UART2 0x0122
182#define DCRN_SDR0_UART3 0x0123
183
184
185/* CPRs read/write helper macros - based off include/asm-ppc/ibm44x.h */
186
187#define DCRN_CPR0_CFGADDR 0xc
188#define DCRN_CPR0_CFGDATA 0xd
189
190#define CPR0_READ(offset) ({\
191 mtdcr(DCRN_CPR0_CFGADDR, offset); \
192 mfdcr(DCRN_CPR0_CFGDATA); })
193#define CPR0_WRITE(offset, data) ({\
194 mtdcr(DCRN_CPR0_CFGADDR, offset); \
195 mtdcr(DCRN_CPR0_CFGDATA, data); })
196
197
141 198
142#endif /* _PPC_BOOT_DCR_H_ */ 199#endif /* _PPC_BOOT_DCR_H_ */
diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
index e5dfe4497313..60f561e307a9 100644
--- a/arch/powerpc/boot/devtree.c
+++ b/arch/powerpc/boot/devtree.c
@@ -88,6 +88,20 @@ void dt_fixup_clock(const char *path, u32 freq)
88 } 88 }
89} 89}
90 90
91void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr)
92{
93 void *devp = find_node_by_alias(alias);
94
95 if (devp) {
96 printf("%s: local-mac-address <-"
97 " %02x:%02x:%02x:%02x:%02x:%02x\n\r", alias,
98 addr[0], addr[1], addr[2],
99 addr[3], addr[4], addr[5]);
100
101 setprop(devp, "local-mac-address", addr, 6);
102 }
103}
104
91void dt_fixup_mac_address(u32 index, const u8 *addr) 105void dt_fixup_mac_address(u32 index, const u8 *addr)
92{ 106{
93 void *devp = find_node_by_prop_value(NULL, "linux,network-index", 107 void *devp = find_node_by_prop_value(NULL, "linux,network-index",
diff --git a/arch/powerpc/boot/dtc-src/.gitignore b/arch/powerpc/boot/dtc-src/.gitignore
new file mode 100644
index 000000000000..a7c3f94e5e75
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/.gitignore
@@ -0,0 +1,3 @@
1dtc-lexer.lex.c
2dtc-parser.tab.c
3dtc-parser.tab.h
diff --git a/arch/powerpc/boot/dtc-src/Makefile.dtc b/arch/powerpc/boot/dtc-src/Makefile.dtc
new file mode 100644
index 000000000000..d607fdb8df8d
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/Makefile.dtc
@@ -0,0 +1,25 @@
1# Makefile.dtc
2#
3# This is not a complete Makefile of itself. Instead, it is designed to
4# be easily embeddable into other systems of Makefiles.
5#
6DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
7 checks.c
8DTC_EXTRA = dtc.h srcpos.h
9DTC_LEXFILES = dtc-lexer.l
10DTC_BISONFILES = dtc-parser.y
11
12DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
13DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
14DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)
15
16DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
17DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
18DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)
19
20DTC_CLEANFILES = $(DTC_GEN_ALL)
21
22# We assume the containing Makefile system can do auto-dependencies for most
23# things, but we supply the dependencies on generated header files explicitly
24
25$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))
diff --git a/arch/powerpc/boot/dtc-src/checks.c b/arch/powerpc/boot/dtc-src/checks.c
new file mode 100644
index 000000000000..2ce961cd414d
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/checks.c
@@ -0,0 +1,750 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2007.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22
23#ifdef TRACE_CHECKS
24#define TRACE(c, ...) \
25 do { \
26 fprintf(stderr, "=== %s: ", (c)->name); \
27 fprintf(stderr, __VA_ARGS__); \
28 fprintf(stderr, "\n"); \
29 } while (0)
30#else
31#define TRACE(c, fmt, ...) do { } while (0)
32#endif
33
34enum checklevel {
35 IGNORE = 0,
36 WARN = 1,
37 ERROR = 2,
38};
39
40enum checkstatus {
41 UNCHECKED = 0,
42 PREREQ,
43 PASSED,
44 FAILED,
45};
46
47struct check;
48
49typedef void (*tree_check_fn)(struct check *c, struct node *dt);
50typedef void (*node_check_fn)(struct check *c, struct node *dt, struct node *node);
51typedef void (*prop_check_fn)(struct check *c, struct node *dt,
52 struct node *node, struct property *prop);
53
54struct check {
55 const char *name;
56 tree_check_fn tree_fn;
57 node_check_fn node_fn;
58 prop_check_fn prop_fn;
59 void *data;
60 enum checklevel level;
61 enum checkstatus status;
62 int inprogress;
63 int num_prereqs;
64 struct check **prereq;
65};
66
67#define CHECK(nm, tfn, nfn, pfn, d, lvl, ...) \
68 static struct check *nm##_prereqs[] = { __VA_ARGS__ }; \
69 static struct check nm = { \
70 .name = #nm, \
71 .tree_fn = (tfn), \
72 .node_fn = (nfn), \
73 .prop_fn = (pfn), \
74 .data = (d), \
75 .level = (lvl), \
76 .status = UNCHECKED, \
77 .num_prereqs = ARRAY_SIZE(nm##_prereqs), \
78 .prereq = nm##_prereqs, \
79 };
80
81#define TREE_CHECK(nm, d, lvl, ...) \
82 CHECK(nm, check_##nm, NULL, NULL, d, lvl, __VA_ARGS__)
83#define NODE_CHECK(nm, d, lvl, ...) \
84 CHECK(nm, NULL, check_##nm, NULL, d, lvl, __VA_ARGS__)
85#define PROP_CHECK(nm, d, lvl, ...) \
86 CHECK(nm, NULL, NULL, check_##nm, d, lvl, __VA_ARGS__)
87#define BATCH_CHECK(nm, lvl, ...) \
88 CHECK(nm, NULL, NULL, NULL, NULL, lvl, __VA_ARGS__)
89
90#ifdef __GNUC__
91static inline void check_msg(struct check *c, const char *fmt, ...) __attribute__((format (printf, 2, 3)));
92#endif
93static inline void check_msg(struct check *c, const char *fmt, ...)
94{
95 va_list ap;
96 va_start(ap, fmt);
97
98 if ((c->level < WARN) || (c->level <= quiet))
99 return; /* Suppress message */
100
101 fprintf(stderr, "%s (%s): ",
102 (c->level == ERROR) ? "ERROR" : "Warning", c->name);
103 vfprintf(stderr, fmt, ap);
104 fprintf(stderr, "\n");
105}
106
107#define FAIL(c, ...) \
108 do { \
109 TRACE((c), "\t\tFAILED at %s:%d", __FILE__, __LINE__); \
110 (c)->status = FAILED; \
111 check_msg((c), __VA_ARGS__); \
112 } while (0)
113
114static void check_nodes_props(struct check *c, struct node *dt, struct node *node)
115{
116 struct node *child;
117 struct property *prop;
118
119 TRACE(c, "%s", node->fullpath);
120 if (c->node_fn)
121 c->node_fn(c, dt, node);
122
123 if (c->prop_fn)
124 for_each_property(node, prop) {
125 TRACE(c, "%s\t'%s'", node->fullpath, prop->name);
126 c->prop_fn(c, dt, node, prop);
127 }
128
129 for_each_child(node, child)
130 check_nodes_props(c, dt, child);
131}
132
133static int run_check(struct check *c, struct node *dt)
134{
135 int error = 0;
136 int i;
137
138 assert(!c->inprogress);
139
140 if (c->status != UNCHECKED)
141 goto out;
142
143 c->inprogress = 1;
144
145 for (i = 0; i < c->num_prereqs; i++) {
146 struct check *prq = c->prereq[i];
147 error |= run_check(prq, dt);
148 if (prq->status != PASSED) {
149 c->status = PREREQ;
150 check_msg(c, "Failed prerequisite '%s'",
151 c->prereq[i]->name);
152 }
153 }
154
155 if (c->status != UNCHECKED)
156 goto out;
157
158 if (c->node_fn || c->prop_fn)
159 check_nodes_props(c, dt, dt);
160
161 if (c->tree_fn)
162 c->tree_fn(c, dt);
163 if (c->status == UNCHECKED)
164 c->status = PASSED;
165
166 TRACE(c, "\tCompleted, status %d", c->status);
167
168out:
169 c->inprogress = 0;
170 if ((c->status != PASSED) && (c->level == ERROR))
171 error = 1;
172 return error;
173}
174
175/*
176 * Utility check functions
177 */
178
179static void check_is_string(struct check *c, struct node *root,
180 struct node *node)
181{
182 struct property *prop;
183 char *propname = c->data;
184
185 prop = get_property(node, propname);
186 if (!prop)
187 return; /* Not present, assumed ok */
188
189 if (!data_is_one_string(prop->val))
190 FAIL(c, "\"%s\" property in %s is not a string",
191 propname, node->fullpath);
192}
193#define CHECK_IS_STRING(nm, propname, lvl) \
194 CHECK(nm, NULL, check_is_string, NULL, (propname), (lvl))
195
196static void check_is_cell(struct check *c, struct node *root,
197 struct node *node)
198{
199 struct property *prop;
200 char *propname = c->data;
201
202 prop = get_property(node, propname);
203 if (!prop)
204 return; /* Not present, assumed ok */
205
206 if (prop->val.len != sizeof(cell_t))
207 FAIL(c, "\"%s\" property in %s is not a single cell",
208 propname, node->fullpath);
209}
210#define CHECK_IS_CELL(nm, propname, lvl) \
211 CHECK(nm, NULL, check_is_cell, NULL, (propname), (lvl))
212
213/*
214 * Structural check functions
215 */
216
217static void check_duplicate_node_names(struct check *c, struct node *dt,
218 struct node *node)
219{
220 struct node *child, *child2;
221
222 for_each_child(node, child)
223 for (child2 = child->next_sibling;
224 child2;
225 child2 = child2->next_sibling)
226 if (streq(child->name, child2->name))
227 FAIL(c, "Duplicate node name %s",
228 child->fullpath);
229}
230NODE_CHECK(duplicate_node_names, NULL, ERROR);
231
232static void check_duplicate_property_names(struct check *c, struct node *dt,
233 struct node *node)
234{
235 struct property *prop, *prop2;
236
237 for_each_property(node, prop)
238 for (prop2 = prop->next; prop2; prop2 = prop2->next)
239 if (streq(prop->name, prop2->name))
240 FAIL(c, "Duplicate property name %s in %s",
241 prop->name, node->fullpath);
242}
243NODE_CHECK(duplicate_property_names, NULL, ERROR);
244
245static void check_explicit_phandles(struct check *c, struct node *root,
246 struct node *node)
247{
248 struct property *prop;
249 struct node *other;
250 cell_t phandle;
251
252 prop = get_property(node, "linux,phandle");
253 if (! prop)
254 return; /* No phandle, that's fine */
255
256 if (prop->val.len != sizeof(cell_t)) {
257 FAIL(c, "%s has bad length (%d) linux,phandle property",
258 node->fullpath, prop->val.len);
259 return;
260 }
261
262 phandle = propval_cell(prop);
263 if ((phandle == 0) || (phandle == -1)) {
264 FAIL(c, "%s has invalid linux,phandle value 0x%x",
265 node->fullpath, phandle);
266 return;
267 }
268
269 other = get_node_by_phandle(root, phandle);
270 if (other) {
271 FAIL(c, "%s has duplicated phandle 0x%x (seen before at %s)",
272 node->fullpath, phandle, other->fullpath);
273 return;
274 }
275
276 node->phandle = phandle;
277}
278NODE_CHECK(explicit_phandles, NULL, ERROR);
279
280static void check_name_properties(struct check *c, struct node *root,
281 struct node *node)
282{
283 struct property *prop;
284
285 prop = get_property(node, "name");
286 if (!prop)
287 return; /* No name property, that's fine */
288
289 if ((prop->val.len != node->basenamelen+1)
290 || (memcmp(prop->val.val, node->name, node->basenamelen) != 0))
291 FAIL(c, "\"name\" property in %s is incorrect (\"%s\" instead"
292 " of base node name)", node->fullpath, prop->val.val);
293}
294CHECK_IS_STRING(name_is_string, "name", ERROR);
295NODE_CHECK(name_properties, NULL, ERROR, &name_is_string);
296
297/*
298 * Reference fixup functions
299 */
300
301static void fixup_phandle_references(struct check *c, struct node *dt,
302 struct node *node, struct property *prop)
303{
304 struct marker *m = prop->val.markers;
305 struct node *refnode;
306 cell_t phandle;
307
308 for_each_marker_of_type(m, REF_PHANDLE) {
309 assert(m->offset + sizeof(cell_t) <= prop->val.len);
310
311 refnode = get_node_by_ref(dt, m->ref);
312 if (! refnode) {
313 FAIL(c, "Reference to non-existent node or label \"%s\"\n",
314 m->ref);
315 continue;
316 }
317
318 phandle = get_node_phandle(dt, refnode);
319 *((cell_t *)(prop->val.val + m->offset)) = cpu_to_be32(phandle);
320 }
321}
322CHECK(phandle_references, NULL, NULL, fixup_phandle_references, NULL, ERROR,
323 &duplicate_node_names, &explicit_phandles);
324
325static void fixup_path_references(struct check *c, struct node *dt,
326 struct node *node, struct property *prop)
327{
328 struct marker *m = prop->val.markers;
329 struct node *refnode;
330 char *path;
331
332 for_each_marker_of_type(m, REF_PATH) {
333 assert(m->offset <= prop->val.len);
334
335 refnode = get_node_by_ref(dt, m->ref);
336 if (!refnode) {
337 FAIL(c, "Reference to non-existent node or label \"%s\"\n",
338 m->ref);
339 continue;
340 }
341
342 path = refnode->fullpath;
343 prop->val = data_insert_at_marker(prop->val, m, path,
344 strlen(path) + 1);
345 }
346}
347CHECK(path_references, NULL, NULL, fixup_path_references, NULL, ERROR,
348 &duplicate_node_names);
349
350/*
351 * Semantic checks
352 */
353CHECK_IS_CELL(address_cells_is_cell, "#address-cells", WARN);
354CHECK_IS_CELL(size_cells_is_cell, "#size-cells", WARN);
355CHECK_IS_CELL(interrupt_cells_is_cell, "#interrupt-cells", WARN);
356
357CHECK_IS_STRING(device_type_is_string, "device_type", WARN);
358CHECK_IS_STRING(model_is_string, "model", WARN);
359CHECK_IS_STRING(status_is_string, "status", WARN);
360
361static void fixup_addr_size_cells(struct check *c, struct node *dt,
362 struct node *node)
363{
364 struct property *prop;
365
366 node->addr_cells = -1;
367 node->size_cells = -1;
368
369 prop = get_property(node, "#address-cells");
370 if (prop)
371 node->addr_cells = propval_cell(prop);
372
373 prop = get_property(node, "#size-cells");
374 if (prop)
375 node->size_cells = propval_cell(prop);
376}
377CHECK(addr_size_cells, NULL, fixup_addr_size_cells, NULL, NULL, WARN,
378 &address_cells_is_cell, &size_cells_is_cell);
379
380#define node_addr_cells(n) \
381 (((n)->addr_cells == -1) ? 2 : (n)->addr_cells)
382#define node_size_cells(n) \
383 (((n)->size_cells == -1) ? 1 : (n)->size_cells)
384
385static void check_reg_format(struct check *c, struct node *dt,
386 struct node *node)
387{
388 struct property *prop;
389 int addr_cells, size_cells, entrylen;
390
391 prop = get_property(node, "reg");
392 if (!prop)
393 return; /* No "reg", that's fine */
394
395 if (!node->parent) {
396 FAIL(c, "Root node has a \"reg\" property");
397 return;
398 }
399
400 if (prop->val.len == 0)
401 FAIL(c, "\"reg\" property in %s is empty", node->fullpath);
402
403 addr_cells = node_addr_cells(node->parent);
404 size_cells = node_size_cells(node->parent);
405 entrylen = (addr_cells + size_cells) * sizeof(cell_t);
406
407 if ((prop->val.len % entrylen) != 0)
408 FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) "
409 "(#address-cells == %d, #size-cells == %d)",
410 node->fullpath, prop->val.len, addr_cells, size_cells);
411}
412NODE_CHECK(reg_format, NULL, WARN, &addr_size_cells);
413
414static void check_ranges_format(struct check *c, struct node *dt,
415 struct node *node)
416{
417 struct property *prop;
418 int c_addr_cells, p_addr_cells, c_size_cells, p_size_cells, entrylen;
419
420 prop = get_property(node, "ranges");
421 if (!prop)
422 return;
423
424 if (!node->parent) {
425 FAIL(c, "Root node has a \"ranges\" property");
426 return;
427 }
428
429 p_addr_cells = node_addr_cells(node->parent);
430 p_size_cells = node_size_cells(node->parent);
431 c_addr_cells = node_addr_cells(node);
432 c_size_cells = node_size_cells(node);
433 entrylen = (p_addr_cells + c_addr_cells + c_size_cells) * sizeof(cell_t);
434
435 if (prop->val.len == 0) {
436 if (p_addr_cells != c_addr_cells)
437 FAIL(c, "%s has empty \"ranges\" property but its "
438 "#address-cells (%d) differs from %s (%d)",
439 node->fullpath, c_addr_cells, node->parent->fullpath,
440 p_addr_cells);
441 if (p_size_cells != c_size_cells)
442 FAIL(c, "%s has empty \"ranges\" property but its "
443 "#size-cells (%d) differs from %s (%d)",
444 node->fullpath, c_size_cells, node->parent->fullpath,
445 p_size_cells);
446 } else if ((prop->val.len % entrylen) != 0) {
447 FAIL(c, "\"ranges\" property in %s has invalid length (%d bytes) "
448 "(parent #address-cells == %d, child #address-cells == %d, "
449 "#size-cells == %d)", node->fullpath, prop->val.len,
450 p_addr_cells, c_addr_cells, c_size_cells);
451 }
452}
453NODE_CHECK(ranges_format, NULL, WARN, &addr_size_cells);
454
455/*
456 * Style checks
457 */
458static void check_avoid_default_addr_size(struct check *c, struct node *dt,
459 struct node *node)
460{
461 struct property *reg, *ranges;
462
463 if (!node->parent)
464 return; /* Ignore root node */
465
466 reg = get_property(node, "reg");
467 ranges = get_property(node, "ranges");
468
469 if (!reg && !ranges)
470 return;
471
472 if ((node->parent->addr_cells == -1))
473 FAIL(c, "Relying on default #address-cells value for %s",
474 node->fullpath);
475
476 if ((node->parent->size_cells == -1))
477 FAIL(c, "Relying on default #size-cells value for %s",
478 node->fullpath);
479}
480NODE_CHECK(avoid_default_addr_size, NULL, WARN, &addr_size_cells);
481
482static void check_obsolete_chosen_interrupt_controller(struct check *c,
483 struct node *dt)
484{
485 struct node *chosen;
486 struct property *prop;
487
488 chosen = get_node_by_path(dt, "/chosen");
489 if (!chosen)
490 return;
491
492 prop = get_property(chosen, "interrupt-controller");
493 if (prop)
494 FAIL(c, "/chosen has obsolete \"interrupt-controller\" "
495 "property");
496}
497TREE_CHECK(obsolete_chosen_interrupt_controller, NULL, WARN);
498
499static struct check *check_table[] = {
500 &duplicate_node_names, &duplicate_property_names,
501 &name_is_string, &name_properties,
502 &explicit_phandles,
503 &phandle_references, &path_references,
504
505 &address_cells_is_cell, &size_cells_is_cell, &interrupt_cells_is_cell,
506 &device_type_is_string, &model_is_string, &status_is_string,
507
508 &addr_size_cells, &reg_format, &ranges_format,
509
510 &avoid_default_addr_size,
511 &obsolete_chosen_interrupt_controller,
512};
513
514int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys);
515
516void process_checks(int force, struct boot_info *bi,
517 int checkflag, int outversion, int boot_cpuid_phys)
518{
519 struct node *dt = bi->dt;
520 int i;
521 int error = 0;
522
523 for (i = 0; i < ARRAY_SIZE(check_table); i++) {
524 struct check *c = check_table[i];
525
526 if (c->level != IGNORE)
527 error = error || run_check(c, dt);
528 }
529
530 if (error) {
531 if (!force) {
532 fprintf(stderr, "ERROR: Input tree has errors, aborting "
533 "(use -f to force output)\n");
534 exit(2);
535 } else if (quiet < 3) {
536 fprintf(stderr, "Warning: Input tree has errors, "
537 "output forced\n");
538 }
539 }
540
541 if (checkflag) {
542 if (error) {
543 fprintf(stderr, "Warning: Skipping semantic checks due to structural errors\n");
544 } else {
545 if (!check_semantics(bi->dt, outversion,
546 boot_cpuid_phys))
547 fprintf(stderr, "Warning: Input tree has semantic errors\n");
548 }
549 }
550}
551
552/*
553 * Semantic check functions
554 */
555
556#define ERRMSG(...) if (quiet < 2) fprintf(stderr, "ERROR: " __VA_ARGS__)
557#define WARNMSG(...) if (quiet < 1) fprintf(stderr, "Warning: " __VA_ARGS__)
558
559#define DO_ERR(...) do {ERRMSG(__VA_ARGS__); ok = 0; } while (0)
560
561#define CHECK_HAVE(node, propname) \
562 do { \
563 if (! (prop = get_property((node), (propname)))) \
564 DO_ERR("Missing \"%s\" property in %s\n", (propname), \
565 (node)->fullpath); \
566 } while (0);
567
568#define CHECK_HAVE_WARN(node, propname) \
569 do { \
570 if (! (prop = get_property((node), (propname)))) \
571 WARNMSG("%s has no \"%s\" property\n", \
572 (node)->fullpath, (propname)); \
573 } while (0)
574
575#define CHECK_HAVE_STRING(node, propname) \
576 do { \
577 CHECK_HAVE((node), (propname)); \
578 if (prop && !data_is_one_string(prop->val)) \
579 DO_ERR("\"%s\" property in %s is not a string\n", \
580 (propname), (node)->fullpath); \
581 } while (0)
582
583#define CHECK_HAVE_STREQ(node, propname, value) \
584 do { \
585 CHECK_HAVE_STRING((node), (propname)); \
586 if (prop && !streq(prop->val.val, (value))) \
587 DO_ERR("%s has wrong %s, %s (should be %s\n", \
588 (node)->fullpath, (propname), \
589 prop->val.val, (value)); \
590 } while (0)
591
592#define CHECK_HAVE_ONECELL(node, propname) \
593 do { \
594 CHECK_HAVE((node), (propname)); \
595 if (prop && (prop->val.len != sizeof(cell_t))) \
596 DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
597 } while (0)
598
599#define CHECK_HAVE_WARN_ONECELL(node, propname) \
600 do { \
601 CHECK_HAVE_WARN((node), (propname)); \
602 if (prop && (prop->val.len != sizeof(cell_t))) \
603 DO_ERR("\"%s\" property in %s has wrong size %d (should be 1 cell)\n", (propname), (node)->fullpath, prop->val.len); \
604 } while (0)
605
606#define CHECK_HAVE_WARN_PHANDLE(xnode, propname, root) \
607 do { \
608 struct node *ref; \
609 CHECK_HAVE_WARN_ONECELL((xnode), (propname)); \
610 if (prop) {\
611 cell_t phandle = propval_cell(prop); \
612 if ((phandle == 0) || (phandle == -1)) { \
613 DO_ERR("\"%s\" property in %s contains an invalid phandle %x\n", (propname), (xnode)->fullpath, phandle); \
614 } else { \
615 ref = get_node_by_phandle((root), propval_cell(prop)); \
616 if (! ref) \
617 DO_ERR("\"%s\" property in %s refers to non-existant phandle %x\n", (propname), (xnode)->fullpath, propval_cell(prop)); \
618 } \
619 } \
620 } while (0)
621
622#define CHECK_HAVE_WARN_STRING(node, propname) \
623 do { \
624 CHECK_HAVE_WARN((node), (propname)); \
625 if (prop && !data_is_one_string(prop->val)) \
626 DO_ERR("\"%s\" property in %s is not a string\n", \
627 (propname), (node)->fullpath); \
628 } while (0)
629
630static int check_root(struct node *root)
631{
632 struct property *prop;
633 int ok = 1;
634
635 CHECK_HAVE_STRING(root, "model");
636 CHECK_HAVE_WARN(root, "compatible");
637
638 return ok;
639}
640
641static int check_cpus(struct node *root, int outversion, int boot_cpuid_phys)
642{
643 struct node *cpus, *cpu;
644 struct property *prop;
645 struct node *bootcpu = NULL;
646 int ok = 1;
647
648 cpus = get_subnode(root, "cpus");
649 if (! cpus) {
650 ERRMSG("Missing /cpus node\n");
651 return 0;
652 }
653
654 if (cpus->addr_cells != 1)
655 DO_ERR("%s has bad #address-cells value %d (should be 1)\n",
656 cpus->fullpath, cpus->addr_cells);
657 if (cpus->size_cells != 0)
658 DO_ERR("%s has bad #size-cells value %d (should be 0)\n",
659 cpus->fullpath, cpus->size_cells);
660
661 for_each_child(cpus, cpu) {
662 CHECK_HAVE_STREQ(cpu, "device_type", "cpu");
663
664 CHECK_HAVE_ONECELL(cpu, "reg");
665 if (prop) {
666 cell_t unitnum;
667 char *eptr;
668
669 unitnum = strtol(get_unitname(cpu), &eptr, 16);
670 if (*eptr) {
671 WARNMSG("%s has bad format unit name %s (should be CPU number\n",
672 cpu->fullpath, get_unitname(cpu));
673 } else if (unitnum != propval_cell(prop)) {
674 WARNMSG("%s unit name \"%s\" does not match \"reg\" property <%x>\n",
675 cpu->fullpath, get_unitname(cpu),
676 propval_cell(prop));
677 }
678 }
679
680/* CHECK_HAVE_ONECELL(cpu, "d-cache-line-size"); */
681/* CHECK_HAVE_ONECELL(cpu, "i-cache-line-size"); */
682 CHECK_HAVE_ONECELL(cpu, "d-cache-size");
683 CHECK_HAVE_ONECELL(cpu, "i-cache-size");
684
685 CHECK_HAVE_WARN_ONECELL(cpu, "clock-frequency");
686 CHECK_HAVE_WARN_ONECELL(cpu, "timebase-frequency");
687
688 prop = get_property(cpu, "linux,boot-cpu");
689 if (prop) {
690 if (prop->val.len)
691 WARNMSG("\"linux,boot-cpu\" property in %s is non-empty\n",
692 cpu->fullpath);
693 if (bootcpu)
694 DO_ERR("Multiple boot cpus (%s and %s)\n",
695 bootcpu->fullpath, cpu->fullpath);
696 else
697 bootcpu = cpu;
698 }
699 }
700
701 if (outversion < 2) {
702 if (! bootcpu)
703 WARNMSG("No cpu has \"linux,boot-cpu\" property\n");
704 } else {
705 if (bootcpu)
706 WARNMSG("\"linux,boot-cpu\" property is deprecated in blob version 2 or higher\n");
707 if (boot_cpuid_phys == 0xfeedbeef)
708 WARNMSG("physical boot CPU not set. Use -b option to set\n");
709 }
710
711 return ok;
712}
713
714static int check_memory(struct node *root)
715{
716 struct node *mem;
717 struct property *prop;
718 int nnodes = 0;
719 int ok = 1;
720
721 for_each_child(root, mem) {
722 if (! strneq(mem->name, "memory", mem->basenamelen))
723 continue;
724
725 nnodes++;
726
727 CHECK_HAVE_STREQ(mem, "device_type", "memory");
728 CHECK_HAVE(mem, "reg");
729 }
730
731 if (nnodes == 0) {
732 ERRMSG("No memory nodes\n");
733 return 0;
734 }
735
736 return ok;
737}
738
739int check_semantics(struct node *dt, int outversion, int boot_cpuid_phys)
740{
741 int ok = 1;
742
743 ok = ok && check_root(dt);
744 ok = ok && check_cpus(dt, outversion, boot_cpuid_phys);
745 ok = ok && check_memory(dt);
746 if (! ok)
747 return 0;
748
749 return 1;
750}
diff --git a/arch/powerpc/boot/dtc-src/data.c b/arch/powerpc/boot/dtc-src/data.c
new file mode 100644
index 000000000000..a94718c731a9
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/data.c
@@ -0,0 +1,321 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22
23void data_free(struct data d)
24{
25 struct marker *m, *nm;
26
27 m = d.markers;
28 while (m) {
29 nm = m->next;
30 free(m->ref);
31 free(m);
32 m = nm;
33 }
34
35 assert(!d.val || d.asize);
36
37 if (d.val)
38 free(d.val);
39}
40
41struct data data_grow_for(struct data d, int xlen)
42{
43 struct data nd;
44 int newsize;
45
46 /* we must start with an allocated datum */
47 assert(!d.val || d.asize);
48
49 if (xlen == 0)
50 return d;
51
52 nd = d;
53
54 newsize = xlen;
55
56 while ((d.len + xlen) > newsize)
57 newsize *= 2;
58
59 nd.asize = newsize;
60 nd.val = xrealloc(d.val, newsize);
61
62 assert(nd.asize >= (d.len + xlen));
63
64 return nd;
65}
66
67struct data data_copy_mem(const char *mem, int len)
68{
69 struct data d;
70
71 d = data_grow_for(empty_data, len);
72
73 d.len = len;
74 memcpy(d.val, mem, len);
75
76 return d;
77}
78
79static char get_oct_char(const char *s, int *i)
80{
81 char x[4];
82 char *endx;
83 long val;
84
85 x[3] = '\0';
86 x[0] = s[(*i)];
87 if (x[0]) {
88 x[1] = s[(*i)+1];
89 if (x[1])
90 x[2] = s[(*i)+2];
91 }
92
93 val = strtol(x, &endx, 8);
94 if ((endx - x) == 0)
95 fprintf(stderr, "Empty \\nnn escape\n");
96
97 (*i) += endx - x;
98 return val;
99}
100
101static char get_hex_char(const char *s, int *i)
102{
103 char x[3];
104 char *endx;
105 long val;
106
107 x[2] = '\0';
108 x[0] = s[(*i)];
109 if (x[0])
110 x[1] = s[(*i)+1];
111
112 val = strtol(x, &endx, 16);
113 if ((endx - x) == 0)
114 fprintf(stderr, "Empty \\x escape\n");
115
116 (*i) += endx - x;
117 return val;
118}
119
120struct data data_copy_escape_string(const char *s, int len)
121{
122 int i = 0;
123 struct data d;
124 char *q;
125
126 d = data_grow_for(empty_data, strlen(s)+1);
127
128 q = d.val;
129 while (i < len) {
130 char c = s[i++];
131
132 if (c != '\\') {
133 q[d.len++] = c;
134 continue;
135 }
136
137 c = s[i++];
138 assert(c);
139 switch (c) {
140 case 'a':
141 q[d.len++] = '\a';
142 break;
143 case 'b':
144 q[d.len++] = '\b';
145 break;
146 case 't':
147 q[d.len++] = '\t';
148 break;
149 case 'n':
150 q[d.len++] = '\n';
151 break;
152 case 'v':
153 q[d.len++] = '\v';
154 break;
155 case 'f':
156 q[d.len++] = '\f';
157 break;
158 case 'r':
159 q[d.len++] = '\r';
160 break;
161 case '0':
162 case '1':
163 case '2':
164 case '3':
165 case '4':
166 case '5':
167 case '6':
168 case '7':
169 i--; /* need to re-read the first digit as
170 * part of the octal value */
171 q[d.len++] = get_oct_char(s, &i);
172 break;
173 case 'x':
174 q[d.len++] = get_hex_char(s, &i);
175 break;
176 default:
177 q[d.len++] = c;
178 }
179 }
180
181 q[d.len++] = '\0';
182 return d;
183}
184
185struct data data_copy_file(FILE *f, size_t len)
186{
187 struct data d;
188
189 d = data_grow_for(empty_data, len);
190
191 d.len = len;
192 fread(d.val, len, 1, f);
193
194 return d;
195}
196
197struct data data_append_data(struct data d, const void *p, int len)
198{
199 d = data_grow_for(d, len);
200 memcpy(d.val + d.len, p, len);
201 d.len += len;
202 return d;
203}
204
205struct data data_insert_at_marker(struct data d, struct marker *m,
206 const void *p, int len)
207{
208 d = data_grow_for(d, len);
209 memmove(d.val + m->offset + len, d.val + m->offset, d.len - m->offset);
210 memcpy(d.val + m->offset, p, len);
211 d.len += len;
212
213 /* Adjust all markers after the one we're inserting at */
214 m = m->next;
215 for_each_marker(m)
216 m->offset += len;
217 return d;
218}
219
220struct data data_append_markers(struct data d, struct marker *m)
221{
222 struct marker **mp = &d.markers;
223
224 /* Find the end of the markerlist */
225 while (*mp)
226 mp = &((*mp)->next);
227 *mp = m;
228 return d;
229}
230
231struct data data_merge(struct data d1, struct data d2)
232{
233 struct data d;
234 struct marker *m2 = d2.markers;
235
236 d = data_append_markers(data_append_data(d1, d2.val, d2.len), m2);
237
238 /* Adjust for the length of d1 */
239 for_each_marker(m2)
240 m2->offset += d1.len;
241
242 d2.markers = NULL; /* So data_free() doesn't clobber them */
243 data_free(d2);
244
245 return d;
246}
247
248struct data data_append_cell(struct data d, cell_t word)
249{
250 cell_t beword = cpu_to_be32(word);
251
252 return data_append_data(d, &beword, sizeof(beword));
253}
254
255struct data data_append_re(struct data d, const struct fdt_reserve_entry *re)
256{
257 struct fdt_reserve_entry bere;
258
259 bere.address = cpu_to_be64(re->address);
260 bere.size = cpu_to_be64(re->size);
261
262 return data_append_data(d, &bere, sizeof(bere));
263}
264
265struct data data_append_addr(struct data d, u64 addr)
266{
267 u64 beaddr = cpu_to_be64(addr);
268
269 return data_append_data(d, &beaddr, sizeof(beaddr));
270}
271
272struct data data_append_byte(struct data d, uint8_t byte)
273{
274 return data_append_data(d, &byte, 1);
275}
276
277struct data data_append_zeroes(struct data d, int len)
278{
279 d = data_grow_for(d, len);
280
281 memset(d.val + d.len, 0, len);
282 d.len += len;
283 return d;
284}
285
286struct data data_append_align(struct data d, int align)
287{
288 int newlen = ALIGN(d.len, align);
289 return data_append_zeroes(d, newlen - d.len);
290}
291
292struct data data_add_marker(struct data d, enum markertype type, char *ref)
293{
294 struct marker *m;
295
296 m = xmalloc(sizeof(*m));
297 m->offset = d.len;
298 m->type = type;
299 m->ref = ref;
300 m->next = NULL;
301
302 return data_append_markers(d, m);
303}
304
305int data_is_one_string(struct data d)
306{
307 int i;
308 int len = d.len;
309
310 if (len == 0)
311 return 0;
312
313 for (i = 0; i < len-1; i++)
314 if (d.val[i] == '\0')
315 return 0;
316
317 if (d.val[len-1] != '\0')
318 return 0;
319
320 return 1;
321}
diff --git a/arch/powerpc/boot/dtc-src/dtc-lexer.l b/arch/powerpc/boot/dtc-src/dtc-lexer.l
new file mode 100644
index 000000000000..c811b221b31e
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc-lexer.l
@@ -0,0 +1,328 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21%option noyywrap nounput yylineno
22
23%x INCLUDE
24%x BYTESTRING
25%x PROPNODENAME
26%s V1
27
28PROPNODECHAR [a-zA-Z0-9,._+*#?@-]
29PATHCHAR ({PROPNODECHAR}|[/])
30LABEL [a-zA-Z_][a-zA-Z0-9_]*
31
32%{
33#include "dtc.h"
34#include "srcpos.h"
35#include "dtc-parser.tab.h"
36
37
38/*#define LEXDEBUG 1*/
39
40#ifdef LEXDEBUG
41#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
42#else
43#define DPRINT(fmt, ...) do { } while (0)
44#endif
45
46static int dts_version; /* = 0 */
47
48#define BEGIN_DEFAULT() if (dts_version == 0) { \
49 DPRINT("<INITIAL>\n"); \
50 BEGIN(INITIAL); \
51 } else { \
52 DPRINT("<V1>\n"); \
53 BEGIN(V1); \
54 }
55%}
56
57%%
58<*>"/include/" BEGIN(INCLUDE);
59
60<INCLUDE>\"[^"\n]*\" {
61 yytext[strlen(yytext) - 1] = 0;
62 if (!push_input_file(yytext + 1)) {
63 /* Some unrecoverable error.*/
64 exit(1);
65 }
66 BEGIN_DEFAULT();
67 }
68
69
70<*><<EOF>> {
71 if (!pop_input_file()) {
72 yyterminate();
73 }
74 }
75
76<*>\"([^\\"]|\\.)*\" {
77 yylloc.filenum = srcpos_filenum;
78 yylloc.first_line = yylineno;
79 DPRINT("String: %s\n", yytext);
80 yylval.data = data_copy_escape_string(yytext+1,
81 yyleng-2);
82 yylloc.first_line = yylineno;
83 return DT_STRING;
84 }
85
86<*>"/dts-v1/" {
87 yylloc.filenum = srcpos_filenum;
88 yylloc.first_line = yylineno;
89 DPRINT("Keyword: /dts-v1/\n");
90 dts_version = 1;
91 BEGIN_DEFAULT();
92 return DT_V1;
93 }
94
95<*>"/memreserve/" {
96 yylloc.filenum = srcpos_filenum;
97 yylloc.first_line = yylineno;
98 DPRINT("Keyword: /memreserve/\n");
99 BEGIN_DEFAULT();
100 return DT_MEMRESERVE;
101 }
102
103<*>{LABEL}: {
104 yylloc.filenum = srcpos_filenum;
105 yylloc.first_line = yylineno;
106 DPRINT("Label: %s\n", yytext);
107 yylval.labelref = strdup(yytext);
108 yylval.labelref[yyleng-1] = '\0';
109 return DT_LABEL;
110 }
111
112<INITIAL>[bodh]# {
113 yylloc.filenum = srcpos_filenum;
114 yylloc.first_line = yylineno;
115 if (*yytext == 'b')
116 yylval.cbase = 2;
117 else if (*yytext == 'o')
118 yylval.cbase = 8;
119 else if (*yytext == 'd')
120 yylval.cbase = 10;
121 else
122 yylval.cbase = 16;
123 DPRINT("Base: %d\n", yylval.cbase);
124 return DT_BASE;
125 }
126
127<INITIAL>[0-9a-fA-F]+ {
128 yylloc.filenum = srcpos_filenum;
129 yylloc.first_line = yylineno;
130 yylval.literal = strdup(yytext);
131 DPRINT("Literal: '%s'\n", yylval.literal);
132 return DT_LEGACYLITERAL;
133 }
134
135<V1>[0-9]+|0[xX][0-9a-fA-F]+ {
136 yylloc.filenum = srcpos_filenum;
137 yylloc.first_line = yylineno;
138 yylval.literal = strdup(yytext);
139 DPRINT("Literal: '%s'\n", yylval.literal);
140 return DT_LITERAL;
141 }
142
143\&{LABEL} { /* label reference */
144 yylloc.filenum = srcpos_filenum;
145 yylloc.first_line = yylineno;
146 DPRINT("Ref: %s\n", yytext+1);
147 yylval.labelref = strdup(yytext+1);
148 return DT_REF;
149 }
150
151"&{/"{PATHCHAR}+\} { /* new-style path reference */
152 yylloc.filenum = srcpos_filenum;
153 yylloc.first_line = yylineno;
154 yytext[yyleng-1] = '\0';
155 DPRINT("Ref: %s\n", yytext+2);
156 yylval.labelref = strdup(yytext+2);
157 return DT_REF;
158 }
159
160<INITIAL>"&/"{PATHCHAR}+ { /* old-style path reference */
161 yylloc.filenum = srcpos_filenum;
162 yylloc.first_line = yylineno;
163 DPRINT("Ref: %s\n", yytext+1);
164 yylval.labelref = strdup(yytext+1);
165 return DT_REF;
166 }
167
168<BYTESTRING>[0-9a-fA-F]{2} {
169 yylloc.filenum = srcpos_filenum;
170 yylloc.first_line = yylineno;
171 yylval.byte = strtol(yytext, NULL, 16);
172 DPRINT("Byte: %02x\n", (int)yylval.byte);
173 return DT_BYTE;
174 }
175
176<BYTESTRING>"]" {
177 yylloc.filenum = srcpos_filenum;
178 yylloc.first_line = yylineno;
179 DPRINT("/BYTESTRING\n");
180 BEGIN_DEFAULT();
181 return ']';
182 }
183
184<PROPNODENAME>{PROPNODECHAR}+ {
185 yylloc.filenum = srcpos_filenum;
186 yylloc.first_line = yylineno;
187 DPRINT("PropNodeName: %s\n", yytext);
188 yylval.propnodename = strdup(yytext);
189 BEGIN_DEFAULT();
190 return DT_PROPNODENAME;
191 }
192
193
194<*>[[:space:]]+ /* eat whitespace */
195
196<*>"/*"([^*]|\*+[^*/])*\*+"/" {
197 yylloc.filenum = srcpos_filenum;
198 yylloc.first_line = yylineno;
199 DPRINT("Comment: %s\n", yytext);
200 /* eat comments */
201 }
202
203<*>"//".*\n /* eat line comments */
204
205<*>. {
206 yylloc.filenum = srcpos_filenum;
207 yylloc.first_line = yylineno;
208 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
209 (unsigned)yytext[0]);
210 if (yytext[0] == '[') {
211 DPRINT("<BYTESTRING>\n");
212 BEGIN(BYTESTRING);
213 }
214 if ((yytext[0] == '{')
215 || (yytext[0] == ';')) {
216 DPRINT("<PROPNODENAME>\n");
217 BEGIN(PROPNODENAME);
218 }
219 return yytext[0];
220 }
221
222%%
223
224
225/*
226 * Stack of nested include file contexts.
227 */
228
229struct incl_file {
230 int filenum;
231 FILE *file;
232 YY_BUFFER_STATE yy_prev_buf;
233 int yy_prev_lineno;
234 struct incl_file *prev;
235};
236
237struct incl_file *incl_file_stack;
238
239
240/*
241 * Detect infinite include recursion.
242 */
243#define MAX_INCLUDE_DEPTH (100)
244
245static int incl_depth = 0;
246
247
248int push_input_file(const char *filename)
249{
250 FILE *f;
251 struct incl_file *incl_file;
252
253 if (!filename) {
254 yyerror("No include file name given.");
255 return 0;
256 }
257
258 if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
259 yyerror("Includes nested too deeply");
260 return 0;
261 }
262
263 f = dtc_open_file(filename);
264
265 incl_file = malloc(sizeof(struct incl_file));
266 if (!incl_file) {
267 yyerror("Can not allocate include file space.");
268 return 0;
269 }
270
271 /*
272 * Save current context.
273 */
274 incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
275 incl_file->yy_prev_lineno = yylineno;
276 incl_file->filenum = srcpos_filenum;
277 incl_file->file = yyin;
278 incl_file->prev = incl_file_stack;
279
280 incl_file_stack = incl_file;
281
282 /*
283 * Establish new context.
284 */
285 srcpos_filenum = lookup_file_name(filename, 0);
286 yylineno = 1;
287 yyin = f;
288 yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
289
290 return 1;
291}
292
293
294int pop_input_file(void)
295{
296 struct incl_file *incl_file;
297
298 if (incl_file_stack == 0)
299 return 0;
300
301 fclose(yyin);
302
303 /*
304 * Pop.
305 */
306 --incl_depth;
307 incl_file = incl_file_stack;
308 incl_file_stack = incl_file->prev;
309
310 /*
311 * Recover old context.
312 */
313 yy_delete_buffer(YY_CURRENT_BUFFER);
314 yy_switch_to_buffer(incl_file->yy_prev_buf);
315 yylineno = incl_file->yy_prev_lineno;
316 srcpos_filenum = incl_file->filenum;
317 yyin = incl_file->file;
318
319 /*
320 * Free old state.
321 */
322 free(incl_file);
323
324 if (YY_CURRENT_BUFFER == 0)
325 return 0;
326
327 return 1;
328}
diff --git a/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped b/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped
new file mode 100644
index 000000000000..d0f742460f92
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc-lexer.lex.c_shipped
@@ -0,0 +1,2174 @@
1#line 2 "dtc-lexer.lex.c"
2
3#line 4 "dtc-lexer.lex.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
12#define YY_FLEX_SUBMINOR_VERSION 33
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
16
17/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
20#include <stdio.h>
21#include <string.h>
22#include <errno.h>
23#include <stdlib.h>
24
25/* end standard C headers. */
26
27/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
41#endif
42
43#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57#endif /* ! C99 */
58
59/* Limits of integral types. */
60#ifndef INT8_MIN
61#define INT8_MIN (-128)
62#endif
63#ifndef INT16_MIN
64#define INT16_MIN (-32767-1)
65#endif
66#ifndef INT32_MIN
67#define INT32_MIN (-2147483647-1)
68#endif
69#ifndef INT8_MAX
70#define INT8_MAX (127)
71#endif
72#ifndef INT16_MAX
73#define INT16_MAX (32767)
74#endif
75#ifndef INT32_MAX
76#define INT32_MAX (2147483647)
77#endif
78#ifndef UINT8_MAX
79#define UINT8_MAX (255U)
80#endif
81#ifndef UINT16_MAX
82#define UINT16_MAX (65535U)
83#endif
84#ifndef UINT32_MAX
85#define UINT32_MAX (4294967295U)
86#endif
87
88#endif /* ! FLEXINT_H */
89
90#ifdef __cplusplus
91
92/* The "const" storage-class-modifier is valid. */
93#define YY_USE_CONST
94
95#else /* ! __cplusplus */
96
97#if __STDC__
98
99#define YY_USE_CONST
100
101#endif /* __STDC__ */
102#endif /* ! __cplusplus */
103
104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
113/* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120/* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
123 */
124#define BEGIN (yy_start) = 1 + 2 *
125
126/* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
128 * compatibility.
129 */
130#define YY_START (((yy_start) - 1) / 2)
131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
137#define YY_NEW_FILE yyrestart(yyin )
138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
142#ifndef YY_BUF_SIZE
143#define YY_BUF_SIZE 16384
144#endif
145
146/* The state buf must be large enough to hold one state per character in the main buffer.
147 */
148#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151#define YY_TYPEDEF_YY_BUFFER_STATE
152typedef struct yy_buffer_state *YY_BUFFER_STATE;
153#endif
154
155extern int yyleng;
156
157extern FILE *yyin, *yyout;
158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE yylex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-yylineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
169 */
170 #define YY_LESS_LINENO(n) \
171 do { \
172 int yyl;\
173 for ( yyl = n; yyl < yyleng; ++yyl )\
174 if ( yytext[yyl] == '\n' )\
175 --yylineno;\
176 }while(0)
177
178/* Return all but the first "n" matched characters back to the input stream. */
179#define yyless(n) \
180 do \
181 { \
182 /* Undo effects of setting up yytext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
186 YY_RESTORE_YY_MORE_OFFSET \
187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
189 } \
190 while ( 0 )
191
192#define unput(c) yyunput( c, (yytext_ptr) )
193
194/* The following is because we cannot portably get our hands on size_t
195 * (without autoconf's help, which isn't available because we want
196 * flex-generated scanners to compile on their own).
197 */
198
199#ifndef YY_TYPEDEF_YY_SIZE_T
200#define YY_TYPEDEF_YY_SIZE_T
201typedef unsigned int yy_size_t;
202#endif
203
204#ifndef YY_STRUCT_YY_BUFFER_STATE
205#define YY_STRUCT_YY_BUFFER_STATE
206struct yy_buffer_state
207 {
208 FILE *yy_input_file;
209
210 char *yy_ch_buf; /* input buffer */
211 char *yy_buf_pos; /* current position in input buffer */
212
213 /* Size of input buffer in bytes, not including room for EOB
214 * characters.
215 */
216 yy_size_t yy_buf_size;
217
218 /* Number of characters read into yy_ch_buf, not including EOB
219 * characters.
220 */
221 int yy_n_chars;
222
223 /* Whether we "own" the buffer - i.e., we know we created it,
224 * and can realloc() it to grow it, and should free() it to
225 * delete it.
226 */
227 int yy_is_our_buffer;
228
229 /* Whether this is an "interactive" input source; if so, and
230 * if we're using stdio for input, then we want to use getc()
231 * instead of fread(), to make sure we stop fetching input after
232 * each newline.
233 */
234 int yy_is_interactive;
235
236 /* Whether we're considered to be at the beginning of a line.
237 * If so, '^' rules will be active on the next match, otherwise
238 * not.
239 */
240 int yy_at_bol;
241
242 int yy_bs_lineno; /**< The line count. */
243 int yy_bs_column; /**< The column count. */
244
245 /* Whether to try to fill the input buffer when we reach the
246 * end of it.
247 */
248 int yy_fill_buffer;
249
250 int yy_buffer_status;
251
252#define YY_BUFFER_NEW 0
253#define YY_BUFFER_NORMAL 1
254 /* When an EOF's been seen but there's still some text to process
255 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
256 * shouldn't try reading from the input source any more. We might
257 * still have a bunch of tokens to match, though, because of
258 * possible backing-up.
259 *
260 * When we actually see the EOF, we change the status to "new"
261 * (via yyrestart()), so that the user can continue scanning by
262 * just pointing yyin at a new input file.
263 */
264#define YY_BUFFER_EOF_PENDING 2
265
266 };
267#endif /* !YY_STRUCT_YY_BUFFER_STATE */
268
269/* Stack of input buffers. */
270static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
271static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
272static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
273
274/* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
277 *
278 * Returns the top of the stack, or NULL.
279 */
280#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
281 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
282 : NULL)
283
284/* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
286 */
287#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
288
289/* yy_hold_char holds the character lost when yytext is formed. */
290static char yy_hold_char;
291static int yy_n_chars; /* number of characters read into yy_ch_buf */
292int yyleng;
293
294/* Points to current character in buffer. */
295static char *yy_c_buf_p = (char *) 0;
296static int yy_init = 0; /* whether we need to initialize */
297static int yy_start = 0; /* start state number */
298
299/* Flag which is used to allow yywrap()'s to do buffer switches
300 * instead of setting up a fresh yyin. A bit of a hack ...
301 */
302static int yy_did_buffer_switch_on_eof;
303
304void yyrestart (FILE *input_file );
305void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
306YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
307void yy_delete_buffer (YY_BUFFER_STATE b );
308void yy_flush_buffer (YY_BUFFER_STATE b );
309void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
310void yypop_buffer_state (void );
311
312static void yyensure_buffer_stack (void );
313static void yy_load_buffer_state (void );
314static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
315
316#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
317
318YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
319YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
320YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
321
322void *yyalloc (yy_size_t );
323void *yyrealloc (void *,yy_size_t );
324void yyfree (void * );
325
326#define yy_new_buffer yy_create_buffer
327
328#define yy_set_interactive(is_interactive) \
329 { \
330 if ( ! YY_CURRENT_BUFFER ){ \
331 yyensure_buffer_stack (); \
332 YY_CURRENT_BUFFER_LVALUE = \
333 yy_create_buffer(yyin,YY_BUF_SIZE ); \
334 } \
335 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
336 }
337
338#define yy_set_bol(at_bol) \
339 { \
340 if ( ! YY_CURRENT_BUFFER ){\
341 yyensure_buffer_stack (); \
342 YY_CURRENT_BUFFER_LVALUE = \
343 yy_create_buffer(yyin,YY_BUF_SIZE ); \
344 } \
345 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
346 }
347
348#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
349
350/* Begin user sect3 */
351
352#define yywrap() 1
353#define YY_SKIP_YYWRAP
354
355typedef unsigned char YY_CHAR;
356
357FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
358
359typedef int yy_state_type;
360
361extern int yylineno;
362
363int yylineno = 1;
364
365extern char *yytext;
366#define yytext_ptr yytext
367
368static yy_state_type yy_get_previous_state (void );
369static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
370static int yy_get_next_buffer (void );
371static void yy_fatal_error (yyconst char msg[] );
372
373/* Done after the current pattern has been matched and before the
374 * corresponding action - sets up yytext.
375 */
376#define YY_DO_BEFORE_ACTION \
377 (yytext_ptr) = yy_bp; \
378 yyleng = (size_t) (yy_cp - yy_bp); \
379 (yy_hold_char) = *yy_cp; \
380 *yy_cp = '\0'; \
381 (yy_c_buf_p) = yy_cp;
382
383#define YY_NUM_RULES 20
384#define YY_END_OF_BUFFER 21
385/* This struct is not used in this scanner,
386 but its presence is necessary. */
387struct yy_trans_info
388 {
389 flex_int32_t yy_verify;
390 flex_int32_t yy_nxt;
391 };
392static yyconst flex_int16_t yy_accept[94] =
393 { 0,
394 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
395 21, 19, 16, 16, 19, 19, 19, 8, 8, 19,
396 8, 19, 19, 19, 19, 14, 15, 15, 19, 9,
397 9, 16, 0, 3, 0, 0, 10, 0, 0, 0,
398 0, 0, 0, 8, 8, 6, 0, 7, 0, 2,
399 0, 13, 13, 15, 15, 9, 0, 12, 10, 0,
400 0, 0, 0, 18, 0, 0, 0, 2, 9, 0,
401 17, 0, 0, 0, 11, 0, 0, 0, 0, 0,
402 0, 0, 0, 0, 4, 0, 0, 1, 0, 0,
403 0, 5, 0
404
405 } ;
406
407static yyconst flex_int32_t yy_ec[256] =
408 { 0,
409 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
410 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 2, 1, 4, 5, 1, 1, 6, 1, 1,
413 1, 7, 8, 8, 9, 8, 10, 11, 12, 13,
414 13, 13, 13, 13, 13, 13, 13, 14, 1, 1,
415 1, 1, 8, 8, 15, 15, 15, 15, 15, 15,
416 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
417 16, 16, 16, 16, 16, 16, 16, 17, 16, 16,
418 1, 18, 19, 1, 16, 1, 15, 20, 21, 22,
419
420 23, 15, 16, 24, 25, 16, 16, 26, 27, 28,
421 24, 16, 16, 29, 30, 31, 32, 33, 16, 17,
422 16, 16, 34, 1, 35, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1
437 } ;
438
439static yyconst flex_int32_t yy_meta[36] =
440 { 0,
441 1, 1, 1, 1, 2, 1, 2, 2, 2, 3,
442 4, 4, 4, 5, 6, 7, 7, 1, 1, 6,
443 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
444 7, 7, 7, 8, 1
445 } ;
446
447static yyconst flex_int16_t yy_base[107] =
448 { 0,
449 0, 0, 32, 0, 53, 0, 76, 0, 108, 111,
450 280, 288, 37, 39, 33, 36, 106, 0, 123, 146,
451 255, 251, 45, 0, 159, 288, 0, 53, 108, 172,
452 114, 127, 158, 288, 245, 0, 0, 234, 235, 236,
453 197, 195, 199, 0, 0, 288, 0, 288, 160, 288,
454 183, 288, 0, 0, 183, 182, 0, 0, 0, 0,
455 204, 189, 207, 288, 179, 187, 180, 194, 0, 171,
456 288, 196, 178, 174, 288, 169, 169, 177, 165, 153,
457 143, 155, 137, 118, 288, 122, 42, 288, 36, 36,
458 40, 288, 288, 212, 218, 223, 229, 234, 239, 245,
459
460 251, 255, 262, 270, 275, 280
461 } ;
462
463static yyconst flex_int16_t yy_def[107] =
464 { 0,
465 93, 1, 1, 3, 3, 5, 93, 7, 3, 3,
466 93, 93, 93, 93, 94, 95, 93, 96, 93, 19,
467 19, 20, 97, 98, 20, 93, 99, 100, 95, 93,
468 93, 93, 94, 93, 94, 101, 102, 93, 103, 104,
469 93, 93, 93, 96, 19, 93, 20, 93, 97, 93,
470 97, 93, 20, 99, 100, 93, 105, 101, 102, 106,
471 103, 103, 104, 93, 93, 93, 93, 94, 105, 106,
472 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
473 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
474 93, 93, 0, 93, 93, 93, 93, 93, 93, 93,
475
476 93, 93, 93, 93, 93, 93
477 } ;
478
479static yyconst flex_int16_t yy_nxt[324] =
480 { 0,
481 12, 13, 14, 15, 12, 16, 12, 12, 12, 17,
482 18, 18, 18, 12, 19, 20, 20, 12, 12, 21,
483 19, 21, 19, 22, 20, 20, 20, 20, 20, 20,
484 20, 20, 20, 12, 12, 23, 34, 12, 32, 32,
485 32, 32, 12, 12, 12, 36, 20, 33, 50, 92,
486 35, 20, 20, 20, 20, 20, 15, 54, 91, 54,
487 54, 54, 51, 24, 24, 24, 46, 25, 90, 38,
488 89, 26, 25, 25, 25, 25, 12, 13, 14, 15,
489 27, 12, 27, 27, 27, 17, 27, 27, 27, 12,
490 28, 28, 28, 12, 12, 28, 28, 28, 28, 28,
491
492 28, 28, 28, 28, 28, 28, 28, 28, 28, 12,
493 12, 15, 39, 29, 15, 40, 29, 93, 30, 31,
494 31, 30, 31, 31, 56, 56, 56, 41, 32, 32,
495 42, 88, 43, 45, 45, 45, 46, 45, 47, 47,
496 87, 38, 45, 45, 45, 45, 47, 47, 47, 47,
497 47, 47, 47, 47, 47, 47, 47, 47, 47, 86,
498 47, 34, 33, 50, 85, 47, 47, 47, 47, 53,
499 53, 53, 84, 53, 83, 35, 82, 51, 53, 53,
500 53, 53, 56, 56, 56, 93, 68, 54, 57, 54,
501 54, 54, 56, 56, 56, 62, 46, 34, 71, 81,
502
503 80, 79, 78, 77, 76, 75, 74, 73, 72, 64,
504 62, 35, 33, 33, 33, 33, 33, 33, 33, 33,
505 37, 67, 66, 37, 37, 37, 44, 65, 44, 49,
506 49, 49, 49, 49, 49, 49, 49, 52, 64, 52,
507 54, 62, 54, 60, 54, 54, 55, 93, 55, 55,
508 55, 55, 58, 58, 58, 48, 58, 58, 59, 48,
509 59, 59, 61, 61, 61, 61, 61, 61, 61, 61,
510 63, 63, 63, 63, 63, 63, 63, 63, 69, 93,
511 69, 70, 70, 70, 93, 70, 70, 11, 93, 93,
512 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
513
514 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
515 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
516 93, 93, 93
517 } ;
518
519static yyconst flex_int16_t yy_chk[324] =
520 { 0,
521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
522 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
523 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
524 1, 1, 1, 1, 1, 3, 15, 3, 13, 13,
525 14, 14, 3, 3, 3, 16, 3, 23, 23, 91,
526 15, 3, 3, 3, 3, 3, 5, 28, 90, 28,
527 28, 28, 23, 5, 5, 5, 28, 5, 89, 16,
528 87, 5, 5, 5, 5, 5, 7, 7, 7, 7,
529 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
530 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
531
532 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
533 7, 9, 17, 9, 10, 17, 10, 29, 9, 9,
534 9, 10, 10, 10, 31, 31, 31, 17, 32, 32,
535 17, 86, 17, 19, 19, 19, 19, 19, 19, 19,
536 84, 29, 19, 19, 19, 19, 19, 19, 19, 19,
537 19, 19, 19, 19, 19, 19, 20, 20, 20, 83,
538 20, 33, 49, 49, 82, 20, 20, 20, 20, 25,
539 25, 25, 81, 25, 80, 33, 79, 49, 25, 25,
540 25, 25, 30, 30, 30, 51, 51, 55, 30, 55,
541 55, 55, 56, 56, 56, 62, 55, 68, 62, 78,
542
543 77, 76, 74, 73, 72, 70, 67, 66, 65, 63,
544 61, 68, 94, 94, 94, 94, 94, 94, 94, 94,
545 95, 43, 42, 95, 95, 95, 96, 41, 96, 97,
546 97, 97, 97, 97, 97, 97, 97, 98, 40, 98,
547 99, 39, 99, 38, 99, 99, 100, 35, 100, 100,
548 100, 100, 101, 101, 101, 22, 101, 101, 102, 21,
549 102, 102, 103, 103, 103, 103, 103, 103, 103, 103,
550 104, 104, 104, 104, 104, 104, 104, 104, 105, 11,
551 105, 106, 106, 106, 0, 106, 106, 93, 93, 93,
552 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
553
554 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
555 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
556 93, 93, 93
557 } ;
558
559/* Table of booleans, true if rule could match eol. */
560static yyconst flex_int32_t yy_rule_can_match_eol[21] =
561 { 0,
5620, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
563 0, };
564
565static yy_state_type yy_last_accepting_state;
566static char *yy_last_accepting_cpos;
567
568extern int yy_flex_debug;
569int yy_flex_debug = 0;
570
571/* The intent behind this definition is that it'll catch
572 * any uses of REJECT which flex missed.
573 */
574#define REJECT reject_used_but_not_detected
575#define yymore() yymore_used_but_not_detected
576#define YY_MORE_ADJ 0
577#define YY_RESTORE_YY_MORE_OFFSET
578char *yytext;
579#line 1 "dtc-lexer.l"
580/*
581 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
582 *
583 *
584 * This program is free software; you can redistribute it and/or
585 * modify it under the terms of the GNU General Public License as
586 * published by the Free Software Foundation; either version 2 of the
587 * License, or (at your option) any later version.
588 *
589 * This program is distributed in the hope that it will be useful,
590 * but WITHOUT ANY WARRANTY; without even the implied warranty of
591 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
592 * General Public License for more details.
593 *
594 * You should have received a copy of the GNU General Public License
595 * along with this program; if not, write to the Free Software
596 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
597 * USA
598 */
599
600
601
602
603#line 33 "dtc-lexer.l"
604#include "dtc.h"
605#include "srcpos.h"
606#include "dtc-parser.tab.h"
607
608
609/*#define LEXDEBUG 1*/
610
611#ifdef LEXDEBUG
612#define DPRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__)
613#else
614#define DPRINT(fmt, ...) do { } while (0)
615#endif
616
617static int dts_version; /* = 0 */
618
619#define BEGIN_DEFAULT() if (dts_version == 0) { \
620 DPRINT("<INITIAL>\n"); \
621 BEGIN(INITIAL); \
622 } else { \
623 DPRINT("<V1>\n"); \
624 BEGIN(V1); \
625 }
626#line 627 "dtc-lexer.lex.c"
627
628#define INITIAL 0
629#define INCLUDE 1
630#define BYTESTRING 2
631#define PROPNODENAME 3
632#define V1 4
633
634#ifndef YY_NO_UNISTD_H
635/* Special case for "unistd.h", since it is non-ANSI. We include it way
636 * down here because we want the user's section 1 to have been scanned first.
637 * The user has a chance to override it with an option.
638 */
639#include <unistd.h>
640#endif
641
642#ifndef YY_EXTRA_TYPE
643#define YY_EXTRA_TYPE void *
644#endif
645
646static int yy_init_globals (void );
647
648/* Macros after this point can all be overridden by user definitions in
649 * section 1.
650 */
651
652#ifndef YY_SKIP_YYWRAP
653#ifdef __cplusplus
654extern "C" int yywrap (void );
655#else
656extern int yywrap (void );
657#endif
658#endif
659
660#ifndef yytext_ptr
661static void yy_flex_strncpy (char *,yyconst char *,int );
662#endif
663
664#ifdef YY_NEED_STRLEN
665static int yy_flex_strlen (yyconst char * );
666#endif
667
668#ifndef YY_NO_INPUT
669
670#ifdef __cplusplus
671static int yyinput (void );
672#else
673static int input (void );
674#endif
675
676#endif
677
678/* Amount of stuff to slurp up with each read. */
679#ifndef YY_READ_BUF_SIZE
680#define YY_READ_BUF_SIZE 8192
681#endif
682
683/* Copy whatever the last rule matched to the standard output. */
684#ifndef ECHO
685/* This used to be an fputs(), but since the string might contain NUL's,
686 * we now use fwrite().
687 */
688#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
689#endif
690
691/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
692 * is returned in "result".
693 */
694#ifndef YY_INPUT
695#define YY_INPUT(buf,result,max_size) \
696 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
697 { \
698 int c = '*'; \
699 size_t n; \
700 for ( n = 0; n < max_size && \
701 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
702 buf[n] = (char) c; \
703 if ( c == '\n' ) \
704 buf[n++] = (char) c; \
705 if ( c == EOF && ferror( yyin ) ) \
706 YY_FATAL_ERROR( "input in flex scanner failed" ); \
707 result = n; \
708 } \
709 else \
710 { \
711 errno=0; \
712 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
713 { \
714 if( errno != EINTR) \
715 { \
716 YY_FATAL_ERROR( "input in flex scanner failed" ); \
717 break; \
718 } \
719 errno=0; \
720 clearerr(yyin); \
721 } \
722 }\
723\
724
725#endif
726
727/* No semi-colon after return; correct usage is to write "yyterminate();" -
728 * we don't want an extra ';' after the "return" because that will cause
729 * some compilers to complain about unreachable statements.
730 */
731#ifndef yyterminate
732#define yyterminate() return YY_NULL
733#endif
734
735/* Number of entries by which start-condition stack grows. */
736#ifndef YY_START_STACK_INCR
737#define YY_START_STACK_INCR 25
738#endif
739
740/* Report a fatal error. */
741#ifndef YY_FATAL_ERROR
742#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
743#endif
744
745/* end tables serialization structures and prototypes */
746
747/* Default declaration of generated scanner - a define so the user can
748 * easily add parameters.
749 */
750#ifndef YY_DECL
751#define YY_DECL_IS_OURS 1
752
753extern int yylex (void);
754
755#define YY_DECL int yylex (void)
756#endif /* !YY_DECL */
757
758/* Code executed at the beginning of each rule, after yytext and yyleng
759 * have been set up.
760 */
761#ifndef YY_USER_ACTION
762#define YY_USER_ACTION
763#endif
764
765/* Code executed at the end of each rule. */
766#ifndef YY_BREAK
767#define YY_BREAK break;
768#endif
769
770#define YY_RULE_SETUP \
771 YY_USER_ACTION
772
773/** The main scanner function which does all the work.
774 */
775YY_DECL
776{
777 register yy_state_type yy_current_state;
778 register char *yy_cp, *yy_bp;
779 register int yy_act;
780
781#line 57 "dtc-lexer.l"
782
783#line 784 "dtc-lexer.lex.c"
784
785 if ( !(yy_init) )
786 {
787 (yy_init) = 1;
788
789#ifdef YY_USER_INIT
790 YY_USER_INIT;
791#endif
792
793 if ( ! (yy_start) )
794 (yy_start) = 1; /* first start state */
795
796 if ( ! yyin )
797 yyin = stdin;
798
799 if ( ! yyout )
800 yyout = stdout;
801
802 if ( ! YY_CURRENT_BUFFER ) {
803 yyensure_buffer_stack ();
804 YY_CURRENT_BUFFER_LVALUE =
805 yy_create_buffer(yyin,YY_BUF_SIZE );
806 }
807
808 yy_load_buffer_state( );
809 }
810
811 while ( 1 ) /* loops until end-of-file is reached */
812 {
813 yy_cp = (yy_c_buf_p);
814
815 /* Support of yytext. */
816 *yy_cp = (yy_hold_char);
817
818 /* yy_bp points to the position in yy_ch_buf of the start of
819 * the current run.
820 */
821 yy_bp = yy_cp;
822
823 yy_current_state = (yy_start);
824yy_match:
825 do
826 {
827 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
828 if ( yy_accept[yy_current_state] )
829 {
830 (yy_last_accepting_state) = yy_current_state;
831 (yy_last_accepting_cpos) = yy_cp;
832 }
833 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
834 {
835 yy_current_state = (int) yy_def[yy_current_state];
836 if ( yy_current_state >= 94 )
837 yy_c = yy_meta[(unsigned int) yy_c];
838 }
839 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
840 ++yy_cp;
841 }
842 while ( yy_base[yy_current_state] != 288 );
843
844yy_find_action:
845 yy_act = yy_accept[yy_current_state];
846 if ( yy_act == 0 )
847 { /* have to back up */
848 yy_cp = (yy_last_accepting_cpos);
849 yy_current_state = (yy_last_accepting_state);
850 yy_act = yy_accept[yy_current_state];
851 }
852
853 YY_DO_BEFORE_ACTION;
854
855 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
856 {
857 int yyl;
858 for ( yyl = 0; yyl < yyleng; ++yyl )
859 if ( yytext[yyl] == '\n' )
860
861 yylineno++;
862;
863 }
864
865do_action: /* This label is used only to access EOF actions. */
866
867 switch ( yy_act )
868 { /* beginning of action switch */
869 case 0: /* must back up */
870 /* undo the effects of YY_DO_BEFORE_ACTION */
871 *yy_cp = (yy_hold_char);
872 yy_cp = (yy_last_accepting_cpos);
873 yy_current_state = (yy_last_accepting_state);
874 goto yy_find_action;
875
876case 1:
877YY_RULE_SETUP
878#line 58 "dtc-lexer.l"
879BEGIN(INCLUDE);
880 YY_BREAK
881case 2:
882YY_RULE_SETUP
883#line 60 "dtc-lexer.l"
884{
885 yytext[strlen(yytext) - 1] = 0;
886 if (!push_input_file(yytext + 1)) {
887 /* Some unrecoverable error.*/
888 exit(1);
889 }
890 BEGIN_DEFAULT();
891 }
892 YY_BREAK
893case YY_STATE_EOF(INITIAL):
894case YY_STATE_EOF(INCLUDE):
895case YY_STATE_EOF(BYTESTRING):
896case YY_STATE_EOF(PROPNODENAME):
897case YY_STATE_EOF(V1):
898#line 70 "dtc-lexer.l"
899{
900 if (!pop_input_file()) {
901 yyterminate();
902 }
903 }
904 YY_BREAK
905case 3:
906/* rule 3 can match eol */
907YY_RULE_SETUP
908#line 76 "dtc-lexer.l"
909{
910 yylloc.filenum = srcpos_filenum;
911 yylloc.first_line = yylineno;
912 DPRINT("String: %s\n", yytext);
913 yylval.data = data_copy_escape_string(yytext+1,
914 yyleng-2);
915 yylloc.first_line = yylineno;
916 return DT_STRING;
917 }
918 YY_BREAK
919case 4:
920YY_RULE_SETUP
921#line 86 "dtc-lexer.l"
922{
923 yylloc.filenum = srcpos_filenum;
924 yylloc.first_line = yylineno;
925 DPRINT("Keyword: /dts-v1/\n");
926 dts_version = 1;
927 BEGIN_DEFAULT();
928 return DT_V1;
929 }
930 YY_BREAK
931case 5:
932YY_RULE_SETUP
933#line 95 "dtc-lexer.l"
934{
935 yylloc.filenum = srcpos_filenum;
936 yylloc.first_line = yylineno;
937 DPRINT("Keyword: /memreserve/\n");
938 BEGIN_DEFAULT();
939 return DT_MEMRESERVE;
940 }
941 YY_BREAK
942case 6:
943YY_RULE_SETUP
944#line 103 "dtc-lexer.l"
945{
946 yylloc.filenum = srcpos_filenum;
947 yylloc.first_line = yylineno;
948 DPRINT("Label: %s\n", yytext);
949 yylval.labelref = strdup(yytext);
950 yylval.labelref[yyleng-1] = '\0';
951 return DT_LABEL;
952 }
953 YY_BREAK
954case 7:
955YY_RULE_SETUP
956#line 112 "dtc-lexer.l"
957{
958 yylloc.filenum = srcpos_filenum;
959 yylloc.first_line = yylineno;
960 if (*yytext == 'b')
961 yylval.cbase = 2;
962 else if (*yytext == 'o')
963 yylval.cbase = 8;
964 else if (*yytext == 'd')
965 yylval.cbase = 10;
966 else
967 yylval.cbase = 16;
968 DPRINT("Base: %d\n", yylval.cbase);
969 return DT_BASE;
970 }
971 YY_BREAK
972case 8:
973YY_RULE_SETUP
974#line 127 "dtc-lexer.l"
975{
976 yylloc.filenum = srcpos_filenum;
977 yylloc.first_line = yylineno;
978 yylval.literal = strdup(yytext);
979 DPRINT("Literal: '%s'\n", yylval.literal);
980 return DT_LEGACYLITERAL;
981 }
982 YY_BREAK
983case 9:
984YY_RULE_SETUP
985#line 135 "dtc-lexer.l"
986{
987 yylloc.filenum = srcpos_filenum;
988 yylloc.first_line = yylineno;
989 yylval.literal = strdup(yytext);
990 DPRINT("Literal: '%s'\n", yylval.literal);
991 return DT_LITERAL;
992 }
993 YY_BREAK
994case 10:
995YY_RULE_SETUP
996#line 143 "dtc-lexer.l"
997{ /* label reference */
998 yylloc.filenum = srcpos_filenum;
999 yylloc.first_line = yylineno;
1000 DPRINT("Ref: %s\n", yytext+1);
1001 yylval.labelref = strdup(yytext+1);
1002 return DT_REF;
1003 }
1004 YY_BREAK
1005case 11:
1006YY_RULE_SETUP
1007#line 151 "dtc-lexer.l"
1008{ /* new-style path reference */
1009 yylloc.filenum = srcpos_filenum;
1010 yylloc.first_line = yylineno;
1011 yytext[yyleng-1] = '\0';
1012 DPRINT("Ref: %s\n", yytext+2);
1013 yylval.labelref = strdup(yytext+2);
1014 return DT_REF;
1015 }
1016 YY_BREAK
1017case 12:
1018YY_RULE_SETUP
1019#line 160 "dtc-lexer.l"
1020{ /* old-style path reference */
1021 yylloc.filenum = srcpos_filenum;
1022 yylloc.first_line = yylineno;
1023 DPRINT("Ref: %s\n", yytext+1);
1024 yylval.labelref = strdup(yytext+1);
1025 return DT_REF;
1026 }
1027 YY_BREAK
1028case 13:
1029YY_RULE_SETUP
1030#line 168 "dtc-lexer.l"
1031{
1032 yylloc.filenum = srcpos_filenum;
1033 yylloc.first_line = yylineno;
1034 yylval.byte = strtol(yytext, NULL, 16);
1035 DPRINT("Byte: %02x\n", (int)yylval.byte);
1036 return DT_BYTE;
1037 }
1038 YY_BREAK
1039case 14:
1040YY_RULE_SETUP
1041#line 176 "dtc-lexer.l"
1042{
1043 yylloc.filenum = srcpos_filenum;
1044 yylloc.first_line = yylineno;
1045 DPRINT("/BYTESTRING\n");
1046 BEGIN_DEFAULT();
1047 return ']';
1048 }
1049 YY_BREAK
1050case 15:
1051YY_RULE_SETUP
1052#line 184 "dtc-lexer.l"
1053{
1054 yylloc.filenum = srcpos_filenum;
1055 yylloc.first_line = yylineno;
1056 DPRINT("PropNodeName: %s\n", yytext);
1057 yylval.propnodename = strdup(yytext);
1058 BEGIN_DEFAULT();
1059 return DT_PROPNODENAME;
1060 }
1061 YY_BREAK
1062case 16:
1063/* rule 16 can match eol */
1064YY_RULE_SETUP
1065#line 194 "dtc-lexer.l"
1066/* eat whitespace */
1067 YY_BREAK
1068case 17:
1069/* rule 17 can match eol */
1070YY_RULE_SETUP
1071#line 196 "dtc-lexer.l"
1072{
1073 yylloc.filenum = srcpos_filenum;
1074 yylloc.first_line = yylineno;
1075 DPRINT("Comment: %s\n", yytext);
1076 /* eat comments */
1077 }
1078 YY_BREAK
1079case 18:
1080/* rule 18 can match eol */
1081YY_RULE_SETUP
1082#line 203 "dtc-lexer.l"
1083/* eat line comments */
1084 YY_BREAK
1085case 19:
1086YY_RULE_SETUP
1087#line 205 "dtc-lexer.l"
1088{
1089 yylloc.filenum = srcpos_filenum;
1090 yylloc.first_line = yylineno;
1091 DPRINT("Char: %c (\\x%02x)\n", yytext[0],
1092 (unsigned)yytext[0]);
1093 if (yytext[0] == '[') {
1094 DPRINT("<BYTESTRING>\n");
1095 BEGIN(BYTESTRING);
1096 }
1097 if ((yytext[0] == '{')
1098 || (yytext[0] == ';')) {
1099 DPRINT("<PROPNODENAME>\n");
1100 BEGIN(PROPNODENAME);
1101 }
1102 return yytext[0];
1103 }
1104 YY_BREAK
1105case 20:
1106YY_RULE_SETUP
1107#line 222 "dtc-lexer.l"
1108ECHO;
1109 YY_BREAK
1110#line 1111 "dtc-lexer.lex.c"
1111
1112 case YY_END_OF_BUFFER:
1113 {
1114 /* Amount of text matched not including the EOB char. */
1115 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1116
1117 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1118 *yy_cp = (yy_hold_char);
1119 YY_RESTORE_YY_MORE_OFFSET
1120
1121 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1122 {
1123 /* We're scanning a new file or input source. It's
1124 * possible that this happened because the user
1125 * just pointed yyin at a new source and called
1126 * yylex(). If so, then we have to assure
1127 * consistency between YY_CURRENT_BUFFER and our
1128 * globals. Here is the right place to do so, because
1129 * this is the first action (other than possibly a
1130 * back-up) that will match for the new input source.
1131 */
1132 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1133 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1134 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1135 }
1136
1137 /* Note that here we test for yy_c_buf_p "<=" to the position
1138 * of the first EOB in the buffer, since yy_c_buf_p will
1139 * already have been incremented past the NUL character
1140 * (since all states make transitions on EOB to the
1141 * end-of-buffer state). Contrast this with the test
1142 * in input().
1143 */
1144 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1145 { /* This was really a NUL. */
1146 yy_state_type yy_next_state;
1147
1148 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1149
1150 yy_current_state = yy_get_previous_state( );
1151
1152 /* Okay, we're now positioned to make the NUL
1153 * transition. We couldn't have
1154 * yy_get_previous_state() go ahead and do it
1155 * for us because it doesn't know how to deal
1156 * with the possibility of jamming (and we don't
1157 * want to build jamming into it because then it
1158 * will run more slowly).
1159 */
1160
1161 yy_next_state = yy_try_NUL_trans( yy_current_state );
1162
1163 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1164
1165 if ( yy_next_state )
1166 {
1167 /* Consume the NUL. */
1168 yy_cp = ++(yy_c_buf_p);
1169 yy_current_state = yy_next_state;
1170 goto yy_match;
1171 }
1172
1173 else
1174 {
1175 yy_cp = (yy_c_buf_p);
1176 goto yy_find_action;
1177 }
1178 }
1179
1180 else switch ( yy_get_next_buffer( ) )
1181 {
1182 case EOB_ACT_END_OF_FILE:
1183 {
1184 (yy_did_buffer_switch_on_eof) = 0;
1185
1186 if ( yywrap( ) )
1187 {
1188 /* Note: because we've taken care in
1189 * yy_get_next_buffer() to have set up
1190 * yytext, we can now set up
1191 * yy_c_buf_p so that if some total
1192 * hoser (like flex itself) wants to
1193 * call the scanner after we return the
1194 * YY_NULL, it'll still work - another
1195 * YY_NULL will get returned.
1196 */
1197 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1198
1199 yy_act = YY_STATE_EOF(YY_START);
1200 goto do_action;
1201 }
1202
1203 else
1204 {
1205 if ( ! (yy_did_buffer_switch_on_eof) )
1206 YY_NEW_FILE;
1207 }
1208 break;
1209 }
1210
1211 case EOB_ACT_CONTINUE_SCAN:
1212 (yy_c_buf_p) =
1213 (yytext_ptr) + yy_amount_of_matched_text;
1214
1215 yy_current_state = yy_get_previous_state( );
1216
1217 yy_cp = (yy_c_buf_p);
1218 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1219 goto yy_match;
1220
1221 case EOB_ACT_LAST_MATCH:
1222 (yy_c_buf_p) =
1223 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1224
1225 yy_current_state = yy_get_previous_state( );
1226
1227 yy_cp = (yy_c_buf_p);
1228 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1229 goto yy_find_action;
1230 }
1231 break;
1232 }
1233
1234 default:
1235 YY_FATAL_ERROR(
1236 "fatal flex scanner internal error--no action found" );
1237 } /* end of action switch */
1238 } /* end of scanning one token */
1239} /* end of yylex */
1240
1241/* yy_get_next_buffer - try to read in a new buffer
1242 *
1243 * Returns a code representing an action:
1244 * EOB_ACT_LAST_MATCH -
1245 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1246 * EOB_ACT_END_OF_FILE - end of file
1247 */
1248static int yy_get_next_buffer (void)
1249{
1250 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1251 register char *source = (yytext_ptr);
1252 register int number_to_move, i;
1253 int ret_val;
1254
1255 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1256 YY_FATAL_ERROR(
1257 "fatal flex scanner internal error--end of buffer missed" );
1258
1259 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1260 { /* Don't try to fill the buffer, so this is an EOF. */
1261 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1262 {
1263 /* We matched a single character, the EOB, so
1264 * treat this as a final EOF.
1265 */
1266 return EOB_ACT_END_OF_FILE;
1267 }
1268
1269 else
1270 {
1271 /* We matched some text prior to the EOB, first
1272 * process it.
1273 */
1274 return EOB_ACT_LAST_MATCH;
1275 }
1276 }
1277
1278 /* Try to read more data. */
1279
1280 /* First move last chars to start of buffer. */
1281 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1282
1283 for ( i = 0; i < number_to_move; ++i )
1284 *(dest++) = *(source++);
1285
1286 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1287 /* don't do the read, it's not guaranteed to return an EOF,
1288 * just force an EOF
1289 */
1290 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1291
1292 else
1293 {
1294 int num_to_read =
1295 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1296
1297 while ( num_to_read <= 0 )
1298 { /* Not enough room in the buffer - grow it. */
1299
1300 /* just a shorter name for the current buffer */
1301 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1302
1303 int yy_c_buf_p_offset =
1304 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1305
1306 if ( b->yy_is_our_buffer )
1307 {
1308 int new_size = b->yy_buf_size * 2;
1309
1310 if ( new_size <= 0 )
1311 b->yy_buf_size += b->yy_buf_size / 8;
1312 else
1313 b->yy_buf_size *= 2;
1314
1315 b->yy_ch_buf = (char *)
1316 /* Include room in for 2 EOB chars. */
1317 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1318 }
1319 else
1320 /* Can't grow it, we don't own it. */
1321 b->yy_ch_buf = 0;
1322
1323 if ( ! b->yy_ch_buf )
1324 YY_FATAL_ERROR(
1325 "fatal error - scanner input buffer overflow" );
1326
1327 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1328
1329 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1330 number_to_move - 1;
1331
1332 }
1333
1334 if ( num_to_read > YY_READ_BUF_SIZE )
1335 num_to_read = YY_READ_BUF_SIZE;
1336
1337 /* Read in more data. */
1338 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1339 (yy_n_chars), (size_t) num_to_read );
1340
1341 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1342 }
1343
1344 if ( (yy_n_chars) == 0 )
1345 {
1346 if ( number_to_move == YY_MORE_ADJ )
1347 {
1348 ret_val = EOB_ACT_END_OF_FILE;
1349 yyrestart(yyin );
1350 }
1351
1352 else
1353 {
1354 ret_val = EOB_ACT_LAST_MATCH;
1355 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1356 YY_BUFFER_EOF_PENDING;
1357 }
1358 }
1359
1360 else
1361 ret_val = EOB_ACT_CONTINUE_SCAN;
1362
1363 (yy_n_chars) += number_to_move;
1364 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1365 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1366
1367 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1368
1369 return ret_val;
1370}
1371
1372/* yy_get_previous_state - get the state just before the EOB char was reached */
1373
1374 static yy_state_type yy_get_previous_state (void)
1375{
1376 register yy_state_type yy_current_state;
1377 register char *yy_cp;
1378
1379 yy_current_state = (yy_start);
1380
1381 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1382 {
1383 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1384 if ( yy_accept[yy_current_state] )
1385 {
1386 (yy_last_accepting_state) = yy_current_state;
1387 (yy_last_accepting_cpos) = yy_cp;
1388 }
1389 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1390 {
1391 yy_current_state = (int) yy_def[yy_current_state];
1392 if ( yy_current_state >= 94 )
1393 yy_c = yy_meta[(unsigned int) yy_c];
1394 }
1395 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1396 }
1397
1398 return yy_current_state;
1399}
1400
1401/* yy_try_NUL_trans - try to make a transition on the NUL character
1402 *
1403 * synopsis
1404 * next_state = yy_try_NUL_trans( current_state );
1405 */
1406 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1407{
1408 register int yy_is_jam;
1409 register char *yy_cp = (yy_c_buf_p);
1410
1411 register YY_CHAR yy_c = 1;
1412 if ( yy_accept[yy_current_state] )
1413 {
1414 (yy_last_accepting_state) = yy_current_state;
1415 (yy_last_accepting_cpos) = yy_cp;
1416 }
1417 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1418 {
1419 yy_current_state = (int) yy_def[yy_current_state];
1420 if ( yy_current_state >= 94 )
1421 yy_c = yy_meta[(unsigned int) yy_c];
1422 }
1423 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1424 yy_is_jam = (yy_current_state == 93);
1425
1426 return yy_is_jam ? 0 : yy_current_state;
1427}
1428
1429#ifndef YY_NO_INPUT
1430#ifdef __cplusplus
1431 static int yyinput (void)
1432#else
1433 static int input (void)
1434#endif
1435
1436{
1437 int c;
1438
1439 *(yy_c_buf_p) = (yy_hold_char);
1440
1441 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1442 {
1443 /* yy_c_buf_p now points to the character we want to return.
1444 * If this occurs *before* the EOB characters, then it's a
1445 * valid NUL; if not, then we've hit the end of the buffer.
1446 */
1447 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1448 /* This was really a NUL. */
1449 *(yy_c_buf_p) = '\0';
1450
1451 else
1452 { /* need more input */
1453 int offset = (yy_c_buf_p) - (yytext_ptr);
1454 ++(yy_c_buf_p);
1455
1456 switch ( yy_get_next_buffer( ) )
1457 {
1458 case EOB_ACT_LAST_MATCH:
1459 /* This happens because yy_g_n_b()
1460 * sees that we've accumulated a
1461 * token and flags that we need to
1462 * try matching the token before
1463 * proceeding. But for input(),
1464 * there's no matching to consider.
1465 * So convert the EOB_ACT_LAST_MATCH
1466 * to EOB_ACT_END_OF_FILE.
1467 */
1468
1469 /* Reset buffer status. */
1470 yyrestart(yyin );
1471
1472 /*FALLTHROUGH*/
1473
1474 case EOB_ACT_END_OF_FILE:
1475 {
1476 if ( yywrap( ) )
1477 return EOF;
1478
1479 if ( ! (yy_did_buffer_switch_on_eof) )
1480 YY_NEW_FILE;
1481#ifdef __cplusplus
1482 return yyinput();
1483#else
1484 return input();
1485#endif
1486 }
1487
1488 case EOB_ACT_CONTINUE_SCAN:
1489 (yy_c_buf_p) = (yytext_ptr) + offset;
1490 break;
1491 }
1492 }
1493 }
1494
1495 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1496 *(yy_c_buf_p) = '\0'; /* preserve yytext */
1497 (yy_hold_char) = *++(yy_c_buf_p);
1498
1499 if ( c == '\n' )
1500
1501 yylineno++;
1502;
1503
1504 return c;
1505}
1506#endif /* ifndef YY_NO_INPUT */
1507
1508/** Immediately switch to a different input stream.
1509 * @param input_file A readable stream.
1510 *
1511 * @note This function does not reset the start condition to @c INITIAL .
1512 */
1513 void yyrestart (FILE * input_file )
1514{
1515
1516 if ( ! YY_CURRENT_BUFFER ){
1517 yyensure_buffer_stack ();
1518 YY_CURRENT_BUFFER_LVALUE =
1519 yy_create_buffer(yyin,YY_BUF_SIZE );
1520 }
1521
1522 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1523 yy_load_buffer_state( );
1524}
1525
1526/** Switch to a different input buffer.
1527 * @param new_buffer The new input buffer.
1528 *
1529 */
1530 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1531{
1532
1533 /* TODO. We should be able to replace this entire function body
1534 * with
1535 * yypop_buffer_state();
1536 * yypush_buffer_state(new_buffer);
1537 */
1538 yyensure_buffer_stack ();
1539 if ( YY_CURRENT_BUFFER == new_buffer )
1540 return;
1541
1542 if ( YY_CURRENT_BUFFER )
1543 {
1544 /* Flush out information for old buffer. */
1545 *(yy_c_buf_p) = (yy_hold_char);
1546 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1547 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1548 }
1549
1550 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1551 yy_load_buffer_state( );
1552
1553 /* We don't actually know whether we did this switch during
1554 * EOF (yywrap()) processing, but the only time this flag
1555 * is looked at is after yywrap() is called, so it's safe
1556 * to go ahead and always set it.
1557 */
1558 (yy_did_buffer_switch_on_eof) = 1;
1559}
1560
1561static void yy_load_buffer_state (void)
1562{
1563 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1564 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1565 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1566 (yy_hold_char) = *(yy_c_buf_p);
1567}
1568
1569/** Allocate and initialize an input buffer state.
1570 * @param file A readable stream.
1571 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1572 *
1573 * @return the allocated buffer state.
1574 */
1575 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1576{
1577 YY_BUFFER_STATE b;
1578
1579 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1580 if ( ! b )
1581 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1582
1583 b->yy_buf_size = size;
1584
1585 /* yy_ch_buf has to be 2 characters longer than the size given because
1586 * we need to put in 2 end-of-buffer characters.
1587 */
1588 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1589 if ( ! b->yy_ch_buf )
1590 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1591
1592 b->yy_is_our_buffer = 1;
1593
1594 yy_init_buffer(b,file );
1595
1596 return b;
1597}
1598
1599/** Destroy the buffer.
1600 * @param b a buffer created with yy_create_buffer()
1601 *
1602 */
1603 void yy_delete_buffer (YY_BUFFER_STATE b )
1604{
1605
1606 if ( ! b )
1607 return;
1608
1609 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1610 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1611
1612 if ( b->yy_is_our_buffer )
1613 yyfree((void *) b->yy_ch_buf );
1614
1615 yyfree((void *) b );
1616}
1617
1618#ifndef __cplusplus
1619extern int isatty (int );
1620#endif /* __cplusplus */
1621
1622/* Initializes or reinitializes a buffer.
1623 * This function is sometimes called more than once on the same buffer,
1624 * such as during a yyrestart() or at EOF.
1625 */
1626 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1627
1628{
1629 int oerrno = errno;
1630
1631 yy_flush_buffer(b );
1632
1633 b->yy_input_file = file;
1634 b->yy_fill_buffer = 1;
1635
1636 /* If b is the current buffer, then yy_init_buffer was _probably_
1637 * called from yyrestart() or through yy_get_next_buffer.
1638 * In that case, we don't want to reset the lineno or column.
1639 */
1640 if (b != YY_CURRENT_BUFFER){
1641 b->yy_bs_lineno = 1;
1642 b->yy_bs_column = 0;
1643 }
1644
1645 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1646
1647 errno = oerrno;
1648}
1649
1650/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1651 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1652 *
1653 */
1654 void yy_flush_buffer (YY_BUFFER_STATE b )
1655{
1656 if ( ! b )
1657 return;
1658
1659 b->yy_n_chars = 0;
1660
1661 /* We always need two end-of-buffer characters. The first causes
1662 * a transition to the end-of-buffer state. The second causes
1663 * a jam in that state.
1664 */
1665 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1666 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1667
1668 b->yy_buf_pos = &b->yy_ch_buf[0];
1669
1670 b->yy_at_bol = 1;
1671 b->yy_buffer_status = YY_BUFFER_NEW;
1672
1673 if ( b == YY_CURRENT_BUFFER )
1674 yy_load_buffer_state( );
1675}
1676
1677/** Pushes the new state onto the stack. The new state becomes
1678 * the current state. This function will allocate the stack
1679 * if necessary.
1680 * @param new_buffer The new state.
1681 *
1682 */
1683void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1684{
1685 if (new_buffer == NULL)
1686 return;
1687
1688 yyensure_buffer_stack();
1689
1690 /* This block is copied from yy_switch_to_buffer. */
1691 if ( YY_CURRENT_BUFFER )
1692 {
1693 /* Flush out information for old buffer. */
1694 *(yy_c_buf_p) = (yy_hold_char);
1695 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1696 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1697 }
1698
1699 /* Only push if top exists. Otherwise, replace top. */
1700 if (YY_CURRENT_BUFFER)
1701 (yy_buffer_stack_top)++;
1702 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1703
1704 /* copied from yy_switch_to_buffer. */
1705 yy_load_buffer_state( );
1706 (yy_did_buffer_switch_on_eof) = 1;
1707}
1708
1709/** Removes and deletes the top of the stack, if present.
1710 * The next element becomes the new top.
1711 *
1712 */
1713void yypop_buffer_state (void)
1714{
1715 if (!YY_CURRENT_BUFFER)
1716 return;
1717
1718 yy_delete_buffer(YY_CURRENT_BUFFER );
1719 YY_CURRENT_BUFFER_LVALUE = NULL;
1720 if ((yy_buffer_stack_top) > 0)
1721 --(yy_buffer_stack_top);
1722
1723 if (YY_CURRENT_BUFFER) {
1724 yy_load_buffer_state( );
1725 (yy_did_buffer_switch_on_eof) = 1;
1726 }
1727}
1728
1729/* Allocates the stack if it does not exist.
1730 * Guarantees space for at least one push.
1731 */
1732static void yyensure_buffer_stack (void)
1733{
1734 int num_to_alloc;
1735
1736 if (!(yy_buffer_stack)) {
1737
1738 /* First allocation is just for 2 elements, since we don't know if this
1739 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1740 * immediate realloc on the next call.
1741 */
1742 num_to_alloc = 1;
1743 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1744 (num_to_alloc * sizeof(struct yy_buffer_state*)
1745 );
1746
1747 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1748
1749 (yy_buffer_stack_max) = num_to_alloc;
1750 (yy_buffer_stack_top) = 0;
1751 return;
1752 }
1753
1754 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1755
1756 /* Increase the buffer to prepare for a possible push. */
1757 int grow_size = 8 /* arbitrary grow size */;
1758
1759 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1760 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1761 ((yy_buffer_stack),
1762 num_to_alloc * sizeof(struct yy_buffer_state*)
1763 );
1764
1765 /* zero only the new slots.*/
1766 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1767 (yy_buffer_stack_max) = num_to_alloc;
1768 }
1769}
1770
1771/** Setup the input buffer state to scan directly from a user-specified character buffer.
1772 * @param base the character buffer
1773 * @param size the size in bytes of the character buffer
1774 *
1775 * @return the newly allocated buffer state object.
1776 */
1777YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1778{
1779 YY_BUFFER_STATE b;
1780
1781 if ( size < 2 ||
1782 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1783 base[size-1] != YY_END_OF_BUFFER_CHAR )
1784 /* They forgot to leave room for the EOB's. */
1785 return 0;
1786
1787 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1788 if ( ! b )
1789 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1790
1791 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1792 b->yy_buf_pos = b->yy_ch_buf = base;
1793 b->yy_is_our_buffer = 0;
1794 b->yy_input_file = 0;
1795 b->yy_n_chars = b->yy_buf_size;
1796 b->yy_is_interactive = 0;
1797 b->yy_at_bol = 1;
1798 b->yy_fill_buffer = 0;
1799 b->yy_buffer_status = YY_BUFFER_NEW;
1800
1801 yy_switch_to_buffer(b );
1802
1803 return b;
1804}
1805
1806/** Setup the input buffer state to scan a string. The next call to yylex() will
1807 * scan from a @e copy of @a str.
1808 * @param yystr a NUL-terminated string to scan
1809 *
1810 * @return the newly allocated buffer state object.
1811 * @note If you want to scan bytes that may contain NUL values, then use
1812 * yy_scan_bytes() instead.
1813 */
1814YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1815{
1816
1817 return yy_scan_bytes(yystr,strlen(yystr) );
1818}
1819
1820/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1821 * scan from a @e copy of @a bytes.
1822 * @param bytes the byte buffer to scan
1823 * @param len the number of bytes in the buffer pointed to by @a bytes.
1824 *
1825 * @return the newly allocated buffer state object.
1826 */
1827YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1828{
1829 YY_BUFFER_STATE b;
1830 char *buf;
1831 yy_size_t n;
1832 int i;
1833
1834 /* Get memory for full buffer, including space for trailing EOB's. */
1835 n = _yybytes_len + 2;
1836 buf = (char *) yyalloc(n );
1837 if ( ! buf )
1838 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1839
1840 for ( i = 0; i < _yybytes_len; ++i )
1841 buf[i] = yybytes[i];
1842
1843 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1844
1845 b = yy_scan_buffer(buf,n );
1846 if ( ! b )
1847 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1848
1849 /* It's okay to grow etc. this buffer, and we should throw it
1850 * away when we're done.
1851 */
1852 b->yy_is_our_buffer = 1;
1853
1854 return b;
1855}
1856
1857#ifndef YY_EXIT_FAILURE
1858#define YY_EXIT_FAILURE 2
1859#endif
1860
1861static void yy_fatal_error (yyconst char* msg )
1862{
1863 (void) fprintf( stderr, "%s\n", msg );
1864 exit( YY_EXIT_FAILURE );
1865}
1866
1867/* Redefine yyless() so it works in section 3 code. */
1868
1869#undef yyless
1870#define yyless(n) \
1871 do \
1872 { \
1873 /* Undo effects of setting up yytext. */ \
1874 int yyless_macro_arg = (n); \
1875 YY_LESS_LINENO(yyless_macro_arg);\
1876 yytext[yyleng] = (yy_hold_char); \
1877 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1878 (yy_hold_char) = *(yy_c_buf_p); \
1879 *(yy_c_buf_p) = '\0'; \
1880 yyleng = yyless_macro_arg; \
1881 } \
1882 while ( 0 )
1883
1884/* Accessor methods (get/set functions) to struct members. */
1885
1886/** Get the current line number.
1887 *
1888 */
1889int yyget_lineno (void)
1890{
1891
1892 return yylineno;
1893}
1894
1895/** Get the input stream.
1896 *
1897 */
1898FILE *yyget_in (void)
1899{
1900 return yyin;
1901}
1902
1903/** Get the output stream.
1904 *
1905 */
1906FILE *yyget_out (void)
1907{
1908 return yyout;
1909}
1910
1911/** Get the length of the current token.
1912 *
1913 */
1914int yyget_leng (void)
1915{
1916 return yyleng;
1917}
1918
1919/** Get the current token.
1920 *
1921 */
1922
1923char *yyget_text (void)
1924{
1925 return yytext;
1926}
1927
1928/** Set the current line number.
1929 * @param line_number
1930 *
1931 */
1932void yyset_lineno (int line_number )
1933{
1934
1935 yylineno = line_number;
1936}
1937
1938/** Set the input stream. This does not discard the current
1939 * input buffer.
1940 * @param in_str A readable stream.
1941 *
1942 * @see yy_switch_to_buffer
1943 */
1944void yyset_in (FILE * in_str )
1945{
1946 yyin = in_str ;
1947}
1948
1949void yyset_out (FILE * out_str )
1950{
1951 yyout = out_str ;
1952}
1953
1954int yyget_debug (void)
1955{
1956 return yy_flex_debug;
1957}
1958
1959void yyset_debug (int bdebug )
1960{
1961 yy_flex_debug = bdebug ;
1962}
1963
1964static int yy_init_globals (void)
1965{
1966 /* Initialization is the same as for the non-reentrant scanner.
1967 * This function is called from yylex_destroy(), so don't allocate here.
1968 */
1969
1970 /* We do not touch yylineno unless the option is enabled. */
1971 yylineno = 1;
1972
1973 (yy_buffer_stack) = 0;
1974 (yy_buffer_stack_top) = 0;
1975 (yy_buffer_stack_max) = 0;
1976 (yy_c_buf_p) = (char *) 0;
1977 (yy_init) = 0;
1978 (yy_start) = 0;
1979
1980/* Defined in main.c */
1981#ifdef YY_STDINIT
1982 yyin = stdin;
1983 yyout = stdout;
1984#else
1985 yyin = (FILE *) 0;
1986 yyout = (FILE *) 0;
1987#endif
1988
1989 /* For future reference: Set errno on error, since we are called by
1990 * yylex_init()
1991 */
1992 return 0;
1993}
1994
1995/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1996int yylex_destroy (void)
1997{
1998
1999 /* Pop the buffer stack, destroying each element. */
2000 while(YY_CURRENT_BUFFER){
2001 yy_delete_buffer(YY_CURRENT_BUFFER );
2002 YY_CURRENT_BUFFER_LVALUE = NULL;
2003 yypop_buffer_state();
2004 }
2005
2006 /* Destroy the stack itself. */
2007 yyfree((yy_buffer_stack) );
2008 (yy_buffer_stack) = NULL;
2009
2010 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2011 * yylex() is called, initialization will occur. */
2012 yy_init_globals( );
2013
2014 return 0;
2015}
2016
2017/*
2018 * Internal utility routines.
2019 */
2020
2021#ifndef yytext_ptr
2022static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2023{
2024 register int i;
2025 for ( i = 0; i < n; ++i )
2026 s1[i] = s2[i];
2027}
2028#endif
2029
2030#ifdef YY_NEED_STRLEN
2031static int yy_flex_strlen (yyconst char * s )
2032{
2033 register int n;
2034 for ( n = 0; s[n]; ++n )
2035 ;
2036
2037 return n;
2038}
2039#endif
2040
2041void *yyalloc (yy_size_t size )
2042{
2043 return (void *) malloc( size );
2044}
2045
2046void *yyrealloc (void * ptr, yy_size_t size )
2047{
2048 /* The cast to (char *) in the following accommodates both
2049 * implementations that use char* generic pointers, and those
2050 * that use void* generic pointers. It works with the latter
2051 * because both ANSI C and C++ allow castless assignment from
2052 * any pointer type to void*, and deal with argument conversions
2053 * as though doing an assignment.
2054 */
2055 return (void *) realloc( (char *) ptr, size );
2056}
2057
2058void yyfree (void * ptr )
2059{
2060 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2061}
2062
2063#define YYTABLES_NAME "yytables"
2064
2065#line 222 "dtc-lexer.l"
2066
2067
2068
2069
2070/*
2071 * Stack of nested include file contexts.
2072 */
2073
2074struct incl_file {
2075 int filenum;
2076 FILE *file;
2077 YY_BUFFER_STATE yy_prev_buf;
2078 int yy_prev_lineno;
2079 struct incl_file *prev;
2080};
2081
2082struct incl_file *incl_file_stack;
2083
2084
2085/*
2086 * Detect infinite include recursion.
2087 */
2088#define MAX_INCLUDE_DEPTH (100)
2089
2090static int incl_depth = 0;
2091
2092
2093int push_input_file(const char *filename)
2094{
2095 FILE *f;
2096 struct incl_file *incl_file;
2097
2098 if (!filename) {
2099 yyerror("No include file name given.");
2100 return 0;
2101 }
2102
2103 if (incl_depth++ >= MAX_INCLUDE_DEPTH) {
2104 yyerror("Includes nested too deeply");
2105 return 0;
2106 }
2107
2108 f = dtc_open_file(filename);
2109
2110 incl_file = malloc(sizeof(struct incl_file));
2111 if (!incl_file) {
2112 yyerror("Can not allocate include file space.");
2113 return 0;
2114 }
2115
2116 /*
2117 * Save current context.
2118 */
2119 incl_file->yy_prev_buf = YY_CURRENT_BUFFER;
2120 incl_file->yy_prev_lineno = yylineno;
2121 incl_file->filenum = srcpos_filenum;
2122 incl_file->file = yyin;
2123 incl_file->prev = incl_file_stack;
2124
2125 incl_file_stack = incl_file;
2126
2127 /*
2128 * Establish new context.
2129 */
2130 srcpos_filenum = lookup_file_name(filename, 0);
2131 yylineno = 1;
2132 yyin = f;
2133 yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
2134
2135 return 1;
2136}
2137
2138
2139int pop_input_file(void)
2140{
2141 struct incl_file *incl_file;
2142
2143 if (incl_file_stack == 0)
2144 return 0;
2145
2146 fclose(yyin);
2147
2148 /*
2149 * Pop.
2150 */
2151 --incl_depth;
2152 incl_file = incl_file_stack;
2153 incl_file_stack = incl_file->prev;
2154
2155 /*
2156 * Recover old context.
2157 */
2158 yy_delete_buffer(YY_CURRENT_BUFFER);
2159 yy_switch_to_buffer(incl_file->yy_prev_buf);
2160 yylineno = incl_file->yy_prev_lineno;
2161 srcpos_filenum = incl_file->filenum;
2162 yyin = incl_file->file;
2163
2164 /*
2165 * Free old state.
2166 */
2167 free(incl_file);
2168
2169 if (YY_CURRENT_BUFFER == 0)
2170 return 0;
2171
2172 return 1;
2173}
2174
diff --git a/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped b/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped
new file mode 100644
index 000000000000..28e6ec0296a1
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc-parser.tab.c_shipped
@@ -0,0 +1,1983 @@
1/* A Bison parser, made by GNU Bison 2.3. */
2
3/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
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, or (at your option)
11 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
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
22
23/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
32
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
38
39/* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
45
46/* Identify Bison output. */
47#define YYBISON 1
48
49/* Bison version. */
50#define YYBISON_VERSION "2.3"
51
52/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
54
55/* Pure parsers. */
56#define YYPURE 0
57
58/* Using locations. */
59#define YYLSP_NEEDED 1
60
61
62
63/* Tokens. */
64#ifndef YYTOKENTYPE
65# define YYTOKENTYPE
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
67 know about them. */
68 enum yytokentype {
69 DT_V1 = 258,
70 DT_MEMRESERVE = 259,
71 DT_PROPNODENAME = 260,
72 DT_LITERAL = 261,
73 DT_LEGACYLITERAL = 262,
74 DT_BASE = 263,
75 DT_BYTE = 264,
76 DT_STRING = 265,
77 DT_LABEL = 266,
78 DT_REF = 267
79 };
80#endif
81/* Tokens. */
82#define DT_V1 258
83#define DT_MEMRESERVE 259
84#define DT_PROPNODENAME 260
85#define DT_LITERAL 261
86#define DT_LEGACYLITERAL 262
87#define DT_BASE 263
88#define DT_BYTE 264
89#define DT_STRING 265
90#define DT_LABEL 266
91#define DT_REF 267
92
93
94
95
96/* Copy the first part of user declarations. */
97#line 23 "dtc-parser.y"
98
99#include "dtc.h"
100#include "srcpos.h"
101
102int yylex(void);
103unsigned long long eval_literal(const char *s, int base, int bits);
104
105extern struct boot_info *the_boot_info;
106
107
108
109/* Enabling traces. */
110#ifndef YYDEBUG
111# define YYDEBUG 0
112#endif
113
114/* Enabling verbose error messages. */
115#ifdef YYERROR_VERBOSE
116# undef YYERROR_VERBOSE
117# define YYERROR_VERBOSE 1
118#else
119# define YYERROR_VERBOSE 0
120#endif
121
122/* Enabling the token table. */
123#ifndef YYTOKEN_TABLE
124# define YYTOKEN_TABLE 0
125#endif
126
127#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
128typedef union YYSTYPE
129#line 34 "dtc-parser.y"
130{
131 char *propnodename;
132 char *literal;
133 char *labelref;
134 unsigned int cbase;
135 u8 byte;
136 struct data data;
137
138 u64 addr;
139 cell_t cell;
140 struct property *prop;
141 struct property *proplist;
142 struct node *node;
143 struct node *nodelist;
144 struct reserve_info *re;
145}
146/* Line 187 of yacc.c. */
147#line 148 "dtc-parser.tab.c"
148 YYSTYPE;
149# define yystype YYSTYPE /* obsolescent; will be withdrawn */
150# define YYSTYPE_IS_DECLARED 1
151# define YYSTYPE_IS_TRIVIAL 1
152#endif
153
154#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
155typedef struct YYLTYPE
156{
157 int first_line;
158 int first_column;
159 int last_line;
160 int last_column;
161} YYLTYPE;
162# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
163# define YYLTYPE_IS_DECLARED 1
164# define YYLTYPE_IS_TRIVIAL 1
165#endif
166
167
168/* Copy the second part of user declarations. */
169
170
171/* Line 216 of yacc.c. */
172#line 173 "dtc-parser.tab.c"
173
174#ifdef short
175# undef short
176#endif
177
178#ifdef YYTYPE_UINT8
179typedef YYTYPE_UINT8 yytype_uint8;
180#else
181typedef unsigned char yytype_uint8;
182#endif
183
184#ifdef YYTYPE_INT8
185typedef YYTYPE_INT8 yytype_int8;
186#elif (defined __STDC__ || defined __C99__FUNC__ \
187 || defined __cplusplus || defined _MSC_VER)
188typedef signed char yytype_int8;
189#else
190typedef short int yytype_int8;
191#endif
192
193#ifdef YYTYPE_UINT16
194typedef YYTYPE_UINT16 yytype_uint16;
195#else
196typedef unsigned short int yytype_uint16;
197#endif
198
199#ifdef YYTYPE_INT16
200typedef YYTYPE_INT16 yytype_int16;
201#else
202typedef short int yytype_int16;
203#endif
204
205#ifndef YYSIZE_T
206# ifdef __SIZE_TYPE__
207# define YYSIZE_T __SIZE_TYPE__
208# elif defined size_t
209# define YYSIZE_T size_t
210# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
211 || defined __cplusplus || defined _MSC_VER)
212# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
213# define YYSIZE_T size_t
214# else
215# define YYSIZE_T unsigned int
216# endif
217#endif
218
219#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
220
221#ifndef YY_
222# if YYENABLE_NLS
223# if ENABLE_NLS
224# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
225# define YY_(msgid) dgettext ("bison-runtime", msgid)
226# endif
227# endif
228# ifndef YY_
229# define YY_(msgid) msgid
230# endif
231#endif
232
233/* Suppress unused-variable warnings by "using" E. */
234#if ! defined lint || defined __GNUC__
235# define YYUSE(e) ((void) (e))
236#else
237# define YYUSE(e) /* empty */
238#endif
239
240/* Identity function, used to suppress warnings about constant conditions. */
241#ifndef lint
242# define YYID(n) (n)
243#else
244#if (defined __STDC__ || defined __C99__FUNC__ \
245 || defined __cplusplus || defined _MSC_VER)
246static int
247YYID (int i)
248#else
249static int
250YYID (i)
251 int i;
252#endif
253{
254 return i;
255}
256#endif
257
258#if ! defined yyoverflow || YYERROR_VERBOSE
259
260/* The parser invokes alloca or malloc; define the necessary symbols. */
261
262# ifdef YYSTACK_USE_ALLOCA
263# if YYSTACK_USE_ALLOCA
264# ifdef __GNUC__
265# define YYSTACK_ALLOC __builtin_alloca
266# elif defined __BUILTIN_VA_ARG_INCR
267# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
268# elif defined _AIX
269# define YYSTACK_ALLOC __alloca
270# elif defined _MSC_VER
271# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
272# define alloca _alloca
273# else
274# define YYSTACK_ALLOC alloca
275# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
276 || defined __cplusplus || defined _MSC_VER)
277# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
278# ifndef _STDLIB_H
279# define _STDLIB_H 1
280# endif
281# endif
282# endif
283# endif
284# endif
285
286# ifdef YYSTACK_ALLOC
287 /* Pacify GCC's `empty if-body' warning. */
288# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
289# ifndef YYSTACK_ALLOC_MAXIMUM
290 /* The OS might guarantee only one guard page at the bottom of the stack,
291 and a page size can be as small as 4096 bytes. So we cannot safely
292 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
293 to allow for a few compiler-allocated temporary stack slots. */
294# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
295# endif
296# else
297# define YYSTACK_ALLOC YYMALLOC
298# define YYSTACK_FREE YYFREE
299# ifndef YYSTACK_ALLOC_MAXIMUM
300# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
301# endif
302# if (defined __cplusplus && ! defined _STDLIB_H \
303 && ! ((defined YYMALLOC || defined malloc) \
304 && (defined YYFREE || defined free)))
305# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
306# ifndef _STDLIB_H
307# define _STDLIB_H 1
308# endif
309# endif
310# ifndef YYMALLOC
311# define YYMALLOC malloc
312# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
313 || defined __cplusplus || defined _MSC_VER)
314void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
315# endif
316# endif
317# ifndef YYFREE
318# define YYFREE free
319# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
320 || defined __cplusplus || defined _MSC_VER)
321void free (void *); /* INFRINGES ON USER NAME SPACE */
322# endif
323# endif
324# endif
325#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
326
327
328#if (! defined yyoverflow \
329 && (! defined __cplusplus \
330 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
331 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
332
333/* A type that is properly aligned for any stack member. */
334union yyalloc
335{
336 yytype_int16 yyss;
337 YYSTYPE yyvs;
338 YYLTYPE yyls;
339};
340
341/* The size of the maximum gap between one aligned stack and the next. */
342# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
343
344/* The size of an array large to enough to hold all stacks, each with
345 N elements. */
346# define YYSTACK_BYTES(N) \
347 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
348 + 2 * YYSTACK_GAP_MAXIMUM)
349
350/* Copy COUNT objects from FROM to TO. The source and destination do
351 not overlap. */
352# ifndef YYCOPY
353# if defined __GNUC__ && 1 < __GNUC__
354# define YYCOPY(To, From, Count) \
355 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
356# else
357# define YYCOPY(To, From, Count) \
358 do \
359 { \
360 YYSIZE_T yyi; \
361 for (yyi = 0; yyi < (Count); yyi++) \
362 (To)[yyi] = (From)[yyi]; \
363 } \
364 while (YYID (0))
365# endif
366# endif
367
368/* Relocate STACK from its old location to the new one. The
369 local variables YYSIZE and YYSTACKSIZE give the old and new number of
370 elements in the stack, and YYPTR gives the new location of the
371 stack. Advance YYPTR to a properly aligned location for the next
372 stack. */
373# define YYSTACK_RELOCATE(Stack) \
374 do \
375 { \
376 YYSIZE_T yynewbytes; \
377 YYCOPY (&yyptr->Stack, Stack, yysize); \
378 Stack = &yyptr->Stack; \
379 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
380 yyptr += yynewbytes / sizeof (*yyptr); \
381 } \
382 while (YYID (0))
383
384#endif
385
386/* YYFINAL -- State number of the termination state. */
387#define YYFINAL 9
388/* YYLAST -- Last index in YYTABLE. */
389#define YYLAST 60
390
391/* YYNTOKENS -- Number of terminals. */
392#define YYNTOKENS 24
393/* YYNNTS -- Number of nonterminals. */
394#define YYNNTS 20
395/* YYNRULES -- Number of rules. */
396#define YYNRULES 43
397/* YYNRULES -- Number of states. */
398#define YYNSTATES 67
399
400/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
401#define YYUNDEFTOK 2
402#define YYMAXUTOK 267
403
404#define YYTRANSLATE(YYX) \
405 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
406
407/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
408static const yytype_uint8 yytranslate[] =
409{
410 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 23, 14, 2, 15, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
416 19, 18, 20, 2, 2, 2, 2, 2, 2, 2,
417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 21, 2, 22, 2, 2, 2, 2, 2, 2,
420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 2, 2, 2, 16, 2, 17, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
436 5, 6, 7, 8, 9, 10, 11, 12
437};
438
439#if YYDEBUG
440/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
441 YYRHS. */
442static const yytype_uint8 yyprhs[] =
443{
444 0, 0, 3, 8, 11, 12, 15, 21, 22, 25,
445 27, 34, 36, 38, 41, 47, 48, 51, 57, 61,
446 64, 69, 74, 77, 80, 81, 84, 87, 88, 91,
447 94, 97, 98, 100, 102, 105, 106, 109, 112, 113,
448 116, 119, 123, 124
449};
450
451/* YYRHS -- A `-1'-separated list of the rules' RHS. */
452static const yytype_int8 yyrhs[] =
453{
454 25, 0, -1, 3, 13, 26, 31, -1, 28, 31,
455 -1, -1, 27, 26, -1, 43, 4, 30, 30, 13,
456 -1, -1, 29, 28, -1, 27, -1, 43, 4, 30,
457 14, 30, 13, -1, 6, -1, 7, -1, 15, 32,
458 -1, 16, 33, 41, 17, 13, -1, -1, 33, 34,
459 -1, 43, 5, 18, 35, 13, -1, 43, 5, 13,
460 -1, 36, 10, -1, 36, 19, 37, 20, -1, 36,
461 21, 40, 22, -1, 36, 12, -1, 35, 11, -1,
462 -1, 35, 23, -1, 36, 11, -1, -1, 37, 39,
463 -1, 37, 12, -1, 37, 11, -1, -1, 8, -1,
464 6, -1, 38, 7, -1, -1, 40, 9, -1, 40,
465 11, -1, -1, 42, 41, -1, 42, 34, -1, 43,
466 5, 32, -1, -1, 11, -1
467};
468
469/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
470static const yytype_uint16 yyrline[] =
471{
472 0, 85, 85, 89, 97, 100, 107, 115, 118, 125,
473 129, 136, 140, 147, 154, 162, 165, 172, 176, 183,
474 187, 191, 195, 199, 207, 210, 214, 222, 225, 229,
475 234, 242, 245, 249, 253, 261, 264, 268, 276, 279,
476 283, 291, 299, 302
477};
478#endif
479
480#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
481/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
482 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
483static const char *const yytname[] =
484{
485 "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE",
486 "DT_PROPNODENAME", "DT_LITERAL", "DT_LEGACYLITERAL", "DT_BASE",
487 "DT_BYTE", "DT_STRING", "DT_LABEL", "DT_REF", "';'", "'-'", "'/'", "'{'",
488 "'}'", "'='", "'<'", "'>'", "'['", "']'", "','", "$accept", "sourcefile",
489 "memreserves", "memreserve", "v0_memreserves", "v0_memreserve", "addr",
490 "devicetree", "nodedef", "proplist", "propdef", "propdata",
491 "propdataprefix", "celllist", "cellbase", "cellval", "bytestring",
492 "subnodes", "subnode", "label", 0
493};
494#endif
495
496# ifdef YYPRINT
497/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
498 token YYLEX-NUM. */
499static const yytype_uint16 yytoknum[] =
500{
501 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
502 265, 266, 267, 59, 45, 47, 123, 125, 61, 60,
503 62, 91, 93, 44
504};
505# endif
506
507/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
508static const yytype_uint8 yyr1[] =
509{
510 0, 24, 25, 25, 26, 26, 27, 28, 28, 29,
511 29, 30, 30, 31, 32, 33, 33, 34, 34, 35,
512 35, 35, 35, 35, 36, 36, 36, 37, 37, 37,
513 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
514 41, 42, 43, 43
515};
516
517/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
518static const yytype_uint8 yyr2[] =
519{
520 0, 2, 4, 2, 0, 2, 5, 0, 2, 1,
521 6, 1, 1, 2, 5, 0, 2, 5, 3, 2,
522 4, 4, 2, 2, 0, 2, 2, 0, 2, 2,
523 2, 0, 1, 1, 2, 0, 2, 2, 0, 2,
524 2, 3, 0, 1
525};
526
527/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
528 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
529 means the default is an error. */
530static const yytype_uint8 yydefact[] =
531{
532 7, 0, 43, 0, 9, 0, 7, 0, 4, 1,
533 0, 3, 8, 0, 0, 4, 0, 15, 13, 11,
534 12, 0, 2, 5, 0, 38, 0, 0, 0, 16,
535 0, 38, 0, 0, 6, 0, 40, 39, 0, 10,
536 14, 18, 24, 41, 0, 0, 23, 17, 25, 19,
537 26, 22, 27, 35, 31, 0, 33, 32, 30, 29,
538 20, 0, 28, 36, 37, 21, 34
539};
540
541/* YYDEFGOTO[NTERM-NUM]. */
542static const yytype_int8 yydefgoto[] =
543{
544 -1, 3, 14, 4, 5, 6, 27, 11, 18, 25,
545 29, 44, 45, 54, 61, 62, 55, 30, 31, 7
546};
547
548/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
549 STATE-NUM. */
550#define YYPACT_NINF -13
551static const yytype_int8 yypact[] =
552{
553 23, 11, -13, 37, -13, -4, 18, 39, 18, -13,
554 28, -13, -13, 34, -4, 18, 41, -13, -13, -13,
555 -13, 25, -13, -13, 34, -3, 34, 33, 34, -13,
556 30, -3, 43, 36, -13, 38, -13, -13, 20, -13,
557 -13, -13, -13, -13, 2, 9, -13, -13, -13, -13,
558 -13, -13, -13, -13, -2, -6, -13, -13, -13, -13,
559 -13, 45, -13, -13, -13, -13, -13
560};
561
562/* YYPGOTO[NTERM-NUM]. */
563static const yytype_int8 yypgoto[] =
564{
565 -13, -13, 35, 27, 47, -13, -12, 40, 17, -13,
566 26, -13, -13, -13, -13, -13, -13, 29, -13, -8
567};
568
569/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
570 positive, shift that token. If negative, reduce the rule which
571 number is the opposite. If zero, do what YYDEFACT says.
572 If YYTABLE_NINF, syntax error. */
573#define YYTABLE_NINF -43
574static const yytype_int8 yytable[] =
575{
576 16, 21, -42, 63, 56, 64, 57, 16, 2, 58,
577 59, 10, 28, 46, 33, 47, 65, 32, 60, 49,
578 50, 51, -42, 32, 8, 48, 1, -42, 52, 2,
579 53, 19, 20, 41, 2, 15, 17, 9, 42, 26,
580 19, 20, 15, 13, 17, 24, 34, 35, 38, 39,
581 23, 40, 66, 12, 22, 43, 0, 36, 0, 0,
582 37
583};
584
585static const yytype_int8 yycheck[] =
586{
587 8, 13, 5, 9, 6, 11, 8, 15, 11, 11,
588 12, 15, 24, 11, 26, 13, 22, 25, 20, 10,
589 11, 12, 4, 31, 13, 23, 3, 4, 19, 11,
590 21, 6, 7, 13, 11, 8, 16, 0, 18, 14,
591 6, 7, 15, 4, 16, 4, 13, 17, 5, 13,
592 15, 13, 7, 6, 14, 38, -1, 31, -1, -1,
593 31
594};
595
596/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
597 symbol of state STATE-NUM. */
598static const yytype_uint8 yystos[] =
599{
600 0, 3, 11, 25, 27, 28, 29, 43, 13, 0,
601 15, 31, 28, 4, 26, 27, 43, 16, 32, 6,
602 7, 30, 31, 26, 4, 33, 14, 30, 30, 34,
603 41, 42, 43, 30, 13, 17, 34, 41, 5, 13,
604 13, 13, 18, 32, 35, 36, 11, 13, 23, 10,
605 11, 12, 19, 21, 37, 40, 6, 8, 11, 12,
606 20, 38, 39, 9, 11, 22, 7
607};
608
609#define yyerrok (yyerrstatus = 0)
610#define yyclearin (yychar = YYEMPTY)
611#define YYEMPTY (-2)
612#define YYEOF 0
613
614#define YYACCEPT goto yyacceptlab
615#define YYABORT goto yyabortlab
616#define YYERROR goto yyerrorlab
617
618
619/* Like YYERROR except do call yyerror. This remains here temporarily
620 to ease the transition to the new meaning of YYERROR, for GCC.
621 Once GCC version 2 has supplanted version 1, this can go. */
622
623#define YYFAIL goto yyerrlab
624
625#define YYRECOVERING() (!!yyerrstatus)
626
627#define YYBACKUP(Token, Value) \
628do \
629 if (yychar == YYEMPTY && yylen == 1) \
630 { \
631 yychar = (Token); \
632 yylval = (Value); \
633 yytoken = YYTRANSLATE (yychar); \
634 YYPOPSTACK (1); \
635 goto yybackup; \
636 } \
637 else \
638 { \
639 yyerror (YY_("syntax error: cannot back up")); \
640 YYERROR; \
641 } \
642while (YYID (0))
643
644
645#define YYTERROR 1
646#define YYERRCODE 256
647
648
649/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
650 If N is 0, then set CURRENT to the empty location which ends
651 the previous symbol: RHS[0] (always defined). */
652
653#define YYRHSLOC(Rhs, K) ((Rhs)[K])
654#ifndef YYLLOC_DEFAULT
655# define YYLLOC_DEFAULT(Current, Rhs, N) \
656 do \
657 if (YYID (N)) \
658 { \
659 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
660 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
661 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
662 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
663 } \
664 else \
665 { \
666 (Current).first_line = (Current).last_line = \
667 YYRHSLOC (Rhs, 0).last_line; \
668 (Current).first_column = (Current).last_column = \
669 YYRHSLOC (Rhs, 0).last_column; \
670 } \
671 while (YYID (0))
672#endif
673
674
675/* YY_LOCATION_PRINT -- Print the location on the stream.
676 This macro was not mandated originally: define only if we know
677 we won't break user code: when these are the locations we know. */
678
679#ifndef YY_LOCATION_PRINT
680# if YYLTYPE_IS_TRIVIAL
681# define YY_LOCATION_PRINT(File, Loc) \
682 fprintf (File, "%d.%d-%d.%d", \
683 (Loc).first_line, (Loc).first_column, \
684 (Loc).last_line, (Loc).last_column)
685# else
686# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
687# endif
688#endif
689
690
691/* YYLEX -- calling `yylex' with the right arguments. */
692
693#ifdef YYLEX_PARAM
694# define YYLEX yylex (YYLEX_PARAM)
695#else
696# define YYLEX yylex ()
697#endif
698
699/* Enable debugging if requested. */
700#if YYDEBUG
701
702# ifndef YYFPRINTF
703# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
704# define YYFPRINTF fprintf
705# endif
706
707# define YYDPRINTF(Args) \
708do { \
709 if (yydebug) \
710 YYFPRINTF Args; \
711} while (YYID (0))
712
713# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
714do { \
715 if (yydebug) \
716 { \
717 YYFPRINTF (stderr, "%s ", Title); \
718 yy_symbol_print (stderr, \
719 Type, Value, Location); \
720 YYFPRINTF (stderr, "\n"); \
721 } \
722} while (YYID (0))
723
724
725/*--------------------------------.
726| Print this symbol on YYOUTPUT. |
727`--------------------------------*/
728
729/*ARGSUSED*/
730#if (defined __STDC__ || defined __C99__FUNC__ \
731 || defined __cplusplus || defined _MSC_VER)
732static void
733yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
734#else
735static void
736yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
737 FILE *yyoutput;
738 int yytype;
739 YYSTYPE const * const yyvaluep;
740 YYLTYPE const * const yylocationp;
741#endif
742{
743 if (!yyvaluep)
744 return;
745 YYUSE (yylocationp);
746# ifdef YYPRINT
747 if (yytype < YYNTOKENS)
748 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
749# else
750 YYUSE (yyoutput);
751# endif
752 switch (yytype)
753 {
754 default:
755 break;
756 }
757}
758
759
760/*--------------------------------.
761| Print this symbol on YYOUTPUT. |
762`--------------------------------*/
763
764#if (defined __STDC__ || defined __C99__FUNC__ \
765 || defined __cplusplus || defined _MSC_VER)
766static void
767yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
768#else
769static void
770yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
771 FILE *yyoutput;
772 int yytype;
773 YYSTYPE const * const yyvaluep;
774 YYLTYPE const * const yylocationp;
775#endif
776{
777 if (yytype < YYNTOKENS)
778 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
779 else
780 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
781
782 YY_LOCATION_PRINT (yyoutput, *yylocationp);
783 YYFPRINTF (yyoutput, ": ");
784 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
785 YYFPRINTF (yyoutput, ")");
786}
787
788/*------------------------------------------------------------------.
789| yy_stack_print -- Print the state stack from its BOTTOM up to its |
790| TOP (included). |
791`------------------------------------------------------------------*/
792
793#if (defined __STDC__ || defined __C99__FUNC__ \
794 || defined __cplusplus || defined _MSC_VER)
795static void
796yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
797#else
798static void
799yy_stack_print (bottom, top)
800 yytype_int16 *bottom;
801 yytype_int16 *top;
802#endif
803{
804 YYFPRINTF (stderr, "Stack now");
805 for (; bottom <= top; ++bottom)
806 YYFPRINTF (stderr, " %d", *bottom);
807 YYFPRINTF (stderr, "\n");
808}
809
810# define YY_STACK_PRINT(Bottom, Top) \
811do { \
812 if (yydebug) \
813 yy_stack_print ((Bottom), (Top)); \
814} while (YYID (0))
815
816
817/*------------------------------------------------.
818| Report that the YYRULE is going to be reduced. |
819`------------------------------------------------*/
820
821#if (defined __STDC__ || defined __C99__FUNC__ \
822 || defined __cplusplus || defined _MSC_VER)
823static void
824yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
825#else
826static void
827yy_reduce_print (yyvsp, yylsp, yyrule)
828 YYSTYPE *yyvsp;
829 YYLTYPE *yylsp;
830 int yyrule;
831#endif
832{
833 int yynrhs = yyr2[yyrule];
834 int yyi;
835 unsigned long int yylno = yyrline[yyrule];
836 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
837 yyrule - 1, yylno);
838 /* The symbols being reduced. */
839 for (yyi = 0; yyi < yynrhs; yyi++)
840 {
841 fprintf (stderr, " $%d = ", yyi + 1);
842 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
843 &(yyvsp[(yyi + 1) - (yynrhs)])
844 , &(yylsp[(yyi + 1) - (yynrhs)]) );
845 fprintf (stderr, "\n");
846 }
847}
848
849# define YY_REDUCE_PRINT(Rule) \
850do { \
851 if (yydebug) \
852 yy_reduce_print (yyvsp, yylsp, Rule); \
853} while (YYID (0))
854
855/* Nonzero means print parse trace. It is left uninitialized so that
856 multiple parsers can coexist. */
857int yydebug;
858#else /* !YYDEBUG */
859# define YYDPRINTF(Args)
860# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
861# define YY_STACK_PRINT(Bottom, Top)
862# define YY_REDUCE_PRINT(Rule)
863#endif /* !YYDEBUG */
864
865
866/* YYINITDEPTH -- initial size of the parser's stacks. */
867#ifndef YYINITDEPTH
868# define YYINITDEPTH 200
869#endif
870
871/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
872 if the built-in stack extension method is used).
873
874 Do not make this value too large; the results are undefined if
875 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
876 evaluated with infinite-precision integer arithmetic. */
877
878#ifndef YYMAXDEPTH
879# define YYMAXDEPTH 10000
880#endif
881
882
883
884#if YYERROR_VERBOSE
885
886# ifndef yystrlen
887# if defined __GLIBC__ && defined _STRING_H
888# define yystrlen strlen
889# else
890/* Return the length of YYSTR. */
891#if (defined __STDC__ || defined __C99__FUNC__ \
892 || defined __cplusplus || defined _MSC_VER)
893static YYSIZE_T
894yystrlen (const char *yystr)
895#else
896static YYSIZE_T
897yystrlen (yystr)
898 const char *yystr;
899#endif
900{
901 YYSIZE_T yylen;
902 for (yylen = 0; yystr[yylen]; yylen++)
903 continue;
904 return yylen;
905}
906# endif
907# endif
908
909# ifndef yystpcpy
910# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
911# define yystpcpy stpcpy
912# else
913/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
914 YYDEST. */
915#if (defined __STDC__ || defined __C99__FUNC__ \
916 || defined __cplusplus || defined _MSC_VER)
917static char *
918yystpcpy (char *yydest, const char *yysrc)
919#else
920static char *
921yystpcpy (yydest, yysrc)
922 char *yydest;
923 const char *yysrc;
924#endif
925{
926 char *yyd = yydest;
927 const char *yys = yysrc;
928
929 while ((*yyd++ = *yys++) != '\0')
930 continue;
931
932 return yyd - 1;
933}
934# endif
935# endif
936
937# ifndef yytnamerr
938/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
939 quotes and backslashes, so that it's suitable for yyerror. The
940 heuristic is that double-quoting is unnecessary unless the string
941 contains an apostrophe, a comma, or backslash (other than
942 backslash-backslash). YYSTR is taken from yytname. If YYRES is
943 null, do not copy; instead, return the length of what the result
944 would have been. */
945static YYSIZE_T
946yytnamerr (char *yyres, const char *yystr)
947{
948 if (*yystr == '"')
949 {
950 YYSIZE_T yyn = 0;
951 char const *yyp = yystr;
952
953 for (;;)
954 switch (*++yyp)
955 {
956 case '\'':
957 case ',':
958 goto do_not_strip_quotes;
959
960 case '\\':
961 if (*++yyp != '\\')
962 goto do_not_strip_quotes;
963 /* Fall through. */
964 default:
965 if (yyres)
966 yyres[yyn] = *yyp;
967 yyn++;
968 break;
969
970 case '"':
971 if (yyres)
972 yyres[yyn] = '\0';
973 return yyn;
974 }
975 do_not_strip_quotes: ;
976 }
977
978 if (! yyres)
979 return yystrlen (yystr);
980
981 return yystpcpy (yyres, yystr) - yyres;
982}
983# endif
984
985/* Copy into YYRESULT an error message about the unexpected token
986 YYCHAR while in state YYSTATE. Return the number of bytes copied,
987 including the terminating null byte. If YYRESULT is null, do not
988 copy anything; just return the number of bytes that would be
989 copied. As a special case, return 0 if an ordinary "syntax error"
990 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
991 size calculation. */
992static YYSIZE_T
993yysyntax_error (char *yyresult, int yystate, int yychar)
994{
995 int yyn = yypact[yystate];
996
997 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
998 return 0;
999 else
1000 {
1001 int yytype = YYTRANSLATE (yychar);
1002 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1003 YYSIZE_T yysize = yysize0;
1004 YYSIZE_T yysize1;
1005 int yysize_overflow = 0;
1006 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1007 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1008 int yyx;
1009
1010# if 0
1011 /* This is so xgettext sees the translatable formats that are
1012 constructed on the fly. */
1013 YY_("syntax error, unexpected %s");
1014 YY_("syntax error, unexpected %s, expecting %s");
1015 YY_("syntax error, unexpected %s, expecting %s or %s");
1016 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1017 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1018# endif
1019 char *yyfmt;
1020 char const *yyf;
1021 static char const yyunexpected[] = "syntax error, unexpected %s";
1022 static char const yyexpecting[] = ", expecting %s";
1023 static char const yyor[] = " or %s";
1024 char yyformat[sizeof yyunexpected
1025 + sizeof yyexpecting - 1
1026 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1027 * (sizeof yyor - 1))];
1028 char const *yyprefix = yyexpecting;
1029
1030 /* Start YYX at -YYN if negative to avoid negative indexes in
1031 YYCHECK. */
1032 int yyxbegin = yyn < 0 ? -yyn : 0;
1033
1034 /* Stay within bounds of both yycheck and yytname. */
1035 int yychecklim = YYLAST - yyn + 1;
1036 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1037 int yycount = 1;
1038
1039 yyarg[0] = yytname[yytype];
1040 yyfmt = yystpcpy (yyformat, yyunexpected);
1041
1042 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1043 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1044 {
1045 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1046 {
1047 yycount = 1;
1048 yysize = yysize0;
1049 yyformat[sizeof yyunexpected - 1] = '\0';
1050 break;
1051 }
1052 yyarg[yycount++] = yytname[yyx];
1053 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1054 yysize_overflow |= (yysize1 < yysize);
1055 yysize = yysize1;
1056 yyfmt = yystpcpy (yyfmt, yyprefix);
1057 yyprefix = yyor;
1058 }
1059
1060 yyf = YY_(yyformat);
1061 yysize1 = yysize + yystrlen (yyf);
1062 yysize_overflow |= (yysize1 < yysize);
1063 yysize = yysize1;
1064
1065 if (yysize_overflow)
1066 return YYSIZE_MAXIMUM;
1067
1068 if (yyresult)
1069 {
1070 /* Avoid sprintf, as that infringes on the user's name space.
1071 Don't have undefined behavior even if the translation
1072 produced a string with the wrong number of "%s"s. */
1073 char *yyp = yyresult;
1074 int yyi = 0;
1075 while ((*yyp = *yyf) != '\0')
1076 {
1077 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1078 {
1079 yyp += yytnamerr (yyp, yyarg[yyi++]);
1080 yyf += 2;
1081 }
1082 else
1083 {
1084 yyp++;
1085 yyf++;
1086 }
1087 }
1088 }
1089 return yysize;
1090 }
1091}
1092#endif /* YYERROR_VERBOSE */
1093
1094
1095/*-----------------------------------------------.
1096| Release the memory associated to this symbol. |
1097`-----------------------------------------------*/
1098
1099/*ARGSUSED*/
1100#if (defined __STDC__ || defined __C99__FUNC__ \
1101 || defined __cplusplus || defined _MSC_VER)
1102static void
1103yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1104#else
1105static void
1106yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1107 const char *yymsg;
1108 int yytype;
1109 YYSTYPE *yyvaluep;
1110 YYLTYPE *yylocationp;
1111#endif
1112{
1113 YYUSE (yyvaluep);
1114 YYUSE (yylocationp);
1115
1116 if (!yymsg)
1117 yymsg = "Deleting";
1118 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1119
1120 switch (yytype)
1121 {
1122
1123 default:
1124 break;
1125 }
1126}
1127
1128
1129/* Prevent warnings from -Wmissing-prototypes. */
1130
1131#ifdef YYPARSE_PARAM
1132#if defined __STDC__ || defined __cplusplus
1133int yyparse (void *YYPARSE_PARAM);
1134#else
1135int yyparse ();
1136#endif
1137#else /* ! YYPARSE_PARAM */
1138#if defined __STDC__ || defined __cplusplus
1139int yyparse (void);
1140#else
1141int yyparse ();
1142#endif
1143#endif /* ! YYPARSE_PARAM */
1144
1145
1146
1147/* The look-ahead symbol. */
1148int yychar;
1149
1150/* The semantic value of the look-ahead symbol. */
1151YYSTYPE yylval;
1152
1153/* Number of syntax errors so far. */
1154int yynerrs;
1155/* Location data for the look-ahead symbol. */
1156YYLTYPE yylloc;
1157
1158
1159
1160/*----------.
1161| yyparse. |
1162`----------*/
1163
1164#ifdef YYPARSE_PARAM
1165#if (defined __STDC__ || defined __C99__FUNC__ \
1166 || defined __cplusplus || defined _MSC_VER)
1167int
1168yyparse (void *YYPARSE_PARAM)
1169#else
1170int
1171yyparse (YYPARSE_PARAM)
1172 void *YYPARSE_PARAM;
1173#endif
1174#else /* ! YYPARSE_PARAM */
1175#if (defined __STDC__ || defined __C99__FUNC__ \
1176 || defined __cplusplus || defined _MSC_VER)
1177int
1178yyparse (void)
1179#else
1180int
1181yyparse ()
1182
1183#endif
1184#endif
1185{
1186
1187 int yystate;
1188 int yyn;
1189 int yyresult;
1190 /* Number of tokens to shift before error messages enabled. */
1191 int yyerrstatus;
1192 /* Look-ahead token as an internal (translated) token number. */
1193 int yytoken = 0;
1194#if YYERROR_VERBOSE
1195 /* Buffer for error messages, and its allocated size. */
1196 char yymsgbuf[128];
1197 char *yymsg = yymsgbuf;
1198 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1199#endif
1200
1201 /* Three stacks and their tools:
1202 `yyss': related to states,
1203 `yyvs': related to semantic values,
1204 `yyls': related to locations.
1205
1206 Refer to the stacks thru separate pointers, to allow yyoverflow
1207 to reallocate them elsewhere. */
1208
1209 /* The state stack. */
1210 yytype_int16 yyssa[YYINITDEPTH];
1211 yytype_int16 *yyss = yyssa;
1212 yytype_int16 *yyssp;
1213
1214 /* The semantic value stack. */
1215 YYSTYPE yyvsa[YYINITDEPTH];
1216 YYSTYPE *yyvs = yyvsa;
1217 YYSTYPE *yyvsp;
1218
1219 /* The location stack. */
1220 YYLTYPE yylsa[YYINITDEPTH];
1221 YYLTYPE *yyls = yylsa;
1222 YYLTYPE *yylsp;
1223 /* The locations where the error started and ended. */
1224 YYLTYPE yyerror_range[2];
1225
1226#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1227
1228 YYSIZE_T yystacksize = YYINITDEPTH;
1229
1230 /* The variables used to return semantic value and location from the
1231 action routines. */
1232 YYSTYPE yyval;
1233 YYLTYPE yyloc;
1234
1235 /* The number of symbols on the RHS of the reduced rule.
1236 Keep to zero when no symbol should be popped. */
1237 int yylen = 0;
1238
1239 YYDPRINTF ((stderr, "Starting parse\n"));
1240
1241 yystate = 0;
1242 yyerrstatus = 0;
1243 yynerrs = 0;
1244 yychar = YYEMPTY; /* Cause a token to be read. */
1245
1246 /* Initialize stack pointers.
1247 Waste one element of value and location stack
1248 so that they stay on the same level as the state stack.
1249 The wasted elements are never initialized. */
1250
1251 yyssp = yyss;
1252 yyvsp = yyvs;
1253 yylsp = yyls;
1254#if YYLTYPE_IS_TRIVIAL
1255 /* Initialize the default location before parsing starts. */
1256 yylloc.first_line = yylloc.last_line = 1;
1257 yylloc.first_column = yylloc.last_column = 0;
1258#endif
1259
1260 goto yysetstate;
1261
1262/*------------------------------------------------------------.
1263| yynewstate -- Push a new state, which is found in yystate. |
1264`------------------------------------------------------------*/
1265 yynewstate:
1266 /* In all cases, when you get here, the value and location stacks
1267 have just been pushed. So pushing a state here evens the stacks. */
1268 yyssp++;
1269
1270 yysetstate:
1271 *yyssp = yystate;
1272
1273 if (yyss + yystacksize - 1 <= yyssp)
1274 {
1275 /* Get the current used size of the three stacks, in elements. */
1276 YYSIZE_T yysize = yyssp - yyss + 1;
1277
1278#ifdef yyoverflow
1279 {
1280 /* Give user a chance to reallocate the stack. Use copies of
1281 these so that the &'s don't force the real ones into
1282 memory. */
1283 YYSTYPE *yyvs1 = yyvs;
1284 yytype_int16 *yyss1 = yyss;
1285 YYLTYPE *yyls1 = yyls;
1286
1287 /* Each stack pointer address is followed by the size of the
1288 data in use in that stack, in bytes. This used to be a
1289 conditional around just the two extra args, but that might
1290 be undefined if yyoverflow is a macro. */
1291 yyoverflow (YY_("memory exhausted"),
1292 &yyss1, yysize * sizeof (*yyssp),
1293 &yyvs1, yysize * sizeof (*yyvsp),
1294 &yyls1, yysize * sizeof (*yylsp),
1295 &yystacksize);
1296 yyls = yyls1;
1297 yyss = yyss1;
1298 yyvs = yyvs1;
1299 }
1300#else /* no yyoverflow */
1301# ifndef YYSTACK_RELOCATE
1302 goto yyexhaustedlab;
1303# else
1304 /* Extend the stack our own way. */
1305 if (YYMAXDEPTH <= yystacksize)
1306 goto yyexhaustedlab;
1307 yystacksize *= 2;
1308 if (YYMAXDEPTH < yystacksize)
1309 yystacksize = YYMAXDEPTH;
1310
1311 {
1312 yytype_int16 *yyss1 = yyss;
1313 union yyalloc *yyptr =
1314 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1315 if (! yyptr)
1316 goto yyexhaustedlab;
1317 YYSTACK_RELOCATE (yyss);
1318 YYSTACK_RELOCATE (yyvs);
1319 YYSTACK_RELOCATE (yyls);
1320# undef YYSTACK_RELOCATE
1321 if (yyss1 != yyssa)
1322 YYSTACK_FREE (yyss1);
1323 }
1324# endif
1325#endif /* no yyoverflow */
1326
1327 yyssp = yyss + yysize - 1;
1328 yyvsp = yyvs + yysize - 1;
1329 yylsp = yyls + yysize - 1;
1330
1331 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1332 (unsigned long int) yystacksize));
1333
1334 if (yyss + yystacksize - 1 <= yyssp)
1335 YYABORT;
1336 }
1337
1338 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1339
1340 goto yybackup;
1341
1342/*-----------.
1343| yybackup. |
1344`-----------*/
1345yybackup:
1346
1347 /* Do appropriate processing given the current state. Read a
1348 look-ahead token if we need one and don't already have one. */
1349
1350 /* First try to decide what to do without reference to look-ahead token. */
1351 yyn = yypact[yystate];
1352 if (yyn == YYPACT_NINF)
1353 goto yydefault;
1354
1355 /* Not known => get a look-ahead token if don't already have one. */
1356
1357 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1358 if (yychar == YYEMPTY)
1359 {
1360 YYDPRINTF ((stderr, "Reading a token: "));
1361 yychar = YYLEX;
1362 }
1363
1364 if (yychar <= YYEOF)
1365 {
1366 yychar = yytoken = YYEOF;
1367 YYDPRINTF ((stderr, "Now at end of input.\n"));
1368 }
1369 else
1370 {
1371 yytoken = YYTRANSLATE (yychar);
1372 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1373 }
1374
1375 /* If the proper action on seeing token YYTOKEN is to reduce or to
1376 detect an error, take that action. */
1377 yyn += yytoken;
1378 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1379 goto yydefault;
1380 yyn = yytable[yyn];
1381 if (yyn <= 0)
1382 {
1383 if (yyn == 0 || yyn == YYTABLE_NINF)
1384 goto yyerrlab;
1385 yyn = -yyn;
1386 goto yyreduce;
1387 }
1388
1389 if (yyn == YYFINAL)
1390 YYACCEPT;
1391
1392 /* Count tokens shifted since error; after three, turn off error
1393 status. */
1394 if (yyerrstatus)
1395 yyerrstatus--;
1396
1397 /* Shift the look-ahead token. */
1398 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1399
1400 /* Discard the shifted token unless it is eof. */
1401 if (yychar != YYEOF)
1402 yychar = YYEMPTY;
1403
1404 yystate = yyn;
1405 *++yyvsp = yylval;
1406 *++yylsp = yylloc;
1407 goto yynewstate;
1408
1409
1410/*-----------------------------------------------------------.
1411| yydefault -- do the default action for the current state. |
1412`-----------------------------------------------------------*/
1413yydefault:
1414 yyn = yydefact[yystate];
1415 if (yyn == 0)
1416 goto yyerrlab;
1417 goto yyreduce;
1418
1419
1420/*-----------------------------.
1421| yyreduce -- Do a reduction. |
1422`-----------------------------*/
1423yyreduce:
1424 /* yyn is the number of a rule to reduce with. */
1425 yylen = yyr2[yyn];
1426
1427 /* If YYLEN is nonzero, implement the default value of the action:
1428 `$$ = $1'.
1429
1430 Otherwise, the following line sets YYVAL to garbage.
1431 This behavior is undocumented and Bison
1432 users should not rely upon it. Assigning to YYVAL
1433 unconditionally makes the parser a bit smaller, and it avoids a
1434 GCC warning that YYVAL may be used uninitialized. */
1435 yyval = yyvsp[1-yylen];
1436
1437 /* Default location. */
1438 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1439 YY_REDUCE_PRINT (yyn);
1440 switch (yyn)
1441 {
1442 case 2:
1443#line 86 "dtc-parser.y"
1444 {
1445 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node));
1446 ;}
1447 break;
1448
1449 case 3:
1450#line 90 "dtc-parser.y"
1451 {
1452 the_boot_info = build_boot_info((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].node));
1453 ;}
1454 break;
1455
1456 case 4:
1457#line 97 "dtc-parser.y"
1458 {
1459 (yyval.re) = NULL;
1460 ;}
1461 break;
1462
1463 case 5:
1464#line 101 "dtc-parser.y"
1465 {
1466 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
1467 ;}
1468 break;
1469
1470 case 6:
1471#line 108 "dtc-parser.y"
1472 {
1473 (yyval.re) = build_reserve_entry((yyvsp[(3) - (5)].addr), (yyvsp[(4) - (5)].addr), (yyvsp[(1) - (5)].labelref));
1474 ;}
1475 break;
1476
1477 case 7:
1478#line 115 "dtc-parser.y"
1479 {
1480 (yyval.re) = NULL;
1481 ;}
1482 break;
1483
1484 case 8:
1485#line 119 "dtc-parser.y"
1486 {
1487 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
1488 ;}
1489 break;
1490
1491 case 9:
1492#line 126 "dtc-parser.y"
1493 {
1494 (yyval.re) = (yyvsp[(1) - (1)].re);
1495 ;}
1496 break;
1497
1498 case 10:
1499#line 130 "dtc-parser.y"
1500 {
1501 (yyval.re) = build_reserve_entry((yyvsp[(3) - (6)].addr), (yyvsp[(5) - (6)].addr) - (yyvsp[(3) - (6)].addr) + 1, (yyvsp[(1) - (6)].labelref));
1502 ;}
1503 break;
1504
1505 case 11:
1506#line 137 "dtc-parser.y"
1507 {
1508 (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
1509 ;}
1510 break;
1511
1512 case 12:
1513#line 141 "dtc-parser.y"
1514 {
1515 (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 16, 64);
1516 ;}
1517 break;
1518
1519 case 13:
1520#line 148 "dtc-parser.y"
1521 {
1522 (yyval.node) = name_node((yyvsp[(2) - (2)].node), "", NULL);
1523 ;}
1524 break;
1525
1526 case 14:
1527#line 155 "dtc-parser.y"
1528 {
1529 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
1530 ;}
1531 break;
1532
1533 case 15:
1534#line 162 "dtc-parser.y"
1535 {
1536 (yyval.proplist) = NULL;
1537 ;}
1538 break;
1539
1540 case 16:
1541#line 166 "dtc-parser.y"
1542 {
1543 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
1544 ;}
1545 break;
1546
1547 case 17:
1548#line 173 "dtc-parser.y"
1549 {
1550 (yyval.prop) = build_property((yyvsp[(2) - (5)].propnodename), (yyvsp[(4) - (5)].data), (yyvsp[(1) - (5)].labelref));
1551 ;}
1552 break;
1553
1554 case 18:
1555#line 177 "dtc-parser.y"
1556 {
1557 (yyval.prop) = build_property((yyvsp[(2) - (3)].propnodename), empty_data, (yyvsp[(1) - (3)].labelref));
1558 ;}
1559 break;
1560
1561 case 19:
1562#line 184 "dtc-parser.y"
1563 {
1564 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
1565 ;}
1566 break;
1567
1568 case 20:
1569#line 188 "dtc-parser.y"
1570 {
1571 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1572 ;}
1573 break;
1574
1575 case 21:
1576#line 192 "dtc-parser.y"
1577 {
1578 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1579 ;}
1580 break;
1581
1582 case 22:
1583#line 196 "dtc-parser.y"
1584 {
1585 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
1586 ;}
1587 break;
1588
1589 case 23:
1590#line 200 "dtc-parser.y"
1591 {
1592 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1593 ;}
1594 break;
1595
1596 case 24:
1597#line 207 "dtc-parser.y"
1598 {
1599 (yyval.data) = empty_data;
1600 ;}
1601 break;
1602
1603 case 25:
1604#line 211 "dtc-parser.y"
1605 {
1606 (yyval.data) = (yyvsp[(1) - (2)].data);
1607 ;}
1608 break;
1609
1610 case 26:
1611#line 215 "dtc-parser.y"
1612 {
1613 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1614 ;}
1615 break;
1616
1617 case 27:
1618#line 222 "dtc-parser.y"
1619 {
1620 (yyval.data) = empty_data;
1621 ;}
1622 break;
1623
1624 case 28:
1625#line 226 "dtc-parser.y"
1626 {
1627 (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
1628 ;}
1629 break;
1630
1631 case 29:
1632#line 230 "dtc-parser.y"
1633 {
1634 (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
1635 (yyvsp[(2) - (2)].labelref)), -1);
1636 ;}
1637 break;
1638
1639 case 30:
1640#line 235 "dtc-parser.y"
1641 {
1642 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1643 ;}
1644 break;
1645
1646 case 31:
1647#line 242 "dtc-parser.y"
1648 {
1649 (yyval.cbase) = 16;
1650 ;}
1651 break;
1652
1653 case 33:
1654#line 250 "dtc-parser.y"
1655 {
1656 (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
1657 ;}
1658 break;
1659
1660 case 34:
1661#line 254 "dtc-parser.y"
1662 {
1663 (yyval.cell) = eval_literal((yyvsp[(2) - (2)].literal), (yyvsp[(1) - (2)].cbase), 32);
1664 ;}
1665 break;
1666
1667 case 35:
1668#line 261 "dtc-parser.y"
1669 {
1670 (yyval.data) = empty_data;
1671 ;}
1672 break;
1673
1674 case 36:
1675#line 265 "dtc-parser.y"
1676 {
1677 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
1678 ;}
1679 break;
1680
1681 case 37:
1682#line 269 "dtc-parser.y"
1683 {
1684 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1685 ;}
1686 break;
1687
1688 case 38:
1689#line 276 "dtc-parser.y"
1690 {
1691 (yyval.nodelist) = NULL;
1692 ;}
1693 break;
1694
1695 case 39:
1696#line 280 "dtc-parser.y"
1697 {
1698 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
1699 ;}
1700 break;
1701
1702 case 40:
1703#line 284 "dtc-parser.y"
1704 {
1705 yyerror("syntax error: properties must precede subnodes\n");
1706 YYERROR;
1707 ;}
1708 break;
1709
1710 case 41:
1711#line 292 "dtc-parser.y"
1712 {
1713 (yyval.node) = name_node((yyvsp[(3) - (3)].node), (yyvsp[(2) - (3)].propnodename), (yyvsp[(1) - (3)].labelref));
1714 ;}
1715 break;
1716
1717 case 42:
1718#line 299 "dtc-parser.y"
1719 {
1720 (yyval.labelref) = NULL;
1721 ;}
1722 break;
1723
1724 case 43:
1725#line 303 "dtc-parser.y"
1726 {
1727 (yyval.labelref) = (yyvsp[(1) - (1)].labelref);
1728 ;}
1729 break;
1730
1731
1732/* Line 1267 of yacc.c. */
1733#line 1734 "dtc-parser.tab.c"
1734 default: break;
1735 }
1736 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1737
1738 YYPOPSTACK (yylen);
1739 yylen = 0;
1740 YY_STACK_PRINT (yyss, yyssp);
1741
1742 *++yyvsp = yyval;
1743 *++yylsp = yyloc;
1744
1745 /* Now `shift' the result of the reduction. Determine what state
1746 that goes to, based on the state we popped back to and the rule
1747 number reduced by. */
1748
1749 yyn = yyr1[yyn];
1750
1751 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1752 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1753 yystate = yytable[yystate];
1754 else
1755 yystate = yydefgoto[yyn - YYNTOKENS];
1756
1757 goto yynewstate;
1758
1759
1760/*------------------------------------.
1761| yyerrlab -- here on detecting error |
1762`------------------------------------*/
1763yyerrlab:
1764 /* If not already recovering from an error, report this error. */
1765 if (!yyerrstatus)
1766 {
1767 ++yynerrs;
1768#if ! YYERROR_VERBOSE
1769 yyerror (YY_("syntax error"));
1770#else
1771 {
1772 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1773 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1774 {
1775 YYSIZE_T yyalloc = 2 * yysize;
1776 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1777 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1778 if (yymsg != yymsgbuf)
1779 YYSTACK_FREE (yymsg);
1780 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1781 if (yymsg)
1782 yymsg_alloc = yyalloc;
1783 else
1784 {
1785 yymsg = yymsgbuf;
1786 yymsg_alloc = sizeof yymsgbuf;
1787 }
1788 }
1789
1790 if (0 < yysize && yysize <= yymsg_alloc)
1791 {
1792 (void) yysyntax_error (yymsg, yystate, yychar);
1793 yyerror (yymsg);
1794 }
1795 else
1796 {
1797 yyerror (YY_("syntax error"));
1798 if (yysize != 0)
1799 goto yyexhaustedlab;
1800 }
1801 }
1802#endif
1803 }
1804
1805 yyerror_range[0] = yylloc;
1806
1807 if (yyerrstatus == 3)
1808 {
1809 /* If just tried and failed to reuse look-ahead token after an
1810 error, discard it. */
1811
1812 if (yychar <= YYEOF)
1813 {
1814 /* Return failure if at end of input. */
1815 if (yychar == YYEOF)
1816 YYABORT;
1817 }
1818 else
1819 {
1820 yydestruct ("Error: discarding",
1821 yytoken, &yylval, &yylloc);
1822 yychar = YYEMPTY;
1823 }
1824 }
1825
1826 /* Else will try to reuse look-ahead token after shifting the error
1827 token. */
1828 goto yyerrlab1;
1829
1830
1831/*---------------------------------------------------.
1832| yyerrorlab -- error raised explicitly by YYERROR. |
1833`---------------------------------------------------*/
1834yyerrorlab:
1835
1836 /* Pacify compilers like GCC when the user code never invokes
1837 YYERROR and the label yyerrorlab therefore never appears in user
1838 code. */
1839 if (/*CONSTCOND*/ 0)
1840 goto yyerrorlab;
1841
1842 yyerror_range[0] = yylsp[1-yylen];
1843 /* Do not reclaim the symbols of the rule which action triggered
1844 this YYERROR. */
1845 YYPOPSTACK (yylen);
1846 yylen = 0;
1847 YY_STACK_PRINT (yyss, yyssp);
1848 yystate = *yyssp;
1849 goto yyerrlab1;
1850
1851
1852/*-------------------------------------------------------------.
1853| yyerrlab1 -- common code for both syntax error and YYERROR. |
1854`-------------------------------------------------------------*/
1855yyerrlab1:
1856 yyerrstatus = 3; /* Each real token shifted decrements this. */
1857
1858 for (;;)
1859 {
1860 yyn = yypact[yystate];
1861 if (yyn != YYPACT_NINF)
1862 {
1863 yyn += YYTERROR;
1864 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1865 {
1866 yyn = yytable[yyn];
1867 if (0 < yyn)
1868 break;
1869 }
1870 }
1871
1872 /* Pop the current state because it cannot handle the error token. */
1873 if (yyssp == yyss)
1874 YYABORT;
1875
1876 yyerror_range[0] = *yylsp;
1877 yydestruct ("Error: popping",
1878 yystos[yystate], yyvsp, yylsp);
1879 YYPOPSTACK (1);
1880 yystate = *yyssp;
1881 YY_STACK_PRINT (yyss, yyssp);
1882 }
1883
1884 if (yyn == YYFINAL)
1885 YYACCEPT;
1886
1887 *++yyvsp = yylval;
1888
1889 yyerror_range[1] = yylloc;
1890 /* Using YYLLOC is tempting, but would change the location of
1891 the look-ahead. YYLOC is available though. */
1892 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
1893 *++yylsp = yyloc;
1894
1895 /* Shift the error token. */
1896 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1897
1898 yystate = yyn;
1899 goto yynewstate;
1900
1901
1902/*-------------------------------------.
1903| yyacceptlab -- YYACCEPT comes here. |
1904`-------------------------------------*/
1905yyacceptlab:
1906 yyresult = 0;
1907 goto yyreturn;
1908
1909/*-----------------------------------.
1910| yyabortlab -- YYABORT comes here. |
1911`-----------------------------------*/
1912yyabortlab:
1913 yyresult = 1;
1914 goto yyreturn;
1915
1916#ifndef yyoverflow
1917/*-------------------------------------------------.
1918| yyexhaustedlab -- memory exhaustion comes here. |
1919`-------------------------------------------------*/
1920yyexhaustedlab:
1921 yyerror (YY_("memory exhausted"));
1922 yyresult = 2;
1923 /* Fall through. */
1924#endif
1925
1926yyreturn:
1927 if (yychar != YYEOF && yychar != YYEMPTY)
1928 yydestruct ("Cleanup: discarding lookahead",
1929 yytoken, &yylval, &yylloc);
1930 /* Do not reclaim the symbols of the rule which action triggered
1931 this YYABORT or YYACCEPT. */
1932 YYPOPSTACK (yylen);
1933 YY_STACK_PRINT (yyss, yyssp);
1934 while (yyssp != yyss)
1935 {
1936 yydestruct ("Cleanup: popping",
1937 yystos[*yyssp], yyvsp, yylsp);
1938 YYPOPSTACK (1);
1939 }
1940#ifndef yyoverflow
1941 if (yyss != yyssa)
1942 YYSTACK_FREE (yyss);
1943#endif
1944#if YYERROR_VERBOSE
1945 if (yymsg != yymsgbuf)
1946 YYSTACK_FREE (yymsg);
1947#endif
1948 /* Make sure YYID is used. */
1949 return YYID (yyresult);
1950}
1951
1952
1953#line 308 "dtc-parser.y"
1954
1955
1956void yyerror (char const *s)
1957{
1958 const char *fname = srcpos_filename_for_num(yylloc.filenum);
1959
1960 if (strcmp(fname, "-") == 0)
1961 fname = "stdin";
1962
1963 fprintf(stderr, "%s:%d %s\n",
1964 fname, yylloc.first_line, s);
1965}
1966
1967unsigned long long eval_literal(const char *s, int base, int bits)
1968{
1969 unsigned long long val;
1970 char *e;
1971
1972 errno = 0;
1973 val = strtoull(s, &e, base);
1974 if (*e)
1975 yyerror("bad characters in literal");
1976 else if ((errno == ERANGE)
1977 || ((bits < 64) && (val >= (1ULL << bits))))
1978 yyerror("literal out of range");
1979 else if (errno != 0)
1980 yyerror("bad literal");
1981 return val;
1982}
1983
diff --git a/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped b/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped
new file mode 100644
index 000000000000..4707b029ed25
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc-parser.tab.h_shipped
@@ -0,0 +1,111 @@
1/* A Bison parser, made by GNU Bison 2.3. */
2
3/* Skeleton interface for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
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, or (at your option)
11 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
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
22
23/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
32
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* Tokens. */
37#ifndef YYTOKENTYPE
38# define YYTOKENTYPE
39 /* Put the tokens into the symbol table, so that GDB and other debuggers
40 know about them. */
41 enum yytokentype {
42 DT_V1 = 258,
43 DT_MEMRESERVE = 259,
44 DT_PROPNODENAME = 260,
45 DT_LITERAL = 261,
46 DT_LEGACYLITERAL = 262,
47 DT_BASE = 263,
48 DT_BYTE = 264,
49 DT_STRING = 265,
50 DT_LABEL = 266,
51 DT_REF = 267
52 };
53#endif
54/* Tokens. */
55#define DT_V1 258
56#define DT_MEMRESERVE 259
57#define DT_PROPNODENAME 260
58#define DT_LITERAL 261
59#define DT_LEGACYLITERAL 262
60#define DT_BASE 263
61#define DT_BYTE 264
62#define DT_STRING 265
63#define DT_LABEL 266
64#define DT_REF 267
65
66
67
68
69#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
70typedef union YYSTYPE
71#line 34 "dtc-parser.y"
72{
73 char *propnodename;
74 char *literal;
75 char *labelref;
76 unsigned int cbase;
77 u8 byte;
78 struct data data;
79
80 u64 addr;
81 cell_t cell;
82 struct property *prop;
83 struct property *proplist;
84 struct node *node;
85 struct node *nodelist;
86 struct reserve_info *re;
87}
88/* Line 1489 of yacc.c. */
89#line 90 "dtc-parser.tab.h"
90 YYSTYPE;
91# define yystype YYSTYPE /* obsolescent; will be withdrawn */
92# define YYSTYPE_IS_DECLARED 1
93# define YYSTYPE_IS_TRIVIAL 1
94#endif
95
96extern YYSTYPE yylval;
97
98#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
99typedef struct YYLTYPE
100{
101 int first_line;
102 int first_column;
103 int last_line;
104 int last_column;
105} YYLTYPE;
106# define yyltype YYLTYPE /* obsolescent; will be withdrawn */
107# define YYLTYPE_IS_DECLARED 1
108# define YYLTYPE_IS_TRIVIAL 1
109#endif
110
111extern YYLTYPE yylloc;
diff --git a/arch/powerpc/boot/dtc-src/dtc-parser.y b/arch/powerpc/boot/dtc-src/dtc-parser.y
new file mode 100644
index 000000000000..002ea7fef184
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc-parser.y
@@ -0,0 +1,336 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21%locations
22
23%{
24#include "dtc.h"
25#include "srcpos.h"
26
27int yylex(void);
28unsigned long long eval_literal(const char *s, int base, int bits);
29
30extern struct boot_info *the_boot_info;
31
32%}
33
34%union {
35 char *propnodename;
36 char *literal;
37 char *labelref;
38 unsigned int cbase;
39 u8 byte;
40 struct data data;
41
42 u64 addr;
43 cell_t cell;
44 struct property *prop;
45 struct property *proplist;
46 struct node *node;
47 struct node *nodelist;
48 struct reserve_info *re;
49}
50
51%token DT_V1
52%token DT_MEMRESERVE
53%token <propnodename> DT_PROPNODENAME
54%token <literal> DT_LITERAL
55%token <literal> DT_LEGACYLITERAL
56%token <cbase> DT_BASE
57%token <byte> DT_BYTE
58%token <data> DT_STRING
59%token <labelref> DT_LABEL
60%token <labelref> DT_REF
61
62%type <data> propdata
63%type <data> propdataprefix
64%type <re> memreserve
65%type <re> memreserves
66%type <re> v0_memreserve
67%type <re> v0_memreserves
68%type <addr> addr
69%type <data> celllist
70%type <cbase> cellbase
71%type <cell> cellval
72%type <data> bytestring
73%type <prop> propdef
74%type <proplist> proplist
75
76%type <node> devicetree
77%type <node> nodedef
78%type <node> subnode
79%type <nodelist> subnodes
80%type <labelref> label
81
82%%
83
84sourcefile:
85 DT_V1 ';' memreserves devicetree
86 {
87 the_boot_info = build_boot_info($3, $4);
88 }
89 | v0_memreserves devicetree
90 {
91 the_boot_info = build_boot_info($1, $2);
92 }
93 ;
94
95memreserves:
96 /* empty */
97 {
98 $$ = NULL;
99 }
100 | memreserve memreserves
101 {
102 $$ = chain_reserve_entry($1, $2);
103 }
104 ;
105
106memreserve:
107 label DT_MEMRESERVE addr addr ';'
108 {
109 $$ = build_reserve_entry($3, $4, $1);
110 }
111 ;
112
113v0_memreserves:
114 /* empty */
115 {
116 $$ = NULL;
117 }
118 | v0_memreserve v0_memreserves
119 {
120 $$ = chain_reserve_entry($1, $2);
121 };
122 ;
123
124v0_memreserve:
125 memreserve
126 {
127 $$ = $1;
128 }
129 | label DT_MEMRESERVE addr '-' addr ';'
130 {
131 $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
132 }
133 ;
134
135addr:
136 DT_LITERAL
137 {
138 $$ = eval_literal($1, 0, 64);
139 }
140 | DT_LEGACYLITERAL
141 {
142 $$ = eval_literal($1, 16, 64);
143 }
144 ;
145
146devicetree:
147 '/' nodedef
148 {
149 $$ = name_node($2, "", NULL);
150 }
151 ;
152
153nodedef:
154 '{' proplist subnodes '}' ';'
155 {
156 $$ = build_node($2, $3);
157 }
158 ;
159
160proplist:
161 /* empty */
162 {
163 $$ = NULL;
164 }
165 | proplist propdef
166 {
167 $$ = chain_property($2, $1);
168 }
169 ;
170
171propdef:
172 label DT_PROPNODENAME '=' propdata ';'
173 {
174 $$ = build_property($2, $4, $1);
175 }
176 | label DT_PROPNODENAME ';'
177 {
178 $$ = build_property($2, empty_data, $1);
179 }
180 ;
181
182propdata:
183 propdataprefix DT_STRING
184 {
185 $$ = data_merge($1, $2);
186 }
187 | propdataprefix '<' celllist '>'
188 {
189 $$ = data_merge($1, $3);
190 }
191 | propdataprefix '[' bytestring ']'
192 {
193 $$ = data_merge($1, $3);
194 }
195 | propdataprefix DT_REF
196 {
197 $$ = data_add_marker($1, REF_PATH, $2);
198 }
199 | propdata DT_LABEL
200 {
201 $$ = data_add_marker($1, LABEL, $2);
202 }
203 ;
204
205propdataprefix:
206 /* empty */
207 {
208 $$ = empty_data;
209 }
210 | propdata ','
211 {
212 $$ = $1;
213 }
214 | propdataprefix DT_LABEL
215 {
216 $$ = data_add_marker($1, LABEL, $2);
217 }
218 ;
219
220celllist:
221 /* empty */
222 {
223 $$ = empty_data;
224 }
225 | celllist cellval
226 {
227 $$ = data_append_cell($1, $2);
228 }
229 | celllist DT_REF
230 {
231 $$ = data_append_cell(data_add_marker($1, REF_PHANDLE,
232 $2), -1);
233 }
234 | celllist DT_LABEL
235 {
236 $$ = data_add_marker($1, LABEL, $2);
237 }
238 ;
239
240cellbase:
241 /* empty */
242 {
243 $$ = 16;
244 }
245 | DT_BASE
246 ;
247
248cellval:
249 DT_LITERAL
250 {
251 $$ = eval_literal($1, 0, 32);
252 }
253 | cellbase DT_LEGACYLITERAL
254 {
255 $$ = eval_literal($2, $1, 32);
256 }
257 ;
258
259bytestring:
260 /* empty */
261 {
262 $$ = empty_data;
263 }
264 | bytestring DT_BYTE
265 {
266 $$ = data_append_byte($1, $2);
267 }
268 | bytestring DT_LABEL
269 {
270 $$ = data_add_marker($1, LABEL, $2);
271 }
272 ;
273
274subnodes:
275 /* empty */
276 {
277 $$ = NULL;
278 }
279 | subnode subnodes
280 {
281 $$ = chain_node($1, $2);
282 }
283 | subnode propdef
284 {
285 yyerror("syntax error: properties must precede subnodes\n");
286 YYERROR;
287 }
288 ;
289
290subnode:
291 label DT_PROPNODENAME nodedef
292 {
293 $$ = name_node($3, $2, $1);
294 }
295 ;
296
297label:
298 /* empty */
299 {
300 $$ = NULL;
301 }
302 | DT_LABEL
303 {
304 $$ = $1;
305 }
306 ;
307
308%%
309
310void yyerror (char const *s)
311{
312 const char *fname = srcpos_filename_for_num(yylloc.filenum);
313
314 if (strcmp(fname, "-") == 0)
315 fname = "stdin";
316
317 fprintf(stderr, "%s:%d %s\n",
318 fname, yylloc.first_line, s);
319}
320
321unsigned long long eval_literal(const char *s, int base, int bits)
322{
323 unsigned long long val;
324 char *e;
325
326 errno = 0;
327 val = strtoull(s, &e, base);
328 if (*e)
329 yyerror("bad characters in literal");
330 else if ((errno == ERANGE)
331 || ((bits < 64) && (val >= (1ULL << bits))))
332 yyerror("literal out of range");
333 else if (errno != 0)
334 yyerror("bad literal");
335 return val;
336}
diff --git a/arch/powerpc/boot/dtc-src/dtc.c b/arch/powerpc/boot/dtc-src/dtc.c
new file mode 100644
index 000000000000..01131d7c2d5e
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc.c
@@ -0,0 +1,231 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22#include "srcpos.h"
23
24#include "version_gen.h"
25
26/*
27 * Command line options
28 */
29int quiet; /* Level of quietness */
30int reservenum; /* Number of memory reservation slots */
31int minsize; /* Minimum blob size */
32int padsize; /* Additional padding to blob */
33
34char *join_path(const char *path, const char *name)
35{
36 int lenp = strlen(path);
37 int lenn = strlen(name);
38 int len;
39 int needslash = 1;
40 char *str;
41
42 len = lenp + lenn + 2;
43 if ((lenp > 0) && (path[lenp-1] == '/')) {
44 needslash = 0;
45 len--;
46 }
47
48 str = xmalloc(len);
49 memcpy(str, path, lenp);
50 if (needslash) {
51 str[lenp] = '/';
52 lenp++;
53 }
54 memcpy(str+lenp, name, lenn+1);
55 return str;
56}
57
58void fill_fullpaths(struct node *tree, const char *prefix)
59{
60 struct node *child;
61 const char *unit;
62
63 tree->fullpath = join_path(prefix, tree->name);
64
65 unit = strchr(tree->name, '@');
66 if (unit)
67 tree->basenamelen = unit - tree->name;
68 else
69 tree->basenamelen = strlen(tree->name);
70
71 for_each_child(tree, child)
72 fill_fullpaths(child, tree->fullpath);
73}
74
75static void __attribute__ ((noreturn)) usage(void)
76{
77 fprintf(stderr, "Usage:\n");
78 fprintf(stderr, "\tdtc [options] <input file>\n");
79 fprintf(stderr, "\nOptions:\n");
80 fprintf(stderr, "\t-h\n");
81 fprintf(stderr, "\t\tThis help text\n");
82 fprintf(stderr, "\t-q\n");
83 fprintf(stderr, "\t\tQuiet: -q suppress warnings, -qq errors, -qqq all\n");
84 fprintf(stderr, "\t-I <input format>\n");
85 fprintf(stderr, "\t\tInput formats are:\n");
86 fprintf(stderr, "\t\t\tdts - device tree source text\n");
87 fprintf(stderr, "\t\t\tdtb - device tree blob\n");
88 fprintf(stderr, "\t\t\tfs - /proc/device-tree style directory\n");
89 fprintf(stderr, "\t-o <output file>\n");
90 fprintf(stderr, "\t-O <output format>\n");
91 fprintf(stderr, "\t\tOutput formats are:\n");
92 fprintf(stderr, "\t\t\tdts - device tree source text\n");
93 fprintf(stderr, "\t\t\tdtb - device tree blob\n");
94 fprintf(stderr, "\t\t\tasm - assembler source\n");
95 fprintf(stderr, "\t-V <output version>\n");
96 fprintf(stderr, "\t\tBlob version to produce, defaults to %d (relevant for dtb\n\t\tand asm output only)\n", DEFAULT_FDT_VERSION);
97 fprintf(stderr, "\t-R <number>\n");
98 fprintf(stderr, "\t\tMake space for <number> reserve map entries (relevant for \n\t\tdtb and asm output only)\n");
99 fprintf(stderr, "\t-S <bytes>\n");
100 fprintf(stderr, "\t\tMake the blob at least <bytes> long (extra space)\n");
101 fprintf(stderr, "\t-p <bytes>\n");
102 fprintf(stderr, "\t\tAdd padding to the blob of <bytes> long (extra space)\n");
103 fprintf(stderr, "\t-b <number>\n");
104 fprintf(stderr, "\t\tSet the physical boot cpu\n");
105 fprintf(stderr, "\t-f\n");
106 fprintf(stderr, "\t\tForce - try to produce output even if the input tree has errors\n");
107 fprintf(stderr, "\t-v\n");
108 fprintf(stderr, "\t\tPrint DTC version and exit\n");
109 exit(2);
110}
111
112int main(int argc, char *argv[])
113{
114 struct boot_info *bi;
115 const char *inform = "dts";
116 const char *outform = "dts";
117 const char *outname = "-";
118 int force = 0, check = 0;
119 const char *arg;
120 int opt;
121 FILE *inf = NULL;
122 FILE *outf = NULL;
123 int outversion = DEFAULT_FDT_VERSION;
124 int boot_cpuid_phys = 0xfeedbeef;
125
126 quiet = 0;
127 reservenum = 0;
128 minsize = 0;
129 padsize = 0;
130
131 while ((opt = getopt(argc, argv, "hI:O:o:V:R:S:p:fcqb:v")) != EOF) {
132 switch (opt) {
133 case 'I':
134 inform = optarg;
135 break;
136 case 'O':
137 outform = optarg;
138 break;
139 case 'o':
140 outname = optarg;
141 break;
142 case 'V':
143 outversion = strtol(optarg, NULL, 0);
144 break;
145 case 'R':
146 reservenum = strtol(optarg, NULL, 0);
147 break;
148 case 'S':
149 minsize = strtol(optarg, NULL, 0);
150 break;
151 case 'p':
152 padsize = strtol(optarg, NULL, 0);
153 break;
154 case 'f':
155 force = 1;
156 break;
157 case 'c':
158 check = 1;
159 break;
160 case 'q':
161 quiet++;
162 break;
163 case 'b':
164 boot_cpuid_phys = strtol(optarg, NULL, 0);
165 break;
166 case 'v':
167 printf("Version: %s\n", DTC_VERSION);
168 exit(0);
169 case 'h':
170 default:
171 usage();
172 }
173 }
174
175 if (argc > (optind+1))
176 usage();
177 else if (argc < (optind+1))
178 arg = "-";
179 else
180 arg = argv[optind];
181
182 /* minsize and padsize are mutually exclusive */
183 if ((minsize) && (padsize)) {
184 die("Can't set both -p and -S\n");
185 }
186
187 fprintf(stderr, "DTC: %s->%s on file \"%s\"\n",
188 inform, outform, arg);
189
190 if (streq(inform, "dts")) {
191 bi = dt_from_source(arg);
192 } else if (streq(inform, "fs")) {
193 bi = dt_from_fs(arg);
194 } else if(streq(inform, "dtb")) {
195 inf = dtc_open_file(arg);
196 bi = dt_from_blob(inf);
197 } else {
198 die("Unknown input format \"%s\"\n", inform);
199 }
200
201 if (inf && (inf != stdin))
202 fclose(inf);
203
204 if (! bi || ! bi->dt)
205 die("Couldn't read input tree\n");
206
207 process_checks(force, bi, check, outversion, boot_cpuid_phys);
208
209 if (streq(outname, "-")) {
210 outf = stdout;
211 } else {
212 outf = fopen(outname, "w");
213 if (! outf)
214 die("Couldn't open output file %s: %s\n",
215 outname, strerror(errno));
216 }
217
218 if (streq(outform, "dts")) {
219 dt_to_source(outf, bi);
220 } else if (streq(outform, "dtb")) {
221 dt_to_blob(outf, bi, outversion, boot_cpuid_phys);
222 } else if (streq(outform, "asm")) {
223 dt_to_asm(outf, bi, outversion, boot_cpuid_phys);
224 } else if (streq(outform, "null")) {
225 /* do nothing */
226 } else {
227 die("Unknown output format \"%s\"\n", outform);
228 }
229
230 exit(0);
231}
diff --git a/arch/powerpc/boot/dtc-src/dtc.h b/arch/powerpc/boot/dtc-src/dtc.h
new file mode 100644
index 000000000000..65281777a167
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/dtc.h
@@ -0,0 +1,269 @@
1#ifndef _DTC_H
2#define _DTC_H
3
4/*
5 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
6 *
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (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 GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 * USA
22 */
23
24#include <stdio.h>
25#include <string.h>
26#include <stdlib.h>
27#include <stdint.h>
28#include <stdarg.h>
29#include <assert.h>
30#include <ctype.h>
31#include <errno.h>
32#include <unistd.h>
33#include <netinet/in.h>
34#include <endian.h>
35#include <byteswap.h>
36
37#include <fdt.h>
38
39#define DEFAULT_FDT_VERSION 17
40/*
41 * Command line options
42 */
43extern int quiet; /* Level of quietness */
44extern int reservenum; /* Number of memory reservation slots */
45extern int minsize; /* Minimum blob size */
46extern int padsize; /* Additional padding to blob */
47
48static inline void __attribute__((noreturn)) die(char * str, ...)
49{
50 va_list ap;
51
52 va_start(ap, str);
53 fprintf(stderr, "FATAL ERROR: ");
54 vfprintf(stderr, str, ap);
55 exit(1);
56}
57
58static inline void *xmalloc(size_t len)
59{
60 void *new = malloc(len);
61
62 if (! new)
63 die("malloc() failed\n");
64
65 return new;
66}
67
68static inline void *xrealloc(void *p, size_t len)
69{
70 void *new = realloc(p, len);
71
72 if (! new)
73 die("realloc() failed (len=%d)\n", len);
74
75 return new;
76}
77
78typedef uint8_t u8;
79typedef uint16_t u16;
80typedef uint32_t u32;
81typedef uint64_t u64;
82typedef u32 cell_t;
83
84#define cpu_to_be16(x) htons(x)
85#define be16_to_cpu(x) ntohs(x)
86
87#define cpu_to_be32(x) htonl(x)
88#define be32_to_cpu(x) ntohl(x)
89
90#if __BYTE_ORDER == __BIG_ENDIAN
91#define cpu_to_be64(x) (x)
92#define be64_to_cpu(x) (x)
93#else
94#define cpu_to_be64(x) bswap_64(x)
95#define be64_to_cpu(x) bswap_64(x)
96#endif
97
98#define streq(a, b) (strcmp((a), (b)) == 0)
99#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
100
101#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
102#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
103
104/* Data blobs */
105enum markertype {
106 REF_PHANDLE,
107 REF_PATH,
108 LABEL,
109};
110
111struct marker {
112 enum markertype type;
113 int offset;
114 char *ref;
115 struct marker *next;
116};
117
118struct data {
119 int len;
120 char *val;
121 int asize;
122 struct marker *markers;
123};
124
125
126#define empty_data ((struct data){ /* all .members = 0 or NULL */ })
127
128#define for_each_marker(m) \
129 for (; (m); (m) = (m)->next)
130#define for_each_marker_of_type(m, t) \
131 for_each_marker(m) \
132 if ((m)->type == (t))
133
134void data_free(struct data d);
135
136struct data data_grow_for(struct data d, int xlen);
137
138struct data data_copy_mem(const char *mem, int len);
139struct data data_copy_escape_string(const char *s, int len);
140struct data data_copy_file(FILE *f, size_t len);
141
142struct data data_append_data(struct data d, const void *p, int len);
143struct data data_insert_at_marker(struct data d, struct marker *m,
144 const void *p, int len);
145struct data data_merge(struct data d1, struct data d2);
146struct data data_append_cell(struct data d, cell_t word);
147struct data data_append_re(struct data d, const struct fdt_reserve_entry *re);
148struct data data_append_addr(struct data d, u64 addr);
149struct data data_append_byte(struct data d, uint8_t byte);
150struct data data_append_zeroes(struct data d, int len);
151struct data data_append_align(struct data d, int align);
152
153struct data data_add_marker(struct data d, enum markertype type, char *ref);
154
155int data_is_one_string(struct data d);
156
157/* DT constraints */
158
159#define MAX_PROPNAME_LEN 31
160#define MAX_NODENAME_LEN 31
161
162/* Live trees */
163struct property {
164 char *name;
165 struct data val;
166
167 struct property *next;
168
169 char *label;
170};
171
172struct node {
173 char *name;
174 struct property *proplist;
175 struct node *children;
176
177 struct node *parent;
178 struct node *next_sibling;
179
180 char *fullpath;
181 int basenamelen;
182
183 cell_t phandle;
184 int addr_cells, size_cells;
185
186 char *label;
187};
188
189#define for_each_property(n, p) \
190 for ((p) = (n)->proplist; (p); (p) = (p)->next)
191
192#define for_each_child(n, c) \
193 for ((c) = (n)->children; (c); (c) = (c)->next_sibling)
194
195struct property *build_property(char *name, struct data val, char *label);
196struct property *chain_property(struct property *first, struct property *list);
197struct property *reverse_properties(struct property *first);
198
199struct node *build_node(struct property *proplist, struct node *children);
200struct node *name_node(struct node *node, char *name, char *label);
201struct node *chain_node(struct node *first, struct node *list);
202
203void add_property(struct node *node, struct property *prop);
204void add_child(struct node *parent, struct node *child);
205
206const char *get_unitname(struct node *node);
207struct property *get_property(struct node *node, const char *propname);
208cell_t propval_cell(struct property *prop);
209struct node *get_subnode(struct node *node, const char *nodename);
210struct node *get_node_by_path(struct node *tree, const char *path);
211struct node *get_node_by_label(struct node *tree, const char *label);
212struct node *get_node_by_phandle(struct node *tree, cell_t phandle);
213struct node *get_node_by_ref(struct node *tree, const char *ref);
214cell_t get_node_phandle(struct node *root, struct node *node);
215
216/* Boot info (tree plus memreserve information */
217
218struct reserve_info {
219 struct fdt_reserve_entry re;
220
221 struct reserve_info *next;
222
223 char *label;
224};
225
226struct reserve_info *build_reserve_entry(u64 start, u64 len, char *label);
227struct reserve_info *chain_reserve_entry(struct reserve_info *first,
228 struct reserve_info *list);
229struct reserve_info *add_reserve_entry(struct reserve_info *list,
230 struct reserve_info *new);
231
232
233struct boot_info {
234 struct reserve_info *reservelist;
235 struct node *dt; /* the device tree */
236};
237
238struct boot_info *build_boot_info(struct reserve_info *reservelist,
239 struct node *tree);
240
241/* Checks */
242
243void process_checks(int force, struct boot_info *bi,
244 int checkflag, int outversion, int boot_cpuid_phys);
245
246/* Flattened trees */
247
248void dt_to_blob(FILE *f, struct boot_info *bi, int version,
249 int boot_cpuid_phys);
250void dt_to_asm(FILE *f, struct boot_info *bi, int version,
251 int boot_cpuid_phys);
252
253struct boot_info *dt_from_blob(FILE *f);
254
255/* Tree source */
256
257void dt_to_source(FILE *f, struct boot_info *bi);
258struct boot_info *dt_from_source(const char *f);
259
260/* FS trees */
261
262struct boot_info *dt_from_fs(const char *dirname);
263
264/* misc */
265
266char *join_path(const char *path, const char *name);
267void fill_fullpaths(struct node *tree, const char *prefix);
268
269#endif /* _DTC_H */
diff --git a/arch/powerpc/boot/dtc-src/flattree.c b/arch/powerpc/boot/dtc-src/flattree.c
new file mode 100644
index 000000000000..a7cfb843d334
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/flattree.c
@@ -0,0 +1,968 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22
23#define FTF_FULLPATH 0x1
24#define FTF_VARALIGN 0x2
25#define FTF_NAMEPROPS 0x4
26#define FTF_BOOTCPUID 0x8
27#define FTF_STRTABSIZE 0x10
28#define FTF_STRUCTSIZE 0x20
29#define FTF_NOPS 0x40
30
31static struct version_info {
32 int version;
33 int last_comp_version;
34 int hdr_size;
35 int flags;
36} version_table[] = {
37 {1, 1, FDT_V1_SIZE,
38 FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS},
39 {2, 1, FDT_V2_SIZE,
40 FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID},
41 {3, 1, FDT_V3_SIZE,
42 FTF_FULLPATH|FTF_VARALIGN|FTF_NAMEPROPS|FTF_BOOTCPUID|FTF_STRTABSIZE},
43 {16, 16, FDT_V3_SIZE,
44 FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_NOPS},
45 {17, 16, FDT_V17_SIZE,
46 FTF_BOOTCPUID|FTF_STRTABSIZE|FTF_STRUCTSIZE|FTF_NOPS},
47};
48
49struct emitter {
50 void (*cell)(void *, cell_t);
51 void (*string)(void *, char *, int);
52 void (*align)(void *, int);
53 void (*data)(void *, struct data);
54 void (*beginnode)(void *, const char *);
55 void (*endnode)(void *, const char *);
56 void (*property)(void *, const char *);
57};
58
59static void bin_emit_cell(void *e, cell_t val)
60{
61 struct data *dtbuf = e;
62
63 *dtbuf = data_append_cell(*dtbuf, val);
64}
65
66static void bin_emit_string(void *e, char *str, int len)
67{
68 struct data *dtbuf = e;
69
70 if (len == 0)
71 len = strlen(str);
72
73 *dtbuf = data_append_data(*dtbuf, str, len);
74 *dtbuf = data_append_byte(*dtbuf, '\0');
75}
76
77static void bin_emit_align(void *e, int a)
78{
79 struct data *dtbuf = e;
80
81 *dtbuf = data_append_align(*dtbuf, a);
82}
83
84static void bin_emit_data(void *e, struct data d)
85{
86 struct data *dtbuf = e;
87
88 *dtbuf = data_append_data(*dtbuf, d.val, d.len);
89}
90
91static void bin_emit_beginnode(void *e, const char *label)
92{
93 bin_emit_cell(e, FDT_BEGIN_NODE);
94}
95
96static void bin_emit_endnode(void *e, const char *label)
97{
98 bin_emit_cell(e, FDT_END_NODE);
99}
100
101static void bin_emit_property(void *e, const char *label)
102{
103 bin_emit_cell(e, FDT_PROP);
104}
105
106static struct emitter bin_emitter = {
107 .cell = bin_emit_cell,
108 .string = bin_emit_string,
109 .align = bin_emit_align,
110 .data = bin_emit_data,
111 .beginnode = bin_emit_beginnode,
112 .endnode = bin_emit_endnode,
113 .property = bin_emit_property,
114};
115
116static void emit_label(FILE *f, const char *prefix, const char *label)
117{
118 fprintf(f, "\t.globl\t%s_%s\n", prefix, label);
119 fprintf(f, "%s_%s:\n", prefix, label);
120 fprintf(f, "_%s_%s:\n", prefix, label);
121}
122
123static void emit_offset_label(FILE *f, const char *label, int offset)
124{
125 fprintf(f, "\t.globl\t%s\n", label);
126 fprintf(f, "%s\t= . + %d\n", label, offset);
127}
128
129static void asm_emit_cell(void *e, cell_t val)
130{
131 FILE *f = e;
132
133 fprintf(f, "\t.long\t0x%x\n", val);
134}
135
136static void asm_emit_string(void *e, char *str, int len)
137{
138 FILE *f = e;
139 char c = 0;
140
141 if (len != 0) {
142 /* XXX: ewww */
143 c = str[len];
144 str[len] = '\0';
145 }
146
147 fprintf(f, "\t.string\t\"%s\"\n", str);
148
149 if (len != 0) {
150 str[len] = c;
151 }
152}
153
154static void asm_emit_align(void *e, int a)
155{
156 FILE *f = e;
157
158 fprintf(f, "\t.balign\t%d\n", a);
159}
160
161static void asm_emit_data(void *e, struct data d)
162{
163 FILE *f = e;
164 int off = 0;
165 struct marker *m;
166
167 m = d.markers;
168 while (m) {
169 if (m->type == LABEL)
170 emit_offset_label(f, m->ref, m->offset);
171 m = m->next;
172 }
173
174 while ((d.len - off) >= sizeof(u32)) {
175 fprintf(f, "\t.long\t0x%x\n",
176 be32_to_cpu(*((u32 *)(d.val+off))));
177 off += sizeof(u32);
178 }
179
180 if ((d.len - off) >= sizeof(u16)) {
181 fprintf(f, "\t.short\t0x%hx\n",
182 be16_to_cpu(*((u16 *)(d.val+off))));
183 off += sizeof(u16);
184 }
185
186 if ((d.len - off) >= 1) {
187 fprintf(f, "\t.byte\t0x%hhx\n", d.val[off]);
188 off += 1;
189 }
190
191 assert(off == d.len);
192}
193
194static void asm_emit_beginnode(void *e, const char *label)
195{
196 FILE *f = e;
197
198 if (label) {
199 fprintf(f, "\t.globl\t%s\n", label);
200 fprintf(f, "%s:\n", label);
201 }
202 fprintf(f, "\t.long\tFDT_BEGIN_NODE\n");
203}
204
205static void asm_emit_endnode(void *e, const char *label)
206{
207 FILE *f = e;
208
209 fprintf(f, "\t.long\tFDT_END_NODE\n");
210 if (label) {
211 fprintf(f, "\t.globl\t%s_end\n", label);
212 fprintf(f, "%s_end:\n", label);
213 }
214}
215
216static void asm_emit_property(void *e, const char *label)
217{
218 FILE *f = e;
219
220 if (label) {
221 fprintf(f, "\t.globl\t%s\n", label);
222 fprintf(f, "%s:\n", label);
223 }
224 fprintf(f, "\t.long\tFDT_PROP\n");
225}
226
227static struct emitter asm_emitter = {
228 .cell = asm_emit_cell,
229 .string = asm_emit_string,
230 .align = asm_emit_align,
231 .data = asm_emit_data,
232 .beginnode = asm_emit_beginnode,
233 .endnode = asm_emit_endnode,
234 .property = asm_emit_property,
235};
236
237static int stringtable_insert(struct data *d, const char *str)
238{
239 int i;
240
241 /* FIXME: do this more efficiently? */
242
243 for (i = 0; i < d->len; i++) {
244 if (streq(str, d->val + i))
245 return i;
246 }
247
248 *d = data_append_data(*d, str, strlen(str)+1);
249 return i;
250}
251
252static void flatten_tree(struct node *tree, struct emitter *emit,
253 void *etarget, struct data *strbuf,
254 struct version_info *vi)
255{
256 struct property *prop;
257 struct node *child;
258 int seen_name_prop = 0;
259
260 emit->beginnode(etarget, tree->label);
261
262 if (vi->flags & FTF_FULLPATH)
263 emit->string(etarget, tree->fullpath, 0);
264 else
265 emit->string(etarget, tree->name, 0);
266
267 emit->align(etarget, sizeof(cell_t));
268
269 for_each_property(tree, prop) {
270 int nameoff;
271
272 if (streq(prop->name, "name"))
273 seen_name_prop = 1;
274
275 nameoff = stringtable_insert(strbuf, prop->name);
276
277 emit->property(etarget, prop->label);
278 emit->cell(etarget, prop->val.len);
279 emit->cell(etarget, nameoff);
280
281 if ((vi->flags & FTF_VARALIGN) && (prop->val.len >= 8))
282 emit->align(etarget, 8);
283
284 emit->data(etarget, prop->val);
285 emit->align(etarget, sizeof(cell_t));
286 }
287
288 if ((vi->flags & FTF_NAMEPROPS) && !seen_name_prop) {
289 emit->property(etarget, NULL);
290 emit->cell(etarget, tree->basenamelen+1);
291 emit->cell(etarget, stringtable_insert(strbuf, "name"));
292
293 if ((vi->flags & FTF_VARALIGN) && ((tree->basenamelen+1) >= 8))
294 emit->align(etarget, 8);
295
296 emit->string(etarget, tree->name, tree->basenamelen);
297 emit->align(etarget, sizeof(cell_t));
298 }
299
300 for_each_child(tree, child) {
301 flatten_tree(child, emit, etarget, strbuf, vi);
302 }
303
304 emit->endnode(etarget, tree->label);
305}
306
307static struct data flatten_reserve_list(struct reserve_info *reservelist,
308 struct version_info *vi)
309{
310 struct reserve_info *re;
311 struct data d = empty_data;
312 static struct fdt_reserve_entry null_re = {0,0};
313 int j;
314
315 for (re = reservelist; re; re = re->next) {
316 d = data_append_re(d, &re->re);
317 }
318 /*
319 * Add additional reserved slots if the user asked for them.
320 */
321 for (j = 0; j < reservenum; j++) {
322 d = data_append_re(d, &null_re);
323 }
324
325 return d;
326}
327
328static void make_fdt_header(struct fdt_header *fdt,
329 struct version_info *vi,
330 int reservesize, int dtsize, int strsize,
331 int boot_cpuid_phys)
332{
333 int reserve_off;
334
335 reservesize += sizeof(struct fdt_reserve_entry);
336
337 memset(fdt, 0xff, sizeof(*fdt));
338
339 fdt->magic = cpu_to_be32(FDT_MAGIC);
340 fdt->version = cpu_to_be32(vi->version);
341 fdt->last_comp_version = cpu_to_be32(vi->last_comp_version);
342
343 /* Reserve map should be doubleword aligned */
344 reserve_off = ALIGN(vi->hdr_size, 8);
345
346 fdt->off_mem_rsvmap = cpu_to_be32(reserve_off);
347 fdt->off_dt_struct = cpu_to_be32(reserve_off + reservesize);
348 fdt->off_dt_strings = cpu_to_be32(reserve_off + reservesize
349 + dtsize);
350 fdt->totalsize = cpu_to_be32(reserve_off + reservesize + dtsize + strsize);
351
352 if (vi->flags & FTF_BOOTCPUID)
353 fdt->boot_cpuid_phys = cpu_to_be32(boot_cpuid_phys);
354 if (vi->flags & FTF_STRTABSIZE)
355 fdt->size_dt_strings = cpu_to_be32(strsize);
356 if (vi->flags & FTF_STRUCTSIZE)
357 fdt->size_dt_struct = cpu_to_be32(dtsize);
358}
359
360void dt_to_blob(FILE *f, struct boot_info *bi, int version,
361 int boot_cpuid_phys)
362{
363 struct version_info *vi = NULL;
364 int i;
365 struct data blob = empty_data;
366 struct data reservebuf = empty_data;
367 struct data dtbuf = empty_data;
368 struct data strbuf = empty_data;
369 struct fdt_header fdt;
370 int padlen = 0;
371
372 for (i = 0; i < ARRAY_SIZE(version_table); i++) {
373 if (version_table[i].version == version)
374 vi = &version_table[i];
375 }
376 if (!vi)
377 die("Unknown device tree blob version %d\n", version);
378
379 flatten_tree(bi->dt, &bin_emitter, &dtbuf, &strbuf, vi);
380 bin_emit_cell(&dtbuf, FDT_END);
381
382 reservebuf = flatten_reserve_list(bi->reservelist, vi);
383
384 /* Make header */
385 make_fdt_header(&fdt, vi, reservebuf.len, dtbuf.len, strbuf.len,
386 boot_cpuid_phys);
387
388 /*
389 * If the user asked for more space than is used, adjust the totalsize.
390 */
391 if (minsize > 0) {
392 padlen = minsize - be32_to_cpu(fdt.totalsize);
393 if ((padlen < 0) && (quiet < 1))
394 fprintf(stderr,
395 "Warning: blob size %d >= minimum size %d\n",
396 be32_to_cpu(fdt.totalsize), minsize);
397 }
398
399 if (padsize > 0)
400 padlen = padsize;
401
402 if (padlen > 0) {
403 int tsize = be32_to_cpu(fdt.totalsize);
404 tsize += padlen;
405 fdt.totalsize = cpu_to_be32(tsize);
406 }
407
408 /*
409 * Assemble the blob: start with the header, add with alignment
410 * the reserve buffer, add the reserve map terminating zeroes,
411 * the device tree itself, and finally the strings.
412 */
413 blob = data_append_data(blob, &fdt, sizeof(fdt));
414 blob = data_append_align(blob, 8);
415 blob = data_merge(blob, reservebuf);
416 blob = data_append_zeroes(blob, sizeof(struct fdt_reserve_entry));
417 blob = data_merge(blob, dtbuf);
418 blob = data_merge(blob, strbuf);
419
420 /*
421 * If the user asked for more space than is used, pad out the blob.
422 */
423 if (padlen > 0)
424 blob = data_append_zeroes(blob, padlen);
425
426 fwrite(blob.val, blob.len, 1, f);
427
428 if (ferror(f))
429 die("Error writing device tree blob: %s\n", strerror(errno));
430
431 /*
432 * data_merge() frees the right-hand element so only the blob
433 * remains to be freed.
434 */
435 data_free(blob);
436}
437
438static void dump_stringtable_asm(FILE *f, struct data strbuf)
439{
440 const char *p;
441 int len;
442
443 p = strbuf.val;
444
445 while (p < (strbuf.val + strbuf.len)) {
446 len = strlen(p);
447 fprintf(f, "\t.string \"%s\"\n", p);
448 p += len+1;
449 }
450}
451
452void dt_to_asm(FILE *f, struct boot_info *bi, int version, int boot_cpuid_phys)
453{
454 struct version_info *vi = NULL;
455 int i;
456 struct data strbuf = empty_data;
457 struct reserve_info *re;
458 const char *symprefix = "dt";
459
460 for (i = 0; i < ARRAY_SIZE(version_table); i++) {
461 if (version_table[i].version == version)
462 vi = &version_table[i];
463 }
464 if (!vi)
465 die("Unknown device tree blob version %d\n", version);
466
467 fprintf(f, "/* autogenerated by dtc, do not edit */\n\n");
468 fprintf(f, "#define FDT_MAGIC 0x%x\n", FDT_MAGIC);
469 fprintf(f, "#define FDT_BEGIN_NODE 0x%x\n", FDT_BEGIN_NODE);
470 fprintf(f, "#define FDT_END_NODE 0x%x\n", FDT_END_NODE);
471 fprintf(f, "#define FDT_PROP 0x%x\n", FDT_PROP);
472 fprintf(f, "#define FDT_END 0x%x\n", FDT_END);
473 fprintf(f, "\n");
474
475 emit_label(f, symprefix, "blob_start");
476 emit_label(f, symprefix, "header");
477 fprintf(f, "\t.long\tFDT_MAGIC\t\t\t\t/* magic */\n");
478 fprintf(f, "\t.long\t_%s_blob_abs_end - _%s_blob_start\t/* totalsize */\n",
479 symprefix, symprefix);
480 fprintf(f, "\t.long\t_%s_struct_start - _%s_blob_start\t/* off_dt_struct */\n",
481 symprefix, symprefix);
482 fprintf(f, "\t.long\t_%s_strings_start - _%s_blob_start\t/* off_dt_strings */\n",
483 symprefix, symprefix);
484 fprintf(f, "\t.long\t_%s_reserve_map - _%s_blob_start\t/* off_dt_strings */\n",
485 symprefix, symprefix);
486 fprintf(f, "\t.long\t%d\t\t\t\t\t/* version */\n", vi->version);
487 fprintf(f, "\t.long\t%d\t\t\t\t\t/* last_comp_version */\n",
488 vi->last_comp_version);
489
490 if (vi->flags & FTF_BOOTCPUID)
491 fprintf(f, "\t.long\t%i\t\t\t\t\t/* boot_cpuid_phys */\n",
492 boot_cpuid_phys);
493
494 if (vi->flags & FTF_STRTABSIZE)
495 fprintf(f, "\t.long\t_%s_strings_end - _%s_strings_start\t/* size_dt_strings */\n",
496 symprefix, symprefix);
497
498 if (vi->flags & FTF_STRUCTSIZE)
499 fprintf(f, "\t.long\t_%s_struct_end - _%s_struct_start\t/* size_dt_struct */\n",
500 symprefix, symprefix);
501
502 /*
503 * Reserve map entries.
504 * Align the reserve map to a doubleword boundary.
505 * Each entry is an (address, size) pair of u64 values.
506 * Always supply a zero-sized temination entry.
507 */
508 asm_emit_align(f, 8);
509 emit_label(f, symprefix, "reserve_map");
510
511 fprintf(f, "/* Memory reserve map from source file */\n");
512
513 /*
514 * Use .long on high and low halfs of u64s to avoid .quad
515 * as it appears .quad isn't available in some assemblers.
516 */
517 for (re = bi->reservelist; re; re = re->next) {
518 if (re->label) {
519 fprintf(f, "\t.globl\t%s\n", re->label);
520 fprintf(f, "%s:\n", re->label);
521 }
522 fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
523 (unsigned int)(re->re.address >> 32),
524 (unsigned int)(re->re.address & 0xffffffff));
525 fprintf(f, "\t.long\t0x%08x, 0x%08x\n",
526 (unsigned int)(re->re.size >> 32),
527 (unsigned int)(re->re.size & 0xffffffff));
528 }
529 for (i = 0; i < reservenum; i++) {
530 fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
531 }
532
533 fprintf(f, "\t.long\t0, 0\n\t.long\t0, 0\n");
534
535 emit_label(f, symprefix, "struct_start");
536 flatten_tree(bi->dt, &asm_emitter, f, &strbuf, vi);
537 fprintf(f, "\t.long\tFDT_END\n");
538 emit_label(f, symprefix, "struct_end");
539
540 emit_label(f, symprefix, "strings_start");
541 dump_stringtable_asm(f, strbuf);
542 emit_label(f, symprefix, "strings_end");
543
544 emit_label(f, symprefix, "blob_end");
545
546 /*
547 * If the user asked for more space than is used, pad it out.
548 */
549 if (minsize > 0) {
550 fprintf(f, "\t.space\t%d - (_%s_blob_end - _%s_blob_start), 0\n",
551 minsize, symprefix, symprefix);
552 }
553 if (padsize > 0) {
554 fprintf(f, "\t.space\t%d, 0\n", padsize);
555 }
556 emit_label(f, symprefix, "blob_abs_end");
557
558 data_free(strbuf);
559}
560
561struct inbuf {
562 char *base, *limit, *ptr;
563};
564
565static void inbuf_init(struct inbuf *inb, void *base, void *limit)
566{
567 inb->base = base;
568 inb->limit = limit;
569 inb->ptr = inb->base;
570}
571
572static void flat_read_chunk(struct inbuf *inb, void *p, int len)
573{
574 if ((inb->ptr + len) > inb->limit)
575 die("Premature end of data parsing flat device tree\n");
576
577 memcpy(p, inb->ptr, len);
578
579 inb->ptr += len;
580}
581
582static u32 flat_read_word(struct inbuf *inb)
583{
584 u32 val;
585
586 assert(((inb->ptr - inb->base) % sizeof(val)) == 0);
587
588 flat_read_chunk(inb, &val, sizeof(val));
589
590 return be32_to_cpu(val);
591}
592
593static void flat_realign(struct inbuf *inb, int align)
594{
595 int off = inb->ptr - inb->base;
596
597 inb->ptr = inb->base + ALIGN(off, align);
598 if (inb->ptr > inb->limit)
599 die("Premature end of data parsing flat device tree\n");
600}
601
602static char *flat_read_string(struct inbuf *inb)
603{
604 int len = 0;
605 const char *p = inb->ptr;
606 char *str;
607
608 do {
609 if (p >= inb->limit)
610 die("Premature end of data parsing flat device tree\n");
611 len++;
612 } while ((*p++) != '\0');
613
614 str = strdup(inb->ptr);
615
616 inb->ptr += len;
617
618 flat_realign(inb, sizeof(u32));
619
620 return str;
621}
622
623static struct data flat_read_data(struct inbuf *inb, int len)
624{
625 struct data d = empty_data;
626
627 if (len == 0)
628 return empty_data;
629
630 d = data_grow_for(d, len);
631 d.len = len;
632
633 flat_read_chunk(inb, d.val, len);
634
635 flat_realign(inb, sizeof(u32));
636
637 return d;
638}
639
640static char *flat_read_stringtable(struct inbuf *inb, int offset)
641{
642 const char *p;
643
644 p = inb->base + offset;
645 while (1) {
646 if (p >= inb->limit || p < inb->base)
647 die("String offset %d overruns string table\n",
648 offset);
649
650 if (*p == '\0')
651 break;
652
653 p++;
654 }
655
656 return strdup(inb->base + offset);
657}
658
659static struct property *flat_read_property(struct inbuf *dtbuf,
660 struct inbuf *strbuf, int flags)
661{
662 u32 proplen, stroff;
663 char *name;
664 struct data val;
665
666 proplen = flat_read_word(dtbuf);
667 stroff = flat_read_word(dtbuf);
668
669 name = flat_read_stringtable(strbuf, stroff);
670
671 if ((flags & FTF_VARALIGN) && (proplen >= 8))
672 flat_realign(dtbuf, 8);
673
674 val = flat_read_data(dtbuf, proplen);
675
676 return build_property(name, val, NULL);
677}
678
679
680static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
681{
682 struct reserve_info *reservelist = NULL;
683 struct reserve_info *new;
684 const char *p;
685 struct fdt_reserve_entry re;
686
687 /*
688 * Each entry is a pair of u64 (addr, size) values for 4 cell_t's.
689 * List terminates at an entry with size equal to zero.
690 *
691 * First pass, count entries.
692 */
693 p = inb->ptr;
694 while (1) {
695 flat_read_chunk(inb, &re, sizeof(re));
696 re.address = be64_to_cpu(re.address);
697 re.size = be64_to_cpu(re.size);
698 if (re.size == 0)
699 break;
700
701 new = build_reserve_entry(re.address, re.size, NULL);
702 reservelist = add_reserve_entry(reservelist, new);
703 }
704
705 return reservelist;
706}
707
708
709static char *nodename_from_path(const char *ppath, const char *cpath)
710{
711 const char *lslash;
712 int plen;
713
714 lslash = strrchr(cpath, '/');
715 if (! lslash)
716 return NULL;
717
718 plen = lslash - cpath;
719
720 if (streq(cpath, "/") && streq(ppath, ""))
721 return "";
722
723 if ((plen == 0) && streq(ppath, "/"))
724 return strdup(lslash+1);
725
726 if (! strneq(ppath, cpath, plen))
727 return NULL;
728
729 return strdup(lslash+1);
730}
731
732static const char PROPCHAR[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,._+*#?-";
733static const char UNITCHAR[] = "0123456789abcdef,";
734
735static int check_node_name(const char *name)
736{
737 const char *atpos;
738 int basenamelen;
739
740 atpos = strrchr(name, '@');
741
742 if (atpos)
743 basenamelen = atpos - name;
744 else
745 basenamelen = strlen(name);
746
747 if (strspn(name, PROPCHAR) < basenamelen)
748 return -1;
749
750 if (atpos
751 && ((basenamelen + 1 + strspn(atpos+1, UNITCHAR)) < strlen(name)))
752 return -1;
753
754 return basenamelen;
755}
756
757static struct node *unflatten_tree(struct inbuf *dtbuf,
758 struct inbuf *strbuf,
759 const char *parent_path, int flags)
760{
761 struct node *node;
762 u32 val;
763
764 node = build_node(NULL, NULL);
765
766 if (flags & FTF_FULLPATH) {
767 node->fullpath = flat_read_string(dtbuf);
768 node->name = nodename_from_path(parent_path, node->fullpath);
769
770 if (! node->name)
771 die("Path \"%s\" is not valid as a child of \"%s\"\n",
772 node->fullpath, parent_path);
773 } else {
774 node->name = flat_read_string(dtbuf);
775 node->fullpath = join_path(parent_path, node->name);
776 }
777
778 node->basenamelen = check_node_name(node->name);
779 if (node->basenamelen < 0) {
780 fprintf(stderr, "Warning \"%s\" has incorrect format\n", node->name);
781 }
782
783 do {
784 struct property *prop;
785 struct node *child;
786
787 val = flat_read_word(dtbuf);
788 switch (val) {
789 case FDT_PROP:
790 if (node->children)
791 fprintf(stderr, "Warning: Flat tree input has "
792 "subnodes preceding a property.\n");
793 prop = flat_read_property(dtbuf, strbuf, flags);
794 add_property(node, prop);
795 break;
796
797 case FDT_BEGIN_NODE:
798 child = unflatten_tree(dtbuf,strbuf, node->fullpath,
799 flags);
800 add_child(node, child);
801 break;
802
803 case FDT_END_NODE:
804 break;
805
806 case FDT_END:
807 die("Premature FDT_END in device tree blob\n");
808 break;
809
810 case FDT_NOP:
811 if (!(flags & FTF_NOPS))
812 fprintf(stderr, "Warning: NOP tag found in flat tree"
813 " version <16\n");
814
815 /* Ignore */
816 break;
817
818 default:
819 die("Invalid opcode word %08x in device tree blob\n",
820 val);
821 }
822 } while (val != FDT_END_NODE);
823
824 return node;
825}
826
827
828struct boot_info *dt_from_blob(FILE *f)
829{
830 u32 magic, totalsize, version, size_str, size_dt;
831 u32 off_dt, off_str, off_mem_rsvmap;
832 int rc;
833 char *blob;
834 struct fdt_header *fdt;
835 char *p;
836 struct inbuf dtbuf, strbuf;
837 struct inbuf memresvbuf;
838 int sizeleft;
839 struct reserve_info *reservelist;
840 struct node *tree;
841 u32 val;
842 int flags = 0;
843
844 rc = fread(&magic, sizeof(magic), 1, f);
845 if (ferror(f))
846 die("Error reading DT blob magic number: %s\n",
847 strerror(errno));
848 if (rc < 1) {
849 if (feof(f))
850 die("EOF reading DT blob magic number\n");
851 else
852 die("Mysterious short read reading magic number\n");
853 }
854
855 magic = be32_to_cpu(magic);
856 if (magic != FDT_MAGIC)
857 die("Blob has incorrect magic number\n");
858
859 rc = fread(&totalsize, sizeof(totalsize), 1, f);
860 if (ferror(f))
861 die("Error reading DT blob size: %s\n", strerror(errno));
862 if (rc < 1) {
863 if (feof(f))
864 die("EOF reading DT blob size\n");
865 else
866 die("Mysterious short read reading blob size\n");
867 }
868
869 totalsize = be32_to_cpu(totalsize);
870 if (totalsize < FDT_V1_SIZE)
871 die("DT blob size (%d) is too small\n", totalsize);
872
873 blob = xmalloc(totalsize);
874
875 fdt = (struct fdt_header *)blob;
876 fdt->magic = cpu_to_be32(magic);
877 fdt->totalsize = cpu_to_be32(totalsize);
878
879 sizeleft = totalsize - sizeof(magic) - sizeof(totalsize);
880 p = blob + sizeof(magic) + sizeof(totalsize);
881
882 while (sizeleft) {
883 if (feof(f))
884 die("EOF before reading %d bytes of DT blob\n",
885 totalsize);
886
887 rc = fread(p, 1, sizeleft, f);
888 if (ferror(f))
889 die("Error reading DT blob: %s\n",
890 strerror(errno));
891
892 sizeleft -= rc;
893 p += rc;
894 }
895
896 off_dt = be32_to_cpu(fdt->off_dt_struct);
897 off_str = be32_to_cpu(fdt->off_dt_strings);
898 off_mem_rsvmap = be32_to_cpu(fdt->off_mem_rsvmap);
899 version = be32_to_cpu(fdt->version);
900
901 fprintf(stderr, "\tmagic:\t\t\t0x%x\n", magic);
902 fprintf(stderr, "\ttotalsize:\t\t%d\n", totalsize);
903 fprintf(stderr, "\toff_dt_struct:\t\t0x%x\n", off_dt);
904 fprintf(stderr, "\toff_dt_strings:\t\t0x%x\n", off_str);
905 fprintf(stderr, "\toff_mem_rsvmap:\t\t0x%x\n", off_mem_rsvmap);
906 fprintf(stderr, "\tversion:\t\t0x%x\n", version );
907 fprintf(stderr, "\tlast_comp_version:\t0x%x\n",
908 be32_to_cpu(fdt->last_comp_version));
909
910 if (off_mem_rsvmap >= totalsize)
911 die("Mem Reserve structure offset exceeds total size\n");
912
913 if (off_dt >= totalsize)
914 die("DT structure offset exceeds total size\n");
915
916 if (off_str > totalsize)
917 die("String table offset exceeds total size\n");
918
919 if (version >= 2)
920 fprintf(stderr, "\tboot_cpuid_phys:\t0x%x\n",
921 be32_to_cpu(fdt->boot_cpuid_phys));
922
923 size_str = -1;
924 if (version >= 3) {
925 size_str = be32_to_cpu(fdt->size_dt_strings);
926 fprintf(stderr, "\tsize_dt_strings:\t%d\n", size_str);
927 if (off_str+size_str > totalsize)
928 die("String table extends past total size\n");
929 }
930
931 if (version >= 17) {
932 size_dt = be32_to_cpu(fdt->size_dt_struct);
933 fprintf(stderr, "\tsize_dt_struct:\t\t%d\n", size_dt);
934 if (off_dt+size_dt > totalsize)
935 die("Structure block extends past total size\n");
936 }
937
938 if (version < 16) {
939 flags |= FTF_FULLPATH | FTF_NAMEPROPS | FTF_VARALIGN;
940 } else {
941 flags |= FTF_NOPS;
942 }
943
944 inbuf_init(&memresvbuf,
945 blob + off_mem_rsvmap, blob + totalsize);
946 inbuf_init(&dtbuf, blob + off_dt, blob + totalsize);
947 if (size_str >= 0)
948 inbuf_init(&strbuf, blob + off_str, blob + off_str + size_str);
949 else
950 inbuf_init(&strbuf, blob + off_str, blob + totalsize);
951
952 reservelist = flat_read_mem_reserve(&memresvbuf);
953
954 val = flat_read_word(&dtbuf);
955
956 if (val != FDT_BEGIN_NODE)
957 die("Device tree blob doesn't begin with FDT_BEGIN_NODE (begins with 0x%08x)\n", val);
958
959 tree = unflatten_tree(&dtbuf, &strbuf, "", flags);
960
961 val = flat_read_word(&dtbuf);
962 if (val != FDT_END)
963 die("Device tree blob doesn't end with FDT_END\n");
964
965 free(blob);
966
967 return build_boot_info(reservelist, tree);
968}
diff --git a/arch/powerpc/boot/dtc-src/fstree.c b/arch/powerpc/boot/dtc-src/fstree.c
new file mode 100644
index 000000000000..2a160a46998e
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/fstree.c
@@ -0,0 +1,94 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22
23#include <dirent.h>
24#include <sys/stat.h>
25
26static struct node *read_fstree(const char *dirname)
27{
28 DIR *d;
29 struct dirent *de;
30 struct stat st;
31 struct node *tree;
32
33 d = opendir(dirname);
34 if (! d)
35 die("opendir(): %s\n", strerror(errno));
36
37 tree = build_node(NULL, NULL);
38
39 while ((de = readdir(d)) != NULL) {
40 char *tmpnam;
41
42 if (streq(de->d_name, ".")
43 || streq(de->d_name, ".."))
44 continue;
45
46 tmpnam = join_path(dirname, de->d_name);
47
48 if (lstat(tmpnam, &st) < 0)
49 die("stat(%s): %s\n", tmpnam, strerror(errno));
50
51 if (S_ISREG(st.st_mode)) {
52 struct property *prop;
53 FILE *pfile;
54
55 pfile = fopen(tmpnam, "r");
56 if (! pfile) {
57 fprintf(stderr,
58 "WARNING: Cannot open %s: %s\n",
59 tmpnam, strerror(errno));
60 } else {
61 prop = build_property(strdup(de->d_name),
62 data_copy_file(pfile,
63 st.st_size),
64 NULL);
65 add_property(tree, prop);
66 fclose(pfile);
67 }
68 } else if (S_ISDIR(st.st_mode)) {
69 struct node *newchild;
70
71 newchild = read_fstree(tmpnam);
72 newchild = name_node(newchild, strdup(de->d_name),
73 NULL);
74 add_child(tree, newchild);
75 }
76
77 free(tmpnam);
78 }
79
80 return tree;
81}
82
83struct boot_info *dt_from_fs(const char *dirname)
84{
85 struct node *tree;
86
87 tree = read_fstree(dirname);
88 tree = name_node(tree, "", NULL);
89
90 fill_fullpaths(tree, "");
91
92 return build_boot_info(NULL, tree);
93}
94
diff --git a/arch/powerpc/boot/dtc-src/livetree.c b/arch/powerpc/boot/dtc-src/livetree.c
new file mode 100644
index 000000000000..6ba0846b4310
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/livetree.c
@@ -0,0 +1,305 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22
23/*
24 * Tree building functions
25 */
26
27struct property *build_property(char *name, struct data val, char *label)
28{
29 struct property *new = xmalloc(sizeof(*new));
30
31 new->name = name;
32 new->val = val;
33
34 new->next = NULL;
35
36 new->label = label;
37
38 return new;
39}
40
41struct property *chain_property(struct property *first, struct property *list)
42{
43 assert(first->next == NULL);
44
45 first->next = list;
46 return first;
47}
48
49struct property *reverse_properties(struct property *first)
50{
51 struct property *p = first;
52 struct property *head = NULL;
53 struct property *next;
54
55 while (p) {
56 next = p->next;
57 p->next = head;
58 head = p;
59 p = next;
60 }
61 return head;
62}
63
64struct node *build_node(struct property *proplist, struct node *children)
65{
66 struct node *new = xmalloc(sizeof(*new));
67 struct node *child;
68
69 memset(new, 0, sizeof(*new));
70
71 new->proplist = reverse_properties(proplist);
72 new->children = children;
73
74 for_each_child(new, child) {
75 child->parent = new;
76 }
77
78 return new;
79}
80
81struct node *name_node(struct node *node, char *name, char * label)
82{
83 assert(node->name == NULL);
84
85 node->name = name;
86
87 node->label = label;
88
89 return node;
90}
91
92struct node *chain_node(struct node *first, struct node *list)
93{
94 assert(first->next_sibling == NULL);
95
96 first->next_sibling = list;
97 return first;
98}
99
100void add_property(struct node *node, struct property *prop)
101{
102 struct property **p;
103
104 prop->next = NULL;
105
106 p = &node->proplist;
107 while (*p)
108 p = &((*p)->next);
109
110 *p = prop;
111}
112
113void add_child(struct node *parent, struct node *child)
114{
115 struct node **p;
116
117 child->next_sibling = NULL;
118
119 p = &parent->children;
120 while (*p)
121 p = &((*p)->next_sibling);
122
123 *p = child;
124}
125
126struct reserve_info *build_reserve_entry(u64 address, u64 size, char *label)
127{
128 struct reserve_info *new = xmalloc(sizeof(*new));
129
130 new->re.address = address;
131 new->re.size = size;
132
133 new->next = NULL;
134
135 new->label = label;
136
137 return new;
138}
139
140struct reserve_info *chain_reserve_entry(struct reserve_info *first,
141 struct reserve_info *list)
142{
143 assert(first->next == NULL);
144
145 first->next = list;
146 return first;
147}
148
149struct reserve_info *add_reserve_entry(struct reserve_info *list,
150 struct reserve_info *new)
151{
152 struct reserve_info *last;
153
154 new->next = NULL;
155
156 if (! list)
157 return new;
158
159 for (last = list; last->next; last = last->next)
160 ;
161
162 last->next = new;
163
164 return list;
165}
166
167struct boot_info *build_boot_info(struct reserve_info *reservelist,
168 struct node *tree)
169{
170 struct boot_info *bi;
171
172 bi = xmalloc(sizeof(*bi));
173 bi->reservelist = reservelist;
174 bi->dt = tree;
175
176 return bi;
177}
178
179/*
180 * Tree accessor functions
181 */
182
183const char *get_unitname(struct node *node)
184{
185 if (node->name[node->basenamelen] == '\0')
186 return "";
187 else
188 return node->name + node->basenamelen + 1;
189}
190
191struct property *get_property(struct node *node, const char *propname)
192{
193 struct property *prop;
194
195 for_each_property(node, prop)
196 if (streq(prop->name, propname))
197 return prop;
198
199 return NULL;
200}
201
202cell_t propval_cell(struct property *prop)
203{
204 assert(prop->val.len == sizeof(cell_t));
205 return be32_to_cpu(*((cell_t *)prop->val.val));
206}
207
208struct node *get_subnode(struct node *node, const char *nodename)
209{
210 struct node *child;
211
212 for_each_child(node, child)
213 if (streq(child->name, nodename))
214 return child;
215
216 return NULL;
217}
218
219struct node *get_node_by_path(struct node *tree, const char *path)
220{
221 const char *p;
222 struct node *child;
223
224 if (!path || ! (*path))
225 return tree;
226
227 while (path[0] == '/')
228 path++;
229
230 p = strchr(path, '/');
231
232 for_each_child(tree, child) {
233 if (p && strneq(path, child->name, p-path))
234 return get_node_by_path(child, p+1);
235 else if (!p && streq(path, child->name))
236 return child;
237 }
238
239 return NULL;
240}
241
242struct node *get_node_by_label(struct node *tree, const char *label)
243{
244 struct node *child, *node;
245
246 assert(label && (strlen(label) > 0));
247
248 if (tree->label && streq(tree->label, label))
249 return tree;
250
251 for_each_child(tree, child) {
252 node = get_node_by_label(child, label);
253 if (node)
254 return node;
255 }
256
257 return NULL;
258}
259
260struct node *get_node_by_phandle(struct node *tree, cell_t phandle)
261{
262 struct node *child, *node;
263
264 assert((phandle != 0) && (phandle != -1));
265
266 if (tree->phandle == phandle)
267 return tree;
268
269 for_each_child(tree, child) {
270 node = get_node_by_phandle(child, phandle);
271 if (node)
272 return node;
273 }
274
275 return NULL;
276}
277
278struct node *get_node_by_ref(struct node *tree, const char *ref)
279{
280 if (ref[0] == '/')
281 return get_node_by_path(tree, ref);
282 else
283 return get_node_by_label(tree, ref);
284}
285
286cell_t get_node_phandle(struct node *root, struct node *node)
287{
288 static cell_t phandle = 1; /* FIXME: ick, static local */
289
290 if ((node->phandle != 0) && (node->phandle != -1))
291 return node->phandle;
292
293 assert(! get_property(node, "linux,phandle"));
294
295 while (get_node_by_phandle(root, phandle))
296 phandle++;
297
298 node->phandle = phandle;
299 add_property(node,
300 build_property("linux,phandle",
301 data_append_cell(empty_data, phandle),
302 NULL));
303
304 return node->phandle;
305}
diff --git a/arch/powerpc/boot/dtc-src/srcpos.c b/arch/powerpc/boot/dtc-src/srcpos.c
new file mode 100644
index 000000000000..352b0fe06fde
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/srcpos.c
@@ -0,0 +1,105 @@
1/*
2 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
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 as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 * USA
18 */
19
20#include "dtc.h"
21#include "srcpos.h"
22
23
24/*
25 * Record the complete unique set of opened file names.
26 * Primarily used to cache source position file names.
27 */
28#define MAX_N_FILE_NAMES (100)
29
30const char *file_names[MAX_N_FILE_NAMES];
31static int n_file_names = 0;
32
33/*
34 * Like yylineno, this is the current open file pos.
35 */
36
37int srcpos_filenum = -1;
38
39
40
41FILE *dtc_open_file(const char *fname)
42{
43 FILE *f;
44
45 if (lookup_file_name(fname, 1) < 0)
46 die("Too many files opened\n");
47
48 if (streq(fname, "-"))
49 f = stdin;
50 else
51 f = fopen(fname, "r");
52
53 if (! f)
54 die("Couldn't open \"%s\": %s\n", fname, strerror(errno));
55
56 return f;
57}
58
59
60
61/*
62 * Locate and optionally add filename fname in the file_names[] array.
63 *
64 * If the filename is currently not in the array and the boolean
65 * add_it is non-zero, an attempt to add the filename will be made.
66 *
67 * Returns;
68 * Index [0..MAX_N_FILE_NAMES) where the filename is kept
69 * -1 if the name can not be recorded
70 */
71
72int lookup_file_name(const char *fname, int add_it)
73{
74 int i;
75
76 for (i = 0; i < n_file_names; i++) {
77 if (strcmp(file_names[i], fname) == 0)
78 return i;
79 }
80
81 if (add_it) {
82 if (n_file_names < MAX_N_FILE_NAMES) {
83 file_names[n_file_names] = strdup(fname);
84 return n_file_names++;
85 }
86 }
87
88 return -1;
89}
90
91
92const char *srcpos_filename_for_num(int filenum)
93{
94 if (0 <= filenum && filenum < n_file_names) {
95 return file_names[filenum];
96 }
97
98 return 0;
99}
100
101
102const char *srcpos_get_filename(void)
103{
104 return srcpos_filename_for_num(srcpos_filenum);
105}
diff --git a/arch/powerpc/boot/dtc-src/srcpos.h b/arch/powerpc/boot/dtc-src/srcpos.h
new file mode 100644
index 000000000000..ce7ab5ba5b46
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/srcpos.h
@@ -0,0 +1,75 @@
1/*
2 * Copyright 2007 Jon Loeliger, Freescale Semiconductor, Inc.
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 as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 * USA
18 */
19
20/*
21 * Augment the standard YYLTYPE with a filenum index into an
22 * array of all opened filenames.
23 */
24
25#if ! defined(YYLTYPE) && ! defined(YYLTYPE_IS_DECLARED)
26typedef struct YYLTYPE {
27 int first_line;
28 int first_column;
29 int last_line;
30 int last_column;
31 int filenum;
32} YYLTYPE;
33
34#define YYLTYPE_IS_DECLARED 1
35#define YYLTYPE_IS_TRIVIAL 1
36#endif
37
38/* Cater to old parser templates. */
39#ifndef YYID
40#define YYID(n) (n)
41#endif
42
43#define YYLLOC_DEFAULT(Current, Rhs, N) \
44 do \
45 if (YYID (N)) \
46 { \
47 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
48 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
49 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
50 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
51 (Current).filenum = YYRHSLOC (Rhs, N).filenum; \
52 } \
53 else \
54 { \
55 (Current).first_line = (Current).last_line = \
56 YYRHSLOC (Rhs, 0).last_line; \
57 (Current).first_column = (Current).last_column = \
58 YYRHSLOC (Rhs, 0).last_column; \
59 (Current).filenum = YYRHSLOC (Rhs, 0).filenum; \
60 } \
61 while (YYID (0))
62
63
64
65extern void yyerror(char const *);
66
67extern int srcpos_filenum;
68
69extern int push_input_file(const char *filename);
70extern int pop_input_file(void);
71
72extern FILE *dtc_open_file(const char *fname);
73extern int lookup_file_name(const char *fname, int add_it);
74extern const char *srcpos_filename_for_num(int filenum);
75const char *srcpos_get_filename(void);
diff --git a/arch/powerpc/boot/dtc-src/treesource.c b/arch/powerpc/boot/dtc-src/treesource.c
new file mode 100644
index 000000000000..a6a776797636
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/treesource.c
@@ -0,0 +1,275 @@
1/*
2 * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
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 GNU
13 * 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
18 * USA
19 */
20
21#include "dtc.h"
22#include "srcpos.h"
23
24extern FILE *yyin;
25extern int yyparse(void);
26extern void yyerror(char const *);
27
28struct boot_info *the_boot_info;
29
30struct boot_info *dt_from_source(const char *fname)
31{
32 the_boot_info = NULL;
33
34 push_input_file(fname);
35
36 if (yyparse() != 0)
37 return NULL;
38
39 fill_fullpaths(the_boot_info->dt, "");
40
41 return the_boot_info;
42}
43
44static void write_prefix(FILE *f, int level)
45{
46 int i;
47
48 for (i = 0; i < level; i++)
49 fputc('\t', f);
50}
51
52int isstring(char c)
53{
54 return (isprint(c)
55 || (c == '\0')
56 || strchr("\a\b\t\n\v\f\r", c));
57}
58
59static void write_propval_string(FILE *f, struct data val)
60{
61 const char *str = val.val;
62 int i;
63 int newchunk = 1;
64 struct marker *m = val.markers;
65
66 assert(str[val.len-1] == '\0');
67
68 for (i = 0; i < (val.len-1); i++) {
69 char c = str[i];
70
71 if (newchunk) {
72 while (m && (m->offset <= i)) {
73 if (m->type == LABEL) {
74 assert(m->offset == i);
75 fprintf(f, "%s: ", m->ref);
76 }
77 m = m->next;
78 }
79 fprintf(f, "\"");
80 newchunk = 0;
81 }
82
83 switch (c) {
84 case '\a':
85 fprintf(f, "\\a");
86 break;
87 case '\b':
88 fprintf(f, "\\b");
89 break;
90 case '\t':
91 fprintf(f, "\\t");
92 break;
93 case '\n':
94 fprintf(f, "\\n");
95 break;
96 case '\v':
97 fprintf(f, "\\v");
98 break;
99 case '\f':
100 fprintf(f, "\\f");
101 break;
102 case '\r':
103 fprintf(f, "\\r");
104 break;
105 case '\\':
106 fprintf(f, "\\\\");
107 break;
108 case '\"':
109 fprintf(f, "\\\"");
110 break;
111 case '\0':
112 fprintf(f, "\", ");
113 newchunk = 1;
114 break;
115 default:
116 if (isprint(c))
117 fprintf(f, "%c", c);
118 else
119 fprintf(f, "\\x%02hhx", c);
120 }
121 }
122 fprintf(f, "\"");
123
124 /* Wrap up any labels at the end of the value */
125 for_each_marker_of_type(m, LABEL) {
126 assert (m->offset == val.len);
127 fprintf(f, " %s:", m->ref);
128 }
129}
130
131static void write_propval_cells(FILE *f, struct data val)
132{
133 void *propend = val.val + val.len;
134 cell_t *cp = (cell_t *)val.val;
135 struct marker *m = val.markers;
136
137 fprintf(f, "<");
138 for (;;) {
139 while (m && (m->offset <= ((char *)cp - val.val))) {
140 if (m->type == LABEL) {
141 assert(m->offset == ((char *)cp - val.val));
142 fprintf(f, "%s: ", m->ref);
143 }
144 m = m->next;
145 }
146
147 fprintf(f, "0x%x", be32_to_cpu(*cp++));
148 if ((void *)cp >= propend)
149 break;
150 fprintf(f, " ");
151 }
152
153 /* Wrap up any labels at the end of the value */
154 for_each_marker_of_type(m, LABEL) {
155 assert (m->offset == val.len);
156 fprintf(f, " %s:", m->ref);
157 }
158 fprintf(f, ">");
159}
160
161static void write_propval_bytes(FILE *f, struct data val)
162{
163 void *propend = val.val + val.len;
164 const char *bp = val.val;
165 struct marker *m = val.markers;
166
167 fprintf(f, "[");
168 for (;;) {
169 while (m && (m->offset == (bp-val.val))) {
170 if (m->type == LABEL)
171 fprintf(f, "%s: ", m->ref);
172 m = m->next;
173 }
174
175 fprintf(f, "%02hhx", *bp++);
176 if ((void *)bp >= propend)
177 break;
178 fprintf(f, " ");
179 }
180
181 /* Wrap up any labels at the end of the value */
182 for_each_marker_of_type(m, LABEL) {
183 assert (m->offset == val.len);
184 fprintf(f, " %s:", m->ref);
185 }
186 fprintf(f, "]");
187}
188
189static void write_propval(FILE *f, struct property *prop)
190{
191 int len = prop->val.len;
192 const char *p = prop->val.val;
193 struct marker *m = prop->val.markers;
194 int nnotstring = 0, nnul = 0;
195 int nnotstringlbl = 0, nnotcelllbl = 0;
196 int i;
197
198 if (len == 0) {
199 fprintf(f, ";\n");
200 return;
201 }
202
203 for (i = 0; i < len; i++) {
204 if (! isstring(p[i]))
205 nnotstring++;
206 if (p[i] == '\0')
207 nnul++;
208 }
209
210 for_each_marker_of_type(m, LABEL) {
211 if ((m->offset > 0) && (prop->val.val[m->offset - 1] != '\0'))
212 nnotstringlbl++;
213 if ((m->offset % sizeof(cell_t)) != 0)
214 nnotcelllbl++;
215 }
216
217 fprintf(f, " = ");
218 if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul))
219 && (nnotstringlbl == 0)) {
220 write_propval_string(f, prop->val);
221 } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) {
222 write_propval_cells(f, prop->val);
223 } else {
224 write_propval_bytes(f, prop->val);
225 }
226
227 fprintf(f, ";\n");
228}
229
230static void write_tree_source_node(FILE *f, struct node *tree, int level)
231{
232 struct property *prop;
233 struct node *child;
234
235 write_prefix(f, level);
236 if (tree->label)
237 fprintf(f, "%s: ", tree->label);
238 if (tree->name && (*tree->name))
239 fprintf(f, "%s {\n", tree->name);
240 else
241 fprintf(f, "/ {\n");
242
243 for_each_property(tree, prop) {
244 write_prefix(f, level+1);
245 if (prop->label)
246 fprintf(f, "%s: ", prop->label);
247 fprintf(f, "%s", prop->name);
248 write_propval(f, prop);
249 }
250 for_each_child(tree, child) {
251 fprintf(f, "\n");
252 write_tree_source_node(f, child, level+1);
253 }
254 write_prefix(f, level);
255 fprintf(f, "};\n");
256}
257
258
259void dt_to_source(FILE *f, struct boot_info *bi)
260{
261 struct reserve_info *re;
262
263 fprintf(f, "/dts-v1/;\n\n");
264
265 for (re = bi->reservelist; re; re = re->next) {
266 if (re->label)
267 fprintf(f, "%s: ", re->label);
268 fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n",
269 (unsigned long long)re->re.address,
270 (unsigned long long)re->re.size);
271 }
272
273 write_tree_source_node(f, bi->dt, 0);
274}
275
diff --git a/arch/powerpc/boot/dtc-src/version_gen.h b/arch/powerpc/boot/dtc-src/version_gen.h
new file mode 100644
index 000000000000..6c343031538e
--- /dev/null
+++ b/arch/powerpc/boot/dtc-src/version_gen.h
@@ -0,0 +1 @@
#define DTC_VERSION "DTC 1.0.0-gd6f9b62f"
diff --git a/arch/powerpc/boot/dts/adder875-redboot.dts b/arch/powerpc/boot/dts/adder875-redboot.dts
new file mode 100644
index 000000000000..930bfb3894eb
--- /dev/null
+++ b/arch/powerpc/boot/dts/adder875-redboot.dts
@@ -0,0 +1,184 @@
1/*
2 * Device Tree Source for MPC885 ADS running RedBoot
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 * Copyright 2007 Freescale Semiconductor, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/dts-v1/;
14/ {
15 model = "Analogue & Micro Adder MPC875";
16 compatible = "analogue-and-micro,adder875";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 console = &console;
22 ethernet0 = &eth0;
23 ethernet1 = &eth1;
24 };
25
26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
30 PowerPC,875@0 {
31 device_type = "cpu";
32 reg = <0>;
33 d-cache-line-size = <16>;
34 i-cache-line-size = <16>;
35 d-cache-size = <8192>;
36 i-cache-size = <8192>;
37 timebase-frequency = <0>;
38 bus-frequency = <0>;
39 clock-frequency = <0>;
40 interrupts = <15 2>; // decrementer interrupt
41 interrupt-parent = <&PIC>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0 0x01000000>;
48 };
49
50 localbus@fa200100 {
51 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
52 "simple-bus";
53 #address-cells = <2>;
54 #size-cells = <1>;
55 reg = <0xfa200100 0x40>;
56
57 ranges = <
58 0 0 0xfe000000 0x00800000
59 2 0 0xfa100000 0x00008000
60 >;
61
62 flash@0,0 {
63 compatible = "cfi-flash";
64 reg = <0 0 0x800000>;
65 bank-width = <2>;
66 device-width = <2>;
67 };
68 };
69
70 soc@fa200000 {
71 compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
72 #address-cells = <1>;
73 #size-cells = <1>;
74 ranges = <0 0xfa200000 0x00004000>;
75
76 // Temporary until code stops depending on it.
77 device_type = "soc";
78
79 // Temporary until get_immrbase() is fixed.
80 reg = <0xfa200000 0x4000>;
81
82 mdio@e00 {
83 compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
84 reg = <0xe00 0x188>;
85 #address-cells = <1>;
86 #size-cells = <0>;
87
88 PHY0: ethernet-phy@0 {
89 reg = <0>;
90 device_type = "ethernet-phy";
91 };
92
93 PHY1: ethernet-phy@1 {
94 reg = <1>;
95 device_type = "ethernet-phy";
96 };
97 };
98
99 eth0: ethernet@e00 {
100 device_type = "network";
101 compatible = "fsl,mpc875-fec-enet",
102 "fsl,pq1-fec-enet";
103 reg = <0xe00 0x188>;
104 local-mac-address = [ 00 00 00 00 00 00 ];
105 interrupts = <3 1>;
106 interrupt-parent = <&PIC>;
107 phy-handle = <&PHY0>;
108 linux,network-index = <0>;
109 };
110
111 eth1: ethernet@1e00 {
112 device_type = "network";
113 compatible = "fsl,mpc875-fec-enet",
114 "fsl,pq1-fec-enet";
115 reg = <0x1e00 0x188>;
116 local-mac-address = [ 00 00 00 00 00 00 ];
117 interrupts = <7 1>;
118 interrupt-parent = <&PIC>;
119 phy-handle = <&PHY1>;
120 linux,network-index = <1>;
121 };
122
123 PIC: interrupt-controller@0 {
124 interrupt-controller;
125 #interrupt-cells = <2>;
126 reg = <0 0x24>;
127 compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
128 };
129
130 cpm@9c0 {
131 #address-cells = <1>;
132 #size-cells = <1>;
133 compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
134 interrupts = <0>; // cpm error interrupt
135 interrupt-parent = <&CPM_PIC>;
136 reg = <0x9c0 0x40>;
137 ranges;
138
139 muram {
140 #address-cells = <1>;
141 #size-cells = <1>;
142 ranges = <0 0x2000 0x2000>;
143
144 data@0 {
145 compatible = "fsl,cpm-muram-data";
146 reg = <0 0x1c00>;
147 };
148 };
149
150 brg@9f0 {
151 compatible = "fsl,mpc875-brg",
152 "fsl,cpm1-brg",
153 "fsl,cpm-brg";
154 reg = <0x9f0 0x10>;
155 };
156
157 CPM_PIC: interrupt-controller@930 {
158 interrupt-controller;
159 #interrupt-cells = <1>;
160 interrupts = <5 2 0 2>;
161 interrupt-parent = <&PIC>;
162 reg = <0x930 0x20>;
163 compatible = "fsl,mpc875-cpm-pic",
164 "fsl,cpm1-pic";
165 };
166
167 console: serial@a80 {
168 device_type = "serial";
169 compatible = "fsl,mpc875-smc-uart",
170 "fsl,cpm1-smc-uart";
171 reg = <0xa80 0x10 0x3e80 0x40>;
172 interrupts = <4>;
173 interrupt-parent = <&CPM_PIC>;
174 fsl,cpm-brg = <1>;
175 fsl,cpm-command = <0x0090>;
176 current-speed = <115200>;
177 };
178 };
179 };
180
181 chosen {
182 linux,stdout-path = &console;
183 };
184};
diff --git a/arch/powerpc/boot/dts/adder875-uboot.dts b/arch/powerpc/boot/dts/adder875-uboot.dts
new file mode 100644
index 000000000000..0197242dacfb
--- /dev/null
+++ b/arch/powerpc/boot/dts/adder875-uboot.dts
@@ -0,0 +1,183 @@
1/*
2 * Device Tree Source for MPC885 ADS running U-Boot
3 *
4 * Copyright 2006 MontaVista Software, Inc.
5 * Copyright 2007 Freescale Semiconductor, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/dts-v1/;
14/ {
15 model = "Analogue & Micro Adder MPC875";
16 compatible = "analogue-and-micro,adder875";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 console = &console;
22 ethernet0 = &eth0;
23 ethernet1 = &eth1;
24 };
25
26 cpus {
27 #address-cells = <1>;
28 #size-cells = <0>;
29
30 PowerPC,875@0 {
31 device_type = "cpu";
32 reg = <0>;
33 d-cache-line-size = <16>;
34 i-cache-line-size = <16>;
35 d-cache-size = <8192>;
36 i-cache-size = <8192>;
37 timebase-frequency = <0>;
38 bus-frequency = <0>;
39 clock-frequency = <0>;
40 interrupts = <15 2>; // decrementer interrupt
41 interrupt-parent = <&PIC>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0 0x01000000>;
48 };
49
50 localbus@ff000100 {
51 compatible = "fsl,mpc885-localbus", "fsl,pq1-localbus",
52 "simple-bus";
53 #address-cells = <2>;
54 #size-cells = <1>;
55 reg = <0xff000100 0x40>;
56
57 ranges = <
58 0 0 0xfe000000 0x01000000
59 >;
60
61 flash@0,0 {
62 compatible = "cfi-flash";
63 reg = <0 0 0x800000>;
64 bank-width = <2>;
65 device-width = <2>;
66 };
67 };
68
69 soc@ff000000 {
70 compatible = "fsl,mpc875-immr", "fsl,pq1-soc", "simple-bus";
71 #address-cells = <1>;
72 #size-cells = <1>;
73 ranges = <0 0xff000000 0x00004000>;
74
75 // Temporary until code stops depending on it.
76 device_type = "soc";
77
78 // Temporary until get_immrbase() is fixed.
79 reg = <0xff000000 0x4000>;
80
81 mdio@e00 {
82 compatible = "fsl,mpc875-fec-mdio", "fsl,pq1-fec-mdio";
83 reg = <0xe00 0x188>;
84 #address-cells = <1>;
85 #size-cells = <0>;
86
87 PHY0: ethernet-phy@0 {
88 reg = <0>;
89 device_type = "ethernet-phy";
90 };
91
92 PHY1: ethernet-phy@1 {
93 reg = <1>;
94 device_type = "ethernet-phy";
95 };
96 };
97
98 eth0: ethernet@e00 {
99 device_type = "network";
100 compatible = "fsl,mpc875-fec-enet",
101 "fsl,pq1-fec-enet";
102 reg = <0xe00 0x188>;
103 local-mac-address = [ 00 00 00 00 00 00 ];
104 interrupts = <3 1>;
105 interrupt-parent = <&PIC>;
106 phy-handle = <&PHY0>;
107 linux,network-index = <0>;
108 };
109
110 eth1: ethernet@1e00 {
111 device_type = "network";
112 compatible = "fsl,mpc875-fec-enet",
113 "fsl,pq1-fec-enet";
114 reg = <0x1e00 0x188>;
115 local-mac-address = [ 00 00 00 00 00 00 ];
116 interrupts = <7 1>;
117 interrupt-parent = <&PIC>;
118 phy-handle = <&PHY1>;
119 linux,network-index = <1>;
120 };
121
122 PIC: interrupt-controller@0 {
123 interrupt-controller;
124 #interrupt-cells = <2>;
125 reg = <0 0x24>;
126 compatible = "fsl,mpc875-pic", "fsl,pq1-pic";
127 };
128
129 cpm@9c0 {
130 #address-cells = <1>;
131 #size-cells = <1>;
132 compatible = "fsl,mpc875-cpm", "fsl,cpm1", "simple-bus";
133 interrupts = <0>; // cpm error interrupt
134 interrupt-parent = <&CPM_PIC>;
135 reg = <0x9c0 0x40>;
136 ranges;
137
138 muram {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 ranges = <0 0x2000 0x2000>;
142
143 data@0 {
144 compatible = "fsl,cpm-muram-data";
145 reg = <0 0x1c00>;
146 };
147 };
148
149 brg@9f0 {
150 compatible = "fsl,mpc875-brg",
151 "fsl,cpm1-brg",
152 "fsl,cpm-brg";
153 reg = <0x9f0 0x10>;
154 };
155
156 CPM_PIC: interrupt-controller@930 {
157 interrupt-controller;
158 #interrupt-cells = <1>;
159 interrupts = <5 2 0 2>;
160 interrupt-parent = <&PIC>;
161 reg = <0x930 0x20>;
162 compatible = "fsl,mpc875-cpm-pic",
163 "fsl,cpm1-pic";
164 };
165
166 console: serial@a80 {
167 device_type = "serial";
168 compatible = "fsl,mpc875-smc-uart",
169 "fsl,cpm1-smc-uart";
170 reg = <0xa80 0x10 0x3e80 0x40>;
171 interrupts = <4>;
172 interrupt-parent = <&CPM_PIC>;
173 fsl,cpm-brg = <1>;
174 fsl,cpm-command = <0x0090>;
175 current-speed = <115200>;
176 };
177 };
178 };
179
180 chosen {
181 linux,stdout-path = &console;
182 };
183};
diff --git a/arch/powerpc/boot/dts/bamboo.dts b/arch/powerpc/boot/dts/bamboo.dts
index cb2fb50a281c..29f1a6f3e373 100644
--- a/arch/powerpc/boot/dts/bamboo.dts
+++ b/arch/powerpc/boot/dts/bamboo.dts
@@ -16,14 +16,24 @@
16 #size-cells = <1>; 16 #size-cells = <1>;
17 model = "amcc,bamboo"; 17 model = "amcc,bamboo";
18 compatible = "amcc,bamboo"; 18 compatible = "amcc,bamboo";
19 dcr-parent = <&/cpus/PowerPC,440EP@0>; 19 dcr-parent = <&/cpus/cpu@0>;
20
21 aliases {
22 ethernet0 = &EMAC0;
23 ethernet1 = &EMAC1;
24 serial0 = &UART0;
25 serial1 = &UART1;
26 serial2 = &UART2;
27 serial3 = &UART3;
28 };
20 29
21 cpus { 30 cpus {
22 #address-cells = <1>; 31 #address-cells = <1>;
23 #size-cells = <0>; 32 #size-cells = <0>;
24 33
25 PowerPC,440EP@0 { 34 cpu@0 {
26 device_type = "cpu"; 35 device_type = "cpu";
36 model = "PowerPC,440EP";
27 reg = <0>; 37 reg = <0>;
28 clock-frequency = <0>; /* Filled in by zImage */ 38 clock-frequency = <0>; /* Filled in by zImage */
29 timebase-frequency = <0>; /* Filled in by zImage */ 39 timebase-frequency = <0>; /* Filled in by zImage */
@@ -126,7 +136,6 @@
126 #address-cells = <2>; 136 #address-cells = <2>;
127 #size-cells = <1>; 137 #size-cells = <1>;
128 clock-frequency = <0>; /* Filled in by zImage */ 138 clock-frequency = <0>; /* Filled in by zImage */
129 ranges;
130 interrupts = <5 1>; 139 interrupts = <5 1>;
131 interrupt-parent = <&UIC1>; 140 interrupt-parent = <&UIC1>;
132 }; 141 };
@@ -238,11 +247,56 @@
238 zmii-device = <&ZMII0>; 247 zmii-device = <&ZMII0>;
239 zmii-channel = <1>; 248 zmii-channel = <1>;
240 }; 249 };
250
251 usb@ef601000 {
252 compatible = "ohci-be";
253 reg = <ef601000 80>;
254 interrupts = <8 1 9 1>;
255 interrupt-parent = < &UIC1 >;
256 };
257 };
258
259 PCI0: pci@ec000000 {
260 device_type = "pci";
261 #interrupt-cells = <1>;
262 #size-cells = <2>;
263 #address-cells = <3>;
264 compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
265 primary;
266 reg = <0 eec00000 8 /* Config space access */
267 0 eed00000 4 /* IACK */
268 0 eed00000 4 /* Special cycle */
269 0 ef400000 40>; /* Internal registers */
270
271 /* Outbound ranges, one memory and one IO,
272 * later cannot be changed. Chip supports a second
273 * IO range but we don't use it for now
274 */
275 ranges = <02000000 0 a0000000 0 a0000000 0 20000000
276 01000000 0 00000000 0 e8000000 0 00010000>;
277
278 /* Inbound 2GB range starting at 0 */
279 dma-ranges = <42000000 0 0 0 0 0 80000000>;
280
281 /* Bamboo has all 4 IRQ pins tied together per slot */
282 interrupt-map-mask = <f800 0 0 0>;
283 interrupt-map = <
284 /* IDSEL 1 */
285 0800 0 0 0 &UIC0 1c 8
286
287 /* IDSEL 2 */
288 1000 0 0 0 &UIC0 1b 8
289
290 /* IDSEL 3 */
291 1800 0 0 0 &UIC0 1a 8
292
293 /* IDSEL 4 */
294 2000 0 0 0 &UIC0 19 8
295 >;
241 }; 296 };
242 }; 297 };
243 298
244 chosen { 299 chosen {
245 linux,stdout-path = "/plb/opb/serial@ef600300"; 300 linux,stdout-path = "/plb/opb/serial@ef600300";
246 bootargs = "console=ttyS0,115200";
247 }; 301 };
248}; 302};
diff --git a/arch/powerpc/boot/dts/cm5200.dts b/arch/powerpc/boot/dts/cm5200.dts
new file mode 100644
index 000000000000..30737eafe68e
--- /dev/null
+++ b/arch/powerpc/boot/dts/cm5200.dts
@@ -0,0 +1,234 @@
1/*
2 * CM5200 board Device Tree Source
3 *
4 * Copyright (C) 2007 Semihalf
5 * Marian Balakowicz <m8@semihalf.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/*
14 * WARNING: Do not depend on this tree layout remaining static just yet.
15 * The MPC5200 device tree conventions are still in flux
16 * Keep an eye on the linuxppc-dev mailing list for more details
17 */
18
19/ {
20 model = "schindler,cm5200";
21 compatible = "schindler,cm5200";
22 #address-cells = <1>;
23 #size-cells = <1>;
24
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 PowerPC,5200@0 {
30 device_type = "cpu";
31 reg = <0>;
32 d-cache-line-size = <20>;
33 i-cache-line-size = <20>;
34 d-cache-size = <4000>; // L1, 16K
35 i-cache-size = <4000>; // L1, 16K
36 timebase-frequency = <0>; // from bootloader
37 bus-frequency = <0>; // from bootloader
38 clock-frequency = <0>; // from bootloader
39 };
40 };
41
42 memory {
43 device_type = "memory";
44 reg = <00000000 04000000>; // 64MB
45 };
46
47 soc5200@f0000000 {
48 #address-cells = <1>;
49 #size-cells = <1>;
50 compatible = "fsl,mpc5200b-immr";
51 ranges = <0 f0000000 0000c000>;
52 reg = <f0000000 00000100>;
53 bus-frequency = <0>; // from bootloader
54 system-frequency = <0>; // from bootloader
55
56 cdm@200 {
57 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
58 reg = <200 38>;
59 };
60
61 mpc5200_pic: pic@500 {
62 // 5200 interrupts are encoded into two levels;
63 interrupt-controller;
64 #interrupt-cells = <3>;
65 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
66 reg = <500 80>;
67 };
68
69 timer@600 { // General Purpose Timer
70 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
71 reg = <600 10>;
72 interrupts = <1 9 0>;
73 interrupt-parent = <&mpc5200_pic>;
74 fsl,has-wdt;
75 };
76
77 timer@610 { // General Purpose Timer
78 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
79 reg = <610 10>;
80 interrupts = <1 a 0>;
81 interrupt-parent = <&mpc5200_pic>;
82 };
83
84 timer@620 { // General Purpose Timer
85 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
86 reg = <620 10>;
87 interrupts = <1 b 0>;
88 interrupt-parent = <&mpc5200_pic>;
89 };
90
91 timer@630 { // General Purpose Timer
92 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
93 reg = <630 10>;
94 interrupts = <1 c 0>;
95 interrupt-parent = <&mpc5200_pic>;
96 };
97
98 timer@640 { // General Purpose Timer
99 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
100 reg = <640 10>;
101 interrupts = <1 d 0>;
102 interrupt-parent = <&mpc5200_pic>;
103 };
104
105 timer@650 { // General Purpose Timer
106 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
107 reg = <650 10>;
108 interrupts = <1 e 0>;
109 interrupt-parent = <&mpc5200_pic>;
110 };
111
112 timer@660 { // General Purpose Timer
113 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
114 reg = <660 10>;
115 interrupts = <1 f 0>;
116 interrupt-parent = <&mpc5200_pic>;
117 };
118
119 timer@670 { // General Purpose Timer
120 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
121 reg = <670 10>;
122 interrupts = <1 10 0>;
123 interrupt-parent = <&mpc5200_pic>;
124 };
125
126 rtc@800 { // Real time clock
127 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
128 reg = <800 100>;
129 interrupts = <1 5 0 1 6 0>;
130 interrupt-parent = <&mpc5200_pic>;
131 };
132
133 gpio@b00 {
134 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
135 reg = <b00 40>;
136 interrupts = <1 7 0>;
137 interrupt-parent = <&mpc5200_pic>;
138 };
139
140 gpio@c00 {
141 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
142 reg = <c00 40>;
143 interrupts = <1 8 0 0 3 0>;
144 interrupt-parent = <&mpc5200_pic>;
145 };
146
147 spi@f00 {
148 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
149 reg = <f00 20>;
150 interrupts = <2 d 0 2 e 0>;
151 interrupt-parent = <&mpc5200_pic>;
152 };
153
154 usb@1000 {
155 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
156 reg = <1000 ff>;
157 interrupts = <2 6 0>;
158 interrupt-parent = <&mpc5200_pic>;
159 };
160
161 dma-controller@1200 {
162 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
163 reg = <1200 80>;
164 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
165 3 4 0 3 5 0 3 6 0 3 7 0
166 3 8 0 3 9 0 3 a 0 3 b 0
167 3 c 0 3 d 0 3 e 0 3 f 0>;
168 interrupt-parent = <&mpc5200_pic>;
169 };
170
171 xlb@1f00 {
172 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
173 reg = <1f00 100>;
174 };
175
176 serial@2000 { // PSC1
177 device_type = "serial";
178 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
179 port-number = <0>; // Logical port assignment
180 reg = <2000 100>;
181 interrupts = <2 1 0>;
182 interrupt-parent = <&mpc5200_pic>;
183 };
184
185 serial@2200 { // PSC2
186 device_type = "serial";
187 compatible = "fsl,mpc5200-psc-uart";
188 port-number = <1>; // Logical port assignment
189 reg = <2200 100>;
190 interrupts = <2 2 0>;
191 interrupt-parent = <&mpc5200_pic>;
192 };
193
194 serial@2400 { // PSC3
195 device_type = "serial";
196 compatible = "fsl,mpc5200-psc-uart";
197 port-number = <2>; // Logical port assignment
198 reg = <2400 100>;
199 interrupts = <2 3 0>;
200 interrupt-parent = <&mpc5200_pic>;
201 };
202
203 serial@2c00 { // PSC6
204 device_type = "serial";
205 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
206 port-number = <5>; // Logical port assignment
207 reg = <2c00 100>;
208 interrupts = <2 4 0>;
209 interrupt-parent = <&mpc5200_pic>;
210 };
211
212 ethernet@3000 {
213 device_type = "network";
214 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
215 reg = <3000 800>;
216 local-mac-address = [ 00 00 00 00 00 00 ];
217 interrupts = <2 5 0>;
218 interrupt-parent = <&mpc5200_pic>;
219 };
220
221 i2c@3d40 {
222 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
223 reg = <3d40 40>;
224 interrupts = <2 10 0>;
225 interrupt-parent = <&mpc5200_pic>;
226 fsl5200-clocking;
227 };
228
229 sram@8000 {
230 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
231 reg = <8000 4000>;
232 };
233 };
234};
diff --git a/arch/powerpc/boot/dts/ebony.dts b/arch/powerpc/boot/dts/ebony.dts
index bc259972aaa0..7aad135a44b0 100644
--- a/arch/powerpc/boot/dts/ebony.dts
+++ b/arch/powerpc/boot/dts/ebony.dts
@@ -16,14 +16,22 @@
16 #size-cells = <1>; 16 #size-cells = <1>;
17 model = "ibm,ebony"; 17 model = "ibm,ebony";
18 compatible = "ibm,ebony"; 18 compatible = "ibm,ebony";
19 dcr-parent = <&/cpus/PowerPC,440GP@0>; 19 dcr-parent = <&/cpus/cpu@0>;
20
21 aliases {
22 ethernet0 = &EMAC0;
23 ethernet1 = &EMAC1;
24 serial0 = &UART0;
25 serial1 = &UART1;
26 };
20 27
21 cpus { 28 cpus {
22 #address-cells = <1>; 29 #address-cells = <1>;
23 #size-cells = <0>; 30 #size-cells = <0>;
24 31
25 PowerPC,440GP@0 { 32 cpu@0 {
26 device_type = "cpu"; 33 device_type = "cpu";
34 model = "PowerPC,440GP";
27 reg = <0>; 35 reg = <0>;
28 clock-frequency = <0>; // Filled in by zImage 36 clock-frequency = <0>; // Filled in by zImage
29 timebase-frequency = <0>; // Filled in by zImage 37 timebase-frequency = <0>; // Filled in by zImage
@@ -150,9 +158,10 @@
150 }; 158 };
151 }; 159 };
152 160
153 ds1743@1,0 { 161 nvram@1,0 {
154 /* NVRAM & RTC */ 162 /* NVRAM & RTC */
155 compatible = "ds1743"; 163 compatible = "ds1743-nvram";
164 #bytes = <2000>;
156 reg = <1 0 2000>; 165 reg = <1 0 2000>;
157 }; 166 };
158 167
@@ -284,12 +293,43 @@
284 293
285 }; 294 };
286 295
287 PCIX0: pci@1234 { 296 PCIX0: pci@20ec00000 {
288 device_type = "pci"; 297 device_type = "pci";
289 /* FIXME */ 298 #interrupt-cells = <1>;
290 reg = <2 0ec00000 8 299 #size-cells = <2>;
291 2 0ec80000 f0 300 #address-cells = <3>;
292 2 0ec80100 fc>; 301 compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
302 primary;
303 reg = <2 0ec00000 8 /* Config space access */
304 0 0 0 /* no IACK cycles */
305 2 0ed00000 4 /* Special cycles */
306 2 0ec80000 f0 /* Internal registers */
307 2 0ec80100 fc>; /* Internal messaging registers */
308
309 /* Outbound ranges, one memory and one IO,
310 * later cannot be changed
311 */
312 ranges = <02000000 0 80000000 00000003 80000000 0 80000000
313 01000000 0 00000000 00000002 08000000 0 00010000>;
314
315 /* Inbound 2GB range starting at 0 */
316 dma-ranges = <42000000 0 0 0 0 0 80000000>;
317
318 /* Ebony has all 4 IRQ pins tied together per slot */
319 interrupt-map-mask = <f800 0 0 0>;
320 interrupt-map = <
321 /* IDSEL 1 */
322 0800 0 0 0 &UIC0 17 8
323
324 /* IDSEL 2 */
325 1000 0 0 0 &UIC0 18 8
326
327 /* IDSEL 3 */
328 1800 0 0 0 &UIC0 19 8
329
330 /* IDSEL 4 */
331 2000 0 0 0 &UIC0 1a 8
332 >;
293 }; 333 };
294 }; 334 };
295 335
diff --git a/arch/powerpc/boot/dts/ep405.dts b/arch/powerpc/boot/dts/ep405.dts
new file mode 100644
index 000000000000..92938557ac8a
--- /dev/null
+++ b/arch/powerpc/boot/dts/ep405.dts
@@ -0,0 +1,228 @@
1/*
2 * Device Tree Source for EP405
3 *
4 * Copyright 2007 IBM Corp.
5 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without
9 * any warranty of any kind, whether express or implied.
10 */
11
12/ {
13 #address-cells = <1>;
14 #size-cells = <1>;
15 model = "ep405";
16 compatible = "ep405";
17 dcr-parent = <&/cpus/cpu@0>;
18
19 aliases {
20 ethernet0 = &EMAC;
21 serial0 = &UART0;
22 serial1 = &UART1;
23 };
24
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 cpu@0 {
30 device_type = "cpu";
31 model = "PowerPC,405GP";
32 reg = <0>;
33 clock-frequency = <bebc200>; /* Filled in by zImage */
34 timebase-frequency = <0>; /* Filled in by zImage */
35 i-cache-line-size = <20>;
36 d-cache-line-size = <20>;
37 i-cache-size = <4000>;
38 d-cache-size = <4000>;
39 dcr-controller;
40 dcr-access-method = "native";
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0 0>; /* Filled in by zImage */
47 };
48
49 UIC0: interrupt-controller {
50 compatible = "ibm,uic";
51 interrupt-controller;
52 cell-index = <0>;
53 dcr-reg = <0c0 9>;
54 #address-cells = <0>;
55 #size-cells = <0>;
56 #interrupt-cells = <2>;
57 };
58
59 plb {
60 compatible = "ibm,plb3";
61 #address-cells = <1>;
62 #size-cells = <1>;
63 ranges;
64 clock-frequency = <0>; /* Filled in by zImage */
65
66 SDRAM0: memory-controller {
67 compatible = "ibm,sdram-405gp";
68 dcr-reg = <010 2>;
69 };
70
71 MAL: mcmal {
72 compatible = "ibm,mcmal-405gp", "ibm,mcmal";
73 dcr-reg = <180 62>;
74 num-tx-chans = <1>;
75 num-rx-chans = <1>;
76 interrupt-parent = <&UIC0>;
77 interrupts = <
78 b 4 /* TXEOB */
79 c 4 /* RXEOB */
80 a 4 /* SERR */
81 d 4 /* TXDE */
82 e 4 /* RXDE */>;
83 };
84
85 POB0: opb {
86 compatible = "ibm,opb-405gp", "ibm,opb";
87 #address-cells = <1>;
88 #size-cells = <1>;
89 ranges = <ef600000 ef600000 a00000>;
90 dcr-reg = <0a0 5>;
91 clock-frequency = <0>; /* Filled in by zImage */
92
93 UART0: serial@ef600300 {
94 device_type = "serial";
95 compatible = "ns16550";
96 reg = <ef600300 8>;
97 virtual-reg = <ef600300>;
98 clock-frequency = <0>; /* Filled in by zImage */
99 current-speed = <2580>;
100 interrupt-parent = <&UIC0>;
101 interrupts = <0 4>;
102 };
103
104 UART1: serial@ef600400 {
105 device_type = "serial";
106 compatible = "ns16550";
107 reg = <ef600400 8>;
108 virtual-reg = <ef600400>;
109 clock-frequency = <0>; /* Filled in by zImage */
110 current-speed = <2580>;
111 interrupt-parent = <&UIC0>;
112 interrupts = <1 4>;
113 };
114
115 IIC: i2c@ef600500 {
116 compatible = "ibm,iic-405gp", "ibm,iic";
117 reg = <ef600500 11>;
118 interrupt-parent = <&UIC0>;
119 interrupts = <2 4>;
120 };
121
122 GPIO: gpio@ef600700 {
123 compatible = "ibm,gpio-405gp";
124 reg = <ef600700 20>;
125 };
126
127 EMAC: ethernet@ef600800 {
128 linux,network-index = <0>;
129 device_type = "network";
130 compatible = "ibm,emac-405gp", "ibm,emac";
131 interrupt-parent = <&UIC0>;
132 interrupts = <
133 f 4 /* Ethernet */
134 9 4 /* Ethernet Wake Up */>;
135 local-mac-address = [000000000000]; /* Filled in by zImage */
136 reg = <ef600800 70>;
137 mal-device = <&MAL>;
138 mal-tx-channel = <0>;
139 mal-rx-channel = <0>;
140 cell-index = <0>;
141 max-frame-size = <5dc>;
142 rx-fifo-size = <1000>;
143 tx-fifo-size = <800>;
144 phy-mode = "rmii";
145 phy-map = <00000000>;
146 };
147
148 };
149
150 EBC0: ebc {
151 compatible = "ibm,ebc-405gp", "ibm,ebc";
152 dcr-reg = <012 2>;
153 #address-cells = <2>;
154 #size-cells = <1>;
155
156
157 /* The ranges property is supplied by the bootwrapper
158 * and is based on the firmware's configuration of the
159 * EBC bridge
160 */
161 clock-frequency = <0>; /* Filled in by zImage */
162
163 /* NVRAM and RTC */
164 nvrtc@4,200000 {
165 compatible = "ds1742";
166 reg = <4 200000 0>; /* size fixed up by zImage */
167 };
168
169 /* "BCSR" CPLD contains a PCI irq controller */
170 bcsr@4,0 {
171 compatible = "ep405-bcsr";
172 reg = <4 0 10>;
173 interrupt-controller;
174 /* Routing table */
175 irq-routing = [ 00 /* SYSERR */
176 01 /* STTM */
177 01 /* RTC */
178 01 /* FENET */
179 02 /* NB PCIIRQ mux ? */
180 03 /* SB Winbond 8259 ? */
181 04 /* Serial Ring */
182 05 /* USB (ep405pc) */
183 06 /* XIRQ 0 */
184 06 /* XIRQ 1 */
185 06 /* XIRQ 2 */
186 06 /* XIRQ 3 */
187 06 /* XIRQ 4 */
188 06 /* XIRQ 5 */
189 06 /* XIRQ 6 */
190 07]; /* Reserved */
191 };
192 };
193
194 PCI0: pci@ec000000 {
195 device_type = "pci";
196 #interrupt-cells = <1>;
197 #size-cells = <2>;
198 #address-cells = <3>;
199 compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
200 primary;
201 reg = <eec00000 8 /* Config space access */
202 eed80000 4 /* IACK */
203 eed80000 4 /* Special cycle */
204 ef480000 40>; /* Internal registers */
205
206 /* Outbound ranges, one memory and one IO,
207 * later cannot be changed. Chip supports a second
208 * IO range but we don't use it for now
209 */
210 ranges = <02000000 0 80000000 80000000 0 20000000
211 01000000 0 00000000 e8000000 0 00010000>;
212
213 /* Inbound 2GB range starting at 0 */
214 dma-ranges = <42000000 0 0 0 0 80000000>;
215
216 /* That's all I know about IRQs on that thing ... */
217 interrupt-map-mask = <f800 0 0 0>;
218 interrupt-map = <
219 /* USB */
220 7000 0 0 0 &UIC0 1e 8 /* IRQ5 */
221 >;
222 };
223 };
224
225 chosen {
226 linux,stdout-path = "/plb/opb/serial@ef600300";
227 };
228};
diff --git a/arch/powerpc/boot/dts/ep8248e.dts b/arch/powerpc/boot/dts/ep8248e.dts
new file mode 100644
index 000000000000..5d2fb76a72c1
--- /dev/null
+++ b/arch/powerpc/boot/dts/ep8248e.dts
@@ -0,0 +1,207 @@
1/*
2 * Device Tree for the Embedded Planet EP8248E board running PlanetCore.
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/dts-v1/;
13/ {
14 model = "EP8248E";
15 compatible = "fsl,ep8248e";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 planetcore-SMC1 = &smc1;
21 planetcore-SCC1 = &scc1;
22 ethernet0 = &eth0;
23 ethernet1 = &eth1;
24 serial0 = &smc1;
25 serial1 = &scc1;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8248@0 {
33 device_type = "cpu";
34 reg = <0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <16384>;
38 i-cache-size = <16384>;
39 timebase-frequency = <0>;
40 clock-frequency = <0>;
41 };
42 };
43
44 localbus@f0010100 {
45 compatible = "fsl,mpc8248-localbus",
46 "fsl,pq2-localbus",
47 "simple-bus";
48 #address-cells = <2>;
49 #size-cells = <1>;
50 reg = <0xf0010100 0x40>;
51
52 ranges = <0 0 0xfc000000 0x04000000
53 1 0 0xfa000000 0x00008000>;
54
55 flash@0,3800000 {
56 compatible = "cfi-flash";
57 reg = <0 0x3800000 0x800000>;
58 bank-width = <4>;
59 device-width = <2>;
60 };
61
62 bcsr@1,0 {
63 #address-cells = <2>;
64 #size-cells = <1>;
65 reg = <1 0 0x10>;
66 compatible = "fsl,ep8248e-bcsr";
67 ranges;
68
69 mdio {
70 device_type = "mdio";
71 compatible = "fsl,ep8248e-mdio-bitbang";
72 #address-cells = <1>;
73 #size-cells = <0>;
74 reg = <1 8 1>;
75
76 PHY0: ethernet-phy@0 {
77 interrupt-parent = <&PIC>;
78 reg = <0>;
79 device_type = "ethernet-phy";
80 };
81
82 PHY1: ethernet-phy@1 {
83 interrupt-parent = <&PIC>;
84 reg = <1>;
85 device_type = "ethernet-phy";
86 };
87 };
88 };
89 };
90
91 memory {
92 device_type = "memory";
93 reg = <0 0>;
94 };
95
96 soc@f0000000 {
97 #address-cells = <1>;
98 #size-cells = <1>;
99 compatible = "fsl,mpc8248-immr", "fsl,pq2-soc", "simple-bus";
100 ranges = <0x00000000 0xf0000000 0x00053000>;
101
102 // Temporary until code stops depending on it.
103 device_type = "soc";
104
105 // Temporary -- will go away once kernel uses ranges for get_immrbase().
106 reg = <0xf0000000 0x00053000>;
107
108 cpm@119c0 {
109 #address-cells = <1>;
110 #size-cells = <1>;
111 #interrupt-cells = <2>;
112 compatible = "fsl,mpc8248-cpm", "fsl,cpm2",
113 "simple-bus";
114 reg = <0x119c0 0x30>;
115 ranges;
116
117 muram {
118 #address-cells = <1>;
119 #size-cells = <1>;
120 ranges = <0 0 0x10000>;
121
122 data@0 {
123 compatible = "fsl,cpm-muram-data";
124 reg = <0 0x1100 0x1140
125 0xec0 0x9800 0x800>;
126 };
127 };
128
129 brg@119f0 {
130 compatible = "fsl,mpc8248-brg",
131 "fsl,cpm2-brg",
132 "fsl,cpm-brg";
133 reg = <0x119f0 0x10 0x115f0 0x10>;
134 };
135
136 /* Monitor port/SMC1 */
137 smc1: serial@11a80 {
138 device_type = "serial";
139 compatible = "fsl,mpc8248-smc-uart",
140 "fsl,cpm2-smc-uart";
141 reg = <0x11a80 0x20 0x1100 0x40>;
142 interrupts = <4 8>;
143 interrupt-parent = <&PIC>;
144 fsl,cpm-brg = <7>;
145 fsl,cpm-command = <0x1d000000>;
146 linux,planetcore-label = "SMC1";
147 };
148
149 /* "Serial" port/SCC1 */
150 scc1: serial@11a00 {
151 device_type = "serial";
152 compatible = "fsl,mpc8248-scc-uart",
153 "fsl,cpm2-scc-uart";
154 reg = <0x11a00 0x20 0x8000 0x100>;
155 interrupts = <40 8>;
156 interrupt-parent = <&PIC>;
157 fsl,cpm-brg = <1>;
158 fsl,cpm-command = <0x00800000>;
159 linux,planetcore-label = "SCC1";
160 };
161
162 eth0: ethernet@11300 {
163 device_type = "network";
164 compatible = "fsl,mpc8248-fcc-enet",
165 "fsl,cpm2-fcc-enet";
166 reg = <0x11300 0x20 0x8400 0x100 0x11390 1>;
167 local-mac-address = [ 00 00 00 00 00 00 ];
168 interrupts = <32 8>;
169 interrupt-parent = <&PIC>;
170 phy-handle = <&PHY0>;
171 linux,network-index = <0>;
172 fsl,cpm-command = <0x12000300>;
173 };
174
175 eth1: ethernet@11320 {
176 device_type = "network";
177 compatible = "fsl,mpc8248-fcc-enet",
178 "fsl,cpm2-fcc-enet";
179 reg = <0x11320 0x20 0x8500 0x100 0x113b0 1>;
180 local-mac-address = [ 00 00 00 00 00 00 ];
181 interrupts = <33 8>;
182 interrupt-parent = <&PIC>;
183 phy-handle = <&PHY1>;
184 linux,network-index = <1>;
185 fsl,cpm-command = <0x16200300>;
186 };
187
188 usb@11b60 {
189 #address-cells = <1>;
190 #size-cells = <0>;
191 compatible = "fsl,mpc8248-usb",
192 "fsl,cpm2-usb";
193 reg = <0x11b60 0x18 0x8b00 0x100>;
194 interrupt-parent = <&PIC>;
195 interrupts = <11 8>;
196 fsl,cpm-command = <0x2e600000>;
197 };
198 };
199
200 PIC: interrupt-controller@10c00 {
201 #interrupt-cells = <2>;
202 interrupt-controller;
203 reg = <0x10c00 0x80>;
204 compatible = "fsl,mpc8248-pic", "fsl,pq2-pic";
205 };
206 };
207};
diff --git a/arch/powerpc/boot/dts/haleakala.dts b/arch/powerpc/boot/dts/haleakala.dts
new file mode 100644
index 000000000000..5dd3d15f0feb
--- /dev/null
+++ b/arch/powerpc/boot/dts/haleakala.dts
@@ -0,0 +1,274 @@
1/*
2 * Device Tree Source for AMCC Haleakala (405EXr)
3 *
4 * Copyright 2008 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without
8 * any warranty of any kind, whether express or implied.
9 */
10
11/ {
12 #address-cells = <1>;
13 #size-cells = <1>;
14 model = "amcc,haleakala";
15 compatible = "amcc,kilauea";
16 dcr-parent = <&/cpus/cpu@0>;
17
18 aliases {
19 ethernet0 = &EMAC0;
20 serial0 = &UART0;
21 serial1 = &UART1;
22 };
23
24 cpus {
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 cpu@0 {
29 device_type = "cpu";
30 model = "PowerPC,405EXr";
31 reg = <0>;
32 clock-frequency = <0>; /* Filled in by U-Boot */
33 timebase-frequency = <0>; /* Filled in by U-Boot */
34 i-cache-line-size = <20>;
35 d-cache-line-size = <20>;
36 i-cache-size = <4000>; /* 16 kB */
37 d-cache-size = <4000>; /* 16 kB */
38 dcr-controller;
39 dcr-access-method = "native";
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 reg = <0 0>; /* Filled in by U-Boot */
46 };
47
48 UIC0: interrupt-controller {
49 compatible = "ibm,uic-405exr", "ibm,uic";
50 interrupt-controller;
51 cell-index = <0>;
52 dcr-reg = <0c0 009>;
53 #address-cells = <0>;
54 #size-cells = <0>;
55 #interrupt-cells = <2>;
56 };
57
58 UIC1: interrupt-controller1 {
59 compatible = "ibm,uic-405exr","ibm,uic";
60 interrupt-controller;
61 cell-index = <1>;
62 dcr-reg = <0d0 009>;
63 #address-cells = <0>;
64 #size-cells = <0>;
65 #interrupt-cells = <2>;
66 interrupts = <1e 4 1f 4>; /* cascade */
67 interrupt-parent = <&UIC0>;
68 };
69
70 UIC2: interrupt-controller2 {
71 compatible = "ibm,uic-405exr","ibm,uic";
72 interrupt-controller;
73 cell-index = <2>;
74 dcr-reg = <0e0 009>;
75 #address-cells = <0>;
76 #size-cells = <0>;
77 #interrupt-cells = <2>;
78 interrupts = <1c 4 1d 4>; /* cascade */
79 interrupt-parent = <&UIC0>;
80 };
81
82 plb {
83 compatible = "ibm,plb-405exr", "ibm,plb4";
84 #address-cells = <1>;
85 #size-cells = <1>;
86 ranges;
87 clock-frequency = <0>; /* Filled in by U-Boot */
88
89 SDRAM0: memory-controller {
90 compatible = "ibm,sdram-405exr";
91 dcr-reg = <010 2>;
92 };
93
94 MAL0: mcmal {
95 compatible = "ibm,mcmal-405exr", "ibm,mcmal2";
96 dcr-reg = <180 62>;
97 num-tx-chans = <2>;
98 num-rx-chans = <2>;
99 interrupt-parent = <&MAL0>;
100 interrupts = <0 1 2 3 4>;
101 #interrupt-cells = <1>;
102 #address-cells = <0>;
103 #size-cells = <0>;
104 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
105 /*RXEOB*/ 1 &UIC0 b 4
106 /*SERR*/ 2 &UIC1 0 4
107 /*TXDE*/ 3 &UIC1 1 4
108 /*RXDE*/ 4 &UIC1 2 4>;
109 interrupt-map-mask = <ffffffff>;
110 };
111
112 POB0: opb {
113 compatible = "ibm,opb-405exr", "ibm,opb";
114 #address-cells = <1>;
115 #size-cells = <1>;
116 ranges = <80000000 80000000 10000000
117 ef600000 ef600000 a00000
118 f0000000 f0000000 10000000>;
119 dcr-reg = <0a0 5>;
120 clock-frequency = <0>; /* Filled in by U-Boot */
121
122 EBC0: ebc {
123 compatible = "ibm,ebc-405exr", "ibm,ebc";
124 dcr-reg = <012 2>;
125 #address-cells = <2>;
126 #size-cells = <1>;
127 clock-frequency = <0>; /* Filled in by U-Boot */
128 /* ranges property is supplied by U-Boot */
129 interrupts = <5 1>;
130 interrupt-parent = <&UIC1>;
131
132 nor_flash@0,0 {
133 compatible = "amd,s29gl512n", "cfi-flash";
134 bank-width = <2>;
135 reg = <0 000000 4000000>;
136 #address-cells = <1>;
137 #size-cells = <1>;
138 partition@0 {
139 label = "kernel";
140 reg = <0 200000>;
141 };
142 partition@200000 {
143 label = "root";
144 reg = <200000 200000>;
145 };
146 partition@400000 {
147 label = "user";
148 reg = <400000 3b60000>;
149 };
150 partition@3f60000 {
151 label = "env";
152 reg = <3f60000 40000>;
153 };
154 partition@3fa0000 {
155 label = "u-boot";
156 reg = <3fa0000 60000>;
157 };
158 };
159 };
160
161 UART0: serial@ef600200 {
162 device_type = "serial";
163 compatible = "ns16550";
164 reg = <ef600200 8>;
165 virtual-reg = <ef600200>;
166 clock-frequency = <0>; /* Filled in by U-Boot */
167 current-speed = <0>;
168 interrupt-parent = <&UIC0>;
169 interrupts = <1a 4>;
170 };
171
172 UART1: serial@ef600300 {
173 device_type = "serial";
174 compatible = "ns16550";
175 reg = <ef600300 8>;
176 virtual-reg = <ef600300>;
177 clock-frequency = <0>; /* Filled in by U-Boot */
178 current-speed = <0>;
179 interrupt-parent = <&UIC0>;
180 interrupts = <1 4>;
181 };
182
183 IIC0: i2c@ef600400 {
184 compatible = "ibm,iic-405exr", "ibm,iic";
185 reg = <ef600400 14>;
186 interrupt-parent = <&UIC0>;
187 interrupts = <2 4>;
188 };
189
190 IIC1: i2c@ef600500 {
191 compatible = "ibm,iic-405exr", "ibm,iic";
192 reg = <ef600500 14>;
193 interrupt-parent = <&UIC0>;
194 interrupts = <7 4>;
195 };
196
197
198 RGMII0: emac-rgmii@ef600b00 {
199 compatible = "ibm,rgmii-405exr", "ibm,rgmii";
200 reg = <ef600b00 104>;
201 has-mdio;
202 };
203
204 EMAC0: ethernet@ef600900 {
205 linux,network-index = <0>;
206 device_type = "network";
207 compatible = "ibm,emac-405exr", "ibm,emac4";
208 interrupt-parent = <&EMAC0>;
209 interrupts = <0 1>;
210 #interrupt-cells = <1>;
211 #address-cells = <0>;
212 #size-cells = <0>;
213 interrupt-map = </*Status*/ 0 &UIC0 18 4
214 /*Wake*/ 1 &UIC1 1d 4>;
215 reg = <ef600900 70>;
216 local-mac-address = [000000000000]; /* Filled in by U-Boot */
217 mal-device = <&MAL0>;
218 mal-tx-channel = <0>;
219 mal-rx-channel = <0>;
220 cell-index = <0>;
221 max-frame-size = <5dc>;
222 rx-fifo-size = <1000>;
223 tx-fifo-size = <800>;
224 phy-mode = "rgmii";
225 phy-map = <00000000>;
226 rgmii-device = <&RGMII0>;
227 rgmii-channel = <0>;
228 has-inverted-stacr-oc;
229 has-new-stacr-staopc;
230 };
231 };
232
233 PCIE0: pciex@0a0000000 {
234 device_type = "pci";
235 #interrupt-cells = <1>;
236 #size-cells = <2>;
237 #address-cells = <3>;
238 compatible = "ibm,plb-pciex-405exr", "ibm,plb-pciex";
239 primary;
240 port = <0>; /* port number */
241 reg = <a0000000 20000000 /* Config space access */
242 ef000000 00001000>; /* Registers */
243 dcr-reg = <040 020>;
244 sdr-base = <400>;
245
246 /* Outbound ranges, one memory and one IO,
247 * later cannot be changed
248 */
249 ranges = <02000000 0 80000000 90000000 0 08000000
250 01000000 0 00000000 e0000000 0 00010000>;
251
252 /* Inbound 2GB range starting at 0 */
253 dma-ranges = <42000000 0 0 0 0 80000000>;
254
255 /* This drives busses 0x00 to 0x3f */
256 bus-range = <00 3f>;
257
258 /* Legacy interrupts (note the weird polarity, the bridge seems
259 * to invert PCIe legacy interrupts).
260 * We are de-swizzling here because the numbers are actually for
261 * port of the root complex virtual P2P bridge. But I want
262 * to avoid putting a node for it in the tree, so the numbers
263 * below are basically de-swizzled numbers.
264 * The real slot is on idsel 0, so the swizzling is 1:1
265 */
266 interrupt-map-mask = <0000 0 0 7>;
267 interrupt-map = <
268 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
269 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
270 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
271 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
272 };
273 };
274};
diff --git a/arch/powerpc/boot/dts/katmai.dts b/arch/powerpc/boot/dts/katmai.dts
new file mode 100644
index 000000000000..9bdfc0ff3c24
--- /dev/null
+++ b/arch/powerpc/boot/dts/katmai.dts
@@ -0,0 +1,400 @@
1/*
2 * Device Tree Source for AMCC Katmai eval board
3 *
4 * Copyright (c) 2006, 2007 IBM Corp.
5 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
6 *
7 * Copyright (c) 2006, 2007 IBM Corp.
8 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
9 *
10 * This file is licensed under the terms of the GNU General Public
11 * License version 2. This program is licensed "as is" without
12 * any warranty of any kind, whether express or implied.
13 */
14
15/ {
16 #address-cells = <2>;
17 #size-cells = <1>;
18 model = "amcc,katmai";
19 compatible = "amcc,katmai";
20 dcr-parent = <&/cpus/cpu@0>;
21
22 aliases {
23 ethernet0 = &EMAC0;
24 serial0 = &UART0;
25 serial1 = &UART1;
26 serial2 = &UART2;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 cpu@0 {
34 device_type = "cpu";
35 model = "PowerPC,440SPe";
36 reg = <0>;
37 clock-frequency = <0>; /* Filled in by zImage */
38 timebase-frequency = <0>; /* Filled in by zImage */
39 i-cache-line-size = <20>;
40 d-cache-line-size = <20>;
41 i-cache-size = <20000>;
42 d-cache-size = <20000>;
43 dcr-controller;
44 dcr-access-method = "native";
45 };
46 };
47
48 memory {
49 device_type = "memory";
50 reg = <0 0 0>; /* Filled in by zImage */
51 };
52
53 UIC0: interrupt-controller0 {
54 compatible = "ibm,uic-440spe","ibm,uic";
55 interrupt-controller;
56 cell-index = <0>;
57 dcr-reg = <0c0 009>;
58 #address-cells = <0>;
59 #size-cells = <0>;
60 #interrupt-cells = <2>;
61 };
62
63 UIC1: interrupt-controller1 {
64 compatible = "ibm,uic-440spe","ibm,uic";
65 interrupt-controller;
66 cell-index = <1>;
67 dcr-reg = <0d0 009>;
68 #address-cells = <0>;
69 #size-cells = <0>;
70 #interrupt-cells = <2>;
71 interrupts = <1e 4 1f 4>; /* cascade */
72 interrupt-parent = <&UIC0>;
73 };
74
75 UIC2: interrupt-controller2 {
76 compatible = "ibm,uic-440spe","ibm,uic";
77 interrupt-controller;
78 cell-index = <2>;
79 dcr-reg = <0e0 009>;
80 #address-cells = <0>;
81 #size-cells = <0>;
82 #interrupt-cells = <2>;
83 interrupts = <a 4 b 4>; /* cascade */
84 interrupt-parent = <&UIC0>;
85 };
86
87 UIC3: interrupt-controller3 {
88 compatible = "ibm,uic-440spe","ibm,uic";
89 interrupt-controller;
90 cell-index = <3>;
91 dcr-reg = <0f0 009>;
92 #address-cells = <0>;
93 #size-cells = <0>;
94 #interrupt-cells = <2>;
95 interrupts = <10 4 11 4>; /* cascade */
96 interrupt-parent = <&UIC0>;
97 };
98
99 SDR0: sdr {
100 compatible = "ibm,sdr-440spe";
101 dcr-reg = <00e 002>;
102 };
103
104 CPR0: cpr {
105 compatible = "ibm,cpr-440spe";
106 dcr-reg = <00c 002>;
107 };
108
109 plb {
110 compatible = "ibm,plb-440spe", "ibm,plb-440gp", "ibm,plb4";
111 #address-cells = <2>;
112 #size-cells = <1>;
113 ranges;
114 clock-frequency = <0>; /* Filled in by zImage */
115
116 SDRAM0: sdram {
117 compatible = "ibm,sdram-440spe", "ibm,sdram-405gp";
118 dcr-reg = <010 2>;
119 };
120
121 MAL0: mcmal {
122 compatible = "ibm,mcmal-440spe", "ibm,mcmal2";
123 dcr-reg = <180 62>;
124 num-tx-chans = <2>;
125 num-rx-chans = <1>;
126 interrupt-parent = <&MAL0>;
127 interrupts = <0 1 2 3 4>;
128 #interrupt-cells = <1>;
129 #address-cells = <0>;
130 #size-cells = <0>;
131 interrupt-map = </*TXEOB*/ 0 &UIC1 6 4
132 /*RXEOB*/ 1 &UIC1 7 4
133 /*SERR*/ 2 &UIC1 1 4
134 /*TXDE*/ 3 &UIC1 2 4
135 /*RXDE*/ 4 &UIC1 3 4>;
136 };
137
138 POB0: opb {
139 compatible = "ibm,opb-440spe", "ibm,opb-440gp", "ibm,opb";
140 #address-cells = <1>;
141 #size-cells = <1>;
142 ranges = <00000000 4 e0000000 20000000>;
143 clock-frequency = <0>; /* Filled in by zImage */
144
145 EBC0: ebc {
146 compatible = "ibm,ebc-440spe", "ibm,ebc-440gp", "ibm,ebc";
147 dcr-reg = <012 2>;
148 #address-cells = <2>;
149 #size-cells = <1>;
150 clock-frequency = <0>; /* Filled in by zImage */
151 interrupts = <5 1>;
152 interrupt-parent = <&UIC1>;
153 };
154
155 UART0: serial@10000200 {
156 device_type = "serial";
157 compatible = "ns16550";
158 reg = <10000200 8>;
159 virtual-reg = <a0000200>;
160 clock-frequency = <0>; /* Filled in by zImage */
161 current-speed = <1c200>;
162 interrupt-parent = <&UIC0>;
163 interrupts = <0 4>;
164 };
165
166 UART1: serial@10000300 {
167 device_type = "serial";
168 compatible = "ns16550";
169 reg = <10000300 8>;
170 virtual-reg = <a0000300>;
171 clock-frequency = <0>;
172 current-speed = <0>;
173 interrupt-parent = <&UIC0>;
174 interrupts = <1 4>;
175 };
176
177
178 UART2: serial@10000600 {
179 device_type = "serial";
180 compatible = "ns16550";
181 reg = <10000600 8>;
182 virtual-reg = <a0000600>;
183 clock-frequency = <0>;
184 current-speed = <0>;
185 interrupt-parent = <&UIC1>;
186 interrupts = <5 4>;
187 };
188
189 IIC0: i2c@10000400 {
190 device_type = "i2c";
191 compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
192 reg = <10000400 14>;
193 interrupt-parent = <&UIC0>;
194 interrupts = <2 4>;
195 };
196
197 IIC1: i2c@10000500 {
198 device_type = "i2c";
199 compatible = "ibm,iic-440spe", "ibm,iic-440gp", "ibm,iic";
200 reg = <10000500 14>;
201 interrupt-parent = <&UIC0>;
202 interrupts = <3 4>;
203 };
204
205 EMAC0: ethernet@10000800 {
206 linux,network-index = <0>;
207 device_type = "network";
208 compatible = "ibm,emac-440spe", "ibm,emac4";
209 interrupt-parent = <&UIC1>;
210 interrupts = <1c 4 1d 4>;
211 reg = <10000800 70>;
212 local-mac-address = [000000000000];
213 mal-device = <&MAL0>;
214 mal-tx-channel = <0>;
215 mal-rx-channel = <0>;
216 cell-index = <0>;
217 max-frame-size = <5dc>;
218 rx-fifo-size = <1000>;
219 tx-fifo-size = <800>;
220 phy-mode = "gmii";
221 phy-map = <00000000>;
222 has-inverted-stacr-oc;
223 has-new-stacr-staopc;
224 };
225 };
226
227 PCIX0: pci@c0ec00000 {
228 device_type = "pci";
229 #interrupt-cells = <1>;
230 #size-cells = <2>;
231 #address-cells = <3>;
232 compatible = "ibm,plb-pcix-440spe", "ibm,plb-pcix";
233 primary;
234 large-inbound-windows;
235 enable-msi-hole;
236 reg = <c 0ec00000 8 /* Config space access */
237 0 0 0 /* no IACK cycles */
238 c 0ed00000 4 /* Special cycles */
239 c 0ec80000 100 /* Internal registers */
240 c 0ec80100 fc>; /* Internal messaging registers */
241
242 /* Outbound ranges, one memory and one IO,
243 * later cannot be changed
244 */
245 ranges = <02000000 0 80000000 0000000d 80000000 0 80000000
246 01000000 0 00000000 0000000c 08000000 0 00010000>;
247
248 /* Inbound 2GB range starting at 0 */
249 dma-ranges = <42000000 0 0 0 0 0 80000000>;
250
251 /* This drives busses 0 to 0xf */
252 bus-range = <0 f>;
253
254 /*
255 * On Katmai, the following PCI-X interrupts signals
256 * have to be enabled via jumpers (only INTA is
257 * enabled per default):
258 *
259 * INTB: J3: 1-2
260 * INTC: J2: 1-2
261 * INTD: J1: 1-2
262 */
263 interrupt-map-mask = <f800 0 0 7>;
264 interrupt-map = <
265 /* IDSEL 1 */
266 0800 0 0 1 &UIC1 14 8
267 0800 0 0 2 &UIC1 13 8
268 0800 0 0 3 &UIC1 12 8
269 0800 0 0 4 &UIC1 11 8
270 >;
271 };
272
273 PCIE0: pciex@d00000000 {
274 device_type = "pci";
275 #interrupt-cells = <1>;
276 #size-cells = <2>;
277 #address-cells = <3>;
278 compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
279 primary;
280 port = <0>; /* port number */
281 reg = <d 00000000 20000000 /* Config space access */
282 c 10000000 00001000>; /* Registers */
283 dcr-reg = <100 020>;
284 sdr-base = <300>;
285
286 /* Outbound ranges, one memory and one IO,
287 * later cannot be changed
288 */
289 ranges = <02000000 0 80000000 0000000e 00000000 0 80000000
290 01000000 0 00000000 0000000f 80000000 0 00010000>;
291
292 /* Inbound 2GB range starting at 0 */
293 dma-ranges = <42000000 0 0 0 0 0 80000000>;
294
295 /* This drives busses 10 to 0x1f */
296 bus-range = <10 1f>;
297
298 /* Legacy interrupts (note the weird polarity, the bridge seems
299 * to invert PCIe legacy interrupts).
300 * We are de-swizzling here because the numbers are actually for
301 * port of the root complex virtual P2P bridge. But I want
302 * to avoid putting a node for it in the tree, so the numbers
303 * below are basically de-swizzled numbers.
304 * The real slot is on idsel 0, so the swizzling is 1:1
305 */
306 interrupt-map-mask = <0000 0 0 7>;
307 interrupt-map = <
308 0000 0 0 1 &UIC3 0 4 /* swizzled int A */
309 0000 0 0 2 &UIC3 1 4 /* swizzled int B */
310 0000 0 0 3 &UIC3 2 4 /* swizzled int C */
311 0000 0 0 4 &UIC3 3 4 /* swizzled int D */>;
312 };
313
314 PCIE1: pciex@d20000000 {
315 device_type = "pci";
316 #interrupt-cells = <1>;
317 #size-cells = <2>;
318 #address-cells = <3>;
319 compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
320 primary;
321 port = <1>; /* port number */
322 reg = <d 20000000 20000000 /* Config space access */
323 c 10001000 00001000>; /* Registers */
324 dcr-reg = <120 020>;
325 sdr-base = <340>;
326
327 /* Outbound ranges, one memory and one IO,
328 * later cannot be changed
329 */
330 ranges = <02000000 0 80000000 0000000e 80000000 0 80000000
331 01000000 0 00000000 0000000f 80010000 0 00010000>;
332
333 /* Inbound 2GB range starting at 0 */
334 dma-ranges = <42000000 0 0 0 0 0 80000000>;
335
336 /* This drives busses 10 to 0x1f */
337 bus-range = <20 2f>;
338
339 /* Legacy interrupts (note the weird polarity, the bridge seems
340 * to invert PCIe legacy interrupts).
341 * We are de-swizzling here because the numbers are actually for
342 * port of the root complex virtual P2P bridge. But I want
343 * to avoid putting a node for it in the tree, so the numbers
344 * below are basically de-swizzled numbers.
345 * The real slot is on idsel 0, so the swizzling is 1:1
346 */
347 interrupt-map-mask = <0000 0 0 7>;
348 interrupt-map = <
349 0000 0 0 1 &UIC3 4 4 /* swizzled int A */
350 0000 0 0 2 &UIC3 5 4 /* swizzled int B */
351 0000 0 0 3 &UIC3 6 4 /* swizzled int C */
352 0000 0 0 4 &UIC3 7 4 /* swizzled int D */>;
353 };
354
355 PCIE2: pciex@d40000000 {
356 device_type = "pci";
357 #interrupt-cells = <1>;
358 #size-cells = <2>;
359 #address-cells = <3>;
360 compatible = "ibm,plb-pciex-440spe", "ibm,plb-pciex";
361 primary;
362 port = <2>; /* port number */
363 reg = <d 40000000 20000000 /* Config space access */
364 c 10002000 00001000>; /* Registers */
365 dcr-reg = <140 020>;
366 sdr-base = <370>;
367
368 /* Outbound ranges, one memory and one IO,
369 * later cannot be changed
370 */
371 ranges = <02000000 0 80000000 0000000f 00000000 0 80000000
372 01000000 0 00000000 0000000f 80020000 0 00010000>;
373
374 /* Inbound 2GB range starting at 0 */
375 dma-ranges = <42000000 0 0 0 0 0 80000000>;
376
377 /* This drives busses 10 to 0x1f */
378 bus-range = <30 3f>;
379
380 /* Legacy interrupts (note the weird polarity, the bridge seems
381 * to invert PCIe legacy interrupts).
382 * We are de-swizzling here because the numbers are actually for
383 * port of the root complex virtual P2P bridge. But I want
384 * to avoid putting a node for it in the tree, so the numbers
385 * below are basically de-swizzled numbers.
386 * The real slot is on idsel 0, so the swizzling is 1:1
387 */
388 interrupt-map-mask = <0000 0 0 7>;
389 interrupt-map = <
390 0000 0 0 1 &UIC3 8 4 /* swizzled int A */
391 0000 0 0 2 &UIC3 9 4 /* swizzled int B */
392 0000 0 0 3 &UIC3 a 4 /* swizzled int C */
393 0000 0 0 4 &UIC3 b 4 /* swizzled int D */>;
394 };
395 };
396
397 chosen {
398 linux,stdout-path = "/plb/opb/serial@10000200";
399 };
400};
diff --git a/arch/powerpc/boot/dts/kilauea.dts b/arch/powerpc/boot/dts/kilauea.dts
index c824e8f06454..67c7ea179a07 100644
--- a/arch/powerpc/boot/dts/kilauea.dts
+++ b/arch/powerpc/boot/dts/kilauea.dts
@@ -13,14 +13,22 @@
13 #size-cells = <1>; 13 #size-cells = <1>;
14 model = "amcc,kilauea"; 14 model = "amcc,kilauea";
15 compatible = "amcc,kilauea"; 15 compatible = "amcc,kilauea";
16 dcr-parent = <&/cpus/PowerPC,405EX@0>; 16 dcr-parent = <&/cpus/cpu@0>;
17
18 aliases {
19 ethernet0 = &EMAC0;
20 ethernet1 = &EMAC1;
21 serial0 = &UART0;
22 serial1 = &UART1;
23 };
17 24
18 cpus { 25 cpus {
19 #address-cells = <1>; 26 #address-cells = <1>;
20 #size-cells = <0>; 27 #size-cells = <0>;
21 28
22 PowerPC,405EX@0 { 29 cpu@0 {
23 device_type = "cpu"; 30 device_type = "cpu";
31 model = "PowerPC,405EX";
24 reg = <0>; 32 reg = <0>;
25 clock-frequency = <0>; /* Filled in by U-Boot */ 33 clock-frequency = <0>; /* Filled in by U-Boot */
26 timebase-frequency = <0>; /* Filled in by U-Boot */ 34 timebase-frequency = <0>; /* Filled in by U-Boot */
@@ -194,6 +202,7 @@
194 device_type = "rgmii-interface"; 202 device_type = "rgmii-interface";
195 compatible = "ibm,rgmii-405ex", "ibm,rgmii"; 203 compatible = "ibm,rgmii-405ex", "ibm,rgmii";
196 reg = <ef600b00 104>; 204 reg = <ef600b00 104>;
205 has-mdio;
197 }; 206 };
198 207
199 EMAC0: ethernet@ef600900 { 208 EMAC0: ethernet@ef600900 {
@@ -220,6 +229,8 @@
220 phy-map = <00000000>; 229 phy-map = <00000000>;
221 rgmii-device = <&RGMII0>; 230 rgmii-device = <&RGMII0>;
222 rgmii-channel = <0>; 231 rgmii-channel = <0>;
232 has-inverted-stacr-oc;
233 has-new-stacr-staopc;
223 }; 234 };
224 235
225 EMAC1: ethernet@ef600a00 { 236 EMAC1: ethernet@ef600a00 {
@@ -246,7 +257,91 @@
246 phy-map = <00000000>; 257 phy-map = <00000000>;
247 rgmii-device = <&RGMII0>; 258 rgmii-device = <&RGMII0>;
248 rgmii-channel = <1>; 259 rgmii-channel = <1>;
260 has-inverted-stacr-oc;
261 has-new-stacr-staopc;
249 }; 262 };
250 }; 263 };
264
265 PCIE0: pciex@0a0000000 {
266 device_type = "pci";
267 #interrupt-cells = <1>;
268 #size-cells = <2>;
269 #address-cells = <3>;
270 compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
271 primary;
272 port = <0>; /* port number */
273 reg = <a0000000 20000000 /* Config space access */
274 ef000000 00001000>; /* Registers */
275 dcr-reg = <040 020>;
276 sdr-base = <400>;
277
278 /* Outbound ranges, one memory and one IO,
279 * later cannot be changed
280 */
281 ranges = <02000000 0 80000000 90000000 0 08000000
282 01000000 0 00000000 e0000000 0 00010000>;
283
284 /* Inbound 2GB range starting at 0 */
285 dma-ranges = <42000000 0 0 0 0 80000000>;
286
287 /* This drives busses 0x00 to 0x3f */
288 bus-range = <00 3f>;
289
290 /* Legacy interrupts (note the weird polarity, the bridge seems
291 * to invert PCIe legacy interrupts).
292 * We are de-swizzling here because the numbers are actually for
293 * port of the root complex virtual P2P bridge. But I want
294 * to avoid putting a node for it in the tree, so the numbers
295 * below are basically de-swizzled numbers.
296 * The real slot is on idsel 0, so the swizzling is 1:1
297 */
298 interrupt-map-mask = <0000 0 0 7>;
299 interrupt-map = <
300 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
301 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
302 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
303 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
304 };
305
306 PCIE1: pciex@0c0000000 {
307 device_type = "pci";
308 #interrupt-cells = <1>;
309 #size-cells = <2>;
310 #address-cells = <3>;
311 compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
312 primary;
313 port = <1>; /* port number */
314 reg = <c0000000 20000000 /* Config space access */
315 ef001000 00001000>; /* Registers */
316 dcr-reg = <060 020>;
317 sdr-base = <440>;
318
319 /* Outbound ranges, one memory and one IO,
320 * later cannot be changed
321 */
322 ranges = <02000000 0 80000000 98000000 0 08000000
323 01000000 0 00000000 e0010000 0 00010000>;
324
325 /* Inbound 2GB range starting at 0 */
326 dma-ranges = <42000000 0 0 0 0 80000000>;
327
328 /* This drives busses 0x40 to 0x7f */
329 bus-range = <40 7f>;
330
331 /* Legacy interrupts (note the weird polarity, the bridge seems
332 * to invert PCIe legacy interrupts).
333 * We are de-swizzling here because the numbers are actually for
334 * port of the root complex virtual P2P bridge. But I want
335 * to avoid putting a node for it in the tree, so the numbers
336 * below are basically de-swizzled numbers.
337 * The real slot is on idsel 0, so the swizzling is 1:1
338 */
339 interrupt-map-mask = <0000 0 0 7>;
340 interrupt-map = <
341 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
342 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
343 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
344 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
345 };
251 }; 346 };
252}; 347};
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts
index ec71ab819fee..446958854519 100644
--- a/arch/powerpc/boot/dts/kuroboxHD.dts
+++ b/arch/powerpc/boot/dts/kuroboxHD.dts
@@ -23,6 +23,12 @@ XXXX add flash parts, rtc, ??
23 #address-cells = <1>; 23 #address-cells = <1>;
24 #size-cells = <1>; 24 #size-cells = <1>;
25 25
26 aliases {
27 serial0 = &serial0;
28 serial1 = &serial1;
29 pci0 = &pci0;
30 };
31
26 cpus { 32 cpus {
27 #address-cells = <1>; 33 #address-cells = <1>;
28 #size-cells = <0>; 34 #size-cells = <0>;
@@ -60,7 +66,7 @@ XXXX add flash parts, rtc, ??
60 i2c@80003000 { 66 i2c@80003000 {
61 #address-cells = <1>; 67 #address-cells = <1>;
62 #size-cells = <0>; 68 #size-cells = <0>;
63 device_type = "i2c"; 69 cell-index = <0>;
64 compatible = "fsl-i2c"; 70 compatible = "fsl-i2c";
65 reg = <80003000 1000>; 71 reg = <80003000 1000>;
66 interrupts = <5 2>; 72 interrupts = <5 2>;
@@ -73,7 +79,8 @@ XXXX add flash parts, rtc, ??
73 }; 79 };
74 }; 80 };
75 81
76 serial@80004500 { 82 serial0: serial@80004500 {
83 cell-index = <0>;
77 device_type = "serial"; 84 device_type = "serial";
78 compatible = "ns16550"; 85 compatible = "ns16550";
79 reg = <80004500 8>; 86 reg = <80004500 8>;
@@ -83,7 +90,8 @@ XXXX add flash parts, rtc, ??
83 interrupt-parent = <&mpic>; 90 interrupt-parent = <&mpic>;
84 }; 91 };
85 92
86 serial@80004600 { 93 serial1: serial@80004600 {
94 cell-index = <1>;
87 device_type = "serial"; 95 device_type = "serial";
88 compatible = "ns16550"; 96 compatible = "ns16550";
89 reg = <80004600 8>; 97 reg = <80004600 8>;
@@ -102,7 +110,7 @@ XXXX add flash parts, rtc, ??
102 reg = <80040000 40000>; 110 reg = <80040000 40000>;
103 }; 111 };
104 112
105 pci@fec00000 { 113 pci0: pci@fec00000 {
106 #address-cells = <3>; 114 #address-cells = <3>;
107 #size-cells = <2>; 115 #size-cells = <2>;
108 #interrupt-cells = <1>; 116 #interrupt-cells = <1>;
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index 32ecd2319928..8443c85b7b30 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -23,6 +23,12 @@ XXXX add flash parts, rtc, ??
23 #address-cells = <1>; 23 #address-cells = <1>;
24 #size-cells = <1>; 24 #size-cells = <1>;
25 25
26 aliases {
27 serial0 = &serial0;
28 serial1 = &serial1;
29 pci0 = &pci0;
30 };
31
26 cpus { 32 cpus {
27 #address-cells = <1>; 33 #address-cells = <1>;
28 #size-cells = <0>; 34 #size-cells = <0>;
@@ -60,7 +66,7 @@ XXXX add flash parts, rtc, ??
60 i2c@80003000 { 66 i2c@80003000 {
61 #address-cells = <1>; 67 #address-cells = <1>;
62 #size-cells = <0>; 68 #size-cells = <0>;
63 device_type = "i2c"; 69 cell-index = <0>;
64 compatible = "fsl-i2c"; 70 compatible = "fsl-i2c";
65 reg = <80003000 1000>; 71 reg = <80003000 1000>;
66 interrupts = <5 2>; 72 interrupts = <5 2>;
@@ -73,7 +79,8 @@ XXXX add flash parts, rtc, ??
73 }; 79 };
74 }; 80 };
75 81
76 serial@80004500 { 82 serial0: serial@80004500 {
83 cell-index = <0>;
77 device_type = "serial"; 84 device_type = "serial";
78 compatible = "ns16550"; 85 compatible = "ns16550";
79 reg = <80004500 8>; 86 reg = <80004500 8>;
@@ -83,7 +90,8 @@ XXXX add flash parts, rtc, ??
83 interrupt-parent = <&mpic>; 90 interrupt-parent = <&mpic>;
84 }; 91 };
85 92
86 serial@80004600 { 93 serial1: serial@80004600 {
94 cell-index = <1>;
87 device_type = "serial"; 95 device_type = "serial";
88 compatible = "ns16550"; 96 compatible = "ns16550";
89 reg = <80004600 8>; 97 reg = <80004600 8>;
@@ -102,7 +110,7 @@ XXXX add flash parts, rtc, ??
102 reg = <80040000 40000>; 110 reg = <80040000 40000>;
103 }; 111 };
104 112
105 pci@fec00000 { 113 pci0: pci@fec00000 {
106 #address-cells = <3>; 114 #address-cells = <3>;
107 #size-cells = <2>; 115 #size-cells = <2>;
108 #interrupt-cells = <1>; 116 #interrupt-cells = <1>;
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index 6731763f0282..0d701c1bf539 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -10,16 +10,9 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13/*
14 * WARNING: Do not depend on this tree layout remaining static just yet.
15 * The MPC5200 device tree conventions are still in flux
16 * Keep an eye on the linuxppc-dev mailing list for more details
17 */
18
19/ { 13/ {
20 model = "fsl,lite5200"; 14 model = "fsl,lite5200";
21 // revision = "1.0"; 15 compatible = "fsl,lite5200";
22 compatible = "fsl,lite5200","generic-mpc5200";
23 #address-cells = <1>; 16 #address-cells = <1>;
24 #size-cells = <1>; 17 #size-cells = <1>;
25 18
@@ -46,30 +39,29 @@
46 }; 39 };
47 40
48 soc5200@f0000000 { 41 soc5200@f0000000 {
49 model = "fsl,mpc5200"; 42 #address-cells = <1>;
50 compatible = "mpc5200"; 43 #size-cells = <1>;
51 revision = ""; // from bootloader 44 compatible = "fsl,mpc5200-immr";
52 device_type = "soc";
53 ranges = <0 f0000000 0000c000>; 45 ranges = <0 f0000000 0000c000>;
54 reg = <f0000000 00000100>; 46 reg = <f0000000 00000100>;
55 bus-frequency = <0>; // from bootloader 47 bus-frequency = <0>; // from bootloader
56 system-frequency = <0>; // from bootloader 48 system-frequency = <0>; // from bootloader
57 49
58 cdm@200 { 50 cdm@200 {
59 compatible = "mpc5200-cdm"; 51 compatible = "fsl,mpc5200-cdm";
60 reg = <200 38>; 52 reg = <200 38>;
61 }; 53 };
62 54
63 mpc5200_pic: pic@500 { 55 mpc5200_pic: interrupt-controller@500 {
64 // 5200 interrupts are encoded into two levels; 56 // 5200 interrupts are encoded into two levels;
65 interrupt-controller; 57 interrupt-controller;
66 #interrupt-cells = <3>; 58 #interrupt-cells = <3>;
67 device_type = "interrupt-controller"; 59 device_type = "interrupt-controller";
68 compatible = "mpc5200-pic"; 60 compatible = "fsl,mpc5200-pic";
69 reg = <500 80>; 61 reg = <500 80>;
70 }; 62 };
71 63
72 gpt@600 { // General Purpose Timer 64 timer@600 { // General Purpose Timer
73 compatible = "fsl,mpc5200-gpt"; 65 compatible = "fsl,mpc5200-gpt";
74 cell-index = <0>; 66 cell-index = <0>;
75 reg = <600 10>; 67 reg = <600 10>;
@@ -78,7 +70,7 @@
78 fsl,has-wdt; 70 fsl,has-wdt;
79 }; 71 };
80 72
81 gpt@610 { // General Purpose Timer 73 timer@610 { // General Purpose Timer
82 compatible = "fsl,mpc5200-gpt"; 74 compatible = "fsl,mpc5200-gpt";
83 cell-index = <1>; 75 cell-index = <1>;
84 reg = <610 10>; 76 reg = <610 10>;
@@ -86,7 +78,7 @@
86 interrupt-parent = <&mpc5200_pic>; 78 interrupt-parent = <&mpc5200_pic>;
87 }; 79 };
88 80
89 gpt@620 { // General Purpose Timer 81 timer@620 { // General Purpose Timer
90 compatible = "fsl,mpc5200-gpt"; 82 compatible = "fsl,mpc5200-gpt";
91 cell-index = <2>; 83 cell-index = <2>;
92 reg = <620 10>; 84 reg = <620 10>;
@@ -94,7 +86,7 @@
94 interrupt-parent = <&mpc5200_pic>; 86 interrupt-parent = <&mpc5200_pic>;
95 }; 87 };
96 88
97 gpt@630 { // General Purpose Timer 89 timer@630 { // General Purpose Timer
98 compatible = "fsl,mpc5200-gpt"; 90 compatible = "fsl,mpc5200-gpt";
99 cell-index = <3>; 91 cell-index = <3>;
100 reg = <630 10>; 92 reg = <630 10>;
@@ -102,7 +94,7 @@
102 interrupt-parent = <&mpc5200_pic>; 94 interrupt-parent = <&mpc5200_pic>;
103 }; 95 };
104 96
105 gpt@640 { // General Purpose Timer 97 timer@640 { // General Purpose Timer
106 compatible = "fsl,mpc5200-gpt"; 98 compatible = "fsl,mpc5200-gpt";
107 cell-index = <4>; 99 cell-index = <4>;
108 reg = <640 10>; 100 reg = <640 10>;
@@ -110,7 +102,7 @@
110 interrupt-parent = <&mpc5200_pic>; 102 interrupt-parent = <&mpc5200_pic>;
111 }; 103 };
112 104
113 gpt@650 { // General Purpose Timer 105 timer@650 { // General Purpose Timer
114 compatible = "fsl,mpc5200-gpt"; 106 compatible = "fsl,mpc5200-gpt";
115 cell-index = <5>; 107 cell-index = <5>;
116 reg = <650 10>; 108 reg = <650 10>;
@@ -118,7 +110,7 @@
118 interrupt-parent = <&mpc5200_pic>; 110 interrupt-parent = <&mpc5200_pic>;
119 }; 111 };
120 112
121 gpt@660 { // General Purpose Timer 113 timer@660 { // General Purpose Timer
122 compatible = "fsl,mpc5200-gpt"; 114 compatible = "fsl,mpc5200-gpt";
123 cell-index = <6>; 115 cell-index = <6>;
124 reg = <660 10>; 116 reg = <660 10>;
@@ -126,7 +118,7 @@
126 interrupt-parent = <&mpc5200_pic>; 118 interrupt-parent = <&mpc5200_pic>;
127 }; 119 };
128 120
129 gpt@670 { // General Purpose Timer 121 timer@670 { // General Purpose Timer
130 compatible = "fsl,mpc5200-gpt"; 122 compatible = "fsl,mpc5200-gpt";
131 cell-index = <7>; 123 cell-index = <7>;
132 reg = <670 10>; 124 reg = <670 10>;
@@ -135,25 +127,23 @@
135 }; 127 };
136 128
137 rtc@800 { // Real time clock 129 rtc@800 { // Real time clock
138 compatible = "mpc5200-rtc"; 130 compatible = "fsl,mpc5200-rtc";
139 device_type = "rtc"; 131 device_type = "rtc";
140 reg = <800 100>; 132 reg = <800 100>;
141 interrupts = <1 5 0 1 6 0>; 133 interrupts = <1 5 0 1 6 0>;
142 interrupt-parent = <&mpc5200_pic>; 134 interrupt-parent = <&mpc5200_pic>;
143 }; 135 };
144 136
145 mscan@900 { 137 can@900 {
146 device_type = "mscan"; 138 compatible = "fsl,mpc5200-mscan";
147 compatible = "mpc5200-mscan";
148 cell-index = <0>; 139 cell-index = <0>;
149 interrupts = <2 11 0>; 140 interrupts = <2 11 0>;
150 interrupt-parent = <&mpc5200_pic>; 141 interrupt-parent = <&mpc5200_pic>;
151 reg = <900 80>; 142 reg = <900 80>;
152 }; 143 };
153 144
154 mscan@980 { 145 can@980 {
155 device_type = "mscan"; 146 compatible = "fsl,mpc5200-mscan";
156 compatible = "mpc5200-mscan";
157 cell-index = <1>; 147 cell-index = <1>;
158 interrupts = <2 12 0>; 148 interrupts = <2 12 0>;
159 interrupt-parent = <&mpc5200_pic>; 149 interrupt-parent = <&mpc5200_pic>;
@@ -161,38 +151,36 @@
161 }; 151 };
162 152
163 gpio@b00 { 153 gpio@b00 {
164 compatible = "mpc5200-gpio"; 154 compatible = "fsl,mpc5200-gpio";
165 reg = <b00 40>; 155 reg = <b00 40>;
166 interrupts = <1 7 0>; 156 interrupts = <1 7 0>;
167 interrupt-parent = <&mpc5200_pic>; 157 interrupt-parent = <&mpc5200_pic>;
168 }; 158 };
169 159
170 gpio-wkup@c00 { 160 gpio@c00 {
171 compatible = "mpc5200-gpio-wkup"; 161 compatible = "fsl,mpc5200-gpio-wkup";
172 reg = <c00 40>; 162 reg = <c00 40>;
173 interrupts = <1 8 0 0 3 0>; 163 interrupts = <1 8 0 0 3 0>;
174 interrupt-parent = <&mpc5200_pic>; 164 interrupt-parent = <&mpc5200_pic>;
175 }; 165 };
176 166
177 spi@f00 { 167 spi@f00 {
178 device_type = "spi"; 168 compatible = "fsl,mpc5200-spi";
179 compatible = "mpc5200-spi";
180 reg = <f00 20>; 169 reg = <f00 20>;
181 interrupts = <2 d 0 2 e 0>; 170 interrupts = <2 d 0 2 e 0>;
182 interrupt-parent = <&mpc5200_pic>; 171 interrupt-parent = <&mpc5200_pic>;
183 }; 172 };
184 173
185 usb@1000 { 174 usb@1000 {
186 device_type = "usb-ohci-be"; 175 compatible = "fsl,mpc5200-ohci","ohci-be";
187 compatible = "mpc5200-ohci","ohci-be";
188 reg = <1000 ff>; 176 reg = <1000 ff>;
189 interrupts = <2 6 0>; 177 interrupts = <2 6 0>;
190 interrupt-parent = <&mpc5200_pic>; 178 interrupt-parent = <&mpc5200_pic>;
191 }; 179 };
192 180
193 bestcomm@1200 { 181 dma-controller@1200 {
194 device_type = "dma-controller"; 182 device_type = "dma-controller";
195 compatible = "mpc5200-bestcomm"; 183 compatible = "fsl,mpc5200-bestcomm";
196 reg = <1200 80>; 184 reg = <1200 80>;
197 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 185 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
198 3 4 0 3 5 0 3 6 0 3 7 0 186 3 4 0 3 5 0 3 6 0 3 7 0
@@ -202,13 +190,13 @@
202 }; 190 };
203 191
204 xlb@1f00 { 192 xlb@1f00 {
205 compatible = "mpc5200-xlb"; 193 compatible = "fsl,mpc5200-xlb";
206 reg = <1f00 100>; 194 reg = <1f00 100>;
207 }; 195 };
208 196
209 serial@2000 { // PSC1 197 serial@2000 { // PSC1
210 device_type = "serial"; 198 device_type = "serial";
211 compatible = "mpc5200-psc-uart"; 199 compatible = "fsl,mpc5200-psc-uart";
212 port-number = <0>; // Logical port assignment 200 port-number = <0>; // Logical port assignment
213 cell-index = <0>; 201 cell-index = <0>;
214 reg = <2000 100>; 202 reg = <2000 100>;
@@ -218,8 +206,7 @@
218 206
219 // PSC2 in ac97 mode example 207 // PSC2 in ac97 mode example
220 //ac97@2200 { // PSC2 208 //ac97@2200 { // PSC2
221 // device_type = "sound"; 209 // compatible = "fsl,mpc5200-psc-ac97";
222 // compatible = "mpc5200-psc-ac97";
223 // cell-index = <1>; 210 // cell-index = <1>;
224 // reg = <2200 100>; 211 // reg = <2200 100>;
225 // interrupts = <2 2 0>; 212 // interrupts = <2 2 0>;
@@ -228,8 +215,7 @@
228 215
229 // PSC3 in CODEC mode example 216 // PSC3 in CODEC mode example
230 //i2s@2400 { // PSC3 217 //i2s@2400 { // PSC3
231 // device_type = "sound"; 218 // compatible = "fsl,mpc5200-psc-i2s";
232 // compatible = "mpc5200-psc-i2s";
233 // cell-index = <2>; 219 // cell-index = <2>;
234 // reg = <2400 100>; 220 // reg = <2400 100>;
235 // interrupts = <2 3 0>; 221 // interrupts = <2 3 0>;
@@ -239,7 +225,7 @@
239 // PSC4 in uart mode example 225 // PSC4 in uart mode example
240 //serial@2600 { // PSC4 226 //serial@2600 { // PSC4
241 // device_type = "serial"; 227 // device_type = "serial";
242 // compatible = "mpc5200-psc-uart"; 228 // compatible = "fsl,mpc5200-psc-uart";
243 // cell-index = <3>; 229 // cell-index = <3>;
244 // reg = <2600 100>; 230 // reg = <2600 100>;
245 // interrupts = <2 b 0>; 231 // interrupts = <2 b 0>;
@@ -249,7 +235,7 @@
249 // PSC5 in uart mode example 235 // PSC5 in uart mode example
250 //serial@2800 { // PSC5 236 //serial@2800 { // PSC5
251 // device_type = "serial"; 237 // device_type = "serial";
252 // compatible = "mpc5200-psc-uart"; 238 // compatible = "fsl,mpc5200-psc-uart";
253 // cell-index = <4>; 239 // cell-index = <4>;
254 // reg = <2800 100>; 240 // reg = <2800 100>;
255 // interrupts = <2 c 0>; 241 // interrupts = <2 c 0>;
@@ -258,8 +244,7 @@
258 244
259 // PSC6 in spi mode example 245 // PSC6 in spi mode example
260 //spi@2c00 { // PSC6 246 //spi@2c00 { // PSC6
261 // device_type = "spi"; 247 // compatible = "fsl,mpc5200-psc-spi";
262 // compatible = "mpc5200-psc-spi";
263 // cell-index = <5>; 248 // cell-index = <5>;
264 // reg = <2c00 100>; 249 // reg = <2c00 100>;
265 // interrupts = <2 4 0>; 250 // interrupts = <2 4 0>;
@@ -268,24 +253,25 @@
268 253
269 ethernet@3000 { 254 ethernet@3000 {
270 device_type = "network"; 255 device_type = "network";
271 compatible = "mpc5200-fec"; 256 compatible = "fsl,mpc5200-fec";
272 reg = <3000 800>; 257 reg = <3000 800>;
273 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 258 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <2 5 0>; 259 interrupts = <2 5 0>;
275 interrupt-parent = <&mpc5200_pic>; 260 interrupt-parent = <&mpc5200_pic>;
276 }; 261 };
277 262
278 ata@3a00 { 263 ata@3a00 {
279 device_type = "ata"; 264 device_type = "ata";
280 compatible = "mpc5200-ata"; 265 compatible = "fsl,mpc5200-ata";
281 reg = <3a00 100>; 266 reg = <3a00 100>;
282 interrupts = <2 7 0>; 267 interrupts = <2 7 0>;
283 interrupt-parent = <&mpc5200_pic>; 268 interrupt-parent = <&mpc5200_pic>;
284 }; 269 };
285 270
286 i2c@3d00 { 271 i2c@3d00 {
287 device_type = "i2c"; 272 #address-cells = <1>;
288 compatible = "mpc5200-i2c","fsl-i2c"; 273 #size-cells = <0>;
274 compatible = "fsl,mpc5200-i2c","fsl-i2c";
289 cell-index = <0>; 275 cell-index = <0>;
290 reg = <3d00 40>; 276 reg = <3d00 40>;
291 interrupts = <2 f 0>; 277 interrupts = <2 f 0>;
@@ -294,8 +280,9 @@
294 }; 280 };
295 281
296 i2c@3d40 { 282 i2c@3d40 {
297 device_type = "i2c"; 283 #address-cells = <1>;
298 compatible = "mpc5200-i2c","fsl-i2c"; 284 #size-cells = <0>;
285 compatible = "fsl,mpc5200-i2c","fsl-i2c";
299 cell-index = <1>; 286 cell-index = <1>;
300 reg = <3d40 40>; 287 reg = <3d40 40>;
301 interrupts = <2 10 0>; 288 interrupts = <2 10 0>;
@@ -303,8 +290,7 @@
303 fsl5200-clocking; 290 fsl5200-clocking;
304 }; 291 };
305 sram@8000 { 292 sram@8000 {
306 device_type = "sram"; 293 compatible = "fsl,mpc5200-sram","sram";
307 compatible = "mpc5200-sram","sram";
308 reg = <8000 4000>; 294 reg = <8000 4000>;
309 }; 295 };
310 }; 296 };
@@ -314,7 +300,7 @@
314 #size-cells = <2>; 300 #size-cells = <2>;
315 #address-cells = <3>; 301 #address-cells = <3>;
316 device_type = "pci"; 302 device_type = "pci";
317 compatible = "mpc5200-pci"; 303 compatible = "fsl,mpc5200-pci";
318 reg = <f0000d00 100>; 304 reg = <f0000d00 100>;
319 interrupt-map-mask = <f800 0 0 7>; 305 interrupt-map-mask = <f800 0 0 7>;
320 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 306 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index b540388c608c..571ba02accac 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -18,8 +18,7 @@
18 18
19/ { 19/ {
20 model = "fsl,lite5200b"; 20 model = "fsl,lite5200b";
21 // revision = "1.0"; 21 compatible = "fsl,lite5200b";
22 compatible = "fsl,lite5200b","generic-mpc5200";
23 #address-cells = <1>; 22 #address-cells = <1>;
24 #size-cells = <1>; 23 #size-cells = <1>;
25 24
@@ -46,30 +45,29 @@
46 }; 45 };
47 46
48 soc5200@f0000000 { 47 soc5200@f0000000 {
49 model = "fsl,mpc5200b"; 48 #address-cells = <1>;
50 compatible = "mpc5200"; 49 #size-cells = <1>;
51 revision = ""; // from bootloader 50 compatible = "fsl,mpc5200b-immr";
52 device_type = "soc";
53 ranges = <0 f0000000 0000c000>; 51 ranges = <0 f0000000 0000c000>;
54 reg = <f0000000 00000100>; 52 reg = <f0000000 00000100>;
55 bus-frequency = <0>; // from bootloader 53 bus-frequency = <0>; // from bootloader
56 system-frequency = <0>; // from bootloader 54 system-frequency = <0>; // from bootloader
57 55
58 cdm@200 { 56 cdm@200 {
59 compatible = "mpc5200b-cdm","mpc5200-cdm"; 57 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
60 reg = <200 38>; 58 reg = <200 38>;
61 }; 59 };
62 60
63 mpc5200_pic: pic@500 { 61 mpc5200_pic: interrupt-controller@500 {
64 // 5200 interrupts are encoded into two levels; 62 // 5200 interrupts are encoded into two levels;
65 interrupt-controller; 63 interrupt-controller;
66 #interrupt-cells = <3>; 64 #interrupt-cells = <3>;
67 device_type = "interrupt-controller"; 65 device_type = "interrupt-controller";
68 compatible = "mpc5200b-pic","mpc5200-pic"; 66 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
69 reg = <500 80>; 67 reg = <500 80>;
70 }; 68 };
71 69
72 gpt@600 { // General Purpose Timer 70 timer@600 { // General Purpose Timer
73 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 71 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
74 cell-index = <0>; 72 cell-index = <0>;
75 reg = <600 10>; 73 reg = <600 10>;
@@ -78,7 +76,7 @@
78 fsl,has-wdt; 76 fsl,has-wdt;
79 }; 77 };
80 78
81 gpt@610 { // General Purpose Timer 79 timer@610 { // General Purpose Timer
82 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 80 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
83 cell-index = <1>; 81 cell-index = <1>;
84 reg = <610 10>; 82 reg = <610 10>;
@@ -86,7 +84,7 @@
86 interrupt-parent = <&mpc5200_pic>; 84 interrupt-parent = <&mpc5200_pic>;
87 }; 85 };
88 86
89 gpt@620 { // General Purpose Timer 87 timer@620 { // General Purpose Timer
90 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 88 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
91 cell-index = <2>; 89 cell-index = <2>;
92 reg = <620 10>; 90 reg = <620 10>;
@@ -94,7 +92,7 @@
94 interrupt-parent = <&mpc5200_pic>; 92 interrupt-parent = <&mpc5200_pic>;
95 }; 93 };
96 94
97 gpt@630 { // General Purpose Timer 95 timer@630 { // General Purpose Timer
98 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 96 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
99 cell-index = <3>; 97 cell-index = <3>;
100 reg = <630 10>; 98 reg = <630 10>;
@@ -102,7 +100,7 @@
102 interrupt-parent = <&mpc5200_pic>; 100 interrupt-parent = <&mpc5200_pic>;
103 }; 101 };
104 102
105 gpt@640 { // General Purpose Timer 103 timer@640 { // General Purpose Timer
106 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 104 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
107 cell-index = <4>; 105 cell-index = <4>;
108 reg = <640 10>; 106 reg = <640 10>;
@@ -110,7 +108,7 @@
110 interrupt-parent = <&mpc5200_pic>; 108 interrupt-parent = <&mpc5200_pic>;
111 }; 109 };
112 110
113 gpt@650 { // General Purpose Timer 111 timer@650 { // General Purpose Timer
114 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 112 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
115 cell-index = <5>; 113 cell-index = <5>;
116 reg = <650 10>; 114 reg = <650 10>;
@@ -118,7 +116,7 @@
118 interrupt-parent = <&mpc5200_pic>; 116 interrupt-parent = <&mpc5200_pic>;
119 }; 117 };
120 118
121 gpt@660 { // General Purpose Timer 119 timer@660 { // General Purpose Timer
122 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 120 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
123 cell-index = <6>; 121 cell-index = <6>;
124 reg = <660 10>; 122 reg = <660 10>;
@@ -126,7 +124,7 @@
126 interrupt-parent = <&mpc5200_pic>; 124 interrupt-parent = <&mpc5200_pic>;
127 }; 125 };
128 126
129 gpt@670 { // General Purpose Timer 127 timer@670 { // General Purpose Timer
130 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt"; 128 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
131 cell-index = <7>; 129 cell-index = <7>;
132 reg = <670 10>; 130 reg = <670 10>;
@@ -135,25 +133,23 @@
135 }; 133 };
136 134
137 rtc@800 { // Real time clock 135 rtc@800 { // Real time clock
138 compatible = "mpc5200b-rtc","mpc5200-rtc"; 136 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
139 device_type = "rtc"; 137 device_type = "rtc";
140 reg = <800 100>; 138 reg = <800 100>;
141 interrupts = <1 5 0 1 6 0>; 139 interrupts = <1 5 0 1 6 0>;
142 interrupt-parent = <&mpc5200_pic>; 140 interrupt-parent = <&mpc5200_pic>;
143 }; 141 };
144 142
145 mscan@900 { 143 can@900 {
146 device_type = "mscan"; 144 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
147 compatible = "mpc5200b-mscan","mpc5200-mscan";
148 cell-index = <0>; 145 cell-index = <0>;
149 interrupts = <2 11 0>; 146 interrupts = <2 11 0>;
150 interrupt-parent = <&mpc5200_pic>; 147 interrupt-parent = <&mpc5200_pic>;
151 reg = <900 80>; 148 reg = <900 80>;
152 }; 149 };
153 150
154 mscan@980 { 151 can@980 {
155 device_type = "mscan"; 152 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
156 compatible = "mpc5200b-mscan","mpc5200-mscan";
157 cell-index = <1>; 153 cell-index = <1>;
158 interrupts = <2 12 0>; 154 interrupts = <2 12 0>;
159 interrupt-parent = <&mpc5200_pic>; 155 interrupt-parent = <&mpc5200_pic>;
@@ -161,38 +157,36 @@
161 }; 157 };
162 158
163 gpio@b00 { 159 gpio@b00 {
164 compatible = "mpc5200b-gpio","mpc5200-gpio"; 160 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
165 reg = <b00 40>; 161 reg = <b00 40>;
166 interrupts = <1 7 0>; 162 interrupts = <1 7 0>;
167 interrupt-parent = <&mpc5200_pic>; 163 interrupt-parent = <&mpc5200_pic>;
168 }; 164 };
169 165
170 gpio-wkup@c00 { 166 gpio@c00 {
171 compatible = "mpc5200b-gpio-wkup","mpc5200-gpio-wkup"; 167 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
172 reg = <c00 40>; 168 reg = <c00 40>;
173 interrupts = <1 8 0 0 3 0>; 169 interrupts = <1 8 0 0 3 0>;
174 interrupt-parent = <&mpc5200_pic>; 170 interrupt-parent = <&mpc5200_pic>;
175 }; 171 };
176 172
177 spi@f00 { 173 spi@f00 {
178 device_type = "spi"; 174 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
179 compatible = "mpc5200b-spi","mpc5200-spi";
180 reg = <f00 20>; 175 reg = <f00 20>;
181 interrupts = <2 d 0 2 e 0>; 176 interrupts = <2 d 0 2 e 0>;
182 interrupt-parent = <&mpc5200_pic>; 177 interrupt-parent = <&mpc5200_pic>;
183 }; 178 };
184 179
185 usb@1000 { 180 usb@1000 {
186 device_type = "usb-ohci-be"; 181 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
187 compatible = "mpc5200b-ohci","mpc5200-ohci","ohci-be";
188 reg = <1000 ff>; 182 reg = <1000 ff>;
189 interrupts = <2 6 0>; 183 interrupts = <2 6 0>;
190 interrupt-parent = <&mpc5200_pic>; 184 interrupt-parent = <&mpc5200_pic>;
191 }; 185 };
192 186
193 bestcomm@1200 { 187 dma-controller@1200 {
194 device_type = "dma-controller"; 188 device_type = "dma-controller";
195 compatible = "mpc5200b-bestcomm","mpc5200-bestcomm"; 189 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
196 reg = <1200 80>; 190 reg = <1200 80>;
197 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0 191 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
198 3 4 0 3 5 0 3 6 0 3 7 0 192 3 4 0 3 5 0 3 6 0 3 7 0
@@ -202,13 +196,13 @@
202 }; 196 };
203 197
204 xlb@1f00 { 198 xlb@1f00 {
205 compatible = "mpc5200b-xlb","mpc5200-xlb"; 199 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
206 reg = <1f00 100>; 200 reg = <1f00 100>;
207 }; 201 };
208 202
209 serial@2000 { // PSC1 203 serial@2000 { // PSC1
210 device_type = "serial"; 204 device_type = "serial";
211 compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 205 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
212 port-number = <0>; // Logical port assignment 206 port-number = <0>; // Logical port assignment
213 cell-index = <0>; 207 cell-index = <0>;
214 reg = <2000 100>; 208 reg = <2000 100>;
@@ -218,8 +212,7 @@
218 212
219 // PSC2 in ac97 mode example 213 // PSC2 in ac97 mode example
220 //ac97@2200 { // PSC2 214 //ac97@2200 { // PSC2
221 // device_type = "sound"; 215 // compatible = "fsl,mpc5200b-psc-ac97","fsl,mpc5200-psc-ac97";
222 // compatible = "mpc5200b-psc-ac97","mpc5200-psc-ac97";
223 // cell-index = <1>; 216 // cell-index = <1>;
224 // reg = <2200 100>; 217 // reg = <2200 100>;
225 // interrupts = <2 2 0>; 218 // interrupts = <2 2 0>;
@@ -228,8 +221,7 @@
228 221
229 // PSC3 in CODEC mode example 222 // PSC3 in CODEC mode example
230 //i2s@2400 { // PSC3 223 //i2s@2400 { // PSC3
231 // device_type = "sound"; 224 // compatible = "fsl,mpc5200b-psc-i2s"; //not 5200 compatible
232 // compatible = "mpc5200b-psc-i2s"; //not 5200 compatible
233 // cell-index = <2>; 225 // cell-index = <2>;
234 // reg = <2400 100>; 226 // reg = <2400 100>;
235 // interrupts = <2 3 0>; 227 // interrupts = <2 3 0>;
@@ -239,7 +231,7 @@
239 // PSC4 in uart mode example 231 // PSC4 in uart mode example
240 //serial@2600 { // PSC4 232 //serial@2600 { // PSC4
241 // device_type = "serial"; 233 // device_type = "serial";
242 // compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 234 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
243 // cell-index = <3>; 235 // cell-index = <3>;
244 // reg = <2600 100>; 236 // reg = <2600 100>;
245 // interrupts = <2 b 0>; 237 // interrupts = <2 b 0>;
@@ -249,7 +241,7 @@
249 // PSC5 in uart mode example 241 // PSC5 in uart mode example
250 //serial@2800 { // PSC5 242 //serial@2800 { // PSC5
251 // device_type = "serial"; 243 // device_type = "serial";
252 // compatible = "mpc5200b-psc-uart","mpc5200-psc-uart"; 244 // compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
253 // cell-index = <4>; 245 // cell-index = <4>;
254 // reg = <2800 100>; 246 // reg = <2800 100>;
255 // interrupts = <2 c 0>; 247 // interrupts = <2 c 0>;
@@ -258,8 +250,7 @@
258 250
259 // PSC6 in spi mode example 251 // PSC6 in spi mode example
260 //spi@2c00 { // PSC6 252 //spi@2c00 { // PSC6
261 // device_type = "spi"; 253 // compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
262 // compatible = "mpc5200b-psc-spi","mpc5200-psc-spi";
263 // cell-index = <5>; 254 // cell-index = <5>;
264 // reg = <2c00 100>; 255 // reg = <2c00 100>;
265 // interrupts = <2 4 0>; 256 // interrupts = <2 4 0>;
@@ -268,9 +259,9 @@
268 259
269 ethernet@3000 { 260 ethernet@3000 {
270 device_type = "network"; 261 device_type = "network";
271 compatible = "mpc5200b-fec","mpc5200-fec"; 262 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
272 reg = <3000 400>; 263 reg = <3000 400>;
273 mac-address = [ 02 03 04 05 06 07 ]; // Bad! 264 local-mac-address = [ 00 00 00 00 00 00 ];
274 interrupts = <2 5 0>; 265 interrupts = <2 5 0>;
275 interrupt-parent = <&mpc5200_pic>; 266 interrupt-parent = <&mpc5200_pic>;
276 phy-handle = <&phy0>; 267 phy-handle = <&phy0>;
@@ -279,8 +270,7 @@
279 mdio@3000 { 270 mdio@3000 {
280 #address-cells = <1>; 271 #address-cells = <1>;
281 #size-cells = <0>; 272 #size-cells = <0>;
282 device_type = "mdio"; 273 compatible = "fsl,mpc5200b-mdio";
283 compatible = "mpc5200b-fec-phy";
284 reg = <3000 400>; // fec range, since we need to setup fec interrupts 274 reg = <3000 400>; // fec range, since we need to setup fec interrupts
285 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. 275 interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co.
286 interrupt-parent = <&mpc5200_pic>; 276 interrupt-parent = <&mpc5200_pic>;
@@ -293,15 +283,16 @@
293 283
294 ata@3a00 { 284 ata@3a00 {
295 device_type = "ata"; 285 device_type = "ata";
296 compatible = "mpc5200b-ata","mpc5200-ata"; 286 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
297 reg = <3a00 100>; 287 reg = <3a00 100>;
298 interrupts = <2 7 0>; 288 interrupts = <2 7 0>;
299 interrupt-parent = <&mpc5200_pic>; 289 interrupt-parent = <&mpc5200_pic>;
300 }; 290 };
301 291
302 i2c@3d00 { 292 i2c@3d00 {
303 device_type = "i2c"; 293 #address-cells = <1>;
304 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 294 #size-cells = <0>;
295 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
305 cell-index = <0>; 296 cell-index = <0>;
306 reg = <3d00 40>; 297 reg = <3d00 40>;
307 interrupts = <2 f 0>; 298 interrupts = <2 f 0>;
@@ -310,8 +301,9 @@
310 }; 301 };
311 302
312 i2c@3d40 { 303 i2c@3d40 {
313 device_type = "i2c"; 304 #address-cells = <1>;
314 compatible = "mpc5200b-i2c","mpc5200-i2c","fsl-i2c"; 305 #size-cells = <0>;
306 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
315 cell-index = <1>; 307 cell-index = <1>;
316 reg = <3d40 40>; 308 reg = <3d40 40>;
317 interrupts = <2 10 0>; 309 interrupts = <2 10 0>;
@@ -319,8 +311,7 @@
319 fsl5200-clocking; 311 fsl5200-clocking;
320 }; 312 };
321 sram@8000 { 313 sram@8000 {
322 device_type = "sram"; 314 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram","sram";
323 compatible = "mpc5200b-sram","mpc5200-sram","sram";
324 reg = <8000 4000>; 315 reg = <8000 4000>;
325 }; 316 };
326 }; 317 };
@@ -330,7 +321,7 @@
330 #size-cells = <2>; 321 #size-cells = <2>;
331 #address-cells = <3>; 322 #address-cells = <3>;
332 device_type = "pci"; 323 device_type = "pci";
333 compatible = "mpc5200b-pci","mpc5200-pci"; 324 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
334 reg = <f0000d00 100>; 325 reg = <f0000d00 100>;
335 interrupt-map-mask = <f800 0 0 7>; 326 interrupt-map-mask = <f800 0 0 7>;
336 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot 327 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
diff --git a/arch/powerpc/boot/dts/makalu.dts b/arch/powerpc/boot/dts/makalu.dts
new file mode 100644
index 000000000000..bdd70e4596ae
--- /dev/null
+++ b/arch/powerpc/boot/dts/makalu.dts
@@ -0,0 +1,347 @@
1/*
2 * Device Tree Source for AMCC Makalu (405EX)
3 *
4 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without
8 * any warranty of any kind, whether express or implied.
9 */
10
11/ {
12 #address-cells = <1>;
13 #size-cells = <1>;
14 model = "amcc,makalu";
15 compatible = "amcc,makalu";
16 dcr-parent = <&/cpus/cpu@0>;
17
18 aliases {
19 ethernet0 = &EMAC0;
20 ethernet1 = &EMAC1;
21 serial0 = &UART0;
22 serial1 = &UART1;
23 };
24
25 cpus {
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 cpu@0 {
30 device_type = "cpu";
31 model = "PowerPC,405EX";
32 reg = <0>;
33 clock-frequency = <0>; /* Filled in by U-Boot */
34 timebase-frequency = <0>; /* Filled in by U-Boot */
35 i-cache-line-size = <20>;
36 d-cache-line-size = <20>;
37 i-cache-size = <4000>; /* 16 kB */
38 d-cache-size = <4000>; /* 16 kB */
39 dcr-controller;
40 dcr-access-method = "native";
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0 0>; /* Filled in by U-Boot */
47 };
48
49 UIC0: interrupt-controller {
50 compatible = "ibm,uic-405ex", "ibm,uic";
51 interrupt-controller;
52 cell-index = <0>;
53 dcr-reg = <0c0 009>;
54 #address-cells = <0>;
55 #size-cells = <0>;
56 #interrupt-cells = <2>;
57 };
58
59 UIC1: interrupt-controller1 {
60 compatible = "ibm,uic-405ex","ibm,uic";
61 interrupt-controller;
62 cell-index = <1>;
63 dcr-reg = <0d0 009>;
64 #address-cells = <0>;
65 #size-cells = <0>;
66 #interrupt-cells = <2>;
67 interrupts = <1e 4 1f 4>; /* cascade */
68 interrupt-parent = <&UIC0>;
69 };
70
71 UIC2: interrupt-controller2 {
72 compatible = "ibm,uic-405ex","ibm,uic";
73 interrupt-controller;
74 cell-index = <2>;
75 dcr-reg = <0e0 009>;
76 #address-cells = <0>;
77 #size-cells = <0>;
78 #interrupt-cells = <2>;
79 interrupts = <1c 4 1d 4>; /* cascade */
80 interrupt-parent = <&UIC0>;
81 };
82
83 plb {
84 compatible = "ibm,plb-405ex", "ibm,plb4";
85 #address-cells = <1>;
86 #size-cells = <1>;
87 ranges;
88 clock-frequency = <0>; /* Filled in by U-Boot */
89
90 SDRAM0: memory-controller {
91 compatible = "ibm,sdram-405ex";
92 dcr-reg = <010 2>;
93 };
94
95 MAL0: mcmal {
96 compatible = "ibm,mcmal-405ex", "ibm,mcmal2";
97 dcr-reg = <180 62>;
98 num-tx-chans = <2>;
99 num-rx-chans = <2>;
100 interrupt-parent = <&MAL0>;
101 interrupts = <0 1 2 3 4>;
102 #interrupt-cells = <1>;
103 #address-cells = <0>;
104 #size-cells = <0>;
105 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
106 /*RXEOB*/ 1 &UIC0 b 4
107 /*SERR*/ 2 &UIC1 0 4
108 /*TXDE*/ 3 &UIC1 1 4
109 /*RXDE*/ 4 &UIC1 2 4>;
110 interrupt-map-mask = <ffffffff>;
111 };
112
113 POB0: opb {
114 compatible = "ibm,opb-405ex", "ibm,opb";
115 #address-cells = <1>;
116 #size-cells = <1>;
117 ranges = <80000000 80000000 10000000
118 ef600000 ef600000 a00000
119 f0000000 f0000000 10000000>;
120 dcr-reg = <0a0 5>;
121 clock-frequency = <0>; /* Filled in by U-Boot */
122
123 EBC0: ebc {
124 compatible = "ibm,ebc-405ex", "ibm,ebc";
125 dcr-reg = <012 2>;
126 #address-cells = <2>;
127 #size-cells = <1>;
128 clock-frequency = <0>; /* Filled in by U-Boot */
129 /* ranges property is supplied by U-Boot */
130 interrupts = <5 1>;
131 interrupt-parent = <&UIC1>;
132
133 nor_flash@0,0 {
134 compatible = "amd,s29gl512n", "cfi-flash";
135 bank-width = <2>;
136 reg = <0 000000 4000000>;
137 #address-cells = <1>;
138 #size-cells = <1>;
139 partition@0 {
140 label = "kernel";
141 reg = <0 200000>;
142 };
143 partition@200000 {
144 label = "root";
145 reg = <200000 200000>;
146 };
147 partition@400000 {
148 label = "user";
149 reg = <400000 3b60000>;
150 };
151 partition@3f60000 {
152 label = "env";
153 reg = <3f60000 40000>;
154 };
155 partition@3fa0000 {
156 label = "u-boot";
157 reg = <3fa0000 60000>;
158 };
159 };
160 };
161
162 UART0: serial@ef600200 {
163 device_type = "serial";
164 compatible = "ns16550";
165 reg = <ef600200 8>;
166 virtual-reg = <ef600200>;
167 clock-frequency = <0>; /* Filled in by U-Boot */
168 current-speed = <0>;
169 interrupt-parent = <&UIC0>;
170 interrupts = <1a 4>;
171 };
172
173 UART1: serial@ef600300 {
174 device_type = "serial";
175 compatible = "ns16550";
176 reg = <ef600300 8>;
177 virtual-reg = <ef600300>;
178 clock-frequency = <0>; /* Filled in by U-Boot */
179 current-speed = <0>;
180 interrupt-parent = <&UIC0>;
181 interrupts = <1 4>;
182 };
183
184 IIC0: i2c@ef600400 {
185 device_type = "i2c";
186 compatible = "ibm,iic-405ex", "ibm,iic";
187 reg = <ef600400 14>;
188 interrupt-parent = <&UIC0>;
189 interrupts = <2 4>;
190 };
191
192 IIC1: i2c@ef600500 {
193 device_type = "i2c";
194 compatible = "ibm,iic-405ex", "ibm,iic";
195 reg = <ef600500 14>;
196 interrupt-parent = <&UIC0>;
197 interrupts = <7 4>;
198 };
199
200
201 RGMII0: emac-rgmii@ef600b00 {
202 device_type = "rgmii-interface";
203 compatible = "ibm,rgmii-405ex", "ibm,rgmii";
204 reg = <ef600b00 104>;
205 has-mdio;
206 };
207
208 EMAC0: ethernet@ef600900 {
209 linux,network-index = <0>;
210 device_type = "network";
211 compatible = "ibm,emac-405ex", "ibm,emac4";
212 interrupt-parent = <&EMAC0>;
213 interrupts = <0 1>;
214 #interrupt-cells = <1>;
215 #address-cells = <0>;
216 #size-cells = <0>;
217 interrupt-map = </*Status*/ 0 &UIC0 18 4
218 /*Wake*/ 1 &UIC1 1d 4>;
219 reg = <ef600900 70>;
220 local-mac-address = [000000000000]; /* Filled in by U-Boot */
221 mal-device = <&MAL0>;
222 mal-tx-channel = <0>;
223 mal-rx-channel = <0>;
224 cell-index = <0>;
225 max-frame-size = <5dc>;
226 rx-fifo-size = <1000>;
227 tx-fifo-size = <800>;
228 phy-mode = "rgmii";
229 phy-map = <0000003f>; /* Start at 6 */
230 rgmii-device = <&RGMII0>;
231 rgmii-channel = <0>;
232 has-inverted-stacr-oc;
233 has-new-stacr-staopc;
234 };
235
236 EMAC1: ethernet@ef600a00 {
237 linux,network-index = <1>;
238 device_type = "network";
239 compatible = "ibm,emac-405ex", "ibm,emac4";
240 interrupt-parent = <&EMAC1>;
241 interrupts = <0 1>;
242 #interrupt-cells = <1>;
243 #address-cells = <0>;
244 #size-cells = <0>;
245 interrupt-map = </*Status*/ 0 &UIC0 19 4
246 /*Wake*/ 1 &UIC1 1f 4>;
247 reg = <ef600a00 70>;
248 local-mac-address = [000000000000]; /* Filled in by U-Boot */
249 mal-device = <&MAL0>;
250 mal-tx-channel = <1>;
251 mal-rx-channel = <1>;
252 cell-index = <1>;
253 max-frame-size = <5dc>;
254 rx-fifo-size = <1000>;
255 tx-fifo-size = <800>;
256 phy-mode = "rgmii";
257 phy-map = <00000000>;
258 rgmii-device = <&RGMII0>;
259 rgmii-channel = <1>;
260 has-inverted-stacr-oc;
261 has-new-stacr-staopc;
262 };
263 };
264
265 PCIE0: pciex@0a0000000 {
266 device_type = "pci";
267 #interrupt-cells = <1>;
268 #size-cells = <2>;
269 #address-cells = <3>;
270 compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
271 primary;
272 port = <0>; /* port number */
273 reg = <a0000000 20000000 /* Config space access */
274 ef000000 00001000>; /* Registers */
275 dcr-reg = <040 020>;
276 sdr-base = <400>;
277
278 /* Outbound ranges, one memory and one IO,
279 * later cannot be changed
280 */
281 ranges = <02000000 0 80000000 90000000 0 08000000
282 01000000 0 00000000 e0000000 0 00010000>;
283
284 /* Inbound 2GB range starting at 0 */
285 dma-ranges = <42000000 0 0 0 0 80000000>;
286
287 /* This drives busses 0x00 to 0x3f */
288 bus-range = <00 3f>;
289
290 /* Legacy interrupts (note the weird polarity, the bridge seems
291 * to invert PCIe legacy interrupts).
292 * We are de-swizzling here because the numbers are actually for
293 * port of the root complex virtual P2P bridge. But I want
294 * to avoid putting a node for it in the tree, so the numbers
295 * below are basically de-swizzled numbers.
296 * The real slot is on idsel 0, so the swizzling is 1:1
297 */
298 interrupt-map-mask = <0000 0 0 7>;
299 interrupt-map = <
300 0000 0 0 1 &UIC2 0 4 /* swizzled int A */
301 0000 0 0 2 &UIC2 1 4 /* swizzled int B */
302 0000 0 0 3 &UIC2 2 4 /* swizzled int C */
303 0000 0 0 4 &UIC2 3 4 /* swizzled int D */>;
304 };
305
306 PCIE1: pciex@0c0000000 {
307 device_type = "pci";
308 #interrupt-cells = <1>;
309 #size-cells = <2>;
310 #address-cells = <3>;
311 compatible = "ibm,plb-pciex-405ex", "ibm,plb-pciex";
312 primary;
313 port = <1>; /* port number */
314 reg = <c0000000 20000000 /* Config space access */
315 ef001000 00001000>; /* Registers */
316 dcr-reg = <060 020>;
317 sdr-base = <440>;
318
319 /* Outbound ranges, one memory and one IO,
320 * later cannot be changed
321 */
322 ranges = <02000000 0 80000000 98000000 0 08000000
323 01000000 0 00000000 e0010000 0 00010000>;
324
325 /* Inbound 2GB range starting at 0 */
326 dma-ranges = <42000000 0 0 0 0 80000000>;
327
328 /* This drives busses 0x40 to 0x7f */
329 bus-range = <40 7f>;
330
331 /* Legacy interrupts (note the weird polarity, the bridge seems
332 * to invert PCIe legacy interrupts).
333 * We are de-swizzling here because the numbers are actually for
334 * port of the root complex virtual P2P bridge. But I want
335 * to avoid putting a node for it in the tree, so the numbers
336 * below are basically de-swizzled numbers.
337 * The real slot is on idsel 0, so the swizzling is 1:1
338 */
339 interrupt-map-mask = <0000 0 0 7>;
340 interrupt-map = <
341 0000 0 0 1 &UIC2 b 4 /* swizzled int A */
342 0000 0 0 2 &UIC2 c 4 /* swizzled int B */
343 0000 0 0 3 &UIC2 d 4 /* swizzled int C */
344 0000 0 0 4 &UIC2 e 4 /* swizzled int D */>;
345 };
346 };
347};
diff --git a/arch/powerpc/boot/dts/motionpro.dts b/arch/powerpc/boot/dts/motionpro.dts
new file mode 100644
index 000000000000..76951ab038ee
--- /dev/null
+++ b/arch/powerpc/boot/dts/motionpro.dts
@@ -0,0 +1,301 @@
1/*
2 * Motion-PRO board Device Tree Source
3 *
4 * Copyright (C) 2007 Semihalf
5 * Marian Balakowicz <m8@semihalf.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/ {
14 model = "promess,motionpro";
15 compatible = "promess,motionpro";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 cpus {
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,5200@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>;
27 i-cache-line-size = <20>;
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 };
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <00000000 04000000>; // 64MB
39 };
40
41 soc5200@f0000000 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 compatible = "fsl,mpc5200b-immr";
45 ranges = <0 f0000000 0000c000>;
46 reg = <f0000000 00000100>;
47 bus-frequency = <0>; // from bootloader
48 system-frequency = <0>; // from bootloader
49
50 cdm@200 {
51 compatible = "fsl,mpc5200b-cdm","fsl,mpc5200-cdm";
52 reg = <200 38>;
53 };
54
55 mpc5200_pic: interrupt-controller@500 {
56 // 5200 interrupts are encoded into two levels;
57 interrupt-controller;
58 #interrupt-cells = <3>;
59 compatible = "fsl,mpc5200b-pic","fsl,mpc5200-pic";
60 reg = <500 80>;
61 };
62
63 timer@600 { // General Purpose Timer
64 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
65 reg = <600 10>;
66 interrupts = <1 9 0>;
67 interrupt-parent = <&mpc5200_pic>;
68 fsl,has-wdt;
69 };
70
71 timer@610 { // General Purpose Timer
72 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
73 reg = <610 10>;
74 interrupts = <1 a 0>;
75 interrupt-parent = <&mpc5200_pic>;
76 };
77
78 timer@620 { // General Purpose Timer
79 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
80 reg = <620 10>;
81 interrupts = <1 b 0>;
82 interrupt-parent = <&mpc5200_pic>;
83 };
84
85 timer@630 { // General Purpose Timer
86 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
87 reg = <630 10>;
88 interrupts = <1 c 0>;
89 interrupt-parent = <&mpc5200_pic>;
90 };
91
92 timer@640 { // General Purpose Timer
93 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
94 reg = <640 10>;
95 interrupts = <1 d 0>;
96 interrupt-parent = <&mpc5200_pic>;
97 };
98
99 timer@650 { // General Purpose Timer
100 compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
101 reg = <650 10>;
102 interrupts = <1 e 0>;
103 interrupt-parent = <&mpc5200_pic>;
104 };
105
106 motionpro-led@660 { // Motion-PRO status LED
107 compatible = "promess,motionpro-led";
108 label = "motionpro-statusled";
109 reg = <660 10>;
110 interrupts = <1 f 0>;
111 interrupt-parent = <&mpc5200_pic>;
112 blink-delay = <64>; // 100 msec
113 };
114
115 motionpro-led@670 { // Motion-PRO ready LED
116 compatible = "promess,motionpro-led";
117 label = "motionpro-readyled";
118 reg = <670 10>;
119 interrupts = <1 10 0>;
120 interrupt-parent = <&mpc5200_pic>;
121 };
122
123 rtc@800 { // Real time clock
124 compatible = "fsl,mpc5200b-rtc","fsl,mpc5200-rtc";
125 reg = <800 100>;
126 interrupts = <1 5 0 1 6 0>;
127 interrupt-parent = <&mpc5200_pic>;
128 };
129
130 mscan@980 {
131 compatible = "fsl,mpc5200b-mscan","fsl,mpc5200-mscan";
132 interrupts = <2 12 0>;
133 interrupt-parent = <&mpc5200_pic>;
134 reg = <980 80>;
135 };
136
137 gpio@b00 {
138 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
139 reg = <b00 40>;
140 interrupts = <1 7 0>;
141 interrupt-parent = <&mpc5200_pic>;
142 };
143
144 gpio@c00 {
145 compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
146 reg = <c00 40>;
147 interrupts = <1 8 0 0 3 0>;
148 interrupt-parent = <&mpc5200_pic>;
149 };
150
151
152 spi@f00 {
153 compatible = "fsl,mpc5200b-spi","fsl,mpc5200-spi";
154 reg = <f00 20>;
155 interrupts = <2 d 0 2 e 0>;
156 interrupt-parent = <&mpc5200_pic>;
157 };
158
159 usb@1000 {
160 compatible = "fsl,mpc5200b-ohci","fsl,mpc5200-ohci","ohci-be";
161 reg = <1000 ff>;
162 interrupts = <2 6 0>;
163 interrupt-parent = <&mpc5200_pic>;
164 };
165
166 dma-controller@1200 {
167 compatible = "fsl,mpc5200b-bestcomm","fsl,mpc5200-bestcomm";
168 reg = <1200 80>;
169 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
170 3 4 0 3 5 0 3 6 0 3 7 0
171 3 8 0 3 9 0 3 a 0 3 b 0
172 3 c 0 3 d 0 3 e 0 3 f 0>;
173 interrupt-parent = <&mpc5200_pic>;
174 };
175
176 xlb@1f00 {
177 compatible = "fsl,mpc5200b-xlb","fsl,mpc5200-xlb";
178 reg = <1f00 100>;
179 };
180
181 serial@2000 { // PSC1
182 device_type = "serial";
183 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
184 port-number = <0>; // Logical port assignment
185 reg = <2000 100>;
186 interrupts = <2 1 0>;
187 interrupt-parent = <&mpc5200_pic>;
188 };
189
190 // PSC2 in spi master mode
191 spi@2200 { // PSC2
192 compatible = "fsl,mpc5200b-psc-spi","fsl,mpc5200-psc-spi";
193 cell-index = <1>;
194 reg = <2200 100>;
195 interrupts = <2 2 0>;
196 interrupt-parent = <&mpc5200_pic>;
197 };
198
199 // PSC5 in uart mode
200 serial@2800 { // PSC5
201 device_type = "serial";
202 compatible = "fsl,mpc5200b-psc-uart","fsl,mpc5200-psc-uart";
203 port-number = <4>; // Logical port assignment
204 reg = <2800 100>;
205 interrupts = <2 c 0>;
206 interrupt-parent = <&mpc5200_pic>;
207 };
208
209 ethernet@3000 {
210 device_type = "network";
211 compatible = "fsl,mpc5200b-fec","fsl,mpc5200-fec";
212 reg = <3000 800>;
213 local-mac-address = [ 00 00 00 00 00 00 ];
214 interrupts = <2 5 0>;
215 interrupt-parent = <&mpc5200_pic>;
216 };
217
218 ata@3a00 {
219 compatible = "fsl,mpc5200b-ata","fsl,mpc5200-ata";
220 reg = <3a00 100>;
221 interrupts = <2 7 0>;
222 interrupt-parent = <&mpc5200_pic>;
223 };
224
225 i2c@3d40 {
226 compatible = "fsl,mpc5200b-i2c","fsl,mpc5200-i2c","fsl-i2c";
227 reg = <3d40 40>;
228 interrupts = <2 10 0>;
229 interrupt-parent = <&mpc5200_pic>;
230 fsl5200-clocking;
231 };
232
233 sram@8000 {
234 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
235 reg = <8000 4000>;
236 };
237 };
238
239 lpb {
240 compatible = "fsl,lpb";
241 #address-cells = <2>;
242 #size-cells = <1>;
243 ranges = <1 0 50000000 00010000
244 2 0 50010000 00010000
245 3 0 50020000 00010000>;
246
247 // 8-bit DualPort SRAM on LocalPlus Bus CS1
248 kollmorgen@1,0 {
249 compatible = "promess,motionpro-kollmorgen";
250 reg = <1 0 10000>;
251 interrupts = <1 1 0>;
252 interrupt-parent = <&mpc5200_pic>;
253 };
254
255 // 8-bit board CPLD on LocalPlus Bus CS2
256 cpld@2,0 {
257 compatible = "promess,motionpro-cpld";
258 reg = <2 0 10000>;
259 };
260
261 // 8-bit custom Anybus Module on LocalPlus Bus CS3
262 anybus@3,0 {
263 compatible = "promess,motionpro-anybus";
264 reg = <3 0 10000>;
265 };
266 pro_module_general@3,0 {
267 compatible = "promess,pro_module_general";
268 reg = <3 0 3>;
269 };
270 pro_module_dio@3,800 {
271 compatible = "promess,pro_module_dio";
272 reg = <3 800 2>;
273 };
274 };
275
276 pci@f0000d00 {
277 #interrupt-cells = <1>;
278 #size-cells = <2>;
279 #address-cells = <3>;
280 device_type = "pci";
281 compatible = "fsl,mpc5200b-pci","fsl,mpc5200-pci";
282 reg = <f0000d00 100>;
283 interrupt-map-mask = <f800 0 0 7>;
284 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3 // 1st slot
285 c000 0 0 2 &mpc5200_pic 1 1 3
286 c000 0 0 3 &mpc5200_pic 1 2 3
287 c000 0 0 4 &mpc5200_pic 1 3 3
288
289 c800 0 0 1 &mpc5200_pic 1 1 3 // 2nd slot
290 c800 0 0 2 &mpc5200_pic 1 2 3
291 c800 0 0 3 &mpc5200_pic 1 3 3
292 c800 0 0 4 &mpc5200_pic 0 0 3>;
293 clock-frequency = <0>; // From boot loader
294 interrupts = <2 8 0 2 9 0 2 a 0>;
295 interrupt-parent = <&mpc5200_pic>;
296 bus-range = <0 0>;
297 ranges = <42000000 0 80000000 80000000 0 20000000
298 02000000 0 a0000000 a0000000 0 10000000
299 01000000 0 00000000 b0000000 0 01000000>;
300 };
301};
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 9e7eba973262..2d6653fe72ff 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -9,23 +9,33 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
13
12/ { 14/ {
13 model = "MPC8313ERDB"; 15 model = "MPC8313ERDB";
14 compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB"; 16 compatible = "MPC8313ERDB", "MPC831xRDB", "MPC83xxRDB";
15 #address-cells = <1>; 17 #address-cells = <1>;
16 #size-cells = <1>; 18 #size-cells = <1>;
17 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
18 cpus { 28 cpus {
19 #address-cells = <1>; 29 #address-cells = <1>;
20 #size-cells = <0>; 30 #size-cells = <0>;
21 31
22 PowerPC,8313@0 { 32 PowerPC,8313@0 {
23 device_type = "cpu"; 33 device_type = "cpu";
24 reg = <0>; 34 reg = <0x0>;
25 d-cache-line-size = <20>; // 32 bytes 35 d-cache-line-size = <32>;
26 i-cache-line-size = <20>; // 32 bytes 36 i-cache-line-size = <32>;
27 d-cache-size = <4000>; // L1, 16K 37 d-cache-size = <16384>;
28 i-cache-size = <4000>; // L1, 16K 38 i-cache-size = <16384>;
29 timebase-frequency = <0>; // from bootloader 39 timebase-frequency = <0>; // from bootloader
30 bus-frequency = <0>; // from bootloader 40 bus-frequency = <0>; // from bootloader
31 clock-frequency = <0>; // from bootloader 41 clock-frequency = <0>; // from bootloader
@@ -34,134 +44,188 @@
34 44
35 memory { 45 memory {
36 device_type = "memory"; 46 device_type = "memory";
37 reg = <00000000 08000000>; // 128MB at 0 47 reg = <0x00000000 0x08000000>; // 128MB at 0
48 };
49
50 localbus@e0005000 {
51 #address-cells = <2>;
52 #size-cells = <1>;
53 compatible = "fsl,mpc8313-elbc", "fsl,elbc", "simple-bus";
54 reg = <0xe0005000 0x1000>;
55 interrupts = <77 0x8>;
56 interrupt-parent = <&ipic>;
57
58 // CS0 and CS1 are swapped when
59 // booting from nand, but the
60 // addresses are the same.
61 ranges = <0x0 0x0 0xfe000000 0x00800000
62 0x1 0x0 0xe2800000 0x00008000
63 0x2 0x0 0xf0000000 0x00020000
64 0x3 0x0 0xfa000000 0x00008000>;
65
66 flash@0,0 {
67 #address-cells = <1>;
68 #size-cells = <1>;
69 compatible = "cfi-flash";
70 reg = <0x0 0x0 0x800000>;
71 bank-width = <2>;
72 device-width = <1>;
73 };
74
75 nand@1,0 {
76 #address-cells = <1>;
77 #size-cells = <1>;
78 compatible = "fsl,mpc8313-fcm-nand",
79 "fsl,elbc-fcm-nand";
80 reg = <0x1 0x0 0x2000>;
81
82 u-boot@0 {
83 reg = <0x0 0x100000>;
84 read-only;
85 };
86
87 kernel@100000 {
88 reg = <0x100000 0x300000>;
89 };
90
91 fs@400000 {
92 reg = <0x400000 0x1c00000>;
93 };
94 };
38 }; 95 };
39 96
40 soc8313@e0000000 { 97 soc8313@e0000000 {
41 #address-cells = <1>; 98 #address-cells = <1>;
42 #size-cells = <1>; 99 #size-cells = <1>;
43 device_type = "soc"; 100 device_type = "soc";
44 ranges = <0 e0000000 00100000>; 101 compatible = "simple-bus";
45 reg = <e0000000 00000200>; 102 ranges = <0x0 0xe0000000 0x00100000>;
103 reg = <0xe0000000 0x00000200>;
46 bus-frequency = <0>; 104 bus-frequency = <0>;
47 105
48 wdt@200 { 106 wdt@200 {
49 device_type = "watchdog"; 107 device_type = "watchdog";
50 compatible = "mpc83xx_wdt"; 108 compatible = "mpc83xx_wdt";
51 reg = <200 100>; 109 reg = <0x200 0x100>;
52 }; 110 };
53 111
54 i2c@3000 { 112 i2c@3000 {
55 device_type = "i2c"; 113 #address-cells = <1>;
114 #size-cells = <0>;
115 cell-index = <0>;
56 compatible = "fsl-i2c"; 116 compatible = "fsl-i2c";
57 reg = <3000 100>; 117 reg = <0x3000 0x100>;
58 interrupts = <e 8>; 118 interrupts = <14 0x8>;
59 interrupt-parent = < &ipic >; 119 interrupt-parent = <&ipic>;
60 dfsrr; 120 dfsrr;
61 }; 121 };
62 122
63 i2c@3100 { 123 i2c@3100 {
64 device_type = "i2c"; 124 #address-cells = <1>;
125 #size-cells = <0>;
126 cell-index = <1>;
65 compatible = "fsl-i2c"; 127 compatible = "fsl-i2c";
66 reg = <3100 100>; 128 reg = <0x3100 0x100>;
67 interrupts = <f 8>; 129 interrupts = <15 0x8>;
68 interrupt-parent = < &ipic >; 130 interrupt-parent = <&ipic>;
69 dfsrr; 131 dfsrr;
70 }; 132 };
71 133
72 spi@7000 { 134 spi@7000 {
73 device_type = "spi"; 135 cell-index = <0>;
74 compatible = "fsl_spi"; 136 compatible = "fsl,spi";
75 reg = <7000 1000>; 137 reg = <0x7000 0x1000>;
76 interrupts = <10 8>; 138 interrupts = <16 0x8>;
77 interrupt-parent = < &ipic >; 139 interrupt-parent = <&ipic>;
78 mode = "cpu"; 140 mode = "cpu";
79 }; 141 };
80 142
81 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ 143 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
82 usb@23000 { 144 usb@23000 {
83 device_type = "usb";
84 compatible = "fsl-usb2-dr"; 145 compatible = "fsl-usb2-dr";
85 reg = <23000 1000>; 146 reg = <0x23000 0x1000>;
86 #address-cells = <1>; 147 #address-cells = <1>;
87 #size-cells = <0>; 148 #size-cells = <0>;
88 interrupt-parent = < &ipic >; 149 interrupt-parent = <&ipic>;
89 interrupts = <26 8>; 150 interrupts = <38 0x8>;
90 phy_type = "utmi_wide"; 151 phy_type = "utmi_wide";
91 }; 152 };
92 153
93 mdio@24520 { 154 mdio@24520 {
94 device_type = "mdio";
95 compatible = "gianfar";
96 reg = <24520 20>;
97 #address-cells = <1>; 155 #address-cells = <1>;
98 #size-cells = <0>; 156 #size-cells = <0>;
157 compatible = "fsl,gianfar-mdio";
158 reg = <0x24520 0x20>;
99 phy1: ethernet-phy@1 { 159 phy1: ethernet-phy@1 {
100 interrupt-parent = < &ipic >; 160 interrupt-parent = <&ipic>;
101 interrupts = <13 8>; 161 interrupts = <19 0x8>;
102 reg = <1>; 162 reg = <0x1>;
103 device_type = "ethernet-phy"; 163 device_type = "ethernet-phy";
104 }; 164 };
105 phy4: ethernet-phy@4 { 165 phy4: ethernet-phy@4 {
106 interrupt-parent = < &ipic >; 166 interrupt-parent = <&ipic>;
107 interrupts = <14 8>; 167 interrupts = <20 0x8>;
108 reg = <4>; 168 reg = <0x4>;
109 device_type = "ethernet-phy"; 169 device_type = "ethernet-phy";
110 }; 170 };
111 }; 171 };
112 172
113 ethernet@24000 { 173 enet0: ethernet@24000 {
174 cell-index = <0>;
114 device_type = "network"; 175 device_type = "network";
115 model = "eTSEC"; 176 model = "eTSEC";
116 compatible = "gianfar"; 177 compatible = "gianfar";
117 reg = <24000 1000>; 178 reg = <0x24000 0x1000>;
118 local-mac-address = [ 00 00 00 00 00 00 ]; 179 local-mac-address = [ 00 00 00 00 00 00 ];
119 interrupts = <25 8 24 8 23 8>; 180 interrupts = <37 0x8 36 0x8 35 0x8>;
120 interrupt-parent = < &ipic >; 181 interrupt-parent = <&ipic>;
121 phy-handle = < &phy1 >; 182 phy-handle = < &phy1 >;
122 }; 183 };
123 184
124 ethernet@25000 { 185 enet1: ethernet@25000 {
186 cell-index = <1>;
125 device_type = "network"; 187 device_type = "network";
126 model = "eTSEC"; 188 model = "eTSEC";
127 compatible = "gianfar"; 189 compatible = "gianfar";
128 reg = <25000 1000>; 190 reg = <0x25000 0x1000>;
129 local-mac-address = [ 00 00 00 00 00 00 ]; 191 local-mac-address = [ 00 00 00 00 00 00 ];
130 interrupts = <22 8 21 8 20 8>; 192 interrupts = <34 0x8 33 0x8 32 0x8>;
131 interrupt-parent = < &ipic >; 193 interrupt-parent = <&ipic>;
132 phy-handle = < &phy4 >; 194 phy-handle = < &phy4 >;
133 }; 195 };
134 196
135 serial@4500 { 197 serial0: serial@4500 {
198 cell-index = <0>;
136 device_type = "serial"; 199 device_type = "serial";
137 compatible = "ns16550"; 200 compatible = "ns16550";
138 reg = <4500 100>; 201 reg = <0x4500 0x100>;
139 clock-frequency = <0>; 202 clock-frequency = <0>;
140 interrupts = <9 8>; 203 interrupts = <9 0x8>;
141 interrupt-parent = < &ipic >; 204 interrupt-parent = <&ipic>;
142 }; 205 };
143 206
144 serial@4600 { 207 serial1: serial@4600 {
208 cell-index = <1>;
145 device_type = "serial"; 209 device_type = "serial";
146 compatible = "ns16550"; 210 compatible = "ns16550";
147 reg = <4600 100>; 211 reg = <0x4600 0x100>;
148 clock-frequency = <0>; 212 clock-frequency = <0>;
149 interrupts = <a 8>; 213 interrupts = <10 0x8>;
150 interrupt-parent = < &ipic >; 214 interrupt-parent = <&ipic>;
151 }; 215 };
152 216
153 crypto@30000 { 217 crypto@30000 {
154 device_type = "crypto"; 218 device_type = "crypto";
155 model = "SEC2"; 219 model = "SEC2";
156 compatible = "talitos"; 220 compatible = "talitos";
157 reg = <30000 7000>; 221 reg = <0x30000 0x7000>;
158 interrupts = <b 8>; 222 interrupts = <11 0x8>;
159 interrupt-parent = < &ipic >; 223 interrupt-parent = <&ipic>;
160 /* Rev. 2.2 */ 224 /* Rev. 2.2 */
161 num-channels = <1>; 225 num-channels = <1>;
162 channel-fifo-len = <18>; 226 channel-fifo-len = <24>;
163 exec-units-mask = <0000004c>; 227 exec-units-mask = <0x0000004c>;
164 descriptor-types-mask = <0122003f>; 228 descriptor-types-mask = <0x0122003f>;
165 }; 229 };
166 230
167 /* IPIC 231 /* IPIC
@@ -174,37 +238,38 @@
174 interrupt-controller; 238 interrupt-controller;
175 #address-cells = <0>; 239 #address-cells = <0>;
176 #interrupt-cells = <2>; 240 #interrupt-cells = <2>;
177 reg = <700 100>; 241 reg = <0x700 0x100>;
178 device_type = "ipic"; 242 device_type = "ipic";
179 }; 243 };
180 }; 244 };
181 245
182 pci@e0008500 { 246 pci0: pci@e0008500 {
183 interrupt-map-mask = <f800 0 0 7>; 247 cell-index = <1>;
248 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
184 interrupt-map = < 249 interrupt-map = <
185 250
186 /* IDSEL 0x0E -mini PCI */ 251 /* IDSEL 0x0E -mini PCI */
187 7000 0 0 1 &ipic 12 8 252 0x7000 0x0 0x0 0x1 &ipic 18 0x8
188 7000 0 0 2 &ipic 12 8 253 0x7000 0x0 0x0 0x2 &ipic 18 0x8
189 7000 0 0 3 &ipic 12 8 254 0x7000 0x0 0x0 0x3 &ipic 18 0x8
190 7000 0 0 4 &ipic 12 8 255 0x7000 0x0 0x0 0x4 &ipic 18 0x8
191 256
192 /* IDSEL 0x0F - PCI slot */ 257 /* IDSEL 0x0F - PCI slot */
193 7800 0 0 1 &ipic 11 8 258 0x7800 0x0 0x0 0x1 &ipic 17 0x8
194 7800 0 0 2 &ipic 12 8 259 0x7800 0x0 0x0 0x2 &ipic 18 0x8
195 7800 0 0 3 &ipic 11 8 260 0x7800 0x0 0x0 0x3 &ipic 17 0x8
196 7800 0 0 4 &ipic 12 8>; 261 0x7800 0x0 0x0 0x4 &ipic 18 0x8>;
197 interrupt-parent = < &ipic >; 262 interrupt-parent = <&ipic>;
198 interrupts = <42 8>; 263 interrupts = <66 0x8>;
199 bus-range = <0 0>; 264 bus-range = <0x0 0x0>;
200 ranges = <02000000 0 90000000 90000000 0 10000000 265 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
201 42000000 0 80000000 80000000 0 10000000 266 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
202 01000000 0 00000000 e2000000 0 00100000>; 267 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
203 clock-frequency = <3f940aa>; 268 clock-frequency = <66666666>;
204 #interrupt-cells = <1>; 269 #interrupt-cells = <1>;
205 #size-cells = <2>; 270 #size-cells = <2>;
206 #address-cells = <3>; 271 #address-cells = <3>;
207 reg = <e0008500 100>; 272 reg = <0xe0008500 0x100>;
208 compatible = "fsl,mpc8349-pci"; 273 compatible = "fsl,mpc8349-pci";
209 device_type = "pci"; 274 device_type = "pci";
210 }; 275 };
diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts
new file mode 100644
index 000000000000..b582032ba3d6
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8315erdb.dts
@@ -0,0 +1,287 @@
1/*
2 * MPC8315E RDB 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/dts-v1/;
13
14/ {
15 compatible = "fsl,mpc8315erdb";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 PowerPC,8315@0 {
32 device_type = "cpu";
33 reg = <0x0>;
34 d-cache-line-size = <32>;
35 i-cache-line-size = <32>;
36 d-cache-size = <16384>;
37 i-cache-size = <16384>;
38 timebase-frequency = <0>; // from bootloader
39 bus-frequency = <0>; // from bootloader
40 clock-frequency = <0>; // from bootloader
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x08000000>; // 128MB at 0
47 };
48
49 localbus@e0005000 {
50 #address-cells = <2>;
51 #size-cells = <1>;
52 compatible = "fsl,mpc8315-elbc", "fsl,elbc", "simple-bus";
53 reg = <0xe0005000 0x1000>;
54 interrupts = <77 0x8>;
55 interrupt-parent = <&ipic>;
56
57 // CS0 and CS1 are swapped when
58 // booting from nand, but the
59 // addresses are the same.
60 ranges = <0x0 0x0 0xfe000000 0x00800000
61 0x1 0x0 0xe0600000 0x00002000
62 0x2 0x0 0xf0000000 0x00020000
63 0x3 0x0 0xfa000000 0x00008000>;
64
65 flash@0,0 {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "cfi-flash";
69 reg = <0x0 0x0 0x800000>;
70 bank-width = <2>;
71 device-width = <1>;
72 };
73
74 nand@1,0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "fsl,mpc8315-fcm-nand",
78 "fsl,elbc-fcm-nand";
79 reg = <0x1 0x0 0x2000>;
80
81 u-boot@0 {
82 reg = <0x0 0x100000>;
83 read-only;
84 };
85
86 kernel@100000 {
87 reg = <0x100000 0x300000>;
88 };
89 fs@400000 {
90 reg = <0x400000 0x1c00000>;
91 };
92 };
93 };
94
95 immr@e0000000 {
96 #address-cells = <1>;
97 #size-cells = <1>;
98 device_type = "soc";
99 compatible = "simple-bus";
100 ranges = <0 0xe0000000 0x00100000>;
101 reg = <0xe0000000 0x00000200>;
102 bus-frequency = <0>;
103
104 wdt@200 {
105 device_type = "watchdog";
106 compatible = "mpc83xx_wdt";
107 reg = <0x200 0x100>;
108 };
109
110 i2c@3000 {
111 #address-cells = <1>;
112 #size-cells = <0>;
113 cell-index = <0>;
114 compatible = "fsl-i2c";
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>;
118 dfsrr;
119 rtc@68 {
120 device_type = "rtc";
121 compatible = "dallas,ds1339";
122 reg = <0x68>;
123 };
124 };
125
126 spi@7000 {
127 cell-index = <0>;
128 compatible = "fsl,spi";
129 reg = <0x7000 0x1000>;
130 interrupts = <16 0x8>;
131 interrupt-parent = <&ipic>;
132 mode = "cpu";
133 };
134
135 usb@23000 {
136 compatible = "fsl-usb2-dr";
137 reg = <0x23000 0x1000>;
138 #address-cells = <1>;
139 #size-cells = <0>;
140 interrupt-parent = <&ipic>;
141 interrupts = <38 0x8>;
142 phy_type = "utmi";
143 };
144
145 mdio@24520 {
146 #address-cells = <1>;
147 #size-cells = <0>;
148 compatible = "fsl,gianfar-mdio";
149 reg = <0x24520 0x20>;
150 phy0: ethernet-phy@0 {
151 interrupt-parent = <&ipic>;
152 interrupts = <20 0x8>;
153 reg = <0x0>;
154 device_type = "ethernet-phy";
155 };
156 phy1: ethernet-phy@1 {
157 interrupt-parent = <&ipic>;
158 interrupts = <19 0x8>;
159 reg = <0x1>;
160 device_type = "ethernet-phy";
161 };
162 };
163
164 enet0: ethernet@24000 {
165 cell-index = <0>;
166 device_type = "network";
167 model = "eTSEC";
168 compatible = "gianfar";
169 reg = <0x24000 0x1000>;
170 local-mac-address = [ 00 00 00 00 00 00 ];
171 interrupts = <32 0x8 33 0x8 34 0x8>;
172 interrupt-parent = <&ipic>;
173 phy-handle = < &phy0 >;
174 };
175
176 enet1: ethernet@25000 {
177 cell-index = <1>;
178 device_type = "network";
179 model = "eTSEC";
180 compatible = "gianfar";
181 reg = <0x25000 0x1000>;
182 local-mac-address = [ 00 00 00 00 00 00 ];
183 interrupts = <35 0x8 36 0x8 37 0x8>;
184 interrupt-parent = <&ipic>;
185 phy-handle = < &phy1 >;
186 };
187
188 serial0: serial@4500 {
189 cell-index = <0>;
190 device_type = "serial";
191 compatible = "ns16550";
192 reg = <0x4500 0x100>;
193 clock-frequency = <0>;
194 interrupts = <9 0x8>;
195 interrupt-parent = <&ipic>;
196 };
197
198 serial1: serial@4600 {
199 cell-index = <1>;
200 device_type = "serial";
201 compatible = "ns16550";
202 reg = <0x4600 0x100>;
203 clock-frequency = <0>;
204 interrupts = <10 0x8>;
205 interrupt-parent = <&ipic>;
206 };
207
208 crypto@30000 {
209 model = "SEC3";
210 device_type = "crypto";
211 compatible = "talitos";
212 reg = <0x30000 0x10000>;
213 interrupts = <11 0x8>;
214 interrupt-parent = <&ipic>;
215 /* Rev. 3.0 geometry */
216 num-channels = <4>;
217 channel-fifo-len = <24>;
218 exec-units-mask = <0x000001fe>;
219 descriptor-types-mask = <0x03ab0ebf>;
220 };
221
222 sata@18000 {
223 compatible = "fsl,mpc8315-sata", "fsl,pq-sata";
224 reg = <0x18000 0x1000>;
225 cell-index = <1>;
226 interrupts = <44 0x8>;
227 interrupt-parent = <&ipic>;
228 };
229
230 sata@19000 {
231 compatible = "fsl,mpc8315-sata", "fsl,pq-sata";
232 reg = <0x19000 0x1000>;
233 cell-index = <2>;
234 interrupts = <45 0x8>;
235 interrupt-parent = <&ipic>;
236 };
237
238 /* IPIC
239 * interrupts cell = <intr #, sense>
240 * sense values match linux IORESOURCE_IRQ_* defines:
241 * sense == 8: Level, low assertion
242 * sense == 2: Edge, high-to-low change
243 */
244 ipic: interrupt-controller@700 {
245 interrupt-controller;
246 #address-cells = <0>;
247 #interrupt-cells = <2>;
248 reg = <0x700 0x100>;
249 device_type = "ipic";
250 };
251 };
252
253 pci0: pci@e0008500 {
254 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
255 interrupt-map = <
256 /* IDSEL 0x0E -mini PCI */
257 0x7000 0x0 0x0 0x1 &ipic 18 0x8
258 0x7000 0x0 0x0 0x2 &ipic 18 0x8
259 0x7000 0x0 0x0 0x3 &ipic 18 0x8
260 0x7000 0x0 0x0 0x4 &ipic 18 0x8
261
262 /* IDSEL 0x0F -mini PCI */
263 0x7800 0x0 0x0 0x1 &ipic 17 0x8
264 0x7800 0x0 0x0 0x2 &ipic 17 0x8
265 0x7800 0x0 0x0 0x3 &ipic 17 0x8
266 0x7800 0x0 0x0 0x4 &ipic 17 0x8
267
268 /* IDSEL 0x10 - PCI slot */
269 0x8000 0x0 0x0 0x1 &ipic 48 0x8
270 0x8000 0x0 0x0 0x2 &ipic 17 0x8
271 0x8000 0x0 0x0 0x3 &ipic 48 0x8
272 0x8000 0x0 0x0 0x4 &ipic 17 0x8>;
273 interrupt-parent = <&ipic>;
274 interrupts = <66 0x8>;
275 bus-range = <0x0 0x0>;
276 ranges = <0x02000000 0 0x90000000 0x90000000 0 0x10000000
277 0x42000000 0 0x80000000 0x80000000 0 0x10000000
278 0x01000000 0 0x00000000 0xe0300000 0 0x00100000>;
279 clock-frequency = <66666666>;
280 #interrupt-cells = <1>;
281 #size-cells = <2>;
282 #address-cells = <3>;
283 reg = <0xe0008500 0x100>;
284 compatible = "fsl,mpc8349-pci";
285 device_type = "pci";
286 };
287};
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index c64f3037a13b..9bb408371bcd 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -7,25 +7,47 @@
7 * under the terms of the GNU General Public License as published by the 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 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
10
11 * To enable external serial I/O on a Freescale MPC 8323 SYS/MDS board, do
12 * this:
13 *
14 * 1) On chip U61, lift (disconnect) pins 21 (TXD) and 22 (RXD) from the board.
15 * 2) Solder a wire from U61-21 to P19A-23. P19 is a grid of pins on the board
16 * next to the serial ports.
17 * 3) Solder a wire from U61-22 to P19K-22.
18 *
19 * Note that there's a typo in the schematic. The board labels the last column
20 * of pins "P19K", but in the schematic, that column is called "P19J". So if
21 * you're going by the schematic, the pin is called "P19J-K22".
10 */ 22 */
11 23
24/dts-v1/;
25
12/ { 26/ {
13 model = "MPC8323EMDS"; 27 model = "MPC8323EMDS";
14 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS"; 28 compatible = "MPC8323EMDS", "MPC832xMDS", "MPC83xxMDS";
15 #address-cells = <1>; 29 #address-cells = <1>;
16 #size-cells = <1>; 30 #size-cells = <1>;
17 31
32 aliases {
33 ethernet0 = &enet0;
34 ethernet1 = &enet1;
35 serial0 = &serial0;
36 serial1 = &serial1;
37 pci0 = &pci0;
38 };
39
18 cpus { 40 cpus {
19 #address-cells = <1>; 41 #address-cells = <1>;
20 #size-cells = <0>; 42 #size-cells = <0>;
21 43
22 PowerPC,8323@0 { 44 PowerPC,8323@0 {
23 device_type = "cpu"; 45 device_type = "cpu";
24 reg = <0>; 46 reg = <0x0>;
25 d-cache-line-size = <20>; // 32 bytes 47 d-cache-line-size = <32>; // 32 bytes
26 i-cache-line-size = <20>; // 32 bytes 48 i-cache-line-size = <32>; // 32 bytes
27 d-cache-size = <4000>; // L1, 16K 49 d-cache-size = <16384>; // L1, 16K
28 i-cache-size = <4000>; // L1, 16K 50 i-cache-size = <16384>; // L1, 16K
29 timebase-frequency = <0>; 51 timebase-frequency = <0>;
30 bus-frequency = <0>; 52 bus-frequency = <0>;
31 clock-frequency = <0>; 53 clock-frequency = <0>;
@@ -34,86 +56,88 @@
34 56
35 memory { 57 memory {
36 device_type = "memory"; 58 device_type = "memory";
37 reg = <00000000 08000000>; 59 reg = <0x00000000 0x08000000>;
38 }; 60 };
39 61
40 bcsr@f8000000 { 62 bcsr@f8000000 {
41 device_type = "board-control"; 63 device_type = "board-control";
42 reg = <f8000000 8000>; 64 reg = <0xf8000000 0x8000>;
43 }; 65 };
44 66
45 soc8323@e0000000 { 67 soc8323@e0000000 {
46 #address-cells = <1>; 68 #address-cells = <1>;
47 #size-cells = <1>; 69 #size-cells = <1>;
48 device_type = "soc"; 70 device_type = "soc";
49 ranges = <0 e0000000 00100000>; 71 ranges = <0x0 0xe0000000 0x00100000>;
50 reg = <e0000000 00000200>; 72 reg = <0xe0000000 0x00000200>;
51 bus-frequency = <7DE2900>; 73 bus-frequency = <132000000>;
52 74
53 wdt@200 { 75 wdt@200 {
54 device_type = "watchdog"; 76 device_type = "watchdog";
55 compatible = "mpc83xx_wdt"; 77 compatible = "mpc83xx_wdt";
56 reg = <200 100>; 78 reg = <0x200 0x100>;
57 }; 79 };
58 80
59 i2c@3000 { 81 i2c@3000 {
60 #address-cells = <1>; 82 #address-cells = <1>;
61 #size-cells = <0>; 83 #size-cells = <0>;
62 device_type = "i2c"; 84 cell-index = <0>;
63 compatible = "fsl-i2c"; 85 compatible = "fsl-i2c";
64 reg = <3000 100>; 86 reg = <0x3000 0x100>;
65 interrupts = <e 8>; 87 interrupts = <14 0x8>;
66 interrupt-parent = < &ipic >; 88 interrupt-parent = <&ipic>;
67 dfsrr; 89 dfsrr;
68 90
69 rtc@68 { 91 rtc@68 {
70 compatible = "dallas,ds1374"; 92 compatible = "dallas,ds1374";
71 reg = <68>; 93 reg = <0x68>;
72 }; 94 };
73 }; 95 };
74 96
75 serial@4500 { 97 serial0: serial@4500 {
98 cell-index = <0>;
76 device_type = "serial"; 99 device_type = "serial";
77 compatible = "ns16550"; 100 compatible = "ns16550";
78 reg = <4500 100>; 101 reg = <0x4500 0x100>;
79 clock-frequency = <0>; 102 clock-frequency = <0>;
80 interrupts = <9 8>; 103 interrupts = <9 0x8>;
81 interrupt-parent = < &ipic >; 104 interrupt-parent = <&ipic>;
82 }; 105 };
83 106
84 serial@4600 { 107 serial1: serial@4600 {
108 cell-index = <1>;
85 device_type = "serial"; 109 device_type = "serial";
86 compatible = "ns16550"; 110 compatible = "ns16550";
87 reg = <4600 100>; 111 reg = <0x4600 0x100>;
88 clock-frequency = <0>; 112 clock-frequency = <0>;
89 interrupts = <a 8>; 113 interrupts = <10 0x8>;
90 interrupt-parent = < &ipic >; 114 interrupt-parent = <&ipic>;
91 }; 115 };
92 116
93 crypto@30000 { 117 crypto@30000 {
94 device_type = "crypto"; 118 device_type = "crypto";
95 model = "SEC2"; 119 model = "SEC2";
96 compatible = "talitos"; 120 compatible = "talitos";
97 reg = <30000 7000>; 121 reg = <0x30000 0x7000>;
98 interrupts = <b 8>; 122 interrupts = <11 0x8>;
99 interrupt-parent = < &ipic >; 123 interrupt-parent = <&ipic>;
100 /* Rev. 2.2 */ 124 /* Rev. 2.2 */
101 num-channels = <1>; 125 num-channels = <1>;
102 channel-fifo-len = <18>; 126 channel-fifo-len = <24>;
103 exec-units-mask = <0000004c>; 127 exec-units-mask = <0x0000004c>;
104 descriptor-types-mask = <0122003f>; 128 descriptor-types-mask = <0x0122003f>;
105 }; 129 };
106 130
107 ipic: pic@700 { 131 ipic: pic@700 {
108 interrupt-controller; 132 interrupt-controller;
109 #address-cells = <0>; 133 #address-cells = <0>;
110 #interrupt-cells = <2>; 134 #interrupt-cells = <2>;
111 reg = <700 100>; 135 reg = <0x700 0x100>;
112 device_type = "ipic"; 136 device_type = "ipic";
113 }; 137 };
114 138
115 par_io@1400 { 139 par_io@1400 {
116 reg = <1400 100>; 140 reg = <0x1400 0x100>;
117 device_type = "par_io"; 141 device_type = "par_io";
118 num-ports = <7>; 142 num-ports = <7>;
119 143
@@ -122,8 +146,8 @@
122 /* port pin dir open_drain assignment has_irq */ 146 /* port pin dir open_drain assignment has_irq */
123 3 4 3 0 2 0 /* MDIO */ 147 3 4 3 0 2 0 /* MDIO */
124 3 5 1 0 2 0 /* MDC */ 148 3 5 1 0 2 0 /* MDC */
125 0 d 2 0 1 0 /* RX_CLK (CLK9) */ 149 0 13 2 0 1 0 /* RX_CLK (CLK9) */
126 3 18 2 0 1 0 /* TX_CLK (CLK10) */ 150 3 24 2 0 1 0 /* TX_CLK (CLK10) */
127 1 0 1 0 1 0 /* TxD0 */ 151 1 0 1 0 1 0 /* TxD0 */
128 1 1 1 0 1 0 /* TxD1 */ 152 1 1 1 0 1 0 /* TxD1 */
129 1 2 1 0 1 0 /* TxD2 */ 153 1 2 1 0 1 0 /* TxD2 */
@@ -134,31 +158,48 @@
134 1 7 2 0 1 0 /* RxD3 */ 158 1 7 2 0 1 0 /* RxD3 */
135 1 8 2 0 1 0 /* RX_ER */ 159 1 8 2 0 1 0 /* RX_ER */
136 1 9 1 0 1 0 /* TX_ER */ 160 1 9 1 0 1 0 /* TX_ER */
137 1 a 2 0 1 0 /* RX_DV */ 161 1 10 2 0 1 0 /* RX_DV */
138 1 b 2 0 1 0 /* COL */ 162 1 11 2 0 1 0 /* COL */
139 1 c 1 0 1 0 /* TX_EN */ 163 1 12 1 0 1 0 /* TX_EN */
140 1 d 2 0 1 0>;/* CRS */ 164 1 13 2 0 1 0>; /* CRS */
141 }; 165 };
142 pio4: ucc_pin@04 { 166 pio4: ucc_pin@04 {
143 pio-map = < 167 pio-map = <
144 /* port pin dir open_drain assignment has_irq */ 168 /* port pin dir open_drain assignment has_irq */
145 3 1f 2 0 1 0 /* RX_CLK (CLK7) */ 169 3 31 2 0 1 0 /* RX_CLK (CLK7) */
146 3 6 2 0 1 0 /* TX_CLK (CLK8) */ 170 3 6 2 0 1 0 /* TX_CLK (CLK8) */
147 1 12 1 0 1 0 /* TxD0 */ 171 1 18 1 0 1 0 /* TxD0 */
148 1 13 1 0 1 0 /* TxD1 */ 172 1 19 1 0 1 0 /* TxD1 */
149 1 14 1 0 1 0 /* TxD2 */ 173 1 20 1 0 1 0 /* TxD2 */
150 1 15 1 0 1 0 /* TxD3 */ 174 1 21 1 0 1 0 /* TxD3 */
151 1 16 2 0 1 0 /* RxD0 */ 175 1 22 2 0 1 0 /* RxD0 */
152 1 17 2 0 1 0 /* RxD1 */ 176 1 23 2 0 1 0 /* RxD1 */
153 1 18 2 0 1 0 /* RxD2 */ 177 1 24 2 0 1 0 /* RxD2 */
154 1 19 2 0 1 0 /* RxD3 */ 178 1 25 2 0 1 0 /* RxD3 */
155 1 1a 2 0 1 0 /* RX_ER */ 179 1 26 2 0 1 0 /* RX_ER */
156 1 1b 1 0 1 0 /* TX_ER */ 180 1 27 1 0 1 0 /* TX_ER */
157 1 1c 2 0 1 0 /* RX_DV */ 181 1 28 2 0 1 0 /* RX_DV */
158 1 1d 2 0 1 0 /* COL */ 182 1 29 2 0 1 0 /* COL */
159 1 1e 1 0 1 0 /* TX_EN */ 183 1 30 1 0 1 0 /* TX_EN */
160 1 1f 2 0 1 0>;/* CRS */ 184 1 31 2 0 1 0>; /* CRS */
161 }; 185 };
186 pio5: ucc_pin@05 {
187 pio-map = <
188 /*
189 * open has
190 * port pin dir drain sel irq
191 */
192 2 0 1 0 2 0 /* TxD5 */
193 2 8 2 0 2 0 /* RxD5 */
194
195 2 29 2 0 0 0 /* CTS5 */
196 2 31 1 0 2 0 /* RTS5 */
197
198 2 24 2 0 0 0 /* CD */
199
200 >;
201 };
202
162 }; 203 };
163 }; 204 };
164 205
@@ -166,178 +207,191 @@
166 #address-cells = <1>; 207 #address-cells = <1>;
167 #size-cells = <1>; 208 #size-cells = <1>;
168 device_type = "qe"; 209 device_type = "qe";
169 model = "QE"; 210 compatible = "fsl,qe";
170 ranges = <0 e0100000 00100000>; 211 ranges = <0x0 0xe0100000 0x00100000>;
171 reg = <e0100000 480>; 212 reg = <0xe0100000 0x480>;
172 brg-frequency = <0>; 213 brg-frequency = <0>;
173 bus-frequency = <BCD3D80>; 214 bus-frequency = <198000000>;
174 215
175 muram@10000 { 216 muram@10000 {
176 device_type = "muram"; 217 #address-cells = <1>;
177 ranges = <0 00010000 00004000>; 218 #size-cells = <1>;
219 compatible = "fsl,qe-muram", "fsl,cpm-muram";
220 ranges = <0x0 0x00010000 0x00004000>;
178 221
179 data-only@0 { 222 data-only@0 {
180 reg = <0 4000>; 223 compatible = "fsl,qe-muram-data",
224 "fsl,cpm-muram-data";
225 reg = <0x0 0x4000>;
181 }; 226 };
182 }; 227 };
183 228
184 spi@4c0 { 229 spi@4c0 {
185 device_type = "spi"; 230 cell-index = <0>;
186 compatible = "fsl_spi"; 231 compatible = "fsl,spi";
187 reg = <4c0 40>; 232 reg = <0x4c0 0x40>;
188 interrupts = <2>; 233 interrupts = <2>;
189 interrupt-parent = < &qeic >; 234 interrupt-parent = <&qeic>;
190 mode = "cpu"; 235 mode = "cpu";
191 }; 236 };
192 237
193 spi@500 { 238 spi@500 {
194 device_type = "spi"; 239 cell-index = <1>;
195 compatible = "fsl_spi"; 240 compatible = "fsl,spi";
196 reg = <500 40>; 241 reg = <0x500 0x40>;
197 interrupts = <1>; 242 interrupts = <1>;
198 interrupt-parent = < &qeic >; 243 interrupt-parent = <&qeic>;
199 mode = "cpu"; 244 mode = "cpu";
200 }; 245 };
201 246
202 usb@6c0 { 247 usb@6c0 {
203 device_type = "usb";
204 compatible = "qe_udc"; 248 compatible = "qe_udc";
205 reg = <6c0 40 8B00 100>; 249 reg = <0x6c0 0x40 0x8b00 0x100>;
206 interrupts = <b>; 250 interrupts = <11>;
207 interrupt-parent = < &qeic >; 251 interrupt-parent = <&qeic>;
208 mode = "slave"; 252 mode = "slave";
209 }; 253 };
210 254
211 ucc@2200 { 255 enet0: ucc@2200 {
212 device_type = "network"; 256 device_type = "network";
213 compatible = "ucc_geth"; 257 compatible = "ucc_geth";
214 model = "UCC"; 258 model = "UCC";
259 cell-index = <3>;
215 device-id = <3>; 260 device-id = <3>;
216 reg = <2200 200>; 261 reg = <0x2200 0x200>;
217 interrupts = <22>; 262 interrupts = <34>;
218 interrupt-parent = < &qeic >; 263 interrupt-parent = <&qeic>;
219 /*
220 * mac-address is deprecated and will be removed
221 * in 2.6.25. Only recent versions of
222 * U-Boot support local-mac-address, however.
223 */
224 mac-address = [ 00 00 00 00 00 00 ];
225 local-mac-address = [ 00 00 00 00 00 00 ]; 264 local-mac-address = [ 00 00 00 00 00 00 ];
226 rx-clock = <19>; 265 rx-clock-name = "clk9";
227 tx-clock = <1a>; 266 tx-clock-name = "clk10";
228 phy-handle = < &phy3 >; 267 phy-handle = <&phy3>;
229 pio-handle = < &pio3 >; 268 pio-handle = <&pio3>;
230 }; 269 };
231 270
232 ucc@3200 { 271 enet1: ucc@3200 {
233 device_type = "network"; 272 device_type = "network";
234 compatible = "ucc_geth"; 273 compatible = "ucc_geth";
235 model = "UCC"; 274 model = "UCC";
275 cell-index = <4>;
236 device-id = <4>; 276 device-id = <4>;
237 reg = <3200 200>; 277 reg = <0x3200 0x200>;
238 interrupts = <23>; 278 interrupts = <35>;
279 interrupt-parent = <&qeic>;
280 local-mac-address = [ 00 00 00 00 00 00 ];
281 rx-clock-name = "clk7";
282 tx-clock-name = "clk8";
283 phy-handle = <&phy4>;
284 pio-handle = <&pio4>;
285 };
286
287 ucc@2400 {
288 device_type = "serial";
289 compatible = "ucc_uart";
290 model = "UCC";
291 device-id = <5>; /* The UCC number, 1-7*/
292 port-number = <0>; /* Which ttyQEx device */
293 soft-uart; /* We need Soft-UART */
294 reg = <0x2400 0x200>;
295 interrupts = <40>; /* From Table 18-12 */
239 interrupt-parent = < &qeic >; 296 interrupt-parent = < &qeic >;
240 /* 297 /*
241 * mac-address is deprecated and will be removed 298 * For Soft-UART, we need to set TX to 1X, which
242 * in 2.6.25. Only recent versions of 299 * means specifying separate clock sources.
243 * U-Boot support local-mac-address, however.
244 */ 300 */
245 mac-address = [ 00 00 00 00 00 00 ]; 301 rx-clock-name = "brg5";
246 local-mac-address = [ 00 00 00 00 00 00 ]; 302 tx-clock-name = "brg6";
247 rx-clock = <17>; 303 pio-handle = < &pio5 >;
248 tx-clock = <18>;
249 phy-handle = < &phy4 >;
250 pio-handle = < &pio4 >;
251 }; 304 };
252 305
306
253 mdio@2320 { 307 mdio@2320 {
254 #address-cells = <1>; 308 #address-cells = <1>;
255 #size-cells = <0>; 309 #size-cells = <0>;
256 reg = <2320 18>; 310 reg = <0x2320 0x18>;
257 device_type = "mdio"; 311 compatible = "fsl,ucc-mdio";
258 compatible = "ucc_geth_phy";
259 312
260 phy3: ethernet-phy@03 { 313 phy3: ethernet-phy@03 {
261 interrupt-parent = < &ipic >; 314 interrupt-parent = <&ipic>;
262 interrupts = <11 8>; 315 interrupts = <17 0x8>;
263 reg = <3>; 316 reg = <0x3>;
264 device_type = "ethernet-phy"; 317 device_type = "ethernet-phy";
265 }; 318 };
266 phy4: ethernet-phy@04 { 319 phy4: ethernet-phy@04 {
267 interrupt-parent = < &ipic >; 320 interrupt-parent = <&ipic>;
268 interrupts = <12 8>; 321 interrupts = <18 0x8>;
269 reg = <4>; 322 reg = <0x4>;
270 device_type = "ethernet-phy"; 323 device_type = "ethernet-phy";
271 }; 324 };
272 }; 325 };
273 326
274 qeic: qeic@80 { 327 qeic: interrupt-controller@80 {
275 interrupt-controller; 328 interrupt-controller;
276 device_type = "qeic"; 329 compatible = "fsl,qe-ic";
277 #address-cells = <0>; 330 #address-cells = <0>;
278 #interrupt-cells = <1>; 331 #interrupt-cells = <1>;
279 reg = <80 80>; 332 reg = <0x80 0x80>;
280 big-endian; 333 big-endian;
281 interrupts = <20 8 21 8>; //high:32 low:33 334 interrupts = <32 0x8 33 0x8>; //high:32 low:33
282 interrupt-parent = < &ipic >; 335 interrupt-parent = <&ipic>;
283 }; 336 };
284 }; 337 };
285 338
286 pci@e0008500 { 339 pci0: pci@e0008500 {
287 interrupt-map-mask = <f800 0 0 7>; 340 cell-index = <1>;
341 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
288 interrupt-map = < 342 interrupt-map = <
289 /* IDSEL 0x11 AD17 */ 343 /* IDSEL 0x11 AD17 */
290 8800 0 0 1 &ipic 14 8 344 0x8800 0x0 0x0 0x1 &ipic 20 0x8
291 8800 0 0 2 &ipic 15 8 345 0x8800 0x0 0x0 0x2 &ipic 21 0x8
292 8800 0 0 3 &ipic 16 8 346 0x8800 0x0 0x0 0x3 &ipic 22 0x8
293 8800 0 0 4 &ipic 17 8 347 0x8800 0x0 0x0 0x4 &ipic 23 0x8
294 348
295 /* IDSEL 0x12 AD18 */ 349 /* IDSEL 0x12 AD18 */
296 9000 0 0 1 &ipic 16 8 350 0x9000 0x0 0x0 0x1 &ipic 22 0x8
297 9000 0 0 2 &ipic 17 8 351 0x9000 0x0 0x0 0x2 &ipic 23 0x8
298 9000 0 0 3 &ipic 14 8 352 0x9000 0x0 0x0 0x3 &ipic 20 0x8
299 9000 0 0 4 &ipic 15 8 353 0x9000 0x0 0x0 0x4 &ipic 21 0x8
300 354
301 /* IDSEL 0x13 AD19 */ 355 /* IDSEL 0x13 AD19 */
302 9800 0 0 1 &ipic 17 8 356 0x9800 0x0 0x0 0x1 &ipic 23 0x8
303 9800 0 0 2 &ipic 14 8 357 0x9800 0x0 0x0 0x2 &ipic 20 0x8
304 9800 0 0 3 &ipic 15 8 358 0x9800 0x0 0x0 0x3 &ipic 21 0x8
305 9800 0 0 4 &ipic 16 8 359 0x9800 0x0 0x0 0x4 &ipic 22 0x8
306 360
307 /* IDSEL 0x15 AD21*/ 361 /* IDSEL 0x15 AD21*/
308 a800 0 0 1 &ipic 14 8 362 0xa800 0x0 0x0 0x1 &ipic 20 0x8
309 a800 0 0 2 &ipic 15 8 363 0xa800 0x0 0x0 0x2 &ipic 21 0x8
310 a800 0 0 3 &ipic 16 8 364 0xa800 0x0 0x0 0x3 &ipic 22 0x8
311 a800 0 0 4 &ipic 17 8 365 0xa800 0x0 0x0 0x4 &ipic 23 0x8
312 366
313 /* IDSEL 0x16 AD22*/ 367 /* IDSEL 0x16 AD22*/
314 b000 0 0 1 &ipic 17 8 368 0xb000 0x0 0x0 0x1 &ipic 23 0x8
315 b000 0 0 2 &ipic 14 8 369 0xb000 0x0 0x0 0x2 &ipic 20 0x8
316 b000 0 0 3 &ipic 15 8 370 0xb000 0x0 0x0 0x3 &ipic 21 0x8
317 b000 0 0 4 &ipic 16 8 371 0xb000 0x0 0x0 0x4 &ipic 22 0x8
318 372
319 /* IDSEL 0x17 AD23*/ 373 /* IDSEL 0x17 AD23*/
320 b800 0 0 1 &ipic 16 8 374 0xb800 0x0 0x0 0x1 &ipic 22 0x8
321 b800 0 0 2 &ipic 17 8 375 0xb800 0x0 0x0 0x2 &ipic 23 0x8
322 b800 0 0 3 &ipic 14 8 376 0xb800 0x0 0x0 0x3 &ipic 20 0x8
323 b800 0 0 4 &ipic 15 8 377 0xb800 0x0 0x0 0x4 &ipic 21 0x8
324 378
325 /* IDSEL 0x18 AD24*/ 379 /* IDSEL 0x18 AD24*/
326 c000 0 0 1 &ipic 15 8 380 0xc000 0x0 0x0 0x1 &ipic 21 0x8
327 c000 0 0 2 &ipic 16 8 381 0xc000 0x0 0x0 0x2 &ipic 22 0x8
328 c000 0 0 3 &ipic 17 8 382 0xc000 0x0 0x0 0x3 &ipic 23 0x8
329 c000 0 0 4 &ipic 14 8>; 383 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
330 interrupt-parent = < &ipic >; 384 interrupt-parent = <&ipic>;
331 interrupts = <42 8>; 385 interrupts = <66 0x8>;
332 bus-range = <0 0>; 386 bus-range = <0x0 0x0>;
333 ranges = <02000000 0 90000000 90000000 0 10000000 387 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
334 42000000 0 80000000 80000000 0 10000000 388 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
335 01000000 0 00000000 d0000000 0 00100000>; 389 0x01000000 0x0 0x00000000 0xd0000000 0x0 0x00100000>;
336 clock-frequency = <0>; 390 clock-frequency = <0>;
337 #interrupt-cells = <1>; 391 #interrupt-cells = <1>;
338 #size-cells = <2>; 392 #size-cells = <2>;
339 #address-cells = <3>; 393 #address-cells = <3>;
340 reg = <e0008500 100>; 394 reg = <0xe0008500 0x100>;
341 compatible = "fsl,mpc8349-pci"; 395 compatible = "fsl,mpc8349-pci";
342 device_type = "pci"; 396 device_type = "pci";
343 }; 397 };
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 388c8a7012e1..94f93d209de8 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -9,23 +9,33 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
13
12/ { 14/ {
13 model = "MPC8323ERDB"; 15 model = "MPC8323ERDB";
14 compatible = "MPC8323ERDB", "MPC832xRDB", "MPC83xxRDB"; 16 compatible = "MPC8323ERDB", "MPC832xRDB", "MPC83xxRDB";
15 #address-cells = <1>; 17 #address-cells = <1>;
16 #size-cells = <1>; 18 #size-cells = <1>;
17 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
18 cpus { 28 cpus {
19 #address-cells = <1>; 29 #address-cells = <1>;
20 #size-cells = <0>; 30 #size-cells = <0>;
21 31
22 PowerPC,8323@0 { 32 PowerPC,8323@0 {
23 device_type = "cpu"; 33 device_type = "cpu";
24 reg = <0>; 34 reg = <0x0>;
25 d-cache-line-size = <20>; // 32 bytes 35 d-cache-line-size = <0x20>; // 32 bytes
26 i-cache-line-size = <20>; // 32 bytes 36 i-cache-line-size = <0x20>; // 32 bytes
27 d-cache-size = <4000>; // L1, 16K 37 d-cache-size = <16384>; // L1, 16K
28 i-cache-size = <4000>; // L1, 16K 38 i-cache-size = <16384>; // L1, 16K
29 timebase-frequency = <0>; 39 timebase-frequency = <0>;
30 bus-frequency = <0>; 40 bus-frequency = <0>;
31 clock-frequency = <0>; 41 clock-frequency = <0>;
@@ -34,47 +44,51 @@
34 44
35 memory { 45 memory {
36 device_type = "memory"; 46 device_type = "memory";
37 reg = <00000000 04000000>; 47 reg = <0x00000000 0x04000000>;
38 }; 48 };
39 49
40 soc8323@e0000000 { 50 soc8323@e0000000 {
41 #address-cells = <1>; 51 #address-cells = <1>;
42 #size-cells = <1>; 52 #size-cells = <1>;
43 device_type = "soc"; 53 device_type = "soc";
44 ranges = <0 e0000000 00100000>; 54 ranges = <0x0 0xe0000000 0x00100000>;
45 reg = <e0000000 00000200>; 55 reg = <0xe0000000 0x00000200>;
46 bus-frequency = <0>; 56 bus-frequency = <0>;
47 57
48 wdt@200 { 58 wdt@200 {
49 device_type = "watchdog"; 59 device_type = "watchdog";
50 compatible = "mpc83xx_wdt"; 60 compatible = "mpc83xx_wdt";
51 reg = <200 100>; 61 reg = <0x200 0x100>;
52 }; 62 };
53 63
54 i2c@3000 { 64 i2c@3000 {
55 device_type = "i2c"; 65 #address-cells = <1>;
66 #size-cells = <0>;
67 cell-index = <0>;
56 compatible = "fsl-i2c"; 68 compatible = "fsl-i2c";
57 reg = <3000 100>; 69 reg = <0x3000 0x100>;
58 interrupts = <e 8>; 70 interrupts = <14 0x8>;
59 interrupt-parent = <&pic>; 71 interrupt-parent = <&pic>;
60 dfsrr; 72 dfsrr;
61 }; 73 };
62 74
63 serial@4500 { 75 serial0: serial@4500 {
76 cell-index = <0>;
64 device_type = "serial"; 77 device_type = "serial";
65 compatible = "ns16550"; 78 compatible = "ns16550";
66 reg = <4500 100>; 79 reg = <0x4500 0x100>;
67 clock-frequency = <0>; 80 clock-frequency = <0>;
68 interrupts = <9 8>; 81 interrupts = <9 0x8>;
69 interrupt-parent = <&pic>; 82 interrupt-parent = <&pic>;
70 }; 83 };
71 84
72 serial@4600 { 85 serial1: serial@4600 {
86 cell-index = <1>;
73 device_type = "serial"; 87 device_type = "serial";
74 compatible = "ns16550"; 88 compatible = "ns16550";
75 reg = <4600 100>; 89 reg = <0x4600 0x100>;
76 clock-frequency = <0>; 90 clock-frequency = <0>;
77 interrupts = <a 8>; 91 interrupts = <10 0x8>;
78 interrupt-parent = <&pic>; 92 interrupt-parent = <&pic>;
79 }; 93 };
80 94
@@ -82,26 +96,26 @@
82 device_type = "crypto"; 96 device_type = "crypto";
83 model = "SEC2"; 97 model = "SEC2";
84 compatible = "talitos"; 98 compatible = "talitos";
85 reg = <30000 7000>; 99 reg = <0x30000 0x7000>;
86 interrupts = <b 8>; 100 interrupts = <11 0x8>;
87 interrupt-parent = <&pic>; 101 interrupt-parent = <&pic>;
88 /* Rev. 2.2 */ 102 /* Rev. 2.2 */
89 num-channels = <1>; 103 num-channels = <1>;
90 channel-fifo-len = <18>; 104 channel-fifo-len = <24>;
91 exec-units-mask = <0000004c>; 105 exec-units-mask = <0x0000004c>;
92 descriptor-types-mask = <0122003f>; 106 descriptor-types-mask = <0x0122003f>;
93 }; 107 };
94 108
95 pic:pic@700 { 109 pic:pic@700 {
96 interrupt-controller; 110 interrupt-controller;
97 #address-cells = <0>; 111 #address-cells = <0>;
98 #interrupt-cells = <2>; 112 #interrupt-cells = <2>;
99 reg = <700 100>; 113 reg = <0x700 0x100>;
100 device_type = "ipic"; 114 device_type = "ipic";
101 }; 115 };
102 116
103 par_io@1400 { 117 par_io@1400 {
104 reg = <1400 100>; 118 reg = <0x1400 0x100>;
105 device_type = "par_io"; 119 device_type = "par_io";
106 num-ports = <7>; 120 num-ports = <7>;
107 121
@@ -110,28 +124,28 @@
110 /* port pin dir open_drain assignment has_irq */ 124 /* port pin dir open_drain assignment has_irq */
111 3 4 3 0 2 0 /* MDIO */ 125 3 4 3 0 2 0 /* MDIO */
112 3 5 1 0 2 0 /* MDC */ 126 3 5 1 0 2 0 /* MDC */
113 3 15 2 0 1 0 /* RX_CLK (CLK16) */ 127 3 21 2 0 1 0 /* RX_CLK (CLK16) */
114 3 17 2 0 1 0 /* TX_CLK (CLK3) */ 128 3 23 2 0 1 0 /* TX_CLK (CLK3) */
115 0 12 1 0 1 0 /* TxD0 */ 129 0 18 1 0 1 0 /* TxD0 */
116 0 13 1 0 1 0 /* TxD1 */ 130 0 19 1 0 1 0 /* TxD1 */
117 0 14 1 0 1 0 /* TxD2 */ 131 0 20 1 0 1 0 /* TxD2 */
118 0 15 1 0 1 0 /* TxD3 */ 132 0 21 1 0 1 0 /* TxD3 */
119 0 16 2 0 1 0 /* RxD0 */ 133 0 22 2 0 1 0 /* RxD0 */
120 0 17 2 0 1 0 /* RxD1 */ 134 0 23 2 0 1 0 /* RxD1 */
121 0 18 2 0 1 0 /* RxD2 */ 135 0 24 2 0 1 0 /* RxD2 */
122 0 19 2 0 1 0 /* RxD3 */ 136 0 25 2 0 1 0 /* RxD3 */
123 0 1a 2 0 1 0 /* RX_ER */ 137 0 26 2 0 1 0 /* RX_ER */
124 0 1b 1 0 1 0 /* TX_ER */ 138 0 27 1 0 1 0 /* TX_ER */
125 0 1c 2 0 1 0 /* RX_DV */ 139 0 28 2 0 1 0 /* RX_DV */
126 0 1d 2 0 1 0 /* COL */ 140 0 29 2 0 1 0 /* COL */
127 0 1e 1 0 1 0 /* TX_EN */ 141 0 30 1 0 1 0 /* TX_EN */
128 0 1f 2 0 1 0>; /* CRS */ 142 0 31 2 0 1 0>; /* CRS */
129 }; 143 };
130 ucc3pio:ucc_pin@03 { 144 ucc3pio:ucc_pin@03 {
131 pio-map = < 145 pio-map = <
132 /* port pin dir open_drain assignment has_irq */ 146 /* port pin dir open_drain assignment has_irq */
133 0 d 2 0 1 0 /* RX_CLK (CLK9) */ 147 0 13 2 0 1 0 /* RX_CLK (CLK9) */
134 3 18 2 0 1 0 /* TX_CLK (CLK10) */ 148 3 24 2 0 1 0 /* TX_CLK (CLK10) */
135 1 0 1 0 1 0 /* TxD0 */ 149 1 0 1 0 1 0 /* TxD0 */
136 1 1 1 0 1 0 /* TxD1 */ 150 1 1 1 0 1 0 /* TxD1 */
137 1 2 1 0 1 0 /* TxD2 */ 151 1 2 1 0 1 0 /* TxD2 */
@@ -142,10 +156,10 @@
142 1 7 2 0 1 0 /* RxD3 */ 156 1 7 2 0 1 0 /* RxD3 */
143 1 8 2 0 1 0 /* RX_ER */ 157 1 8 2 0 1 0 /* RX_ER */
144 1 9 1 0 1 0 /* TX_ER */ 158 1 9 1 0 1 0 /* TX_ER */
145 1 a 2 0 1 0 /* RX_DV */ 159 1 10 2 0 1 0 /* RX_DV */
146 1 b 2 0 1 0 /* COL */ 160 1 11 2 0 1 0 /* COL */
147 1 c 1 0 1 0 /* TX_EN */ 161 1 12 1 0 1 0 /* TX_EN */
148 1 d 2 0 1 0>; /* CRS */ 162 1 13 2 0 1 0>; /* CRS */
149 }; 163 };
150 }; 164 };
151 }; 165 };
@@ -154,77 +168,71 @@
154 #address-cells = <1>; 168 #address-cells = <1>;
155 #size-cells = <1>; 169 #size-cells = <1>;
156 device_type = "qe"; 170 device_type = "qe";
157 model = "QE"; 171 compatible = "fsl,qe";
158 ranges = <0 e0100000 00100000>; 172 ranges = <0x0 0xe0100000 0x00100000>;
159 reg = <e0100000 480>; 173 reg = <0xe0100000 0x480>;
160 brg-frequency = <0>; 174 brg-frequency = <0>;
161 bus-frequency = <BCD3D80>; 175 bus-frequency = <198000000>;
162 176
163 muram@10000 { 177 muram@10000 {
164 device_type = "muram"; 178 #address-cells = <1>;
165 ranges = <0 00010000 00004000>; 179 #size-cells = <1>;
180 compatible = "fsl,qe-muram", "fsl,cpm-muram";
181 ranges = <0x0 0x00010000 0x00004000>;
166 182
167 data-only@0 { 183 data-only@0 {
168 reg = <0 4000>; 184 compatible = "fsl,qe-muram-data",
185 "fsl,cpm-muram-data";
186 reg = <0x0 0x4000>;
169 }; 187 };
170 }; 188 };
171 189
172 spi@4c0 { 190 spi@4c0 {
173 device_type = "spi"; 191 cell-index = <0>;
174 compatible = "fsl_spi"; 192 compatible = "fsl,spi";
175 reg = <4c0 40>; 193 reg = <0x4c0 0x40>;
176 interrupts = <2>; 194 interrupts = <2>;
177 interrupt-parent = <&qeic>; 195 interrupt-parent = <&qeic>;
178 mode = "cpu-qe"; 196 mode = "cpu-qe";
179 }; 197 };
180 198
181 spi@500 { 199 spi@500 {
182 device_type = "spi"; 200 cell-index = <1>;
183 compatible = "fsl_spi"; 201 compatible = "fsl,spi";
184 reg = <500 40>; 202 reg = <0x500 0x40>;
185 interrupts = <1>; 203 interrupts = <1>;
186 interrupt-parent = <&qeic>; 204 interrupt-parent = <&qeic>;
187 mode = "cpu"; 205 mode = "cpu";
188 }; 206 };
189 207
190 ucc@3000 { 208 enet0: ucc@3000 {
191 device_type = "network"; 209 device_type = "network";
192 compatible = "ucc_geth"; 210 compatible = "ucc_geth";
193 model = "UCC"; 211 model = "UCC";
212 cell-index = <2>;
194 device-id = <2>; 213 device-id = <2>;
195 reg = <3000 200>; 214 reg = <0x3000 0x200>;
196 interrupts = <21>; 215 interrupts = <33>;
197 interrupt-parent = <&qeic>; 216 interrupt-parent = <&qeic>;
198 /*
199 * mac-address is deprecated and will be removed
200 * in 2.6.25. Only recent versions of
201 * U-Boot support local-mac-address, however.
202 */
203 mac-address = [ 00 00 00 00 00 00 ];
204 local-mac-address = [ 00 00 00 00 00 00 ]; 217 local-mac-address = [ 00 00 00 00 00 00 ];
205 rx-clock = <20>; 218 rx-clock-name = "clk16";
206 tx-clock = <13>; 219 tx-clock-name = "clk3";
207 phy-handle = <&phy00>; 220 phy-handle = <&phy00>;
208 pio-handle = <&ucc2pio>; 221 pio-handle = <&ucc2pio>;
209 }; 222 };
210 223
211 ucc@2200 { 224 enet1: ucc@2200 {
212 device_type = "network"; 225 device_type = "network";
213 compatible = "ucc_geth"; 226 compatible = "ucc_geth";
214 model = "UCC"; 227 model = "UCC";
228 cell-index = <3>;
215 device-id = <3>; 229 device-id = <3>;
216 reg = <2200 200>; 230 reg = <0x2200 0x200>;
217 interrupts = <22>; 231 interrupts = <34>;
218 interrupt-parent = <&qeic>; 232 interrupt-parent = <&qeic>;
219 /*
220 * mac-address is deprecated and will be removed
221 * in 2.6.25. Only recent versions of
222 * U-Boot support local-mac-address, however.
223 */
224 mac-address = [ 00 00 00 00 00 00 ];
225 local-mac-address = [ 00 00 00 00 00 00 ]; 233 local-mac-address = [ 00 00 00 00 00 00 ];
226 rx-clock = <19>; 234 rx-clock-name = "clk9";
227 tx-clock = <1a>; 235 tx-clock-name = "clk10";
228 phy-handle = <&phy04>; 236 phy-handle = <&phy04>;
229 pio-handle = <&ucc3pio>; 237 pio-handle = <&ucc3pio>;
230 }; 238 };
@@ -232,65 +240,65 @@
232 mdio@3120 { 240 mdio@3120 {
233 #address-cells = <1>; 241 #address-cells = <1>;
234 #size-cells = <0>; 242 #size-cells = <0>;
235 reg = <3120 18>; 243 reg = <0x3120 0x18>;
236 device_type = "mdio"; 244 compatible = "fsl,ucc-mdio";
237 compatible = "ucc_geth_phy";
238 245
239 phy00:ethernet-phy@00 { 246 phy00:ethernet-phy@00 {
240 interrupt-parent = <&pic>; 247 interrupt-parent = <&pic>;
241 interrupts = <0>; 248 interrupts = <0>;
242 reg = <0>; 249 reg = <0x0>;
243 device_type = "ethernet-phy"; 250 device_type = "ethernet-phy";
244 }; 251 };
245 phy04:ethernet-phy@04 { 252 phy04:ethernet-phy@04 {
246 interrupt-parent = <&pic>; 253 interrupt-parent = <&pic>;
247 interrupts = <0>; 254 interrupts = <0>;
248 reg = <4>; 255 reg = <0x4>;
249 device_type = "ethernet-phy"; 256 device_type = "ethernet-phy";
250 }; 257 };
251 }; 258 };
252 259
253 qeic:qeic@80 { 260 qeic:interrupt-controller@80 {
254 interrupt-controller; 261 interrupt-controller;
255 device_type = "qeic"; 262 compatible = "fsl,qe-ic";
256 #address-cells = <0>; 263 #address-cells = <0>;
257 #interrupt-cells = <1>; 264 #interrupt-cells = <1>;
258 reg = <80 80>; 265 reg = <0x80 0x80>;
259 big-endian; 266 big-endian;
260 interrupts = <20 8 21 8>; //high:32 low:33 267 interrupts = <32 0x8 33 0x8>; //high:32 low:33
261 interrupt-parent = <&pic>; 268 interrupt-parent = <&pic>;
262 }; 269 };
263 }; 270 };
264 271
265 pci@e0008500 { 272 pci0: pci@e0008500 {
266 interrupt-map-mask = <f800 0 0 7>; 273 cell-index = <1>;
274 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
267 interrupt-map = < 275 interrupt-map = <
268 /* IDSEL 0x10 AD16 (USB) */ 276 /* IDSEL 0x10 AD16 (USB) */
269 8000 0 0 1 &pic 11 8 277 0x8000 0x0 0x0 0x1 &pic 17 0x8
270 278
271 /* IDSEL 0x11 AD17 (Mini1)*/ 279 /* IDSEL 0x11 AD17 (Mini1)*/
272 8800 0 0 1 &pic 12 8 280 0x8800 0x0 0x0 0x1 &pic 18 0x8
273 8800 0 0 2 &pic 13 8 281 0x8800 0x0 0x0 0x2 &pic 19 0x8
274 8800 0 0 3 &pic 14 8 282 0x8800 0x0 0x0 0x3 &pic 20 0x8
275 8800 0 0 4 &pic 30 8 283 0x8800 0x0 0x0 0x4 &pic 48 0x8
276 284
277 /* IDSEL 0x12 AD18 (PCI/Mini2) */ 285 /* IDSEL 0x12 AD18 (PCI/Mini2) */
278 9000 0 0 1 &pic 13 8 286 0x9000 0x0 0x0 0x1 &pic 19 0x8
279 9000 0 0 2 &pic 14 8 287 0x9000 0x0 0x0 0x2 &pic 20 0x8
280 9000 0 0 3 &pic 30 8 288 0x9000 0x0 0x0 0x3 &pic 48 0x8
281 9000 0 0 4 &pic 11 8>; 289 0x9000 0x0 0x0 0x4 &pic 17 0x8>;
282 290
283 interrupt-parent = <&pic>; 291 interrupt-parent = <&pic>;
284 interrupts = <42 8>; 292 interrupts = <66 0x8>;
285 bus-range = <0 0>; 293 bus-range = <0x0 0x0>;
286 ranges = <42000000 0 80000000 80000000 0 10000000 294 ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
287 02000000 0 90000000 90000000 0 10000000 295 0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
288 01000000 0 d0000000 d0000000 0 04000000>; 296 0x01000000 0x0 0xd0000000 0xd0000000 0x0 0x04000000>;
289 clock-frequency = <0>; 297 clock-frequency = <0>;
290 #interrupt-cells = <1>; 298 #interrupt-cells = <1>;
291 #size-cells = <2>; 299 #size-cells = <2>;
292 #address-cells = <3>; 300 #address-cells = <3>;
293 reg = <e0008500 100>; 301 reg = <0xe0008500 0x100>;
294 compatible = "fsl,mpc8349-pci"; 302 compatible = "fsl,mpc8349-pci";
295 device_type = "pci"; 303 device_type = "pci";
296 }; 304 };
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d0a46d..9426676b0b7d 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -8,23 +8,35 @@
8 * Free Software Foundation; either version 2 of the License, or (at your 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11
12/dts-v1/;
13
11/ { 14/ {
12 model = "MPC8349EMITX"; 15 model = "MPC8349EMITX";
13 compatible = "MPC8349EMITX", "MPC834xMITX", "MPC83xxMITX"; 16 compatible = "MPC8349EMITX", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>; 17 #address-cells = <1>;
15 #size-cells = <1>; 18 #size-cells = <1>;
16 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 pci1 = &pci1;
27 };
28
17 cpus { 29 cpus {
18 #address-cells = <1>; 30 #address-cells = <1>;
19 #size-cells = <0>; 31 #size-cells = <0>;
20 32
21 PowerPC,8349@0 { 33 PowerPC,8349@0 {
22 device_type = "cpu"; 34 device_type = "cpu";
23 reg = <0>; 35 reg = <0x0>;
24 d-cache-line-size = <20>; 36 d-cache-line-size = <32>;
25 i-cache-line-size = <20>; 37 i-cache-line-size = <32>;
26 d-cache-size = <8000>; 38 d-cache-size = <32768>;
27 i-cache-size = <8000>; 39 i-cache-size = <32768>;
28 timebase-frequency = <0>; // from bootloader 40 timebase-frequency = <0>; // from bootloader
29 bus-frequency = <0>; // from bootloader 41 bus-frequency = <0>; // from bootloader
30 clock-frequency = <0>; // from bootloader 42 clock-frequency = <0>; // from bootloader
@@ -33,222 +45,223 @@
33 45
34 memory { 46 memory {
35 device_type = "memory"; 47 device_type = "memory";
36 reg = <00000000 10000000>; 48 reg = <0x00000000 0x10000000>;
37 }; 49 };
38 50
39 soc8349@e0000000 { 51 soc8349@e0000000 {
40 #address-cells = <1>; 52 #address-cells = <1>;
41 #size-cells = <1>; 53 #size-cells = <1>;
42 device_type = "soc"; 54 device_type = "soc";
43 ranges = <0 e0000000 00100000>; 55 ranges = <0x0 0xe0000000 0x00100000>;
44 reg = <e0000000 00000200>; 56 reg = <0xe0000000 0x00000200>;
45 bus-frequency = <0>; // from bootloader 57 bus-frequency = <0>; // from bootloader
46 58
47 wdt@200 { 59 wdt@200 {
48 device_type = "watchdog"; 60 device_type = "watchdog";
49 compatible = "mpc83xx_wdt"; 61 compatible = "mpc83xx_wdt";
50 reg = <200 100>; 62 reg = <0x200 0x100>;
51 }; 63 };
52 64
53 i2c@3000 { 65 i2c@3000 {
54 device_type = "i2c"; 66 #address-cells = <1>;
67 #size-cells = <0>;
68 cell-index = <0>;
55 compatible = "fsl-i2c"; 69 compatible = "fsl-i2c";
56 reg = <3000 100>; 70 reg = <0x3000 0x100>;
57 interrupts = <e 8>; 71 interrupts = <14 0x8>;
58 interrupt-parent = < &ipic >; 72 interrupt-parent = <&ipic>;
59 dfsrr; 73 dfsrr;
60 }; 74 };
61 75
62 i2c@3100 { 76 i2c@3100 {
63 device_type = "i2c"; 77 #address-cells = <1>;
78 #size-cells = <0>;
79 cell-index = <1>;
64 compatible = "fsl-i2c"; 80 compatible = "fsl-i2c";
65 reg = <3100 100>; 81 reg = <0x3100 0x100>;
66 interrupts = <f 8>; 82 interrupts = <15 0x8>;
67 interrupt-parent = < &ipic >; 83 interrupt-parent = <&ipic>;
68 dfsrr; 84 dfsrr;
69 }; 85 };
70 86
71 spi@7000 { 87 spi@7000 {
72 device_type = "spi"; 88 cell-index = <0>;
73 compatible = "fsl_spi"; 89 compatible = "fsl,spi";
74 reg = <7000 1000>; 90 reg = <0x7000 0x1000>;
75 interrupts = <10 8>; 91 interrupts = <16 0x8>;
76 interrupt-parent = < &ipic >; 92 interrupt-parent = <&ipic>;
77 mode = "cpu"; 93 mode = "cpu";
78 }; 94 };
79 95
80 usb@22000 { 96 usb@22000 {
81 device_type = "usb";
82 compatible = "fsl-usb2-mph"; 97 compatible = "fsl-usb2-mph";
83 reg = <22000 1000>; 98 reg = <0x22000 0x1000>;
84 #address-cells = <1>; 99 #address-cells = <1>;
85 #size-cells = <0>; 100 #size-cells = <0>;
86 interrupt-parent = < &ipic >; 101 interrupt-parent = <&ipic>;
87 interrupts = <27 8>; 102 interrupts = <39 0x8>;
88 phy_type = "ulpi"; 103 phy_type = "ulpi";
89 port1; 104 port1;
90 }; 105 };
91 106
92 usb@23000 { 107 usb@23000 {
93 device_type = "usb";
94 compatible = "fsl-usb2-dr"; 108 compatible = "fsl-usb2-dr";
95 reg = <23000 1000>; 109 reg = <0x23000 0x1000>;
96 #address-cells = <1>; 110 #address-cells = <1>;
97 #size-cells = <0>; 111 #size-cells = <0>;
98 interrupt-parent = < &ipic >; 112 interrupt-parent = <&ipic>;
99 interrupts = <26 8>; 113 interrupts = <38 0x8>;
100 dr_mode = "peripheral"; 114 dr_mode = "peripheral";
101 phy_type = "ulpi"; 115 phy_type = "ulpi";
102 }; 116 };
103 117
104 mdio@24520 { 118 mdio@24520 {
105 device_type = "mdio";
106 compatible = "gianfar";
107 reg = <24520 20>;
108 #address-cells = <1>; 119 #address-cells = <1>;
109 #size-cells = <0>; 120 #size-cells = <0>;
121 compatible = "fsl,gianfar-mdio";
122 reg = <0x24520 0x20>;
110 123
111 /* Vitesse 8201 */ 124 /* Vitesse 8201 */
112 phy1c: ethernet-phy@1c { 125 phy1c: ethernet-phy@1c {
113 interrupt-parent = < &ipic >; 126 interrupt-parent = <&ipic>;
114 interrupts = <12 8>; 127 interrupts = <18 0x8>;
115 reg = <1c>; 128 reg = <0x1c>;
116 device_type = "ethernet-phy";
117 };
118
119 /* Vitesse 7385 */
120 phy1f: ethernet-phy@1f {
121 interrupt-parent = < &ipic >;
122 interrupts = <12 8>;
123 reg = <1f>;
124 device_type = "ethernet-phy"; 129 device_type = "ethernet-phy";
125 }; 130 };
126 }; 131 };
127 132
128 ethernet@24000 { 133 enet0: ethernet@24000 {
134 cell-index = <0>;
129 device_type = "network"; 135 device_type = "network";
130 model = "TSEC"; 136 model = "TSEC";
131 compatible = "gianfar"; 137 compatible = "gianfar";
132 reg = <24000 1000>; 138 reg = <0x24000 0x1000>;
133 /*
134 * address is deprecated and will be removed
135 * in 2.6.25. Only recent versions of
136 * U-Boot support local-mac-address, however.
137 */
138 address = [ 00 00 00 00 00 00 ];
139 local-mac-address = [ 00 00 00 00 00 00 ]; 139 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <20 8 21 8 22 8>; 140 interrupts = <32 0x8 33 0x8 34 0x8>;
141 interrupt-parent = < &ipic >; 141 interrupt-parent = <&ipic>;
142 phy-handle = < &phy1c >; 142 phy-handle = <&phy1c>;
143 linux,network-index = <0>; 143 linux,network-index = <0>;
144 }; 144 };
145 145
146 ethernet@25000 { 146 enet1: ethernet@25000 {
147 #address-cells = <1>; 147 cell-index = <1>;
148 #size-cells = <0>;
149 device_type = "network"; 148 device_type = "network";
150 model = "TSEC"; 149 model = "TSEC";
151 compatible = "gianfar"; 150 compatible = "gianfar";
152 reg = <25000 1000>; 151 reg = <0x25000 0x1000>;
153 /*
154 * address is deprecated and will be removed
155 * in 2.6.25. Only recent versions of
156 * U-Boot support local-mac-address, however.
157 */
158 address = [ 00 00 00 00 00 00 ];
159 local-mac-address = [ 00 00 00 00 00 00 ]; 152 local-mac-address = [ 00 00 00 00 00 00 ];
160 interrupts = <23 8 24 8 25 8>; 153 interrupts = <35 0x8 36 0x8 37 0x8>;
161 interrupt-parent = < &ipic >; 154 interrupt-parent = <&ipic>;
162 phy-handle = < &phy1f >; 155 /* Vitesse 7385 isn't on the MDIO bus */
156 fixed-link = <1 1 1000 0 0>;
163 linux,network-index = <1>; 157 linux,network-index = <1>;
164 }; 158 };
165 159
166 serial@4500 { 160 serial0: serial@4500 {
161 cell-index = <0>;
167 device_type = "serial"; 162 device_type = "serial";
168 compatible = "ns16550"; 163 compatible = "ns16550";
169 reg = <4500 100>; 164 reg = <0x4500 0x100>;
170 clock-frequency = <0>; // from bootloader 165 clock-frequency = <0>; // from bootloader
171 interrupts = <9 8>; 166 interrupts = <9 0x8>;
172 interrupt-parent = < &ipic >; 167 interrupt-parent = <&ipic>;
173 }; 168 };
174 169
175 serial@4600 { 170 serial1: serial@4600 {
171 cell-index = <1>;
176 device_type = "serial"; 172 device_type = "serial";
177 compatible = "ns16550"; 173 compatible = "ns16550";
178 reg = <4600 100>; 174 reg = <0x4600 0x100>;
179 clock-frequency = <0>; // from bootloader 175 clock-frequency = <0>; // from bootloader
180 interrupts = <a 8>; 176 interrupts = <10 0x8>;
181 interrupt-parent = < &ipic >; 177 interrupt-parent = <&ipic>;
182 }; 178 };
183 179
184 crypto@30000 { 180 crypto@30000 {
185 device_type = "crypto"; 181 device_type = "crypto";
186 model = "SEC2"; 182 model = "SEC2";
187 compatible = "talitos"; 183 compatible = "talitos";
188 reg = <30000 10000>; 184 reg = <0x30000 0x10000>;
189 interrupts = <b 8>; 185 interrupts = <11 0x8>;
190 interrupt-parent = < &ipic >; 186 interrupt-parent = <&ipic>;
191 num-channels = <4>; 187 num-channels = <4>;
192 channel-fifo-len = <18>; 188 channel-fifo-len = <24>;
193 exec-units-mask = <0000007e>; 189 exec-units-mask = <0x0000007e>;
194 descriptor-types-mask = <01010ebf>; 190 descriptor-types-mask = <0x01010ebf>;
195 }; 191 };
196 192
197 ipic: pic@700 { 193 ipic: pic@700 {
198 interrupt-controller; 194 interrupt-controller;
199 #address-cells = <0>; 195 #address-cells = <0>;
200 #interrupt-cells = <2>; 196 #interrupt-cells = <2>;
201 reg = <700 100>; 197 reg = <0x700 0x100>;
202 device_type = "ipic"; 198 device_type = "ipic";
203 }; 199 };
204 }; 200 };
205 201
206 pci@e0008500 { 202 pci0: pci@e0008500 {
207 interrupt-map-mask = <f800 0 0 7>; 203 cell-index = <1>;
204 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
208 interrupt-map = < 205 interrupt-map = <
209 /* IDSEL 0x10 - SATA */ 206 /* IDSEL 0x10 - SATA */
210 8000 0 0 1 &ipic 16 8 /* SATA_INTA */ 207 0x8000 0x0 0x0 0x1 &ipic 22 0x8 /* SATA_INTA */
211 >; 208 >;
212 interrupt-parent = < &ipic >; 209 interrupt-parent = <&ipic>;
213 interrupts = <42 8>; 210 interrupts = <66 0x8>;
214 bus-range = <0 0>; 211 bus-range = <0x0 0x0>;
215 ranges = <42000000 0 80000000 80000000 0 10000000 212 ranges = <0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
216 02000000 0 90000000 90000000 0 10000000 213 0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
217 01000000 0 00000000 e2000000 0 01000000>; 214 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x01000000>;
218 clock-frequency = <3f940aa>; 215 clock-frequency = <66666666>;
219 #interrupt-cells = <1>; 216 #interrupt-cells = <1>;
220 #size-cells = <2>; 217 #size-cells = <2>;
221 #address-cells = <3>; 218 #address-cells = <3>;
222 reg = <e0008500 100>; 219 reg = <0xe0008500 0x100>;
223 compatible = "fsl,mpc8349-pci"; 220 compatible = "fsl,mpc8349-pci";
224 device_type = "pci"; 221 device_type = "pci";
225 }; 222 };
226 223
227 pci@e0008600 { 224 pci1: pci@e0008600 {
228 interrupt-map-mask = <f800 0 0 7>; 225 cell-index = <2>;
226 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
229 interrupt-map = < 227 interrupt-map = <
230 /* IDSEL 0x0E - MiniPCI Slot */ 228 /* IDSEL 0x0E - MiniPCI Slot */
231 7000 0 0 1 &ipic 15 8 /* PCI_INTA */ 229 0x7000 0x0 0x0 0x1 &ipic 21 0x8 /* PCI_INTA */
232 230
233 /* IDSEL 0x0F - PCI Slot */ 231 /* IDSEL 0x0F - PCI Slot */
234 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ 232 0x7800 0x0 0x0 0x1 &ipic 20 0x8 /* PCI_INTA */
235 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ 233 0x7800 0x0 0x0 0x2 &ipic 21 0x8 /* PCI_INTB */
236 >; 234 >;
237 interrupt-parent = < &ipic >; 235 interrupt-parent = <&ipic>;
238 interrupts = <43 8>; 236 interrupts = <67 0x8>;
239 bus-range = <0 0>; 237 bus-range = <0x0 0x0>;
240 ranges = <42000000 0 a0000000 a0000000 0 10000000 238 ranges = <0x42000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
241 02000000 0 b0000000 b0000000 0 10000000 239 0x02000000 0x0 0xb0000000 0xb0000000 0x0 0x10000000
242 01000000 0 00000000 e3000000 0 01000000>; 240 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x01000000>;
243 clock-frequency = <3f940aa>; 241 clock-frequency = <66666666>;
244 #interrupt-cells = <1>; 242 #interrupt-cells = <1>;
245 #size-cells = <2>; 243 #size-cells = <2>;
246 #address-cells = <3>; 244 #address-cells = <3>;
247 reg = <e0008600 100>; 245 reg = <0xe0008600 0x100>;
248 compatible = "fsl,mpc8349-pci"; 246 compatible = "fsl,mpc8349-pci";
249 device_type = "pci"; 247 device_type = "pci";
250 }; 248 };
251 249
250 localbus@e0005000 {
251 #address-cells = <2>;
252 #size-cells = <1>;
253 compatible = "fsl,mpc8349e-localbus",
254 "fsl,pq2pro-localbus";
255 reg = <0xe0005000 0xd8>;
256 ranges = <0x3 0x0 0xf0000000 0x210>;
252 257
253 258 pata@3,0 {
259 compatible = "fsl,mpc8349emitx-pata", "ata-generic";
260 reg = <0x3 0x0 0x10 0x3 0x20c 0x4>;
261 reg-shift = <1>;
262 pio-mode = <6>;
263 interrupts = <23 0x8>;
264 interrupt-parent = <&ipic>;
265 };
266 };
254}; 267};
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
index 074f7a2ab7e4..f81d735e6e72 100644
--- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts
@@ -8,23 +8,33 @@
8 * Free Software Foundation; either version 2 of the License, or (at your 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11
12/dts-v1/;
13
11/ { 14/ {
12 model = "MPC8349EMITXGP"; 15 model = "MPC8349EMITXGP";
13 compatible = "MPC8349EMITXGP", "MPC834xMITX", "MPC83xxMITX"; 16 compatible = "MPC8349EMITXGP", "MPC834xMITX", "MPC83xxMITX";
14 #address-cells = <1>; 17 #address-cells = <1>;
15 #size-cells = <1>; 18 #size-cells = <1>;
16 19
20 aliases {
21 ethernet0 = &enet0;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 };
26
17 cpus { 27 cpus {
18 #address-cells = <1>; 28 #address-cells = <1>;
19 #size-cells = <0>; 29 #size-cells = <0>;
20 30
21 PowerPC,8349@0 { 31 PowerPC,8349@0 {
22 device_type = "cpu"; 32 device_type = "cpu";
23 reg = <0>; 33 reg = <0x0>;
24 d-cache-line-size = <20>; 34 d-cache-line-size = <32>;
25 i-cache-line-size = <20>; 35 i-cache-line-size = <32>;
26 d-cache-size = <8000>; 36 d-cache-size = <32768>;
27 i-cache-size = <8000>; 37 i-cache-size = <32768>;
28 timebase-frequency = <0>; // from bootloader 38 timebase-frequency = <0>; // from bootloader
29 bus-frequency = <0>; // from bootloader 39 bus-frequency = <0>; // from bootloader
30 clock-frequency = <0>; // from bootloader 40 clock-frequency = <0>; // from bootloader
@@ -33,148 +43,154 @@
33 43
34 memory { 44 memory {
35 device_type = "memory"; 45 device_type = "memory";
36 reg = <00000000 10000000>; 46 reg = <0x00000000 0x10000000>;
37 }; 47 };
38 48
39 soc8349@e0000000 { 49 soc8349@e0000000 {
40 #address-cells = <1>; 50 #address-cells = <1>;
41 #size-cells = <1>; 51 #size-cells = <1>;
42 device_type = "soc"; 52 device_type = "soc";
43 ranges = <0 e0000000 00100000>; 53 ranges = <0x0 0xe0000000 0x00100000>;
44 reg = <e0000000 00000200>; 54 reg = <0xe0000000 0x00000200>;
45 bus-frequency = <0>; // from bootloader 55 bus-frequency = <0>; // from bootloader
46 56
47 wdt@200 { 57 wdt@200 {
48 device_type = "watchdog"; 58 device_type = "watchdog";
49 compatible = "mpc83xx_wdt"; 59 compatible = "mpc83xx_wdt";
50 reg = <200 100>; 60 reg = <0x200 0x100>;
51 }; 61 };
52 62
53 i2c@3000 { 63 i2c@3000 {
54 device_type = "i2c"; 64 #address-cells = <1>;
65 #size-cells = <0>;
66 cell-index = <0>;
55 compatible = "fsl-i2c"; 67 compatible = "fsl-i2c";
56 reg = <3000 100>; 68 reg = <0x3000 0x100>;
57 interrupts = <e 8>; 69 interrupts = <14 0x8>;
58 interrupt-parent = < &ipic >; 70 interrupt-parent = <&ipic>;
59 dfsrr; 71 dfsrr;
60 }; 72 };
61 73
62 i2c@3100 { 74 i2c@3100 {
63 device_type = "i2c"; 75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <1>;
64 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
65 reg = <3100 100>; 79 reg = <0x3100 0x100>;
66 interrupts = <f 8>; 80 interrupts = <15 0x8>;
67 interrupt-parent = < &ipic >; 81 interrupt-parent = <&ipic>;
68 dfsrr; 82 dfsrr;
69 }; 83 };
70 84
71 spi@7000 { 85 spi@7000 {
72 device_type = "spi"; 86 cell-index = <0>;
73 compatible = "fsl_spi"; 87 compatible = "fsl,spi";
74 reg = <7000 1000>; 88 reg = <0x7000 0x1000>;
75 interrupts = <10 8>; 89 interrupts = <16 0x8>;
76 interrupt-parent = < &ipic >; 90 interrupt-parent = <&ipic>;
77 mode = "cpu"; 91 mode = "cpu";
78 }; 92 };
79 93
80 usb@23000 { 94 usb@23000 {
81 device_type = "usb";
82 compatible = "fsl-usb2-dr"; 95 compatible = "fsl-usb2-dr";
83 reg = <23000 1000>; 96 reg = <0x23000 0x1000>;
84 #address-cells = <1>; 97 #address-cells = <1>;
85 #size-cells = <0>; 98 #size-cells = <0>;
86 interrupt-parent = < &ipic >; 99 interrupt-parent = <&ipic>;
87 interrupts = <26 8>; 100 interrupts = <38 0x8>;
88 dr_mode = "otg"; 101 dr_mode = "otg";
89 phy_type = "ulpi"; 102 phy_type = "ulpi";
90 }; 103 };
91 104
92 mdio@24520 { 105 mdio@24520 {
93 device_type = "mdio";
94 compatible = "gianfar";
95 reg = <24520 20>;
96 #address-cells = <1>; 106 #address-cells = <1>;
97 #size-cells = <0>; 107 #size-cells = <0>;
108 compatible = "fsl,gianfar-mdio";
109 reg = <0x24520 0x20>;
98 110
99 /* Vitesse 8201 */ 111 /* Vitesse 8201 */
100 phy1c: ethernet-phy@1c { 112 phy1c: ethernet-phy@1c {
101 interrupt-parent = < &ipic >; 113 interrupt-parent = <&ipic>;
102 interrupts = <12 8>; 114 interrupts = <18 0x8>;
103 reg = <1c>; 115 reg = <0x1c>;
104 device_type = "ethernet-phy"; 116 device_type = "ethernet-phy";
105 }; 117 };
106 }; 118 };
107 119
108 ethernet@24000 { 120 enet0: ethernet@24000 {
121 cell-index = <0>;
109 device_type = "network"; 122 device_type = "network";
110 model = "TSEC"; 123 model = "TSEC";
111 compatible = "gianfar"; 124 compatible = "gianfar";
112 reg = <24000 1000>; 125 reg = <0x24000 0x1000>;
113 local-mac-address = [ 00 00 00 00 00 00 ]; 126 local-mac-address = [ 00 00 00 00 00 00 ];
114 interrupts = <20 8 21 8 22 8>; 127 interrupts = <32 0x8 33 0x8 34 0x8>;
115 interrupt-parent = < &ipic >; 128 interrupt-parent = <&ipic>;
116 phy-handle = < &phy1c >; 129 phy-handle = <&phy1c>;
117 linux,network-index = <0>; 130 linux,network-index = <0>;
118 }; 131 };
119 132
120 serial@4500 { 133 serial0: serial@4500 {
134 cell-index = <0>;
121 device_type = "serial"; 135 device_type = "serial";
122 compatible = "ns16550"; 136 compatible = "ns16550";
123 reg = <4500 100>; 137 reg = <0x4500 0x100>;
124 clock-frequency = <0>; // from bootloader 138 clock-frequency = <0>; // from bootloader
125 interrupts = <9 8>; 139 interrupts = <9 0x8>;
126 interrupt-parent = < &ipic >; 140 interrupt-parent = <&ipic>;
127 }; 141 };
128 142
129 serial@4600 { 143 serial1: serial@4600 {
144 cell-index = <1>;
130 device_type = "serial"; 145 device_type = "serial";
131 compatible = "ns16550"; 146 compatible = "ns16550";
132 reg = <4600 100>; 147 reg = <0x4600 0x100>;
133 clock-frequency = <0>; // from bootloader 148 clock-frequency = <0>; // from bootloader
134 interrupts = <a 8>; 149 interrupts = <10 0x8>;
135 interrupt-parent = < &ipic >; 150 interrupt-parent = <&ipic>;
136 }; 151 };
137 152
138 crypto@30000 { 153 crypto@30000 {
139 device_type = "crypto"; 154 device_type = "crypto";
140 model = "SEC2"; 155 model = "SEC2";
141 compatible = "talitos"; 156 compatible = "talitos";
142 reg = <30000 10000>; 157 reg = <0x30000 0x10000>;
143 interrupts = <b 8>; 158 interrupts = <11 0x8>;
144 interrupt-parent = < &ipic >; 159 interrupt-parent = <&ipic>;
145 num-channels = <4>; 160 num-channels = <4>;
146 channel-fifo-len = <18>; 161 channel-fifo-len = <24>;
147 exec-units-mask = <0000007e>; 162 exec-units-mask = <0x0000007e>;
148 descriptor-types-mask = <01010ebf>; 163 descriptor-types-mask = <0x01010ebf>;
149 }; 164 };
150 165
151 ipic: pic@700 { 166 ipic: pic@700 {
152 interrupt-controller; 167 interrupt-controller;
153 #address-cells = <0>; 168 #address-cells = <0>;
154 #interrupt-cells = <2>; 169 #interrupt-cells = <2>;
155 reg = <700 100>; 170 reg = <0x700 0x100>;
156 device_type = "ipic"; 171 device_type = "ipic";
157 }; 172 };
158 }; 173 };
159 174
160 pci@e0008600 { 175 pci0: pci@e0008600 {
161 interrupt-map-mask = <f800 0 0 7>; 176 cell-index = <2>;
177 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
162 interrupt-map = < 178 interrupt-map = <
163 /* IDSEL 0x0F - PCI Slot */ 179 /* IDSEL 0x0F - PCI Slot */
164 7800 0 0 1 &ipic 14 8 /* PCI_INTA */ 180 0x7800 0x0 0x0 0x1 &ipic 20 0x8 /* PCI_INTA */
165 7800 0 0 2 &ipic 15 8 /* PCI_INTB */ 181 0x7800 0x0 0x0 0x2 &ipic 21 0x8 /* PCI_INTB */
166 >; 182 >;
167 interrupt-parent = < &ipic >; 183 interrupt-parent = <&ipic>;
168 interrupts = <43 8>; 184 interrupts = <67 0x8>;
169 bus-range = <1 1>; 185 bus-range = <0x1 0x1>;
170 ranges = <42000000 0 a0000000 a0000000 0 10000000 186 ranges = <0x42000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
171 02000000 0 b0000000 b0000000 0 10000000 187 0x02000000 0x0 0xb0000000 0xb0000000 0x0 0x10000000
172 01000000 0 00000000 e3000000 0 01000000>; 188 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x01000000>;
173 clock-frequency = <3f940aa>; 189 clock-frequency = <66666666>;
174 #interrupt-cells = <1>; 190 #interrupt-cells = <1>;
175 #size-cells = <2>; 191 #size-cells = <2>;
176 #address-cells = <3>; 192 #address-cells = <3>;
177 reg = <e0008600 100>; 193 reg = <0xe0008600 0x100>;
178 compatible = "fsl,mpc8349-pci"; 194 compatible = "fsl,mpc8349-pci";
179 device_type = "pci"; 195 device_type = "pci";
180 }; 196 };
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts
index 49363f89cb71..7480edae85ed 100644
--- a/arch/powerpc/boot/dts/mpc834x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc834x_mds.dts
@@ -9,23 +9,34 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
13
12/ { 14/ {
13 model = "MPC8349EMDS"; 15 model = "MPC8349EMDS";
14 compatible = "MPC8349EMDS", "MPC834xMDS", "MPC83xxMDS"; 16 compatible = "MPC8349EMDS", "MPC834xMDS", "MPC83xxMDS";
15 #address-cells = <1>; 17 #address-cells = <1>;
16 #size-cells = <1>; 18 #size-cells = <1>;
17 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 pci1 = &pci1;
27 };
28
18 cpus { 29 cpus {
19 #address-cells = <1>; 30 #address-cells = <1>;
20 #size-cells = <0>; 31 #size-cells = <0>;
21 32
22 PowerPC,8349@0 { 33 PowerPC,8349@0 {
23 device_type = "cpu"; 34 device_type = "cpu";
24 reg = <0>; 35 reg = <0x0>;
25 d-cache-line-size = <20>; // 32 bytes 36 d-cache-line-size = <32>;
26 i-cache-line-size = <20>; // 32 bytes 37 i-cache-line-size = <32>;
27 d-cache-size = <8000>; // L1, 32K 38 d-cache-size = <32768>;
28 i-cache-size = <8000>; // L1, 32K 39 i-cache-size = <32768>;
29 timebase-frequency = <0>; // from bootloader 40 timebase-frequency = <0>; // from bootloader
30 bus-frequency = <0>; // from bootloader 41 bus-frequency = <0>; // from bootloader
31 clock-frequency = <0>; // from bootloader 42 clock-frequency = <0>; // from bootloader
@@ -34,164 +45,152 @@
34 45
35 memory { 46 memory {
36 device_type = "memory"; 47 device_type = "memory";
37 reg = <00000000 10000000>; // 256MB at 0 48 reg = <0x00000000 0x10000000>; // 256MB at 0
38 }; 49 };
39 50
40 bcsr@e2400000 { 51 bcsr@e2400000 {
41 device_type = "board-control"; 52 device_type = "board-control";
42 reg = <e2400000 8000>; 53 reg = <0xe2400000 0x8000>;
43 }; 54 };
44 55
45 soc8349@e0000000 { 56 soc8349@e0000000 {
46 #address-cells = <1>; 57 #address-cells = <1>;
47 #size-cells = <1>; 58 #size-cells = <1>;
48 device_type = "soc"; 59 device_type = "soc";
49 ranges = <0 e0000000 00100000>; 60 ranges = <0x0 0xe0000000 0x00100000>;
50 reg = <e0000000 00000200>; 61 reg = <0xe0000000 0x00000200>;
51 bus-frequency = <0>; 62 bus-frequency = <0>;
52 63
53 wdt@200 { 64 wdt@200 {
54 device_type = "watchdog"; 65 device_type = "watchdog";
55 compatible = "mpc83xx_wdt"; 66 compatible = "mpc83xx_wdt";
56 reg = <200 100>; 67 reg = <0x200 0x100>;
57 }; 68 };
58 69
59 i2c@3000 { 70 i2c@3000 {
60 #address-cells = <1>; 71 #address-cells = <1>;
61 #size-cells = <0>; 72 #size-cells = <0>;
62 device_type = "i2c"; 73 cell-index = <0>;
63 compatible = "fsl-i2c"; 74 compatible = "fsl-i2c";
64 reg = <3000 100>; 75 reg = <0x3000 0x100>;
65 interrupts = <e 8>; 76 interrupts = <14 0x8>;
66 interrupt-parent = < &ipic >; 77 interrupt-parent = <&ipic>;
67 dfsrr; 78 dfsrr;
68 79
69 rtc@68 { 80 rtc@68 {
70 compatible = "dallas,ds1374"; 81 compatible = "dallas,ds1374";
71 reg = <68>; 82 reg = <0x68>;
72 }; 83 };
73 }; 84 };
74 85
75 i2c@3100 { 86 i2c@3100 {
76 #address-cells = <1>; 87 #address-cells = <1>;
77 #size-cells = <0>; 88 #size-cells = <0>;
78 device_type = "i2c"; 89 cell-index = <1>;
79 compatible = "fsl-i2c"; 90 compatible = "fsl-i2c";
80 reg = <3100 100>; 91 reg = <0x3100 0x100>;
81 interrupts = <f 8>; 92 interrupts = <15 0x8>;
82 interrupt-parent = < &ipic >; 93 interrupt-parent = <&ipic>;
83 dfsrr; 94 dfsrr;
84 }; 95 };
85 96
86 spi@7000 { 97 spi@7000 {
87 device_type = "spi"; 98 cell-index = <0>;
88 compatible = "fsl_spi"; 99 compatible = "fsl,spi";
89 reg = <7000 1000>; 100 reg = <0x7000 0x1000>;
90 interrupts = <10 8>; 101 interrupts = <16 0x8>;
91 interrupt-parent = < &ipic >; 102 interrupt-parent = <&ipic>;
92 mode = "cpu"; 103 mode = "cpu";
93 }; 104 };
94 105
95 /* phy type (ULPI or SERIAL) are only types supportted for MPH */ 106 /* phy type (ULPI or SERIAL) are only types supported for MPH */
96 /* port = 0 or 1 */ 107 /* port = 0 or 1 */
97 usb@22000 { 108 usb@22000 {
98 device_type = "usb";
99 compatible = "fsl-usb2-mph"; 109 compatible = "fsl-usb2-mph";
100 reg = <22000 1000>; 110 reg = <0x22000 0x1000>;
101 #address-cells = <1>; 111 #address-cells = <1>;
102 #size-cells = <0>; 112 #size-cells = <0>;
103 interrupt-parent = < &ipic >; 113 interrupt-parent = <&ipic>;
104 interrupts = <27 8>; 114 interrupts = <39 0x8>;
105 phy_type = "ulpi"; 115 phy_type = "ulpi";
106 port1; 116 port1;
107 }; 117 };
108 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ 118 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
109 usb@23000 { 119 usb@23000 {
110 device_type = "usb";
111 compatible = "fsl-usb2-dr"; 120 compatible = "fsl-usb2-dr";
112 reg = <23000 1000>; 121 reg = <0x23000 0x1000>;
113 #address-cells = <1>; 122 #address-cells = <1>;
114 #size-cells = <0>; 123 #size-cells = <0>;
115 interrupt-parent = < &ipic >; 124 interrupt-parent = <&ipic>;
116 interrupts = <26 8>; 125 interrupts = <38 0x8>;
117 dr_mode = "otg"; 126 dr_mode = "otg";
118 phy_type = "ulpi"; 127 phy_type = "ulpi";
119 }; 128 };
120 129
121 mdio@24520 { 130 mdio@24520 {
122 device_type = "mdio";
123 compatible = "gianfar";
124 reg = <24520 20>;
125 #address-cells = <1>; 131 #address-cells = <1>;
126 #size-cells = <0>; 132 #size-cells = <0>;
133 compatible = "fsl,gianfar-mdio";
134 reg = <0x24520 0x20>;
135
127 phy0: ethernet-phy@0 { 136 phy0: ethernet-phy@0 {
128 interrupt-parent = < &ipic >; 137 interrupt-parent = <&ipic>;
129 interrupts = <11 8>; 138 interrupts = <17 0x8>;
130 reg = <0>; 139 reg = <0x0>;
131 device_type = "ethernet-phy"; 140 device_type = "ethernet-phy";
132 }; 141 };
133 phy1: ethernet-phy@1 { 142 phy1: ethernet-phy@1 {
134 interrupt-parent = < &ipic >; 143 interrupt-parent = <&ipic>;
135 interrupts = <12 8>; 144 interrupts = <18 0x8>;
136 reg = <1>; 145 reg = <0x1>;
137 device_type = "ethernet-phy"; 146 device_type = "ethernet-phy";
138 }; 147 };
139 }; 148 };
140 149
141 ethernet@24000 { 150 enet0: ethernet@24000 {
151 cell-index = <0>;
142 device_type = "network"; 152 device_type = "network";
143 model = "TSEC"; 153 model = "TSEC";
144 compatible = "gianfar"; 154 compatible = "gianfar";
145 reg = <24000 1000>; 155 reg = <0x24000 0x1000>;
146 /*
147 * address is deprecated and will be removed
148 * in 2.6.25. Only recent versions of
149 * U-Boot support local-mac-address, however.
150 */
151 address = [ 00 00 00 00 00 00 ];
152 local-mac-address = [ 00 00 00 00 00 00 ]; 156 local-mac-address = [ 00 00 00 00 00 00 ];
153 interrupts = <20 8 21 8 22 8>; 157 interrupts = <32 0x8 33 0x8 34 0x8>;
154 interrupt-parent = < &ipic >; 158 interrupt-parent = <&ipic>;
155 phy-handle = < &phy0 >; 159 phy-handle = <&phy0>;
156 linux,network-index = <0>; 160 linux,network-index = <0>;
157 }; 161 };
158 162
159 ethernet@25000 { 163 enet1: ethernet@25000 {
160 #address-cells = <1>; 164 cell-index = <1>;
161 #size-cells = <0>;
162 device_type = "network"; 165 device_type = "network";
163 model = "TSEC"; 166 model = "TSEC";
164 compatible = "gianfar"; 167 compatible = "gianfar";
165 reg = <25000 1000>; 168 reg = <0x25000 0x1000>;
166 /*
167 * address is deprecated and will be removed
168 * in 2.6.25. Only recent versions of
169 * U-Boot support local-mac-address, however.
170 */
171 address = [ 00 00 00 00 00 00 ];
172 local-mac-address = [ 00 00 00 00 00 00 ]; 169 local-mac-address = [ 00 00 00 00 00 00 ];
173 interrupts = <23 8 24 8 25 8>; 170 interrupts = <35 0x8 36 0x8 37 0x8>;
174 interrupt-parent = < &ipic >; 171 interrupt-parent = <&ipic>;
175 phy-handle = < &phy1 >; 172 phy-handle = <&phy1>;
176 linux,network-index = <1>; 173 linux,network-index = <1>;
177 }; 174 };
178 175
179 serial@4500 { 176 serial0: serial@4500 {
177 cell-index = <0>;
180 device_type = "serial"; 178 device_type = "serial";
181 compatible = "ns16550"; 179 compatible = "ns16550";
182 reg = <4500 100>; 180 reg = <0x4500 0x100>;
183 clock-frequency = <0>; 181 clock-frequency = <0>;
184 interrupts = <9 8>; 182 interrupts = <9 0x8>;
185 interrupt-parent = < &ipic >; 183 interrupt-parent = <&ipic>;
186 }; 184 };
187 185
188 serial@4600 { 186 serial1: serial@4600 {
187 cell-index = <1>;
189 device_type = "serial"; 188 device_type = "serial";
190 compatible = "ns16550"; 189 compatible = "ns16550";
191 reg = <4600 100>; 190 reg = <0x4600 0x100>;
192 clock-frequency = <0>; 191 clock-frequency = <0>;
193 interrupts = <a 8>; 192 interrupts = <10 0x8>;
194 interrupt-parent = < &ipic >; 193 interrupt-parent = <&ipic>;
195 }; 194 };
196 195
197 /* May need to remove if on a part without crypto engine */ 196 /* May need to remove if on a part without crypto engine */
@@ -199,15 +198,15 @@
199 device_type = "crypto"; 198 device_type = "crypto";
200 model = "SEC2"; 199 model = "SEC2";
201 compatible = "talitos"; 200 compatible = "talitos";
202 reg = <30000 10000>; 201 reg = <0x30000 0x10000>;
203 interrupts = <b 8>; 202 interrupts = <11 0x8>;
204 interrupt-parent = < &ipic >; 203 interrupt-parent = <&ipic>;
205 num-channels = <4>; 204 num-channels = <4>;
206 channel-fifo-len = <18>; 205 channel-fifo-len = <24>;
207 exec-units-mask = <0000007e>; 206 exec-units-mask = <0x0000007e>;
208 /* desc mask is for rev2.0, 207 /* desc mask is for rev2.0,
209 * we need runtime fixup for >2.0 */ 208 * we need runtime fixup for >2.0 */
210 descriptor-types-mask = <01010ebf>; 209 descriptor-types-mask = <0x01010ebf>;
211 }; 210 };
212 211
213 /* IPIC 212 /* IPIC
@@ -220,127 +219,129 @@
220 interrupt-controller; 219 interrupt-controller;
221 #address-cells = <0>; 220 #address-cells = <0>;
222 #interrupt-cells = <2>; 221 #interrupt-cells = <2>;
223 reg = <700 100>; 222 reg = <0x700 0x100>;
224 device_type = "ipic"; 223 device_type = "ipic";
225 }; 224 };
226 }; 225 };
227 226
228 pci@e0008500 { 227 pci0: pci@e0008500 {
229 interrupt-map-mask = <f800 0 0 7>; 228 cell-index = <1>;
229 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
230 interrupt-map = < 230 interrupt-map = <
231 231
232 /* IDSEL 0x11 */ 232 /* IDSEL 0x11 */
233 8800 0 0 1 &ipic 14 8 233 0x8800 0x0 0x0 0x1 &ipic 20 0x8
234 8800 0 0 2 &ipic 15 8 234 0x8800 0x0 0x0 0x2 &ipic 21 0x8
235 8800 0 0 3 &ipic 16 8 235 0x8800 0x0 0x0 0x3 &ipic 22 0x8
236 8800 0 0 4 &ipic 17 8 236 0x8800 0x0 0x0 0x4 &ipic 23 0x8
237 237
238 /* IDSEL 0x12 */ 238 /* IDSEL 0x12 */
239 9000 0 0 1 &ipic 16 8 239 0x9000 0x0 0x0 0x1 &ipic 22 0x8
240 9000 0 0 2 &ipic 17 8 240 0x9000 0x0 0x0 0x2 &ipic 23 0x8
241 9000 0 0 3 &ipic 14 8 241 0x9000 0x0 0x0 0x3 &ipic 20 0x8
242 9000 0 0 4 &ipic 15 8 242 0x9000 0x0 0x0 0x4 &ipic 21 0x8
243 243
244 /* IDSEL 0x13 */ 244 /* IDSEL 0x13 */
245 9800 0 0 1 &ipic 17 8 245 0x9800 0x0 0x0 0x1 &ipic 23 0x8
246 9800 0 0 2 &ipic 14 8 246 0x9800 0x0 0x0 0x2 &ipic 20 0x8
247 9800 0 0 3 &ipic 15 8 247 0x9800 0x0 0x0 0x3 &ipic 21 0x8
248 9800 0 0 4 &ipic 16 8 248 0x9800 0x0 0x0 0x4 &ipic 22 0x8
249 249
250 /* IDSEL 0x15 */ 250 /* IDSEL 0x15 */
251 a800 0 0 1 &ipic 14 8 251 0xa800 0x0 0x0 0x1 &ipic 20 0x8
252 a800 0 0 2 &ipic 15 8 252 0xa800 0x0 0x0 0x2 &ipic 21 0x8
253 a800 0 0 3 &ipic 16 8 253 0xa800 0x0 0x0 0x3 &ipic 22 0x8
254 a800 0 0 4 &ipic 17 8 254 0xa800 0x0 0x0 0x4 &ipic 23 0x8
255 255
256 /* IDSEL 0x16 */ 256 /* IDSEL 0x16 */
257 b000 0 0 1 &ipic 17 8 257 0xb000 0x0 0x0 0x1 &ipic 23 0x8
258 b000 0 0 2 &ipic 14 8 258 0xb000 0x0 0x0 0x2 &ipic 20 0x8
259 b000 0 0 3 &ipic 15 8 259 0xb000 0x0 0x0 0x3 &ipic 21 0x8
260 b000 0 0 4 &ipic 16 8 260 0xb000 0x0 0x0 0x4 &ipic 22 0x8
261 261
262 /* IDSEL 0x17 */ 262 /* IDSEL 0x17 */
263 b800 0 0 1 &ipic 16 8 263 0xb800 0x0 0x0 0x1 &ipic 22 0x8
264 b800 0 0 2 &ipic 17 8 264 0xb800 0x0 0x0 0x2 &ipic 23 0x8
265 b800 0 0 3 &ipic 14 8 265 0xb800 0x0 0x0 0x3 &ipic 20 0x8
266 b800 0 0 4 &ipic 15 8 266 0xb800 0x0 0x0 0x4 &ipic 21 0x8
267 267
268 /* IDSEL 0x18 */ 268 /* IDSEL 0x18 */
269 c000 0 0 1 &ipic 15 8 269 0xc000 0x0 0x0 0x1 &ipic 21 0x8
270 c000 0 0 2 &ipic 16 8 270 0xc000 0x0 0x0 0x2 &ipic 22 0x8
271 c000 0 0 3 &ipic 17 8 271 0xc000 0x0 0x0 0x3 &ipic 23 0x8
272 c000 0 0 4 &ipic 14 8>; 272 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
273 interrupt-parent = < &ipic >; 273 interrupt-parent = <&ipic>;
274 interrupts = <42 8>; 274 interrupts = <66 0x8>;
275 bus-range = <0 0>; 275 bus-range = <0 0>;
276 ranges = <02000000 0 90000000 90000000 0 10000000 276 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
277 42000000 0 80000000 80000000 0 10000000 277 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
278 01000000 0 00000000 e2000000 0 00100000>; 278 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
279 clock-frequency = <3f940aa>; 279 clock-frequency = <66666666>;
280 #interrupt-cells = <1>; 280 #interrupt-cells = <1>;
281 #size-cells = <2>; 281 #size-cells = <2>;
282 #address-cells = <3>; 282 #address-cells = <3>;
283 reg = <e0008500 100>; 283 reg = <0xe0008500 0x100>;
284 compatible = "fsl,mpc8349-pci"; 284 compatible = "fsl,mpc8349-pci";
285 device_type = "pci"; 285 device_type = "pci";
286 }; 286 };
287 287
288 pci@e0008600 { 288 pci1: pci@e0008600 {
289 interrupt-map-mask = <f800 0 0 7>; 289 cell-index = <2>;
290 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
290 interrupt-map = < 291 interrupt-map = <
291 292
292 /* IDSEL 0x11 */ 293 /* IDSEL 0x11 */
293 8800 0 0 1 &ipic 14 8 294 0x8800 0x0 0x0 0x1 &ipic 20 0x8
294 8800 0 0 2 &ipic 15 8 295 0x8800 0x0 0x0 0x2 &ipic 21 0x8
295 8800 0 0 3 &ipic 16 8 296 0x8800 0x0 0x0 0x3 &ipic 22 0x8
296 8800 0 0 4 &ipic 17 8 297 0x8800 0x0 0x0 0x4 &ipic 23 0x8
297 298
298 /* IDSEL 0x12 */ 299 /* IDSEL 0x12 */
299 9000 0 0 1 &ipic 16 8 300 0x9000 0x0 0x0 0x1 &ipic 22 0x8
300 9000 0 0 2 &ipic 17 8 301 0x9000 0x0 0x0 0x2 &ipic 23 0x8
301 9000 0 0 3 &ipic 14 8 302 0x9000 0x0 0x0 0x3 &ipic 20 0x8
302 9000 0 0 4 &ipic 15 8 303 0x9000 0x0 0x0 0x4 &ipic 21 0x8
303 304
304 /* IDSEL 0x13 */ 305 /* IDSEL 0x13 */
305 9800 0 0 1 &ipic 17 8 306 0x9800 0x0 0x0 0x1 &ipic 23 0x8
306 9800 0 0 2 &ipic 14 8 307 0x9800 0x0 0x0 0x2 &ipic 20 0x8
307 9800 0 0 3 &ipic 15 8 308 0x9800 0x0 0x0 0x3 &ipic 21 0x8
308 9800 0 0 4 &ipic 16 8 309 0x9800 0x0 0x0 0x4 &ipic 22 0x8
309 310
310 /* IDSEL 0x15 */ 311 /* IDSEL 0x15 */
311 a800 0 0 1 &ipic 14 8 312 0xa800 0x0 0x0 0x1 &ipic 20 0x8
312 a800 0 0 2 &ipic 15 8 313 0xa800 0x0 0x0 0x2 &ipic 21 0x8
313 a800 0 0 3 &ipic 16 8 314 0xa800 0x0 0x0 0x3 &ipic 22 0x8
314 a800 0 0 4 &ipic 17 8 315 0xa800 0x0 0x0 0x4 &ipic 23 0x8
315 316
316 /* IDSEL 0x16 */ 317 /* IDSEL 0x16 */
317 b000 0 0 1 &ipic 17 8 318 0xb000 0x0 0x0 0x1 &ipic 23 0x8
318 b000 0 0 2 &ipic 14 8 319 0xb000 0x0 0x0 0x2 &ipic 20 0x8
319 b000 0 0 3 &ipic 15 8 320 0xb000 0x0 0x0 0x3 &ipic 21 0x8
320 b000 0 0 4 &ipic 16 8 321 0xb000 0x0 0x0 0x4 &ipic 22 0x8
321 322
322 /* IDSEL 0x17 */ 323 /* IDSEL 0x17 */
323 b800 0 0 1 &ipic 16 8 324 0xb800 0x0 0x0 0x1 &ipic 22 0x8
324 b800 0 0 2 &ipic 17 8 325 0xb800 0x0 0x0 0x2 &ipic 23 0x8
325 b800 0 0 3 &ipic 14 8 326 0xb800 0x0 0x0 0x3 &ipic 20 0x8
326 b800 0 0 4 &ipic 15 8 327 0xb800 0x0 0x0 0x4 &ipic 21 0x8
327 328
328 /* IDSEL 0x18 */ 329 /* IDSEL 0x18 */
329 c000 0 0 1 &ipic 15 8 330 0xc000 0x0 0x0 0x1 &ipic 21 0x8
330 c000 0 0 2 &ipic 16 8 331 0xc000 0x0 0x0 0x2 &ipic 22 0x8
331 c000 0 0 3 &ipic 17 8 332 0xc000 0x0 0x0 0x3 &ipic 23 0x8
332 c000 0 0 4 &ipic 14 8>; 333 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
333 interrupt-parent = < &ipic >; 334 interrupt-parent = <&ipic>;
334 interrupts = <42 8>; 335 interrupts = <66 0x8>;
335 bus-range = <0 0>; 336 bus-range = <0 0>;
336 ranges = <02000000 0 b0000000 b0000000 0 10000000 337 ranges = <0x02000000 0x0 0xb0000000 0xb0000000 0x0 0x10000000
337 42000000 0 a0000000 a0000000 0 10000000 338 0x42000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
338 01000000 0 00000000 e2100000 0 00100000>; 339 0x01000000 0x0 0x00000000 0xe2100000 0x0 0x00100000>;
339 clock-frequency = <3f940aa>; 340 clock-frequency = <66666666>;
340 #interrupt-cells = <1>; 341 #interrupt-cells = <1>;
341 #size-cells = <2>; 342 #size-cells = <2>;
342 #address-cells = <3>; 343 #address-cells = <3>;
343 reg = <e0008600 100>; 344 reg = <0xe0008600 0x100>;
344 compatible = "fsl,mpc8349-pci"; 345 compatible = "fsl,mpc8349-pci";
345 device_type = "pci"; 346 device_type = "pci";
346 }; 347 };
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 0b2d2b588daa..55f03e8dc97f 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -14,122 +14,134 @@
14/memreserve/ 00000000 1000000; 14/memreserve/ 00000000 1000000;
15*/ 15*/
16 16
17/dts-v1/;
18
17/ { 19/ {
18 model = "MPC8360MDS"; 20 model = "MPC8360MDS";
19 compatible = "MPC8360EMDS", "MPC836xMDS", "MPC83xxMDS"; 21 compatible = "MPC8360EMDS", "MPC836xMDS", "MPC83xxMDS";
20 #address-cells = <1>; 22 #address-cells = <1>;
21 #size-cells = <1>; 23 #size-cells = <1>;
22 24
25 aliases {
26 ethernet0 = &enet0;
27 ethernet1 = &enet1;
28 serial0 = &serial0;
29 serial1 = &serial1;
30 pci0 = &pci0;
31 };
32
23 cpus { 33 cpus {
24 #address-cells = <1>; 34 #address-cells = <1>;
25 #size-cells = <0>; 35 #size-cells = <0>;
26 36
27 PowerPC,8360@0 { 37 PowerPC,8360@0 {
28 device_type = "cpu"; 38 device_type = "cpu";
29 reg = <0>; 39 reg = <0x0>;
30 d-cache-line-size = <20>; // 32 bytes 40 d-cache-line-size = <32>; // 32 bytes
31 i-cache-line-size = <20>; // 32 bytes 41 i-cache-line-size = <32>; // 32 bytes
32 d-cache-size = <8000>; // L1, 32K 42 d-cache-size = <32768>; // L1, 32K
33 i-cache-size = <8000>; // L1, 32K 43 i-cache-size = <32768>; // L1, 32K
34 timebase-frequency = <3EF1480>; 44 timebase-frequency = <66000000>;
35 bus-frequency = <FBC5200>; 45 bus-frequency = <264000000>;
36 clock-frequency = <1F78A400>; 46 clock-frequency = <528000000>;
37 }; 47 };
38 }; 48 };
39 49
40 memory { 50 memory {
41 device_type = "memory"; 51 device_type = "memory";
42 reg = <00000000 10000000>; 52 reg = <0x00000000 0x10000000>;
43 }; 53 };
44 54
45 bcsr@f8000000 { 55 bcsr@f8000000 {
46 device_type = "board-control"; 56 device_type = "board-control";
47 reg = <f8000000 8000>; 57 reg = <0xf8000000 0x8000>;
48 }; 58 };
49 59
50 soc8360@e0000000 { 60 soc8360@e0000000 {
51 #address-cells = <1>; 61 #address-cells = <1>;
52 #size-cells = <1>; 62 #size-cells = <1>;
53 device_type = "soc"; 63 device_type = "soc";
54 ranges = <0 e0000000 00100000>; 64 ranges = <0x0 0xe0000000 0x00100000>;
55 reg = <e0000000 00000200>; 65 reg = <0xe0000000 0x00000200>;
56 bus-frequency = <FBC5200>; 66 bus-frequency = <264000000>;
57 67
58 wdt@200 { 68 wdt@200 {
59 device_type = "watchdog"; 69 device_type = "watchdog";
60 compatible = "mpc83xx_wdt"; 70 compatible = "mpc83xx_wdt";
61 reg = <200 100>; 71 reg = <0x200 0x100>;
62 }; 72 };
63 73
64 i2c@3000 { 74 i2c@3000 {
65 #address-cells = <1>; 75 #address-cells = <1>;
66 #size-cells = <0>; 76 #size-cells = <0>;
67 device_type = "i2c"; 77 cell-index = <0>;
68 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
69 reg = <3000 100>; 79 reg = <0x3000 0x100>;
70 interrupts = <e 8>; 80 interrupts = <14 0x8>;
71 interrupt-parent = < &ipic >; 81 interrupt-parent = <&ipic>;
72 dfsrr; 82 dfsrr;
73 83
74 rtc@68 { 84 rtc@68 {
75 compatible = "dallas,ds1374"; 85 compatible = "dallas,ds1374";
76 reg = <68>; 86 reg = <0x68>;
77 }; 87 };
78 }; 88 };
79 89
80 i2c@3100 { 90 i2c@3100 {
81 #address-cells = <1>; 91 #address-cells = <1>;
82 #size-cells = <0>; 92 #size-cells = <0>;
83 device_type = "i2c"; 93 cell-index = <1>;
84 compatible = "fsl-i2c"; 94 compatible = "fsl-i2c";
85 reg = <3100 100>; 95 reg = <0x3100 0x100>;
86 interrupts = <f 8>; 96 interrupts = <15 0x8>;
87 interrupt-parent = < &ipic >; 97 interrupt-parent = <&ipic>;
88 dfsrr; 98 dfsrr;
89 }; 99 };
90 100
91 serial@4500 { 101 serial0: serial@4500 {
102 cell-index = <0>;
92 device_type = "serial"; 103 device_type = "serial";
93 compatible = "ns16550"; 104 compatible = "ns16550";
94 reg = <4500 100>; 105 reg = <0x4500 0x100>;
95 clock-frequency = <FBC5200>; 106 clock-frequency = <264000000>;
96 interrupts = <9 8>; 107 interrupts = <9 0x8>;
97 interrupt-parent = < &ipic >; 108 interrupt-parent = <&ipic>;
98 }; 109 };
99 110
100 serial@4600 { 111 serial1: serial@4600 {
112 cell-index = <1>;
101 device_type = "serial"; 113 device_type = "serial";
102 compatible = "ns16550"; 114 compatible = "ns16550";
103 reg = <4600 100>; 115 reg = <0x4600 0x100>;
104 clock-frequency = <FBC5200>; 116 clock-frequency = <264000000>;
105 interrupts = <a 8>; 117 interrupts = <10 0x8>;
106 interrupt-parent = < &ipic >; 118 interrupt-parent = <&ipic>;
107 }; 119 };
108 120
109 crypto@30000 { 121 crypto@30000 {
110 device_type = "crypto"; 122 device_type = "crypto";
111 model = "SEC2"; 123 model = "SEC2";
112 compatible = "talitos"; 124 compatible = "talitos";
113 reg = <30000 10000>; 125 reg = <0x30000 0x10000>;
114 interrupts = <b 8>; 126 interrupts = <11 0x8>;
115 interrupt-parent = < &ipic >; 127 interrupt-parent = <&ipic>;
116 num-channels = <4>; 128 num-channels = <4>;
117 channel-fifo-len = <18>; 129 channel-fifo-len = <24>;
118 exec-units-mask = <0000007e>; 130 exec-units-mask = <0x0000007e>;
119 /* desc mask is for rev1.x, we need runtime fixup for >=2.x */ 131 /* desc mask is for rev1.x, we need runtime fixup for >=2.x */
120 descriptor-types-mask = <01010ebf>; 132 descriptor-types-mask = <0x01010ebf>;
121 }; 133 };
122 134
123 ipic: pic@700 { 135 ipic: pic@700 {
124 interrupt-controller; 136 interrupt-controller;
125 #address-cells = <0>; 137 #address-cells = <0>;
126 #interrupt-cells = <2>; 138 #interrupt-cells = <2>;
127 reg = <700 100>; 139 reg = <0x700 0x100>;
128 device_type = "ipic"; 140 device_type = "ipic";
129 }; 141 };
130 142
131 par_io@1400 { 143 par_io@1400 {
132 reg = <1400 100>; 144 reg = <0x1400 0x100>;
133 device_type = "par_io"; 145 device_type = "par_io";
134 num-ports = <7>; 146 num-ports = <7>;
135 147
@@ -143,19 +155,19 @@
143 1 6 1 0 3 0 /* TxD4 */ 155 1 6 1 0 3 0 /* TxD4 */
144 1 7 1 0 1 0 /* TxD5 */ 156 1 7 1 0 1 0 /* TxD5 */
145 1 9 1 0 2 0 /* TxD6 */ 157 1 9 1 0 2 0 /* TxD6 */
146 1 a 1 0 2 0 /* TxD7 */ 158 1 10 1 0 2 0 /* TxD7 */
147 0 9 2 0 1 0 /* RxD0 */ 159 0 9 2 0 1 0 /* RxD0 */
148 0 a 2 0 1 0 /* RxD1 */ 160 0 10 2 0 1 0 /* RxD1 */
149 0 b 2 0 1 0 /* RxD2 */ 161 0 11 2 0 1 0 /* RxD2 */
150 0 c 2 0 1 0 /* RxD3 */ 162 0 12 2 0 1 0 /* RxD3 */
151 0 d 2 0 1 0 /* RxD4 */ 163 0 13 2 0 1 0 /* RxD4 */
152 1 1 2 0 2 0 /* RxD5 */ 164 1 1 2 0 2 0 /* RxD5 */
153 1 0 2 0 2 0 /* RxD6 */ 165 1 0 2 0 2 0 /* RxD6 */
154 1 4 2 0 2 0 /* RxD7 */ 166 1 4 2 0 2 0 /* RxD7 */
155 0 7 1 0 1 0 /* TX_EN */ 167 0 7 1 0 1 0 /* TX_EN */
156 0 8 1 0 1 0 /* TX_ER */ 168 0 8 1 0 1 0 /* TX_ER */
157 0 f 2 0 1 0 /* RX_DV */ 169 0 15 2 0 1 0 /* RX_DV */
158 0 10 2 0 1 0 /* RX_ER */ 170 0 16 2 0 1 0 /* RX_ER */
159 0 0 2 0 1 0 /* RX_CLK */ 171 0 0 2 0 1 0 /* RX_CLK */
160 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ 172 2 9 1 0 3 0 /* GTX_CLK - CLK10 */
161 2 8 2 0 1 0>; /* GTX125 - CLK9 */ 173 2 8 2 0 1 0>; /* GTX125 - CLK9 */
@@ -163,27 +175,27 @@
163 pio2: ucc_pin@02 { 175 pio2: ucc_pin@02 {
164 pio-map = < 176 pio-map = <
165 /* port pin dir open_drain assignment has_irq */ 177 /* port pin dir open_drain assignment has_irq */
166 0 11 1 0 1 0 /* TxD0 */ 178 0 17 1 0 1 0 /* TxD0 */
167 0 12 1 0 1 0 /* TxD1 */ 179 0 18 1 0 1 0 /* TxD1 */
168 0 13 1 0 1 0 /* TxD2 */ 180 0 19 1 0 1 0 /* TxD2 */
169 0 14 1 0 1 0 /* TxD3 */ 181 0 20 1 0 1 0 /* TxD3 */
170 1 2 1 0 1 0 /* TxD4 */ 182 1 2 1 0 1 0 /* TxD4 */
171 1 3 1 0 2 0 /* TxD5 */ 183 1 3 1 0 2 0 /* TxD5 */
172 1 5 1 0 3 0 /* TxD6 */ 184 1 5 1 0 3 0 /* TxD6 */
173 1 8 1 0 3 0 /* TxD7 */ 185 1 8 1 0 3 0 /* TxD7 */
174 0 17 2 0 1 0 /* RxD0 */ 186 0 23 2 0 1 0 /* RxD0 */
175 0 18 2 0 1 0 /* RxD1 */ 187 0 24 2 0 1 0 /* RxD1 */
176 0 19 2 0 1 0 /* RxD2 */ 188 0 25 2 0 1 0 /* RxD2 */
177 0 1a 2 0 1 0 /* RxD3 */ 189 0 26 2 0 1 0 /* RxD3 */
178 0 1b 2 0 1 0 /* RxD4 */ 190 0 27 2 0 1 0 /* RxD4 */
179 1 c 2 0 2 0 /* RxD5 */ 191 1 12 2 0 2 0 /* RxD5 */
180 1 d 2 0 3 0 /* RxD6 */ 192 1 13 2 0 3 0 /* RxD6 */
181 1 b 2 0 2 0 /* RxD7 */ 193 1 11 2 0 2 0 /* RxD7 */
182 0 15 1 0 1 0 /* TX_EN */ 194 0 21 1 0 1 0 /* TX_EN */
183 0 16 1 0 1 0 /* TX_ER */ 195 0 22 1 0 1 0 /* TX_ER */
184 0 1d 2 0 1 0 /* RX_DV */ 196 0 29 2 0 1 0 /* RX_DV */
185 0 1e 2 0 1 0 /* RX_ER */ 197 0 30 2 0 1 0 /* RX_ER */
186 0 1f 2 0 1 0 /* RX_CLK */ 198 0 31 2 0 1 0 /* RX_CLK */
187 2 2 1 0 2 0 /* GTX_CLK - CLK10 */ 199 2 2 1 0 2 0 /* GTX_CLK - CLK10 */
188 2 3 2 0 1 0 /* GTX125 - CLK4 */ 200 2 3 2 0 1 0 /* GTX125 - CLK4 */
189 0 1 3 0 2 0 /* MDIO */ 201 0 1 3 0 2 0 /* MDIO */
@@ -197,181 +209,174 @@
197 #address-cells = <1>; 209 #address-cells = <1>;
198 #size-cells = <1>; 210 #size-cells = <1>;
199 device_type = "qe"; 211 device_type = "qe";
200 model = "QE"; 212 compatible = "fsl,qe";
201 ranges = <0 e0100000 00100000>; 213 ranges = <0x0 0xe0100000 0x00100000>;
202 reg = <e0100000 480>; 214 reg = <0xe0100000 0x480>;
203 brg-frequency = <0>; 215 brg-frequency = <0>;
204 bus-frequency = <179A7B00>; 216 bus-frequency = <396000000>;
205 217
206 muram@10000 { 218 muram@10000 {
207 device_type = "muram"; 219 #address-cells = <1>;
208 ranges = <0 00010000 0000c000>; 220 #size-cells = <1>;
209 221 compatible = "fsl,qe-muram", "fsl,cpm-muram";
210 data-only@0{ 222 ranges = <0x0 0x00010000 0x0000c000>;
211 reg = <0 c000>; 223
224 data-only@0 {
225 compatible = "fsl,qe-muram-data",
226 "fsl,cpm-muram-data";
227 reg = <0x0 0xc000>;
212 }; 228 };
213 }; 229 };
214 230
215 spi@4c0 { 231 spi@4c0 {
216 device_type = "spi"; 232 cell-index = <0>;
217 compatible = "fsl_spi"; 233 compatible = "fsl,spi";
218 reg = <4c0 40>; 234 reg = <0x4c0 0x40>;
219 interrupts = <2>; 235 interrupts = <2>;
220 interrupt-parent = < &qeic >; 236 interrupt-parent = <&qeic>;
221 mode = "cpu"; 237 mode = "cpu";
222 }; 238 };
223 239
224 spi@500 { 240 spi@500 {
225 device_type = "spi"; 241 cell-index = <1>;
226 compatible = "fsl_spi"; 242 compatible = "fsl,spi";
227 reg = <500 40>; 243 reg = <0x500 0x40>;
228 interrupts = <1>; 244 interrupts = <1>;
229 interrupt-parent = < &qeic >; 245 interrupt-parent = <&qeic>;
230 mode = "cpu"; 246 mode = "cpu";
231 }; 247 };
232 248
233 usb@6c0 { 249 usb@6c0 {
234 device_type = "usb";
235 compatible = "qe_udc"; 250 compatible = "qe_udc";
236 reg = <6c0 40 8B00 100>; 251 reg = <0x6c0 0x40 0x8b00 0x100>;
237 interrupts = <b>; 252 interrupts = <11>;
238 interrupt-parent = < &qeic >; 253 interrupt-parent = <&qeic>;
239 mode = "slave"; 254 mode = "slave";
240 }; 255 };
241 256
242 ucc@2000 { 257 enet0: ucc@2000 {
243 device_type = "network"; 258 device_type = "network";
244 compatible = "ucc_geth"; 259 compatible = "ucc_geth";
245 model = "UCC"; 260 model = "UCC";
261 cell-index = <1>;
246 device-id = <1>; 262 device-id = <1>;
247 reg = <2000 200>; 263 reg = <0x2000 0x200>;
248 interrupts = <20>; 264 interrupts = <32>;
249 interrupt-parent = < &qeic >; 265 interrupt-parent = <&qeic>;
250 /*
251 * mac-address is deprecated and will be removed
252 * in 2.6.25. Only recent versions of
253 * U-Boot support local-mac-address, however.
254 */
255 mac-address = [ 00 00 00 00 00 00 ];
256 local-mac-address = [ 00 00 00 00 00 00 ]; 266 local-mac-address = [ 00 00 00 00 00 00 ];
257 rx-clock = <0>; 267 rx-clock-name = "none";
258 tx-clock = <19>; 268 tx-clock-name = "clk9";
259 phy-handle = < &phy0 >; 269 phy-handle = <&phy0>;
260 phy-connection-type = "rgmii-id"; 270 phy-connection-type = "rgmii-id";
261 pio-handle = < &pio1 >; 271 pio-handle = <&pio1>;
262 }; 272 };
263 273
264 ucc@3000 { 274 enet1: ucc@3000 {
265 device_type = "network"; 275 device_type = "network";
266 compatible = "ucc_geth"; 276 compatible = "ucc_geth";
267 model = "UCC"; 277 model = "UCC";
278 cell-index = <2>;
268 device-id = <2>; 279 device-id = <2>;
269 reg = <3000 200>; 280 reg = <0x3000 0x200>;
270 interrupts = <21>; 281 interrupts = <33>;
271 interrupt-parent = < &qeic >; 282 interrupt-parent = <&qeic>;
272 /*
273 * mac-address is deprecated and will be removed
274 * in 2.6.25. Only recent versions of
275 * U-Boot support local-mac-address, however.
276 */
277 mac-address = [ 00 00 00 00 00 00 ];
278 local-mac-address = [ 00 00 00 00 00 00 ]; 283 local-mac-address = [ 00 00 00 00 00 00 ];
279 rx-clock = <0>; 284 rx-clock-name = "none";
280 tx-clock = <14>; 285 tx-clock-name = "clk4";
281 phy-handle = < &phy1 >; 286 phy-handle = <&phy1>;
282 phy-connection-type = "rgmii-id"; 287 phy-connection-type = "rgmii-id";
283 pio-handle = < &pio2 >; 288 pio-handle = <&pio2>;
284 }; 289 };
285 290
286 mdio@2120 { 291 mdio@2120 {
287 #address-cells = <1>; 292 #address-cells = <1>;
288 #size-cells = <0>; 293 #size-cells = <0>;
289 reg = <2120 18>; 294 reg = <0x2120 0x18>;
290 device_type = "mdio"; 295 compatible = "fsl,ucc-mdio";
291 compatible = "ucc_geth_phy";
292 296
293 phy0: ethernet-phy@00 { 297 phy0: ethernet-phy@00 {
294 interrupt-parent = < &ipic >; 298 interrupt-parent = <&ipic>;
295 interrupts = <11 8>; 299 interrupts = <17 0x8>;
296 reg = <0>; 300 reg = <0x0>;
297 device_type = "ethernet-phy"; 301 device_type = "ethernet-phy";
298 }; 302 };
299 phy1: ethernet-phy@01 { 303 phy1: ethernet-phy@01 {
300 interrupt-parent = < &ipic >; 304 interrupt-parent = <&ipic>;
301 interrupts = <12 8>; 305 interrupts = <18 0x8>;
302 reg = <1>; 306 reg = <0x1>;
303 device_type = "ethernet-phy"; 307 device_type = "ethernet-phy";
304 }; 308 };
305 }; 309 };
306 310
307 qeic: qeic@80 { 311 qeic: interrupt-controller@80 {
308 interrupt-controller; 312 interrupt-controller;
309 device_type = "qeic"; 313 compatible = "fsl,qe-ic";
310 #address-cells = <0>; 314 #address-cells = <0>;
311 #interrupt-cells = <1>; 315 #interrupt-cells = <1>;
312 reg = <80 80>; 316 reg = <0x80 0x80>;
313 big-endian; 317 big-endian;
314 interrupts = <20 8 21 8>; //high:32 low:33 318 interrupts = <32 0x8 33 0x8>; // high:32 low:33
315 interrupt-parent = < &ipic >; 319 interrupt-parent = <&ipic>;
316 }; 320 };
317 }; 321 };
318 322
319 pci@e0008500 { 323 pci0: pci@e0008500 {
320 interrupt-map-mask = <f800 0 0 7>; 324 cell-index = <1>;
325 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
321 interrupt-map = < 326 interrupt-map = <
322 327
323 /* IDSEL 0x11 AD17 */ 328 /* IDSEL 0x11 AD17 */
324 8800 0 0 1 &ipic 14 8 329 0x8800 0x0 0x0 0x1 &ipic 20 0x8
325 8800 0 0 2 &ipic 15 8 330 0x8800 0x0 0x0 0x2 &ipic 21 0x8
326 8800 0 0 3 &ipic 16 8 331 0x8800 0x0 0x0 0x3 &ipic 22 0x8
327 8800 0 0 4 &ipic 17 8 332 0x8800 0x0 0x0 0x4 &ipic 23 0x8
328 333
329 /* IDSEL 0x12 AD18 */ 334 /* IDSEL 0x12 AD18 */
330 9000 0 0 1 &ipic 16 8 335 0x9000 0x0 0x0 0x1 &ipic 22 0x8
331 9000 0 0 2 &ipic 17 8 336 0x9000 0x0 0x0 0x2 &ipic 23 0x8
332 9000 0 0 3 &ipic 14 8 337 0x9000 0x0 0x0 0x3 &ipic 20 0x8
333 9000 0 0 4 &ipic 15 8 338 0x9000 0x0 0x0 0x4 &ipic 21 0x8
334 339
335 /* IDSEL 0x13 AD19 */ 340 /* IDSEL 0x13 AD19 */
336 9800 0 0 1 &ipic 17 8 341 0x9800 0x0 0x0 0x1 &ipic 23 0x8
337 9800 0 0 2 &ipic 14 8 342 0x9800 0x0 0x0 0x2 &ipic 20 0x8
338 9800 0 0 3 &ipic 15 8 343 0x9800 0x0 0x0 0x3 &ipic 21 0x8
339 9800 0 0 4 &ipic 16 8 344 0x9800 0x0 0x0 0x4 &ipic 22 0x8
340 345
341 /* IDSEL 0x15 AD21*/ 346 /* IDSEL 0x15 AD21*/
342 a800 0 0 1 &ipic 14 8 347 0xa800 0x0 0x0 0x1 &ipic 20 0x8
343 a800 0 0 2 &ipic 15 8 348 0xa800 0x0 0x0 0x2 &ipic 21 0x8
344 a800 0 0 3 &ipic 16 8 349 0xa800 0x0 0x0 0x3 &ipic 22 0x8
345 a800 0 0 4 &ipic 17 8 350 0xa800 0x0 0x0 0x4 &ipic 23 0x8
346 351
347 /* IDSEL 0x16 AD22*/ 352 /* IDSEL 0x16 AD22*/
348 b000 0 0 1 &ipic 17 8 353 0xb000 0x0 0x0 0x1 &ipic 23 0x8
349 b000 0 0 2 &ipic 14 8 354 0xb000 0x0 0x0 0x2 &ipic 20 0x8
350 b000 0 0 3 &ipic 15 8 355 0xb000 0x0 0x0 0x3 &ipic 21 0x8
351 b000 0 0 4 &ipic 16 8 356 0xb000 0x0 0x0 0x4 &ipic 22 0x8
352 357
353 /* IDSEL 0x17 AD23*/ 358 /* IDSEL 0x17 AD23*/
354 b800 0 0 1 &ipic 16 8 359 0xb800 0x0 0x0 0x1 &ipic 22 0x8
355 b800 0 0 2 &ipic 17 8 360 0xb800 0x0 0x0 0x2 &ipic 23 0x8
356 b800 0 0 3 &ipic 14 8 361 0xb800 0x0 0x0 0x3 &ipic 20 0x8
357 b800 0 0 4 &ipic 15 8 362 0xb800 0x0 0x0 0x4 &ipic 21 0x8
358 363
359 /* IDSEL 0x18 AD24*/ 364 /* IDSEL 0x18 AD24*/
360 c000 0 0 1 &ipic 15 8 365 0xc000 0x0 0x0 0x1 &ipic 21 0x8
361 c000 0 0 2 &ipic 16 8 366 0xc000 0x0 0x0 0x2 &ipic 22 0x8
362 c000 0 0 3 &ipic 17 8 367 0xc000 0x0 0x0 0x3 &ipic 23 0x8
363 c000 0 0 4 &ipic 14 8>; 368 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
364 interrupt-parent = < &ipic >; 369 interrupt-parent = <&ipic>;
365 interrupts = <42 8>; 370 interrupts = <66 0x8>;
366 bus-range = <0 0>; 371 bus-range = <0 0>;
367 ranges = <02000000 0 a0000000 a0000000 0 10000000 372 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
368 42000000 0 80000000 80000000 0 10000000 373 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
369 01000000 0 00000000 e2000000 0 00100000>; 374 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
370 clock-frequency = <3f940aa>; 375 clock-frequency = <66666666>;
371 #interrupt-cells = <1>; 376 #interrupt-cells = <1>;
372 #size-cells = <2>; 377 #size-cells = <2>;
373 #address-cells = <3>; 378 #address-cells = <3>;
374 reg = <e0008500 100>; 379 reg = <0xe0008500 0x100>;
375 compatible = "fsl,mpc8349-pci"; 380 compatible = "fsl,mpc8349-pci";
376 device_type = "pci"; 381 device_type = "pci";
377 }; 382 };
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts
new file mode 100644
index 000000000000..a3637fff73cc
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8377_mds.dts
@@ -0,0 +1,280 @@
1/*
2 * MPC8377E 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/dts-v1/;
13
14/ {
15 model = "fsl,mpc8377emds";
16 compatible = "fsl,mpc8377emds","fsl,mpc837xmds";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8377@0 {
33 device_type = "cpu";
34 reg = <0x0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <32768>;
38 i-cache-size = <32768>;
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x20000000>; // 512MB at 0
48 };
49
50 soc@e0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 ranges = <0x0 0xe0000000 0x00100000>;
55 reg = <0xe0000000 0x00000200>;
56 bus-frequency = <0>;
57
58 wdt@200 {
59 compatible = "mpc83xx_wdt";
60 reg = <0x200 0x100>;
61 };
62
63 i2c@3000 {
64 #address-cells = <1>;
65 #size-cells = <0>;
66 cell-index = <0>;
67 compatible = "fsl-i2c";
68 reg = <0x3000 0x100>;
69 interrupts = <14 0x8>;
70 interrupt-parent = <&ipic>;
71 dfsrr;
72 };
73
74 i2c@3100 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <1>;
78 compatible = "fsl-i2c";
79 reg = <0x3100 0x100>;
80 interrupts = <15 0x8>;
81 interrupt-parent = <&ipic>;
82 dfsrr;
83 };
84
85 spi@7000 {
86 cell-index = <0>;
87 compatible = "fsl,spi";
88 reg = <0x7000 0x1000>;
89 interrupts = <16 0x8>;
90 interrupt-parent = <&ipic>;
91 mode = "cpu";
92 };
93
94 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
95 usb@23000 {
96 compatible = "fsl-usb2-dr";
97 reg = <0x23000 0x1000>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100 interrupt-parent = <&ipic>;
101 interrupts = <38 0x8>;
102 phy_type = "utmi_wide";
103 };
104
105 mdio@24520 {
106 #address-cells = <1>;
107 #size-cells = <0>;
108 compatible = "fsl,gianfar-mdio";
109 reg = <0x24520 0x20>;
110 phy2: ethernet-phy@2 {
111 interrupt-parent = <&ipic>;
112 interrupts = <17 0x8>;
113 reg = <0x2>;
114 device_type = "ethernet-phy";
115 };
116 phy3: ethernet-phy@3 {
117 interrupt-parent = <&ipic>;
118 interrupts = <18 0x8>;
119 reg = <0x3>;
120 device_type = "ethernet-phy";
121 };
122 };
123
124 enet0: ethernet@24000 {
125 cell-index = <0>;
126 device_type = "network";
127 model = "eTSEC";
128 compatible = "gianfar";
129 reg = <0x24000 0x1000>;
130 local-mac-address = [ 00 00 00 00 00 00 ];
131 interrupts = <32 0x8 33 0x8 34 0x8>;
132 phy-connection-type = "mii";
133 interrupt-parent = <&ipic>;
134 phy-handle = <&phy2>;
135 };
136
137 enet1: ethernet@25000 {
138 cell-index = <1>;
139 device_type = "network";
140 model = "eTSEC";
141 compatible = "gianfar";
142 reg = <0x25000 0x1000>;
143 local-mac-address = [ 00 00 00 00 00 00 ];
144 interrupts = <35 0x8 36 0x8 37 0x8>;
145 phy-connection-type = "mii";
146 interrupt-parent = <&ipic>;
147 phy-handle = <&phy3>;
148 };
149
150 serial0: serial@4500 {
151 cell-index = <0>;
152 device_type = "serial";
153 compatible = "ns16550";
154 reg = <0x4500 0x100>;
155 clock-frequency = <0>;
156 interrupts = <9 0x8>;
157 interrupt-parent = <&ipic>;
158 };
159
160 serial1: serial@4600 {
161 cell-index = <1>;
162 device_type = "serial";
163 compatible = "ns16550";
164 reg = <0x4600 0x100>;
165 clock-frequency = <0>;
166 interrupts = <10 0x8>;
167 interrupt-parent = <&ipic>;
168 };
169
170 crypto@30000 {
171 model = "SEC3";
172 compatible = "talitos";
173 reg = <0x30000 0x10000>;
174 interrupts = <11 0x8>;
175 interrupt-parent = <&ipic>;
176 /* Rev. 3.0 geometry */
177 num-channels = <4>;
178 channel-fifo-len = <24>;
179 exec-units-mask = <0x000001fe>;
180 descriptor-types-mask = <0x03ab0ebf>;
181 };
182
183 sdhc@2e000 {
184 model = "eSDHC";
185 compatible = "fsl,esdhc";
186 reg = <0x2e000 0x1000>;
187 interrupts = <42 0x8>;
188 interrupt-parent = <&ipic>;
189 };
190
191 sata@18000 {
192 compatible = "fsl,mpc8379-sata";
193 reg = <0x18000 0x1000>;
194 interrupts = <44 0x8>;
195 interrupt-parent = <&ipic>;
196 };
197
198 sata@19000 {
199 compatible = "fsl,mpc8379-sata";
200 reg = <0x19000 0x1000>;
201 interrupts = <45 0x8>;
202 interrupt-parent = <&ipic>;
203 };
204
205 /* IPIC
206 * interrupts cell = <intr #, sense>
207 * sense values match linux IORESOURCE_IRQ_* defines:
208 * sense == 8: Level, low assertion
209 * sense == 2: Edge, high-to-low change
210 */
211 ipic: pic@700 {
212 compatible = "fsl,ipic";
213 interrupt-controller;
214 #address-cells = <0>;
215 #interrupt-cells = <2>;
216 reg = <0x700 0x100>;
217 };
218 };
219
220 pci0: pci@e0008500 {
221 cell-index = <0>;
222 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
223 interrupt-map = <
224
225 /* IDSEL 0x11 */
226 0x8800 0x0 0x0 0x1 &ipic 20 0x8
227 0x8800 0x0 0x0 0x2 &ipic 21 0x8
228 0x8800 0x0 0x0 0x3 &ipic 22 0x8
229 0x8800 0x0 0x0 0x4 &ipic 23 0x8
230
231 /* IDSEL 0x12 */
232 0x9000 0x0 0x0 0x1 &ipic 22 0x8
233 0x9000 0x0 0x0 0x2 &ipic 23 0x8
234 0x9000 0x0 0x0 0x3 &ipic 20 0x8
235 0x9000 0x0 0x0 0x4 &ipic 21 0x8
236
237 /* IDSEL 0x13 */
238 0x9800 0x0 0x0 0x1 &ipic 23 0x8
239 0x9800 0x0 0x0 0x2 &ipic 20 0x8
240 0x9800 0x0 0x0 0x3 &ipic 21 0x8
241 0x9800 0x0 0x0 0x4 &ipic 22 0x8
242
243 /* IDSEL 0x15 */
244 0xa800 0x0 0x0 0x1 &ipic 20 0x8
245 0xa800 0x0 0x0 0x2 &ipic 21 0x8
246 0xa800 0x0 0x0 0x3 &ipic 22 0x8
247 0xa800 0x0 0x0 0x4 &ipic 23 0x8
248
249 /* IDSEL 0x16 */
250 0xb000 0x0 0x0 0x1 &ipic 23 0x8
251 0xb000 0x0 0x0 0x2 &ipic 20 0x8
252 0xb000 0x0 0x0 0x3 &ipic 21 0x8
253 0xb000 0x0 0x0 0x4 &ipic 22 0x8
254
255 /* IDSEL 0x17 */
256 0xb800 0x0 0x0 0x1 &ipic 22 0x8
257 0xb800 0x0 0x0 0x2 &ipic 23 0x8
258 0xb800 0x0 0x0 0x3 &ipic 20 0x8
259 0xb800 0x0 0x0 0x4 &ipic 21 0x8
260
261 /* IDSEL 0x18 */
262 0xc000 0x0 0x0 0x1 &ipic 21 0x8
263 0xc000 0x0 0x0 0x2 &ipic 22 0x8
264 0xc000 0x0 0x0 0x3 &ipic 23 0x8
265 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
266 interrupt-parent = <&ipic>;
267 interrupts = <66 0x8>;
268 bus-range = <0x0 0x0>;
269 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
270 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
271 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
272 clock-frequency = <0>;
273 #interrupt-cells = <1>;
274 #size-cells = <2>;
275 #address-cells = <3>;
276 reg = <0xe0008500 0x100>;
277 compatible = "fsl,mpc8349-pci";
278 device_type = "pci";
279 };
280};
diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts
new file mode 100644
index 000000000000..440aa4dfab0c
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts
@@ -0,0 +1,296 @@
1/*
2 * MPC8377E RDB Device Tree Source
3 *
4 * Copyright 2007, 2008 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/dts-v1/;
13
14/ {
15 compatible = "fsl,mpc8377rdb";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 PowerPC,8377@0 {
32 device_type = "cpu";
33 reg = <0x0>;
34 d-cache-line-size = <32>;
35 i-cache-line-size = <32>;
36 d-cache-size = <32768>;
37 i-cache-size = <32768>;
38 timebase-frequency = <0>;
39 bus-frequency = <0>;
40 clock-frequency = <0>;
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x10000000>; // 256MB at 0
47 };
48
49 localbus@e0005000 {
50 #address-cells = <2>;
51 #size-cells = <1>;
52 compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus";
53 reg = <0xe0005000 0x1000>;
54 interrupts = <77 0x8>;
55 interrupt-parent = <&ipic>;
56
57 // CS0 and CS1 are swapped when
58 // booting from nand, but the
59 // addresses are the same.
60 ranges = <0x0 0x0 0xfe000000 0x00800000
61 0x1 0x0 0xe0600000 0x00008000
62 0x2 0x0 0xf0000000 0x00020000
63 0x3 0x0 0xfa000000 0x00008000>;
64
65 flash@0,0 {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "cfi-flash";
69 reg = <0x0 0x0 0x800000>;
70 bank-width = <2>;
71 device-width = <1>;
72 };
73
74 nand@1,0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "fsl,mpc8377-fcm-nand",
78 "fsl,elbc-fcm-nand";
79 reg = <0x1 0x0 0x8000>;
80
81 u-boot@0 {
82 reg = <0x0 0x100000>;
83 read-only;
84 };
85
86 kernel@100000 {
87 reg = <0x100000 0x300000>;
88 };
89 fs@400000 {
90 reg = <0x400000 0x1c00000>;
91 };
92 };
93 };
94
95 immr@e0000000 {
96 #address-cells = <1>;
97 #size-cells = <1>;
98 device_type = "soc";
99 compatible = "simple-bus";
100 ranges = <0x0 0xe0000000 0x00100000>;
101 reg = <0xe0000000 0x00000200>;
102 bus-frequency = <0>;
103
104 wdt@200 {
105 device_type = "watchdog";
106 compatible = "mpc83xx_wdt";
107 reg = <0x200 0x100>;
108 };
109
110 i2c@3000 {
111 #address-cells = <1>;
112 #size-cells = <0>;
113 cell-index = <0>;
114 compatible = "fsl-i2c";
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>;
118 dfsrr;
119 rtc@68 {
120 device_type = "rtc";
121 compatible = "dallas,ds1339";
122 reg = <0x68>;
123 };
124 };
125
126 i2c@3100 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 cell-index = <1>;
130 compatible = "fsl-i2c";
131 reg = <0x3100 0x100>;
132 interrupts = <15 0x8>;
133 interrupt-parent = <&ipic>;
134 dfsrr;
135 };
136
137 spi@7000 {
138 cell-index = <0>;
139 compatible = "fsl,spi";
140 reg = <0x7000 0x1000>;
141 interrupts = <16 0x8>;
142 interrupt-parent = <&ipic>;
143 mode = "cpu";
144 };
145
146 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
147 usb@23000 {
148 compatible = "fsl-usb2-dr";
149 reg = <0x23000 0x1000>;
150 #address-cells = <1>;
151 #size-cells = <0>;
152 interrupt-parent = <&ipic>;
153 interrupts = <38 0x8>;
154 phy_type = "utmi";
155 };
156
157 mdio@24520 {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 compatible = "fsl,gianfar-mdio";
161 reg = <0x24520 0x20>;
162 phy2: ethernet-phy@2 {
163 interrupt-parent = <&ipic>;
164 interrupts = <17 0x8>;
165 reg = <0x2>;
166 device_type = "ethernet-phy";
167 };
168 phy3: ethernet-phy@3 {
169 interrupt-parent = <&ipic>;
170 interrupts = <18 0x8>;
171 reg = <0x3>;
172 device_type = "ethernet-phy";
173 };
174 };
175
176 enet0: ethernet@24000 {
177 cell-index = <0>;
178 device_type = "network";
179 model = "eTSEC";
180 compatible = "gianfar";
181 reg = <0x24000 0x1000>;
182 local-mac-address = [ 00 00 00 00 00 00 ];
183 interrupts = <32 0x8 33 0x8 34 0x8>;
184 phy-connection-type = "mii";
185 interrupt-parent = <&ipic>;
186 phy-handle = <&phy2>;
187 };
188
189 enet1: ethernet@25000 {
190 cell-index = <1>;
191 device_type = "network";
192 model = "eTSEC";
193 compatible = "gianfar";
194 reg = <0x25000 0x1000>;
195 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <35 0x8 36 0x8 37 0x8>;
197 phy-connection-type = "mii";
198 interrupt-parent = <&ipic>;
199 phy-handle = <&phy3>;
200 };
201
202 serial0: serial@4500 {
203 cell-index = <0>;
204 device_type = "serial";
205 compatible = "ns16550";
206 reg = <0x4500 0x100>;
207 clock-frequency = <0>;
208 interrupts = <9 0x8>;
209 interrupt-parent = <&ipic>;
210 };
211
212 serial1: serial@4600 {
213 cell-index = <1>;
214 device_type = "serial";
215 compatible = "ns16550";
216 reg = <0x4600 0x100>;
217 clock-frequency = <0>;
218 interrupts = <10 0x8>;
219 interrupt-parent = <&ipic>;
220 };
221
222 crypto@30000 {
223 model = "SEC3";
224 device_type = "crypto";
225 compatible = "talitos";
226 reg = <0x30000 0x10000>;
227 interrupts = <11 0x8>;
228 interrupt-parent = <&ipic>;
229 /* Rev. 3.0 geometry */
230 num-channels = <4>;
231 channel-fifo-len = <24>;
232 exec-units-mask = <0x000001fe>;
233 descriptor-types-mask = <0x03ab0ebf>;
234 };
235
236 sata@18000 {
237 compatible = "fsl,mpc8377-sata", "fsl,pq-sata";
238 reg = <0x18000 0x1000>;
239 interrupts = <44 0x8>;
240 interrupt-parent = <&ipic>;
241 };
242
243 sata@19000 {
244 compatible = "fsl,mpc8377-sata", "fsl,pq-sata";
245 reg = <0x19000 0x1000>;
246 interrupts = <45 0x8>;
247 interrupt-parent = <&ipic>;
248 };
249
250 /* IPIC
251 * interrupts cell = <intr #, sense>
252 * sense values match linux IORESOURCE_IRQ_* defines:
253 * sense == 8: Level, low assertion
254 * sense == 2: Edge, high-to-low change
255 */
256 ipic: interrupt-controller@700 {
257 compatible = "fsl,ipic";
258 interrupt-controller;
259 #address-cells = <0>;
260 #interrupt-cells = <2>;
261 reg = <0x700 0x100>;
262 };
263 };
264
265 pci0: pci@e0008500 {
266 interrupt-map-mask = <0xf800 0 0 7>;
267 interrupt-map = <
268 /* IRQ5 = 21 = 0x15, IRQ6 = 0x16, IRQ7 = 23 = 0x17 */
269
270 /* IDSEL AD14 IRQ6 inta */
271 0x7000 0x0 0x0 0x1 &ipic 22 0x8
272
273 /* IDSEL AD15 IRQ5 inta, IRQ6 intb, IRQ7 intd */
274 0x7800 0x0 0x0 0x1 &ipic 21 0x8
275 0x7800 0x0 0x0 0x2 &ipic 22 0x8
276 0x7800 0x0 0x0 0x4 &ipic 23 0x8
277
278 /* IDSEL AD28 IRQ7 inta, IRQ5 intb IRQ6 intc*/
279 0xE000 0x0 0x0 0x1 &ipic 23 0x8
280 0xE000 0x0 0x0 0x2 &ipic 21 0x8
281 0xE000 0x0 0x0 0x3 &ipic 22 0x8>;
282 interrupt-parent = <&ipic>;
283 interrupts = <66 0x8>;
284 bus-range = <0 0>;
285 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
286 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
287 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
288 clock-frequency = <66666666>;
289 #interrupt-cells = <1>;
290 #size-cells = <2>;
291 #address-cells = <3>;
292 reg = <0xe0008500 0x100>;
293 compatible = "fsl,mpc8349-pci";
294 device_type = "pci";
295 };
296};
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts
new file mode 100644
index 000000000000..533e9b06cc8f
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8378_mds.dts
@@ -0,0 +1,266 @@
1/*
2 * MPC8378E 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/dts-v1/;
13
14/ {
15 model = "fsl,mpc8378emds";
16 compatible = "fsl,mpc8378emds","fsl,mpc837xmds";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8378@0 {
33 device_type = "cpu";
34 reg = <0x0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <32768>;
38 i-cache-size = <32768>;
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x20000000>; // 512MB at 0
48 };
49
50 soc@e0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 ranges = <0x0 0xe0000000 0x00100000>;
55 reg = <0xe0000000 0x00000200>;
56 bus-frequency = <0>;
57
58 wdt@200 {
59 compatible = "mpc83xx_wdt";
60 reg = <0x200 0x100>;
61 };
62
63 i2c@3000 {
64 #address-cells = <1>;
65 #size-cells = <0>;
66 cell-index = <0>;
67 compatible = "fsl-i2c";
68 reg = <0x3000 0x100>;
69 interrupts = <14 0x8>;
70 interrupt-parent = <&ipic>;
71 dfsrr;
72 };
73
74 i2c@3100 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <1>;
78 compatible = "fsl-i2c";
79 reg = <0x3100 0x100>;
80 interrupts = <15 0x8>;
81 interrupt-parent = <&ipic>;
82 dfsrr;
83 };
84
85 spi@7000 {
86 cell-index = <0>;
87 compatible = "fsl,spi";
88 reg = <0x7000 0x1000>;
89 interrupts = <16 0x8>;
90 interrupt-parent = <&ipic>;
91 mode = "cpu";
92 };
93
94 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
95 usb@23000 {
96 compatible = "fsl-usb2-dr";
97 reg = <0x23000 0x1000>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100 interrupt-parent = <&ipic>;
101 interrupts = <38 0x8>;
102 phy_type = "utmi_wide";
103 };
104
105 mdio@24520 {
106 #address-cells = <1>;
107 #size-cells = <0>;
108 compatible = "fsl,gianfar-mdio";
109 reg = <0x24520 0x20>;
110 phy2: ethernet-phy@2 {
111 interrupt-parent = <&ipic>;
112 interrupts = <17 0x8>;
113 reg = <0x2>;
114 device_type = "ethernet-phy";
115 };
116 phy3: ethernet-phy@3 {
117 interrupt-parent = <&ipic>;
118 interrupts = <18 0x8>;
119 reg = <0x3>;
120 device_type = "ethernet-phy";
121 };
122 };
123
124 enet0: ethernet@24000 {
125 cell-index = <0>;
126 device_type = "network";
127 model = "eTSEC";
128 compatible = "gianfar";
129 reg = <0x24000 0x1000>;
130 local-mac-address = [ 00 00 00 00 00 00 ];
131 interrupts = <32 0x8 33 0x8 34 0x8>;
132 phy-connection-type = "mii";
133 interrupt-parent = <&ipic>;
134 phy-handle = <&phy2>;
135 };
136
137 enet1: ethernet@25000 {
138 cell-index = <1>;
139 device_type = "network";
140 model = "eTSEC";
141 compatible = "gianfar";
142 reg = <0x25000 0x1000>;
143 local-mac-address = [ 00 00 00 00 00 00 ];
144 interrupts = <35 0x8 36 0x8 37 0x8>;
145 phy-connection-type = "mii";
146 interrupt-parent = <&ipic>;
147 phy-handle = <&phy3>;
148 };
149
150 serial0: serial@4500 {
151 cell-index = <0>;
152 device_type = "serial";
153 compatible = "ns16550";
154 reg = <0x4500 0x100>;
155 clock-frequency = <0>;
156 interrupts = <9 0x8>;
157 interrupt-parent = <&ipic>;
158 };
159
160 serial1: serial@4600 {
161 cell-index = <1>;
162 device_type = "serial";
163 compatible = "ns16550";
164 reg = <0x4600 0x100>;
165 clock-frequency = <0>;
166 interrupts = <10 0x8>;
167 interrupt-parent = <&ipic>;
168 };
169
170 crypto@30000 {
171 model = "SEC3";
172 compatible = "talitos";
173 reg = <0x30000 0x10000>;
174 interrupts = <11 0x8>;
175 interrupt-parent = <&ipic>;
176 /* Rev. 3.0 geometry */
177 num-channels = <4>;
178 channel-fifo-len = <24>;
179 exec-units-mask = <0x000001fe>;
180 descriptor-types-mask = <0x03ab0ebf>;
181 };
182
183 sdhc@2e000 {
184 model = "eSDHC";
185 compatible = "fsl,esdhc";
186 reg = <0x2e000 0x1000>;
187 interrupts = <42 0x8>;
188 interrupt-parent = <&ipic>;
189 };
190
191 /* IPIC
192 * interrupts cell = <intr #, sense>
193 * sense values match linux IORESOURCE_IRQ_* defines:
194 * sense == 8: Level, low assertion
195 * sense == 2: Edge, high-to-low change
196 */
197 ipic: pic@700 {
198 compatible = "fsl,ipic";
199 interrupt-controller;
200 #address-cells = <0>;
201 #interrupt-cells = <2>;
202 reg = <0x700 0x100>;
203 };
204 };
205
206 pci0: pci@e0008500 {
207 cell-index = <0>;
208 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
209 interrupt-map = <
210
211 /* IDSEL 0x11 */
212 0x8800 0x0 0x0 0x1 &ipic 20 0x8
213 0x8800 0x0 0x0 0x2 &ipic 21 0x8
214 0x8800 0x0 0x0 0x3 &ipic 22 0x8
215 0x8800 0x0 0x0 0x4 &ipic 23 0x8
216
217 /* IDSEL 0x12 */
218 0x9000 0x0 0x0 0x1 &ipic 22 0x8
219 0x9000 0x0 0x0 0x2 &ipic 23 0x8
220 0x9000 0x0 0x0 0x3 &ipic 20 0x8
221 0x9000 0x0 0x0 0x4 &ipic 21 0x8
222
223 /* IDSEL 0x13 */
224 0x9800 0x0 0x0 0x1 &ipic 23 0x8
225 0x9800 0x0 0x0 0x2 &ipic 20 0x8
226 0x9800 0x0 0x0 0x3 &ipic 21 0x8
227 0x9800 0x0 0x0 0x4 &ipic 22 0x8
228
229 /* IDSEL 0x15 */
230 0xa800 0x0 0x0 0x1 &ipic 20 0x8
231 0xa800 0x0 0x0 0x2 &ipic 21 0x8
232 0xa800 0x0 0x0 0x3 &ipic 22 0x8
233 0xa800 0x0 0x0 0x4 &ipic 23 0x8
234
235 /* IDSEL 0x16 */
236 0xb000 0x0 0x0 0x1 &ipic 23 0x8
237 0xb000 0x0 0x0 0x2 &ipic 20 0x8
238 0xb000 0x0 0x0 0x3 &ipic 21 0x8
239 0xb000 0x0 0x0 0x4 &ipic 22 0x8
240
241 /* IDSEL 0x17 */
242 0xb800 0x0 0x0 0x1 &ipic 22 0x8
243 0xb800 0x0 0x0 0x2 &ipic 23 0x8
244 0xb800 0x0 0x0 0x3 &ipic 20 0x8
245 0xb800 0x0 0x0 0x4 &ipic 21 0x8
246
247 /* IDSEL 0x18 */
248 0xc000 0x0 0x0 0x1 &ipic 21 0x8
249 0xc000 0x0 0x0 0x2 &ipic 22 0x8
250 0xc000 0x0 0x0 0x3 &ipic 23 0x8
251 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
252 interrupt-parent = <&ipic>;
253 interrupts = <66 0x8>;
254 bus-range = <0x0 0x0>;
255 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
256 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
257 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
258 clock-frequency = <0>;
259 #interrupt-cells = <1>;
260 #size-cells = <2>;
261 #address-cells = <3>;
262 reg = <0xe0008500 0x100>;
263 compatible = "fsl,mpc8349-pci";
264 device_type = "pci";
265 };
266};
diff --git a/arch/powerpc/boot/dts/mpc8378_rdb.dts b/arch/powerpc/boot/dts/mpc8378_rdb.dts
new file mode 100644
index 000000000000..92711534b179
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8378_rdb.dts
@@ -0,0 +1,282 @@
1/*
2 * MPC8378E RDB Device Tree Source
3 *
4 * Copyright 2007, 2008 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/dts-v1/;
13
14/ {
15 compatible = "fsl,mpc8378rdb";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 PowerPC,8378@0 {
32 device_type = "cpu";
33 reg = <0x0>;
34 d-cache-line-size = <32>;
35 i-cache-line-size = <32>;
36 d-cache-size = <32768>;
37 i-cache-size = <32768>;
38 timebase-frequency = <0>;
39 bus-frequency = <0>;
40 clock-frequency = <0>;
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x10000000>; // 256MB at 0
47 };
48
49 localbus@e0005000 {
50 #address-cells = <2>;
51 #size-cells = <1>;
52 compatible = "fsl,mpc8378-elbc", "fsl,elbc", "simple-bus";
53 reg = <0xe0005000 0x1000>;
54 interrupts = <77 0x8>;
55 interrupt-parent = <&ipic>;
56
57 // CS0 and CS1 are swapped when
58 // booting from nand, but the
59 // addresses are the same.
60 ranges = <0x0 0x0 0xfe000000 0x00800000
61 0x1 0x0 0xe0600000 0x00008000
62 0x2 0x0 0xf0000000 0x00020000
63 0x3 0x0 0xfa000000 0x00008000>;
64
65 flash@0,0 {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "cfi-flash";
69 reg = <0x0 0x0 0x800000>;
70 bank-width = <2>;
71 device-width = <1>;
72 };
73
74 nand@1,0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "fsl,mpc8378-fcm-nand",
78 "fsl,elbc-fcm-nand";
79 reg = <0x1 0x0 0x8000>;
80
81 u-boot@0 {
82 reg = <0x0 0x100000>;
83 read-only;
84 };
85
86 kernel@100000 {
87 reg = <0x100000 0x300000>;
88 };
89 fs@400000 {
90 reg = <0x400000 0x1c00000>;
91 };
92 };
93 };
94
95 immr@e0000000 {
96 #address-cells = <1>;
97 #size-cells = <1>;
98 device_type = "soc";
99 compatible = "simple-bus";
100 ranges = <0x0 0xe0000000 0x00100000>;
101 reg = <0xe0000000 0x00000200>;
102 bus-frequency = <0>;
103
104 wdt@200 {
105 device_type = "watchdog";
106 compatible = "mpc83xx_wdt";
107 reg = <0x200 0x100>;
108 };
109
110 i2c@3000 {
111 #address-cells = <1>;
112 #size-cells = <0>;
113 cell-index = <0>;
114 compatible = "fsl-i2c";
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>;
118 dfsrr;
119 rtc@68 {
120 device_type = "rtc";
121 compatible = "dallas,ds1339";
122 reg = <0x68>;
123 };
124 };
125
126 i2c@3100 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 cell-index = <1>;
130 compatible = "fsl-i2c";
131 reg = <0x3100 0x100>;
132 interrupts = <15 0x8>;
133 interrupt-parent = <&ipic>;
134 dfsrr;
135 };
136
137 spi@7000 {
138 cell-index = <0>;
139 compatible = "fsl,spi";
140 reg = <0x7000 0x1000>;
141 interrupts = <16 0x8>;
142 interrupt-parent = <&ipic>;
143 mode = "cpu";
144 };
145
146 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
147 usb@23000 {
148 compatible = "fsl-usb2-dr";
149 reg = <0x23000 0x1000>;
150 #address-cells = <1>;
151 #size-cells = <0>;
152 interrupt-parent = <&ipic>;
153 interrupts = <38 0x8>;
154 phy_type = "utmi";
155 };
156
157 mdio@24520 {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 compatible = "fsl,gianfar-mdio";
161 reg = <0x24520 0x20>;
162 phy2: ethernet-phy@2 {
163 interrupt-parent = <&ipic>;
164 interrupts = <17 0x8>;
165 reg = <0x2>;
166 device_type = "ethernet-phy";
167 };
168 phy3: ethernet-phy@3 {
169 interrupt-parent = <&ipic>;
170 interrupts = <18 0x8>;
171 reg = <0x3>;
172 device_type = "ethernet-phy";
173 };
174 };
175
176 enet0: ethernet@24000 {
177 cell-index = <0>;
178 device_type = "network";
179 model = "eTSEC";
180 compatible = "gianfar";
181 reg = <0x24000 0x1000>;
182 local-mac-address = [ 00 00 00 00 00 00 ];
183 interrupts = <32 0x8 33 0x8 34 0x8>;
184 phy-connection-type = "mii";
185 interrupt-parent = <&ipic>;
186 phy-handle = <&phy2>;
187 };
188
189 enet1: ethernet@25000 {
190 cell-index = <1>;
191 device_type = "network";
192 model = "eTSEC";
193 compatible = "gianfar";
194 reg = <0x25000 0x1000>;
195 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <35 0x8 36 0x8 37 0x8>;
197 phy-connection-type = "mii";
198 interrupt-parent = <&ipic>;
199 phy-handle = <&phy3>;
200 };
201
202 serial0: serial@4500 {
203 cell-index = <0>;
204 device_type = "serial";
205 compatible = "ns16550";
206 reg = <0x4500 0x100>;
207 clock-frequency = <0>;
208 interrupts = <9 0x8>;
209 interrupt-parent = <&ipic>;
210 };
211
212 serial1: serial@4600 {
213 cell-index = <1>;
214 device_type = "serial";
215 compatible = "ns16550";
216 reg = <0x4600 0x100>;
217 clock-frequency = <0>;
218 interrupts = <10 0x8>;
219 interrupt-parent = <&ipic>;
220 };
221
222 crypto@30000 {
223 model = "SEC3";
224 device_type = "crypto";
225 compatible = "talitos";
226 reg = <0x30000 0x10000>;
227 interrupts = <11 0x8>;
228 interrupt-parent = <&ipic>;
229 /* Rev. 3.0 geometry */
230 num-channels = <4>;
231 channel-fifo-len = <24>;
232 exec-units-mask = <0x000001fe>;
233 descriptor-types-mask = <0x03ab0ebf>;
234 };
235
236 /* IPIC
237 * interrupts cell = <intr #, sense>
238 * sense values match linux IORESOURCE_IRQ_* defines:
239 * sense == 8: Level, low assertion
240 * sense == 2: Edge, high-to-low change
241 */
242 ipic: interrupt-controller@700 {
243 compatible = "fsl,ipic";
244 interrupt-controller;
245 #address-cells = <0>;
246 #interrupt-cells = <2>;
247 reg = <0x700 0x100>;
248 };
249 };
250
251 pci0: pci@e0008500 {
252 interrupt-map-mask = <0xf800 0 0 7>;
253 interrupt-map = <
254 /* IRQ5 = 21 = 0x15, IRQ6 = 0x16, IRQ7 = 23 = 0x17 */
255
256 /* IDSEL AD14 IRQ6 inta */
257 0x7000 0x0 0x0 0x1 &ipic 22 0x8
258
259 /* IDSEL AD15 IRQ5 inta, IRQ6 intb, IRQ7 intd */
260 0x7800 0x0 0x0 0x1 &ipic 21 0x8
261 0x7800 0x0 0x0 0x2 &ipic 22 0x8
262 0x7800 0x0 0x0 0x4 &ipic 23 0x8
263
264 /* IDSEL AD28 IRQ7 inta, IRQ5 intb IRQ6 intc*/
265 0xE000 0x0 0x0 0x1 &ipic 23 0x8
266 0xE000 0x0 0x0 0x2 &ipic 21 0x8
267 0xE000 0x0 0x0 0x3 &ipic 22 0x8>;
268 interrupt-parent = <&ipic>;
269 interrupts = <66 0x8>;
270 bus-range = <0 0>;
271 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
272 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
273 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
274 clock-frequency = <66666666>;
275 #interrupt-cells = <1>;
276 #size-cells = <2>;
277 #address-cells = <3>;
278 reg = <0xe0008500 0x100>;
279 compatible = "fsl,mpc8349-pci";
280 device_type = "pci";
281 };
282};
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts
new file mode 100644
index 000000000000..c270685bbde4
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8379_mds.dts
@@ -0,0 +1,294 @@
1/*
2 * MPC8379E 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/dts-v1/;
13
14/ {
15 model = "fsl,mpc8379emds";
16 compatible = "fsl,mpc8379emds","fsl,mpc837xmds";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8379@0 {
33 device_type = "cpu";
34 reg = <0x0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <32768>;
38 i-cache-size = <32768>;
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x20000000>; // 512MB at 0
48 };
49
50 soc@e0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 ranges = <0x0 0xe0000000 0x00100000>;
55 reg = <0xe0000000 0x00000200>;
56 bus-frequency = <0>;
57
58 wdt@200 {
59 compatible = "mpc83xx_wdt";
60 reg = <0x200 0x100>;
61 };
62
63 i2c@3000 {
64 #address-cells = <1>;
65 #size-cells = <0>;
66 cell-index = <0>;
67 compatible = "fsl-i2c";
68 reg = <0x3000 0x100>;
69 interrupts = <14 0x8>;
70 interrupt-parent = <&ipic>;
71 dfsrr;
72 };
73
74 i2c@3100 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <1>;
78 compatible = "fsl-i2c";
79 reg = <0x3100 0x100>;
80 interrupts = <15 0x8>;
81 interrupt-parent = <&ipic>;
82 dfsrr;
83 };
84
85 spi@7000 {
86 cell-index = <0>;
87 compatible = "fsl,spi";
88 reg = <0x7000 0x1000>;
89 interrupts = <16 0x8>;
90 interrupt-parent = <&ipic>;
91 mode = "cpu";
92 };
93
94 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
95 usb@23000 {
96 compatible = "fsl-usb2-dr";
97 reg = <0x23000 0x1000>;
98 #address-cells = <1>;
99 #size-cells = <0>;
100 interrupt-parent = <&ipic>;
101 interrupts = <38 0x8>;
102 phy_type = "utmi_wide";
103 };
104
105 mdio@24520 {
106 #address-cells = <1>;
107 #size-cells = <0>;
108 compatible = "fsl,gianfar-mdio";
109 reg = <0x24520 0x20>;
110 phy2: ethernet-phy@2 {
111 interrupt-parent = <&ipic>;
112 interrupts = <17 0x8>;
113 reg = <0x2>;
114 device_type = "ethernet-phy";
115 };
116 phy3: ethernet-phy@3 {
117 interrupt-parent = <&ipic>;
118 interrupts = <18 0x8>;
119 reg = <0x3>;
120 device_type = "ethernet-phy";
121 };
122 };
123
124 enet0: ethernet@24000 {
125 cell-index = <0>;
126 device_type = "network";
127 model = "eTSEC";
128 compatible = "gianfar";
129 reg = <0x24000 0x1000>;
130 local-mac-address = [ 00 00 00 00 00 00 ];
131 interrupts = <32 0x8 33 0x8 34 0x8>;
132 phy-connection-type = "mii";
133 interrupt-parent = <&ipic>;
134 phy-handle = <&phy2>;
135 };
136
137 enet1: ethernet@25000 {
138 cell-index = <1>;
139 device_type = "network";
140 model = "eTSEC";
141 compatible = "gianfar";
142 reg = <0x25000 0x1000>;
143 local-mac-address = [ 00 00 00 00 00 00 ];
144 interrupts = <35 0x8 36 0x8 37 0x8>;
145 phy-connection-type = "mii";
146 interrupt-parent = <&ipic>;
147 phy-handle = <&phy3>;
148 };
149
150 serial0: serial@4500 {
151 cell-index = <0>;
152 device_type = "serial";
153 compatible = "ns16550";
154 reg = <0x4500 0x100>;
155 clock-frequency = <0>;
156 interrupts = <9 0x8>;
157 interrupt-parent = <&ipic>;
158 };
159
160 serial1: serial@4600 {
161 cell-index = <1>;
162 device_type = "serial";
163 compatible = "ns16550";
164 reg = <0x4600 0x100>;
165 clock-frequency = <0>;
166 interrupts = <10 0x8>;
167 interrupt-parent = <&ipic>;
168 };
169
170 crypto@30000 {
171 model = "SEC3";
172 compatible = "talitos";
173 reg = <0x30000 0x10000>;
174 interrupts = <11 0x8>;
175 interrupt-parent = <&ipic>;
176 /* Rev. 3.0 geometry */
177 num-channels = <4>;
178 channel-fifo-len = <24>;
179 exec-units-mask = <0x000001fe>;
180 descriptor-types-mask = <0x03ab0ebf>;
181 };
182
183 sdhc@2e000 {
184 model = "eSDHC";
185 compatible = "fsl,esdhc";
186 reg = <0x2e000 0x1000>;
187 interrupts = <42 0x8>;
188 interrupt-parent = <&ipic>;
189 };
190
191 sata@18000 {
192 compatible = "fsl,mpc8379-sata";
193 reg = <0x18000 0x1000>;
194 interrupts = <44 0x8>;
195 interrupt-parent = <&ipic>;
196 };
197
198 sata@19000 {
199 compatible = "fsl,mpc8379-sata";
200 reg = <0x19000 0x1000>;
201 interrupts = <45 0x8>;
202 interrupt-parent = <&ipic>;
203 };
204
205 sata@1a000 {
206 compatible = "fsl,mpc8379-sata";
207 reg = <0x1a000 0x1000>;
208 interrupts = <46 0x8>;
209 interrupt-parent = <&ipic>;
210 };
211
212 sata@1b000 {
213 compatible = "fsl,mpc8379-sata";
214 reg = <0x1b000 0x1000>;
215 interrupts = <47 0x8>;
216 interrupt-parent = <&ipic>;
217 };
218
219 /* IPIC
220 * interrupts cell = <intr #, sense>
221 * sense values match linux IORESOURCE_IRQ_* defines:
222 * sense == 8: Level, low assertion
223 * sense == 2: Edge, high-to-low change
224 */
225 ipic: pic@700 {
226 compatible = "fsl,ipic";
227 interrupt-controller;
228 #address-cells = <0>;
229 #interrupt-cells = <2>;
230 reg = <0x700 0x100>;
231 };
232 };
233
234 pci0: pci@e0008500 {
235 cell-index = <0>;
236 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
237 interrupt-map = <
238
239 /* IDSEL 0x11 */
240 0x8800 0x0 0x0 0x1 &ipic 20 0x8
241 0x8800 0x0 0x0 0x2 &ipic 21 0x8
242 0x8800 0x0 0x0 0x3 &ipic 22 0x8
243 0x8800 0x0 0x0 0x4 &ipic 23 0x8
244
245 /* IDSEL 0x12 */
246 0x9000 0x0 0x0 0x1 &ipic 22 0x8
247 0x9000 0x0 0x0 0x2 &ipic 23 0x8
248 0x9000 0x0 0x0 0x3 &ipic 20 0x8
249 0x9000 0x0 0x0 0x4 &ipic 21 0x8
250
251 /* IDSEL 0x13 */
252 0x9800 0x0 0x0 0x1 &ipic 23 0x8
253 0x9800 0x0 0x0 0x2 &ipic 20 0x8
254 0x9800 0x0 0x0 0x3 &ipic 21 0x8
255 0x9800 0x0 0x0 0x4 &ipic 22 0x8
256
257 /* IDSEL 0x15 */
258 0xa800 0x0 0x0 0x1 &ipic 20 0x8
259 0xa800 0x0 0x0 0x2 &ipic 21 0x8
260 0xa800 0x0 0x0 0x3 &ipic 22 0x8
261 0xa800 0x0 0x0 0x4 &ipic 23 0x8
262
263 /* IDSEL 0x16 */
264 0xb000 0x0 0x0 0x1 &ipic 23 0x8
265 0xb000 0x0 0x0 0x2 &ipic 20 0x8
266 0xb000 0x0 0x0 0x3 &ipic 21 0x8
267 0xb000 0x0 0x0 0x4 &ipic 22 0x8
268
269 /* IDSEL 0x17 */
270 0xb800 0x0 0x0 0x1 &ipic 22 0x8
271 0xb800 0x0 0x0 0x2 &ipic 23 0x8
272 0xb800 0x0 0x0 0x3 &ipic 20 0x8
273 0xb800 0x0 0x0 0x4 &ipic 21 0x8
274
275 /* IDSEL 0x18 */
276 0xc000 0x0 0x0 0x1 &ipic 21 0x8
277 0xc000 0x0 0x0 0x2 &ipic 22 0x8
278 0xc000 0x0 0x0 0x3 &ipic 23 0x8
279 0xc000 0x0 0x0 0x4 &ipic 20 0x8>;
280 interrupt-parent = <&ipic>;
281 interrupts = <66 0x8>;
282 bus-range = <0x0 0x0>;
283 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
284 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
285 0x01000000 0x0 0x00000000 0xe0300000 0x0 0x00100000>;
286 clock-frequency = <0>;
287 #interrupt-cells = <1>;
288 #size-cells = <2>;
289 #address-cells = <3>;
290 reg = <0xe0008500 0x100>;
291 compatible = "fsl,mpc8349-pci";
292 device_type = "pci";
293 };
294};
diff --git a/arch/powerpc/boot/dts/mpc8379_rdb.dts b/arch/powerpc/boot/dts/mpc8379_rdb.dts
new file mode 100644
index 000000000000..0dda2fc558f8
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8379_rdb.dts
@@ -0,0 +1,310 @@
1/*
2 * MPC8379E RDB Device Tree Source
3 *
4 * Copyright 2007, 2008 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/dts-v1/;
13
14/ {
15 compatible = "fsl,mpc8379rdb";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 PowerPC,8379@0 {
32 device_type = "cpu";
33 reg = <0x0>;
34 d-cache-line-size = <32>;
35 i-cache-line-size = <32>;
36 d-cache-size = <32768>;
37 i-cache-size = <32768>;
38 timebase-frequency = <0>;
39 bus-frequency = <0>;
40 clock-frequency = <0>;
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x10000000>; // 256MB at 0
47 };
48
49 localbus@e0005000 {
50 #address-cells = <2>;
51 #size-cells = <1>;
52 compatible = "fsl,mpc8379-elbc", "fsl,elbc", "simple-bus";
53 reg = <0xe0005000 0x1000>;
54 interrupts = <77 0x8>;
55 interrupt-parent = <&ipic>;
56
57 // CS0 and CS1 are swapped when
58 // booting from nand, but the
59 // addresses are the same.
60 ranges = <0x0 0x0 0xfe000000 0x00800000
61 0x1 0x0 0xe0600000 0x00008000
62 0x2 0x0 0xf0000000 0x00020000
63 0x3 0x0 0xfa000000 0x00008000>;
64
65 flash@0,0 {
66 #address-cells = <1>;
67 #size-cells = <1>;
68 compatible = "cfi-flash";
69 reg = <0x0 0x0 0x800000>;
70 bank-width = <2>;
71 device-width = <1>;
72 };
73
74 nand@1,0 {
75 #address-cells = <1>;
76 #size-cells = <1>;
77 compatible = "fsl,mpc8379-fcm-nand",
78 "fsl,elbc-fcm-nand";
79 reg = <0x1 0x0 0x8000>;
80
81 u-boot@0 {
82 reg = <0x0 0x100000>;
83 read-only;
84 };
85
86 kernel@100000 {
87 reg = <0x100000 0x300000>;
88 };
89 fs@400000 {
90 reg = <0x400000 0x1c00000>;
91 };
92 };
93 };
94
95 immr@e0000000 {
96 #address-cells = <1>;
97 #size-cells = <1>;
98 device_type = "soc";
99 compatible = "simple-bus";
100 ranges = <0x0 0xe0000000 0x00100000>;
101 reg = <0xe0000000 0x00000200>;
102 bus-frequency = <0>;
103
104 wdt@200 {
105 device_type = "watchdog";
106 compatible = "mpc83xx_wdt";
107 reg = <0x200 0x100>;
108 };
109
110 i2c@3000 {
111 #address-cells = <1>;
112 #size-cells = <0>;
113 cell-index = <0>;
114 compatible = "fsl-i2c";
115 reg = <0x3000 0x100>;
116 interrupts = <14 0x8>;
117 interrupt-parent = <&ipic>;
118 dfsrr;
119 rtc@68 {
120 device_type = "rtc";
121 compatible = "dallas,ds1339";
122 reg = <0x68>;
123 };
124 };
125
126 i2c@3100 {
127 #address-cells = <1>;
128 #size-cells = <0>;
129 cell-index = <1>;
130 compatible = "fsl-i2c";
131 reg = <0x3100 0x100>;
132 interrupts = <15 0x8>;
133 interrupt-parent = <&ipic>;
134 dfsrr;
135 };
136
137 spi@7000 {
138 cell-index = <0>;
139 compatible = "fsl,spi";
140 reg = <0x7000 0x1000>;
141 interrupts = <16 0x8>;
142 interrupt-parent = <&ipic>;
143 mode = "cpu";
144 };
145
146 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
147 usb@23000 {
148 compatible = "fsl-usb2-dr";
149 reg = <0x23000 0x1000>;
150 #address-cells = <1>;
151 #size-cells = <0>;
152 interrupt-parent = <&ipic>;
153 interrupts = <38 0x8>;
154 phy_type = "utmi";
155 };
156
157 mdio@24520 {
158 #address-cells = <1>;
159 #size-cells = <0>;
160 compatible = "fsl,gianfar-mdio";
161 reg = <0x24520 0x20>;
162 phy2: ethernet-phy@2 {
163 interrupt-parent = <&ipic>;
164 interrupts = <17 0x8>;
165 reg = <0x2>;
166 device_type = "ethernet-phy";
167 };
168 phy3: ethernet-phy@3 {
169 interrupt-parent = <&ipic>;
170 interrupts = <18 0x8>;
171 reg = <0x3>;
172 device_type = "ethernet-phy";
173 };
174 };
175
176 enet0: ethernet@24000 {
177 cell-index = <0>;
178 device_type = "network";
179 model = "eTSEC";
180 compatible = "gianfar";
181 reg = <0x24000 0x1000>;
182 local-mac-address = [ 00 00 00 00 00 00 ];
183 interrupts = <32 0x8 33 0x8 34 0x8>;
184 phy-connection-type = "mii";
185 interrupt-parent = <&ipic>;
186 phy-handle = <&phy2>;
187 };
188
189 enet1: ethernet@25000 {
190 cell-index = <1>;
191 device_type = "network";
192 model = "eTSEC";
193 compatible = "gianfar";
194 reg = <0x25000 0x1000>;
195 local-mac-address = [ 00 00 00 00 00 00 ];
196 interrupts = <35 0x8 36 0x8 37 0x8>;
197 phy-connection-type = "mii";
198 interrupt-parent = <&ipic>;
199 phy-handle = <&phy3>;
200 };
201
202 serial0: serial@4500 {
203 cell-index = <0>;
204 device_type = "serial";
205 compatible = "ns16550";
206 reg = <0x4500 0x100>;
207 clock-frequency = <0>;
208 interrupts = <9 0x8>;
209 interrupt-parent = <&ipic>;
210 };
211
212 serial1: serial@4600 {
213 cell-index = <1>;
214 device_type = "serial";
215 compatible = "ns16550";
216 reg = <0x4600 0x100>;
217 clock-frequency = <0>;
218 interrupts = <10 0x8>;
219 interrupt-parent = <&ipic>;
220 };
221
222 crypto@30000 {
223 model = "SEC3";
224 device_type = "crypto";
225 compatible = "talitos";
226 reg = <0x30000 0x10000>;
227 interrupts = <11 0x8>;
228 interrupt-parent = <&ipic>;
229 /* Rev. 3.0 geometry */
230 num-channels = <4>;
231 channel-fifo-len = <24>;
232 exec-units-mask = <0x000001fe>;
233 descriptor-types-mask = <0x03ab0ebf>;
234 };
235
236 sata@18000 {
237 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
238 reg = <0x18000 0x1000>;
239 interrupts = <44 0x8>;
240 interrupt-parent = <&ipic>;
241 };
242
243 sata@19000 {
244 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
245 reg = <0x19000 0x1000>;
246 interrupts = <45 0x8>;
247 interrupt-parent = <&ipic>;
248 };
249
250 sata@1a000 {
251 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
252 reg = <0x1a000 0x1000>;
253 interrupts = <46 0x8>;
254 interrupt-parent = <&ipic>;
255 };
256
257 sata@1b000 {
258 compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
259 reg = <0x1b000 0x1000>;
260 interrupts = <47 0x8>;
261 interrupt-parent = <&ipic>;
262 };
263
264 /* IPIC
265 * interrupts cell = <intr #, sense>
266 * sense values match linux IORESOURCE_IRQ_* defines:
267 * sense == 8: Level, low assertion
268 * sense == 2: Edge, high-to-low change
269 */
270 ipic: interrupt-controller@700 {
271 compatible = "fsl,ipic";
272 interrupt-controller;
273 #address-cells = <0>;
274 #interrupt-cells = <2>;
275 reg = <0x700 0x100>;
276 };
277 };
278
279 pci0: pci@e0008500 {
280 interrupt-map-mask = <0xf800 0 0 7>;
281 interrupt-map = <
282 /* IRQ5 = 21 = 0x15, IRQ6 = 0x16, IRQ7 = 23 = 0x17 */
283
284 /* IDSEL AD14 IRQ6 inta */
285 0x7000 0x0 0x0 0x1 &ipic 22 0x8
286
287 /* IDSEL AD15 IRQ5 inta, IRQ6 intb, IRQ7 intd */
288 0x7800 0x0 0x0 0x1 &ipic 21 0x8
289 0x7800 0x0 0x0 0x2 &ipic 22 0x8
290 0x7800 0x0 0x0 0x4 &ipic 23 0x8
291
292 /* IDSEL AD28 IRQ7 inta, IRQ5 intb IRQ6 intc*/
293 0xE000 0x0 0x0 0x1 &ipic 23 0x8
294 0xE000 0x0 0x0 0x2 &ipic 21 0x8
295 0xE000 0x0 0x0 0x3 &ipic 22 0x8>;
296 interrupt-parent = <&ipic>;
297 interrupts = <66 0x8>;
298 bus-range = <0x0 0x0>;
299 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
300 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
301 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
302 clock-frequency = <66666666>;
303 #interrupt-cells = <1>;
304 #size-cells = <2>;
305 #address-cells = <3>;
306 reg = <0xe0008500 0x100>;
307 compatible = "fsl,mpc8349-pci";
308 device_type = "pci";
309 };
310};
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts
index 6442a717ec3b..975248491b7b 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/mpc8540ads.dts
@@ -16,6 +16,15 @@
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 ethernet2 = &enet2;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
19 cpus { 28 cpus {
20 #address-cells = <1>; 29 #address-cells = <1>;
21 #size-cells = <0>; 30 #size-cells = <0>;
@@ -63,7 +72,9 @@
63 }; 72 };
64 73
65 i2c@3000 { 74 i2c@3000 {
66 device_type = "i2c"; 75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <0>;
67 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
68 reg = <3000 100>; 79 reg = <3000 100>;
69 interrupts = <2b 2>; 80 interrupts = <2b 2>;
@@ -74,9 +85,9 @@
74 mdio@24520 { 85 mdio@24520 {
75 #address-cells = <1>; 86 #address-cells = <1>;
76 #size-cells = <0>; 87 #size-cells = <0>;
77 device_type = "mdio"; 88 compatible = "fsl,gianfar-mdio";
78 compatible = "gianfar";
79 reg = <24520 20>; 89 reg = <24520 20>;
90
80 phy0: ethernet-phy@0 { 91 phy0: ethernet-phy@0 {
81 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
82 interrupts = <5 1>; 93 interrupts = <5 1>;
@@ -97,64 +108,44 @@
97 }; 108 };
98 }; 109 };
99 110
100 ethernet@24000 { 111 enet0: ethernet@24000 {
101 #address-cells = <1>; 112 cell-index = <0>;
102 #size-cells = <0>;
103 device_type = "network"; 113 device_type = "network";
104 model = "TSEC"; 114 model = "TSEC";
105 compatible = "gianfar"; 115 compatible = "gianfar";
106 reg = <24000 1000>; 116 reg = <24000 1000>;
107 /*
108 * address is deprecated and will be removed
109 * in 2.6.25. Only recent versions of
110 * U-Boot support local-mac-address, however.
111 */
112 address = [ 00 00 00 00 00 00 ];
113 local-mac-address = [ 00 00 00 00 00 00 ]; 117 local-mac-address = [ 00 00 00 00 00 00 ];
114 interrupts = <1d 2 1e 2 22 2>; 118 interrupts = <1d 2 1e 2 22 2>;
115 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
116 phy-handle = <&phy0>; 120 phy-handle = <&phy0>;
117 }; 121 };
118 122
119 ethernet@25000 { 123 enet1: ethernet@25000 {
120 #address-cells = <1>; 124 cell-index = <1>;
121 #size-cells = <0>;
122 device_type = "network"; 125 device_type = "network";
123 model = "TSEC"; 126 model = "TSEC";
124 compatible = "gianfar"; 127 compatible = "gianfar";
125 reg = <25000 1000>; 128 reg = <25000 1000>;
126 /*
127 * address is deprecated and will be removed
128 * in 2.6.25. Only recent versions of
129 * U-Boot support local-mac-address, however.
130 */
131 address = [ 00 00 00 00 00 00 ];
132 local-mac-address = [ 00 00 00 00 00 00 ]; 129 local-mac-address = [ 00 00 00 00 00 00 ];
133 interrupts = <23 2 24 2 28 2>; 130 interrupts = <23 2 24 2 28 2>;
134 interrupt-parent = <&mpic>; 131 interrupt-parent = <&mpic>;
135 phy-handle = <&phy1>; 132 phy-handle = <&phy1>;
136 }; 133 };
137 134
138 ethernet@26000 { 135 enet2: ethernet@26000 {
139 #address-cells = <1>; 136 cell-index = <2>;
140 #size-cells = <0>;
141 device_type = "network"; 137 device_type = "network";
142 model = "FEC"; 138 model = "FEC";
143 compatible = "gianfar"; 139 compatible = "gianfar";
144 reg = <26000 1000>; 140 reg = <26000 1000>;
145 /*
146 * address is deprecated and will be removed
147 * in 2.6.25. Only recent versions of
148 * U-Boot support local-mac-address, however.
149 */
150 address = [ 00 00 00 00 00 00 ];
151 local-mac-address = [ 00 00 00 00 00 00 ]; 141 local-mac-address = [ 00 00 00 00 00 00 ];
152 interrupts = <29 2>; 142 interrupts = <29 2>;
153 interrupt-parent = <&mpic>; 143 interrupt-parent = <&mpic>;
154 phy-handle = <&phy3>; 144 phy-handle = <&phy3>;
155 }; 145 };
156 146
157 serial@4500 { 147 serial0: serial@4500 {
148 cell-index = <0>;
158 device_type = "serial"; 149 device_type = "serial";
159 compatible = "ns16550"; 150 compatible = "ns16550";
160 reg = <4500 100>; // reg base, size 151 reg = <4500 100>; // reg base, size
@@ -163,7 +154,8 @@
163 interrupt-parent = <&mpic>; 154 interrupt-parent = <&mpic>;
164 }; 155 };
165 156
166 serial@4600 { 157 serial1: serial@4600 {
158 cell-index = <1>;
167 device_type = "serial"; 159 device_type = "serial";
168 compatible = "ns16550"; 160 compatible = "ns16550";
169 reg = <4600 100>; // reg base, size 161 reg = <4600 100>; // reg base, size
@@ -183,7 +175,8 @@
183 }; 175 };
184 }; 176 };
185 177
186 pci@e0008000 { 178 pci0: pci@e0008000 {
179 cell-index = <0>;
187 interrupt-map-mask = <f800 0 0 7>; 180 interrupt-map-mask = <f800 0 0 7>;
188 interrupt-map = < 181 interrupt-map = <
189 182
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts
index f3f4d79deb63..fa8d9aaad157 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/mpc8541cds.dts
@@ -16,6 +16,15 @@
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 pci1 = &pci1;
26 };
27
19 cpus { 28 cpus {
20 #address-cells = <1>; 29 #address-cells = <1>;
21 #size-cells = <0>; 30 #size-cells = <0>;
@@ -63,7 +72,9 @@
63 }; 72 };
64 73
65 i2c@3000 { 74 i2c@3000 {
66 device_type = "i2c"; 75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <0>;
67 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
68 reg = <3000 100>; 79 reg = <3000 100>;
69 interrupts = <2b 2>; 80 interrupts = <2b 2>;
@@ -74,9 +85,9 @@
74 mdio@24520 { 85 mdio@24520 {
75 #address-cells = <1>; 86 #address-cells = <1>;
76 #size-cells = <0>; 87 #size-cells = <0>;
77 device_type = "mdio"; 88 compatible = "fsl,gianfar-mdio";
78 compatible = "gianfar";
79 reg = <24520 20>; 89 reg = <24520 20>;
90
80 phy0: ethernet-phy@0 { 91 phy0: ethernet-phy@0 {
81 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
82 interrupts = <5 1>; 93 interrupts = <5 1>;
@@ -91,9 +102,8 @@
91 }; 102 };
92 }; 103 };
93 104
94 ethernet@24000 { 105 enet0: ethernet@24000 {
95 #address-cells = <1>; 106 cell-index = <0>;
96 #size-cells = <0>;
97 device_type = "network"; 107 device_type = "network";
98 model = "TSEC"; 108 model = "TSEC";
99 compatible = "gianfar"; 109 compatible = "gianfar";
@@ -104,9 +114,8 @@
104 phy-handle = <&phy0>; 114 phy-handle = <&phy0>;
105 }; 115 };
106 116
107 ethernet@25000 { 117 enet1: ethernet@25000 {
108 #address-cells = <1>; 118 cell-index = <1>;
109 #size-cells = <0>;
110 device_type = "network"; 119 device_type = "network";
111 model = "TSEC"; 120 model = "TSEC";
112 compatible = "gianfar"; 121 compatible = "gianfar";
@@ -117,7 +126,8 @@
117 phy-handle = <&phy1>; 126 phy-handle = <&phy1>;
118 }; 127 };
119 128
120 serial@4500 { 129 serial0: serial@4500 {
130 cell-index = <0>;
121 device_type = "serial"; 131 device_type = "serial";
122 compatible = "ns16550"; 132 compatible = "ns16550";
123 reg = <4500 100>; // reg base, size 133 reg = <4500 100>; // reg base, size
@@ -126,7 +136,8 @@
126 interrupt-parent = <&mpic>; 136 interrupt-parent = <&mpic>;
127 }; 137 };
128 138
129 serial@4600 { 139 serial1: serial@4600 {
140 cell-index = <1>;
130 device_type = "serial"; 141 device_type = "serial";
131 compatible = "ns16550"; 142 compatible = "ns16550";
132 reg = <4600 100>; // reg base, size 143 reg = <4600 100>; // reg base, size
@@ -183,7 +194,8 @@
183 }; 194 };
184 }; 195 };
185 196
186 pci1: pci@e0008000 { 197 pci0: pci@e0008000 {
198 cell-index = <0>;
187 interrupt-map-mask = <1f800 0 0 7>; 199 interrupt-map-mask = <1f800 0 0 7>;
188 interrupt-map = < 200 interrupt-map = <
189 201
@@ -250,11 +262,12 @@
250 #interrupt-cells = <2>; 262 #interrupt-cells = <2>;
251 compatible = "chrp,iic"; 263 compatible = "chrp,iic";
252 interrupts = <1>; 264 interrupts = <1>;
253 interrupt-parent = <&pci1>; 265 interrupt-parent = <&pci0>;
254 }; 266 };
255 }; 267 };
256 268
257 pci@e0009000 { 269 pci1: pci@e0009000 {
270 cell-index = <1>;
258 interrupt-map-mask = <f800 0 0 7>; 271 interrupt-map-mask = <f800 0 0 7>;
259 interrupt-map = < 272 interrupt-map = <
260 273
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts
index 6c608de1fc1b..688af9d06382 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/mpc8544ds.dts
@@ -15,6 +15,17 @@
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 17
18 aliases {
19 ethernet0 = &enet0;
20 ethernet1 = &enet1;
21 serial0 = &serial0;
22 serial1 = &serial1;
23 pci0 = &pci0;
24 pci1 = &pci1;
25 pci2 = &pci2;
26 pci3 = &pci3;
27 };
28
18 cpus { 29 cpus {
19 #cpus = <1>; 30 #cpus = <1>;
20 #address-cells = <1>; 31 #address-cells = <1>;
@@ -64,7 +75,9 @@
64 }; 75 };
65 76
66 i2c@3000 { 77 i2c@3000 {
67 device_type = "i2c"; 78 #address-cells = <1>;
79 #size-cells = <0>;
80 cell-index = <0>;
68 compatible = "fsl-i2c"; 81 compatible = "fsl-i2c";
69 reg = <3000 100>; 82 reg = <3000 100>;
70 interrupts = <2b 2>; 83 interrupts = <2b 2>;
@@ -72,12 +85,23 @@
72 dfsrr; 85 dfsrr;
73 }; 86 };
74 87
88 i2c@3100 {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 cell-index = <1>;
92 compatible = "fsl-i2c";
93 reg = <3100 100>;
94 interrupts = <2b 2>;
95 interrupt-parent = <&mpic>;
96 dfsrr;
97 };
98
75 mdio@24520 { 99 mdio@24520 {
76 #address-cells = <1>; 100 #address-cells = <1>;
77 #size-cells = <0>; 101 #size-cells = <0>;
78 device_type = "mdio"; 102 compatible = "fsl,gianfar-mdio";
79 compatible = "gianfar";
80 reg = <24520 20>; 103 reg = <24520 20>;
104
81 phy0: ethernet-phy@0 { 105 phy0: ethernet-phy@0 {
82 interrupt-parent = <&mpic>; 106 interrupt-parent = <&mpic>;
83 interrupts = <a 1>; 107 interrupts = <a 1>;
@@ -92,9 +116,8 @@
92 }; 116 };
93 }; 117 };
94 118
95 ethernet@24000 { 119 enet0: ethernet@24000 {
96 #address-cells = <1>; 120 cell-index = <0>;
97 #size-cells = <0>;
98 device_type = "network"; 121 device_type = "network";
99 model = "TSEC"; 122 model = "TSEC";
100 compatible = "gianfar"; 123 compatible = "gianfar";
@@ -106,9 +129,8 @@
106 phy-connection-type = "rgmii-id"; 129 phy-connection-type = "rgmii-id";
107 }; 130 };
108 131
109 ethernet@26000 { 132 enet1: ethernet@26000 {
110 #address-cells = <1>; 133 cell-index = <1>;
111 #size-cells = <0>;
112 device_type = "network"; 134 device_type = "network";
113 model = "TSEC"; 135 model = "TSEC";
114 compatible = "gianfar"; 136 compatible = "gianfar";
@@ -120,7 +142,8 @@
120 phy-connection-type = "rgmii-id"; 142 phy-connection-type = "rgmii-id";
121 }; 143 };
122 144
123 serial@4500 { 145 serial0: serial@4500 {
146 cell-index = <0>;
124 device_type = "serial"; 147 device_type = "serial";
125 compatible = "ns16550"; 148 compatible = "ns16550";
126 reg = <4500 100>; 149 reg = <4500 100>;
@@ -129,7 +152,8 @@
129 interrupt-parent = <&mpic>; 152 interrupt-parent = <&mpic>;
130 }; 153 };
131 154
132 serial@4600 { 155 serial1: serial@4600 {
156 cell-index = <1>;
133 device_type = "serial"; 157 device_type = "serial";
134 compatible = "ns16550"; 158 compatible = "ns16550";
135 reg = <4600 100>; 159 reg = <4600 100>;
@@ -156,7 +180,8 @@
156 }; 180 };
157 }; 181 };
158 182
159 pci@e0008000 { 183 pci0: pci@e0008000 {
184 cell-index = <0>;
160 compatible = "fsl,mpc8540-pci"; 185 compatible = "fsl,mpc8540-pci";
161 device_type = "pci"; 186 device_type = "pci";
162 interrupt-map-mask = <f800 0 0 7>; 187 interrupt-map-mask = <f800 0 0 7>;
@@ -187,7 +212,8 @@
187 reg = <e0008000 1000>; 212 reg = <e0008000 1000>;
188 }; 213 };
189 214
190 pcie@e0009000 { 215 pci1: pcie@e0009000 {
216 cell-index = <1>;
191 compatible = "fsl,mpc8548-pcie"; 217 compatible = "fsl,mpc8548-pcie";
192 device_type = "pci"; 218 device_type = "pci";
193 #interrupt-cells = <1>; 219 #interrupt-cells = <1>;
@@ -223,7 +249,8 @@
223 }; 249 };
224 }; 250 };
225 251
226 pcie@e000a000 { 252 pci2: pcie@e000a000 {
253 cell-index = <2>;
227 compatible = "fsl,mpc8548-pcie"; 254 compatible = "fsl,mpc8548-pcie";
228 device_type = "pci"; 255 device_type = "pci";
229 #interrupt-cells = <1>; 256 #interrupt-cells = <1>;
@@ -259,7 +286,8 @@
259 }; 286 };
260 }; 287 };
261 288
262 pcie@e000b000 { 289 pci3: pcie@e000b000 {
290 cell-index = <3>;
263 compatible = "fsl,mpc8548-pcie"; 291 compatible = "fsl,mpc8548-pcie";
264 device_type = "pci"; 292 device_type = "pci";
265 #interrupt-cells = <1>; 293 #interrupt-cells = <1>;
@@ -276,9 +304,9 @@
276 interrupt-map = < 304 interrupt-map = <
277 // IDSEL 0x1c USB 305 // IDSEL 0x1c USB
278 e000 0 0 1 &i8259 c 2 306 e000 0 0 1 &i8259 c 2
279 e100 0 0 1 &i8259 9 2 307 e100 0 0 2 &i8259 9 2
280 e200 0 0 1 &i8259 a 2 308 e200 0 0 3 &i8259 a 2
281 e300 0 0 1 &i8259 b 2 309 e300 0 0 4 &i8259 b 2
282 310
283 // IDSEL 0x1d Audio 311 // IDSEL 0x1d Audio
284 e800 0 0 1 &i8259 6 2 312 e800 0 0 1 &i8259 6 2
@@ -369,6 +397,5 @@
369 }; 397 };
370 }; 398 };
371 }; 399 };
372
373 }; 400 };
374}; 401};
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts
index 69ca5025d972..1f470c6a1c63 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dts
+++ b/arch/powerpc/boot/dts/mpc8548cds.dts
@@ -16,6 +16,20 @@
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22/*
23 ethernet2 = &enet2;
24 ethernet3 = &enet3;
25*/
26 serial0 = &serial0;
27 serial1 = &serial1;
28 pci0 = &pci0;
29 pci1 = &pci1;
30 pci2 = &pci2;
31 };
32
19 cpus { 33 cpus {
20 #address-cells = <1>; 34 #address-cells = <1>;
21 #size-cells = <0>; 35 #size-cells = <0>;
@@ -63,7 +77,9 @@
63 }; 77 };
64 78
65 i2c@3000 { 79 i2c@3000 {
66 device_type = "i2c"; 80 #address-cells = <1>;
81 #size-cells = <0>;
82 cell-index = <0>;
67 compatible = "fsl-i2c"; 83 compatible = "fsl-i2c";
68 reg = <3000 100>; 84 reg = <3000 100>;
69 interrupts = <2b 2>; 85 interrupts = <2b 2>;
@@ -71,12 +87,23 @@
71 dfsrr; 87 dfsrr;
72 }; 88 };
73 89
90 i2c@3100 {
91 #address-cells = <1>;
92 #size-cells = <0>;
93 cell-index = <1>;
94 compatible = "fsl-i2c";
95 reg = <3100 100>;
96 interrupts = <2b 2>;
97 interrupt-parent = <&mpic>;
98 dfsrr;
99 };
100
74 mdio@24520 { 101 mdio@24520 {
75 #address-cells = <1>; 102 #address-cells = <1>;
76 #size-cells = <0>; 103 #size-cells = <0>;
77 device_type = "mdio"; 104 compatible = "fsl,gianfar-mdio";
78 compatible = "gianfar";
79 reg = <24520 20>; 105 reg = <24520 20>;
106
80 phy0: ethernet-phy@0 { 107 phy0: ethernet-phy@0 {
81 interrupt-parent = <&mpic>; 108 interrupt-parent = <&mpic>;
82 interrupts = <5 1>; 109 interrupts = <5 1>;
@@ -103,9 +130,8 @@
103 }; 130 };
104 }; 131 };
105 132
106 ethernet@24000 { 133 enet0: ethernet@24000 {
107 #address-cells = <1>; 134 cell-index = <0>;
108 #size-cells = <0>;
109 device_type = "network"; 135 device_type = "network";
110 model = "eTSEC"; 136 model = "eTSEC";
111 compatible = "gianfar"; 137 compatible = "gianfar";
@@ -116,9 +142,8 @@
116 phy-handle = <&phy0>; 142 phy-handle = <&phy0>;
117 }; 143 };
118 144
119 ethernet@25000 { 145 enet1: ethernet@25000 {
120 #address-cells = <1>; 146 cell-index = <1>;
121 #size-cells = <0>;
122 device_type = "network"; 147 device_type = "network";
123 model = "eTSEC"; 148 model = "eTSEC";
124 compatible = "gianfar"; 149 compatible = "gianfar";
@@ -130,9 +155,8 @@
130 }; 155 };
131 156
132/* eTSEC 3/4 are currently broken 157/* eTSEC 3/4 are currently broken
133 ethernet@26000 { 158 enet2: ethernet@26000 {
134 #address-cells = <1>; 159 cell-index = <2>;
135 #size-cells = <0>;
136 device_type = "network"; 160 device_type = "network";
137 model = "eTSEC"; 161 model = "eTSEC";
138 compatible = "gianfar"; 162 compatible = "gianfar";
@@ -143,9 +167,8 @@
143 phy-handle = <&phy2>; 167 phy-handle = <&phy2>;
144 }; 168 };
145 169
146 ethernet@27000 { 170 enet3: ethernet@27000 {
147 #address-cells = <1>; 171 cell-index = <3>;
148 #size-cells = <0>;
149 device_type = "network"; 172 device_type = "network";
150 model = "eTSEC"; 173 model = "eTSEC";
151 compatible = "gianfar"; 174 compatible = "gianfar";
@@ -157,7 +180,8 @@
157 }; 180 };
158 */ 181 */
159 182
160 serial@4500 { 183 serial0: serial@4500 {
184 cell-index = <0>;
161 device_type = "serial"; 185 device_type = "serial";
162 compatible = "ns16550"; 186 compatible = "ns16550";
163 reg = <4500 100>; // reg base, size 187 reg = <4500 100>; // reg base, size
@@ -166,7 +190,8 @@
166 interrupt-parent = <&mpic>; 190 interrupt-parent = <&mpic>;
167 }; 191 };
168 192
169 serial@4600 { 193 serial1: serial@4600 {
194 cell-index = <1>;
170 device_type = "serial"; 195 device_type = "serial";
171 compatible = "ns16550"; 196 compatible = "ns16550";
172 reg = <4600 100>; // reg base, size 197 reg = <4600 100>; // reg base, size
@@ -193,7 +218,8 @@
193 }; 218 };
194 }; 219 };
195 220
196 pci@e0008000 { 221 pci0: pci@e0008000 {
222 cell-index = <0>;
197 interrupt-map-mask = <f800 0 0 7>; 223 interrupt-map-mask = <f800 0 0 7>;
198 interrupt-map = < 224 interrupt-map = <
199 /* IDSEL 0x4 (PCIX Slot 2) */ 225 /* IDSEL 0x4 (PCIX Slot 2) */
@@ -342,7 +368,8 @@
342 }; 368 };
343 }; 369 };
344 370
345 pci@e0009000 { 371 pci1: pci@e0009000 {
372 cell-index = <1>;
346 interrupt-map-mask = <f800 0 0 7>; 373 interrupt-map-mask = <f800 0 0 7>;
347 interrupt-map = < 374 interrupt-map = <
348 375
@@ -366,7 +393,8 @@
366 device_type = "pci"; 393 device_type = "pci";
367 }; 394 };
368 395
369 pcie@e000a000 { 396 pci2: pcie@e000a000 {
397 cell-index = <2>;
370 interrupt-map-mask = <f800 0 0 7>; 398 interrupt-map-mask = <f800 0 0 7>;
371 interrupt-map = < 399 interrupt-map = <
372 400
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts
index 57029cca32b2..4538f3c38862 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/mpc8555cds.dts
@@ -16,6 +16,15 @@
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 serial0 = &serial0;
23 serial1 = &serial1;
24 pci0 = &pci0;
25 pci1 = &pci1;
26 };
27
19 cpus { 28 cpus {
20 #address-cells = <1>; 29 #address-cells = <1>;
21 #size-cells = <0>; 30 #size-cells = <0>;
@@ -63,7 +72,9 @@
63 }; 72 };
64 73
65 i2c@3000 { 74 i2c@3000 {
66 device_type = "i2c"; 75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <0>;
67 compatible = "fsl-i2c"; 78 compatible = "fsl-i2c";
68 reg = <3000 100>; 79 reg = <3000 100>;
69 interrupts = <2b 2>; 80 interrupts = <2b 2>;
@@ -74,9 +85,9 @@
74 mdio@24520 { 85 mdio@24520 {
75 #address-cells = <1>; 86 #address-cells = <1>;
76 #size-cells = <0>; 87 #size-cells = <0>;
77 device_type = "mdio"; 88 compatible = "fsl,gianfar-mdio";
78 compatible = "gianfar";
79 reg = <24520 20>; 89 reg = <24520 20>;
90
80 phy0: ethernet-phy@0 { 91 phy0: ethernet-phy@0 {
81 interrupt-parent = <&mpic>; 92 interrupt-parent = <&mpic>;
82 interrupts = <5 1>; 93 interrupts = <5 1>;
@@ -91,9 +102,8 @@
91 }; 102 };
92 }; 103 };
93 104
94 ethernet@24000 { 105 enet0: ethernet@24000 {
95 #address-cells = <1>; 106 cell-index = <0>;
96 #size-cells = <0>;
97 device_type = "network"; 107 device_type = "network";
98 model = "TSEC"; 108 model = "TSEC";
99 compatible = "gianfar"; 109 compatible = "gianfar";
@@ -104,9 +114,8 @@
104 phy-handle = <&phy0>; 114 phy-handle = <&phy0>;
105 }; 115 };
106 116
107 ethernet@25000 { 117 enet1: ethernet@25000 {
108 #address-cells = <1>; 118 cell-index = <1>;
109 #size-cells = <0>;
110 device_type = "network"; 119 device_type = "network";
111 model = "TSEC"; 120 model = "TSEC";
112 compatible = "gianfar"; 121 compatible = "gianfar";
@@ -117,7 +126,8 @@
117 phy-handle = <&phy1>; 126 phy-handle = <&phy1>;
118 }; 127 };
119 128
120 serial@4500 { 129 serial0: serial@4500 {
130 cell-index = <0>;
121 device_type = "serial"; 131 device_type = "serial";
122 compatible = "ns16550"; 132 compatible = "ns16550";
123 reg = <4500 100>; // reg base, size 133 reg = <4500 100>; // reg base, size
@@ -126,7 +136,8 @@
126 interrupt-parent = <&mpic>; 136 interrupt-parent = <&mpic>;
127 }; 137 };
128 138
129 serial@4600 { 139 serial1: serial@4600 {
140 cell-index = <1>;
130 device_type = "serial"; 141 device_type = "serial";
131 compatible = "ns16550"; 142 compatible = "ns16550";
132 reg = <4600 100>; // reg base, size 143 reg = <4600 100>; // reg base, size
@@ -183,7 +194,8 @@
183 }; 194 };
184 }; 195 };
185 196
186 pci1: pci@e0008000 { 197 pci0: pci@e0008000 {
198 cell-index = <0>;
187 interrupt-map-mask = <1f800 0 0 7>; 199 interrupt-map-mask = <1f800 0 0 7>;
188 interrupt-map = < 200 interrupt-map = <
189 201
@@ -250,11 +262,12 @@
250 #interrupt-cells = <2>; 262 #interrupt-cells = <2>;
251 compatible = "chrp,iic"; 263 compatible = "chrp,iic";
252 interrupts = <1>; 264 interrupts = <1>;
253 interrupt-parent = <&pci1>; 265 interrupt-parent = <&pci0>;
254 }; 266 };
255 }; 267 };
256 268
257 pci@e0009000 { 269 pci1: pci@e0009000 {
270 cell-index = <1>;
258 interrupt-map-mask = <f800 0 0 7>; 271 interrupt-map-mask = <f800 0 0 7>;
259 interrupt-map = < 272 interrupt-map = <
260 273
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 6b362f8222c1..639ce8a709a6 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -16,6 +16,16 @@
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
19 aliases {
20 ethernet0 = &enet0;
21 ethernet1 = &enet1;
22 ethernet2 = &enet2;
23 ethernet3 = &enet3;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 };
28
19 cpus { 29 cpus {
20 #address-cells = <1>; 30 #address-cells = <1>;
21 #size-cells = <0>; 31 #size-cells = <0>;
@@ -63,11 +73,11 @@
63 }; 73 };
64 74
65 mdio@24520 { 75 mdio@24520 {
66 device_type = "mdio";
67 compatible = "gianfar";
68 reg = <24520 20>;
69 #address-cells = <1>; 76 #address-cells = <1>;
70 #size-cells = <0>; 77 #size-cells = <0>;
78 compatible = "fsl,gianfar-mdio";
79 reg = <24520 20>;
80
71 phy0: ethernet-phy@0 { 81 phy0: ethernet-phy@0 {
72 interrupt-parent = <&mpic>; 82 interrupt-parent = <&mpic>;
73 interrupts = <5 1>; 83 interrupts = <5 1>;
@@ -94,36 +104,24 @@
94 }; 104 };
95 }; 105 };
96 106
97 ethernet@24000 { 107 enet0: ethernet@24000 {
108 cell-index = <0>;
98 device_type = "network"; 109 device_type = "network";
99 model = "TSEC"; 110 model = "TSEC";
100 compatible = "gianfar"; 111 compatible = "gianfar";
101 reg = <24000 1000>; 112 reg = <24000 1000>;
102 /*
103 * address is deprecated and will be removed
104 * in 2.6.25. Only recent versions of
105 * U-Boot support local-mac-address, however.
106 */
107 address = [ 00 00 00 00 00 00 ];
108 local-mac-address = [ 00 00 00 00 00 00 ]; 113 local-mac-address = [ 00 00 00 00 00 00 ];
109 interrupts = <1d 2 1e 2 22 2>; 114 interrupts = <1d 2 1e 2 22 2>;
110 interrupt-parent = <&mpic>; 115 interrupt-parent = <&mpic>;
111 phy-handle = <&phy0>; 116 phy-handle = <&phy0>;
112 }; 117 };
113 118
114 ethernet@25000 { 119 enet1: ethernet@25000 {
115 #address-cells = <1>; 120 cell-index = <1>;
116 #size-cells = <0>;
117 device_type = "network"; 121 device_type = "network";
118 model = "TSEC"; 122 model = "TSEC";
119 compatible = "gianfar"; 123 compatible = "gianfar";
120 reg = <25000 1000>; 124 reg = <25000 1000>;
121 /*
122 * address is deprecated and will be removed
123 * in 2.6.25. Only recent versions of
124 * U-Boot support local-mac-address, however.
125 */
126 address = [ 00 00 00 00 00 00 ];
127 local-mac-address = [ 00 00 00 00 00 00 ]; 125 local-mac-address = [ 00 00 00 00 00 00 ];
128 interrupts = <23 2 24 2 28 2>; 126 interrupts = <23 2 24 2 28 2>;
129 interrupt-parent = <&mpic>; 127 interrupt-parent = <&mpic>;
@@ -174,7 +172,7 @@
174 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic"; 172 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
175 }; 173 };
176 174
177 serial@91a00 { 175 serial0: serial@91a00 {
178 device_type = "serial"; 176 device_type = "serial";
179 compatible = "fsl,mpc8560-scc-uart", 177 compatible = "fsl,mpc8560-scc-uart",
180 "fsl,cpm2-scc-uart"; 178 "fsl,cpm2-scc-uart";
@@ -186,7 +184,7 @@
186 interrupt-parent = <&cpmpic>; 184 interrupt-parent = <&cpmpic>;
187 }; 185 };
188 186
189 serial@91a20 { 187 serial1: serial@91a20 {
190 device_type = "serial"; 188 device_type = "serial";
191 compatible = "fsl,mpc8560-scc-uart", 189 compatible = "fsl,mpc8560-scc-uart",
192 "fsl,cpm2-scc-uart"; 190 "fsl,cpm2-scc-uart";
@@ -198,17 +196,11 @@
198 interrupt-parent = <&cpmpic>; 196 interrupt-parent = <&cpmpic>;
199 }; 197 };
200 198
201 ethernet@91320 { 199 enet2: ethernet@91320 {
202 device_type = "network"; 200 device_type = "network";
203 compatible = "fsl,mpc8560-fcc-enet", 201 compatible = "fsl,mpc8560-fcc-enet",
204 "fsl,cpm2-fcc-enet"; 202 "fsl,cpm2-fcc-enet";
205 reg = <91320 20 88500 100 913b0 1>; 203 reg = <91320 20 88500 100 913b0 1>;
206 /*
207 * mac-address is deprecated and will be removed
208 * in 2.6.25. Only recent versions of
209 * U-Boot support local-mac-address, however.
210 */
211 mac-address = [ 00 00 00 00 00 00 ];
212 local-mac-address = [ 00 00 00 00 00 00 ]; 204 local-mac-address = [ 00 00 00 00 00 00 ];
213 fsl,cpm-command = <16200300>; 205 fsl,cpm-command = <16200300>;
214 interrupts = <21 8>; 206 interrupts = <21 8>;
@@ -216,17 +208,11 @@
216 phy-handle = <&phy2>; 208 phy-handle = <&phy2>;
217 }; 209 };
218 210
219 ethernet@91340 { 211 enet3: ethernet@91340 {
220 device_type = "network"; 212 device_type = "network";
221 compatible = "fsl,mpc8560-fcc-enet", 213 compatible = "fsl,mpc8560-fcc-enet",
222 "fsl,cpm2-fcc-enet"; 214 "fsl,cpm2-fcc-enet";
223 reg = <91340 20 88600 100 913d0 1>; 215 reg = <91340 20 88600 100 913d0 1>;
224 /*
225 * mac-address is deprecated and will be removed
226 * in 2.6.25. Only recent versions of
227 * U-Boot support local-mac-address, however.
228 */
229 mac-address = [ 00 00 00 00 00 00 ];
230 local-mac-address = [ 00 00 00 00 00 00 ]; 216 local-mac-address = [ 00 00 00 00 00 00 ];
231 fsl,cpm-command = <1a400300>; 217 fsl,cpm-command = <1a400300>;
232 interrupts = <22 8>; 218 interrupts = <22 8>;
@@ -236,7 +222,8 @@
236 }; 222 };
237 }; 223 };
238 224
239 pci@e0008000 { 225 pci0: pci@e0008000 {
226 cell-index = <0>;
240 #interrupt-cells = <1>; 227 #interrupt-cells = <1>;
241 #size-cells = <2>; 228 #size-cells = <2>;
242 #address-cells = <3>; 229 #address-cells = <3>;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 54394372b12a..97bc048f2158 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -20,6 +20,17 @@
20 #address-cells = <1>; 20 #address-cells = <1>;
21 #size-cells = <1>; 21 #size-cells = <1>;
22 22
23 aliases {
24 ethernet0 = &enet0;
25 ethernet1 = &enet1;
26 ethernet2 = &enet2;
27 ethernet3 = &enet3;
28 serial0 = &serial0;
29 serial1 = &serial1;
30 pci0 = &pci0;
31 pci1 = &pci1;
32 };
33
23 cpus { 34 cpus {
24 #address-cells = <1>; 35 #address-cells = <1>;
25 #size-cells = <0>; 36 #size-cells = <0>;
@@ -74,7 +85,7 @@
74 i2c@3000 { 85 i2c@3000 {
75 #address-cells = <1>; 86 #address-cells = <1>;
76 #size-cells = <0>; 87 #size-cells = <0>;
77 device_type = "i2c"; 88 cell-index = <0>;
78 compatible = "fsl-i2c"; 89 compatible = "fsl-i2c";
79 reg = <3000 100>; 90 reg = <3000 100>;
80 interrupts = <2b 2>; 91 interrupts = <2b 2>;
@@ -90,7 +101,7 @@
90 i2c@3100 { 101 i2c@3100 {
91 #address-cells = <1>; 102 #address-cells = <1>;
92 #size-cells = <0>; 103 #size-cells = <0>;
93 device_type = "i2c"; 104 cell-index = <1>;
94 compatible = "fsl-i2c"; 105 compatible = "fsl-i2c";
95 reg = <3100 100>; 106 reg = <3100 100>;
96 interrupts = <2b 2>; 107 interrupts = <2b 2>;
@@ -101,9 +112,9 @@
101 mdio@24520 { 112 mdio@24520 {
102 #address-cells = <1>; 113 #address-cells = <1>;
103 #size-cells = <0>; 114 #size-cells = <0>;
104 device_type = "mdio"; 115 compatible = "fsl,gianfar-mdio";
105 compatible = "gianfar";
106 reg = <24520 20>; 116 reg = <24520 20>;
117
107 phy0: ethernet-phy@7 { 118 phy0: ethernet-phy@7 {
108 interrupt-parent = <&mpic>; 119 interrupt-parent = <&mpic>;
109 interrupts = <1 1>; 120 interrupts = <1 1>;
@@ -130,45 +141,32 @@
130 }; 141 };
131 }; 142 };
132 143
133 ethernet@24000 { 144 enet0: ethernet@24000 {
134 #address-cells = <1>; 145 cell-index = <0>;
135 #size-cells = <0>;
136 device_type = "network"; 146 device_type = "network";
137 model = "eTSEC"; 147 model = "eTSEC";
138 compatible = "gianfar"; 148 compatible = "gianfar";
139 reg = <24000 1000>; 149 reg = <24000 1000>;
140 /*
141 * mac-address is deprecated and will be removed
142 * in 2.6.25. Only recent versions of
143 * U-Boot support local-mac-address, however.
144 */
145 mac-address = [ 00 00 00 00 00 00 ];
146 local-mac-address = [ 00 00 00 00 00 00 ]; 150 local-mac-address = [ 00 00 00 00 00 00 ];
147 interrupts = <1d 2 1e 2 22 2>; 151 interrupts = <1d 2 1e 2 22 2>;
148 interrupt-parent = <&mpic>; 152 interrupt-parent = <&mpic>;
149 phy-handle = <&phy2>; 153 phy-handle = <&phy2>;
150 }; 154 };
151 155
152 ethernet@25000 { 156 enet1: ethernet@25000 {
153 #address-cells = <1>; 157 cell-index = <1>;
154 #size-cells = <0>;
155 device_type = "network"; 158 device_type = "network";
156 model = "eTSEC"; 159 model = "eTSEC";
157 compatible = "gianfar"; 160 compatible = "gianfar";
158 reg = <25000 1000>; 161 reg = <25000 1000>;
159 /*
160 * mac-address is deprecated and will be removed
161 * in 2.6.25. Only recent versions of
162 * U-Boot support local-mac-address, however.
163 */
164 mac-address = [ 00 00 00 00 00 00 ];
165 local-mac-address = [ 00 00 00 00 00 00 ]; 162 local-mac-address = [ 00 00 00 00 00 00 ];
166 interrupts = <23 2 24 2 28 2>; 163 interrupts = <23 2 24 2 28 2>;
167 interrupt-parent = <&mpic>; 164 interrupt-parent = <&mpic>;
168 phy-handle = <&phy3>; 165 phy-handle = <&phy3>;
169 }; 166 };
170 167
171 serial@4500 { 168 serial0: serial@4500 {
169 cell-index = <0>;
172 device_type = "serial"; 170 device_type = "serial";
173 compatible = "ns16550"; 171 compatible = "ns16550";
174 reg = <4500 100>; 172 reg = <4500 100>;
@@ -183,7 +181,8 @@
183 fsl,has-rstcr; 181 fsl,has-rstcr;
184 }; 182 };
185 183
186 serial@4600 { 184 serial1: serial@4600 {
185 cell-index = <1>;
187 device_type = "serial"; 186 device_type = "serial";
188 compatible = "ns16550"; 187 compatible = "ns16550";
189 reg = <4600 100>; 188 reg = <4600 100>;
@@ -285,24 +284,28 @@
285 #address-cells = <1>; 284 #address-cells = <1>;
286 #size-cells = <1>; 285 #size-cells = <1>;
287 device_type = "qe"; 286 device_type = "qe";
288 model = "QE"; 287 compatible = "fsl,qe";
289 ranges = <0 e0080000 00040000>; 288 ranges = <0 e0080000 00040000>;
290 reg = <e0080000 480>; 289 reg = <e0080000 480>;
291 brg-frequency = <0>; 290 brg-frequency = <0>;
292 bus-frequency = <179A7B00>; 291 bus-frequency = <179A7B00>;
293 292
294 muram@10000 { 293 muram@10000 {
295 device_type = "muram"; 294 #address-cells = <1>;
295 #size-cells = <1>;
296 compatible = "fsl,qe-muram", "fsl,cpm-muram";
296 ranges = <0 00010000 0000c000>; 297 ranges = <0 00010000 0000c000>;
297 298
298 data-only@0{ 299 data-only@0 {
300 compatible = "fsl,qe-muram-data",
301 "fsl,cpm-muram-data";
299 reg = <0 c000>; 302 reg = <0 c000>;
300 }; 303 };
301 }; 304 };
302 305
303 spi@4c0 { 306 spi@4c0 {
304 device_type = "spi"; 307 cell-index = <0>;
305 compatible = "fsl_spi"; 308 compatible = "fsl,spi";
306 reg = <4c0 40>; 309 reg = <4c0 40>;
307 interrupts = <2>; 310 interrupts = <2>;
308 interrupt-parent = <&qeic>; 311 interrupt-parent = <&qeic>;
@@ -310,53 +313,43 @@
310 }; 313 };
311 314
312 spi@500 { 315 spi@500 {
313 device_type = "spi"; 316 cell-index = <1>;
314 compatible = "fsl_spi"; 317 compatible = "fsl,spi";
315 reg = <500 40>; 318 reg = <500 40>;
316 interrupts = <1>; 319 interrupts = <1>;
317 interrupt-parent = <&qeic>; 320 interrupt-parent = <&qeic>;
318 mode = "cpu"; 321 mode = "cpu";
319 }; 322 };
320 323
321 ucc@2000 { 324 enet2: ucc@2000 {
322 device_type = "network"; 325 device_type = "network";
323 compatible = "ucc_geth"; 326 compatible = "ucc_geth";
324 model = "UCC"; 327 model = "UCC";
328 cell-index = <1>;
325 device-id = <1>; 329 device-id = <1>;
326 reg = <2000 200>; 330 reg = <2000 200>;
327 interrupts = <20>; 331 interrupts = <20>;
328 interrupt-parent = <&qeic>; 332 interrupt-parent = <&qeic>;
329 /*
330 * mac-address is deprecated and will be removed
331 * in 2.6.25. Only recent versions of
332 * U-Boot support local-mac-address, however.
333 */
334 mac-address = [ 00 00 00 00 00 00 ];
335 local-mac-address = [ 00 00 00 00 00 00 ]; 333 local-mac-address = [ 00 00 00 00 00 00 ];
336 rx-clock = <0>; 334 rx-clock-name = "none";
337 tx-clock = <20>; 335 tx-clock-name = "clk16";
338 pio-handle = <&pio1>; 336 pio-handle = <&pio1>;
339 phy-handle = <&phy0>; 337 phy-handle = <&phy0>;
340 phy-connection-type = "rgmii-id"; 338 phy-connection-type = "rgmii-id";
341 }; 339 };
342 340
343 ucc@3000 { 341 enet3: ucc@3000 {
344 device_type = "network"; 342 device_type = "network";
345 compatible = "ucc_geth"; 343 compatible = "ucc_geth";
346 model = "UCC"; 344 model = "UCC";
345 cell-index = <2>;
347 device-id = <2>; 346 device-id = <2>;
348 reg = <3000 200>; 347 reg = <3000 200>;
349 interrupts = <21>; 348 interrupts = <21>;
350 interrupt-parent = <&qeic>; 349 interrupt-parent = <&qeic>;
351 /*
352 * mac-address is deprecated and will be removed
353 * in 2.6.25. Only recent versions of
354 * U-Boot support local-mac-address, however.
355 */
356 mac-address = [ 00 00 00 00 00 00 ];
357 local-mac-address = [ 00 00 00 00 00 00 ]; 350 local-mac-address = [ 00 00 00 00 00 00 ];
358 rx-clock = <0>; 351 rx-clock-name = "none";
359 tx-clock = <20>; 352 tx-clock-name = "clk16";
360 pio-handle = <&pio2>; 353 pio-handle = <&pio2>;
361 phy-handle = <&phy1>; 354 phy-handle = <&phy1>;
362 phy-connection-type = "rgmii-id"; 355 phy-connection-type = "rgmii-id";
@@ -366,8 +359,7 @@
366 #address-cells = <1>; 359 #address-cells = <1>;
367 #size-cells = <0>; 360 #size-cells = <0>;
368 reg = <2120 18>; 361 reg = <2120 18>;
369 device_type = "mdio"; 362 compatible = "fsl,ucc-mdio";
370 compatible = "ucc_geth_phy";
371 363
372 /* These are the same PHYs as on 364 /* These are the same PHYs as on
373 * gianfar's MDIO bus */ 365 * gianfar's MDIO bus */
@@ -397,9 +389,9 @@
397 }; 389 };
398 }; 390 };
399 391
400 qeic: qeic@80 { 392 qeic: interrupt-controller@80 {
401 interrupt-controller; 393 interrupt-controller;
402 device_type = "qeic"; 394 compatible = "fsl,qe-ic";
403 #address-cells = <0>; 395 #address-cells = <0>;
404 #interrupt-cells = <1>; 396 #interrupt-cells = <1>;
405 reg = <80 80>; 397 reg = <80 80>;
@@ -410,7 +402,8 @@
410 402
411 }; 403 };
412 404
413 pci@e0008000 { 405 pci0: pci@e0008000 {
406 cell-index = <0>;
414 interrupt-map-mask = <f800 0 0 7>; 407 interrupt-map-mask = <f800 0 0 7>;
415 interrupt-map = < 408 interrupt-map = <
416 /* IDSEL 0x12 AD18 */ 409 /* IDSEL 0x12 AD18 */
@@ -440,7 +433,8 @@
440 }; 433 };
441 434
442 /* PCI Express */ 435 /* PCI Express */
443 pcie@e000a000 { 436 pci1: pcie@e000a000 {
437 cell-index = <2>;
444 interrupt-map-mask = <f800 0 0 7>; 438 interrupt-map-mask = <f800 0 0 7>;
445 interrupt-map = < 439 interrupt-map = <
446 440
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts
index 0eb44fb9647d..813c259abbe5 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/mpc8572ds.dts
@@ -15,6 +15,18 @@
15 #address-cells = <1>; 15 #address-cells = <1>;
16 #size-cells = <1>; 16 #size-cells = <1>;
17 17
18 aliases {
19 ethernet0 = &enet0;
20 ethernet1 = &enet1;
21 ethernet2 = &enet2;
22 ethernet3 = &enet3;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 pci1 = &pci1;
27 pci2 = &pci2;
28 };
29
18 cpus { 30 cpus {
19 #address-cells = <1>; 31 #address-cells = <1>;
20 #size-cells = <0>; 32 #size-cells = <0>;
@@ -69,7 +81,9 @@
69 }; 81 };
70 82
71 i2c@3000 { 83 i2c@3000 {
72 device_type = "i2c"; 84 #address-cells = <1>;
85 #size-cells = <0>;
86 cell-index = <0>;
73 compatible = "fsl-i2c"; 87 compatible = "fsl-i2c";
74 reg = <3000 100>; 88 reg = <3000 100>;
75 interrupts = <2b 2>; 89 interrupts = <2b 2>;
@@ -78,7 +92,9 @@
78 }; 92 };
79 93
80 i2c@3100 { 94 i2c@3100 {
81 device_type = "i2c"; 95 #address-cells = <1>;
96 #size-cells = <0>;
97 cell-index = <1>;
82 compatible = "fsl-i2c"; 98 compatible = "fsl-i2c";
83 reg = <3100 100>; 99 reg = <3100 100>;
84 interrupts = <2b 2>; 100 interrupts = <2b 2>;
@@ -89,9 +105,9 @@
89 mdio@24520 { 105 mdio@24520 {
90 #address-cells = <1>; 106 #address-cells = <1>;
91 #size-cells = <0>; 107 #size-cells = <0>;
92 device_type = "mdio"; 108 compatible = "fsl,gianfar-mdio";
93 compatible = "gianfar";
94 reg = <24520 20>; 109 reg = <24520 20>;
110
95 phy0: ethernet-phy@0 { 111 phy0: ethernet-phy@0 {
96 interrupt-parent = <&mpic>; 112 interrupt-parent = <&mpic>;
97 interrupts = <a 1>; 113 interrupts = <a 1>;
@@ -114,9 +130,8 @@
114 }; 130 };
115 }; 131 };
116 132
117 ethernet@24000 { 133 enet0: ethernet@24000 {
118 #address-cells = <1>; 134 cell-index = <0>;
119 #size-cells = <0>;
120 device_type = "network"; 135 device_type = "network";
121 model = "eTSEC"; 136 model = "eTSEC";
122 compatible = "gianfar"; 137 compatible = "gianfar";
@@ -128,9 +143,8 @@
128 phy-connection-type = "rgmii-id"; 143 phy-connection-type = "rgmii-id";
129 }; 144 };
130 145
131 ethernet@25000 { 146 enet1: ethernet@25000 {
132 #address-cells = <1>; 147 cell-index = <1>;
133 #size-cells = <0>;
134 device_type = "network"; 148 device_type = "network";
135 model = "eTSEC"; 149 model = "eTSEC";
136 compatible = "gianfar"; 150 compatible = "gianfar";
@@ -142,9 +156,8 @@
142 phy-connection-type = "rgmii-id"; 156 phy-connection-type = "rgmii-id";
143 }; 157 };
144 158
145 ethernet@26000 { 159 enet2: ethernet@26000 {
146 #address-cells = <1>; 160 cell-index = <2>;
147 #size-cells = <0>;
148 device_type = "network"; 161 device_type = "network";
149 model = "eTSEC"; 162 model = "eTSEC";
150 compatible = "gianfar"; 163 compatible = "gianfar";
@@ -156,9 +169,8 @@
156 phy-connection-type = "rgmii-id"; 169 phy-connection-type = "rgmii-id";
157 }; 170 };
158 171
159 ethernet@27000 { 172 enet3: ethernet@27000 {
160 #address-cells = <1>; 173 cell-index = <3>;
161 #size-cells = <0>;
162 device_type = "network"; 174 device_type = "network";
163 model = "eTSEC"; 175 model = "eTSEC";
164 compatible = "gianfar"; 176 compatible = "gianfar";
@@ -170,7 +182,8 @@
170 phy-connection-type = "rgmii-id"; 182 phy-connection-type = "rgmii-id";
171 }; 183 };
172 184
173 serial@4500 { 185 serial0: serial@4500 {
186 cell-index = <0>;
174 device_type = "serial"; 187 device_type = "serial";
175 compatible = "ns16550"; 188 compatible = "ns16550";
176 reg = <4500 100>; 189 reg = <4500 100>;
@@ -179,7 +192,8 @@
179 interrupt-parent = <&mpic>; 192 interrupt-parent = <&mpic>;
180 }; 193 };
181 194
182 serial@4600 { 195 serial1: serial@4600 {
196 cell-index = <1>;
183 device_type = "serial"; 197 device_type = "serial";
184 compatible = "ns16550"; 198 compatible = "ns16550";
185 reg = <4600 100>; 199 reg = <4600 100>;
@@ -206,7 +220,8 @@
206 }; 220 };
207 }; 221 };
208 222
209 pcie@ffe08000 { 223 pci0: pcie@ffe08000 {
224 cell-index = <0>;
210 compatible = "fsl,mpc8548-pcie"; 225 compatible = "fsl,mpc8548-pcie";
211 device_type = "pci"; 226 device_type = "pci";
212 #interrupt-cells = <1>; 227 #interrupt-cells = <1>;
@@ -319,9 +334,9 @@
319 334
320 // IDSEL 0x1c USB 335 // IDSEL 0x1c USB
321 e000 0 0 1 &i8259 c 2 336 e000 0 0 1 &i8259 c 2
322 e100 0 0 1 &i8259 9 2 337 e100 0 0 2 &i8259 9 2
323 e200 0 0 1 &i8259 a 2 338 e200 0 0 3 &i8259 a 2
324 e300 0 0 1 &i8259 b 2 339 e300 0 0 4 &i8259 b 2
325 340
326 // IDSEL 0x1d Audio 341 // IDSEL 0x1d Audio
327 e800 0 0 1 &i8259 6 2 342 e800 0 0 1 &i8259 6 2
@@ -415,7 +430,8 @@
415 430
416 }; 431 };
417 432
418 pcie@ffe09000 { 433 pci1: pcie@ffe09000 {
434 cell-index = <1>;
419 compatible = "fsl,mpc8548-pcie"; 435 compatible = "fsl,mpc8548-pcie";
420 device_type = "pci"; 436 device_type = "pci";
421 #interrupt-cells = <1>; 437 #interrupt-cells = <1>;
@@ -451,7 +467,8 @@
451 }; 467 };
452 }; 468 };
453 469
454 pcie@ffe0a000 { 470 pci2: pcie@ffe0a000 {
471 cell-index = <2>;
455 compatible = "fsl,mpc8548-pcie"; 472 compatible = "fsl,mpc8548-pcie";
456 device_type = "pci"; 473 device_type = "pci";
457 #interrupt-cells = <1>; 474 #interrupt-cells = <1>;
@@ -464,6 +481,7 @@
464 clock-frequency = <1fca055>; 481 clock-frequency = <1fca055>;
465 interrupt-parent = <&mpic>; 482 interrupt-parent = <&mpic>;
466 interrupts = <1b 2>; 483 interrupts = <1b 2>;
484 interrupt-map-mask = <f800 0 0 7>;
467 interrupt-map = < 485 interrupt-map = <
468 /* IDSEL 0x0 */ 486 /* IDSEL 0x0 */
469 0000 0 0 1 &mpic 0 1 487 0000 0 0 1 &mpic 0 1
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 966edf1161a6..16c947b8a721 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -1,13 +1,14 @@
1/* 1/*
2 * MPC8610 HPCD Device Tree Source 2 * MPC8610 HPCD Device Tree Source
3 * 3 *
4 * Copyright 2007 Freescale Semiconductor Inc. 4 * Copyright 2007-2008 Freescale Semiconductor Inc.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License Version 2 as published 7 * under the terms of the GNU General Public License Version 2 as published
8 * by the Free Software Foundation. 8 * by the Free Software Foundation.
9 */ 9 */
10 10
11/dts-v1/;
11 12
12/ { 13/ {
13 model = "MPC8610HPCD"; 14 model = "MPC8610HPCD";
@@ -15,6 +16,13 @@
15 #address-cells = <1>; 16 #address-cells = <1>;
16 #size-cells = <1>; 17 #size-cells = <1>;
17 18
19 aliases {
20 serial0 = &serial0;
21 serial1 = &serial1;
22 pci0 = &pci0;
23 pci1 = &pci1;
24 };
25
18 cpus { 26 cpus {
19 #address-cells = <1>; 27 #address-cells = <1>;
20 #size-cells = <0>; 28 #size-cells = <0>;
@@ -22,11 +30,11 @@
22 PowerPC,8610@0 { 30 PowerPC,8610@0 {
23 device_type = "cpu"; 31 device_type = "cpu";
24 reg = <0>; 32 reg = <0>;
25 d-cache-line-size = <d# 32>; // bytes 33 d-cache-line-size = <32>;
26 i-cache-line-size = <d# 32>; // bytes 34 i-cache-line-size = <32>;
27 d-cache-size = <8000>; // L1, 32K 35 d-cache-size = <32768>; // L1
28 i-cache-size = <8000>; // L1, 32K 36 i-cache-size = <32768>; // L1
29 timebase-frequency = <0>; // 33 MHz, from uboot 37 timebase-frequency = <0>; // From uboot
30 bus-frequency = <0>; // From uboot 38 bus-frequency = <0>; // From uboot
31 clock-frequency = <0>; // From uboot 39 clock-frequency = <0>; // From uboot
32 }; 40 };
@@ -34,7 +42,7 @@
34 42
35 memory { 43 memory {
36 device_type = "memory"; 44 device_type = "memory";
37 reg = <00000000 20000000>; // 512M at 0x0 45 reg = <0x00000000 0x20000000>; // 512M at 0x0
38 }; 46 };
39 47
40 soc@e0000000 { 48 soc@e0000000 {
@@ -42,57 +50,66 @@
42 #size-cells = <1>; 50 #size-cells = <1>;
43 #interrupt-cells = <2>; 51 #interrupt-cells = <2>;
44 device_type = "soc"; 52 device_type = "soc";
45 ranges = <0 e0000000 00100000>; 53 compatible = "fsl,mpc8610-immr", "simple-bus";
46 reg = <e0000000 1000>; 54 ranges = <0x0 0xe0000000 0x00100000>;
55 reg = <0xe0000000 0x1000>;
47 bus-frequency = <0>; 56 bus-frequency = <0>;
48 57
49 i2c@3000 { 58 i2c@3000 {
50 device_type = "i2c";
51 compatible = "fsl-i2c";
52 #address-cells = <1>; 59 #address-cells = <1>;
53 #size-cells = <0>; 60 #size-cells = <0>;
54 reg = <3000 100>; 61 cell-index = <0>;
55 interrupts = <2b 2>; 62 compatible = "fsl-i2c";
63 reg = <0x3000 0x100>;
64 interrupts = <43 2>;
56 interrupt-parent = <&mpic>; 65 interrupt-parent = <&mpic>;
57 dfsrr; 66 dfsrr;
67
68 cs4270:codec@4f {
69 compatible = "cirrus,cs4270";
70 reg = <0x4f>;
71 /* MCLK source is a stand-alone oscillator */
72 clock-frequency = <12288000>;
73 };
58 }; 74 };
59 75
60 i2c@3100 { 76 i2c@3100 {
61 device_type = "i2c";
62 compatible = "fsl-i2c";
63 #address-cells = <1>; 77 #address-cells = <1>;
64 #size-cells = <0>; 78 #size-cells = <0>;
65 reg = <3100 100>; 79 cell-index = <1>;
66 interrupts = <2b 2>; 80 compatible = "fsl-i2c";
81 reg = <0x3100 0x100>;
82 interrupts = <43 2>;
67 interrupt-parent = <&mpic>; 83 interrupt-parent = <&mpic>;
68 dfsrr; 84 dfsrr;
69 }; 85 };
70 86
71 serial@4500 { 87 serial0: serial@4500 {
88 cell-index = <0>;
72 device_type = "serial"; 89 device_type = "serial";
73 compatible = "ns16550"; 90 compatible = "ns16550";
74 reg = <4500 100>; 91 reg = <0x4500 0x100>;
75 clock-frequency = <0>; 92 clock-frequency = <0>;
76 interrupts = <2a 2>; 93 interrupts = <42 2>;
77 interrupt-parent = <&mpic>; 94 interrupt-parent = <&mpic>;
78 }; 95 };
79 96
80 serial@4600 { 97 serial1: serial@4600 {
98 cell-index = <1>;
81 device_type = "serial"; 99 device_type = "serial";
82 compatible = "ns16550"; 100 compatible = "ns16550";
83 reg = <4600 100>; 101 reg = <0x4600 0x100>;
84 clock-frequency = <0>; 102 clock-frequency = <0>;
85 interrupts = <1c 2>; 103 interrupts = <28 2>;
86 interrupt-parent = <&mpic>; 104 interrupt-parent = <&mpic>;
87 }; 105 };
88 106
89
90 mpic: interrupt-controller@40000 { 107 mpic: interrupt-controller@40000 {
91 clock-frequency = <0>; 108 clock-frequency = <0>;
92 interrupt-controller; 109 interrupt-controller;
93 #address-cells = <0>; 110 #address-cells = <0>;
94 #interrupt-cells = <2>; 111 #interrupt-cells = <2>;
95 reg = <40000 40000>; 112 reg = <0x40000 0x40000>;
96 compatible = "chrp,open-pic"; 113 compatible = "chrp,open-pic";
97 device_type = "open-pic"; 114 device_type = "open-pic";
98 big-endian; 115 big-endian;
@@ -100,68 +117,173 @@
100 117
101 global-utilities@e0000 { 118 global-utilities@e0000 {
102 compatible = "fsl,mpc8610-guts"; 119 compatible = "fsl,mpc8610-guts";
103 reg = <e0000 1000>; 120 reg = <0xe0000 0x1000>;
104 fsl,has-rstcr; 121 fsl,has-rstcr;
105 }; 122 };
123
124 i2s@16000 {
125 compatible = "fsl,mpc8610-ssi";
126 cell-index = <0>;
127 reg = <0x16000 0x100>;
128 interrupt-parent = <&mpic>;
129 interrupts = <62 2>;
130 fsl,mode = "i2s-slave";
131 codec-handle = <&cs4270>;
132 };
133
134 ssi@16100 {
135 compatible = "fsl,mpc8610-ssi";
136 cell-index = <1>;
137 reg = <0x16100 0x100>;
138 interrupt-parent = <&mpic>;
139 interrupts = <63 2>;
140 };
141
142 dma@21300 {
143 #address-cells = <1>;
144 #size-cells = <1>;
145 compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma";
146 cell-index = <0>;
147 reg = <0x21300 0x4>; /* DMA general status register */
148 ranges = <0x0 0x21100 0x200>;
149
150 dma-channel@0 {
151 compatible = "fsl,mpc8610-dma-channel",
152 "fsl,eloplus-dma-channel";
153 cell-index = <0>;
154 reg = <0x0 0x80>;
155 interrupt-parent = <&mpic>;
156 interrupts = <20 2>;
157 };
158 dma-channel@1 {
159 compatible = "fsl,mpc8610-dma-channel",
160 "fsl,eloplus-dma-channel";
161 cell-index = <1>;
162 reg = <0x80 0x80>;
163 interrupt-parent = <&mpic>;
164 interrupts = <21 2>;
165 };
166 dma-channel@2 {
167 compatible = "fsl,mpc8610-dma-channel",
168 "fsl,eloplus-dma-channel";
169 cell-index = <2>;
170 reg = <0x100 0x80>;
171 interrupt-parent = <&mpic>;
172 interrupts = <22 2>;
173 };
174 dma-channel@3 {
175 compatible = "fsl,mpc8610-dma-channel",
176 "fsl,eloplus-dma-channel";
177 cell-index = <3>;
178 reg = <0x180 0x80>;
179 interrupt-parent = <&mpic>;
180 interrupts = <23 2>;
181 };
182 };
183
184 dma@c300 {
185 #address-cells = <1>;
186 #size-cells = <1>;
187 compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma";
188 cell-index = <1>;
189 reg = <0xc300 0x4>; /* DMA general status register */
190 ranges = <0x0 0xc100 0x200>;
191
192 dma-channel@0 {
193 compatible = "fsl,mpc8610-dma-channel",
194 "fsl,mpc8540-dma-channel";
195 cell-index = <0>;
196 reg = <0x0 0x80>;
197 interrupt-parent = <&mpic>;
198 interrupts = <60 2>;
199 };
200 dma-channel@1 {
201 compatible = "fsl,mpc8610-dma-channel",
202 "fsl,mpc8540-dma-channel";
203 cell-index = <1>;
204 reg = <0x80 0x80>;
205 interrupt-parent = <&mpic>;
206 interrupts = <61 2>;
207 };
208 dma-channel@2 {
209 compatible = "fsl,mpc8610-dma-channel",
210 "fsl,mpc8540-dma-channel";
211 cell-index = <2>;
212 reg = <0x100 0x80>;
213 interrupt-parent = <&mpic>;
214 interrupts = <62 2>;
215 };
216 dma-channel@3 {
217 compatible = "fsl,mpc8610-dma-channel",
218 "fsl,mpc8540-dma-channel";
219 cell-index = <3>;
220 reg = <0x180 0x80>;
221 interrupt-parent = <&mpic>;
222 interrupts = <63 2>;
223 };
224 };
225
106 }; 226 };
107 227
108 pci@e0008000 { 228 pci0: pci@e0008000 {
229 cell-index = <0>;
109 compatible = "fsl,mpc8610-pci"; 230 compatible = "fsl,mpc8610-pci";
110 device_type = "pci"; 231 device_type = "pci";
111 #interrupt-cells = <1>; 232 #interrupt-cells = <1>;
112 #size-cells = <2>; 233 #size-cells = <2>;
113 #address-cells = <3>; 234 #address-cells = <3>;
114 reg = <e0008000 1000>; 235 reg = <0xe0008000 0x1000>;
115 bus-range = <0 0>; 236 bus-range = <0 0>;
116 ranges = <02000000 0 80000000 80000000 0 10000000 237 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x10000000
117 01000000 0 00000000 e1000000 0 00100000>; 238 0x01000000 0x0 0x00000000 0xe1000000 0x0 0x00100000>;
118 clock-frequency = <1fca055>; 239 clock-frequency = <33333333>;
119 interrupt-parent = <&mpic>; 240 interrupt-parent = <&mpic>;
120 interrupts = <18 2>; 241 interrupts = <24 2>;
121 interrupt-map-mask = <f800 0 0 7>; 242 interrupt-map-mask = <0xf800 0 0 7>;
122 interrupt-map = < 243 interrupt-map = <
123 /* IDSEL 0x11 */ 244 /* IDSEL 0x11 */
124 8800 0 0 1 &mpic 4 1 245 0x8800 0 0 1 &mpic 4 1
125 8800 0 0 2 &mpic 5 1 246 0x8800 0 0 2 &mpic 5 1
126 8800 0 0 3 &mpic 6 1 247 0x8800 0 0 3 &mpic 6 1
127 8800 0 0 4 &mpic 7 1 248 0x8800 0 0 4 &mpic 7 1
128 249
129 /* IDSEL 0x12 */ 250 /* IDSEL 0x12 */
130 9000 0 0 1 &mpic 5 1 251 0x9000 0 0 1 &mpic 5 1
131 9000 0 0 2 &mpic 6 1 252 0x9000 0 0 2 &mpic 6 1
132 9000 0 0 3 &mpic 7 1 253 0x9000 0 0 3 &mpic 7 1
133 9000 0 0 4 &mpic 4 1 254 0x9000 0 0 4 &mpic 4 1
134 >; 255 >;
135 }; 256 };
136 257
137 pcie@e000a000 { 258 pci1: pcie@e000a000 {
259 cell-index = <1>;
138 compatible = "fsl,mpc8641-pcie"; 260 compatible = "fsl,mpc8641-pcie";
139 device_type = "pci"; 261 device_type = "pci";
140 #interrupt-cells = <1>; 262 #interrupt-cells = <1>;
141 #size-cells = <2>; 263 #size-cells = <2>;
142 #address-cells = <3>; 264 #address-cells = <3>;
143 reg = <e000a000 1000>; 265 reg = <0xe000a000 0x1000>;
144 bus-range = <1 3>; 266 bus-range = <1 3>;
145 ranges = <02000000 0 a0000000 a0000000 0 10000000 267 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x10000000
146 01000000 0 00000000 e3000000 0 00100000>; 268 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>;
147 clock-frequency = <1fca055>; 269 clock-frequency = <33333333>;
148 interrupt-parent = <&mpic>; 270 interrupt-parent = <&mpic>;
149 interrupts = <1a 2>; 271 interrupts = <26 2>;
150 interrupt-map-mask = <f800 0 0 7>; 272 interrupt-map-mask = <0xf800 0 0 7>;
151 273
152 interrupt-map = < 274 interrupt-map = <
153 /* IDSEL 0x1b */ 275 /* IDSEL 0x1b */
154 d800 0 0 1 &mpic 2 1 276 0xd800 0 0 1 &mpic 2 1
155 277
156 /* IDSEL 0x1c*/ 278 /* IDSEL 0x1c*/
157 e000 0 0 1 &mpic 1 1 279 0xe000 0 0 1 &mpic 1 1
158 e000 0 0 2 &mpic 1 1 280 0xe000 0 0 2 &mpic 1 1
159 e000 0 0 3 &mpic 1 1 281 0xe000 0 0 3 &mpic 1 1
160 e000 0 0 4 &mpic 1 1 282 0xe000 0 0 4 &mpic 1 1
161 283
162 /* IDSEL 0x1f */ 284 /* IDSEL 0x1f */
163 f800 0 0 1 &mpic 3 0 285 0xf800 0 0 1 &mpic 3 0
164 f800 0 0 2 &mpic 0 1 286 0xf800 0 0 2 &mpic 0 1
165 >; 287 >;
166 288
167 pcie@0 { 289 pcie@0 {
@@ -169,22 +291,22 @@
169 #size-cells = <2>; 291 #size-cells = <2>;
170 #address-cells = <3>; 292 #address-cells = <3>;
171 device_type = "pci"; 293 device_type = "pci";
172 ranges = <02000000 0 a0000000 294 ranges = <0x02000000 0x0 0xa0000000
173 02000000 0 a0000000 295 0x02000000 0x0 0xa0000000
174 0 10000000 296 0x0 0x10000000
175 01000000 0 00000000 297 0x01000000 0x0 0x00000000
176 01000000 0 00000000 298 0x01000000 0x0 0x00000000
177 0 00100000>; 299 0x0 0x00100000>;
178 uli1575@0 { 300 uli1575@0 {
179 reg = <0 0 0 0 0>; 301 reg = <0 0 0 0 0>;
180 #size-cells = <2>; 302 #size-cells = <2>;
181 #address-cells = <3>; 303 #address-cells = <3>;
182 ranges = <02000000 0 a0000000 304 ranges = <0x02000000 0x0 0xa0000000
183 02000000 0 a0000000 305 0x02000000 0x0 0xa0000000
184 0 10000000 306 0x0 0x10000000
185 01000000 0 00000000 307 0x01000000 0x0 0x00000000
186 01000000 0 00000000 308 0x01000000 0x0 0x00000000
187 0 00100000>; 309 0x0 0x00100000>;
188 }; 310 };
189 }; 311 };
190 }; 312 };
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index abb26dc42558..79385bcd5c5f 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -9,6 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/dts-v1/;
12 13
13/ { 14/ {
14 model = "MPC8641HPCN"; 15 model = "MPC8641HPCN";
@@ -16,6 +17,17 @@
16 #address-cells = <1>; 17 #address-cells = <1>;
17 #size-cells = <1>; 18 #size-cells = <1>;
18 19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 ethernet2 = &enet2;
24 ethernet3 = &enet3;
25 serial0 = &serial0;
26 serial1 = &serial1;
27 pci0 = &pci0;
28 pci1 = &pci1;
29 };
30
19 cpus { 31 cpus {
20 #address-cells = <1>; 32 #address-cells = <1>;
21 #size-cells = <0>; 33 #size-cells = <0>;
@@ -23,22 +35,22 @@
23 PowerPC,8641@0 { 35 PowerPC,8641@0 {
24 device_type = "cpu"; 36 device_type = "cpu";
25 reg = <0>; 37 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes 38 d-cache-line-size = <32>;
27 i-cache-line-size = <20>; // 32 bytes 39 i-cache-line-size = <32>;
28 d-cache-size = <8000>; // L1, 32K 40 d-cache-size = <32768>; // L1
29 i-cache-size = <8000>; // L1, 32K 41 i-cache-size = <32768>; // L1
30 timebase-frequency = <0>; // 33 MHz, from uboot 42 timebase-frequency = <0>; // From uboot
31 bus-frequency = <0>; // From uboot 43 bus-frequency = <0>; // From uboot
32 clock-frequency = <0>; // From uboot 44 clock-frequency = <0>; // From uboot
33 }; 45 };
34 PowerPC,8641@1 { 46 PowerPC,8641@1 {
35 device_type = "cpu"; 47 device_type = "cpu";
36 reg = <1>; 48 reg = <1>;
37 d-cache-line-size = <20>; // 32 bytes 49 d-cache-line-size = <32>;
38 i-cache-line-size = <20>; // 32 bytes 50 i-cache-line-size = <32>;
39 d-cache-size = <8000>; // L1, 32K 51 d-cache-size = <32768>;
40 i-cache-size = <8000>; // L1, 32K 52 i-cache-size = <32768>;
41 timebase-frequency = <0>; // 33 MHz, from uboot 53 timebase-frequency = <0>; // From uboot
42 bus-frequency = <0>; // From uboot 54 bus-frequency = <0>; // From uboot
43 clock-frequency = <0>; // From uboot 55 clock-frequency = <0>; // From uboot
44 }; 56 };
@@ -46,31 +58,77 @@
46 58
47 memory { 59 memory {
48 device_type = "memory"; 60 device_type = "memory";
49 reg = <00000000 40000000>; // 1G at 0x0 61 reg = <0x00000000 0x40000000>; // 1G at 0x0
62 };
63
64 localbus@f8005000 {
65 #address-cells = <2>;
66 #size-cells = <1>;
67 compatible = "fsl,mpc8641-localbus", "simple-bus";
68 reg = <0xf8005000 0x1000>;
69 interrupts = <19 2>;
70 interrupt-parent = <&mpic>;
71
72 ranges = <0 0 0xff800000 0x00800000
73 1 0 0xfe000000 0x01000000
74 2 0 0xf8200000 0x00100000
75 3 0 0xf8100000 0x00100000>;
76
77 flash@0,0 {
78 compatible = "cfi-flash";
79 reg = <0 0 0x00800000>;
80 bank-width = <2>;
81 device-width = <2>;
82 #address-cells = <1>;
83 #size-cells = <1>;
84 partition@0 {
85 label = "kernel";
86 reg = <0x00000000 0x00300000>;
87 };
88 partition@300000 {
89 label = "firmware b";
90 reg = <0x00300000 0x00100000>;
91 read-only;
92 };
93 partition@400000 {
94 label = "fs";
95 reg = <0x00400000 0x00300000>;
96 };
97 partition@700000 {
98 label = "firmware a";
99 reg = <0x00700000 0x00100000>;
100 read-only;
101 };
102 };
50 }; 103 };
51 104
52 soc8641@f8000000 { 105 soc8641@f8000000 {
53 #address-cells = <1>; 106 #address-cells = <1>;
54 #size-cells = <1>; 107 #size-cells = <1>;
55 device_type = "soc"; 108 device_type = "soc";
56 ranges = <00000000 f8000000 00100000>; 109 compatible = "simple-bus";
57 reg = <f8000000 00001000>; // CCSRBAR 110 ranges = <0x00000000 0xf8000000 0x00100000>;
111 reg = <0xf8000000 0x00001000>; // CCSRBAR
58 bus-frequency = <0>; 112 bus-frequency = <0>;
59 113
60 i2c@3000 { 114 i2c@3000 {
61 device_type = "i2c"; 115 #address-cells = <1>;
116 #size-cells = <0>;
117 cell-index = <0>;
62 compatible = "fsl-i2c"; 118 compatible = "fsl-i2c";
63 reg = <3000 100>; 119 reg = <0x3000 0x100>;
64 interrupts = <2b 2>; 120 interrupts = <43 2>;
65 interrupt-parent = <&mpic>; 121 interrupt-parent = <&mpic>;
66 dfsrr; 122 dfsrr;
67 }; 123 };
68 124
69 i2c@3100 { 125 i2c@3100 {
70 device_type = "i2c"; 126 #address-cells = <1>;
127 #size-cells = <0>;
128 cell-index = <1>;
71 compatible = "fsl-i2c"; 129 compatible = "fsl-i2c";
72 reg = <3100 100>; 130 reg = <0x3100 0x100>;
73 interrupts = <2b 2>; 131 interrupts = <43 2>;
74 interrupt-parent = <&mpic>; 132 interrupt-parent = <&mpic>;
75 dfsrr; 133 dfsrr;
76 }; 134 };
@@ -78,129 +136,104 @@
78 mdio@24520 { 136 mdio@24520 {
79 #address-cells = <1>; 137 #address-cells = <1>;
80 #size-cells = <0>; 138 #size-cells = <0>;
81 device_type = "mdio"; 139 compatible = "fsl,gianfar-mdio";
82 compatible = "gianfar"; 140 reg = <0x24520 0x20>;
83 reg = <24520 20>; 141
84 phy0: ethernet-phy@0 { 142 phy0: ethernet-phy@0 {
85 interrupt-parent = <&mpic>; 143 interrupt-parent = <&mpic>;
86 interrupts = <a 1>; 144 interrupts = <10 1>;
87 reg = <0>; 145 reg = <0>;
88 device_type = "ethernet-phy"; 146 device_type = "ethernet-phy";
89 }; 147 };
90 phy1: ethernet-phy@1 { 148 phy1: ethernet-phy@1 {
91 interrupt-parent = <&mpic>; 149 interrupt-parent = <&mpic>;
92 interrupts = <a 1>; 150 interrupts = <10 1>;
93 reg = <1>; 151 reg = <1>;
94 device_type = "ethernet-phy"; 152 device_type = "ethernet-phy";
95 }; 153 };
96 phy2: ethernet-phy@2 { 154 phy2: ethernet-phy@2 {
97 interrupt-parent = <&mpic>; 155 interrupt-parent = <&mpic>;
98 interrupts = <a 1>; 156 interrupts = <10 1>;
99 reg = <2>; 157 reg = <2>;
100 device_type = "ethernet-phy"; 158 device_type = "ethernet-phy";
101 }; 159 };
102 phy3: ethernet-phy@3 { 160 phy3: ethernet-phy@3 {
103 interrupt-parent = <&mpic>; 161 interrupt-parent = <&mpic>;
104 interrupts = <a 1>; 162 interrupts = <10 1>;
105 reg = <3>; 163 reg = <3>;
106 device_type = "ethernet-phy"; 164 device_type = "ethernet-phy";
107 }; 165 };
108 }; 166 };
109 167
110 ethernet@24000 { 168 enet0: ethernet@24000 {
111 #address-cells = <1>; 169 cell-index = <0>;
112 #size-cells = <0>;
113 device_type = "network"; 170 device_type = "network";
114 model = "TSEC"; 171 model = "TSEC";
115 compatible = "gianfar"; 172 compatible = "gianfar";
116 reg = <24000 1000>; 173 reg = <0x24000 0x1000>;
117 /*
118 * mac-address is deprecated and will be removed
119 * in 2.6.25. Only recent versions of
120 * U-Boot support local-mac-address, however.
121 */
122 mac-address = [ 00 00 00 00 00 00 ];
123 local-mac-address = [ 00 00 00 00 00 00 ]; 174 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <1d 2 1e 2 22 2>; 175 interrupts = <29 2 30 2 34 2>;
125 interrupt-parent = <&mpic>; 176 interrupt-parent = <&mpic>;
126 phy-handle = <&phy0>; 177 phy-handle = <&phy0>;
127 phy-connection-type = "rgmii-id"; 178 phy-connection-type = "rgmii-id";
128 }; 179 };
129 180
130 ethernet@25000 { 181 enet1: ethernet@25000 {
131 #address-cells = <1>; 182 cell-index = <1>;
132 #size-cells = <0>;
133 device_type = "network"; 183 device_type = "network";
134 model = "TSEC"; 184 model = "TSEC";
135 compatible = "gianfar"; 185 compatible = "gianfar";
136 reg = <25000 1000>; 186 reg = <0x25000 0x1000>;
137 /*
138 * mac-address is deprecated and will be removed
139 * in 2.6.25. Only recent versions of
140 * U-Boot support local-mac-address, however.
141 */
142 mac-address = [ 00 00 00 00 00 00 ];
143 local-mac-address = [ 00 00 00 00 00 00 ]; 187 local-mac-address = [ 00 00 00 00 00 00 ];
144 interrupts = <23 2 24 2 28 2>; 188 interrupts = <35 2 36 2 40 2>;
145 interrupt-parent = <&mpic>; 189 interrupt-parent = <&mpic>;
146 phy-handle = <&phy1>; 190 phy-handle = <&phy1>;
147 phy-connection-type = "rgmii-id"; 191 phy-connection-type = "rgmii-id";
148 }; 192 };
149 193
150 ethernet@26000 { 194 enet2: ethernet@26000 {
151 #address-cells = <1>; 195 cell-index = <2>;
152 #size-cells = <0>;
153 device_type = "network"; 196 device_type = "network";
154 model = "TSEC"; 197 model = "TSEC";
155 compatible = "gianfar"; 198 compatible = "gianfar";
156 reg = <26000 1000>; 199 reg = <0x26000 0x1000>;
157 /*
158 * mac-address is deprecated and will be removed
159 * in 2.6.25. Only recent versions of
160 * U-Boot support local-mac-address, however.
161 */
162 mac-address = [ 00 00 00 00 00 00 ];
163 local-mac-address = [ 00 00 00 00 00 00 ]; 200 local-mac-address = [ 00 00 00 00 00 00 ];
164 interrupts = <1F 2 20 2 21 2>; 201 interrupts = <31 2 32 2 33 2>;
165 interrupt-parent = <&mpic>; 202 interrupt-parent = <&mpic>;
166 phy-handle = <&phy2>; 203 phy-handle = <&phy2>;
167 phy-connection-type = "rgmii-id"; 204 phy-connection-type = "rgmii-id";
168 }; 205 };
169 206
170 ethernet@27000 { 207 enet3: ethernet@27000 {
171 #address-cells = <1>; 208 cell-index = <3>;
172 #size-cells = <0>;
173 device_type = "network"; 209 device_type = "network";
174 model = "TSEC"; 210 model = "TSEC";
175 compatible = "gianfar"; 211 compatible = "gianfar";
176 reg = <27000 1000>; 212 reg = <0x27000 0x1000>;
177 /*
178 * mac-address is deprecated and will be removed
179 * in 2.6.25. Only recent versions of
180 * U-Boot support local-mac-address, however.
181 */
182 mac-address = [ 00 00 00 00 00 00 ];
183 local-mac-address = [ 00 00 00 00 00 00 ]; 213 local-mac-address = [ 00 00 00 00 00 00 ];
184 interrupts = <25 2 26 2 27 2>; 214 interrupts = <37 2 38 2 39 2>;
185 interrupt-parent = <&mpic>; 215 interrupt-parent = <&mpic>;
186 phy-handle = <&phy3>; 216 phy-handle = <&phy3>;
187 phy-connection-type = "rgmii-id"; 217 phy-connection-type = "rgmii-id";
188 }; 218 };
189 serial@4500 { 219
220 serial0: serial@4500 {
221 cell-index = <0>;
190 device_type = "serial"; 222 device_type = "serial";
191 compatible = "ns16550"; 223 compatible = "ns16550";
192 reg = <4500 100>; 224 reg = <0x4500 0x100>;
193 clock-frequency = <0>; 225 clock-frequency = <0>;
194 interrupts = <2a 2>; 226 interrupts = <42 2>;
195 interrupt-parent = <&mpic>; 227 interrupt-parent = <&mpic>;
196 }; 228 };
197 229
198 serial@4600 { 230 serial1: serial@4600 {
231 cell-index = <1>;
199 device_type = "serial"; 232 device_type = "serial";
200 compatible = "ns16550"; 233 compatible = "ns16550";
201 reg = <4600 100>; 234 reg = <0x4600 0x100>;
202 clock-frequency = <0>; 235 clock-frequency = <0>;
203 interrupts = <1c 2>; 236 interrupts = <28 2>;
204 interrupt-parent = <&mpic>; 237 interrupt-parent = <&mpic>;
205 }; 238 };
206 239
@@ -209,7 +242,7 @@
209 interrupt-controller; 242 interrupt-controller;
210 #address-cells = <0>; 243 #address-cells = <0>;
211 #interrupt-cells = <2>; 244 #interrupt-cells = <2>;
212 reg = <40000 40000>; 245 reg = <0x40000 0x40000>;
213 compatible = "chrp,open-pic"; 246 compatible = "chrp,open-pic";
214 device_type = "open-pic"; 247 device_type = "open-pic";
215 big-endian; 248 big-endian;
@@ -217,138 +250,139 @@
217 250
218 global-utilities@e0000 { 251 global-utilities@e0000 {
219 compatible = "fsl,mpc8641-guts"; 252 compatible = "fsl,mpc8641-guts";
220 reg = <e0000 1000>; 253 reg = <0xe0000 0x1000>;
221 fsl,has-rstcr; 254 fsl,has-rstcr;
222 }; 255 };
223 }; 256 };
224 257
225 pcie@f8008000 { 258 pci0: pcie@f8008000 {
259 cell-index = <0>;
226 compatible = "fsl,mpc8641-pcie"; 260 compatible = "fsl,mpc8641-pcie";
227 device_type = "pci"; 261 device_type = "pci";
228 #interrupt-cells = <1>; 262 #interrupt-cells = <1>;
229 #size-cells = <2>; 263 #size-cells = <2>;
230 #address-cells = <3>; 264 #address-cells = <3>;
231 reg = <f8008000 1000>; 265 reg = <0xf8008000 0x1000>;
232 bus-range = <0 ff>; 266 bus-range = <0x0 0xff>;
233 ranges = <02000000 0 80000000 80000000 0 20000000 267 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000
234 01000000 0 00000000 e2000000 0 00100000>; 268 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
235 clock-frequency = <1fca055>; 269 clock-frequency = <33333333>;
236 interrupt-parent = <&mpic>; 270 interrupt-parent = <&mpic>;
237 interrupts = <18 2>; 271 interrupts = <24 2>;
238 interrupt-map-mask = <ff00 0 0 7>; 272 interrupt-map-mask = <0xff00 0 0 7>;
239 interrupt-map = < 273 interrupt-map = <
240 /* IDSEL 0x11 func 0 - PCI slot 1 */ 274 /* IDSEL 0x11 func 0 - PCI slot 1 */
241 8800 0 0 1 &mpic 2 1 275 0x8800 0 0 1 &mpic 2 1
242 8800 0 0 2 &mpic 3 1 276 0x8800 0 0 2 &mpic 3 1
243 8800 0 0 3 &mpic 4 1 277 0x8800 0 0 3 &mpic 4 1
244 8800 0 0 4 &mpic 1 1 278 0x8800 0 0 4 &mpic 1 1
245 279
246 /* IDSEL 0x11 func 1 - PCI slot 1 */ 280 /* IDSEL 0x11 func 1 - PCI slot 1 */
247 8900 0 0 1 &mpic 2 1 281 0x8900 0 0 1 &mpic 2 1
248 8900 0 0 2 &mpic 3 1 282 0x8900 0 0 2 &mpic 3 1
249 8900 0 0 3 &mpic 4 1 283 0x8900 0 0 3 &mpic 4 1
250 8900 0 0 4 &mpic 1 1 284 0x8900 0 0 4 &mpic 1 1
251 285
252 /* IDSEL 0x11 func 2 - PCI slot 1 */ 286 /* IDSEL 0x11 func 2 - PCI slot 1 */
253 8a00 0 0 1 &mpic 2 1 287 0x8a00 0 0 1 &mpic 2 1
254 8a00 0 0 2 &mpic 3 1 288 0x8a00 0 0 2 &mpic 3 1
255 8a00 0 0 3 &mpic 4 1 289 0x8a00 0 0 3 &mpic 4 1
256 8a00 0 0 4 &mpic 1 1 290 0x8a00 0 0 4 &mpic 1 1
257 291
258 /* IDSEL 0x11 func 3 - PCI slot 1 */ 292 /* IDSEL 0x11 func 3 - PCI slot 1 */
259 8b00 0 0 1 &mpic 2 1 293 0x8b00 0 0 1 &mpic 2 1
260 8b00 0 0 2 &mpic 3 1 294 0x8b00 0 0 2 &mpic 3 1
261 8b00 0 0 3 &mpic 4 1 295 0x8b00 0 0 3 &mpic 4 1
262 8b00 0 0 4 &mpic 1 1 296 0x8b00 0 0 4 &mpic 1 1
263 297
264 /* IDSEL 0x11 func 4 - PCI slot 1 */ 298 /* IDSEL 0x11 func 4 - PCI slot 1 */
265 8c00 0 0 1 &mpic 2 1 299 0x8c00 0 0 1 &mpic 2 1
266 8c00 0 0 2 &mpic 3 1 300 0x8c00 0 0 2 &mpic 3 1
267 8c00 0 0 3 &mpic 4 1 301 0x8c00 0 0 3 &mpic 4 1
268 8c00 0 0 4 &mpic 1 1 302 0x8c00 0 0 4 &mpic 1 1
269 303
270 /* IDSEL 0x11 func 5 - PCI slot 1 */ 304 /* IDSEL 0x11 func 5 - PCI slot 1 */
271 8d00 0 0 1 &mpic 2 1 305 0x8d00 0 0 1 &mpic 2 1
272 8d00 0 0 2 &mpic 3 1 306 0x8d00 0 0 2 &mpic 3 1
273 8d00 0 0 3 &mpic 4 1 307 0x8d00 0 0 3 &mpic 4 1
274 8d00 0 0 4 &mpic 1 1 308 0x8d00 0 0 4 &mpic 1 1
275 309
276 /* IDSEL 0x11 func 6 - PCI slot 1 */ 310 /* IDSEL 0x11 func 6 - PCI slot 1 */
277 8e00 0 0 1 &mpic 2 1 311 0x8e00 0 0 1 &mpic 2 1
278 8e00 0 0 2 &mpic 3 1 312 0x8e00 0 0 2 &mpic 3 1
279 8e00 0 0 3 &mpic 4 1 313 0x8e00 0 0 3 &mpic 4 1
280 8e00 0 0 4 &mpic 1 1 314 0x8e00 0 0 4 &mpic 1 1
281 315
282 /* IDSEL 0x11 func 7 - PCI slot 1 */ 316 /* IDSEL 0x11 func 7 - PCI slot 1 */
283 8f00 0 0 1 &mpic 2 1 317 0x8f00 0 0 1 &mpic 2 1
284 8f00 0 0 2 &mpic 3 1 318 0x8f00 0 0 2 &mpic 3 1
285 8f00 0 0 3 &mpic 4 1 319 0x8f00 0 0 3 &mpic 4 1
286 8f00 0 0 4 &mpic 1 1 320 0x8f00 0 0 4 &mpic 1 1
287 321
288 /* IDSEL 0x12 func 0 - PCI slot 2 */ 322 /* IDSEL 0x12 func 0 - PCI slot 2 */
289 9000 0 0 1 &mpic 3 1 323 0x9000 0 0 1 &mpic 3 1
290 9000 0 0 2 &mpic 4 1 324 0x9000 0 0 2 &mpic 4 1
291 9000 0 0 3 &mpic 1 1 325 0x9000 0 0 3 &mpic 1 1
292 9000 0 0 4 &mpic 2 1 326 0x9000 0 0 4 &mpic 2 1
293 327
294 /* IDSEL 0x12 func 1 - PCI slot 2 */ 328 /* IDSEL 0x12 func 1 - PCI slot 2 */
295 9100 0 0 1 &mpic 3 1 329 0x9100 0 0 1 &mpic 3 1
296 9100 0 0 2 &mpic 4 1 330 0x9100 0 0 2 &mpic 4 1
297 9100 0 0 3 &mpic 1 1 331 0x9100 0 0 3 &mpic 1 1
298 9100 0 0 4 &mpic 2 1 332 0x9100 0 0 4 &mpic 2 1
299 333
300 /* IDSEL 0x12 func 2 - PCI slot 2 */ 334 /* IDSEL 0x12 func 2 - PCI slot 2 */
301 9200 0 0 1 &mpic 3 1 335 0x9200 0 0 1 &mpic 3 1
302 9200 0 0 2 &mpic 4 1 336 0x9200 0 0 2 &mpic 4 1
303 9200 0 0 3 &mpic 1 1 337 0x9200 0 0 3 &mpic 1 1
304 9200 0 0 4 &mpic 2 1 338 0x9200 0 0 4 &mpic 2 1
305 339
306 /* IDSEL 0x12 func 3 - PCI slot 2 */ 340 /* IDSEL 0x12 func 3 - PCI slot 2 */
307 9300 0 0 1 &mpic 3 1 341 0x9300 0 0 1 &mpic 3 1
308 9300 0 0 2 &mpic 4 1 342 0x9300 0 0 2 &mpic 4 1
309 9300 0 0 3 &mpic 1 1 343 0x9300 0 0 3 &mpic 1 1
310 9300 0 0 4 &mpic 2 1 344 0x9300 0 0 4 &mpic 2 1
311 345
312 /* IDSEL 0x12 func 4 - PCI slot 2 */ 346 /* IDSEL 0x12 func 4 - PCI slot 2 */
313 9400 0 0 1 &mpic 3 1 347 0x9400 0 0 1 &mpic 3 1
314 9400 0 0 2 &mpic 4 1 348 0x9400 0 0 2 &mpic 4 1
315 9400 0 0 3 &mpic 1 1 349 0x9400 0 0 3 &mpic 1 1
316 9400 0 0 4 &mpic 2 1 350 0x9400 0 0 4 &mpic 2 1
317 351
318 /* IDSEL 0x12 func 5 - PCI slot 2 */ 352 /* IDSEL 0x12 func 5 - PCI slot 2 */
319 9500 0 0 1 &mpic 3 1 353 0x9500 0 0 1 &mpic 3 1
320 9500 0 0 2 &mpic 4 1 354 0x9500 0 0 2 &mpic 4 1
321 9500 0 0 3 &mpic 1 1 355 0x9500 0 0 3 &mpic 1 1
322 9500 0 0 4 &mpic 2 1 356 0x9500 0 0 4 &mpic 2 1
323 357
324 /* IDSEL 0x12 func 6 - PCI slot 2 */ 358 /* IDSEL 0x12 func 6 - PCI slot 2 */
325 9600 0 0 1 &mpic 3 1 359 0x9600 0 0 1 &mpic 3 1
326 9600 0 0 2 &mpic 4 1 360 0x9600 0 0 2 &mpic 4 1
327 9600 0 0 3 &mpic 1 1 361 0x9600 0 0 3 &mpic 1 1
328 9600 0 0 4 &mpic 2 1 362 0x9600 0 0 4 &mpic 2 1
329 363
330 /* IDSEL 0x12 func 7 - PCI slot 2 */ 364 /* IDSEL 0x12 func 7 - PCI slot 2 */
331 9700 0 0 1 &mpic 3 1 365 0x9700 0 0 1 &mpic 3 1
332 9700 0 0 2 &mpic 4 1 366 0x9700 0 0 2 &mpic 4 1
333 9700 0 0 3 &mpic 1 1 367 0x9700 0 0 3 &mpic 1 1
334 9700 0 0 4 &mpic 2 1 368 0x9700 0 0 4 &mpic 2 1
335 369
336 // IDSEL 0x1c USB 370 // IDSEL 0x1c USB
337 e000 0 0 1 &i8259 c 2 371 0xe000 0 0 1 &i8259 12 2
338 e100 0 0 1 &i8259 9 2 372 0xe100 0 0 2 &i8259 9 2
339 e200 0 0 1 &i8259 a 2 373 0xe200 0 0 3 &i8259 10 2
340 e300 0 0 1 &i8259 b 2 374 0xe300 0 0 4 &i8259 112
341 375
342 // IDSEL 0x1d Audio 376 // IDSEL 0x1d Audio
343 e800 0 0 1 &i8259 6 2 377 0xe800 0 0 1 &i8259 6 2
344 378
345 // IDSEL 0x1e Legacy 379 // IDSEL 0x1e Legacy
346 f000 0 0 1 &i8259 7 2 380 0xf000 0 0 1 &i8259 7 2
347 f100 0 0 1 &i8259 7 2 381 0xf100 0 0 1 &i8259 7 2
348 382
349 // IDSEL 0x1f IDE/SATA 383 // IDSEL 0x1f IDE/SATA
350 f800 0 0 1 &i8259 e 2 384 0xf800 0 0 1 &i8259 14 2
351 f900 0 0 1 &i8259 5 2 385 0xf900 0 0 1 &i8259 5 2
352 >; 386 >;
353 387
354 pcie@0 { 388 pcie@0 {
@@ -356,37 +390,37 @@
356 #size-cells = <2>; 390 #size-cells = <2>;
357 #address-cells = <3>; 391 #address-cells = <3>;
358 device_type = "pci"; 392 device_type = "pci";
359 ranges = <02000000 0 80000000 393 ranges = <0x02000000 0x0 0x80000000
360 02000000 0 80000000 394 0x02000000 0x0 0x80000000
361 0 20000000 395 0x0 0x20000000
362 396
363 01000000 0 00000000 397 0x01000000 0x0 0x00000000
364 01000000 0 00000000 398 0x01000000 0x0 0x00000000
365 0 00100000>; 399 0x0 0x00100000>;
366 uli1575@0 { 400 uli1575@0 {
367 reg = <0 0 0 0 0>; 401 reg = <0 0 0 0 0>;
368 #size-cells = <2>; 402 #size-cells = <2>;
369 #address-cells = <3>; 403 #address-cells = <3>;
370 ranges = <02000000 0 80000000 404 ranges = <0x02000000 0x0 0x80000000
371 02000000 0 80000000 405 0x02000000 0x0 0x80000000
372 0 20000000 406 0x0 0x20000000
373 01000000 0 00000000 407 0x01000000 0x0 0x00000000
374 01000000 0 00000000 408 0x01000000 0x0 0x00000000
375 0 00100000>; 409 0x0 0x00100000>;
376 isa@1e { 410 isa@1e {
377 device_type = "isa"; 411 device_type = "isa";
378 #interrupt-cells = <2>; 412 #interrupt-cells = <2>;
379 #size-cells = <1>; 413 #size-cells = <1>;
380 #address-cells = <2>; 414 #address-cells = <2>;
381 reg = <f000 0 0 0 0>; 415 reg = <0xf000 0 0 0 0>;
382 ranges = <1 0 01000000 0 0 416 ranges = <1 0 0x01000000 0 0
383 00001000>; 417 0x00001000>;
384 interrupt-parent = <&i8259>; 418 interrupt-parent = <&i8259>;
385 419
386 i8259: interrupt-controller@20 { 420 i8259: interrupt-controller@20 {
387 reg = <1 20 2 421 reg = <1 0x20 2
388 1 a0 2 422 1 0xa0 2
389 1 4d0 2>; 423 1 0x4d0 2>;
390 interrupt-controller; 424 interrupt-controller;
391 device_type = "interrupt-controller"; 425 device_type = "interrupt-controller";
392 #address-cells = <0>; 426 #address-cells = <0>;
@@ -399,8 +433,8 @@
399 i8042@60 { 433 i8042@60 {
400 #size-cells = <0>; 434 #size-cells = <0>;
401 #address-cells = <1>; 435 #address-cells = <1>;
402 reg = <1 60 1 1 64 1>; 436 reg = <1 0x60 1 1 0x64 1>;
403 interrupts = <1 3 c 3>; 437 interrupts = <1 3 12 3>;
404 interrupt-parent = 438 interrupt-parent =
405 <&i8259>; 439 <&i8259>;
406 440
@@ -418,11 +452,11 @@
418 rtc@70 { 452 rtc@70 {
419 compatible = 453 compatible =
420 "pnpPNP,b00"; 454 "pnpPNP,b00";
421 reg = <1 70 2>; 455 reg = <1 0x70 2>;
422 }; 456 };
423 457
424 gpio@400 { 458 gpio@400 {
425 reg = <1 400 80>; 459 reg = <1 0x400 0x80>;
426 }; 460 };
427 }; 461 };
428 }; 462 };
@@ -430,39 +464,40 @@
430 464
431 }; 465 };
432 466
433 pcie@f8009000 { 467 pci1: pcie@f8009000 {
468 cell-index = <1>;
434 compatible = "fsl,mpc8641-pcie"; 469 compatible = "fsl,mpc8641-pcie";
435 device_type = "pci"; 470 device_type = "pci";
436 #interrupt-cells = <1>; 471 #interrupt-cells = <1>;
437 #size-cells = <2>; 472 #size-cells = <2>;
438 #address-cells = <3>; 473 #address-cells = <3>;
439 reg = <f8009000 1000>; 474 reg = <0xf8009000 0x1000>;
440 bus-range = <0 ff>; 475 bus-range = <0 0xff>;
441 ranges = <02000000 0 a0000000 a0000000 0 20000000 476 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
442 01000000 0 00000000 e3000000 0 00100000>; 477 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x00100000>;
443 clock-frequency = <1fca055>; 478 clock-frequency = <33333333>;
444 interrupt-parent = <&mpic>; 479 interrupt-parent = <&mpic>;
445 interrupts = <19 2>; 480 interrupts = <25 2>;
446 interrupt-map-mask = <f800 0 0 7>; 481 interrupt-map-mask = <0xf800 0 0 7>;
447 interrupt-map = < 482 interrupt-map = <
448 /* IDSEL 0x0 */ 483 /* IDSEL 0x0 */
449 0000 0 0 1 &mpic 4 1 484 0x0000 0 0 1 &mpic 4 1
450 0000 0 0 2 &mpic 5 1 485 0x0000 0 0 2 &mpic 5 1
451 0000 0 0 3 &mpic 6 1 486 0x0000 0 0 3 &mpic 6 1
452 0000 0 0 4 &mpic 7 1 487 0x0000 0 0 4 &mpic 7 1
453 >; 488 >;
454 pcie@0 { 489 pcie@0 {
455 reg = <0 0 0 0 0>; 490 reg = <0 0 0 0 0>;
456 #size-cells = <2>; 491 #size-cells = <2>;
457 #address-cells = <3>; 492 #address-cells = <3>;
458 device_type = "pci"; 493 device_type = "pci";
459 ranges = <02000000 0 a0000000 494 ranges = <0x02000000 0x0 0xa0000000
460 02000000 0 a0000000 495 0x02000000 0x0 0xa0000000
461 0 20000000 496 0x0 0x20000000
462 497
463 01000000 0 00000000 498 0x01000000 0x0 0x00000000
464 01000000 0 00000000 499 0x01000000 0x0 0x00000000
465 0 00100000>; 500 0x0 0x00100000>;
466 }; 501 };
467 }; 502 };
468}; 503};
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index 90f2293ed3cd..daf9433e906b 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -12,7 +12,7 @@
12 12
13/ { 13/ {
14 model = "MPC866ADS"; 14 model = "MPC866ADS";
15 compatible = "mpc8xx"; 15 compatible = "fsl,mpc866ads";
16 #address-cells = <1>; 16 #address-cells = <1>;
17 #size-cells = <1>; 17 #size-cells = <1>;
18 18
@@ -23,15 +23,15 @@
23 PowerPC,866@0 { 23 PowerPC,866@0 {
24 device_type = "cpu"; 24 device_type = "cpu";
25 reg = <0>; 25 reg = <0>;
26 d-cache-line-size = <20>; // 32 bytes 26 d-cache-line-size = <10>; // 16 bytes
27 i-cache-line-size = <20>; // 32 bytes 27 i-cache-line-size = <10>; // 16 bytes
28 d-cache-size = <2000>; // L1, 8K 28 d-cache-size = <2000>; // L1, 8K
29 i-cache-size = <4000>; // L1, 16K 29 i-cache-size = <4000>; // L1, 16K
30 timebase-frequency = <0>; 30 timebase-frequency = <0>;
31 bus-frequency = <0>; 31 bus-frequency = <0>;
32 clock-frequency = <0>; 32 clock-frequency = <0>;
33 interrupts = <f 2>; // decrementer interrupt 33 interrupts = <f 2>; // decrementer interrupt
34 interrupt-parent = <&Mpc8xx_pic>; 34 interrupt-parent = <&PIC>;
35 }; 35 };
36 }; 36 };
37 37
@@ -40,107 +40,139 @@
40 reg = <00000000 800000>; 40 reg = <00000000 800000>;
41 }; 41 };
42 42
43 soc866@ff000000 { 43 localbus@ff000100 {
44 compatible = "fsl,mpc866-localbus", "fsl,pq1-localbus";
45 #address-cells = <2>;
46 #size-cells = <1>;
47 reg = <ff000100 40>;
48
49 ranges = <
50 1 0 ff080000 00008000
51 5 0 ff0a0000 00008000
52 >;
53
54 board-control@1,0 {
55 reg = <1 0 20 5 300 4>;
56 compatible = "fsl,mpc866ads-bcsr";
57 };
58 };
59
60 soc@ff000000 {
44 #address-cells = <1>; 61 #address-cells = <1>;
45 #size-cells = <1>; 62 #size-cells = <1>;
46 device_type = "soc"; 63 device_type = "soc";
47 ranges = <0 ff000000 00100000>; 64 ranges = <0 ff000000 00100000>;
48 reg = <ff000000 00000200>; 65 reg = <ff000000 00000200>;
49 bus-frequency = <0>; 66 bus-frequency = <0>;
50 mdio@e80 { 67
51 device_type = "mdio"; 68 mdio@e00 {
52 compatible = "fs_enet"; 69 compatible = "fsl,mpc866-fec-mdio", "fsl,pq1-fec-mdio";
53 reg = <e80 8>; 70 reg = <e00 188>;
54 #address-cells = <1>; 71 #address-cells = <1>;
55 #size-cells = <0>; 72 #size-cells = <0>;
56 phy: ethernet-phy@f { 73 PHY: ethernet-phy@f {
57 reg = <f>; 74 reg = <f>;
58 device_type = "ethernet-phy"; 75 device_type = "ethernet-phy";
59 }; 76 };
60 }; 77 };
61 78
62 fec@e00 { 79 ethernet@e00 {
63 device_type = "network"; 80 device_type = "network";
64 compatible = "fs_enet"; 81 compatible = "fsl,mpc866-fec-enet",
65 model = "FEC"; 82 "fsl,pq1-fec-enet";
66 device-id = <1>;
67 reg = <e00 188>; 83 reg = <e00 188>;
68 mac-address = [ 00 00 0C 00 01 FD ]; 84 local-mac-address = [ 00 00 00 00 00 00 ];
69 interrupts = <3 1>; 85 interrupts = <3 1>;
70 interrupt-parent = <&Mpc8xx_pic>; 86 interrupt-parent = <&PIC>;
71 phy-handle = <&Phy>; 87 phy-handle = <&PHY>;
88 linux,network-index = <0>;
72 }; 89 };
73 90
74 mpc8xx_pic: pic@ff000000 { 91 PIC: pic@0 {
75 interrupt-controller; 92 interrupt-controller;
76 #address-cells = <0>;
77 #interrupt-cells = <2>; 93 #interrupt-cells = <2>;
78 reg = <0 24>; 94 reg = <0 24>;
79 device_type = "mpc8xx-pic"; 95 compatible = "fsl,mpc866-pic", "fsl,pq1-pic";
80 compatible = "CPM";
81 }; 96 };
82 97
83 cpm@ff000000 { 98 cpm@9c0 {
84 #address-cells = <1>; 99 #address-cells = <1>;
85 #size-cells = <1>; 100 #size-cells = <1>;
86 device_type = "cpm"; 101 compatible = "fsl,mpc866-cpm", "fsl,cpm1";
87 model = "CPM"; 102 ranges;
88 ranges = <0 0 4000>; 103 reg = <9c0 40>;
89 reg = <860 f0>;
90 command-proc = <9c0>;
91 brg-frequency = <0>; 104 brg-frequency = <0>;
92 interrupts = <0 2>; // cpm error interrupt 105 interrupts = <0 2>; // cpm error interrupt
93 interrupt-parent = <&Cpm_pic>; 106 interrupt-parent = <&CPM_PIC>;
94 107
95 cpm_pic: pic@930 { 108 muram@2000 {
109 #address-cells = <1>;
110 #size-cells = <1>;
111 ranges = <0 2000 2000>;
112
113 data@0 {
114 compatible = "fsl,cpm-muram-data";
115 reg = <0 1c00>;
116 };
117 };
118
119 brg@9f0 {
120 compatible = "fsl,mpc866-brg",
121 "fsl,cpm1-brg",
122 "fsl,cpm-brg";
123 reg = <9f0 10>;
124 clock-frequency = <0>;
125 };
126
127 CPM_PIC: pic@930 {
96 interrupt-controller; 128 interrupt-controller;
97 #address-cells = <0>; 129 #address-cells = <0>;
98 #interrupt-cells = <2>; 130 #interrupt-cells = <1>;
99 interrupts = <5 2 0 2>; 131 interrupts = <5 2 0 2>;
100 interrupt-parent = <&Mpc8xx_pic>; 132 interrupt-parent = <&PIC>;
101 reg = <930 20>; 133 reg = <930 20>;
102 device_type = "cpm-pic"; 134 compatible = "fsl,mpc866-cpm-pic",
103 compatible = "CPM"; 135 "fsl,cpm1-pic";
104 }; 136 };
105 137
106 smc@a80 { 138
139 serial@a80 {
107 device_type = "serial"; 140 device_type = "serial";
108 compatible = "cpm_uart"; 141 compatible = "fsl,mpc866-smc-uart",
109 model = "SMC"; 142 "fsl,cpm1-smc-uart";
110 device-id = <1>;
111 reg = <a80 10 3e80 40>; 143 reg = <a80 10 3e80 40>;
112 clock-setup = <00ffffff 0>; 144 interrupts = <4>;
113 rx-clock = <1>; 145 interrupt-parent = <&CPM_PIC>;
114 tx-clock = <1>; 146 fsl,cpm-brg = <1>;
115 current-speed = <0>; 147 fsl,cpm-command = <0090>;
116 interrupts = <4 3>;
117 interrupt-parent = <&Cpm_pic>;
118 }; 148 };
119 149
120 smc@a90 { 150 serial@a90 {
121 device_type = "serial"; 151 device_type = "serial";
122 compatible = "cpm_uart"; 152 compatible = "fsl,mpc866-smc-uart",
123 model = "SMC"; 153 "fsl,cpm1-smc-uart";
124 device-id = <2>; 154 reg = <a90 10 3f80 40>;
125 reg = <a90 20 3f80 40>; 155 interrupts = <3>;
126 clock-setup = <ff00ffff 90000>; 156 interrupt-parent = <&CPM_PIC>;
127 rx-clock = <2>; 157 fsl,cpm-brg = <2>;
128 tx-clock = <2>; 158 fsl,cpm-command = <00d0>;
129 current-speed = <0>;
130 interrupts = <3 3>;
131 interrupt-parent = <&Cpm_pic>;
132 }; 159 };
133 160
134 scc@a00 { 161 ethernet@a00 {
135 device_type = "network"; 162 device_type = "network";
136 compatible = "fs_enet"; 163 compatible = "fsl,mpc866-scc-enet",
137 model = "SCC"; 164 "fsl,cpm1-scc-enet";
138 device-id = <1>; 165 reg = <a00 18 3c00 100>;
139 reg = <a00 18 3c00 80>; 166 local-mac-address = [ 00 00 00 00 00 00 ];
140 mac-address = [ 00 00 0C 00 03 FD ]; 167 interrupts = <1e>;
141 interrupts = <1e 3>; 168 interrupt-parent = <&CPM_PIC>;
142 interrupt-parent = <&Cpm_pic>; 169 fsl,cpm-command = <0000>;
170 linux,network-index = <1>;
143 }; 171 };
144 }; 172 };
145 }; 173 };
174
175 chosen {
176 linux,stdout-path = "/soc/cpm/serial@a80";
177 };
146}; 178};
diff --git a/arch/powerpc/boot/dts/rainier.dts b/arch/powerpc/boot/dts/rainier.dts
new file mode 100644
index 000000000000..d3c2ac394ce9
--- /dev/null
+++ b/arch/powerpc/boot/dts/rainier.dts
@@ -0,0 +1,353 @@
1/*
2 * Device Tree Source for AMCC Rainier
3 *
4 * Based on Sequoia code
5 * Copyright (c) 2007 MontaVista Software, Inc.
6 *
7 * FIXME: Draft only!
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without
11 * any warranty of any kind, whether express or implied.
12 *
13 */
14
15/ {
16 #address-cells = <2>;
17 #size-cells = <1>;
18 model = "amcc,rainier";
19 compatible = "amcc,rainier";
20 dcr-parent = <&/cpus/cpu@0>;
21
22 aliases {
23 ethernet0 = &EMAC0;
24 ethernet1 = &EMAC1;
25 serial0 = &UART0;
26 serial1 = &UART1;
27 serial2 = &UART2;
28 serial3 = &UART3;
29 };
30
31 cpus {
32 #address-cells = <1>;
33 #size-cells = <0>;
34
35 cpu@0 {
36 device_type = "cpu";
37 model = "PowerPC,440GRx";
38 reg = <0>;
39 clock-frequency = <0>; /* Filled in by zImage */
40 timebase-frequency = <0>; /* Filled in by zImage */
41 i-cache-line-size = <20>;
42 d-cache-line-size = <20>;
43 i-cache-size = <8000>;
44 d-cache-size = <8000>;
45 dcr-controller;
46 dcr-access-method = "native";
47 };
48 };
49
50 memory {
51 device_type = "memory";
52 reg = <0 0 0>; /* Filled in by zImage */
53 };
54
55 UIC0: interrupt-controller0 {
56 compatible = "ibm,uic-440grx","ibm,uic";
57 interrupt-controller;
58 cell-index = <0>;
59 dcr-reg = <0c0 009>;
60 #address-cells = <0>;
61 #size-cells = <0>;
62 #interrupt-cells = <2>;
63 };
64
65 UIC1: interrupt-controller1 {
66 compatible = "ibm,uic-440grx","ibm,uic";
67 interrupt-controller;
68 cell-index = <1>;
69 dcr-reg = <0d0 009>;
70 #address-cells = <0>;
71 #size-cells = <0>;
72 #interrupt-cells = <2>;
73 interrupts = <1e 4 1f 4>; /* cascade */
74 interrupt-parent = <&UIC0>;
75 };
76
77 UIC2: interrupt-controller2 {
78 compatible = "ibm,uic-440grx","ibm,uic";
79 interrupt-controller;
80 cell-index = <2>;
81 dcr-reg = <0e0 009>;
82 #address-cells = <0>;
83 #size-cells = <0>;
84 #interrupt-cells = <2>;
85 interrupts = <1c 4 1d 4>; /* cascade */
86 interrupt-parent = <&UIC0>;
87 };
88
89 SDR0: sdr {
90 compatible = "ibm,sdr-440grx", "ibm,sdr-440ep";
91 dcr-reg = <00e 002>;
92 };
93
94 CPR0: cpr {
95 compatible = "ibm,cpr-440grx", "ibm,cpr-440ep";
96 dcr-reg = <00c 002>;
97 };
98
99 plb {
100 compatible = "ibm,plb-440grx", "ibm,plb4";
101 #address-cells = <2>;
102 #size-cells = <1>;
103 ranges;
104 clock-frequency = <0>; /* Filled in by zImage */
105
106 SDRAM0: sdram {
107 compatible = "ibm,sdram-440grx", "ibm,sdram-44x-ddr2denali";
108 dcr-reg = <010 2>;
109 };
110
111 DMA0: dma {
112 compatible = "ibm,dma-440grx", "ibm,dma-4xx";
113 dcr-reg = <100 027>;
114 };
115
116 MAL0: mcmal {
117 compatible = "ibm,mcmal-440grx", "ibm,mcmal2";
118 dcr-reg = <180 62>;
119 num-tx-chans = <2>;
120 num-rx-chans = <2>;
121 interrupt-parent = <&MAL0>;
122 interrupts = <0 1 2 3 4>;
123 #interrupt-cells = <1>;
124 #address-cells = <0>;
125 #size-cells = <0>;
126 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
127 /*RXEOB*/ 1 &UIC0 b 4
128 /*SERR*/ 2 &UIC1 0 4
129 /*TXDE*/ 3 &UIC1 1 4
130 /*RXDE*/ 4 &UIC1 2 4>;
131 interrupt-map-mask = <ffffffff>;
132 };
133
134 POB0: opb {
135 compatible = "ibm,opb-440grx", "ibm,opb";
136 #address-cells = <1>;
137 #size-cells = <1>;
138 ranges = <00000000 1 00000000 80000000
139 80000000 1 80000000 80000000>;
140 interrupt-parent = <&UIC1>;
141 interrupts = <7 4>;
142 clock-frequency = <0>; /* Filled in by zImage */
143
144 EBC0: ebc {
145 compatible = "ibm,ebc-440grx", "ibm,ebc";
146 dcr-reg = <012 2>;
147 #address-cells = <2>;
148 #size-cells = <1>;
149 clock-frequency = <0>; /* Filled in by zImage */
150 interrupts = <5 1>;
151 interrupt-parent = <&UIC1>;
152
153 nor_flash@0,0 {
154 compatible = "amd,s29gl256n", "cfi-flash";
155 bank-width = <2>;
156 reg = <0 000000 4000000>;
157 #address-cells = <1>;
158 #size-cells = <1>;
159 partition@0 {
160 label = "Kernel";
161 reg = <0 180000>;
162 };
163 partition@180000 {
164 label = "ramdisk";
165 reg = <180000 200000>;
166 };
167 partition@380000 {
168 label = "file system";
169 reg = <380000 3aa0000>;
170 };
171 partition@3e20000 {
172 label = "kozio";
173 reg = <3e20000 140000>;
174 };
175 partition@3f60000 {
176 label = "env";
177 reg = <3f60000 40000>;
178 };
179 partition@3fa0000 {
180 label = "u-boot";
181 reg = <3fa0000 60000>;
182 };
183 };
184
185 };
186
187 UART0: serial@ef600300 {
188 device_type = "serial";
189 compatible = "ns16550";
190 reg = <ef600300 8>;
191 virtual-reg = <ef600300>;
192 clock-frequency = <0>; /* Filled in by zImage */
193 current-speed = <1c200>;
194 interrupt-parent = <&UIC0>;
195 interrupts = <0 4>;
196 };
197
198 UART1: serial@ef600400 {
199 device_type = "serial";
200 compatible = "ns16550";
201 reg = <ef600400 8>;
202 virtual-reg = <ef600400>;
203 clock-frequency = <0>;
204 current-speed = <0>;
205 interrupt-parent = <&UIC0>;
206 interrupts = <1 4>;
207 };
208
209 UART2: serial@ef600500 {
210 device_type = "serial";
211 compatible = "ns16550";
212 reg = <ef600500 8>;
213 virtual-reg = <ef600500>;
214 clock-frequency = <0>;
215 current-speed = <0>;
216 interrupt-parent = <&UIC1>;
217 interrupts = <3 4>;
218 };
219
220 UART3: serial@ef600600 {
221 device_type = "serial";
222 compatible = "ns16550";
223 reg = <ef600600 8>;
224 virtual-reg = <ef600600>;
225 clock-frequency = <0>;
226 current-speed = <0>;
227 interrupt-parent = <&UIC1>;
228 interrupts = <4 4>;
229 };
230
231 IIC0: i2c@ef600700 {
232 device_type = "i2c";
233 compatible = "ibm,iic-440grx", "ibm,iic";
234 reg = <ef600700 14>;
235 interrupt-parent = <&UIC0>;
236 interrupts = <2 4>;
237 };
238
239 IIC1: i2c@ef600800 {
240 device_type = "i2c";
241 compatible = "ibm,iic-440grx", "ibm,iic";
242 reg = <ef600800 14>;
243 interrupt-parent = <&UIC0>;
244 interrupts = <7 4>;
245 };
246
247 ZMII0: emac-zmii@ef600d00 {
248 device_type = "zmii-interface";
249 compatible = "ibm,zmii-440grx", "ibm,zmii";
250 reg = <ef600d00 c>;
251 };
252
253 RGMII0: emac-rgmii@ef601000 {
254 device_type = "rgmii-interface";
255 compatible = "ibm,rgmii-440grx", "ibm,rgmii";
256 reg = <ef601000 8>;
257 has-mdio;
258 };
259
260 EMAC0: ethernet@ef600e00 {
261 linux,network-index = <0>;
262 device_type = "network";
263 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
264 interrupt-parent = <&EMAC0>;
265 interrupts = <0 1>;
266 #interrupt-cells = <1>;
267 #address-cells = <0>;
268 #size-cells = <0>;
269 interrupt-map = </*Status*/ 0 &UIC0 18 4
270 /*Wake*/ 1 &UIC1 1d 4>;
271 reg = <ef600e00 70>;
272 local-mac-address = [000000000000];
273 mal-device = <&MAL0>;
274 mal-tx-channel = <0>;
275 mal-rx-channel = <0>;
276 cell-index = <0>;
277 max-frame-size = <5dc>;
278 rx-fifo-size = <1000>;
279 tx-fifo-size = <800>;
280 phy-mode = "rgmii";
281 phy-map = <00000000>;
282 zmii-device = <&ZMII0>;
283 zmii-channel = <0>;
284 rgmii-device = <&RGMII0>;
285 rgmii-channel = <0>;
286 has-inverted-stacr-oc;
287 has-new-stacr-staopc;
288 };
289
290 EMAC1: ethernet@ef600f00 {
291 linux,network-index = <1>;
292 device_type = "network";
293 compatible = "ibm,emac-440grx", "ibm,emac-440epx", "ibm,emac4";
294 interrupt-parent = <&EMAC1>;
295 interrupts = <0 1>;
296 #interrupt-cells = <1>;
297 #address-cells = <0>;
298 #size-cells = <0>;
299 interrupt-map = </*Status*/ 0 &UIC0 19 4
300 /*Wake*/ 1 &UIC1 1f 4>;
301 reg = <ef600f00 70>;
302 local-mac-address = [000000000000];
303 mal-device = <&MAL0>;
304 mal-tx-channel = <1>;
305 mal-rx-channel = <1>;
306 cell-index = <1>;
307 max-frame-size = <5dc>;
308 rx-fifo-size = <1000>;
309 tx-fifo-size = <800>;
310 phy-mode = "rgmii";
311 phy-map = <00000000>;
312 zmii-device = <&ZMII0>;
313 zmii-channel = <1>;
314 rgmii-device = <&RGMII0>;
315 rgmii-channel = <1>;
316 has-inverted-stacr-oc;
317 has-new-stacr-staopc;
318 };
319 };
320
321 PCI0: pci@1ec000000 {
322 device_type = "pci";
323 #interrupt-cells = <1>;
324 #size-cells = <2>;
325 #address-cells = <3>;
326 compatible = "ibm,plb440grx-pci", "ibm,plb-pci";
327 primary;
328 reg = <1 eec00000 8 /* Config space access */
329 1 eed00000 4 /* IACK */
330 1 eed00000 4 /* Special cycle */
331 1 ef400000 40>; /* Internal registers */
332
333 /* Outbound ranges, one memory and one IO,
334 * later cannot be changed. Chip supports a second
335 * IO range but we don't use it for now
336 */
337 ranges = <02000000 0 80000000 1 80000000 0 10000000
338 01000000 0 00000000 1 e8000000 0 00100000>;
339
340 /* Inbound 2GB range starting at 0 */
341 dma-ranges = <42000000 0 0 0 0 0 80000000>;
342
343 /* All PCI interrupts are routed to IRQ 67 */
344 interrupt-map-mask = <0000 0 0 0>;
345 interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
346 };
347 };
348
349 chosen {
350 linux,stdout-path = "/plb/opb/serial@ef600300";
351 bootargs = "console=ttyS0,115200";
352 };
353};
diff --git a/arch/powerpc/boot/dts/sbc8349.dts b/arch/powerpc/boot/dts/sbc8349.dts
new file mode 100644
index 000000000000..3839d4b7d6a7
--- /dev/null
+++ b/arch/powerpc/boot/dts/sbc8349.dts
@@ -0,0 +1,244 @@
1/*
2 * SBC8349E Device Tree Source
3 *
4 * Copyright 2007 Wind River Inc.
5 *
6 * Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * -based largely on the Freescale MPC834x_MDS dts.
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/dts-v1/;
17
18/ {
19 model = "SBC8349E";
20 compatible = "SBC834xE";
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 aliases {
25 ethernet0 = &enet0;
26 ethernet1 = &enet1;
27 serial0 = &serial0;
28 serial1 = &serial1;
29 pci0 = &pci0;
30 };
31
32 cpus {
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,8349@0 {
37 device_type = "cpu";
38 reg = <0x0>;
39 d-cache-line-size = <32>;
40 i-cache-line-size = <32>;
41 d-cache-size = <32768>;
42 i-cache-size = <32768>;
43 timebase-frequency = <0>; // from bootloader
44 bus-frequency = <0>; // from bootloader
45 clock-frequency = <0>; // from bootloader
46 };
47 };
48
49 memory {
50 device_type = "memory";
51 reg = <0x00000000 0x10000000>; // 256MB at 0
52 };
53
54 soc8349@e0000000 {
55 #address-cells = <1>;
56 #size-cells = <1>;
57 device_type = "soc";
58 ranges = <0x0 0xe0000000 0x00100000>;
59 reg = <0xe0000000 0x00000200>;
60 bus-frequency = <0>;
61
62 wdt@200 {
63 compatible = "mpc83xx_wdt";
64 reg = <0x200 0x100>;
65 };
66
67 i2c@3000 {
68 #address-cells = <1>;
69 #size-cells = <0>;
70 cell-index = <0>;
71 compatible = "fsl-i2c";
72 reg = <0x3000 0x100>;
73 interrupts = <14 0x8>;
74 interrupt-parent = <&ipic>;
75 dfsrr;
76 };
77
78 i2c@3100 {
79 #address-cells = <1>;
80 #size-cells = <0>;
81 cell-index = <1>;
82 compatible = "fsl-i2c";
83 reg = <0x3100 0x100>;
84 interrupts = <15 0x8>;
85 interrupt-parent = <&ipic>;
86 dfsrr;
87 };
88
89 spi@7000 {
90 cell-index = <0>;
91 compatible = "fsl,spi";
92 reg = <0x7000 0x1000>;
93 interrupts = <16 0x8>;
94 interrupt-parent = <&ipic>;
95 mode = "cpu";
96 };
97
98 /* phy type (ULPI or SERIAL) are only types supported for MPH */
99 /* port = 0 or 1 */
100 usb@22000 {
101 compatible = "fsl-usb2-mph";
102 reg = <0x22000 0x1000>;
103 #address-cells = <1>;
104 #size-cells = <0>;
105 interrupt-parent = <&ipic>;
106 interrupts = <39 0x8>;
107 phy_type = "ulpi";
108 port1;
109 };
110 /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
111 usb@23000 {
112 device_type = "usb";
113 compatible = "fsl-usb2-dr";
114 reg = <0x23000 0x1000>;
115 #address-cells = <1>;
116 #size-cells = <0>;
117 interrupt-parent = <&ipic>;
118 interrupts = <38 0x8>;
119 dr_mode = "otg";
120 phy_type = "ulpi";
121 };
122
123 mdio@24520 {
124 #address-cells = <1>;
125 #size-cells = <0>;
126 compatible = "fsl,gianfar-mdio";
127 reg = <0x24520 0x20>;
128
129 phy0: ethernet-phy@19 {
130 interrupt-parent = <&ipic>;
131 interrupts = <20 0x8>;
132 reg = <0x19>;
133 device_type = "ethernet-phy";
134 };
135 phy1: ethernet-phy@1a {
136 interrupt-parent = <&ipic>;
137 interrupts = <21 0x8>;
138 reg = <0x1a>;
139 device_type = "ethernet-phy";
140 };
141 };
142
143 enet0: ethernet@24000 {
144 cell-index = <0>;
145 device_type = "network";
146 model = "TSEC";
147 compatible = "gianfar";
148 reg = <0x24000 0x1000>;
149 local-mac-address = [ 00 00 00 00 00 00 ];
150 interrupts = <32 0x8 33 0x8 34 0x8>;
151 interrupt-parent = <&ipic>;
152 phy-handle = <&phy0>;
153 linux,network-index = <0>;
154 };
155
156 enet1: ethernet@25000 {
157 cell-index = <1>;
158 device_type = "network";
159 model = "TSEC";
160 compatible = "gianfar";
161 reg = <0x25000 0x1000>;
162 local-mac-address = [ 00 00 00 00 00 00 ];
163 interrupts = <35 0x8 36 0x8 37 0x8>;
164 interrupt-parent = <&ipic>;
165 phy-handle = <&phy1>;
166 linux,network-index = <1>;
167 };
168
169 serial0: serial@4500 {
170 cell-index = <0>;
171 device_type = "serial";
172 compatible = "ns16550";
173 reg = <0x4500 0x100>;
174 clock-frequency = <0>;
175 interrupts = <9 0x8>;
176 interrupt-parent = <&ipic>;
177 };
178
179 serial1: serial@4600 {
180 cell-index = <1>;
181 device_type = "serial";
182 compatible = "ns16550";
183 reg = <0x4600 0x100>;
184 clock-frequency = <0>;
185 interrupts = <10 0x8>;
186 interrupt-parent = <&ipic>;
187 };
188
189 /* May need to remove if on a part without crypto engine */
190 crypto@30000 {
191 model = "SEC2";
192 compatible = "talitos";
193 reg = <0x30000 0x10000>;
194 interrupts = <11 0x8>;
195 interrupt-parent = <&ipic>;
196 num-channels = <4>;
197 channel-fifo-len = <24>;
198 exec-units-mask = <0x0000007e>;
199 /* desc mask is for rev2.0,
200 * we need runtime fixup for >2.0 */
201 descriptor-types-mask = <0x01010ebf>;
202 };
203
204 /* IPIC
205 * interrupts cell = <intr #, sense>
206 * sense values match linux IORESOURCE_IRQ_* defines:
207 * sense == 8: Level, low assertion
208 * sense == 2: Edge, high-to-low change
209 */
210 ipic: pic@700 {
211 interrupt-controller;
212 #address-cells = <0>;
213 #interrupt-cells = <2>;
214 reg = <0x700 0x100>;
215 device_type = "ipic";
216 };
217 };
218
219 pci0: pci@e0008500 {
220 cell-index = <1>;
221 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
222 interrupt-map = <
223
224 /* IDSEL 0x11 */
225 0x8800 0x0 0x0 0x1 &ipic 20 0x8
226 0x8800 0x0 0x0 0x2 &ipic 21 0x8
227 0x8800 0x0 0x0 0x3 &ipic 22 0x8
228 0x8800 0x0 0x0 0x4 &ipic 23 0x8>;
229
230 interrupt-parent = <&ipic>;
231 interrupts = <0x42 0x8>;
232 bus-range = <0 0>;
233 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
234 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
235 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
236 clock-frequency = <66666666>;
237 #interrupt-cells = <1>;
238 #size-cells = <2>;
239 #address-cells = <3>;
240 reg = <0xe0008500 0x100>;
241 compatible = "fsl,mpc8349-pci";
242 device_type = "pci";
243 };
244};
diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts
new file mode 100644
index 000000000000..14be38ad5d4b
--- /dev/null
+++ b/arch/powerpc/boot/dts/sbc8548.dts
@@ -0,0 +1,244 @@
1/*
2 * SBC8548 Device Tree Source
3 *
4 * Copyright 2007 Wind River Systems Inc.
5 *
6 * Paul Gortmaker (see MAINTAINERS for contact information)
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/dts-v1/;
16
17/ {
18 model = "SBC8548";
19 compatible = "SBC8548";
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 aliases {
24 ethernet0 = &enet0;
25 ethernet1 = &enet1;
26 serial0 = &serial0;
27 serial1 = &serial1;
28 pci0 = &pci0;
29 /* pci1 doesn't have a corresponding physical connector */
30 pci2 = &pci2;
31 };
32
33 cpus {
34 #address-cells = <1>;
35 #size-cells = <0>;
36
37 PowerPC,8548@0 {
38 device_type = "cpu";
39 reg = <0>;
40 d-cache-line-size = <0x20>; // 32 bytes
41 i-cache-line-size = <0x20>; // 32 bytes
42 d-cache-size = <0x8000>; // L1, 32K
43 i-cache-size = <0x8000>; // L1, 32K
44 timebase-frequency = <0>; // From uboot
45 bus-frequency = <0>;
46 clock-frequency = <0>;
47 };
48 };
49
50 memory {
51 device_type = "memory";
52 reg = <0x00000000 0x10000000>;
53 };
54
55 soc8548@e0000000 {
56 #address-cells = <1>;
57 #size-cells = <1>;
58 device_type = "soc";
59 ranges = <0x00000000 0xe0000000 0x00100000>;
60 reg = <0xe0000000 0x00001000>; // CCSRBAR
61 bus-frequency = <0>;
62
63 memory-controller@2000 {
64 compatible = "fsl,8548-memory-controller";
65 reg = <0x2000 0x1000>;
66 interrupt-parent = <&mpic>;
67 interrupts = <0x12 0x2>;
68 };
69
70 l2-cache-controller@20000 {
71 compatible = "fsl,8548-l2-cache-controller";
72 reg = <0x20000 0x1000>;
73 cache-line-size = <0x20>; // 32 bytes
74 cache-size = <0x80000>; // L2, 512K
75 interrupt-parent = <&mpic>;
76 interrupts = <0x10 0x2>;
77 };
78
79 i2c@3000 {
80 #address-cells = <1>;
81 #size-cells = <0>;
82 cell-index = <0>;
83 compatible = "fsl-i2c";
84 reg = <0x3000 0x100>;
85 interrupts = <0x2b 0x2>;
86 interrupt-parent = <&mpic>;
87 dfsrr;
88 };
89
90 i2c@3100 {
91 #address-cells = <1>;
92 #size-cells = <0>;
93 cell-index = <1>;
94 compatible = "fsl-i2c";
95 reg = <0x3100 0x100>;
96 interrupts = <0x2b 0x2>;
97 interrupt-parent = <&mpic>;
98 dfsrr;
99 };
100
101 mdio@24520 {
102 #address-cells = <1>;
103 #size-cells = <0>;
104 compatible = "fsl,gianfar-mdio";
105 reg = <0x24520 0x20>;
106
107 phy0: ethernet-phy@19 {
108 interrupt-parent = <&mpic>;
109 interrupts = <0x6 0x1>;
110 reg = <0x19>;
111 device_type = "ethernet-phy";
112 };
113 phy1: ethernet-phy@1a {
114 interrupt-parent = <&mpic>;
115 interrupts = <0x7 0x1>;
116 reg = <0x1a>;
117 device_type = "ethernet-phy";
118 };
119 };
120
121 enet0: ethernet@24000 {
122 cell-index = <0>;
123 device_type = "network";
124 model = "eTSEC";
125 compatible = "gianfar";
126 reg = <0x24000 0x1000>;
127 local-mac-address = [ 00 00 00 00 00 00 ];
128 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
129 interrupt-parent = <&mpic>;
130 phy-handle = <&phy0>;
131 };
132
133 enet1: ethernet@25000 {
134 cell-index = <1>;
135 device_type = "network";
136 model = "eTSEC";
137 compatible = "gianfar";
138 reg = <0x25000 0x1000>;
139 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
141 interrupt-parent = <&mpic>;
142 phy-handle = <&phy1>;
143 };
144
145 serial0: serial@4500 {
146 cell-index = <0>;
147 device_type = "serial";
148 compatible = "ns16550";
149 reg = <0x4500 0x100>; // reg base, size
150 clock-frequency = <0>; // should we fill in in uboot?
151 interrupts = <0x2a 0x2>;
152 interrupt-parent = <&mpic>;
153 };
154
155 serial1: serial@4600 {
156 cell-index = <1>;
157 device_type = "serial";
158 compatible = "ns16550";
159 reg = <0x4600 0x100>; // reg base, size
160 clock-frequency = <0>; // should we fill in in uboot?
161 interrupts = <0x2a 0x2>;
162 interrupt-parent = <&mpic>;
163 };
164
165 global-utilities@e0000 { //global utilities reg
166 compatible = "fsl,mpc8548-guts";
167 reg = <0xe0000 0x1000>;
168 fsl,has-rstcr;
169 };
170
171 mpic: pic@40000 {
172 interrupt-controller;
173 #address-cells = <0>;
174 #size-cells = <0>;
175 #interrupt-cells = <2>;
176 reg = <0x40000 0x40000>;
177 compatible = "chrp,open-pic";
178 device_type = "open-pic";
179 big-endian;
180 };
181 };
182
183 pci0: pci@e0008000 {
184 cell-index = <0>;
185 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
186 interrupt-map = <
187 /* IDSEL 0x01 (PCI-X slot) */
188 0x0800 0x0 0x0 0x1 &mpic 0x0 0x1
189 0x0800 0x0 0x0 0x2 &mpic 0x1 0x1
190 0x0800 0x0 0x0 0x3 &mpic 0x2 0x1
191 0x0800 0x0 0x0 0x4 &mpic 0x3 0x1>;
192
193 interrupt-parent = <&mpic>;
194 interrupts = <0x18 0x2>;
195 bus-range = <0 0>;
196 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x10000000
197 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00800000>;
198 clock-frequency = <66666666>;
199 #interrupt-cells = <1>;
200 #size-cells = <2>;
201 #address-cells = <3>;
202 reg = <0xe0008000 0x1000>;
203 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
204 device_type = "pci";
205 };
206
207 pci2: pcie@e000a000 {
208 cell-index = <2>;
209 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
210 interrupt-map = <
211
212 /* IDSEL 0x0 (PEX) */
213 0x0000 0x0 0x0 0x1 &mpic 0x0 0x1
214 0x0000 0x0 0x0 0x2 &mpic 0x1 0x1
215 0x0000 0x0 0x0 0x3 &mpic 0x2 0x1
216 0x0000 0x0 0x0 0x4 &mpic 0x3 0x1>;
217
218 interrupt-parent = <&mpic>;
219 interrupts = <0x1a 0x2>;
220 bus-range = <0x0 0xff>;
221 ranges = <0x02000000 0x0 0xa0000000 0xa0000000 0x0 0x20000000
222 0x01000000 0x0 0x00000000 0xe3000000 0x0 0x08000000>;
223 clock-frequency = <33333333>;
224 #interrupt-cells = <1>;
225 #size-cells = <2>;
226 #address-cells = <3>;
227 reg = <0xe000a000 0x1000>;
228 compatible = "fsl,mpc8548-pcie";
229 device_type = "pci";
230 pcie@0 {
231 reg = <0x0 0x0 0x0 0x0 0x0>;
232 #size-cells = <2>;
233 #address-cells = <3>;
234 device_type = "pci";
235 ranges = <0x02000000 0x0 0xa0000000
236 0x02000000 0x0 0xa0000000
237 0x0 0x20000000
238
239 0x01000000 0x0 0x00000000
240 0x01000000 0x0 0x00000000
241 0x0 0x08000000>;
242 };
243 };
244};
diff --git a/arch/powerpc/boot/dts/sbc8560.dts b/arch/powerpc/boot/dts/sbc8560.dts
new file mode 100644
index 000000000000..0476802fba60
--- /dev/null
+++ b/arch/powerpc/boot/dts/sbc8560.dts
@@ -0,0 +1,330 @@
1/*
2 * SBC8560 Device Tree Source
3 *
4 * Copyright 2007 Wind River Systems Inc.
5 *
6 * Paul Gortmaker (see MAINTAINERS for contact information)
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/dts-v1/;
15
16/ {
17 model = "SBC8560";
18 compatible = "SBC8560";
19 #address-cells = <1>;
20 #size-cells = <1>;
21
22 aliases {
23 ethernet0 = &enet0;
24 ethernet1 = &enet1;
25 ethernet2 = &enet2;
26 ethernet3 = &enet3;
27 serial0 = &serial0;
28 serial1 = &serial1;
29 pci0 = &pci0;
30 };
31
32 cpus {
33 #address-cells = <1>;
34 #size-cells = <0>;
35
36 PowerPC,8560@0 {
37 device_type = "cpu";
38 reg = <0>;
39 d-cache-line-size = <0x20>; // 32 bytes
40 i-cache-line-size = <0x20>; // 32 bytes
41 d-cache-size = <0x8000>; // L1, 32K
42 i-cache-size = <0x8000>; // L1, 32K
43 timebase-frequency = <0>; // From uboot
44 bus-frequency = <0>;
45 clock-frequency = <0>;
46 };
47 };
48
49 memory {
50 device_type = "memory";
51 reg = <0x00000000 0x20000000>;
52 };
53
54 soc@ff700000 {
55 #address-cells = <1>;
56 #size-cells = <1>;
57 device_type = "soc";
58 ranges = <0x0 0xff700000 0x00100000>;
59 reg = <0xff700000 0x00100000>;
60 clock-frequency = <0>;
61
62 memory-controller@2000 {
63 compatible = "fsl,8560-memory-controller";
64 reg = <0x2000 0x1000>;
65 interrupt-parent = <&mpic>;
66 interrupts = <0x12 0x2>;
67 };
68
69 l2-cache-controller@20000 {
70 compatible = "fsl,8560-l2-cache-controller";
71 reg = <0x20000 0x1000>;
72 cache-line-size = <0x20>; // 32 bytes
73 cache-size = <0x40000>; // L2, 256K
74 interrupt-parent = <&mpic>;
75 interrupts = <0x10 0x2>;
76 };
77
78 i2c@3000 {
79 #address-cells = <1>;
80 #size-cells = <0>;
81 cell-index = <0>;
82 compatible = "fsl-i2c";
83 reg = <0x3000 0x100>;
84 interrupts = <0x2b 0x2>;
85 interrupt-parent = <&mpic>;
86 dfsrr;
87 };
88
89 i2c@3100 {
90 #address-cells = <1>;
91 #size-cells = <0>;
92 cell-index = <1>;
93 compatible = "fsl-i2c";
94 reg = <0x3100 0x100>;
95 interrupts = <0x2b 0x2>;
96 interrupt-parent = <&mpic>;
97 dfsrr;
98 };
99
100 mdio@24520 {
101 #address-cells = <1>;
102 #size-cells = <0>;
103 compatible = "fsl,gianfar-mdio";
104 reg = <0x24520 0x20>;
105 phy0: ethernet-phy@19 {
106 interrupt-parent = <&mpic>;
107 interrupts = <0x6 0x1>;
108 reg = <0x19>;
109 device_type = "ethernet-phy";
110 };
111 phy1: ethernet-phy@1a {
112 interrupt-parent = <&mpic>;
113 interrupts = <0x7 0x1>;
114 reg = <0x1a>;
115 device_type = "ethernet-phy";
116 };
117 phy2: ethernet-phy@1b {
118 interrupt-parent = <&mpic>;
119 interrupts = <0x8 0x1>;
120 reg = <0x1b>;
121 device_type = "ethernet-phy";
122 };
123 phy3: ethernet-phy@1c {
124 interrupt-parent = <&mpic>;
125 interrupts = <0x8 0x1>;
126 reg = <0x1c>;
127 device_type = "ethernet-phy";
128 };
129 };
130
131 enet0: ethernet@24000 {
132 cell-index = <0>;
133 device_type = "network";
134 model = "TSEC";
135 compatible = "gianfar";
136 reg = <0x24000 0x1000>;
137 local-mac-address = [ 00 00 00 00 00 00 ];
138 interrupts = <0x1d 0x2 0x1e 0x2 0x22 0x2>;
139 interrupt-parent = <&mpic>;
140 phy-handle = <&phy0>;
141 };
142
143 enet1: ethernet@25000 {
144 cell-index = <1>;
145 device_type = "network";
146 model = "TSEC";
147 compatible = "gianfar";
148 reg = <0x25000 0x1000>;
149 local-mac-address = [ 00 00 00 00 00 00 ];
150 interrupts = <0x23 0x2 0x24 0x2 0x28 0x2>;
151 interrupt-parent = <&mpic>;
152 phy-handle = <&phy1>;
153 };
154
155 mpic: pic@40000 {
156 interrupt-controller;
157 #address-cells = <0>;
158 #size-cells = <0>;
159 #interrupt-cells = <2>;
160 reg = <0x40000 0x40000>;
161 device_type = "open-pic";
162 };
163
164 cpm@919c0 {
165 #address-cells = <1>;
166 #size-cells = <1>;
167 compatible = "fsl,mpc8560-cpm", "fsl,cpm2";
168 reg = <0x919c0 0x30>;
169 ranges;
170
171 muram@80000 {
172 #address-cells = <1>;
173 #size-cells = <1>;
174 ranges = <0x0 0x80000 0x10000>;
175
176 data@0 {
177 compatible = "fsl,cpm-muram-data";
178 reg = <0x0 0x4000 0x9000 0x2000>;
179 };
180 };
181
182 brg@919f0 {
183 compatible = "fsl,mpc8560-brg",
184 "fsl,cpm2-brg",
185 "fsl,cpm-brg";
186 reg = <0x919f0 0x10 0x915f0 0x10>;
187 clock-frequency = <165000000>;
188 };
189
190 cpmpic: pic@90c00 {
191 interrupt-controller;
192 #address-cells = <0>;
193 #interrupt-cells = <2>;
194 interrupts = <0x2e 0x2>;
195 interrupt-parent = <&mpic>;
196 reg = <0x90c00 0x80>;
197 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
198 };
199
200 enet2: ethernet@91320 {
201 device_type = "network";
202 compatible = "fsl,mpc8560-fcc-enet",
203 "fsl,cpm2-fcc-enet";
204 reg = <0x91320 0x20 0x88500 0x100 0x913b0 0x1>;
205 local-mac-address = [ 00 00 00 00 00 00 ];
206 fsl,cpm-command = <0x16200300>;
207 interrupts = <0x21 0x8>;
208 interrupt-parent = <&cpmpic>;
209 phy-handle = <&phy2>;
210 };
211
212 enet3: ethernet@91340 {
213 device_type = "network";
214 compatible = "fsl,mpc8560-fcc-enet",
215 "fsl,cpm2-fcc-enet";
216 reg = <0x91340 0x20 0x88600 0x100 0x913d0 0x1>;
217 local-mac-address = [ 00 00 00 00 00 00 ];
218 fsl,cpm-command = <0x1a400300>;
219 interrupts = <0x22 0x8>;
220 interrupt-parent = <&cpmpic>;
221 phy-handle = <&phy3>;
222 };
223 };
224
225 global-utilities@e0000 {
226 compatible = "fsl,mpc8560-guts";
227 reg = <0xe0000 0x1000>;
228 fsl,has-rstcr;
229 };
230 };
231
232 pci0: pci@ff708000 {
233 cell-index = <0>;
234 #interrupt-cells = <1>;
235 #size-cells = <2>;
236 #address-cells = <3>;
237 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
238 device_type = "pci";
239 reg = <0xff708000 0x1000>;
240 clock-frequency = <66666666>;
241 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
242 interrupt-map = <
243
244 /* IDSEL 0x02 */
245 0x1000 0x0 0x0 0x1 &mpic 0x2 0x1
246 0x1000 0x0 0x0 0x2 &mpic 0x3 0x1
247 0x1000 0x0 0x0 0x3 &mpic 0x4 0x1
248 0x1000 0x0 0x0 0x4 &mpic 0x5 0x1>;
249
250 interrupt-parent = <&mpic>;
251 interrupts = <0x18 0x2>;
252 bus-range = <0x0 0x0>;
253 ranges = <0x02000000 0x0 0x80000000 0x80000000 0x0 0x20000000
254 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
255 };
256
257 localbus@ff705000 {
258 compatible = "fsl,mpc8560-localbus";
259 #address-cells = <2>;
260 #size-cells = <1>;
261 reg = <0xff705000 0x100>; // BRx, ORx, etc.
262
263 ranges = <
264 0x0 0x0 0xff800000 0x0800000 // 8MB boot flash
265 0x1 0x0 0xe4000000 0x4000000 // 64MB flash
266 0x3 0x0 0x20000000 0x4000000 // 64MB SDRAM
267 0x4 0x0 0x24000000 0x4000000 // 64MB SDRAM
268 0x5 0x0 0xfc000000 0x0c00000 // EPLD
269 0x6 0x0 0xe0000000 0x4000000 // 64MB flash
270 0x7 0x0 0x80000000 0x0200000 // ATM1,2
271 >;
272
273 epld@5,0 {
274 compatible = "wrs,epld-localbus";
275 #address-cells = <2>;
276 #size-cells = <1>;
277 reg = <0x5 0x0 0xc00000>;
278 ranges = <
279 0x0 0x0 0x5 0x000000 0x1fff // LED disp.
280 0x1 0x0 0x5 0x100000 0x1fff // switches
281 0x2 0x0 0x5 0x200000 0x1fff // ID reg.
282 0x3 0x0 0x5 0x300000 0x1fff // status reg.
283 0x4 0x0 0x5 0x400000 0x1fff // reset reg.
284 0x5 0x0 0x5 0x500000 0x1fff // Wind port
285 0x7 0x0 0x5 0x700000 0x1fff // UART #1
286 0x8 0x0 0x5 0x800000 0x1fff // UART #2
287 0x9 0x0 0x5 0x900000 0x1fff // RTC
288 0xb 0x0 0x5 0xb00000 0x1fff // EEPROM
289 >;
290
291 bidr@2,0 {
292 compatible = "wrs,sbc8560-bidr";
293 reg = <0x2 0x0 0x10>;
294 };
295
296 bcsr@3,0 {
297 compatible = "wrs,sbc8560-bcsr";
298 reg = <0x3 0x0 0x10>;
299 };
300
301 brstcr@4,0 {
302 compatible = "wrs,sbc8560-brstcr";
303 reg = <0x4 0x0 0x10>;
304 };
305
306 serial0: serial@7,0 {
307 device_type = "serial";
308 compatible = "ns16550";
309 reg = <0x7 0x0 0x100>;
310 clock-frequency = <1843200>;
311 interrupts = <0x9 0x2>;
312 interrupt-parent = <&mpic>;
313 };
314
315 serial1: serial@8,0 {
316 device_type = "serial";
317 compatible = "ns16550";
318 reg = <0x8 0x0 0x100>;
319 clock-frequency = <1843200>;
320 interrupts = <0xa 0x2>;
321 interrupt-parent = <&mpic>;
322 };
323
324 rtc@9,0 {
325 compatible = "m48t59";
326 reg = <0x9 0x0 0x1fff>;
327 };
328 };
329 };
330};
diff --git a/arch/powerpc/boot/dts/sequoia.dts b/arch/powerpc/boot/dts/sequoia.dts
index 10784ff45dd6..d9046c1adcbe 100644
--- a/arch/powerpc/boot/dts/sequoia.dts
+++ b/arch/powerpc/boot/dts/sequoia.dts
@@ -17,14 +17,24 @@
17 #size-cells = <1>; 17 #size-cells = <1>;
18 model = "amcc,sequoia"; 18 model = "amcc,sequoia";
19 compatible = "amcc,sequoia"; 19 compatible = "amcc,sequoia";
20 dcr-parent = <&/cpus/PowerPC,440EPx@0>; 20 dcr-parent = <&/cpus/cpu@0>;
21
22 aliases {
23 ethernet0 = &EMAC0;
24 ethernet1 = &EMAC1;
25 serial0 = &UART0;
26 serial1 = &UART1;
27 serial2 = &UART2;
28 serial3 = &UART3;
29 };
21 30
22 cpus { 31 cpus {
23 #address-cells = <1>; 32 #address-cells = <1>;
24 #size-cells = <0>; 33 #size-cells = <0>;
25 34
26 PowerPC,440EPx@0 { 35 cpu@0 {
27 device_type = "cpu"; 36 device_type = "cpu";
37 model = "PowerPC,440EPx";
28 reg = <0>; 38 reg = <0>;
29 clock-frequency = <0>; /* Filled in by zImage */ 39 clock-frequency = <0>; /* Filled in by zImage */
30 timebase-frequency = <0>; /* Filled in by zImage */ 40 timebase-frequency = <0>; /* Filled in by zImage */
@@ -94,7 +104,6 @@
94 clock-frequency = <0>; /* Filled in by zImage */ 104 clock-frequency = <0>; /* Filled in by zImage */
95 105
96 SDRAM0: sdram { 106 SDRAM0: sdram {
97 device_type = "memory-controller";
98 compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali"; 107 compatible = "ibm,sdram-440epx", "ibm,sdram-44x-ddr2denali";
99 dcr-reg = <010 2>; 108 dcr-reg = <010 2>;
100 }; 109 };
@@ -122,6 +131,13 @@
122 interrupt-map-mask = <ffffffff>; 131 interrupt-map-mask = <ffffffff>;
123 }; 132 };
124 133
134 USB1: usb@e0000400 {
135 compatible = "ohci-be";
136 reg = <0 e0000400 60>;
137 interrupt-parent = <&UIC0>;
138 interrupts = <15 8>;
139 };
140
125 POB0: opb { 141 POB0: opb {
126 compatible = "ibm,opb-440epx", "ibm,opb"; 142 compatible = "ibm,opb-440epx", "ibm,opb";
127 #address-cells = <1>; 143 #address-cells = <1>;
@@ -308,6 +324,33 @@
308 has-new-stacr-staopc; 324 has-new-stacr-staopc;
309 }; 325 };
310 }; 326 };
327
328 PCI0: pci@1ec000000 {
329 device_type = "pci";
330 #interrupt-cells = <1>;
331 #size-cells = <2>;
332 #address-cells = <3>;
333 compatible = "ibm,plb440epx-pci", "ibm,plb-pci";
334 primary;
335 reg = <1 eec00000 8 /* Config space access */
336 1 eed00000 4 /* IACK */
337 1 eed00000 4 /* Special cycle */
338 1 ef400000 40>; /* Internal registers */
339
340 /* Outbound ranges, one memory and one IO,
341 * later cannot be changed. Chip supports a second
342 * IO range but we don't use it for now
343 */
344 ranges = <02000000 0 80000000 1 80000000 0 10000000
345 01000000 0 00000000 1 e8000000 0 00100000>;
346
347 /* Inbound 2GB range starting at 0 */
348 dma-ranges = <42000000 0 0 0 0 0 80000000>;
349
350 /* All PCI interrupts are routed to IRQ 67 */
351 interrupt-map-mask = <0000 0 0 0>;
352 interrupt-map = < 0000 0 0 0 &UIC2 3 8 >;
353 };
311 }; 354 };
312 355
313 chosen { 356 chosen {
diff --git a/arch/powerpc/boot/dts/storcenter.dts b/arch/powerpc/boot/dts/storcenter.dts
new file mode 100644
index 000000000000..2204874ac5f3
--- /dev/null
+++ b/arch/powerpc/boot/dts/storcenter.dts
@@ -0,0 +1,141 @@
1/*
2 * Device Tree Source for IOMEGA StorCenter
3 *
4 * Copyright 2007 Oyvind Repvik
5 * Copyright 2007 Jon Loeliger
6 *
7 * Based on the Kurobox DTS by G. Liakhovetski <g.liakhovetski@gmx.de>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14/dts-v1/;
15
16/ {
17 model = "StorCenter";
18 compatible = "storcenter";
19 #address-cells = <1>;
20 #size-cells = <1>;
21
22 aliases {
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8241@0 {
33 device_type = "cpu";
34 reg = <0>;
35 clock-frequency = <200000000>;
36 timebase-frequency = <25000000>;
37 bus-frequency = <0>; /* from bootwrapper */
38 i-cache-line-size = <32>;
39 d-cache-line-size = <32>;
40 i-cache-size = <16384>;
41 d-cache-size = <16384>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x04000000>; /* 64MB @ 0x0 */
48 };
49
50 soc@fc000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 compatible = "fsl,mpc8241", "mpc10x";
55 store-gathering = <0>; /* 0 == off, !0 == on */
56 ranges = <0x0 0xfc000000 0x100000>;
57 reg = <0xfc000000 0x100000>; /* EUMB */
58 bus-frequency = <0>; /* fixed by loader */
59
60 i2c@3000 {
61 #address-cells = <1>;
62 #size-cells = <0>;
63 compatible = "fsl-i2c";
64 reg = <0x3000 0x100>;
65 interrupts = <5 2>;
66 interrupt-parent = <&mpic>;
67
68 rtc@68 {
69 compatible = "dallas,ds1337";
70 reg = <68>;
71 };
72 };
73
74 serial0: serial@4500 {
75 cell-index = <0>;
76 device_type = "serial";
77 compatible = "ns16550";
78 reg = <0x4500 0x20>;
79 clock-frequency = <97553800>; /* Hz */
80 current-speed = <115200>;
81 interrupts = <9 2>;
82 interrupt-parent = <&mpic>;
83 };
84
85 serial1: serial@4600 {
86 cell-index = <1>;
87 device_type = "serial";
88 compatible = "ns16550";
89 reg = <0x4600 0x20>;
90 clock-frequency = <97553800>; /* Hz */
91 current-speed = <9600>;
92 interrupts = <10 2>;
93 interrupt-parent = <&mpic>;
94 };
95
96 mpic: interrupt-controller@40000 {
97 #interrupt-cells = <2>;
98 device_type = "open-pic";
99 compatible = "chrp,open-pic";
100 interrupt-controller;
101 reg = <0x40000 0x40000>;
102 };
103
104 };
105
106 pci0: pci@fe800000 {
107 #address-cells = <3>;
108 #size-cells = <2>;
109 #interrupt-cells = <1>;
110 device_type = "pci";
111 compatible = "mpc10x-pci";
112 reg = <0xfe800000 0x1000>;
113 ranges = <0x01000000 0x0 0x0 0xfe000000 0x0 0x00c00000
114 0x02000000 0x0 0x80000000 0x80000000 0x0 0x70000000>;
115 bus-range = <0 0xff>;
116 clock-frequency = <97553800>;
117 interrupt-parent = <&mpic>;
118 interrupt-map-mask = <0xf800 0 0 7>;
119 interrupt-map = <
120 /* IDSEL 13 - IDE */
121 0x6800 0 0 1 &mpic 0 1
122 0x6800 0 0 2 &mpic 0 1
123 0x6800 0 0 3 &mpic 0 1
124 0x6800 0 0 4 &mpic 0 1
125 /* IDSEL 14 - USB */
126 0x7000 0 0 1 &mpic 0 1
127 0x7000 0 0 2 &mpic 0 1
128 0x7000 0 0 3 &mpic 0 1
129 0x7000 0 0 4 &mpic 0 1
130 /* IDSEL 15 - ETH */
131 0x7800 0 0 1 &mpic 0 1
132 0x7800 0 0 2 &mpic 0 1
133 0x7800 0 0 3 &mpic 0 1
134 0x7800 0 0 4 &mpic 0 1
135 >;
136 };
137
138 chosen {
139 linux,stdout-path = "/soc/serial@4500";
140 };
141};
diff --git a/arch/powerpc/boot/dts/stx_gp3_8560.dts b/arch/powerpc/boot/dts/stx_gp3_8560.dts
new file mode 100644
index 000000000000..f81fd7fdb29e
--- /dev/null
+++ b/arch/powerpc/boot/dts/stx_gp3_8560.dts
@@ -0,0 +1,228 @@
1/*
2 * STX GP3 - 8560 ADS Device Tree Source
3 *
4 * Copyright 2008 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/dts-v1/;
13
14/ {
15 model = "stx,gp3";
16 compatible = "stx,gp3-8560", "stx,gp3";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 pci0 = &pci0;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 PowerPC,8560@0 {
32 device_type = "cpu";
33 reg = <0>;
34 d-cache-line-size = <32>;
35 i-cache-line-size = <32>;
36 d-cache-size = <32768>;
37 i-cache-size = <32768>;
38 timebase-frequency = <0>;
39 bus-frequency = <0>;
40 clock-frequency = <0>;
41 };
42 };
43
44 memory {
45 device_type = "memory";
46 reg = <0x00000000 0x10000000>;
47 };
48
49 soc@fdf00000 {
50 #address-cells = <1>;
51 #size-cells = <1>;
52 device_type = "soc";
53 ranges = <0 0xfdf00000 0x100000>;
54 reg = <0xfdf00000 0x1000>;
55 bus-frequency = <0>;
56 compatible = "fsl,mpc8560-immr", "simple-bus";
57
58 memory-controller@2000 {
59 compatible = "fsl,8540-memory-controller";
60 reg = <0x2000 0x1000>;
61 interrupt-parent = <&mpic>;
62 interrupts = <18 2>;
63 };
64
65 l2-cache-controller@20000 {
66 compatible = "fsl,8540-l2-cache-controller";
67 reg = <0x20000 0x1000>;
68 cache-line-size = <32>;
69 cache-size = <0x40000>; // L2, 256K
70 interrupt-parent = <&mpic>;
71 interrupts = <16 2>;
72 };
73
74 i2c@3000 {
75 #address-cells = <1>;
76 #size-cells = <0>;
77 cell-index = <0>;
78 compatible = "fsl-i2c";
79 reg = <0x3000 0x100>;
80 interrupts = <43 2>;
81 interrupt-parent = <&mpic>;
82 dfsrr;
83 };
84
85 mdio@24520 {
86 #address-cells = <1>;
87 #size-cells = <0>;
88 compatible = "fsl,gianfar-mdio";
89 reg = <0x24520 0x20>;
90
91 phy2: ethernet-phy@2 {
92 interrupt-parent = <&mpic>;
93 interrupts = <5 4>;
94 reg = <2>;
95 device_type = "ethernet-phy";
96 };
97 phy4: ethernet-phy@4 {
98 interrupt-parent = <&mpic>;
99 interrupts = <5 4>;
100 reg = <4>;
101 device_type = "ethernet-phy";
102 };
103 };
104
105 enet0: ethernet@24000 {
106 cell-index = <0>;
107 device_type = "network";
108 model = "TSEC";
109 compatible = "gianfar";
110 reg = <0x24000 0x1000>;
111 local-mac-address = [ 00 00 00 00 00 00 ];
112 interrupts = <29 2 30 2 34 2>;
113 interrupt-parent = <&mpic>;
114 phy-handle = <&phy2>;
115 };
116
117 enet1: ethernet@25000 {
118 cell-index = <1>;
119 device_type = "network";
120 model = "TSEC";
121 compatible = "gianfar";
122 reg = <0x25000 0x1000>;
123 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <35 2 36 2 40 2>;
125 interrupt-parent = <&mpic>;
126 phy-handle = <&phy4>;
127 };
128
129 mpic: pic@40000 {
130 interrupt-controller;
131 #address-cells = <0>;
132 #interrupt-cells = <2>;
133 reg = <0x40000 0x40000>;
134 device_type = "open-pic";
135 };
136
137 cpm@919c0 {
138 #address-cells = <1>;
139 #size-cells = <1>;
140 compatible = "fsl,mpc8560-cpm", "fsl,cpm2", "simple-bus";
141 reg = <0x919c0 0x30>;
142 ranges;
143
144 muram@80000 {
145 #address-cells = <1>;
146 #size-cells = <1>;
147 ranges = <0 0x80000 0x10000>;
148
149 data@0 {
150 compatible = "fsl,cpm-muram-data";
151 reg = <0 0x4000 0x9000 0x2000>;
152 };
153 };
154
155 brg@919f0 {
156 compatible = "fsl,mpc8560-brg",
157 "fsl,cpm2-brg",
158 "fsl,cpm-brg";
159 reg = <0x919f0 0x10 0x915f0 0x10>;
160 clock-frequency = <0>;
161 };
162
163 cpmpic: pic@90c00 {
164 interrupt-controller;
165 #address-cells = <0>;
166 #interrupt-cells = <2>;
167 interrupts = <46 2>;
168 interrupt-parent = <&mpic>;
169 reg = <0x90c00 0x80>;
170 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
171 };
172
173 serial0: serial@91a20 {
174 device_type = "serial";
175 compatible = "fsl,mpc8560-scc-uart",
176 "fsl,cpm2-scc-uart";
177 reg = <0x91a20 0x20 0x88100 0x100>;
178 fsl,cpm-brg = <2>;
179 fsl,cpm-command = <0x4a00000>;
180 interrupts = <41 8>;
181 interrupt-parent = <&cpmpic>;
182 };
183 };
184 };
185
186 pci0: pci@fdf08000 {
187 cell-index = <0>;
188 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
189 interrupt-map = <
190
191 /* IDSEL 0x0c */
192 0x6000 0 0 1 &mpic 1 1
193 0x6000 0 0 2 &mpic 2 1
194 0x6000 0 0 3 &mpic 3 1
195 0x6000 0 0 4 &mpic 4 1
196
197 /* IDSEL 0x0d */
198 0x6800 0 0 1 &mpic 4 1
199 0x6800 0 0 2 &mpic 1 1
200 0x6800 0 0 3 &mpic 2 1
201 0x6800 0 0 4 &mpic 3 1
202
203 /* IDSEL 0x0e */
204 0x7000 0 0 1 &mpic 3 1
205 0x7000 0 0 2 &mpic 4 1
206 0x7000 0 0 3 &mpic 1 1
207 0x7000 0 0 4 &mpic 2 1
208
209 /* IDSEL 0x0f */
210 0x7800 0 0 1 &mpic 2 1
211 0x7800 0 0 2 &mpic 3 1
212 0x7800 0 0 3 &mpic 4 1
213 0x7800 0 0 4 &mpic 1 1>;
214
215 interrupt-parent = <&mpic>;
216 interrupts = <24 2>;
217 bus-range = <0 0>;
218 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
219 0x01000000 0 0x00000000 0xe2000000 0 0x00100000>;
220 clock-frequency = <66666666>;
221 #interrupt-cells = <1>;
222 #size-cells = <2>;
223 #address-cells = <3>;
224 reg = <0xfdf08000 0x1000>;
225 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
226 device_type = "pci";
227 };
228};
diff --git a/arch/powerpc/boot/dts/taishan.dts b/arch/powerpc/boot/dts/taishan.dts
new file mode 100644
index 000000000000..0706a4a13b9f
--- /dev/null
+++ b/arch/powerpc/boot/dts/taishan.dts
@@ -0,0 +1,383 @@
1/*
2 * Device Tree Source for IBM/AMCC Taishan
3 *
4 * Copyright 2007 IBM Corp.
5 * Hugh Blemings <hugh@au.ibm.com> based off code by
6 * Josh Boyer <jwboyer@linux.vnet.ibm.com>, David Gibson <dwg@au1.ibm.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without
10 * any warranty of any kind, whether express or implied.
11 */
12
13/ {
14 #address-cells = <2>;
15 #size-cells = <1>;
16 model = "amcc,taishan";
17 compatible = "amcc,taishan";
18 dcr-parent = <&/cpus/cpu@0>;
19
20 aliases {
21 ethernet0 = &EMAC2;
22 ethernet1 = &EMAC3;
23 serial0 = &UART0;
24 serial1 = &UART1;
25 };
26
27 cpus {
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 cpu@0 {
32 device_type = "cpu";
33 model = "PowerPC,440GX";
34 reg = <0>;
35 clock-frequency = <2FAF0800>; // 800MHz
36 timebase-frequency = <0>; // Filled in by zImage
37 i-cache-line-size = <32>;
38 d-cache-line-size = <32>;
39 i-cache-size = <8000>; /* 32 kB */
40 d-cache-size = <8000>; /* 32 kB */
41 dcr-controller;
42 dcr-access-method = "native";
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0 0 0>; // Filled in by zImage
49 };
50
51
52 UICB0: interrupt-controller-base {
53 compatible = "ibm,uic-440gx", "ibm,uic";
54 interrupt-controller;
55 cell-index = <3>;
56 dcr-reg = <200 009>;
57 #address-cells = <0>;
58 #size-cells = <0>;
59 #interrupt-cells = <2>;
60 };
61
62
63 UIC0: interrupt-controller0 {
64 compatible = "ibm,uic-440gx", "ibm,uic";
65 interrupt-controller;
66 cell-index = <0>;
67 dcr-reg = <0c0 009>;
68 #address-cells = <0>;
69 #size-cells = <0>;
70 #interrupt-cells = <2>;
71 interrupts = <01 4 00 4>; /* cascade - first non-critical */
72 interrupt-parent = <&UICB0>;
73
74 };
75
76 UIC1: interrupt-controller1 {
77 compatible = "ibm,uic-440gx", "ibm,uic";
78 interrupt-controller;
79 cell-index = <1>;
80 dcr-reg = <0d0 009>;
81 #address-cells = <0>;
82 #size-cells = <0>;
83 #interrupt-cells = <2>;
84 interrupts = <03 4 02 4>; /* cascade */
85 interrupt-parent = <&UICB0>;
86 };
87
88 UIC2: interrupt-controller2 {
89 compatible = "ibm,uic-440gx", "ibm,uic";
90 interrupt-controller;
91 cell-index = <2>; /* was 1 */
92 dcr-reg = <210 009>;
93 #address-cells = <0>;
94 #size-cells = <0>;
95 #interrupt-cells = <2>;
96 interrupts = <05 4 04 4>; /* cascade */
97 interrupt-parent = <&UICB0>;
98 };
99
100
101 CPC0: cpc {
102 compatible = "ibm,cpc-440gp";
103 dcr-reg = <0b0 003 0e0 010>;
104 // FIXME: anything else?
105 };
106
107 plb {
108 compatible = "ibm,plb-440gx", "ibm,plb4";
109 #address-cells = <2>;
110 #size-cells = <1>;
111 ranges;
112 clock-frequency = <9896800>; // 160MHz
113
114 SDRAM0: memory-controller {
115 compatible = "ibm,sdram-440gp";
116 dcr-reg = <010 2>;
117 // FIXME: anything else?
118 };
119
120 SRAM0: sram {
121 compatible = "ibm,sram-440gp";
122 dcr-reg = <020 8 00a 1>;
123 };
124
125 DMA0: dma {
126 // FIXME: ???
127 compatible = "ibm,dma-440gp";
128 dcr-reg = <100 027>;
129 };
130
131 MAL0: mcmal {
132 compatible = "ibm,mcmal-440gx", "ibm,mcmal2";
133 dcr-reg = <180 62>;
134 num-tx-chans = <4>;
135 num-rx-chans = <4>;
136 interrupt-parent = <&MAL0>;
137 interrupts = <0 1 2 3 4>;
138 #interrupt-cells = <1>;
139 #address-cells = <0>;
140 #size-cells = <0>;
141 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
142 /*RXEOB*/ 1 &UIC0 b 4
143 /*SERR*/ 2 &UIC1 0 4
144 /*TXDE*/ 3 &UIC1 1 4
145 /*RXDE*/ 4 &UIC1 2 4>;
146 interrupt-map-mask = <ffffffff>;
147 };
148
149 POB0: opb {
150 compatible = "ibm,opb-440gx", "ibm,opb";
151 #address-cells = <1>;
152 #size-cells = <1>;
153 /* Wish there was a nicer way of specifying a full 32-bit
154 range */
155 ranges = <00000000 1 00000000 80000000
156 80000000 1 80000000 80000000>;
157 dcr-reg = <090 00b>;
158 interrupt-parent = <&UIC1>;
159 interrupts = <7 4>;
160 clock-frequency = <4C4B400>; // 80MHz
161
162
163 EBC0: ebc {
164 compatible = "ibm,ebc-440gx", "ibm,ebc";
165 dcr-reg = <012 2>;
166 #address-cells = <2>;
167 #size-cells = <1>;
168 clock-frequency = <4C4B400>; // 80MHz
169
170 /* ranges property is supplied by zImage
171 * based on firmware's configuration of the
172 * EBC bridge */
173
174 interrupts = <5 4>;
175 interrupt-parent = <&UIC1>;
176
177 /* TODO: Add other EBC devices */
178 };
179
180
181
182 UART0: serial@40000200 {
183 device_type = "serial";
184 compatible = "ns16550";
185 reg = <40000200 8>;
186 virtual-reg = <e0000200>;
187 clock-frequency = <A8C000>;
188 current-speed = <1C200>; /* 115200 */
189 interrupt-parent = <&UIC0>;
190 interrupts = <0 4>;
191 };
192
193 UART1: serial@40000300 {
194 device_type = "serial";
195 compatible = "ns16550";
196 reg = <40000300 8>;
197 virtual-reg = <e0000300>;
198 clock-frequency = <A8C000>;
199 current-speed = <1C200>; /* 115200 */
200 interrupt-parent = <&UIC0>;
201 interrupts = <1 4>;
202 };
203
204 IIC0: i2c@40000400 {
205 /* FIXME */
206 device_type = "i2c";
207 compatible = "ibm,iic-440gp", "ibm,iic";
208 reg = <40000400 14>;
209 interrupt-parent = <&UIC0>;
210 interrupts = <2 4>;
211 };
212 IIC1: i2c@40000500 {
213 /* FIXME */
214 device_type = "i2c";
215 compatible = "ibm,iic-440gp", "ibm,iic";
216 reg = <40000500 14>;
217 interrupt-parent = <&UIC0>;
218 interrupts = <3 4>;
219 };
220
221 GPIO0: gpio@40000700 {
222 /* FIXME */
223 compatible = "ibm,gpio-440gp";
224 reg = <40000700 20>;
225 };
226
227 ZMII0: emac-zmii@40000780 {
228 device_type = "zgmii-interface";
229 compatible = "ibm,zmii-440gx", "ibm,zmii";
230 reg = <40000780 c>;
231 };
232
233 RGMII0: emac-rgmii@40000790 {
234 device_type = "rgmii-interface";
235 compatible = "ibm,rgmii";
236 reg = <40000790 8>;
237 };
238
239
240 EMAC0: ethernet@40000800 {
241 unused = <1>;
242 linux,network-index = <2>;
243 device_type = "network";
244 compatible = "ibm,emac-440gx", "ibm,emac4";
245 interrupt-parent = <&UIC1>;
246 interrupts = <1c 4 1d 4>;
247 reg = <40000800 70>;
248 local-mac-address = [000000000000]; // Filled in by zImage
249 mal-device = <&MAL0>;
250 mal-tx-channel = <0>;
251 mal-rx-channel = <0>;
252 cell-index = <0>;
253 max-frame-size = <5dc>;
254 rx-fifo-size = <1000>;
255 tx-fifo-size = <800>;
256 phy-mode = "rmii";
257 phy-map = <00000001>;
258 zmii-device = <&ZMII0>;
259 zmii-channel = <0>;
260 };
261 EMAC1: ethernet@40000900 {
262 unused = <1>;
263 linux,network-index = <3>;
264 device_type = "network";
265 compatible = "ibm,emac-440gx", "ibm,emac4";
266 interrupt-parent = <&UIC1>;
267 interrupts = <1e 4 1f 4>;
268 reg = <40000900 70>;
269 local-mac-address = [000000000000]; // Filled in by zImage
270 mal-device = <&MAL0>;
271 mal-tx-channel = <1>;
272 mal-rx-channel = <1>;
273 cell-index = <1>;
274 max-frame-size = <5dc>;
275 rx-fifo-size = <1000>;
276 tx-fifo-size = <800>;
277 phy-mode = "rmii";
278 phy-map = <00000001>;
279 zmii-device = <&ZMII0>;
280 zmii-channel = <1>;
281 };
282
283 EMAC2: ethernet@40000c00 {
284 linux,network-index = <0>;
285 device_type = "network";
286 compatible = "ibm,emac-440gx", "ibm,emac4";
287 interrupt-parent = <&UIC2>;
288 interrupts = <0 4 1 4>;
289 reg = <40000c00 70>;
290 local-mac-address = [000000000000]; // Filled in by zImage
291 mal-device = <&MAL0>;
292 mal-tx-channel = <2>;
293 mal-rx-channel = <2>;
294 cell-index = <2>;
295 max-frame-size = <5dc>;
296 rx-fifo-size = <1000>;
297 tx-fifo-size = <800>;
298 phy-mode = "rgmii";
299 phy-map = <00000001>;
300 rgmii-device = <&RGMII0>;
301 rgmii-channel = <0>;
302 zmii-device = <&ZMII0>;
303 zmii-channel = <2>;
304 };
305
306 EMAC3: ethernet@40000e00 {
307 linux,network-index = <1>;
308 device_type = "network";
309 compatible = "ibm,emac-440gx", "ibm,emac4";
310 interrupt-parent = <&UIC2>;
311 interrupts = <2 4 3 4>;
312 reg = <40000e00 70>;
313 local-mac-address = [000000000000]; // Filled in by zImage
314 mal-device = <&MAL0>;
315 mal-tx-channel = <3>;
316 mal-rx-channel = <3>;
317 cell-index = <3>;
318 max-frame-size = <5dc>;
319 rx-fifo-size = <1000>;
320 tx-fifo-size = <800>;
321 phy-mode = "rgmii";
322 phy-map = <00000003>;
323 rgmii-device = <&RGMII0>;
324 rgmii-channel = <1>;
325 zmii-device = <&ZMII0>;
326 zmii-channel = <3>;
327 };
328
329
330 GPT0: gpt@40000a00 {
331 /* FIXME */
332 reg = <40000a00 d4>;
333 interrupt-parent = <&UIC0>;
334 interrupts = <12 4 13 4 14 4 15 4 16 4>;
335 };
336
337 };
338
339 PCIX0: pci@20ec00000 {
340 device_type = "pci";
341 #interrupt-cells = <1>;
342 #size-cells = <2>;
343 #address-cells = <3>;
344 compatible = "ibm,plb440gp-pcix", "ibm,plb-pcix";
345 primary;
346 large-inbound-windows;
347 enable-msi-hole;
348 reg = <2 0ec00000 8 /* Config space access */
349 0 0 0 /* no IACK cycles */
350 2 0ed00000 4 /* Special cycles */
351 2 0ec80000 100 /* Internal registers */
352 2 0ec80100 fc>; /* Internal messaging registers */
353
354 /* Outbound ranges, one memory and one IO,
355 * later cannot be changed
356 */
357 ranges = <02000000 0 80000000 00000003 80000000 0 80000000
358 01000000 0 00000000 00000002 08000000 0 00010000>;
359
360 /* Inbound 2GB range starting at 0 */
361 dma-ranges = <42000000 0 0 0 0 0 80000000>;
362
363 interrupt-map-mask = <f800 0 0 7>;
364 interrupt-map = <
365 /* IDSEL 1 */
366 0800 0 0 1 &UIC0 17 8
367 0800 0 0 2 &UIC0 18 8
368 0800 0 0 3 &UIC0 19 8
369 0800 0 0 4 &UIC0 1a 8
370
371 /* IDSEL 2 */
372 1000 0 0 1 &UIC0 18 8
373 1000 0 0 2 &UIC0 19 8
374 1000 0 0 3 &UIC0 1a 8
375 1000 0 0 4 &UIC0 17 8
376 >;
377 };
378 };
379
380 chosen {
381 linux,stdout-path = "/plb/opb/serial@40000300";
382 };
383};
diff --git a/arch/powerpc/boot/dts/tqm5200.dts b/arch/powerpc/boot/dts/tqm5200.dts
new file mode 100644
index 000000000000..c86464f007da
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm5200.dts
@@ -0,0 +1,177 @@
1/*
2 * TQM5200 board Device Tree Source
3 *
4 * Copyright (C) 2007 Semihalf
5 * Marian Balakowicz <m8@semihalf.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13/ {
14 model = "tqc,tqm5200";
15 compatible = "tqc,tqm5200";
16 #address-cells = <1>;
17 #size-cells = <1>;
18
19 cpus {
20 #address-cells = <1>;
21 #size-cells = <0>;
22
23 PowerPC,5200@0 {
24 device_type = "cpu";
25 reg = <0>;
26 d-cache-line-size = <20>;
27 i-cache-line-size = <20>;
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 };
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <00000000 04000000>; // 64MB
39 };
40
41 soc5200@f0000000 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 compatible = "fsl,mpc5200-immr";
45 ranges = <0 f0000000 0000c000>;
46 reg = <f0000000 00000100>;
47 bus-frequency = <0>; // from bootloader
48 system-frequency = <0>; // from bootloader
49
50 cdm@200 {
51 compatible = "fsl,mpc5200-cdm";
52 reg = <200 38>;
53 };
54
55 mpc5200_pic: interrupt-controller@500 {
56 // 5200 interrupts are encoded into two levels;
57 interrupt-controller;
58 #interrupt-cells = <3>;
59 compatible = "fsl,mpc5200-pic";
60 reg = <500 80>;
61 };
62
63 timer@600 { // General Purpose Timer
64 compatible = "fsl,mpc5200-gpt";
65 reg = <600 10>;
66 interrupts = <1 9 0>;
67 interrupt-parent = <&mpc5200_pic>;
68 fsl,has-wdt;
69 };
70
71 gpio@b00 {
72 compatible = "fsl,mpc5200-gpio";
73 reg = <b00 40>;
74 interrupts = <1 7 0>;
75 interrupt-parent = <&mpc5200_pic>;
76 };
77
78 usb@1000 {
79 compatible = "fsl,mpc5200-ohci","ohci-be";
80 reg = <1000 ff>;
81 interrupts = <2 6 0>;
82 interrupt-parent = <&mpc5200_pic>;
83 };
84
85 dma-controller@1200 {
86 compatible = "fsl,mpc5200-bestcomm";
87 reg = <1200 80>;
88 interrupts = <3 0 0 3 1 0 3 2 0 3 3 0
89 3 4 0 3 5 0 3 6 0 3 7 0
90 3 8 0 3 9 0 3 a 0 3 b 0
91 3 c 0 3 d 0 3 e 0 3 f 0>;
92 interrupt-parent = <&mpc5200_pic>;
93 };
94
95 xlb@1f00 {
96 compatible = "fsl,mpc5200-xlb";
97 reg = <1f00 100>;
98 };
99
100 serial@2000 { // PSC1
101 device_type = "serial";
102 compatible = "fsl,mpc5200-psc-uart";
103 port-number = <0>; // Logical port assignment
104 reg = <2000 100>;
105 interrupts = <2 1 0>;
106 interrupt-parent = <&mpc5200_pic>;
107 };
108
109 serial@2200 { // PSC2
110 device_type = "serial";
111 compatible = "fsl,mpc5200-psc-uart";
112 port-number = <1>; // Logical port assignment
113 reg = <2200 100>;
114 interrupts = <2 2 0>;
115 interrupt-parent = <&mpc5200_pic>;
116 };
117
118 serial@2400 { // PSC3
119 device_type = "serial";
120 compatible = "fsl,mpc5200-psc-uart";
121 port-number = <2>; // Logical port assignment
122 reg = <2400 100>;
123 interrupts = <2 3 0>;
124 interrupt-parent = <&mpc5200_pic>;
125 };
126
127 ethernet@3000 {
128 device_type = "network";
129 compatible = "fsl,mpc5200-fec";
130 reg = <3000 800>;
131 local-mac-address = [ 00 00 00 00 00 00 ];
132 interrupts = <2 5 0>;
133 interrupt-parent = <&mpc5200_pic>;
134 };
135
136 ata@3a00 {
137 compatible = "fsl,mpc5200-ata";
138 reg = <3a00 100>;
139 interrupts = <2 7 0>;
140 interrupt-parent = <&mpc5200_pic>;
141 };
142
143 i2c@3d40 {
144 compatible = "fsl,mpc5200-i2c","fsl-i2c";
145 reg = <3d40 40>;
146 interrupts = <2 10 0>;
147 interrupt-parent = <&mpc5200_pic>;
148 fsl5200-clocking;
149 };
150
151 sram@8000 {
152 compatible = "fsl,mpc5200-sram";
153 reg = <8000 4000>;
154 };
155 };
156
157 pci@f0000d00 {
158 #interrupt-cells = <1>;
159 #size-cells = <2>;
160 #address-cells = <3>;
161 device_type = "pci";
162 compatible = "fsl,mpc5200-pci";
163 reg = <f0000d00 100>;
164 interrupt-map-mask = <f800 0 0 7>;
165 interrupt-map = <c000 0 0 1 &mpc5200_pic 0 0 3
166 c000 0 0 2 &mpc5200_pic 0 0 3
167 c000 0 0 3 &mpc5200_pic 0 0 3
168 c000 0 0 4 &mpc5200_pic 0 0 3>;
169 clock-frequency = <0>; // From boot loader
170 interrupts = <2 8 0 2 9 0 2 a 0>;
171 interrupt-parent = <&mpc5200_pic>;
172 bus-range = <0 0>;
173 ranges = <42000000 0 80000000 80000000 0 10000000
174 02000000 0 90000000 90000000 0 10000000
175 01000000 0 00000000 a0000000 0 01000000>;
176 };
177};
diff --git a/arch/powerpc/boot/dts/tqm8540.dts b/arch/powerpc/boot/dts/tqm8540.dts
new file mode 100644
index 000000000000..1addb3ae719e
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm8540.dts
@@ -0,0 +1,204 @@
1/*
2 * TQM 8540 Device Tree Source
3 *
4 * Copyright 2008 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/dts-v1/;
13
14/ {
15 model = "tqm,8540";
16 compatible = "tqm,8540", "tqm,85xx";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 ethernet2 = &enet2;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 PowerPC,8540@0 {
34 device_type = "cpu";
35 reg = <0>;
36 d-cache-line-size = <32>;
37 i-cache-line-size = <32>;
38 d-cache-size = <32768>;
39 i-cache-size = <32768>;
40 timebase-frequency = <0>;
41 bus-frequency = <0>;
42 clock-frequency = <0>;
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0x00000000 0x10000000>;
49 };
50
51 soc@e0000000 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 device_type = "soc";
55 ranges = <0x0 0xe0000000 0x100000>;
56 reg = <0xe0000000 0x200>;
57 bus-frequency = <0>;
58 compatible = "fsl,mpc8540-immr", "simple-bus";
59
60 memory-controller@2000 {
61 compatible = "fsl,8540-memory-controller";
62 reg = <0x2000 0x1000>;
63 interrupt-parent = <&mpic>;
64 interrupts = <18 2>;
65 };
66
67 l2-cache-controller@20000 {
68 compatible = "fsl,8540-l2-cache-controller";
69 reg = <0x20000 0x1000>;
70 cache-line-size = <32>;
71 cache-size = <0x40000>; // L2, 256K
72 interrupt-parent = <&mpic>;
73 interrupts = <16 2>;
74 };
75
76 i2c@3000 {
77 #address-cells = <1>;
78 #size-cells = <0>;
79 cell-index = <0>;
80 compatible = "fsl-i2c";
81 reg = <0x3000 0x100>;
82 interrupts = <43 2>;
83 interrupt-parent = <&mpic>;
84 dfsrr;
85
86 rtc@68 {
87 compatible = "dallas,ds1337";
88 reg = <0x68>;
89 };
90 };
91
92 mdio@24520 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 compatible = "fsl,gianfar-mdio";
96 reg = <0x24520 0x20>;
97
98 phy1: ethernet-phy@1 {
99 interrupt-parent = <&mpic>;
100 interrupts = <8 1>;
101 reg = <1>;
102 device_type = "ethernet-phy";
103 };
104 phy2: ethernet-phy@2 {
105 interrupt-parent = <&mpic>;
106 interrupts = <8 1>;
107 reg = <2>;
108 device_type = "ethernet-phy";
109 };
110 phy3: ethernet-phy@3 {
111 interrupt-parent = <&mpic>;
112 interrupts = <8 1>;
113 reg = <3>;
114 device_type = "ethernet-phy";
115 };
116 };
117
118 enet0: ethernet@24000 {
119 cell-index = <0>;
120 device_type = "network";
121 model = "TSEC";
122 compatible = "gianfar";
123 reg = <0x24000 0x1000>;
124 local-mac-address = [ 00 00 00 00 00 00 ];
125 interrupts = <29 2 30 2 34 2>;
126 interrupt-parent = <&mpic>;
127 phy-handle = <&phy2>;
128 };
129
130 enet1: ethernet@25000 {
131 cell-index = <1>;
132 device_type = "network";
133 model = "TSEC";
134 compatible = "gianfar";
135 reg = <0x25000 0x1000>;
136 local-mac-address = [ 00 00 00 00 00 00 ];
137 interrupts = <35 2 36 2 40 2>;
138 interrupt-parent = <&mpic>;
139 phy-handle = <&phy1>;
140 };
141
142 enet2: ethernet@26000 {
143 cell-index = <2>;
144 device_type = "network";
145 model = "FEC";
146 compatible = "gianfar";
147 reg = <0x26000 0x1000>;
148 local-mac-address = [ 00 00 00 00 00 00 ];
149 interrupts = <41 2>;
150 interrupt-parent = <&mpic>;
151 phy-handle = <&phy3>;
152 };
153
154 serial0: serial@4500 {
155 cell-index = <0>;
156 device_type = "serial";
157 compatible = "ns16550";
158 reg = <0x4500 0x100>; // reg base, size
159 clock-frequency = <0>; // should we fill in in uboot?
160 interrupts = <42 2>;
161 interrupt-parent = <&mpic>;
162 };
163
164 serial1: serial@4600 {
165 cell-index = <1>;
166 device_type = "serial";
167 compatible = "ns16550";
168 reg = <0x4600 0x100>; // reg base, size
169 clock-frequency = <0>; // should we fill in in uboot?
170 interrupts = <42 2>;
171 interrupt-parent = <&mpic>;
172 };
173
174 mpic: pic@40000 {
175 interrupt-controller;
176 #address-cells = <0>;
177 #interrupt-cells = <2>;
178 reg = <0x40000 0x40000>;
179 device_type = "open-pic";
180 };
181 };
182
183 pci0: pci@e0008000 {
184 cell-index = <0>;
185 #interrupt-cells = <1>;
186 #size-cells = <2>;
187 #address-cells = <3>;
188 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
189 device_type = "pci";
190 reg = <0xe0008000 0x1000>;
191 clock-frequency = <66666666>;
192 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
193 interrupt-map = <
194 /* IDSEL 28 */
195 0xe000 0 0 1 &mpic 2 1
196 0xe000 0 0 2 &mpic 3 1>;
197
198 interrupt-parent = <&mpic>;
199 interrupts = <24 2>;
200 bus-range = <0 0>;
201 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
202 0x01000000 0 0x00000000 0xe2000000 0 0x01000000>;
203 };
204};
diff --git a/arch/powerpc/boot/dts/tqm8541.dts b/arch/powerpc/boot/dts/tqm8541.dts
new file mode 100644
index 000000000000..9e01093f496e
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm8541.dts
@@ -0,0 +1,228 @@
1/*
2 * TQM 8541 Device Tree Source
3 *
4 * Copyright 2008 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/dts-v1/;
13
14/ {
15 model = "tqm,8541";
16 compatible = "tqm,8541", "tqm,85xx";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8541@0 {
33 device_type = "cpu";
34 reg = <0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <32768>;
38 i-cache-size = <32768>;
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x10000000>;
48 };
49
50 soc@e0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 ranges = <0x0 0xe0000000 0x100000>;
55 reg = <0xe0000000 0x200>;
56 bus-frequency = <0>;
57 compatible = "fsl,mpc8541-immr", "simple-bus";
58
59 memory-controller@2000 {
60 compatible = "fsl,8540-memory-controller";
61 reg = <0x2000 0x1000>;
62 interrupt-parent = <&mpic>;
63 interrupts = <18 2>;
64 };
65
66 l2-cache-controller@20000 {
67 compatible = "fsl,8540-l2-cache-controller";
68 reg = <0x20000 0x1000>;
69 cache-line-size = <32>;
70 cache-size = <0x40000>; // L2, 256K
71 interrupt-parent = <&mpic>;
72 interrupts = <16 2>;
73 };
74
75 i2c@3000 {
76 #address-cells = <1>;
77 #size-cells = <0>;
78 cell-index = <0>;
79 compatible = "fsl-i2c";
80 reg = <0x3000 0x100>;
81 interrupts = <43 2>;
82 interrupt-parent = <&mpic>;
83 dfsrr;
84
85 rtc@68 {
86 compatible = "dallas,ds1337";
87 reg = <0x68>;
88 };
89 };
90
91 mdio@24520 {
92 #address-cells = <1>;
93 #size-cells = <0>;
94 compatible = "fsl,gianfar-mdio";
95 reg = <0x24520 0x20>;
96
97 phy1: ethernet-phy@1 {
98 interrupt-parent = <&mpic>;
99 interrupts = <8 1>;
100 reg = <1>;
101 device_type = "ethernet-phy";
102 };
103 phy2: ethernet-phy@2 {
104 interrupt-parent = <&mpic>;
105 interrupts = <8 1>;
106 reg = <2>;
107 device_type = "ethernet-phy";
108 };
109 phy3: ethernet-phy@3 {
110 interrupt-parent = <&mpic>;
111 interrupts = <8 1>;
112 reg = <3>;
113 device_type = "ethernet-phy";
114 };
115 };
116
117 enet0: ethernet@24000 {
118 cell-index = <0>;
119 device_type = "network";
120 model = "TSEC";
121 compatible = "gianfar";
122 reg = <0x24000 0x1000>;
123 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <29 2 30 2 34 2>;
125 interrupt-parent = <&mpic>;
126 phy-handle = <&phy2>;
127 };
128
129 enet1: ethernet@25000 {
130 cell-index = <1>;
131 device_type = "network";
132 model = "TSEC";
133 compatible = "gianfar";
134 reg = <0x25000 0x1000>;
135 local-mac-address = [ 00 00 00 00 00 00 ];
136 interrupts = <35 2 36 2 40 2>;
137 interrupt-parent = <&mpic>;
138 phy-handle = <&phy1>;
139 };
140
141 serial0: serial@4500 {
142 cell-index = <0>;
143 device_type = "serial";
144 compatible = "ns16550";
145 reg = <0x4500 0x100>; // reg base, size
146 clock-frequency = <0>; // should we fill in in uboot?
147 interrupts = <42 2>;
148 interrupt-parent = <&mpic>;
149 };
150
151 serial1: serial@4600 {
152 cell-index = <1>;
153 device_type = "serial";
154 compatible = "ns16550";
155 reg = <0x4600 0x100>; // reg base, size
156 clock-frequency = <0>; // should we fill in in uboot?
157 interrupts = <42 2>;
158 interrupt-parent = <&mpic>;
159 };
160
161 mpic: pic@40000 {
162 interrupt-controller;
163 #address-cells = <0>;
164 #interrupt-cells = <2>;
165 reg = <0x40000 0x40000>;
166 device_type = "open-pic";
167 };
168
169 cpm@919c0 {
170 #address-cells = <1>;
171 #size-cells = <1>;
172 compatible = "fsl,mpc8541-cpm", "fsl,cpm2", "simple-bus";
173 reg = <0x919c0 0x30>;
174 ranges;
175
176 muram@80000 {
177 #address-cells = <1>;
178 #size-cells = <1>;
179 ranges = <0 0x80000 0x10000>;
180
181 data@0 {
182 compatible = "fsl,cpm-muram-data";
183 reg = <0 0x2000 0x9000 0x1000>;
184 };
185 };
186
187 brg@919f0 {
188 compatible = "fsl,mpc8541-brg",
189 "fsl,cpm2-brg",
190 "fsl,cpm-brg";
191 reg = <0x919f0 0x10 0x915f0 0x10>;
192 clock-frequency = <0>;
193 };
194
195 cpmpic: pic@90c00 {
196 interrupt-controller;
197 #address-cells = <0>;
198 #interrupt-cells = <2>;
199 interrupts = <46 2>;
200 interrupt-parent = <&mpic>;
201 reg = <0x90c00 0x80>;
202 compatible = "fsl,mpc8541-cpm-pic", "fsl,cpm2-pic";
203 };
204 };
205 };
206
207 pci0: pci@e0008000 {
208 cell-index = <0>;
209 #interrupt-cells = <1>;
210 #size-cells = <2>;
211 #address-cells = <3>;
212 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
213 device_type = "pci";
214 reg = <0xe0008000 0x1000>;
215 clock-frequency = <66666666>;
216 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
217 interrupt-map = <
218 /* IDSEL 28 */
219 0xe000 0 0 1 &mpic 2 1
220 0xe000 0 0 2 &mpic 3 1>;
221
222 interrupt-parent = <&mpic>;
223 interrupts = <24 2>;
224 bus-range = <0 0>;
225 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
226 0x01000000 0 0x00000000 0xe2000000 0 0x01000000>;
227 };
228};
diff --git a/arch/powerpc/boot/dts/tqm8555.dts b/arch/powerpc/boot/dts/tqm8555.dts
new file mode 100644
index 000000000000..a20eb06c482f
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm8555.dts
@@ -0,0 +1,228 @@
1/*
2 * TQM 8555 Device Tree Source
3 *
4 * Copyright 2008 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/dts-v1/;
13
14/ {
15 model = "tqm,8555";
16 compatible = "tqm,8555", "tqm,85xx";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 serial0 = &serial0;
24 serial1 = &serial1;
25 pci0 = &pci0;
26 };
27
28 cpus {
29 #address-cells = <1>;
30 #size-cells = <0>;
31
32 PowerPC,8555@0 {
33 device_type = "cpu";
34 reg = <0>;
35 d-cache-line-size = <32>;
36 i-cache-line-size = <32>;
37 d-cache-size = <32768>;
38 i-cache-size = <32768>;
39 timebase-frequency = <0>;
40 bus-frequency = <0>;
41 clock-frequency = <0>;
42 };
43 };
44
45 memory {
46 device_type = "memory";
47 reg = <0x00000000 0x10000000>;
48 };
49
50 soc@e0000000 {
51 #address-cells = <1>;
52 #size-cells = <1>;
53 device_type = "soc";
54 ranges = <0x0 0xe0000000 0x100000>;
55 reg = <0xe0000000 0x200>;
56 bus-frequency = <0>;
57 compatible = "fsl,mpc8555-immr", "simple-bus";
58
59 memory-controller@2000 {
60 compatible = "fsl,8540-memory-controller";
61 reg = <0x2000 0x1000>;
62 interrupt-parent = <&mpic>;
63 interrupts = <18 2>;
64 };
65
66 l2-cache-controller@20000 {
67 compatible = "fsl,8540-l2-cache-controller";
68 reg = <0x20000 0x1000>;
69 cache-line-size = <32>;
70 cache-size = <0x40000>; // L2, 256K
71 interrupt-parent = <&mpic>;
72 interrupts = <16 2>;
73 };
74
75 i2c@3000 {
76 #address-cells = <1>;
77 #size-cells = <0>;
78 cell-index = <0>;
79 compatible = "fsl-i2c";
80 reg = <0x3000 0x100>;
81 interrupts = <43 2>;
82 interrupt-parent = <&mpic>;
83 dfsrr;
84
85 rtc@68 {
86 compatible = "dallas,ds1337";
87 reg = <0x68>;
88 };
89 };
90
91 mdio@24520 {
92 #address-cells = <1>;
93 #size-cells = <0>;
94 compatible = "fsl,gianfar-mdio";
95 reg = <0x24520 0x20>;
96
97 phy1: ethernet-phy@1 {
98 interrupt-parent = <&mpic>;
99 interrupts = <8 1>;
100 reg = <1>;
101 device_type = "ethernet-phy";
102 };
103 phy2: ethernet-phy@2 {
104 interrupt-parent = <&mpic>;
105 interrupts = <8 1>;
106 reg = <2>;
107 device_type = "ethernet-phy";
108 };
109 phy3: ethernet-phy@3 {
110 interrupt-parent = <&mpic>;
111 interrupts = <8 1>;
112 reg = <3>;
113 device_type = "ethernet-phy";
114 };
115 };
116
117 enet0: ethernet@24000 {
118 cell-index = <0>;
119 device_type = "network";
120 model = "TSEC";
121 compatible = "gianfar";
122 reg = <0x24000 0x1000>;
123 local-mac-address = [ 00 00 00 00 00 00 ];
124 interrupts = <29 2 30 2 34 2>;
125 interrupt-parent = <&mpic>;
126 phy-handle = <&phy2>;
127 };
128
129 enet1: ethernet@25000 {
130 cell-index = <1>;
131 device_type = "network";
132 model = "TSEC";
133 compatible = "gianfar";
134 reg = <0x25000 0x1000>;
135 local-mac-address = [ 00 00 00 00 00 00 ];
136 interrupts = <35 2 36 2 40 2>;
137 interrupt-parent = <&mpic>;
138 phy-handle = <&phy1>;
139 };
140
141 serial0: serial@4500 {
142 cell-index = <0>;
143 device_type = "serial";
144 compatible = "ns16550";
145 reg = <0x4500 0x100>; // reg base, size
146 clock-frequency = <0>; // should we fill in in uboot?
147 interrupts = <42 2>;
148 interrupt-parent = <&mpic>;
149 };
150
151 serial1: serial@4600 {
152 cell-index = <1>;
153 device_type = "serial";
154 compatible = "ns16550";
155 reg = <0x4600 0x100>; // reg base, size
156 clock-frequency = <0>; // should we fill in in uboot?
157 interrupts = <42 2>;
158 interrupt-parent = <&mpic>;
159 };
160
161 mpic: pic@40000 {
162 interrupt-controller;
163 #address-cells = <0>;
164 #interrupt-cells = <2>;
165 reg = <0x40000 0x40000>;
166 device_type = "open-pic";
167 };
168
169 cpm@919c0 {
170 #address-cells = <1>;
171 #size-cells = <1>;
172 compatible = "fsl,mpc8555-cpm", "fsl,cpm2", "simple-bus";
173 reg = <0x919c0 0x30>;
174 ranges;
175
176 muram@80000 {
177 #address-cells = <1>;
178 #size-cells = <1>;
179 ranges = <0 0x80000 0x10000>;
180
181 data@0 {
182 compatible = "fsl,cpm-muram-data";
183 reg = <0 0x2000 0x9000 0x1000>;
184 };
185 };
186
187 brg@919f0 {
188 compatible = "fsl,mpc8555-brg",
189 "fsl,cpm2-brg",
190 "fsl,cpm-brg";
191 reg = <0x919f0 0x10 0x915f0 0x10>;
192 clock-frequency = <0>;
193 };
194
195 cpmpic: pic@90c00 {
196 interrupt-controller;
197 #address-cells = <0>;
198 #interrupt-cells = <2>;
199 interrupts = <46 2>;
200 interrupt-parent = <&mpic>;
201 reg = <0x90c00 0x80>;
202 compatible = "fsl,mpc8555-cpm-pic", "fsl,cpm2-pic";
203 };
204 };
205 };
206
207 pci0: pci@e0008000 {
208 cell-index = <0>;
209 #interrupt-cells = <1>;
210 #size-cells = <2>;
211 #address-cells = <3>;
212 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
213 device_type = "pci";
214 reg = <0xe0008000 0x1000>;
215 clock-frequency = <66666666>;
216 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
217 interrupt-map = <
218 /* IDSEL 28 */
219 0xe000 0 0 1 &mpic 2 1
220 0xe000 0 0 2 &mpic 3 1>;
221
222 interrupt-parent = <&mpic>;
223 interrupts = <24 2>;
224 bus-range = <0 0>;
225 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
226 0x01000000 0 0x00000000 0xe2000000 0 0x01000000>;
227 };
228};
diff --git a/arch/powerpc/boot/dts/tqm8560.dts b/arch/powerpc/boot/dts/tqm8560.dts
new file mode 100644
index 000000000000..b9ac6c943b89
--- /dev/null
+++ b/arch/powerpc/boot/dts/tqm8560.dts
@@ -0,0 +1,245 @@
1/*
2 * TQM 8560 Device Tree Source
3 *
4 * Copyright 2008 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/dts-v1/;
13
14/ {
15 model = "tqm,8560";
16 compatible = "tqm,8560", "tqm,85xx";
17 #address-cells = <1>;
18 #size-cells = <1>;
19
20 aliases {
21 ethernet0 = &enet0;
22 ethernet1 = &enet1;
23 ethernet2 = &enet2;
24 serial0 = &serial0;
25 serial1 = &serial1;
26 pci0 = &pci0;
27 };
28
29 cpus {
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 PowerPC,8560@0 {
34 device_type = "cpu";
35 reg = <0>;
36 d-cache-line-size = <32>;
37 i-cache-line-size = <32>;
38 d-cache-size = <32768>;
39 i-cache-size = <32768>;
40 timebase-frequency = <0>;
41 bus-frequency = <0>;
42 clock-frequency = <0>;
43 };
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0x00000000 0x10000000>;
49 };
50
51 soc@e0000000 {
52 #address-cells = <1>;
53 #size-cells = <1>;
54 device_type = "soc";
55 ranges = <0x0 0xe0000000 0x100000>;
56 reg = <0xe0000000 0x200>;
57 bus-frequency = <0>;
58 compatible = "fsl,mpc8560-immr", "simple-bus";
59
60 memory-controller@2000 {
61 compatible = "fsl,8540-memory-controller";
62 reg = <0x2000 0x1000>;
63 interrupt-parent = <&mpic>;
64 interrupts = <18 2>;
65 };
66
67 l2-cache-controller@20000 {
68 compatible = "fsl,8540-l2-cache-controller";
69 reg = <0x20000 0x1000>;
70 cache-line-size = <32>;
71 cache-size = <0x40000>; // L2, 256K
72 interrupt-parent = <&mpic>;
73 interrupts = <16 2>;
74 };
75
76 i2c@3000 {
77 #address-cells = <1>;
78 #size-cells = <0>;
79 cell-index = <0>;
80 compatible = "fsl-i2c";
81 reg = <0x3000 0x100>;
82 interrupts = <43 2>;
83 interrupt-parent = <&mpic>;
84 dfsrr;
85
86 rtc@68 {
87 compatible = "dallas,ds1337";
88 reg = <0x68>;
89 };
90 };
91
92 mdio@24520 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 compatible = "fsl,gianfar-mdio";
96 reg = <0x24520 0x20>;
97
98 phy1: ethernet-phy@1 {
99 interrupt-parent = <&mpic>;
100 interrupts = <8 1>;
101 reg = <1>;
102 device_type = "ethernet-phy";
103 };
104 phy2: ethernet-phy@2 {
105 interrupt-parent = <&mpic>;
106 interrupts = <8 1>;
107 reg = <2>;
108 device_type = "ethernet-phy";
109 };
110 phy3: ethernet-phy@3 {
111 interrupt-parent = <&mpic>;
112 interrupts = <8 1>;
113 reg = <3>;
114 device_type = "ethernet-phy";
115 };
116 };
117
118 enet0: ethernet@24000 {
119 cell-index = <0>;
120 device_type = "network";
121 model = "TSEC";
122 compatible = "gianfar";
123 reg = <0x24000 0x1000>;
124 local-mac-address = [ 00 00 00 00 00 00 ];
125 interrupts = <29 2 30 2 34 2>;
126 interrupt-parent = <&mpic>;
127 phy-handle = <&phy2>;
128 };
129
130 enet1: ethernet@25000 {
131 cell-index = <1>;
132 device_type = "network";
133 model = "TSEC";
134 compatible = "gianfar";
135 reg = <0x25000 0x1000>;
136 local-mac-address = [ 00 00 00 00 00 00 ];
137 interrupts = <35 2 36 2 40 2>;
138 interrupt-parent = <&mpic>;
139 phy-handle = <&phy1>;
140 };
141
142 mpic: pic@40000 {
143 interrupt-controller;
144 #address-cells = <0>;
145 #interrupt-cells = <2>;
146 reg = <0x40000 0x40000>;
147 device_type = "open-pic";
148 };
149
150 cpm@919c0 {
151 #address-cells = <1>;
152 #size-cells = <1>;
153 compatible = "fsl,mpc8560-cpm", "fsl,cpm2", "simple-bus";
154 reg = <0x919c0 0x30>;
155 ranges;
156
157 muram@80000 {
158 #address-cells = <1>;
159 #size-cells = <1>;
160 ranges = <0 0x80000 0x10000>;
161
162 data@0 {
163 compatible = "fsl,cpm-muram-data";
164 reg = <0 0x4000 0x9000 0x2000>;
165 };
166 };
167
168 brg@919f0 {
169 compatible = "fsl,mpc8560-brg",
170 "fsl,cpm2-brg",
171 "fsl,cpm-brg";
172 reg = <0x919f0 0x10 0x915f0 0x10>;
173 clock-frequency = <0>;
174 };
175
176 cpmpic: pic@90c00 {
177 interrupt-controller;
178 #address-cells = <0>;
179 #interrupt-cells = <2>;
180 interrupts = <46 2>;
181 interrupt-parent = <&mpic>;
182 reg = <0x90c00 0x80>;
183 compatible = "fsl,mpc8560-cpm-pic", "fsl,cpm2-pic";
184 };
185
186 serial0: serial@91a00 {
187 device_type = "serial";
188 compatible = "fsl,mpc8560-scc-uart",
189 "fsl,cpm2-scc-uart";
190 reg = <0x91a00 0x20 0x88000 0x100>;
191 fsl,cpm-brg = <1>;
192 fsl,cpm-command = <0x800000>;
193 current-speed = <115200>;
194 interrupts = <40 8>;
195 interrupt-parent = <&cpmpic>;
196 };
197
198 serial1: serial@91a20 {
199 device_type = "serial";
200 compatible = "fsl,mpc8560-scc-uart",
201 "fsl,cpm2-scc-uart";
202 reg = <0x91a20 0x20 0x88100 0x100>;
203 fsl,cpm-brg = <2>;
204 fsl,cpm-command = <0x4a00000>;
205 current-speed = <115200>;
206 interrupts = <41 8>;
207 interrupt-parent = <&cpmpic>;
208 };
209
210 enet2: ethernet@91340 {
211 device_type = "network";
212 compatible = "fsl,mpc8560-fcc-enet",
213 "fsl,cpm2-fcc-enet";
214 reg = <0x91340 0x20 0x88600 0x100 0x913d0 0x1>;
215 local-mac-address = [ 00 00 00 00 00 00 ];
216 fsl,cpm-command = <0x1a400300>;
217 interrupts = <34 8>;
218 interrupt-parent = <&cpmpic>;
219 phy-handle = <&phy3>;
220 };
221 };
222 };
223
224 pci0: pci@e0008000 {
225 cell-index = <0>;
226 #interrupt-cells = <1>;
227 #size-cells = <2>;
228 #address-cells = <3>;
229 compatible = "fsl,mpc8540-pcix", "fsl,mpc8540-pci";
230 device_type = "pci";
231 reg = <0xe0008000 0x1000>;
232 clock-frequency = <66666666>;
233 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
234 interrupt-map = <
235 /* IDSEL 28 */
236 0xe000 0 0 1 &mpic 2 1
237 0xe000 0 0 2 &mpic 3 1>;
238
239 interrupt-parent = <&mpic>;
240 interrupts = <24 2>;
241 bus-range = <0 0>;
242 ranges = <0x02000000 0 0x80000000 0x80000000 0 0x20000000
243 0x01000000 0 0x00000000 0xe2000000 0 0x01000000>;
244 };
245};
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts
index 754fa3960f83..dcc21b0438e5 100644
--- a/arch/powerpc/boot/dts/walnut.dts
+++ b/arch/powerpc/boot/dts/walnut.dts
@@ -14,14 +14,21 @@
14 #size-cells = <1>; 14 #size-cells = <1>;
15 model = "ibm,walnut"; 15 model = "ibm,walnut";
16 compatible = "ibm,walnut"; 16 compatible = "ibm,walnut";
17 dcr-parent = <&/cpus/PowerPC,405GP@0>; 17 dcr-parent = <&/cpus/cpu@0>;
18
19 aliases {
20 ethernet0 = &EMAC;
21 serial0 = &UART0;
22 serial1 = &UART1;
23 };
18 24
19 cpus { 25 cpus {
20 #address-cells = <1>; 26 #address-cells = <1>;
21 #size-cells = <0>; 27 #size-cells = <0>;
22 28
23 PowerPC,405GP@0 { 29 cpu@0 {
24 device_type = "cpu"; 30 device_type = "cpu";
31 model = "PowerPC,405GP";
25 reg = <0>; 32 reg = <0>;
26 clock-frequency = <bebc200>; /* Filled in by zImage */ 33 clock-frequency = <bebc200>; /* Filled in by zImage */
27 timebase-frequency = <0>; /* Filled in by zImage */ 34 timebase-frequency = <0>; /* Filled in by zImage */
@@ -168,9 +175,10 @@
168 }; 175 };
169 }; 176 };
170 177
171 ds1743@1,0 { 178 nvram@1,0 {
172 /* NVRAM and RTC */ 179 /* NVRAM and RTC */
173 compatible = "ds1743"; 180 compatible = "ds1743-nvram";
181 #bytes = <2000>;
174 reg = <1 0 2000>; 182 reg = <1 0 2000>;
175 }; 183 };
176 184
@@ -190,6 +198,45 @@
190 virtual-reg = <f0300005>; 198 virtual-reg = <f0300005>;
191 }; 199 };
192 }; 200 };
201
202 PCI0: pci@ec000000 {
203 device_type = "pci";
204 #interrupt-cells = <1>;
205 #size-cells = <2>;
206 #address-cells = <3>;
207 compatible = "ibm,plb405gp-pci", "ibm,plb-pci";
208 primary;
209 reg = <eec00000 8 /* Config space access */
210 eed80000 4 /* IACK */
211 eed80000 4 /* Special cycle */
212 ef480000 40>; /* Internal registers */
213
214 /* Outbound ranges, one memory and one IO,
215 * later cannot be changed. Chip supports a second
216 * IO range but we don't use it for now
217 */
218 ranges = <02000000 0 80000000 80000000 0 20000000
219 01000000 0 00000000 e8000000 0 00010000>;
220
221 /* Inbound 2GB range starting at 0 */
222 dma-ranges = <42000000 0 0 0 0 80000000>;
223
224 /* Walnut has all 4 IRQ pins tied together per slot */
225 interrupt-map-mask = <f800 0 0 0>;
226 interrupt-map = <
227 /* IDSEL 1 */
228 0800 0 0 0 &UIC0 1c 8
229
230 /* IDSEL 2 */
231 1000 0 0 0 &UIC0 1d 8
232
233 /* IDSEL 3 */
234 1800 0 0 0 &UIC0 1e 8
235
236 /* IDSEL 4 */
237 2000 0 0 0 &UIC0 1f 8
238 >;
239 };
193 }; 240 };
194 241
195 chosen { 242 chosen {
diff --git a/arch/powerpc/boot/dts/warp.dts b/arch/powerpc/boot/dts/warp.dts
new file mode 100644
index 000000000000..dc1499d30f43
--- /dev/null
+++ b/arch/powerpc/boot/dts/warp.dts
@@ -0,0 +1,239 @@
1/*
2 * Device Tree Source for PIKA Warp
3 *
4 * Copyright (c) 2008 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without
9 * any warranty of any kind, whether express or implied.
10 */
11
12/ {
13 #address-cells = <2>;
14 #size-cells = <1>;
15 model = "pika,warp";
16 compatible = "pika,warp";
17 dcr-parent = <&/cpus/cpu@0>;
18
19 aliases {
20 ethernet0 = &EMAC0;
21 serial0 = &UART0;
22 };
23
24 cpus {
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 cpu@0 {
29 device_type = "cpu";
30 model = "PowerPC,440EP";
31 reg = <0>;
32 clock-frequency = <0>; /* Filled in by zImage */
33 timebase-frequency = <0>; /* Filled in by zImage */
34 i-cache-line-size = <20>;
35 d-cache-line-size = <20>;
36 i-cache-size = <8000>;
37 d-cache-size = <8000>;
38 dcr-controller;
39 dcr-access-method = "native";
40 };
41 };
42
43 memory {
44 device_type = "memory";
45 reg = <0 0 0>; /* Filled in by zImage */
46 };
47
48 UIC0: interrupt-controller0 {
49 compatible = "ibm,uic-440ep","ibm,uic";
50 interrupt-controller;
51 cell-index = <0>;
52 dcr-reg = <0c0 009>;
53 #address-cells = <0>;
54 #size-cells = <0>;
55 #interrupt-cells = <2>;
56 };
57
58 UIC1: interrupt-controller1 {
59 compatible = "ibm,uic-440ep","ibm,uic";
60 interrupt-controller;
61 cell-index = <1>;
62 dcr-reg = <0d0 009>;
63 #address-cells = <0>;
64 #size-cells = <0>;
65 #interrupt-cells = <2>;
66 interrupts = <1e 4 1f 4>; /* cascade */
67 interrupt-parent = <&UIC0>;
68 };
69
70 SDR0: sdr {
71 compatible = "ibm,sdr-440ep";
72 dcr-reg = <00e 002>;
73 };
74
75 CPR0: cpr {
76 compatible = "ibm,cpr-440ep";
77 dcr-reg = <00c 002>;
78 };
79
80 plb {
81 compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
82 #address-cells = <2>;
83 #size-cells = <1>;
84 ranges;
85 clock-frequency = <0>; /* Filled in by zImage */
86
87 SDRAM0: sdram {
88 compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
89 dcr-reg = <010 2>;
90 };
91
92 DMA0: dma {
93 compatible = "ibm,dma-440ep", "ibm,dma-440gp";
94 dcr-reg = <100 027>;
95 };
96
97 MAL0: mcmal {
98 compatible = "ibm,mcmal-440ep", "ibm,mcmal-440gp", "ibm,mcmal";
99 dcr-reg = <180 62>;
100 num-tx-chans = <4>;
101 num-rx-chans = <2>;
102 interrupt-parent = <&MAL0>;
103 interrupts = <0 1 2 3 4>;
104 #interrupt-cells = <1>;
105 #address-cells = <0>;
106 #size-cells = <0>;
107 interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
108 /*RXEOB*/ 1 &UIC0 b 4
109 /*SERR*/ 2 &UIC1 0 4
110 /*TXDE*/ 3 &UIC1 1 4
111 /*RXDE*/ 4 &UIC1 2 4>;
112 };
113
114 POB0: opb {
115 compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
116 #address-cells = <1>;
117 #size-cells = <1>;
118 ranges = <00000000 0 00000000 80000000
119 80000000 0 80000000 80000000>;
120 interrupt-parent = <&UIC1>;
121 interrupts = <7 4>;
122 clock-frequency = <0>; /* Filled in by zImage */
123
124 EBC0: ebc {
125 compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
126 dcr-reg = <012 2>;
127 #address-cells = <2>;
128 #size-cells = <1>;
129 clock-frequency = <0>; /* Filled in by zImage */
130 interrupts = <5 1>;
131 interrupt-parent = <&UIC1>;
132
133 fpga@2,0 {
134 compatible = "pika,fpga";
135 reg = <2 0 2200>;
136 interrupts = <18 8>;
137 interrupt-parent = <&UIC0>;
138 };
139
140 nor_flash@0,0 {
141 compatible = "amd,s29gl512n", "cfi-flash";
142 bank-width = <2>;
143 reg = <0 0 4000000>;
144 #address-cells = <1>;
145 #size-cells = <1>;
146 partition@0 {
147 label = "kernel";
148 reg = <0 180000>;
149 };
150 partition@180000 {
151 label = "root";
152 reg = <180000 3480000>;
153 };
154 partition@3600000 {
155 label = "user";
156 reg = <3600000 900000>;
157 };
158 partition@3f00000 {
159 label = "fpga";
160 reg = <3f00000 40000>;
161 };
162 partition@3f40000 {
163 label = "env";
164 reg = <3f40000 40000>;
165 };
166 partition@3f80000 {
167 label = "u-boot";
168 reg = <3f80000 80000>;
169 };
170 };
171 };
172
173 UART0: serial@ef600300 {
174 device_type = "serial";
175 compatible = "ns16550";
176 reg = <ef600300 8>;
177 virtual-reg = <ef600300>;
178 clock-frequency = <0>; /* Filled in by zImage */
179 current-speed = <1c200>;
180 interrupt-parent = <&UIC0>;
181 interrupts = <0 4>;
182 };
183
184 IIC0: i2c@ef600700 {
185 compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
186 reg = <ef600700 14>;
187 interrupt-parent = <&UIC0>;
188 interrupts = <2 4>;
189 };
190
191 GPIO0: gpio@ef600b00 {
192 compatible = "ibm,gpio-440ep";
193 reg = <ef600b00 48>;
194 };
195
196 GPIO1: gpio@ef600c00 {
197 compatible = "ibm,gpio-440ep";
198 reg = <ef600c00 48>;
199 };
200
201 ZMII0: emac-zmii@ef600d00 {
202 compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
203 reg = <ef600d00 c>;
204 };
205
206 EMAC0: ethernet@ef600e00 {
207 linux,network-index = <0>;
208 device_type = "network";
209 compatible = "ibm,emac-440ep", "ibm,emac-440gp", "ibm,emac";
210 interrupt-parent = <&UIC1>;
211 interrupts = <1c 4 1d 4>;
212 reg = <ef600e00 70>;
213 local-mac-address = [000000000000];
214 mal-device = <&MAL0>;
215 mal-tx-channel = <0 1>;
216 mal-rx-channel = <0>;
217 cell-index = <0>;
218 max-frame-size = <5dc>;
219 rx-fifo-size = <1000>;
220 tx-fifo-size = <800>;
221 phy-mode = "rmii";
222 phy-map = <00000000>;
223 zmii-device = <&ZMII0>;
224 zmii-channel = <0>;
225 };
226
227 usb@ef601000 {
228 compatible = "ohci-be";
229 reg = <ef601000 80>;
230 interrupts = <8 1 9 1>;
231 interrupt-parent = < &UIC1 >;
232 };
233 };
234 };
235
236 chosen {
237 linux,stdout-path = "/plb/opb/serial@ef600300";
238 };
239};
diff --git a/arch/powerpc/boot/ebony.c b/arch/powerpc/boot/ebony.c
index 86c0f5df0a86..f61364c47a76 100644
--- a/arch/powerpc/boot/ebony.c
+++ b/arch/powerpc/boot/ebony.c
@@ -31,66 +31,6 @@
31 31
32static u8 *ebony_mac0, *ebony_mac1; 32static u8 *ebony_mac0, *ebony_mac1;
33 33
34/* Calculate 440GP clocks */
35void ibm440gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
36{
37 u32 sys0 = mfdcr(DCRN_CPC0_SYS0);
38 u32 cr0 = mfdcr(DCRN_CPC0_CR0);
39 u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
40 u32 opdv = CPC0_SYS0_OPDV(sys0);
41 u32 epdv = CPC0_SYS0_EPDV(sys0);
42
43 if (sys0 & CPC0_SYS0_BYPASS) {
44 /* Bypass system PLL */
45 cpu = plb = sysclk;
46 } else {
47 if (sys0 & CPC0_SYS0_EXTSL)
48 /* PerClk */
49 m = CPC0_SYS0_FWDVB(sys0) * opdv * epdv;
50 else
51 /* CPU clock */
52 m = CPC0_SYS0_FBDV(sys0) * CPC0_SYS0_FWDVA(sys0);
53 cpu = sysclk * m / CPC0_SYS0_FWDVA(sys0);
54 plb = sysclk * m / CPC0_SYS0_FWDVB(sys0);
55 }
56
57 opb = plb / opdv;
58 ebc = opb / epdv;
59
60 /* FIXME: Check if this is for all 440GP, or just Ebony */
61 if ((mfpvr() & 0xf0000fff) == 0x40000440)
62 /* Rev. B 440GP, use external system clock */
63 tb = sysclk;
64 else
65 /* Rev. C 440GP, errata force us to use internal clock */
66 tb = cpu;
67
68 if (cr0 & CPC0_CR0_U0EC)
69 /* External UART clock */
70 uart0 = ser_clk;
71 else
72 /* Internal UART clock */
73 uart0 = plb / CPC0_CR0_UDIV(cr0);
74
75 if (cr0 & CPC0_CR0_U1EC)
76 /* External UART clock */
77 uart1 = ser_clk;
78 else
79 /* Internal UART clock */
80 uart1 = plb / CPC0_CR0_UDIV(cr0);
81
82 printf("PPC440GP: SysClk = %dMHz (%x)\n\r",
83 (sysclk + 500000) / 1000000, sysclk);
84
85 dt_fixup_cpu_clocks(cpu, tb, 0);
86
87 dt_fixup_clock("/plb", plb);
88 dt_fixup_clock("/plb/opb", opb);
89 dt_fixup_clock("/plb/opb/ebc", ebc);
90 dt_fixup_clock("/plb/opb/serial@40000200", uart0);
91 dt_fixup_clock("/plb/opb/serial@40000300", uart1);
92}
93
94#define EBONY_FPGA_PATH "/plb/opb/ebc/fpga" 34#define EBONY_FPGA_PATH "/plb/opb/ebc/fpga"
95#define EBONY_FPGA_FLASH_SEL 0x01 35#define EBONY_FPGA_FLASH_SEL 0x01
96#define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash" 36#define EBONY_SMALL_FLASH_PATH "/plb/opb/ebc/small-flash"
@@ -134,7 +74,7 @@ static void ebony_fixups(void)
134 unsigned long sysclk = 33000000; 74 unsigned long sysclk = 33000000;
135 75
136 ibm440gp_fixup_clocks(sysclk, 6 * 1843200); 76 ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
137 ibm4xx_fixup_memsize(); 77 ibm4xx_sdram_fixup_memsize();
138 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1); 78 dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
139 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc"); 79 ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
140 ebony_flashsel_fixup(); 80 ebony_flashsel_fixup();
@@ -146,6 +86,6 @@ void ebony_init(void *mac0, void *mac1)
146 platform_ops.exit = ibm44x_dbcr_reset; 86 platform_ops.exit = ibm44x_dbcr_reset;
147 ebony_mac0 = mac0; 87 ebony_mac0 = mac0;
148 ebony_mac1 = mac1; 88 ebony_mac1 = mac1;
149 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 89 fdt_init(_dtb_start);
150 serial_console_init(); 90 serial_console_init();
151} 91}
diff --git a/arch/powerpc/boot/ep405.c b/arch/powerpc/boot/ep405.c
new file mode 100644
index 000000000000..2d08a862cbea
--- /dev/null
+++ b/arch/powerpc/boot/ep405.c
@@ -0,0 +1,74 @@
1/*
2 * Embedded Planet EP405 with PlanetCore firmware
3 *
4 * (c) Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp,\
5 *
6 * Based on ep88xc.c by
7 *
8 * Scott Wood <scottwood@freescale.com>
9 *
10 * Copyright (c) 2007 Freescale Semiconductor, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License version 2 as published
14 * by the Free Software Foundation.
15 */
16
17#include "ops.h"
18#include "stdio.h"
19#include "planetcore.h"
20#include "dcr.h"
21#include "4xx.h"
22#include "io.h"
23
24static char *table;
25static u64 mem_size;
26
27static void platform_fixups(void)
28{
29 u64 val;
30 void *nvrtc;
31
32 dt_fixup_memory(0, mem_size);
33 planetcore_set_mac_addrs(table);
34
35 if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
36 printf("No PlanetCore crystal frequency key.\r\n");
37 return;
38 }
39 ibm405gp_fixup_clocks(val, 0xa8c000);
40 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
41 ibm4xx_fixup_ebc_ranges("/plb/ebc");
42
43 if (!planetcore_get_decimal(table, PLANETCORE_KEY_KB_NVRAM, &val)) {
44 printf("No PlanetCore NVRAM size key.\r\n");
45 return;
46 }
47 nvrtc = finddevice("/plb/ebc/nvrtc@4,200000");
48 if (nvrtc != NULL) {
49 u32 reg[3] = { 4, 0x200000, 0};
50 getprop(nvrtc, "reg", reg, 3);
51 reg[2] = (val << 10) & 0xffffffff;
52 setprop(nvrtc, "reg", reg, 3);
53 }
54}
55
56void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
57 unsigned long r6, unsigned long r7)
58{
59 table = (char *)r3;
60 planetcore_prepare_table(table);
61
62 if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
63 return;
64
65 mem_size *= 1024 * 1024;
66 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
67
68 fdt_init(_dtb_start);
69
70 planetcore_set_stdout_path(table);
71
72 serial_console_init();
73 platform_ops.fixups = platform_fixups;
74}
diff --git a/arch/powerpc/boot/ep8248e.c b/arch/powerpc/boot/ep8248e.c
new file mode 100644
index 000000000000..f57d14d0272b
--- /dev/null
+++ b/arch/powerpc/boot/ep8248e.c
@@ -0,0 +1,55 @@
1/*
2 * Embedded Planet EP8248E with PlanetCore firmware
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 *
6 * Copyright (c) 2007 Freescale Semiconductor, Inc.
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 version 2 as published
10 * by the Free Software Foundation.
11 */
12
13#include "ops.h"
14#include "stdio.h"
15#include "planetcore.h"
16#include "pq2.h"
17
18static char *table;
19static u64 mem_size;
20
21#include <io.h>
22
23static void platform_fixups(void)
24{
25 u64 val;
26
27 dt_fixup_memory(0, mem_size);
28 planetcore_set_mac_addrs(table);
29
30 if (!planetcore_get_decimal(table, PLANETCORE_KEY_CRYSTAL_HZ, &val)) {
31 printf("No PlanetCore crystal frequency key.\r\n");
32 return;
33 }
34
35 pq2_fixup_clocks(val);
36}
37
38void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
39 unsigned long r6, unsigned long r7)
40{
41 table = (char *)r3;
42 planetcore_prepare_table(table);
43
44 if (!planetcore_get_decimal(table, PLANETCORE_KEY_MB_RAM, &mem_size))
45 return;
46
47 mem_size *= 1024 * 1024;
48 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
49
50 fdt_init(_dtb_start);
51
52 planetcore_set_stdout_path(table);
53 serial_console_init();
54 platform_ops.fixups = platform_fixups;
55}
diff --git a/arch/powerpc/boot/ep88xc.c b/arch/powerpc/boot/ep88xc.c
index 6b87cdce3fe7..a400f5407155 100644
--- a/arch/powerpc/boot/ep88xc.c
+++ b/arch/powerpc/boot/ep88xc.c
@@ -45,7 +45,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
45 mem_size *= 1024 * 1024; 45 mem_size *= 1024 * 1024;
46 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64); 46 simple_alloc_init(_end, mem_size - (unsigned long)_end, 32, 64);
47 47
48 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 48 fdt_init(_dtb_start);
49 49
50 planetcore_set_stdout_path(table); 50 planetcore_set_stdout_path(table);
51 51
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c
deleted file mode 100644
index cf30675c6116..000000000000
--- a/arch/powerpc/boot/flatdevtree.c
+++ /dev/null
@@ -1,1036 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright Pantelis Antoniou 2006
17 * Copyright (C) IBM Corporation 2006
18 *
19 * Authors: Pantelis Antoniou <pantelis@embeddedalley.com>
20 * Hollis Blanchard <hollisb@us.ibm.com>
21 * Mark A. Greer <mgreer@mvista.com>
22 * Paul Mackerras <paulus@samba.org>
23 */
24
25#include <string.h>
26#include <stddef.h>
27#include "flatdevtree.h"
28#include "flatdevtree_env.h"
29
30#define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1))
31
32static char *ft_root_node(struct ft_cxt *cxt)
33{
34 return cxt->rgn[FT_STRUCT].start;
35}
36
37/* Routines for keeping node ptrs returned by ft_find_device current */
38/* First entry not used b/c it would return 0 and be taken as NULL/error */
39static void *ft_get_phandle(struct ft_cxt *cxt, char *node)
40{
41 unsigned int i;
42
43 if (!node)
44 return NULL;
45
46 for (i = 1; i < cxt->nodes_used; i++) /* already there? */
47 if (cxt->node_tbl[i] == node)
48 return (void *)i;
49
50 if (cxt->nodes_used < cxt->node_max) {
51 cxt->node_tbl[cxt->nodes_used] = node;
52 return (void *)cxt->nodes_used++;
53 }
54
55 return NULL;
56}
57
58static char *ft_node_ph2node(struct ft_cxt *cxt, const void *phandle)
59{
60 unsigned int i = (unsigned int)phandle;
61
62 if (i < cxt->nodes_used)
63 return cxt->node_tbl[i];
64 return NULL;
65}
66
67static void ft_node_update_before(struct ft_cxt *cxt, char *addr, int shift)
68{
69 unsigned int i;
70
71 if (shift == 0)
72 return;
73
74 for (i = 1; i < cxt->nodes_used; i++)
75 if (cxt->node_tbl[i] < addr)
76 cxt->node_tbl[i] += shift;
77}
78
79static void ft_node_update_after(struct ft_cxt *cxt, char *addr, int shift)
80{
81 unsigned int i;
82
83 if (shift == 0)
84 return;
85
86 for (i = 1; i < cxt->nodes_used; i++)
87 if (cxt->node_tbl[i] >= addr)
88 cxt->node_tbl[i] += shift;
89}
90
91/* Struct used to return info from ft_next() */
92struct ft_atom {
93 u32 tag;
94 const char *name;
95 void *data;
96 u32 size;
97};
98
99/* Set ptrs to current one's info; return addr of next one */
100static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
101{
102 u32 sz;
103
104 if (p >= cxt->rgn[FT_STRUCT].start + cxt->rgn[FT_STRUCT].size)
105 return NULL;
106
107 ret->tag = be32_to_cpu(*(u32 *) p);
108 p += 4;
109
110 switch (ret->tag) { /* Tag */
111 case OF_DT_BEGIN_NODE:
112 ret->name = p;
113 ret->data = (void *)(p - 4); /* start of node */
114 p += _ALIGN(strlen(p) + 1, 4);
115 break;
116 case OF_DT_PROP:
117 ret->size = sz = be32_to_cpu(*(u32 *) p);
118 ret->name = cxt->str_anchor + be32_to_cpu(*(u32 *) (p + 4));
119 ret->data = (void *)(p + 8);
120 p += 8 + _ALIGN(sz, 4);
121 break;
122 case OF_DT_END_NODE:
123 case OF_DT_NOP:
124 break;
125 case OF_DT_END:
126 default:
127 p = NULL;
128 break;
129 }
130
131 return p;
132}
133
134#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
135#define EXPAND_INCR 1024 /* alloc this much extra when expanding */
136
137/* Copy the tree to a newly-allocated region and put things in order */
138static int ft_reorder(struct ft_cxt *cxt, int nextra)
139{
140 unsigned long tot;
141 enum ft_rgn_id r;
142 char *p, *pend;
143 int stroff;
144
145 tot = HDR_SIZE + EXPAND_INCR;
146 for (r = FT_RSVMAP; r <= FT_STRINGS; ++r)
147 tot += cxt->rgn[r].size;
148 if (nextra > 0)
149 tot += nextra;
150 tot = _ALIGN(tot, 8);
151
152 if (!cxt->realloc)
153 return 0;
154 p = cxt->realloc(NULL, tot);
155 if (!p)
156 return 0;
157
158 memcpy(p, cxt->bph, sizeof(struct boot_param_header));
159 /* offsets get fixed up later */
160
161 cxt->bph = (struct boot_param_header *)p;
162 cxt->max_size = tot;
163 pend = p + tot;
164 p += HDR_SIZE;
165
166 memcpy(p, cxt->rgn[FT_RSVMAP].start, cxt->rgn[FT_RSVMAP].size);
167 cxt->rgn[FT_RSVMAP].start = p;
168 p += cxt->rgn[FT_RSVMAP].size;
169
170 memcpy(p, cxt->rgn[FT_STRUCT].start, cxt->rgn[FT_STRUCT].size);
171 ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
172 p - cxt->rgn[FT_STRUCT].start);
173 cxt->p += p - cxt->rgn[FT_STRUCT].start;
174 cxt->rgn[FT_STRUCT].start = p;
175
176 p = pend - cxt->rgn[FT_STRINGS].size;
177 memcpy(p, cxt->rgn[FT_STRINGS].start, cxt->rgn[FT_STRINGS].size);
178 stroff = cxt->str_anchor - cxt->rgn[FT_STRINGS].start;
179 cxt->rgn[FT_STRINGS].start = p;
180 cxt->str_anchor = p + stroff;
181
182 cxt->isordered = 1;
183 return 1;
184}
185
186static inline char *prev_end(struct ft_cxt *cxt, enum ft_rgn_id r)
187{
188 if (r > FT_RSVMAP)
189 return cxt->rgn[r - 1].start + cxt->rgn[r - 1].size;
190 return (char *)cxt->bph + HDR_SIZE;
191}
192
193static inline char *next_start(struct ft_cxt *cxt, enum ft_rgn_id r)
194{
195 if (r < FT_STRINGS)
196 return cxt->rgn[r + 1].start;
197 return (char *)cxt->bph + cxt->max_size;
198}
199
200/*
201 * See if we can expand region rgn by nextra bytes by using up
202 * free space after or before the region.
203 */
204static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
205 int nextra)
206{
207 char *p = *pp;
208 char *rgn_start, *rgn_end;
209
210 rgn_start = cxt->rgn[rgn].start;
211 rgn_end = rgn_start + cxt->rgn[rgn].size;
212 if (nextra <= 0 || rgn_end + nextra <= next_start(cxt, rgn)) {
213 /* move following stuff */
214 if (p < rgn_end) {
215 if (nextra < 0)
216 memmove(p, p - nextra, rgn_end - p + nextra);
217 else
218 memmove(p + nextra, p, rgn_end - p);
219 if (rgn == FT_STRUCT)
220 ft_node_update_after(cxt, p, nextra);
221 }
222 cxt->rgn[rgn].size += nextra;
223 if (rgn == FT_STRINGS)
224 /* assumes strings only added at beginning */
225 cxt->str_anchor += nextra;
226 return 1;
227 }
228 if (prev_end(cxt, rgn) <= rgn_start - nextra) {
229 /* move preceding stuff */
230 if (p > rgn_start) {
231 memmove(rgn_start - nextra, rgn_start, p - rgn_start);
232 if (rgn == FT_STRUCT)
233 ft_node_update_before(cxt, p, -nextra);
234 }
235 *pp -= nextra;
236 cxt->rgn[rgn].start -= nextra;
237 cxt->rgn[rgn].size += nextra;
238 return 1;
239 }
240 return 0;
241}
242
243static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn,
244 int nextra)
245{
246 unsigned long size, ssize, tot;
247 char *str, *next;
248 enum ft_rgn_id r;
249
250 if (!cxt->isordered) {
251 unsigned long rgn_off = *pp - cxt->rgn[rgn].start;
252
253 if (!ft_reorder(cxt, nextra))
254 return 0;
255
256 *pp = cxt->rgn[rgn].start + rgn_off;
257 }
258 if (ft_shuffle(cxt, pp, rgn, nextra))
259 return 1;
260
261 /* See if there is space after the strings section */
262 ssize = cxt->rgn[FT_STRINGS].size;
263 if (cxt->rgn[FT_STRINGS].start + ssize
264 < (char *)cxt->bph + cxt->max_size) {
265 /* move strings up as far as possible */
266 str = (char *)cxt->bph + cxt->max_size - ssize;
267 cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
268 memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
269 cxt->rgn[FT_STRINGS].start = str;
270 /* enough space now? */
271 if (rgn >= FT_STRUCT && ft_shuffle(cxt, pp, rgn, nextra))
272 return 1;
273 }
274
275 /* how much total free space is there following this region? */
276 tot = 0;
277 for (r = rgn; r < FT_STRINGS; ++r) {
278 char *r_end = cxt->rgn[r].start + cxt->rgn[r].size;
279 tot += next_start(cxt, rgn) - r_end;
280 }
281
282 /* cast is to shut gcc up; we know nextra >= 0 */
283 if (tot < (unsigned int)nextra) {
284 /* have to reallocate */
285 char *newp, *new_start;
286 int shift;
287
288 if (!cxt->realloc)
289 return 0;
290 size = _ALIGN(cxt->max_size + (nextra - tot) + EXPAND_INCR, 8);
291 newp = cxt->realloc(cxt->bph, size);
292 if (!newp)
293 return 0;
294 cxt->max_size = size;
295 shift = newp - (char *)cxt->bph;
296
297 if (shift) { /* realloc can return same addr */
298 cxt->bph = (struct boot_param_header *)newp;
299 ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start,
300 shift);
301 for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
302 new_start = cxt->rgn[r].start + shift;
303 cxt->rgn[r].start = new_start;
304 }
305 *pp += shift;
306 cxt->str_anchor += shift;
307 }
308
309 /* move strings up to the end */
310 str = newp + size - ssize;
311 cxt->str_anchor += str - cxt->rgn[FT_STRINGS].start;
312 memmove(str, cxt->rgn[FT_STRINGS].start, ssize);
313 cxt->rgn[FT_STRINGS].start = str;
314
315 if (ft_shuffle(cxt, pp, rgn, nextra))
316 return 1;
317 }
318
319 /* must be FT_RSVMAP and we need to move FT_STRUCT up */
320 if (rgn == FT_RSVMAP) {
321 next = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
322 + nextra;
323 ssize = cxt->rgn[FT_STRUCT].size;
324 if (next + ssize >= cxt->rgn[FT_STRINGS].start)
325 return 0; /* "can't happen" */
326 memmove(next, cxt->rgn[FT_STRUCT].start, ssize);
327 ft_node_update_after(cxt, cxt->rgn[FT_STRUCT].start, nextra);
328 cxt->rgn[FT_STRUCT].start = next;
329
330 if (ft_shuffle(cxt, pp, rgn, nextra))
331 return 1;
332 }
333
334 return 0; /* "can't happen" */
335}
336
337static void ft_put_word(struct ft_cxt *cxt, u32 v)
338{
339 *(u32 *) cxt->p = cpu_to_be32(v);
340 cxt->p += 4;
341}
342
343static void ft_put_bin(struct ft_cxt *cxt, const void *data, unsigned int sz)
344{
345 unsigned long sza = _ALIGN(sz, 4);
346
347 /* zero out the alignment gap if necessary */
348 if (sz < sza)
349 *(u32 *) (cxt->p + sza - 4) = 0;
350
351 /* copy in the data */
352 memcpy(cxt->p, data, sz);
353
354 cxt->p += sza;
355}
356
357char *ft_begin_node(struct ft_cxt *cxt, const char *name)
358{
359 unsigned long nlen = strlen(name) + 1;
360 unsigned long len = 8 + _ALIGN(nlen, 4);
361 char *ret;
362
363 if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
364 return NULL;
365
366 ret = cxt->p;
367
368 ft_put_word(cxt, OF_DT_BEGIN_NODE);
369 ft_put_bin(cxt, name, strlen(name) + 1);
370
371 return ret;
372}
373
374void ft_end_node(struct ft_cxt *cxt)
375{
376 ft_put_word(cxt, OF_DT_END_NODE);
377}
378
379void ft_nop(struct ft_cxt *cxt)
380{
381 if (ft_make_space(cxt, &cxt->p, FT_STRUCT, 4))
382 ft_put_word(cxt, OF_DT_NOP);
383}
384
385#define NO_STRING 0x7fffffff
386
387static int lookup_string(struct ft_cxt *cxt, const char *name)
388{
389 char *p, *end;
390
391 p = cxt->rgn[FT_STRINGS].start;
392 end = p + cxt->rgn[FT_STRINGS].size;
393 while (p < end) {
394 if (strcmp(p, (char *)name) == 0)
395 return p - cxt->str_anchor;
396 p += strlen(p) + 1;
397 }
398
399 return NO_STRING;
400}
401
402/* lookup string and insert if not found */
403static int map_string(struct ft_cxt *cxt, const char *name)
404{
405 int off;
406 char *p;
407
408 off = lookup_string(cxt, name);
409 if (off != NO_STRING)
410 return off;
411 p = cxt->rgn[FT_STRINGS].start;
412 if (!ft_make_space(cxt, &p, FT_STRINGS, strlen(name) + 1))
413 return NO_STRING;
414 strcpy(p, name);
415 return p - cxt->str_anchor;
416}
417
418int ft_prop(struct ft_cxt *cxt, const char *name, const void *data,
419 unsigned int sz)
420{
421 int off, len;
422
423 off = map_string(cxt, name);
424 if (off == NO_STRING)
425 return -1;
426
427 len = 12 + _ALIGN(sz, 4);
428 if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, len))
429 return -1;
430
431 ft_put_word(cxt, OF_DT_PROP);
432 ft_put_word(cxt, sz);
433 ft_put_word(cxt, off);
434 ft_put_bin(cxt, data, sz);
435 return 0;
436}
437
438int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str)
439{
440 return ft_prop(cxt, name, str, strlen(str) + 1);
441}
442
443int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val)
444{
445 u32 v = cpu_to_be32((u32) val);
446
447 return ft_prop(cxt, name, &v, 4);
448}
449
450/* Calculate the size of the reserved map */
451static unsigned long rsvmap_size(struct ft_cxt *cxt)
452{
453 struct ft_reserve *res;
454
455 res = (struct ft_reserve *)cxt->rgn[FT_RSVMAP].start;
456 while (res->start || res->len)
457 ++res;
458 return (char *)(res + 1) - cxt->rgn[FT_RSVMAP].start;
459}
460
461/* Calculate the size of the struct region by stepping through it */
462static unsigned long struct_size(struct ft_cxt *cxt)
463{
464 char *p = cxt->rgn[FT_STRUCT].start;
465 char *next;
466 struct ft_atom atom;
467
468 /* make check in ft_next happy */
469 if (cxt->rgn[FT_STRUCT].size == 0)
470 cxt->rgn[FT_STRUCT].size = 0xfffffffful - (unsigned long)p;
471
472 while ((next = ft_next(cxt, p, &atom)) != NULL)
473 p = next;
474 return p + 4 - cxt->rgn[FT_STRUCT].start;
475}
476
477/* add `adj' on to all string offset values in the struct area */
478static void adjust_string_offsets(struct ft_cxt *cxt, int adj)
479{
480 char *p = cxt->rgn[FT_STRUCT].start;
481 char *next;
482 struct ft_atom atom;
483 int off;
484
485 while ((next = ft_next(cxt, p, &atom)) != NULL) {
486 if (atom.tag == OF_DT_PROP) {
487 off = be32_to_cpu(*(u32 *) (p + 8));
488 *(u32 *) (p + 8) = cpu_to_be32(off + adj);
489 }
490 p = next;
491 }
492}
493
494/* start construction of the flat OF tree from scratch */
495void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
496 void *(*realloc_fn) (void *, unsigned long))
497{
498 struct boot_param_header *bph = blob;
499 char *p;
500 struct ft_reserve *pres;
501
502 /* clear the cxt */
503 memset(cxt, 0, sizeof(*cxt));
504
505 cxt->bph = bph;
506 cxt->max_size = max_size;
507 cxt->realloc = realloc_fn;
508 cxt->isordered = 1;
509
510 /* zero everything in the header area */
511 memset(bph, 0, sizeof(*bph));
512
513 bph->magic = cpu_to_be32(OF_DT_HEADER);
514 bph->version = cpu_to_be32(0x10);
515 bph->last_comp_version = cpu_to_be32(0x10);
516
517 /* start pointers */
518 cxt->rgn[FT_RSVMAP].start = p = blob + HDR_SIZE;
519 cxt->rgn[FT_RSVMAP].size = sizeof(struct ft_reserve);
520 pres = (struct ft_reserve *)p;
521 cxt->rgn[FT_STRUCT].start = p += sizeof(struct ft_reserve);
522 cxt->rgn[FT_STRUCT].size = 4;
523 cxt->rgn[FT_STRINGS].start = blob + max_size;
524 cxt->rgn[FT_STRINGS].size = 0;
525
526 /* init rsvmap and struct */
527 pres->start = 0;
528 pres->len = 0;
529 *(u32 *) p = cpu_to_be32(OF_DT_END);
530
531 cxt->str_anchor = blob;
532}
533
534/* open up an existing blob to be examined or modified */
535int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
536 unsigned int max_find_device,
537 void *(*realloc_fn) (void *, unsigned long))
538{
539 struct boot_param_header *bph = blob;
540
541 /* can't cope with version < 16 */
542 if (be32_to_cpu(bph->version) < 16)
543 return -1;
544
545 /* clear the cxt */
546 memset(cxt, 0, sizeof(*cxt));
547
548 /* alloc node_tbl to track node ptrs returned by ft_find_device */
549 ++max_find_device;
550 cxt->node_tbl = realloc_fn(NULL, max_find_device * sizeof(char *));
551 if (!cxt->node_tbl)
552 return -1;
553 memset(cxt->node_tbl, 0, max_find_device * sizeof(char *));
554 cxt->node_max = max_find_device;
555 cxt->nodes_used = 1; /* don't use idx 0 b/c looks like NULL */
556
557 cxt->bph = bph;
558 cxt->max_size = max_size;
559 cxt->realloc = realloc_fn;
560
561 cxt->rgn[FT_RSVMAP].start = blob + be32_to_cpu(bph->off_mem_rsvmap);
562 cxt->rgn[FT_RSVMAP].size = rsvmap_size(cxt);
563 cxt->rgn[FT_STRUCT].start = blob + be32_to_cpu(bph->off_dt_struct);
564 cxt->rgn[FT_STRUCT].size = struct_size(cxt);
565 cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
566 cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
567
568 cxt->p = cxt->rgn[FT_STRUCT].start;
569 cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
570
571 return 0;
572}
573
574/* add a reserver physical area to the rsvmap */
575int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
576{
577 char *p;
578 struct ft_reserve *pres;
579
580 p = cxt->rgn[FT_RSVMAP].start + cxt->rgn[FT_RSVMAP].size
581 - sizeof(struct ft_reserve);
582 if (!ft_make_space(cxt, &p, FT_RSVMAP, sizeof(struct ft_reserve)))
583 return -1;
584
585 pres = (struct ft_reserve *)p;
586 pres->start = cpu_to_be64(physaddr);
587 pres->len = cpu_to_be64(size);
588
589 return 0;
590}
591
592void ft_begin_tree(struct ft_cxt *cxt)
593{
594 cxt->p = ft_root_node(cxt);
595}
596
597void ft_end_tree(struct ft_cxt *cxt)
598{
599 struct boot_param_header *bph = cxt->bph;
600 char *p, *oldstr, *str, *endp;
601 unsigned long ssize;
602 int adj;
603
604 if (!cxt->isordered)
605 return; /* we haven't touched anything */
606
607 /* adjust string offsets */
608 oldstr = cxt->rgn[FT_STRINGS].start;
609 adj = cxt->str_anchor - oldstr;
610 if (adj)
611 adjust_string_offsets(cxt, adj);
612
613 /* make strings end on 8-byte boundary */
614 ssize = cxt->rgn[FT_STRINGS].size;
615 endp = (char *)_ALIGN((unsigned long)cxt->rgn[FT_STRUCT].start
616 + cxt->rgn[FT_STRUCT].size + ssize, 8);
617 str = endp - ssize;
618
619 /* move strings down to end of structs */
620 memmove(str, oldstr, ssize);
621 cxt->str_anchor = str;
622 cxt->rgn[FT_STRINGS].start = str;
623
624 /* fill in header fields */
625 p = (char *)bph;
626 bph->totalsize = cpu_to_be32(endp - p);
627 bph->off_mem_rsvmap = cpu_to_be32(cxt->rgn[FT_RSVMAP].start - p);
628 bph->off_dt_struct = cpu_to_be32(cxt->rgn[FT_STRUCT].start - p);
629 bph->off_dt_strings = cpu_to_be32(cxt->rgn[FT_STRINGS].start - p);
630 bph->dt_strings_size = cpu_to_be32(ssize);
631}
632
633void *ft_find_device(struct ft_cxt *cxt, const void *top, const char *srch_path)
634{
635 char *node;
636
637 if (top) {
638 node = ft_node_ph2node(cxt, top);
639 if (node == NULL)
640 return NULL;
641 } else {
642 node = ft_root_node(cxt);
643 }
644
645 node = ft_find_descendent(cxt, node, srch_path);
646 return ft_get_phandle(cxt, node);
647}
648
649void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
650{
651 struct ft_atom atom;
652 char *p;
653 const char *cp, *q;
654 int cl;
655 int depth = -1;
656 int dmatch = 0;
657 const char *path_comp[FT_MAX_DEPTH];
658
659 cp = srch_path;
660 cl = 0;
661 p = top;
662
663 while ((p = ft_next(cxt, p, &atom)) != NULL) {
664 switch (atom.tag) {
665 case OF_DT_BEGIN_NODE:
666 ++depth;
667 if (depth != dmatch)
668 break;
669 cxt->genealogy[depth] = atom.data;
670 cxt->genealogy[depth + 1] = NULL;
671 if (depth && !(strncmp(atom.name, cp, cl) == 0
672 && (atom.name[cl] == '/'
673 || atom.name[cl] == '\0'
674 || atom.name[cl] == '@')))
675 break;
676 path_comp[dmatch] = cp;
677 /* it matches so far, advance to next path component */
678 cp += cl;
679 /* skip slashes */
680 while (*cp == '/')
681 ++cp;
682 /* we're done if this is the end of the string */
683 if (*cp == 0)
684 return atom.data;
685 /* look for end of this component */
686 q = strchr(cp, '/');
687 if (q)
688 cl = q - cp;
689 else
690 cl = strlen(cp);
691 ++dmatch;
692 break;
693 case OF_DT_END_NODE:
694 if (depth == 0)
695 return NULL;
696 if (dmatch > depth) {
697 --dmatch;
698 cl = cp - path_comp[dmatch] - 1;
699 cp = path_comp[dmatch];
700 while (cl > 0 && cp[cl - 1] == '/')
701 --cl;
702 }
703 --depth;
704 break;
705 }
706 }
707 return NULL;
708}
709
710void *__ft_get_parent(struct ft_cxt *cxt, void *node)
711{
712 int d;
713 struct ft_atom atom;
714 char *p;
715
716 for (d = 0; cxt->genealogy[d] != NULL; ++d)
717 if (cxt->genealogy[d] == node)
718 return d > 0 ? cxt->genealogy[d - 1] : NULL;
719
720 /* have to do it the hard way... */
721 p = ft_root_node(cxt);
722 d = 0;
723 while ((p = ft_next(cxt, p, &atom)) != NULL) {
724 switch (atom.tag) {
725 case OF_DT_BEGIN_NODE:
726 cxt->genealogy[d] = atom.data;
727 if (node == atom.data) {
728 /* found it */
729 cxt->genealogy[d + 1] = NULL;
730 return d > 0 ? cxt->genealogy[d - 1] : NULL;
731 }
732 ++d;
733 break;
734 case OF_DT_END_NODE:
735 --d;
736 break;
737 }
738 }
739 return NULL;
740}
741
742void *ft_get_parent(struct ft_cxt *cxt, const void *phandle)
743{
744 void *node = ft_node_ph2node(cxt, phandle);
745 if (node == NULL)
746 return NULL;
747
748 node = __ft_get_parent(cxt, node);
749 return ft_get_phandle(cxt, node);
750}
751
752static const void *__ft_get_prop(struct ft_cxt *cxt, void *node,
753 const char *propname, unsigned int *len)
754{
755 struct ft_atom atom;
756 int depth = 0;
757
758 while ((node = ft_next(cxt, node, &atom)) != NULL) {
759 switch (atom.tag) {
760 case OF_DT_BEGIN_NODE:
761 ++depth;
762 break;
763
764 case OF_DT_PROP:
765 if (depth != 1 || strcmp(atom.name, propname))
766 break;
767
768 if (len)
769 *len = atom.size;
770
771 return atom.data;
772
773 case OF_DT_END_NODE:
774 if (--depth <= 0)
775 return NULL;
776 }
777 }
778
779 return NULL;
780}
781
782int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
783 void *buf, const unsigned int buflen)
784{
785 const void *data;
786 unsigned int size;
787
788 void *node = ft_node_ph2node(cxt, phandle);
789 if (!node)
790 return -1;
791
792 data = __ft_get_prop(cxt, node, propname, &size);
793 if (data) {
794 unsigned int clipped_size = min(size, buflen);
795 memcpy(buf, data, clipped_size);
796 return size;
797 }
798
799 return -1;
800}
801
802void *__ft_find_node_by_prop_value(struct ft_cxt *cxt, void *prev,
803 const char *propname, const char *propval,
804 unsigned int proplen)
805{
806 struct ft_atom atom;
807 char *p = ft_root_node(cxt);
808 char *next;
809 int past_prev = prev ? 0 : 1;
810 int depth = -1;
811
812 while ((next = ft_next(cxt, p, &atom)) != NULL) {
813 const void *data;
814 unsigned int size;
815
816 switch (atom.tag) {
817 case OF_DT_BEGIN_NODE:
818 depth++;
819
820 if (prev == p) {
821 past_prev = 1;
822 break;
823 }
824
825 if (!past_prev || depth < 1)
826 break;
827
828 data = __ft_get_prop(cxt, p, propname, &size);
829 if (!data || size != proplen)
830 break;
831 if (memcmp(data, propval, size))
832 break;
833
834 return p;
835
836 case OF_DT_END_NODE:
837 if (depth-- == 0)
838 return NULL;
839
840 break;
841 }
842
843 p = next;
844 }
845
846 return NULL;
847}
848
849void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
850 const char *propname, const char *propval,
851 int proplen)
852{
853 void *node = NULL;
854
855 if (prev) {
856 node = ft_node_ph2node(cxt, prev);
857
858 if (!node)
859 return NULL;
860 }
861
862 node = __ft_find_node_by_prop_value(cxt, node, propname,
863 propval, proplen);
864 return ft_get_phandle(cxt, node);
865}
866
867int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
868 const void *buf, const unsigned int buflen)
869{
870 struct ft_atom atom;
871 void *node;
872 char *p, *next;
873 int nextra;
874
875 node = ft_node_ph2node(cxt, phandle);
876 if (node == NULL)
877 return -1;
878
879 next = ft_next(cxt, node, &atom);
880 if (atom.tag != OF_DT_BEGIN_NODE)
881 /* phandle didn't point to a node */
882 return -1;
883 p = next;
884
885 while ((next = ft_next(cxt, p, &atom)) != NULL) {
886 switch (atom.tag) {
887 case OF_DT_BEGIN_NODE: /* properties must go before subnodes */
888 case OF_DT_END_NODE:
889 /* haven't found the property, insert here */
890 cxt->p = p;
891 return ft_prop(cxt, propname, buf, buflen);
892 case OF_DT_PROP:
893 if (strcmp(atom.name, propname))
894 break;
895 /* found an existing property, overwrite it */
896 nextra = _ALIGN(buflen, 4) - _ALIGN(atom.size, 4);
897 cxt->p = atom.data;
898 if (nextra && !ft_make_space(cxt, &cxt->p, FT_STRUCT,
899 nextra))
900 return -1;
901 *(u32 *) (cxt->p - 8) = cpu_to_be32(buflen);
902 ft_put_bin(cxt, buf, buflen);
903 return 0;
904 }
905 p = next;
906 }
907 return -1;
908}
909
910int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname)
911{
912 struct ft_atom atom;
913 void *node;
914 char *p, *next;
915 int size;
916
917 node = ft_node_ph2node(cxt, phandle);
918 if (node == NULL)
919 return -1;
920
921 p = node;
922 while ((next = ft_next(cxt, p, &atom)) != NULL) {
923 switch (atom.tag) {
924 case OF_DT_BEGIN_NODE:
925 case OF_DT_END_NODE:
926 return -1;
927 case OF_DT_PROP:
928 if (strcmp(atom.name, propname))
929 break;
930 /* found the property, remove it */
931 size = 12 + -_ALIGN(atom.size, 4);
932 cxt->p = p;
933 if (!ft_make_space(cxt, &cxt->p, FT_STRUCT, -size))
934 return -1;
935 return 0;
936 }
937 p = next;
938 }
939 return -1;
940}
941
942void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name)
943{
944 struct ft_atom atom;
945 char *p, *next, *ret;
946 int depth = 0;
947
948 if (parent) {
949 p = ft_node_ph2node(cxt, parent);
950 if (!p)
951 return NULL;
952 } else {
953 p = ft_root_node(cxt);
954 }
955
956 while ((next = ft_next(cxt, p, &atom)) != NULL) {
957 switch (atom.tag) {
958 case OF_DT_BEGIN_NODE:
959 ++depth;
960 if (depth == 1 && strcmp(atom.name, name) == 0)
961 /* duplicate node name, return error */
962 return NULL;
963 break;
964 case OF_DT_END_NODE:
965 --depth;
966 if (depth > 0)
967 break;
968 /* end of node, insert here */
969 cxt->p = p;
970 ret = ft_begin_node(cxt, name);
971 ft_end_node(cxt);
972 return ft_get_phandle(cxt, ret);
973 }
974 p = next;
975 }
976 return NULL;
977}
978
979/* Returns the start of the path within the provided buffer, or NULL on
980 * error.
981 */
982char *ft_get_path(struct ft_cxt *cxt, const void *phandle,
983 char *buf, int len)
984{
985 const char *path_comp[FT_MAX_DEPTH];
986 struct ft_atom atom;
987 char *p, *next, *pos;
988 int depth = 0, i;
989 void *node;
990
991 node = ft_node_ph2node(cxt, phandle);
992 if (node == NULL)
993 return NULL;
994
995 p = ft_root_node(cxt);
996
997 while ((next = ft_next(cxt, p, &atom)) != NULL) {
998 switch (atom.tag) {
999 case OF_DT_BEGIN_NODE:
1000 path_comp[depth++] = atom.name;
1001 if (p == node)
1002 goto found;
1003
1004 break;
1005
1006 case OF_DT_END_NODE:
1007 if (--depth == 0)
1008 return NULL;
1009 }
1010
1011 p = next;
1012 }
1013
1014found:
1015 pos = buf;
1016 for (i = 1; i < depth; i++) {
1017 int this_len;
1018
1019 if (len <= 1)
1020 return NULL;
1021
1022 *pos++ = '/';
1023 len--;
1024
1025 strncpy(pos, path_comp[i], len);
1026
1027 if (pos[len - 1] != 0)
1028 return NULL;
1029
1030 this_len = strlen(pos);
1031 len -= this_len;
1032 pos += this_len;
1033 }
1034
1035 return buf;
1036}
diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h
deleted file mode 100644
index b0957a2d967f..000000000000
--- a/arch/powerpc/boot/flatdevtree.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 */
16
17#ifndef FLATDEVTREE_H
18#define FLATDEVTREE_H
19
20#include "flatdevtree_env.h"
21
22/* Definitions used by the flattened device tree */
23#define OF_DT_HEADER 0xd00dfeed /* marker */
24#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
25#define OF_DT_END_NODE 0x2 /* End node */
26#define OF_DT_PROP 0x3 /* Property: name off, size, content */
27#define OF_DT_NOP 0x4 /* nop */
28#define OF_DT_END 0x9
29
30#define OF_DT_VERSION 0x10
31
32struct boot_param_header {
33 u32 magic; /* magic word OF_DT_HEADER */
34 u32 totalsize; /* total size of DT block */
35 u32 off_dt_struct; /* offset to structure */
36 u32 off_dt_strings; /* offset to strings */
37 u32 off_mem_rsvmap; /* offset to memory reserve map */
38 u32 version; /* format version */
39 u32 last_comp_version; /* last compatible version */
40 /* version 2 fields below */
41 u32 boot_cpuid_phys; /* Physical CPU id we're booting on */
42 /* version 3 fields below */
43 u32 dt_strings_size; /* size of the DT strings block */
44};
45
46struct ft_reserve {
47 u64 start;
48 u64 len;
49};
50
51struct ft_region {
52 char *start;
53 unsigned long size;
54};
55
56enum ft_rgn_id {
57 FT_RSVMAP,
58 FT_STRUCT,
59 FT_STRINGS,
60 FT_N_REGION
61};
62
63#define FT_MAX_DEPTH 50
64
65struct ft_cxt {
66 struct boot_param_header *bph;
67 int max_size; /* maximum size of tree */
68 int isordered; /* everything in standard order */
69 void *(*realloc)(void *, unsigned long);
70 char *str_anchor;
71 char *p; /* current insertion point in structs */
72 struct ft_region rgn[FT_N_REGION];
73 void *genealogy[FT_MAX_DEPTH+1];
74 char **node_tbl;
75 unsigned int node_max;
76 unsigned int nodes_used;
77};
78
79char *ft_begin_node(struct ft_cxt *cxt, const char *name);
80void ft_end_node(struct ft_cxt *cxt);
81
82void ft_begin_tree(struct ft_cxt *cxt);
83void ft_end_tree(struct ft_cxt *cxt);
84
85void ft_nop(struct ft_cxt *cxt);
86int ft_prop(struct ft_cxt *cxt, const char *name,
87 const void *data, unsigned int sz);
88int ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str);
89int ft_prop_int(struct ft_cxt *cxt, const char *name, unsigned int val);
90void ft_begin(struct ft_cxt *cxt, void *blob, unsigned int max_size,
91 void *(*realloc_fn)(void *, unsigned long));
92int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
93 unsigned int max_find_device,
94 void *(*realloc_fn)(void *, unsigned long));
95int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
96
97void ft_dump_blob(const void *bphp);
98void ft_merge_blob(struct ft_cxt *cxt, void *blob);
99void *ft_find_device(struct ft_cxt *cxt, const void *top,
100 const char *srch_path);
101void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
102int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
103 void *buf, const unsigned int buflen);
104int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
105 const void *buf, const unsigned int buflen);
106void *ft_get_parent(struct ft_cxt *cxt, const void *phandle);
107void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev,
108 const char *propname, const char *propval,
109 int proplen);
110void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name);
111char *ft_get_path(struct ft_cxt *cxt, const void *phandle, char *buf, int len);
112
113#endif /* FLATDEVTREE_H */
diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c
deleted file mode 100644
index b3670096fa71..000000000000
--- a/arch/powerpc/boot/flatdevtree_misc.c
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * This file does the necessary interface mapping between the bootwrapper
3 * device tree operations and the interface provided by shared source
4 * files flatdevicetree.[ch].
5 *
6 * Author: Mark A. Greer <mgreer@mvista.com>
7 *
8 * 2006 (c) MontaVista Software, Inc. This file is licensed under
9 * the terms of the GNU General Public License version 2. This program
10 * is licensed "as is" without any warranty of any kind, whether express
11 * or implied.
12 */
13#include <stddef.h>
14#include "flatdevtree.h"
15#include "ops.h"
16
17static struct ft_cxt cxt;
18
19static void *fdtm_finddevice(const char *name)
20{
21 return ft_find_device(&cxt, NULL, name);
22}
23
24static int fdtm_getprop(const void *phandle, const char *propname,
25 void *buf, const int buflen)
26{
27 return ft_get_prop(&cxt, phandle, propname, buf, buflen);
28}
29
30static int fdtm_setprop(const void *phandle, const char *propname,
31 const void *buf, const int buflen)
32{
33 return ft_set_prop(&cxt, phandle, propname, buf, buflen);
34}
35
36static void *fdtm_get_parent(const void *phandle)
37{
38 return ft_get_parent(&cxt, phandle);
39}
40
41static void *fdtm_create_node(const void *phandle, const char *name)
42{
43 return ft_create_node(&cxt, phandle, name);
44}
45
46static void *fdtm_find_node_by_prop_value(const void *prev,
47 const char *propname,
48 const char *propval,
49 int proplen)
50{
51 return ft_find_node_by_prop_value(&cxt, prev, propname,
52 propval, proplen);
53}
54
55static unsigned long fdtm_finalize(void)
56{
57 ft_end_tree(&cxt);
58 return (unsigned long)cxt.bph;
59}
60
61static char *fdtm_get_path(const void *phandle, char *buf, int len)
62{
63 return ft_get_path(&cxt, phandle, buf, len);
64}
65
66int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device)
67{
68 dt_ops.finddevice = fdtm_finddevice;
69 dt_ops.getprop = fdtm_getprop;
70 dt_ops.setprop = fdtm_setprop;
71 dt_ops.get_parent = fdtm_get_parent;
72 dt_ops.create_node = fdtm_create_node;
73 dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value;
74 dt_ops.finalize = fdtm_finalize;
75 dt_ops.get_path = fdtm_get_path;
76
77 return ft_open(&cxt, dt_blob, max_size, max_find_device,
78 platform_ops.realloc);
79}
diff --git a/arch/powerpc/boot/holly.c b/arch/powerpc/boot/holly.c
index 199e783aea4d..58013b923178 100644
--- a/arch/powerpc/boot/holly.c
+++ b/arch/powerpc/boot/holly.c
@@ -28,6 +28,6 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5)
28 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */ 28 u32 heapsize = 0x8000000 - (u32)_end; /* 128M */
29 29
30 simple_alloc_init(_end, heapsize, 32, 64); 30 simple_alloc_init(_end, heapsize, 32, 64);
31 ft_init(_dtb_start, 0, 4); 31 fdt_init(_dtb_start);
32 serial_console_init(); 32 serial_console_init();
33} 33}
diff --git a/arch/powerpc/boot/libfdt-wrapper.c b/arch/powerpc/boot/libfdt-wrapper.c
new file mode 100644
index 000000000000..59016bef1391
--- /dev/null
+++ b/arch/powerpc/boot/libfdt-wrapper.c
@@ -0,0 +1,193 @@
1/*
2 * This file does the necessary interface mapping between the bootwrapper
3 * device tree operations and the interface provided by shared source
4 * files flatdevicetree.[ch].
5 *
6 * Copyright 2007 David Gibson, IBM Corporation.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 */
23
24#include <stddef.h>
25#include <stdio.h>
26#include <page.h>
27#include <libfdt.h>
28#include "ops.h"
29
30#define DEBUG 0
31#define BAD_ERROR(err) (((err) < 0) \
32 && ((err) != -FDT_ERR_NOTFOUND) \
33 && ((err) != -FDT_ERR_EXISTS))
34
35#define check_err(err) \
36 ({ \
37 if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \
38 printf("%s():%d %s\n\r", __FUNCTION__, __LINE__, \
39 fdt_strerror(err)); \
40 if (BAD_ERROR(err)) \
41 exit(); \
42 (err < 0) ? -1 : 0; \
43 })
44
45#define offset_devp(off) \
46 ({ \
47 int _offset = (off); \
48 check_err(_offset) ? NULL : (void *)(_offset+1); \
49 })
50
51#define devp_offset_find(devp) (((int)(devp))-1)
52#define devp_offset(devp) (devp ? ((int)(devp))-1 : 0)
53
54static void *fdt;
55static void *buf; /* = NULL */
56
57#define EXPAND_GRANULARITY 1024
58
59static void expand_buf(int minexpand)
60{
61 int size = fdt_totalsize(fdt);
62 int rc;
63
64 size = _ALIGN(size + minexpand, EXPAND_GRANULARITY);
65 buf = platform_ops.realloc(buf, size);
66 if (!buf)
67 fatal("Couldn't find %d bytes to expand device tree\n\r", size);
68 rc = fdt_open_into(fdt, buf, size);
69 if (rc != 0)
70 fatal("Couldn't expand fdt into new buffer: %s\n\r",
71 fdt_strerror(rc));
72
73 fdt = buf;
74}
75
76static void *fdt_wrapper_finddevice(const char *path)
77{
78 return offset_devp(fdt_path_offset(fdt, path));
79}
80
81static int fdt_wrapper_getprop(const void *devp, const char *name,
82 void *buf, const int buflen)
83{
84 const void *p;
85 int len;
86
87 p = fdt_getprop(fdt, devp_offset(devp), name, &len);
88 if (!p)
89 return check_err(len);
90 memcpy(buf, p, min(len, buflen));
91 return len;
92}
93
94static int fdt_wrapper_setprop(const void *devp, const char *name,
95 const void *buf, const int len)
96{
97 int rc;
98
99 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
100 if (rc == -FDT_ERR_NOSPACE) {
101 expand_buf(len + 16);
102 rc = fdt_setprop(fdt, devp_offset(devp), name, buf, len);
103 }
104
105 return check_err(rc);
106}
107
108static void *fdt_wrapper_get_parent(const void *devp)
109{
110 return offset_devp(fdt_parent_offset(fdt, devp_offset(devp)));
111}
112
113static void *fdt_wrapper_create_node(const void *devp, const char *name)
114{
115 int offset;
116
117 offset = fdt_add_subnode(fdt, devp_offset(devp), name);
118 if (offset == -FDT_ERR_NOSPACE) {
119 expand_buf(strlen(name) + 16);
120 offset = fdt_add_subnode(fdt, devp_offset(devp), name);
121 }
122
123 return offset_devp(offset);
124}
125
126static void *fdt_wrapper_find_node_by_prop_value(const void *prev,
127 const char *name,
128 const char *val,
129 int len)
130{
131 int offset = fdt_node_offset_by_prop_value(fdt, devp_offset_find(prev),
132 name, val, len);
133 return offset_devp(offset);
134}
135
136static void *fdt_wrapper_find_node_by_compatible(const void *prev,
137 const char *val)
138{
139 int offset = fdt_node_offset_by_compatible(fdt, devp_offset_find(prev),
140 val);
141 return offset_devp(offset);
142}
143
144static char *fdt_wrapper_get_path(const void *devp, char *buf, int len)
145{
146 int rc;
147
148 rc = fdt_get_path(fdt, devp_offset(devp), buf, len);
149 if (check_err(rc))
150 return NULL;
151 return buf;
152}
153
154static unsigned long fdt_wrapper_finalize(void)
155{
156 int rc;
157
158 rc = fdt_pack(fdt);
159 if (rc != 0)
160 fatal("Couldn't pack flat tree: %s\n\r",
161 fdt_strerror(rc));
162 return (unsigned long)fdt;
163}
164
165void fdt_init(void *blob)
166{
167 int err;
168
169 dt_ops.finddevice = fdt_wrapper_finddevice;
170 dt_ops.getprop = fdt_wrapper_getprop;
171 dt_ops.setprop = fdt_wrapper_setprop;
172 dt_ops.get_parent = fdt_wrapper_get_parent;
173 dt_ops.create_node = fdt_wrapper_create_node;
174 dt_ops.find_node_by_prop_value = fdt_wrapper_find_node_by_prop_value;
175 dt_ops.find_node_by_compatible = fdt_wrapper_find_node_by_compatible;
176 dt_ops.get_path = fdt_wrapper_get_path;
177 dt_ops.finalize = fdt_wrapper_finalize;
178
179 /* Make sure the dt blob is the right version and so forth */
180 fdt = blob;
181 err = fdt_open_into(fdt, fdt, fdt_totalsize(blob));
182 if (err == -FDT_ERR_NOSPACE) {
183 int bufsize = fdt_totalsize(fdt) + 4;
184 buf = malloc(bufsize);
185 err = fdt_open_into(fdt, buf, bufsize);
186 }
187
188 if (err != 0)
189 fatal("fdt_init(): %s\n\r", fdt_strerror(err));
190
191 if (buf)
192 fdt = buf;
193}
diff --git a/arch/powerpc/boot/libfdt/Makefile.libfdt b/arch/powerpc/boot/libfdt/Makefile.libfdt
new file mode 100644
index 000000000000..82f9c6a8287b
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/Makefile.libfdt
@@ -0,0 +1,14 @@
1# Makefile.libfdt
2#
3# This is not a complete Makefile of itself. Instead, it is designed to
4# be easily embeddable into other systems of Makefiles.
5#
6LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
7LIBFDT_INCLUDES = fdt.h libfdt.h
8LIBFDT_EXTRA = libfdt_internal.h
9LIBFDT_LIB = libfdt/libfdt.a
10
11LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)
12
13$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
14
diff --git a/arch/powerpc/boot/libfdt/fdt.c b/arch/powerpc/boot/libfdt/fdt.c
new file mode 100644
index 000000000000..586a36136db2
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt.c
@@ -0,0 +1,156 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58int fdt_check_header(const void *fdt)
59{
60 if (fdt_magic(fdt) == FDT_MAGIC) {
61 /* Complete tree */
62 if (fdt_version(fdt) < FDT_FIRST_SUPPORTED_VERSION)
63 return -FDT_ERR_BADVERSION;
64 if (fdt_last_comp_version(fdt) > FDT_LAST_SUPPORTED_VERSION)
65 return -FDT_ERR_BADVERSION;
66 } else if (fdt_magic(fdt) == SW_MAGIC) {
67 /* Unfinished sequential-write blob */
68 if (fdt_size_dt_struct(fdt) == 0)
69 return -FDT_ERR_BADSTATE;
70 } else {
71 return -FDT_ERR_BADMAGIC;
72 }
73
74 return 0;
75}
76
77const void *fdt_offset_ptr(const void *fdt, int offset, int len)
78{
79 const void *p;
80
81 if (fdt_version(fdt) >= 0x11)
82 if (((offset + len) < offset)
83 || ((offset + len) > fdt_size_dt_struct(fdt)))
84 return NULL;
85
86 p = _fdt_offset_ptr(fdt, offset);
87
88 if (p + len < p)
89 return NULL;
90 return p;
91}
92
93uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset)
94{
95 const uint32_t *tagp, *lenp;
96 uint32_t tag;
97 const char *p;
98
99 if (offset % FDT_TAGSIZE)
100 return -1;
101
102 tagp = fdt_offset_ptr(fdt, offset, FDT_TAGSIZE);
103 if (! tagp)
104 return FDT_END; /* premature end */
105 tag = fdt32_to_cpu(*tagp);
106 offset += FDT_TAGSIZE;
107
108 switch (tag) {
109 case FDT_BEGIN_NODE:
110 /* skip name */
111 do {
112 p = fdt_offset_ptr(fdt, offset++, 1);
113 } while (p && (*p != '\0'));
114 if (! p)
115 return FDT_END;
116 break;
117 case FDT_PROP:
118 lenp = fdt_offset_ptr(fdt, offset, sizeof(*lenp));
119 if (! lenp)
120 return FDT_END;
121 /* skip name offset, length and value */
122 offset += 2*FDT_TAGSIZE + fdt32_to_cpu(*lenp);
123 break;
124 }
125
126 if (nextoffset)
127 *nextoffset = ALIGN(offset, FDT_TAGSIZE);
128
129 return tag;
130}
131
132const char *_fdt_find_string(const char *strtab, int tabsize, const char *s)
133{
134 int len = strlen(s) + 1;
135 const char *last = strtab + tabsize - len;
136 const char *p;
137
138 for (p = strtab; p <= last; p++)
139 if (memeq(p, s, len))
140 return p;
141 return NULL;
142}
143
144int fdt_move(const void *fdt, void *buf, int bufsize)
145{
146 int err = fdt_check_header(fdt);
147
148 if (err)
149 return err;
150
151 if (fdt_totalsize(fdt) > bufsize)
152 return -FDT_ERR_NOSPACE;
153
154 memmove(buf, fdt, fdt_totalsize(fdt));
155 return 0;
156}
diff --git a/arch/powerpc/boot/libfdt/fdt.h b/arch/powerpc/boot/libfdt/fdt.h
new file mode 100644
index 000000000000..48ccfd910000
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt.h
@@ -0,0 +1,60 @@
1#ifndef _FDT_H
2#define _FDT_H
3
4#ifndef __ASSEMBLY__
5
6struct fdt_header {
7 uint32_t magic; /* magic word FDT_MAGIC */
8 uint32_t totalsize; /* total size of DT block */
9 uint32_t off_dt_struct; /* offset to structure */
10 uint32_t off_dt_strings; /* offset to strings */
11 uint32_t off_mem_rsvmap; /* offset to memory reserve map */
12 uint32_t version; /* format version */
13 uint32_t last_comp_version; /* last compatible version */
14
15 /* version 2 fields below */
16 uint32_t boot_cpuid_phys; /* Which physical CPU id we're
17 booting on */
18 /* version 3 fields below */
19 uint32_t size_dt_strings; /* size of the strings block */
20
21 /* version 17 fields below */
22 uint32_t size_dt_struct; /* size of the structure block */
23};
24
25struct fdt_reserve_entry {
26 uint64_t address;
27 uint64_t size;
28};
29
30struct fdt_node_header {
31 uint32_t tag;
32 char name[0];
33};
34
35struct fdt_property {
36 uint32_t tag;
37 uint32_t len;
38 uint32_t nameoff;
39 char data[0];
40};
41
42#endif /* !__ASSEMBLY */
43
44#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
45#define FDT_TAGSIZE sizeof(uint32_t)
46
47#define FDT_BEGIN_NODE 0x1 /* Start node: full name */
48#define FDT_END_NODE 0x2 /* End node */
49#define FDT_PROP 0x3 /* Property: name off,
50 size, content */
51#define FDT_NOP 0x4 /* nop */
52#define FDT_END 0x9
53
54#define FDT_V1_SIZE (7*sizeof(uint32_t))
55#define FDT_V2_SIZE (FDT_V1_SIZE + sizeof(uint32_t))
56#define FDT_V3_SIZE (FDT_V2_SIZE + sizeof(uint32_t))
57#define FDT_V16_SIZE FDT_V3_SIZE
58#define FDT_V17_SIZE (FDT_V16_SIZE + sizeof(uint32_t))
59
60#endif /* _FDT_H */
diff --git a/arch/powerpc/boot/libfdt/fdt_ro.c b/arch/powerpc/boot/libfdt/fdt_ro.c
new file mode 100644
index 000000000000..12a37d59f96e
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt_ro.c
@@ -0,0 +1,583 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58#define CHECK_HEADER(fdt) \
59 { \
60 int err; \
61 if ((err = fdt_check_header(fdt)) != 0) \
62 return err; \
63 }
64
65static int nodename_eq(const void *fdt, int offset,
66 const char *s, int len)
67{
68 const char *p = fdt_offset_ptr(fdt, offset, len+1);
69
70 if (! p)
71 /* short match */
72 return 0;
73
74 if (memcmp(p, s, len) != 0)
75 return 0;
76
77 if (p[len] == '\0')
78 return 1;
79 else if (!memchr(s, '@', len) && (p[len] == '@'))
80 return 1;
81 else
82 return 0;
83}
84
85const char *fdt_string(const void *fdt, int stroffset)
86{
87 return (char *)fdt + fdt_off_dt_strings(fdt) + stroffset;
88}
89
90int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size)
91{
92 CHECK_HEADER(fdt);
93 *address = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->address);
94 *size = fdt64_to_cpu(_fdt_mem_rsv(fdt, n)->size);
95 return 0;
96}
97
98int fdt_num_mem_rsv(const void *fdt)
99{
100 int i = 0;
101
102 while (fdt64_to_cpu(_fdt_mem_rsv(fdt, i)->size) != 0)
103 i++;
104 return i;
105}
106
107int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
108 const char *name, int namelen)
109{
110 int level = 0;
111 uint32_t tag;
112 int offset, nextoffset;
113
114 CHECK_HEADER(fdt);
115
116 tag = fdt_next_tag(fdt, parentoffset, &nextoffset);
117 if (tag != FDT_BEGIN_NODE)
118 return -FDT_ERR_BADOFFSET;
119
120 do {
121 offset = nextoffset;
122 tag = fdt_next_tag(fdt, offset, &nextoffset);
123
124 switch (tag) {
125 case FDT_END:
126 return -FDT_ERR_TRUNCATED;
127
128 case FDT_BEGIN_NODE:
129 level++;
130 if (level != 1)
131 continue;
132 if (nodename_eq(fdt, offset+FDT_TAGSIZE, name, namelen))
133 /* Found it! */
134 return offset;
135 break;
136
137 case FDT_END_NODE:
138 level--;
139 break;
140
141 case FDT_PROP:
142 case FDT_NOP:
143 break;
144
145 default:
146 return -FDT_ERR_BADSTRUCTURE;
147 }
148 } while (level >= 0);
149
150 return -FDT_ERR_NOTFOUND;
151}
152
153int fdt_subnode_offset(const void *fdt, int parentoffset,
154 const char *name)
155{
156 return fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
157}
158
159int fdt_path_offset(const void *fdt, const char *path)
160{
161 const char *end = path + strlen(path);
162 const char *p = path;
163 int offset = 0;
164
165 CHECK_HEADER(fdt);
166
167 if (*path != '/')
168 return -FDT_ERR_BADPATH;
169
170 while (*p) {
171 const char *q;
172
173 while (*p == '/')
174 p++;
175 if (! *p)
176 return offset;
177 q = strchr(p, '/');
178 if (! q)
179 q = end;
180
181 offset = fdt_subnode_offset_namelen(fdt, offset, p, q-p);
182 if (offset < 0)
183 return offset;
184
185 p = q;
186 }
187
188 return offset;
189}
190
191const char *fdt_get_name(const void *fdt, int nodeoffset, int *len)
192{
193 const struct fdt_node_header *nh;
194 int err;
195
196 if ((err = fdt_check_header(fdt)) != 0)
197 goto fail;
198
199 err = -FDT_ERR_BADOFFSET;
200 nh = fdt_offset_ptr(fdt, nodeoffset, sizeof(*nh));
201 if (!nh || (fdt32_to_cpu(nh->tag) != FDT_BEGIN_NODE))
202 goto fail;
203
204 if (len)
205 *len = strlen(nh->name);
206
207 return nh->name;
208
209 fail:
210 if (len)
211 *len = err;
212 return NULL;
213}
214
215const struct fdt_property *fdt_get_property(const void *fdt,
216 int nodeoffset,
217 const char *name, int *lenp)
218{
219 uint32_t tag;
220 const struct fdt_property *prop;
221 int namestroff;
222 int offset, nextoffset;
223 int err;
224
225 if ((err = fdt_check_header(fdt)) != 0)
226 goto fail;
227
228 err = -FDT_ERR_BADOFFSET;
229 if (nodeoffset % FDT_TAGSIZE)
230 goto fail;
231
232 tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
233 if (tag != FDT_BEGIN_NODE)
234 goto fail;
235
236 do {
237 offset = nextoffset;
238
239 tag = fdt_next_tag(fdt, offset, &nextoffset);
240 switch (tag) {
241 case FDT_END:
242 err = -FDT_ERR_TRUNCATED;
243 goto fail;
244
245 case FDT_BEGIN_NODE:
246 case FDT_END_NODE:
247 case FDT_NOP:
248 break;
249
250 case FDT_PROP:
251 err = -FDT_ERR_BADSTRUCTURE;
252 prop = fdt_offset_ptr(fdt, offset, sizeof(*prop));
253 if (! prop)
254 goto fail;
255 namestroff = fdt32_to_cpu(prop->nameoff);
256 if (streq(fdt_string(fdt, namestroff), name)) {
257 /* Found it! */
258 int len = fdt32_to_cpu(prop->len);
259 prop = fdt_offset_ptr(fdt, offset,
260 sizeof(*prop)+len);
261 if (! prop)
262 goto fail;
263
264 if (lenp)
265 *lenp = len;
266
267 return prop;
268 }
269 break;
270
271 default:
272 err = -FDT_ERR_BADSTRUCTURE;
273 goto fail;
274 }
275 } while ((tag != FDT_BEGIN_NODE) && (tag != FDT_END_NODE));
276
277 err = -FDT_ERR_NOTFOUND;
278 fail:
279 if (lenp)
280 *lenp = err;
281 return NULL;
282}
283
284const void *fdt_getprop(const void *fdt, int nodeoffset,
285 const char *name, int *lenp)
286{
287 const struct fdt_property *prop;
288
289 prop = fdt_get_property(fdt, nodeoffset, name, lenp);
290 if (! prop)
291 return NULL;
292
293 return prop->data;
294}
295
296uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
297{
298 const uint32_t *php;
299 int len;
300
301 php = fdt_getprop(fdt, nodeoffset, "linux,phandle", &len);
302 if (!php || (len != sizeof(*php)))
303 return 0;
304
305 return fdt32_to_cpu(*php);
306}
307
308int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
309{
310 uint32_t tag;
311 int p = 0, overflow = 0;
312 int offset, nextoffset, namelen;
313 const char *name;
314
315 CHECK_HEADER(fdt);
316
317 tag = fdt_next_tag(fdt, 0, &nextoffset);
318 if (tag != FDT_BEGIN_NODE)
319 return -FDT_ERR_BADSTRUCTURE;
320
321 if (buflen < 2)
322 return -FDT_ERR_NOSPACE;
323 buf[0] = '/';
324 p = 1;
325
326 while (nextoffset <= nodeoffset) {
327 offset = nextoffset;
328 tag = fdt_next_tag(fdt, offset, &nextoffset);
329 switch (tag) {
330 case FDT_END:
331 return -FDT_ERR_BADOFFSET;
332
333 case FDT_BEGIN_NODE:
334 name = fdt_get_name(fdt, offset, &namelen);
335 if (!name)
336 return namelen;
337 if (overflow || ((p + namelen + 1) > buflen)) {
338 overflow++;
339 break;
340 }
341 memcpy(buf + p, name, namelen);
342 p += namelen;
343 buf[p++] = '/';
344 break;
345
346 case FDT_END_NODE:
347 if (overflow) {
348 overflow--;
349 break;
350 }
351 do {
352 p--;
353 } while (buf[p-1] != '/');
354 break;
355
356 case FDT_PROP:
357 case FDT_NOP:
358 break;
359
360 default:
361 return -FDT_ERR_BADSTRUCTURE;
362 }
363 }
364
365 if (overflow)
366 return -FDT_ERR_NOSPACE;
367
368 if (p > 1) /* special case so that root path is "/", not "" */
369 p--;
370 buf[p] = '\0';
371 return p;
372}
373
374int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
375 int supernodedepth, int *nodedepth)
376{
377 int level = -1;
378 uint32_t tag;
379 int offset, nextoffset = 0;
380 int supernodeoffset = -FDT_ERR_INTERNAL;
381
382 CHECK_HEADER(fdt);
383
384 if (supernodedepth < 0)
385 return -FDT_ERR_NOTFOUND;
386
387 do {
388 offset = nextoffset;
389 tag = fdt_next_tag(fdt, offset, &nextoffset);
390 switch (tag) {
391 case FDT_END:
392 return -FDT_ERR_BADOFFSET;
393
394 case FDT_BEGIN_NODE:
395 level++;
396 if (level == supernodedepth)
397 supernodeoffset = offset;
398 break;
399
400 case FDT_END_NODE:
401 level--;
402 break;
403
404 case FDT_PROP:
405 case FDT_NOP:
406 break;
407
408 default:
409 return -FDT_ERR_BADSTRUCTURE;
410 }
411 } while (offset < nodeoffset);
412
413 if (nodedepth)
414 *nodedepth = level;
415
416 if (supernodedepth > level)
417 return -FDT_ERR_NOTFOUND;
418 return supernodeoffset;
419}
420
421int fdt_node_depth(const void *fdt, int nodeoffset)
422{
423 int nodedepth;
424 int err;
425
426 err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth);
427 if (err)
428 return (err < 0) ? err : -FDT_ERR_INTERNAL;
429 return nodedepth;
430}
431
432int fdt_parent_offset(const void *fdt, int nodeoffset)
433{
434 int nodedepth = fdt_node_depth(fdt, nodeoffset);
435
436 if (nodedepth < 0)
437 return nodedepth;
438 return fdt_supernode_atdepth_offset(fdt, nodeoffset,
439 nodedepth - 1, NULL);
440}
441
442int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
443 const char *propname,
444 const void *propval, int proplen)
445{
446 uint32_t tag;
447 int offset, nextoffset;
448 const void *val;
449 int len;
450
451 CHECK_HEADER(fdt);
452
453 if (startoffset >= 0) {
454 tag = fdt_next_tag(fdt, startoffset, &nextoffset);
455 if (tag != FDT_BEGIN_NODE)
456 return -FDT_ERR_BADOFFSET;
457 } else {
458 nextoffset = 0;
459 }
460
461 /* FIXME: The algorithm here is pretty horrible: we scan each
462 * property of a node in fdt_getprop(), then if that didn't
463 * find what we want, we scan over them again making our way
464 * to the next node. Still it's the easiest to implement
465 * approach; performance can come later. */
466 do {
467 offset = nextoffset;
468 tag = fdt_next_tag(fdt, offset, &nextoffset);
469
470 switch (tag) {
471 case FDT_BEGIN_NODE:
472 val = fdt_getprop(fdt, offset, propname, &len);
473 if (val
474 && (len == proplen)
475 && (memcmp(val, propval, len) == 0))
476 return offset;
477 break;
478
479 case FDT_PROP:
480 case FDT_END:
481 case FDT_END_NODE:
482 case FDT_NOP:
483 break;
484
485 default:
486 return -FDT_ERR_BADSTRUCTURE;
487 }
488 } while (tag != FDT_END);
489
490 return -FDT_ERR_NOTFOUND;
491}
492
493int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
494{
495 if ((phandle == 0) || (phandle == -1))
496 return -FDT_ERR_BADPHANDLE;
497 phandle = cpu_to_fdt32(phandle);
498 return fdt_node_offset_by_prop_value(fdt, -1, "linux,phandle",
499 &phandle, sizeof(phandle));
500}
501
502int _stringlist_contains(const void *strlist, int listlen, const char *str)
503{
504 int len = strlen(str);
505 const void *p;
506
507 while (listlen >= len) {
508 if (memcmp(str, strlist, len+1) == 0)
509 return 1;
510 p = memchr(strlist, '\0', listlen);
511 if (!p)
512 return 0; /* malformed strlist.. */
513 listlen -= (p-strlist) + 1;
514 strlist = p + 1;
515 }
516 return 0;
517}
518
519int fdt_node_check_compatible(const void *fdt, int nodeoffset,
520 const char *compatible)
521{
522 const void *prop;
523 int len;
524
525 prop = fdt_getprop(fdt, nodeoffset, "compatible", &len);
526 if (!prop)
527 return len;
528 if (_stringlist_contains(prop, len, compatible))
529 return 0;
530 else
531 return 1;
532}
533
534int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
535 const char *compatible)
536{
537 uint32_t tag;
538 int offset, nextoffset;
539 int err;
540
541 CHECK_HEADER(fdt);
542
543 if (startoffset >= 0) {
544 tag = fdt_next_tag(fdt, startoffset, &nextoffset);
545 if (tag != FDT_BEGIN_NODE)
546 return -FDT_ERR_BADOFFSET;
547 } else {
548 nextoffset = 0;
549 }
550
551 /* FIXME: The algorithm here is pretty horrible: we scan each
552 * property of a node in fdt_node_check_compatible(), then if
553 * that didn't find what we want, we scan over them again
554 * making our way to the next node. Still it's the easiest to
555 * implement approach; performance can come later. */
556 do {
557 offset = nextoffset;
558 tag = fdt_next_tag(fdt, offset, &nextoffset);
559
560 switch (tag) {
561 case FDT_BEGIN_NODE:
562 err = fdt_node_check_compatible(fdt, offset,
563 compatible);
564 if ((err < 0)
565 && (err != -FDT_ERR_NOTFOUND))
566 return err;
567 else if (err == 0)
568 return offset;
569 break;
570
571 case FDT_PROP:
572 case FDT_END:
573 case FDT_END_NODE:
574 case FDT_NOP:
575 break;
576
577 default:
578 return -FDT_ERR_BADSTRUCTURE;
579 }
580 } while (tag != FDT_END);
581
582 return -FDT_ERR_NOTFOUND;
583}
diff --git a/arch/powerpc/boot/libfdt/fdt_rw.c b/arch/powerpc/boot/libfdt/fdt_rw.c
new file mode 100644
index 000000000000..6673f8ec962a
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt_rw.c
@@ -0,0 +1,447 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58static int _blocks_misordered(const void *fdt,
59 int mem_rsv_size, int struct_size)
60{
61 return (fdt_off_mem_rsvmap(fdt) < ALIGN(sizeof(struct fdt_header), 8))
62 || (fdt_off_dt_struct(fdt) <
63 (fdt_off_mem_rsvmap(fdt) + mem_rsv_size))
64 || (fdt_off_dt_strings(fdt) <
65 (fdt_off_dt_struct(fdt) + struct_size))
66 || (fdt_totalsize(fdt) <
67 (fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt)));
68}
69
70static int rw_check_header(void *fdt)
71{
72 int err;
73
74 if ((err = fdt_check_header(fdt)))
75 return err;
76 if (fdt_version(fdt) < 17)
77 return -FDT_ERR_BADVERSION;
78 if (_blocks_misordered(fdt, sizeof(struct fdt_reserve_entry),
79 fdt_size_dt_struct(fdt)))
80 return -FDT_ERR_BADLAYOUT;
81 if (fdt_version(fdt) > 17)
82 fdt_set_version(fdt, 17);
83
84 return 0;
85}
86
87#define RW_CHECK_HEADER(fdt) \
88 { \
89 int err; \
90 if ((err = rw_check_header(fdt)) != 0) \
91 return err; \
92 }
93
94static inline int _blob_data_size(void *fdt)
95{
96 return fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
97}
98
99static int _blob_splice(void *fdt, void *p, int oldlen, int newlen)
100{
101 void *end = fdt + _blob_data_size(fdt);
102
103 if (((p + oldlen) < p) || ((p + oldlen) > end))
104 return -FDT_ERR_BADOFFSET;
105 if ((end - oldlen + newlen) > (fdt + fdt_totalsize(fdt)))
106 return -FDT_ERR_NOSPACE;
107 memmove(p + newlen, p + oldlen, end - p - oldlen);
108 return 0;
109}
110
111static int _blob_splice_mem_rsv(void *fdt, struct fdt_reserve_entry *p,
112 int oldn, int newn)
113{
114 int delta = (newn - oldn) * sizeof(*p);
115 int err;
116 err = _blob_splice(fdt, p, oldn * sizeof(*p), newn * sizeof(*p));
117 if (err)
118 return err;
119 fdt_set_off_dt_struct(fdt, fdt_off_dt_struct(fdt) + delta);
120 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
121 return 0;
122}
123
124static int _blob_splice_struct(void *fdt, void *p,
125 int oldlen, int newlen)
126{
127 int delta = newlen - oldlen;
128 int err;
129
130 if ((err = _blob_splice(fdt, p, oldlen, newlen)))
131 return err;
132
133 fdt_set_size_dt_struct(fdt, fdt_size_dt_struct(fdt) + delta);
134 fdt_set_off_dt_strings(fdt, fdt_off_dt_strings(fdt) + delta);
135 return 0;
136}
137
138static int _blob_splice_string(void *fdt, int newlen)
139{
140 void *p = fdt + fdt_off_dt_strings(fdt) + fdt_size_dt_strings(fdt);
141 int err;
142
143 if ((err = _blob_splice(fdt, p, 0, newlen)))
144 return err;
145
146 fdt_set_size_dt_strings(fdt, fdt_size_dt_strings(fdt) + newlen);
147 return 0;
148}
149
150static int _find_add_string(void *fdt, const char *s)
151{
152 char *strtab = (char *)fdt + fdt_off_dt_strings(fdt);
153 const char *p;
154 char *new;
155 int len = strlen(s) + 1;
156 int err;
157
158 p = _fdt_find_string(strtab, fdt_size_dt_strings(fdt), s);
159 if (p)
160 /* found it */
161 return (p - strtab);
162
163 new = strtab + fdt_size_dt_strings(fdt);
164 err = _blob_splice_string(fdt, len);
165 if (err)
166 return err;
167
168 memcpy(new, s, len);
169 return (new - strtab);
170}
171
172int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
173{
174 struct fdt_reserve_entry *re;
175 int err;
176
177 if ((err = rw_check_header(fdt)))
178 return err;
179
180 re = _fdt_mem_rsv_w(fdt, fdt_num_mem_rsv(fdt));
181 err = _blob_splice_mem_rsv(fdt, re, 0, 1);
182 if (err)
183 return err;
184
185 re->address = cpu_to_fdt64(address);
186 re->size = cpu_to_fdt64(size);
187 return 0;
188}
189
190int fdt_del_mem_rsv(void *fdt, int n)
191{
192 struct fdt_reserve_entry *re = _fdt_mem_rsv_w(fdt, n);
193 int err;
194
195 if ((err = rw_check_header(fdt)))
196 return err;
197 if (n >= fdt_num_mem_rsv(fdt))
198 return -FDT_ERR_NOTFOUND;
199
200 err = _blob_splice_mem_rsv(fdt, re, 1, 0);
201 if (err)
202 return err;
203 return 0;
204}
205
206static int _resize_property(void *fdt, int nodeoffset, const char *name, int len,
207 struct fdt_property **prop)
208{
209 int oldlen;
210 int err;
211
212 *prop = fdt_get_property_w(fdt, nodeoffset, name, &oldlen);
213 if (! (*prop))
214 return oldlen;
215
216 if ((err = _blob_splice_struct(fdt, (*prop)->data,
217 ALIGN(oldlen, FDT_TAGSIZE),
218 ALIGN(len, FDT_TAGSIZE))))
219 return err;
220
221 (*prop)->len = cpu_to_fdt32(len);
222 return 0;
223}
224
225static int _add_property(void *fdt, int nodeoffset, const char *name, int len,
226 struct fdt_property **prop)
227{
228 uint32_t tag;
229 int proplen;
230 int nextoffset;
231 int namestroff;
232 int err;
233
234 tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
235 if (tag != FDT_BEGIN_NODE)
236 return -FDT_ERR_BADOFFSET;
237
238 namestroff = _find_add_string(fdt, name);
239 if (namestroff < 0)
240 return namestroff;
241
242 *prop = _fdt_offset_ptr_w(fdt, nextoffset);
243 proplen = sizeof(**prop) + ALIGN(len, FDT_TAGSIZE);
244
245 err = _blob_splice_struct(fdt, *prop, 0, proplen);
246 if (err)
247 return err;
248
249 (*prop)->tag = cpu_to_fdt32(FDT_PROP);
250 (*prop)->nameoff = cpu_to_fdt32(namestroff);
251 (*prop)->len = cpu_to_fdt32(len);
252 return 0;
253}
254
255int fdt_setprop(void *fdt, int nodeoffset, const char *name,
256 const void *val, int len)
257{
258 struct fdt_property *prop;
259 int err;
260
261 if ((err = rw_check_header(fdt)))
262 return err;
263
264 err = _resize_property(fdt, nodeoffset, name, len, &prop);
265 if (err == -FDT_ERR_NOTFOUND)
266 err = _add_property(fdt, nodeoffset, name, len, &prop);
267 if (err)
268 return err;
269
270 memcpy(prop->data, val, len);
271 return 0;
272}
273
274int fdt_delprop(void *fdt, int nodeoffset, const char *name)
275{
276 struct fdt_property *prop;
277 int len, proplen;
278
279 RW_CHECK_HEADER(fdt);
280
281 prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
282 if (! prop)
283 return len;
284
285 proplen = sizeof(*prop) + ALIGN(len, FDT_TAGSIZE);
286 return _blob_splice_struct(fdt, prop, proplen, 0);
287}
288
289int fdt_add_subnode_namelen(void *fdt, int parentoffset,
290 const char *name, int namelen)
291{
292 struct fdt_node_header *nh;
293 int offset, nextoffset;
294 int nodelen;
295 int err;
296 uint32_t tag;
297 uint32_t *endtag;
298
299 RW_CHECK_HEADER(fdt);
300
301 offset = fdt_subnode_offset_namelen(fdt, parentoffset, name, namelen);
302 if (offset >= 0)
303 return -FDT_ERR_EXISTS;
304 else if (offset != -FDT_ERR_NOTFOUND)
305 return offset;
306
307 /* Try to place the new node after the parent's properties */
308 fdt_next_tag(fdt, parentoffset, &nextoffset); /* skip the BEGIN_NODE */
309 do {
310 offset = nextoffset;
311 tag = fdt_next_tag(fdt, offset, &nextoffset);
312 } while (tag == FDT_PROP);
313
314 nh = _fdt_offset_ptr_w(fdt, offset);
315 nodelen = sizeof(*nh) + ALIGN(namelen+1, FDT_TAGSIZE) + FDT_TAGSIZE;
316
317 err = _blob_splice_struct(fdt, nh, 0, nodelen);
318 if (err)
319 return err;
320
321 nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
322 memset(nh->name, 0, ALIGN(namelen+1, FDT_TAGSIZE));
323 memcpy(nh->name, name, namelen);
324 endtag = (uint32_t *)((void *)nh + nodelen - FDT_TAGSIZE);
325 *endtag = cpu_to_fdt32(FDT_END_NODE);
326
327 return offset;
328}
329
330int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
331{
332 return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
333}
334
335int fdt_del_node(void *fdt, int nodeoffset)
336{
337 int endoffset;
338
339 RW_CHECK_HEADER(fdt);
340
341 endoffset = _fdt_node_end_offset(fdt, nodeoffset);
342 if (endoffset < 0)
343 return endoffset;
344
345 return _blob_splice_struct(fdt, _fdt_offset_ptr_w(fdt, nodeoffset),
346 endoffset - nodeoffset, 0);
347}
348
349static void _packblocks(const void *fdt, void *buf,
350 int mem_rsv_size, int struct_size)
351{
352 int mem_rsv_off, struct_off, strings_off;
353
354 mem_rsv_off = ALIGN(sizeof(struct fdt_header), 8);
355 struct_off = mem_rsv_off + mem_rsv_size;
356 strings_off = struct_off + struct_size;
357
358 memmove(buf + mem_rsv_off, fdt + fdt_off_mem_rsvmap(fdt), mem_rsv_size);
359 fdt_set_off_mem_rsvmap(buf, mem_rsv_off);
360
361 memmove(buf + struct_off, fdt + fdt_off_dt_struct(fdt), struct_size);
362 fdt_set_off_dt_struct(buf, struct_off);
363 fdt_set_size_dt_struct(buf, struct_size);
364
365 memmove(buf + strings_off, fdt + fdt_off_dt_strings(fdt),
366 fdt_size_dt_strings(fdt));
367 fdt_set_off_dt_strings(buf, strings_off);
368 fdt_set_size_dt_strings(buf, fdt_size_dt_strings(fdt));
369}
370
371int fdt_open_into(const void *fdt, void *buf, int bufsize)
372{
373 int err;
374 int mem_rsv_size, struct_size;
375 int newsize;
376 void *tmp;
377
378 err = fdt_check_header(fdt);
379 if (err)
380 return err;
381
382 mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
383 * sizeof(struct fdt_reserve_entry);
384
385 if (fdt_version(fdt) >= 17) {
386 struct_size = fdt_size_dt_struct(fdt);
387 } else {
388 struct_size = 0;
389 while (fdt_next_tag(fdt, struct_size, &struct_size) != FDT_END)
390 ;
391 }
392
393 if (!_blocks_misordered(fdt, mem_rsv_size, struct_size)) {
394 /* no further work necessary */
395 err = fdt_move(fdt, buf, bufsize);
396 if (err)
397 return err;
398 fdt_set_version(buf, 17);
399 fdt_set_size_dt_struct(buf, struct_size);
400 fdt_set_totalsize(buf, bufsize);
401 return 0;
402 }
403
404 /* Need to reorder */
405 newsize = ALIGN(sizeof(struct fdt_header), 8) + mem_rsv_size
406 + struct_size + fdt_size_dt_strings(fdt);
407
408 if (bufsize < newsize)
409 return -FDT_ERR_NOSPACE;
410
411 if (((buf + newsize) <= fdt)
412 || (buf >= (fdt + fdt_totalsize(fdt)))) {
413 tmp = buf;
414 } else {
415 tmp = (void *)fdt + fdt_totalsize(fdt);
416 if ((tmp + newsize) > (buf + bufsize))
417 return -FDT_ERR_NOSPACE;
418 }
419
420 _packblocks(fdt, tmp, mem_rsv_size, struct_size);
421 memmove(buf, tmp, newsize);
422
423 fdt_set_magic(buf, FDT_MAGIC);
424 fdt_set_totalsize(buf, bufsize);
425 fdt_set_version(buf, 17);
426 fdt_set_last_comp_version(buf, 16);
427 fdt_set_boot_cpuid_phys(buf, fdt_boot_cpuid_phys(fdt));
428
429 return 0;
430}
431
432int fdt_pack(void *fdt)
433{
434 int mem_rsv_size;
435 int err;
436
437 err = rw_check_header(fdt);
438 if (err)
439 return err;
440
441 mem_rsv_size = (fdt_num_mem_rsv(fdt)+1)
442 * sizeof(struct fdt_reserve_entry);
443 _packblocks(fdt, fdt, mem_rsv_size, fdt_size_dt_struct(fdt));
444 fdt_set_totalsize(fdt, _blob_data_size(fdt));
445
446 return 0;
447}
diff --git a/arch/powerpc/boot/libfdt/fdt_strerror.c b/arch/powerpc/boot/libfdt/fdt_strerror.c
new file mode 100644
index 000000000000..f9d32ef5360a
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt_strerror.c
@@ -0,0 +1,96 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58struct errtabent {
59 const char *str;
60};
61
62#define ERRTABENT(val) \
63 [(val)] = { .str = #val, }
64
65static struct errtabent errtable[] = {
66 ERRTABENT(FDT_ERR_NOTFOUND),
67 ERRTABENT(FDT_ERR_EXISTS),
68 ERRTABENT(FDT_ERR_NOSPACE),
69
70 ERRTABENT(FDT_ERR_BADOFFSET),
71 ERRTABENT(FDT_ERR_BADPATH),
72 ERRTABENT(FDT_ERR_BADSTATE),
73
74 ERRTABENT(FDT_ERR_TRUNCATED),
75 ERRTABENT(FDT_ERR_BADMAGIC),
76 ERRTABENT(FDT_ERR_BADVERSION),
77 ERRTABENT(FDT_ERR_BADSTRUCTURE),
78 ERRTABENT(FDT_ERR_BADLAYOUT),
79};
80#define ERRTABSIZE (sizeof(errtable) / sizeof(errtable[0]))
81
82const char *fdt_strerror(int errval)
83{
84 if (errval > 0)
85 return "<valid offset/length>";
86 else if (errval == 0)
87 return "<no error>";
88 else if (errval > -ERRTABSIZE) {
89 const char *s = errtable[-errval].str;
90
91 if (s)
92 return s;
93 }
94
95 return "<unknown error>";
96}
diff --git a/arch/powerpc/boot/libfdt/fdt_sw.c b/arch/powerpc/boot/libfdt/fdt_sw.c
new file mode 100644
index 000000000000..dda2de34b2e0
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt_sw.c
@@ -0,0 +1,258 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58static int check_header_sw(void *fdt)
59{
60 if (fdt_magic(fdt) != SW_MAGIC)
61 return -FDT_ERR_BADMAGIC;
62 return 0;
63}
64
65static void *grab_space(void *fdt, int len)
66{
67 int offset = fdt_size_dt_struct(fdt);
68 int spaceleft;
69
70 spaceleft = fdt_totalsize(fdt) - fdt_off_dt_struct(fdt)
71 - fdt_size_dt_strings(fdt);
72
73 if ((offset + len < offset) || (offset + len > spaceleft))
74 return NULL;
75
76 fdt_set_size_dt_struct(fdt, offset + len);
77 return fdt_offset_ptr_w(fdt, offset, len);
78}
79
80int fdt_create(void *buf, int bufsize)
81{
82 void *fdt = buf;
83
84 if (bufsize < sizeof(struct fdt_header))
85 return -FDT_ERR_NOSPACE;
86
87 memset(buf, 0, bufsize);
88
89 fdt_set_magic(fdt, SW_MAGIC);
90 fdt_set_version(fdt, FDT_LAST_SUPPORTED_VERSION);
91 fdt_set_last_comp_version(fdt, FDT_FIRST_SUPPORTED_VERSION);
92 fdt_set_totalsize(fdt, bufsize);
93
94 fdt_set_off_mem_rsvmap(fdt, ALIGN(sizeof(struct fdt_header),
95 sizeof(struct fdt_reserve_entry)));
96 fdt_set_off_dt_struct(fdt, fdt_off_mem_rsvmap(fdt));
97 fdt_set_off_dt_strings(fdt, bufsize);
98
99 return 0;
100}
101
102int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
103{
104 struct fdt_reserve_entry *re;
105 int err = check_header_sw(fdt);
106 int offset;
107
108 if (err)
109 return err;
110 if (fdt_size_dt_struct(fdt))
111 return -FDT_ERR_BADSTATE;
112
113 offset = fdt_off_dt_struct(fdt);
114 if ((offset + sizeof(*re)) > fdt_totalsize(fdt))
115 return -FDT_ERR_NOSPACE;
116
117 re = (struct fdt_reserve_entry *)(fdt + offset);
118 re->address = cpu_to_fdt64(addr);
119 re->size = cpu_to_fdt64(size);
120
121 fdt_set_off_dt_struct(fdt, offset + sizeof(*re));
122
123 return 0;
124}
125
126int fdt_finish_reservemap(void *fdt)
127{
128 return fdt_add_reservemap_entry(fdt, 0, 0);
129}
130
131int fdt_begin_node(void *fdt, const char *name)
132{
133 struct fdt_node_header *nh;
134 int err = check_header_sw(fdt);
135 int namelen = strlen(name) + 1;
136
137 if (err)
138 return err;
139
140 nh = grab_space(fdt, sizeof(*nh) + ALIGN(namelen, FDT_TAGSIZE));
141 if (! nh)
142 return -FDT_ERR_NOSPACE;
143
144 nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE);
145 memcpy(nh->name, name, namelen);
146 return 0;
147}
148
149int fdt_end_node(void *fdt)
150{
151 uint32_t *en;
152 int err = check_header_sw(fdt);
153
154 if (err)
155 return err;
156
157 en = grab_space(fdt, FDT_TAGSIZE);
158 if (! en)
159 return -FDT_ERR_NOSPACE;
160
161 *en = cpu_to_fdt32(FDT_END_NODE);
162 return 0;
163}
164
165static int find_add_string(void *fdt, const char *s)
166{
167 char *strtab = (char *)fdt + fdt_totalsize(fdt);
168 const char *p;
169 int strtabsize = fdt_size_dt_strings(fdt);
170 int len = strlen(s) + 1;
171 int struct_top, offset;
172
173 p = _fdt_find_string(strtab - strtabsize, strtabsize, s);
174 if (p)
175 return p - strtab;
176
177 /* Add it */
178 offset = -strtabsize - len;
179 struct_top = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
180 if (fdt_totalsize(fdt) + offset < struct_top)
181 return 0; /* no more room :( */
182
183 memcpy(strtab + offset, s, len);
184 fdt_set_size_dt_strings(fdt, strtabsize + len);
185 return offset;
186}
187
188int fdt_property(void *fdt, const char *name, const void *val, int len)
189{
190 struct fdt_property *prop;
191 int err = check_header_sw(fdt);
192 int nameoff;
193
194 if (err)
195 return err;
196
197 nameoff = find_add_string(fdt, name);
198 if (nameoff == 0)
199 return -FDT_ERR_NOSPACE;
200
201 prop = grab_space(fdt, sizeof(*prop) + ALIGN(len, FDT_TAGSIZE));
202 if (! prop)
203 return -FDT_ERR_NOSPACE;
204
205 prop->tag = cpu_to_fdt32(FDT_PROP);
206 prop->nameoff = cpu_to_fdt32(nameoff);
207 prop->len = cpu_to_fdt32(len);
208 memcpy(prop->data, val, len);
209 return 0;
210}
211
212int fdt_finish(void *fdt)
213{
214 int err = check_header_sw(fdt);
215 char *p = (char *)fdt;
216 uint32_t *end;
217 int oldstroffset, newstroffset;
218 uint32_t tag;
219 int offset, nextoffset;
220
221 if (err)
222 return err;
223
224 /* Add terminator */
225 end = grab_space(fdt, sizeof(*end));
226 if (! end)
227 return -FDT_ERR_NOSPACE;
228 *end = cpu_to_fdt32(FDT_END);
229
230 /* Relocate the string table */
231 oldstroffset = fdt_totalsize(fdt) - fdt_size_dt_strings(fdt);
232 newstroffset = fdt_off_dt_struct(fdt) + fdt_size_dt_struct(fdt);
233 memmove(p + newstroffset, p + oldstroffset, fdt_size_dt_strings(fdt));
234 fdt_set_off_dt_strings(fdt, newstroffset);
235
236 /* Walk the structure, correcting string offsets */
237 offset = 0;
238 while ((tag = fdt_next_tag(fdt, offset, &nextoffset)) != FDT_END) {
239 if (tag == FDT_PROP) {
240 struct fdt_property *prop =
241 fdt_offset_ptr_w(fdt, offset, sizeof(*prop));
242 int nameoff;
243
244 if (! prop)
245 return -FDT_ERR_BADSTRUCTURE;
246
247 nameoff = fdt32_to_cpu(prop->nameoff);
248 nameoff += fdt_size_dt_strings(fdt);
249 prop->nameoff = cpu_to_fdt32(nameoff);
250 }
251 offset = nextoffset;
252 }
253
254 /* Finally, adjust the header */
255 fdt_set_totalsize(fdt, newstroffset + fdt_size_dt_strings(fdt));
256 fdt_set_magic(fdt, FDT_MAGIC);
257 return 0;
258}
diff --git a/arch/powerpc/boot/libfdt/fdt_wip.c b/arch/powerpc/boot/libfdt/fdt_wip.c
new file mode 100644
index 000000000000..88e24b8318f4
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/fdt_wip.c
@@ -0,0 +1,144 @@
1/*
2 * libfdt - Flat Device Tree manipulation
3 * Copyright (C) 2006 David Gibson, IBM Corporation.
4 *
5 * libfdt is dual licensed: you can use it either under the terms of
6 * the GPL, or the BSD license, at your option.
7 *
8 * a) This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 * This library 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
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 * MA 02110-1301 USA
22 *
23 * Alternatively,
24 *
25 * b) Redistribution and use in source and binary forms, with or
26 * without modification, are permitted provided that the following
27 * conditions are met:
28 *
29 * 1. Redistributions of source code must retain the above
30 * copyright notice, this list of conditions and the following
31 * disclaimer.
32 * 2. Redistributions in binary form must reproduce the above
33 * copyright notice, this list of conditions and the following
34 * disclaimer in the documentation and/or other materials
35 * provided with the distribution.
36 *
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
38 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
39 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
40 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
41 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
42 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
47 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
48 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
49 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50 */
51#include "libfdt_env.h"
52
53#include <fdt.h>
54#include <libfdt.h>
55
56#include "libfdt_internal.h"
57
58int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
59 const void *val, int len)
60{
61 void *propval;
62 int proplen;
63
64 propval = fdt_getprop_w(fdt, nodeoffset, name, &proplen);
65 if (! propval)
66 return proplen;
67
68 if (proplen != len)
69 return -FDT_ERR_NOSPACE;
70
71 memcpy(propval, val, len);
72 return 0;
73}
74
75static void nop_region(void *start, int len)
76{
77 uint32_t *p;
78
79 for (p = start; (void *)p < (start + len); p++)
80 *p = cpu_to_fdt32(FDT_NOP);
81}
82
83int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
84{
85 struct fdt_property *prop;
86 int len;
87
88 prop = fdt_get_property_w(fdt, nodeoffset, name, &len);
89 if (! prop)
90 return len;
91
92 nop_region(prop, len + sizeof(*prop));
93
94 return 0;
95}
96
97int _fdt_node_end_offset(void *fdt, int nodeoffset)
98{
99 int level = 0;
100 uint32_t tag;
101 int offset, nextoffset;
102
103 tag = fdt_next_tag(fdt, nodeoffset, &nextoffset);
104 if (tag != FDT_BEGIN_NODE)
105 return -FDT_ERR_BADOFFSET;
106 do {
107 offset = nextoffset;
108 tag = fdt_next_tag(fdt, offset, &nextoffset);
109
110 switch (tag) {
111 case FDT_END:
112 return offset;
113
114 case FDT_BEGIN_NODE:
115 level++;
116 break;
117
118 case FDT_END_NODE:
119 level--;
120 break;
121
122 case FDT_PROP:
123 case FDT_NOP:
124 break;
125
126 default:
127 return -FDT_ERR_BADSTRUCTURE;
128 }
129 } while (level >= 0);
130
131 return nextoffset;
132}
133
134int fdt_nop_node(void *fdt, int nodeoffset)
135{
136 int endoffset;
137
138 endoffset = _fdt_node_end_offset(fdt, nodeoffset);
139 if (endoffset < 0)
140 return endoffset;
141
142 nop_region(fdt_offset_ptr_w(fdt, nodeoffset, 0), endoffset - nodeoffset);
143 return 0;
144}
diff --git a/arch/powerpc/boot/libfdt/libfdt.h b/arch/powerpc/boot/libfdt/libfdt.h
new file mode 100644
index 000000000000..6b2fb92ea357
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/libfdt.h
@@ -0,0 +1,721 @@
1#ifndef _LIBFDT_H
2#define _LIBFDT_H
3/*
4 * libfdt - Flat Device Tree manipulation
5 * Copyright (C) 2006 David Gibson, IBM Corporation.
6 *
7 * libfdt is dual licensed: you can use it either under the terms of
8 * the GPL, or the BSD license, at your option.
9 *
10 * a) This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This library 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
21 * License along with this library; if not, write to the Free
22 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
23 * MA 02110-1301 USA
24 *
25 * Alternatively,
26 *
27 * b) Redistribution and use in source and binary forms, with or
28 * without modification, are permitted provided that the following
29 * conditions are met:
30 *
31 * 1. Redistributions of source code must retain the above
32 * copyright notice, this list of conditions and the following
33 * disclaimer.
34 * 2. Redistributions in binary form must reproduce the above
35 * copyright notice, this list of conditions and the following
36 * disclaimer in the documentation and/or other materials
37 * provided with the distribution.
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
41 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
42 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
44 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
49 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
50 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
51 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 */
53
54#include <libfdt_env.h>
55#include <fdt.h>
56
57#define FDT_FIRST_SUPPORTED_VERSION 0x10
58#define FDT_LAST_SUPPORTED_VERSION 0x11
59
60/* Error codes: informative error codes */
61#define FDT_ERR_NOTFOUND 1
62 /* FDT_ERR_NOTFOUND: The requested node or property does not exist */
63#define FDT_ERR_EXISTS 2
64 /* FDT_ERR_EXISTS: Attemped to create a node or property which
65 * already exists */
66#define FDT_ERR_NOSPACE 3
67 /* FDT_ERR_NOSPACE: Operation needed to expand the device
68 * tree, but its buffer did not have sufficient space to
69 * contain the expanded tree. Use fdt_open_into() to move the
70 * device tree to a buffer with more space. */
71
72/* Error codes: codes for bad parameters */
73#define FDT_ERR_BADOFFSET 4
74 /* FDT_ERR_BADOFFSET: Function was passed a structure block
75 * offset which is out-of-bounds, or which points to an
76 * unsuitable part of the structure for the operation. */
77#define FDT_ERR_BADPATH 5
78 /* FDT_ERR_BADPATH: Function was passed a badly formatted path
79 * (e.g. missing a leading / for a function which requires an
80 * absolute path) */
81#define FDT_ERR_BADPHANDLE 6
82 /* FDT_ERR_BADPHANDLE: Function was passed an invalid phandle
83 * value. phandle values of 0 and -1 are not permitted. */
84#define FDT_ERR_BADSTATE 7
85 /* FDT_ERR_BADSTATE: Function was passed an incomplete device
86 * tree created by the sequential-write functions, which is
87 * not sufficiently complete for the requested operation. */
88
89/* Error codes: codes for bad device tree blobs */
90#define FDT_ERR_TRUNCATED 8
91 /* FDT_ERR_TRUNCATED: Structure block of the given device tree
92 * ends without an FDT_END tag. */
93#define FDT_ERR_BADMAGIC 9
94 /* FDT_ERR_BADMAGIC: Given "device tree" appears not to be a
95 * device tree at all - it is missing the flattened device
96 * tree magic number. */
97#define FDT_ERR_BADVERSION 10
98 /* FDT_ERR_BADVERSION: Given device tree has a version which
99 * can't be handled by the requested operation. For
100 * read-write functions, this may mean that fdt_open_into() is
101 * required to convert the tree to the expected version. */
102#define FDT_ERR_BADSTRUCTURE 11
103 /* FDT_ERR_BADSTRUCTURE: Given device tree has a corrupt
104 * structure block or other serious error (e.g. misnested
105 * nodes, or subnodes preceding properties). */
106#define FDT_ERR_BADLAYOUT 12
107 /* FDT_ERR_BADLAYOUT: For read-write functions, the given
108 * device tree has it's sub-blocks in an order that the
109 * function can't handle (memory reserve map, then structure,
110 * then strings). Use fdt_open_into() to reorganize the tree
111 * into a form suitable for the read-write operations. */
112
113/* "Can't happen" error indicating a bug in libfdt */
114#define FDT_ERR_INTERNAL 13
115 /* FDT_ERR_INTERNAL: libfdt has failed an internal assertion.
116 * Should never be returned, if it is, it indicates a bug in
117 * libfdt itself. */
118
119#define FDT_ERR_MAX 13
120
121/**********************************************************************/
122/* Low-level functions (you probably don't need these) */
123/**********************************************************************/
124
125const void *fdt_offset_ptr(const void *fdt, int offset, int checklen);
126static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen)
127{
128 return (void *)fdt_offset_ptr(fdt, offset, checklen);
129}
130
131uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset);
132
133/**********************************************************************/
134/* General functions */
135/**********************************************************************/
136
137#define fdt_get_header(fdt, field) \
138 (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field))
139#define fdt_magic(fdt) (fdt_get_header(fdt, magic))
140#define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize))
141#define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct))
142#define fdt_off_dt_strings(fdt) (fdt_get_header(fdt, off_dt_strings))
143#define fdt_off_mem_rsvmap(fdt) (fdt_get_header(fdt, off_mem_rsvmap))
144#define fdt_version(fdt) (fdt_get_header(fdt, version))
145#define fdt_last_comp_version(fdt) (fdt_get_header(fdt, last_comp_version))
146#define fdt_boot_cpuid_phys(fdt) (fdt_get_header(fdt, boot_cpuid_phys))
147#define fdt_size_dt_strings(fdt) (fdt_get_header(fdt, size_dt_strings))
148#define fdt_size_dt_struct(fdt) (fdt_get_header(fdt, size_dt_struct))
149
150#define __fdt_set_hdr(name) \
151 static inline void fdt_set_##name(void *fdt, uint32_t val) \
152 { \
153 struct fdt_header *fdth = fdt; \
154 fdth->name = cpu_to_fdt32(val); \
155 }
156__fdt_set_hdr(magic);
157__fdt_set_hdr(totalsize);
158__fdt_set_hdr(off_dt_struct);
159__fdt_set_hdr(off_dt_strings);
160__fdt_set_hdr(off_mem_rsvmap);
161__fdt_set_hdr(version);
162__fdt_set_hdr(last_comp_version);
163__fdt_set_hdr(boot_cpuid_phys);
164__fdt_set_hdr(size_dt_strings);
165__fdt_set_hdr(size_dt_struct);
166#undef __fdt_set_hdr
167
168/**
169 * fdt_check_header - sanity check a device tree or possible device tree
170 * @fdt: pointer to data which might be a flattened device tree
171 *
172 * fdt_check_header() checks that the given buffer contains what
173 * appears to be a flattened device tree with sane information in its
174 * header.
175 *
176 * returns:
177 * 0, if the buffer appears to contain a valid device tree
178 * -FDT_ERR_BADMAGIC,
179 * -FDT_ERR_BADVERSION,
180 * -FDT_ERR_BADSTATE, standard meanings, as above
181 */
182int fdt_check_header(const void *fdt);
183
184/**
185 * fdt_move - move a device tree around in memory
186 * @fdt: pointer to the device tree to move
187 * @buf: pointer to memory where the device is to be moved
188 * @bufsize: size of the memory space at buf
189 *
190 * fdt_move() relocates, if possible, the device tree blob located at
191 * fdt to the buffer at buf of size bufsize. The buffer may overlap
192 * with the existing device tree blob at fdt. Therefore,
193 * fdt_move(fdt, fdt, fdt_totalsize(fdt))
194 * should always succeed.
195 *
196 * returns:
197 * 0, on success
198 * -FDT_ERR_NOSPACE, bufsize is insufficient to contain the device tree
199 * -FDT_ERR_BADMAGIC,
200 * -FDT_ERR_BADVERSION,
201 * -FDT_ERR_BADSTATE, standard meanings
202 */
203int fdt_move(const void *fdt, void *buf, int bufsize);
204
205/**********************************************************************/
206/* Read-only functions */
207/**********************************************************************/
208
209/**
210 * fdt_string - retreive a string from the strings block of a device tree
211 * @fdt: pointer to the device tree blob
212 * @stroffset: offset of the string within the strings block (native endian)
213 *
214 * fdt_string() retrieves a pointer to a single string from the
215 * strings block of the device tree blob at fdt.
216 *
217 * returns:
218 * a pointer to the string, on success
219 * NULL, if stroffset is out of bounds
220 */
221const char *fdt_string(const void *fdt, int stroffset);
222
223/**
224 * fdt_num_mem_rsv - retreive the number of memory reserve map entries
225 * @fdt: pointer to the device tree blob
226 *
227 * Returns the number of entries in the device tree blob's memory
228 * reservation map. This does not include the terminating 0,0 entry
229 * or any other (0,0) entries reserved for expansion.
230 *
231 * returns:
232 * the number of entries
233 */
234int fdt_num_mem_rsv(const void *fdt);
235
236/**
237 * fdt_get_mem_rsv - retreive one memory reserve map entry
238 * @fdt: pointer to the device tree blob
239 * @address, @size: pointers to 64-bit variables
240 *
241 * On success, *address and *size will contain the address and size of
242 * the n-th reserve map entry from the device tree blob, in
243 * native-endian format.
244 *
245 * returns:
246 * 0, on success
247 * -FDT_ERR_BADMAGIC,
248 * -FDT_ERR_BADVERSION,
249 * -FDT_ERR_BADSTATE, standard meanings
250 */
251int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size);
252
253/**
254 * fdt_subnode_offset_namelen - find a subnode based on substring
255 * @fdt: pointer to the device tree blob
256 * @parentoffset: structure block offset of a node
257 * @name: name of the subnode to locate
258 * @namelen: number of characters of name to consider
259 *
260 * Identical to fdt_subnode_offset(), but only examine the first
261 * namelen characters of name for matching the subnode name. This is
262 * useful for finding subnodes based on a portion of a larger string,
263 * such as a full path.
264 */
265int fdt_subnode_offset_namelen(const void *fdt, int parentoffset,
266 const char *name, int namelen);
267/**
268 * fdt_subnode_offset - find a subnode of a given node
269 * @fdt: pointer to the device tree blob
270 * @parentoffset: structure block offset of a node
271 * @name: name of the subnode to locate
272 *
273 * fdt_subnode_offset() finds a subnode of the node at structure block
274 * offset parentoffset with the given name. name may include a unit
275 * address, in which case fdt_subnode_offset() will find the subnode
276 * with that unit address, or the unit address may be omitted, in
277 * which case fdt_subnode_offset() will find an arbitrary subnode
278 * whose name excluding unit address matches the given name.
279 *
280 * returns:
281 * structure block offset of the requested subnode (>=0), on success
282 * -FDT_ERR_NOTFOUND, if the requested subnode does not exist
283 * -FDT_ERR_BADOFFSET, if parentoffset did not point to an FDT_BEGIN_NODE tag
284 * -FDT_ERR_BADMAGIC,
285 * -FDT_ERR_BADVERSION,
286 * -FDT_ERR_BADSTATE,
287 * -FDT_ERR_BADSTRUCTURE,
288 * -FDT_ERR_TRUNCATED, standard meanings.
289 */
290int fdt_subnode_offset(const void *fdt, int parentoffset, const char *name);
291
292/**
293 * fdt_path_offset - find a tree node by its full path
294 * @fdt: pointer to the device tree blob
295 * @path: full path of the node to locate
296 *
297 * fdt_path_offset() finds a node of a given path in the device tree.
298 * Each path component may omit the unit address portion, but the
299 * results of this are undefined if any such path component is
300 * ambiguous (that is if there are multiple nodes at the relevant
301 * level matching the given component, differentiated only by unit
302 * address).
303 *
304 * returns:
305 * structure block offset of the node with the requested path (>=0), on success
306 * -FDT_ERR_BADPATH, given path does not begin with '/' or is invalid
307 * -FDT_ERR_NOTFOUND, if the requested node does not exist
308 * -FDT_ERR_BADMAGIC,
309 * -FDT_ERR_BADVERSION,
310 * -FDT_ERR_BADSTATE,
311 * -FDT_ERR_BADSTRUCTURE,
312 * -FDT_ERR_TRUNCATED, standard meanings.
313 */
314int fdt_path_offset(const void *fdt, const char *path);
315
316/**
317 * fdt_get_name - retreive the name of a given node
318 * @fdt: pointer to the device tree blob
319 * @nodeoffset: structure block offset of the starting node
320 * @lenp: pointer to an integer variable (will be overwritten) or NULL
321 *
322 * fdt_get_name() retrieves the name (including unit address) of the
323 * device tree node at structure block offset nodeoffset. If lenp is
324 * non-NULL, the length of this name is also returned, in the integer
325 * pointed to by lenp.
326 *
327 * returns:
328 * pointer to the node's name, on success
329 * If lenp is non-NULL, *lenp contains the length of that name (>=0)
330 * NULL, on error
331 * if lenp is non-NULL *lenp contains an error code (<0):
332 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
333 * -FDT_ERR_BADMAGIC,
334 * -FDT_ERR_BADVERSION,
335 * -FDT_ERR_BADSTATE, standard meanings
336 */
337const char *fdt_get_name(const void *fdt, int nodeoffset, int *lenp);
338
339/**
340 * fdt_get_property - find a given property in a given node
341 * @fdt: pointer to the device tree blob
342 * @nodeoffset: offset of the node whose property to find
343 * @name: name of the property to find
344 * @lenp: pointer to an integer variable (will be overwritten) or NULL
345 *
346 * fdt_get_property() retrieves a pointer to the fdt_property
347 * structure within the device tree blob corresponding to the property
348 * named 'name' of the node at offset nodeoffset. If lenp is
349 * non-NULL, the length of the property value also returned, in the
350 * integer pointed to by lenp.
351 *
352 * returns:
353 * pointer to the structure representing the property
354 * if lenp is non-NULL, *lenp contains the length of the property
355 * value (>=0)
356 * NULL, on error
357 * if lenp is non-NULL, *lenp contains an error code (<0):
358 * -FDT_ERR_NOTFOUND, node does not have named property
359 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
360 * -FDT_ERR_BADMAGIC,
361 * -FDT_ERR_BADVERSION,
362 * -FDT_ERR_BADSTATE,
363 * -FDT_ERR_BADSTRUCTURE,
364 * -FDT_ERR_TRUNCATED, standard meanings
365 */
366const struct fdt_property *fdt_get_property(const void *fdt, int nodeoffset,
367 const char *name, int *lenp);
368static inline struct fdt_property *fdt_get_property_w(void *fdt, int nodeoffset,
369 const char *name,
370 int *lenp)
371{
372 return (struct fdt_property *)fdt_get_property(fdt, nodeoffset,
373 name, lenp);
374}
375
376/**
377 * fdt_getprop - retrieve the value of a given property
378 * @fdt: pointer to the device tree blob
379 * @nodeoffset: offset of the node whose property to find
380 * @name: name of the property to find
381 * @lenp: pointer to an integer variable (will be overwritten) or NULL
382 *
383 * fdt_getprop() retrieves a pointer to the value of the property
384 * named 'name' of the node at offset nodeoffset (this will be a
385 * pointer to within the device blob itself, not a copy of the value).
386 * If lenp is non-NULL, the length of the property value also
387 * returned, in the integer pointed to by lenp.
388 *
389 * returns:
390 * pointer to the property's value
391 * if lenp is non-NULL, *lenp contains the length of the property
392 * value (>=0)
393 * NULL, on error
394 * if lenp is non-NULL, *lenp contains an error code (<0):
395 * -FDT_ERR_NOTFOUND, node does not have named property
396 * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag
397 * -FDT_ERR_BADMAGIC,
398 * -FDT_ERR_BADVERSION,
399 * -FDT_ERR_BADSTATE,
400 * -FDT_ERR_BADSTRUCTURE,
401 * -FDT_ERR_TRUNCATED, standard meanings
402 */
403const void *fdt_getprop(const void *fdt, int nodeoffset,
404 const char *name, int *lenp);
405static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
406 const char *name, int *lenp)
407{
408 return (void *)fdt_getprop(fdt, nodeoffset, name, lenp);
409}
410
411/**
412 * fdt_get_phandle - retreive the phandle of a given node
413 * @fdt: pointer to the device tree blob
414 * @nodeoffset: structure block offset of the node
415 *
416 * fdt_get_phandle() retrieves the phandle of the device tree node at
417 * structure block offset nodeoffset.
418 *
419 * returns:
420 * the phandle of the node at nodeoffset, on succes (!= 0, != -1)
421 * 0, if the node has no phandle, or another error occurs
422 */
423uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
424
425/**
426 * fdt_get_path - determine the full path of a node
427 * @fdt: pointer to the device tree blob
428 * @nodeoffset: offset of the node whose path to find
429 * @buf: character buffer to contain the returned path (will be overwritten)
430 * @buflen: size of the character buffer at buf
431 *
432 * fdt_get_path() computes the full path of the node at offset
433 * nodeoffset, and records that path in the buffer at buf.
434 *
435 * NOTE: This function is expensive, as it must scan the device tree
436 * structure from the start to nodeoffset.
437 *
438 * returns:
439 * 0, on success
440 * buf contains the absolute path of the node at
441 * nodeoffset, as a NUL-terminated string.
442 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
443 * -FDT_ERR_NOSPACE, the path of the given node is longer than (bufsize-1)
444 * characters and will not fit in the given buffer.
445 * -FDT_ERR_BADMAGIC,
446 * -FDT_ERR_BADVERSION,
447 * -FDT_ERR_BADSTATE,
448 * -FDT_ERR_BADSTRUCTURE, standard meanings
449 */
450int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen);
451
452/**
453 * fdt_supernode_atdepth_offset - find a specific ancestor of a node
454 * @fdt: pointer to the device tree blob
455 * @nodeoffset: offset of the node whose parent to find
456 * @supernodedepth: depth of the ancestor to find
457 * @nodedepth: pointer to an integer variable (will be overwritten) or NULL
458 *
459 * fdt_supernode_atdepth_offset() finds an ancestor of the given node
460 * at a specific depth from the root (where the root itself has depth
461 * 0, its immediate subnodes depth 1 and so forth). So
462 * fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, NULL);
463 * will always return 0, the offset of the root node. If the node at
464 * nodeoffset has depth D, then:
465 * fdt_supernode_atdepth_offset(fdt, nodeoffset, D, NULL);
466 * will return nodeoffset itself.
467 *
468 * NOTE: This function is expensive, as it must scan the device tree
469 * structure from the start to nodeoffset.
470 *
471 * returns:
472
473 * structure block offset of the node at node offset's ancestor
474 * of depth supernodedepth (>=0), on success
475 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
476* -FDT_ERR_NOTFOUND, supernodedepth was greater than the depth of nodeoffset
477 * -FDT_ERR_BADMAGIC,
478 * -FDT_ERR_BADVERSION,
479 * -FDT_ERR_BADSTATE,
480 * -FDT_ERR_BADSTRUCTURE, standard meanings
481 */
482int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
483 int supernodedepth, int *nodedepth);
484
485/**
486 * fdt_node_depth - find the depth of a given node
487 * @fdt: pointer to the device tree blob
488 * @nodeoffset: offset of the node whose parent to find
489 *
490 * fdt_node_depth() finds the depth of a given node. The root node
491 * has depth 0, its immediate subnodes depth 1 and so forth.
492 *
493 * NOTE: This function is expensive, as it must scan the device tree
494 * structure from the start to nodeoffset.
495 *
496 * returns:
497 * depth of the node at nodeoffset (>=0), on success
498 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
499 * -FDT_ERR_BADMAGIC,
500 * -FDT_ERR_BADVERSION,
501 * -FDT_ERR_BADSTATE,
502 * -FDT_ERR_BADSTRUCTURE, standard meanings
503 */
504int fdt_node_depth(const void *fdt, int nodeoffset);
505
506/**
507 * fdt_parent_offset - find the parent of a given node
508 * @fdt: pointer to the device tree blob
509 * @nodeoffset: offset of the node whose parent to find
510 *
511 * fdt_parent_offset() locates the parent node of a given node (that
512 * is, it finds the offset of the node which contains the node at
513 * nodeoffset as a subnode).
514 *
515 * NOTE: This function is expensive, as it must scan the device tree
516 * structure from the start to nodeoffset, *twice*.
517 *
518 * returns:
519 * stucture block offset of the parent of the node at nodeoffset
520 * (>=0), on success
521 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
522 * -FDT_ERR_BADMAGIC,
523 * -FDT_ERR_BADVERSION,
524 * -FDT_ERR_BADSTATE,
525 * -FDT_ERR_BADSTRUCTURE, standard meanings
526 */
527int fdt_parent_offset(const void *fdt, int nodeoffset);
528
529/**
530 * fdt_node_offset_by_prop_value - find nodes with a given property value
531 * @fdt: pointer to the device tree blob
532 * @startoffset: only find nodes after this offset
533 * @propname: property name to check
534 * @propval: property value to search for
535 * @proplen: length of the value in propval
536 *
537 * fdt_node_offset_by_prop_value() returns the offset of the first
538 * node after startoffset, which has a property named propname whose
539 * value is of length proplen and has value equal to propval; or if
540 * startoffset is -1, the very first such node in the tree.
541 *
542 * To iterate through all nodes matching the criterion, the following
543 * idiom can be used:
544 * offset = fdt_node_offset_by_prop_value(fdt, -1, propname,
545 * propval, proplen);
546 * while (offset != -FDT_ERR_NOTFOUND) {
547 * // other code here
548 * offset = fdt_node_offset_by_prop_value(fdt, offset, propname,
549 * propval, proplen);
550 * }
551 *
552 * Note the -1 in the first call to the function, if 0 is used here
553 * instead, the function will never locate the root node, even if it
554 * matches the criterion.
555 *
556 * returns:
557 * structure block offset of the located node (>= 0, >startoffset),
558 * on success
559 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
560 * tree after startoffset
561 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
562 * -FDT_ERR_BADMAGIC,
563 * -FDT_ERR_BADVERSION,
564 * -FDT_ERR_BADSTATE,
565 * -FDT_ERR_BADSTRUCTURE, standard meanings
566 */
567int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
568 const char *propname,
569 const void *propval, int proplen);
570
571/**
572 * fdt_node_offset_by_phandle - find the node with a given phandle
573 * @fdt: pointer to the device tree blob
574 * @phandle: phandle value
575 *
576 * fdt_node_offset_by_prop_value() returns the offset of the node
577 * which has the given phandle value. If there is more than one node
578 * in the tree with the given phandle (an invalid tree), results are
579 * undefined.
580 *
581 * returns:
582 * structure block offset of the located node (>= 0), on success
583 * -FDT_ERR_NOTFOUND, no node with that phandle exists
584 * -FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
585 * -FDT_ERR_BADMAGIC,
586 * -FDT_ERR_BADVERSION,
587 * -FDT_ERR_BADSTATE,
588 * -FDT_ERR_BADSTRUCTURE, standard meanings
589 */
590int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle);
591
592/**
593 * fdt_node_check_compatible: check a node's compatible property
594 * @fdt: pointer to the device tree blob
595 * @nodeoffset: offset of a tree node
596 * @compatible: string to match against
597 *
598 *
599 * fdt_node_check_compatible() returns 0 if the given node contains a
600 * 'compatible' property with the given string as one of its elements,
601 * it returns non-zero otherwise, or on error.
602 *
603 * returns:
604 * 0, if the node has a 'compatible' property listing the given string
605 * 1, if the node has a 'compatible' property, but it does not list
606 * the given string
607 * -FDT_ERR_NOTFOUND, if the given node has no 'compatible' property
608 * -FDT_ERR_BADOFFSET, if nodeoffset does not refer to a BEGIN_NODE tag
609 * -FDT_ERR_BADMAGIC,
610 * -FDT_ERR_BADVERSION,
611 * -FDT_ERR_BADSTATE,
612 * -FDT_ERR_BADSTRUCTURE, standard meanings
613 */
614int fdt_node_check_compatible(const void *fdt, int nodeoffset,
615 const char *compatible);
616
617/**
618 * fdt_node_offset_by_compatible - find nodes with a given 'compatible' value
619 * @fdt: pointer to the device tree blob
620 * @startoffset: only find nodes after this offset
621 * @compatible: 'compatible' string to match against
622 *
623 * fdt_node_offset_by_compatible() returns the offset of the first
624 * node after startoffset, which has a 'compatible' property which
625 * lists the given compatible string; or if startoffset is -1, the
626 * very first such node in the tree.
627 *
628 * To iterate through all nodes matching the criterion, the following
629 * idiom can be used:
630 * offset = fdt_node_offset_by_compatible(fdt, -1, compatible);
631 * while (offset != -FDT_ERR_NOTFOUND) {
632 * // other code here
633 * offset = fdt_node_offset_by_compatible(fdt, offset, compatible);
634 * }
635 *
636 * Note the -1 in the first call to the function, if 0 is used here
637 * instead, the function will never locate the root node, even if it
638 * matches the criterion.
639 *
640 * returns:
641 * structure block offset of the located node (>= 0, >startoffset),
642 * on success
643 * -FDT_ERR_NOTFOUND, no node matching the criterion exists in the
644 * tree after startoffset
645 * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
646 * -FDT_ERR_BADMAGIC,
647 * -FDT_ERR_BADVERSION,
648 * -FDT_ERR_BADSTATE,
649 * -FDT_ERR_BADSTRUCTURE, standard meanings
650 */
651int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
652 const char *compatible);
653
654/**********************************************************************/
655/* Write-in-place functions */
656/**********************************************************************/
657
658int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
659 const void *val, int len);
660static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
661 const char *name, uint32_t val)
662{
663 val = cpu_to_fdt32(val);
664 return fdt_setprop_inplace(fdt, nodeoffset, name, &val, sizeof(val));
665}
666
667int fdt_nop_property(void *fdt, int nodeoffset, const char *name);
668int fdt_nop_node(void *fdt, int nodeoffset);
669
670/**********************************************************************/
671/* Sequential write functions */
672/**********************************************************************/
673
674int fdt_create(void *buf, int bufsize);
675int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size);
676int fdt_finish_reservemap(void *fdt);
677int fdt_begin_node(void *fdt, const char *name);
678int fdt_property(void *fdt, const char *name, const void *val, int len);
679static inline int fdt_property_cell(void *fdt, const char *name, uint32_t val)
680{
681 val = cpu_to_fdt32(val);
682 return fdt_property(fdt, name, &val, sizeof(val));
683}
684#define fdt_property_string(fdt, name, str) \
685 fdt_property(fdt, name, str, strlen(str)+1)
686int fdt_end_node(void *fdt);
687int fdt_finish(void *fdt);
688
689/**********************************************************************/
690/* Read-write functions */
691/**********************************************************************/
692
693int fdt_open_into(const void *fdt, void *buf, int bufsize);
694int fdt_pack(void *fdt);
695
696int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size);
697int fdt_del_mem_rsv(void *fdt, int n);
698
699int fdt_setprop(void *fdt, int nodeoffset, const char *name,
700 const void *val, int len);
701static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
702 uint32_t val)
703{
704 val = cpu_to_fdt32(val);
705 return fdt_setprop(fdt, nodeoffset, name, &val, sizeof(val));
706}
707#define fdt_setprop_string(fdt, nodeoffset, name, str) \
708 fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
709int fdt_delprop(void *fdt, int nodeoffset, const char *name);
710int fdt_add_subnode_namelen(void *fdt, int parentoffset,
711 const char *name, int namelen);
712int fdt_add_subnode(void *fdt, int parentoffset, const char *name);
713int fdt_del_node(void *fdt, int nodeoffset);
714
715/**********************************************************************/
716/* Debugging / informational functions */
717/**********************************************************************/
718
719const char *fdt_strerror(int errval);
720
721#endif /* _LIBFDT_H */
diff --git a/arch/powerpc/boot/libfdt/libfdt_internal.h b/arch/powerpc/boot/libfdt/libfdt_internal.h
new file mode 100644
index 000000000000..1e60936beb5b
--- /dev/null
+++ b/arch/powerpc/boot/libfdt/libfdt_internal.h
@@ -0,0 +1,89 @@
1#ifndef _LIBFDT_INTERNAL_H
2#define _LIBFDT_INTERNAL_H
3/*
4 * libfdt - Flat Device Tree manipulation
5 * Copyright (C) 2006 David Gibson, IBM Corporation.
6 *
7 * libfdt is dual licensed: you can use it either under the terms of
8 * the GPL, or the BSD license, at your option.
9 *
10 * a) This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This library 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
21 * License along with this library; if not, write to the Free
22 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
23 * MA 02110-1301 USA
24 *
25 * Alternatively,
26 *
27 * b) Redistribution and use in source and binary forms, with or
28 * without modification, are permitted provided that the following
29 * conditions are met:
30 *
31 * 1. Redistributions of source code must retain the above
32 * copyright notice, this list of conditions and the following
33 * disclaimer.
34 * 2. Redistributions in binary form must reproduce the above
35 * copyright notice, this list of conditions and the following
36 * disclaimer in the documentation and/or other materials
37 * provided with the distribution.
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
40 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
41 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
42 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
44 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
49 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
50 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
51 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 */
53#include <fdt.h>
54
55#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1))
56#define PALIGN(p, a) ((void *)ALIGN((unsigned long)(p), (a)))
57
58#define memeq(p, q, n) (memcmp((p), (q), (n)) == 0)
59#define streq(p, q) (strcmp((p), (q)) == 0)
60
61uint32_t _fdt_next_tag(const void *fdt, int startoffset, int *nextoffset);
62const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
63int _fdt_node_end_offset(void *fdt, int nodeoffset);
64
65static inline const void *_fdt_offset_ptr(const void *fdt, int offset)
66{
67 return fdt + fdt_off_dt_struct(fdt) + offset;
68}
69
70static inline void *_fdt_offset_ptr_w(void *fdt, int offset)
71{
72 return (void *)_fdt_offset_ptr(fdt, offset);
73}
74
75static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n)
76{
77 const struct fdt_reserve_entry *rsv_table =
78 fdt + fdt_off_mem_rsvmap(fdt);
79
80 return rsv_table + n;
81}
82static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n)
83{
84 return (void *)_fdt_mem_rsv(fdt, n);
85}
86
87#define SW_MAGIC (~FDT_MAGIC)
88
89#endif /* _LIBFDT_INTERNAL_H */
diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
new file mode 100644
index 000000000000..a4b0fc959ece
--- /dev/null
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -0,0 +1,17 @@
1#ifndef _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
2#define _ARCH_POWERPC_BOOT_LIBFDT_ENV_H
3
4#include <types.h>
5#include <string.h>
6
7typedef u32 uint32_t;
8typedef u64 uint64_t;
9
10#define fdt16_to_cpu(x) (x)
11#define cpu_to_fdt16(x) (x)
12#define fdt32_to_cpu(x) (x)
13#define cpu_to_fdt32(x) (x)
14#define fdt64_to_cpu(x) (x)
15#define cpu_to_fdt64(x) (x)
16
17#endif /* _ARCH_POWERPC_BOOT_LIBFDT_ENV_H */
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c
index 1b496b37eca0..9e7f3ddd9913 100644
--- a/arch/powerpc/boot/main.c
+++ b/arch/powerpc/boot/main.c
@@ -16,7 +16,6 @@
16#include "stdio.h" 16#include "stdio.h"
17#include "ops.h" 17#include "ops.h"
18#include "gunzip_util.h" 18#include "gunzip_util.h"
19#include "flatdevtree.h"
20#include "reg.h" 19#include "reg.h"
21 20
22static struct gunzip_state gzstate; 21static struct gunzip_state gzstate;
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index a180b6505f47..4b0544b03c64 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -46,6 +46,8 @@ struct dt_ops {
46 void *(*find_node_by_prop_value)(const void *prev, 46 void *(*find_node_by_prop_value)(const void *prev,
47 const char *propname, 47 const char *propname,
48 const char *propval, int proplen); 48 const char *propval, int proplen);
49 void *(*find_node_by_compatible)(const void *prev,
50 const char *compat);
49 unsigned long (*finalize)(void); 51 unsigned long (*finalize)(void);
50 char *(*get_path)(const void *phandle, char *buf, int len); 52 char *(*get_path)(const void *phandle, char *buf, int len);
51}; 53};
@@ -79,7 +81,7 @@ struct loader_info {
79extern struct loader_info loader_info; 81extern struct loader_info loader_info;
80 82
81void start(void); 83void start(void);
82int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); 84void fdt_init(void *blob);
83int serial_console_init(void); 85int serial_console_init(void);
84int ns16550_console_init(void *devp, struct serial_console_data *scdp); 86int ns16550_console_init(void *devp, struct serial_console_data *scdp);
85int mpsc_console_init(void *devp, struct serial_console_data *scdp); 87int mpsc_console_init(void *devp, struct serial_console_data *scdp);
@@ -159,9 +161,32 @@ static inline void *find_node_by_devtype(const void *prev,
159 return find_node_by_prop_value_str(prev, "device_type", type); 161 return find_node_by_prop_value_str(prev, "device_type", type);
160} 162}
161 163
164static inline void *find_node_by_alias(const char *alias)
165{
166 void *devp = finddevice("/aliases");
167
168 if (devp) {
169 char path[MAX_PATH_LEN];
170 if (getprop(devp, alias, path, MAX_PATH_LEN) > 0)
171 return finddevice(path);
172 }
173
174 return NULL;
175}
176
177static inline void *find_node_by_compatible(const void *prev,
178 const char *compat)
179{
180 if (dt_ops.find_node_by_compatible)
181 return dt_ops.find_node_by_compatible(prev, compat);
182
183 return NULL;
184}
185
162void dt_fixup_memory(u64 start, u64 size); 186void dt_fixup_memory(u64 start, u64 size);
163void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq); 187void dt_fixup_cpu_clocks(u32 cpufreq, u32 tbfreq, u32 busfreq);
164void dt_fixup_clock(const char *path, u32 freq); 188void dt_fixup_clock(const char *path, u32 freq);
189void dt_fixup_mac_address_by_alias(const char *alias, const u8 *addr);
165void dt_fixup_mac_address(u32 index, const u8 *addr); 190void dt_fixup_mac_address(u32 index, const u8 *addr);
166void __dt_fixup_mac_addresses(u32 startindex, ...); 191void __dt_fixup_mac_addresses(u32 startindex, ...);
167#define dt_fixup_mac_addresses(...) \ 192#define dt_fixup_mac_addresses(...) \
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
index 9614e1db9dae..05c3245b30d7 100644
--- a/arch/powerpc/boot/prpmc2800.c
+++ b/arch/powerpc/boot/prpmc2800.c
@@ -547,8 +547,7 @@ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
547 if (!dtb) 547 if (!dtb)
548 exit(); 548 exit();
549 memmove(dtb, _dtb_start, dt_size); 549 memmove(dtb, _dtb_start, dt_size);
550 if (ft_init(dtb, dt_size, 16)) 550 fdt_init(dtb);
551 exit();
552 551
553 bridge_base = mv64x60_get_bridge_base(); 552 bridge_base = mv64x60_get_bridge_base();
554 553
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index d6661151b494..3b0ac4d006ec 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -131,7 +131,7 @@ void platform_init(void)
131 printf("\n-- PS3 bootwrapper --\n"); 131 printf("\n-- PS3 bootwrapper --\n");
132 132
133 simple_alloc_init(_end, heapsize, 32, 64); 133 simple_alloc_init(_end, heapsize, 32, 64);
134 ft_init(_dtb_start, 0, 4); 134 fdt_init(_dtb_start);
135 135
136 chosen = finddevice("/chosen"); 136 chosen = finddevice("/chosen");
137 137
diff --git a/arch/powerpc/boot/redboot-8xx.c b/arch/powerpc/boot/redboot-8xx.c
new file mode 100644
index 000000000000..f7945adc8004
--- /dev/null
+++ b/arch/powerpc/boot/redboot-8xx.c
@@ -0,0 +1,58 @@
1/*
2 * RedBoot firmware support
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 *
6 * Copyright (c) 2007 Freescale Semiconductor, Inc.
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 version 2 as published
10 * by the Free Software Foundation.
11 */
12
13#include "ops.h"
14#include "stdio.h"
15#include "redboot.h"
16#include "fsl-soc.h"
17#include "io.h"
18
19static bd_t bd;
20BSS_STACK(4096);
21
22#define MHZ(x) ((x + 500000) / 1000000)
23
24static void platform_fixups(void)
25{
26 void *node;
27
28 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
29 dt_fixup_mac_addresses(bd.bi_enetaddr);
30 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq);
31
32 node = finddevice("/soc/cpm/brg");
33 if (node) {
34 printf("BRG clock-frequency <- 0x%x (%dMHz)\r\n",
35 bd.bi_busfreq, MHZ(bd.bi_busfreq));
36 setprop(node, "clock-frequency", &bd.bi_busfreq, 4);
37 }
38}
39
40void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
41 unsigned long r6, unsigned long r7)
42{
43 memcpy(&bd, (char *)r3, sizeof(bd));
44
45 if (bd.bi_tag != 0x42444944)
46 return;
47
48 simple_alloc_init(_end,
49 bd.bi_memstart + bd.bi_memsize - (unsigned long)_end,
50 32, 64);
51
52 fdt_init(_dtb_start);
53 serial_console_init();
54 platform_ops.fixups = platform_fixups;
55
56 loader_info.cmdline = (char *)bd.bi_cmdline;
57 loader_info.cmdline_len = strlen((char *)bd.bi_cmdline);
58}
diff --git a/arch/powerpc/boot/redboot.h b/arch/powerpc/boot/redboot.h
new file mode 100644
index 000000000000..ace0b7fed8eb
--- /dev/null
+++ b/arch/powerpc/boot/redboot.h
@@ -0,0 +1,56 @@
1#ifndef _PPC_REDBOOT_H
2#define _PPC_REDBOOT_H
3
4//=========================================================================
5// include/asm-ppc/redboot.h
6// Copyright (c) 2002, 2003 Gary Thomas (<gary@mlbassoc.com>
7// Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
8
9//
10// Board specific details, as provided by RedBoot
11//
12
13/* A Board Information structure that is given to a program when
14 * RedBoot starts it up. Note: not all fields make sense for all
15 * architectures and it's up to the platform specific code to fill
16 * in the details.
17 */
18typedef struct bd_info {
19 unsigned int bi_tag; /* Should be 0x42444944 "BDID" */
20 unsigned int bi_size; /* Size of this structure */
21 unsigned int bi_revision; /* revision of this structure */
22 unsigned int bi_bdate; /* bootstrap date, i.e. 0x19971106 */
23 unsigned int bi_memstart; /* Memory start address */
24 unsigned int bi_memsize; /* Memory (end) size in bytes */
25 unsigned int bi_intfreq; /* Internal Freq, in Hz */
26 unsigned int bi_busfreq; /* Bus Freq, in Hz */
27 unsigned int bi_cpmfreq; /* CPM Freq, in Hz */
28 unsigned int bi_brgfreq; /* BRG Freq, in Hz */
29 unsigned int bi_vco; /* VCO Out from PLL */
30 unsigned int bi_pci_freq; /* PCI Freq, in Hz */
31 unsigned int bi_baudrate; /* Default console baud rate */
32 unsigned int bi_immr; /* IMMR when called from boot rom */
33 unsigned char bi_enetaddr[6];
34 unsigned int bi_flashbase; /* Physical address of FLASH memory */
35 unsigned int bi_flashsize; /* Length of FLASH memory */
36 int bi_flashwidth; /* Width (8,16,32,64) */
37 unsigned char *bi_cmdline; /* Pointer to command line */
38 unsigned char bi_esa[3][6]; /* Ethernet station addresses */
39 unsigned int bi_ramdisk_begin, bi_ramdisk_end;
40 struct { /* Information about [main] video screen */
41 short x_res; /* Horizontal resolution in pixels */
42 short y_res; /* Vertical resolution in pixels */
43 short bpp; /* Bits/pixel */
44 short mode; /* Type of pixels (packed, indexed) */
45 unsigned long fb; /* Pointer to frame buffer (pixel) memory */
46 } bi_video;
47 void (*bi_cputc)(char); /* Write a character to the RedBoot console */
48 char (*bi_cgetc)(void); /* Read a character from the RedBoot console */
49 int (*bi_ctstc)(void); /* Test for input on the RedBoot console */
50} bd_t;
51
52#define BI_REV 0x0102 /* Version 1.02 */
53
54#define bi_pci_busfreq bi_pci_freq
55#define bi_immr_base bi_immr
56#endif
diff --git a/arch/powerpc/boot/reg.h b/arch/powerpc/boot/reg.h
index d3cd9ee98afb..9c2c9978e0eb 100644
--- a/arch/powerpc/boot/reg.h
+++ b/arch/powerpc/boot/reg.h
@@ -16,6 +16,14 @@ static inline u32 mfpvr(void)
16 return pvr; 16 return pvr;
17} 17}
18 18
19#define __stringify_1(x) #x
20#define __stringify(x) __stringify_1(x)
21
22#define mfspr(rn) ({unsigned long rval; \
23 asm volatile("mfspr %0," __stringify(rn) \
24 : "=r" (rval)); rval; })
25#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
26
19register void *__stack_pointer asm("r1"); 27register void *__stack_pointer asm("r1");
20#define get_sp() (__stack_pointer) 28#define get_sp() (__stack_pointer)
21 29
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index cafeece20ac7..9960421eb6b9 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -126,9 +126,10 @@ int serial_console_init(void)
126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") || 126 dt_is_compatible(devp, "fsl,cpm2-scc-uart") ||
127 dt_is_compatible(devp, "fsl,cpm2-smc-uart")) 127 dt_is_compatible(devp, "fsl,cpm2-smc-uart"))
128 rc = cpm_console_init(devp, &serial_cd); 128 rc = cpm_console_init(devp, &serial_cd);
129 else if (dt_is_compatible(devp, "mpc5200-psc-uart")) 129 else if (dt_is_compatible(devp, "fsl,mpc5200-psc-uart"))
130 rc = mpc5200_psc_console_init(devp, &serial_cd); 130 rc = mpc5200_psc_console_init(devp, &serial_cd);
131 else if (dt_is_compatible(devp, "xilinx,uartlite")) 131 else if (dt_is_compatible(devp, "xlnx,opb-uartlite-1.00.b") ||
132 dt_is_compatible(devp, "xlnx,xps-uartlite-1.00.a"))
132 rc = uartlite_console_init(devp, &serial_cd); 133 rc = uartlite_console_init(devp, &serial_cd);
133 134
134 /* Add other serial console driver calls here */ 135 /* Add other serial console driver calls here */
diff --git a/arch/powerpc/boot/treeboot-walnut.c b/arch/powerpc/boot/treeboot-walnut.c
index bb2c309d70fc..472e36605a52 100644
--- a/arch/powerpc/boot/treeboot-walnut.c
+++ b/arch/powerpc/boot/treeboot-walnut.c
@@ -20,55 +20,6 @@
20 20
21BSS_STACK(4096); 21BSS_STACK(4096);
22 22
23void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk)
24{
25 u32 pllmr = mfdcr(DCRN_CPC0_PLLMR);
26 u32 cpc0_cr0 = mfdcr(DCRN_405_CPC0_CR0);
27 u32 cpc0_cr1 = mfdcr(DCRN_405_CPC0_CR1);
28 u32 cpu, plb, opb, ebc, tb, uart0, uart1, m;
29 u32 fwdv, fbdv, cbdv, opdv, epdv, udiv;
30
31 fwdv = (8 - ((pllmr & 0xe0000000) >> 29));
32 fbdv = (pllmr & 0x1e000000) >> 25;
33 cbdv = ((pllmr & 0x00060000) >> 17) + 1;
34 opdv = ((pllmr & 0x00018000) >> 15) + 1;
35 epdv = ((pllmr & 0x00001800) >> 13) + 2;
36 udiv = ((cpc0_cr0 & 0x3e) >> 1) + 1;
37
38 m = fwdv * fbdv * cbdv;
39
40 cpu = sysclk * m / fwdv;
41 plb = cpu / cbdv;
42 opb = plb / opdv;
43 ebc = plb / epdv;
44
45 if (cpc0_cr0 & 0x80) {
46 /* uart0 uses the external clock */
47 uart0 = ser_clk;
48 } else {
49 uart0 = cpu / udiv;
50 }
51
52 if (cpc0_cr0 & 0x40) {
53 /* uart1 uses the external clock */
54 uart1 = ser_clk;
55 } else {
56 uart1 = cpu / udiv;
57 }
58
59 /* setup the timebase clock to tick at the cpu frequency */
60 cpc0_cr1 = cpc0_cr1 & ~0x00800000;
61 mtdcr(DCRN_405_CPC0_CR1, cpc0_cr1);
62 tb = cpu;
63
64 dt_fixup_cpu_clocks(cpu, tb, 0);
65 dt_fixup_clock("/plb", plb);
66 dt_fixup_clock("/plb/opb", opb);
67 dt_fixup_clock("/plb/ebc", ebc);
68 dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
69 dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
70}
71
72static void walnut_flashsel_fixup(void) 23static void walnut_flashsel_fixup(void)
73{ 24{
74 void *devp, *sram; 25 void *devp, *sram;
@@ -112,7 +63,7 @@ static void walnut_flashsel_fixup(void)
112#define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b 63#define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b
113static void walnut_fixups(void) 64static void walnut_fixups(void)
114{ 65{
115 ibm4xx_fixup_memsize(); 66 ibm4xx_sdram_fixup_memsize();
116 ibm405gp_fixup_clocks(33330000, 0xa8c000); 67 ibm405gp_fixup_clocks(33330000, 0xa8c000);
117 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL); 68 ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
118 ibm4xx_fixup_ebc_ranges("/plb/ebc"); 69 ibm4xx_fixup_ebc_ranges("/plb/ebc");
@@ -128,6 +79,6 @@ void platform_init(void)
128 simple_alloc_init(_end, avail_ram, 32, 32); 79 simple_alloc_init(_end, avail_ram, 32, 32);
129 platform_ops.fixups = walnut_fixups; 80 platform_ops.fixups = walnut_fixups;
130 platform_ops.exit = ibm40x_dbcr_reset; 81 platform_ops.exit = ibm40x_dbcr_reset;
131 ft_init(_dtb_start, _dtb_end - _dtb_start, 32); 82 fdt_init(_dtb_start);
132 serial_console_init(); 83 serial_console_init();
133} 84}
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 31147a037728..763a0c46f441 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -45,6 +45,7 @@ CROSS=
45 45
46# directory for object and other files used by this script 46# directory for object and other files used by this script
47object=arch/powerpc/boot 47object=arch/powerpc/boot
48objbin=$object
48 49
49# directory for working files 50# directory for working files
50tmpdir=. 51tmpdir=.
@@ -95,6 +96,7 @@ while [ "$#" -gt 0 ]; do
95 shift 96 shift
96 [ "$#" -gt 0 ] || usage 97 [ "$#" -gt 0 ] || usage
97 object="$1" 98 object="$1"
99 objbin="$1"
98 ;; 100 ;;
99 -W) 101 -W)
100 shift 102 shift
@@ -116,10 +118,13 @@ while [ "$#" -gt 0 ]; do
116done 118done
117 119
118if [ -n "$dts" ]; then 120if [ -n "$dts" ]; then
121 if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
122 dts="$object/dts/$dts"
123 fi
119 if [ -z "$dtb" ]; then 124 if [ -z "$dtb" ]; then
120 dtb="$platform.dtb" 125 dtb="$platform.dtb"
121 fi 126 fi
122 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" 127 $object/dtc -O dtb -o "$dtb" -b 0 "$dts"
123fi 128fi
124 129
125if [ -z "$kernel" ]; then 130if [ -z "$kernel" ]; then
@@ -163,7 +168,7 @@ ps3)
163 ksection=.kernel:vmlinux.bin 168 ksection=.kernel:vmlinux.bin
164 isection=.kernel:initrd 169 isection=.kernel:initrd
165 ;; 170 ;;
166ep88xc) 171ep88xc|ep405|redboot*|ep8248e)
167 platformo="$object/fixed-head.o $object/$platform.o" 172 platformo="$object/fixed-head.o $object/$platform.o"
168 binary=y 173 binary=y
169 ;; 174 ;;
@@ -246,11 +251,11 @@ fi
246# post-processing needed for some platforms 251# post-processing needed for some platforms
247case "$platform" in 252case "$platform" in
248pseries|chrp) 253pseries|chrp)
249 $object/addnote "$ofile" 254 $objbin/addnote "$ofile"
250 ;; 255 ;;
251coff) 256coff)
252 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" 257 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
253 $object/hack-coff "$ofile" 258 $objbin/hack-coff "$ofile"
254 ;; 259 ;;
255cuboot*) 260cuboot*)
256 gzip -f -9 "$ofile" 261 gzip -f -9 "$ofile"
@@ -259,7 +264,7 @@ cuboot*)
259 ;; 264 ;;
260treeboot*) 265treeboot*)
261 mv "$ofile" "$ofile.elf" 266 mv "$ofile" "$ofile.elf"
262 $object/mktree "$ofile.elf" "$ofile" "$base" "$entry" 267 $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry"
263 if [ -z "$cacheit" ]; then 268 if [ -z "$cacheit" ]; then
264 rm -f "$ofile.elf" 269 rm -f "$ofile.elf"
265 fi 270 fi
@@ -287,8 +292,6 @@ ps3)
287 overlay_dest="256" 292 overlay_dest="256"
288 overlay_size="256" 293 overlay_size="256"
289 294
290 rm -f "$object/otheros.bld"
291
292 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 295 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
293 296
294 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 297 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
@@ -299,6 +302,8 @@ ps3)
299 skip=$system_reset_overlay seek=$overlay_dest \ 302 skip=$system_reset_overlay seek=$overlay_dest \
300 count=$overlay_size bs=1 303 count=$overlay_size bs=1
301 304
302 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" 305 odir="$(dirname "$ofile.bin")"
306 rm -f "$odir/otheros.bld"
307 gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
303 ;; 308 ;;
304esac 309esac
diff --git a/arch/powerpc/configs/adder875-redboot_defconfig b/arch/powerpc/configs/adder875-redboot_defconfig
new file mode 100644
index 000000000000..cab5f9b64567
--- /dev/null
+++ b/arch/powerpc/configs/adder875-redboot_defconfig
@@ -0,0 +1,798 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Thu Jan 17 16:17:38 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_8xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29CONFIG_IRQ_PER_CPU=y
30CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31CONFIG_ARCH_HAS_ILOG2_U32=y
32CONFIG_GENERIC_HWEIGHT=y
33CONFIG_GENERIC_CALIBRATE_DELAY=y
34CONFIG_GENERIC_FIND_NEXT_BIT=y
35# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
36CONFIG_PPC=y
37CONFIG_EARLY_PRINTK=y
38CONFIG_GENERIC_NVRAM=y
39CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y
42CONFIG_OF=y
43# CONFIG_PPC_UDBG_16550 is not set
44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y
47# CONFIG_DEFAULT_UIMAGE is not set
48CONFIG_REDBOOT=y
49# CONFIG_PPC_DCR_NATIVE is not set
50# CONFIG_PPC_DCR_MMIO is not set
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52
53#
54# General setup
55#
56CONFIG_EXPERIMENTAL=y
57CONFIG_BROKEN_ON_SMP=y
58CONFIG_INIT_ENV_ARG_LIMIT=32
59CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y
61# CONFIG_SWAP is not set
62CONFIG_SYSVIPC=y
63CONFIG_SYSVIPC_SYSCTL=y
64# CONFIG_POSIX_MQUEUE is not set
65# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set
67# CONFIG_USER_NS is not set
68# CONFIG_PID_NS is not set
69# CONFIG_AUDIT is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set
73CONFIG_FAIR_GROUP_SCHED=y
74CONFIG_FAIR_USER_SCHED=y
75# CONFIG_FAIR_CGROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set
78# CONFIG_BLK_DEV_INITRD is not set
79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
80CONFIG_SYSCTL=y
81CONFIG_EMBEDDED=y
82# CONFIG_SYSCTL_SYSCALL is not set
83CONFIG_KALLSYMS=y
84# CONFIG_KALLSYMS_ALL is not set
85# CONFIG_KALLSYMS_EXTRA_PASS is not set
86CONFIG_HOTPLUG=y
87CONFIG_PRINTK=y
88CONFIG_BUG=y
89# CONFIG_ELF_CORE is not set
90# CONFIG_BASE_FULL is not set
91# CONFIG_FUTEX is not set
92CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_EVENTFD=y
96CONFIG_SHMEM=y
97# CONFIG_VM_EVENT_COUNTERS is not set
98CONFIG_SLUB_DEBUG=y
99# CONFIG_SLAB is not set
100CONFIG_SLUB=y
101# CONFIG_SLOB is not set
102# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=1
104# CONFIG_MODULES is not set
105CONFIG_BLOCK=y
106# CONFIG_LBD is not set
107# CONFIG_BLK_DEV_IO_TRACE is not set
108# CONFIG_LSF is not set
109# CONFIG_BLK_DEV_BSG is not set
110
111#
112# IO Schedulers
113#
114CONFIG_IOSCHED_NOOP=y
115# CONFIG_IOSCHED_AS is not set
116CONFIG_IOSCHED_DEADLINE=y
117# CONFIG_IOSCHED_CFQ is not set
118# CONFIG_DEFAULT_AS is not set
119CONFIG_DEFAULT_DEADLINE=y
120# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="deadline"
123
124#
125# Platform support
126#
127# CONFIG_PPC_MPC52xx is not set
128# CONFIG_PPC_MPC5200 is not set
129# CONFIG_PPC_CELL is not set
130# CONFIG_PPC_CELL_NATIVE is not set
131CONFIG_CPM1=y
132# CONFIG_MPC8XXFADS is not set
133# CONFIG_MPC86XADS is not set
134# CONFIG_MPC885ADS is not set
135# CONFIG_PPC_EP88XC is not set
136CONFIG_PPC_ADDER875=y
137
138#
139# MPC8xx CPM Options
140#
141
142#
143# Generic MPC8xx Options
144#
145CONFIG_8xx_COPYBACK=y
146# CONFIG_8xx_CPU6 is not set
147CONFIG_8xx_CPU15=y
148CONFIG_NO_UCODE_PATCH=y
149# CONFIG_USB_SOF_UCODE_PATCH is not set
150# CONFIG_I2C_SPI_UCODE_PATCH is not set
151# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
152# CONFIG_PQ2ADS is not set
153# CONFIG_MPIC is not set
154# CONFIG_MPIC_WEIRD is not set
155# CONFIG_PPC_I8259 is not set
156# CONFIG_PPC_RTAS is not set
157# CONFIG_MMIO_NVRAM is not set
158# CONFIG_PPC_MPC106 is not set
159# CONFIG_PPC_970_NAP is not set
160# CONFIG_PPC_INDIRECT_IO is not set
161# CONFIG_GENERIC_IOMAP is not set
162# CONFIG_CPU_FREQ is not set
163# CONFIG_CPM2 is not set
164CONFIG_PPC_CPM_NEW_BINDING=y
165# CONFIG_FSL_ULI1575 is not set
166CONFIG_CPM=y
167
168#
169# Kernel options
170#
171# CONFIG_HIGHMEM is not set
172# CONFIG_TICK_ONESHOT is not set
173# CONFIG_NO_HZ is not set
174# CONFIG_HIGH_RES_TIMERS is not set
175CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
176# CONFIG_HZ_100 is not set
177# CONFIG_HZ_250 is not set
178# CONFIG_HZ_300 is not set
179CONFIG_HZ_1000=y
180CONFIG_HZ=1000
181CONFIG_PREEMPT_NONE=y
182# CONFIG_PREEMPT_VOLUNTARY is not set
183# CONFIG_PREEMPT is not set
184CONFIG_BINFMT_ELF=y
185# CONFIG_BINFMT_MISC is not set
186# CONFIG_MATH_EMULATION is not set
187# CONFIG_8XX_MINIMAL_FPEMU is not set
188CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
189CONFIG_ARCH_FLATMEM_ENABLE=y
190CONFIG_ARCH_POPULATES_NODE_MAP=y
191CONFIG_SELECT_MEMORY_MODEL=y
192CONFIG_FLATMEM_MANUAL=y
193# CONFIG_DISCONTIGMEM_MANUAL is not set
194# CONFIG_SPARSEMEM_MANUAL is not set
195CONFIG_FLATMEM=y
196CONFIG_FLAT_NODE_MEM_MAP=y
197# CONFIG_SPARSEMEM_STATIC is not set
198# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
199CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_RESOURCES_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=1
202CONFIG_BOUNCE=y
203CONFIG_VIRT_TO_BUS=y
204# CONFIG_PROC_DEVICETREE is not set
205# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set
207CONFIG_SUSPEND_UP_POSSIBLE=y
208CONFIG_HIBERNATION_UP_POSSIBLE=y
209# CONFIG_SECCOMP is not set
210CONFIG_WANT_DEVICE_TREE=y
211CONFIG_DEVICE_TREE="adder875-redboot.dts"
212CONFIG_ISA_DMA_API=y
213
214#
215# Bus options
216#
217CONFIG_ZONE_DMA=y
218CONFIG_FSL_SOC=y
219# CONFIG_PCI is not set
220# CONFIG_PCI_DOMAINS is not set
221# CONFIG_PCI_SYSCALL is not set
222# CONFIG_PCI_QSPAN is not set
223# CONFIG_ARCH_SUPPORTS_MSI is not set
224# CONFIG_PCCARD is not set
225
226#
227# Advanced setup
228#
229# CONFIG_ADVANCED_OPTIONS is not set
230
231#
232# Default settings for advanced configuration options are used
233#
234CONFIG_HIGHMEM_START=0xfe000000
235CONFIG_LOWMEM_SIZE=0x30000000
236CONFIG_KERNEL_START=0xc0000000
237CONFIG_TASK_SIZE=0x80000000
238CONFIG_CONSISTENT_START=0xfd000000
239CONFIG_CONSISTENT_SIZE=0x00200000
240CONFIG_BOOT_LOAD=0x00400000
241
242#
243# Networking
244#
245CONFIG_NET=y
246
247#
248# Networking options
249#
250CONFIG_PACKET=y
251# CONFIG_PACKET_MMAP is not set
252CONFIG_UNIX=y
253# CONFIG_NET_KEY is not set
254CONFIG_INET=y
255CONFIG_IP_MULTICAST=y
256# CONFIG_IP_ADVANCED_ROUTER is not set
257CONFIG_IP_FIB_HASH=y
258CONFIG_IP_PNP=y
259# CONFIG_IP_PNP_DHCP is not set
260# CONFIG_IP_PNP_BOOTP is not set
261# CONFIG_IP_PNP_RARP is not set
262# CONFIG_NET_IPIP is not set
263# CONFIG_NET_IPGRE is not set
264# CONFIG_IP_MROUTE is not set
265# CONFIG_ARPD is not set
266CONFIG_SYN_COOKIES=y
267# CONFIG_INET_AH is not set
268# CONFIG_INET_ESP is not set
269# CONFIG_INET_IPCOMP is not set
270# CONFIG_INET_XFRM_TUNNEL is not set
271# CONFIG_INET_TUNNEL is not set
272# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
273# CONFIG_INET_XFRM_MODE_TUNNEL is not set
274# CONFIG_INET_XFRM_MODE_BEET is not set
275# CONFIG_INET_LRO is not set
276CONFIG_INET_DIAG=y
277CONFIG_INET_TCP_DIAG=y
278# CONFIG_TCP_CONG_ADVANCED is not set
279CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set
282# CONFIG_IPV6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set
285# CONFIG_NETWORK_SECMARK is not set
286# CONFIG_NETFILTER is not set
287# CONFIG_IP_DCCP is not set
288# CONFIG_IP_SCTP is not set
289# CONFIG_TIPC is not set
290# CONFIG_ATM is not set
291# CONFIG_BRIDGE is not set
292# CONFIG_VLAN_8021Q is not set
293# CONFIG_DECNET is not set
294# CONFIG_LLC2 is not set
295# CONFIG_IPX is not set
296# CONFIG_ATALK is not set
297# CONFIG_X25 is not set
298# CONFIG_LAPB is not set
299# CONFIG_ECONET is not set
300# CONFIG_WAN_ROUTER is not set
301# CONFIG_NET_SCHED is not set
302
303#
304# Network testing
305#
306# CONFIG_NET_PKTGEN is not set
307# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set
309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
320# CONFIG_NET_9P is not set
321
322#
323# Device Drivers
324#
325
326#
327# Generic Driver Options
328#
329CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
330CONFIG_STANDALONE=y
331CONFIG_PREVENT_FIRMWARE_BUILD=y
332# CONFIG_FW_LOADER is not set
333# CONFIG_DEBUG_DRIVER is not set
334# CONFIG_DEBUG_DEVRES is not set
335# CONFIG_SYS_HYPERVISOR is not set
336# CONFIG_CONNECTOR is not set
337CONFIG_MTD=y
338# CONFIG_MTD_DEBUG is not set
339# CONFIG_MTD_CONCAT is not set
340# CONFIG_MTD_PARTITIONS is not set
341
342#
343# User Modules And Translation Layers
344#
345CONFIG_MTD_CHAR=y
346CONFIG_MTD_BLKDEVS=y
347CONFIG_MTD_BLOCK=y
348# CONFIG_FTL is not set
349# CONFIG_NFTL is not set
350# CONFIG_INFTL is not set
351# CONFIG_RFD_FTL is not set
352# CONFIG_SSFDC is not set
353# CONFIG_MTD_OOPS is not set
354
355#
356# RAM/ROM/Flash chip drivers
357#
358CONFIG_MTD_CFI=y
359# CONFIG_MTD_JEDECPROBE is not set
360CONFIG_MTD_GEN_PROBE=y
361# CONFIG_MTD_CFI_ADV_OPTIONS is not set
362CONFIG_MTD_MAP_BANK_WIDTH_1=y
363CONFIG_MTD_MAP_BANK_WIDTH_2=y
364CONFIG_MTD_MAP_BANK_WIDTH_4=y
365# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
366# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
367# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
368CONFIG_MTD_CFI_I1=y
369CONFIG_MTD_CFI_I2=y
370# CONFIG_MTD_CFI_I4 is not set
371# CONFIG_MTD_CFI_I8 is not set
372# CONFIG_MTD_CFI_INTELEXT is not set
373CONFIG_MTD_CFI_AMDSTD=y
374# CONFIG_MTD_CFI_STAA is not set
375CONFIG_MTD_CFI_UTIL=y
376# CONFIG_MTD_RAM is not set
377# CONFIG_MTD_ROM is not set
378# CONFIG_MTD_ABSENT is not set
379
380#
381# Mapping drivers for chip access
382#
383# CONFIG_MTD_COMPLEX_MAPPINGS is not set
384# CONFIG_MTD_PHYSMAP is not set
385CONFIG_MTD_PHYSMAP_OF=y
386# CONFIG_MTD_CFI_FLAGADM is not set
387# CONFIG_MTD_PLATRAM is not set
388
389#
390# Self-contained MTD device drivers
391#
392# CONFIG_MTD_SLRAM is not set
393# CONFIG_MTD_PHRAM is not set
394# CONFIG_MTD_MTDRAM is not set
395# CONFIG_MTD_BLOCK2MTD is not set
396
397#
398# Disk-On-Chip Device Drivers
399#
400# CONFIG_MTD_DOC2000 is not set
401# CONFIG_MTD_DOC2001 is not set
402# CONFIG_MTD_DOC2001PLUS is not set
403# CONFIG_MTD_NAND is not set
404# CONFIG_MTD_ONENAND is not set
405
406#
407# UBI - Unsorted block images
408#
409# CONFIG_MTD_UBI is not set
410CONFIG_OF_DEVICE=y
411# CONFIG_PARPORT is not set
412# CONFIG_BLK_DEV is not set
413# CONFIG_MISC_DEVICES is not set
414# CONFIG_IDE is not set
415
416#
417# SCSI device support
418#
419# CONFIG_RAID_ATTRS is not set
420# CONFIG_SCSI is not set
421# CONFIG_SCSI_DMA is not set
422# CONFIG_SCSI_NETLINK is not set
423# CONFIG_ATA is not set
424# CONFIG_MD is not set
425# CONFIG_MACINTOSH_DRIVERS is not set
426CONFIG_NETDEVICES=y
427# CONFIG_NETDEVICES_MULTIQUEUE is not set
428# CONFIG_DUMMY is not set
429# CONFIG_BONDING is not set
430# CONFIG_MACVLAN is not set
431# CONFIG_EQUALIZER is not set
432# CONFIG_TUN is not set
433# CONFIG_VETH is not set
434CONFIG_PHYLIB=y
435
436#
437# MII PHY device drivers
438#
439# CONFIG_MARVELL_PHY is not set
440CONFIG_DAVICOM_PHY=y
441# CONFIG_QSEMI_PHY is not set
442# CONFIG_LXT_PHY is not set
443# CONFIG_CICADA_PHY is not set
444# CONFIG_VITESSE_PHY is not set
445# CONFIG_SMSC_PHY is not set
446# CONFIG_BROADCOM_PHY is not set
447# CONFIG_ICPLUS_PHY is not set
448# CONFIG_FIXED_PHY is not set
449# CONFIG_MDIO_BITBANG is not set
450CONFIG_NET_ETHERNET=y
451CONFIG_MII=y
452# CONFIG_IBM_NEW_EMAC_ZMII is not set
453# CONFIG_IBM_NEW_EMAC_RGMII is not set
454# CONFIG_IBM_NEW_EMAC_TAH is not set
455# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
456# CONFIG_B44 is not set
457CONFIG_FS_ENET=y
458# CONFIG_FS_ENET_HAS_SCC is not set
459CONFIG_FS_ENET_HAS_FEC=y
460CONFIG_FS_ENET_MDIO_FEC=y
461# CONFIG_NETDEV_1000 is not set
462# CONFIG_NETDEV_10000 is not set
463
464#
465# Wireless LAN
466#
467# CONFIG_WLAN_PRE80211 is not set
468# CONFIG_WLAN_80211 is not set
469# CONFIG_WAN is not set
470# CONFIG_PPP is not set
471# CONFIG_SLIP is not set
472# CONFIG_SHAPER is not set
473# CONFIG_NETCONSOLE is not set
474# CONFIG_NETPOLL is not set
475# CONFIG_NET_POLL_CONTROLLER is not set
476# CONFIG_ISDN is not set
477# CONFIG_PHONE is not set
478
479#
480# Input device support
481#
482CONFIG_INPUT=y
483# CONFIG_INPUT_FF_MEMLESS is not set
484# CONFIG_INPUT_POLLDEV is not set
485
486#
487# Userland interfaces
488#
489CONFIG_INPUT_MOUSEDEV=y
490CONFIG_INPUT_MOUSEDEV_PSAUX=y
491CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
492CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
493# CONFIG_INPUT_JOYDEV is not set
494# CONFIG_INPUT_EVDEV is not set
495# CONFIG_INPUT_EVBUG is not set
496
497#
498# Input Device Drivers
499#
500CONFIG_INPUT_KEYBOARD=y
501CONFIG_KEYBOARD_ATKBD=y
502# CONFIG_KEYBOARD_SUNKBD is not set
503# CONFIG_KEYBOARD_LKKBD is not set
504# CONFIG_KEYBOARD_XTKBD is not set
505# CONFIG_KEYBOARD_NEWTON is not set
506# CONFIG_KEYBOARD_STOWAWAY is not set
507CONFIG_INPUT_MOUSE=y
508CONFIG_MOUSE_PS2=y
509CONFIG_MOUSE_PS2_ALPS=y
510CONFIG_MOUSE_PS2_LOGIPS2PP=y
511CONFIG_MOUSE_PS2_SYNAPTICS=y
512CONFIG_MOUSE_PS2_LIFEBOOK=y
513CONFIG_MOUSE_PS2_TRACKPOINT=y
514# CONFIG_MOUSE_PS2_TOUCHKIT is not set
515# CONFIG_MOUSE_SERIAL is not set
516# CONFIG_MOUSE_VSXXXAA is not set
517# CONFIG_INPUT_JOYSTICK is not set
518# CONFIG_INPUT_TABLET is not set
519# CONFIG_INPUT_TOUCHSCREEN is not set
520# CONFIG_INPUT_MISC is not set
521
522#
523# Hardware I/O ports
524#
525CONFIG_SERIO=y
526CONFIG_SERIO_I8042=y
527CONFIG_SERIO_SERPORT=y
528CONFIG_SERIO_LIBPS2=y
529# CONFIG_SERIO_RAW is not set
530# CONFIG_GAMEPORT is not set
531
532#
533# Character devices
534#
535# CONFIG_VT is not set
536# CONFIG_SERIAL_NONSTANDARD is not set
537
538#
539# Serial drivers
540#
541# CONFIG_SERIAL_8250 is not set
542
543#
544# Non-8250 serial port support
545#
546# CONFIG_SERIAL_UARTLITE is not set
547CONFIG_SERIAL_CORE=y
548CONFIG_SERIAL_CORE_CONSOLE=y
549CONFIG_SERIAL_CPM=y
550CONFIG_SERIAL_CPM_CONSOLE=y
551# CONFIG_SERIAL_CPM_SCC1 is not set
552# CONFIG_SERIAL_CPM_SCC2 is not set
553# CONFIG_SERIAL_CPM_SCC3 is not set
554# CONFIG_SERIAL_CPM_SCC4 is not set
555CONFIG_SERIAL_CPM_SMC1=y
556CONFIG_SERIAL_CPM_SMC2=y
557CONFIG_UNIX98_PTYS=y
558# CONFIG_LEGACY_PTYS is not set
559# CONFIG_IPMI_HANDLER is not set
560CONFIG_HW_RANDOM=y
561# CONFIG_NVRAM is not set
562CONFIG_GEN_RTC=y
563# CONFIG_GEN_RTC_X is not set
564# CONFIG_R3964 is not set
565# CONFIG_RAW_DRIVER is not set
566# CONFIG_TCG_TPM is not set
567# CONFIG_I2C is not set
568
569#
570# SPI support
571#
572# CONFIG_SPI is not set
573# CONFIG_SPI_MASTER is not set
574# CONFIG_W1 is not set
575# CONFIG_POWER_SUPPLY is not set
576# CONFIG_HWMON is not set
577# CONFIG_WATCHDOG is not set
578
579#
580# Sonics Silicon Backplane
581#
582CONFIG_SSB_POSSIBLE=y
583# CONFIG_SSB is not set
584
585#
586# Multifunction device drivers
587#
588# CONFIG_MFD_SM501 is not set
589
590#
591# Multimedia devices
592#
593# CONFIG_VIDEO_DEV is not set
594# CONFIG_DVB_CORE is not set
595CONFIG_DAB=y
596
597#
598# Graphics support
599#
600# CONFIG_VGASTATE is not set
601CONFIG_VIDEO_OUTPUT_CONTROL=y
602# CONFIG_FB is not set
603# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
604
605#
606# Display device support
607#
608# CONFIG_DISPLAY_SUPPORT is not set
609
610#
611# Sound
612#
613# CONFIG_SOUND is not set
614# CONFIG_HID_SUPPORT is not set
615# CONFIG_USB_SUPPORT is not set
616# CONFIG_MMC is not set
617# CONFIG_NEW_LEDS is not set
618# CONFIG_EDAC is not set
619# CONFIG_RTC_CLASS is not set
620
621#
622# Userspace I/O
623#
624# CONFIG_UIO is not set
625
626#
627# File systems
628#
629# CONFIG_EXT2_FS is not set
630# CONFIG_EXT3_FS is not set
631# CONFIG_EXT4DEV_FS is not set
632# CONFIG_REISERFS_FS is not set
633# CONFIG_JFS_FS is not set
634# CONFIG_FS_POSIX_ACL is not set
635# CONFIG_XFS_FS is not set
636# CONFIG_GFS2_FS is not set
637# CONFIG_OCFS2_FS is not set
638# CONFIG_MINIX_FS is not set
639# CONFIG_ROMFS_FS is not set
640# CONFIG_INOTIFY is not set
641# CONFIG_QUOTA is not set
642# CONFIG_DNOTIFY is not set
643# CONFIG_AUTOFS_FS is not set
644# CONFIG_AUTOFS4_FS is not set
645# CONFIG_FUSE_FS is not set
646
647#
648# CD-ROM/DVD Filesystems
649#
650# CONFIG_ISO9660_FS is not set
651# CONFIG_UDF_FS is not set
652
653#
654# DOS/FAT/NT Filesystems
655#
656# CONFIG_MSDOS_FS is not set
657# CONFIG_VFAT_FS is not set
658# CONFIG_NTFS_FS is not set
659
660#
661# Pseudo filesystems
662#
663CONFIG_PROC_FS=y
664# CONFIG_PROC_KCORE is not set
665CONFIG_PROC_SYSCTL=y
666CONFIG_SYSFS=y
667CONFIG_TMPFS=y
668# CONFIG_TMPFS_POSIX_ACL is not set
669# CONFIG_HUGETLB_PAGE is not set
670# CONFIG_CONFIGFS_FS is not set
671
672#
673# Miscellaneous filesystems
674#
675# CONFIG_ADFS_FS is not set
676# CONFIG_AFFS_FS is not set
677# CONFIG_HFS_FS is not set
678# CONFIG_HFSPLUS_FS is not set
679# CONFIG_BEFS_FS is not set
680# CONFIG_BFS_FS is not set
681# CONFIG_EFS_FS is not set
682# CONFIG_JFFS2_FS is not set
683CONFIG_CRAMFS=y
684# CONFIG_VXFS_FS is not set
685# CONFIG_HPFS_FS is not set
686# CONFIG_QNX4FS_FS is not set
687# CONFIG_SYSV_FS is not set
688# CONFIG_UFS_FS is not set
689CONFIG_NETWORK_FILESYSTEMS=y
690CONFIG_NFS_FS=y
691CONFIG_NFS_V3=y
692# CONFIG_NFS_V3_ACL is not set
693# CONFIG_NFS_V4 is not set
694# CONFIG_NFS_DIRECTIO is not set
695# CONFIG_NFSD is not set
696CONFIG_ROOT_NFS=y
697CONFIG_LOCKD=y
698CONFIG_LOCKD_V4=y
699CONFIG_NFS_COMMON=y
700CONFIG_SUNRPC=y
701# CONFIG_SUNRPC_BIND34 is not set
702# CONFIG_RPCSEC_GSS_KRB5 is not set
703# CONFIG_RPCSEC_GSS_SPKM3 is not set
704# CONFIG_SMB_FS is not set
705# CONFIG_CIFS is not set
706# CONFIG_NCP_FS is not set
707# CONFIG_CODA_FS is not set
708# CONFIG_AFS_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# CONFIG_SYSV68_PARTITION is not set
731# CONFIG_NLS is not set
732# CONFIG_DLM is not set
733# CONFIG_UCC_SLOW is not set
734
735#
736# Library routines
737#
738# CONFIG_CRC_CCITT is not set
739# CONFIG_CRC16 is not set
740# CONFIG_CRC_ITU_T is not set
741# CONFIG_CRC32 is not set
742# CONFIG_CRC7 is not set
743# CONFIG_LIBCRC32C is not set
744CONFIG_ZLIB_INFLATE=y
745CONFIG_HAS_IOMEM=y
746CONFIG_HAS_IOPORT=y
747CONFIG_HAS_DMA=y
748CONFIG_INSTRUMENTATION=y
749# CONFIG_PROFILING is not set
750# CONFIG_MARKERS is not set
751
752#
753# Kernel hacking
754#
755# CONFIG_PRINTK_TIME is not set
756CONFIG_ENABLE_WARN_DEPRECATED=y
757CONFIG_ENABLE_MUST_CHECK=y
758CONFIG_MAGIC_SYSRQ=y
759# CONFIG_UNUSED_SYMBOLS is not set
760# CONFIG_DEBUG_FS is not set
761# CONFIG_HEADERS_CHECK is not set
762CONFIG_DEBUG_KERNEL=y
763# CONFIG_DEBUG_SHIRQ is not set
764CONFIG_DETECT_SOFTLOCKUP=y
765CONFIG_SCHED_DEBUG=y
766# CONFIG_SCHEDSTATS is not set
767# CONFIG_TIMER_STATS is not set
768# CONFIG_SLUB_DEBUG_ON is not set
769# CONFIG_DEBUG_SPINLOCK is not set
770# CONFIG_DEBUG_MUTEXES is not set
771# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
772# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
773# CONFIG_DEBUG_KOBJECT is not set
774CONFIG_DEBUG_BUGVERBOSE=y
775CONFIG_DEBUG_INFO=y
776# CONFIG_DEBUG_VM is not set
777# CONFIG_DEBUG_LIST is not set
778# CONFIG_DEBUG_SG is not set
779CONFIG_FORCED_INLINING=y
780# CONFIG_BOOT_PRINTK_DELAY is not set
781# CONFIG_FAULT_INJECTION is not set
782# CONFIG_SAMPLES is not set
783# CONFIG_DEBUG_STACKOVERFLOW is not set
784# CONFIG_DEBUG_STACK_USAGE is not set
785# CONFIG_DEBUG_PAGEALLOC is not set
786# CONFIG_DEBUGGER is not set
787# CONFIG_BDI_SWITCH is not set
788# CONFIG_PPC_EARLY_DEBUG is not set
789
790#
791# Security options
792#
793# CONFIG_KEYS is not set
794# CONFIG_SECURITY is not set
795# CONFIG_SECURITY_FILE_CAPABILITIES is not set
796# CONFIG_CRYPTO is not set
797# CONFIG_PPC_CLOCK is not set
798CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/adder875-uboot_defconfig b/arch/powerpc/configs/adder875-uboot_defconfig
new file mode 100644
index 000000000000..1faf7ef59a23
--- /dev/null
+++ b/arch/powerpc/configs/adder875-uboot_defconfig
@@ -0,0 +1,798 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Thu Jan 17 16:17:18 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13CONFIG_PPC_8xx=y
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_8xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29CONFIG_IRQ_PER_CPU=y
30CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31CONFIG_ARCH_HAS_ILOG2_U32=y
32CONFIG_GENERIC_HWEIGHT=y
33CONFIG_GENERIC_CALIBRATE_DELAY=y
34CONFIG_GENERIC_FIND_NEXT_BIT=y
35# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
36CONFIG_PPC=y
37CONFIG_EARLY_PRINTK=y
38CONFIG_GENERIC_NVRAM=y
39CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y
42CONFIG_OF=y
43# CONFIG_PPC_UDBG_16550 is not set
44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y
47# CONFIG_DEFAULT_UIMAGE is not set
48CONFIG_REDBOOT=y
49# CONFIG_PPC_DCR_NATIVE is not set
50# CONFIG_PPC_DCR_MMIO is not set
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52
53#
54# General setup
55#
56CONFIG_EXPERIMENTAL=y
57CONFIG_BROKEN_ON_SMP=y
58CONFIG_INIT_ENV_ARG_LIMIT=32
59CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y
61# CONFIG_SWAP is not set
62CONFIG_SYSVIPC=y
63CONFIG_SYSVIPC_SYSCTL=y
64# CONFIG_POSIX_MQUEUE is not set
65# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set
67# CONFIG_USER_NS is not set
68# CONFIG_PID_NS is not set
69# CONFIG_AUDIT is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set
73CONFIG_FAIR_GROUP_SCHED=y
74CONFIG_FAIR_USER_SCHED=y
75# CONFIG_FAIR_CGROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set
78# CONFIG_BLK_DEV_INITRD is not set
79# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
80CONFIG_SYSCTL=y
81CONFIG_EMBEDDED=y
82# CONFIG_SYSCTL_SYSCALL is not set
83CONFIG_KALLSYMS=y
84# CONFIG_KALLSYMS_ALL is not set
85# CONFIG_KALLSYMS_EXTRA_PASS is not set
86CONFIG_HOTPLUG=y
87CONFIG_PRINTK=y
88CONFIG_BUG=y
89# CONFIG_ELF_CORE is not set
90# CONFIG_BASE_FULL is not set
91# CONFIG_FUTEX is not set
92CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_EVENTFD=y
96CONFIG_SHMEM=y
97# CONFIG_VM_EVENT_COUNTERS is not set
98CONFIG_SLUB_DEBUG=y
99# CONFIG_SLAB is not set
100CONFIG_SLUB=y
101# CONFIG_SLOB is not set
102# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=1
104# CONFIG_MODULES is not set
105CONFIG_BLOCK=y
106# CONFIG_LBD is not set
107# CONFIG_BLK_DEV_IO_TRACE is not set
108# CONFIG_LSF is not set
109# CONFIG_BLK_DEV_BSG is not set
110
111#
112# IO Schedulers
113#
114CONFIG_IOSCHED_NOOP=y
115# CONFIG_IOSCHED_AS is not set
116CONFIG_IOSCHED_DEADLINE=y
117# CONFIG_IOSCHED_CFQ is not set
118# CONFIG_DEFAULT_AS is not set
119CONFIG_DEFAULT_DEADLINE=y
120# CONFIG_DEFAULT_CFQ is not set
121# CONFIG_DEFAULT_NOOP is not set
122CONFIG_DEFAULT_IOSCHED="deadline"
123
124#
125# Platform support
126#
127# CONFIG_PPC_MPC52xx is not set
128# CONFIG_PPC_MPC5200 is not set
129# CONFIG_PPC_CELL is not set
130# CONFIG_PPC_CELL_NATIVE is not set
131CONFIG_CPM1=y
132# CONFIG_MPC8XXFADS is not set
133# CONFIG_MPC86XADS is not set
134# CONFIG_MPC885ADS is not set
135# CONFIG_PPC_EP88XC is not set
136CONFIG_PPC_ADDER875=y
137
138#
139# MPC8xx CPM Options
140#
141
142#
143# Generic MPC8xx Options
144#
145CONFIG_8xx_COPYBACK=y
146# CONFIG_8xx_CPU6 is not set
147CONFIG_8xx_CPU15=y
148CONFIG_NO_UCODE_PATCH=y
149# CONFIG_USB_SOF_UCODE_PATCH is not set
150# CONFIG_I2C_SPI_UCODE_PATCH is not set
151# CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set
152# CONFIG_PQ2ADS is not set
153# CONFIG_MPIC is not set
154# CONFIG_MPIC_WEIRD is not set
155# CONFIG_PPC_I8259 is not set
156# CONFIG_PPC_RTAS is not set
157# CONFIG_MMIO_NVRAM is not set
158# CONFIG_PPC_MPC106 is not set
159# CONFIG_PPC_970_NAP is not set
160# CONFIG_PPC_INDIRECT_IO is not set
161# CONFIG_GENERIC_IOMAP is not set
162# CONFIG_CPU_FREQ is not set
163# CONFIG_CPM2 is not set
164CONFIG_PPC_CPM_NEW_BINDING=y
165# CONFIG_FSL_ULI1575 is not set
166CONFIG_CPM=y
167
168#
169# Kernel options
170#
171# CONFIG_HIGHMEM is not set
172# CONFIG_TICK_ONESHOT is not set
173# CONFIG_NO_HZ is not set
174# CONFIG_HIGH_RES_TIMERS is not set
175CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
176# CONFIG_HZ_100 is not set
177# CONFIG_HZ_250 is not set
178# CONFIG_HZ_300 is not set
179CONFIG_HZ_1000=y
180CONFIG_HZ=1000
181CONFIG_PREEMPT_NONE=y
182# CONFIG_PREEMPT_VOLUNTARY is not set
183# CONFIG_PREEMPT is not set
184CONFIG_BINFMT_ELF=y
185# CONFIG_BINFMT_MISC is not set
186# CONFIG_MATH_EMULATION is not set
187# CONFIG_8XX_MINIMAL_FPEMU is not set
188CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
189CONFIG_ARCH_FLATMEM_ENABLE=y
190CONFIG_ARCH_POPULATES_NODE_MAP=y
191CONFIG_SELECT_MEMORY_MODEL=y
192CONFIG_FLATMEM_MANUAL=y
193# CONFIG_DISCONTIGMEM_MANUAL is not set
194# CONFIG_SPARSEMEM_MANUAL is not set
195CONFIG_FLATMEM=y
196CONFIG_FLAT_NODE_MEM_MAP=y
197# CONFIG_SPARSEMEM_STATIC is not set
198# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
199CONFIG_SPLIT_PTLOCK_CPUS=4
200# CONFIG_RESOURCES_64BIT is not set
201CONFIG_ZONE_DMA_FLAG=1
202CONFIG_BOUNCE=y
203CONFIG_VIRT_TO_BUS=y
204# CONFIG_PROC_DEVICETREE is not set
205# CONFIG_CMDLINE_BOOL is not set
206# CONFIG_PM is not set
207CONFIG_SUSPEND_UP_POSSIBLE=y
208CONFIG_HIBERNATION_UP_POSSIBLE=y
209# CONFIG_SECCOMP is not set
210CONFIG_WANT_DEVICE_TREE=y
211CONFIG_DEVICE_TREE="adder875-uboot.dts"
212CONFIG_ISA_DMA_API=y
213
214#
215# Bus options
216#
217CONFIG_ZONE_DMA=y
218CONFIG_FSL_SOC=y
219# CONFIG_PCI is not set
220# CONFIG_PCI_DOMAINS is not set
221# CONFIG_PCI_SYSCALL is not set
222# CONFIG_PCI_QSPAN is not set
223# CONFIG_ARCH_SUPPORTS_MSI is not set
224# CONFIG_PCCARD is not set
225
226#
227# Advanced setup
228#
229# CONFIG_ADVANCED_OPTIONS is not set
230
231#
232# Default settings for advanced configuration options are used
233#
234CONFIG_HIGHMEM_START=0xfe000000
235CONFIG_LOWMEM_SIZE=0x30000000
236CONFIG_KERNEL_START=0xc0000000
237CONFIG_TASK_SIZE=0x80000000
238CONFIG_CONSISTENT_START=0xfd000000
239CONFIG_CONSISTENT_SIZE=0x00200000
240CONFIG_BOOT_LOAD=0x00400000
241
242#
243# Networking
244#
245CONFIG_NET=y
246
247#
248# Networking options
249#
250CONFIG_PACKET=y
251# CONFIG_PACKET_MMAP is not set
252CONFIG_UNIX=y
253# CONFIG_NET_KEY is not set
254CONFIG_INET=y
255CONFIG_IP_MULTICAST=y
256# CONFIG_IP_ADVANCED_ROUTER is not set
257CONFIG_IP_FIB_HASH=y
258CONFIG_IP_PNP=y
259# CONFIG_IP_PNP_DHCP is not set
260# CONFIG_IP_PNP_BOOTP is not set
261# CONFIG_IP_PNP_RARP is not set
262# CONFIG_NET_IPIP is not set
263# CONFIG_NET_IPGRE is not set
264# CONFIG_IP_MROUTE is not set
265# CONFIG_ARPD is not set
266CONFIG_SYN_COOKIES=y
267# CONFIG_INET_AH is not set
268# CONFIG_INET_ESP is not set
269# CONFIG_INET_IPCOMP is not set
270# CONFIG_INET_XFRM_TUNNEL is not set
271# CONFIG_INET_TUNNEL is not set
272# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
273# CONFIG_INET_XFRM_MODE_TUNNEL is not set
274# CONFIG_INET_XFRM_MODE_BEET is not set
275# CONFIG_INET_LRO is not set
276CONFIG_INET_DIAG=y
277CONFIG_INET_TCP_DIAG=y
278# CONFIG_TCP_CONG_ADVANCED is not set
279CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set
282# CONFIG_IPV6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set
285# CONFIG_NETWORK_SECMARK is not set
286# CONFIG_NETFILTER is not set
287# CONFIG_IP_DCCP is not set
288# CONFIG_IP_SCTP is not set
289# CONFIG_TIPC is not set
290# CONFIG_ATM is not set
291# CONFIG_BRIDGE is not set
292# CONFIG_VLAN_8021Q is not set
293# CONFIG_DECNET is not set
294# CONFIG_LLC2 is not set
295# CONFIG_IPX is not set
296# CONFIG_ATALK is not set
297# CONFIG_X25 is not set
298# CONFIG_LAPB is not set
299# CONFIG_ECONET is not set
300# CONFIG_WAN_ROUTER is not set
301# CONFIG_NET_SCHED is not set
302
303#
304# Network testing
305#
306# CONFIG_NET_PKTGEN is not set
307# CONFIG_HAMRADIO is not set
308# CONFIG_IRDA is not set
309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
320# CONFIG_NET_9P is not set
321
322#
323# Device Drivers
324#
325
326#
327# Generic Driver Options
328#
329CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
330CONFIG_STANDALONE=y
331CONFIG_PREVENT_FIRMWARE_BUILD=y
332# CONFIG_FW_LOADER is not set
333# CONFIG_DEBUG_DRIVER is not set
334# CONFIG_DEBUG_DEVRES is not set
335# CONFIG_SYS_HYPERVISOR is not set
336# CONFIG_CONNECTOR is not set
337CONFIG_MTD=y
338# CONFIG_MTD_DEBUG is not set
339# CONFIG_MTD_CONCAT is not set
340# CONFIG_MTD_PARTITIONS is not set
341
342#
343# User Modules And Translation Layers
344#
345CONFIG_MTD_CHAR=y
346CONFIG_MTD_BLKDEVS=y
347CONFIG_MTD_BLOCK=y
348# CONFIG_FTL is not set
349# CONFIG_NFTL is not set
350# CONFIG_INFTL is not set
351# CONFIG_RFD_FTL is not set
352# CONFIG_SSFDC is not set
353# CONFIG_MTD_OOPS is not set
354
355#
356# RAM/ROM/Flash chip drivers
357#
358CONFIG_MTD_CFI=y
359# CONFIG_MTD_JEDECPROBE is not set
360CONFIG_MTD_GEN_PROBE=y
361# CONFIG_MTD_CFI_ADV_OPTIONS is not set
362CONFIG_MTD_MAP_BANK_WIDTH_1=y
363CONFIG_MTD_MAP_BANK_WIDTH_2=y
364CONFIG_MTD_MAP_BANK_WIDTH_4=y
365# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
366# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
367# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
368CONFIG_MTD_CFI_I1=y
369CONFIG_MTD_CFI_I2=y
370# CONFIG_MTD_CFI_I4 is not set
371# CONFIG_MTD_CFI_I8 is not set
372# CONFIG_MTD_CFI_INTELEXT is not set
373CONFIG_MTD_CFI_AMDSTD=y
374# CONFIG_MTD_CFI_STAA is not set
375CONFIG_MTD_CFI_UTIL=y
376# CONFIG_MTD_RAM is not set
377# CONFIG_MTD_ROM is not set
378# CONFIG_MTD_ABSENT is not set
379
380#
381# Mapping drivers for chip access
382#
383# CONFIG_MTD_COMPLEX_MAPPINGS is not set
384# CONFIG_MTD_PHYSMAP is not set
385CONFIG_MTD_PHYSMAP_OF=y
386# CONFIG_MTD_CFI_FLAGADM is not set
387# CONFIG_MTD_PLATRAM is not set
388
389#
390# Self-contained MTD device drivers
391#
392# CONFIG_MTD_SLRAM is not set
393# CONFIG_MTD_PHRAM is not set
394# CONFIG_MTD_MTDRAM is not set
395# CONFIG_MTD_BLOCK2MTD is not set
396
397#
398# Disk-On-Chip Device Drivers
399#
400# CONFIG_MTD_DOC2000 is not set
401# CONFIG_MTD_DOC2001 is not set
402# CONFIG_MTD_DOC2001PLUS is not set
403# CONFIG_MTD_NAND is not set
404# CONFIG_MTD_ONENAND is not set
405
406#
407# UBI - Unsorted block images
408#
409# CONFIG_MTD_UBI is not set
410CONFIG_OF_DEVICE=y
411# CONFIG_PARPORT is not set
412# CONFIG_BLK_DEV is not set
413# CONFIG_MISC_DEVICES is not set
414# CONFIG_IDE is not set
415
416#
417# SCSI device support
418#
419# CONFIG_RAID_ATTRS is not set
420# CONFIG_SCSI is not set
421# CONFIG_SCSI_DMA is not set
422# CONFIG_SCSI_NETLINK is not set
423# CONFIG_ATA is not set
424# CONFIG_MD is not set
425# CONFIG_MACINTOSH_DRIVERS is not set
426CONFIG_NETDEVICES=y
427# CONFIG_NETDEVICES_MULTIQUEUE is not set
428# CONFIG_DUMMY is not set
429# CONFIG_BONDING is not set
430# CONFIG_MACVLAN is not set
431# CONFIG_EQUALIZER is not set
432# CONFIG_TUN is not set
433# CONFIG_VETH is not set
434CONFIG_PHYLIB=y
435
436#
437# MII PHY device drivers
438#
439# CONFIG_MARVELL_PHY is not set
440CONFIG_DAVICOM_PHY=y
441# CONFIG_QSEMI_PHY is not set
442# CONFIG_LXT_PHY is not set
443# CONFIG_CICADA_PHY is not set
444# CONFIG_VITESSE_PHY is not set
445# CONFIG_SMSC_PHY is not set
446# CONFIG_BROADCOM_PHY is not set
447# CONFIG_ICPLUS_PHY is not set
448# CONFIG_FIXED_PHY is not set
449# CONFIG_MDIO_BITBANG is not set
450CONFIG_NET_ETHERNET=y
451CONFIG_MII=y
452# CONFIG_IBM_NEW_EMAC_ZMII is not set
453# CONFIG_IBM_NEW_EMAC_RGMII is not set
454# CONFIG_IBM_NEW_EMAC_TAH is not set
455# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
456# CONFIG_B44 is not set
457CONFIG_FS_ENET=y
458# CONFIG_FS_ENET_HAS_SCC is not set
459CONFIG_FS_ENET_HAS_FEC=y
460CONFIG_FS_ENET_MDIO_FEC=y
461# CONFIG_NETDEV_1000 is not set
462# CONFIG_NETDEV_10000 is not set
463
464#
465# Wireless LAN
466#
467# CONFIG_WLAN_PRE80211 is not set
468# CONFIG_WLAN_80211 is not set
469# CONFIG_WAN is not set
470# CONFIG_PPP is not set
471# CONFIG_SLIP is not set
472# CONFIG_SHAPER is not set
473# CONFIG_NETCONSOLE is not set
474# CONFIG_NETPOLL is not set
475# CONFIG_NET_POLL_CONTROLLER is not set
476# CONFIG_ISDN is not set
477# CONFIG_PHONE is not set
478
479#
480# Input device support
481#
482CONFIG_INPUT=y
483# CONFIG_INPUT_FF_MEMLESS is not set
484# CONFIG_INPUT_POLLDEV is not set
485
486#
487# Userland interfaces
488#
489CONFIG_INPUT_MOUSEDEV=y
490CONFIG_INPUT_MOUSEDEV_PSAUX=y
491CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
492CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
493# CONFIG_INPUT_JOYDEV is not set
494# CONFIG_INPUT_EVDEV is not set
495# CONFIG_INPUT_EVBUG is not set
496
497#
498# Input Device Drivers
499#
500CONFIG_INPUT_KEYBOARD=y
501CONFIG_KEYBOARD_ATKBD=y
502# CONFIG_KEYBOARD_SUNKBD is not set
503# CONFIG_KEYBOARD_LKKBD is not set
504# CONFIG_KEYBOARD_XTKBD is not set
505# CONFIG_KEYBOARD_NEWTON is not set
506# CONFIG_KEYBOARD_STOWAWAY is not set
507CONFIG_INPUT_MOUSE=y
508CONFIG_MOUSE_PS2=y
509CONFIG_MOUSE_PS2_ALPS=y
510CONFIG_MOUSE_PS2_LOGIPS2PP=y
511CONFIG_MOUSE_PS2_SYNAPTICS=y
512CONFIG_MOUSE_PS2_LIFEBOOK=y
513CONFIG_MOUSE_PS2_TRACKPOINT=y
514# CONFIG_MOUSE_PS2_TOUCHKIT is not set
515# CONFIG_MOUSE_SERIAL is not set
516# CONFIG_MOUSE_VSXXXAA is not set
517# CONFIG_INPUT_JOYSTICK is not set
518# CONFIG_INPUT_TABLET is not set
519# CONFIG_INPUT_TOUCHSCREEN is not set
520# CONFIG_INPUT_MISC is not set
521
522#
523# Hardware I/O ports
524#
525CONFIG_SERIO=y
526CONFIG_SERIO_I8042=y
527CONFIG_SERIO_SERPORT=y
528CONFIG_SERIO_LIBPS2=y
529# CONFIG_SERIO_RAW is not set
530# CONFIG_GAMEPORT is not set
531
532#
533# Character devices
534#
535# CONFIG_VT is not set
536# CONFIG_SERIAL_NONSTANDARD is not set
537
538#
539# Serial drivers
540#
541# CONFIG_SERIAL_8250 is not set
542
543#
544# Non-8250 serial port support
545#
546# CONFIG_SERIAL_UARTLITE is not set
547CONFIG_SERIAL_CORE=y
548CONFIG_SERIAL_CORE_CONSOLE=y
549CONFIG_SERIAL_CPM=y
550CONFIG_SERIAL_CPM_CONSOLE=y
551# CONFIG_SERIAL_CPM_SCC1 is not set
552# CONFIG_SERIAL_CPM_SCC2 is not set
553# CONFIG_SERIAL_CPM_SCC3 is not set
554# CONFIG_SERIAL_CPM_SCC4 is not set
555CONFIG_SERIAL_CPM_SMC1=y
556CONFIG_SERIAL_CPM_SMC2=y
557CONFIG_UNIX98_PTYS=y
558# CONFIG_LEGACY_PTYS is not set
559# CONFIG_IPMI_HANDLER is not set
560CONFIG_HW_RANDOM=y
561# CONFIG_NVRAM is not set
562CONFIG_GEN_RTC=y
563# CONFIG_GEN_RTC_X is not set
564# CONFIG_R3964 is not set
565# CONFIG_RAW_DRIVER is not set
566# CONFIG_TCG_TPM is not set
567# CONFIG_I2C is not set
568
569#
570# SPI support
571#
572# CONFIG_SPI is not set
573# CONFIG_SPI_MASTER is not set
574# CONFIG_W1 is not set
575# CONFIG_POWER_SUPPLY is not set
576# CONFIG_HWMON is not set
577# CONFIG_WATCHDOG is not set
578
579#
580# Sonics Silicon Backplane
581#
582CONFIG_SSB_POSSIBLE=y
583# CONFIG_SSB is not set
584
585#
586# Multifunction device drivers
587#
588# CONFIG_MFD_SM501 is not set
589
590#
591# Multimedia devices
592#
593# CONFIG_VIDEO_DEV is not set
594# CONFIG_DVB_CORE is not set
595CONFIG_DAB=y
596
597#
598# Graphics support
599#
600# CONFIG_VGASTATE is not set
601CONFIG_VIDEO_OUTPUT_CONTROL=y
602# CONFIG_FB is not set
603# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
604
605#
606# Display device support
607#
608# CONFIG_DISPLAY_SUPPORT is not set
609
610#
611# Sound
612#
613# CONFIG_SOUND is not set
614# CONFIG_HID_SUPPORT is not set
615# CONFIG_USB_SUPPORT is not set
616# CONFIG_MMC is not set
617# CONFIG_NEW_LEDS is not set
618# CONFIG_EDAC is not set
619# CONFIG_RTC_CLASS is not set
620
621#
622# Userspace I/O
623#
624# CONFIG_UIO is not set
625
626#
627# File systems
628#
629# CONFIG_EXT2_FS is not set
630# CONFIG_EXT3_FS is not set
631# CONFIG_EXT4DEV_FS is not set
632# CONFIG_REISERFS_FS is not set
633# CONFIG_JFS_FS is not set
634# CONFIG_FS_POSIX_ACL is not set
635# CONFIG_XFS_FS is not set
636# CONFIG_GFS2_FS is not set
637# CONFIG_OCFS2_FS is not set
638# CONFIG_MINIX_FS is not set
639# CONFIG_ROMFS_FS is not set
640# CONFIG_INOTIFY is not set
641# CONFIG_QUOTA is not set
642# CONFIG_DNOTIFY is not set
643# CONFIG_AUTOFS_FS is not set
644# CONFIG_AUTOFS4_FS is not set
645# CONFIG_FUSE_FS is not set
646
647#
648# CD-ROM/DVD Filesystems
649#
650# CONFIG_ISO9660_FS is not set
651# CONFIG_UDF_FS is not set
652
653#
654# DOS/FAT/NT Filesystems
655#
656# CONFIG_MSDOS_FS is not set
657# CONFIG_VFAT_FS is not set
658# CONFIG_NTFS_FS is not set
659
660#
661# Pseudo filesystems
662#
663CONFIG_PROC_FS=y
664# CONFIG_PROC_KCORE is not set
665CONFIG_PROC_SYSCTL=y
666CONFIG_SYSFS=y
667CONFIG_TMPFS=y
668# CONFIG_TMPFS_POSIX_ACL is not set
669# CONFIG_HUGETLB_PAGE is not set
670# CONFIG_CONFIGFS_FS is not set
671
672#
673# Miscellaneous filesystems
674#
675# CONFIG_ADFS_FS is not set
676# CONFIG_AFFS_FS is not set
677# CONFIG_HFS_FS is not set
678# CONFIG_HFSPLUS_FS is not set
679# CONFIG_BEFS_FS is not set
680# CONFIG_BFS_FS is not set
681# CONFIG_EFS_FS is not set
682# CONFIG_JFFS2_FS is not set
683CONFIG_CRAMFS=y
684# CONFIG_VXFS_FS is not set
685# CONFIG_HPFS_FS is not set
686# CONFIG_QNX4FS_FS is not set
687# CONFIG_SYSV_FS is not set
688# CONFIG_UFS_FS is not set
689CONFIG_NETWORK_FILESYSTEMS=y
690CONFIG_NFS_FS=y
691CONFIG_NFS_V3=y
692# CONFIG_NFS_V3_ACL is not set
693# CONFIG_NFS_V4 is not set
694# CONFIG_NFS_DIRECTIO is not set
695# CONFIG_NFSD is not set
696CONFIG_ROOT_NFS=y
697CONFIG_LOCKD=y
698CONFIG_LOCKD_V4=y
699CONFIG_NFS_COMMON=y
700CONFIG_SUNRPC=y
701# CONFIG_SUNRPC_BIND34 is not set
702# CONFIG_RPCSEC_GSS_KRB5 is not set
703# CONFIG_RPCSEC_GSS_SPKM3 is not set
704# CONFIG_SMB_FS is not set
705# CONFIG_CIFS is not set
706# CONFIG_NCP_FS is not set
707# CONFIG_CODA_FS is not set
708# CONFIG_AFS_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# CONFIG_SYSV68_PARTITION is not set
731# CONFIG_NLS is not set
732# CONFIG_DLM is not set
733# CONFIG_UCC_SLOW is not set
734
735#
736# Library routines
737#
738# CONFIG_CRC_CCITT is not set
739# CONFIG_CRC16 is not set
740# CONFIG_CRC_ITU_T is not set
741# CONFIG_CRC32 is not set
742# CONFIG_CRC7 is not set
743# CONFIG_LIBCRC32C is not set
744CONFIG_ZLIB_INFLATE=y
745CONFIG_HAS_IOMEM=y
746CONFIG_HAS_IOPORT=y
747CONFIG_HAS_DMA=y
748CONFIG_INSTRUMENTATION=y
749# CONFIG_PROFILING is not set
750# CONFIG_MARKERS is not set
751
752#
753# Kernel hacking
754#
755# CONFIG_PRINTK_TIME is not set
756CONFIG_ENABLE_WARN_DEPRECATED=y
757CONFIG_ENABLE_MUST_CHECK=y
758CONFIG_MAGIC_SYSRQ=y
759# CONFIG_UNUSED_SYMBOLS is not set
760# CONFIG_DEBUG_FS is not set
761# CONFIG_HEADERS_CHECK is not set
762CONFIG_DEBUG_KERNEL=y
763# CONFIG_DEBUG_SHIRQ is not set
764CONFIG_DETECT_SOFTLOCKUP=y
765CONFIG_SCHED_DEBUG=y
766# CONFIG_SCHEDSTATS is not set
767# CONFIG_TIMER_STATS is not set
768# CONFIG_SLUB_DEBUG_ON is not set
769# CONFIG_DEBUG_SPINLOCK is not set
770# CONFIG_DEBUG_MUTEXES is not set
771# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
772# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
773# CONFIG_DEBUG_KOBJECT is not set
774CONFIG_DEBUG_BUGVERBOSE=y
775CONFIG_DEBUG_INFO=y
776# CONFIG_DEBUG_VM is not set
777# CONFIG_DEBUG_LIST is not set
778# CONFIG_DEBUG_SG is not set
779CONFIG_FORCED_INLINING=y
780# CONFIG_BOOT_PRINTK_DELAY is not set
781# CONFIG_FAULT_INJECTION is not set
782# CONFIG_SAMPLES is not set
783# CONFIG_DEBUG_STACKOVERFLOW is not set
784# CONFIG_DEBUG_STACK_USAGE is not set
785# CONFIG_DEBUG_PAGEALLOC is not set
786# CONFIG_DEBUGGER is not set
787# CONFIG_BDI_SWITCH is not set
788# CONFIG_PPC_EARLY_DEBUG is not set
789
790#
791# Security options
792#
793# CONFIG_KEYS is not set
794# CONFIG_SECURITY is not set
795# CONFIG_SECURITY_FILE_CAPABILITIES is not set
796# CONFIG_CRYPTO is not set
797# CONFIG_PPC_CLOCK is not set
798CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/bamboo_defconfig
index 76d883e008b6..1ed9afc9b281 100644
--- a/arch/powerpc/configs/bamboo_defconfig
+++ b/arch/powerpc/configs/bamboo_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:48:04 2007 4# Mon Dec 24 10:49:50 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -131,6 +131,7 @@ CONFIG_DEFAULT_AS=y
131# CONFIG_DEFAULT_CFQ is not set 131# CONFIG_DEFAULT_CFQ is not set
132# CONFIG_DEFAULT_NOOP is not set 132# CONFIG_DEFAULT_NOOP is not set
133CONFIG_DEFAULT_IOSCHED="anticipatory" 133CONFIG_DEFAULT_IOSCHED="anticipatory"
134# CONFIG_PPC4xx_PCI_EXPRESS is not set
134 135
135# 136#
136# Platform support 137# Platform support
@@ -143,6 +144,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
143CONFIG_BAMBOO=y 144CONFIG_BAMBOO=y
144# CONFIG_EBONY is not set 145# CONFIG_EBONY is not set
145# CONFIG_SEQUOIA is not set 146# CONFIG_SEQUOIA is not set
147# CONFIG_TAISHAN is not set
148# CONFIG_KATMAI is not set
149# CONFIG_RAINIER is not set
146CONFIG_440EP=y 150CONFIG_440EP=y
147CONFIG_IBM440EP_ERR42=y 151CONFIG_IBM440EP_ERR42=y
148# CONFIG_MPIC is not set 152# CONFIG_MPIC is not set
@@ -372,9 +376,7 @@ CONFIG_MISC_DEVICES=y
372# CONFIG_FIREWIRE is not set 376# CONFIG_FIREWIRE is not set
373# CONFIG_IEEE1394 is not set 377# CONFIG_IEEE1394 is not set
374# CONFIG_I2O is not set 378# CONFIG_I2O is not set
375CONFIG_MACINTOSH_DRIVERS=y 379# CONFIG_MACINTOSH_DRIVERS is not set
376# CONFIG_MAC_EMUMOUSEBTN is not set
377# CONFIG_WINDFARM is not set
378CONFIG_NETDEVICES=y 380CONFIG_NETDEVICES=y
379# CONFIG_NETDEVICES_MULTIQUEUE is not set 381# CONFIG_NETDEVICES_MULTIQUEUE is not set
380# CONFIG_DUMMY is not set 382# CONFIG_DUMMY is not set
@@ -736,19 +738,7 @@ CONFIG_DEBUGGER=y
736# CONFIG_KGDB is not set 738# CONFIG_KGDB is not set
737# CONFIG_XMON is not set 739# CONFIG_XMON is not set
738# CONFIG_BDI_SWITCH is not set 740# CONFIG_BDI_SWITCH is not set
739CONFIG_PPC_EARLY_DEBUG=y 741# CONFIG_PPC_EARLY_DEBUG is not set
740# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
741# CONFIG_PPC_EARLY_DEBUG_G5 is not set
742# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
743# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
744# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
745# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
746# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
747# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
748CONFIG_PPC_EARLY_DEBUG_44x=y
749# CONFIG_PPC_EARLY_DEBUG_CPM is not set
750CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
751CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0
752 742
753# 743#
754# Security options 744# Security options
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
index 421e08ee857a..9ed2e098f96f 100644
--- a/arch/powerpc/configs/celleb_defconfig
+++ b/arch/powerpc/configs/celleb_defconfig
@@ -50,7 +50,8 @@ CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y 50CONFIG_GENERIC_BUG=y
51# CONFIG_DEFAULT_UIMAGE is not set 51# CONFIG_DEFAULT_UIMAGE is not set
52# CONFIG_PPC_DCR_NATIVE is not set 52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set 53CONFIG_PPC_DCR_MMIO=y
54CONFIG_PPC_DCR=y
54CONFIG_PPC_OF_PLATFORM_PCI=y 55CONFIG_PPC_OF_PLATFORM_PCI=y
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
56 57
@@ -148,7 +149,7 @@ CONFIG_PPC_MULTIPLATFORM=y
148CONFIG_PPC_CELLEB=y 149CONFIG_PPC_CELLEB=y
149# CONFIG_PPC_PS3 is not set 150# CONFIG_PPC_PS3 is not set
150CONFIG_PPC_CELL=y 151CONFIG_PPC_CELL=y
151# CONFIG_PPC_CELL_NATIVE is not set 152CONFIG_PPC_CELL_NATIVE=y
152# CONFIG_PPC_IBM_CELL_BLADE is not set 153# CONFIG_PPC_IBM_CELL_BLADE is not set
153 154
154# 155#
@@ -157,13 +158,19 @@ CONFIG_PPC_CELL=y
157CONFIG_SPU_FS=y 158CONFIG_SPU_FS=y
158CONFIG_SPU_FS_64K_LS=y 159CONFIG_SPU_FS_64K_LS=y
159CONFIG_SPU_BASE=y 160CONFIG_SPU_BASE=y
161CONFIG_CBE_RAS=y
162# CONFIG_CBE_THERM is not set
160# CONFIG_PQ2ADS is not set 163# CONFIG_PQ2ADS is not set
164CONFIG_PPC_NATIVE=y
165CONFIG_UDBG_RTAS_CONSOLE=y
161CONFIG_PPC_UDBG_BEAT=y 166CONFIG_PPC_UDBG_BEAT=y
162# CONFIG_MPIC is not set 167CONFIG_MPIC=y
163# CONFIG_MPIC_WEIRD is not set 168# CONFIG_MPIC_WEIRD is not set
164# CONFIG_PPC_I8259 is not set 169# CONFIG_PPC_I8259 is not set
165# CONFIG_U3_DART is not set 170# CONFIG_U3_DART is not set
166# CONFIG_PPC_RTAS is not set 171CONFIG_PPC_RTAS=y
172# CONFIG_RTAS_ERROR_LOGGING is not set
173# CONFIG_RTAS_PROC is not set
167# CONFIG_MMIO_NVRAM is not set 174# CONFIG_MMIO_NVRAM is not set
168# CONFIG_PPC_MPC106 is not set 175# CONFIG_PPC_MPC106 is not set
169# CONFIG_PPC_970_NAP is not set 176# CONFIG_PPC_970_NAP is not set
@@ -593,10 +600,11 @@ CONFIG_MII=y
593# CONFIG_NET_VENDOR_3COM is not set 600# CONFIG_NET_VENDOR_3COM is not set
594# CONFIG_NET_TULIP is not set 601# CONFIG_NET_TULIP is not set
595# CONFIG_HP100 is not set 602# CONFIG_HP100 is not set
596# CONFIG_IBM_NEW_EMAC_ZMII is not set 603# CONFIG_IBM_NEW_EMAC is not set
597# CONFIG_IBM_NEW_EMAC_RGMII is not set 604CONFIG_IBM_NEW_EMAC_ZMII=y
598# CONFIG_IBM_NEW_EMAC_TAH is not set 605CONFIG_IBM_NEW_EMAC_RGMII=y
599# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 606CONFIG_IBM_NEW_EMAC_TAH=y
607CONFIG_IBM_NEW_EMAC_EMAC4=y
600# CONFIG_NET_PCI is not set 608# CONFIG_NET_PCI is not set
601# CONFIG_B44 is not set 609# CONFIG_B44 is not set
602CONFIG_NETDEV_1000=y 610CONFIG_NETDEV_1000=y
@@ -741,6 +749,7 @@ CONFIG_SERIAL_TXX9_CONSOLE=y
741CONFIG_UNIX98_PTYS=y 749CONFIG_UNIX98_PTYS=y
742# CONFIG_LEGACY_PTYS is not set 750# CONFIG_LEGACY_PTYS is not set
743CONFIG_HVC_DRIVER=y 751CONFIG_HVC_DRIVER=y
752CONFIG_HVC_RTAS=y
744CONFIG_HVC_BEAT=y 753CONFIG_HVC_BEAT=y
745# CONFIG_IPMI_HANDLER is not set 754# CONFIG_IPMI_HANDLER is not set
746# CONFIG_HW_RANDOM is not set 755# CONFIG_HW_RANDOM is not set
@@ -822,6 +831,7 @@ CONFIG_WATCHDOG=y
822# Watchdog Device Drivers 831# Watchdog Device Drivers
823# 832#
824# CONFIG_SOFT_WATCHDOG is not set 833# CONFIG_SOFT_WATCHDOG is not set
834# CONFIG_WATCHDOG_RTAS is not set
825 835
826# 836#
827# PCI-based Watchdog Cards 837# PCI-based Watchdog Cards
@@ -1245,17 +1255,7 @@ CONFIG_XMON_DISASSEMBLY=y
1245CONFIG_IRQSTACKS=y 1255CONFIG_IRQSTACKS=y
1246# CONFIG_VIRQ_DEBUG is not set 1256# CONFIG_VIRQ_DEBUG is not set
1247# CONFIG_BOOTX_TEXT is not set 1257# CONFIG_BOOTX_TEXT is not set
1248CONFIG_PPC_EARLY_DEBUG=y 1258# CONFIG_PPC_EARLY_DEBUG is not set
1249# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
1250# CONFIG_PPC_EARLY_DEBUG_G5 is not set
1251# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
1252# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
1253# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
1254# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
1255# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
1256CONFIG_PPC_EARLY_DEBUG_BEAT=y
1257# CONFIG_PPC_EARLY_DEBUG_44x is not set
1258# CONFIG_PPC_EARLY_DEBUG_CPM is not set
1259 1259
1260# 1260#
1261# Security options 1261# Security options
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig
index b84298ce42be..cf860f166659 100644
--- a/arch/powerpc/configs/ebony_defconfig
+++ b/arch/powerpc/configs/ebony_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:48:11 2007 4# Mon Dec 24 11:16:26 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -130,6 +130,7 @@ CONFIG_DEFAULT_AS=y
130# CONFIG_DEFAULT_CFQ is not set 130# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set 131# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory" 132CONFIG_DEFAULT_IOSCHED="anticipatory"
133# CONFIG_PPC4xx_PCI_EXPRESS is not set
133 134
134# 135#
135# Platform support 136# Platform support
@@ -142,6 +143,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
142# CONFIG_BAMBOO is not set 143# CONFIG_BAMBOO is not set
143CONFIG_EBONY=y 144CONFIG_EBONY=y
144# CONFIG_SEQUOIA is not set 145# CONFIG_SEQUOIA is not set
146# CONFIG_TAISHAN is not set
147# CONFIG_KATMAI is not set
148# CONFIG_RAINIER is not set
145CONFIG_440GP=y 149CONFIG_440GP=y
146# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
147# CONFIG_MPIC_WEIRD is not set 151# CONFIG_MPIC_WEIRD is not set
diff --git a/arch/powerpc/configs/ep405_defconfig b/arch/powerpc/configs/ep405_defconfig
new file mode 100644
index 000000000000..3829c9166256
--- /dev/null
+++ b/arch/powerpc/configs/ep405_defconfig
@@ -0,0 +1,952 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Mon Dec 24 11:17:13 2007
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14CONFIG_40x=y
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29CONFIG_IRQ_PER_CPU=y
30CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31CONFIG_ARCH_HAS_ILOG2_U32=y
32CONFIG_GENERIC_HWEIGHT=y
33CONFIG_GENERIC_CALIBRATE_DELAY=y
34CONFIG_GENERIC_FIND_NEXT_BIT=y
35# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
36CONFIG_PPC=y
37CONFIG_EARLY_PRINTK=y
38CONFIG_GENERIC_NVRAM=y
39CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y
42CONFIG_OF=y
43CONFIG_PPC_UDBG_16550=y
44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y
47# CONFIG_DEFAULT_UIMAGE is not set
48CONFIG_PPC_DCR_NATIVE=y
49# CONFIG_PPC_DCR_MMIO is not set
50CONFIG_PPC_DCR=y
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52
53#
54# General setup
55#
56CONFIG_EXPERIMENTAL=y
57CONFIG_BROKEN_ON_SMP=y
58CONFIG_INIT_ENV_ARG_LIMIT=32
59CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y
62CONFIG_SYSVIPC=y
63CONFIG_SYSVIPC_SYSCTL=y
64CONFIG_POSIX_MQUEUE=y
65# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set
67# CONFIG_USER_NS is not set
68# CONFIG_PID_NS is not set
69# CONFIG_AUDIT is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set
73CONFIG_FAIR_GROUP_SCHED=y
74CONFIG_FAIR_USER_SCHED=y
75# CONFIG_FAIR_CGROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
79CONFIG_INITRAMFS_SOURCE=""
80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
81CONFIG_SYSCTL=y
82CONFIG_EMBEDDED=y
83CONFIG_SYSCTL_SYSCALL=y
84CONFIG_KALLSYMS=y
85CONFIG_KALLSYMS_ALL=y
86CONFIG_KALLSYMS_EXTRA_PASS=y
87CONFIG_HOTPLUG=y
88CONFIG_PRINTK=y
89CONFIG_BUG=y
90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
94CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y
96CONFIG_EVENTFD=y
97CONFIG_SHMEM=y
98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLUB_DEBUG=y
100# CONFIG_SLAB is not set
101CONFIG_SLUB=y
102# CONFIG_SLOB is not set
103CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0
106CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set
109# CONFIG_MODVERSIONS is not set
110# CONFIG_MODULE_SRCVERSION_ALL is not set
111CONFIG_KMOD=y
112CONFIG_BLOCK=y
113CONFIG_LBD=y
114# CONFIG_BLK_DEV_IO_TRACE is not set
115# CONFIG_LSF is not set
116# CONFIG_BLK_DEV_BSG is not set
117
118#
119# IO Schedulers
120#
121CONFIG_IOSCHED_NOOP=y
122CONFIG_IOSCHED_AS=y
123CONFIG_IOSCHED_DEADLINE=y
124CONFIG_IOSCHED_CFQ=y
125CONFIG_DEFAULT_AS=y
126# CONFIG_DEFAULT_DEADLINE is not set
127# CONFIG_DEFAULT_CFQ is not set
128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory"
130# CONFIG_PPC4xx_PCI_EXPRESS is not set
131
132#
133# Platform support
134#
135# CONFIG_PPC_MPC52xx is not set
136# CONFIG_PPC_MPC5200 is not set
137# CONFIG_PPC_CELL is not set
138# CONFIG_PPC_CELL_NATIVE is not set
139# CONFIG_PQ2ADS is not set
140CONFIG_EP405=y
141# CONFIG_KILAUEA is not set
142# CONFIG_MAKALU is not set
143# CONFIG_WALNUT is not set
144# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
145CONFIG_405GP=y
146CONFIG_IBM405_ERR77=y
147CONFIG_IBM405_ERR51=y
148# CONFIG_MPIC is not set
149# CONFIG_MPIC_WEIRD is not set
150# CONFIG_PPC_I8259 is not set
151# CONFIG_PPC_RTAS is not set
152# CONFIG_MMIO_NVRAM is not set
153# CONFIG_PPC_MPC106 is not set
154# CONFIG_PPC_970_NAP is not set
155# CONFIG_PPC_INDIRECT_IO is not set
156# CONFIG_GENERIC_IOMAP is not set
157# CONFIG_CPU_FREQ is not set
158# CONFIG_CPM2 is not set
159# CONFIG_FSL_ULI1575 is not set
160
161#
162# Kernel options
163#
164# CONFIG_HIGHMEM is not set
165# CONFIG_TICK_ONESHOT is not set
166# CONFIG_NO_HZ is not set
167# CONFIG_HIGH_RES_TIMERS is not set
168CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
169# CONFIG_HZ_100 is not set
170CONFIG_HZ_250=y
171# CONFIG_HZ_300 is not set
172# CONFIG_HZ_1000 is not set
173CONFIG_HZ=250
174CONFIG_PREEMPT_NONE=y
175# CONFIG_PREEMPT_VOLUNTARY is not set
176# CONFIG_PREEMPT is not set
177CONFIG_BINFMT_ELF=y
178# CONFIG_BINFMT_MISC is not set
179# CONFIG_MATH_EMULATION is not set
180CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
181CONFIG_ARCH_FLATMEM_ENABLE=y
182CONFIG_ARCH_POPULATES_NODE_MAP=y
183CONFIG_SELECT_MEMORY_MODEL=y
184CONFIG_FLATMEM_MANUAL=y
185# CONFIG_DISCONTIGMEM_MANUAL is not set
186# CONFIG_SPARSEMEM_MANUAL is not set
187CONFIG_FLATMEM=y
188CONFIG_FLAT_NODE_MEM_MAP=y
189# CONFIG_SPARSEMEM_STATIC is not set
190# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
191CONFIG_SPLIT_PTLOCK_CPUS=4
192# CONFIG_RESOURCES_64BIT is not set
193CONFIG_ZONE_DMA_FLAG=1
194CONFIG_BOUNCE=y
195CONFIG_VIRT_TO_BUS=y
196CONFIG_PROC_DEVICETREE=y
197# CONFIG_CMDLINE_BOOL is not set
198# CONFIG_PM is not set
199CONFIG_SUSPEND_UP_POSSIBLE=y
200CONFIG_HIBERNATION_UP_POSSIBLE=y
201CONFIG_SECCOMP=y
202CONFIG_WANT_DEVICE_TREE=y
203CONFIG_DEVICE_TREE="ep405.dts"
204CONFIG_ISA_DMA_API=y
205
206#
207# Bus options
208#
209CONFIG_ZONE_DMA=y
210CONFIG_PPC_INDIRECT_PCI=y
211CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y
213CONFIG_PCI_SYSCALL=y
214# CONFIG_PCIEPORTBUS is not set
215CONFIG_ARCH_SUPPORTS_MSI=y
216# CONFIG_PCI_MSI is not set
217CONFIG_PCI_LEGACY=y
218# CONFIG_PCI_DEBUG is not set
219# CONFIG_PCCARD is not set
220# CONFIG_HOTPLUG_PCI is not set
221
222#
223# Advanced setup
224#
225# CONFIG_ADVANCED_OPTIONS is not set
226
227#
228# Default settings for advanced configuration options are used
229#
230CONFIG_HIGHMEM_START=0xfe000000
231CONFIG_LOWMEM_SIZE=0x30000000
232CONFIG_KERNEL_START=0xc0000000
233CONFIG_TASK_SIZE=0xc0000000
234CONFIG_CONSISTENT_START=0xff100000
235CONFIG_CONSISTENT_SIZE=0x00200000
236CONFIG_BOOT_LOAD=0x00400000
237
238#
239# Networking
240#
241CONFIG_NET=y
242
243#
244# Networking options
245#
246CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y
249# CONFIG_NET_KEY is not set
250CONFIG_INET=y
251# CONFIG_IP_MULTICAST is not set
252# CONFIG_IP_ADVANCED_ROUTER is not set
253CONFIG_IP_FIB_HASH=y
254CONFIG_IP_PNP=y
255CONFIG_IP_PNP_DHCP=y
256CONFIG_IP_PNP_BOOTP=y
257# CONFIG_IP_PNP_RARP is not set
258# CONFIG_NET_IPIP is not set
259# CONFIG_NET_IPGRE is not set
260# CONFIG_ARPD is not set
261# CONFIG_SYN_COOKIES is not set
262# CONFIG_INET_AH is not set
263# CONFIG_INET_ESP is not set
264# CONFIG_INET_IPCOMP is not set
265# CONFIG_INET_XFRM_TUNNEL is not set
266# CONFIG_INET_TUNNEL is not set
267# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
268# CONFIG_INET_XFRM_MODE_TUNNEL is not set
269# CONFIG_INET_XFRM_MODE_BEET is not set
270# CONFIG_INET_LRO is not set
271CONFIG_INET_DIAG=y
272CONFIG_INET_TCP_DIAG=y
273# CONFIG_TCP_CONG_ADVANCED is not set
274CONFIG_TCP_CONG_CUBIC=y
275CONFIG_DEFAULT_TCP_CONG="cubic"
276# CONFIG_TCP_MD5SIG is not set
277# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set
280# CONFIG_NETWORK_SECMARK is not set
281# CONFIG_NETFILTER is not set
282# CONFIG_IP_DCCP is not set
283# CONFIG_IP_SCTP is not set
284# CONFIG_TIPC is not set
285# CONFIG_ATM is not set
286# CONFIG_BRIDGE is not set
287# CONFIG_VLAN_8021Q is not set
288# CONFIG_DECNET is not set
289# CONFIG_LLC2 is not set
290# CONFIG_IPX is not set
291# CONFIG_ATALK is not set
292# CONFIG_X25 is not set
293# CONFIG_LAPB is not set
294# CONFIG_ECONET is not set
295# CONFIG_WAN_ROUTER is not set
296# CONFIG_NET_SCHED is not set
297
298#
299# Network testing
300#
301# CONFIG_NET_PKTGEN is not set
302# CONFIG_HAMRADIO is not set
303# CONFIG_IRDA is not set
304# CONFIG_BT is not set
305# CONFIG_AF_RXRPC is not set
306
307#
308# Wireless
309#
310# CONFIG_CFG80211 is not set
311# CONFIG_WIRELESS_EXT is not set
312# CONFIG_MAC80211 is not set
313# CONFIG_IEEE80211 is not set
314# CONFIG_RFKILL is not set
315# CONFIG_NET_9P is not set
316
317#
318# Device Drivers
319#
320
321#
322# Generic Driver Options
323#
324CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
325CONFIG_STANDALONE=y
326CONFIG_PREVENT_FIRMWARE_BUILD=y
327CONFIG_FW_LOADER=y
328# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set
331CONFIG_CONNECTOR=y
332CONFIG_PROC_EVENTS=y
333CONFIG_MTD=y
334# CONFIG_MTD_DEBUG is not set
335# CONFIG_MTD_CONCAT is not set
336CONFIG_MTD_PARTITIONS=y
337# CONFIG_MTD_REDBOOT_PARTS is not set
338CONFIG_MTD_CMDLINE_PARTS=y
339
340#
341# User Modules And Translation Layers
342#
343CONFIG_MTD_CHAR=y
344CONFIG_MTD_BLKDEVS=m
345CONFIG_MTD_BLOCK=m
346# CONFIG_MTD_BLOCK_RO is not set
347# CONFIG_FTL is not set
348# CONFIG_NFTL is not set
349# CONFIG_INFTL is not set
350# CONFIG_RFD_FTL is not set
351# CONFIG_SSFDC is not set
352# CONFIG_MTD_OOPS is not set
353
354#
355# RAM/ROM/Flash chip drivers
356#
357CONFIG_MTD_CFI=y
358CONFIG_MTD_JEDECPROBE=y
359CONFIG_MTD_GEN_PROBE=y
360# CONFIG_MTD_CFI_ADV_OPTIONS is not set
361CONFIG_MTD_MAP_BANK_WIDTH_1=y
362CONFIG_MTD_MAP_BANK_WIDTH_2=y
363CONFIG_MTD_MAP_BANK_WIDTH_4=y
364# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
365# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
366# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
367CONFIG_MTD_CFI_I1=y
368CONFIG_MTD_CFI_I2=y
369# CONFIG_MTD_CFI_I4 is not set
370# CONFIG_MTD_CFI_I8 is not set
371# CONFIG_MTD_CFI_INTELEXT is not set
372CONFIG_MTD_CFI_AMDSTD=y
373# CONFIG_MTD_CFI_STAA is not set
374CONFIG_MTD_CFI_UTIL=y
375# CONFIG_MTD_RAM is not set
376# CONFIG_MTD_ROM is not set
377# CONFIG_MTD_ABSENT is not set
378
379#
380# Mapping drivers for chip access
381#
382# CONFIG_MTD_COMPLEX_MAPPINGS is not set
383# CONFIG_MTD_PHYSMAP is not set
384CONFIG_MTD_PHYSMAP_OF=y
385# CONFIG_MTD_INTEL_VR_NOR is not set
386# CONFIG_MTD_PLATRAM is not set
387
388#
389# Self-contained MTD device drivers
390#
391# CONFIG_MTD_PMC551 is not set
392# CONFIG_MTD_SLRAM is not set
393# CONFIG_MTD_PHRAM is not set
394# CONFIG_MTD_MTDRAM is not set
395# CONFIG_MTD_BLOCK2MTD is not set
396
397#
398# Disk-On-Chip Device Drivers
399#
400# CONFIG_MTD_DOC2000 is not set
401# CONFIG_MTD_DOC2001 is not set
402# CONFIG_MTD_DOC2001PLUS is not set
403# CONFIG_MTD_NAND is not set
404# CONFIG_MTD_ONENAND is not set
405
406#
407# UBI - Unsorted block images
408#
409# CONFIG_MTD_UBI is not set
410CONFIG_OF_DEVICE=y
411# CONFIG_PARPORT is not set
412CONFIG_BLK_DEV=y
413# CONFIG_BLK_DEV_FD is not set
414# CONFIG_BLK_CPQ_DA is not set
415# CONFIG_BLK_CPQ_CISS_DA is not set
416# CONFIG_BLK_DEV_DAC960 is not set
417# CONFIG_BLK_DEV_UMEM is not set
418# CONFIG_BLK_DEV_COW_COMMON is not set
419# CONFIG_BLK_DEV_LOOP is not set
420# CONFIG_BLK_DEV_NBD is not set
421# CONFIG_BLK_DEV_SX8 is not set
422# CONFIG_BLK_DEV_UB is not set
423CONFIG_BLK_DEV_RAM=y
424CONFIG_BLK_DEV_RAM_COUNT=16
425CONFIG_BLK_DEV_RAM_SIZE=35000
426CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
427# CONFIG_CDROM_PKTCDVD is not set
428# CONFIG_ATA_OVER_ETH is not set
429# CONFIG_XILINX_SYSACE is not set
430CONFIG_MISC_DEVICES=y
431# CONFIG_PHANTOM is not set
432# CONFIG_EEPROM_93CX6 is not set
433# CONFIG_SGI_IOC4 is not set
434# CONFIG_TIFM_CORE is not set
435# CONFIG_IDE is not set
436
437#
438# SCSI device support
439#
440# CONFIG_RAID_ATTRS is not set
441# CONFIG_SCSI is not set
442# CONFIG_SCSI_DMA is not set
443# CONFIG_SCSI_NETLINK is not set
444# CONFIG_ATA is not set
445# CONFIG_MD is not set
446# CONFIG_FUSION is not set
447
448#
449# IEEE 1394 (FireWire) support
450#
451# CONFIG_FIREWIRE is not set
452# CONFIG_IEEE1394 is not set
453# CONFIG_I2O is not set
454# CONFIG_MACINTOSH_DRIVERS is not set
455CONFIG_NETDEVICES=y
456# CONFIG_NETDEVICES_MULTIQUEUE is not set
457# CONFIG_DUMMY is not set
458# CONFIG_BONDING is not set
459# CONFIG_MACVLAN is not set
460# CONFIG_EQUALIZER is not set
461# CONFIG_TUN is not set
462# CONFIG_VETH is not set
463# CONFIG_IP1000 is not set
464# CONFIG_ARCNET is not set
465# CONFIG_PHYLIB is not set
466CONFIG_NET_ETHERNET=y
467# CONFIG_MII is not set
468# CONFIG_HAPPYMEAL is not set
469# CONFIG_SUNGEM is not set
470# CONFIG_CASSINI is not set
471# CONFIG_NET_VENDOR_3COM is not set
472# CONFIG_NET_TULIP is not set
473# CONFIG_HP100 is not set
474CONFIG_IBM_NEW_EMAC=y
475CONFIG_IBM_NEW_EMAC_RXB=128
476CONFIG_IBM_NEW_EMAC_TXB=64
477CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
478CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
479CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
480# CONFIG_IBM_NEW_EMAC_DEBUG is not set
481CONFIG_IBM_NEW_EMAC_ZMII=y
482# CONFIG_IBM_NEW_EMAC_RGMII is not set
483# CONFIG_IBM_NEW_EMAC_TAH is not set
484# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
485# CONFIG_NET_PCI is not set
486# CONFIG_B44 is not set
487CONFIG_NETDEV_1000=y
488# CONFIG_ACENIC is not set
489# CONFIG_DL2K is not set
490# CONFIG_E1000 is not set
491# CONFIG_E1000E is not set
492# CONFIG_NS83820 is not set
493# CONFIG_HAMACHI is not set
494# CONFIG_YELLOWFIN is not set
495# CONFIG_R8169 is not set
496# CONFIG_SIS190 is not set
497# CONFIG_SKGE is not set
498# CONFIG_SKY2 is not set
499# CONFIG_SK98LIN is not set
500# CONFIG_VIA_VELOCITY is not set
501# CONFIG_TIGON3 is not set
502# CONFIG_BNX2 is not set
503# CONFIG_QLA3XXX is not set
504# CONFIG_ATL1 is not set
505CONFIG_NETDEV_10000=y
506# CONFIG_CHELSIO_T1 is not set
507# CONFIG_CHELSIO_T3 is not set
508# CONFIG_IXGBE is not set
509# CONFIG_IXGB is not set
510# CONFIG_S2IO is not set
511# CONFIG_MYRI10GE is not set
512# CONFIG_NETXEN_NIC is not set
513# CONFIG_NIU is not set
514# CONFIG_MLX4_CORE is not set
515# CONFIG_TEHUTI is not set
516# CONFIG_TR is not set
517
518#
519# Wireless LAN
520#
521# CONFIG_WLAN_PRE80211 is not set
522# CONFIG_WLAN_80211 is not set
523
524#
525# USB Network Adapters
526#
527# CONFIG_USB_CATC is not set
528# CONFIG_USB_KAWETH is not set
529# CONFIG_USB_PEGASUS is not set
530# CONFIG_USB_RTL8150 is not set
531# CONFIG_USB_USBNET is not set
532# CONFIG_WAN is not set
533# CONFIG_FDDI is not set
534# CONFIG_HIPPI is not set
535# CONFIG_PPP is not set
536# CONFIG_SLIP is not set
537# CONFIG_SHAPER is not set
538# CONFIG_NETCONSOLE is not set
539# CONFIG_NETPOLL is not set
540# CONFIG_NET_POLL_CONTROLLER is not set
541# CONFIG_ISDN is not set
542# CONFIG_PHONE is not set
543
544#
545# Input device support
546#
547# CONFIG_INPUT is not set
548
549#
550# Hardware I/O ports
551#
552# CONFIG_SERIO is not set
553# CONFIG_GAMEPORT is not set
554
555#
556# Character devices
557#
558# CONFIG_VT is not set
559# CONFIG_SERIAL_NONSTANDARD is not set
560
561#
562# Serial drivers
563#
564CONFIG_SERIAL_8250=y
565CONFIG_SERIAL_8250_CONSOLE=y
566CONFIG_SERIAL_8250_PCI=y
567CONFIG_SERIAL_8250_NR_UARTS=4
568CONFIG_SERIAL_8250_RUNTIME_UARTS=4
569CONFIG_SERIAL_8250_EXTENDED=y
570# CONFIG_SERIAL_8250_MANY_PORTS is not set
571CONFIG_SERIAL_8250_SHARE_IRQ=y
572# CONFIG_SERIAL_8250_DETECT_IRQ is not set
573# CONFIG_SERIAL_8250_RSA is not set
574
575#
576# Non-8250 serial port support
577#
578# CONFIG_SERIAL_UARTLITE is not set
579CONFIG_SERIAL_CORE=y
580CONFIG_SERIAL_CORE_CONSOLE=y
581# CONFIG_SERIAL_JSM is not set
582CONFIG_SERIAL_OF_PLATFORM=y
583CONFIG_UNIX98_PTYS=y
584CONFIG_LEGACY_PTYS=y
585CONFIG_LEGACY_PTY_COUNT=256
586# CONFIG_IPMI_HANDLER is not set
587# CONFIG_HW_RANDOM is not set
588# CONFIG_NVRAM is not set
589# CONFIG_GEN_RTC is not set
590# CONFIG_R3964 is not set
591# CONFIG_APPLICOM is not set
592# CONFIG_RAW_DRIVER is not set
593# CONFIG_TCG_TPM is not set
594CONFIG_DEVPORT=y
595# CONFIG_I2C is not set
596
597#
598# SPI support
599#
600# CONFIG_SPI is not set
601# CONFIG_SPI_MASTER is not set
602# CONFIG_W1 is not set
603# CONFIG_POWER_SUPPLY is not set
604# CONFIG_HWMON is not set
605# CONFIG_WATCHDOG is not set
606
607#
608# Sonics Silicon Backplane
609#
610CONFIG_SSB_POSSIBLE=y
611# CONFIG_SSB is not set
612
613#
614# Multifunction device drivers
615#
616# CONFIG_MFD_SM501 is not set
617
618#
619# Multimedia devices
620#
621# CONFIG_VIDEO_DEV is not set
622# CONFIG_DVB_CORE is not set
623# CONFIG_DAB is not set
624
625#
626# Graphics support
627#
628# CONFIG_AGP is not set
629# CONFIG_DRM is not set
630# CONFIG_VGASTATE is not set
631CONFIG_VIDEO_OUTPUT_CONTROL=m
632# CONFIG_FB is not set
633# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
634
635#
636# Display device support
637#
638# CONFIG_DISPLAY_SUPPORT is not set
639
640#
641# Sound
642#
643# CONFIG_SOUND is not set
644CONFIG_USB_SUPPORT=y
645CONFIG_USB_ARCH_HAS_HCD=y
646CONFIG_USB_ARCH_HAS_OHCI=y
647CONFIG_USB_ARCH_HAS_EHCI=y
648CONFIG_USB=y
649# CONFIG_USB_DEBUG is not set
650
651#
652# Miscellaneous USB options
653#
654CONFIG_USB_DEVICEFS=y
655CONFIG_USB_DEVICE_CLASS=y
656# CONFIG_USB_DYNAMIC_MINORS is not set
657# CONFIG_USB_OTG is not set
658
659#
660# USB Host Controller Drivers
661#
662# CONFIG_USB_EHCI_HCD is not set
663# CONFIG_USB_ISP116X_HCD is not set
664CONFIG_USB_OHCI_HCD=y
665CONFIG_USB_OHCI_HCD_PPC_OF=y
666CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
667CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
668CONFIG_USB_OHCI_HCD_PCI=y
669CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
670CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
671CONFIG_USB_OHCI_LITTLE_ENDIAN=y
672# CONFIG_USB_UHCI_HCD is not set
673# CONFIG_USB_SL811_HCD is not set
674# CONFIG_USB_R8A66597_HCD is not set
675
676#
677# USB Device Class drivers
678#
679# CONFIG_USB_ACM is not set
680# CONFIG_USB_PRINTER is not set
681
682#
683# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
684#
685
686#
687# may also be needed; see USB_STORAGE Help for more information
688#
689# CONFIG_USB_LIBUSUAL is not set
690
691#
692# USB Imaging devices
693#
694# CONFIG_USB_MDC800 is not set
695CONFIG_USB_MON=y
696
697#
698# USB port drivers
699#
700
701#
702# USB Serial Converter support
703#
704# CONFIG_USB_SERIAL is not set
705
706#
707# USB Miscellaneous drivers
708#
709# CONFIG_USB_EMI62 is not set
710# CONFIG_USB_EMI26 is not set
711# CONFIG_USB_ADUTUX is not set
712# CONFIG_USB_AUERSWALD is not set
713# CONFIG_USB_RIO500 is not set
714# CONFIG_USB_LEGOTOWER is not set
715# CONFIG_USB_LCD is not set
716# CONFIG_USB_BERRY_CHARGE is not set
717# CONFIG_USB_LED is not set
718# CONFIG_USB_CYPRESS_CY7C63 is not set
719# CONFIG_USB_CYTHERM is not set
720# CONFIG_USB_PHIDGET is not set
721# CONFIG_USB_IDMOUSE is not set
722# CONFIG_USB_FTDI_ELAN is not set
723# CONFIG_USB_APPLEDISPLAY is not set
724# CONFIG_USB_LD is not set
725# CONFIG_USB_TRANCEVIBRATOR is not set
726# CONFIG_USB_IOWARRIOR is not set
727# CONFIG_USB_TEST is not set
728
729#
730# USB DSL modem support
731#
732
733#
734# USB Gadget Support
735#
736# CONFIG_USB_GADGET is not set
737# CONFIG_MMC is not set
738# CONFIG_NEW_LEDS is not set
739# CONFIG_INFINIBAND is not set
740# CONFIG_EDAC is not set
741# CONFIG_RTC_CLASS is not set
742
743#
744# Userspace I/O
745#
746# CONFIG_UIO is not set
747
748#
749# File systems
750#
751CONFIG_EXT2_FS=y
752# CONFIG_EXT2_FS_XATTR is not set
753# CONFIG_EXT2_FS_XIP is not set
754# CONFIG_EXT3_FS is not set
755# CONFIG_EXT4DEV_FS is not set
756# CONFIG_REISERFS_FS is not set
757# CONFIG_JFS_FS is not set
758# CONFIG_FS_POSIX_ACL is not set
759# CONFIG_XFS_FS is not set
760# CONFIG_GFS2_FS is not set
761# CONFIG_OCFS2_FS is not set
762# CONFIG_MINIX_FS is not set
763# CONFIG_ROMFS_FS is not set
764CONFIG_INOTIFY=y
765CONFIG_INOTIFY_USER=y
766# CONFIG_QUOTA is not set
767CONFIG_DNOTIFY=y
768# CONFIG_AUTOFS_FS is not set
769# CONFIG_AUTOFS4_FS is not set
770# CONFIG_FUSE_FS is not set
771
772#
773# CD-ROM/DVD Filesystems
774#
775# CONFIG_ISO9660_FS is not set
776# CONFIG_UDF_FS is not set
777
778#
779# DOS/FAT/NT Filesystems
780#
781# CONFIG_MSDOS_FS is not set
782# CONFIG_VFAT_FS is not set
783# CONFIG_NTFS_FS is not set
784
785#
786# Pseudo filesystems
787#
788CONFIG_PROC_FS=y
789CONFIG_PROC_KCORE=y
790CONFIG_PROC_SYSCTL=y
791CONFIG_SYSFS=y
792CONFIG_TMPFS=y
793# CONFIG_TMPFS_POSIX_ACL is not set
794# CONFIG_HUGETLB_PAGE is not set
795# CONFIG_CONFIGFS_FS is not set
796
797#
798# Miscellaneous filesystems
799#
800# CONFIG_ADFS_FS is not set
801# CONFIG_AFFS_FS is not set
802# CONFIG_HFS_FS is not set
803# CONFIG_HFSPLUS_FS is not set
804# CONFIG_BEFS_FS is not set
805# CONFIG_BFS_FS is not set
806# CONFIG_EFS_FS is not set
807# CONFIG_JFFS2_FS is not set
808CONFIG_CRAMFS=y
809# CONFIG_VXFS_FS is not set
810# CONFIG_HPFS_FS is not set
811# CONFIG_QNX4FS_FS is not set
812# CONFIG_SYSV_FS is not set
813# CONFIG_UFS_FS is not set
814CONFIG_NETWORK_FILESYSTEMS=y
815CONFIG_NFS_FS=y
816CONFIG_NFS_V3=y
817# CONFIG_NFS_V3_ACL is not set
818# CONFIG_NFS_V4 is not set
819# CONFIG_NFS_DIRECTIO is not set
820# CONFIG_NFSD is not set
821CONFIG_ROOT_NFS=y
822CONFIG_LOCKD=y
823CONFIG_LOCKD_V4=y
824CONFIG_NFS_COMMON=y
825CONFIG_SUNRPC=y
826# CONFIG_SUNRPC_BIND34 is not set
827# CONFIG_RPCSEC_GSS_KRB5 is not set
828# CONFIG_RPCSEC_GSS_SPKM3 is not set
829# CONFIG_SMB_FS is not set
830# CONFIG_CIFS is not set
831# CONFIG_NCP_FS is not set
832# CONFIG_CODA_FS is not set
833# CONFIG_AFS_FS is not set
834
835#
836# Partition Types
837#
838# CONFIG_PARTITION_ADVANCED is not set
839CONFIG_MSDOS_PARTITION=y
840# CONFIG_NLS is not set
841# CONFIG_DLM is not set
842# CONFIG_UCC_SLOW is not set
843
844#
845# Library routines
846#
847CONFIG_BITREVERSE=y
848# CONFIG_CRC_CCITT is not set
849# CONFIG_CRC16 is not set
850# CONFIG_CRC_ITU_T is not set
851CONFIG_CRC32=y
852# CONFIG_CRC7 is not set
853# CONFIG_LIBCRC32C is not set
854CONFIG_ZLIB_INFLATE=y
855CONFIG_PLIST=y
856CONFIG_HAS_IOMEM=y
857CONFIG_HAS_IOPORT=y
858CONFIG_HAS_DMA=y
859CONFIG_INSTRUMENTATION=y
860# CONFIG_PROFILING is not set
861# CONFIG_KPROBES is not set
862# CONFIG_MARKERS is not set
863
864#
865# Kernel hacking
866#
867# CONFIG_PRINTK_TIME is not set
868CONFIG_ENABLE_WARN_DEPRECATED=y
869CONFIG_ENABLE_MUST_CHECK=y
870CONFIG_MAGIC_SYSRQ=y
871# CONFIG_UNUSED_SYMBOLS is not set
872# CONFIG_DEBUG_FS is not set
873# CONFIG_HEADERS_CHECK is not set
874CONFIG_DEBUG_KERNEL=y
875# CONFIG_DEBUG_SHIRQ is not set
876CONFIG_DETECT_SOFTLOCKUP=y
877CONFIG_SCHED_DEBUG=y
878# CONFIG_SCHEDSTATS is not set
879# CONFIG_TIMER_STATS is not set
880# CONFIG_SLUB_DEBUG_ON is not set
881# CONFIG_DEBUG_RT_MUTEXES is not set
882# CONFIG_RT_MUTEX_TESTER is not set
883# CONFIG_DEBUG_SPINLOCK is not set
884# CONFIG_DEBUG_MUTEXES is not set
885# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
886# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
887# CONFIG_DEBUG_KOBJECT is not set
888CONFIG_DEBUG_BUGVERBOSE=y
889# CONFIG_DEBUG_INFO is not set
890# CONFIG_DEBUG_VM is not set
891# CONFIG_DEBUG_LIST is not set
892# CONFIG_DEBUG_SG is not set
893CONFIG_FORCED_INLINING=y
894# CONFIG_BOOT_PRINTK_DELAY is not set
895# CONFIG_RCU_TORTURE_TEST is not set
896# CONFIG_FAULT_INJECTION is not set
897# CONFIG_SAMPLES is not set
898# CONFIG_DEBUG_STACKOVERFLOW is not set
899# CONFIG_DEBUG_STACK_USAGE is not set
900# CONFIG_DEBUG_PAGEALLOC is not set
901# CONFIG_DEBUGGER is not set
902# CONFIG_BDI_SWITCH is not set
903# CONFIG_PPC_EARLY_DEBUG is not set
904
905#
906# Security options
907#
908# CONFIG_KEYS is not set
909# CONFIG_SECURITY is not set
910# CONFIG_SECURITY_FILE_CAPABILITIES is not set
911CONFIG_CRYPTO=y
912CONFIG_CRYPTO_ALGAPI=y
913CONFIG_CRYPTO_BLKCIPHER=y
914CONFIG_CRYPTO_MANAGER=y
915# CONFIG_CRYPTO_HMAC is not set
916# CONFIG_CRYPTO_XCBC is not set
917# CONFIG_CRYPTO_NULL is not set
918# CONFIG_CRYPTO_MD4 is not set
919CONFIG_CRYPTO_MD5=y
920# CONFIG_CRYPTO_SHA1 is not set
921# CONFIG_CRYPTO_SHA256 is not set
922# CONFIG_CRYPTO_SHA512 is not set
923# CONFIG_CRYPTO_WP512 is not set
924# CONFIG_CRYPTO_TGR192 is not set
925# CONFIG_CRYPTO_GF128MUL is not set
926CONFIG_CRYPTO_ECB=y
927CONFIG_CRYPTO_CBC=y
928CONFIG_CRYPTO_PCBC=y
929# CONFIG_CRYPTO_LRW is not set
930# CONFIG_CRYPTO_XTS is not set
931# CONFIG_CRYPTO_CRYPTD is not set
932CONFIG_CRYPTO_DES=y
933# CONFIG_CRYPTO_FCRYPT is not set
934# CONFIG_CRYPTO_BLOWFISH is not set
935# CONFIG_CRYPTO_TWOFISH is not set
936# CONFIG_CRYPTO_SERPENT is not set
937# CONFIG_CRYPTO_AES is not set
938# CONFIG_CRYPTO_CAST5 is not set
939# CONFIG_CRYPTO_CAST6 is not set
940# CONFIG_CRYPTO_TEA is not set
941# CONFIG_CRYPTO_ARC4 is not set
942# CONFIG_CRYPTO_KHAZAD is not set
943# CONFIG_CRYPTO_ANUBIS is not set
944# CONFIG_CRYPTO_SEED is not set
945# CONFIG_CRYPTO_DEFLATE is not set
946# CONFIG_CRYPTO_MICHAEL_MIC is not set
947# CONFIG_CRYPTO_CRC32C is not set
948# CONFIG_CRYPTO_CAMELLIA is not set
949# CONFIG_CRYPTO_TEST is not set
950# CONFIG_CRYPTO_AUTHENC is not set
951CONFIG_CRYPTO_HW=y
952# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/ep8248e_defconfig
new file mode 100644
index 000000000000..01ad5951ade9
--- /dev/null
+++ b/arch/powerpc/configs/ep8248e_defconfig
@@ -0,0 +1,821 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Fri Jan 11 14:02:06 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
22CONFIG_PPC32=y
23CONFIG_WORD_SIZE=32
24CONFIG_PPC_MERGE=y
25CONFIG_MMU=y
26CONFIG_GENERIC_CMOS_UPDATE=y
27CONFIG_GENERIC_TIME=y
28CONFIG_GENERIC_TIME_VSYSCALL=y
29CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y
31CONFIG_IRQ_PER_CPU=y
32CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33CONFIG_ARCH_HAS_ILOG2_U32=y
34CONFIG_GENERIC_HWEIGHT=y
35CONFIG_GENERIC_CALIBRATE_DELAY=y
36CONFIG_GENERIC_FIND_NEXT_BIT=y
37# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
38CONFIG_PPC=y
39CONFIG_EARLY_PRINTK=y
40CONFIG_GENERIC_NVRAM=y
41CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
42CONFIG_ARCH_MAY_HAVE_PC_FDC=y
43CONFIG_PPC_OF=y
44CONFIG_OF=y
45# CONFIG_PPC_UDBG_16550 is not set
46# CONFIG_GENERIC_TBSYNC is not set
47CONFIG_AUDIT_ARCH=y
48CONFIG_GENERIC_BUG=y
49# CONFIG_DEFAULT_UIMAGE is not set
50# CONFIG_PPC_DCR_NATIVE is not set
51# CONFIG_PPC_DCR_MMIO is not set
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53
54#
55# General setup
56#
57# CONFIG_EXPERIMENTAL is not set
58CONFIG_BROKEN_ON_SMP=y
59CONFIG_INIT_ENV_ARG_LIMIT=32
60CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y
63CONFIG_SYSVIPC=y
64CONFIG_SYSVIPC_SYSCTL=y
65# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set
67# CONFIG_AUDIT is not set
68CONFIG_IKCONFIG=y
69CONFIG_IKCONFIG_PROC=y
70CONFIG_LOG_BUF_SHIFT=14
71# CONFIG_CGROUPS is not set
72CONFIG_FAIR_GROUP_SCHED=y
73CONFIG_FAIR_USER_SCHED=y
74# CONFIG_FAIR_CGROUP_SCHED is not set
75CONFIG_SYSFS_DEPRECATED=y
76# CONFIG_RELAY is not set
77# CONFIG_BLK_DEV_INITRD is not set
78CONFIG_SYSCTL=y
79CONFIG_EMBEDDED=y
80CONFIG_SYSCTL_SYSCALL=y
81CONFIG_KALLSYMS=y
82CONFIG_KALLSYMS_ALL=y
83# CONFIG_KALLSYMS_EXTRA_PASS is not set
84CONFIG_HOTPLUG=y
85CONFIG_PRINTK=y
86CONFIG_BUG=y
87CONFIG_ELF_CORE=y
88CONFIG_BASE_FULL=y
89CONFIG_FUTEX=y
90CONFIG_ANON_INODES=y
91CONFIG_EPOLL=y
92CONFIG_SIGNALFD=y
93CONFIG_EVENTFD=y
94CONFIG_SHMEM=y
95CONFIG_VM_EVENT_COUNTERS=y
96CONFIG_SLAB=y
97# CONFIG_SLUB is not set
98# CONFIG_SLOB is not set
99CONFIG_RT_MUTEXES=y
100# CONFIG_TINY_SHMEM is not set
101CONFIG_BASE_SMALL=0
102# CONFIG_MODULES is not set
103CONFIG_BLOCK=y
104# CONFIG_LBD is not set
105# CONFIG_BLK_DEV_IO_TRACE is not set
106# CONFIG_LSF is not set
107
108#
109# IO Schedulers
110#
111CONFIG_IOSCHED_NOOP=y
112# CONFIG_IOSCHED_AS is not set
113CONFIG_IOSCHED_DEADLINE=y
114# CONFIG_IOSCHED_CFQ is not set
115# CONFIG_DEFAULT_AS is not set
116CONFIG_DEFAULT_DEADLINE=y
117# CONFIG_DEFAULT_CFQ is not set
118# CONFIG_DEFAULT_NOOP is not set
119CONFIG_DEFAULT_IOSCHED="deadline"
120
121#
122# Platform support
123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125CONFIG_PPC_82xx=y
126# CONFIG_PPC_83xx is not set
127# CONFIG_PPC_86xx is not set
128# CONFIG_PPC_MPC52xx is not set
129# CONFIG_PPC_MPC5200 is not set
130# CONFIG_PPC_CELL is not set
131# CONFIG_PPC_CELL_NATIVE is not set
132# CONFIG_MPC8272_ADS is not set
133# CONFIG_PQ2FADS is not set
134CONFIG_EP8248E=y
135# CONFIG_PQ2ADS is not set
136CONFIG_8260=y
137CONFIG_8272=y
138# CONFIG_MPIC is not set
139# CONFIG_MPIC_WEIRD is not set
140# CONFIG_PPC_I8259 is not set
141# CONFIG_PPC_RTAS is not set
142# CONFIG_MMIO_NVRAM is not set
143# CONFIG_PPC_MPC106 is not set
144# CONFIG_PPC_970_NAP is not set
145# CONFIG_PPC_INDIRECT_IO is not set
146# CONFIG_GENERIC_IOMAP is not set
147# CONFIG_CPU_FREQ is not set
148CONFIG_CPM2=y
149CONFIG_PPC_CPM_NEW_BINDING=y
150# CONFIG_FSL_ULI1575 is not set
151CONFIG_CPM=y
152
153#
154# Kernel options
155#
156# CONFIG_HIGHMEM is not set
157# CONFIG_TICK_ONESHOT is not set
158# CONFIG_NO_HZ is not set
159# CONFIG_HIGH_RES_TIMERS is not set
160CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
161# CONFIG_HZ_100 is not set
162CONFIG_HZ_250=y
163# CONFIG_HZ_300 is not set
164# CONFIG_HZ_1000 is not set
165CONFIG_HZ=250
166CONFIG_PREEMPT_NONE=y
167# CONFIG_PREEMPT_VOLUNTARY is not set
168# CONFIG_PREEMPT is not set
169CONFIG_BINFMT_ELF=y
170CONFIG_BINFMT_MISC=y
171CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
172CONFIG_ARCH_FLATMEM_ENABLE=y
173CONFIG_ARCH_POPULATES_NODE_MAP=y
174CONFIG_FLATMEM=y
175CONFIG_FLAT_NODE_MEM_MAP=y
176# CONFIG_SPARSEMEM_STATIC is not set
177# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
178CONFIG_SPLIT_PTLOCK_CPUS=4
179# CONFIG_RESOURCES_64BIT is not set
180CONFIG_ZONE_DMA_FLAG=1
181CONFIG_BOUNCE=y
182CONFIG_VIRT_TO_BUS=y
183CONFIG_PROC_DEVICETREE=y
184# CONFIG_CMDLINE_BOOL is not set
185# CONFIG_PM is not set
186CONFIG_SUSPEND_UP_POSSIBLE=y
187CONFIG_HIBERNATION_UP_POSSIBLE=y
188# CONFIG_SECCOMP is not set
189CONFIG_WANT_DEVICE_TREE=y
190CONFIG_DEVICE_TREE="ep8248e.dts"
191CONFIG_ISA_DMA_API=y
192
193#
194# Bus options
195#
196CONFIG_ZONE_DMA=y
197CONFIG_FSL_SOC=y
198# CONFIG_PCI is not set
199# CONFIG_PCI_DOMAINS is not set
200# CONFIG_PCI_SYSCALL is not set
201# CONFIG_ARCH_SUPPORTS_MSI is not set
202# CONFIG_PCCARD is not set
203
204#
205# Advanced setup
206#
207# CONFIG_ADVANCED_OPTIONS is not set
208
209#
210# Default settings for advanced configuration options are used
211#
212CONFIG_HIGHMEM_START=0xfe000000
213CONFIG_LOWMEM_SIZE=0x30000000
214CONFIG_KERNEL_START=0xc0000000
215CONFIG_TASK_SIZE=0xc0000000
216CONFIG_BOOT_LOAD=0x00400000
217
218#
219# Networking
220#
221CONFIG_NET=y
222
223#
224# Networking options
225#
226CONFIG_PACKET=y
227# CONFIG_PACKET_MMAP is not set
228CONFIG_UNIX=y
229CONFIG_XFRM=y
230# CONFIG_XFRM_USER is not set
231# CONFIG_NET_KEY is not set
232CONFIG_INET=y
233CONFIG_IP_MULTICAST=y
234# CONFIG_IP_ADVANCED_ROUTER is not set
235CONFIG_IP_FIB_HASH=y
236CONFIG_IP_PNP=y
237CONFIG_IP_PNP_DHCP=y
238CONFIG_IP_PNP_BOOTP=y
239# CONFIG_IP_PNP_RARP is not set
240# CONFIG_NET_IPIP is not set
241# CONFIG_NET_IPGRE is not set
242# CONFIG_IP_MROUTE is not set
243CONFIG_SYN_COOKIES=y
244# CONFIG_INET_AH is not set
245# CONFIG_INET_ESP is not set
246# CONFIG_INET_IPCOMP is not set
247# CONFIG_INET_XFRM_TUNNEL is not set
248CONFIG_INET_TUNNEL=y
249CONFIG_INET_XFRM_MODE_TRANSPORT=y
250CONFIG_INET_XFRM_MODE_TUNNEL=y
251CONFIG_INET_XFRM_MODE_BEET=y
252# CONFIG_INET_LRO is not set
253CONFIG_INET_DIAG=y
254CONFIG_INET_TCP_DIAG=y
255# CONFIG_TCP_CONG_ADVANCED is not set
256CONFIG_TCP_CONG_CUBIC=y
257CONFIG_DEFAULT_TCP_CONG="cubic"
258# CONFIG_IP_VS is not set
259CONFIG_IPV6=y
260# CONFIG_IPV6_PRIVACY is not set
261# CONFIG_IPV6_ROUTER_PREF is not set
262# CONFIG_INET6_AH is not set
263# CONFIG_INET6_ESP is not set
264# CONFIG_INET6_IPCOMP is not set
265# CONFIG_INET6_XFRM_TUNNEL is not set
266# CONFIG_INET6_TUNNEL is not set
267CONFIG_INET6_XFRM_MODE_TRANSPORT=y
268CONFIG_INET6_XFRM_MODE_TUNNEL=y
269CONFIG_INET6_XFRM_MODE_BEET=y
270CONFIG_IPV6_SIT=y
271# CONFIG_IPV6_TUNNEL is not set
272# CONFIG_NETWORK_SECMARK is not set
273CONFIG_NETFILTER=y
274# CONFIG_NETFILTER_DEBUG is not set
275
276#
277# Core Netfilter Configuration
278#
279# CONFIG_NETFILTER_NETLINK is not set
280# CONFIG_NF_CONNTRACK_ENABLED is not set
281# CONFIG_NF_CONNTRACK is not set
282# CONFIG_NETFILTER_XTABLES is not set
283
284#
285# IP: Netfilter Configuration
286#
287# CONFIG_IP_NF_QUEUE is not set
288# CONFIG_IP_NF_IPTABLES is not set
289# CONFIG_IP_NF_ARPTABLES is not set
290# CONFIG_BRIDGE is not set
291# CONFIG_VLAN_8021Q is not set
292# CONFIG_DECNET is not set
293# CONFIG_LLC2 is not set
294# CONFIG_IPX is not set
295# CONFIG_ATALK is not set
296# CONFIG_NET_SCHED is not set
297
298#
299# Network testing
300#
301# CONFIG_NET_PKTGEN is not set
302# CONFIG_HAMRADIO is not set
303# CONFIG_IRDA is not set
304# CONFIG_BT is not set
305
306#
307# Wireless
308#
309# CONFIG_CFG80211 is not set
310# CONFIG_WIRELESS_EXT is not set
311# CONFIG_IEEE80211 is not set
312# CONFIG_RFKILL is not set
313
314#
315# Device Drivers
316#
317
318#
319# Generic Driver Options
320#
321CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
322CONFIG_STANDALONE=y
323CONFIG_PREVENT_FIRMWARE_BUILD=y
324# CONFIG_FW_LOADER is not set
325# CONFIG_DEBUG_DRIVER is not set
326# CONFIG_DEBUG_DEVRES is not set
327# CONFIG_SYS_HYPERVISOR is not set
328# CONFIG_CONNECTOR is not set
329CONFIG_MTD=y
330# CONFIG_MTD_DEBUG is not set
331# CONFIG_MTD_CONCAT is not set
332# CONFIG_MTD_PARTITIONS is not set
333
334#
335# User Modules And Translation Layers
336#
337CONFIG_MTD_CHAR=y
338CONFIG_MTD_BLKDEVS=y
339CONFIG_MTD_BLOCK=y
340# CONFIG_FTL is not set
341# CONFIG_NFTL is not set
342# CONFIG_INFTL is not set
343# CONFIG_RFD_FTL is not set
344# CONFIG_SSFDC is not set
345# CONFIG_MTD_OOPS is not set
346
347#
348# RAM/ROM/Flash chip drivers
349#
350CONFIG_MTD_CFI=y
351# CONFIG_MTD_JEDECPROBE is not set
352CONFIG_MTD_GEN_PROBE=y
353CONFIG_MTD_CFI_ADV_OPTIONS=y
354CONFIG_MTD_CFI_NOSWAP=y
355# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
356# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
357CONFIG_MTD_CFI_GEOMETRY=y
358# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
359# CONFIG_MTD_MAP_BANK_WIDTH_2 is not set
360CONFIG_MTD_MAP_BANK_WIDTH_4=y
361# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
362# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
363# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
364# CONFIG_MTD_CFI_I1 is not set
365CONFIG_MTD_CFI_I2=y
366# CONFIG_MTD_CFI_I4 is not set
367# CONFIG_MTD_CFI_I8 is not set
368# CONFIG_MTD_OTP is not set
369# CONFIG_MTD_CFI_INTELEXT is not set
370CONFIG_MTD_CFI_AMDSTD=y
371# CONFIG_MTD_CFI_STAA is not set
372CONFIG_MTD_CFI_UTIL=y
373# CONFIG_MTD_RAM is not set
374# CONFIG_MTD_ROM is not set
375# CONFIG_MTD_ABSENT is not set
376
377#
378# Mapping drivers for chip access
379#
380# CONFIG_MTD_COMPLEX_MAPPINGS is not set
381# CONFIG_MTD_PHYSMAP is not set
382CONFIG_MTD_PHYSMAP_OF=y
383# CONFIG_MTD_PLATRAM is not set
384
385#
386# Self-contained MTD device drivers
387#
388# CONFIG_MTD_SLRAM is not set
389# CONFIG_MTD_PHRAM is not set
390# CONFIG_MTD_MTDRAM is not set
391# CONFIG_MTD_BLOCK2MTD is not set
392
393#
394# Disk-On-Chip Device Drivers
395#
396# CONFIG_MTD_DOC2000 is not set
397# CONFIG_MTD_DOC2001 is not set
398# CONFIG_MTD_DOC2001PLUS is not set
399# CONFIG_MTD_NAND is not set
400# CONFIG_MTD_ONENAND is not set
401
402#
403# UBI - Unsorted block images
404#
405# CONFIG_MTD_UBI is not set
406CONFIG_OF_DEVICE=y
407# CONFIG_PARPORT is not set
408CONFIG_BLK_DEV=y
409# CONFIG_BLK_DEV_FD is not set
410# CONFIG_BLK_DEV_COW_COMMON is not set
411CONFIG_BLK_DEV_LOOP=y
412# CONFIG_BLK_DEV_CRYPTOLOOP is not set
413# CONFIG_BLK_DEV_NBD is not set
414# CONFIG_BLK_DEV_RAM is not set
415# CONFIG_CDROM_PKTCDVD is not set
416# CONFIG_ATA_OVER_ETH is not set
417# CONFIG_MISC_DEVICES is not set
418# CONFIG_IDE is not set
419
420#
421# SCSI device support
422#
423# CONFIG_RAID_ATTRS is not set
424# CONFIG_SCSI is not set
425# CONFIG_SCSI_DMA is not set
426# CONFIG_SCSI_NETLINK is not set
427# CONFIG_ATA is not set
428# CONFIG_MD is not set
429# CONFIG_MACINTOSH_DRIVERS is not set
430CONFIG_NETDEVICES=y
431# CONFIG_NETDEVICES_MULTIQUEUE is not set
432# CONFIG_DUMMY is not set
433# CONFIG_BONDING is not set
434# CONFIG_EQUALIZER is not set
435# CONFIG_TUN is not set
436# CONFIG_VETH is not set
437CONFIG_PHYLIB=y
438
439#
440# MII PHY device drivers
441#
442# CONFIG_MARVELL_PHY is not set
443CONFIG_DAVICOM_PHY=y
444# CONFIG_QSEMI_PHY is not set
445# CONFIG_LXT_PHY is not set
446# CONFIG_CICADA_PHY is not set
447# CONFIG_VITESSE_PHY is not set
448# CONFIG_SMSC_PHY is not set
449# CONFIG_BROADCOM_PHY is not set
450# CONFIG_ICPLUS_PHY is not set
451# CONFIG_FIXED_PHY is not set
452CONFIG_MDIO_BITBANG=y
453CONFIG_NET_ETHERNET=y
454CONFIG_MII=y
455# CONFIG_IBM_NEW_EMAC_ZMII is not set
456# CONFIG_IBM_NEW_EMAC_RGMII is not set
457# CONFIG_IBM_NEW_EMAC_TAH is not set
458# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
459# CONFIG_B44 is not set
460CONFIG_FS_ENET=y
461# CONFIG_FS_ENET_HAS_SCC is not set
462CONFIG_FS_ENET_HAS_FCC=y
463# CONFIG_FS_ENET_MDIO_FCC is not set
464CONFIG_NETDEV_1000=y
465CONFIG_NETDEV_10000=y
466
467#
468# Wireless LAN
469#
470# CONFIG_WLAN_PRE80211 is not set
471# CONFIG_WLAN_80211 is not set
472# CONFIG_WAN is not set
473# CONFIG_PPP is not set
474# CONFIG_SLIP is not set
475# CONFIG_NETPOLL is not set
476# CONFIG_NET_POLL_CONTROLLER is not set
477# CONFIG_ISDN is not set
478# CONFIG_PHONE is not set
479
480#
481# Input device support
482#
483# CONFIG_INPUT is not set
484
485#
486# Hardware I/O ports
487#
488# CONFIG_SERIO is not set
489# CONFIG_GAMEPORT is not set
490
491#
492# Character devices
493#
494# CONFIG_VT is not set
495# CONFIG_SERIAL_NONSTANDARD is not set
496
497#
498# Serial drivers
499#
500# CONFIG_SERIAL_8250 is not set
501
502#
503# Non-8250 serial port support
504#
505# CONFIG_SERIAL_UARTLITE is not set
506CONFIG_SERIAL_CORE=y
507CONFIG_SERIAL_CORE_CONSOLE=y
508CONFIG_SERIAL_CPM=y
509CONFIG_SERIAL_CPM_CONSOLE=y
510CONFIG_SERIAL_CPM_SCC1=y
511# CONFIG_SERIAL_CPM_SCC2 is not set
512# CONFIG_SERIAL_CPM_SCC3 is not set
513CONFIG_SERIAL_CPM_SCC4=y
514# CONFIG_SERIAL_CPM_SMC1 is not set
515# CONFIG_SERIAL_CPM_SMC2 is not set
516CONFIG_UNIX98_PTYS=y
517CONFIG_LEGACY_PTYS=y
518CONFIG_LEGACY_PTY_COUNT=256
519# CONFIG_IPMI_HANDLER is not set
520CONFIG_HW_RANDOM=y
521# CONFIG_NVRAM is not set
522# CONFIG_GEN_RTC is not set
523# CONFIG_R3964 is not set
524# CONFIG_RAW_DRIVER is not set
525# CONFIG_I2C is not set
526
527#
528# SPI support
529#
530# CONFIG_SPI is not set
531# CONFIG_SPI_MASTER is not set
532# CONFIG_W1 is not set
533# CONFIG_POWER_SUPPLY is not set
534# CONFIG_HWMON is not set
535# CONFIG_WATCHDOG is not set
536
537#
538# Sonics Silicon Backplane
539#
540CONFIG_SSB_POSSIBLE=y
541# CONFIG_SSB is not set
542
543#
544# Multifunction device drivers
545#
546# CONFIG_MFD_SM501 is not set
547
548#
549# Multimedia devices
550#
551# CONFIG_VIDEO_DEV is not set
552# CONFIG_DVB_CORE is not set
553CONFIG_DAB=y
554
555#
556# Graphics support
557#
558# CONFIG_VGASTATE is not set
559# CONFIG_VIDEO_OUTPUT_CONTROL is not set
560# CONFIG_FB is not set
561# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
562
563#
564# Display device support
565#
566# CONFIG_DISPLAY_SUPPORT is not set
567
568#
569# Sound
570#
571# CONFIG_SOUND is not set
572# CONFIG_USB_SUPPORT is not set
573# CONFIG_MMC is not set
574# CONFIG_NEW_LEDS is not set
575# CONFIG_RTC_CLASS is not set
576
577#
578# Userspace I/O
579#
580# CONFIG_UIO is not set
581
582#
583# File systems
584#
585CONFIG_EXT2_FS=y
586# CONFIG_EXT2_FS_XATTR is not set
587# CONFIG_EXT2_FS_XIP is not set
588CONFIG_EXT3_FS=y
589# CONFIG_EXT3_FS_XATTR is not set
590CONFIG_JBD=y
591# CONFIG_REISERFS_FS is not set
592# CONFIG_JFS_FS is not set
593# CONFIG_FS_POSIX_ACL is not set
594# CONFIG_XFS_FS is not set
595# CONFIG_OCFS2_FS is not set
596# CONFIG_MINIX_FS is not set
597# CONFIG_ROMFS_FS is not set
598CONFIG_INOTIFY=y
599CONFIG_INOTIFY_USER=y
600# CONFIG_QUOTA is not set
601CONFIG_DNOTIFY=y
602# CONFIG_AUTOFS_FS is not set
603CONFIG_AUTOFS4_FS=y
604# CONFIG_FUSE_FS is not set
605
606#
607# CD-ROM/DVD Filesystems
608#
609# CONFIG_ISO9660_FS is not set
610# CONFIG_UDF_FS is not set
611
612#
613# DOS/FAT/NT Filesystems
614#
615# CONFIG_MSDOS_FS is not set
616# CONFIG_VFAT_FS is not set
617# CONFIG_NTFS_FS is not set
618
619#
620# Pseudo filesystems
621#
622CONFIG_PROC_FS=y
623CONFIG_PROC_KCORE=y
624CONFIG_PROC_SYSCTL=y
625CONFIG_SYSFS=y
626CONFIG_TMPFS=y
627# CONFIG_TMPFS_POSIX_ACL is not set
628# CONFIG_HUGETLB_PAGE is not set
629
630#
631# Miscellaneous filesystems
632#
633# CONFIG_HFSPLUS_FS is not set
634# CONFIG_JFFS2_FS is not set
635CONFIG_CRAMFS=y
636# CONFIG_VXFS_FS is not set
637# CONFIG_HPFS_FS is not set
638# CONFIG_QNX4FS_FS is not set
639# CONFIG_SYSV_FS is not set
640# CONFIG_UFS_FS is not set
641CONFIG_NETWORK_FILESYSTEMS=y
642CONFIG_NFS_FS=y
643CONFIG_NFS_V3=y
644# CONFIG_NFS_V3_ACL is not set
645# CONFIG_NFS_DIRECTIO is not set
646# CONFIG_NFSD is not set
647CONFIG_ROOT_NFS=y
648CONFIG_LOCKD=y
649CONFIG_LOCKD_V4=y
650CONFIG_NFS_COMMON=y
651CONFIG_SUNRPC=y
652# CONFIG_SMB_FS is not set
653# CONFIG_CIFS is not set
654# CONFIG_NCP_FS is not set
655# CONFIG_CODA_FS is not set
656
657#
658# Partition Types
659#
660CONFIG_PARTITION_ADVANCED=y
661# CONFIG_ACORN_PARTITION is not set
662# CONFIG_OSF_PARTITION is not set
663# CONFIG_AMIGA_PARTITION is not set
664# CONFIG_ATARI_PARTITION is not set
665# CONFIG_MAC_PARTITION is not set
666CONFIG_MSDOS_PARTITION=y
667# CONFIG_BSD_DISKLABEL is not set
668# CONFIG_MINIX_SUBPARTITION is not set
669# CONFIG_SOLARIS_X86_PARTITION is not set
670# CONFIG_UNIXWARE_DISKLABEL is not set
671# CONFIG_LDM_PARTITION is not set
672# CONFIG_SGI_PARTITION is not set
673# CONFIG_ULTRIX_PARTITION is not set
674# CONFIG_SUN_PARTITION is not set
675# CONFIG_KARMA_PARTITION is not set
676# CONFIG_EFI_PARTITION is not set
677# CONFIG_SYSV68_PARTITION is not set
678CONFIG_NLS=y
679CONFIG_NLS_DEFAULT="iso8859-1"
680CONFIG_NLS_CODEPAGE_437=y
681# CONFIG_NLS_CODEPAGE_737 is not set
682# CONFIG_NLS_CODEPAGE_775 is not set
683# CONFIG_NLS_CODEPAGE_850 is not set
684# CONFIG_NLS_CODEPAGE_852 is not set
685# CONFIG_NLS_CODEPAGE_855 is not set
686# CONFIG_NLS_CODEPAGE_857 is not set
687# CONFIG_NLS_CODEPAGE_860 is not set
688# CONFIG_NLS_CODEPAGE_861 is not set
689# CONFIG_NLS_CODEPAGE_862 is not set
690# CONFIG_NLS_CODEPAGE_863 is not set
691# CONFIG_NLS_CODEPAGE_864 is not set
692# CONFIG_NLS_CODEPAGE_865 is not set
693# CONFIG_NLS_CODEPAGE_866 is not set
694# CONFIG_NLS_CODEPAGE_869 is not set
695# CONFIG_NLS_CODEPAGE_936 is not set
696# CONFIG_NLS_CODEPAGE_950 is not set
697# CONFIG_NLS_CODEPAGE_932 is not set
698# CONFIG_NLS_CODEPAGE_949 is not set
699# CONFIG_NLS_CODEPAGE_874 is not set
700# CONFIG_NLS_ISO8859_8 is not set
701# CONFIG_NLS_CODEPAGE_1250 is not set
702# CONFIG_NLS_CODEPAGE_1251 is not set
703CONFIG_NLS_ASCII=y
704CONFIG_NLS_ISO8859_1=y
705# CONFIG_NLS_ISO8859_2 is not set
706# CONFIG_NLS_ISO8859_3 is not set
707# CONFIG_NLS_ISO8859_4 is not set
708# CONFIG_NLS_ISO8859_5 is not set
709# CONFIG_NLS_ISO8859_6 is not set
710# CONFIG_NLS_ISO8859_7 is not set
711# CONFIG_NLS_ISO8859_9 is not set
712# CONFIG_NLS_ISO8859_13 is not set
713# CONFIG_NLS_ISO8859_14 is not set
714# CONFIG_NLS_ISO8859_15 is not set
715# CONFIG_NLS_KOI8_R is not set
716# CONFIG_NLS_KOI8_U is not set
717CONFIG_NLS_UTF8=y
718# CONFIG_UCC_SLOW is not set
719
720#
721# Library routines
722#
723# CONFIG_CRC_CCITT is not set
724# CONFIG_CRC16 is not set
725# CONFIG_CRC_ITU_T is not set
726# CONFIG_CRC32 is not set
727# CONFIG_CRC7 is not set
728# CONFIG_LIBCRC32C is not set
729CONFIG_ZLIB_INFLATE=y
730CONFIG_PLIST=y
731CONFIG_HAS_IOMEM=y
732CONFIG_HAS_IOPORT=y
733CONFIG_HAS_DMA=y
734CONFIG_INSTRUMENTATION=y
735# CONFIG_PROFILING is not set
736# CONFIG_MARKERS is not set
737
738#
739# Kernel hacking
740#
741# CONFIG_PRINTK_TIME is not set
742CONFIG_ENABLE_WARN_DEPRECATED=y
743CONFIG_ENABLE_MUST_CHECK=y
744CONFIG_MAGIC_SYSRQ=y
745# CONFIG_UNUSED_SYMBOLS is not set
746# CONFIG_DEBUG_FS is not set
747# CONFIG_HEADERS_CHECK is not set
748CONFIG_DEBUG_KERNEL=y
749# CONFIG_DEBUG_SHIRQ is not set
750# CONFIG_DETECT_SOFTLOCKUP is not set
751# CONFIG_SCHED_DEBUG is not set
752# CONFIG_SCHEDSTATS is not set
753# CONFIG_TIMER_STATS is not set
754# CONFIG_DEBUG_SLAB is not set
755# CONFIG_DEBUG_RT_MUTEXES is not set
756# CONFIG_RT_MUTEX_TESTER is not set
757# CONFIG_DEBUG_SPINLOCK is not set
758# CONFIG_DEBUG_MUTEXES is not set
759# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
760# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
761# CONFIG_DEBUG_KOBJECT is not set
762CONFIG_DEBUG_BUGVERBOSE=y
763CONFIG_DEBUG_INFO=y
764# CONFIG_DEBUG_VM is not set
765# CONFIG_DEBUG_LIST is not set
766# CONFIG_DEBUG_SG is not set
767CONFIG_FORCED_INLINING=y
768# CONFIG_BOOT_PRINTK_DELAY is not set
769# CONFIG_FAULT_INJECTION is not set
770# CONFIG_SAMPLES is not set
771# CONFIG_DEBUG_STACKOVERFLOW is not set
772# CONFIG_DEBUG_STACK_USAGE is not set
773# CONFIG_DEBUG_PAGEALLOC is not set
774# CONFIG_DEBUGGER is not set
775# CONFIG_KGDB_CONSOLE is not set
776CONFIG_BDI_SWITCH=y
777# CONFIG_PPC_EARLY_DEBUG is not set
778
779#
780# Security options
781#
782# CONFIG_KEYS is not set
783# CONFIG_SECURITY is not set
784CONFIG_CRYPTO=y
785CONFIG_CRYPTO_ALGAPI=y
786CONFIG_CRYPTO_BLKCIPHER=y
787CONFIG_CRYPTO_MANAGER=y
788# CONFIG_CRYPTO_HMAC is not set
789# CONFIG_CRYPTO_NULL is not set
790# CONFIG_CRYPTO_MD4 is not set
791CONFIG_CRYPTO_MD5=y
792# CONFIG_CRYPTO_SHA1 is not set
793# CONFIG_CRYPTO_SHA256 is not set
794# CONFIG_CRYPTO_SHA512 is not set
795# CONFIG_CRYPTO_WP512 is not set
796# CONFIG_CRYPTO_TGR192 is not set
797CONFIG_CRYPTO_ECB=y
798CONFIG_CRYPTO_CBC=y
799CONFIG_CRYPTO_PCBC=y
800# CONFIG_CRYPTO_CRYPTD is not set
801CONFIG_CRYPTO_DES=y
802# CONFIG_CRYPTO_FCRYPT is not set
803# CONFIG_CRYPTO_BLOWFISH is not set
804# CONFIG_CRYPTO_TWOFISH is not set
805# CONFIG_CRYPTO_SERPENT is not set
806# CONFIG_CRYPTO_AES is not set
807# CONFIG_CRYPTO_CAST5 is not set
808# CONFIG_CRYPTO_CAST6 is not set
809# CONFIG_CRYPTO_TEA is not set
810# CONFIG_CRYPTO_ARC4 is not set
811# CONFIG_CRYPTO_KHAZAD is not set
812# CONFIG_CRYPTO_ANUBIS is not set
813# CONFIG_CRYPTO_SEED is not set
814# CONFIG_CRYPTO_DEFLATE is not set
815# CONFIG_CRYPTO_MICHAEL_MIC is not set
816# CONFIG_CRYPTO_CRC32C is not set
817# CONFIG_CRYPTO_CAMELLIA is not set
818# CONFIG_CRYPTO_AUTHENC is not set
819# CONFIG_CRYPTO_HW is not set
820# CONFIG_PPC_CLOCK is not set
821CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/katmai_defconfig b/arch/powerpc/configs/katmai_defconfig
new file mode 100644
index 000000000000..c8804ec01ea4
--- /dev/null
+++ b/arch/powerpc/configs/katmai_defconfig
@@ -0,0 +1,790 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Mon Dec 24 11:17:43 2007
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18CONFIG_BOOKE=y
19CONFIG_PTE_64BIT=y
20CONFIG_PHYS_64BIT=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_NOT_COHERENT_CACHE=y
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set
51CONFIG_PPC_DCR_NATIVE=y
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_PPC_DCR=y
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
55
56#
57# General setup
58#
59CONFIG_EXPERIMENTAL=y
60CONFIG_BROKEN_ON_SMP=y
61CONFIG_INIT_ENV_ARG_LIMIT=32
62CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y
65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
72# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_ALL is not set
89# CONFIG_KALLSYMS_EXTRA_PASS is not set
90CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_BASE_FULL=y
95CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y
97CONFIG_EPOLL=y
98CONFIG_SIGNALFD=y
99CONFIG_EVENTFD=y
100CONFIG_SHMEM=y
101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLUB_DEBUG=y
103# CONFIG_SLAB is not set
104CONFIG_SLUB=y
105# CONFIG_SLOB is not set
106CONFIG_RT_MUTEXES=y
107# CONFIG_TINY_SHMEM is not set
108CONFIG_BASE_SMALL=0
109CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set
112# CONFIG_MODVERSIONS is not set
113# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_KMOD=y
115CONFIG_BLOCK=y
116CONFIG_LBD=y
117# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set
119# CONFIG_BLK_DEV_BSG is not set
120
121#
122# IO Schedulers
123#
124CONFIG_IOSCHED_NOOP=y
125CONFIG_IOSCHED_AS=y
126CONFIG_IOSCHED_DEADLINE=y
127CONFIG_IOSCHED_CFQ=y
128CONFIG_DEFAULT_AS=y
129# CONFIG_DEFAULT_DEADLINE is not set
130# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory"
133CONFIG_PPC4xx_PCI_EXPRESS=y
134
135#
136# Platform support
137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_BAMBOO is not set
144# CONFIG_EBONY is not set
145# CONFIG_SEQUOIA is not set
146# CONFIG_TAISHAN is not set
147CONFIG_KATMAI=y
148# CONFIG_RAINIER is not set
149CONFIG_440SPe=y
150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
161# CONFIG_FSL_ULI1575 is not set
162
163#
164# Kernel options
165#
166# CONFIG_HIGHMEM is not set
167# CONFIG_TICK_ONESHOT is not set
168# CONFIG_NO_HZ is not set
169# CONFIG_HIGH_RES_TIMERS is not set
170CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
171# CONFIG_HZ_100 is not set
172CONFIG_HZ_250=y
173# CONFIG_HZ_300 is not set
174# CONFIG_HZ_1000 is not set
175CONFIG_HZ=250
176CONFIG_PREEMPT_NONE=y
177# CONFIG_PREEMPT_VOLUNTARY is not set
178# CONFIG_PREEMPT is not set
179CONFIG_BINFMT_ELF=y
180# CONFIG_BINFMT_MISC is not set
181# CONFIG_MATH_EMULATION is not set
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
183CONFIG_ARCH_FLATMEM_ENABLE=y
184CONFIG_ARCH_POPULATES_NODE_MAP=y
185CONFIG_SELECT_MEMORY_MODEL=y
186CONFIG_FLATMEM_MANUAL=y
187# CONFIG_DISCONTIGMEM_MANUAL is not set
188# CONFIG_SPARSEMEM_MANUAL is not set
189CONFIG_FLATMEM=y
190CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set
192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
193CONFIG_SPLIT_PTLOCK_CPUS=4
194CONFIG_RESOURCES_64BIT=y
195CONFIG_ZONE_DMA_FLAG=1
196CONFIG_BOUNCE=y
197CONFIG_VIRT_TO_BUS=y
198CONFIG_PROC_DEVICETREE=y
199CONFIG_CMDLINE_BOOL=y
200CONFIG_CMDLINE=""
201CONFIG_SECCOMP=y
202CONFIG_WANT_DEVICE_TREE=y
203CONFIG_DEVICE_TREE="katmai.dts"
204CONFIG_ISA_DMA_API=y
205
206#
207# Bus options
208#
209CONFIG_ZONE_DMA=y
210CONFIG_PPC_INDIRECT_PCI=y
211CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y
213CONFIG_PCI_SYSCALL=y
214# CONFIG_PCIEPORTBUS is not set
215CONFIG_ARCH_SUPPORTS_MSI=y
216# CONFIG_PCI_MSI is not set
217CONFIG_PCI_LEGACY=y
218# CONFIG_PCI_DEBUG is not set
219# CONFIG_PCCARD is not set
220# CONFIG_HOTPLUG_PCI is not set
221
222#
223# Advanced setup
224#
225# CONFIG_ADVANCED_OPTIONS is not set
226
227#
228# Default settings for advanced configuration options are used
229#
230CONFIG_HIGHMEM_START=0xfe000000
231CONFIG_LOWMEM_SIZE=0x30000000
232CONFIG_KERNEL_START=0xc0000000
233CONFIG_TASK_SIZE=0xc0000000
234CONFIG_CONSISTENT_START=0xff100000
235CONFIG_CONSISTENT_SIZE=0x00200000
236CONFIG_BOOT_LOAD=0x01000000
237
238#
239# Networking
240#
241CONFIG_NET=y
242
243#
244# Networking options
245#
246CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y
249# CONFIG_NET_KEY is not set
250CONFIG_INET=y
251# CONFIG_IP_MULTICAST is not set
252# CONFIG_IP_ADVANCED_ROUTER is not set
253CONFIG_IP_FIB_HASH=y
254CONFIG_IP_PNP=y
255CONFIG_IP_PNP_DHCP=y
256CONFIG_IP_PNP_BOOTP=y
257# CONFIG_IP_PNP_RARP is not set
258# CONFIG_NET_IPIP is not set
259# CONFIG_NET_IPGRE is not set
260# CONFIG_ARPD is not set
261# CONFIG_SYN_COOKIES is not set
262# CONFIG_INET_AH is not set
263# CONFIG_INET_ESP is not set
264# CONFIG_INET_IPCOMP is not set
265# CONFIG_INET_XFRM_TUNNEL is not set
266# CONFIG_INET_TUNNEL is not set
267# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
268# CONFIG_INET_XFRM_MODE_TUNNEL is not set
269# CONFIG_INET_XFRM_MODE_BEET is not set
270# CONFIG_INET_LRO is not set
271CONFIG_INET_DIAG=y
272CONFIG_INET_TCP_DIAG=y
273# CONFIG_TCP_CONG_ADVANCED is not set
274CONFIG_TCP_CONG_CUBIC=y
275CONFIG_DEFAULT_TCP_CONG="cubic"
276# CONFIG_TCP_MD5SIG is not set
277# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set
280# CONFIG_NETWORK_SECMARK is not set
281# CONFIG_NETFILTER is not set
282# CONFIG_IP_DCCP is not set
283# CONFIG_IP_SCTP is not set
284# CONFIG_TIPC is not set
285# CONFIG_ATM is not set
286# CONFIG_BRIDGE is not set
287# CONFIG_VLAN_8021Q is not set
288# CONFIG_DECNET is not set
289# CONFIG_LLC2 is not set
290# CONFIG_IPX is not set
291# CONFIG_ATALK is not set
292# CONFIG_X25 is not set
293# CONFIG_LAPB is not set
294# CONFIG_ECONET is not set
295# CONFIG_WAN_ROUTER is not set
296# CONFIG_NET_SCHED is not set
297
298#
299# Network testing
300#
301# CONFIG_NET_PKTGEN is not set
302# CONFIG_HAMRADIO is not set
303# CONFIG_IRDA is not set
304# CONFIG_BT is not set
305# CONFIG_AF_RXRPC is not set
306
307#
308# Wireless
309#
310# CONFIG_CFG80211 is not set
311# CONFIG_WIRELESS_EXT is not set
312# CONFIG_MAC80211 is not set
313# CONFIG_IEEE80211 is not set
314# CONFIG_RFKILL is not set
315# CONFIG_NET_9P is not set
316
317#
318# Device Drivers
319#
320
321#
322# Generic Driver Options
323#
324CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
325CONFIG_STANDALONE=y
326CONFIG_PREVENT_FIRMWARE_BUILD=y
327CONFIG_FW_LOADER=y
328# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set
331CONFIG_CONNECTOR=y
332CONFIG_PROC_EVENTS=y
333# CONFIG_MTD is not set
334CONFIG_OF_DEVICE=y
335# CONFIG_PARPORT is not set
336CONFIG_BLK_DEV=y
337# CONFIG_BLK_DEV_FD is not set
338# CONFIG_BLK_CPQ_DA is not set
339# CONFIG_BLK_CPQ_CISS_DA is not set
340# CONFIG_BLK_DEV_DAC960 is not set
341# CONFIG_BLK_DEV_UMEM is not set
342# CONFIG_BLK_DEV_COW_COMMON is not set
343# CONFIG_BLK_DEV_LOOP is not set
344# CONFIG_BLK_DEV_NBD is not set
345# CONFIG_BLK_DEV_SX8 is not set
346CONFIG_BLK_DEV_RAM=y
347CONFIG_BLK_DEV_RAM_COUNT=16
348CONFIG_BLK_DEV_RAM_SIZE=35000
349CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
350# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set
352# CONFIG_XILINX_SYSACE is not set
353CONFIG_MISC_DEVICES=y
354# CONFIG_PHANTOM is not set
355# CONFIG_EEPROM_93CX6 is not set
356# CONFIG_SGI_IOC4 is not set
357# CONFIG_TIFM_CORE is not set
358# CONFIG_IDE is not set
359
360#
361# SCSI device support
362#
363# CONFIG_RAID_ATTRS is not set
364# CONFIG_SCSI is not set
365# CONFIG_SCSI_DMA is not set
366# CONFIG_SCSI_NETLINK is not set
367# CONFIG_ATA is not set
368# CONFIG_MD is not set
369# CONFIG_FUSION is not set
370
371#
372# IEEE 1394 (FireWire) support
373#
374# CONFIG_FIREWIRE is not set
375# CONFIG_IEEE1394 is not set
376# CONFIG_I2O is not set
377CONFIG_MACINTOSH_DRIVERS=y
378# CONFIG_MAC_EMUMOUSEBTN is not set
379# CONFIG_WINDFARM is not set
380CONFIG_NETDEVICES=y
381# CONFIG_NETDEVICES_MULTIQUEUE is not set
382# CONFIG_DUMMY is not set
383# CONFIG_BONDING is not set
384# CONFIG_MACVLAN is not set
385# CONFIG_EQUALIZER is not set
386# CONFIG_TUN is not set
387# CONFIG_VETH is not set
388# CONFIG_IP1000 is not set
389# CONFIG_ARCNET is not set
390# CONFIG_PHYLIB is not set
391CONFIG_NET_ETHERNET=y
392# CONFIG_MII is not set
393# CONFIG_HAPPYMEAL is not set
394# CONFIG_SUNGEM is not set
395# CONFIG_CASSINI is not set
396# CONFIG_NET_VENDOR_3COM is not set
397# CONFIG_NET_TULIP is not set
398# CONFIG_HP100 is not set
399CONFIG_IBM_NEW_EMAC=y
400CONFIG_IBM_NEW_EMAC_RXB=128
401CONFIG_IBM_NEW_EMAC_TXB=64
402CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
403CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
404CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
405# CONFIG_IBM_NEW_EMAC_DEBUG is not set
406# CONFIG_IBM_NEW_EMAC_ZMII is not set
407# CONFIG_IBM_NEW_EMAC_RGMII is not set
408# CONFIG_IBM_NEW_EMAC_TAH is not set
409CONFIG_IBM_NEW_EMAC_EMAC4=y
410# CONFIG_NET_PCI is not set
411# CONFIG_B44 is not set
412CONFIG_NETDEV_1000=y
413# CONFIG_ACENIC is not set
414# CONFIG_DL2K is not set
415# CONFIG_E1000 is not set
416# CONFIG_E1000E is not set
417# CONFIG_NS83820 is not set
418# CONFIG_HAMACHI is not set
419# CONFIG_YELLOWFIN is not set
420# CONFIG_R8169 is not set
421# CONFIG_SIS190 is not set
422# CONFIG_SKGE is not set
423# CONFIG_SKY2 is not set
424# CONFIG_SK98LIN is not set
425# CONFIG_VIA_VELOCITY is not set
426# CONFIG_TIGON3 is not set
427# CONFIG_BNX2 is not set
428# CONFIG_QLA3XXX is not set
429# CONFIG_ATL1 is not set
430CONFIG_NETDEV_10000=y
431# CONFIG_CHELSIO_T1 is not set
432# CONFIG_CHELSIO_T3 is not set
433# CONFIG_IXGBE is not set
434# CONFIG_IXGB is not set
435# CONFIG_S2IO is not set
436# CONFIG_MYRI10GE is not set
437# CONFIG_NETXEN_NIC is not set
438# CONFIG_NIU is not set
439# CONFIG_MLX4_CORE is not set
440# CONFIG_TEHUTI is not set
441# CONFIG_TR is not set
442
443#
444# Wireless LAN
445#
446# CONFIG_WLAN_PRE80211 is not set
447# CONFIG_WLAN_80211 is not set
448# CONFIG_WAN is not set
449# CONFIG_FDDI is not set
450# CONFIG_HIPPI is not set
451# CONFIG_PPP is not set
452# CONFIG_SLIP is not set
453# CONFIG_SHAPER is not set
454# CONFIG_NETCONSOLE is not set
455# CONFIG_NETPOLL is not set
456# CONFIG_NET_POLL_CONTROLLER is not set
457# CONFIG_ISDN is not set
458# CONFIG_PHONE is not set
459
460#
461# Input device support
462#
463# CONFIG_INPUT is not set
464
465#
466# Hardware I/O ports
467#
468# CONFIG_SERIO is not set
469# CONFIG_GAMEPORT is not set
470
471#
472# Character devices
473#
474# CONFIG_VT is not set
475# CONFIG_SERIAL_NONSTANDARD is not set
476
477#
478# Serial drivers
479#
480CONFIG_SERIAL_8250=y
481CONFIG_SERIAL_8250_CONSOLE=y
482# CONFIG_SERIAL_8250_PCI is not set
483CONFIG_SERIAL_8250_NR_UARTS=4
484CONFIG_SERIAL_8250_RUNTIME_UARTS=4
485CONFIG_SERIAL_8250_EXTENDED=y
486# CONFIG_SERIAL_8250_MANY_PORTS is not set
487CONFIG_SERIAL_8250_SHARE_IRQ=y
488# CONFIG_SERIAL_8250_DETECT_IRQ is not set
489# CONFIG_SERIAL_8250_RSA is not set
490
491#
492# Non-8250 serial port support
493#
494# CONFIG_SERIAL_UARTLITE is not set
495CONFIG_SERIAL_CORE=y
496CONFIG_SERIAL_CORE_CONSOLE=y
497# CONFIG_SERIAL_JSM is not set
498CONFIG_SERIAL_OF_PLATFORM=y
499CONFIG_UNIX98_PTYS=y
500CONFIG_LEGACY_PTYS=y
501CONFIG_LEGACY_PTY_COUNT=256
502# CONFIG_IPMI_HANDLER is not set
503# CONFIG_HW_RANDOM is not set
504# CONFIG_NVRAM is not set
505# CONFIG_GEN_RTC is not set
506# CONFIG_R3964 is not set
507# CONFIG_APPLICOM is not set
508# CONFIG_RAW_DRIVER is not set
509# CONFIG_TCG_TPM is not set
510CONFIG_DEVPORT=y
511# CONFIG_I2C is not set
512
513#
514# SPI support
515#
516# CONFIG_SPI is not set
517# CONFIG_SPI_MASTER is not set
518# CONFIG_W1 is not set
519# CONFIG_POWER_SUPPLY is not set
520# CONFIG_HWMON is not set
521# CONFIG_WATCHDOG is not set
522
523#
524# Sonics Silicon Backplane
525#
526CONFIG_SSB_POSSIBLE=y
527# CONFIG_SSB is not set
528
529#
530# Multifunction device drivers
531#
532# CONFIG_MFD_SM501 is not set
533
534#
535# Multimedia devices
536#
537# CONFIG_VIDEO_DEV is not set
538# CONFIG_DVB_CORE is not set
539CONFIG_DAB=y
540
541#
542# Graphics support
543#
544# CONFIG_AGP is not set
545# CONFIG_DRM is not set
546# CONFIG_VGASTATE is not set
547CONFIG_VIDEO_OUTPUT_CONTROL=m
548# CONFIG_FB is not set
549# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
550
551#
552# Display device support
553#
554# CONFIG_DISPLAY_SUPPORT is not set
555
556#
557# Sound
558#
559# CONFIG_SOUND is not set
560CONFIG_USB_SUPPORT=y
561CONFIG_USB_ARCH_HAS_HCD=y
562CONFIG_USB_ARCH_HAS_OHCI=y
563CONFIG_USB_ARCH_HAS_EHCI=y
564# CONFIG_USB is not set
565
566#
567# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
568#
569
570#
571# USB Gadget Support
572#
573# CONFIG_USB_GADGET is not set
574# CONFIG_MMC is not set
575# CONFIG_NEW_LEDS is not set
576# CONFIG_INFINIBAND is not set
577# CONFIG_EDAC is not set
578# CONFIG_RTC_CLASS is not set
579
580#
581# Userspace I/O
582#
583# CONFIG_UIO is not set
584
585#
586# File systems
587#
588CONFIG_EXT2_FS=y
589# CONFIG_EXT2_FS_XATTR is not set
590# CONFIG_EXT2_FS_XIP is not set
591# CONFIG_EXT3_FS is not set
592# CONFIG_EXT4DEV_FS is not set
593# CONFIG_REISERFS_FS is not set
594# CONFIG_JFS_FS is not set
595# CONFIG_FS_POSIX_ACL is not set
596# CONFIG_XFS_FS is not set
597# CONFIG_GFS2_FS is not set
598# CONFIG_OCFS2_FS is not set
599# CONFIG_MINIX_FS is not set
600# CONFIG_ROMFS_FS is not set
601CONFIG_INOTIFY=y
602CONFIG_INOTIFY_USER=y
603# CONFIG_QUOTA is not set
604CONFIG_DNOTIFY=y
605# CONFIG_AUTOFS_FS is not set
606# CONFIG_AUTOFS4_FS is not set
607# CONFIG_FUSE_FS is not set
608
609#
610# CD-ROM/DVD Filesystems
611#
612# CONFIG_ISO9660_FS is not set
613# CONFIG_UDF_FS is not set
614
615#
616# DOS/FAT/NT Filesystems
617#
618# CONFIG_MSDOS_FS is not set
619# CONFIG_VFAT_FS is not set
620# CONFIG_NTFS_FS is not set
621
622#
623# Pseudo filesystems
624#
625CONFIG_PROC_FS=y
626CONFIG_PROC_KCORE=y
627CONFIG_PROC_SYSCTL=y
628CONFIG_SYSFS=y
629CONFIG_TMPFS=y
630# CONFIG_TMPFS_POSIX_ACL is not set
631# CONFIG_HUGETLB_PAGE is not set
632# CONFIG_CONFIGFS_FS is not set
633
634#
635# Miscellaneous filesystems
636#
637# CONFIG_ADFS_FS is not set
638# CONFIG_AFFS_FS is not set
639# CONFIG_HFS_FS is not set
640# CONFIG_HFSPLUS_FS is not set
641# CONFIG_BEFS_FS is not set
642# CONFIG_BFS_FS is not set
643# CONFIG_EFS_FS is not set
644CONFIG_CRAMFS=y
645# CONFIG_VXFS_FS is not set
646# CONFIG_HPFS_FS is not set
647# CONFIG_QNX4FS_FS is not set
648# CONFIG_SYSV_FS is not set
649# CONFIG_UFS_FS is not set
650CONFIG_NETWORK_FILESYSTEMS=y
651CONFIG_NFS_FS=y
652CONFIG_NFS_V3=y
653# CONFIG_NFS_V3_ACL is not set
654# CONFIG_NFS_V4 is not set
655# CONFIG_NFS_DIRECTIO is not set
656# CONFIG_NFSD is not set
657CONFIG_ROOT_NFS=y
658CONFIG_LOCKD=y
659CONFIG_LOCKD_V4=y
660CONFIG_NFS_COMMON=y
661CONFIG_SUNRPC=y
662# CONFIG_SUNRPC_BIND34 is not set
663# CONFIG_RPCSEC_GSS_KRB5 is not set
664# CONFIG_RPCSEC_GSS_SPKM3 is not set
665# CONFIG_SMB_FS is not set
666# CONFIG_CIFS is not set
667# CONFIG_NCP_FS is not set
668# CONFIG_CODA_FS is not set
669# CONFIG_AFS_FS is not set
670
671#
672# Partition Types
673#
674# CONFIG_PARTITION_ADVANCED is not set
675CONFIG_MSDOS_PARTITION=y
676# CONFIG_NLS is not set
677# CONFIG_DLM is not set
678# CONFIG_UCC_SLOW is not set
679
680#
681# Library routines
682#
683CONFIG_BITREVERSE=y
684# CONFIG_CRC_CCITT is not set
685# CONFIG_CRC16 is not set
686# CONFIG_CRC_ITU_T is not set
687CONFIG_CRC32=y
688# CONFIG_CRC7 is not set
689# CONFIG_LIBCRC32C is not set
690CONFIG_ZLIB_INFLATE=y
691CONFIG_PLIST=y
692CONFIG_HAS_IOMEM=y
693CONFIG_HAS_IOPORT=y
694CONFIG_HAS_DMA=y
695CONFIG_INSTRUMENTATION=y
696# CONFIG_PROFILING is not set
697# CONFIG_KPROBES is not set
698# CONFIG_MARKERS is not set
699
700#
701# Kernel hacking
702#
703# CONFIG_PRINTK_TIME is not set
704CONFIG_ENABLE_WARN_DEPRECATED=y
705CONFIG_ENABLE_MUST_CHECK=y
706CONFIG_MAGIC_SYSRQ=y
707# CONFIG_UNUSED_SYMBOLS is not set
708# CONFIG_DEBUG_FS is not set
709# CONFIG_HEADERS_CHECK is not set
710CONFIG_DEBUG_KERNEL=y
711# CONFIG_DEBUG_SHIRQ is not set
712CONFIG_DETECT_SOFTLOCKUP=y
713CONFIG_SCHED_DEBUG=y
714# CONFIG_SCHEDSTATS is not set
715# CONFIG_TIMER_STATS is not set
716# CONFIG_SLUB_DEBUG_ON is not set
717# CONFIG_DEBUG_RT_MUTEXES is not set
718# CONFIG_RT_MUTEX_TESTER is not set
719# CONFIG_DEBUG_SPINLOCK is not set
720# CONFIG_DEBUG_MUTEXES is not set
721# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
722# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
723# CONFIG_DEBUG_KOBJECT is not set
724# CONFIG_DEBUG_BUGVERBOSE is not set
725# CONFIG_DEBUG_INFO is not set
726# CONFIG_DEBUG_VM is not set
727# CONFIG_DEBUG_LIST is not set
728# CONFIG_DEBUG_SG is not set
729CONFIG_FORCED_INLINING=y
730# CONFIG_BOOT_PRINTK_DELAY is not set
731# CONFIG_RCU_TORTURE_TEST is not set
732# CONFIG_FAULT_INJECTION is not set
733# CONFIG_SAMPLES is not set
734# CONFIG_DEBUG_STACKOVERFLOW is not set
735# CONFIG_DEBUG_STACK_USAGE is not set
736# CONFIG_DEBUG_PAGEALLOC is not set
737CONFIG_DEBUGGER=y
738# CONFIG_KGDB is not set
739# CONFIG_XMON is not set
740# CONFIG_BDI_SWITCH is not set
741# CONFIG_PPC_EARLY_DEBUG is not set
742
743#
744# Security options
745#
746# CONFIG_KEYS is not set
747# CONFIG_SECURITY is not set
748# CONFIG_SECURITY_FILE_CAPABILITIES is not set
749CONFIG_CRYPTO=y
750CONFIG_CRYPTO_ALGAPI=y
751CONFIG_CRYPTO_BLKCIPHER=y
752CONFIG_CRYPTO_MANAGER=y
753# CONFIG_CRYPTO_HMAC is not set
754# CONFIG_CRYPTO_XCBC is not set
755# CONFIG_CRYPTO_NULL is not set
756# CONFIG_CRYPTO_MD4 is not set
757CONFIG_CRYPTO_MD5=y
758# CONFIG_CRYPTO_SHA1 is not set
759# CONFIG_CRYPTO_SHA256 is not set
760# CONFIG_CRYPTO_SHA512 is not set
761# CONFIG_CRYPTO_WP512 is not set
762# CONFIG_CRYPTO_TGR192 is not set
763# CONFIG_CRYPTO_GF128MUL is not set
764CONFIG_CRYPTO_ECB=y
765CONFIG_CRYPTO_CBC=y
766CONFIG_CRYPTO_PCBC=y
767# CONFIG_CRYPTO_LRW is not set
768# CONFIG_CRYPTO_XTS is not set
769# CONFIG_CRYPTO_CRYPTD is not set
770CONFIG_CRYPTO_DES=y
771# CONFIG_CRYPTO_FCRYPT is not set
772# CONFIG_CRYPTO_BLOWFISH is not set
773# CONFIG_CRYPTO_TWOFISH is not set
774# CONFIG_CRYPTO_SERPENT is not set
775# CONFIG_CRYPTO_AES is not set
776# CONFIG_CRYPTO_CAST5 is not set
777# CONFIG_CRYPTO_CAST6 is not set
778# CONFIG_CRYPTO_TEA is not set
779# CONFIG_CRYPTO_ARC4 is not set
780# CONFIG_CRYPTO_KHAZAD is not set
781# CONFIG_CRYPTO_ANUBIS is not set
782# CONFIG_CRYPTO_SEED is not set
783# CONFIG_CRYPTO_DEFLATE is not set
784# CONFIG_CRYPTO_MICHAEL_MIC is not set
785# CONFIG_CRYPTO_CRC32C is not set
786# CONFIG_CRYPTO_CAMELLIA is not set
787# CONFIG_CRYPTO_TEST is not set
788# CONFIG_CRYPTO_AUTHENC is not set
789CONFIG_CRYPTO_HW=y
790# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/kilauea_defconfig b/arch/powerpc/configs/kilauea_defconfig
index 28dee12031f5..8dca3d451c0e 100644
--- a/arch/powerpc/configs/kilauea_defconfig
+++ b/arch/powerpc/configs/kilauea_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:48:20 2007 4# Thu Jan 3 14:21:31 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -40,7 +40,7 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y 40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y 41CONFIG_PPC_OF=y
42CONFIG_OF=y 42CONFIG_OF=y
43# CONFIG_PPC_UDBG_16550 is not set 43CONFIG_PPC_UDBG_16550=y
44# CONFIG_GENERIC_TBSYNC is not set 44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y 45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y 46CONFIG_GENERIC_BUG=y
@@ -125,6 +125,7 @@ CONFIG_DEFAULT_AS=y
125# CONFIG_DEFAULT_CFQ is not set 125# CONFIG_DEFAULT_CFQ is not set
126# CONFIG_DEFAULT_NOOP is not set 126# CONFIG_DEFAULT_NOOP is not set
127CONFIG_DEFAULT_IOSCHED="anticipatory" 127CONFIG_DEFAULT_IOSCHED="anticipatory"
128CONFIG_PPC4xx_PCI_EXPRESS=y
128 129
129# 130#
130# Platform support 131# Platform support
@@ -134,9 +135,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
134# CONFIG_PPC_CELL is not set 135# CONFIG_PPC_CELL is not set
135# CONFIG_PPC_CELL_NATIVE is not set 136# CONFIG_PPC_CELL_NATIVE is not set
136# CONFIG_PQ2ADS is not set 137# CONFIG_PQ2ADS is not set
138# CONFIG_EP405 is not set
137CONFIG_KILAUEA=y 139CONFIG_KILAUEA=y
140# CONFIG_MAKALU is not set
138# CONFIG_WALNUT is not set 141# CONFIG_WALNUT is not set
139# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set 142# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
143CONFIG_405EX=y
140# CONFIG_MPIC is not set 144# CONFIG_MPIC is not set
141# CONFIG_MPIC_WEIRD is not set 145# CONFIG_MPIC_WEIRD is not set
142# CONFIG_PPC_I8259 is not set 146# CONFIG_PPC_I8259 is not set
@@ -199,11 +203,17 @@ CONFIG_ISA_DMA_API=y
199# Bus options 203# Bus options
200# 204#
201CONFIG_ZONE_DMA=y 205CONFIG_ZONE_DMA=y
202# CONFIG_PCI is not set 206CONFIG_PPC_INDIRECT_PCI=y
203# CONFIG_PCI_DOMAINS is not set 207CONFIG_PCI=y
204# CONFIG_PCI_SYSCALL is not set 208CONFIG_PCI_DOMAINS=y
205# CONFIG_ARCH_SUPPORTS_MSI is not set 209CONFIG_PCI_SYSCALL=y
210# CONFIG_PCIEPORTBUS is not set
211CONFIG_ARCH_SUPPORTS_MSI=y
212# CONFIG_PCI_MSI is not set
213CONFIG_PCI_LEGACY=y
214# CONFIG_PCI_DEBUG is not set
206# CONFIG_PCCARD is not set 215# CONFIG_PCCARD is not set
216# CONFIG_HOTPLUG_PCI is not set
207 217
208# 218#
209# Advanced setup 219# Advanced setup
@@ -368,11 +378,13 @@ CONFIG_MTD_CFI_UTIL=y
368# CONFIG_MTD_COMPLEX_MAPPINGS is not set 378# CONFIG_MTD_COMPLEX_MAPPINGS is not set
369# CONFIG_MTD_PHYSMAP is not set 379# CONFIG_MTD_PHYSMAP is not set
370CONFIG_MTD_PHYSMAP_OF=y 380CONFIG_MTD_PHYSMAP_OF=y
381# CONFIG_MTD_INTEL_VR_NOR is not set
371# CONFIG_MTD_PLATRAM is not set 382# CONFIG_MTD_PLATRAM is not set
372 383
373# 384#
374# Self-contained MTD device drivers 385# Self-contained MTD device drivers
375# 386#
387# CONFIG_MTD_PMC551 is not set
376# CONFIG_MTD_SLRAM is not set 388# CONFIG_MTD_SLRAM is not set
377# CONFIG_MTD_PHRAM is not set 389# CONFIG_MTD_PHRAM is not set
378# CONFIG_MTD_MTDRAM is not set 390# CONFIG_MTD_MTDRAM is not set
@@ -395,9 +407,14 @@ CONFIG_OF_DEVICE=y
395# CONFIG_PARPORT is not set 407# CONFIG_PARPORT is not set
396CONFIG_BLK_DEV=y 408CONFIG_BLK_DEV=y
397# CONFIG_BLK_DEV_FD is not set 409# CONFIG_BLK_DEV_FD is not set
410# CONFIG_BLK_CPQ_DA is not set
411# CONFIG_BLK_CPQ_CISS_DA is not set
412# CONFIG_BLK_DEV_DAC960 is not set
413# CONFIG_BLK_DEV_UMEM is not set
398# CONFIG_BLK_DEV_COW_COMMON is not set 414# CONFIG_BLK_DEV_COW_COMMON is not set
399# CONFIG_BLK_DEV_LOOP is not set 415# CONFIG_BLK_DEV_LOOP is not set
400# CONFIG_BLK_DEV_NBD is not set 416# CONFIG_BLK_DEV_NBD is not set
417# CONFIG_BLK_DEV_SX8 is not set
401CONFIG_BLK_DEV_RAM=y 418CONFIG_BLK_DEV_RAM=y
402CONFIG_BLK_DEV_RAM_COUNT=16 419CONFIG_BLK_DEV_RAM_COUNT=16
403CONFIG_BLK_DEV_RAM_SIZE=35000 420CONFIG_BLK_DEV_RAM_SIZE=35000
@@ -417,6 +434,14 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
417# CONFIG_SCSI_NETLINK is not set 434# CONFIG_SCSI_NETLINK is not set
418# CONFIG_ATA is not set 435# CONFIG_ATA is not set
419# CONFIG_MD is not set 436# CONFIG_MD is not set
437# CONFIG_FUSION is not set
438
439#
440# IEEE 1394 (FireWire) support
441#
442# CONFIG_FIREWIRE is not set
443# CONFIG_IEEE1394 is not set
444# CONFIG_I2O is not set
420# CONFIG_MACINTOSH_DRIVERS is not set 445# CONFIG_MACINTOSH_DRIVERS is not set
421CONFIG_NETDEVICES=y 446CONFIG_NETDEVICES=y
422# CONFIG_NETDEVICES_MULTIQUEUE is not set 447# CONFIG_NETDEVICES_MULTIQUEUE is not set
@@ -426,9 +451,33 @@ CONFIG_NETDEVICES=y
426# CONFIG_EQUALIZER is not set 451# CONFIG_EQUALIZER is not set
427# CONFIG_TUN is not set 452# CONFIG_TUN is not set
428# CONFIG_VETH is not set 453# CONFIG_VETH is not set
429# CONFIG_NET_ETHERNET is not set 454# CONFIG_IP1000 is not set
455# CONFIG_ARCNET is not set
456# CONFIG_PHYLIB is not set
457CONFIG_NET_ETHERNET=y
458# CONFIG_MII is not set
459# CONFIG_HAPPYMEAL is not set
460# CONFIG_SUNGEM is not set
461# CONFIG_CASSINI is not set
462# CONFIG_NET_VENDOR_3COM is not set
463# CONFIG_NET_TULIP is not set
464# CONFIG_HP100 is not set
465CONFIG_IBM_NEW_EMAC=y
466CONFIG_IBM_NEW_EMAC_RXB=256
467CONFIG_IBM_NEW_EMAC_TXB=256
468CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
469CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
470CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
471# CONFIG_IBM_NEW_EMAC_DEBUG is not set
472# CONFIG_IBM_NEW_EMAC_ZMII is not set
473CONFIG_IBM_NEW_EMAC_RGMII=y
474# CONFIG_IBM_NEW_EMAC_TAH is not set
475CONFIG_IBM_NEW_EMAC_EMAC4=y
476# CONFIG_NET_PCI is not set
477# CONFIG_B44 is not set
430# CONFIG_NETDEV_1000 is not set 478# CONFIG_NETDEV_1000 is not set
431# CONFIG_NETDEV_10000 is not set 479# CONFIG_NETDEV_10000 is not set
480# CONFIG_TR is not set
432 481
433# 482#
434# Wireless LAN 483# Wireless LAN
@@ -436,6 +485,8 @@ CONFIG_NETDEVICES=y
436# CONFIG_WLAN_PRE80211 is not set 485# CONFIG_WLAN_PRE80211 is not set
437# CONFIG_WLAN_80211 is not set 486# CONFIG_WLAN_80211 is not set
438# CONFIG_WAN is not set 487# CONFIG_WAN is not set
488# CONFIG_FDDI is not set
489# CONFIG_HIPPI is not set
439# CONFIG_PPP is not set 490# CONFIG_PPP is not set
440# CONFIG_SLIP is not set 491# CONFIG_SLIP is not set
441# CONFIG_SHAPER is not set 492# CONFIG_SHAPER is not set
@@ -467,6 +518,7 @@ CONFIG_NETDEVICES=y
467# 518#
468CONFIG_SERIAL_8250=y 519CONFIG_SERIAL_8250=y
469CONFIG_SERIAL_8250_CONSOLE=y 520CONFIG_SERIAL_8250_CONSOLE=y
521CONFIG_SERIAL_8250_PCI=y
470CONFIG_SERIAL_8250_NR_UARTS=4 522CONFIG_SERIAL_8250_NR_UARTS=4
471CONFIG_SERIAL_8250_RUNTIME_UARTS=4 523CONFIG_SERIAL_8250_RUNTIME_UARTS=4
472CONFIG_SERIAL_8250_EXTENDED=y 524CONFIG_SERIAL_8250_EXTENDED=y
@@ -481,6 +533,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
481# CONFIG_SERIAL_UARTLITE is not set 533# CONFIG_SERIAL_UARTLITE is not set
482CONFIG_SERIAL_CORE=y 534CONFIG_SERIAL_CORE=y
483CONFIG_SERIAL_CORE_CONSOLE=y 535CONFIG_SERIAL_CORE_CONSOLE=y
536# CONFIG_SERIAL_JSM is not set
484CONFIG_SERIAL_OF_PLATFORM=y 537CONFIG_SERIAL_OF_PLATFORM=y
485CONFIG_UNIX98_PTYS=y 538CONFIG_UNIX98_PTYS=y
486CONFIG_LEGACY_PTYS=y 539CONFIG_LEGACY_PTYS=y
@@ -490,8 +543,10 @@ CONFIG_LEGACY_PTY_COUNT=256
490# CONFIG_NVRAM is not set 543# CONFIG_NVRAM is not set
491# CONFIG_GEN_RTC is not set 544# CONFIG_GEN_RTC is not set
492# CONFIG_R3964 is not set 545# CONFIG_R3964 is not set
546# CONFIG_APPLICOM is not set
493# CONFIG_RAW_DRIVER is not set 547# CONFIG_RAW_DRIVER is not set
494# CONFIG_TCG_TPM is not set 548# CONFIG_TCG_TPM is not set
549CONFIG_DEVPORT=y
495# CONFIG_I2C is not set 550# CONFIG_I2C is not set
496 551
497# 552#
@@ -525,6 +580,8 @@ CONFIG_SSB_POSSIBLE=y
525# 580#
526# Graphics support 581# Graphics support
527# 582#
583# CONFIG_AGP is not set
584# CONFIG_DRM is not set
528# CONFIG_VGASTATE is not set 585# CONFIG_VGASTATE is not set
529# CONFIG_VIDEO_OUTPUT_CONTROL is not set 586# CONFIG_VIDEO_OUTPUT_CONTROL is not set
530# CONFIG_FB is not set 587# CONFIG_FB is not set
@@ -542,6 +599,7 @@ CONFIG_SSB_POSSIBLE=y
542# CONFIG_USB_SUPPORT is not set 599# CONFIG_USB_SUPPORT is not set
543# CONFIG_MMC is not set 600# CONFIG_MMC is not set
544# CONFIG_NEW_LEDS is not set 601# CONFIG_NEW_LEDS is not set
602# CONFIG_INFINIBAND is not set
545# CONFIG_EDAC is not set 603# CONFIG_EDAC is not set
546# CONFIG_RTC_CLASS is not set 604# CONFIG_RTC_CLASS is not set
547 605
diff --git a/arch/powerpc/configs/makalu_defconfig b/arch/powerpc/configs/makalu_defconfig
new file mode 100644
index 000000000000..c5db0265e5d8
--- /dev/null
+++ b/arch/powerpc/configs/makalu_defconfig
@@ -0,0 +1,812 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Mon Dec 24 11:18:32 2007
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14CONFIG_40x=y
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18# CONFIG_PPC_MM_SLICES is not set
19CONFIG_NOT_COHERENT_CACHE=y
20CONFIG_PPC32=y
21CONFIG_WORD_SIZE=32
22CONFIG_PPC_MERGE=y
23CONFIG_MMU=y
24CONFIG_GENERIC_CMOS_UPDATE=y
25CONFIG_GENERIC_TIME=y
26CONFIG_GENERIC_TIME_VSYSCALL=y
27CONFIG_GENERIC_CLOCKEVENTS=y
28CONFIG_GENERIC_HARDIRQS=y
29CONFIG_IRQ_PER_CPU=y
30CONFIG_RWSEM_XCHGADD_ALGORITHM=y
31CONFIG_ARCH_HAS_ILOG2_U32=y
32CONFIG_GENERIC_HWEIGHT=y
33CONFIG_GENERIC_CALIBRATE_DELAY=y
34CONFIG_GENERIC_FIND_NEXT_BIT=y
35# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
36CONFIG_PPC=y
37CONFIG_EARLY_PRINTK=y
38CONFIG_GENERIC_NVRAM=y
39CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y
42CONFIG_OF=y
43CONFIG_PPC_UDBG_16550=y
44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y
47# CONFIG_DEFAULT_UIMAGE is not set
48CONFIG_PPC_DCR_NATIVE=y
49# CONFIG_PPC_DCR_MMIO is not set
50CONFIG_PPC_DCR=y
51CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
52
53#
54# General setup
55#
56CONFIG_EXPERIMENTAL=y
57CONFIG_BROKEN_ON_SMP=y
58CONFIG_INIT_ENV_ARG_LIMIT=32
59CONFIG_LOCALVERSION=""
60CONFIG_LOCALVERSION_AUTO=y
61CONFIG_SWAP=y
62CONFIG_SYSVIPC=y
63CONFIG_SYSVIPC_SYSCTL=y
64CONFIG_POSIX_MQUEUE=y
65# CONFIG_BSD_PROCESS_ACCT is not set
66# CONFIG_TASKSTATS is not set
67# CONFIG_USER_NS is not set
68# CONFIG_PID_NS is not set
69# CONFIG_AUDIT is not set
70# CONFIG_IKCONFIG is not set
71CONFIG_LOG_BUF_SHIFT=14
72# CONFIG_CGROUPS is not set
73# CONFIG_FAIR_GROUP_SCHED is not set
74CONFIG_SYSFS_DEPRECATED=y
75# CONFIG_RELAY is not set
76CONFIG_BLK_DEV_INITRD=y
77CONFIG_INITRAMFS_SOURCE=""
78# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
79CONFIG_SYSCTL=y
80CONFIG_EMBEDDED=y
81CONFIG_SYSCTL_SYSCALL=y
82CONFIG_KALLSYMS=y
83CONFIG_KALLSYMS_ALL=y
84CONFIG_KALLSYMS_EXTRA_PASS=y
85CONFIG_HOTPLUG=y
86CONFIG_PRINTK=y
87CONFIG_BUG=y
88CONFIG_ELF_CORE=y
89CONFIG_BASE_FULL=y
90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
92CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y
94CONFIG_EVENTFD=y
95CONFIG_SHMEM=y
96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y
98# CONFIG_SLAB is not set
99CONFIG_SLUB=y
100# CONFIG_SLOB is not set
101CONFIG_RT_MUTEXES=y
102# CONFIG_TINY_SHMEM is not set
103CONFIG_BASE_SMALL=0
104CONFIG_MODULES=y
105CONFIG_MODULE_UNLOAD=y
106# CONFIG_MODULE_FORCE_UNLOAD is not set
107# CONFIG_MODVERSIONS is not set
108# CONFIG_MODULE_SRCVERSION_ALL is not set
109CONFIG_KMOD=y
110CONFIG_BLOCK=y
111CONFIG_LBD=y
112# CONFIG_BLK_DEV_IO_TRACE is not set
113# CONFIG_LSF is not set
114# CONFIG_BLK_DEV_BSG is not set
115
116#
117# IO Schedulers
118#
119CONFIG_IOSCHED_NOOP=y
120CONFIG_IOSCHED_AS=y
121CONFIG_IOSCHED_DEADLINE=y
122CONFIG_IOSCHED_CFQ=y
123CONFIG_DEFAULT_AS=y
124# CONFIG_DEFAULT_DEADLINE is not set
125# CONFIG_DEFAULT_CFQ is not set
126# CONFIG_DEFAULT_NOOP is not set
127CONFIG_DEFAULT_IOSCHED="anticipatory"
128CONFIG_PPC4xx_PCI_EXPRESS=y
129
130#
131# Platform support
132#
133# CONFIG_PPC_MPC52xx is not set
134# CONFIG_PPC_MPC5200 is not set
135# CONFIG_PPC_CELL is not set
136# CONFIG_PPC_CELL_NATIVE is not set
137# CONFIG_PQ2ADS is not set
138# CONFIG_EP405 is not set
139# CONFIG_KILAUEA is not set
140CONFIG_MAKALU=y
141# CONFIG_WALNUT is not set
142# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
143CONFIG_405EX=y
144# CONFIG_MPIC is not set
145# CONFIG_MPIC_WEIRD is not set
146# CONFIG_PPC_I8259 is not set
147# CONFIG_PPC_RTAS is not set
148# CONFIG_MMIO_NVRAM is not set
149# CONFIG_PPC_MPC106 is not set
150# CONFIG_PPC_970_NAP is not set
151# CONFIG_PPC_INDIRECT_IO is not set
152# CONFIG_GENERIC_IOMAP is not set
153# CONFIG_CPU_FREQ is not set
154# CONFIG_CPM2 is not set
155# CONFIG_FSL_ULI1575 is not set
156
157#
158# Kernel options
159#
160# CONFIG_HIGHMEM is not set
161# CONFIG_TICK_ONESHOT is not set
162# CONFIG_NO_HZ is not set
163# CONFIG_HIGH_RES_TIMERS is not set
164CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
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_BINFMT_ELF=y
174# CONFIG_BINFMT_MISC is not set
175# CONFIG_MATH_EMULATION is not set
176CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
177CONFIG_ARCH_FLATMEM_ENABLE=y
178CONFIG_ARCH_POPULATES_NODE_MAP=y
179CONFIG_SELECT_MEMORY_MODEL=y
180CONFIG_FLATMEM_MANUAL=y
181# CONFIG_DISCONTIGMEM_MANUAL is not set
182# CONFIG_SPARSEMEM_MANUAL is not set
183CONFIG_FLATMEM=y
184CONFIG_FLAT_NODE_MEM_MAP=y
185# CONFIG_SPARSEMEM_STATIC is not set
186# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
187CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set
189CONFIG_ZONE_DMA_FLAG=1
190CONFIG_BOUNCE=y
191CONFIG_VIRT_TO_BUS=y
192CONFIG_PROC_DEVICETREE=y
193# CONFIG_CMDLINE_BOOL is not set
194# CONFIG_PM is not set
195CONFIG_SUSPEND_UP_POSSIBLE=y
196CONFIG_HIBERNATION_UP_POSSIBLE=y
197CONFIG_SECCOMP=y
198CONFIG_WANT_DEVICE_TREE=y
199CONFIG_DEVICE_TREE="kilauea.dts"
200CONFIG_ISA_DMA_API=y
201
202#
203# Bus options
204#
205CONFIG_ZONE_DMA=y
206CONFIG_PPC_INDIRECT_PCI=y
207CONFIG_PCI=y
208CONFIG_PCI_DOMAINS=y
209CONFIG_PCI_SYSCALL=y
210# CONFIG_PCIEPORTBUS is not set
211CONFIG_ARCH_SUPPORTS_MSI=y
212# CONFIG_PCI_MSI is not set
213CONFIG_PCI_LEGACY=y
214# CONFIG_PCI_DEBUG is not set
215# CONFIG_PCCARD is not set
216# CONFIG_HOTPLUG_PCI is not set
217
218#
219# Advanced setup
220#
221# CONFIG_ADVANCED_OPTIONS is not set
222
223#
224# Default settings for advanced configuration options are used
225#
226CONFIG_HIGHMEM_START=0xfe000000
227CONFIG_LOWMEM_SIZE=0x30000000
228CONFIG_KERNEL_START=0xc0000000
229CONFIG_TASK_SIZE=0xc0000000
230CONFIG_CONSISTENT_START=0xff100000
231CONFIG_CONSISTENT_SIZE=0x00200000
232CONFIG_BOOT_LOAD=0x00400000
233
234#
235# Networking
236#
237CONFIG_NET=y
238
239#
240# Networking options
241#
242CONFIG_PACKET=y
243# CONFIG_PACKET_MMAP is not set
244CONFIG_UNIX=y
245# CONFIG_NET_KEY is not set
246CONFIG_INET=y
247# CONFIG_IP_MULTICAST is not set
248# CONFIG_IP_ADVANCED_ROUTER is not set
249CONFIG_IP_FIB_HASH=y
250CONFIG_IP_PNP=y
251CONFIG_IP_PNP_DHCP=y
252CONFIG_IP_PNP_BOOTP=y
253# CONFIG_IP_PNP_RARP is not set
254# CONFIG_NET_IPIP is not set
255# CONFIG_NET_IPGRE is not set
256# CONFIG_ARPD is not set
257# CONFIG_SYN_COOKIES is not set
258# CONFIG_INET_AH is not set
259# CONFIG_INET_ESP is not set
260# CONFIG_INET_IPCOMP is not set
261# CONFIG_INET_XFRM_TUNNEL is not set
262# CONFIG_INET_TUNNEL is not set
263# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
264# CONFIG_INET_XFRM_MODE_TUNNEL is not set
265# CONFIG_INET_XFRM_MODE_BEET is not set
266# CONFIG_INET_LRO is not set
267CONFIG_INET_DIAG=y
268CONFIG_INET_TCP_DIAG=y
269# CONFIG_TCP_CONG_ADVANCED is not set
270CONFIG_TCP_CONG_CUBIC=y
271CONFIG_DEFAULT_TCP_CONG="cubic"
272# CONFIG_TCP_MD5SIG is not set
273# CONFIG_IPV6 is not set
274# CONFIG_INET6_XFRM_TUNNEL is not set
275# CONFIG_INET6_TUNNEL is not set
276# CONFIG_NETWORK_SECMARK is not set
277# CONFIG_NETFILTER is not set
278# CONFIG_IP_DCCP is not set
279# CONFIG_IP_SCTP is not set
280# CONFIG_TIPC is not set
281# CONFIG_ATM is not set
282# CONFIG_BRIDGE is not set
283# CONFIG_VLAN_8021Q is not set
284# CONFIG_DECNET is not set
285# CONFIG_LLC2 is not set
286# CONFIG_IPX is not set
287# CONFIG_ATALK is not set
288# CONFIG_X25 is not set
289# CONFIG_LAPB is not set
290# CONFIG_ECONET is not set
291# CONFIG_WAN_ROUTER is not set
292# CONFIG_NET_SCHED is not set
293
294#
295# Network testing
296#
297# CONFIG_NET_PKTGEN is not set
298# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set
300# CONFIG_BT is not set
301# CONFIG_AF_RXRPC is not set
302
303#
304# Wireless
305#
306# CONFIG_CFG80211 is not set
307# CONFIG_WIRELESS_EXT is not set
308# CONFIG_MAC80211 is not set
309# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
312
313#
314# Device Drivers
315#
316
317#
318# Generic Driver Options
319#
320CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
321CONFIG_STANDALONE=y
322CONFIG_PREVENT_FIRMWARE_BUILD=y
323CONFIG_FW_LOADER=y
324# CONFIG_DEBUG_DRIVER is not set
325# CONFIG_DEBUG_DEVRES is not set
326# CONFIG_SYS_HYPERVISOR is not set
327CONFIG_CONNECTOR=y
328CONFIG_PROC_EVENTS=y
329CONFIG_MTD=y
330# CONFIG_MTD_DEBUG is not set
331# CONFIG_MTD_CONCAT is not set
332CONFIG_MTD_PARTITIONS=y
333# CONFIG_MTD_REDBOOT_PARTS is not set
334CONFIG_MTD_CMDLINE_PARTS=y
335
336#
337# User Modules And Translation Layers
338#
339CONFIG_MTD_CHAR=y
340CONFIG_MTD_BLKDEVS=m
341CONFIG_MTD_BLOCK=m
342# CONFIG_MTD_BLOCK_RO is not set
343# CONFIG_FTL is not set
344# CONFIG_NFTL is not set
345# CONFIG_INFTL is not set
346# CONFIG_RFD_FTL is not set
347# CONFIG_SSFDC is not set
348# CONFIG_MTD_OOPS is not set
349
350#
351# RAM/ROM/Flash chip drivers
352#
353CONFIG_MTD_CFI=y
354CONFIG_MTD_JEDECPROBE=y
355CONFIG_MTD_GEN_PROBE=y
356# CONFIG_MTD_CFI_ADV_OPTIONS is not set
357CONFIG_MTD_MAP_BANK_WIDTH_1=y
358CONFIG_MTD_MAP_BANK_WIDTH_2=y
359CONFIG_MTD_MAP_BANK_WIDTH_4=y
360# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
361# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
362# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
363CONFIG_MTD_CFI_I1=y
364CONFIG_MTD_CFI_I2=y
365# CONFIG_MTD_CFI_I4 is not set
366# CONFIG_MTD_CFI_I8 is not set
367# CONFIG_MTD_CFI_INTELEXT is not set
368CONFIG_MTD_CFI_AMDSTD=y
369# CONFIG_MTD_CFI_STAA is not set
370CONFIG_MTD_CFI_UTIL=y
371# CONFIG_MTD_RAM is not set
372# CONFIG_MTD_ROM is not set
373# CONFIG_MTD_ABSENT is not set
374
375#
376# Mapping drivers for chip access
377#
378# CONFIG_MTD_COMPLEX_MAPPINGS is not set
379# CONFIG_MTD_PHYSMAP is not set
380CONFIG_MTD_PHYSMAP_OF=y
381# CONFIG_MTD_INTEL_VR_NOR is not set
382# CONFIG_MTD_PLATRAM is not set
383
384#
385# Self-contained MTD device drivers
386#
387# CONFIG_MTD_PMC551 is not set
388# CONFIG_MTD_SLRAM is not set
389# CONFIG_MTD_PHRAM is not set
390# CONFIG_MTD_MTDRAM is not set
391# CONFIG_MTD_BLOCK2MTD is not set
392
393#
394# Disk-On-Chip Device Drivers
395#
396# CONFIG_MTD_DOC2000 is not set
397# CONFIG_MTD_DOC2001 is not set
398# CONFIG_MTD_DOC2001PLUS is not set
399# CONFIG_MTD_NAND is not set
400# CONFIG_MTD_ONENAND is not set
401
402#
403# UBI - Unsorted block images
404#
405# CONFIG_MTD_UBI is not set
406CONFIG_OF_DEVICE=y
407# CONFIG_PARPORT is not set
408CONFIG_BLK_DEV=y
409# CONFIG_BLK_DEV_FD is not set
410# CONFIG_BLK_CPQ_DA is not set
411# CONFIG_BLK_CPQ_CISS_DA is not set
412# CONFIG_BLK_DEV_DAC960 is not set
413# CONFIG_BLK_DEV_UMEM is not set
414# CONFIG_BLK_DEV_COW_COMMON is not set
415# CONFIG_BLK_DEV_LOOP is not set
416# CONFIG_BLK_DEV_NBD is not set
417# CONFIG_BLK_DEV_SX8 is not set
418CONFIG_BLK_DEV_RAM=y
419CONFIG_BLK_DEV_RAM_COUNT=16
420CONFIG_BLK_DEV_RAM_SIZE=35000
421CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
422# CONFIG_CDROM_PKTCDVD is not set
423# CONFIG_ATA_OVER_ETH is not set
424# CONFIG_XILINX_SYSACE is not set
425# CONFIG_MISC_DEVICES is not set
426# CONFIG_IDE is not set
427
428#
429# SCSI device support
430#
431# CONFIG_RAID_ATTRS is not set
432# CONFIG_SCSI is not set
433# CONFIG_SCSI_DMA is not set
434# CONFIG_SCSI_NETLINK is not set
435# CONFIG_ATA is not set
436# CONFIG_MD is not set
437# CONFIG_FUSION is not set
438
439#
440# IEEE 1394 (FireWire) support
441#
442# CONFIG_FIREWIRE is not set
443# CONFIG_IEEE1394 is not set
444# CONFIG_I2O is not set
445# CONFIG_MACINTOSH_DRIVERS is not set
446CONFIG_NETDEVICES=y
447# CONFIG_NETDEVICES_MULTIQUEUE is not set
448# CONFIG_DUMMY is not set
449# CONFIG_BONDING is not set
450# CONFIG_MACVLAN is not set
451# CONFIG_EQUALIZER is not set
452# CONFIG_TUN is not set
453# CONFIG_VETH is not set
454# CONFIG_IP1000 is not set
455# CONFIG_ARCNET is not set
456# CONFIG_PHYLIB is not set
457CONFIG_NET_ETHERNET=y
458# CONFIG_MII is not set
459# CONFIG_HAPPYMEAL is not set
460# CONFIG_SUNGEM is not set
461# CONFIG_CASSINI is not set
462# CONFIG_NET_VENDOR_3COM is not set
463# CONFIG_NET_TULIP is not set
464# CONFIG_HP100 is not set
465CONFIG_IBM_NEW_EMAC=y
466CONFIG_IBM_NEW_EMAC_RXB=256
467CONFIG_IBM_NEW_EMAC_TXB=256
468CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
469CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
470CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
471# CONFIG_IBM_NEW_EMAC_DEBUG is not set
472# CONFIG_IBM_NEW_EMAC_ZMII is not set
473CONFIG_IBM_NEW_EMAC_RGMII=y
474# CONFIG_IBM_NEW_EMAC_TAH is not set
475CONFIG_IBM_NEW_EMAC_EMAC4=y
476# CONFIG_NET_PCI is not set
477# CONFIG_B44 is not set
478# CONFIG_NETDEV_1000 is not set
479# CONFIG_NETDEV_10000 is not set
480# CONFIG_TR is not set
481
482#
483# Wireless LAN
484#
485# CONFIG_WLAN_PRE80211 is not set
486# CONFIG_WLAN_80211 is not set
487# CONFIG_WAN is not set
488# CONFIG_FDDI is not set
489# CONFIG_HIPPI is not set
490# CONFIG_PPP is not set
491# CONFIG_SLIP is not set
492# CONFIG_SHAPER is not set
493# CONFIG_NETCONSOLE is not set
494# CONFIG_NETPOLL is not set
495# CONFIG_NET_POLL_CONTROLLER is not set
496# CONFIG_ISDN is not set
497# CONFIG_PHONE is not set
498
499#
500# Input device support
501#
502# CONFIG_INPUT is not set
503
504#
505# Hardware I/O ports
506#
507# CONFIG_SERIO is not set
508# CONFIG_GAMEPORT is not set
509
510#
511# Character devices
512#
513# CONFIG_VT is not set
514# CONFIG_SERIAL_NONSTANDARD is not set
515
516#
517# Serial drivers
518#
519CONFIG_SERIAL_8250=y
520CONFIG_SERIAL_8250_CONSOLE=y
521CONFIG_SERIAL_8250_PCI=y
522CONFIG_SERIAL_8250_NR_UARTS=4
523CONFIG_SERIAL_8250_RUNTIME_UARTS=4
524CONFIG_SERIAL_8250_EXTENDED=y
525# CONFIG_SERIAL_8250_MANY_PORTS is not set
526CONFIG_SERIAL_8250_SHARE_IRQ=y
527# CONFIG_SERIAL_8250_DETECT_IRQ is not set
528# CONFIG_SERIAL_8250_RSA is not set
529
530#
531# Non-8250 serial port support
532#
533# CONFIG_SERIAL_UARTLITE is not set
534CONFIG_SERIAL_CORE=y
535CONFIG_SERIAL_CORE_CONSOLE=y
536# CONFIG_SERIAL_JSM is not set
537CONFIG_SERIAL_OF_PLATFORM=y
538CONFIG_UNIX98_PTYS=y
539CONFIG_LEGACY_PTYS=y
540CONFIG_LEGACY_PTY_COUNT=256
541# CONFIG_IPMI_HANDLER is not set
542# CONFIG_HW_RANDOM is not set
543# CONFIG_NVRAM is not set
544# CONFIG_GEN_RTC is not set
545# CONFIG_R3964 is not set
546# CONFIG_APPLICOM is not set
547# CONFIG_RAW_DRIVER is not set
548# CONFIG_TCG_TPM is not set
549CONFIG_DEVPORT=y
550# CONFIG_I2C is not set
551
552#
553# SPI support
554#
555# CONFIG_SPI is not set
556# CONFIG_SPI_MASTER is not set
557# CONFIG_W1 is not set
558# CONFIG_POWER_SUPPLY is not set
559# CONFIG_HWMON is not set
560# CONFIG_WATCHDOG is not set
561
562#
563# Sonics Silicon Backplane
564#
565CONFIG_SSB_POSSIBLE=y
566# CONFIG_SSB is not set
567
568#
569# Multifunction device drivers
570#
571# CONFIG_MFD_SM501 is not set
572
573#
574# Multimedia devices
575#
576# CONFIG_VIDEO_DEV is not set
577# CONFIG_DVB_CORE is not set
578# CONFIG_DAB is not set
579
580#
581# Graphics support
582#
583# CONFIG_AGP is not set
584# CONFIG_DRM is not set
585# CONFIG_VGASTATE is not set
586# CONFIG_VIDEO_OUTPUT_CONTROL is not set
587# CONFIG_FB is not set
588# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
589
590#
591# Display device support
592#
593# CONFIG_DISPLAY_SUPPORT is not set
594
595#
596# Sound
597#
598# CONFIG_SOUND is not set
599# CONFIG_USB_SUPPORT is not set
600# CONFIG_MMC is not set
601# CONFIG_NEW_LEDS is not set
602# CONFIG_INFINIBAND is not set
603# CONFIG_EDAC is not set
604# CONFIG_RTC_CLASS is not set
605
606#
607# Userspace I/O
608#
609# CONFIG_UIO is not set
610
611#
612# File systems
613#
614CONFIG_EXT2_FS=y
615# CONFIG_EXT2_FS_XATTR is not set
616# CONFIG_EXT2_FS_XIP is not set
617# CONFIG_EXT3_FS is not set
618# CONFIG_EXT4DEV_FS is not set
619# CONFIG_REISERFS_FS is not set
620# CONFIG_JFS_FS is not set
621# CONFIG_FS_POSIX_ACL is not set
622# CONFIG_XFS_FS is not set
623# CONFIG_GFS2_FS is not set
624# CONFIG_OCFS2_FS is not set
625# CONFIG_MINIX_FS is not set
626# CONFIG_ROMFS_FS is not set
627CONFIG_INOTIFY=y
628CONFIG_INOTIFY_USER=y
629# CONFIG_QUOTA is not set
630CONFIG_DNOTIFY=y
631# CONFIG_AUTOFS_FS is not set
632# CONFIG_AUTOFS4_FS is not set
633# CONFIG_FUSE_FS is not set
634
635#
636# CD-ROM/DVD Filesystems
637#
638# CONFIG_ISO9660_FS is not set
639# CONFIG_UDF_FS is not set
640
641#
642# DOS/FAT/NT Filesystems
643#
644# CONFIG_MSDOS_FS is not set
645# CONFIG_VFAT_FS is not set
646# CONFIG_NTFS_FS is not set
647
648#
649# Pseudo filesystems
650#
651CONFIG_PROC_FS=y
652CONFIG_PROC_KCORE=y
653CONFIG_PROC_SYSCTL=y
654CONFIG_SYSFS=y
655CONFIG_TMPFS=y
656# CONFIG_TMPFS_POSIX_ACL is not set
657# CONFIG_HUGETLB_PAGE is not set
658# CONFIG_CONFIGFS_FS is not set
659
660#
661# Miscellaneous filesystems
662#
663# CONFIG_ADFS_FS is not set
664# CONFIG_AFFS_FS is not set
665# CONFIG_HFS_FS is not set
666# CONFIG_HFSPLUS_FS is not set
667# CONFIG_BEFS_FS is not set
668# CONFIG_BFS_FS is not set
669# CONFIG_EFS_FS is not set
670# CONFIG_JFFS2_FS is not set
671CONFIG_CRAMFS=y
672# CONFIG_VXFS_FS is not set
673# CONFIG_HPFS_FS is not set
674# CONFIG_QNX4FS_FS is not set
675# CONFIG_SYSV_FS is not set
676# CONFIG_UFS_FS is not set
677CONFIG_NETWORK_FILESYSTEMS=y
678CONFIG_NFS_FS=y
679CONFIG_NFS_V3=y
680# CONFIG_NFS_V3_ACL is not set
681# CONFIG_NFS_V4 is not set
682# CONFIG_NFS_DIRECTIO is not set
683# CONFIG_NFSD is not set
684CONFIG_ROOT_NFS=y
685CONFIG_LOCKD=y
686CONFIG_LOCKD_V4=y
687CONFIG_NFS_COMMON=y
688CONFIG_SUNRPC=y
689# CONFIG_SUNRPC_BIND34 is not set
690# CONFIG_RPCSEC_GSS_KRB5 is not set
691# CONFIG_RPCSEC_GSS_SPKM3 is not set
692# CONFIG_SMB_FS is not set
693# CONFIG_CIFS is not set
694# CONFIG_NCP_FS is not set
695# CONFIG_CODA_FS is not set
696# CONFIG_AFS_FS is not set
697
698#
699# Partition Types
700#
701# CONFIG_PARTITION_ADVANCED is not set
702CONFIG_MSDOS_PARTITION=y
703# CONFIG_NLS is not set
704# CONFIG_DLM is not set
705# CONFIG_UCC_SLOW is not set
706
707#
708# Library routines
709#
710CONFIG_BITREVERSE=y
711# CONFIG_CRC_CCITT is not set
712# CONFIG_CRC16 is not set
713# CONFIG_CRC_ITU_T is not set
714CONFIG_CRC32=y
715# CONFIG_CRC7 is not set
716# CONFIG_LIBCRC32C is not set
717CONFIG_ZLIB_INFLATE=y
718CONFIG_PLIST=y
719CONFIG_HAS_IOMEM=y
720CONFIG_HAS_IOPORT=y
721CONFIG_HAS_DMA=y
722# CONFIG_INSTRUMENTATION is not set
723
724#
725# Kernel hacking
726#
727# CONFIG_PRINTK_TIME is not set
728CONFIG_ENABLE_WARN_DEPRECATED=y
729CONFIG_ENABLE_MUST_CHECK=y
730CONFIG_MAGIC_SYSRQ=y
731# CONFIG_UNUSED_SYMBOLS is not set
732# CONFIG_DEBUG_FS is not set
733# CONFIG_HEADERS_CHECK is not set
734CONFIG_DEBUG_KERNEL=y
735# CONFIG_DEBUG_SHIRQ is not set
736CONFIG_DETECT_SOFTLOCKUP=y
737CONFIG_SCHED_DEBUG=y
738# CONFIG_SCHEDSTATS is not set
739# CONFIG_TIMER_STATS is not set
740# CONFIG_SLUB_DEBUG_ON is not set
741# CONFIG_DEBUG_RT_MUTEXES is not set
742# CONFIG_RT_MUTEX_TESTER is not set
743# CONFIG_DEBUG_SPINLOCK is not set
744# CONFIG_DEBUG_MUTEXES is not set
745# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
746# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
747# CONFIG_DEBUG_KOBJECT is not set
748CONFIG_DEBUG_BUGVERBOSE=y
749# CONFIG_DEBUG_INFO is not set
750# CONFIG_DEBUG_VM is not set
751# CONFIG_DEBUG_LIST is not set
752# CONFIG_DEBUG_SG is not set
753CONFIG_FORCED_INLINING=y
754# CONFIG_BOOT_PRINTK_DELAY is not set
755# CONFIG_RCU_TORTURE_TEST is not set
756# CONFIG_FAULT_INJECTION is not set
757# CONFIG_SAMPLES is not set
758# CONFIG_DEBUG_STACKOVERFLOW is not set
759# CONFIG_DEBUG_STACK_USAGE is not set
760# CONFIG_DEBUG_PAGEALLOC is not set
761# CONFIG_DEBUGGER is not set
762# CONFIG_BDI_SWITCH is not set
763# CONFIG_PPC_EARLY_DEBUG is not set
764
765#
766# Security options
767#
768# CONFIG_KEYS is not set
769# CONFIG_SECURITY is not set
770# CONFIG_SECURITY_FILE_CAPABILITIES is not set
771CONFIG_CRYPTO=y
772CONFIG_CRYPTO_ALGAPI=y
773CONFIG_CRYPTO_BLKCIPHER=y
774CONFIG_CRYPTO_MANAGER=y
775# CONFIG_CRYPTO_HMAC is not set
776# CONFIG_CRYPTO_XCBC is not set
777# CONFIG_CRYPTO_NULL is not set
778# CONFIG_CRYPTO_MD4 is not set
779CONFIG_CRYPTO_MD5=y
780# CONFIG_CRYPTO_SHA1 is not set
781# CONFIG_CRYPTO_SHA256 is not set
782# CONFIG_CRYPTO_SHA512 is not set
783# CONFIG_CRYPTO_WP512 is not set
784# CONFIG_CRYPTO_TGR192 is not set
785# CONFIG_CRYPTO_GF128MUL is not set
786CONFIG_CRYPTO_ECB=y
787CONFIG_CRYPTO_CBC=y
788CONFIG_CRYPTO_PCBC=y
789# CONFIG_CRYPTO_LRW is not set
790# CONFIG_CRYPTO_XTS is not set
791# CONFIG_CRYPTO_CRYPTD is not set
792CONFIG_CRYPTO_DES=y
793# CONFIG_CRYPTO_FCRYPT is not set
794# CONFIG_CRYPTO_BLOWFISH is not set
795# CONFIG_CRYPTO_TWOFISH is not set
796# CONFIG_CRYPTO_SERPENT is not set
797# CONFIG_CRYPTO_AES is not set
798# CONFIG_CRYPTO_CAST5 is not set
799# CONFIG_CRYPTO_CAST6 is not set
800# CONFIG_CRYPTO_TEA is not set
801# CONFIG_CRYPTO_ARC4 is not set
802# CONFIG_CRYPTO_KHAZAD is not set
803# CONFIG_CRYPTO_ANUBIS is not set
804# CONFIG_CRYPTO_SEED is not set
805# CONFIG_CRYPTO_DEFLATE is not set
806# CONFIG_CRYPTO_MICHAEL_MIC is not set
807# CONFIG_CRYPTO_CRC32C is not set
808# CONFIG_CRYPTO_CAMELLIA is not set
809# CONFIG_CRYPTO_TEST is not set
810# CONFIG_CRYPTO_AUTHENC is not set
811CONFIG_CRYPTO_HW=y
812# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
new file mode 100644
index 000000000000..740c9f2b7de6
--- /dev/null
+++ b/arch/powerpc/configs/mpc5200_defconfig
@@ -0,0 +1,1286 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Fri Jan 18 14:19:54 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18# CONFIG_ALTIVEC is not set
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46# CONFIG_PPC_UDBG_16550 is not set
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set
70# CONFIG_PID_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75CONFIG_FAIR_GROUP_SCHED=y
76CONFIG_FAIR_USER_SCHED=y
77# CONFIG_FAIR_CGROUP_SCHED is not set
78CONFIG_SYSFS_DEPRECATED=y
79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
81CONFIG_INITRAMFS_SOURCE=""
82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
83CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y
85# CONFIG_SYSCTL_SYSCALL is not set
86# CONFIG_KALLSYMS is not set
87CONFIG_HOTPLUG=y
88CONFIG_PRINTK=y
89CONFIG_BUG=y
90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
94# CONFIG_EPOLL is not set
95CONFIG_SIGNALFD=y
96CONFIG_EVENTFD=y
97CONFIG_SHMEM=y
98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLUB_DEBUG=y
100# CONFIG_SLAB is not set
101CONFIG_SLUB=y
102# CONFIG_SLOB is not set
103CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0
106CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set
109# CONFIG_MODVERSIONS is not set
110# CONFIG_MODULE_SRCVERSION_ALL is not set
111# CONFIG_KMOD is not set
112CONFIG_BLOCK=y
113# CONFIG_LBD is not set
114# CONFIG_BLK_DEV_IO_TRACE is not set
115# CONFIG_LSF is not set
116# CONFIG_BLK_DEV_BSG is not set
117
118#
119# IO Schedulers
120#
121CONFIG_IOSCHED_NOOP=y
122CONFIG_IOSCHED_AS=y
123CONFIG_IOSCHED_DEADLINE=y
124CONFIG_IOSCHED_CFQ=y
125CONFIG_DEFAULT_AS=y
126# CONFIG_DEFAULT_DEADLINE is not set
127# CONFIG_DEFAULT_CFQ is not set
128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory"
130
131#
132# Platform support
133#
134CONFIG_PPC_MULTIPLATFORM=y
135# CONFIG_PPC_82xx is not set
136# CONFIG_PPC_83xx is not set
137# CONFIG_PPC_86xx is not set
138CONFIG_CLASSIC32=y
139# CONFIG_PPC_CHRP is not set
140CONFIG_PPC_MPC52xx=y
141CONFIG_PPC_MPC5200=y
142CONFIG_PPC_MPC5200_BUGFIX=y
143CONFIG_PPC_MPC5200_SIMPLE=y
144CONFIG_PPC_EFIKA=y
145CONFIG_PPC_LITE5200=y
146# CONFIG_PPC_PMAC is not set
147# CONFIG_PPC_CELL is not set
148# CONFIG_PPC_CELL_NATIVE is not set
149# CONFIG_PQ2ADS is not set
150# CONFIG_EMBEDDED6xx is not set
151CONFIG_PPC_NATIVE=y
152# CONFIG_UDBG_RTAS_CONSOLE is not set
153# CONFIG_MPIC is not set
154# CONFIG_MPIC_WEIRD is not set
155# CONFIG_PPC_I8259 is not set
156CONFIG_PPC_RTAS=y
157# CONFIG_RTAS_ERROR_LOGGING is not set
158CONFIG_RTAS_PROC=y
159# CONFIG_MMIO_NVRAM is not set
160# CONFIG_PPC_MPC106 is not set
161# CONFIG_PPC_970_NAP is not set
162# CONFIG_PPC_INDIRECT_IO is not set
163# CONFIG_GENERIC_IOMAP is not set
164# CONFIG_CPU_FREQ is not set
165# CONFIG_TAU is not set
166# CONFIG_CPM2 is not set
167# CONFIG_FSL_ULI1575 is not set
168CONFIG_PPC_BESTCOMM=y
169CONFIG_PPC_BESTCOMM_ATA=y
170CONFIG_PPC_BESTCOMM_FEC=y
171CONFIG_PPC_BESTCOMM_GEN_BD=y
172
173#
174# Kernel options
175#
176# CONFIG_HIGHMEM is not set
177CONFIG_TICK_ONESHOT=y
178CONFIG_NO_HZ=y
179CONFIG_HIGH_RES_TIMERS=y
180CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
181# CONFIG_HZ_100 is not set
182CONFIG_HZ_250=y
183# CONFIG_HZ_300 is not set
184# CONFIG_HZ_1000 is not set
185CONFIG_HZ=250
186CONFIG_PREEMPT_NONE=y
187# CONFIG_PREEMPT_VOLUNTARY is not set
188# CONFIG_PREEMPT is not set
189CONFIG_BINFMT_ELF=y
190# CONFIG_BINFMT_MISC is not set
191CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
192# CONFIG_KEXEC is not set
193CONFIG_ARCH_FLATMEM_ENABLE=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
202# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
203CONFIG_SPLIT_PTLOCK_CPUS=4
204# CONFIG_RESOURCES_64BIT is not set
205CONFIG_ZONE_DMA_FLAG=1
206CONFIG_BOUNCE=y
207CONFIG_VIRT_TO_BUS=y
208CONFIG_PROC_DEVICETREE=y
209# CONFIG_CMDLINE_BOOL is not set
210CONFIG_PM=y
211# CONFIG_PM_LEGACY is not set
212# CONFIG_PM_DEBUG is not set
213CONFIG_PM_SLEEP=y
214CONFIG_SUSPEND_UP_POSSIBLE=y
215CONFIG_SUSPEND=y
216CONFIG_HIBERNATION_UP_POSSIBLE=y
217# CONFIG_HIBERNATION is not set
218CONFIG_SECCOMP=y
219CONFIG_WANT_DEVICE_TREE=y
220CONFIG_DEVICE_TREE=""
221CONFIG_ISA_DMA_API=y
222
223#
224# Bus options
225#
226CONFIG_ZONE_DMA=y
227CONFIG_GENERIC_ISA_DMA=y
228# CONFIG_PPC_INDIRECT_PCI is not set
229CONFIG_FSL_SOC=y
230CONFIG_PCI=y
231CONFIG_PCI_DOMAINS=y
232CONFIG_PCI_SYSCALL=y
233# CONFIG_PCIEPORTBUS is not set
234CONFIG_ARCH_SUPPORTS_MSI=y
235# CONFIG_PCI_MSI is not set
236CONFIG_PCI_LEGACY=y
237# CONFIG_PCI_DEBUG is not set
238# CONFIG_PCCARD is not set
239# CONFIG_HOTPLUG_PCI is not set
240
241#
242# Advanced setup
243#
244# CONFIG_ADVANCED_OPTIONS is not set
245
246#
247# Default settings for advanced configuration options are used
248#
249CONFIG_HIGHMEM_START=0xfe000000
250CONFIG_LOWMEM_SIZE=0x30000000
251CONFIG_KERNEL_START=0xc0000000
252CONFIG_TASK_SIZE=0xc0000000
253CONFIG_BOOT_LOAD=0x00800000
254
255#
256# Networking
257#
258CONFIG_NET=y
259
260#
261# Networking options
262#
263CONFIG_PACKET=y
264# CONFIG_PACKET_MMAP is not set
265CONFIG_UNIX=y
266CONFIG_XFRM=y
267CONFIG_XFRM_USER=m
268# CONFIG_XFRM_SUB_POLICY is not set
269# CONFIG_XFRM_MIGRATE is not set
270# CONFIG_NET_KEY is not set
271CONFIG_INET=y
272CONFIG_IP_MULTICAST=y
273# CONFIG_IP_ADVANCED_ROUTER is not set
274CONFIG_IP_FIB_HASH=y
275CONFIG_IP_PNP=y
276CONFIG_IP_PNP_DHCP=y
277CONFIG_IP_PNP_BOOTP=y
278# CONFIG_IP_PNP_RARP is not set
279# CONFIG_NET_IPIP is not set
280# CONFIG_NET_IPGRE is not set
281# CONFIG_IP_MROUTE is not set
282# CONFIG_ARPD is not set
283CONFIG_SYN_COOKIES=y
284# CONFIG_INET_AH is not set
285# CONFIG_INET_ESP is not set
286# CONFIG_INET_IPCOMP is not set
287# CONFIG_INET_XFRM_TUNNEL is not set
288# CONFIG_INET_TUNNEL is not set
289CONFIG_INET_XFRM_MODE_TRANSPORT=y
290CONFIG_INET_XFRM_MODE_TUNNEL=y
291CONFIG_INET_XFRM_MODE_BEET=y
292# CONFIG_INET_LRO is not set
293CONFIG_INET_DIAG=y
294CONFIG_INET_TCP_DIAG=y
295# CONFIG_TCP_CONG_ADVANCED is not set
296CONFIG_TCP_CONG_CUBIC=y
297CONFIG_DEFAULT_TCP_CONG="cubic"
298# CONFIG_TCP_MD5SIG is not set
299# CONFIG_IPV6 is not set
300# CONFIG_INET6_XFRM_TUNNEL is not set
301# CONFIG_INET6_TUNNEL is not set
302# CONFIG_NETWORK_SECMARK is not set
303# CONFIG_NETFILTER is not set
304# CONFIG_IP_DCCP is not set
305# CONFIG_IP_SCTP is not set
306# CONFIG_TIPC is not set
307# CONFIG_ATM is not set
308# CONFIG_BRIDGE is not set
309# CONFIG_VLAN_8021Q is not set
310# CONFIG_DECNET is not set
311# CONFIG_LLC2 is not set
312# CONFIG_IPX is not set
313# CONFIG_ATALK is not set
314# CONFIG_X25 is not set
315# CONFIG_LAPB is not set
316# CONFIG_ECONET is not set
317# CONFIG_WAN_ROUTER is not set
318# CONFIG_NET_SCHED is not set
319
320#
321# Network testing
322#
323# CONFIG_NET_PKTGEN is not set
324# CONFIG_HAMRADIO is not set
325# CONFIG_IRDA is not set
326# CONFIG_BT is not set
327# CONFIG_AF_RXRPC is not set
328
329#
330# Wireless
331#
332# CONFIG_CFG80211 is not set
333# CONFIG_WIRELESS_EXT is not set
334# CONFIG_MAC80211 is not set
335# CONFIG_IEEE80211 is not set
336# CONFIG_RFKILL is not set
337# CONFIG_NET_9P is not set
338
339#
340# Device Drivers
341#
342
343#
344# Generic Driver Options
345#
346CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
347CONFIG_STANDALONE=y
348CONFIG_PREVENT_FIRMWARE_BUILD=y
349# CONFIG_FW_LOADER is not set
350# CONFIG_DEBUG_DRIVER is not set
351# CONFIG_DEBUG_DEVRES is not set
352# CONFIG_SYS_HYPERVISOR is not set
353# CONFIG_CONNECTOR is not set
354CONFIG_MTD=y
355# CONFIG_MTD_DEBUG is not set
356CONFIG_MTD_CONCAT=y
357CONFIG_MTD_PARTITIONS=y
358# CONFIG_MTD_REDBOOT_PARTS is not set
359CONFIG_MTD_CMDLINE_PARTS=y
360
361#
362# User Modules And Translation Layers
363#
364CONFIG_MTD_CHAR=y
365CONFIG_MTD_BLKDEVS=y
366CONFIG_MTD_BLOCK=y
367# CONFIG_FTL is not set
368# CONFIG_NFTL is not set
369# CONFIG_INFTL is not set
370# CONFIG_RFD_FTL is not set
371# CONFIG_SSFDC is not set
372# CONFIG_MTD_OOPS is not set
373
374#
375# RAM/ROM/Flash chip drivers
376#
377CONFIG_MTD_CFI=y
378# CONFIG_MTD_JEDECPROBE is not set
379CONFIG_MTD_GEN_PROBE=y
380# CONFIG_MTD_CFI_ADV_OPTIONS is not set
381CONFIG_MTD_MAP_BANK_WIDTH_1=y
382CONFIG_MTD_MAP_BANK_WIDTH_2=y
383CONFIG_MTD_MAP_BANK_WIDTH_4=y
384# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
385# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
386# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
387CONFIG_MTD_CFI_I1=y
388CONFIG_MTD_CFI_I2=y
389# CONFIG_MTD_CFI_I4 is not set
390# CONFIG_MTD_CFI_I8 is not set
391# CONFIG_MTD_CFI_INTELEXT is not set
392CONFIG_MTD_CFI_AMDSTD=y
393# CONFIG_MTD_CFI_STAA is not set
394CONFIG_MTD_CFI_UTIL=y
395CONFIG_MTD_RAM=y
396CONFIG_MTD_ROM=y
397# CONFIG_MTD_ABSENT is not set
398
399#
400# Mapping drivers for chip access
401#
402# CONFIG_MTD_COMPLEX_MAPPINGS is not set
403# CONFIG_MTD_PHYSMAP is not set
404CONFIG_MTD_PHYSMAP_OF=y
405# CONFIG_MTD_INTEL_VR_NOR is not set
406# CONFIG_MTD_PLATRAM is not set
407
408#
409# Self-contained MTD device drivers
410#
411# CONFIG_MTD_PMC551 is not set
412# CONFIG_MTD_SLRAM is not set
413# CONFIG_MTD_PHRAM is not set
414# CONFIG_MTD_MTDRAM is not set
415# CONFIG_MTD_BLOCK2MTD is not set
416
417#
418# Disk-On-Chip Device Drivers
419#
420# CONFIG_MTD_DOC2000 is not set
421# CONFIG_MTD_DOC2001 is not set
422# CONFIG_MTD_DOC2001PLUS is not set
423# CONFIG_MTD_NAND is not set
424# CONFIG_MTD_ONENAND is not set
425
426#
427# UBI - Unsorted block images
428#
429# CONFIG_MTD_UBI is not set
430CONFIG_OF_DEVICE=y
431# CONFIG_PARPORT is not set
432CONFIG_BLK_DEV=y
433# CONFIG_BLK_DEV_FD is not set
434# CONFIG_BLK_CPQ_DA is not set
435# CONFIG_BLK_CPQ_CISS_DA is not set
436# CONFIG_BLK_DEV_DAC960 is not set
437# CONFIG_BLK_DEV_UMEM is not set
438# CONFIG_BLK_DEV_COW_COMMON is not set
439CONFIG_BLK_DEV_LOOP=y
440# CONFIG_BLK_DEV_CRYPTOLOOP is not set
441# CONFIG_BLK_DEV_NBD is not set
442# CONFIG_BLK_DEV_SX8 is not set
443# CONFIG_BLK_DEV_UB is not set
444CONFIG_BLK_DEV_RAM=y
445CONFIG_BLK_DEV_RAM_COUNT=16
446CONFIG_BLK_DEV_RAM_SIZE=32768
447CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
448# CONFIG_CDROM_PKTCDVD is not set
449# CONFIG_ATA_OVER_ETH is not set
450CONFIG_MISC_DEVICES=y
451# CONFIG_PHANTOM is not set
452# CONFIG_EEPROM_93CX6 is not set
453# CONFIG_SGI_IOC4 is not set
454# CONFIG_TIFM_CORE is not set
455# CONFIG_IDE is not set
456
457#
458# SCSI device support
459#
460# CONFIG_RAID_ATTRS is not set
461CONFIG_SCSI=y
462CONFIG_SCSI_DMA=y
463CONFIG_SCSI_TGT=y
464# CONFIG_SCSI_NETLINK is not set
465CONFIG_SCSI_PROC_FS=y
466
467#
468# SCSI support type (disk, tape, CD-ROM)
469#
470CONFIG_BLK_DEV_SD=y
471# CONFIG_CHR_DEV_ST is not set
472# CONFIG_CHR_DEV_OSST is not set
473# CONFIG_BLK_DEV_SR is not set
474CONFIG_CHR_DEV_SG=y
475# CONFIG_CHR_DEV_SCH is not set
476
477#
478# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
479#
480# CONFIG_SCSI_MULTI_LUN is not set
481# CONFIG_SCSI_CONSTANTS is not set
482# CONFIG_SCSI_LOGGING is not set
483# CONFIG_SCSI_SCAN_ASYNC is not set
484CONFIG_SCSI_WAIT_SCAN=m
485
486#
487# SCSI Transports
488#
489# CONFIG_SCSI_SPI_ATTRS is not set
490# CONFIG_SCSI_FC_ATTRS is not set
491# CONFIG_SCSI_ISCSI_ATTRS is not set
492# CONFIG_SCSI_SAS_LIBSAS is not set
493# CONFIG_SCSI_SRP_ATTRS is not set
494CONFIG_SCSI_LOWLEVEL=y
495# CONFIG_ISCSI_TCP is not set
496# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
497# CONFIG_SCSI_3W_9XXX is not set
498# CONFIG_SCSI_ACARD is not set
499# CONFIG_SCSI_AACRAID is not set
500# CONFIG_SCSI_AIC7XXX is not set
501# CONFIG_SCSI_AIC7XXX_OLD is not set
502# CONFIG_SCSI_AIC79XX is not set
503# CONFIG_SCSI_AIC94XX is not set
504# CONFIG_SCSI_DPT_I2O is not set
505# CONFIG_SCSI_ADVANSYS is not set
506# CONFIG_SCSI_ARCMSR is not set
507# CONFIG_MEGARAID_NEWGEN is not set
508# CONFIG_MEGARAID_LEGACY is not set
509# CONFIG_MEGARAID_SAS is not set
510# CONFIG_SCSI_HPTIOP is not set
511# CONFIG_SCSI_BUSLOGIC is not set
512# CONFIG_SCSI_DMX3191D is not set
513# CONFIG_SCSI_EATA is not set
514# CONFIG_SCSI_FUTURE_DOMAIN is not set
515# CONFIG_SCSI_GDTH is not set
516# CONFIG_SCSI_IPS is not set
517# CONFIG_SCSI_INITIO is not set
518# CONFIG_SCSI_INIA100 is not set
519# CONFIG_SCSI_STEX is not set
520# CONFIG_SCSI_SYM53C8XX_2 is not set
521# CONFIG_SCSI_IPR is not set
522# CONFIG_SCSI_QLOGIC_1280 is not set
523# CONFIG_SCSI_QLA_FC is not set
524# CONFIG_SCSI_QLA_ISCSI is not set
525# CONFIG_SCSI_LPFC is not set
526# CONFIG_SCSI_DC395x is not set
527# CONFIG_SCSI_DC390T is not set
528# CONFIG_SCSI_NSP32 is not set
529# CONFIG_SCSI_DEBUG is not set
530# CONFIG_SCSI_SRP is not set
531CONFIG_ATA=y
532# CONFIG_ATA_NONSTANDARD is not set
533# CONFIG_SATA_AHCI is not set
534# CONFIG_SATA_SVW is not set
535# CONFIG_ATA_PIIX is not set
536# CONFIG_SATA_MV is not set
537# CONFIG_SATA_NV is not set
538# CONFIG_PDC_ADMA is not set
539# CONFIG_SATA_QSTOR is not set
540# CONFIG_SATA_PROMISE is not set
541# CONFIG_SATA_SX4 is not set
542# CONFIG_SATA_SIL is not set
543# CONFIG_SATA_SIL24 is not set
544# CONFIG_SATA_SIS is not set
545# CONFIG_SATA_ULI is not set
546# CONFIG_SATA_VIA is not set
547# CONFIG_SATA_VITESSE is not set
548# CONFIG_SATA_INIC162X is not set
549# CONFIG_PATA_ALI is not set
550# CONFIG_PATA_AMD is not set
551# CONFIG_PATA_ARTOP is not set
552# CONFIG_PATA_ATIIXP is not set
553# CONFIG_PATA_CMD640_PCI is not set
554# CONFIG_PATA_CMD64X is not set
555# CONFIG_PATA_CS5520 is not set
556# CONFIG_PATA_CS5530 is not set
557# CONFIG_PATA_CYPRESS is not set
558# CONFIG_PATA_EFAR is not set
559# CONFIG_ATA_GENERIC is not set
560# CONFIG_PATA_HPT366 is not set
561# CONFIG_PATA_HPT37X is not set
562# CONFIG_PATA_HPT3X2N is not set
563# CONFIG_PATA_HPT3X3 is not set
564# CONFIG_PATA_IT821X is not set
565# CONFIG_PATA_IT8213 is not set
566# CONFIG_PATA_JMICRON is not set
567# CONFIG_PATA_TRIFLEX is not set
568# CONFIG_PATA_MARVELL is not set
569CONFIG_PATA_MPC52xx=y
570# CONFIG_PATA_MPIIX is not set
571# CONFIG_PATA_OLDPIIX is not set
572# CONFIG_PATA_NETCELL is not set
573# CONFIG_PATA_NS87410 is not set
574# CONFIG_PATA_NS87415 is not set
575# CONFIG_PATA_OPTI is not set
576# CONFIG_PATA_OPTIDMA is not set
577# CONFIG_PATA_PDC_OLD is not set
578# CONFIG_PATA_RADISYS is not set
579# CONFIG_PATA_RZ1000 is not set
580# CONFIG_PATA_SC1200 is not set
581# CONFIG_PATA_SERVERWORKS is not set
582# CONFIG_PATA_PDC2027X is not set
583# CONFIG_PATA_SIL680 is not set
584# CONFIG_PATA_SIS is not set
585# CONFIG_PATA_VIA is not set
586# CONFIG_PATA_WINBOND is not set
587CONFIG_PATA_PLATFORM=y
588# CONFIG_PATA_OF_PLATFORM is not set
589# CONFIG_MD is not set
590# CONFIG_FUSION is not set
591
592#
593# IEEE 1394 (FireWire) support
594#
595# CONFIG_FIREWIRE is not set
596# CONFIG_IEEE1394 is not set
597# CONFIG_I2O is not set
598# CONFIG_MACINTOSH_DRIVERS is not set
599CONFIG_NETDEVICES=y
600# CONFIG_NETDEVICES_MULTIQUEUE is not set
601# CONFIG_DUMMY is not set
602# CONFIG_BONDING is not set
603# CONFIG_MACVLAN is not set
604# CONFIG_EQUALIZER is not set
605# CONFIG_TUN is not set
606# CONFIG_VETH is not set
607# CONFIG_IP1000 is not set
608# CONFIG_ARCNET is not set
609CONFIG_PHYLIB=y
610
611#
612# MII PHY device drivers
613#
614# CONFIG_MARVELL_PHY is not set
615# CONFIG_DAVICOM_PHY is not set
616# CONFIG_QSEMI_PHY is not set
617# CONFIG_LXT_PHY is not set
618# CONFIG_CICADA_PHY is not set
619# CONFIG_VITESSE_PHY is not set
620# CONFIG_SMSC_PHY is not set
621# CONFIG_BROADCOM_PHY is not set
622# CONFIG_ICPLUS_PHY is not set
623# CONFIG_FIXED_PHY is not set
624# CONFIG_MDIO_BITBANG is not set
625CONFIG_NET_ETHERNET=y
626# CONFIG_MII is not set
627# CONFIG_HAPPYMEAL is not set
628# CONFIG_SUNGEM is not set
629# CONFIG_CASSINI is not set
630# CONFIG_NET_VENDOR_3COM is not set
631# CONFIG_NET_TULIP is not set
632# CONFIG_HP100 is not set
633# CONFIG_IBM_NEW_EMAC_ZMII is not set
634# CONFIG_IBM_NEW_EMAC_RGMII is not set
635# CONFIG_IBM_NEW_EMAC_TAH is not set
636# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
637# CONFIG_NET_PCI is not set
638# CONFIG_B44 is not set
639CONFIG_FEC_MPC52xx=y
640CONFIG_FEC_MPC52xx_MDIO=y
641# CONFIG_NETDEV_1000 is not set
642# CONFIG_NETDEV_10000 is not set
643# CONFIG_TR is not set
644
645#
646# Wireless LAN
647#
648# CONFIG_WLAN_PRE80211 is not set
649# CONFIG_WLAN_80211 is not set
650
651#
652# USB Network Adapters
653#
654# CONFIG_USB_CATC is not set
655# CONFIG_USB_KAWETH is not set
656# CONFIG_USB_PEGASUS is not set
657# CONFIG_USB_RTL8150 is not set
658# CONFIG_USB_USBNET is not set
659# CONFIG_WAN is not set
660# CONFIG_FDDI is not set
661# CONFIG_HIPPI is not set
662# CONFIG_PPP is not set
663# CONFIG_SLIP is not set
664# CONFIG_NET_FC is not set
665# CONFIG_SHAPER is not set
666# CONFIG_NETCONSOLE is not set
667# CONFIG_NETPOLL is not set
668# CONFIG_NET_POLL_CONTROLLER is not set
669# CONFIG_ISDN is not set
670# CONFIG_PHONE is not set
671
672#
673# Input device support
674#
675# CONFIG_INPUT is not set
676
677#
678# Hardware I/O ports
679#
680# CONFIG_SERIO is not set
681# CONFIG_GAMEPORT is not set
682
683#
684# Character devices
685#
686# CONFIG_VT is not set
687# CONFIG_SERIAL_NONSTANDARD is not set
688
689#
690# Serial drivers
691#
692# CONFIG_SERIAL_8250 is not set
693
694#
695# Non-8250 serial port support
696#
697# CONFIG_SERIAL_UARTLITE is not set
698CONFIG_SERIAL_CORE=y
699CONFIG_SERIAL_CORE_CONSOLE=y
700CONFIG_SERIAL_MPC52xx=y
701CONFIG_SERIAL_MPC52xx_CONSOLE=y
702CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
703# CONFIG_SERIAL_JSM is not set
704CONFIG_UNIX98_PTYS=y
705CONFIG_LEGACY_PTYS=y
706CONFIG_LEGACY_PTY_COUNT=256
707# CONFIG_HVC_RTAS is not set
708# CONFIG_IPMI_HANDLER is not set
709# CONFIG_HW_RANDOM is not set
710# CONFIG_NVRAM is not set
711CONFIG_GEN_RTC=y
712# CONFIG_GEN_RTC_X is not set
713# CONFIG_R3964 is not set
714# CONFIG_APPLICOM is not set
715# CONFIG_RAW_DRIVER is not set
716# CONFIG_TCG_TPM is not set
717CONFIG_DEVPORT=y
718CONFIG_I2C=y
719CONFIG_I2C_BOARDINFO=y
720CONFIG_I2C_CHARDEV=y
721
722#
723# I2C Algorithms
724#
725# CONFIG_I2C_ALGOBIT is not set
726# CONFIG_I2C_ALGOPCF is not set
727# CONFIG_I2C_ALGOPCA is not set
728
729#
730# I2C Hardware Bus support
731#
732# CONFIG_I2C_ALI1535 is not set
733# CONFIG_I2C_ALI1563 is not set
734# CONFIG_I2C_ALI15X3 is not set
735# CONFIG_I2C_AMD756 is not set
736# CONFIG_I2C_AMD8111 is not set
737# CONFIG_I2C_I801 is not set
738# CONFIG_I2C_I810 is not set
739# CONFIG_I2C_PIIX4 is not set
740CONFIG_I2C_MPC=y
741# CONFIG_I2C_NFORCE2 is not set
742# CONFIG_I2C_OCORES is not set
743# CONFIG_I2C_PARPORT_LIGHT is not set
744# CONFIG_I2C_PROSAVAGE is not set
745# CONFIG_I2C_SAVAGE4 is not set
746# CONFIG_I2C_SIMTEC is not set
747# CONFIG_I2C_SIS5595 is not set
748# CONFIG_I2C_SIS630 is not set
749# CONFIG_I2C_SIS96X is not set
750# CONFIG_I2C_TAOS_EVM is not set
751# CONFIG_I2C_STUB is not set
752# CONFIG_I2C_TINY_USB is not set
753# CONFIG_I2C_VIA is not set
754# CONFIG_I2C_VIAPRO is not set
755# CONFIG_I2C_VOODOO3 is not set
756
757#
758# Miscellaneous I2C Chip support
759#
760# CONFIG_SENSORS_DS1337 is not set
761# CONFIG_SENSORS_DS1374 is not set
762# CONFIG_DS1682 is not set
763# CONFIG_SENSORS_EEPROM is not set
764# CONFIG_SENSORS_PCF8574 is not set
765# CONFIG_SENSORS_PCA9539 is not set
766# CONFIG_SENSORS_PCF8591 is not set
767# CONFIG_SENSORS_M41T00 is not set
768# CONFIG_SENSORS_MAX6875 is not set
769# CONFIG_SENSORS_TSL2550 is not set
770# CONFIG_I2C_DEBUG_CORE is not set
771# CONFIG_I2C_DEBUG_ALGO is not set
772# CONFIG_I2C_DEBUG_BUS is not set
773# CONFIG_I2C_DEBUG_CHIP is not set
774
775#
776# SPI support
777#
778# CONFIG_SPI is not set
779# CONFIG_SPI_MASTER is not set
780# CONFIG_W1 is not set
781# CONFIG_POWER_SUPPLY is not set
782CONFIG_HWMON=y
783# CONFIG_HWMON_VID is not set
784# CONFIG_SENSORS_AD7418 is not set
785# CONFIG_SENSORS_ADM1021 is not set
786# CONFIG_SENSORS_ADM1025 is not set
787# CONFIG_SENSORS_ADM1026 is not set
788# CONFIG_SENSORS_ADM1029 is not set
789# CONFIG_SENSORS_ADM1031 is not set
790# CONFIG_SENSORS_ADM9240 is not set
791# CONFIG_SENSORS_ADT7470 is not set
792# CONFIG_SENSORS_ATXP1 is not set
793# CONFIG_SENSORS_DS1621 is not set
794# CONFIG_SENSORS_I5K_AMB is not set
795# CONFIG_SENSORS_F71805F is not set
796# CONFIG_SENSORS_F71882FG is not set
797# CONFIG_SENSORS_F75375S is not set
798# CONFIG_SENSORS_GL518SM is not set
799# CONFIG_SENSORS_GL520SM is not set
800# CONFIG_SENSORS_IT87 is not set
801# CONFIG_SENSORS_LM63 is not set
802# CONFIG_SENSORS_LM75 is not set
803# CONFIG_SENSORS_LM77 is not set
804# CONFIG_SENSORS_LM78 is not set
805# CONFIG_SENSORS_LM80 is not set
806# CONFIG_SENSORS_LM83 is not set
807# CONFIG_SENSORS_LM85 is not set
808# CONFIG_SENSORS_LM87 is not set
809# CONFIG_SENSORS_LM90 is not set
810# CONFIG_SENSORS_LM92 is not set
811# CONFIG_SENSORS_LM93 is not set
812# CONFIG_SENSORS_MAX1619 is not set
813# CONFIG_SENSORS_MAX6650 is not set
814# CONFIG_SENSORS_PC87360 is not set
815# CONFIG_SENSORS_PC87427 is not set
816# CONFIG_SENSORS_SIS5595 is not set
817# CONFIG_SENSORS_DME1737 is not set
818# CONFIG_SENSORS_SMSC47M1 is not set
819# CONFIG_SENSORS_SMSC47M192 is not set
820# CONFIG_SENSORS_SMSC47B397 is not set
821# CONFIG_SENSORS_THMC50 is not set
822# CONFIG_SENSORS_VIA686A is not set
823# CONFIG_SENSORS_VT1211 is not set
824# CONFIG_SENSORS_VT8231 is not set
825# CONFIG_SENSORS_W83781D is not set
826# CONFIG_SENSORS_W83791D is not set
827# CONFIG_SENSORS_W83792D is not set
828# CONFIG_SENSORS_W83793 is not set
829# CONFIG_SENSORS_W83L785TS is not set
830# CONFIG_SENSORS_W83627HF is not set
831# CONFIG_SENSORS_W83627EHF is not set
832# CONFIG_HWMON_DEBUG_CHIP is not set
833CONFIG_WATCHDOG=y
834# CONFIG_WATCHDOG_NOWAYOUT is not set
835
836#
837# Watchdog Device Drivers
838#
839# CONFIG_SOFT_WATCHDOG is not set
840# CONFIG_MPC5200_WDT is not set
841# CONFIG_WATCHDOG_RTAS is not set
842
843#
844# PCI-based Watchdog Cards
845#
846# CONFIG_PCIPCWATCHDOG is not set
847# CONFIG_WDTPCI is not set
848
849#
850# USB-based Watchdog Cards
851#
852# CONFIG_USBPCWATCHDOG is not set
853
854#
855# Sonics Silicon Backplane
856#
857CONFIG_SSB_POSSIBLE=y
858# CONFIG_SSB is not set
859
860#
861# Multifunction device drivers
862#
863# CONFIG_MFD_SM501 is not set
864
865#
866# Multimedia devices
867#
868# CONFIG_VIDEO_DEV is not set
869# CONFIG_DVB_CORE is not set
870CONFIG_DAB=y
871# CONFIG_USB_DABUSB is not set
872
873#
874# Graphics support
875#
876# CONFIG_AGP is not set
877# CONFIG_DRM is not set
878# CONFIG_VGASTATE is not set
879CONFIG_VIDEO_OUTPUT_CONTROL=m
880# CONFIG_FB is not set
881# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
882
883#
884# Display device support
885#
886# CONFIG_DISPLAY_SUPPORT is not set
887
888#
889# Sound
890#
891# CONFIG_SOUND is not set
892CONFIG_USB_SUPPORT=y
893CONFIG_USB_ARCH_HAS_HCD=y
894CONFIG_USB_ARCH_HAS_OHCI=y
895CONFIG_USB_ARCH_HAS_EHCI=y
896CONFIG_USB=y
897# CONFIG_USB_DEBUG is not set
898
899#
900# Miscellaneous USB options
901#
902CONFIG_USB_DEVICEFS=y
903# CONFIG_USB_DEVICE_CLASS is not set
904# CONFIG_USB_DYNAMIC_MINORS is not set
905# CONFIG_USB_SUSPEND is not set
906# CONFIG_USB_PERSIST is not set
907# CONFIG_USB_OTG is not set
908
909#
910# USB Host Controller Drivers
911#
912# CONFIG_USB_EHCI_HCD is not set
913# CONFIG_USB_ISP116X_HCD is not set
914CONFIG_USB_OHCI_HCD=y
915CONFIG_USB_OHCI_HCD_PPC_SOC=y
916CONFIG_USB_OHCI_HCD_PPC_OF=y
917CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
918# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
919CONFIG_USB_OHCI_HCD_PCI=y
920CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
921CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
922CONFIG_USB_OHCI_LITTLE_ENDIAN=y
923# CONFIG_USB_UHCI_HCD is not set
924# CONFIG_USB_SL811_HCD is not set
925# CONFIG_USB_R8A66597_HCD is not set
926
927#
928# USB Device Class drivers
929#
930# CONFIG_USB_ACM is not set
931# CONFIG_USB_PRINTER is not set
932
933#
934# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
935#
936
937#
938# may also be needed; see USB_STORAGE Help for more information
939#
940CONFIG_USB_STORAGE=y
941# CONFIG_USB_STORAGE_DEBUG is not set
942# CONFIG_USB_STORAGE_DATAFAB is not set
943# CONFIG_USB_STORAGE_FREECOM is not set
944# CONFIG_USB_STORAGE_ISD200 is not set
945# CONFIG_USB_STORAGE_DPCM is not set
946# CONFIG_USB_STORAGE_USBAT is not set
947# CONFIG_USB_STORAGE_SDDR09 is not set
948# CONFIG_USB_STORAGE_SDDR55 is not set
949# CONFIG_USB_STORAGE_JUMPSHOT is not set
950# CONFIG_USB_STORAGE_ALAUDA is not set
951# CONFIG_USB_STORAGE_KARMA is not set
952# CONFIG_USB_LIBUSUAL is not set
953
954#
955# USB Imaging devices
956#
957# CONFIG_USB_MDC800 is not set
958# CONFIG_USB_MICROTEK is not set
959CONFIG_USB_MON=y
960
961#
962# USB port drivers
963#
964
965#
966# USB Serial Converter support
967#
968# CONFIG_USB_SERIAL is not set
969
970#
971# USB Miscellaneous drivers
972#
973# CONFIG_USB_EMI62 is not set
974# CONFIG_USB_EMI26 is not set
975# CONFIG_USB_ADUTUX is not set
976# CONFIG_USB_AUERSWALD is not set
977# CONFIG_USB_RIO500 is not set
978# CONFIG_USB_LEGOTOWER is not set
979# CONFIG_USB_LCD is not set
980# CONFIG_USB_BERRY_CHARGE is not set
981# CONFIG_USB_LED is not set
982# CONFIG_USB_CYPRESS_CY7C63 is not set
983# CONFIG_USB_CYTHERM is not set
984# CONFIG_USB_PHIDGET is not set
985# CONFIG_USB_IDMOUSE is not set
986# CONFIG_USB_FTDI_ELAN is not set
987# CONFIG_USB_APPLEDISPLAY is not set
988# CONFIG_USB_LD is not set
989# CONFIG_USB_TRANCEVIBRATOR is not set
990# CONFIG_USB_IOWARRIOR is not set
991# CONFIG_USB_TEST is not set
992
993#
994# USB DSL modem support
995#
996
997#
998# USB Gadget Support
999#
1000# CONFIG_USB_GADGET is not set
1001# CONFIG_MMC is not set
1002CONFIG_NEW_LEDS=y
1003CONFIG_LEDS_CLASS=y
1004
1005#
1006# LED drivers
1007#
1008
1009#
1010# LED Triggers
1011#
1012CONFIG_LEDS_TRIGGERS=y
1013CONFIG_LEDS_TRIGGER_TIMER=y
1014# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
1015# CONFIG_INFINIBAND is not set
1016# CONFIG_EDAC is not set
1017# CONFIG_RTC_CLASS is not set
1018
1019#
1020# Userspace I/O
1021#
1022# CONFIG_UIO is not set
1023
1024#
1025# File systems
1026#
1027CONFIG_EXT2_FS=y
1028# CONFIG_EXT2_FS_XATTR is not set
1029# CONFIG_EXT2_FS_XIP is not set
1030CONFIG_EXT3_FS=y
1031CONFIG_EXT3_FS_XATTR=y
1032# CONFIG_EXT3_FS_POSIX_ACL is not set
1033# CONFIG_EXT3_FS_SECURITY is not set
1034# CONFIG_EXT4DEV_FS is not set
1035CONFIG_JBD=y
1036CONFIG_FS_MBCACHE=y
1037# CONFIG_REISERFS_FS is not set
1038# CONFIG_JFS_FS is not set
1039# CONFIG_FS_POSIX_ACL is not set
1040# CONFIG_XFS_FS is not set
1041# CONFIG_GFS2_FS is not set
1042# CONFIG_OCFS2_FS is not set
1043# CONFIG_MINIX_FS is not set
1044# CONFIG_ROMFS_FS is not set
1045CONFIG_INOTIFY=y
1046CONFIG_INOTIFY_USER=y
1047# CONFIG_QUOTA is not set
1048CONFIG_DNOTIFY=y
1049# CONFIG_AUTOFS_FS is not set
1050# CONFIG_AUTOFS4_FS is not set
1051# CONFIG_FUSE_FS is not set
1052
1053#
1054# CD-ROM/DVD Filesystems
1055#
1056# CONFIG_ISO9660_FS is not set
1057# CONFIG_UDF_FS is not set
1058
1059#
1060# DOS/FAT/NT Filesystems
1061#
1062CONFIG_FAT_FS=y
1063CONFIG_MSDOS_FS=y
1064CONFIG_VFAT_FS=y
1065CONFIG_FAT_DEFAULT_CODEPAGE=437
1066CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1067# CONFIG_NTFS_FS is not set
1068
1069#
1070# Pseudo filesystems
1071#
1072CONFIG_PROC_FS=y
1073CONFIG_PROC_KCORE=y
1074CONFIG_PROC_SYSCTL=y
1075CONFIG_SYSFS=y
1076CONFIG_TMPFS=y
1077# CONFIG_TMPFS_POSIX_ACL is not set
1078# CONFIG_HUGETLB_PAGE is not set
1079# CONFIG_CONFIGFS_FS is not set
1080
1081#
1082# Miscellaneous filesystems
1083#
1084# CONFIG_ADFS_FS is not set
1085# CONFIG_AFFS_FS is not set
1086# CONFIG_HFS_FS is not set
1087# CONFIG_HFSPLUS_FS is not set
1088# CONFIG_BEFS_FS is not set
1089# CONFIG_BFS_FS is not set
1090# CONFIG_EFS_FS is not set
1091CONFIG_JFFS2_FS=y
1092CONFIG_JFFS2_FS_DEBUG=0
1093CONFIG_JFFS2_FS_WRITEBUFFER=y
1094# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1095# CONFIG_JFFS2_SUMMARY is not set
1096# CONFIG_JFFS2_FS_XATTR is not set
1097# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1098CONFIG_JFFS2_ZLIB=y
1099# CONFIG_JFFS2_LZO is not set
1100CONFIG_JFFS2_RTIME=y
1101# CONFIG_JFFS2_RUBIN is not set
1102CONFIG_CRAMFS=y
1103# CONFIG_VXFS_FS is not set
1104# CONFIG_HPFS_FS is not set
1105# CONFIG_QNX4FS_FS is not set
1106# CONFIG_SYSV_FS is not set
1107# CONFIG_UFS_FS is not set
1108CONFIG_NETWORK_FILESYSTEMS=y
1109CONFIG_NFS_FS=y
1110CONFIG_NFS_V3=y
1111# CONFIG_NFS_V3_ACL is not set
1112CONFIG_NFS_V4=y
1113# CONFIG_NFS_DIRECTIO is not set
1114# CONFIG_NFSD is not set
1115CONFIG_ROOT_NFS=y
1116CONFIG_LOCKD=y
1117CONFIG_LOCKD_V4=y
1118CONFIG_NFS_COMMON=y
1119CONFIG_SUNRPC=y
1120CONFIG_SUNRPC_GSS=y
1121# CONFIG_SUNRPC_BIND34 is not set
1122CONFIG_RPCSEC_GSS_KRB5=y
1123# CONFIG_RPCSEC_GSS_SPKM3 is not set
1124# CONFIG_SMB_FS is not set
1125# CONFIG_CIFS is not set
1126# CONFIG_NCP_FS is not set
1127# CONFIG_CODA_FS is not set
1128# CONFIG_AFS_FS is not set
1129
1130#
1131# Partition Types
1132#
1133# CONFIG_PARTITION_ADVANCED is not set
1134CONFIG_MSDOS_PARTITION=y
1135CONFIG_NLS=y
1136CONFIG_NLS_DEFAULT="iso8859-1"
1137CONFIG_NLS_CODEPAGE_437=y
1138# CONFIG_NLS_CODEPAGE_737 is not set
1139# CONFIG_NLS_CODEPAGE_775 is not set
1140# CONFIG_NLS_CODEPAGE_850 is not set
1141# CONFIG_NLS_CODEPAGE_852 is not set
1142# CONFIG_NLS_CODEPAGE_855 is not set
1143# CONFIG_NLS_CODEPAGE_857 is not set
1144# CONFIG_NLS_CODEPAGE_860 is not set
1145# CONFIG_NLS_CODEPAGE_861 is not set
1146# CONFIG_NLS_CODEPAGE_862 is not set
1147# CONFIG_NLS_CODEPAGE_863 is not set
1148# CONFIG_NLS_CODEPAGE_864 is not set
1149# CONFIG_NLS_CODEPAGE_865 is not set
1150# CONFIG_NLS_CODEPAGE_866 is not set
1151# CONFIG_NLS_CODEPAGE_869 is not set
1152# CONFIG_NLS_CODEPAGE_936 is not set
1153# CONFIG_NLS_CODEPAGE_950 is not set
1154# CONFIG_NLS_CODEPAGE_932 is not set
1155# CONFIG_NLS_CODEPAGE_949 is not set
1156# CONFIG_NLS_CODEPAGE_874 is not set
1157# CONFIG_NLS_ISO8859_8 is not set
1158# CONFIG_NLS_CODEPAGE_1250 is not set
1159# CONFIG_NLS_CODEPAGE_1251 is not set
1160# CONFIG_NLS_ASCII is not set
1161CONFIG_NLS_ISO8859_1=y
1162# CONFIG_NLS_ISO8859_2 is not set
1163# CONFIG_NLS_ISO8859_3 is not set
1164# CONFIG_NLS_ISO8859_4 is not set
1165# CONFIG_NLS_ISO8859_5 is not set
1166# CONFIG_NLS_ISO8859_6 is not set
1167# CONFIG_NLS_ISO8859_7 is not set
1168# CONFIG_NLS_ISO8859_9 is not set
1169# CONFIG_NLS_ISO8859_13 is not set
1170# CONFIG_NLS_ISO8859_14 is not set
1171# CONFIG_NLS_ISO8859_15 is not set
1172# CONFIG_NLS_KOI8_R is not set
1173# CONFIG_NLS_KOI8_U is not set
1174# CONFIG_NLS_UTF8 is not set
1175# CONFIG_DLM is not set
1176# CONFIG_UCC_SLOW is not set
1177
1178#
1179# Library routines
1180#
1181CONFIG_BITREVERSE=y
1182# CONFIG_CRC_CCITT is not set
1183# CONFIG_CRC16 is not set
1184# CONFIG_CRC_ITU_T is not set
1185CONFIG_CRC32=y
1186# CONFIG_CRC7 is not set
1187# CONFIG_LIBCRC32C is not set
1188CONFIG_ZLIB_INFLATE=y
1189CONFIG_ZLIB_DEFLATE=y
1190CONFIG_PLIST=y
1191CONFIG_HAS_IOMEM=y
1192CONFIG_HAS_IOPORT=y
1193CONFIG_HAS_DMA=y
1194# CONFIG_INSTRUMENTATION is not set
1195
1196#
1197# Kernel hacking
1198#
1199CONFIG_PRINTK_TIME=y
1200CONFIG_ENABLE_WARN_DEPRECATED=y
1201CONFIG_ENABLE_MUST_CHECK=y
1202# CONFIG_MAGIC_SYSRQ is not set
1203# CONFIG_UNUSED_SYMBOLS is not set
1204# CONFIG_DEBUG_FS is not set
1205# CONFIG_HEADERS_CHECK is not set
1206CONFIG_DEBUG_KERNEL=y
1207# CONFIG_DEBUG_SHIRQ is not set
1208CONFIG_DETECT_SOFTLOCKUP=y
1209CONFIG_SCHED_DEBUG=y
1210# CONFIG_SCHEDSTATS is not set
1211# CONFIG_TIMER_STATS is not set
1212# CONFIG_SLUB_DEBUG_ON is not set
1213# CONFIG_DEBUG_RT_MUTEXES is not set
1214# CONFIG_RT_MUTEX_TESTER is not set
1215# CONFIG_DEBUG_SPINLOCK is not set
1216# CONFIG_DEBUG_MUTEXES is not set
1217# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1218# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1219# CONFIG_DEBUG_KOBJECT is not set
1220# CONFIG_DEBUG_BUGVERBOSE is not set
1221CONFIG_DEBUG_INFO=y
1222# CONFIG_DEBUG_VM is not set
1223# CONFIG_DEBUG_LIST is not set
1224# CONFIG_DEBUG_SG is not set
1225CONFIG_FORCED_INLINING=y
1226# CONFIG_BOOT_PRINTK_DELAY is not set
1227# CONFIG_RCU_TORTURE_TEST is not set
1228# CONFIG_FAULT_INJECTION is not set
1229# CONFIG_SAMPLES is not set
1230# CONFIG_DEBUG_STACKOVERFLOW is not set
1231# CONFIG_DEBUG_STACK_USAGE is not set
1232# CONFIG_DEBUG_PAGEALLOC is not set
1233# CONFIG_DEBUGGER is not set
1234# CONFIG_BDI_SWITCH is not set
1235# CONFIG_BOOTX_TEXT is not set
1236# CONFIG_PPC_EARLY_DEBUG is not set
1237
1238#
1239# Security options
1240#
1241# CONFIG_KEYS is not set
1242# CONFIG_SECURITY is not set
1243# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1244CONFIG_CRYPTO=y
1245CONFIG_CRYPTO_ALGAPI=y
1246CONFIG_CRYPTO_BLKCIPHER=y
1247CONFIG_CRYPTO_MANAGER=y
1248# CONFIG_CRYPTO_HMAC is not set
1249# CONFIG_CRYPTO_XCBC is not set
1250# CONFIG_CRYPTO_NULL is not set
1251# CONFIG_CRYPTO_MD4 is not set
1252CONFIG_CRYPTO_MD5=y
1253# CONFIG_CRYPTO_SHA1 is not set
1254# CONFIG_CRYPTO_SHA256 is not set
1255# CONFIG_CRYPTO_SHA512 is not set
1256# CONFIG_CRYPTO_WP512 is not set
1257# CONFIG_CRYPTO_TGR192 is not set
1258# CONFIG_CRYPTO_GF128MUL is not set
1259# CONFIG_CRYPTO_ECB is not set
1260CONFIG_CRYPTO_CBC=y
1261# CONFIG_CRYPTO_PCBC is not set
1262# CONFIG_CRYPTO_LRW is not set
1263# CONFIG_CRYPTO_XTS is not set
1264# CONFIG_CRYPTO_CRYPTD is not set
1265CONFIG_CRYPTO_DES=y
1266# CONFIG_CRYPTO_FCRYPT is not set
1267# CONFIG_CRYPTO_BLOWFISH is not set
1268# CONFIG_CRYPTO_TWOFISH is not set
1269# CONFIG_CRYPTO_SERPENT is not set
1270# CONFIG_CRYPTO_AES is not set
1271# CONFIG_CRYPTO_CAST5 is not set
1272# CONFIG_CRYPTO_CAST6 is not set
1273# CONFIG_CRYPTO_TEA is not set
1274# CONFIG_CRYPTO_ARC4 is not set
1275# CONFIG_CRYPTO_KHAZAD is not set
1276# CONFIG_CRYPTO_ANUBIS is not set
1277# CONFIG_CRYPTO_SEED is not set
1278# CONFIG_CRYPTO_DEFLATE is not set
1279# CONFIG_CRYPTO_MICHAEL_MIC is not set
1280# CONFIG_CRYPTO_CRC32C is not set
1281# CONFIG_CRYPTO_CAMELLIA is not set
1282# CONFIG_CRYPTO_TEST is not set
1283# CONFIG_CRYPTO_AUTHENC is not set
1284CONFIG_CRYPTO_HW=y
1285CONFIG_PPC_CLOCK=y
1286CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig
index c9af905bbb1d..3b29ac53844e 100644
--- a/arch/powerpc/configs/mpc8313_rdb_defconfig
+++ b/arch/powerpc/configs/mpc8313_rdb_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:48:31 2007 4# Thu Jan 17 16:35:55 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -138,12 +138,13 @@ CONFIG_PPC_83xx=y
138# CONFIG_PPC_CELL is not set 138# CONFIG_PPC_CELL is not set
139# CONFIG_PPC_CELL_NATIVE is not set 139# CONFIG_PPC_CELL_NATIVE is not set
140# CONFIG_PQ2ADS is not set 140# CONFIG_PQ2ADS is not set
141CONFIG_MPC8313_RDB=y 141CONFIG_MPC831x_RDB=y
142# CONFIG_MPC832x_MDS is not set 142# CONFIG_MPC832x_MDS is not set
143# CONFIG_MPC832x_RDB is not set 143# CONFIG_MPC832x_RDB is not set
144# CONFIG_MPC834x_MDS is not set 144# CONFIG_MPC834x_MDS is not set
145# CONFIG_MPC834x_ITX is not set 145# CONFIG_MPC834x_ITX is not set
146# CONFIG_MPC836x_MDS is not set 146# CONFIG_MPC836x_MDS is not set
147# CONFIG_MPC837x_MDS is not set
147CONFIG_PPC_MPC831x=y 148CONFIG_PPC_MPC831x=y
148# CONFIG_MPIC is not set 149# CONFIG_MPIC is not set
149# CONFIG_MPIC_WEIRD is not set 150# CONFIG_MPIC_WEIRD is not set
@@ -336,15 +337,16 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
336CONFIG_MTD=y 337CONFIG_MTD=y
337# CONFIG_MTD_DEBUG is not set 338# CONFIG_MTD_DEBUG is not set
338# CONFIG_MTD_CONCAT is not set 339# CONFIG_MTD_CONCAT is not set
339# CONFIG_MTD_PARTITIONS is not set 340CONFIG_MTD_PARTITIONS=y
341# CONFIG_MTD_REDBOOT_PARTS is not set
342# CONFIG_MTD_CMDLINE_PARTS is not set
340 343
341# 344#
342# User Modules And Translation Layers 345# User Modules And Translation Layers
343# 346#
344CONFIG_MTD_CHAR=y 347CONFIG_MTD_CHAR=y
345# CONFIG_MTD_BLKDEVS is not set 348CONFIG_MTD_BLKDEVS=y
346# CONFIG_MTD_BLOCK is not set 349CONFIG_MTD_BLOCK=y
347# CONFIG_MTD_BLOCK_RO is not set
348# CONFIG_FTL is not set 350# CONFIG_FTL is not set
349# CONFIG_NFTL is not set 351# CONFIG_NFTL is not set
350# CONFIG_INFTL is not set 352# CONFIG_INFTL is not set
@@ -381,11 +383,8 @@ CONFIG_MTD_CFI_UTIL=y
381# Mapping drivers for chip access 383# Mapping drivers for chip access
382# 384#
383# CONFIG_MTD_COMPLEX_MAPPINGS is not set 385# CONFIG_MTD_COMPLEX_MAPPINGS is not set
384CONFIG_MTD_PHYSMAP=y 386# CONFIG_MTD_PHYSMAP is not set
385CONFIG_MTD_PHYSMAP_START=0xfe000000 387CONFIG_MTD_PHYSMAP_OF=y
386CONFIG_MTD_PHYSMAP_LEN=0x1000000
387CONFIG_MTD_PHYSMAP_BANKWIDTH=2
388# CONFIG_MTD_PHYSMAP_OF is not set
389# CONFIG_MTD_INTEL_VR_NOR is not set 388# CONFIG_MTD_INTEL_VR_NOR is not set
390# CONFIG_MTD_PLATRAM is not set 389# CONFIG_MTD_PLATRAM is not set
391 390
@@ -406,7 +405,16 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2
406# CONFIG_MTD_DOC2000 is not set 405# CONFIG_MTD_DOC2000 is not set
407# CONFIG_MTD_DOC2001 is not set 406# CONFIG_MTD_DOC2001 is not set
408# CONFIG_MTD_DOC2001PLUS is not set 407# CONFIG_MTD_DOC2001PLUS is not set
409# CONFIG_MTD_NAND is not set 408CONFIG_MTD_NAND=y
409CONFIG_MTD_NAND_VERIFY_WRITE=y
410# CONFIG_MTD_NAND_ECC_SMC is not set
411# CONFIG_MTD_NAND_MUSEUM_IDS is not set
412CONFIG_MTD_NAND_IDS=y
413# CONFIG_MTD_NAND_DISKONCHIP is not set
414# CONFIG_MTD_NAND_CAFE is not set
415# CONFIG_MTD_NAND_NANDSIM is not set
416# CONFIG_MTD_NAND_PLATFORM is not set
417# CONFIG_MTD_ALAUDA is not set
410# CONFIG_MTD_ONENAND is not set 418# CONFIG_MTD_ONENAND is not set
411 419
412# 420#
@@ -1178,7 +1186,17 @@ CONFIG_TMPFS=y
1178# CONFIG_BEFS_FS is not set 1186# CONFIG_BEFS_FS is not set
1179# CONFIG_BFS_FS is not set 1187# CONFIG_BFS_FS is not set
1180# CONFIG_EFS_FS is not set 1188# CONFIG_EFS_FS is not set
1181# CONFIG_JFFS2_FS is not set 1189CONFIG_JFFS2_FS=y
1190CONFIG_JFFS2_FS_DEBUG=0
1191CONFIG_JFFS2_FS_WRITEBUFFER=y
1192# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1193# CONFIG_JFFS2_SUMMARY is not set
1194# CONFIG_JFFS2_FS_XATTR is not set
1195# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1196CONFIG_JFFS2_ZLIB=y
1197# CONFIG_JFFS2_LZO is not set
1198CONFIG_JFFS2_RTIME=y
1199# CONFIG_JFFS2_RUBIN is not set
1182# CONFIG_CRAMFS is not set 1200# CONFIG_CRAMFS is not set
1183# CONFIG_VXFS_FS is not set 1201# CONFIG_VXFS_FS is not set
1184# CONFIG_HPFS_FS is not set 1202# CONFIG_HPFS_FS is not set
@@ -1242,6 +1260,8 @@ CONFIG_BITREVERSE=y
1242CONFIG_CRC32=y 1260CONFIG_CRC32=y
1243# CONFIG_CRC7 is not set 1261# CONFIG_CRC7 is not set
1244# CONFIG_LIBCRC32C is not set 1262# CONFIG_LIBCRC32C is not set
1263CONFIG_ZLIB_INFLATE=y
1264CONFIG_ZLIB_DEFLATE=y
1245CONFIG_PLIST=y 1265CONFIG_PLIST=y
1246CONFIG_HAS_IOMEM=y 1266CONFIG_HAS_IOMEM=y
1247CONFIG_HAS_IOPORT=y 1267CONFIG_HAS_IOPORT=y
diff --git a/arch/powerpc/configs/mpc8315_rdb_defconfig b/arch/powerpc/configs/mpc8315_rdb_defconfig
new file mode 100644
index 000000000000..9adf7f98f675
--- /dev/null
+++ b/arch/powerpc/configs/mpc8315_rdb_defconfig
@@ -0,0 +1,1417 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc8
4# Wed Jan 23 20:02:25 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50CONFIG_DEFAULT_UIMAGE=y
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set
70# CONFIG_PID_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75# CONFIG_FAIR_GROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y
79CONFIG_INITRAMFS_SOURCE=""
80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
81CONFIG_SYSCTL=y
82CONFIG_EMBEDDED=y
83CONFIG_SYSCTL_SYSCALL=y
84# CONFIG_KALLSYMS is not set
85CONFIG_HOTPLUG=y
86CONFIG_PRINTK=y
87CONFIG_BUG=y
88CONFIG_ELF_CORE=y
89CONFIG_BASE_FULL=y
90CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y
92# CONFIG_EPOLL is not set
93CONFIG_SIGNALFD=y
94CONFIG_EVENTFD=y
95CONFIG_SHMEM=y
96CONFIG_VM_EVENT_COUNTERS=y
97CONFIG_SLUB_DEBUG=y
98# CONFIG_SLAB is not set
99CONFIG_SLUB=y
100# CONFIG_SLOB is not set
101CONFIG_SLABINFO=y
102CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0
105CONFIG_MODULES=y
106CONFIG_MODULE_UNLOAD=y
107# CONFIG_MODULE_FORCE_UNLOAD is not set
108# CONFIG_MODVERSIONS is not set
109# CONFIG_MODULE_SRCVERSION_ALL is not set
110# CONFIG_KMOD is not set
111CONFIG_BLOCK=y
112# CONFIG_LBD is not set
113# CONFIG_BLK_DEV_IO_TRACE is not set
114# CONFIG_LSF is not set
115# CONFIG_BLK_DEV_BSG is not set
116
117#
118# IO Schedulers
119#
120CONFIG_IOSCHED_NOOP=y
121CONFIG_IOSCHED_AS=y
122CONFIG_IOSCHED_DEADLINE=y
123CONFIG_IOSCHED_CFQ=y
124CONFIG_DEFAULT_AS=y
125# CONFIG_DEFAULT_DEADLINE is not set
126# CONFIG_DEFAULT_CFQ is not set
127# CONFIG_DEFAULT_NOOP is not set
128CONFIG_DEFAULT_IOSCHED="anticipatory"
129
130#
131# Platform support
132#
133# CONFIG_PPC_MULTIPLATFORM is not set
134# CONFIG_PPC_82xx is not set
135CONFIG_PPC_83xx=y
136# CONFIG_PPC_86xx is not set
137# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set
139# CONFIG_PPC_CELL is not set
140# CONFIG_PPC_CELL_NATIVE is not set
141# CONFIG_PQ2ADS is not set
142CONFIG_MPC831x_RDB=y
143# CONFIG_MPC832x_MDS is not set
144# CONFIG_MPC832x_RDB is not set
145# CONFIG_MPC834x_MDS is not set
146# CONFIG_MPC834x_ITX is not set
147# CONFIG_MPC836x_MDS is not set
148# CONFIG_MPC837x_MDS is not set
149CONFIG_PPC_MPC831x=y
150CONFIG_IPIC=y
151# CONFIG_MPIC is not set
152# CONFIG_MPIC_WEIRD is not set
153# CONFIG_PPC_I8259 is not set
154# CONFIG_PPC_RTAS is not set
155# CONFIG_MMIO_NVRAM is not set
156# CONFIG_PPC_MPC106 is not set
157# CONFIG_PPC_970_NAP is not set
158# CONFIG_PPC_INDIRECT_IO is not set
159# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set
161# CONFIG_CPM2 is not set
162# CONFIG_FSL_ULI1575 is not set
163
164#
165# Kernel options
166#
167# CONFIG_HIGHMEM is not set
168CONFIG_TICK_ONESHOT=y
169CONFIG_NO_HZ=y
170CONFIG_HIGH_RES_TIMERS=y
171CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
172# CONFIG_HZ_100 is not set
173CONFIG_HZ_250=y
174# CONFIG_HZ_300 is not set
175# CONFIG_HZ_1000 is not set
176CONFIG_HZ=250
177CONFIG_PREEMPT_NONE=y
178# CONFIG_PREEMPT_VOLUNTARY is not set
179# CONFIG_PREEMPT is not set
180CONFIG_BINFMT_ELF=y
181# CONFIG_BINFMT_MISC is not set
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
183CONFIG_ARCH_FLATMEM_ENABLE=y
184CONFIG_ARCH_POPULATES_NODE_MAP=y
185CONFIG_SELECT_MEMORY_MODEL=y
186CONFIG_FLATMEM_MANUAL=y
187# CONFIG_DISCONTIGMEM_MANUAL is not set
188# CONFIG_SPARSEMEM_MANUAL is not set
189CONFIG_FLATMEM=y
190CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set
192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
193CONFIG_SPLIT_PTLOCK_CPUS=4
194# CONFIG_RESOURCES_64BIT is not set
195CONFIG_ZONE_DMA_FLAG=1
196CONFIG_BOUNCE=y
197CONFIG_VIRT_TO_BUS=y
198CONFIG_PROC_DEVICETREE=y
199# CONFIG_CMDLINE_BOOL is not set
200# CONFIG_PM is not set
201CONFIG_SUSPEND_UP_POSSIBLE=y
202CONFIG_HIBERNATION_UP_POSSIBLE=y
203CONFIG_SECCOMP=y
204CONFIG_WANT_DEVICE_TREE=y
205CONFIG_DEVICE_TREE=""
206CONFIG_ISA_DMA_API=y
207
208#
209# Bus options
210#
211CONFIG_ZONE_DMA=y
212CONFIG_GENERIC_ISA_DMA=y
213CONFIG_PPC_INDIRECT_PCI=y
214CONFIG_FSL_SOC=y
215CONFIG_PCI=y
216CONFIG_PCI_DOMAINS=y
217CONFIG_PCI_SYSCALL=y
218# CONFIG_PCIEPORTBUS is not set
219CONFIG_ARCH_SUPPORTS_MSI=y
220# CONFIG_PCI_MSI is not set
221CONFIG_PCI_LEGACY=y
222# CONFIG_PCI_DEBUG is not set
223# CONFIG_PCCARD is not set
224# CONFIG_HOTPLUG_PCI is not set
225
226#
227# Advanced setup
228#
229# CONFIG_ADVANCED_OPTIONS is not set
230
231#
232# Default settings for advanced configuration options are used
233#
234CONFIG_HIGHMEM_START=0xfe000000
235CONFIG_LOWMEM_SIZE=0x30000000
236CONFIG_KERNEL_START=0xc0000000
237CONFIG_TASK_SIZE=0xc0000000
238CONFIG_BOOT_LOAD=0x00800000
239
240#
241# Networking
242#
243CONFIG_NET=y
244
245#
246# Networking options
247#
248CONFIG_PACKET=y
249# CONFIG_PACKET_MMAP is not set
250CONFIG_UNIX=y
251CONFIG_XFRM=y
252# CONFIG_XFRM_USER is not set
253# CONFIG_XFRM_SUB_POLICY is not set
254# CONFIG_XFRM_MIGRATE is not set
255# CONFIG_NET_KEY is not set
256CONFIG_INET=y
257CONFIG_IP_MULTICAST=y
258# CONFIG_IP_ADVANCED_ROUTER is not set
259CONFIG_IP_FIB_HASH=y
260CONFIG_IP_PNP=y
261CONFIG_IP_PNP_DHCP=y
262CONFIG_IP_PNP_BOOTP=y
263# CONFIG_IP_PNP_RARP is not set
264# CONFIG_NET_IPIP is not set
265# CONFIG_NET_IPGRE is not set
266# CONFIG_IP_MROUTE is not set
267# CONFIG_ARPD is not set
268CONFIG_SYN_COOKIES=y
269# CONFIG_INET_AH is not set
270# CONFIG_INET_ESP is not set
271# CONFIG_INET_IPCOMP is not set
272# CONFIG_INET_XFRM_TUNNEL is not set
273# CONFIG_INET_TUNNEL is not set
274CONFIG_INET_XFRM_MODE_TRANSPORT=y
275CONFIG_INET_XFRM_MODE_TUNNEL=y
276CONFIG_INET_XFRM_MODE_BEET=y
277# CONFIG_INET_LRO is not set
278CONFIG_INET_DIAG=y
279CONFIG_INET_TCP_DIAG=y
280# CONFIG_TCP_CONG_ADVANCED is not set
281CONFIG_TCP_CONG_CUBIC=y
282CONFIG_DEFAULT_TCP_CONG="cubic"
283# CONFIG_TCP_MD5SIG is not set
284# CONFIG_IPV6 is not set
285# CONFIG_INET6_XFRM_TUNNEL is not set
286# CONFIG_INET6_TUNNEL is not set
287# CONFIG_NETWORK_SECMARK is not set
288# CONFIG_NETFILTER is not set
289# CONFIG_IP_DCCP is not set
290# CONFIG_IP_SCTP is not set
291# CONFIG_TIPC is not set
292# CONFIG_ATM is not set
293# CONFIG_BRIDGE is not set
294# CONFIG_VLAN_8021Q is not set
295# CONFIG_DECNET is not set
296# CONFIG_LLC2 is not set
297# CONFIG_IPX is not set
298# CONFIG_ATALK is not set
299# CONFIG_X25 is not set
300# CONFIG_LAPB is not set
301# CONFIG_ECONET is not set
302# CONFIG_WAN_ROUTER is not set
303# CONFIG_NET_SCHED is not set
304
305#
306# Network testing
307#
308# CONFIG_NET_PKTGEN is not set
309# CONFIG_HAMRADIO is not set
310# CONFIG_IRDA is not set
311# CONFIG_BT is not set
312# CONFIG_AF_RXRPC is not set
313
314#
315# Wireless
316#
317# CONFIG_CFG80211 is not set
318# CONFIG_WIRELESS_EXT is not set
319# CONFIG_MAC80211 is not set
320# CONFIG_IEEE80211 is not set
321# CONFIG_RFKILL is not set
322# CONFIG_NET_9P is not set
323
324#
325# Device Drivers
326#
327
328#
329# Generic Driver Options
330#
331CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
332CONFIG_STANDALONE=y
333CONFIG_PREVENT_FIRMWARE_BUILD=y
334# CONFIG_FW_LOADER is not set
335# CONFIG_DEBUG_DRIVER is not set
336# CONFIG_DEBUG_DEVRES is not set
337# CONFIG_SYS_HYPERVISOR is not set
338# CONFIG_CONNECTOR is not set
339CONFIG_MTD=y
340# CONFIG_MTD_DEBUG is not set
341# CONFIG_MTD_CONCAT is not set
342CONFIG_MTD_PARTITIONS=y
343# CONFIG_MTD_REDBOOT_PARTS is not set
344# CONFIG_MTD_CMDLINE_PARTS is not set
345
346#
347# User Modules And Translation Layers
348#
349CONFIG_MTD_CHAR=y
350CONFIG_MTD_BLKDEVS=y
351CONFIG_MTD_BLOCK=y
352# CONFIG_FTL is not set
353# CONFIG_NFTL is not set
354# CONFIG_INFTL is not set
355# CONFIG_RFD_FTL is not set
356# CONFIG_SSFDC is not set
357# CONFIG_MTD_OOPS is not set
358
359#
360# RAM/ROM/Flash chip drivers
361#
362CONFIG_MTD_CFI=y
363# CONFIG_MTD_JEDECPROBE is not set
364CONFIG_MTD_GEN_PROBE=y
365# CONFIG_MTD_CFI_ADV_OPTIONS is not set
366CONFIG_MTD_MAP_BANK_WIDTH_1=y
367CONFIG_MTD_MAP_BANK_WIDTH_2=y
368CONFIG_MTD_MAP_BANK_WIDTH_4=y
369# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
370# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
371# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
372CONFIG_MTD_CFI_I1=y
373CONFIG_MTD_CFI_I2=y
374# CONFIG_MTD_CFI_I4 is not set
375# CONFIG_MTD_CFI_I8 is not set
376# CONFIG_MTD_CFI_INTELEXT is not set
377CONFIG_MTD_CFI_AMDSTD=y
378# CONFIG_MTD_CFI_STAA is not set
379CONFIG_MTD_CFI_UTIL=y
380# CONFIG_MTD_RAM is not set
381# CONFIG_MTD_ROM is not set
382# CONFIG_MTD_ABSENT is not set
383
384#
385# Mapping drivers for chip access
386#
387# CONFIG_MTD_COMPLEX_MAPPINGS is not set
388# CONFIG_MTD_PHYSMAP is not set
389CONFIG_MTD_PHYSMAP_OF=y
390# CONFIG_MTD_INTEL_VR_NOR is not set
391# CONFIG_MTD_PLATRAM is not set
392
393#
394# Self-contained MTD device drivers
395#
396# CONFIG_MTD_PMC551 is not set
397# CONFIG_MTD_DATAFLASH is not set
398# CONFIG_MTD_M25P80 is not set
399# CONFIG_MTD_SLRAM is not set
400# CONFIG_MTD_PHRAM is not set
401# CONFIG_MTD_MTDRAM is not set
402# CONFIG_MTD_BLOCK2MTD is not set
403
404#
405# Disk-On-Chip Device Drivers
406#
407# CONFIG_MTD_DOC2000 is not set
408# CONFIG_MTD_DOC2001 is not set
409# CONFIG_MTD_DOC2001PLUS is not set
410CONFIG_MTD_NAND=y
411CONFIG_MTD_NAND_VERIFY_WRITE=y
412# CONFIG_MTD_NAND_ECC_SMC is not set
413# CONFIG_MTD_NAND_MUSEUM_IDS is not set
414CONFIG_MTD_NAND_IDS=y
415# CONFIG_MTD_NAND_DISKONCHIP is not set
416# CONFIG_MTD_NAND_CAFE is not set
417# CONFIG_MTD_NAND_NANDSIM is not set
418# CONFIG_MTD_NAND_PLATFORM is not set
419# CONFIG_MTD_ALAUDA is not set
420# CONFIG_MTD_ONENAND is not set
421
422#
423# UBI - Unsorted block images
424#
425# CONFIG_MTD_UBI is not set
426CONFIG_OF_DEVICE=y
427# CONFIG_PARPORT is not set
428CONFIG_BLK_DEV=y
429# CONFIG_BLK_DEV_FD is not set
430# CONFIG_BLK_CPQ_DA is not set
431# CONFIG_BLK_CPQ_CISS_DA is not set
432# CONFIG_BLK_DEV_DAC960 is not set
433# CONFIG_BLK_DEV_UMEM is not set
434# CONFIG_BLK_DEV_COW_COMMON is not set
435CONFIG_BLK_DEV_LOOP=y
436# CONFIG_BLK_DEV_CRYPTOLOOP is not set
437# CONFIG_BLK_DEV_NBD is not set
438# CONFIG_BLK_DEV_SX8 is not set
439# CONFIG_BLK_DEV_UB is not set
440CONFIG_BLK_DEV_RAM=y
441CONFIG_BLK_DEV_RAM_COUNT=16
442CONFIG_BLK_DEV_RAM_SIZE=32768
443CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
444# CONFIG_CDROM_PKTCDVD is not set
445# CONFIG_ATA_OVER_ETH is not set
446CONFIG_MISC_DEVICES=y
447# CONFIG_PHANTOM is not set
448# CONFIG_EEPROM_93CX6 is not set
449# CONFIG_SGI_IOC4 is not set
450# CONFIG_TIFM_CORE is not set
451# CONFIG_IDE is not set
452
453#
454# SCSI device support
455#
456# CONFIG_RAID_ATTRS is not set
457CONFIG_SCSI=y
458CONFIG_SCSI_DMA=y
459# CONFIG_SCSI_TGT is not set
460# CONFIG_SCSI_NETLINK is not set
461CONFIG_SCSI_PROC_FS=y
462
463#
464# SCSI support type (disk, tape, CD-ROM)
465#
466# CONFIG_BLK_DEV_SD is not set
467# CONFIG_CHR_DEV_ST is not set
468# CONFIG_CHR_DEV_OSST is not set
469# CONFIG_BLK_DEV_SR is not set
470CONFIG_CHR_DEV_SG=y
471# CONFIG_CHR_DEV_SCH is not set
472
473#
474# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
475#
476# CONFIG_SCSI_MULTI_LUN is not set
477# CONFIG_SCSI_CONSTANTS is not set
478# CONFIG_SCSI_LOGGING is not set
479# CONFIG_SCSI_SCAN_ASYNC is not set
480CONFIG_SCSI_WAIT_SCAN=m
481
482#
483# SCSI Transports
484#
485CONFIG_SCSI_SPI_ATTRS=y
486# CONFIG_SCSI_FC_ATTRS is not set
487# CONFIG_SCSI_ISCSI_ATTRS is not set
488# CONFIG_SCSI_SAS_LIBSAS is not set
489# CONFIG_SCSI_SRP_ATTRS is not set
490CONFIG_SCSI_LOWLEVEL=y
491# CONFIG_ISCSI_TCP is not set
492# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
493# CONFIG_SCSI_3W_9XXX is not set
494# CONFIG_SCSI_ACARD is not set
495# CONFIG_SCSI_AACRAID is not set
496# CONFIG_SCSI_AIC7XXX is not set
497# CONFIG_SCSI_AIC7XXX_OLD is not set
498# CONFIG_SCSI_AIC79XX is not set
499# CONFIG_SCSI_AIC94XX is not set
500# CONFIG_SCSI_DPT_I2O is not set
501# CONFIG_SCSI_ADVANSYS is not set
502# CONFIG_SCSI_ARCMSR is not set
503# CONFIG_MEGARAID_NEWGEN is not set
504# CONFIG_MEGARAID_LEGACY is not set
505# CONFIG_MEGARAID_SAS is not set
506# CONFIG_SCSI_HPTIOP is not set
507# CONFIG_SCSI_BUSLOGIC is not set
508# CONFIG_SCSI_DMX3191D is not set
509# CONFIG_SCSI_EATA is not set
510# CONFIG_SCSI_FUTURE_DOMAIN is not set
511# CONFIG_SCSI_GDTH is not set
512# CONFIG_SCSI_IPS is not set
513# CONFIG_SCSI_INITIO is not set
514# CONFIG_SCSI_INIA100 is not set
515# CONFIG_SCSI_STEX is not set
516# CONFIG_SCSI_SYM53C8XX_2 is not set
517# CONFIG_SCSI_IPR is not set
518# CONFIG_SCSI_QLOGIC_1280 is not set
519# CONFIG_SCSI_QLA_FC is not set
520# CONFIG_SCSI_QLA_ISCSI is not set
521# CONFIG_SCSI_LPFC is not set
522# CONFIG_SCSI_DC395x is not set
523# CONFIG_SCSI_DC390T is not set
524# CONFIG_SCSI_NSP32 is not set
525# CONFIG_SCSI_DEBUG is not set
526# CONFIG_SCSI_SRP is not set
527CONFIG_ATA=y
528# CONFIG_ATA_NONSTANDARD is not set
529# CONFIG_SATA_AHCI is not set
530# CONFIG_SATA_SVW is not set
531# CONFIG_ATA_PIIX is not set
532# CONFIG_SATA_MV is not set
533# CONFIG_SATA_NV is not set
534# CONFIG_PDC_ADMA is not set
535# CONFIG_SATA_QSTOR is not set
536# CONFIG_SATA_PROMISE is not set
537# CONFIG_SATA_SX4 is not set
538# CONFIG_SATA_SIL is not set
539# CONFIG_SATA_SIL24 is not set
540# CONFIG_SATA_SIS is not set
541# CONFIG_SATA_ULI is not set
542# CONFIG_SATA_VIA is not set
543# CONFIG_SATA_VITESSE is not set
544# CONFIG_SATA_INIC162X is not set
545CONFIG_SATA_FSL=y
546# CONFIG_PATA_ALI is not set
547# CONFIG_PATA_AMD is not set
548# CONFIG_PATA_ARTOP is not set
549# CONFIG_PATA_ATIIXP is not set
550# CONFIG_PATA_CMD640_PCI is not set
551# CONFIG_PATA_CMD64X is not set
552# CONFIG_PATA_CS5520 is not set
553# CONFIG_PATA_CS5530 is not set
554# CONFIG_PATA_CYPRESS is not set
555# CONFIG_PATA_EFAR is not set
556# CONFIG_ATA_GENERIC is not set
557# CONFIG_PATA_HPT366 is not set
558# CONFIG_PATA_HPT37X is not set
559# CONFIG_PATA_HPT3X2N is not set
560# CONFIG_PATA_HPT3X3 is not set
561# CONFIG_PATA_IT821X is not set
562# CONFIG_PATA_IT8213 is not set
563# CONFIG_PATA_JMICRON is not set
564# CONFIG_PATA_TRIFLEX is not set
565# CONFIG_PATA_MARVELL is not set
566# CONFIG_PATA_MPIIX is not set
567# CONFIG_PATA_OLDPIIX is not set
568# CONFIG_PATA_NETCELL is not set
569# CONFIG_PATA_NS87410 is not set
570# CONFIG_PATA_NS87415 is not set
571# CONFIG_PATA_OPTI is not set
572# CONFIG_PATA_OPTIDMA is not set
573# CONFIG_PATA_PDC_OLD is not set
574# CONFIG_PATA_RADISYS is not set
575# CONFIG_PATA_RZ1000 is not set
576# CONFIG_PATA_SC1200 is not set
577# CONFIG_PATA_SERVERWORKS is not set
578# CONFIG_PATA_PDC2027X is not set
579# CONFIG_PATA_SIL680 is not set
580# CONFIG_PATA_SIS is not set
581# CONFIG_PATA_VIA is not set
582# CONFIG_PATA_WINBOND is not set
583# CONFIG_PATA_PLATFORM is not set
584CONFIG_MD=y
585CONFIG_BLK_DEV_MD=y
586CONFIG_MD_LINEAR=y
587CONFIG_MD_RAID0=y
588CONFIG_MD_RAID1=y
589# CONFIG_MD_RAID10 is not set
590# CONFIG_MD_RAID456 is not set
591# CONFIG_MD_MULTIPATH is not set
592# CONFIG_MD_FAULTY is not set
593# CONFIG_BLK_DEV_DM is not set
594# CONFIG_FUSION is not set
595
596#
597# IEEE 1394 (FireWire) support
598#
599# CONFIG_FIREWIRE is not set
600# CONFIG_IEEE1394 is not set
601# CONFIG_I2O is not set
602# CONFIG_MACINTOSH_DRIVERS is not set
603CONFIG_NETDEVICES=y
604# CONFIG_NETDEVICES_MULTIQUEUE is not set
605# CONFIG_DUMMY is not set
606# CONFIG_BONDING is not set
607# CONFIG_MACVLAN is not set
608# CONFIG_EQUALIZER is not set
609# CONFIG_TUN is not set
610# CONFIG_VETH is not set
611# CONFIG_ARCNET is not set
612CONFIG_PHYLIB=y
613
614#
615# MII PHY device drivers
616#
617# CONFIG_MARVELL_PHY is not set
618# CONFIG_DAVICOM_PHY is not set
619# CONFIG_QSEMI_PHY is not set
620# CONFIG_LXT_PHY is not set
621# CONFIG_CICADA_PHY is not set
622# CONFIG_VITESSE_PHY is not set
623# CONFIG_SMSC_PHY is not set
624# CONFIG_BROADCOM_PHY is not set
625# CONFIG_ICPLUS_PHY is not set
626# CONFIG_FIXED_PHY is not set
627# CONFIG_MDIO_BITBANG is not set
628CONFIG_NET_ETHERNET=y
629CONFIG_MII=y
630# CONFIG_HAPPYMEAL is not set
631# CONFIG_SUNGEM is not set
632# CONFIG_CASSINI is not set
633# CONFIG_NET_VENDOR_3COM is not set
634# CONFIG_NET_TULIP is not set
635# CONFIG_HP100 is not set
636# CONFIG_IBM_NEW_EMAC_ZMII is not set
637# CONFIG_IBM_NEW_EMAC_RGMII is not set
638# CONFIG_IBM_NEW_EMAC_TAH is not set
639# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
640CONFIG_NET_PCI=y
641# CONFIG_PCNET32 is not set
642# CONFIG_AMD8111_ETH is not set
643# CONFIG_ADAPTEC_STARFIRE is not set
644# CONFIG_B44 is not set
645# CONFIG_FORCEDETH is not set
646# CONFIG_EEPRO100 is not set
647CONFIG_E100=y
648# CONFIG_FEALNX is not set
649# CONFIG_NATSEMI is not set
650# CONFIG_NE2K_PCI is not set
651# CONFIG_8139CP is not set
652# CONFIG_8139TOO is not set
653# CONFIG_SIS900 is not set
654# CONFIG_EPIC100 is not set
655# CONFIG_SUNDANCE is not set
656# CONFIG_TLAN is not set
657# CONFIG_VIA_RHINE is not set
658# CONFIG_SC92031 is not set
659CONFIG_NETDEV_1000=y
660# CONFIG_ACENIC is not set
661# CONFIG_DL2K is not set
662# CONFIG_E1000 is not set
663# CONFIG_E1000E is not set
664# CONFIG_IP1000 is not set
665# CONFIG_NS83820 is not set
666# CONFIG_HAMACHI is not set
667# CONFIG_YELLOWFIN is not set
668# CONFIG_R8169 is not set
669# CONFIG_SIS190 is not set
670# CONFIG_SKGE is not set
671# CONFIG_SKY2 is not set
672# CONFIG_SK98LIN is not set
673# CONFIG_VIA_VELOCITY is not set
674# CONFIG_TIGON3 is not set
675# CONFIG_BNX2 is not set
676CONFIG_GIANFAR=y
677CONFIG_GFAR_NAPI=y
678# CONFIG_QLA3XXX is not set
679# CONFIG_ATL1 is not set
680CONFIG_NETDEV_10000=y
681# CONFIG_CHELSIO_T1 is not set
682# CONFIG_CHELSIO_T3 is not set
683# CONFIG_IXGBE is not set
684# CONFIG_IXGB is not set
685# CONFIG_S2IO is not set
686# CONFIG_MYRI10GE is not set
687# CONFIG_NETXEN_NIC is not set
688# CONFIG_NIU is not set
689# CONFIG_MLX4_CORE is not set
690# CONFIG_TEHUTI is not set
691# CONFIG_TR is not set
692
693#
694# Wireless LAN
695#
696# CONFIG_WLAN_PRE80211 is not set
697# CONFIG_WLAN_80211 is not set
698
699#
700# USB Network Adapters
701#
702# CONFIG_USB_CATC is not set
703# CONFIG_USB_KAWETH is not set
704# CONFIG_USB_PEGASUS is not set
705# CONFIG_USB_RTL8150 is not set
706# CONFIG_USB_USBNET is not set
707# CONFIG_WAN is not set
708# CONFIG_FDDI is not set
709# CONFIG_HIPPI is not set
710# CONFIG_PPP is not set
711# CONFIG_SLIP is not set
712# CONFIG_NET_FC is not set
713# CONFIG_SHAPER is not set
714# CONFIG_NETCONSOLE is not set
715# CONFIG_NETPOLL is not set
716# CONFIG_NET_POLL_CONTROLLER is not set
717# CONFIG_ISDN is not set
718# CONFIG_PHONE is not set
719
720#
721# Input device support
722#
723CONFIG_INPUT=y
724# CONFIG_INPUT_FF_MEMLESS is not set
725# CONFIG_INPUT_POLLDEV is not set
726
727#
728# Userland interfaces
729#
730# CONFIG_INPUT_MOUSEDEV is not set
731# CONFIG_INPUT_JOYDEV is not set
732# CONFIG_INPUT_EVDEV is not set
733# CONFIG_INPUT_EVBUG is not set
734
735#
736# Input Device Drivers
737#
738# CONFIG_INPUT_KEYBOARD is not set
739# CONFIG_INPUT_MOUSE is not set
740# CONFIG_INPUT_JOYSTICK is not set
741# CONFIG_INPUT_TABLET is not set
742# CONFIG_INPUT_TOUCHSCREEN is not set
743# CONFIG_INPUT_MISC is not set
744
745#
746# Hardware I/O ports
747#
748# CONFIG_SERIO is not set
749# CONFIG_GAMEPORT is not set
750
751#
752# Character devices
753#
754# CONFIG_VT is not set
755# CONFIG_SERIAL_NONSTANDARD is not set
756
757#
758# Serial drivers
759#
760CONFIG_SERIAL_8250=y
761CONFIG_SERIAL_8250_CONSOLE=y
762CONFIG_SERIAL_8250_PCI=y
763CONFIG_SERIAL_8250_NR_UARTS=4
764CONFIG_SERIAL_8250_RUNTIME_UARTS=4
765# CONFIG_SERIAL_8250_EXTENDED is not set
766
767#
768# Non-8250 serial port support
769#
770# CONFIG_SERIAL_UARTLITE is not set
771CONFIG_SERIAL_CORE=y
772CONFIG_SERIAL_CORE_CONSOLE=y
773# CONFIG_SERIAL_JSM is not set
774# CONFIG_SERIAL_OF_PLATFORM is not set
775CONFIG_UNIX98_PTYS=y
776CONFIG_LEGACY_PTYS=y
777CONFIG_LEGACY_PTY_COUNT=256
778# CONFIG_IPMI_HANDLER is not set
779CONFIG_HW_RANDOM=y
780# CONFIG_NVRAM is not set
781# CONFIG_GEN_RTC is not set
782# CONFIG_R3964 is not set
783# CONFIG_APPLICOM is not set
784# CONFIG_RAW_DRIVER is not set
785# CONFIG_TCG_TPM is not set
786CONFIG_DEVPORT=y
787CONFIG_I2C=y
788CONFIG_I2C_BOARDINFO=y
789CONFIG_I2C_CHARDEV=y
790
791#
792# I2C Algorithms
793#
794# CONFIG_I2C_ALGOBIT is not set
795# CONFIG_I2C_ALGOPCF is not set
796# CONFIG_I2C_ALGOPCA is not set
797
798#
799# I2C Hardware Bus support
800#
801# CONFIG_I2C_ALI1535 is not set
802# CONFIG_I2C_ALI1563 is not set
803# CONFIG_I2C_ALI15X3 is not set
804# CONFIG_I2C_AMD756 is not set
805# CONFIG_I2C_AMD8111 is not set
806# CONFIG_I2C_I801 is not set
807# CONFIG_I2C_I810 is not set
808# CONFIG_I2C_PIIX4 is not set
809CONFIG_I2C_MPC=y
810# CONFIG_I2C_NFORCE2 is not set
811# CONFIG_I2C_OCORES is not set
812# CONFIG_I2C_PARPORT_LIGHT is not set
813# CONFIG_I2C_PROSAVAGE is not set
814# CONFIG_I2C_SAVAGE4 is not set
815# CONFIG_I2C_SIMTEC is not set
816# CONFIG_I2C_SIS5595 is not set
817# CONFIG_I2C_SIS630 is not set
818# CONFIG_I2C_SIS96X is not set
819# CONFIG_I2C_TAOS_EVM is not set
820# CONFIG_I2C_STUB is not set
821# CONFIG_I2C_TINY_USB is not set
822# CONFIG_I2C_VIA is not set
823# CONFIG_I2C_VIAPRO is not set
824# CONFIG_I2C_VOODOO3 is not set
825
826#
827# Miscellaneous I2C Chip support
828#
829# CONFIG_SENSORS_DS1337 is not set
830# CONFIG_SENSORS_DS1374 is not set
831# CONFIG_DS1682 is not set
832# CONFIG_SENSORS_EEPROM is not set
833# CONFIG_SENSORS_PCF8574 is not set
834# CONFIG_SENSORS_PCA9539 is not set
835# CONFIG_SENSORS_PCF8591 is not set
836# CONFIG_SENSORS_M41T00 is not set
837# CONFIG_SENSORS_MAX6875 is not set
838# CONFIG_SENSORS_TSL2550 is not set
839# CONFIG_I2C_DEBUG_CORE is not set
840# CONFIG_I2C_DEBUG_ALGO is not set
841# CONFIG_I2C_DEBUG_BUS is not set
842# CONFIG_I2C_DEBUG_CHIP is not set
843
844#
845# SPI support
846#
847CONFIG_SPI=y
848# CONFIG_SPI_DEBUG is not set
849CONFIG_SPI_MASTER=y
850
851#
852# SPI Master Controller Drivers
853#
854CONFIG_SPI_BITBANG=y
855CONFIG_SPI_MPC83xx=y
856
857#
858# SPI Protocol Masters
859#
860# CONFIG_SPI_AT25 is not set
861# CONFIG_SPI_SPIDEV is not set
862# CONFIG_SPI_TLE62X0 is not set
863# CONFIG_W1 is not set
864# CONFIG_POWER_SUPPLY is not set
865CONFIG_HWMON=y
866# CONFIG_HWMON_VID is not set
867# CONFIG_SENSORS_AD7418 is not set
868# CONFIG_SENSORS_ADM1021 is not set
869# CONFIG_SENSORS_ADM1025 is not set
870# CONFIG_SENSORS_ADM1026 is not set
871# CONFIG_SENSORS_ADM1029 is not set
872# CONFIG_SENSORS_ADM1031 is not set
873# CONFIG_SENSORS_ADM9240 is not set
874# CONFIG_SENSORS_ADT7470 is not set
875# CONFIG_SENSORS_ATXP1 is not set
876# CONFIG_SENSORS_DS1621 is not set
877# CONFIG_SENSORS_I5K_AMB is not set
878# CONFIG_SENSORS_F71805F is not set
879# CONFIG_SENSORS_F71882FG is not set
880# CONFIG_SENSORS_F75375S is not set
881# CONFIG_SENSORS_GL518SM is not set
882# CONFIG_SENSORS_GL520SM is not set
883# CONFIG_SENSORS_IT87 is not set
884# CONFIG_SENSORS_LM63 is not set
885# CONFIG_SENSORS_LM70 is not set
886# CONFIG_SENSORS_LM75 is not set
887# CONFIG_SENSORS_LM77 is not set
888# CONFIG_SENSORS_LM78 is not set
889# CONFIG_SENSORS_LM80 is not set
890# CONFIG_SENSORS_LM83 is not set
891# CONFIG_SENSORS_LM85 is not set
892# CONFIG_SENSORS_LM87 is not set
893# CONFIG_SENSORS_LM90 is not set
894# CONFIG_SENSORS_LM92 is not set
895# CONFIG_SENSORS_LM93 is not set
896# CONFIG_SENSORS_MAX1619 is not set
897# CONFIG_SENSORS_MAX6650 is not set
898# CONFIG_SENSORS_PC87360 is not set
899# CONFIG_SENSORS_PC87427 is not set
900# CONFIG_SENSORS_SIS5595 is not set
901# CONFIG_SENSORS_DME1737 is not set
902# CONFIG_SENSORS_SMSC47M1 is not set
903# CONFIG_SENSORS_SMSC47M192 is not set
904# CONFIG_SENSORS_SMSC47B397 is not set
905# CONFIG_SENSORS_THMC50 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
917CONFIG_WATCHDOG=y
918# CONFIG_WATCHDOG_NOWAYOUT is not set
919
920#
921# Watchdog Device Drivers
922#
923# CONFIG_SOFT_WATCHDOG is not set
924CONFIG_83xx_WDT=y
925
926#
927# PCI-based Watchdog Cards
928#
929# CONFIG_PCIPCWATCHDOG is not set
930# CONFIG_WDTPCI is not set
931
932#
933# USB-based Watchdog Cards
934#
935# CONFIG_USBPCWATCHDOG is not set
936
937#
938# Sonics Silicon Backplane
939#
940CONFIG_SSB_POSSIBLE=y
941# CONFIG_SSB is not set
942
943#
944# Multifunction device drivers
945#
946# CONFIG_MFD_SM501 is not set
947
948#
949# Multimedia devices
950#
951# CONFIG_VIDEO_DEV is not set
952# CONFIG_DVB_CORE is not set
953CONFIG_DAB=y
954# CONFIG_USB_DABUSB is not set
955
956#
957# Graphics support
958#
959# CONFIG_AGP is not set
960# CONFIG_DRM is not set
961# CONFIG_VGASTATE is not set
962CONFIG_VIDEO_OUTPUT_CONTROL=m
963# CONFIG_FB is not set
964# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
965
966#
967# Display device support
968#
969# CONFIG_DISPLAY_SUPPORT is not set
970
971#
972# Sound
973#
974# CONFIG_SOUND is not set
975CONFIG_HID_SUPPORT=y
976CONFIG_HID=y
977# CONFIG_HID_DEBUG is not set
978# CONFIG_HIDRAW is not set
979
980#
981# USB Input Devices
982#
983# CONFIG_USB_HID is not set
984
985#
986# USB HID Boot Protocol drivers
987#
988# CONFIG_USB_KBD is not set
989# CONFIG_USB_MOUSE is not set
990CONFIG_USB_SUPPORT=y
991CONFIG_USB_ARCH_HAS_HCD=y
992CONFIG_USB_ARCH_HAS_OHCI=y
993CONFIG_USB_ARCH_HAS_EHCI=y
994CONFIG_USB=y
995# CONFIG_USB_DEBUG is not set
996
997#
998# Miscellaneous USB options
999#
1000CONFIG_USB_DEVICEFS=y
1001CONFIG_USB_DEVICE_CLASS=y
1002# CONFIG_USB_DYNAMIC_MINORS is not set
1003# CONFIG_USB_OTG is not set
1004
1005#
1006# USB Host Controller Drivers
1007#
1008CONFIG_USB_EHCI_HCD=y
1009# CONFIG_USB_EHCI_SPLIT_ISO is not set
1010CONFIG_USB_EHCI_ROOT_HUB_TT=y
1011# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1012CONFIG_USB_EHCI_FSL=y
1013# CONFIG_USB_ISP116X_HCD is not set
1014CONFIG_USB_OHCI_HCD=y
1015CONFIG_USB_OHCI_HCD_PPC_OF=y
1016CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1017# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
1018CONFIG_USB_OHCI_HCD_PCI=y
1019CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1020CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1021CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1022CONFIG_USB_UHCI_HCD=y
1023# CONFIG_USB_SL811_HCD is not set
1024# CONFIG_USB_R8A66597_HCD is not set
1025
1026#
1027# USB Device Class drivers
1028#
1029# CONFIG_USB_ACM is not set
1030# CONFIG_USB_PRINTER is not set
1031
1032#
1033# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1034#
1035
1036#
1037# may also be needed; see USB_STORAGE Help for more information
1038#
1039CONFIG_USB_STORAGE=y
1040# CONFIG_USB_STORAGE_DEBUG is not set
1041# CONFIG_USB_STORAGE_DATAFAB is not set
1042# CONFIG_USB_STORAGE_FREECOM is not set
1043# CONFIG_USB_STORAGE_ISD200 is not set
1044# CONFIG_USB_STORAGE_DPCM is not set
1045# CONFIG_USB_STORAGE_USBAT is not set
1046# CONFIG_USB_STORAGE_SDDR09 is not set
1047# CONFIG_USB_STORAGE_SDDR55 is not set
1048# CONFIG_USB_STORAGE_JUMPSHOT is not set
1049# CONFIG_USB_STORAGE_ALAUDA is not set
1050# CONFIG_USB_STORAGE_KARMA is not set
1051# CONFIG_USB_LIBUSUAL is not set
1052
1053#
1054# USB Imaging devices
1055#
1056# CONFIG_USB_MDC800 is not set
1057# CONFIG_USB_MICROTEK is not set
1058CONFIG_USB_MON=y
1059
1060#
1061# USB port drivers
1062#
1063
1064#
1065# USB Serial Converter support
1066#
1067# CONFIG_USB_SERIAL is not set
1068
1069#
1070# USB Miscellaneous drivers
1071#
1072# CONFIG_USB_EMI62 is not set
1073# CONFIG_USB_EMI26 is not set
1074# CONFIG_USB_ADUTUX is not set
1075# CONFIG_USB_AUERSWALD is not set
1076# CONFIG_USB_RIO500 is not set
1077# CONFIG_USB_LEGOTOWER is not set
1078# CONFIG_USB_LCD is not set
1079# CONFIG_USB_BERRY_CHARGE is not set
1080# CONFIG_USB_LED is not set
1081# CONFIG_USB_CYPRESS_CY7C63 is not set
1082# CONFIG_USB_CYTHERM is not set
1083# CONFIG_USB_PHIDGET is not set
1084# CONFIG_USB_IDMOUSE is not set
1085# CONFIG_USB_FTDI_ELAN is not set
1086# CONFIG_USB_APPLEDISPLAY is not set
1087# CONFIG_USB_SISUSBVGA is not set
1088# CONFIG_USB_LD is not set
1089# CONFIG_USB_TRANCEVIBRATOR is not set
1090# CONFIG_USB_IOWARRIOR is not set
1091# CONFIG_USB_TEST is not set
1092
1093#
1094# USB DSL modem support
1095#
1096
1097#
1098# USB Gadget Support
1099#
1100CONFIG_USB_GADGET=y
1101# CONFIG_USB_GADGET_DEBUG is not set
1102# CONFIG_USB_GADGET_DEBUG_FILES is not set
1103CONFIG_USB_GADGET_SELECTED=y
1104# CONFIG_USB_GADGET_AMD5536UDC is not set
1105# CONFIG_USB_GADGET_ATMEL_USBA is not set
1106# CONFIG_USB_GADGET_FSL_USB2 is not set
1107CONFIG_USB_GADGET_NET2280=y
1108CONFIG_USB_NET2280=y
1109# CONFIG_USB_GADGET_PXA2XX is not set
1110# CONFIG_USB_GADGET_M66592 is not set
1111# CONFIG_USB_GADGET_GOKU is not set
1112# CONFIG_USB_GADGET_LH7A40X is not set
1113# CONFIG_USB_GADGET_OMAP is not set
1114# CONFIG_USB_GADGET_S3C2410 is not set
1115# CONFIG_USB_GADGET_AT91 is not set
1116# CONFIG_USB_GADGET_DUMMY_HCD is not set
1117CONFIG_USB_GADGET_DUALSPEED=y
1118# CONFIG_USB_ZERO is not set
1119CONFIG_USB_ETH=y
1120CONFIG_USB_ETH_RNDIS=y
1121# CONFIG_USB_GADGETFS is not set
1122# CONFIG_USB_FILE_STORAGE is not set
1123# CONFIG_USB_G_SERIAL is not set
1124# CONFIG_USB_MIDI_GADGET is not set
1125# CONFIG_MMC is not set
1126# CONFIG_NEW_LEDS is not set
1127# CONFIG_INFINIBAND is not set
1128# CONFIG_EDAC is not set
1129CONFIG_RTC_LIB=y
1130CONFIG_RTC_CLASS=y
1131CONFIG_RTC_HCTOSYS=y
1132CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1133# CONFIG_RTC_DEBUG is not set
1134
1135#
1136# RTC interfaces
1137#
1138CONFIG_RTC_INTF_SYSFS=y
1139CONFIG_RTC_INTF_PROC=y
1140CONFIG_RTC_INTF_DEV=y
1141CONFIG_RTC_INTF_DEV_UIE_EMUL=y
1142# CONFIG_RTC_DRV_TEST is not set
1143
1144#
1145# I2C RTC drivers
1146#
1147CONFIG_RTC_DRV_DS1307=y
1148# CONFIG_RTC_DRV_DS1374 is not set
1149# CONFIG_RTC_DRV_DS1672 is not set
1150# CONFIG_RTC_DRV_MAX6900 is not set
1151# CONFIG_RTC_DRV_RS5C372 is not set
1152# CONFIG_RTC_DRV_ISL1208 is not set
1153# CONFIG_RTC_DRV_X1205 is not set
1154# CONFIG_RTC_DRV_PCF8563 is not set
1155# CONFIG_RTC_DRV_PCF8583 is not set
1156# CONFIG_RTC_DRV_M41T80 is not set
1157
1158#
1159# SPI RTC drivers
1160#
1161# CONFIG_RTC_DRV_RS5C348 is not set
1162# CONFIG_RTC_DRV_MAX6902 is not set
1163
1164#
1165# Platform RTC drivers
1166#
1167# CONFIG_RTC_DRV_CMOS is not set
1168# CONFIG_RTC_DRV_DS1553 is not set
1169# CONFIG_RTC_DRV_STK17TA8 is not set
1170# CONFIG_RTC_DRV_DS1742 is not set
1171# CONFIG_RTC_DRV_M48T86 is not set
1172# CONFIG_RTC_DRV_M48T59 is not set
1173# CONFIG_RTC_DRV_V3020 is not set
1174
1175#
1176# on-CPU RTC drivers
1177#
1178
1179#
1180# Userspace I/O
1181#
1182# CONFIG_UIO is not set
1183
1184#
1185# File systems
1186#
1187CONFIG_EXT2_FS=y
1188# CONFIG_EXT2_FS_XATTR is not set
1189# CONFIG_EXT2_FS_XIP is not set
1190CONFIG_EXT3_FS=y
1191CONFIG_EXT3_FS_XATTR=y
1192# CONFIG_EXT3_FS_POSIX_ACL is not set
1193# CONFIG_EXT3_FS_SECURITY is not set
1194# CONFIG_EXT4DEV_FS is not set
1195CONFIG_JBD=y
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
1236# CONFIG_CONFIGFS_FS is not set
1237
1238#
1239# Miscellaneous filesystems
1240#
1241# CONFIG_ADFS_FS is not set
1242# CONFIG_AFFS_FS is not set
1243# CONFIG_HFS_FS is not set
1244# CONFIG_HFSPLUS_FS is not set
1245# CONFIG_BEFS_FS is not set
1246# CONFIG_BFS_FS is not set
1247# CONFIG_EFS_FS is not set
1248CONFIG_JFFS2_FS=y
1249CONFIG_JFFS2_FS_DEBUG=0
1250CONFIG_JFFS2_FS_WRITEBUFFER=y
1251# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1252# CONFIG_JFFS2_SUMMARY is not set
1253# CONFIG_JFFS2_FS_XATTR is not set
1254# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1255CONFIG_JFFS2_ZLIB=y
1256# CONFIG_JFFS2_LZO is not set
1257CONFIG_JFFS2_RTIME=y
1258# CONFIG_JFFS2_RUBIN is not set
1259# CONFIG_CRAMFS is not set
1260# CONFIG_VXFS_FS is not set
1261# CONFIG_HPFS_FS is not set
1262# CONFIG_QNX4FS_FS is not set
1263# CONFIG_SYSV_FS is not set
1264# CONFIG_UFS_FS is not set
1265CONFIG_NETWORK_FILESYSTEMS=y
1266CONFIG_NFS_FS=y
1267CONFIG_NFS_V3=y
1268# CONFIG_NFS_V3_ACL is not set
1269CONFIG_NFS_V4=y
1270# CONFIG_NFS_DIRECTIO is not set
1271# CONFIG_NFSD is not set
1272CONFIG_ROOT_NFS=y
1273CONFIG_LOCKD=y
1274CONFIG_LOCKD_V4=y
1275CONFIG_NFS_COMMON=y
1276CONFIG_SUNRPC=y
1277CONFIG_SUNRPC_GSS=y
1278# CONFIG_SUNRPC_BIND34 is not set
1279CONFIG_RPCSEC_GSS_KRB5=y
1280# CONFIG_RPCSEC_GSS_SPKM3 is not set
1281# CONFIG_SMB_FS is not set
1282# CONFIG_CIFS is not set
1283# CONFIG_NCP_FS is not set
1284# CONFIG_CODA_FS is not set
1285# CONFIG_AFS_FS is not set
1286
1287#
1288# Partition Types
1289#
1290CONFIG_PARTITION_ADVANCED=y
1291# CONFIG_ACORN_PARTITION is not set
1292# CONFIG_OSF_PARTITION is not set
1293# CONFIG_AMIGA_PARTITION is not set
1294# CONFIG_ATARI_PARTITION is not set
1295# CONFIG_MAC_PARTITION is not set
1296CONFIG_MSDOS_PARTITION=y
1297# CONFIG_BSD_DISKLABEL is not set
1298# CONFIG_MINIX_SUBPARTITION is not set
1299# CONFIG_SOLARIS_X86_PARTITION is not set
1300# CONFIG_UNIXWARE_DISKLABEL is not set
1301# CONFIG_LDM_PARTITION is not set
1302# CONFIG_SGI_PARTITION is not set
1303# CONFIG_ULTRIX_PARTITION is not set
1304# CONFIG_SUN_PARTITION is not set
1305# CONFIG_KARMA_PARTITION is not set
1306# CONFIG_EFI_PARTITION is not set
1307# CONFIG_SYSV68_PARTITION is not set
1308# CONFIG_NLS is not set
1309# CONFIG_DLM is not set
1310
1311#
1312# Library routines
1313#
1314CONFIG_BITREVERSE=y
1315# CONFIG_CRC_CCITT is not set
1316# CONFIG_CRC16 is not set
1317# CONFIG_CRC_ITU_T is not set
1318CONFIG_CRC32=y
1319# CONFIG_CRC7 is not set
1320# CONFIG_LIBCRC32C is not set
1321CONFIG_ZLIB_INFLATE=y
1322CONFIG_ZLIB_DEFLATE=y
1323CONFIG_PLIST=y
1324CONFIG_HAS_IOMEM=y
1325CONFIG_HAS_IOPORT=y
1326CONFIG_HAS_DMA=y
1327# CONFIG_INSTRUMENTATION is not set
1328
1329#
1330# Kernel hacking
1331#
1332# CONFIG_PRINTK_TIME is not set
1333CONFIG_ENABLE_WARN_DEPRECATED=y
1334CONFIG_ENABLE_MUST_CHECK=y
1335# CONFIG_MAGIC_SYSRQ is not set
1336# CONFIG_UNUSED_SYMBOLS is not set
1337# CONFIG_DEBUG_FS is not set
1338# CONFIG_HEADERS_CHECK is not set
1339CONFIG_DEBUG_KERNEL=y
1340# CONFIG_DEBUG_SHIRQ is not set
1341CONFIG_DETECT_SOFTLOCKUP=y
1342CONFIG_SCHED_DEBUG=y
1343# CONFIG_SCHEDSTATS is not set
1344# CONFIG_TIMER_STATS is not set
1345# CONFIG_SLUB_DEBUG_ON is not set
1346# CONFIG_DEBUG_RT_MUTEXES is not set
1347# CONFIG_RT_MUTEX_TESTER is not set
1348# CONFIG_DEBUG_SPINLOCK is not set
1349# CONFIG_DEBUG_MUTEXES is not set
1350# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1351# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1352# CONFIG_DEBUG_KOBJECT is not set
1353# CONFIG_DEBUG_BUGVERBOSE is not set
1354# CONFIG_DEBUG_INFO is not set
1355# CONFIG_DEBUG_VM is not set
1356# CONFIG_DEBUG_LIST is not set
1357# CONFIG_DEBUG_SG is not set
1358CONFIG_FORCED_INLINING=y
1359# CONFIG_BOOT_PRINTK_DELAY is not set
1360# CONFIG_RCU_TORTURE_TEST is not set
1361# CONFIG_FAULT_INJECTION is not set
1362# CONFIG_SAMPLES is not set
1363# CONFIG_DEBUG_STACKOVERFLOW is not set
1364# CONFIG_DEBUG_STACK_USAGE is not set
1365# CONFIG_DEBUG_PAGEALLOC is not set
1366# CONFIG_DEBUGGER is not set
1367# CONFIG_BDI_SWITCH is not set
1368# CONFIG_PPC_EARLY_DEBUG is not set
1369
1370#
1371# Security options
1372#
1373# CONFIG_KEYS is not set
1374# CONFIG_SECURITY is not set
1375# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1376CONFIG_CRYPTO=y
1377CONFIG_CRYPTO_ALGAPI=y
1378CONFIG_CRYPTO_BLKCIPHER=y
1379CONFIG_CRYPTO_MANAGER=y
1380# CONFIG_CRYPTO_HMAC is not set
1381# CONFIG_CRYPTO_XCBC is not set
1382# CONFIG_CRYPTO_NULL is not set
1383# CONFIG_CRYPTO_MD4 is not set
1384CONFIG_CRYPTO_MD5=y
1385# CONFIG_CRYPTO_SHA1 is not set
1386# CONFIG_CRYPTO_SHA256 is not set
1387# CONFIG_CRYPTO_SHA512 is not set
1388# CONFIG_CRYPTO_WP512 is not set
1389# CONFIG_CRYPTO_TGR192 is not set
1390# CONFIG_CRYPTO_GF128MUL is not set
1391# CONFIG_CRYPTO_ECB is not set
1392CONFIG_CRYPTO_CBC=y
1393CONFIG_CRYPTO_PCBC=m
1394# CONFIG_CRYPTO_LRW is not set
1395# CONFIG_CRYPTO_XTS is not set
1396# CONFIG_CRYPTO_CRYPTD is not set
1397CONFIG_CRYPTO_DES=y
1398# CONFIG_CRYPTO_FCRYPT is not set
1399# CONFIG_CRYPTO_BLOWFISH is not set
1400# CONFIG_CRYPTO_TWOFISH is not set
1401# CONFIG_CRYPTO_SERPENT is not set
1402# CONFIG_CRYPTO_AES is not set
1403# CONFIG_CRYPTO_CAST5 is not set
1404# CONFIG_CRYPTO_CAST6 is not set
1405# CONFIG_CRYPTO_TEA is not set
1406# CONFIG_CRYPTO_ARC4 is not set
1407# CONFIG_CRYPTO_KHAZAD is not set
1408# CONFIG_CRYPTO_ANUBIS is not set
1409# CONFIG_CRYPTO_SEED is not set
1410# CONFIG_CRYPTO_DEFLATE is not set
1411# CONFIG_CRYPTO_MICHAEL_MIC is not set
1412# CONFIG_CRYPTO_CRC32C is not set
1413# CONFIG_CRYPTO_CAMELLIA is not set
1414# CONFIG_CRYPTO_TEST is not set
1415# CONFIG_CRYPTO_AUTHENC is not set
1416CONFIG_CRYPTO_HW=y
1417# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig
index 6feb86e2b786..2fbe4e5344f7 100644
--- a/arch/powerpc/configs/mpc834x_itx_defconfig
+++ b/arch/powerpc/configs/mpc834x_itx_defconfig
@@ -570,7 +570,8 @@ CONFIG_SATA_SIL=y
570# CONFIG_PATA_SIS is not set 570# CONFIG_PATA_SIS is not set
571# CONFIG_PATA_VIA is not set 571# CONFIG_PATA_VIA is not set
572# CONFIG_PATA_WINBOND is not set 572# CONFIG_PATA_WINBOND is not set
573# CONFIG_PATA_PLATFORM is not set 573CONFIG_PATA_PLATFORM=y
574CONFIG_PATA_OF_PLATFORM=y
574CONFIG_MD=y 575CONFIG_MD=y
575CONFIG_BLK_DEV_MD=y 576CONFIG_BLK_DEV_MD=y
576CONFIG_MD_LINEAR=y 577CONFIG_MD_LINEAR=y
diff --git a/arch/powerpc/configs/mpc837x_mds_defconfig b/arch/powerpc/configs/mpc837x_mds_defconfig
new file mode 100644
index 000000000000..4f49aee5da66
--- /dev/null
+++ b/arch/powerpc/configs/mpc837x_mds_defconfig
@@ -0,0 +1,878 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23
4# Wed Oct 10 16:31:39 2007
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_PPC_MERGE=y
25CONFIG_MMU=y
26CONFIG_GENERIC_HARDIRQS=y
27CONFIG_IRQ_PER_CPU=y
28CONFIG_RWSEM_XCHGADD_ALGORITHM=y
29CONFIG_ARCH_HAS_ILOG2_U32=y
30CONFIG_GENERIC_HWEIGHT=y
31CONFIG_GENERIC_CALIBRATE_DELAY=y
32CONFIG_GENERIC_FIND_NEXT_BIT=y
33# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
34CONFIG_PPC=y
35CONFIG_EARLY_PRINTK=y
36CONFIG_GENERIC_NVRAM=y
37CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
38CONFIG_ARCH_MAY_HAVE_PC_FDC=y
39CONFIG_PPC_OF=y
40CONFIG_OF=y
41CONFIG_PPC_UDBG_16550=y
42# CONFIG_GENERIC_TBSYNC is not set
43CONFIG_AUDIT_ARCH=y
44CONFIG_GENERIC_BUG=y
45CONFIG_DEFAULT_UIMAGE=y
46# CONFIG_PPC_DCR_NATIVE is not set
47# CONFIG_PPC_DCR_MMIO is not set
48CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
49
50#
51# General setup
52#
53CONFIG_EXPERIMENTAL=y
54CONFIG_BROKEN_ON_SMP=y
55CONFIG_INIT_ENV_ARG_LIMIT=32
56CONFIG_LOCALVERSION=""
57CONFIG_LOCALVERSION_AUTO=y
58CONFIG_SWAP=y
59CONFIG_SYSVIPC=y
60CONFIG_SYSVIPC_SYSCTL=y
61# CONFIG_POSIX_MQUEUE is not set
62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_TASKSTATS is not set
64# CONFIG_USER_NS is not set
65# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set
67CONFIG_LOG_BUF_SHIFT=14
68CONFIG_SYSFS_DEPRECATED=y
69# CONFIG_RELAY is not set
70CONFIG_BLK_DEV_INITRD=y
71CONFIG_INITRAMFS_SOURCE=""
72# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
73CONFIG_SYSCTL=y
74CONFIG_EMBEDDED=y
75CONFIG_SYSCTL_SYSCALL=y
76CONFIG_KALLSYMS=y
77# CONFIG_KALLSYMS_EXTRA_PASS is not set
78CONFIG_HOTPLUG=y
79CONFIG_PRINTK=y
80CONFIG_BUG=y
81CONFIG_ELF_CORE=y
82CONFIG_BASE_FULL=y
83CONFIG_FUTEX=y
84CONFIG_ANON_INODES=y
85# CONFIG_EPOLL is not set
86CONFIG_SIGNALFD=y
87CONFIG_EVENTFD=y
88CONFIG_SHMEM=y
89CONFIG_VM_EVENT_COUNTERS=y
90CONFIG_SLAB=y
91# CONFIG_SLUB is not set
92# CONFIG_SLOB is not set
93CONFIG_RT_MUTEXES=y
94# CONFIG_TINY_SHMEM is not set
95CONFIG_BASE_SMALL=0
96CONFIG_MODULES=y
97CONFIG_MODULE_UNLOAD=y
98# CONFIG_MODULE_FORCE_UNLOAD is not set
99# CONFIG_MODVERSIONS is not set
100# CONFIG_MODULE_SRCVERSION_ALL is not set
101# CONFIG_KMOD is not set
102CONFIG_BLOCK=y
103# CONFIG_LBD is not set
104# CONFIG_BLK_DEV_IO_TRACE is not set
105# CONFIG_LSF is not set
106# CONFIG_BLK_DEV_BSG is not set
107
108#
109# IO Schedulers
110#
111CONFIG_IOSCHED_NOOP=y
112CONFIG_IOSCHED_AS=y
113CONFIG_IOSCHED_DEADLINE=y
114CONFIG_IOSCHED_CFQ=y
115CONFIG_DEFAULT_AS=y
116# CONFIG_DEFAULT_DEADLINE is not set
117# CONFIG_DEFAULT_CFQ is not set
118# CONFIG_DEFAULT_NOOP is not set
119CONFIG_DEFAULT_IOSCHED="anticipatory"
120
121#
122# Platform support
123#
124# CONFIG_PPC_MULTIPLATFORM is not set
125# CONFIG_EMBEDDED6xx is not set
126# CONFIG_PPC_82xx is not set
127CONFIG_PPC_83xx=y
128# CONFIG_PPC_86xx is not set
129# CONFIG_PPC_MPC52xx is not set
130# CONFIG_PPC_MPC5200 is not set
131# CONFIG_PPC_CELL is not set
132# CONFIG_PPC_CELL_NATIVE is not set
133# CONFIG_PQ2ADS is not set
134# CONFIG_MPC8313_RDB is not set
135# CONFIG_MPC832x_MDS is not set
136# CONFIG_MPC832x_RDB is not set
137# CONFIG_MPC834x_MDS is not set
138# CONFIG_MPC834x_ITX is not set
139# CONFIG_MPC836x_MDS is not set
140CONFIG_MPC837x_MDS=y
141CONFIG_PPC_MPC837x=y
142# CONFIG_MPIC is not set
143# CONFIG_MPIC_WEIRD is not set
144# CONFIG_PPC_I8259 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_CPM2 is not set
153# CONFIG_FSL_ULI1575 is not set
154CONFIG_FSL_SERDES=y
155
156#
157# Kernel options
158#
159# CONFIG_HIGHMEM is not set
160# CONFIG_HZ_100 is not set
161CONFIG_HZ_250=y
162# CONFIG_HZ_300 is not set
163# CONFIG_HZ_1000 is not set
164CONFIG_HZ=250
165CONFIG_PREEMPT_NONE=y
166# CONFIG_PREEMPT_VOLUNTARY is not set
167# CONFIG_PREEMPT is not set
168CONFIG_BINFMT_ELF=y
169# CONFIG_BINFMT_MISC is not set
170CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
171CONFIG_ARCH_FLATMEM_ENABLE=y
172CONFIG_ARCH_POPULATES_NODE_MAP=y
173CONFIG_SELECT_MEMORY_MODEL=y
174CONFIG_FLATMEM_MANUAL=y
175# CONFIG_DISCONTIGMEM_MANUAL is not set
176# CONFIG_SPARSEMEM_MANUAL is not set
177CONFIG_FLATMEM=y
178CONFIG_FLAT_NODE_MEM_MAP=y
179# CONFIG_SPARSEMEM_STATIC is not set
180CONFIG_SPLIT_PTLOCK_CPUS=4
181# CONFIG_RESOURCES_64BIT is not set
182CONFIG_ZONE_DMA_FLAG=1
183CONFIG_BOUNCE=y
184CONFIG_VIRT_TO_BUS=y
185CONFIG_PROC_DEVICETREE=y
186# CONFIG_CMDLINE_BOOL is not set
187# CONFIG_PM is not set
188CONFIG_SUSPEND_UP_POSSIBLE=y
189CONFIG_HIBERNATION_UP_POSSIBLE=y
190CONFIG_SECCOMP=y
191CONFIG_WANT_DEVICE_TREE=y
192CONFIG_DEVICE_TREE=""
193CONFIG_ISA_DMA_API=y
194
195#
196# Bus options
197#
198CONFIG_ZONE_DMA=y
199CONFIG_GENERIC_ISA_DMA=y
200CONFIG_PPC_INDIRECT_PCI=y
201CONFIG_FSL_SOC=y
202# CONFIG_PCI is not set
203# CONFIG_PCI_DOMAINS is not set
204# CONFIG_PCI_SYSCALL is not set
205# CONFIG_ARCH_SUPPORTS_MSI is not set
206
207#
208# PCCARD (PCMCIA/CardBus) support
209#
210# CONFIG_PCCARD is not set
211
212#
213# Advanced setup
214#
215# CONFIG_ADVANCED_OPTIONS is not set
216
217#
218# Default settings for advanced configuration options are used
219#
220CONFIG_HIGHMEM_START=0xfe000000
221CONFIG_LOWMEM_SIZE=0x30000000
222CONFIG_KERNEL_START=0xc0000000
223CONFIG_TASK_SIZE=0x80000000
224CONFIG_BOOT_LOAD=0x00800000
225
226#
227# Networking
228#
229CONFIG_NET=y
230
231#
232# Networking options
233#
234CONFIG_PACKET=y
235# CONFIG_PACKET_MMAP is not set
236CONFIG_UNIX=y
237CONFIG_XFRM=y
238CONFIG_XFRM_USER=m
239# CONFIG_XFRM_SUB_POLICY is not set
240# CONFIG_XFRM_MIGRATE is not set
241# CONFIG_NET_KEY is not set
242CONFIG_INET=y
243CONFIG_IP_MULTICAST=y
244# CONFIG_IP_ADVANCED_ROUTER is not set
245CONFIG_IP_FIB_HASH=y
246CONFIG_IP_PNP=y
247CONFIG_IP_PNP_DHCP=y
248CONFIG_IP_PNP_BOOTP=y
249# CONFIG_IP_PNP_RARP is not set
250# CONFIG_NET_IPIP is not set
251# CONFIG_NET_IPGRE is not set
252# CONFIG_IP_MROUTE is not set
253# CONFIG_ARPD is not set
254CONFIG_SYN_COOKIES=y
255# CONFIG_INET_AH is not set
256# CONFIG_INET_ESP is not set
257# CONFIG_INET_IPCOMP is not set
258# CONFIG_INET_XFRM_TUNNEL is not set
259# CONFIG_INET_TUNNEL is not set
260CONFIG_INET_XFRM_MODE_TRANSPORT=y
261CONFIG_INET_XFRM_MODE_TUNNEL=y
262CONFIG_INET_XFRM_MODE_BEET=y
263CONFIG_INET_DIAG=y
264CONFIG_INET_TCP_DIAG=y
265# CONFIG_TCP_CONG_ADVANCED is not set
266CONFIG_TCP_CONG_CUBIC=y
267CONFIG_DEFAULT_TCP_CONG="cubic"
268# CONFIG_TCP_MD5SIG is not set
269# CONFIG_IPV6 is not set
270# CONFIG_INET6_XFRM_TUNNEL is not set
271# CONFIG_INET6_TUNNEL is not set
272# CONFIG_NETWORK_SECMARK is not set
273# CONFIG_NETFILTER is not set
274# CONFIG_IP_DCCP is not set
275# CONFIG_IP_SCTP is not set
276# CONFIG_TIPC is not set
277# CONFIG_ATM is not set
278# CONFIG_BRIDGE is not set
279# CONFIG_VLAN_8021Q is not set
280# CONFIG_DECNET is not set
281# CONFIG_LLC2 is not set
282# CONFIG_IPX is not set
283# CONFIG_ATALK is not set
284# CONFIG_X25 is not set
285# CONFIG_LAPB is not set
286# CONFIG_ECONET is not set
287# CONFIG_WAN_ROUTER is not set
288
289#
290# QoS and/or fair queueing
291#
292# CONFIG_NET_SCHED is not set
293
294#
295# Network testing
296#
297# CONFIG_NET_PKTGEN is not set
298# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set
300# CONFIG_BT is not set
301# CONFIG_AF_RXRPC is not set
302
303#
304# Wireless
305#
306# CONFIG_CFG80211 is not set
307# CONFIG_WIRELESS_EXT is not set
308# CONFIG_MAC80211 is not set
309# CONFIG_IEEE80211 is not set
310# CONFIG_RFKILL is not set
311# CONFIG_NET_9P is not set
312
313#
314# Device Drivers
315#
316
317#
318# Generic Driver Options
319#
320CONFIG_STANDALONE=y
321CONFIG_PREVENT_FIRMWARE_BUILD=y
322# CONFIG_FW_LOADER is not set
323# CONFIG_SYS_HYPERVISOR is not set
324# CONFIG_CONNECTOR is not set
325# CONFIG_MTD is not set
326CONFIG_OF_DEVICE=y
327# CONFIG_PARPORT is not set
328CONFIG_BLK_DEV=y
329# CONFIG_BLK_DEV_FD is not set
330# CONFIG_BLK_DEV_COW_COMMON is not set
331CONFIG_BLK_DEV_LOOP=y
332# CONFIG_BLK_DEV_CRYPTOLOOP is not set
333# CONFIG_BLK_DEV_NBD is not set
334CONFIG_BLK_DEV_RAM=y
335CONFIG_BLK_DEV_RAM_COUNT=16
336CONFIG_BLK_DEV_RAM_SIZE=32768
337CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
338# CONFIG_CDROM_PKTCDVD is not set
339# CONFIG_ATA_OVER_ETH is not set
340CONFIG_MISC_DEVICES=y
341# CONFIG_EEPROM_93CX6 is not set
342# CONFIG_IDE is not set
343
344#
345# SCSI device support
346#
347# CONFIG_RAID_ATTRS is not set
348CONFIG_SCSI=y
349CONFIG_SCSI_DMA=y
350# CONFIG_SCSI_TGT is not set
351# CONFIG_SCSI_NETLINK is not set
352CONFIG_SCSI_PROC_FS=y
353
354#
355# SCSI support type (disk, tape, CD-ROM)
356#
357CONFIG_BLK_DEV_SD=y
358# CONFIG_CHR_DEV_ST is not set
359# CONFIG_CHR_DEV_OSST is not set
360# CONFIG_BLK_DEV_SR is not set
361CONFIG_CHR_DEV_SG=y
362# CONFIG_CHR_DEV_SCH is not set
363
364#
365# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
366#
367# CONFIG_SCSI_MULTI_LUN is not set
368# CONFIG_SCSI_CONSTANTS is not set
369# CONFIG_SCSI_LOGGING is not set
370# CONFIG_SCSI_SCAN_ASYNC is not set
371CONFIG_SCSI_WAIT_SCAN=m
372
373#
374# SCSI Transports
375#
376# CONFIG_SCSI_SPI_ATTRS is not set
377# CONFIG_SCSI_FC_ATTRS is not set
378# CONFIG_SCSI_ISCSI_ATTRS is not set
379# CONFIG_SCSI_SAS_LIBSAS is not set
380CONFIG_SCSI_LOWLEVEL=y
381# CONFIG_ISCSI_TCP is not set
382# CONFIG_SCSI_DEBUG is not set
383CONFIG_ATA=y
384# CONFIG_ATA_NONSTANDARD is not set
385CONFIG_SATA_FSL=y
386# CONFIG_PATA_PLATFORM is not set
387# CONFIG_MD is not set
388# CONFIG_MACINTOSH_DRIVERS is not set
389CONFIG_NETDEVICES=y
390# CONFIG_NETDEVICES_MULTIQUEUE is not set
391# CONFIG_DUMMY is not set
392# CONFIG_BONDING is not set
393# CONFIG_MACVLAN is not set
394# CONFIG_EQUALIZER is not set
395# CONFIG_TUN is not set
396CONFIG_PHYLIB=y
397
398#
399# MII PHY device drivers
400#
401CONFIG_MARVELL_PHY=y
402# CONFIG_DAVICOM_PHY is not set
403# CONFIG_QSEMI_PHY is not set
404# CONFIG_LXT_PHY is not set
405# CONFIG_CICADA_PHY is not set
406# CONFIG_VITESSE_PHY is not set
407# CONFIG_SMSC_PHY is not set
408# CONFIG_BROADCOM_PHY is not set
409# CONFIG_ICPLUS_PHY is not set
410# CONFIG_FIXED_PHY is not set
411CONFIG_NET_ETHERNET=y
412CONFIG_MII=y
413CONFIG_NETDEV_1000=y
414CONFIG_GIANFAR=y
415# CONFIG_GFAR_NAPI is not set
416CONFIG_NETDEV_10000=y
417
418#
419# Wireless LAN
420#
421# CONFIG_WLAN_PRE80211 is not set
422# CONFIG_WLAN_80211 is not set
423# CONFIG_WAN is not set
424# CONFIG_PPP is not set
425# CONFIG_SLIP is not set
426# CONFIG_SHAPER is not set
427# CONFIG_NETCONSOLE is not set
428# CONFIG_NETPOLL is not set
429# CONFIG_NET_POLL_CONTROLLER is not set
430# CONFIG_ISDN is not set
431# CONFIG_PHONE is not set
432
433#
434# Input device support
435#
436CONFIG_INPUT=y
437# CONFIG_INPUT_FF_MEMLESS is not set
438# CONFIG_INPUT_POLLDEV is not set
439
440#
441# Userland interfaces
442#
443# CONFIG_INPUT_MOUSEDEV is not set
444# CONFIG_INPUT_JOYDEV is not set
445# CONFIG_INPUT_TSDEV is not set
446# CONFIG_INPUT_EVDEV is not set
447# CONFIG_INPUT_EVBUG is not set
448
449#
450# Input Device Drivers
451#
452# CONFIG_INPUT_KEYBOARD is not set
453# CONFIG_INPUT_MOUSE is not set
454# CONFIG_INPUT_JOYSTICK is not set
455# CONFIG_INPUT_TABLET is not set
456# CONFIG_INPUT_TOUCHSCREEN is not set
457# CONFIG_INPUT_MISC is not set
458
459#
460# Hardware I/O ports
461#
462# CONFIG_SERIO is not set
463# CONFIG_GAMEPORT is not set
464
465#
466# Character devices
467#
468# CONFIG_VT is not set
469# CONFIG_SERIAL_NONSTANDARD is not set
470
471#
472# Serial drivers
473#
474CONFIG_SERIAL_8250=y
475CONFIG_SERIAL_8250_CONSOLE=y
476CONFIG_SERIAL_8250_NR_UARTS=4
477CONFIG_SERIAL_8250_RUNTIME_UARTS=4
478# CONFIG_SERIAL_8250_EXTENDED is not set
479
480#
481# Non-8250 serial port support
482#
483# CONFIG_SERIAL_UARTLITE is not set
484CONFIG_SERIAL_CORE=y
485CONFIG_SERIAL_CORE_CONSOLE=y
486# CONFIG_SERIAL_OF_PLATFORM is not set
487CONFIG_UNIX98_PTYS=y
488CONFIG_LEGACY_PTYS=y
489CONFIG_LEGACY_PTY_COUNT=256
490# CONFIG_IPMI_HANDLER is not set
491CONFIG_WATCHDOG=y
492# CONFIG_WATCHDOG_NOWAYOUT is not set
493
494#
495# Watchdog Device Drivers
496#
497# CONFIG_SOFT_WATCHDOG is not set
498CONFIG_83xx_WDT=y
499# CONFIG_HW_RANDOM is not set
500# CONFIG_NVRAM is not set
501CONFIG_GEN_RTC=y
502# CONFIG_GEN_RTC_X is not set
503# CONFIG_R3964 is not set
504# CONFIG_RAW_DRIVER is not set
505# CONFIG_TCG_TPM is not set
506CONFIG_I2C=y
507CONFIG_I2C_BOARDINFO=y
508CONFIG_I2C_CHARDEV=y
509
510#
511# I2C Algorithms
512#
513# CONFIG_I2C_ALGOBIT is not set
514# CONFIG_I2C_ALGOPCF is not set
515# CONFIG_I2C_ALGOPCA is not set
516
517#
518# I2C Hardware Bus support
519#
520CONFIG_I2C_MPC=y
521# CONFIG_I2C_OCORES is not set
522# CONFIG_I2C_PARPORT_LIGHT is not set
523# CONFIG_I2C_SIMTEC is not set
524# CONFIG_I2C_TAOS_EVM is not set
525# CONFIG_I2C_STUB is not set
526
527#
528# Miscellaneous I2C Chip support
529#
530# CONFIG_SENSORS_DS1337 is not set
531# CONFIG_SENSORS_DS1374 is not set
532# CONFIG_DS1682 is not set
533# CONFIG_SENSORS_EEPROM is not set
534# CONFIG_SENSORS_PCF8574 is not set
535# CONFIG_SENSORS_PCA9539 is not set
536# CONFIG_SENSORS_PCF8591 is not set
537# CONFIG_SENSORS_M41T00 is not set
538# CONFIG_SENSORS_MAX6875 is not set
539# CONFIG_SENSORS_TSL2550 is not set
540# CONFIG_I2C_DEBUG_CORE is not set
541# CONFIG_I2C_DEBUG_ALGO is not set
542# CONFIG_I2C_DEBUG_BUS is not set
543# CONFIG_I2C_DEBUG_CHIP is not set
544
545#
546# SPI support
547#
548# CONFIG_SPI is not set
549# CONFIG_SPI_MASTER is not set
550# CONFIG_W1 is not set
551# CONFIG_POWER_SUPPLY is not set
552CONFIG_HWMON=y
553# CONFIG_HWMON_VID is not set
554# CONFIG_SENSORS_ABITUGURU is not set
555# CONFIG_SENSORS_ABITUGURU3 is not set
556# CONFIG_SENSORS_AD7418 is not set
557# CONFIG_SENSORS_ADM1021 is not set
558# CONFIG_SENSORS_ADM1025 is not set
559# CONFIG_SENSORS_ADM1026 is not set
560# CONFIG_SENSORS_ADM1029 is not set
561# CONFIG_SENSORS_ADM1031 is not set
562# CONFIG_SENSORS_ADM9240 is not set
563# CONFIG_SENSORS_ASB100 is not set
564# CONFIG_SENSORS_ATXP1 is not set
565# CONFIG_SENSORS_DS1621 is not set
566# CONFIG_SENSORS_F71805F is not set
567# CONFIG_SENSORS_FSCHER is not set
568# CONFIG_SENSORS_FSCPOS is not set
569# CONFIG_SENSORS_GL518SM is not set
570# CONFIG_SENSORS_GL520SM is not set
571# CONFIG_SENSORS_IT87 is not set
572# CONFIG_SENSORS_LM63 is not set
573# CONFIG_SENSORS_LM75 is not set
574# CONFIG_SENSORS_LM77 is not set
575# CONFIG_SENSORS_LM78 is not set
576# CONFIG_SENSORS_LM80 is not set
577# CONFIG_SENSORS_LM83 is not set
578# CONFIG_SENSORS_LM85 is not set
579# CONFIG_SENSORS_LM87 is not set
580# CONFIG_SENSORS_LM90 is not set
581# CONFIG_SENSORS_LM92 is not set
582# CONFIG_SENSORS_LM93 is not set
583# CONFIG_SENSORS_MAX1619 is not set
584# CONFIG_SENSORS_MAX6650 is not set
585# CONFIG_SENSORS_PC87360 is not set
586# CONFIG_SENSORS_PC87427 is not set
587# CONFIG_SENSORS_DME1737 is not set
588# CONFIG_SENSORS_SMSC47M1 is not set
589# CONFIG_SENSORS_SMSC47M192 is not set
590# CONFIG_SENSORS_SMSC47B397 is not set
591# CONFIG_SENSORS_THMC50 is not set
592# CONFIG_SENSORS_VT1211 is not set
593# CONFIG_SENSORS_W83781D is not set
594# CONFIG_SENSORS_W83791D is not set
595# CONFIG_SENSORS_W83792D is not set
596# CONFIG_SENSORS_W83793 is not set
597# CONFIG_SENSORS_W83L785TS is not set
598# CONFIG_SENSORS_W83627HF is not set
599# CONFIG_SENSORS_W83627EHF is not set
600# CONFIG_HWMON_DEBUG_CHIP is not set
601
602#
603# Multifunction device drivers
604#
605# CONFIG_MFD_SM501 is not set
606
607#
608# Multimedia devices
609#
610# CONFIG_VIDEO_DEV is not set
611# CONFIG_DVB_CORE is not set
612CONFIG_DAB=y
613
614#
615# Graphics support
616#
617# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
618
619#
620# Display device support
621#
622# CONFIG_DISPLAY_SUPPORT is not set
623# CONFIG_VGASTATE is not set
624CONFIG_VIDEO_OUTPUT_CONTROL=m
625# CONFIG_FB is not set
626# CONFIG_FB_IBM_GXT4500 is not set
627
628#
629# Sound
630#
631# CONFIG_SOUND is not set
632CONFIG_HID_SUPPORT=y
633CONFIG_HID=y
634# CONFIG_HID_DEBUG is not set
635CONFIG_USB_SUPPORT=y
636CONFIG_USB_ARCH_HAS_HCD=y
637# CONFIG_USB_ARCH_HAS_OHCI is not set
638CONFIG_USB_ARCH_HAS_EHCI=y
639# CONFIG_USB is not set
640
641#
642# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
643#
644
645#
646# USB Gadget Support
647#
648# CONFIG_USB_GADGET is not set
649# CONFIG_MMC is not set
650# CONFIG_NEW_LEDS is not set
651# CONFIG_EDAC is not set
652# CONFIG_RTC_CLASS is not set
653
654#
655# DMA Engine support
656#
657# CONFIG_DMA_ENGINE is not set
658
659#
660# DMA Clients
661#
662
663#
664# DMA Devices
665#
666
667#
668# Userspace I/O
669#
670# CONFIG_UIO is not set
671
672#
673# File systems
674#
675CONFIG_EXT2_FS=y
676# CONFIG_EXT2_FS_XATTR is not set
677# CONFIG_EXT2_FS_XIP is not set
678CONFIG_EXT3_FS=y
679CONFIG_EXT3_FS_XATTR=y
680# CONFIG_EXT3_FS_POSIX_ACL is not set
681# CONFIG_EXT3_FS_SECURITY is not set
682# CONFIG_EXT4DEV_FS is not set
683CONFIG_JBD=y
684# CONFIG_JBD_DEBUG is not set
685CONFIG_FS_MBCACHE=y
686# CONFIG_REISERFS_FS is not set
687# CONFIG_JFS_FS is not set
688# CONFIG_FS_POSIX_ACL is not set
689# CONFIG_XFS_FS is not set
690# CONFIG_GFS2_FS is not set
691# CONFIG_OCFS2_FS is not set
692# CONFIG_MINIX_FS is not set
693# CONFIG_ROMFS_FS is not set
694CONFIG_INOTIFY=y
695CONFIG_INOTIFY_USER=y
696# CONFIG_QUOTA is not set
697CONFIG_DNOTIFY=y
698# CONFIG_AUTOFS_FS is not set
699# CONFIG_AUTOFS4_FS is not set
700# CONFIG_FUSE_FS is not set
701
702#
703# CD-ROM/DVD Filesystems
704#
705# CONFIG_ISO9660_FS is not set
706# CONFIG_UDF_FS is not set
707
708#
709# DOS/FAT/NT Filesystems
710#
711# CONFIG_MSDOS_FS is not set
712# CONFIG_VFAT_FS is not set
713# CONFIG_NTFS_FS is not set
714
715#
716# Pseudo filesystems
717#
718CONFIG_PROC_FS=y
719CONFIG_PROC_KCORE=y
720CONFIG_PROC_SYSCTL=y
721CONFIG_SYSFS=y
722CONFIG_TMPFS=y
723# CONFIG_TMPFS_POSIX_ACL is not set
724# CONFIG_HUGETLB_PAGE is not set
725CONFIG_RAMFS=y
726# CONFIG_CONFIGFS_FS is not set
727
728#
729# Miscellaneous filesystems
730#
731# CONFIG_ADFS_FS is not set
732# CONFIG_AFFS_FS is not set
733# CONFIG_HFS_FS is not set
734# CONFIG_HFSPLUS_FS is not set
735# CONFIG_BEFS_FS is not set
736# CONFIG_BFS_FS is not set
737# CONFIG_EFS_FS is not set
738# CONFIG_CRAMFS is not set
739# CONFIG_VXFS_FS is not set
740# CONFIG_HPFS_FS is not set
741# CONFIG_QNX4FS_FS is not set
742# CONFIG_SYSV_FS is not set
743# CONFIG_UFS_FS is not set
744
745#
746# Network File Systems
747#
748CONFIG_NFS_FS=y
749CONFIG_NFS_V3=y
750# CONFIG_NFS_V3_ACL is not set
751CONFIG_NFS_V4=y
752# CONFIG_NFS_DIRECTIO is not set
753# CONFIG_NFSD is not set
754CONFIG_ROOT_NFS=y
755CONFIG_LOCKD=y
756CONFIG_LOCKD_V4=y
757CONFIG_NFS_COMMON=y
758CONFIG_SUNRPC=y
759CONFIG_SUNRPC_GSS=y
760# CONFIG_SUNRPC_BIND34 is not set
761CONFIG_RPCSEC_GSS_KRB5=y
762# CONFIG_RPCSEC_GSS_SPKM3 is not set
763# CONFIG_SMB_FS is not set
764# CONFIG_CIFS is not set
765# CONFIG_NCP_FS is not set
766# CONFIG_CODA_FS is not set
767# CONFIG_AFS_FS is not set
768
769#
770# Partition Types
771#
772CONFIG_PARTITION_ADVANCED=y
773# CONFIG_ACORN_PARTITION is not set
774# CONFIG_OSF_PARTITION is not set
775# CONFIG_AMIGA_PARTITION is not set
776# CONFIG_ATARI_PARTITION is not set
777# CONFIG_MAC_PARTITION is not set
778CONFIG_MSDOS_PARTITION=y
779# CONFIG_BSD_DISKLABEL is not set
780# CONFIG_MINIX_SUBPARTITION is not set
781# CONFIG_SOLARIS_X86_PARTITION is not set
782# CONFIG_UNIXWARE_DISKLABEL is not set
783# CONFIG_LDM_PARTITION is not set
784# CONFIG_SGI_PARTITION is not set
785# CONFIG_ULTRIX_PARTITION is not set
786# CONFIG_SUN_PARTITION is not set
787# CONFIG_KARMA_PARTITION is not set
788# CONFIG_EFI_PARTITION is not set
789# CONFIG_SYSV68_PARTITION is not set
790
791#
792# Native Language Support
793#
794# CONFIG_NLS is not set
795
796#
797# Distributed Lock Manager
798#
799# CONFIG_DLM is not set
800# CONFIG_UCC_SLOW is not set
801
802#
803# Library routines
804#
805CONFIG_BITREVERSE=y
806# CONFIG_CRC_CCITT is not set
807# CONFIG_CRC16 is not set
808# CONFIG_CRC_ITU_T is not set
809CONFIG_CRC32=y
810# CONFIG_CRC7 is not set
811# CONFIG_LIBCRC32C is not set
812CONFIG_PLIST=y
813CONFIG_HAS_IOMEM=y
814CONFIG_HAS_IOPORT=y
815CONFIG_HAS_DMA=y
816
817#
818# Instrumentation Support
819#
820# CONFIG_PROFILING is not set
821# CONFIG_KPROBES is not set
822
823#
824# Kernel hacking
825#
826# CONFIG_PRINTK_TIME is not set
827CONFIG_ENABLE_MUST_CHECK=y
828# CONFIG_MAGIC_SYSRQ is not set
829# CONFIG_UNUSED_SYMBOLS is not set
830# CONFIG_DEBUG_FS is not set
831# CONFIG_HEADERS_CHECK is not set
832# CONFIG_DEBUG_KERNEL is not set
833# CONFIG_DEBUG_BUGVERBOSE is not set
834# CONFIG_PPC_EARLY_DEBUG is not set
835
836#
837# Security options
838#
839# CONFIG_KEYS is not set
840# CONFIG_SECURITY is not set
841CONFIG_CRYPTO=y
842CONFIG_CRYPTO_ALGAPI=y
843CONFIG_CRYPTO_BLKCIPHER=y
844CONFIG_CRYPTO_MANAGER=y
845# CONFIG_CRYPTO_HMAC is not set
846# CONFIG_CRYPTO_XCBC is not set
847# CONFIG_CRYPTO_NULL is not set
848# CONFIG_CRYPTO_MD4 is not set
849CONFIG_CRYPTO_MD5=y
850# CONFIG_CRYPTO_SHA1 is not set
851# CONFIG_CRYPTO_SHA256 is not set
852# CONFIG_CRYPTO_SHA512 is not set
853# CONFIG_CRYPTO_WP512 is not set
854# CONFIG_CRYPTO_TGR192 is not set
855# CONFIG_CRYPTO_GF128MUL is not set
856CONFIG_CRYPTO_ECB=m
857CONFIG_CRYPTO_CBC=y
858CONFIG_CRYPTO_PCBC=m
859# CONFIG_CRYPTO_LRW is not set
860# CONFIG_CRYPTO_CRYPTD is not set
861CONFIG_CRYPTO_DES=y
862# CONFIG_CRYPTO_FCRYPT is not set
863# CONFIG_CRYPTO_BLOWFISH is not set
864# CONFIG_CRYPTO_TWOFISH is not set
865# CONFIG_CRYPTO_SERPENT is not set
866# CONFIG_CRYPTO_AES is not set
867# CONFIG_CRYPTO_CAST5 is not set
868# CONFIG_CRYPTO_CAST6 is not set
869# CONFIG_CRYPTO_TEA is not set
870# CONFIG_CRYPTO_ARC4 is not set
871# CONFIG_CRYPTO_KHAZAD is not set
872# CONFIG_CRYPTO_ANUBIS is not set
873# CONFIG_CRYPTO_DEFLATE is not set
874# CONFIG_CRYPTO_MICHAEL_MIC is not set
875# CONFIG_CRYPTO_CRC32C is not set
876# CONFIG_CRYPTO_CAMELLIA is not set
877# CONFIG_CRYPTO_TEST is not set
878CONFIG_CRYPTO_HW=y
diff --git a/arch/powerpc/configs/mpc837x_rdb_defconfig b/arch/powerpc/configs/mpc837x_rdb_defconfig
new file mode 100644
index 000000000000..91d291e3ee3a
--- /dev/null
+++ b/arch/powerpc/configs/mpc837x_rdb_defconfig
@@ -0,0 +1,887 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc8
4# Thu Jan 24 20:04:39 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50CONFIG_DEFAULT_UIMAGE=y
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set
70# CONFIG_PID_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75CONFIG_FAIR_GROUP_SCHED=y
76CONFIG_FAIR_USER_SCHED=y
77# CONFIG_FAIR_CGROUP_SCHED is not set
78CONFIG_SYSFS_DEPRECATED=y
79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
81CONFIG_INITRAMFS_SOURCE=""
82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
83CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y
86CONFIG_KALLSYMS=y
87# CONFIG_KALLSYMS_EXTRA_PASS is not set
88CONFIG_HOTPLUG=y
89CONFIG_PRINTK=y
90CONFIG_BUG=y
91CONFIG_ELF_CORE=y
92CONFIG_BASE_FULL=y
93CONFIG_FUTEX=y
94CONFIG_ANON_INODES=y
95# CONFIG_EPOLL is not set
96CONFIG_SIGNALFD=y
97CONFIG_EVENTFD=y
98CONFIG_SHMEM=y
99CONFIG_VM_EVENT_COUNTERS=y
100CONFIG_SLAB=y
101# CONFIG_SLUB is not set
102# CONFIG_SLOB is not set
103CONFIG_SLABINFO=y
104CONFIG_RT_MUTEXES=y
105# CONFIG_TINY_SHMEM is not set
106CONFIG_BASE_SMALL=0
107CONFIG_MODULES=y
108CONFIG_MODULE_UNLOAD=y
109# CONFIG_MODULE_FORCE_UNLOAD is not set
110# CONFIG_MODVERSIONS is not set
111# CONFIG_MODULE_SRCVERSION_ALL is not set
112# CONFIG_KMOD is not set
113CONFIG_BLOCK=y
114# CONFIG_LBD is not set
115# CONFIG_BLK_DEV_IO_TRACE is not set
116# CONFIG_LSF is not set
117# CONFIG_BLK_DEV_BSG is not set
118
119#
120# IO Schedulers
121#
122CONFIG_IOSCHED_NOOP=y
123CONFIG_IOSCHED_AS=y
124CONFIG_IOSCHED_DEADLINE=y
125CONFIG_IOSCHED_CFQ=y
126CONFIG_DEFAULT_AS=y
127# CONFIG_DEFAULT_DEADLINE is not set
128# CONFIG_DEFAULT_CFQ is not set
129# CONFIG_DEFAULT_NOOP is not set
130CONFIG_DEFAULT_IOSCHED="anticipatory"
131
132#
133# Platform support
134#
135# CONFIG_PPC_MULTIPLATFORM is not set
136# CONFIG_PPC_82xx is not set
137CONFIG_PPC_83xx=y
138# CONFIG_PPC_86xx is not set
139# CONFIG_PPC_MPC52xx is not set
140# CONFIG_PPC_MPC5200 is not set
141# CONFIG_PPC_CELL is not set
142# CONFIG_PPC_CELL_NATIVE is not set
143# CONFIG_PQ2ADS is not set
144# CONFIG_MPC831x_RDB is not set
145# CONFIG_MPC832x_MDS is not set
146# CONFIG_MPC832x_RDB is not set
147# CONFIG_MPC834x_MDS is not set
148# CONFIG_MPC834x_ITX is not set
149# CONFIG_MPC836x_MDS is not set
150# CONFIG_MPC837x_MDS is not set
151CONFIG_MPC837x_RDB=y
152CONFIG_PPC_MPC837x=y
153CONFIG_IPIC=y
154# CONFIG_MPIC is not set
155# CONFIG_MPIC_WEIRD is not set
156# CONFIG_PPC_I8259 is not set
157# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set
159# CONFIG_PPC_MPC106 is not set
160# CONFIG_PPC_970_NAP is not set
161# CONFIG_PPC_INDIRECT_IO is not set
162# CONFIG_GENERIC_IOMAP is not set
163# CONFIG_CPU_FREQ is not set
164# CONFIG_CPM2 is not set
165# CONFIG_FSL_ULI1575 is not set
166
167#
168# Kernel options
169#
170# CONFIG_HIGHMEM is not set
171# CONFIG_TICK_ONESHOT is not set
172# CONFIG_NO_HZ is not set
173# CONFIG_HIGH_RES_TIMERS is not set
174CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
175# CONFIG_HZ_100 is not set
176CONFIG_HZ_250=y
177# CONFIG_HZ_300 is not set
178# CONFIG_HZ_1000 is not set
179CONFIG_HZ=250
180CONFIG_PREEMPT_NONE=y
181# CONFIG_PREEMPT_VOLUNTARY is not set
182# CONFIG_PREEMPT is not set
183CONFIG_BINFMT_ELF=y
184# CONFIG_BINFMT_MISC is not set
185CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
186CONFIG_ARCH_FLATMEM_ENABLE=y
187CONFIG_ARCH_POPULATES_NODE_MAP=y
188CONFIG_SELECT_MEMORY_MODEL=y
189CONFIG_FLATMEM_MANUAL=y
190# CONFIG_DISCONTIGMEM_MANUAL is not set
191# CONFIG_SPARSEMEM_MANUAL is not set
192CONFIG_FLATMEM=y
193CONFIG_FLAT_NODE_MEM_MAP=y
194# CONFIG_SPARSEMEM_STATIC is not set
195# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
196CONFIG_SPLIT_PTLOCK_CPUS=4
197# CONFIG_RESOURCES_64BIT is not set
198CONFIG_ZONE_DMA_FLAG=1
199CONFIG_BOUNCE=y
200CONFIG_VIRT_TO_BUS=y
201CONFIG_PROC_DEVICETREE=y
202# CONFIG_CMDLINE_BOOL is not set
203# CONFIG_PM is not set
204CONFIG_SUSPEND_UP_POSSIBLE=y
205CONFIG_HIBERNATION_UP_POSSIBLE=y
206CONFIG_SECCOMP=y
207CONFIG_WANT_DEVICE_TREE=y
208CONFIG_DEVICE_TREE=""
209CONFIG_ISA_DMA_API=y
210
211#
212# Bus options
213#
214CONFIG_ZONE_DMA=y
215CONFIG_GENERIC_ISA_DMA=y
216CONFIG_PPC_INDIRECT_PCI=y
217CONFIG_FSL_SOC=y
218# CONFIG_PCI is not set
219# CONFIG_PCI_DOMAINS is not set
220# CONFIG_PCI_SYSCALL is not set
221# CONFIG_ARCH_SUPPORTS_MSI is not set
222# CONFIG_PCCARD is not set
223
224#
225# Advanced setup
226#
227# CONFIG_ADVANCED_OPTIONS is not set
228
229#
230# Default settings for advanced configuration options are used
231#
232CONFIG_HIGHMEM_START=0xfe000000
233CONFIG_LOWMEM_SIZE=0x30000000
234CONFIG_KERNEL_START=0xc0000000
235CONFIG_TASK_SIZE=0xc0000000
236CONFIG_BOOT_LOAD=0x00800000
237
238#
239# Networking
240#
241CONFIG_NET=y
242
243#
244# Networking options
245#
246CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y
249# CONFIG_NET_KEY is not set
250CONFIG_INET=y
251CONFIG_IP_MULTICAST=y
252# CONFIG_IP_ADVANCED_ROUTER is not set
253CONFIG_IP_FIB_HASH=y
254CONFIG_IP_PNP=y
255CONFIG_IP_PNP_DHCP=y
256CONFIG_IP_PNP_BOOTP=y
257# CONFIG_IP_PNP_RARP is not set
258# CONFIG_NET_IPIP is not set
259# CONFIG_NET_IPGRE is not set
260# CONFIG_IP_MROUTE is not set
261# CONFIG_ARPD is not set
262CONFIG_SYN_COOKIES=y
263# CONFIG_INET_AH is not set
264# CONFIG_INET_ESP is not set
265# CONFIG_INET_IPCOMP is not set
266# CONFIG_INET_XFRM_TUNNEL is not set
267# CONFIG_INET_TUNNEL is not set
268# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
269# CONFIG_INET_XFRM_MODE_TUNNEL is not set
270# CONFIG_INET_XFRM_MODE_BEET is not set
271# CONFIG_INET_LRO is not set
272CONFIG_INET_DIAG=y
273CONFIG_INET_TCP_DIAG=y
274# CONFIG_TCP_CONG_ADVANCED is not set
275CONFIG_TCP_CONG_CUBIC=y
276CONFIG_DEFAULT_TCP_CONG="cubic"
277# CONFIG_TCP_MD5SIG is not set
278# CONFIG_IPV6 is not set
279# CONFIG_INET6_XFRM_TUNNEL is not set
280# CONFIG_INET6_TUNNEL is not set
281# CONFIG_NETWORK_SECMARK is not set
282# CONFIG_NETFILTER is not set
283# CONFIG_IP_DCCP is not set
284# CONFIG_IP_SCTP is not set
285# CONFIG_TIPC is not set
286# CONFIG_ATM is not set
287# CONFIG_BRIDGE is not set
288# CONFIG_VLAN_8021Q is not set
289# CONFIG_DECNET is not set
290# CONFIG_LLC2 is not set
291# CONFIG_IPX is not set
292# CONFIG_ATALK is not set
293# CONFIG_X25 is not set
294# CONFIG_LAPB is not set
295# CONFIG_ECONET is not set
296# CONFIG_WAN_ROUTER is not set
297# CONFIG_NET_SCHED is not set
298
299#
300# Network testing
301#
302# CONFIG_NET_PKTGEN is not set
303# CONFIG_HAMRADIO is not set
304# CONFIG_IRDA is not set
305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
316# CONFIG_NET_9P is not set
317
318#
319# Device Drivers
320#
321
322#
323# Generic Driver Options
324#
325CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
326CONFIG_STANDALONE=y
327CONFIG_PREVENT_FIRMWARE_BUILD=y
328# CONFIG_FW_LOADER is not set
329# CONFIG_SYS_HYPERVISOR is not set
330# CONFIG_CONNECTOR is not set
331# CONFIG_MTD is not set
332CONFIG_OF_DEVICE=y
333# CONFIG_PARPORT is not set
334CONFIG_BLK_DEV=y
335# CONFIG_BLK_DEV_FD is not set
336# CONFIG_BLK_DEV_COW_COMMON is not set
337CONFIG_BLK_DEV_LOOP=y
338# CONFIG_BLK_DEV_CRYPTOLOOP is not set
339# CONFIG_BLK_DEV_NBD is not set
340CONFIG_BLK_DEV_RAM=y
341CONFIG_BLK_DEV_RAM_COUNT=16
342CONFIG_BLK_DEV_RAM_SIZE=32768
343CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
344# CONFIG_CDROM_PKTCDVD is not set
345# CONFIG_ATA_OVER_ETH is not set
346CONFIG_MISC_DEVICES=y
347# CONFIG_EEPROM_93CX6 is not set
348# CONFIG_IDE is not set
349
350#
351# SCSI device support
352#
353# CONFIG_RAID_ATTRS is not set
354CONFIG_SCSI=y
355CONFIG_SCSI_DMA=y
356# CONFIG_SCSI_TGT is not set
357# CONFIG_SCSI_NETLINK is not set
358CONFIG_SCSI_PROC_FS=y
359
360#
361# SCSI support type (disk, tape, CD-ROM)
362#
363CONFIG_BLK_DEV_SD=y
364# CONFIG_CHR_DEV_ST is not set
365# CONFIG_CHR_DEV_OSST is not set
366# CONFIG_BLK_DEV_SR is not set
367CONFIG_CHR_DEV_SG=y
368# CONFIG_CHR_DEV_SCH is not set
369
370#
371# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
372#
373# CONFIG_SCSI_MULTI_LUN is not set
374# CONFIG_SCSI_CONSTANTS is not set
375# CONFIG_SCSI_LOGGING is not set
376# CONFIG_SCSI_SCAN_ASYNC is not set
377CONFIG_SCSI_WAIT_SCAN=m
378
379#
380# SCSI Transports
381#
382# CONFIG_SCSI_SPI_ATTRS is not set
383# CONFIG_SCSI_FC_ATTRS is not set
384# CONFIG_SCSI_ISCSI_ATTRS is not set
385# CONFIG_SCSI_SAS_LIBSAS is not set
386# CONFIG_SCSI_SRP_ATTRS is not set
387CONFIG_SCSI_LOWLEVEL=y
388# CONFIG_ISCSI_TCP is not set
389# CONFIG_SCSI_DEBUG is not set
390CONFIG_ATA=y
391# CONFIG_ATA_NONSTANDARD is not set
392CONFIG_SATA_FSL=y
393# CONFIG_PATA_PLATFORM is not set
394CONFIG_MD=y
395CONFIG_BLK_DEV_MD=y
396# CONFIG_MD_LINEAR is not set
397# CONFIG_MD_RAID0 is not set
398CONFIG_MD_RAID1=y
399# CONFIG_MD_RAID10 is not set
400CONFIG_MD_RAID456=y
401CONFIG_MD_RAID5_RESHAPE=y
402# CONFIG_MD_MULTIPATH is not set
403# CONFIG_MD_FAULTY is not set
404# CONFIG_BLK_DEV_DM is not set
405# CONFIG_MACINTOSH_DRIVERS is not set
406CONFIG_NETDEVICES=y
407# CONFIG_NETDEVICES_MULTIQUEUE is not set
408# CONFIG_DUMMY is not set
409# CONFIG_BONDING is not set
410# CONFIG_MACVLAN is not set
411# CONFIG_EQUALIZER is not set
412# CONFIG_TUN is not set
413# CONFIG_VETH is not set
414CONFIG_PHYLIB=y
415
416#
417# MII PHY device drivers
418#
419CONFIG_MARVELL_PHY=y
420# CONFIG_DAVICOM_PHY is not set
421# CONFIG_QSEMI_PHY is not set
422# CONFIG_LXT_PHY is not set
423# CONFIG_CICADA_PHY is not set
424# CONFIG_VITESSE_PHY is not set
425# CONFIG_SMSC_PHY is not set
426# CONFIG_BROADCOM_PHY is not set
427# CONFIG_ICPLUS_PHY is not set
428# CONFIG_FIXED_PHY is not set
429# CONFIG_MDIO_BITBANG is not set
430CONFIG_NET_ETHERNET=y
431CONFIG_MII=y
432# CONFIG_IBM_NEW_EMAC_ZMII is not set
433# CONFIG_IBM_NEW_EMAC_RGMII is not set
434# CONFIG_IBM_NEW_EMAC_TAH is not set
435# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
436# CONFIG_B44 is not set
437CONFIG_NETDEV_1000=y
438CONFIG_GIANFAR=y
439CONFIG_GFAR_NAPI=y
440# CONFIG_NETDEV_10000 is not set
441
442#
443# Wireless LAN
444#
445# CONFIG_WLAN_PRE80211 is not set
446# CONFIG_WLAN_80211 is not set
447# CONFIG_WAN is not set
448# CONFIG_PPP is not set
449# CONFIG_SLIP is not set
450# CONFIG_SHAPER is not set
451# CONFIG_NETCONSOLE is not set
452# CONFIG_NETPOLL is not set
453# CONFIG_NET_POLL_CONTROLLER is not set
454# CONFIG_ISDN is not set
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# CONFIG_INPUT_POLLDEV is not set
463
464#
465# Userland interfaces
466#
467# CONFIG_INPUT_MOUSEDEV is not set
468# CONFIG_INPUT_JOYDEV is not set
469# CONFIG_INPUT_EVDEV is not set
470# CONFIG_INPUT_EVBUG is not set
471
472#
473# Input Device Drivers
474#
475# CONFIG_INPUT_KEYBOARD is not set
476# CONFIG_INPUT_MOUSE is not set
477# CONFIG_INPUT_JOYSTICK is not set
478# CONFIG_INPUT_TABLET is not set
479# CONFIG_INPUT_TOUCHSCREEN is not set
480# CONFIG_INPUT_MISC is not set
481
482#
483# Hardware I/O ports
484#
485# CONFIG_SERIO is not set
486# CONFIG_GAMEPORT is not set
487
488#
489# Character devices
490#
491# CONFIG_VT is not set
492# CONFIG_SERIAL_NONSTANDARD is not set
493
494#
495# Serial drivers
496#
497CONFIG_SERIAL_8250=y
498CONFIG_SERIAL_8250_CONSOLE=y
499CONFIG_SERIAL_8250_NR_UARTS=4
500CONFIG_SERIAL_8250_RUNTIME_UARTS=4
501# CONFIG_SERIAL_8250_EXTENDED is not set
502
503#
504# Non-8250 serial port support
505#
506# CONFIG_SERIAL_UARTLITE is not set
507CONFIG_SERIAL_CORE=y
508CONFIG_SERIAL_CORE_CONSOLE=y
509# CONFIG_SERIAL_OF_PLATFORM is not set
510CONFIG_UNIX98_PTYS=y
511CONFIG_LEGACY_PTYS=y
512CONFIG_LEGACY_PTY_COUNT=256
513# CONFIG_IPMI_HANDLER is not set
514# CONFIG_HW_RANDOM is not set
515# CONFIG_NVRAM is not set
516CONFIG_GEN_RTC=y
517# CONFIG_GEN_RTC_X is not set
518# CONFIG_R3964 is not set
519# CONFIG_RAW_DRIVER is not set
520# CONFIG_TCG_TPM is not set
521CONFIG_I2C=y
522CONFIG_I2C_BOARDINFO=y
523CONFIG_I2C_CHARDEV=y
524
525#
526# I2C Algorithms
527#
528# CONFIG_I2C_ALGOBIT is not set
529# CONFIG_I2C_ALGOPCF is not set
530# CONFIG_I2C_ALGOPCA is not set
531
532#
533# I2C Hardware Bus support
534#
535CONFIG_I2C_MPC=y
536# CONFIG_I2C_OCORES is not set
537# CONFIG_I2C_PARPORT_LIGHT is not set
538# CONFIG_I2C_SIMTEC is not set
539# CONFIG_I2C_TAOS_EVM is not set
540# CONFIG_I2C_STUB is not set
541
542#
543# Miscellaneous I2C Chip support
544#
545# CONFIG_SENSORS_DS1337 is not set
546# CONFIG_SENSORS_DS1374 is not set
547# CONFIG_DS1682 is not set
548# CONFIG_SENSORS_EEPROM is not set
549# CONFIG_SENSORS_PCF8574 is not set
550# CONFIG_SENSORS_PCA9539 is not set
551# CONFIG_SENSORS_PCF8591 is not set
552# CONFIG_SENSORS_M41T00 is not set
553# CONFIG_SENSORS_MAX6875 is not set
554# CONFIG_SENSORS_TSL2550 is not set
555# CONFIG_I2C_DEBUG_CORE is not set
556# CONFIG_I2C_DEBUG_ALGO is not set
557# CONFIG_I2C_DEBUG_BUS is not set
558# CONFIG_I2C_DEBUG_CHIP is not set
559
560#
561# SPI support
562#
563# CONFIG_SPI is not set
564# CONFIG_SPI_MASTER is not set
565# CONFIG_W1 is not set
566# CONFIG_POWER_SUPPLY is not set
567CONFIG_HWMON=y
568# CONFIG_HWMON_VID is not set
569# CONFIG_SENSORS_AD7418 is not set
570# CONFIG_SENSORS_ADM1021 is not set
571# CONFIG_SENSORS_ADM1025 is not set
572# CONFIG_SENSORS_ADM1026 is not set
573# CONFIG_SENSORS_ADM1029 is not set
574# CONFIG_SENSORS_ADM1031 is not set
575# CONFIG_SENSORS_ADM9240 is not set
576# CONFIG_SENSORS_ADT7470 is not set
577# CONFIG_SENSORS_ATXP1 is not set
578# CONFIG_SENSORS_DS1621 is not set
579# CONFIG_SENSORS_F71805F is not set
580# CONFIG_SENSORS_F71882FG is not set
581# CONFIG_SENSORS_F75375S is not set
582# CONFIG_SENSORS_GL518SM is not set
583# CONFIG_SENSORS_GL520SM is not set
584# CONFIG_SENSORS_IT87 is not set
585# CONFIG_SENSORS_LM63 is not set
586# CONFIG_SENSORS_LM75 is not set
587# CONFIG_SENSORS_LM77 is not set
588# CONFIG_SENSORS_LM78 is not set
589# CONFIG_SENSORS_LM80 is not set
590# CONFIG_SENSORS_LM83 is not set
591# CONFIG_SENSORS_LM85 is not set
592# CONFIG_SENSORS_LM87 is not set
593# CONFIG_SENSORS_LM90 is not set
594# CONFIG_SENSORS_LM92 is not set
595# CONFIG_SENSORS_LM93 is not set
596# CONFIG_SENSORS_MAX1619 is not set
597# CONFIG_SENSORS_MAX6650 is not set
598# CONFIG_SENSORS_PC87360 is not set
599# CONFIG_SENSORS_PC87427 is not set
600# CONFIG_SENSORS_DME1737 is not set
601# CONFIG_SENSORS_SMSC47M1 is not set
602# CONFIG_SENSORS_SMSC47M192 is not set
603# CONFIG_SENSORS_SMSC47B397 is not set
604# CONFIG_SENSORS_THMC50 is not set
605# CONFIG_SENSORS_VT1211 is not set
606# CONFIG_SENSORS_W83781D is not set
607# CONFIG_SENSORS_W83791D is not set
608# CONFIG_SENSORS_W83792D is not set
609# CONFIG_SENSORS_W83793 is not set
610# CONFIG_SENSORS_W83L785TS is not set
611# CONFIG_SENSORS_W83627HF is not set
612# CONFIG_SENSORS_W83627EHF is not set
613# CONFIG_HWMON_DEBUG_CHIP is not set
614CONFIG_WATCHDOG=y
615# CONFIG_WATCHDOG_NOWAYOUT is not set
616
617#
618# Watchdog Device Drivers
619#
620# CONFIG_SOFT_WATCHDOG is not set
621CONFIG_83xx_WDT=y
622
623#
624# Sonics Silicon Backplane
625#
626CONFIG_SSB_POSSIBLE=y
627# CONFIG_SSB is not set
628
629#
630# Multifunction device drivers
631#
632# CONFIG_MFD_SM501 is not set
633
634#
635# Multimedia devices
636#
637# CONFIG_VIDEO_DEV is not set
638# CONFIG_DVB_CORE is not set
639CONFIG_DAB=y
640
641#
642# Graphics support
643#
644# CONFIG_VGASTATE is not set
645CONFIG_VIDEO_OUTPUT_CONTROL=m
646# CONFIG_FB is not set
647# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
648
649#
650# Display device support
651#
652# CONFIG_DISPLAY_SUPPORT is not set
653
654#
655# Sound
656#
657# CONFIG_SOUND is not set
658CONFIG_HID_SUPPORT=y
659CONFIG_HID=y
660# CONFIG_HID_DEBUG is not set
661# CONFIG_HIDRAW is not set
662CONFIG_USB_SUPPORT=y
663CONFIG_USB_ARCH_HAS_HCD=y
664# CONFIG_USB_ARCH_HAS_OHCI is not set
665CONFIG_USB_ARCH_HAS_EHCI=y
666# CONFIG_USB is not set
667
668#
669# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
670#
671
672#
673# USB Gadget Support
674#
675# CONFIG_USB_GADGET is not set
676# CONFIG_MMC is not set
677# CONFIG_NEW_LEDS is not set
678# CONFIG_EDAC is not set
679# CONFIG_RTC_CLASS is not set
680
681#
682# Userspace I/O
683#
684# CONFIG_UIO is not set
685
686#
687# File systems
688#
689CONFIG_EXT2_FS=y
690# CONFIG_EXT2_FS_XATTR is not set
691# CONFIG_EXT2_FS_XIP is not set
692CONFIG_EXT3_FS=y
693CONFIG_EXT3_FS_XATTR=y
694# CONFIG_EXT3_FS_POSIX_ACL is not set
695# CONFIG_EXT3_FS_SECURITY is not set
696# CONFIG_EXT4DEV_FS is not set
697CONFIG_JBD=y
698CONFIG_FS_MBCACHE=y
699# CONFIG_REISERFS_FS is not set
700# CONFIG_JFS_FS is not set
701# CONFIG_FS_POSIX_ACL is not set
702# CONFIG_XFS_FS is not set
703# CONFIG_GFS2_FS is not set
704# CONFIG_OCFS2_FS is not set
705# CONFIG_MINIX_FS is not set
706# CONFIG_ROMFS_FS is not set
707CONFIG_INOTIFY=y
708CONFIG_INOTIFY_USER=y
709# CONFIG_QUOTA is not set
710CONFIG_DNOTIFY=y
711# CONFIG_AUTOFS_FS is not set
712# CONFIG_AUTOFS4_FS is not set
713# CONFIG_FUSE_FS is not set
714
715#
716# CD-ROM/DVD Filesystems
717#
718# CONFIG_ISO9660_FS is not set
719# CONFIG_UDF_FS is not set
720
721#
722# DOS/FAT/NT Filesystems
723#
724# CONFIG_MSDOS_FS is not set
725# CONFIG_VFAT_FS is not set
726# CONFIG_NTFS_FS is not set
727
728#
729# Pseudo filesystems
730#
731CONFIG_PROC_FS=y
732CONFIG_PROC_KCORE=y
733CONFIG_PROC_SYSCTL=y
734CONFIG_SYSFS=y
735CONFIG_TMPFS=y
736# CONFIG_TMPFS_POSIX_ACL is not set
737# CONFIG_HUGETLB_PAGE is not set
738# CONFIG_CONFIGFS_FS is not set
739
740#
741# Miscellaneous filesystems
742#
743# CONFIG_ADFS_FS is not set
744# CONFIG_AFFS_FS is not set
745# CONFIG_HFS_FS is not set
746# CONFIG_HFSPLUS_FS is not set
747# CONFIG_BEFS_FS is not set
748# CONFIG_BFS_FS is not set
749# CONFIG_EFS_FS is not set
750# CONFIG_CRAMFS is not set
751# CONFIG_VXFS_FS is not set
752# CONFIG_HPFS_FS is not set
753# CONFIG_QNX4FS_FS is not set
754# CONFIG_SYSV_FS is not set
755# CONFIG_UFS_FS is not set
756CONFIG_NETWORK_FILESYSTEMS=y
757CONFIG_NFS_FS=y
758CONFIG_NFS_V3=y
759# CONFIG_NFS_V3_ACL is not set
760CONFIG_NFS_V4=y
761# CONFIG_NFS_DIRECTIO is not set
762# CONFIG_NFSD is not set
763CONFIG_ROOT_NFS=y
764CONFIG_LOCKD=y
765CONFIG_LOCKD_V4=y
766CONFIG_NFS_COMMON=y
767CONFIG_SUNRPC=y
768CONFIG_SUNRPC_GSS=y
769# CONFIG_SUNRPC_BIND34 is not set
770CONFIG_RPCSEC_GSS_KRB5=y
771# CONFIG_RPCSEC_GSS_SPKM3 is not set
772# CONFIG_SMB_FS is not set
773# CONFIG_CIFS is not set
774# CONFIG_NCP_FS is not set
775# CONFIG_CODA_FS is not set
776# CONFIG_AFS_FS is not set
777
778#
779# Partition Types
780#
781CONFIG_PARTITION_ADVANCED=y
782# CONFIG_ACORN_PARTITION is not set
783# CONFIG_OSF_PARTITION is not set
784# CONFIG_AMIGA_PARTITION is not set
785# CONFIG_ATARI_PARTITION is not set
786# CONFIG_MAC_PARTITION is not set
787CONFIG_MSDOS_PARTITION=y
788# CONFIG_BSD_DISKLABEL is not set
789# CONFIG_MINIX_SUBPARTITION is not set
790# CONFIG_SOLARIS_X86_PARTITION is not set
791# CONFIG_UNIXWARE_DISKLABEL is not set
792# CONFIG_LDM_PARTITION is not set
793# CONFIG_SGI_PARTITION is not set
794# CONFIG_ULTRIX_PARTITION is not set
795# CONFIG_SUN_PARTITION is not set
796# CONFIG_KARMA_PARTITION is not set
797# CONFIG_EFI_PARTITION is not set
798# CONFIG_SYSV68_PARTITION is not set
799# CONFIG_NLS is not set
800# CONFIG_DLM is not set
801
802#
803# Library routines
804#
805CONFIG_BITREVERSE=y
806# CONFIG_CRC_CCITT is not set
807# CONFIG_CRC16 is not set
808# CONFIG_CRC_ITU_T is not set
809CONFIG_CRC32=y
810# CONFIG_CRC7 is not set
811# CONFIG_LIBCRC32C is not set
812CONFIG_PLIST=y
813CONFIG_HAS_IOMEM=y
814CONFIG_HAS_IOPORT=y
815CONFIG_HAS_DMA=y
816CONFIG_INSTRUMENTATION=y
817# CONFIG_PROFILING is not set
818# CONFIG_KPROBES is not set
819# CONFIG_MARKERS is not set
820
821#
822# Kernel hacking
823#
824# CONFIG_PRINTK_TIME is not set
825CONFIG_ENABLE_WARN_DEPRECATED=y
826# CONFIG_ENABLE_MUST_CHECK is not set
827# CONFIG_MAGIC_SYSRQ is not set
828# CONFIG_UNUSED_SYMBOLS is not set
829# CONFIG_DEBUG_FS is not set
830# CONFIG_HEADERS_CHECK is not set
831# CONFIG_DEBUG_KERNEL is not set
832# CONFIG_DEBUG_BUGVERBOSE is not set
833# CONFIG_SAMPLES is not set
834# CONFIG_PPC_EARLY_DEBUG is not set
835
836#
837# Security options
838#
839# CONFIG_KEYS is not set
840# CONFIG_SECURITY is not set
841# CONFIG_SECURITY_FILE_CAPABILITIES is not set
842CONFIG_XOR_BLOCKS=y
843CONFIG_ASYNC_CORE=y
844CONFIG_ASYNC_MEMCPY=y
845CONFIG_ASYNC_XOR=y
846CONFIG_CRYPTO=y
847CONFIG_CRYPTO_ALGAPI=y
848CONFIG_CRYPTO_BLKCIPHER=y
849CONFIG_CRYPTO_MANAGER=y
850# CONFIG_CRYPTO_HMAC is not set
851# CONFIG_CRYPTO_XCBC is not set
852# CONFIG_CRYPTO_NULL is not set
853# CONFIG_CRYPTO_MD4 is not set
854CONFIG_CRYPTO_MD5=y
855# CONFIG_CRYPTO_SHA1 is not set
856# CONFIG_CRYPTO_SHA256 is not set
857# CONFIG_CRYPTO_SHA512 is not set
858# CONFIG_CRYPTO_WP512 is not set
859# CONFIG_CRYPTO_TGR192 is not set
860# CONFIG_CRYPTO_GF128MUL is not set
861CONFIG_CRYPTO_ECB=m
862CONFIG_CRYPTO_CBC=y
863CONFIG_CRYPTO_PCBC=m
864# CONFIG_CRYPTO_LRW is not set
865# CONFIG_CRYPTO_XTS is not set
866# CONFIG_CRYPTO_CRYPTD is not set
867CONFIG_CRYPTO_DES=y
868# CONFIG_CRYPTO_FCRYPT is not set
869# CONFIG_CRYPTO_BLOWFISH is not set
870# CONFIG_CRYPTO_TWOFISH is not set
871# CONFIG_CRYPTO_SERPENT is not set
872# CONFIG_CRYPTO_AES is not set
873# CONFIG_CRYPTO_CAST5 is not set
874# CONFIG_CRYPTO_CAST6 is not set
875# CONFIG_CRYPTO_TEA is not set
876# CONFIG_CRYPTO_ARC4 is not set
877# CONFIG_CRYPTO_KHAZAD is not set
878# CONFIG_CRYPTO_ANUBIS is not set
879# CONFIG_CRYPTO_SEED is not set
880# CONFIG_CRYPTO_DEFLATE is not set
881# CONFIG_CRYPTO_MICHAEL_MIC is not set
882# CONFIG_CRYPTO_CRC32C is not set
883# CONFIG_CRYPTO_CAMELLIA is not set
884# CONFIG_CRYPTO_TEST is not set
885# CONFIG_CRYPTO_AUTHENC is not set
886CONFIG_CRYPTO_HW=y
887# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/mpc83xx_defconfig
new file mode 100644
index 000000000000..31bdbf3f7566
--- /dev/null
+++ b/arch/powerpc/configs/mpc83xx_defconfig
@@ -0,0 +1,887 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc8
4# Mon Jan 28 13:14:19 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_PPC_STD_MMU=y
19CONFIG_PPC_STD_MMU_32=y
20# CONFIG_PPC_MM_SLICES is not set
21# CONFIG_SMP is not set
22CONFIG_PPC32=y
23CONFIG_WORD_SIZE=32
24CONFIG_PPC_MERGE=y
25CONFIG_MMU=y
26CONFIG_GENERIC_CMOS_UPDATE=y
27CONFIG_GENERIC_TIME=y
28CONFIG_GENERIC_TIME_VSYSCALL=y
29CONFIG_GENERIC_CLOCKEVENTS=y
30CONFIG_GENERIC_HARDIRQS=y
31CONFIG_IRQ_PER_CPU=y
32CONFIG_RWSEM_XCHGADD_ALGORITHM=y
33CONFIG_ARCH_HAS_ILOG2_U32=y
34CONFIG_GENERIC_HWEIGHT=y
35CONFIG_GENERIC_CALIBRATE_DELAY=y
36CONFIG_GENERIC_FIND_NEXT_BIT=y
37# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
38CONFIG_PPC=y
39CONFIG_EARLY_PRINTK=y
40CONFIG_GENERIC_NVRAM=y
41CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
42CONFIG_ARCH_MAY_HAVE_PC_FDC=y
43CONFIG_PPC_OF=y
44CONFIG_OF=y
45CONFIG_PPC_UDBG_16550=y
46# CONFIG_GENERIC_TBSYNC is not set
47CONFIG_AUDIT_ARCH=y
48CONFIG_GENERIC_BUG=y
49CONFIG_DEFAULT_UIMAGE=y
50# CONFIG_PPC_DCR_NATIVE is not set
51# CONFIG_PPC_DCR_MMIO is not set
52CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
53
54#
55# General setup
56#
57CONFIG_EXPERIMENTAL=y
58CONFIG_BROKEN_ON_SMP=y
59CONFIG_INIT_ENV_ARG_LIMIT=32
60CONFIG_LOCALVERSION=""
61CONFIG_LOCALVERSION_AUTO=y
62CONFIG_SWAP=y
63CONFIG_SYSVIPC=y
64CONFIG_SYSVIPC_SYSCTL=y
65# CONFIG_POSIX_MQUEUE is not set
66# CONFIG_BSD_PROCESS_ACCT is not set
67# CONFIG_TASKSTATS is not set
68# CONFIG_USER_NS is not set
69# CONFIG_PID_NS is not set
70# CONFIG_AUDIT is not set
71# CONFIG_IKCONFIG is not set
72CONFIG_LOG_BUF_SHIFT=14
73# CONFIG_CGROUPS is not set
74CONFIG_FAIR_GROUP_SCHED=y
75CONFIG_FAIR_USER_SCHED=y
76# CONFIG_FAIR_CGROUP_SCHED is not set
77CONFIG_SYSFS_DEPRECATED=y
78# CONFIG_RELAY is not set
79CONFIG_BLK_DEV_INITRD=y
80CONFIG_INITRAMFS_SOURCE=""
81# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
82CONFIG_SYSCTL=y
83CONFIG_EMBEDDED=y
84CONFIG_SYSCTL_SYSCALL=y
85CONFIG_KALLSYMS=y
86# CONFIG_KALLSYMS_EXTRA_PASS is not set
87CONFIG_HOTPLUG=y
88CONFIG_PRINTK=y
89CONFIG_BUG=y
90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
94# CONFIG_EPOLL is not set
95CONFIG_SIGNALFD=y
96CONFIG_EVENTFD=y
97CONFIG_SHMEM=y
98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
102CONFIG_SLABINFO=y
103CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0
106CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set
109# CONFIG_MODVERSIONS is not set
110# CONFIG_MODULE_SRCVERSION_ALL is not set
111# CONFIG_KMOD is not set
112CONFIG_BLOCK=y
113# CONFIG_LBD is not set
114# CONFIG_BLK_DEV_IO_TRACE is not set
115# CONFIG_LSF is not set
116# CONFIG_BLK_DEV_BSG is not set
117
118#
119# IO Schedulers
120#
121CONFIG_IOSCHED_NOOP=y
122CONFIG_IOSCHED_AS=y
123CONFIG_IOSCHED_DEADLINE=y
124CONFIG_IOSCHED_CFQ=y
125CONFIG_DEFAULT_AS=y
126# CONFIG_DEFAULT_DEADLINE is not set
127# CONFIG_DEFAULT_CFQ is not set
128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory"
130
131#
132# Platform support
133#
134# CONFIG_PPC_MULTIPLATFORM is not set
135# CONFIG_PPC_82xx is not set
136CONFIG_PPC_83xx=y
137# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143CONFIG_MPC83xx=y
144CONFIG_MPC831x_RDB=y
145CONFIG_MPC832x_MDS=y
146CONFIG_MPC832x_RDB=y
147CONFIG_MPC834x_MDS=y
148CONFIG_MPC834x_ITX=y
149CONFIG_MPC836x_MDS=y
150CONFIG_MPC837x_MDS=y
151CONFIG_MPC837x_RDB=y
152CONFIG_SBC834x=y
153CONFIG_PPC_MPC831x=y
154CONFIG_PPC_MPC832x=y
155CONFIG_PPC_MPC834x=y
156CONFIG_PPC_MPC837x=y
157CONFIG_IPIC=y
158# CONFIG_MPIC is not set
159# CONFIG_MPIC_WEIRD is not set
160# CONFIG_PPC_I8259 is not set
161# CONFIG_PPC_RTAS is not set
162# CONFIG_MMIO_NVRAM is not set
163# CONFIG_PPC_MPC106 is not set
164# CONFIG_PPC_970_NAP is not set
165# CONFIG_PPC_INDIRECT_IO is not set
166# CONFIG_GENERIC_IOMAP is not set
167# CONFIG_CPU_FREQ is not set
168CONFIG_QUICC_ENGINE=y
169# CONFIG_FSL_ULI1575 is not set
170
171#
172# Kernel options
173#
174# CONFIG_HIGHMEM is not set
175# CONFIG_TICK_ONESHOT is not set
176# CONFIG_NO_HZ is not set
177# CONFIG_HIGH_RES_TIMERS is not set
178CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
179# CONFIG_HZ_100 is not set
180CONFIG_HZ_250=y
181# CONFIG_HZ_300 is not set
182# CONFIG_HZ_1000 is not set
183CONFIG_HZ=250
184CONFIG_PREEMPT_NONE=y
185# CONFIG_PREEMPT_VOLUNTARY is not set
186# CONFIG_PREEMPT is not set
187CONFIG_BINFMT_ELF=y
188# CONFIG_BINFMT_MISC is not set
189# CONFIG_MATH_EMULATION is not set
190CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
191CONFIG_ARCH_FLATMEM_ENABLE=y
192CONFIG_ARCH_POPULATES_NODE_MAP=y
193CONFIG_SELECT_MEMORY_MODEL=y
194CONFIG_FLATMEM_MANUAL=y
195# CONFIG_DISCONTIGMEM_MANUAL is not set
196# CONFIG_SPARSEMEM_MANUAL is not set
197CONFIG_FLATMEM=y
198CONFIG_FLAT_NODE_MEM_MAP=y
199# CONFIG_SPARSEMEM_STATIC is not set
200# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
201CONFIG_SPLIT_PTLOCK_CPUS=4
202# CONFIG_RESOURCES_64BIT is not set
203CONFIG_ZONE_DMA_FLAG=1
204CONFIG_BOUNCE=y
205CONFIG_VIRT_TO_BUS=y
206CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set
208# CONFIG_PM is not set
209CONFIG_SUSPEND_UP_POSSIBLE=y
210CONFIG_HIBERNATION_UP_POSSIBLE=y
211CONFIG_SECCOMP=y
212CONFIG_WANT_DEVICE_TREE=y
213CONFIG_DEVICE_TREE=""
214CONFIG_ISA_DMA_API=y
215
216#
217# Bus options
218#
219CONFIG_ZONE_DMA=y
220CONFIG_GENERIC_ISA_DMA=y
221CONFIG_PPC_INDIRECT_PCI=y
222CONFIG_FSL_SOC=y
223# CONFIG_PCI is not set
224# CONFIG_PCI_DOMAINS is not set
225# CONFIG_PCI_SYSCALL is not set
226# CONFIG_ARCH_SUPPORTS_MSI is not set
227# CONFIG_PCCARD is not set
228
229#
230# Advanced setup
231#
232# CONFIG_ADVANCED_OPTIONS is not set
233
234#
235# Default settings for advanced configuration options are used
236#
237CONFIG_HIGHMEM_START=0xfe000000
238CONFIG_LOWMEM_SIZE=0x30000000
239CONFIG_KERNEL_START=0xc0000000
240CONFIG_TASK_SIZE=0xc0000000
241CONFIG_BOOT_LOAD=0x00800000
242
243#
244# Networking
245#
246CONFIG_NET=y
247
248#
249# Networking options
250#
251CONFIG_PACKET=y
252# CONFIG_PACKET_MMAP is not set
253CONFIG_UNIX=y
254CONFIG_XFRM=y
255CONFIG_XFRM_USER=m
256# CONFIG_XFRM_SUB_POLICY is not set
257# CONFIG_XFRM_MIGRATE is not set
258# CONFIG_NET_KEY is not set
259CONFIG_INET=y
260CONFIG_IP_MULTICAST=y
261# CONFIG_IP_ADVANCED_ROUTER is not set
262CONFIG_IP_FIB_HASH=y
263CONFIG_IP_PNP=y
264CONFIG_IP_PNP_DHCP=y
265CONFIG_IP_PNP_BOOTP=y
266# CONFIG_IP_PNP_RARP is not set
267# CONFIG_NET_IPIP is not set
268# CONFIG_NET_IPGRE is not set
269# CONFIG_IP_MROUTE is not set
270# CONFIG_ARPD is not set
271CONFIG_SYN_COOKIES=y
272# CONFIG_INET_AH is not set
273# CONFIG_INET_ESP is not set
274# CONFIG_INET_IPCOMP is not set
275# CONFIG_INET_XFRM_TUNNEL is not set
276# CONFIG_INET_TUNNEL is not set
277CONFIG_INET_XFRM_MODE_TRANSPORT=y
278CONFIG_INET_XFRM_MODE_TUNNEL=y
279CONFIG_INET_XFRM_MODE_BEET=y
280# CONFIG_INET_LRO is not set
281CONFIG_INET_DIAG=y
282CONFIG_INET_TCP_DIAG=y
283# CONFIG_TCP_CONG_ADVANCED is not set
284CONFIG_TCP_CONG_CUBIC=y
285CONFIG_DEFAULT_TCP_CONG="cubic"
286# CONFIG_TCP_MD5SIG is not set
287# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set
289# CONFIG_INET6_TUNNEL is not set
290# CONFIG_NETWORK_SECMARK is not set
291# CONFIG_NETFILTER is not set
292# CONFIG_IP_DCCP is not set
293# CONFIG_IP_SCTP is not set
294# CONFIG_TIPC is not set
295# CONFIG_ATM is not set
296# CONFIG_BRIDGE is not set
297# CONFIG_VLAN_8021Q is not set
298# CONFIG_DECNET is not set
299# CONFIG_LLC2 is not set
300# CONFIG_IPX is not set
301# CONFIG_ATALK is not set
302# CONFIG_X25 is not set
303# CONFIG_LAPB is not set
304# CONFIG_ECONET is not set
305# CONFIG_WAN_ROUTER is not set
306# CONFIG_NET_SCHED is not set
307
308#
309# Network testing
310#
311# CONFIG_NET_PKTGEN is not set
312# CONFIG_HAMRADIO is not set
313# CONFIG_IRDA is not set
314# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set
316
317#
318# Wireless
319#
320# CONFIG_CFG80211 is not set
321# CONFIG_WIRELESS_EXT is not set
322# CONFIG_MAC80211 is not set
323# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set
325# CONFIG_NET_9P is not set
326
327#
328# Device Drivers
329#
330
331#
332# Generic Driver Options
333#
334CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
335CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y
337# CONFIG_FW_LOADER is not set
338# CONFIG_SYS_HYPERVISOR is not set
339# CONFIG_CONNECTOR is not set
340# CONFIG_MTD is not set
341CONFIG_OF_DEVICE=y
342# CONFIG_PARPORT is not set
343CONFIG_BLK_DEV=y
344# CONFIG_BLK_DEV_FD is not set
345# CONFIG_BLK_DEV_COW_COMMON is not set
346CONFIG_BLK_DEV_LOOP=y
347# CONFIG_BLK_DEV_CRYPTOLOOP is not set
348# CONFIG_BLK_DEV_NBD is not set
349CONFIG_BLK_DEV_RAM=y
350CONFIG_BLK_DEV_RAM_COUNT=16
351CONFIG_BLK_DEV_RAM_SIZE=32768
352CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
353# CONFIG_CDROM_PKTCDVD is not set
354# CONFIG_ATA_OVER_ETH is not set
355CONFIG_MISC_DEVICES=y
356# CONFIG_EEPROM_93CX6 is not set
357# CONFIG_IDE is not set
358
359#
360# SCSI device support
361#
362# CONFIG_RAID_ATTRS is not set
363CONFIG_SCSI=y
364CONFIG_SCSI_DMA=y
365# CONFIG_SCSI_TGT is not set
366# CONFIG_SCSI_NETLINK is not set
367CONFIG_SCSI_PROC_FS=y
368
369#
370# SCSI support type (disk, tape, CD-ROM)
371#
372CONFIG_BLK_DEV_SD=y
373# CONFIG_CHR_DEV_ST is not set
374# CONFIG_CHR_DEV_OSST is not set
375# CONFIG_BLK_DEV_SR is not set
376CONFIG_CHR_DEV_SG=y
377# CONFIG_CHR_DEV_SCH is not set
378
379#
380# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
381#
382# CONFIG_SCSI_MULTI_LUN is not set
383# CONFIG_SCSI_CONSTANTS is not set
384# CONFIG_SCSI_LOGGING is not set
385# CONFIG_SCSI_SCAN_ASYNC is not set
386CONFIG_SCSI_WAIT_SCAN=m
387
388#
389# SCSI Transports
390#
391# CONFIG_SCSI_SPI_ATTRS is not set
392# CONFIG_SCSI_FC_ATTRS is not set
393# CONFIG_SCSI_ISCSI_ATTRS is not set
394# CONFIG_SCSI_SAS_LIBSAS is not set
395# CONFIG_SCSI_SRP_ATTRS is not set
396CONFIG_SCSI_LOWLEVEL=y
397# CONFIG_ISCSI_TCP is not set
398# CONFIG_SCSI_DEBUG is not set
399CONFIG_ATA=y
400# CONFIG_ATA_NONSTANDARD is not set
401CONFIG_SATA_FSL=y
402# CONFIG_PATA_PLATFORM is not set
403# CONFIG_MD is not set
404# CONFIG_MACINTOSH_DRIVERS is not set
405CONFIG_NETDEVICES=y
406# CONFIG_NETDEVICES_MULTIQUEUE is not set
407# CONFIG_DUMMY is not set
408# CONFIG_BONDING is not set
409# CONFIG_MACVLAN is not set
410# CONFIG_EQUALIZER is not set
411# CONFIG_TUN is not set
412# CONFIG_VETH is not set
413CONFIG_PHYLIB=y
414
415#
416# MII PHY device drivers
417#
418CONFIG_MARVELL_PHY=y
419# CONFIG_DAVICOM_PHY is not set
420# CONFIG_QSEMI_PHY is not set
421# CONFIG_LXT_PHY is not set
422# CONFIG_CICADA_PHY is not set
423# CONFIG_VITESSE_PHY is not set
424# CONFIG_SMSC_PHY is not set
425# CONFIG_BROADCOM_PHY is not set
426# CONFIG_ICPLUS_PHY is not set
427# CONFIG_FIXED_PHY is not set
428# CONFIG_MDIO_BITBANG is not set
429CONFIG_NET_ETHERNET=y
430CONFIG_MII=y
431# CONFIG_IBM_NEW_EMAC_ZMII is not set
432# CONFIG_IBM_NEW_EMAC_RGMII is not set
433# CONFIG_IBM_NEW_EMAC_TAH is not set
434# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
435# CONFIG_B44 is not set
436CONFIG_NETDEV_1000=y
437CONFIG_GIANFAR=y
438# CONFIG_GFAR_NAPI is not set
439# CONFIG_UCC_GETH is not set
440CONFIG_NETDEV_10000=y
441
442#
443# Wireless LAN
444#
445# CONFIG_WLAN_PRE80211 is not set
446# CONFIG_WLAN_80211 is not set
447# CONFIG_WAN is not set
448# CONFIG_PPP is not set
449# CONFIG_SLIP is not set
450# CONFIG_SHAPER is not set
451# CONFIG_NETCONSOLE is not set
452# CONFIG_NETPOLL is not set
453# CONFIG_NET_POLL_CONTROLLER is not set
454# CONFIG_ISDN is not set
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# CONFIG_INPUT_POLLDEV is not set
463
464#
465# Userland interfaces
466#
467# CONFIG_INPUT_MOUSEDEV is not set
468# CONFIG_INPUT_JOYDEV is not set
469# CONFIG_INPUT_EVDEV is not set
470# CONFIG_INPUT_EVBUG is not set
471
472#
473# Input Device Drivers
474#
475# CONFIG_INPUT_KEYBOARD is not set
476# CONFIG_INPUT_MOUSE is not set
477# CONFIG_INPUT_JOYSTICK is not set
478# CONFIG_INPUT_TABLET is not set
479# CONFIG_INPUT_TOUCHSCREEN is not set
480# CONFIG_INPUT_MISC is not set
481
482#
483# Hardware I/O ports
484#
485# CONFIG_SERIO is not set
486# CONFIG_GAMEPORT is not set
487
488#
489# Character devices
490#
491# CONFIG_VT is not set
492# CONFIG_SERIAL_NONSTANDARD is not set
493
494#
495# Serial drivers
496#
497CONFIG_SERIAL_8250=y
498CONFIG_SERIAL_8250_CONSOLE=y
499CONFIG_SERIAL_8250_NR_UARTS=4
500CONFIG_SERIAL_8250_RUNTIME_UARTS=4
501# CONFIG_SERIAL_8250_EXTENDED is not set
502
503#
504# Non-8250 serial port support
505#
506# CONFIG_SERIAL_UARTLITE is not set
507CONFIG_SERIAL_CORE=y
508CONFIG_SERIAL_CORE_CONSOLE=y
509# CONFIG_SERIAL_OF_PLATFORM is not set
510# CONFIG_SERIAL_QE is not set
511CONFIG_UNIX98_PTYS=y
512CONFIG_LEGACY_PTYS=y
513CONFIG_LEGACY_PTY_COUNT=256
514# CONFIG_IPMI_HANDLER is not set
515# CONFIG_HW_RANDOM is not set
516# CONFIG_NVRAM is not set
517CONFIG_GEN_RTC=y
518# CONFIG_GEN_RTC_X is not set
519# CONFIG_R3964 is not set
520# CONFIG_RAW_DRIVER is not set
521# CONFIG_TCG_TPM is not set
522CONFIG_I2C=y
523CONFIG_I2C_BOARDINFO=y
524CONFIG_I2C_CHARDEV=y
525
526#
527# I2C Algorithms
528#
529# CONFIG_I2C_ALGOBIT is not set
530# CONFIG_I2C_ALGOPCF is not set
531# CONFIG_I2C_ALGOPCA is not set
532
533#
534# I2C Hardware Bus support
535#
536CONFIG_I2C_MPC=y
537# CONFIG_I2C_OCORES is not set
538# CONFIG_I2C_PARPORT_LIGHT is not set
539# CONFIG_I2C_SIMTEC is not set
540# CONFIG_I2C_TAOS_EVM is not set
541# CONFIG_I2C_STUB is not set
542
543#
544# Miscellaneous I2C Chip support
545#
546# CONFIG_SENSORS_DS1337 is not set
547# CONFIG_SENSORS_DS1374 is not set
548# CONFIG_DS1682 is not set
549# CONFIG_SENSORS_EEPROM is not set
550# CONFIG_SENSORS_PCF8574 is not set
551# CONFIG_SENSORS_PCA9539 is not set
552# CONFIG_SENSORS_PCF8591 is not set
553# CONFIG_SENSORS_M41T00 is not set
554# CONFIG_SENSORS_MAX6875 is not set
555# CONFIG_SENSORS_TSL2550 is not set
556# CONFIG_I2C_DEBUG_CORE is not set
557# CONFIG_I2C_DEBUG_ALGO is not set
558# CONFIG_I2C_DEBUG_BUS is not set
559# CONFIG_I2C_DEBUG_CHIP is not set
560
561#
562# SPI support
563#
564# CONFIG_SPI is not set
565# CONFIG_SPI_MASTER is not set
566# CONFIG_W1 is not set
567# CONFIG_POWER_SUPPLY is not set
568CONFIG_HWMON=y
569# CONFIG_HWMON_VID is not set
570# CONFIG_SENSORS_AD7418 is not set
571# CONFIG_SENSORS_ADM1021 is not set
572# CONFIG_SENSORS_ADM1025 is not set
573# CONFIG_SENSORS_ADM1026 is not set
574# CONFIG_SENSORS_ADM1029 is not set
575# CONFIG_SENSORS_ADM1031 is not set
576# CONFIG_SENSORS_ADM9240 is not set
577# CONFIG_SENSORS_ADT7470 is not set
578# CONFIG_SENSORS_ATXP1 is not set
579# CONFIG_SENSORS_DS1621 is not set
580# CONFIG_SENSORS_F71805F is not set
581# CONFIG_SENSORS_F71882FG is not set
582# CONFIG_SENSORS_F75375S is not set
583# CONFIG_SENSORS_GL518SM is not set
584# CONFIG_SENSORS_GL520SM is not set
585# CONFIG_SENSORS_IT87 is not set
586# CONFIG_SENSORS_LM63 is not set
587# CONFIG_SENSORS_LM75 is not set
588# CONFIG_SENSORS_LM77 is not set
589# CONFIG_SENSORS_LM78 is not set
590# CONFIG_SENSORS_LM80 is not set
591# CONFIG_SENSORS_LM83 is not set
592# CONFIG_SENSORS_LM85 is not set
593# CONFIG_SENSORS_LM87 is not set
594# CONFIG_SENSORS_LM90 is not set
595# CONFIG_SENSORS_LM92 is not set
596# CONFIG_SENSORS_LM93 is not set
597# CONFIG_SENSORS_MAX1619 is not set
598# CONFIG_SENSORS_MAX6650 is not set
599# CONFIG_SENSORS_PC87360 is not set
600# CONFIG_SENSORS_PC87427 is not set
601# CONFIG_SENSORS_DME1737 is not set
602# CONFIG_SENSORS_SMSC47M1 is not set
603# CONFIG_SENSORS_SMSC47M192 is not set
604# CONFIG_SENSORS_SMSC47B397 is not set
605# CONFIG_SENSORS_THMC50 is not set
606# CONFIG_SENSORS_VT1211 is not set
607# CONFIG_SENSORS_W83781D is not set
608# CONFIG_SENSORS_W83791D is not set
609# CONFIG_SENSORS_W83792D is not set
610# CONFIG_SENSORS_W83793 is not set
611# CONFIG_SENSORS_W83L785TS is not set
612# CONFIG_SENSORS_W83627HF is not set
613# CONFIG_SENSORS_W83627EHF is not set
614# CONFIG_HWMON_DEBUG_CHIP is not set
615CONFIG_WATCHDOG=y
616# CONFIG_WATCHDOG_NOWAYOUT is not set
617
618#
619# Watchdog Device Drivers
620#
621# CONFIG_SOFT_WATCHDOG is not set
622CONFIG_83xx_WDT=y
623
624#
625# Sonics Silicon Backplane
626#
627CONFIG_SSB_POSSIBLE=y
628# CONFIG_SSB is not set
629
630#
631# Multifunction device drivers
632#
633# CONFIG_MFD_SM501 is not set
634
635#
636# Multimedia devices
637#
638# CONFIG_VIDEO_DEV is not set
639# CONFIG_DVB_CORE is not set
640CONFIG_DAB=y
641
642#
643# Graphics support
644#
645# CONFIG_VGASTATE is not set
646CONFIG_VIDEO_OUTPUT_CONTROL=m
647# CONFIG_FB is not set
648# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
649
650#
651# Display device support
652#
653# CONFIG_DISPLAY_SUPPORT is not set
654
655#
656# Sound
657#
658# CONFIG_SOUND is not set
659CONFIG_HID_SUPPORT=y
660CONFIG_HID=y
661# CONFIG_HID_DEBUG is not set
662# CONFIG_HIDRAW is not set
663CONFIG_USB_SUPPORT=y
664CONFIG_USB_ARCH_HAS_HCD=y
665# CONFIG_USB_ARCH_HAS_OHCI is not set
666CONFIG_USB_ARCH_HAS_EHCI=y
667# CONFIG_USB is not set
668CONFIG_USB_EHCI_ROOT_HUB_TT=y
669CONFIG_USB_EHCI_FSL=y
670
671#
672# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
673#
674
675#
676# USB Gadget Support
677#
678# CONFIG_USB_GADGET is not set
679# CONFIG_MMC is not set
680# CONFIG_NEW_LEDS is not set
681# CONFIG_EDAC is not set
682# CONFIG_RTC_CLASS is not set
683
684#
685# Userspace I/O
686#
687# CONFIG_UIO is not set
688
689#
690# File systems
691#
692CONFIG_EXT2_FS=y
693# CONFIG_EXT2_FS_XATTR is not set
694# CONFIG_EXT2_FS_XIP is not set
695CONFIG_EXT3_FS=y
696CONFIG_EXT3_FS_XATTR=y
697# CONFIG_EXT3_FS_POSIX_ACL is not set
698# CONFIG_EXT3_FS_SECURITY is not set
699# CONFIG_EXT4DEV_FS is not set
700CONFIG_JBD=y
701CONFIG_FS_MBCACHE=y
702# CONFIG_REISERFS_FS is not set
703# CONFIG_JFS_FS is not set
704# CONFIG_FS_POSIX_ACL is not set
705# CONFIG_XFS_FS is not set
706# CONFIG_GFS2_FS is not set
707# CONFIG_OCFS2_FS is not set
708# CONFIG_MINIX_FS is not set
709# CONFIG_ROMFS_FS is not set
710CONFIG_INOTIFY=y
711CONFIG_INOTIFY_USER=y
712# CONFIG_QUOTA is not set
713CONFIG_DNOTIFY=y
714# CONFIG_AUTOFS_FS is not set
715# CONFIG_AUTOFS4_FS is not set
716# CONFIG_FUSE_FS is not set
717
718#
719# CD-ROM/DVD Filesystems
720#
721# CONFIG_ISO9660_FS is not set
722# CONFIG_UDF_FS is not set
723
724#
725# DOS/FAT/NT Filesystems
726#
727# CONFIG_MSDOS_FS is not set
728# CONFIG_VFAT_FS is not set
729# CONFIG_NTFS_FS is not set
730
731#
732# Pseudo filesystems
733#
734CONFIG_PROC_FS=y
735CONFIG_PROC_KCORE=y
736CONFIG_PROC_SYSCTL=y
737CONFIG_SYSFS=y
738CONFIG_TMPFS=y
739# CONFIG_TMPFS_POSIX_ACL is not set
740# CONFIG_HUGETLB_PAGE is not set
741# CONFIG_CONFIGFS_FS is not set
742
743#
744# Miscellaneous filesystems
745#
746# CONFIG_ADFS_FS is not set
747# CONFIG_AFFS_FS is not set
748# CONFIG_HFS_FS is not set
749# CONFIG_HFSPLUS_FS is not set
750# CONFIG_BEFS_FS is not set
751# CONFIG_BFS_FS is not set
752# CONFIG_EFS_FS is not set
753# CONFIG_CRAMFS is not set
754# CONFIG_VXFS_FS is not set
755# CONFIG_HPFS_FS is not set
756# CONFIG_QNX4FS_FS is not set
757# CONFIG_SYSV_FS is not set
758# CONFIG_UFS_FS is not set
759CONFIG_NETWORK_FILESYSTEMS=y
760CONFIG_NFS_FS=y
761CONFIG_NFS_V3=y
762# CONFIG_NFS_V3_ACL is not set
763CONFIG_NFS_V4=y
764# CONFIG_NFS_DIRECTIO is not set
765# CONFIG_NFSD is not set
766CONFIG_ROOT_NFS=y
767CONFIG_LOCKD=y
768CONFIG_LOCKD_V4=y
769CONFIG_NFS_COMMON=y
770CONFIG_SUNRPC=y
771CONFIG_SUNRPC_GSS=y
772# CONFIG_SUNRPC_BIND34 is not set
773CONFIG_RPCSEC_GSS_KRB5=y
774# CONFIG_RPCSEC_GSS_SPKM3 is not set
775# CONFIG_SMB_FS is not set
776# CONFIG_CIFS is not set
777# CONFIG_NCP_FS is not set
778# CONFIG_CODA_FS is not set
779# CONFIG_AFS_FS is not set
780
781#
782# Partition Types
783#
784CONFIG_PARTITION_ADVANCED=y
785# CONFIG_ACORN_PARTITION is not set
786# CONFIG_OSF_PARTITION is not set
787# CONFIG_AMIGA_PARTITION is not set
788# CONFIG_ATARI_PARTITION is not set
789# CONFIG_MAC_PARTITION is not set
790CONFIG_MSDOS_PARTITION=y
791# CONFIG_BSD_DISKLABEL is not set
792# CONFIG_MINIX_SUBPARTITION is not set
793# CONFIG_SOLARIS_X86_PARTITION is not set
794# CONFIG_UNIXWARE_DISKLABEL is not set
795# CONFIG_LDM_PARTITION is not set
796# CONFIG_SGI_PARTITION is not set
797# CONFIG_ULTRIX_PARTITION is not set
798# CONFIG_SUN_PARTITION is not set
799# CONFIG_KARMA_PARTITION is not set
800# CONFIG_EFI_PARTITION is not set
801# CONFIG_SYSV68_PARTITION is not set
802# CONFIG_NLS is not set
803# CONFIG_DLM is not set
804
805#
806# Library routines
807#
808CONFIG_BITREVERSE=y
809# CONFIG_CRC_CCITT is not set
810# CONFIG_CRC16 is not set
811# CONFIG_CRC_ITU_T is not set
812CONFIG_CRC32=y
813# CONFIG_CRC7 is not set
814# CONFIG_LIBCRC32C is not set
815CONFIG_PLIST=y
816CONFIG_HAS_IOMEM=y
817CONFIG_HAS_IOPORT=y
818CONFIG_HAS_DMA=y
819CONFIG_INSTRUMENTATION=y
820# CONFIG_PROFILING is not set
821# CONFIG_KPROBES is not set
822# CONFIG_MARKERS is not set
823
824#
825# Kernel hacking
826#
827# CONFIG_PRINTK_TIME is not set
828CONFIG_ENABLE_WARN_DEPRECATED=y
829CONFIG_ENABLE_MUST_CHECK=y
830# CONFIG_MAGIC_SYSRQ is not set
831# CONFIG_UNUSED_SYMBOLS is not set
832# CONFIG_DEBUG_FS is not set
833# CONFIG_HEADERS_CHECK is not set
834# CONFIG_DEBUG_KERNEL is not set
835# CONFIG_DEBUG_BUGVERBOSE is not set
836# CONFIG_SAMPLES is not set
837# CONFIG_PPC_EARLY_DEBUG is not set
838
839#
840# Security options
841#
842# CONFIG_KEYS is not set
843# CONFIG_SECURITY is not set
844# CONFIG_SECURITY_FILE_CAPABILITIES is not set
845CONFIG_CRYPTO=y
846CONFIG_CRYPTO_ALGAPI=y
847CONFIG_CRYPTO_BLKCIPHER=y
848CONFIG_CRYPTO_MANAGER=y
849# CONFIG_CRYPTO_HMAC is not set
850# CONFIG_CRYPTO_XCBC is not set
851# CONFIG_CRYPTO_NULL is not set
852# CONFIG_CRYPTO_MD4 is not set
853CONFIG_CRYPTO_MD5=y
854# CONFIG_CRYPTO_SHA1 is not set
855# CONFIG_CRYPTO_SHA256 is not set
856# CONFIG_CRYPTO_SHA512 is not set
857# CONFIG_CRYPTO_WP512 is not set
858# CONFIG_CRYPTO_TGR192 is not set
859# CONFIG_CRYPTO_GF128MUL is not set
860CONFIG_CRYPTO_ECB=m
861CONFIG_CRYPTO_CBC=y
862CONFIG_CRYPTO_PCBC=m
863# CONFIG_CRYPTO_LRW is not set
864# CONFIG_CRYPTO_XTS is not set
865# CONFIG_CRYPTO_CRYPTD is not set
866CONFIG_CRYPTO_DES=y
867# CONFIG_CRYPTO_FCRYPT is not set
868# CONFIG_CRYPTO_BLOWFISH is not set
869# CONFIG_CRYPTO_TWOFISH is not set
870# CONFIG_CRYPTO_SERPENT is not set
871# CONFIG_CRYPTO_AES is not set
872# CONFIG_CRYPTO_CAST5 is not set
873# CONFIG_CRYPTO_CAST6 is not set
874# CONFIG_CRYPTO_TEA is not set
875# CONFIG_CRYPTO_ARC4 is not set
876# CONFIG_CRYPTO_KHAZAD is not set
877# CONFIG_CRYPTO_ANUBIS is not set
878# CONFIG_CRYPTO_SEED is not set
879# CONFIG_CRYPTO_DEFLATE is not set
880# CONFIG_CRYPTO_MICHAEL_MIC is not set
881# CONFIG_CRYPTO_CRC32C is not set
882# CONFIG_CRYPTO_CAMELLIA is not set
883# CONFIG_CRYPTO_TEST is not set
884# CONFIG_CRYPTO_AUTHENC is not set
885CONFIG_CRYPTO_HW=y
886# CONFIG_PPC_CLOCK is not set
887CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
new file mode 100644
index 000000000000..90e38ba3832b
--- /dev/null
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -0,0 +1,1523 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc8
4# Mon Jan 28 13:12:07 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_E500=y
18CONFIG_BOOKE=y
19CONFIG_FSL_BOOKE=y
20# CONFIG_PHYS_64BIT is not set
21CONFIG_SPE=y
22# CONFIG_PPC_MM_SLICES is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50CONFIG_DEFAULT_UIMAGE=y
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66CONFIG_POSIX_MQUEUE=y
67CONFIG_BSD_PROCESS_ACCT=y
68# CONFIG_BSD_PROCESS_ACCT_V3 is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
72CONFIG_AUDIT=y
73# CONFIG_AUDITSYSCALL is not set
74CONFIG_IKCONFIG=y
75CONFIG_IKCONFIG_PROC=y
76CONFIG_LOG_BUF_SHIFT=14
77# CONFIG_CGROUPS is not set
78# CONFIG_FAIR_GROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88CONFIG_KALLSYMS_ALL=y
89CONFIG_KALLSYMS_EXTRA_PASS=y
90CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_BASE_FULL=y
95CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y
97CONFIG_EPOLL=y
98CONFIG_SIGNALFD=y
99CONFIG_EVENTFD=y
100CONFIG_SHMEM=y
101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLUB_DEBUG=y
103# CONFIG_SLAB is not set
104CONFIG_SLUB=y
105# CONFIG_SLOB is not set
106CONFIG_SLABINFO=y
107CONFIG_RT_MUTEXES=y
108# CONFIG_TINY_SHMEM is not set
109CONFIG_BASE_SMALL=0
110CONFIG_MODULES=y
111CONFIG_MODULE_UNLOAD=y
112CONFIG_MODULE_FORCE_UNLOAD=y
113CONFIG_MODVERSIONS=y
114# CONFIG_MODULE_SRCVERSION_ALL is not set
115CONFIG_KMOD=y
116CONFIG_BLOCK=y
117CONFIG_LBD=y
118# CONFIG_BLK_DEV_IO_TRACE is not set
119# CONFIG_LSF is not set
120# CONFIG_BLK_DEV_BSG is not set
121
122#
123# IO Schedulers
124#
125CONFIG_IOSCHED_NOOP=y
126CONFIG_IOSCHED_AS=y
127CONFIG_IOSCHED_DEADLINE=y
128CONFIG_IOSCHED_CFQ=y
129# CONFIG_DEFAULT_AS is not set
130# CONFIG_DEFAULT_DEADLINE is not set
131CONFIG_DEFAULT_CFQ=y
132# CONFIG_DEFAULT_NOOP is not set
133CONFIG_DEFAULT_IOSCHED="cfq"
134
135#
136# Platform support
137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143CONFIG_MPC85xx=y
144CONFIG_MPC8540_ADS=y
145CONFIG_MPC8560_ADS=y
146CONFIG_MPC85xx_CDS=y
147CONFIG_MPC85xx_MDS=y
148CONFIG_MPC85xx_DS=y
149# CONFIG_STX_GP3 is not set
150CONFIG_TQM8540=y
151CONFIG_TQM8541=y
152CONFIG_TQM8555=y
153CONFIG_TQM8560=y
154CONFIG_SBC8548=y
155# CONFIG_SBC8560 is not set
156CONFIG_TQM85xx=y
157# CONFIG_IPIC is not set
158CONFIG_MPIC=y
159# CONFIG_MPIC_WEIRD is not set
160CONFIG_PPC_I8259=y
161# CONFIG_PPC_RTAS is not set
162# CONFIG_MMIO_NVRAM is not set
163# CONFIG_PPC_MPC106 is not set
164# CONFIG_PPC_970_NAP is not set
165# CONFIG_PPC_INDIRECT_IO is not set
166# CONFIG_GENERIC_IOMAP is not set
167# CONFIG_CPU_FREQ is not set
168CONFIG_QUICC_ENGINE=y
169CONFIG_CPM2=y
170CONFIG_PPC_CPM_NEW_BINDING=y
171CONFIG_FSL_ULI1575=y
172CONFIG_CPM=y
173
174#
175# Kernel options
176#
177CONFIG_HIGHMEM=y
178CONFIG_TICK_ONESHOT=y
179CONFIG_NO_HZ=y
180CONFIG_HIGH_RES_TIMERS=y
181CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
182# CONFIG_HZ_100 is not set
183CONFIG_HZ_250=y
184# CONFIG_HZ_300 is not set
185# CONFIG_HZ_1000 is not set
186CONFIG_HZ=250
187CONFIG_PREEMPT_NONE=y
188# CONFIG_PREEMPT_VOLUNTARY is not set
189# CONFIG_PREEMPT is not set
190CONFIG_BINFMT_ELF=y
191CONFIG_BINFMT_MISC=m
192CONFIG_MATH_EMULATION=y
193CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
194CONFIG_ARCH_FLATMEM_ENABLE=y
195CONFIG_ARCH_POPULATES_NODE_MAP=y
196CONFIG_SELECT_MEMORY_MODEL=y
197CONFIG_FLATMEM_MANUAL=y
198# CONFIG_DISCONTIGMEM_MANUAL is not set
199# CONFIG_SPARSEMEM_MANUAL is not set
200CONFIG_FLATMEM=y
201CONFIG_FLAT_NODE_MEM_MAP=y
202# CONFIG_SPARSEMEM_STATIC is not set
203# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
204CONFIG_SPLIT_PTLOCK_CPUS=4
205# CONFIG_RESOURCES_64BIT is not set
206CONFIG_ZONE_DMA_FLAG=1
207CONFIG_BOUNCE=y
208CONFIG_VIRT_TO_BUS=y
209CONFIG_PROC_DEVICETREE=y
210# CONFIG_CMDLINE_BOOL is not set
211# CONFIG_PM is not set
212CONFIG_SUSPEND_UP_POSSIBLE=y
213CONFIG_HIBERNATION_UP_POSSIBLE=y
214CONFIG_SECCOMP=y
215CONFIG_WANT_DEVICE_TREE=y
216CONFIG_DEVICE_TREE=""
217CONFIG_ISA_DMA_API=y
218
219#
220# Bus options
221#
222CONFIG_ZONE_DMA=y
223CONFIG_GENERIC_ISA_DMA=y
224CONFIG_PPC_INDIRECT_PCI=y
225CONFIG_FSL_SOC=y
226CONFIG_FSL_PCI=y
227CONFIG_PCI=y
228CONFIG_PCI_DOMAINS=y
229CONFIG_PCI_SYSCALL=y
230# CONFIG_PCIEPORTBUS is not set
231CONFIG_ARCH_SUPPORTS_MSI=y
232# CONFIG_PCI_MSI is not set
233CONFIG_PCI_LEGACY=y
234# CONFIG_PCI_DEBUG is not set
235# CONFIG_PCCARD is not set
236# CONFIG_HOTPLUG_PCI is not set
237
238#
239# Advanced setup
240#
241# CONFIG_ADVANCED_OPTIONS is not set
242
243#
244# Default settings for advanced configuration options are used
245#
246CONFIG_HIGHMEM_START=0xfe000000
247CONFIG_LOWMEM_SIZE=0x30000000
248CONFIG_KERNEL_START=0xc0000000
249CONFIG_TASK_SIZE=0xc0000000
250CONFIG_BOOT_LOAD=0x00800000
251
252#
253# Networking
254#
255CONFIG_NET=y
256
257#
258# Networking options
259#
260CONFIG_PACKET=y
261# CONFIG_PACKET_MMAP is not set
262CONFIG_UNIX=y
263CONFIG_XFRM=y
264CONFIG_XFRM_USER=y
265# CONFIG_XFRM_SUB_POLICY is not set
266# CONFIG_XFRM_MIGRATE is not set
267CONFIG_NET_KEY=m
268# CONFIG_NET_KEY_MIGRATE is not set
269CONFIG_INET=y
270CONFIG_IP_MULTICAST=y
271CONFIG_IP_ADVANCED_ROUTER=y
272CONFIG_ASK_IP_FIB_HASH=y
273# CONFIG_IP_FIB_TRIE is not set
274CONFIG_IP_FIB_HASH=y
275CONFIG_IP_MULTIPLE_TABLES=y
276CONFIG_IP_ROUTE_MULTIPATH=y
277CONFIG_IP_ROUTE_VERBOSE=y
278CONFIG_IP_PNP=y
279CONFIG_IP_PNP_DHCP=y
280CONFIG_IP_PNP_BOOTP=y
281CONFIG_IP_PNP_RARP=y
282CONFIG_NET_IPIP=y
283CONFIG_NET_IPGRE=y
284CONFIG_NET_IPGRE_BROADCAST=y
285CONFIG_IP_MROUTE=y
286CONFIG_IP_PIMSM_V1=y
287CONFIG_IP_PIMSM_V2=y
288CONFIG_ARPD=y
289# CONFIG_SYN_COOKIES is not set
290# CONFIG_INET_AH is not set
291# CONFIG_INET_ESP is not set
292# CONFIG_INET_IPCOMP is not set
293# CONFIG_INET_XFRM_TUNNEL is not set
294CONFIG_INET_TUNNEL=y
295# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
296# CONFIG_INET_XFRM_MODE_TUNNEL is not set
297# CONFIG_INET_XFRM_MODE_BEET is not set
298# CONFIG_INET_LRO is not set
299CONFIG_INET_DIAG=y
300CONFIG_INET_TCP_DIAG=y
301# CONFIG_TCP_CONG_ADVANCED is not set
302CONFIG_TCP_CONG_CUBIC=y
303CONFIG_DEFAULT_TCP_CONG="cubic"
304# CONFIG_TCP_MD5SIG is not set
305CONFIG_IPV6=y
306# CONFIG_IPV6_PRIVACY is not set
307# CONFIG_IPV6_ROUTER_PREF is not set
308# CONFIG_IPV6_OPTIMISTIC_DAD is not set
309# CONFIG_INET6_AH is not set
310# CONFIG_INET6_ESP is not set
311# CONFIG_INET6_IPCOMP is not set
312# CONFIG_IPV6_MIP6 is not set
313# CONFIG_INET6_XFRM_TUNNEL is not set
314# CONFIG_INET6_TUNNEL is not set
315CONFIG_INET6_XFRM_MODE_TRANSPORT=y
316CONFIG_INET6_XFRM_MODE_TUNNEL=y
317CONFIG_INET6_XFRM_MODE_BEET=y
318# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
319CONFIG_IPV6_SIT=y
320# CONFIG_IPV6_TUNNEL is not set
321# CONFIG_IPV6_MULTIPLE_TABLES is not set
322# CONFIG_NETWORK_SECMARK is not set
323# CONFIG_NETFILTER is not set
324# CONFIG_IP_DCCP is not set
325CONFIG_IP_SCTP=m
326# CONFIG_SCTP_DBG_MSG is not set
327# CONFIG_SCTP_DBG_OBJCNT is not set
328# CONFIG_SCTP_HMAC_NONE is not set
329# CONFIG_SCTP_HMAC_SHA1 is not set
330CONFIG_SCTP_HMAC_MD5=y
331# CONFIG_TIPC is not set
332# CONFIG_ATM is not set
333# CONFIG_BRIDGE is not set
334# CONFIG_VLAN_8021Q is not set
335# CONFIG_DECNET is not set
336# CONFIG_LLC2 is not set
337# CONFIG_IPX is not set
338# CONFIG_ATALK is not set
339# CONFIG_X25 is not set
340# CONFIG_LAPB is not set
341# CONFIG_ECONET is not set
342# CONFIG_WAN_ROUTER is not set
343# CONFIG_NET_SCHED is not set
344
345#
346# Network testing
347#
348# CONFIG_NET_PKTGEN is not set
349# CONFIG_HAMRADIO is not set
350# CONFIG_IRDA is not set
351# CONFIG_BT is not set
352# CONFIG_AF_RXRPC is not set
353CONFIG_FIB_RULES=y
354
355#
356# Wireless
357#
358# CONFIG_CFG80211 is not set
359# CONFIG_WIRELESS_EXT is not set
360# CONFIG_MAC80211 is not set
361# CONFIG_IEEE80211 is not set
362# CONFIG_RFKILL is not set
363# CONFIG_NET_9P is not set
364
365#
366# Device Drivers
367#
368
369#
370# Generic Driver Options
371#
372CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
373CONFIG_STANDALONE=y
374CONFIG_PREVENT_FIRMWARE_BUILD=y
375CONFIG_FW_LOADER=y
376# CONFIG_DEBUG_DRIVER is not set
377# CONFIG_DEBUG_DEVRES is not set
378# CONFIG_SYS_HYPERVISOR is not set
379# CONFIG_CONNECTOR is not set
380# CONFIG_MTD is not set
381CONFIG_OF_DEVICE=y
382# CONFIG_PARPORT is not set
383CONFIG_BLK_DEV=y
384# CONFIG_BLK_DEV_FD is not set
385# CONFIG_BLK_CPQ_DA is not set
386# CONFIG_BLK_CPQ_CISS_DA is not set
387# CONFIG_BLK_DEV_DAC960 is not set
388# CONFIG_BLK_DEV_UMEM is not set
389# CONFIG_BLK_DEV_COW_COMMON is not set
390CONFIG_BLK_DEV_LOOP=y
391# CONFIG_BLK_DEV_CRYPTOLOOP is not set
392CONFIG_BLK_DEV_NBD=y
393# CONFIG_BLK_DEV_SX8 is not set
394# CONFIG_BLK_DEV_UB is not set
395CONFIG_BLK_DEV_RAM=y
396CONFIG_BLK_DEV_RAM_COUNT=16
397CONFIG_BLK_DEV_RAM_SIZE=131072
398CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
399# CONFIG_CDROM_PKTCDVD is not set
400# CONFIG_ATA_OVER_ETH is not set
401CONFIG_MISC_DEVICES=y
402# CONFIG_PHANTOM is not set
403# CONFIG_EEPROM_93CX6 is not set
404# CONFIG_SGI_IOC4 is not set
405# CONFIG_TIFM_CORE is not set
406# CONFIG_IDE is not set
407
408#
409# SCSI device support
410#
411# CONFIG_RAID_ATTRS is not set
412CONFIG_SCSI=y
413CONFIG_SCSI_DMA=y
414# CONFIG_SCSI_TGT is not set
415# CONFIG_SCSI_NETLINK is not set
416CONFIG_SCSI_PROC_FS=y
417
418#
419# SCSI support type (disk, tape, CD-ROM)
420#
421CONFIG_BLK_DEV_SD=y
422CONFIG_CHR_DEV_ST=y
423# CONFIG_CHR_DEV_OSST is not set
424CONFIG_BLK_DEV_SR=y
425# CONFIG_BLK_DEV_SR_VENDOR is not set
426CONFIG_CHR_DEV_SG=y
427# CONFIG_CHR_DEV_SCH is not set
428
429#
430# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
431#
432CONFIG_SCSI_MULTI_LUN=y
433# CONFIG_SCSI_CONSTANTS is not set
434CONFIG_SCSI_LOGGING=y
435# CONFIG_SCSI_SCAN_ASYNC is not set
436CONFIG_SCSI_WAIT_SCAN=m
437
438#
439# SCSI Transports
440#
441# CONFIG_SCSI_SPI_ATTRS is not set
442# CONFIG_SCSI_FC_ATTRS is not set
443# CONFIG_SCSI_ISCSI_ATTRS is not set
444# CONFIG_SCSI_SAS_LIBSAS is not set
445# CONFIG_SCSI_SRP_ATTRS is not set
446CONFIG_SCSI_LOWLEVEL=y
447# CONFIG_ISCSI_TCP is not set
448# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
449# CONFIG_SCSI_3W_9XXX is not set
450# CONFIG_SCSI_ACARD is not set
451# CONFIG_SCSI_AACRAID is not set
452# CONFIG_SCSI_AIC7XXX is not set
453# CONFIG_SCSI_AIC7XXX_OLD is not set
454# CONFIG_SCSI_AIC79XX is not set
455# CONFIG_SCSI_AIC94XX is not set
456# CONFIG_SCSI_DPT_I2O is not set
457# CONFIG_SCSI_ADVANSYS is not set
458# CONFIG_SCSI_ARCMSR is not set
459# CONFIG_MEGARAID_NEWGEN is not set
460# CONFIG_MEGARAID_LEGACY is not set
461# CONFIG_MEGARAID_SAS is not set
462# CONFIG_SCSI_HPTIOP is not set
463# CONFIG_SCSI_BUSLOGIC is not set
464# CONFIG_SCSI_DMX3191D is not set
465# CONFIG_SCSI_EATA is not set
466# CONFIG_SCSI_FUTURE_DOMAIN is not set
467# CONFIG_SCSI_GDTH is not set
468# CONFIG_SCSI_IPS is not set
469# CONFIG_SCSI_INITIO is not set
470# CONFIG_SCSI_INIA100 is not set
471# CONFIG_SCSI_STEX is not set
472# CONFIG_SCSI_SYM53C8XX_2 is not set
473# CONFIG_SCSI_IPR is not set
474# CONFIG_SCSI_QLOGIC_1280 is not set
475# CONFIG_SCSI_QLA_FC is not set
476# CONFIG_SCSI_QLA_ISCSI is not set
477# CONFIG_SCSI_LPFC is not set
478# CONFIG_SCSI_DC395x is not set
479# CONFIG_SCSI_DC390T is not set
480# CONFIG_SCSI_NSP32 is not set
481# CONFIG_SCSI_DEBUG is not set
482# CONFIG_SCSI_SRP is not set
483CONFIG_ATA=y
484# CONFIG_ATA_NONSTANDARD is not set
485CONFIG_SATA_AHCI=y
486# CONFIG_SATA_SVW is not set
487# CONFIG_ATA_PIIX is not set
488# CONFIG_SATA_MV is not set
489# CONFIG_SATA_NV is not set
490# CONFIG_PDC_ADMA is not set
491# CONFIG_SATA_QSTOR is not set
492# CONFIG_SATA_PROMISE is not set
493# CONFIG_SATA_SX4 is not set
494# CONFIG_SATA_SIL is not set
495# CONFIG_SATA_SIL24 is not set
496# CONFIG_SATA_SIS is not set
497# CONFIG_SATA_ULI is not set
498# CONFIG_SATA_VIA is not set
499# CONFIG_SATA_VITESSE is not set
500# CONFIG_SATA_INIC162X is not set
501# CONFIG_SATA_FSL is not set
502CONFIG_PATA_ALI=y
503# CONFIG_PATA_AMD is not set
504# CONFIG_PATA_ARTOP is not set
505# CONFIG_PATA_ATIIXP is not set
506# CONFIG_PATA_CMD640_PCI is not set
507# CONFIG_PATA_CMD64X is not set
508# CONFIG_PATA_CS5520 is not set
509# CONFIG_PATA_CS5530 is not set
510# CONFIG_PATA_CYPRESS is not set
511# CONFIG_PATA_EFAR is not set
512# CONFIG_ATA_GENERIC is not set
513# CONFIG_PATA_HPT366 is not set
514# CONFIG_PATA_HPT37X is not set
515# CONFIG_PATA_HPT3X2N is not set
516# CONFIG_PATA_HPT3X3 is not set
517# CONFIG_PATA_IT821X is not set
518# CONFIG_PATA_IT8213 is not set
519# CONFIG_PATA_JMICRON is not set
520# CONFIG_PATA_TRIFLEX is not set
521# CONFIG_PATA_MARVELL is not set
522# CONFIG_PATA_MPIIX is not set
523# CONFIG_PATA_OLDPIIX is not set
524# CONFIG_PATA_NETCELL is not set
525# CONFIG_PATA_NS87410 is not set
526# CONFIG_PATA_NS87415 is not set
527# CONFIG_PATA_OPTI is not set
528# CONFIG_PATA_OPTIDMA is not set
529# CONFIG_PATA_PDC_OLD is not set
530# CONFIG_PATA_RADISYS is not set
531# CONFIG_PATA_RZ1000 is not set
532# CONFIG_PATA_SC1200 is not set
533# CONFIG_PATA_SERVERWORKS is not set
534# CONFIG_PATA_PDC2027X is not set
535# CONFIG_PATA_SIL680 is not set
536# CONFIG_PATA_SIS is not set
537# CONFIG_PATA_VIA is not set
538# CONFIG_PATA_WINBOND is not set
539# CONFIG_PATA_PLATFORM is not set
540# CONFIG_MD is not set
541# CONFIG_FUSION is not set
542
543#
544# IEEE 1394 (FireWire) support
545#
546# CONFIG_FIREWIRE is not set
547# CONFIG_IEEE1394 is not set
548# CONFIG_I2O is not set
549# CONFIG_MACINTOSH_DRIVERS is not set
550CONFIG_NETDEVICES=y
551# CONFIG_NETDEVICES_MULTIQUEUE is not set
552CONFIG_DUMMY=y
553# CONFIG_BONDING is not set
554# CONFIG_MACVLAN is not set
555# CONFIG_EQUALIZER is not set
556# CONFIG_TUN is not set
557# CONFIG_VETH is not set
558# CONFIG_ARCNET is not set
559CONFIG_PHYLIB=y
560
561#
562# MII PHY device drivers
563#
564# CONFIG_MARVELL_PHY is not set
565# CONFIG_DAVICOM_PHY is not set
566# CONFIG_QSEMI_PHY is not set
567# CONFIG_LXT_PHY is not set
568# CONFIG_CICADA_PHY is not set
569CONFIG_VITESSE_PHY=y
570# CONFIG_SMSC_PHY is not set
571# CONFIG_BROADCOM_PHY is not set
572# CONFIG_ICPLUS_PHY is not set
573# CONFIG_FIXED_PHY is not set
574# CONFIG_MDIO_BITBANG is not set
575CONFIG_NET_ETHERNET=y
576CONFIG_MII=y
577# CONFIG_HAPPYMEAL is not set
578# CONFIG_SUNGEM is not set
579# CONFIG_CASSINI is not set
580# CONFIG_NET_VENDOR_3COM is not set
581# CONFIG_NET_TULIP is not set
582# CONFIG_HP100 is not set
583# CONFIG_IBM_NEW_EMAC_ZMII is not set
584# CONFIG_IBM_NEW_EMAC_RGMII is not set
585# CONFIG_IBM_NEW_EMAC_TAH is not set
586# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
587# CONFIG_NET_PCI is not set
588# CONFIG_B44 is not set
589# CONFIG_FS_ENET is not set
590CONFIG_NETDEV_1000=y
591# CONFIG_ACENIC is not set
592# CONFIG_DL2K is not set
593# CONFIG_E1000 is not set
594# CONFIG_E1000E is not set
595# CONFIG_IP1000 is not set
596# CONFIG_NS83820 is not set
597# CONFIG_HAMACHI is not set
598# CONFIG_YELLOWFIN is not set
599# CONFIG_R8169 is not set
600# CONFIG_SIS190 is not set
601# CONFIG_SKGE is not set
602# CONFIG_SKY2 is not set
603# CONFIG_SK98LIN is not set
604# CONFIG_VIA_VELOCITY is not set
605# CONFIG_TIGON3 is not set
606# CONFIG_BNX2 is not set
607CONFIG_GIANFAR=y
608CONFIG_GFAR_NAPI=y
609# CONFIG_UCC_GETH is not set
610# CONFIG_QLA3XXX is not set
611# CONFIG_ATL1 is not set
612CONFIG_NETDEV_10000=y
613# CONFIG_CHELSIO_T1 is not set
614# CONFIG_CHELSIO_T3 is not set
615# CONFIG_IXGBE is not set
616# CONFIG_IXGB is not set
617# CONFIG_S2IO is not set
618# CONFIG_MYRI10GE is not set
619# CONFIG_NETXEN_NIC is not set
620# CONFIG_NIU is not set
621# CONFIG_MLX4_CORE is not set
622# CONFIG_TEHUTI is not set
623# CONFIG_TR is not set
624
625#
626# Wireless LAN
627#
628# CONFIG_WLAN_PRE80211 is not set
629# CONFIG_WLAN_80211 is not set
630
631#
632# USB Network Adapters
633#
634# CONFIG_USB_CATC is not set
635# CONFIG_USB_KAWETH is not set
636# CONFIG_USB_PEGASUS is not set
637# CONFIG_USB_RTL8150 is not set
638# CONFIG_USB_USBNET is not set
639# CONFIG_WAN is not set
640# CONFIG_FDDI is not set
641# CONFIG_HIPPI is not set
642# CONFIG_PPP is not set
643# CONFIG_SLIP is not set
644# CONFIG_NET_FC is not set
645# CONFIG_SHAPER is not set
646# CONFIG_NETCONSOLE is not set
647# CONFIG_NETPOLL is not set
648# CONFIG_NET_POLL_CONTROLLER is not set
649# CONFIG_ISDN is not set
650# CONFIG_PHONE is not set
651
652#
653# Input device support
654#
655CONFIG_INPUT=y
656# CONFIG_INPUT_FF_MEMLESS is not set
657# CONFIG_INPUT_POLLDEV is not set
658
659#
660# Userland interfaces
661#
662# CONFIG_INPUT_MOUSEDEV is not set
663# CONFIG_INPUT_JOYDEV is not set
664# CONFIG_INPUT_EVDEV is not set
665# CONFIG_INPUT_EVBUG is not set
666
667#
668# Input Device Drivers
669#
670# CONFIG_INPUT_KEYBOARD is not set
671# CONFIG_INPUT_MOUSE is not set
672# CONFIG_INPUT_JOYSTICK is not set
673# CONFIG_INPUT_TABLET is not set
674# CONFIG_INPUT_TOUCHSCREEN is not set
675# CONFIG_INPUT_MISC is not set
676
677#
678# Hardware I/O ports
679#
680CONFIG_SERIO=y
681CONFIG_SERIO_I8042=y
682CONFIG_SERIO_SERPORT=y
683# CONFIG_SERIO_PCIPS2 is not set
684CONFIG_SERIO_LIBPS2=y
685# CONFIG_SERIO_RAW is not set
686# CONFIG_GAMEPORT is not set
687
688#
689# Character devices
690#
691CONFIG_VT=y
692CONFIG_VT_CONSOLE=y
693CONFIG_HW_CONSOLE=y
694# CONFIG_VT_HW_CONSOLE_BINDING is not set
695# CONFIG_SERIAL_NONSTANDARD is not set
696
697#
698# Serial drivers
699#
700CONFIG_SERIAL_8250=y
701CONFIG_SERIAL_8250_CONSOLE=y
702CONFIG_SERIAL_8250_PCI=y
703CONFIG_SERIAL_8250_NR_UARTS=2
704CONFIG_SERIAL_8250_RUNTIME_UARTS=2
705CONFIG_SERIAL_8250_EXTENDED=y
706CONFIG_SERIAL_8250_MANY_PORTS=y
707CONFIG_SERIAL_8250_SHARE_IRQ=y
708CONFIG_SERIAL_8250_DETECT_IRQ=y
709CONFIG_SERIAL_8250_RSA=y
710
711#
712# Non-8250 serial port support
713#
714# CONFIG_SERIAL_UARTLITE is not set
715CONFIG_SERIAL_CORE=y
716CONFIG_SERIAL_CORE_CONSOLE=y
717# CONFIG_SERIAL_CPM is not set
718# CONFIG_SERIAL_JSM is not set
719# CONFIG_SERIAL_OF_PLATFORM is not set
720# CONFIG_SERIAL_QE is not set
721CONFIG_UNIX98_PTYS=y
722CONFIG_LEGACY_PTYS=y
723CONFIG_LEGACY_PTY_COUNT=256
724# CONFIG_IPMI_HANDLER is not set
725# CONFIG_HW_RANDOM is not set
726CONFIG_NVRAM=y
727CONFIG_GEN_RTC=y
728CONFIG_GEN_RTC_X=y
729# CONFIG_R3964 is not set
730# CONFIG_APPLICOM is not set
731# CONFIG_RAW_DRIVER is not set
732# CONFIG_TCG_TPM is not set
733CONFIG_DEVPORT=y
734CONFIG_I2C=y
735CONFIG_I2C_BOARDINFO=y
736# CONFIG_I2C_CHARDEV is not set
737
738#
739# I2C Algorithms
740#
741# CONFIG_I2C_ALGOBIT is not set
742# CONFIG_I2C_ALGOPCF is not set
743# CONFIG_I2C_ALGOPCA is not set
744
745#
746# I2C Hardware Bus support
747#
748# CONFIG_I2C_ALI1535 is not set
749# CONFIG_I2C_ALI1563 is not set
750# CONFIG_I2C_ALI15X3 is not set
751# CONFIG_I2C_AMD756 is not set
752# CONFIG_I2C_AMD8111 is not set
753# CONFIG_I2C_I801 is not set
754# CONFIG_I2C_I810 is not set
755# CONFIG_I2C_PIIX4 is not set
756CONFIG_I2C_MPC=y
757# CONFIG_I2C_NFORCE2 is not set
758# CONFIG_I2C_OCORES is not set
759# CONFIG_I2C_PARPORT_LIGHT is not set
760# CONFIG_I2C_PROSAVAGE is not set
761# CONFIG_I2C_SAVAGE4 is not set
762# CONFIG_I2C_SIMTEC is not set
763# CONFIG_I2C_SIS5595 is not set
764# CONFIG_I2C_SIS630 is not set
765# CONFIG_I2C_SIS96X is not set
766# CONFIG_I2C_TAOS_EVM is not set
767# CONFIG_I2C_STUB is not set
768# CONFIG_I2C_TINY_USB is not set
769# CONFIG_I2C_VIA is not set
770# CONFIG_I2C_VIAPRO is not set
771# CONFIG_I2C_VOODOO3 is not set
772
773#
774# Miscellaneous I2C Chip support
775#
776# CONFIG_SENSORS_DS1337 is not set
777# CONFIG_SENSORS_DS1374 is not set
778# CONFIG_DS1682 is not set
779CONFIG_SENSORS_EEPROM=y
780# CONFIG_SENSORS_PCF8574 is not set
781# CONFIG_SENSORS_PCA9539 is not set
782# CONFIG_SENSORS_PCF8591 is not set
783# CONFIG_SENSORS_M41T00 is not set
784# CONFIG_SENSORS_MAX6875 is not set
785# CONFIG_SENSORS_TSL2550 is not set
786# CONFIG_I2C_DEBUG_CORE is not set
787# CONFIG_I2C_DEBUG_ALGO is not set
788# CONFIG_I2C_DEBUG_BUS is not set
789# CONFIG_I2C_DEBUG_CHIP is not set
790
791#
792# SPI support
793#
794# CONFIG_SPI is not set
795# CONFIG_SPI_MASTER is not set
796# CONFIG_W1 is not set
797# CONFIG_POWER_SUPPLY is not set
798# CONFIG_HWMON is not set
799# CONFIG_WATCHDOG is not set
800
801#
802# Sonics Silicon Backplane
803#
804CONFIG_SSB_POSSIBLE=y
805# CONFIG_SSB is not set
806
807#
808# Multifunction device drivers
809#
810# CONFIG_MFD_SM501 is not set
811
812#
813# Multimedia devices
814#
815# CONFIG_VIDEO_DEV is not set
816CONFIG_DVB_CORE=m
817# CONFIG_DVB_CORE_ATTACH is not set
818CONFIG_DVB_CAPTURE_DRIVERS=y
819
820#
821# Supported SAA7146 based PCI Adapters
822#
823
824#
825# Supported USB Adapters
826#
827# CONFIG_DVB_USB is not set
828# CONFIG_DVB_TTUSB_BUDGET is not set
829# CONFIG_DVB_TTUSB_DEC is not set
830# CONFIG_DVB_CINERGYT2 is not set
831
832#
833# Supported FlexCopII (B2C2) Adapters
834#
835# CONFIG_DVB_B2C2_FLEXCOP is not set
836
837#
838# Supported BT878 Adapters
839#
840
841#
842# Supported Pluto2 Adapters
843#
844# CONFIG_DVB_PLUTO2 is not set
845
846#
847# Supported DVB Frontends
848#
849
850#
851# Customise DVB Frontends
852#
853# CONFIG_DVB_FE_CUSTOMISE is not set
854
855#
856# DVB-S (satellite) frontends
857#
858# CONFIG_DVB_STV0299 is not set
859# CONFIG_DVB_CX24110 is not set
860# CONFIG_DVB_CX24123 is not set
861# CONFIG_DVB_TDA8083 is not set
862# CONFIG_DVB_MT312 is not set
863# CONFIG_DVB_VES1X93 is not set
864# CONFIG_DVB_S5H1420 is not set
865# CONFIG_DVB_TDA10086 is not set
866
867#
868# DVB-T (terrestrial) frontends
869#
870# CONFIG_DVB_SP8870 is not set
871# CONFIG_DVB_SP887X is not set
872# CONFIG_DVB_CX22700 is not set
873# CONFIG_DVB_CX22702 is not set
874# CONFIG_DVB_L64781 is not set
875# CONFIG_DVB_TDA1004X is not set
876# CONFIG_DVB_NXT6000 is not set
877# CONFIG_DVB_MT352 is not set
878# CONFIG_DVB_ZL10353 is not set
879# CONFIG_DVB_DIB3000MB is not set
880# CONFIG_DVB_DIB3000MC is not set
881# CONFIG_DVB_DIB7000M is not set
882# CONFIG_DVB_DIB7000P is not set
883
884#
885# DVB-C (cable) frontends
886#
887# CONFIG_DVB_VES1820 is not set
888# CONFIG_DVB_TDA10021 is not set
889# CONFIG_DVB_TDA10023 is not set
890# CONFIG_DVB_STV0297 is not set
891
892#
893# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
894#
895# CONFIG_DVB_NXT200X is not set
896# CONFIG_DVB_OR51211 is not set
897# CONFIG_DVB_OR51132 is not set
898# CONFIG_DVB_BCM3510 is not set
899# CONFIG_DVB_LGDT330X is not set
900# CONFIG_DVB_S5H1409 is not set
901
902#
903# Tuners/PLL support
904#
905# CONFIG_DVB_PLL is not set
906# CONFIG_DVB_TDA826X is not set
907# CONFIG_DVB_TDA827X is not set
908# CONFIG_DVB_TUNER_QT1010 is not set
909# CONFIG_DVB_TUNER_MT2060 is not set
910# CONFIG_DVB_TUNER_MT2266 is not set
911# CONFIG_DVB_TUNER_MT2131 is not set
912# CONFIG_DVB_TUNER_DIB0070 is not set
913
914#
915# Miscellaneous devices
916#
917# CONFIG_DVB_LNBP21 is not set
918# CONFIG_DVB_ISL6421 is not set
919# CONFIG_DVB_TUA6100 is not set
920CONFIG_DAB=y
921# CONFIG_USB_DABUSB is not set
922
923#
924# Graphics support
925#
926# CONFIG_AGP is not set
927# CONFIG_DRM is not set
928# CONFIG_VGASTATE is not set
929CONFIG_VIDEO_OUTPUT_CONTROL=y
930# CONFIG_FB is not set
931# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
932
933#
934# Display device support
935#
936# CONFIG_DISPLAY_SUPPORT is not set
937
938#
939# Console display driver support
940#
941CONFIG_VGA_CONSOLE=y
942# CONFIG_VGACON_SOFT_SCROLLBACK is not set
943CONFIG_DUMMY_CONSOLE=y
944
945#
946# Sound
947#
948CONFIG_SOUND=y
949
950#
951# Advanced Linux Sound Architecture
952#
953CONFIG_SND=y
954CONFIG_SND_TIMER=y
955CONFIG_SND_PCM=y
956# CONFIG_SND_SEQUENCER is not set
957# CONFIG_SND_MIXER_OSS is not set
958# CONFIG_SND_PCM_OSS is not set
959# CONFIG_SND_DYNAMIC_MINORS is not set
960CONFIG_SND_SUPPORT_OLD_API=y
961CONFIG_SND_VERBOSE_PROCFS=y
962# CONFIG_SND_VERBOSE_PRINTK is not set
963# CONFIG_SND_DEBUG is not set
964
965#
966# Generic devices
967#
968CONFIG_SND_AC97_CODEC=y
969# CONFIG_SND_DUMMY is not set
970# CONFIG_SND_MTPAV is not set
971# CONFIG_SND_SERIAL_U16550 is not set
972# CONFIG_SND_MPU401 is not set
973
974#
975# PCI devices
976#
977# CONFIG_SND_AD1889 is not set
978# CONFIG_SND_ALS300 is not set
979# CONFIG_SND_ALS4000 is not set
980# CONFIG_SND_ALI5451 is not set
981# CONFIG_SND_ATIIXP is not set
982# CONFIG_SND_ATIIXP_MODEM is not set
983# CONFIG_SND_AU8810 is not set
984# CONFIG_SND_AU8820 is not set
985# CONFIG_SND_AU8830 is not set
986# CONFIG_SND_AZT3328 is not set
987# CONFIG_SND_BT87X is not set
988# CONFIG_SND_CA0106 is not set
989# CONFIG_SND_CMIPCI is not set
990# CONFIG_SND_CS4281 is not set
991# CONFIG_SND_CS46XX is not set
992# CONFIG_SND_CS5530 is not set
993# CONFIG_SND_DARLA20 is not set
994# CONFIG_SND_GINA20 is not set
995# CONFIG_SND_LAYLA20 is not set
996# CONFIG_SND_DARLA24 is not set
997# CONFIG_SND_GINA24 is not set
998# CONFIG_SND_LAYLA24 is not set
999# CONFIG_SND_MONA is not set
1000# CONFIG_SND_MIA is not set
1001# CONFIG_SND_ECHO3G is not set
1002# CONFIG_SND_INDIGO is not set
1003# CONFIG_SND_INDIGOIO is not set
1004# CONFIG_SND_INDIGODJ is not set
1005# CONFIG_SND_EMU10K1 is not set
1006# CONFIG_SND_EMU10K1X is not set
1007# CONFIG_SND_ENS1370 is not set
1008# CONFIG_SND_ENS1371 is not set
1009# CONFIG_SND_ES1938 is not set
1010# CONFIG_SND_ES1968 is not set
1011# CONFIG_SND_FM801 is not set
1012# CONFIG_SND_HDA_INTEL is not set
1013# CONFIG_SND_HDSP is not set
1014# CONFIG_SND_HDSPM is not set
1015# CONFIG_SND_ICE1712 is not set
1016# CONFIG_SND_ICE1724 is not set
1017CONFIG_SND_INTEL8X0=y
1018# CONFIG_SND_INTEL8X0M is not set
1019# CONFIG_SND_KORG1212 is not set
1020# CONFIG_SND_MAESTRO3 is not set
1021# CONFIG_SND_MIXART is not set
1022# CONFIG_SND_NM256 is not set
1023# CONFIG_SND_PCXHR is not set
1024# CONFIG_SND_RIPTIDE is not set
1025# CONFIG_SND_RME32 is not set
1026# CONFIG_SND_RME96 is not set
1027# CONFIG_SND_RME9652 is not set
1028# CONFIG_SND_SONICVIBES is not set
1029# CONFIG_SND_TRIDENT is not set
1030# CONFIG_SND_VIA82XX is not set
1031# CONFIG_SND_VIA82XX_MODEM is not set
1032# CONFIG_SND_VX222 is not set
1033# CONFIG_SND_YMFPCI is not set
1034# CONFIG_SND_AC97_POWER_SAVE is not set
1035
1036#
1037# ALSA PowerMac devices
1038#
1039
1040#
1041# ALSA PowerPC devices
1042#
1043
1044#
1045# USB devices
1046#
1047# CONFIG_SND_USB_AUDIO is not set
1048# CONFIG_SND_USB_USX2Y is not set
1049# CONFIG_SND_USB_CAIAQ is not set
1050
1051#
1052# System on Chip audio support
1053#
1054# CONFIG_SND_SOC is not set
1055
1056#
1057# SoC Audio support for SuperH
1058#
1059
1060#
1061# Open Sound System
1062#
1063# CONFIG_SOUND_PRIME is not set
1064CONFIG_AC97_BUS=y
1065CONFIG_HID_SUPPORT=y
1066CONFIG_HID=y
1067# CONFIG_HID_DEBUG is not set
1068# CONFIG_HIDRAW is not set
1069
1070#
1071# USB Input Devices
1072#
1073CONFIG_USB_HID=y
1074# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1075# CONFIG_HID_FF is not set
1076# CONFIG_USB_HIDDEV is not set
1077CONFIG_USB_SUPPORT=y
1078CONFIG_USB_ARCH_HAS_HCD=y
1079CONFIG_USB_ARCH_HAS_OHCI=y
1080CONFIG_USB_ARCH_HAS_EHCI=y
1081CONFIG_USB=y
1082# CONFIG_USB_DEBUG is not set
1083
1084#
1085# Miscellaneous USB options
1086#
1087CONFIG_USB_DEVICEFS=y
1088CONFIG_USB_DEVICE_CLASS=y
1089# CONFIG_USB_DYNAMIC_MINORS is not set
1090# CONFIG_USB_OTG is not set
1091
1092#
1093# USB Host Controller Drivers
1094#
1095CONFIG_USB_EHCI_HCD=y
1096# CONFIG_USB_EHCI_SPLIT_ISO is not set
1097# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1098# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1099# CONFIG_USB_ISP116X_HCD is not set
1100CONFIG_USB_OHCI_HCD=y
1101CONFIG_USB_OHCI_HCD_PPC_OF=y
1102CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
1103CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
1104CONFIG_USB_OHCI_HCD_PCI=y
1105CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
1106CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
1107CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1108# CONFIG_USB_UHCI_HCD is not set
1109# CONFIG_USB_SL811_HCD is not set
1110# CONFIG_USB_R8A66597_HCD is not set
1111
1112#
1113# USB Device Class drivers
1114#
1115# CONFIG_USB_ACM is not set
1116# CONFIG_USB_PRINTER is not set
1117
1118#
1119# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1120#
1121
1122#
1123# may also be needed; see USB_STORAGE Help for more information
1124#
1125CONFIG_USB_STORAGE=y
1126# CONFIG_USB_STORAGE_DEBUG is not set
1127# CONFIG_USB_STORAGE_DATAFAB is not set
1128# CONFIG_USB_STORAGE_FREECOM is not set
1129# CONFIG_USB_STORAGE_ISD200 is not set
1130# CONFIG_USB_STORAGE_DPCM is not set
1131# CONFIG_USB_STORAGE_USBAT is not set
1132# CONFIG_USB_STORAGE_SDDR09 is not set
1133# CONFIG_USB_STORAGE_SDDR55 is not set
1134# CONFIG_USB_STORAGE_JUMPSHOT is not set
1135# CONFIG_USB_STORAGE_ALAUDA is not set
1136# CONFIG_USB_STORAGE_KARMA is not set
1137# CONFIG_USB_LIBUSUAL is not set
1138
1139#
1140# USB Imaging devices
1141#
1142# CONFIG_USB_MDC800 is not set
1143# CONFIG_USB_MICROTEK is not set
1144CONFIG_USB_MON=y
1145
1146#
1147# USB port drivers
1148#
1149
1150#
1151# USB Serial Converter support
1152#
1153# CONFIG_USB_SERIAL is not set
1154
1155#
1156# USB Miscellaneous drivers
1157#
1158# CONFIG_USB_EMI62 is not set
1159# CONFIG_USB_EMI26 is not set
1160# CONFIG_USB_ADUTUX is not set
1161# CONFIG_USB_AUERSWALD is not set
1162# CONFIG_USB_RIO500 is not set
1163# CONFIG_USB_LEGOTOWER is not set
1164# CONFIG_USB_LCD is not set
1165# CONFIG_USB_BERRY_CHARGE is not set
1166# CONFIG_USB_LED is not set
1167# CONFIG_USB_CYPRESS_CY7C63 is not set
1168# CONFIG_USB_CYTHERM is not set
1169# CONFIG_USB_PHIDGET is not set
1170# CONFIG_USB_IDMOUSE is not set
1171# CONFIG_USB_FTDI_ELAN is not set
1172# CONFIG_USB_APPLEDISPLAY is not set
1173# CONFIG_USB_SISUSBVGA is not set
1174# CONFIG_USB_LD is not set
1175# CONFIG_USB_TRANCEVIBRATOR is not set
1176# CONFIG_USB_IOWARRIOR is not set
1177# CONFIG_USB_TEST is not set
1178
1179#
1180# USB DSL modem support
1181#
1182
1183#
1184# USB Gadget Support
1185#
1186# CONFIG_USB_GADGET is not set
1187# CONFIG_MMC is not set
1188# CONFIG_NEW_LEDS is not set
1189# CONFIG_INFINIBAND is not set
1190# CONFIG_EDAC is not set
1191CONFIG_RTC_LIB=y
1192CONFIG_RTC_CLASS=y
1193CONFIG_RTC_HCTOSYS=y
1194CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1195# CONFIG_RTC_DEBUG is not set
1196
1197#
1198# RTC interfaces
1199#
1200CONFIG_RTC_INTF_SYSFS=y
1201CONFIG_RTC_INTF_PROC=y
1202CONFIG_RTC_INTF_DEV=y
1203# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1204# CONFIG_RTC_DRV_TEST is not set
1205
1206#
1207# I2C RTC drivers
1208#
1209# CONFIG_RTC_DRV_DS1307 is not set
1210# CONFIG_RTC_DRV_DS1374 is not set
1211# CONFIG_RTC_DRV_DS1672 is not set
1212# CONFIG_RTC_DRV_MAX6900 is not set
1213# CONFIG_RTC_DRV_RS5C372 is not set
1214# CONFIG_RTC_DRV_ISL1208 is not set
1215# CONFIG_RTC_DRV_X1205 is not set
1216# CONFIG_RTC_DRV_PCF8563 is not set
1217# CONFIG_RTC_DRV_PCF8583 is not set
1218# CONFIG_RTC_DRV_M41T80 is not set
1219
1220#
1221# SPI RTC drivers
1222#
1223
1224#
1225# Platform RTC drivers
1226#
1227CONFIG_RTC_DRV_CMOS=y
1228# CONFIG_RTC_DRV_DS1553 is not set
1229# CONFIG_RTC_DRV_STK17TA8 is not set
1230# CONFIG_RTC_DRV_DS1742 is not set
1231# CONFIG_RTC_DRV_M48T86 is not set
1232# CONFIG_RTC_DRV_M48T59 is not set
1233# CONFIG_RTC_DRV_V3020 is not set
1234
1235#
1236# on-CPU RTC drivers
1237#
1238
1239#
1240# Userspace I/O
1241#
1242# CONFIG_UIO is not set
1243
1244#
1245# File systems
1246#
1247CONFIG_EXT2_FS=y
1248# CONFIG_EXT2_FS_XATTR is not set
1249# CONFIG_EXT2_FS_XIP is not set
1250CONFIG_EXT3_FS=y
1251CONFIG_EXT3_FS_XATTR=y
1252# CONFIG_EXT3_FS_POSIX_ACL is not set
1253# CONFIG_EXT3_FS_SECURITY is not set
1254# CONFIG_EXT4DEV_FS is not set
1255CONFIG_JBD=y
1256CONFIG_FS_MBCACHE=y
1257# CONFIG_REISERFS_FS is not set
1258# CONFIG_JFS_FS is not set
1259# CONFIG_FS_POSIX_ACL is not set
1260# CONFIG_XFS_FS is not set
1261# CONFIG_GFS2_FS is not set
1262# CONFIG_OCFS2_FS is not set
1263# CONFIG_MINIX_FS is not set
1264# CONFIG_ROMFS_FS is not set
1265CONFIG_INOTIFY=y
1266CONFIG_INOTIFY_USER=y
1267# CONFIG_QUOTA is not set
1268CONFIG_DNOTIFY=y
1269# CONFIG_AUTOFS_FS is not set
1270# CONFIG_AUTOFS4_FS is not set
1271# CONFIG_FUSE_FS is not set
1272
1273#
1274# CD-ROM/DVD Filesystems
1275#
1276CONFIG_ISO9660_FS=m
1277CONFIG_JOLIET=y
1278CONFIG_ZISOFS=y
1279CONFIG_UDF_FS=m
1280CONFIG_UDF_NLS=y
1281
1282#
1283# DOS/FAT/NT Filesystems
1284#
1285CONFIG_FAT_FS=y
1286CONFIG_MSDOS_FS=m
1287CONFIG_VFAT_FS=y
1288CONFIG_FAT_DEFAULT_CODEPAGE=437
1289CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1290CONFIG_NTFS_FS=y
1291# CONFIG_NTFS_DEBUG is not set
1292# CONFIG_NTFS_RW is not set
1293
1294#
1295# Pseudo filesystems
1296#
1297CONFIG_PROC_FS=y
1298CONFIG_PROC_KCORE=y
1299CONFIG_PROC_SYSCTL=y
1300CONFIG_SYSFS=y
1301CONFIG_TMPFS=y
1302# CONFIG_TMPFS_POSIX_ACL is not set
1303# CONFIG_HUGETLB_PAGE is not set
1304# CONFIG_CONFIGFS_FS is not set
1305
1306#
1307# Miscellaneous filesystems
1308#
1309CONFIG_ADFS_FS=m
1310# CONFIG_ADFS_FS_RW is not set
1311CONFIG_AFFS_FS=m
1312CONFIG_HFS_FS=m
1313CONFIG_HFSPLUS_FS=m
1314CONFIG_BEFS_FS=m
1315# CONFIG_BEFS_DEBUG is not set
1316CONFIG_BFS_FS=m
1317CONFIG_EFS_FS=m
1318CONFIG_CRAMFS=y
1319CONFIG_VXFS_FS=m
1320CONFIG_HPFS_FS=m
1321CONFIG_QNX4FS_FS=m
1322CONFIG_SYSV_FS=m
1323CONFIG_UFS_FS=m
1324# CONFIG_UFS_FS_WRITE is not set
1325# CONFIG_UFS_DEBUG is not set
1326CONFIG_NETWORK_FILESYSTEMS=y
1327CONFIG_NFS_FS=y
1328CONFIG_NFS_V3=y
1329# CONFIG_NFS_V3_ACL is not set
1330CONFIG_NFS_V4=y
1331# CONFIG_NFS_DIRECTIO is not set
1332CONFIG_NFSD=y
1333# CONFIG_NFSD_V3 is not set
1334CONFIG_NFSD_TCP=y
1335CONFIG_ROOT_NFS=y
1336CONFIG_LOCKD=y
1337CONFIG_LOCKD_V4=y
1338CONFIG_EXPORTFS=y
1339CONFIG_NFS_COMMON=y
1340CONFIG_SUNRPC=y
1341CONFIG_SUNRPC_GSS=y
1342# CONFIG_SUNRPC_BIND34 is not set
1343CONFIG_RPCSEC_GSS_KRB5=y
1344# CONFIG_RPCSEC_GSS_SPKM3 is not set
1345# CONFIG_SMB_FS is not set
1346# CONFIG_CIFS is not set
1347# CONFIG_NCP_FS is not set
1348# CONFIG_CODA_FS is not set
1349# CONFIG_AFS_FS is not set
1350
1351#
1352# Partition Types
1353#
1354CONFIG_PARTITION_ADVANCED=y
1355# CONFIG_ACORN_PARTITION is not set
1356# CONFIG_OSF_PARTITION is not set
1357# CONFIG_AMIGA_PARTITION is not set
1358# CONFIG_ATARI_PARTITION is not set
1359CONFIG_MAC_PARTITION=y
1360CONFIG_MSDOS_PARTITION=y
1361# CONFIG_BSD_DISKLABEL is not set
1362# CONFIG_MINIX_SUBPARTITION is not set
1363# CONFIG_SOLARIS_X86_PARTITION is not set
1364# CONFIG_UNIXWARE_DISKLABEL is not set
1365# CONFIG_LDM_PARTITION is not set
1366# CONFIG_SGI_PARTITION is not set
1367# CONFIG_ULTRIX_PARTITION is not set
1368# CONFIG_SUN_PARTITION is not set
1369# CONFIG_KARMA_PARTITION is not set
1370# CONFIG_EFI_PARTITION is not set
1371# CONFIG_SYSV68_PARTITION is not set
1372CONFIG_NLS=y
1373CONFIG_NLS_DEFAULT="iso8859-1"
1374# CONFIG_NLS_CODEPAGE_437 is not set
1375# CONFIG_NLS_CODEPAGE_737 is not set
1376# CONFIG_NLS_CODEPAGE_775 is not set
1377# CONFIG_NLS_CODEPAGE_850 is not set
1378# CONFIG_NLS_CODEPAGE_852 is not set
1379# CONFIG_NLS_CODEPAGE_855 is not set
1380# CONFIG_NLS_CODEPAGE_857 is not set
1381# CONFIG_NLS_CODEPAGE_860 is not set
1382# CONFIG_NLS_CODEPAGE_861 is not set
1383# CONFIG_NLS_CODEPAGE_862 is not set
1384# CONFIG_NLS_CODEPAGE_863 is not set
1385# CONFIG_NLS_CODEPAGE_864 is not set
1386# CONFIG_NLS_CODEPAGE_865 is not set
1387# CONFIG_NLS_CODEPAGE_866 is not set
1388# CONFIG_NLS_CODEPAGE_869 is not set
1389# CONFIG_NLS_CODEPAGE_936 is not set
1390# CONFIG_NLS_CODEPAGE_950 is not set
1391# CONFIG_NLS_CODEPAGE_932 is not set
1392# CONFIG_NLS_CODEPAGE_949 is not set
1393# CONFIG_NLS_CODEPAGE_874 is not set
1394# CONFIG_NLS_ISO8859_8 is not set
1395# CONFIG_NLS_CODEPAGE_1250 is not set
1396# CONFIG_NLS_CODEPAGE_1251 is not set
1397# CONFIG_NLS_ASCII is not set
1398# CONFIG_NLS_ISO8859_1 is not set
1399# CONFIG_NLS_ISO8859_2 is not set
1400# CONFIG_NLS_ISO8859_3 is not set
1401# CONFIG_NLS_ISO8859_4 is not set
1402# CONFIG_NLS_ISO8859_5 is not set
1403# CONFIG_NLS_ISO8859_6 is not set
1404# CONFIG_NLS_ISO8859_7 is not set
1405# CONFIG_NLS_ISO8859_9 is not set
1406# CONFIG_NLS_ISO8859_13 is not set
1407# CONFIG_NLS_ISO8859_14 is not set
1408# CONFIG_NLS_ISO8859_15 is not set
1409# CONFIG_NLS_KOI8_R is not set
1410# CONFIG_NLS_KOI8_U is not set
1411CONFIG_NLS_UTF8=m
1412# CONFIG_DLM is not set
1413
1414#
1415# Library routines
1416#
1417CONFIG_BITREVERSE=y
1418# CONFIG_CRC_CCITT is not set
1419# CONFIG_CRC16 is not set
1420# CONFIG_CRC_ITU_T is not set
1421CONFIG_CRC32=y
1422# CONFIG_CRC7 is not set
1423CONFIG_LIBCRC32C=m
1424CONFIG_ZLIB_INFLATE=y
1425CONFIG_PLIST=y
1426CONFIG_HAS_IOMEM=y
1427CONFIG_HAS_IOPORT=y
1428CONFIG_HAS_DMA=y
1429# CONFIG_INSTRUMENTATION is not set
1430
1431#
1432# Kernel hacking
1433#
1434# CONFIG_PRINTK_TIME is not set
1435CONFIG_ENABLE_WARN_DEPRECATED=y
1436CONFIG_ENABLE_MUST_CHECK=y
1437# CONFIG_MAGIC_SYSRQ is not set
1438# CONFIG_UNUSED_SYMBOLS is not set
1439# CONFIG_DEBUG_FS is not set
1440# CONFIG_HEADERS_CHECK is not set
1441CONFIG_DEBUG_KERNEL=y
1442# CONFIG_DEBUG_SHIRQ is not set
1443CONFIG_DETECT_SOFTLOCKUP=y
1444CONFIG_SCHED_DEBUG=y
1445# CONFIG_SCHEDSTATS is not set
1446# CONFIG_TIMER_STATS is not set
1447# CONFIG_SLUB_DEBUG_ON is not set
1448# CONFIG_DEBUG_RT_MUTEXES is not set
1449# CONFIG_RT_MUTEX_TESTER is not set
1450# CONFIG_DEBUG_SPINLOCK is not set
1451# CONFIG_DEBUG_MUTEXES is not set
1452# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1453# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1454# CONFIG_DEBUG_KOBJECT is not set
1455# CONFIG_DEBUG_HIGHMEM is not set
1456# CONFIG_DEBUG_BUGVERBOSE is not set
1457CONFIG_DEBUG_INFO=y
1458# CONFIG_DEBUG_VM is not set
1459# CONFIG_DEBUG_LIST is not set
1460# CONFIG_DEBUG_SG is not set
1461CONFIG_FORCED_INLINING=y
1462# CONFIG_BOOT_PRINTK_DELAY is not set
1463# CONFIG_RCU_TORTURE_TEST is not set
1464# CONFIG_FAULT_INJECTION is not set
1465# CONFIG_SAMPLES is not set
1466# CONFIG_DEBUG_STACKOVERFLOW is not set
1467# CONFIG_DEBUG_STACK_USAGE is not set
1468# CONFIG_DEBUG_PAGEALLOC is not set
1469# CONFIG_DEBUGGER is not set
1470# CONFIG_KGDB_CONSOLE is not set
1471# CONFIG_BDI_SWITCH is not set
1472# CONFIG_PPC_EARLY_DEBUG is not set
1473
1474#
1475# Security options
1476#
1477# CONFIG_KEYS is not set
1478# CONFIG_SECURITY is not set
1479# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1480CONFIG_CRYPTO=y
1481CONFIG_CRYPTO_ALGAPI=y
1482CONFIG_CRYPTO_BLKCIPHER=y
1483CONFIG_CRYPTO_HASH=y
1484CONFIG_CRYPTO_MANAGER=y
1485CONFIG_CRYPTO_HMAC=y
1486# CONFIG_CRYPTO_XCBC is not set
1487# CONFIG_CRYPTO_NULL is not set
1488# CONFIG_CRYPTO_MD4 is not set
1489CONFIG_CRYPTO_MD5=y
1490CONFIG_CRYPTO_SHA1=m
1491# CONFIG_CRYPTO_SHA256 is not set
1492# CONFIG_CRYPTO_SHA512 is not set
1493# CONFIG_CRYPTO_WP512 is not set
1494# CONFIG_CRYPTO_TGR192 is not set
1495# CONFIG_CRYPTO_GF128MUL is not set
1496# CONFIG_CRYPTO_ECB is not set
1497CONFIG_CRYPTO_CBC=y
1498CONFIG_CRYPTO_PCBC=m
1499# CONFIG_CRYPTO_LRW is not set
1500# CONFIG_CRYPTO_XTS is not set
1501# CONFIG_CRYPTO_CRYPTD is not set
1502CONFIG_CRYPTO_DES=y
1503# CONFIG_CRYPTO_FCRYPT is not set
1504# CONFIG_CRYPTO_BLOWFISH is not set
1505# CONFIG_CRYPTO_TWOFISH is not set
1506# CONFIG_CRYPTO_SERPENT is not set
1507# CONFIG_CRYPTO_AES is not set
1508# CONFIG_CRYPTO_CAST5 is not set
1509# CONFIG_CRYPTO_CAST6 is not set
1510# CONFIG_CRYPTO_TEA is not set
1511# CONFIG_CRYPTO_ARC4 is not set
1512# CONFIG_CRYPTO_KHAZAD is not set
1513# CONFIG_CRYPTO_ANUBIS is not set
1514# CONFIG_CRYPTO_SEED is not set
1515# CONFIG_CRYPTO_DEFLATE is not set
1516# CONFIG_CRYPTO_MICHAEL_MIC is not set
1517# CONFIG_CRYPTO_CRC32C is not set
1518# CONFIG_CRYPTO_CAMELLIA is not set
1519# CONFIG_CRYPTO_TEST is not set
1520# CONFIG_CRYPTO_AUTHENC is not set
1521CONFIG_CRYPTO_HW=y
1522# CONFIG_PPC_CLOCK is not set
1523CONFIG_PPC_LIB_RHEAP=y
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig
index 9614d24f832a..2500ef42959d 100644
--- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig
@@ -696,7 +696,7 @@ CONFIG_SERIAL_8250_RSA=y
696CONFIG_SERIAL_CORE=y 696CONFIG_SERIAL_CORE=y
697CONFIG_SERIAL_CORE_CONSOLE=y 697CONFIG_SERIAL_CORE_CONSOLE=y
698# CONFIG_SERIAL_JSM is not set 698# CONFIG_SERIAL_JSM is not set
699CONFIG_SERIAL_OF_PLATFORM=y 699# CONFIG_SERIAL_OF_PLATFORM is not set
700CONFIG_UNIX98_PTYS=y 700CONFIG_UNIX98_PTYS=y
701# CONFIG_LEGACY_PTYS is not set 701# CONFIG_LEGACY_PTYS is not set
702# CONFIG_IPMI_HANDLER is not set 702# CONFIG_IPMI_HANDLER is not set
@@ -708,7 +708,60 @@ CONFIG_UNIX98_PTYS=y
708# CONFIG_RAW_DRIVER is not set 708# CONFIG_RAW_DRIVER is not set
709# CONFIG_TCG_TPM is not set 709# CONFIG_TCG_TPM is not set
710CONFIG_DEVPORT=y 710CONFIG_DEVPORT=y
711# CONFIG_I2C is not set 711CONFIG_I2C=y
712CONFIG_I2C_BOARDINFO=y
713# CONFIG_I2C_CHARDEV is not set
714
715#
716# I2C Algorithms
717#
718# CONFIG_I2C_ALGOBIT is not set
719# CONFIG_I2C_ALGOPCF is not set
720# CONFIG_I2C_ALGOPCA is not set
721
722#
723# I2C Hardware Bus support
724#
725# CONFIG_I2C_ALI1535 is not set
726# CONFIG_I2C_ALI1563 is not set
727# CONFIG_I2C_ALI15X3 is not set
728# CONFIG_I2C_AMD756 is not set
729# CONFIG_I2C_AMD8111 is not set
730# CONFIG_I2C_I801 is not set
731# CONFIG_I2C_I810 is not set
732# CONFIG_I2C_PIIX4 is not set
733CONFIG_I2C_MPC=y
734# CONFIG_I2C_NFORCE2 is not set
735# CONFIG_I2C_OCORES is not set
736# CONFIG_I2C_PARPORT_LIGHT is not set
737# CONFIG_I2C_PROSAVAGE is not set
738# CONFIG_I2C_SAVAGE4 is not set
739# CONFIG_I2C_SIMTEC is not set
740# CONFIG_I2C_SIS5595 is not set
741# CONFIG_I2C_SIS630 is not set
742# CONFIG_I2C_SIS96X is not set
743# CONFIG_I2C_TAOS_EVM is not set
744# CONFIG_I2C_VIA is not set
745# CONFIG_I2C_VIAPRO is not set
746# CONFIG_I2C_VOODOO3 is not set
747
748#
749# Miscellaneous I2C Chip support
750#
751# CONFIG_SENSORS_DS1337 is not set
752# CONFIG_SENSORS_DS1374 is not set
753# CONFIG_DS1682 is not set
754# CONFIG_SENSORS_EEPROM is not set
755# CONFIG_SENSORS_PCF8574 is not set
756# CONFIG_SENSORS_PCA9539 is not set
757# CONFIG_SENSORS_PCF8591 is not set
758# CONFIG_SENSORS_M41T00 is not set
759# CONFIG_SENSORS_MAX6875 is not set
760# CONFIG_SENSORS_TSL2550 is not set
761# CONFIG_I2C_DEBUG_CORE is not set
762# CONFIG_I2C_DEBUG_ALGO is not set
763# CONFIG_I2C_DEBUG_BUS is not set
764# CONFIG_I2C_DEBUG_CHIP is not set
712 765
713# 766#
714# SPI support 767# SPI support
@@ -763,7 +816,119 @@ CONFIG_DUMMY_CONSOLE=y
763# 816#
764# Sound 817# Sound
765# 818#
766# CONFIG_SOUND is not set 819CONFIG_SOUND=y
820
821#
822# Advanced Linux Sound Architecture
823#
824CONFIG_SND=y
825CONFIG_SND_TIMER=y
826CONFIG_SND_PCM=y
827# CONFIG_SND_SEQUENCER is not set
828CONFIG_SND_OSSEMUL=y
829CONFIG_SND_MIXER_OSS=y
830CONFIG_SND_PCM_OSS=y
831# CONFIG_SND_PCM_OSS_PLUGINS is not set
832# CONFIG_SND_DYNAMIC_MINORS is not set
833# CONFIG_SND_SUPPORT_OLD_API is not set
834CONFIG_SND_VERBOSE_PROCFS=y
835# CONFIG_SND_VERBOSE_PRINTK is not set
836# CONFIG_SND_DEBUG is not set
837
838#
839# Generic devices
840#
841# CONFIG_SND_DUMMY is not set
842# CONFIG_SND_MTPAV is not set
843# CONFIG_SND_SERIAL_U16550 is not set
844# CONFIG_SND_MPU401 is not set
845
846#
847# PCI devices
848#
849# CONFIG_SND_AD1889 is not set
850# CONFIG_SND_ALS300 is not set
851# CONFIG_SND_ALS4000 is not set
852# CONFIG_SND_ALI5451 is not set
853# CONFIG_SND_ATIIXP is not set
854# CONFIG_SND_ATIIXP_MODEM is not set
855# CONFIG_SND_AU8810 is not set
856# CONFIG_SND_AU8820 is not set
857# CONFIG_SND_AU8830 is not set
858# CONFIG_SND_AZT3328 is not set
859# CONFIG_SND_BT87X is not set
860# CONFIG_SND_CA0106 is not set
861# CONFIG_SND_CMIPCI is not set
862# CONFIG_SND_CS4281 is not set
863# CONFIG_SND_CS46XX is not set
864# CONFIG_SND_CS5530 is not set
865# CONFIG_SND_DARLA20 is not set
866# CONFIG_SND_GINA20 is not set
867# CONFIG_SND_LAYLA20 is not set
868# CONFIG_SND_DARLA24 is not set
869# CONFIG_SND_GINA24 is not set
870# CONFIG_SND_LAYLA24 is not set
871# CONFIG_SND_MONA is not set
872# CONFIG_SND_MIA is not set
873# CONFIG_SND_ECHO3G is not set
874# CONFIG_SND_INDIGO is not set
875# CONFIG_SND_INDIGOIO is not set
876# CONFIG_SND_INDIGODJ is not set
877# CONFIG_SND_EMU10K1 is not set
878# CONFIG_SND_EMU10K1X is not set
879# CONFIG_SND_ENS1370 is not set
880# CONFIG_SND_ENS1371 is not set
881# CONFIG_SND_ES1938 is not set
882# CONFIG_SND_ES1968 is not set
883# CONFIG_SND_FM801 is not set
884# CONFIG_SND_HDA_INTEL is not set
885# CONFIG_SND_HDSP is not set
886# CONFIG_SND_HDSPM is not set
887# CONFIG_SND_ICE1712 is not set
888# CONFIG_SND_ICE1724 is not set
889# CONFIG_SND_INTEL8X0 is not set
890# CONFIG_SND_INTEL8X0M is not set
891# CONFIG_SND_KORG1212 is not set
892# CONFIG_SND_MAESTRO3 is not set
893# CONFIG_SND_MIXART is not set
894# CONFIG_SND_NM256 is not set
895# CONFIG_SND_PCXHR is not set
896# CONFIG_SND_RIPTIDE is not set
897# CONFIG_SND_RME32 is not set
898# CONFIG_SND_RME96 is not set
899# CONFIG_SND_RME9652 is not set
900# CONFIG_SND_SONICVIBES is not set
901# CONFIG_SND_TRIDENT is not set
902# CONFIG_SND_VIA82XX is not set
903# CONFIG_SND_VIA82XX_MODEM is not set
904# CONFIG_SND_VX222 is not set
905# CONFIG_SND_YMFPCI is not set
906
907#
908# ALSA PowerMac devices
909#
910
911#
912# ALSA PowerPC devices
913#
914
915#
916# System on Chip audio support
917#
918CONFIG_SND_SOC=y
919
920#
921# SoC Audio support for SuperH
922#
923
924#
925# ALSA SoC audio for Freescale SOCs
926#
927CONFIG_SND_SOC_MPC8610=y
928CONFIG_SND_SOC_MPC8610_HPCD=y
929CONFIG_SND_SOC_CS4270=y
930CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
931
767CONFIG_HID_SUPPORT=y 932CONFIG_HID_SUPPORT=y
768CONFIG_HID=y 933CONFIG_HID=y
769# CONFIG_HID_DEBUG is not set 934# CONFIG_HID_DEBUG is not set
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 292de3d6ce92..797f0dfebde2 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:49:03 2007 4# Tue Jan 15 10:26:10 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -152,7 +152,6 @@ CONFIG_PPC_PASEMI=y
152CONFIG_PPC_PASEMI_IOMMU=y 152CONFIG_PPC_PASEMI_IOMMU=y
153# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set 153# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
154CONFIG_PPC_PASEMI_MDIO=y 154CONFIG_PPC_PASEMI_MDIO=y
155CONFIG_ELECTRA_IDE=y
156# CONFIG_PPC_CELLEB is not set 155# CONFIG_PPC_CELLEB is not set
157# CONFIG_PPC_PS3 is not set 156# CONFIG_PPC_PS3 is not set
158# CONFIG_PPC_CELL is not set 157# CONFIG_PPC_CELL is not set
@@ -256,7 +255,7 @@ CONFIG_PCI_DOMAINS=y
256CONFIG_PCI_SYSCALL=y 255CONFIG_PCI_SYSCALL=y
257# CONFIG_PCIEPORTBUS is not set 256# CONFIG_PCIEPORTBUS is not set
258CONFIG_ARCH_SUPPORTS_MSI=y 257CONFIG_ARCH_SUPPORTS_MSI=y
259# CONFIG_PCI_MSI is not set 258CONFIG_PCI_MSI=y
260CONFIG_PCI_LEGACY=y 259CONFIG_PCI_LEGACY=y
261# CONFIG_PCI_DEBUG is not set 260# CONFIG_PCI_DEBUG is not set
262CONFIG_PCCARD=y 261CONFIG_PCCARD=y
@@ -663,7 +662,26 @@ CONFIG_PATA_PCMCIA=y
663# CONFIG_PATA_VIA is not set 662# CONFIG_PATA_VIA is not set
664# CONFIG_PATA_WINBOND is not set 663# CONFIG_PATA_WINBOND is not set
665CONFIG_PATA_PLATFORM=y 664CONFIG_PATA_PLATFORM=y
666# CONFIG_MD is not set 665CONFIG_PATA_OF_PLATFORM=y
666CONFIG_MD=y
667CONFIG_BLK_DEV_MD=y
668CONFIG_MD_LINEAR=y
669CONFIG_MD_RAID0=y
670CONFIG_MD_RAID1=y
671CONFIG_MD_RAID10=y
672CONFIG_MD_RAID456=y
673CONFIG_MD_RAID5_RESHAPE=y
674# CONFIG_MD_MULTIPATH is not set
675# CONFIG_MD_FAULTY is not set
676CONFIG_BLK_DEV_DM=y
677# CONFIG_DM_DEBUG is not set
678CONFIG_DM_CRYPT=y
679# CONFIG_DM_SNAPSHOT is not set
680# CONFIG_DM_MIRROR is not set
681# CONFIG_DM_ZERO is not set
682# CONFIG_DM_MULTIPATH is not set
683# CONFIG_DM_DELAY is not set
684# CONFIG_DM_UEVENT is not set
667# CONFIG_FUSION is not set 685# CONFIG_FUSION is not set
668 686
669# 687#
@@ -1686,6 +1704,10 @@ CONFIG_XMON_DISASSEMBLY=y
1686# CONFIG_KEYS is not set 1704# CONFIG_KEYS is not set
1687# CONFIG_SECURITY is not set 1705# CONFIG_SECURITY is not set
1688# CONFIG_SECURITY_FILE_CAPABILITIES is not set 1706# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1707CONFIG_XOR_BLOCKS=y
1708CONFIG_ASYNC_CORE=y
1709CONFIG_ASYNC_MEMCPY=y
1710CONFIG_ASYNC_XOR=y
1689CONFIG_CRYPTO=y 1711CONFIG_CRYPTO=y
1690CONFIG_CRYPTO_ALGAPI=y 1712CONFIG_CRYPTO_ALGAPI=y
1691CONFIG_CRYPTO_BLKCIPHER=y 1713CONFIG_CRYPTO_BLKCIPHER=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 5760b9f033ea..7695a4c66e80 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_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.24-rc4 3# Linux kernel version: 2.6.24-rc4
4# Thu Dec 6 16:49:07 2007 4# Fri Dec 21 14:47:29 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -211,7 +211,7 @@ CONFIG_MMIO_NVRAM=y
211CONFIG_MPIC_U3_HT_IRQS=y 211CONFIG_MPIC_U3_HT_IRQS=y
212CONFIG_MPIC_BROKEN_REGREAD=y 212CONFIG_MPIC_BROKEN_REGREAD=y
213CONFIG_IBMVIO=y 213CONFIG_IBMVIO=y
214# CONFIG_IBMEBUS is not set 214CONFIG_IBMEBUS=y
215# CONFIG_PPC_MPC106 is not set 215# CONFIG_PPC_MPC106 is not set
216CONFIG_PPC_970_NAP=y 216CONFIG_PPC_970_NAP=y
217CONFIG_PPC_INDIRECT_IO=y 217CONFIG_PPC_INDIRECT_IO=y
@@ -375,7 +375,7 @@ CONFIG_INET_TUNNEL=y
375CONFIG_INET_XFRM_MODE_TRANSPORT=y 375CONFIG_INET_XFRM_MODE_TRANSPORT=y
376CONFIG_INET_XFRM_MODE_TUNNEL=y 376CONFIG_INET_XFRM_MODE_TUNNEL=y
377CONFIG_INET_XFRM_MODE_BEET=y 377CONFIG_INET_XFRM_MODE_BEET=y
378# CONFIG_INET_LRO is not set 378CONFIG_INET_LRO=m
379CONFIG_INET_DIAG=y 379CONFIG_INET_DIAG=y
380CONFIG_INET_TCP_DIAG=y 380CONFIG_INET_TCP_DIAG=y
381# CONFIG_TCP_CONG_ADVANCED is not set 381# CONFIG_TCP_CONG_ADVANCED is not set
@@ -929,6 +929,7 @@ CONFIG_SPIDER_NET=m
929CONFIG_NETDEV_10000=y 929CONFIG_NETDEV_10000=y
930# CONFIG_CHELSIO_T1 is not set 930# CONFIG_CHELSIO_T1 is not set
931# CONFIG_CHELSIO_T3 is not set 931# CONFIG_CHELSIO_T3 is not set
932CONFIG_EHEA=m
932# CONFIG_IXGBE is not set 933# CONFIG_IXGBE is not set
933CONFIG_IXGB=m 934CONFIG_IXGB=m
934# CONFIG_IXGB_NAPI is not set 935# CONFIG_IXGB_NAPI is not set
@@ -1558,6 +1559,7 @@ CONFIG_INFINIBAND_ADDR_TRANS=y
1558CONFIG_INFINIBAND_MTHCA=m 1559CONFIG_INFINIBAND_MTHCA=m
1559CONFIG_INFINIBAND_MTHCA_DEBUG=y 1560CONFIG_INFINIBAND_MTHCA_DEBUG=y
1560# CONFIG_INFINIBAND_IPATH is not set 1561# CONFIG_INFINIBAND_IPATH is not set
1562CONFIG_INFINIBAND_EHCA=m
1561# CONFIG_INFINIBAND_AMSO1100 is not set 1563# CONFIG_INFINIBAND_AMSO1100 is not set
1562# CONFIG_MLX4_INFINIBAND is not set 1564# CONFIG_MLX4_INFINIBAND is not set
1563CONFIG_INFINIBAND_IPOIB=m 1565CONFIG_INFINIBAND_IPOIB=m
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 0b5469fb6e0f..7994955c29d3 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.24-rc4 3# Linux kernel version: 2.6.24-rc8
4# Tue Dec 4 22:49:57 2007 4# Wed Jan 16 14:31:21 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -103,6 +103,7 @@ CONFIG_VM_EVENT_COUNTERS=y
103CONFIG_SLAB=y 103CONFIG_SLAB=y
104# CONFIG_SLUB is not set 104# CONFIG_SLUB is not set
105# CONFIG_SLOB is not set 105# CONFIG_SLOB is not set
106CONFIG_SLABINFO=y
106CONFIG_RT_MUTEXES=y 107CONFIG_RT_MUTEXES=y
107# CONFIG_TINY_SHMEM is not set 108# CONFIG_TINY_SHMEM is not set
108CONFIG_BASE_SMALL=0 109CONFIG_BASE_SMALL=0
@@ -154,7 +155,6 @@ CONFIG_PPC_PS3=y
154# CONFIG_PS3_ADVANCED is not set 155# CONFIG_PS3_ADVANCED is not set
155CONFIG_PS3_HTAB_SIZE=20 156CONFIG_PS3_HTAB_SIZE=20
156# CONFIG_PS3_DYNAMIC_DMA is not set 157# CONFIG_PS3_DYNAMIC_DMA is not set
157CONFIG_PS3_USE_LPAR_ADDR=y
158CONFIG_PS3_VUART=y 158CONFIG_PS3_VUART=y
159CONFIG_PS3_PS3AV=y 159CONFIG_PS3_PS3AV=y
160CONFIG_PS3_SYS_MANAGER=y 160CONFIG_PS3_SYS_MANAGER=y
@@ -162,6 +162,7 @@ CONFIG_PS3_STORAGE=y
162CONFIG_PS3_DISK=y 162CONFIG_PS3_DISK=y
163CONFIG_PS3_ROM=y 163CONFIG_PS3_ROM=y
164CONFIG_PS3_FLASH=y 164CONFIG_PS3_FLASH=y
165CONFIG_PS3_LPM=m
165CONFIG_PPC_CELL=y 166CONFIG_PPC_CELL=y
166# CONFIG_PPC_CELL_NATIVE is not set 167# CONFIG_PPC_CELL_NATIVE is not set
167# CONFIG_PPC_IBM_CELL_BLADE is not set 168# CONFIG_PPC_IBM_CELL_BLADE is not set
@@ -225,7 +226,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y
225# CONFIG_SPARSEMEM_STATIC is not set 226# CONFIG_SPARSEMEM_STATIC is not set
226CONFIG_SPARSEMEM_EXTREME=y 227CONFIG_SPARSEMEM_EXTREME=y
227CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 228CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
228CONFIG_SPARSEMEM_VMEMMAP=y 229# CONFIG_SPARSEMEM_VMEMMAP is not set
229CONFIG_MEMORY_HOTPLUG=y 230CONFIG_MEMORY_HOTPLUG=y
230CONFIG_MEMORY_HOTPLUG_SPARSE=y 231CONFIG_MEMORY_HOTPLUG_SPARSE=y
231CONFIG_SPLIT_PTLOCK_CPUS=4 232CONFIG_SPLIT_PTLOCK_CPUS=4
@@ -338,7 +339,26 @@ CONFIG_IPV6_SIT=y
338# CONFIG_NET_PKTGEN is not set 339# CONFIG_NET_PKTGEN is not set
339# CONFIG_HAMRADIO is not set 340# CONFIG_HAMRADIO is not set
340# CONFIG_IRDA is not set 341# CONFIG_IRDA is not set
341# CONFIG_BT is not set 342CONFIG_BT=m
343CONFIG_BT_L2CAP=m
344CONFIG_BT_SCO=m
345CONFIG_BT_RFCOMM=m
346CONFIG_BT_RFCOMM_TTY=y
347CONFIG_BT_BNEP=m
348CONFIG_BT_BNEP_MC_FILTER=y
349CONFIG_BT_BNEP_PROTO_FILTER=y
350CONFIG_BT_HIDP=m
351
352#
353# Bluetooth device drivers
354#
355CONFIG_BT_HCIUSB=m
356CONFIG_BT_HCIUSB_SCO=y
357# CONFIG_BT_HCIUART is not set
358# CONFIG_BT_HCIBCM203X is not set
359# CONFIG_BT_HCIBPA10X is not set
360# CONFIG_BT_HCIBFUSB is not set
361# CONFIG_BT_HCIVHCI is not set
342# CONFIG_AF_RXRPC is not set 362# CONFIG_AF_RXRPC is not set
343 363
344# 364#
@@ -666,14 +686,14 @@ CONFIG_LOGO_LINUX_CLUT224=y
666# 686#
667# Sound 687# Sound
668# 688#
669CONFIG_SOUND=y 689CONFIG_SOUND=m
670 690
671# 691#
672# Advanced Linux Sound Architecture 692# Advanced Linux Sound Architecture
673# 693#
674CONFIG_SND=y 694CONFIG_SND=m
675CONFIG_SND_TIMER=y 695CONFIG_SND_TIMER=m
676CONFIG_SND_PCM=y 696CONFIG_SND_PCM=m
677# CONFIG_SND_SEQUENCER is not set 697# CONFIG_SND_SEQUENCER is not set
678# CONFIG_SND_MIXER_OSS is not set 698# CONFIG_SND_MIXER_OSS is not set
679# CONFIG_SND_PCM_OSS is not set 699# CONFIG_SND_PCM_OSS is not set
@@ -702,7 +722,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
702# 722#
703# ALSA PowerPC devices 723# ALSA PowerPC devices
704# 724#
705CONFIG_SND_PS3=y 725CONFIG_SND_PS3=m
706CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 726CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
707 727
708# 728#
@@ -747,7 +767,7 @@ CONFIG_USB_SUPPORT=y
747CONFIG_USB_ARCH_HAS_HCD=y 767CONFIG_USB_ARCH_HAS_HCD=y
748CONFIG_USB_ARCH_HAS_OHCI=y 768CONFIG_USB_ARCH_HAS_OHCI=y
749CONFIG_USB_ARCH_HAS_EHCI=y 769CONFIG_USB_ARCH_HAS_EHCI=y
750CONFIG_USB=y 770CONFIG_USB=m
751# CONFIG_USB_DEBUG is not set 771# CONFIG_USB_DEBUG is not set
752 772
753# 773#
@@ -761,13 +781,13 @@ CONFIG_USB_DEVICEFS=y
761# 781#
762# USB Host Controller Drivers 782# USB Host Controller Drivers
763# 783#
764CONFIG_USB_EHCI_HCD=y 784CONFIG_USB_EHCI_HCD=m
765# CONFIG_USB_EHCI_SPLIT_ISO is not set 785# CONFIG_USB_EHCI_SPLIT_ISO is not set
766# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 786# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
767# CONFIG_USB_EHCI_TT_NEWSCHED is not set 787# CONFIG_USB_EHCI_TT_NEWSCHED is not set
768CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y 788CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
769# CONFIG_USB_ISP116X_HCD is not set 789# CONFIG_USB_ISP116X_HCD is not set
770CONFIG_USB_OHCI_HCD=y 790CONFIG_USB_OHCI_HCD=m
771# CONFIG_USB_OHCI_HCD_PPC_OF is not set 791# CONFIG_USB_OHCI_HCD_PPC_OF is not set
772# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 792# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
773CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y 793CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -1033,7 +1053,8 @@ CONFIG_HAS_IOMEM=y
1033CONFIG_HAS_IOPORT=y 1053CONFIG_HAS_IOPORT=y
1034CONFIG_HAS_DMA=y 1054CONFIG_HAS_DMA=y
1035CONFIG_INSTRUMENTATION=y 1055CONFIG_INSTRUMENTATION=y
1036# CONFIG_PROFILING is not set 1056CONFIG_PROFILING=y
1057CONFIG_OPROFILE=m
1037# CONFIG_KPROBES is not set 1058# CONFIG_KPROBES is not set
1038# CONFIG_MARKERS is not set 1059# CONFIG_MARKERS is not set
1039 1060
diff --git a/arch/powerpc/configs/rainier_defconfig b/arch/powerpc/configs/rainier_defconfig
new file mode 100644
index 000000000000..7b95001a22a8
--- /dev/null
+++ b/arch/powerpc/configs/rainier_defconfig
@@ -0,0 +1,873 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Mon Dec 24 11:22:40 2007
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_4xx=y
18CONFIG_BOOKE=y
19CONFIG_PTE_64BIT=y
20CONFIG_PHYS_64BIT=y
21# CONFIG_PPC_MM_SLICES is not set
22CONFIG_NOT_COHERENT_CACHE=y
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set
51CONFIG_PPC_DCR_NATIVE=y
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_PPC_DCR=y
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
55
56#
57# General setup
58#
59CONFIG_EXPERIMENTAL=y
60CONFIG_BROKEN_ON_SMP=y
61CONFIG_INIT_ENV_ARG_LIMIT=32
62CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y
65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
67CONFIG_POSIX_MQUEUE=y
68# CONFIG_BSD_PROCESS_ACCT is not set
69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
72# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_ALL is not set
89# CONFIG_KALLSYMS_EXTRA_PASS is not set
90CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_BASE_FULL=y
95CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y
97CONFIG_EPOLL=y
98CONFIG_SIGNALFD=y
99CONFIG_EVENTFD=y
100CONFIG_SHMEM=y
101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLUB_DEBUG=y
103# CONFIG_SLAB is not set
104CONFIG_SLUB=y
105# CONFIG_SLOB is not set
106CONFIG_RT_MUTEXES=y
107# CONFIG_TINY_SHMEM is not set
108CONFIG_BASE_SMALL=0
109CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set
112# CONFIG_MODVERSIONS is not set
113# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_KMOD=y
115CONFIG_BLOCK=y
116CONFIG_LBD=y
117# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set
119# CONFIG_BLK_DEV_BSG is not set
120
121#
122# IO Schedulers
123#
124CONFIG_IOSCHED_NOOP=y
125CONFIG_IOSCHED_AS=y
126CONFIG_IOSCHED_DEADLINE=y
127CONFIG_IOSCHED_CFQ=y
128CONFIG_DEFAULT_AS=y
129# CONFIG_DEFAULT_DEADLINE is not set
130# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory"
133# CONFIG_PPC4xx_PCI_EXPRESS is not set
134
135#
136# Platform support
137#
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_BAMBOO is not set
144# CONFIG_EBONY is not set
145# CONFIG_SEQUOIA is not set
146# CONFIG_TAISHAN is not set
147# CONFIG_KATMAI is not set
148CONFIG_RAINIER=y
149CONFIG_440GRX=y
150# CONFIG_MPIC is not set
151# CONFIG_MPIC_WEIRD is not set
152# CONFIG_PPC_I8259 is not set
153# CONFIG_PPC_RTAS is not set
154# CONFIG_MMIO_NVRAM is not set
155# CONFIG_PPC_MPC106 is not set
156# CONFIG_PPC_970_NAP is not set
157# CONFIG_PPC_INDIRECT_IO is not set
158# CONFIG_GENERIC_IOMAP is not set
159# CONFIG_CPU_FREQ is not set
160# CONFIG_CPM2 is not set
161# CONFIG_FSL_ULI1575 is not set
162
163#
164# Kernel options
165#
166# CONFIG_HIGHMEM is not set
167# CONFIG_TICK_ONESHOT is not set
168# CONFIG_NO_HZ is not set
169# CONFIG_HIGH_RES_TIMERS is not set
170CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
171# CONFIG_HZ_100 is not set
172CONFIG_HZ_250=y
173# CONFIG_HZ_300 is not set
174# CONFIG_HZ_1000 is not set
175CONFIG_HZ=250
176CONFIG_PREEMPT_NONE=y
177# CONFIG_PREEMPT_VOLUNTARY is not set
178# CONFIG_PREEMPT is not set
179CONFIG_BINFMT_ELF=y
180# CONFIG_BINFMT_MISC is not set
181CONFIG_MATH_EMULATION=y
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
183CONFIG_ARCH_FLATMEM_ENABLE=y
184CONFIG_ARCH_POPULATES_NODE_MAP=y
185CONFIG_SELECT_MEMORY_MODEL=y
186CONFIG_FLATMEM_MANUAL=y
187# CONFIG_DISCONTIGMEM_MANUAL is not set
188# CONFIG_SPARSEMEM_MANUAL is not set
189CONFIG_FLATMEM=y
190CONFIG_FLAT_NODE_MEM_MAP=y
191# CONFIG_SPARSEMEM_STATIC is not set
192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
193CONFIG_SPLIT_PTLOCK_CPUS=4
194CONFIG_RESOURCES_64BIT=y
195CONFIG_ZONE_DMA_FLAG=1
196CONFIG_BOUNCE=y
197CONFIG_VIRT_TO_BUS=y
198CONFIG_PROC_DEVICETREE=y
199CONFIG_CMDLINE_BOOL=y
200CONFIG_CMDLINE=""
201CONFIG_SECCOMP=y
202CONFIG_WANT_DEVICE_TREE=y
203CONFIG_DEVICE_TREE="rainier.dts"
204CONFIG_ISA_DMA_API=y
205
206#
207# Bus options
208#
209CONFIG_ZONE_DMA=y
210CONFIG_PPC_INDIRECT_PCI=y
211CONFIG_PCI=y
212CONFIG_PCI_DOMAINS=y
213CONFIG_PCI_SYSCALL=y
214# CONFIG_PCIEPORTBUS is not set
215CONFIG_ARCH_SUPPORTS_MSI=y
216# CONFIG_PCI_MSI is not set
217CONFIG_PCI_LEGACY=y
218# CONFIG_PCI_DEBUG is not set
219# CONFIG_PCCARD is not set
220# CONFIG_HOTPLUG_PCI is not set
221
222#
223# Advanced setup
224#
225# CONFIG_ADVANCED_OPTIONS is not set
226
227#
228# Default settings for advanced configuration options are used
229#
230CONFIG_HIGHMEM_START=0xfe000000
231CONFIG_LOWMEM_SIZE=0x30000000
232CONFIG_KERNEL_START=0xc0000000
233CONFIG_TASK_SIZE=0xc0000000
234CONFIG_CONSISTENT_START=0xff100000
235CONFIG_CONSISTENT_SIZE=0x00200000
236CONFIG_BOOT_LOAD=0x01000000
237
238#
239# Networking
240#
241CONFIG_NET=y
242
243#
244# Networking options
245#
246CONFIG_PACKET=y
247# CONFIG_PACKET_MMAP is not set
248CONFIG_UNIX=y
249# CONFIG_NET_KEY is not set
250CONFIG_INET=y
251# CONFIG_IP_MULTICAST is not set
252# CONFIG_IP_ADVANCED_ROUTER is not set
253CONFIG_IP_FIB_HASH=y
254CONFIG_IP_PNP=y
255CONFIG_IP_PNP_DHCP=y
256CONFIG_IP_PNP_BOOTP=y
257# CONFIG_IP_PNP_RARP is not set
258# CONFIG_NET_IPIP is not set
259# CONFIG_NET_IPGRE is not set
260# CONFIG_ARPD is not set
261# CONFIG_SYN_COOKIES is not set
262# CONFIG_INET_AH is not set
263# CONFIG_INET_ESP is not set
264# CONFIG_INET_IPCOMP is not set
265# CONFIG_INET_XFRM_TUNNEL is not set
266# CONFIG_INET_TUNNEL is not set
267# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
268# CONFIG_INET_XFRM_MODE_TUNNEL is not set
269# CONFIG_INET_XFRM_MODE_BEET is not set
270# CONFIG_INET_LRO is not set
271CONFIG_INET_DIAG=y
272CONFIG_INET_TCP_DIAG=y
273# CONFIG_TCP_CONG_ADVANCED is not set
274CONFIG_TCP_CONG_CUBIC=y
275CONFIG_DEFAULT_TCP_CONG="cubic"
276# CONFIG_TCP_MD5SIG is not set
277# CONFIG_IPV6 is not set
278# CONFIG_INET6_XFRM_TUNNEL is not set
279# CONFIG_INET6_TUNNEL is not set
280# CONFIG_NETWORK_SECMARK is not set
281# CONFIG_NETFILTER is not set
282# CONFIG_IP_DCCP is not set
283# CONFIG_IP_SCTP is not set
284# CONFIG_TIPC is not set
285# CONFIG_ATM is not set
286# CONFIG_BRIDGE is not set
287# CONFIG_VLAN_8021Q is not set
288# CONFIG_DECNET is not set
289# CONFIG_LLC2 is not set
290# CONFIG_IPX is not set
291# CONFIG_ATALK is not set
292# CONFIG_X25 is not set
293# CONFIG_LAPB is not set
294# CONFIG_ECONET is not set
295# CONFIG_WAN_ROUTER is not set
296# CONFIG_NET_SCHED is not set
297
298#
299# Network testing
300#
301# CONFIG_NET_PKTGEN is not set
302# CONFIG_HAMRADIO is not set
303# CONFIG_IRDA is not set
304# CONFIG_BT is not set
305# CONFIG_AF_RXRPC is not set
306
307#
308# Wireless
309#
310# CONFIG_CFG80211 is not set
311# CONFIG_WIRELESS_EXT is not set
312# CONFIG_MAC80211 is not set
313# CONFIG_IEEE80211 is not set
314# CONFIG_RFKILL is not set
315# CONFIG_NET_9P is not set
316
317#
318# Device Drivers
319#
320
321#
322# Generic Driver Options
323#
324CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
325CONFIG_STANDALONE=y
326CONFIG_PREVENT_FIRMWARE_BUILD=y
327CONFIG_FW_LOADER=y
328# CONFIG_DEBUG_DRIVER is not set
329# CONFIG_DEBUG_DEVRES is not set
330# CONFIG_SYS_HYPERVISOR is not set
331CONFIG_CONNECTOR=y
332CONFIG_PROC_EVENTS=y
333CONFIG_MTD=y
334# CONFIG_MTD_DEBUG is not set
335# CONFIG_MTD_CONCAT is not set
336CONFIG_MTD_PARTITIONS=y
337# CONFIG_MTD_REDBOOT_PARTS is not set
338CONFIG_MTD_CMDLINE_PARTS=y
339
340#
341# User Modules And Translation Layers
342#
343CONFIG_MTD_CHAR=y
344# CONFIG_MTD_BLKDEVS is not set
345# CONFIG_MTD_BLOCK is not set
346# CONFIG_MTD_BLOCK_RO is not set
347# CONFIG_FTL is not set
348# CONFIG_NFTL is not set
349# CONFIG_INFTL is not set
350# CONFIG_RFD_FTL is not set
351# CONFIG_SSFDC is not set
352# CONFIG_MTD_OOPS is not set
353
354#
355# RAM/ROM/Flash chip drivers
356#
357CONFIG_MTD_CFI=y
358CONFIG_MTD_JEDECPROBE=y
359CONFIG_MTD_GEN_PROBE=y
360# CONFIG_MTD_CFI_ADV_OPTIONS is not set
361CONFIG_MTD_MAP_BANK_WIDTH_1=y
362CONFIG_MTD_MAP_BANK_WIDTH_2=y
363CONFIG_MTD_MAP_BANK_WIDTH_4=y
364# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
365# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
366# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
367CONFIG_MTD_CFI_I1=y
368CONFIG_MTD_CFI_I2=y
369# CONFIG_MTD_CFI_I4 is not set
370# CONFIG_MTD_CFI_I8 is not set
371CONFIG_MTD_CFI_INTELEXT=y
372CONFIG_MTD_CFI_AMDSTD=y
373# CONFIG_MTD_CFI_STAA is not set
374CONFIG_MTD_CFI_UTIL=y
375# CONFIG_MTD_RAM is not set
376# CONFIG_MTD_ROM is not set
377# CONFIG_MTD_ABSENT is not set
378
379#
380# Mapping drivers for chip access
381#
382# CONFIG_MTD_COMPLEX_MAPPINGS is not set
383# CONFIG_MTD_PHYSMAP is not set
384CONFIG_MTD_PHYSMAP_OF=y
385# CONFIG_MTD_INTEL_VR_NOR is not set
386# CONFIG_MTD_PLATRAM is not set
387
388#
389# Self-contained MTD device drivers
390#
391# CONFIG_MTD_PMC551 is not set
392# CONFIG_MTD_SLRAM is not set
393# CONFIG_MTD_PHRAM is not set
394# CONFIG_MTD_MTDRAM is not set
395# CONFIG_MTD_BLOCK2MTD is not set
396
397#
398# Disk-On-Chip Device Drivers
399#
400# CONFIG_MTD_DOC2000 is not set
401# CONFIG_MTD_DOC2001 is not set
402# CONFIG_MTD_DOC2001PLUS is not set
403# CONFIG_MTD_NAND is not set
404# CONFIG_MTD_ONENAND is not set
405
406#
407# UBI - Unsorted block images
408#
409# CONFIG_MTD_UBI is not set
410CONFIG_OF_DEVICE=y
411# CONFIG_PARPORT is not set
412CONFIG_BLK_DEV=y
413# CONFIG_BLK_DEV_FD is not set
414# CONFIG_BLK_CPQ_DA is not set
415# CONFIG_BLK_CPQ_CISS_DA is not set
416# CONFIG_BLK_DEV_DAC960 is not set
417# CONFIG_BLK_DEV_UMEM is not set
418# CONFIG_BLK_DEV_COW_COMMON is not set
419# CONFIG_BLK_DEV_LOOP is not set
420# CONFIG_BLK_DEV_NBD is not set
421# CONFIG_BLK_DEV_SX8 is not set
422CONFIG_BLK_DEV_RAM=y
423CONFIG_BLK_DEV_RAM_COUNT=16
424CONFIG_BLK_DEV_RAM_SIZE=35000
425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
426# CONFIG_CDROM_PKTCDVD is not set
427# CONFIG_ATA_OVER_ETH is not set
428# CONFIG_XILINX_SYSACE is not set
429CONFIG_MISC_DEVICES=y
430# CONFIG_PHANTOM is not set
431# CONFIG_EEPROM_93CX6 is not set
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
434# CONFIG_IDE is not set
435
436#
437# SCSI device support
438#
439# CONFIG_RAID_ATTRS is not set
440# CONFIG_SCSI is not set
441# CONFIG_SCSI_DMA is not set
442# CONFIG_SCSI_NETLINK is not set
443# CONFIG_ATA is not set
444# CONFIG_MD is not set
445# CONFIG_FUSION is not set
446
447#
448# IEEE 1394 (FireWire) support
449#
450# CONFIG_FIREWIRE is not set
451# CONFIG_IEEE1394 is not set
452# CONFIG_I2O is not set
453CONFIG_MACINTOSH_DRIVERS=y
454# CONFIG_MAC_EMUMOUSEBTN is not set
455# CONFIG_WINDFARM is not set
456CONFIG_NETDEVICES=y
457# CONFIG_NETDEVICES_MULTIQUEUE is not set
458# CONFIG_DUMMY is not set
459# CONFIG_BONDING is not set
460# CONFIG_MACVLAN is not set
461# CONFIG_EQUALIZER is not set
462# CONFIG_TUN is not set
463# CONFIG_VETH is not set
464# CONFIG_IP1000 is not set
465# CONFIG_ARCNET is not set
466# CONFIG_NET_ETHERNET is not set
467CONFIG_IBM_NEW_EMAC_ZMII=y
468CONFIG_IBM_NEW_EMAC_RGMII=y
469CONFIG_IBM_NEW_EMAC_EMAC4=y
470CONFIG_NETDEV_1000=y
471# CONFIG_ACENIC is not set
472# CONFIG_DL2K is not set
473# CONFIG_E1000 is not set
474# CONFIG_E1000E is not set
475# CONFIG_NS83820 is not set
476# CONFIG_HAMACHI is not set
477# CONFIG_YELLOWFIN is not set
478# CONFIG_R8169 is not set
479# CONFIG_SIS190 is not set
480# CONFIG_SKGE is not set
481# CONFIG_SKY2 is not set
482# CONFIG_SK98LIN is not set
483# CONFIG_VIA_VELOCITY is not set
484# CONFIG_TIGON3 is not set
485# CONFIG_BNX2 is not set
486# CONFIG_QLA3XXX is not set
487# CONFIG_ATL1 is not set
488CONFIG_NETDEV_10000=y
489# CONFIG_CHELSIO_T1 is not set
490# CONFIG_CHELSIO_T3 is not set
491# CONFIG_IXGBE is not set
492# CONFIG_IXGB is not set
493# CONFIG_S2IO is not set
494# CONFIG_MYRI10GE is not set
495# CONFIG_NETXEN_NIC is not set
496# CONFIG_NIU is not set
497# CONFIG_MLX4_CORE is not set
498# CONFIG_TEHUTI is not set
499# CONFIG_TR is not set
500
501#
502# Wireless LAN
503#
504# CONFIG_WLAN_PRE80211 is not set
505# CONFIG_WLAN_80211 is not set
506# CONFIG_WAN is not set
507# CONFIG_FDDI is not set
508# CONFIG_HIPPI is not set
509# CONFIG_PPP is not set
510# CONFIG_SLIP is not set
511# CONFIG_SHAPER is not set
512# CONFIG_NETCONSOLE is not set
513# CONFIG_NETPOLL is not set
514# CONFIG_NET_POLL_CONTROLLER is not set
515# CONFIG_ISDN is not set
516# CONFIG_PHONE is not set
517
518#
519# Input device support
520#
521# CONFIG_INPUT 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
540# CONFIG_SERIAL_8250_PCI is not set
541CONFIG_SERIAL_8250_NR_UARTS=4
542CONFIG_SERIAL_8250_RUNTIME_UARTS=4
543CONFIG_SERIAL_8250_EXTENDED=y
544# CONFIG_SERIAL_8250_MANY_PORTS is not set
545CONFIG_SERIAL_8250_SHARE_IRQ=y
546# CONFIG_SERIAL_8250_DETECT_IRQ is not set
547# CONFIG_SERIAL_8250_RSA is not set
548
549#
550# Non-8250 serial port support
551#
552# CONFIG_SERIAL_UARTLITE is not set
553CONFIG_SERIAL_CORE=y
554CONFIG_SERIAL_CORE_CONSOLE=y
555# CONFIG_SERIAL_JSM is not set
556CONFIG_SERIAL_OF_PLATFORM=y
557CONFIG_UNIX98_PTYS=y
558CONFIG_LEGACY_PTYS=y
559CONFIG_LEGACY_PTY_COUNT=256
560# CONFIG_IPMI_HANDLER is not set
561# CONFIG_HW_RANDOM is not set
562# CONFIG_NVRAM is not set
563# CONFIG_GEN_RTC is not set
564# CONFIG_R3964 is not set
565# CONFIG_APPLICOM is not set
566# CONFIG_RAW_DRIVER is not set
567# CONFIG_TCG_TPM is not set
568CONFIG_DEVPORT=y
569# CONFIG_I2C is not set
570
571#
572# SPI support
573#
574# CONFIG_SPI is not set
575# CONFIG_SPI_MASTER is not set
576# CONFIG_W1 is not set
577# CONFIG_POWER_SUPPLY is not set
578# CONFIG_HWMON is not set
579# CONFIG_WATCHDOG is not set
580
581#
582# Sonics Silicon Backplane
583#
584CONFIG_SSB_POSSIBLE=y
585# CONFIG_SSB is not set
586
587#
588# Multifunction device drivers
589#
590# CONFIG_MFD_SM501 is not set
591
592#
593# Multimedia devices
594#
595# CONFIG_VIDEO_DEV is not set
596# CONFIG_DVB_CORE is not set
597CONFIG_DAB=y
598
599#
600# Graphics support
601#
602# CONFIG_AGP is not set
603# CONFIG_DRM is not set
604# CONFIG_VGASTATE is not set
605CONFIG_VIDEO_OUTPUT_CONTROL=m
606# CONFIG_FB is not set
607# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
608
609#
610# Display device support
611#
612# CONFIG_DISPLAY_SUPPORT is not set
613
614#
615# Sound
616#
617# CONFIG_SOUND is not set
618CONFIG_USB_SUPPORT=y
619CONFIG_USB_ARCH_HAS_HCD=y
620CONFIG_USB_ARCH_HAS_OHCI=y
621CONFIG_USB_ARCH_HAS_EHCI=y
622# CONFIG_USB is not set
623
624#
625# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
626#
627
628#
629# USB Gadget Support
630#
631# CONFIG_USB_GADGET is not set
632# CONFIG_MMC is not set
633# CONFIG_NEW_LEDS is not set
634# CONFIG_INFINIBAND is not set
635# CONFIG_EDAC is not set
636# CONFIG_RTC_CLASS is not set
637
638#
639# Userspace I/O
640#
641# CONFIG_UIO is not set
642
643#
644# File systems
645#
646CONFIG_EXT2_FS=y
647# CONFIG_EXT2_FS_XATTR is not set
648# CONFIG_EXT2_FS_XIP is not set
649# CONFIG_EXT3_FS is not set
650# CONFIG_EXT4DEV_FS is not set
651# CONFIG_REISERFS_FS is not set
652# CONFIG_JFS_FS is not set
653# CONFIG_FS_POSIX_ACL is not set
654# CONFIG_XFS_FS is not set
655# CONFIG_GFS2_FS is not set
656# CONFIG_OCFS2_FS is not set
657# CONFIG_MINIX_FS is not set
658# CONFIG_ROMFS_FS is not set
659CONFIG_INOTIFY=y
660CONFIG_INOTIFY_USER=y
661# CONFIG_QUOTA is not set
662CONFIG_DNOTIFY=y
663# CONFIG_AUTOFS_FS is not set
664# CONFIG_AUTOFS4_FS is not set
665# CONFIG_FUSE_FS is not set
666
667#
668# CD-ROM/DVD Filesystems
669#
670# CONFIG_ISO9660_FS is not set
671# CONFIG_UDF_FS is not set
672
673#
674# DOS/FAT/NT Filesystems
675#
676# CONFIG_MSDOS_FS is not set
677# CONFIG_VFAT_FS is not set
678# CONFIG_NTFS_FS is not set
679
680#
681# Pseudo filesystems
682#
683CONFIG_PROC_FS=y
684CONFIG_PROC_KCORE=y
685CONFIG_PROC_SYSCTL=y
686CONFIG_SYSFS=y
687CONFIG_TMPFS=y
688# CONFIG_TMPFS_POSIX_ACL is not set
689# CONFIG_HUGETLB_PAGE is not set
690# CONFIG_CONFIGFS_FS is not set
691
692#
693# Miscellaneous filesystems
694#
695# CONFIG_ADFS_FS is not set
696# CONFIG_AFFS_FS is not set
697# CONFIG_HFS_FS is not set
698# CONFIG_HFSPLUS_FS is not set
699# CONFIG_BEFS_FS is not set
700# CONFIG_BFS_FS is not set
701# CONFIG_EFS_FS is not set
702CONFIG_JFFS2_FS=y
703CONFIG_JFFS2_FS_DEBUG=0
704CONFIG_JFFS2_FS_WRITEBUFFER=y
705# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
706# CONFIG_JFFS2_SUMMARY is not set
707# CONFIG_JFFS2_FS_XATTR is not set
708# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
709CONFIG_JFFS2_ZLIB=y
710# CONFIG_JFFS2_LZO is not set
711CONFIG_JFFS2_RTIME=y
712# CONFIG_JFFS2_RUBIN is not set
713CONFIG_CRAMFS=y
714# CONFIG_VXFS_FS is not set
715# CONFIG_HPFS_FS is not set
716# CONFIG_QNX4FS_FS is not set
717# CONFIG_SYSV_FS is not set
718# CONFIG_UFS_FS is not set
719CONFIG_NETWORK_FILESYSTEMS=y
720CONFIG_NFS_FS=y
721CONFIG_NFS_V3=y
722# CONFIG_NFS_V3_ACL is not set
723# CONFIG_NFS_V4 is not set
724# CONFIG_NFS_DIRECTIO is not set
725# CONFIG_NFSD is not set
726CONFIG_ROOT_NFS=y
727CONFIG_LOCKD=y
728CONFIG_LOCKD_V4=y
729CONFIG_NFS_COMMON=y
730CONFIG_SUNRPC=y
731# CONFIG_SUNRPC_BIND34 is not set
732# CONFIG_RPCSEC_GSS_KRB5 is not set
733# CONFIG_RPCSEC_GSS_SPKM3 is not set
734# CONFIG_SMB_FS is not set
735# CONFIG_CIFS is not set
736# CONFIG_NCP_FS is not set
737# CONFIG_CODA_FS is not set
738# CONFIG_AFS_FS is not set
739
740#
741# Partition Types
742#
743# CONFIG_PARTITION_ADVANCED is not set
744CONFIG_MSDOS_PARTITION=y
745# CONFIG_NLS is not set
746# CONFIG_DLM is not set
747# CONFIG_UCC_SLOW is not set
748
749#
750# Library routines
751#
752CONFIG_BITREVERSE=y
753# CONFIG_CRC_CCITT is not set
754# CONFIG_CRC16 is not set
755# CONFIG_CRC_ITU_T is not set
756CONFIG_CRC32=y
757# CONFIG_CRC7 is not set
758# CONFIG_LIBCRC32C is not set
759CONFIG_ZLIB_INFLATE=y
760CONFIG_ZLIB_DEFLATE=y
761CONFIG_PLIST=y
762CONFIG_HAS_IOMEM=y
763CONFIG_HAS_IOPORT=y
764CONFIG_HAS_DMA=y
765CONFIG_INSTRUMENTATION=y
766# CONFIG_PROFILING is not set
767# CONFIG_KPROBES is not set
768# CONFIG_MARKERS is not set
769
770#
771# Kernel hacking
772#
773# CONFIG_PRINTK_TIME is not set
774CONFIG_ENABLE_WARN_DEPRECATED=y
775CONFIG_ENABLE_MUST_CHECK=y
776CONFIG_MAGIC_SYSRQ=y
777# CONFIG_UNUSED_SYMBOLS is not set
778# CONFIG_DEBUG_FS is not set
779# CONFIG_HEADERS_CHECK is not set
780CONFIG_DEBUG_KERNEL=y
781# CONFIG_DEBUG_SHIRQ is not set
782CONFIG_DETECT_SOFTLOCKUP=y
783CONFIG_SCHED_DEBUG=y
784# CONFIG_SCHEDSTATS is not set
785# CONFIG_TIMER_STATS is not set
786# CONFIG_SLUB_DEBUG_ON is not set
787# CONFIG_DEBUG_RT_MUTEXES is not set
788# CONFIG_RT_MUTEX_TESTER is not set
789# CONFIG_DEBUG_SPINLOCK is not set
790# CONFIG_DEBUG_MUTEXES is not set
791# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
792# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
793# CONFIG_DEBUG_KOBJECT is not set
794# CONFIG_DEBUG_BUGVERBOSE is not set
795# CONFIG_DEBUG_INFO is not set
796# CONFIG_DEBUG_VM is not set
797# CONFIG_DEBUG_LIST is not set
798# CONFIG_DEBUG_SG is not set
799CONFIG_FORCED_INLINING=y
800# CONFIG_BOOT_PRINTK_DELAY is not set
801# CONFIG_RCU_TORTURE_TEST is not set
802# CONFIG_FAULT_INJECTION is not set
803# CONFIG_SAMPLES is not set
804# CONFIG_DEBUG_STACKOVERFLOW is not set
805# CONFIG_DEBUG_STACK_USAGE is not set
806# CONFIG_DEBUG_PAGEALLOC is not set
807CONFIG_DEBUGGER=y
808# CONFIG_KGDB is not set
809# CONFIG_XMON is not set
810# CONFIG_BDI_SWITCH is not set
811CONFIG_PPC_EARLY_DEBUG=y
812# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
813# CONFIG_PPC_EARLY_DEBUG_G5 is not set
814# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
815# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
816# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
817# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
818# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
819# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
820CONFIG_PPC_EARLY_DEBUG_44x=y
821# CONFIG_PPC_EARLY_DEBUG_40x is not set
822# CONFIG_PPC_EARLY_DEBUG_CPM is not set
823CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
824CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
825
826#
827# Security options
828#
829# CONFIG_KEYS is not set
830# CONFIG_SECURITY is not set
831# CONFIG_SECURITY_FILE_CAPABILITIES is not set
832CONFIG_CRYPTO=y
833CONFIG_CRYPTO_ALGAPI=y
834CONFIG_CRYPTO_BLKCIPHER=y
835CONFIG_CRYPTO_MANAGER=y
836# CONFIG_CRYPTO_HMAC is not set
837# CONFIG_CRYPTO_XCBC is not set
838# CONFIG_CRYPTO_NULL is not set
839# CONFIG_CRYPTO_MD4 is not set
840CONFIG_CRYPTO_MD5=y
841# CONFIG_CRYPTO_SHA1 is not set
842# CONFIG_CRYPTO_SHA256 is not set
843# CONFIG_CRYPTO_SHA512 is not set
844# CONFIG_CRYPTO_WP512 is not set
845# CONFIG_CRYPTO_TGR192 is not set
846# CONFIG_CRYPTO_GF128MUL is not set
847CONFIG_CRYPTO_ECB=y
848CONFIG_CRYPTO_CBC=y
849CONFIG_CRYPTO_PCBC=y
850# CONFIG_CRYPTO_LRW is not set
851# CONFIG_CRYPTO_XTS is not set
852# CONFIG_CRYPTO_CRYPTD is not set
853CONFIG_CRYPTO_DES=y
854# CONFIG_CRYPTO_FCRYPT is not set
855# CONFIG_CRYPTO_BLOWFISH is not set
856# CONFIG_CRYPTO_TWOFISH is not set
857# CONFIG_CRYPTO_SERPENT is not set
858# CONFIG_CRYPTO_AES is not set
859# CONFIG_CRYPTO_CAST5 is not set
860# CONFIG_CRYPTO_CAST6 is not set
861# CONFIG_CRYPTO_TEA is not set
862# CONFIG_CRYPTO_ARC4 is not set
863# CONFIG_CRYPTO_KHAZAD is not set
864# CONFIG_CRYPTO_ANUBIS is not set
865# CONFIG_CRYPTO_SEED is not set
866# CONFIG_CRYPTO_DEFLATE is not set
867# CONFIG_CRYPTO_MICHAEL_MIC is not set
868# CONFIG_CRYPTO_CRC32C is not set
869# CONFIG_CRYPTO_CAMELLIA is not set
870# CONFIG_CRYPTO_TEST is not set
871# CONFIG_CRYPTO_AUTHENC is not set
872CONFIG_CRYPTO_HW=y
873# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/sbc834x_defconfig b/arch/powerpc/configs/sbc834x_defconfig
new file mode 100644
index 000000000000..9245bcc24724
--- /dev/null
+++ b/arch/powerpc/configs/sbc834x_defconfig
@@ -0,0 +1,800 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc8
4# Thu Jan 24 15:54:27 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_83xx=y
18CONFIG_PPC_FPU=y
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50CONFIG_DEFAULT_UIMAGE=y
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set
70# CONFIG_PID_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75CONFIG_FAIR_GROUP_SCHED=y
76CONFIG_FAIR_USER_SCHED=y
77# CONFIG_FAIR_CGROUP_SCHED is not set
78CONFIG_SYSFS_DEPRECATED=y
79# CONFIG_RELAY is not set
80CONFIG_BLK_DEV_INITRD=y
81CONFIG_INITRAMFS_SOURCE=""
82# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
83CONFIG_SYSCTL=y
84CONFIG_EMBEDDED=y
85CONFIG_SYSCTL_SYSCALL=y
86# CONFIG_KALLSYMS is not set
87CONFIG_HOTPLUG=y
88CONFIG_PRINTK=y
89CONFIG_BUG=y
90CONFIG_ELF_CORE=y
91CONFIG_BASE_FULL=y
92CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y
94# CONFIG_EPOLL is not set
95CONFIG_SIGNALFD=y
96CONFIG_EVENTFD=y
97CONFIG_SHMEM=y
98CONFIG_VM_EVENT_COUNTERS=y
99CONFIG_SLAB=y
100# CONFIG_SLUB is not set
101# CONFIG_SLOB is not set
102CONFIG_SLABINFO=y
103CONFIG_RT_MUTEXES=y
104# CONFIG_TINY_SHMEM is not set
105CONFIG_BASE_SMALL=0
106CONFIG_MODULES=y
107CONFIG_MODULE_UNLOAD=y
108# CONFIG_MODULE_FORCE_UNLOAD is not set
109# CONFIG_MODVERSIONS is not set
110# CONFIG_MODULE_SRCVERSION_ALL is not set
111# CONFIG_KMOD is not set
112CONFIG_BLOCK=y
113# CONFIG_LBD is not set
114# CONFIG_BLK_DEV_IO_TRACE is not set
115# CONFIG_LSF is not set
116# CONFIG_BLK_DEV_BSG is not set
117
118#
119# IO Schedulers
120#
121CONFIG_IOSCHED_NOOP=y
122CONFIG_IOSCHED_AS=y
123CONFIG_IOSCHED_DEADLINE=y
124CONFIG_IOSCHED_CFQ=y
125CONFIG_DEFAULT_AS=y
126# CONFIG_DEFAULT_DEADLINE is not set
127# CONFIG_DEFAULT_CFQ is not set
128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory"
130
131#
132# Platform support
133#
134# CONFIG_PPC_MULTIPLATFORM is not set
135# CONFIG_PPC_82xx is not set
136CONFIG_PPC_83xx=y
137# CONFIG_PPC_86xx is not set
138# CONFIG_PPC_MPC52xx is not set
139# CONFIG_PPC_MPC5200 is not set
140# CONFIG_PPC_CELL is not set
141# CONFIG_PPC_CELL_NATIVE is not set
142# CONFIG_PQ2ADS is not set
143# CONFIG_MPC8313_RDB is not set
144# CONFIG_MPC832x_MDS is not set
145# CONFIG_MPC832x_RDB is not set
146# CONFIG_MPC834x_MDS is not set
147# CONFIG_MPC834x_ITX is not set
148# CONFIG_MPC836x_MDS is not set
149# CONFIG_MPC837x_MDS is not set
150CONFIG_SBC834x=y
151CONFIG_MPC834x=y
152CONFIG_IPIC=y
153# CONFIG_MPIC is not set
154# CONFIG_MPIC_WEIRD is not set
155# CONFIG_PPC_I8259 is not set
156# CONFIG_PPC_RTAS is not set
157# CONFIG_MMIO_NVRAM is not set
158# CONFIG_PPC_MPC106 is not set
159# CONFIG_PPC_970_NAP is not set
160# CONFIG_PPC_INDIRECT_IO is not set
161# CONFIG_GENERIC_IOMAP is not set
162# CONFIG_CPU_FREQ is not set
163# CONFIG_FSL_ULI1575 is not set
164
165#
166# Kernel options
167#
168# CONFIG_HIGHMEM is not set
169# CONFIG_TICK_ONESHOT is not set
170# CONFIG_NO_HZ is not set
171# CONFIG_HIGH_RES_TIMERS is not set
172CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
173# CONFIG_HZ_100 is not set
174CONFIG_HZ_250=y
175# CONFIG_HZ_300 is not set
176# CONFIG_HZ_1000 is not set
177CONFIG_HZ=250
178CONFIG_PREEMPT_NONE=y
179# CONFIG_PREEMPT_VOLUNTARY is not set
180# CONFIG_PREEMPT is not set
181CONFIG_BINFMT_ELF=y
182# CONFIG_BINFMT_MISC is not set
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184CONFIG_ARCH_FLATMEM_ENABLE=y
185CONFIG_ARCH_POPULATES_NODE_MAP=y
186CONFIG_SELECT_MEMORY_MODEL=y
187CONFIG_FLATMEM_MANUAL=y
188# CONFIG_DISCONTIGMEM_MANUAL is not set
189# CONFIG_SPARSEMEM_MANUAL is not set
190CONFIG_FLATMEM=y
191CONFIG_FLAT_NODE_MEM_MAP=y
192# CONFIG_SPARSEMEM_STATIC is not set
193# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4
195# CONFIG_RESOURCES_64BIT is not set
196CONFIG_ZONE_DMA_FLAG=1
197CONFIG_BOUNCE=y
198CONFIG_VIRT_TO_BUS=y
199CONFIG_PROC_DEVICETREE=y
200# CONFIG_CMDLINE_BOOL is not set
201# CONFIG_PM is not set
202CONFIG_SUSPEND_UP_POSSIBLE=y
203CONFIG_HIBERNATION_UP_POSSIBLE=y
204CONFIG_SECCOMP=y
205CONFIG_WANT_DEVICE_TREE=y
206CONFIG_DEVICE_TREE=""
207CONFIG_ISA_DMA_API=y
208
209#
210# Bus options
211#
212CONFIG_ZONE_DMA=y
213CONFIG_GENERIC_ISA_DMA=y
214CONFIG_PPC_INDIRECT_PCI=y
215CONFIG_FSL_SOC=y
216# CONFIG_PCI is not set
217# CONFIG_PCI_DOMAINS is not set
218# CONFIG_PCI_SYSCALL is not set
219# CONFIG_ARCH_SUPPORTS_MSI is not set
220# CONFIG_PCCARD is not set
221
222#
223# Advanced setup
224#
225# CONFIG_ADVANCED_OPTIONS is not set
226
227#
228# Default settings for advanced configuration options are used
229#
230CONFIG_HIGHMEM_START=0xfe000000
231CONFIG_LOWMEM_SIZE=0x30000000
232CONFIG_KERNEL_START=0xc0000000
233CONFIG_TASK_SIZE=0xc0000000
234CONFIG_BOOT_LOAD=0x00800000
235
236#
237# Networking
238#
239CONFIG_NET=y
240
241#
242# Networking options
243#
244CONFIG_PACKET=y
245# CONFIG_PACKET_MMAP is not set
246CONFIG_UNIX=y
247CONFIG_XFRM=y
248CONFIG_XFRM_USER=m
249# CONFIG_XFRM_SUB_POLICY is not set
250# CONFIG_XFRM_MIGRATE is not set
251# CONFIG_NET_KEY is not set
252CONFIG_INET=y
253CONFIG_IP_MULTICAST=y
254# CONFIG_IP_ADVANCED_ROUTER is not set
255CONFIG_IP_FIB_HASH=y
256CONFIG_IP_PNP=y
257CONFIG_IP_PNP_DHCP=y
258CONFIG_IP_PNP_BOOTP=y
259# CONFIG_IP_PNP_RARP is not set
260# CONFIG_NET_IPIP is not set
261# CONFIG_NET_IPGRE is not set
262# CONFIG_IP_MROUTE is not set
263# CONFIG_ARPD is not set
264CONFIG_SYN_COOKIES=y
265# CONFIG_INET_AH is not set
266# CONFIG_INET_ESP is not set
267# CONFIG_INET_IPCOMP is not set
268# CONFIG_INET_XFRM_TUNNEL is not set
269# CONFIG_INET_TUNNEL is not set
270CONFIG_INET_XFRM_MODE_TRANSPORT=y
271CONFIG_INET_XFRM_MODE_TUNNEL=y
272CONFIG_INET_XFRM_MODE_BEET=y
273# CONFIG_INET_LRO is not set
274CONFIG_INET_DIAG=y
275CONFIG_INET_TCP_DIAG=y
276# CONFIG_TCP_CONG_ADVANCED is not set
277CONFIG_TCP_CONG_CUBIC=y
278CONFIG_DEFAULT_TCP_CONG="cubic"
279# CONFIG_TCP_MD5SIG is not set
280# CONFIG_IPV6 is not set
281# CONFIG_INET6_XFRM_TUNNEL is not set
282# CONFIG_INET6_TUNNEL is not set
283# CONFIG_NETWORK_SECMARK is not set
284# CONFIG_NETFILTER is not set
285# CONFIG_IP_DCCP is not set
286# CONFIG_IP_SCTP is not set
287# CONFIG_TIPC is not set
288# CONFIG_ATM is not set
289# CONFIG_BRIDGE is not set
290# CONFIG_VLAN_8021Q is not set
291# CONFIG_DECNET is not set
292# CONFIG_LLC2 is not set
293# CONFIG_IPX is not set
294# CONFIG_ATALK is not set
295# CONFIG_X25 is not set
296# CONFIG_LAPB is not set
297# CONFIG_ECONET is not set
298# CONFIG_WAN_ROUTER is not set
299# CONFIG_NET_SCHED is not set
300
301#
302# Network testing
303#
304# CONFIG_NET_PKTGEN is not set
305# CONFIG_HAMRADIO is not set
306# CONFIG_IRDA is not set
307# CONFIG_BT is not set
308# CONFIG_AF_RXRPC is not set
309
310#
311# Wireless
312#
313# CONFIG_CFG80211 is not set
314# CONFIG_WIRELESS_EXT is not set
315# CONFIG_MAC80211 is not set
316# CONFIG_IEEE80211 is not set
317# CONFIG_RFKILL is not set
318# CONFIG_NET_9P is not set
319
320#
321# Device Drivers
322#
323
324#
325# Generic Driver Options
326#
327CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
328CONFIG_STANDALONE=y
329CONFIG_PREVENT_FIRMWARE_BUILD=y
330# CONFIG_FW_LOADER is not set
331# CONFIG_SYS_HYPERVISOR is not set
332# CONFIG_CONNECTOR is not set
333# CONFIG_MTD is not set
334CONFIG_OF_DEVICE=y
335# CONFIG_PARPORT is not set
336CONFIG_BLK_DEV=y
337# CONFIG_BLK_DEV_FD is not set
338# CONFIG_BLK_DEV_COW_COMMON is not set
339CONFIG_BLK_DEV_LOOP=y
340# CONFIG_BLK_DEV_CRYPTOLOOP is not set
341# CONFIG_BLK_DEV_NBD is not set
342CONFIG_BLK_DEV_RAM=y
343CONFIG_BLK_DEV_RAM_COUNT=16
344CONFIG_BLK_DEV_RAM_SIZE=32768
345CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
346# CONFIG_CDROM_PKTCDVD is not set
347# CONFIG_ATA_OVER_ETH is not set
348CONFIG_MISC_DEVICES=y
349# CONFIG_EEPROM_93CX6 is not set
350# CONFIG_IDE is not set
351
352#
353# SCSI device support
354#
355# CONFIG_RAID_ATTRS is not set
356# CONFIG_SCSI is not set
357# CONFIG_SCSI_DMA is not set
358# CONFIG_SCSI_NETLINK is not set
359# CONFIG_ATA is not set
360# CONFIG_MD is not set
361# CONFIG_MACINTOSH_DRIVERS is not set
362CONFIG_NETDEVICES=y
363# CONFIG_NETDEVICES_MULTIQUEUE is not set
364# CONFIG_DUMMY is not set
365# CONFIG_BONDING is not set
366# CONFIG_MACVLAN is not set
367# CONFIG_EQUALIZER is not set
368# CONFIG_TUN is not set
369# CONFIG_VETH is not set
370CONFIG_PHYLIB=y
371
372#
373# MII PHY device drivers
374#
375# CONFIG_MARVELL_PHY is not set
376# CONFIG_DAVICOM_PHY is not set
377# CONFIG_QSEMI_PHY is not set
378# CONFIG_LXT_PHY is not set
379# CONFIG_CICADA_PHY is not set
380# CONFIG_VITESSE_PHY is not set
381# CONFIG_SMSC_PHY is not set
382CONFIG_BROADCOM_PHY=y
383# CONFIG_ICPLUS_PHY is not set
384# CONFIG_FIXED_PHY is not set
385# CONFIG_MDIO_BITBANG is not set
386CONFIG_NET_ETHERNET=y
387CONFIG_MII=y
388# CONFIG_IBM_NEW_EMAC_ZMII is not set
389# CONFIG_IBM_NEW_EMAC_RGMII is not set
390# CONFIG_IBM_NEW_EMAC_TAH is not set
391# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
392# CONFIG_B44 is not set
393CONFIG_NETDEV_1000=y
394CONFIG_GIANFAR=y
395# CONFIG_GFAR_NAPI is not set
396# CONFIG_NETDEV_10000 is not set
397
398#
399# Wireless LAN
400#
401# CONFIG_WLAN_PRE80211 is not set
402# CONFIG_WLAN_80211 is not set
403# CONFIG_WAN is not set
404# CONFIG_PPP is not set
405# CONFIG_SLIP is not set
406# CONFIG_SHAPER is not set
407# CONFIG_NETCONSOLE is not set
408# CONFIG_NETPOLL is not set
409# CONFIG_NET_POLL_CONTROLLER is not set
410# CONFIG_ISDN is not set
411# CONFIG_PHONE is not set
412
413#
414# Input device support
415#
416CONFIG_INPUT=y
417# CONFIG_INPUT_FF_MEMLESS is not set
418# CONFIG_INPUT_POLLDEV is not set
419
420#
421# Userland interfaces
422#
423# CONFIG_INPUT_MOUSEDEV is not set
424# CONFIG_INPUT_JOYDEV is not set
425# CONFIG_INPUT_EVDEV is not set
426# CONFIG_INPUT_EVBUG is not set
427
428#
429# Input Device Drivers
430#
431# CONFIG_INPUT_KEYBOARD is not set
432# CONFIG_INPUT_MOUSE is not set
433# CONFIG_INPUT_JOYSTICK is not set
434# CONFIG_INPUT_TABLET is not set
435# CONFIG_INPUT_TOUCHSCREEN is not set
436# CONFIG_INPUT_MISC is not set
437
438#
439# Hardware I/O ports
440#
441# CONFIG_SERIO is not set
442# CONFIG_GAMEPORT is not set
443
444#
445# Character devices
446#
447# CONFIG_VT is not set
448# CONFIG_SERIAL_NONSTANDARD is not set
449
450#
451# Serial drivers
452#
453CONFIG_SERIAL_8250=y
454CONFIG_SERIAL_8250_CONSOLE=y
455CONFIG_SERIAL_8250_NR_UARTS=4
456CONFIG_SERIAL_8250_RUNTIME_UARTS=4
457# CONFIG_SERIAL_8250_EXTENDED is not set
458
459#
460# Non-8250 serial port support
461#
462# CONFIG_SERIAL_UARTLITE is not set
463CONFIG_SERIAL_CORE=y
464CONFIG_SERIAL_CORE_CONSOLE=y
465# CONFIG_SERIAL_OF_PLATFORM is not set
466CONFIG_UNIX98_PTYS=y
467CONFIG_LEGACY_PTYS=y
468CONFIG_LEGACY_PTY_COUNT=256
469# CONFIG_IPMI_HANDLER is not set
470# CONFIG_HW_RANDOM is not set
471# CONFIG_NVRAM is not set
472CONFIG_GEN_RTC=y
473# CONFIG_GEN_RTC_X is not set
474# CONFIG_R3964 is not set
475# CONFIG_RAW_DRIVER is not set
476# CONFIG_TCG_TPM is not set
477CONFIG_I2C=y
478CONFIG_I2C_BOARDINFO=y
479CONFIG_I2C_CHARDEV=y
480
481#
482# I2C Algorithms
483#
484# CONFIG_I2C_ALGOBIT is not set
485# CONFIG_I2C_ALGOPCF is not set
486# CONFIG_I2C_ALGOPCA is not set
487
488#
489# I2C Hardware Bus support
490#
491CONFIG_I2C_MPC=y
492# CONFIG_I2C_OCORES is not set
493# CONFIG_I2C_PARPORT_LIGHT is not set
494# CONFIG_I2C_SIMTEC is not set
495# CONFIG_I2C_TAOS_EVM is not set
496# CONFIG_I2C_STUB is not set
497
498#
499# Miscellaneous I2C Chip support
500#
501# CONFIG_SENSORS_DS1337 is not set
502# CONFIG_SENSORS_DS1374 is not set
503# CONFIG_DS1682 is not set
504# CONFIG_SENSORS_EEPROM is not set
505# CONFIG_SENSORS_PCF8574 is not set
506# CONFIG_SENSORS_PCA9539 is not set
507# CONFIG_SENSORS_PCF8591 is not set
508# CONFIG_SENSORS_M41T00 is not set
509# CONFIG_SENSORS_MAX6875 is not set
510# CONFIG_SENSORS_TSL2550 is not set
511# CONFIG_I2C_DEBUG_CORE is not set
512# CONFIG_I2C_DEBUG_ALGO is not set
513# CONFIG_I2C_DEBUG_BUS is not set
514# CONFIG_I2C_DEBUG_CHIP is not set
515
516#
517# SPI support
518#
519# CONFIG_SPI is not set
520# CONFIG_SPI_MASTER is not set
521# CONFIG_W1 is not set
522# CONFIG_POWER_SUPPLY is not set
523CONFIG_HWMON=y
524# CONFIG_HWMON_VID is not set
525# CONFIG_SENSORS_AD7418 is not set
526# CONFIG_SENSORS_ADM1021 is not set
527# CONFIG_SENSORS_ADM1025 is not set
528# CONFIG_SENSORS_ADM1026 is not set
529# CONFIG_SENSORS_ADM1029 is not set
530# CONFIG_SENSORS_ADM1031 is not set
531# CONFIG_SENSORS_ADM9240 is not set
532# CONFIG_SENSORS_ADT7470 is not set
533# CONFIG_SENSORS_ATXP1 is not set
534# CONFIG_SENSORS_DS1621 is not set
535# CONFIG_SENSORS_F71805F is not set
536# CONFIG_SENSORS_F71882FG is not set
537# CONFIG_SENSORS_F75375S is not set
538# CONFIG_SENSORS_GL518SM is not set
539# CONFIG_SENSORS_GL520SM is not set
540# CONFIG_SENSORS_IT87 is not set
541# CONFIG_SENSORS_LM63 is not set
542# CONFIG_SENSORS_LM75 is not set
543# CONFIG_SENSORS_LM77 is not set
544# CONFIG_SENSORS_LM78 is not set
545# CONFIG_SENSORS_LM80 is not set
546# CONFIG_SENSORS_LM83 is not set
547# CONFIG_SENSORS_LM85 is not set
548# CONFIG_SENSORS_LM87 is not set
549# CONFIG_SENSORS_LM90 is not set
550# CONFIG_SENSORS_LM92 is not set
551# CONFIG_SENSORS_LM93 is not set
552# CONFIG_SENSORS_MAX1619 is not set
553# CONFIG_SENSORS_MAX6650 is not set
554# CONFIG_SENSORS_PC87360 is not set
555# CONFIG_SENSORS_PC87427 is not set
556# CONFIG_SENSORS_DME1737 is not set
557# CONFIG_SENSORS_SMSC47M1 is not set
558# CONFIG_SENSORS_SMSC47M192 is not set
559# CONFIG_SENSORS_SMSC47B397 is not set
560# CONFIG_SENSORS_THMC50 is not set
561# CONFIG_SENSORS_VT1211 is not set
562# CONFIG_SENSORS_W83781D is not set
563# CONFIG_SENSORS_W83791D is not set
564# CONFIG_SENSORS_W83792D is not set
565# CONFIG_SENSORS_W83793 is not set
566# CONFIG_SENSORS_W83L785TS is not set
567# CONFIG_SENSORS_W83627HF is not set
568# CONFIG_SENSORS_W83627EHF is not set
569# CONFIG_HWMON_DEBUG_CHIP is not set
570CONFIG_WATCHDOG=y
571# CONFIG_WATCHDOG_NOWAYOUT is not set
572
573#
574# Watchdog Device Drivers
575#
576# CONFIG_SOFT_WATCHDOG is not set
577CONFIG_83xx_WDT=y
578
579#
580# Sonics Silicon Backplane
581#
582CONFIG_SSB_POSSIBLE=y
583# CONFIG_SSB is not set
584
585#
586# Multifunction device drivers
587#
588# CONFIG_MFD_SM501 is not set
589
590#
591# Multimedia devices
592#
593# CONFIG_VIDEO_DEV is not set
594# CONFIG_DVB_CORE is not set
595# CONFIG_DAB is not set
596
597#
598# Graphics support
599#
600# CONFIG_VGASTATE is not set
601# CONFIG_VIDEO_OUTPUT_CONTROL is not set
602# CONFIG_FB is not set
603# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
604
605#
606# Display device support
607#
608# CONFIG_DISPLAY_SUPPORT is not set
609
610#
611# Sound
612#
613# CONFIG_SOUND is not set
614CONFIG_HID_SUPPORT=y
615CONFIG_HID=y
616# CONFIG_HID_DEBUG is not set
617# CONFIG_HIDRAW is not set
618# CONFIG_USB_SUPPORT is not set
619# CONFIG_MMC is not set
620# CONFIG_NEW_LEDS is not set
621# CONFIG_EDAC is not set
622# CONFIG_RTC_CLASS is not set
623
624#
625# Userspace I/O
626#
627# CONFIG_UIO is not set
628
629#
630# File systems
631#
632# CONFIG_EXT2_FS is not set
633# CONFIG_EXT3_FS is not set
634# CONFIG_EXT4DEV_FS is not set
635# CONFIG_REISERFS_FS is not set
636# CONFIG_JFS_FS is not set
637# CONFIG_FS_POSIX_ACL is not set
638# CONFIG_XFS_FS is not set
639# CONFIG_GFS2_FS is not set
640# CONFIG_OCFS2_FS is not set
641# CONFIG_MINIX_FS is not set
642# CONFIG_ROMFS_FS is not set
643CONFIG_INOTIFY=y
644CONFIG_INOTIFY_USER=y
645# CONFIG_QUOTA is not set
646CONFIG_DNOTIFY=y
647# CONFIG_AUTOFS_FS is not set
648# CONFIG_AUTOFS4_FS is not set
649# CONFIG_FUSE_FS is not set
650
651#
652# CD-ROM/DVD Filesystems
653#
654# CONFIG_ISO9660_FS is not set
655# CONFIG_UDF_FS is not set
656
657#
658# DOS/FAT/NT Filesystems
659#
660# CONFIG_MSDOS_FS is not set
661# CONFIG_VFAT_FS is not set
662# CONFIG_NTFS_FS is not set
663
664#
665# Pseudo filesystems
666#
667CONFIG_PROC_FS=y
668CONFIG_PROC_KCORE=y
669CONFIG_PROC_SYSCTL=y
670CONFIG_SYSFS=y
671CONFIG_TMPFS=y
672# CONFIG_TMPFS_POSIX_ACL is not set
673# CONFIG_HUGETLB_PAGE is not set
674# CONFIG_CONFIGFS_FS is not set
675
676#
677# Miscellaneous filesystems
678#
679# CONFIG_ADFS_FS is not set
680# CONFIG_AFFS_FS is not set
681# CONFIG_HFS_FS is not set
682# CONFIG_HFSPLUS_FS is not set
683# CONFIG_BEFS_FS is not set
684# CONFIG_BFS_FS is not set
685# CONFIG_EFS_FS is not set
686# CONFIG_CRAMFS is not set
687# CONFIG_VXFS_FS is not set
688# CONFIG_HPFS_FS is not set
689# CONFIG_QNX4FS_FS is not set
690# CONFIG_SYSV_FS is not set
691# CONFIG_UFS_FS is not set
692CONFIG_NETWORK_FILESYSTEMS=y
693CONFIG_NFS_FS=y
694CONFIG_NFS_V3=y
695# CONFIG_NFS_V3_ACL is not set
696CONFIG_NFS_V4=y
697# CONFIG_NFS_DIRECTIO is not set
698# CONFIG_NFSD is not set
699CONFIG_ROOT_NFS=y
700CONFIG_LOCKD=y
701CONFIG_LOCKD_V4=y
702CONFIG_NFS_COMMON=y
703CONFIG_SUNRPC=y
704CONFIG_SUNRPC_GSS=y
705# CONFIG_SUNRPC_BIND34 is not set
706CONFIG_RPCSEC_GSS_KRB5=y
707# CONFIG_RPCSEC_GSS_SPKM3 is not set
708# CONFIG_SMB_FS is not set
709# CONFIG_CIFS is not set
710# CONFIG_NCP_FS is not set
711# CONFIG_CODA_FS is not set
712# CONFIG_AFS_FS is not set
713
714#
715# Partition Types
716#
717# CONFIG_PARTITION_ADVANCED is not set
718CONFIG_MSDOS_PARTITION=y
719# CONFIG_NLS is not set
720# CONFIG_DLM is not set
721
722#
723# Library routines
724#
725CONFIG_BITREVERSE=y
726# CONFIG_CRC_CCITT is not set
727# CONFIG_CRC16 is not set
728# CONFIG_CRC_ITU_T is not set
729CONFIG_CRC32=y
730# CONFIG_CRC7 is not set
731# CONFIG_LIBCRC32C is not set
732CONFIG_PLIST=y
733CONFIG_HAS_IOMEM=y
734CONFIG_HAS_IOPORT=y
735CONFIG_HAS_DMA=y
736# CONFIG_INSTRUMENTATION is not set
737
738#
739# Kernel hacking
740#
741# CONFIG_PRINTK_TIME is not set
742CONFIG_ENABLE_WARN_DEPRECATED=y
743CONFIG_ENABLE_MUST_CHECK=y
744# CONFIG_MAGIC_SYSRQ is not set
745# CONFIG_UNUSED_SYMBOLS is not set
746# CONFIG_DEBUG_FS is not set
747# CONFIG_HEADERS_CHECK is not set
748# CONFIG_DEBUG_KERNEL is not set
749# CONFIG_DEBUG_BUGVERBOSE is not set
750# CONFIG_SAMPLES is not set
751# CONFIG_PPC_EARLY_DEBUG is not set
752
753#
754# Security options
755#
756# CONFIG_KEYS is not set
757# CONFIG_SECURITY is not set
758# CONFIG_SECURITY_FILE_CAPABILITIES is not set
759CONFIG_CRYPTO=y
760CONFIG_CRYPTO_ALGAPI=y
761CONFIG_CRYPTO_BLKCIPHER=y
762CONFIG_CRYPTO_MANAGER=y
763# CONFIG_CRYPTO_HMAC is not set
764# CONFIG_CRYPTO_XCBC is not set
765# CONFIG_CRYPTO_NULL is not set
766# CONFIG_CRYPTO_MD4 is not set
767CONFIG_CRYPTO_MD5=y
768# CONFIG_CRYPTO_SHA1 is not set
769# CONFIG_CRYPTO_SHA256 is not set
770# CONFIG_CRYPTO_SHA512 is not set
771# CONFIG_CRYPTO_WP512 is not set
772# CONFIG_CRYPTO_TGR192 is not set
773# CONFIG_CRYPTO_GF128MUL is not set
774CONFIG_CRYPTO_ECB=m
775CONFIG_CRYPTO_CBC=y
776CONFIG_CRYPTO_PCBC=m
777# CONFIG_CRYPTO_LRW is not set
778# CONFIG_CRYPTO_XTS is not set
779# CONFIG_CRYPTO_CRYPTD is not set
780CONFIG_CRYPTO_DES=y
781# CONFIG_CRYPTO_FCRYPT is not set
782# CONFIG_CRYPTO_BLOWFISH is not set
783# CONFIG_CRYPTO_TWOFISH is not set
784# CONFIG_CRYPTO_SERPENT is not set
785# CONFIG_CRYPTO_AES is not set
786# CONFIG_CRYPTO_CAST5 is not set
787# CONFIG_CRYPTO_CAST6 is not set
788# CONFIG_CRYPTO_TEA is not set
789# CONFIG_CRYPTO_ARC4 is not set
790# CONFIG_CRYPTO_KHAZAD is not set
791# CONFIG_CRYPTO_ANUBIS is not set
792# CONFIG_CRYPTO_SEED is not set
793# CONFIG_CRYPTO_DEFLATE is not set
794# CONFIG_CRYPTO_MICHAEL_MIC is not set
795# CONFIG_CRYPTO_CRC32C is not set
796# CONFIG_CRYPTO_CAMELLIA is not set
797# CONFIG_CRYPTO_TEST is not set
798# CONFIG_CRYPTO_AUTHENC is not set
799# CONFIG_CRYPTO_HW is not set
800# CONFIG_PPC_CLOCK is not set
diff --git a/arch/ppc/configs/mpc834x_sys_defconfig b/arch/powerpc/configs/sbc8548_defconfig
index d90c8a7e060c..3b7fa53a2475 100644
--- a/arch/ppc/configs/mpc834x_sys_defconfig
+++ b/arch/powerpc/configs/sbc8548_defconfig
@@ -1,123 +1,182 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.24-rc8
4# Mon Nov 7 15:38:29 2005 4# Thu Jan 24 15:19:12 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
10CONFIG_PPC=y 40CONFIG_PPC=y
11CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
12CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 63CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 64CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
33CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
34# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
35# CONFIG_HOTPLUG is not set
36CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
38CONFIG_INITRAMFS_SOURCE="" 82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
40# CONFIG_KALLSYMS is not set 86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_EXTRA_PASS is not set
89CONFIG_HOTPLUG=y
41CONFIG_PRINTK=y 90CONFIG_PRINTK=y
42CONFIG_BUG=y 91CONFIG_BUG=y
92CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 93CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 94CONFIG_FUTEX=y
45# CONFIG_EPOLL is not set 95CONFIG_ANON_INODES=y
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 96CONFIG_EPOLL=y
97CONFIG_SIGNALFD=y
98CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 99CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 100CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 101CONFIG_SLAB=y
50CONFIG_CC_ALIGN_LOOPS=0 102# CONFIG_SLUB is not set
51CONFIG_CC_ALIGN_JUMPS=0 103# CONFIG_SLOB is not set
104CONFIG_SLABINFO=y
105CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
108# CONFIG_MODULES is not set
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# CONFIG_BLK_DEV_BSG is not set
54 114
55# 115#
56# Loadable module support 116# IO Schedulers
57# 117#
58# CONFIG_MODULES is not set 118CONFIG_IOSCHED_NOOP=y
119CONFIG_IOSCHED_AS=y
120CONFIG_IOSCHED_DEADLINE=y
121CONFIG_IOSCHED_CFQ=y
122CONFIG_DEFAULT_AS=y
123# CONFIG_DEFAULT_DEADLINE is not set
124# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory"
59 127
60# 128#
61# Processor 129# Platform support
62# 130#
63CONFIG_6xx=y 131# CONFIG_PPC_MPC52xx is not set
64# CONFIG_40x is not set 132# CONFIG_PPC_MPC5200 is not set
65# CONFIG_44x is not set 133# CONFIG_PPC_CELL is not set
66# CONFIG_POWER3 is not set 134# CONFIG_PPC_CELL_NATIVE is not set
67# CONFIG_POWER4 is not set 135# CONFIG_PQ2ADS is not set
68# CONFIG_8xx is not set 136# CONFIG_MPC8540_ADS is not set
69# CONFIG_E200 is not set 137# CONFIG_MPC8560_ADS is not set
70# CONFIG_E500 is not set 138# CONFIG_MPC85xx_CDS is not set
71CONFIG_PPC_FPU=y 139# CONFIG_MPC85xx_MDS is not set
72# CONFIG_KEXEC is not set 140# CONFIG_MPC85xx_DS is not set
141CONFIG_SBC8548=y
142# CONFIG_SBC8560 is not set
143CONFIG_MPC8540=y
144CONFIG_MPC85xx=y
145# CONFIG_IPIC is not set
146CONFIG_MPIC=y
147# CONFIG_MPIC_WEIRD is not set
148# CONFIG_PPC_I8259 is not set
149# CONFIG_PPC_RTAS is not set
150# CONFIG_MMIO_NVRAM 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
73# CONFIG_CPU_FREQ is not set 155# CONFIG_CPU_FREQ is not set
74# CONFIG_WANT_EARLY_SERIAL is not set 156# CONFIG_FSL_ULI1575 is not set
75CONFIG_PPC_GEN550=y 157
76CONFIG_PPC_STD_MMU=y 158#
77 159# Kernel options
78# 160#
79# Platform options
80#
81# CONFIG_PPC_MULTIPLATFORM is not set
82# CONFIG_APUS is not set
83# CONFIG_KATANA is not set
84# CONFIG_WILLOW is not set
85# CONFIG_CPCI690 is not set
86# CONFIG_POWERPMC250 is not set
87# CONFIG_CHESTNUT is not set
88# CONFIG_SPRUCE is not set
89# CONFIG_HDPU is not set
90# CONFIG_EV64260 is not set
91# CONFIG_LOPEC is not set
92# CONFIG_MVME5100 is not set
93# CONFIG_PPLUS is not set
94# CONFIG_PRPMC750 is not set
95# CONFIG_PRPMC800 is not set
96# CONFIG_SANDPOINT is not set
97# CONFIG_RADSTONE_PPC7D is not set
98# CONFIG_PAL4 is not set
99# CONFIG_GEMINI is not set
100# CONFIG_EST8260 is not set
101# CONFIG_SBC82xx is not set
102# CONFIG_SBS8260 is not set
103# CONFIG_RPX8260 is not set
104# CONFIG_TQM8260 is not set
105# CONFIG_ADS8272 is not set
106# CONFIG_PQ2FADS is not set
107# CONFIG_LITE5200 is not set
108CONFIG_MPC834x_SYS=y
109# CONFIG_EV64360 is not set
110CONFIG_83xx=y
111CONFIG_MPC834x=y
112# CONFIG_SMP is not set
113# CONFIG_HIGHMEM is not set 161# CONFIG_HIGHMEM is not set
162# CONFIG_TICK_ONESHOT is not set
163# CONFIG_NO_HZ is not set
164# CONFIG_HIGH_RES_TIMERS is not set
165CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
114# CONFIG_HZ_100 is not set 166# CONFIG_HZ_100 is not set
115CONFIG_HZ_250=y 167CONFIG_HZ_250=y
168# CONFIG_HZ_300 is not set
116# CONFIG_HZ_1000 is not set 169# CONFIG_HZ_1000 is not set
117CONFIG_HZ=250 170CONFIG_HZ=250
118CONFIG_PREEMPT_NONE=y 171CONFIG_PREEMPT_NONE=y
119# CONFIG_PREEMPT_VOLUNTARY is not set 172# CONFIG_PREEMPT_VOLUNTARY is not set
120# CONFIG_PREEMPT is not set 173# CONFIG_PREEMPT is not set
174CONFIG_BINFMT_ELF=y
175CONFIG_BINFMT_MISC=y
176CONFIG_MATH_EMULATION=y
177CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
178CONFIG_ARCH_FLATMEM_ENABLE=y
179CONFIG_ARCH_POPULATES_NODE_MAP=y
121CONFIG_SELECT_MEMORY_MODEL=y 180CONFIG_SELECT_MEMORY_MODEL=y
122CONFIG_FLATMEM_MANUAL=y 181CONFIG_FLATMEM_MANUAL=y
123# CONFIG_DISCONTIGMEM_MANUAL is not set 182# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -125,30 +184,38 @@ CONFIG_FLATMEM_MANUAL=y
125CONFIG_FLATMEM=y 184CONFIG_FLATMEM=y
126CONFIG_FLAT_NODE_MEM_MAP=y 185CONFIG_FLAT_NODE_MEM_MAP=y
127# CONFIG_SPARSEMEM_STATIC is not set 186# CONFIG_SPARSEMEM_STATIC is not set
187# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
128CONFIG_SPLIT_PTLOCK_CPUS=4 188CONFIG_SPLIT_PTLOCK_CPUS=4
129CONFIG_BINFMT_ELF=y 189# CONFIG_RESOURCES_64BIT is not set
130# CONFIG_BINFMT_MISC is not set 190CONFIG_ZONE_DMA_FLAG=1
191CONFIG_BOUNCE=y
192CONFIG_VIRT_TO_BUS=y
193CONFIG_PROC_DEVICETREE=y
131# CONFIG_CMDLINE_BOOL is not set 194# CONFIG_CMDLINE_BOOL is not set
132# CONFIG_PM is not set 195# CONFIG_PM is not set
133# CONFIG_HIBERNATION is not set 196CONFIG_SUSPEND_UP_POSSIBLE=y
134CONFIG_SECCOMP=y 197CONFIG_HIBERNATION_UP_POSSIBLE=y
198# CONFIG_SECCOMP is not set
199CONFIG_WANT_DEVICE_TREE=y
200CONFIG_DEVICE_TREE=""
135CONFIG_ISA_DMA_API=y 201CONFIG_ISA_DMA_API=y
136 202
137# 203#
138# Bus options 204# Bus options
139# 205#
140CONFIG_GENERIC_ISA_DMA=y 206CONFIG_ZONE_DMA=y
141# CONFIG_PPC_I8259 is not set
142CONFIG_PPC_INDIRECT_PCI=y 207CONFIG_PPC_INDIRECT_PCI=y
208CONFIG_FSL_SOC=y
209CONFIG_FSL_PCI=y
143CONFIG_PCI=y 210CONFIG_PCI=y
144CONFIG_PCI_DOMAINS=y 211CONFIG_PCI_DOMAINS=y
145# CONFIG_MPC83xx_PCI2 is not set 212CONFIG_PCI_SYSCALL=y
146CONFIG_PCI_LEGACY_PROC=y 213# CONFIG_PCIEPORTBUS is not set
147 214CONFIG_ARCH_SUPPORTS_MSI=y
148# 215# CONFIG_PCI_MSI is not set
149# PCCARD (PCMCIA/CardBus) support 216CONFIG_PCI_LEGACY=y
150#
151# CONFIG_PCCARD is not set 217# CONFIG_PCCARD is not set
218# CONFIG_HOTPLUG_PCI is not set
152 219
153# 220#
154# Advanced setup 221# Advanced setup
@@ -161,7 +228,7 @@ CONFIG_PCI_LEGACY_PROC=y
161CONFIG_HIGHMEM_START=0xfe000000 228CONFIG_HIGHMEM_START=0xfe000000
162CONFIG_LOWMEM_SIZE=0x30000000 229CONFIG_LOWMEM_SIZE=0x30000000
163CONFIG_KERNEL_START=0xc0000000 230CONFIG_KERNEL_START=0xc0000000
164CONFIG_TASK_SIZE=0x80000000 231CONFIG_TASK_SIZE=0xc0000000
165CONFIG_BOOT_LOAD=0x00800000 232CONFIG_BOOT_LOAD=0x00800000
166 233
167# 234#
@@ -175,6 +242,10 @@ CONFIG_NET=y
175CONFIG_PACKET=y 242CONFIG_PACKET=y
176# CONFIG_PACKET_MMAP is not set 243# CONFIG_PACKET_MMAP is not set
177CONFIG_UNIX=y 244CONFIG_UNIX=y
245CONFIG_XFRM=y
246CONFIG_XFRM_USER=y
247# CONFIG_XFRM_SUB_POLICY is not set
248# CONFIG_XFRM_MIGRATE is not set
178# CONFIG_NET_KEY is not set 249# CONFIG_NET_KEY is not set
179CONFIG_INET=y 250CONFIG_INET=y
180CONFIG_IP_MULTICAST=y 251CONFIG_IP_MULTICAST=y
@@ -192,23 +263,26 @@ CONFIG_SYN_COOKIES=y
192# CONFIG_INET_AH is not set 263# CONFIG_INET_AH is not set
193# CONFIG_INET_ESP is not set 264# CONFIG_INET_ESP is not set
194# CONFIG_INET_IPCOMP is not set 265# CONFIG_INET_IPCOMP is not set
266# CONFIG_INET_XFRM_TUNNEL is not set
195# CONFIG_INET_TUNNEL is not set 267# CONFIG_INET_TUNNEL is not set
268CONFIG_INET_XFRM_MODE_TRANSPORT=y
269CONFIG_INET_XFRM_MODE_TUNNEL=y
270CONFIG_INET_XFRM_MODE_BEET=y
271# CONFIG_INET_LRO is not set
196CONFIG_INET_DIAG=y 272CONFIG_INET_DIAG=y
197CONFIG_INET_TCP_DIAG=y 273CONFIG_INET_TCP_DIAG=y
198# CONFIG_TCP_CONG_ADVANCED is not set 274# CONFIG_TCP_CONG_ADVANCED is not set
199CONFIG_TCP_CONG_BIC=y 275CONFIG_TCP_CONG_CUBIC=y
276CONFIG_DEFAULT_TCP_CONG="cubic"
277# CONFIG_TCP_MD5SIG is not set
200# CONFIG_IPV6 is not set 278# CONFIG_IPV6 is not set
279# CONFIG_INET6_XFRM_TUNNEL is not set
280# CONFIG_INET6_TUNNEL is not set
281# CONFIG_NETWORK_SECMARK is not set
201# CONFIG_NETFILTER is not set 282# CONFIG_NETFILTER is not set
202
203#
204# DCCP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_DCCP is not set 283# CONFIG_IP_DCCP is not set
207
208#
209# SCTP Configuration (EXPERIMENTAL)
210#
211# CONFIG_IP_SCTP is not set 284# CONFIG_IP_SCTP is not set
285# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 286# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 287# CONFIG_BRIDGE is not set
214# CONFIG_VLAN_8021Q is not set 288# CONFIG_VLAN_8021Q is not set
@@ -218,11 +292,9 @@ CONFIG_TCP_CONG_BIC=y
218# CONFIG_ATALK is not set 292# CONFIG_ATALK is not set
219# CONFIG_X25 is not set 293# CONFIG_X25 is not set
220# CONFIG_LAPB is not set 294# CONFIG_LAPB is not set
221# CONFIG_NET_DIVERT is not set
222# CONFIG_ECONET is not set 295# CONFIG_ECONET is not set
223# CONFIG_WAN_ROUTER is not set 296# CONFIG_WAN_ROUTER is not set
224# CONFIG_NET_SCHED is not set 297# CONFIG_NET_SCHED is not set
225# CONFIG_NET_CLS_ROUTE is not set
226 298
227# 299#
228# Network testing 300# Network testing
@@ -231,7 +303,17 @@ CONFIG_TCP_CONG_BIC=y
231# CONFIG_HAMRADIO is not set 303# CONFIG_HAMRADIO is not set
232# CONFIG_IRDA is not set 304# CONFIG_IRDA is not set
233# CONFIG_BT is not set 305# CONFIG_BT is not set
306# CONFIG_AF_RXRPC is not set
307
308#
309# Wireless
310#
311# CONFIG_CFG80211 is not set
312# CONFIG_WIRELESS_EXT is not set
313# CONFIG_MAC80211 is not set
234# CONFIG_IEEE80211 is not set 314# CONFIG_IEEE80211 is not set
315# CONFIG_RFKILL is not set
316# CONFIG_NET_9P is not set
235 317
236# 318#
237# Device Drivers 319# Device Drivers
@@ -240,32 +322,16 @@ CONFIG_TCP_CONG_BIC=y
240# 322#
241# Generic Driver Options 323# Generic Driver Options
242# 324#
325CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
243CONFIG_STANDALONE=y 326CONFIG_STANDALONE=y
244CONFIG_PREVENT_FIRMWARE_BUILD=y 327CONFIG_PREVENT_FIRMWARE_BUILD=y
245# CONFIG_FW_LOADER is not set 328# CONFIG_FW_LOADER is not set
246 329# CONFIG_SYS_HYPERVISOR is not set
247#
248# Connector - unified userspace <-> kernelspace linker
249#
250# CONFIG_CONNECTOR is not set 330# CONFIG_CONNECTOR is not set
251
252#
253# Memory Technology Devices (MTD)
254#
255# CONFIG_MTD is not set 331# CONFIG_MTD is not set
256 332CONFIG_OF_DEVICE=y
257#
258# Parallel port support
259#
260# CONFIG_PARPORT is not set 333# CONFIG_PARPORT is not set
261 334CONFIG_BLK_DEV=y
262#
263# Plug and Play support
264#
265
266#
267# Block devices
268#
269# CONFIG_BLK_DEV_FD is not set 335# CONFIG_BLK_DEV_FD is not set
270# CONFIG_BLK_CPQ_DA is not set 336# CONFIG_BLK_CPQ_DA is not set
271# CONFIG_BLK_CPQ_CISS_DA is not set 337# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -278,28 +344,15 @@ CONFIG_BLK_DEV_LOOP=y
278# CONFIG_BLK_DEV_SX8 is not set 344# CONFIG_BLK_DEV_SX8 is not set
279CONFIG_BLK_DEV_RAM=y 345CONFIG_BLK_DEV_RAM=y
280CONFIG_BLK_DEV_RAM_COUNT=16 346CONFIG_BLK_DEV_RAM_COUNT=16
281CONFIG_BLK_DEV_RAM_SIZE=32768 347CONFIG_BLK_DEV_RAM_SIZE=4096
282CONFIG_BLK_DEV_INITRD=y 348CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
283# CONFIG_LBD is not set
284# CONFIG_CDROM_PKTCDVD is not set 349# CONFIG_CDROM_PKTCDVD is not set
285
286#
287# IO Schedulers
288#
289CONFIG_IOSCHED_NOOP=y
290CONFIG_IOSCHED_AS=y
291CONFIG_IOSCHED_DEADLINE=y
292CONFIG_IOSCHED_CFQ=y
293CONFIG_DEFAULT_AS=y
294# CONFIG_DEFAULT_DEADLINE is not set
295# CONFIG_DEFAULT_CFQ is not set
296# CONFIG_DEFAULT_NOOP is not set
297CONFIG_DEFAULT_IOSCHED="anticipatory"
298# CONFIG_ATA_OVER_ETH is not set 350# CONFIG_ATA_OVER_ETH is not set
299 351CONFIG_MISC_DEVICES=y
300# 352# CONFIG_PHANTOM is not set
301# ATA/ATAPI/MFM/RLL support 353# CONFIG_EEPROM_93CX6 is not set
302# 354# CONFIG_SGI_IOC4 is not set
355# CONFIG_TIFM_CORE is not set
303# CONFIG_IDE is not set 356# CONFIG_IDE is not set
304 357
305# 358#
@@ -307,135 +360,97 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
307# 360#
308# CONFIG_RAID_ATTRS is not set 361# CONFIG_RAID_ATTRS is not set
309# CONFIG_SCSI is not set 362# CONFIG_SCSI is not set
310 363# CONFIG_SCSI_DMA is not set
311# 364# CONFIG_SCSI_NETLINK is not set
312# Multi-device support (RAID and LVM) 365# CONFIG_ATA is not set
313#
314# CONFIG_MD is not set 366# CONFIG_MD is not set
315
316#
317# Fusion MPT device support
318#
319# CONFIG_FUSION is not set 367# CONFIG_FUSION is not set
320 368
321# 369#
322# IEEE 1394 (FireWire) support 370# IEEE 1394 (FireWire) support
323# 371#
372# CONFIG_FIREWIRE is not set
324# CONFIG_IEEE1394 is not set 373# CONFIG_IEEE1394 is not set
325
326#
327# I2O device support
328#
329# CONFIG_I2O is not set 374# CONFIG_I2O is not set
330 375# CONFIG_MACINTOSH_DRIVERS is not set
331#
332# Macintosh device drivers
333#
334
335#
336# Network device support
337#
338CONFIG_NETDEVICES=y 376CONFIG_NETDEVICES=y
377# CONFIG_NETDEVICES_MULTIQUEUE is not set
339# CONFIG_DUMMY is not set 378# CONFIG_DUMMY is not set
340# CONFIG_BONDING is not set 379# CONFIG_BONDING is not set
380# CONFIG_MACVLAN is not set
341# CONFIG_EQUALIZER is not set 381# CONFIG_EQUALIZER is not set
342# CONFIG_TUN is not set 382# CONFIG_TUN is not set
343 383# CONFIG_VETH is not set
344#
345# ARCnet devices
346#
347# CONFIG_ARCNET is not set 384# CONFIG_ARCNET is not set
348
349#
350# PHY device support
351#
352CONFIG_PHYLIB=y 385CONFIG_PHYLIB=y
353 386
354# 387#
355# MII PHY device drivers 388# MII PHY device drivers
356# 389#
357CONFIG_MARVELL_PHY=y 390# CONFIG_MARVELL_PHY is not set
358# CONFIG_DAVICOM_PHY is not set 391# CONFIG_DAVICOM_PHY is not set
359# CONFIG_QSEMI_PHY is not set 392# CONFIG_QSEMI_PHY is not set
360# CONFIG_LXT_PHY is not set 393# CONFIG_LXT_PHY is not set
361# CONFIG_CICADA_PHY is not set 394# CONFIG_CICADA_PHY is not set
362 395# CONFIG_VITESSE_PHY is not set
363# 396# CONFIG_SMSC_PHY is not set
364# Ethernet (10 or 100Mbit) 397CONFIG_BROADCOM_PHY=y
365# 398# CONFIG_ICPLUS_PHY is not set
399# CONFIG_FIXED_PHY is not set
400# CONFIG_MDIO_BITBANG is not set
366CONFIG_NET_ETHERNET=y 401CONFIG_NET_ETHERNET=y
367CONFIG_MII=y 402CONFIG_MII=y
368# CONFIG_HAPPYMEAL is not set 403# CONFIG_HAPPYMEAL is not set
369# CONFIG_SUNGEM is not set 404# CONFIG_SUNGEM is not set
370# CONFIG_CASSINI is not set 405# CONFIG_CASSINI is not set
371# CONFIG_NET_VENDOR_3COM is not set 406# CONFIG_NET_VENDOR_3COM is not set
372
373#
374# Tulip family network device support
375#
376# CONFIG_NET_TULIP is not set 407# CONFIG_NET_TULIP is not set
377# CONFIG_HP100 is not set 408# CONFIG_HP100 is not set
378CONFIG_NET_PCI=y 409# CONFIG_IBM_NEW_EMAC_ZMII is not set
379# CONFIG_PCNET32 is not set 410# CONFIG_IBM_NEW_EMAC_RGMII is not set
380# CONFIG_AMD8111_ETH is not set 411# CONFIG_IBM_NEW_EMAC_TAH is not set
381# CONFIG_ADAPTEC_STARFIRE is not set 412# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
413# CONFIG_NET_PCI is not set
382# CONFIG_B44 is not set 414# CONFIG_B44 is not set
383# CONFIG_FORCEDETH is not set 415CONFIG_NETDEV_1000=y
384# CONFIG_DGRS is not set
385# CONFIG_EEPRO100 is not set
386CONFIG_E100=y
387# CONFIG_FEALNX is not set
388# CONFIG_NATSEMI is not set
389# CONFIG_NE2K_PCI is not set
390# CONFIG_8139CP is not set
391# CONFIG_8139TOO is not set
392# CONFIG_SIS900 is not set
393# CONFIG_EPIC100 is not set
394# CONFIG_SUNDANCE is not set
395# CONFIG_TLAN is not set
396# CONFIG_VIA_RHINE is not set
397
398#
399# Ethernet (1000 Mbit)
400#
401# CONFIG_ACENIC is not set 416# CONFIG_ACENIC is not set
402# CONFIG_DL2K is not set 417# CONFIG_DL2K is not set
403CONFIG_E1000=y 418# CONFIG_E1000 is not set
404# CONFIG_E1000_NAPI is not set 419# CONFIG_E1000E is not set
405# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 420# CONFIG_IP1000 is not set
406# CONFIG_NS83820 is not set 421# CONFIG_NS83820 is not set
407# CONFIG_HAMACHI is not set 422# CONFIG_HAMACHI is not set
408# CONFIG_YELLOWFIN is not set 423# CONFIG_YELLOWFIN is not set
409# CONFIG_R8169 is not set 424# CONFIG_R8169 is not set
410# CONFIG_SIS190 is not set 425# CONFIG_SIS190 is not set
411# CONFIG_SKGE is not set 426# CONFIG_SKGE is not set
427# CONFIG_SKY2 is not set
412# CONFIG_SK98LIN is not set 428# CONFIG_SK98LIN is not set
413# CONFIG_VIA_VELOCITY is not set 429# CONFIG_VIA_VELOCITY is not set
414# CONFIG_TIGON3 is not set 430# CONFIG_TIGON3 is not set
415# CONFIG_BNX2 is not set 431# CONFIG_BNX2 is not set
416CONFIG_GIANFAR=y 432CONFIG_GIANFAR=y
417# CONFIG_GFAR_NAPI is not set 433CONFIG_GFAR_NAPI=y
418 434# CONFIG_QLA3XXX is not set
419# 435# CONFIG_ATL1 is not set
420# Ethernet (10000 Mbit) 436CONFIG_NETDEV_10000=y
421#
422# CONFIG_CHELSIO_T1 is not set 437# CONFIG_CHELSIO_T1 is not set
438# CONFIG_CHELSIO_T3 is not set
439# CONFIG_IXGBE is not set
423# CONFIG_IXGB is not set 440# CONFIG_IXGB is not set
424# CONFIG_S2IO is not set 441# CONFIG_S2IO is not set
425 442# CONFIG_MYRI10GE is not set
426# 443# CONFIG_NETXEN_NIC is not set
427# Token Ring devices 444# CONFIG_NIU is not set
428# 445# CONFIG_MLX4_CORE is not set
446# CONFIG_TEHUTI is not set
429# CONFIG_TR is not set 447# CONFIG_TR is not set
430 448
431# 449#
432# Wireless LAN (non-hamradio) 450# Wireless LAN
433#
434# CONFIG_NET_RADIO is not set
435
436#
437# Wan interfaces
438# 451#
452# CONFIG_WLAN_PRE80211 is not set
453# CONFIG_WLAN_80211 is not set
439# CONFIG_WAN is not set 454# CONFIG_WAN is not set
440# CONFIG_FDDI is not set 455# CONFIG_FDDI is not set
441# CONFIG_HIPPI is not set 456# CONFIG_HIPPI is not set
@@ -445,28 +460,21 @@ CONFIG_GIANFAR=y
445# CONFIG_NETCONSOLE is not set 460# CONFIG_NETCONSOLE is not set
446# CONFIG_NETPOLL is not set 461# CONFIG_NETPOLL is not set
447# CONFIG_NET_POLL_CONTROLLER is not set 462# CONFIG_NET_POLL_CONTROLLER is not set
448
449#
450# ISDN subsystem
451#
452# CONFIG_ISDN is not set 463# CONFIG_ISDN is not set
453
454#
455# Telephony Support
456#
457# CONFIG_PHONE is not set 464# CONFIG_PHONE is not set
458 465
459# 466#
460# Input device support 467# Input device support
461# 468#
462CONFIG_INPUT=y 469CONFIG_INPUT=y
470# CONFIG_INPUT_FF_MEMLESS is not set
471# CONFIG_INPUT_POLLDEV is not set
463 472
464# 473#
465# Userland interfaces 474# Userland interfaces
466# 475#
467# CONFIG_INPUT_MOUSEDEV is not set 476# CONFIG_INPUT_MOUSEDEV is not set
468# CONFIG_INPUT_JOYDEV is not set 477# CONFIG_INPUT_JOYDEV is not set
469# CONFIG_INPUT_TSDEV is not set
470# CONFIG_INPUT_EVDEV is not set 478# CONFIG_INPUT_EVDEV is not set
471# CONFIG_INPUT_EVBUG is not set 479# CONFIG_INPUT_EVBUG is not set
472 480
@@ -476,6 +484,7 @@ CONFIG_INPUT=y
476# CONFIG_INPUT_KEYBOARD is not set 484# CONFIG_INPUT_KEYBOARD is not set
477# CONFIG_INPUT_MOUSE is not set 485# CONFIG_INPUT_MOUSE is not set
478# CONFIG_INPUT_JOYSTICK is not set 486# CONFIG_INPUT_JOYSTICK is not set
487# CONFIG_INPUT_TABLET is not set
479# CONFIG_INPUT_TOUCHSCREEN is not set 488# CONFIG_INPUT_TOUCHSCREEN is not set
480# CONFIG_INPUT_MISC is not set 489# CONFIG_INPUT_MISC is not set
481 490
@@ -496,228 +505,127 @@ CONFIG_INPUT=y
496# 505#
497CONFIG_SERIAL_8250=y 506CONFIG_SERIAL_8250=y
498CONFIG_SERIAL_8250_CONSOLE=y 507CONFIG_SERIAL_8250_CONSOLE=y
508CONFIG_SERIAL_8250_PCI=y
499CONFIG_SERIAL_8250_NR_UARTS=4 509CONFIG_SERIAL_8250_NR_UARTS=4
510CONFIG_SERIAL_8250_RUNTIME_UARTS=4
500# CONFIG_SERIAL_8250_EXTENDED is not set 511# CONFIG_SERIAL_8250_EXTENDED is not set
512CONFIG_SERIAL_8250_SHARE_IRQ=y
501 513
502# 514#
503# Non-8250 serial port support 515# Non-8250 serial port support
504# 516#
517# CONFIG_SERIAL_UARTLITE is not set
505CONFIG_SERIAL_CORE=y 518CONFIG_SERIAL_CORE=y
506CONFIG_SERIAL_CORE_CONSOLE=y 519CONFIG_SERIAL_CORE_CONSOLE=y
507# CONFIG_SERIAL_JSM is not set 520# CONFIG_SERIAL_JSM is not set
521# CONFIG_SERIAL_OF_PLATFORM is not set
508CONFIG_UNIX98_PTYS=y 522CONFIG_UNIX98_PTYS=y
509CONFIG_LEGACY_PTYS=y 523CONFIG_LEGACY_PTYS=y
510CONFIG_LEGACY_PTY_COUNT=256 524CONFIG_LEGACY_PTY_COUNT=256
511
512#
513# IPMI
514#
515# CONFIG_IPMI_HANDLER is not set 525# CONFIG_IPMI_HANDLER is not set
516 526# CONFIG_HW_RANDOM is not set
517#
518# Watchdog Cards
519#
520# CONFIG_WATCHDOG is not set
521# CONFIG_NVRAM is not set 527# CONFIG_NVRAM is not set
522CONFIG_GEN_RTC=y 528CONFIG_GEN_RTC=y
523# CONFIG_GEN_RTC_X is not set 529# CONFIG_GEN_RTC_X is not set
524# CONFIG_DTLK is not set
525# CONFIG_R3964 is not set 530# CONFIG_R3964 is not set
526# CONFIG_APPLICOM is not set 531# CONFIG_APPLICOM is not set
527
528#
529# Ftape, the floppy tape device driver
530#
531# CONFIG_AGP is not set
532# CONFIG_DRM is not set
533# CONFIG_RAW_DRIVER is not set 532# CONFIG_RAW_DRIVER is not set
534
535#
536# TPM devices
537#
538# CONFIG_TCG_TPM is not set 533# CONFIG_TCG_TPM is not set
539# CONFIG_TELCLOCK is not set 534CONFIG_DEVPORT=y
540 535# CONFIG_I2C is not set
541#
542# I2C support
543#
544CONFIG_I2C=y
545CONFIG_I2C_CHARDEV=y
546 536
547# 537#
548# I2C Algorithms 538# SPI support
549#
550# CONFIG_I2C_ALGOBIT is not set
551# CONFIG_I2C_ALGOPCF is not set
552# CONFIG_I2C_ALGOPCA is not set
553
554#
555# I2C Hardware Bus support
556#
557# CONFIG_I2C_ALI1535 is not set
558# CONFIG_I2C_ALI1563 is not set
559# CONFIG_I2C_ALI15X3 is not set
560# CONFIG_I2C_AMD756 is not set
561# CONFIG_I2C_AMD8111 is not set
562# CONFIG_I2C_I801 is not set
563# CONFIG_I2C_I810 is not set
564# CONFIG_I2C_PIIX4 is not set
565CONFIG_I2C_MPC=y
566# CONFIG_I2C_NFORCE2 is not set
567# CONFIG_I2C_PARPORT_LIGHT is not set
568# CONFIG_I2C_PROSAVAGE is not set
569# CONFIG_I2C_SAVAGE4 is not set
570# CONFIG_SCx200_ACB is not set
571# CONFIG_I2C_SIS5595 is not set
572# CONFIG_I2C_SIS630 is not set
573# CONFIG_I2C_SIS96X is not set
574# CONFIG_I2C_VIA is not set
575# CONFIG_I2C_VIAPRO is not set
576# CONFIG_I2C_VOODOO3 is not set
577# CONFIG_I2C_PCA_ISA is not set
578
579#
580# Miscellaneous I2C Chip support
581#
582# CONFIG_SENSORS_DS1337 is not set
583# CONFIG_SENSORS_DS1374 is not set
584# CONFIG_SENSORS_EEPROM is not set
585# CONFIG_SENSORS_PCF8574 is not set
586# CONFIG_SENSORS_PCA9539 is not set
587# CONFIG_SENSORS_PCF8591 is not set
588# CONFIG_SENSORS_RTC8564 is not set
589# CONFIG_SENSORS_M41T00 is not set
590# CONFIG_SENSORS_MAX6875 is not set
591# CONFIG_RTC_X1205_I2C is not set
592# CONFIG_I2C_DEBUG_CORE is not set
593# CONFIG_I2C_DEBUG_ALGO is not set
594# CONFIG_I2C_DEBUG_BUS is not set
595# CONFIG_I2C_DEBUG_CHIP is not set
596
597#
598# Dallas's 1-wire bus
599# 539#
540# CONFIG_SPI is not set
541# CONFIG_SPI_MASTER is not set
600# CONFIG_W1 is not set 542# CONFIG_W1 is not set
601 543# CONFIG_POWER_SUPPLY is not set
602#
603# Hardware Monitoring support
604#
605CONFIG_HWMON=y 544CONFIG_HWMON=y
606# CONFIG_HWMON_VID is not set 545# CONFIG_HWMON_VID is not set
607# CONFIG_SENSORS_ADM1021 is not set 546# CONFIG_SENSORS_I5K_AMB is not set
608# CONFIG_SENSORS_ADM1025 is not set 547# CONFIG_SENSORS_F71805F is not set
609# CONFIG_SENSORS_ADM1026 is not set 548# CONFIG_SENSORS_F71882FG is not set
610# CONFIG_SENSORS_ADM1031 is not set
611# CONFIG_SENSORS_ADM9240 is not set
612# CONFIG_SENSORS_ASB100 is not set
613# CONFIG_SENSORS_ATXP1 is not set
614# CONFIG_SENSORS_DS1621 is not set
615# CONFIG_SENSORS_FSCHER is not set
616# CONFIG_SENSORS_FSCPOS is not set
617# CONFIG_SENSORS_GL518SM is not set
618# CONFIG_SENSORS_GL520SM is not set
619# CONFIG_SENSORS_IT87 is not set 549# CONFIG_SENSORS_IT87 is not set
620# CONFIG_SENSORS_LM63 is not set
621# CONFIG_SENSORS_LM75 is not set
622# CONFIG_SENSORS_LM77 is not set
623# CONFIG_SENSORS_LM78 is not set
624# CONFIG_SENSORS_LM80 is not set
625# CONFIG_SENSORS_LM83 is not set
626# CONFIG_SENSORS_LM85 is not set
627# CONFIG_SENSORS_LM87 is not set
628# CONFIG_SENSORS_LM90 is not set
629# CONFIG_SENSORS_LM92 is not set
630# CONFIG_SENSORS_MAX1619 is not set
631# CONFIG_SENSORS_PC87360 is not set 550# CONFIG_SENSORS_PC87360 is not set
551# CONFIG_SENSORS_PC87427 is not set
632# CONFIG_SENSORS_SIS5595 is not set 552# CONFIG_SENSORS_SIS5595 is not set
633# CONFIG_SENSORS_SMSC47M1 is not set 553# CONFIG_SENSORS_SMSC47M1 is not set
634# CONFIG_SENSORS_SMSC47B397 is not set 554# CONFIG_SENSORS_SMSC47B397 is not set
635# CONFIG_SENSORS_VIA686A is not set 555# CONFIG_SENSORS_VIA686A is not set
636# CONFIG_SENSORS_W83781D is not set 556# CONFIG_SENSORS_VT1211 is not set
637# CONFIG_SENSORS_W83792D is not set 557# CONFIG_SENSORS_VT8231 is not set
638# CONFIG_SENSORS_W83L785TS is not set
639# CONFIG_SENSORS_W83627HF is not set 558# CONFIG_SENSORS_W83627HF is not set
640# CONFIG_SENSORS_W83627EHF is not set 559# CONFIG_SENSORS_W83627EHF is not set
641# CONFIG_HWMON_DEBUG_CHIP is not set 560# CONFIG_HWMON_DEBUG_CHIP is not set
561# CONFIG_WATCHDOG is not set
642 562
643# 563#
644# Misc devices 564# Sonics Silicon Backplane
645# 565#
566CONFIG_SSB_POSSIBLE=y
567# CONFIG_SSB is not set
646 568
647# 569#
648# Multimedia Capabilities Port drivers 570# Multifunction device drivers
649# 571#
572# CONFIG_MFD_SM501 is not set
650 573
651# 574#
652# Multimedia devices 575# Multimedia devices
653# 576#
654# CONFIG_VIDEO_DEV is not set 577# CONFIG_VIDEO_DEV is not set
655 578# CONFIG_DVB_CORE is not set
656# 579CONFIG_DAB=y
657# Digital Video Broadcasting Devices
658#
659# CONFIG_DVB is not set
660 580
661# 581#
662# Graphics support 582# Graphics support
663# 583#
584# CONFIG_AGP is not set
585# CONFIG_DRM is not set
586# CONFIG_VGASTATE is not set
587CONFIG_VIDEO_OUTPUT_CONTROL=y
664# CONFIG_FB is not set 588# CONFIG_FB is not set
589# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
665 590
666# 591#
667# Sound 592# Display device support
668#
669# CONFIG_SOUND is not set
670
671#
672# USB support
673#
674CONFIG_USB_ARCH_HAS_HCD=y
675CONFIG_USB_ARCH_HAS_OHCI=y
676# CONFIG_USB is not set
677
678#
679# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
680# 593#
594# CONFIG_DISPLAY_SUPPORT is not set
681 595
682# 596#
683# USB Gadget Support 597# Sound
684#
685# CONFIG_USB_GADGET is not set
686
687#
688# MMC/SD Card support
689# 598#
599# CONFIG_SOUND is not set
600# CONFIG_HID_SUPPORT is not set
601# CONFIG_USB_SUPPORT is not set
690# CONFIG_MMC is not set 602# CONFIG_MMC is not set
691 603# CONFIG_NEW_LEDS is not set
692#
693# InfiniBand support
694#
695# CONFIG_INFINIBAND is not set 604# CONFIG_INFINIBAND is not set
605# CONFIG_EDAC is not set
606# CONFIG_RTC_CLASS is not set
696 607
697# 608#
698# SN Devices 609# Userspace I/O
699# 610#
611# CONFIG_UIO is not set
700 612
701# 613#
702# File systems 614# File systems
703# 615#
704CONFIG_EXT2_FS=y 616# CONFIG_EXT2_FS is not set
705# CONFIG_EXT2_FS_XATTR is not set 617# CONFIG_EXT3_FS is not set
706# CONFIG_EXT2_FS_XIP is not set 618# CONFIG_EXT4DEV_FS is not set
707CONFIG_EXT3_FS=y
708CONFIG_EXT3_FS_XATTR=y
709# CONFIG_EXT3_FS_POSIX_ACL is not set
710# CONFIG_EXT3_FS_SECURITY is not set
711CONFIG_JBD=y
712# CONFIG_JBD_DEBUG is not set
713CONFIG_FS_MBCACHE=y
714# CONFIG_REISERFS_FS is not set 619# CONFIG_REISERFS_FS is not set
715# CONFIG_JFS_FS is not set 620# CONFIG_JFS_FS is not set
716# CONFIG_FS_POSIX_ACL is not set 621# CONFIG_FS_POSIX_ACL is not set
717# CONFIG_XFS_FS is not set 622# CONFIG_XFS_FS is not set
623# CONFIG_GFS2_FS is not set
624# CONFIG_OCFS2_FS is not set
718# CONFIG_MINIX_FS is not set 625# CONFIG_MINIX_FS is not set
719# CONFIG_ROMFS_FS is not set 626# CONFIG_ROMFS_FS is not set
720CONFIG_INOTIFY=y 627CONFIG_INOTIFY=y
628CONFIG_INOTIFY_USER=y
721# CONFIG_QUOTA is not set 629# CONFIG_QUOTA is not set
722CONFIG_DNOTIFY=y 630CONFIG_DNOTIFY=y
723# CONFIG_AUTOFS_FS is not set 631# CONFIG_AUTOFS_FS is not set
@@ -742,11 +650,12 @@ CONFIG_DNOTIFY=y
742# 650#
743CONFIG_PROC_FS=y 651CONFIG_PROC_FS=y
744CONFIG_PROC_KCORE=y 652CONFIG_PROC_KCORE=y
653CONFIG_PROC_SYSCTL=y
745CONFIG_SYSFS=y 654CONFIG_SYSFS=y
746CONFIG_TMPFS=y 655CONFIG_TMPFS=y
656# CONFIG_TMPFS_POSIX_ACL is not set
747# CONFIG_HUGETLB_PAGE is not set 657# CONFIG_HUGETLB_PAGE is not set
748CONFIG_RAMFS=y 658# CONFIG_CONFIGFS_FS is not set
749# CONFIG_RELAYFS_FS is not set
750 659
751# 660#
752# Miscellaneous filesystems 661# Miscellaneous filesystems
@@ -764,10 +673,7 @@ CONFIG_RAMFS=y
764# CONFIG_QNX4FS_FS is not set 673# CONFIG_QNX4FS_FS is not set
765# CONFIG_SYSV_FS is not set 674# CONFIG_SYSV_FS is not set
766# CONFIG_UFS_FS is not set 675# CONFIG_UFS_FS is not set
767 676CONFIG_NETWORK_FILESYSTEMS=y
768#
769# Network File Systems
770#
771CONFIG_NFS_FS=y 677CONFIG_NFS_FS=y
772# CONFIG_NFS_V3 is not set 678# CONFIG_NFS_V3 is not set
773# CONFIG_NFS_V4 is not set 679# CONFIG_NFS_V4 is not set
@@ -777,6 +683,7 @@ CONFIG_ROOT_NFS=y
777CONFIG_LOCKD=y 683CONFIG_LOCKD=y
778CONFIG_NFS_COMMON=y 684CONFIG_NFS_COMMON=y
779CONFIG_SUNRPC=y 685CONFIG_SUNRPC=y
686# CONFIG_SUNRPC_BIND34 is not set
780# CONFIG_RPCSEC_GSS_KRB5 is not set 687# CONFIG_RPCSEC_GSS_KRB5 is not set
781# CONFIG_RPCSEC_GSS_SPKM3 is not set 688# CONFIG_RPCSEC_GSS_SPKM3 is not set
782# CONFIG_SMB_FS is not set 689# CONFIG_SMB_FS is not set
@@ -784,61 +691,51 @@ CONFIG_SUNRPC=y
784# CONFIG_NCP_FS is not set 691# CONFIG_NCP_FS is not set
785# CONFIG_CODA_FS is not set 692# CONFIG_CODA_FS is not set
786# CONFIG_AFS_FS is not set 693# CONFIG_AFS_FS is not set
787# CONFIG_9P_FS is not set
788 694
789# 695#
790# Partition Types 696# Partition Types
791# 697#
792CONFIG_PARTITION_ADVANCED=y 698# CONFIG_PARTITION_ADVANCED is not set
793# CONFIG_ACORN_PARTITION is not set 699CONFIG_MSDOS_PARTITION=y
794# CONFIG_OSF_PARTITION is not set
795# CONFIG_AMIGA_PARTITION is not set
796# CONFIG_ATARI_PARTITION is not set
797# CONFIG_MAC_PARTITION is not set
798# CONFIG_MSDOS_PARTITION is not set
799# CONFIG_LDM_PARTITION is not set
800# CONFIG_SGI_PARTITION is not set
801# CONFIG_ULTRIX_PARTITION is not set
802# CONFIG_SUN_PARTITION is not set
803# CONFIG_EFI_PARTITION is not set
804
805#
806# Native Language Support
807#
808# CONFIG_NLS is not set 700# CONFIG_NLS is not set
701# CONFIG_DLM is not set
809 702
810# 703#
811# Library routines 704# Library routines
812# 705#
706CONFIG_BITREVERSE=y
813# CONFIG_CRC_CCITT is not set 707# CONFIG_CRC_CCITT is not set
814# CONFIG_CRC16 is not set 708# CONFIG_CRC16 is not set
709# CONFIG_CRC_ITU_T is not set
815CONFIG_CRC32=y 710CONFIG_CRC32=y
711# CONFIG_CRC7 is not set
816# CONFIG_LIBCRC32C is not set 712# CONFIG_LIBCRC32C is not set
817 713CONFIG_PLIST=y
818# 714CONFIG_HAS_IOMEM=y
819# Profiling support 715CONFIG_HAS_IOPORT=y
820# 716CONFIG_HAS_DMA=y
821# CONFIG_PROFILING is not set 717# CONFIG_INSTRUMENTATION is not set
822 718
823# 719#
824# Kernel hacking 720# Kernel hacking
825# 721#
826# CONFIG_PRINTK_TIME is not set 722# CONFIG_PRINTK_TIME is not set
723CONFIG_ENABLE_WARN_DEPRECATED=y
724CONFIG_ENABLE_MUST_CHECK=y
725# CONFIG_MAGIC_SYSRQ is not set
726# CONFIG_UNUSED_SYMBOLS is not set
727# CONFIG_DEBUG_FS is not set
728# CONFIG_HEADERS_CHECK is not set
827# CONFIG_DEBUG_KERNEL is not set 729# CONFIG_DEBUG_KERNEL is not set
828CONFIG_LOG_BUF_SHIFT=14 730# CONFIG_DEBUG_BUGVERBOSE is not set
829# CONFIG_SERIAL_TEXT_DEBUG is not set 731# CONFIG_SAMPLES is not set
732# CONFIG_PPC_EARLY_DEBUG is not set
830 733
831# 734#
832# Security options 735# Security options
833# 736#
834# CONFIG_KEYS is not set 737# CONFIG_KEYS is not set
835# CONFIG_SECURITY is not set 738# CONFIG_SECURITY is not set
836 739# CONFIG_SECURITY_FILE_CAPABILITIES is not set
837#
838# Cryptographic options
839#
840# CONFIG_CRYPTO is not set 740# CONFIG_CRYPTO is not set
841 741# CONFIG_PPC_CLOCK is not set
842#
843# Hardware crypto devices
844#
diff --git a/arch/powerpc/configs/sbc8560_defconfig b/arch/powerpc/configs/sbc8560_defconfig
new file mode 100644
index 000000000000..d89fce0d3ba1
--- /dev/null
+++ b/arch/powerpc/configs/sbc8560_defconfig
@@ -0,0 +1,764 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc4
4# Wed Jan 23 14:59:20 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
40CONFIG_PPC=y
41CONFIG_EARLY_PRINTK=y
42CONFIG_GENERIC_NVRAM=y
43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
55
56#
57# General setup
58#
59CONFIG_EXPERIMENTAL=y
60CONFIG_BROKEN_ON_SMP=y
61CONFIG_INIT_ENV_ARG_LIMIT=32
62CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y
64CONFIG_SWAP=y
65CONFIG_SYSVIPC=y
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_USER_NS is not set
71# CONFIG_PID_NS is not set
72# CONFIG_AUDIT is not set
73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
87CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_ALL is not set
89# CONFIG_KALLSYMS_EXTRA_PASS is not set
90CONFIG_HOTPLUG=y
91CONFIG_PRINTK=y
92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
94CONFIG_BASE_FULL=y
95CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y
97CONFIG_EPOLL=y
98CONFIG_SIGNALFD=y
99CONFIG_EVENTFD=y
100CONFIG_SHMEM=y
101CONFIG_VM_EVENT_COUNTERS=y
102CONFIG_SLAB=y
103# CONFIG_SLUB is not set
104# CONFIG_SLOB is not set
105CONFIG_RT_MUTEXES=y
106# CONFIG_TINY_SHMEM is not set
107CONFIG_BASE_SMALL=0
108# CONFIG_MODULES is not set
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# CONFIG_BLK_DEV_BSG is not set
114
115#
116# IO Schedulers
117#
118CONFIG_IOSCHED_NOOP=y
119CONFIG_IOSCHED_AS=y
120CONFIG_IOSCHED_DEADLINE=y
121CONFIG_IOSCHED_CFQ=y
122CONFIG_DEFAULT_AS=y
123# CONFIG_DEFAULT_DEADLINE is not set
124# CONFIG_DEFAULT_CFQ is not set
125# CONFIG_DEFAULT_NOOP is not set
126CONFIG_DEFAULT_IOSCHED="anticipatory"
127
128#
129# Platform support
130#
131# CONFIG_PPC_MPC52xx is not set
132# CONFIG_PPC_MPC5200 is not set
133# CONFIG_PPC_CELL is not set
134# CONFIG_PPC_CELL_NATIVE is not set
135# CONFIG_PQ2ADS is not set
136# CONFIG_MPC8540_ADS is not set
137# CONFIG_MPC8560_ADS is not set
138# CONFIG_MPC85xx_CDS is not set
139# CONFIG_MPC85xx_MDS is not set
140# CONFIG_MPC85xx_DS is not set
141CONFIG_SBC8560=y
142CONFIG_MPC8560=y
143CONFIG_MPC85xx=y
144CONFIG_MPIC=y
145# CONFIG_MPIC_WEIRD is not set
146# CONFIG_PPC_I8259 is not set
147# CONFIG_PPC_RTAS is not set
148# CONFIG_MMIO_NVRAM is not set
149# CONFIG_PPC_MPC106 is not set
150# CONFIG_PPC_970_NAP is not set
151# CONFIG_PPC_INDIRECT_IO is not set
152# CONFIG_GENERIC_IOMAP is not set
153# CONFIG_CPU_FREQ is not set
154# CONFIG_CPM2 is not set
155# CONFIG_FSL_ULI1575 is not set
156
157#
158# Kernel options
159#
160# CONFIG_HIGHMEM is not set
161# CONFIG_TICK_ONESHOT is not set
162# CONFIG_NO_HZ is not set
163# CONFIG_HIGH_RES_TIMERS is not set
164CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
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_BINFMT_ELF=y
174CONFIG_BINFMT_MISC=y
175# CONFIG_MATH_EMULATION is not set
176CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
177CONFIG_ARCH_FLATMEM_ENABLE=y
178CONFIG_ARCH_POPULATES_NODE_MAP=y
179CONFIG_SELECT_MEMORY_MODEL=y
180CONFIG_FLATMEM_MANUAL=y
181# CONFIG_DISCONTIGMEM_MANUAL is not set
182# CONFIG_SPARSEMEM_MANUAL is not set
183CONFIG_FLATMEM=y
184CONFIG_FLAT_NODE_MEM_MAP=y
185# CONFIG_SPARSEMEM_STATIC is not set
186# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
187CONFIG_SPLIT_PTLOCK_CPUS=4
188# CONFIG_RESOURCES_64BIT is not set
189CONFIG_ZONE_DMA_FLAG=1
190CONFIG_BOUNCE=y
191CONFIG_VIRT_TO_BUS=y
192CONFIG_PROC_DEVICETREE=y
193# CONFIG_CMDLINE_BOOL is not set
194# CONFIG_PM is not set
195CONFIG_SUSPEND_UP_POSSIBLE=y
196CONFIG_HIBERNATION_UP_POSSIBLE=y
197# CONFIG_SECCOMP is not set
198CONFIG_WANT_DEVICE_TREE=y
199CONFIG_DEVICE_TREE=""
200CONFIG_ISA_DMA_API=y
201
202#
203# Bus options
204#
205CONFIG_ZONE_DMA=y
206CONFIG_FSL_SOC=y
207# CONFIG_PCI is not set
208# CONFIG_PCI_DOMAINS is not set
209# CONFIG_PCI_SYSCALL is not set
210# CONFIG_ARCH_SUPPORTS_MSI is not set
211# CONFIG_PCCARD is not set
212
213#
214# Advanced setup
215#
216# CONFIG_ADVANCED_OPTIONS is not set
217
218#
219# Default settings for advanced configuration options are used
220#
221CONFIG_HIGHMEM_START=0xfe000000
222CONFIG_LOWMEM_SIZE=0x30000000
223CONFIG_KERNEL_START=0xc0000000
224CONFIG_TASK_SIZE=0xc0000000
225CONFIG_BOOT_LOAD=0x00800000
226
227#
228# Networking
229#
230CONFIG_NET=y
231
232#
233# Networking options
234#
235CONFIG_PACKET=y
236# CONFIG_PACKET_MMAP is not set
237CONFIG_UNIX=y
238CONFIG_XFRM=y
239CONFIG_XFRM_USER=y
240# CONFIG_XFRM_SUB_POLICY is not set
241# CONFIG_XFRM_MIGRATE is not set
242# CONFIG_NET_KEY is not set
243CONFIG_INET=y
244CONFIG_IP_MULTICAST=y
245# CONFIG_IP_ADVANCED_ROUTER is not set
246CONFIG_IP_FIB_HASH=y
247CONFIG_IP_PNP=y
248CONFIG_IP_PNP_DHCP=y
249CONFIG_IP_PNP_BOOTP=y
250# CONFIG_IP_PNP_RARP is not set
251# CONFIG_NET_IPIP is not set
252# CONFIG_NET_IPGRE is not set
253# CONFIG_IP_MROUTE is not set
254# CONFIG_ARPD is not set
255CONFIG_SYN_COOKIES=y
256# CONFIG_INET_AH is not set
257# CONFIG_INET_ESP is not set
258# CONFIG_INET_IPCOMP is not set
259# CONFIG_INET_XFRM_TUNNEL is not set
260# CONFIG_INET_TUNNEL is not set
261CONFIG_INET_XFRM_MODE_TRANSPORT=y
262CONFIG_INET_XFRM_MODE_TUNNEL=y
263CONFIG_INET_XFRM_MODE_BEET=y
264# CONFIG_INET_LRO is not set
265CONFIG_INET_DIAG=y
266CONFIG_INET_TCP_DIAG=y
267# CONFIG_TCP_CONG_ADVANCED is not set
268CONFIG_TCP_CONG_CUBIC=y
269CONFIG_DEFAULT_TCP_CONG="cubic"
270# CONFIG_TCP_MD5SIG is not set
271# CONFIG_IPV6 is not set
272# CONFIG_INET6_XFRM_TUNNEL is not set
273# CONFIG_INET6_TUNNEL is not set
274# CONFIG_NETWORK_SECMARK is not set
275# CONFIG_NETFILTER is not set
276# CONFIG_IP_DCCP is not set
277# CONFIG_IP_SCTP is not set
278# CONFIG_TIPC is not set
279# CONFIG_ATM is not set
280# CONFIG_BRIDGE is not set
281# CONFIG_VLAN_8021Q is not set
282# CONFIG_DECNET is not set
283# CONFIG_LLC2 is not set
284# CONFIG_IPX is not set
285# CONFIG_ATALK is not set
286# CONFIG_X25 is not set
287# CONFIG_LAPB is not set
288# CONFIG_ECONET is not set
289# CONFIG_WAN_ROUTER is not set
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_AF_RXRPC is not set
300
301#
302# Wireless
303#
304# CONFIG_CFG80211 is not set
305# CONFIG_WIRELESS_EXT is not set
306# CONFIG_MAC80211 is not set
307# CONFIG_IEEE80211 is not set
308# CONFIG_RFKILL is not set
309# CONFIG_NET_9P is not set
310
311#
312# Device Drivers
313#
314
315#
316# Generic Driver Options
317#
318CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
319CONFIG_STANDALONE=y
320CONFIG_PREVENT_FIRMWARE_BUILD=y
321# CONFIG_FW_LOADER is not set
322# CONFIG_DEBUG_DRIVER is not set
323# CONFIG_DEBUG_DEVRES is not set
324# CONFIG_SYS_HYPERVISOR is not set
325# CONFIG_CONNECTOR is not set
326# CONFIG_MTD is not set
327CONFIG_OF_DEVICE=y
328# CONFIG_PARPORT is not set
329CONFIG_BLK_DEV=y
330# CONFIG_BLK_DEV_FD is not set
331# CONFIG_BLK_DEV_COW_COMMON is not set
332CONFIG_BLK_DEV_LOOP=y
333# CONFIG_BLK_DEV_CRYPTOLOOP is not set
334# CONFIG_BLK_DEV_NBD is not set
335CONFIG_BLK_DEV_RAM=y
336CONFIG_BLK_DEV_RAM_COUNT=16
337CONFIG_BLK_DEV_RAM_SIZE=32768
338CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
339# CONFIG_CDROM_PKTCDVD is not set
340# CONFIG_ATA_OVER_ETH is not set
341CONFIG_MISC_DEVICES=y
342# CONFIG_EEPROM_93CX6 is not set
343# CONFIG_IDE is not set
344
345#
346# SCSI device support
347#
348# CONFIG_RAID_ATTRS is not set
349# CONFIG_SCSI is not set
350# CONFIG_SCSI_DMA is not set
351# CONFIG_SCSI_NETLINK is not set
352# CONFIG_ATA is not set
353# CONFIG_MD is not set
354# CONFIG_MACINTOSH_DRIVERS is not set
355CONFIG_NETDEVICES=y
356# CONFIG_NETDEVICES_MULTIQUEUE is not set
357# CONFIG_DUMMY is not set
358# CONFIG_BONDING is not set
359# CONFIG_MACVLAN is not set
360# CONFIG_EQUALIZER is not set
361# CONFIG_TUN is not set
362# CONFIG_VETH is not set
363CONFIG_PHYLIB=y
364
365#
366# MII PHY device drivers
367#
368# CONFIG_MARVELL_PHY is not set
369# CONFIG_DAVICOM_PHY is not set
370# CONFIG_QSEMI_PHY is not set
371# CONFIG_LXT_PHY is not set
372# CONFIG_CICADA_PHY is not set
373# CONFIG_VITESSE_PHY is not set
374# CONFIG_SMSC_PHY is not set
375CONFIG_BROADCOM_PHY=y
376# CONFIG_ICPLUS_PHY is not set
377# CONFIG_FIXED_PHY is not set
378# CONFIG_MDIO_BITBANG is not set
379CONFIG_NET_ETHERNET=y
380CONFIG_MII=y
381# CONFIG_IBM_NEW_EMAC_ZMII is not set
382# CONFIG_IBM_NEW_EMAC_RGMII is not set
383# CONFIG_IBM_NEW_EMAC_TAH is not set
384# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
385# CONFIG_B44 is not set
386CONFIG_NETDEV_1000=y
387CONFIG_GIANFAR=y
388CONFIG_GFAR_NAPI=y
389CONFIG_NETDEV_10000=y
390
391#
392# Wireless LAN
393#
394# CONFIG_WLAN_PRE80211 is not set
395# CONFIG_WLAN_80211 is not set
396# CONFIG_WAN is not set
397# CONFIG_PPP is not set
398# CONFIG_SLIP is not set
399# CONFIG_SHAPER is not set
400# CONFIG_NETCONSOLE is not set
401# CONFIG_NETPOLL is not set
402# CONFIG_NET_POLL_CONTROLLER is not set
403# CONFIG_ISDN is not set
404# CONFIG_PHONE is not set
405
406#
407# Input device support
408#
409CONFIG_INPUT=y
410# CONFIG_INPUT_FF_MEMLESS is not set
411# CONFIG_INPUT_POLLDEV is not set
412
413#
414# Userland interfaces
415#
416# CONFIG_INPUT_MOUSEDEV is not set
417# CONFIG_INPUT_JOYDEV is not set
418# CONFIG_INPUT_EVDEV is not set
419# CONFIG_INPUT_EVBUG is not set
420
421#
422# Input Device Drivers
423#
424# CONFIG_INPUT_KEYBOARD is not set
425# CONFIG_INPUT_MOUSE is not set
426# CONFIG_INPUT_JOYSTICK is not set
427# CONFIG_INPUT_TABLET is not set
428# CONFIG_INPUT_TOUCHSCREEN is not set
429# CONFIG_INPUT_MISC is not set
430
431#
432# Hardware I/O ports
433#
434# CONFIG_SERIO is not set
435# CONFIG_GAMEPORT is not set
436
437#
438# Character devices
439#
440# CONFIG_VT is not set
441# CONFIG_SERIAL_NONSTANDARD is not set
442
443#
444# Serial drivers
445#
446CONFIG_SERIAL_8250=y
447CONFIG_SERIAL_8250_CONSOLE=y
448CONFIG_SERIAL_8250_NR_UARTS=2
449CONFIG_SERIAL_8250_RUNTIME_UARTS=2
450# CONFIG_SERIAL_8250_EXTENDED is not set
451CONFIG_SERIAL_8250_SHARE_IRQ=y
452
453#
454# Non-8250 serial port support
455#
456# CONFIG_SERIAL_UARTLITE is not set
457CONFIG_SERIAL_CORE=y
458CONFIG_SERIAL_CORE_CONSOLE=y
459# CONFIG_SERIAL_OF_PLATFORM is not set
460CONFIG_UNIX98_PTYS=y
461CONFIG_LEGACY_PTYS=y
462CONFIG_LEGACY_PTY_COUNT=256
463# CONFIG_IPMI_HANDLER is not set
464# CONFIG_HW_RANDOM is not set
465# CONFIG_NVRAM is not set
466# CONFIG_GEN_RTC is not set
467# CONFIG_R3964 is not set
468# CONFIG_RAW_DRIVER is not set
469# CONFIG_TCG_TPM is not set
470# CONFIG_I2C is not set
471
472#
473# SPI support
474#
475# CONFIG_SPI is not set
476# CONFIG_SPI_MASTER is not set
477# CONFIG_W1 is not set
478# CONFIG_POWER_SUPPLY is not set
479CONFIG_HWMON=y
480# CONFIG_HWMON_VID is not set
481# CONFIG_SENSORS_F71805F is not set
482# CONFIG_SENSORS_F71882FG is not set
483# CONFIG_SENSORS_IT87 is not set
484# CONFIG_SENSORS_PC87360 is not set
485# CONFIG_SENSORS_PC87427 is not set
486# CONFIG_SENSORS_SMSC47M1 is not set
487# CONFIG_SENSORS_SMSC47B397 is not set
488# CONFIG_SENSORS_VT1211 is not set
489# CONFIG_SENSORS_W83627HF is not set
490# CONFIG_SENSORS_W83627EHF is not set
491# CONFIG_HWMON_DEBUG_CHIP is not set
492# CONFIG_WATCHDOG is not set
493
494#
495# Sonics Silicon Backplane
496#
497CONFIG_SSB_POSSIBLE=y
498# CONFIG_SSB is not set
499
500#
501# Multifunction device drivers
502#
503# CONFIG_MFD_SM501 is not set
504
505#
506# Multimedia devices
507#
508# CONFIG_VIDEO_DEV is not set
509# CONFIG_DVB_CORE is not set
510CONFIG_DAB=y
511
512#
513# Graphics support
514#
515# CONFIG_VGASTATE is not set
516CONFIG_VIDEO_OUTPUT_CONTROL=y
517# CONFIG_FB is not set
518# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
519
520#
521# Display device support
522#
523# CONFIG_DISPLAY_SUPPORT is not set
524
525#
526# Sound
527#
528# CONFIG_SOUND is not set
529CONFIG_HID_SUPPORT=y
530CONFIG_HID=y
531# CONFIG_HID_DEBUG is not set
532# CONFIG_HIDRAW is not set
533CONFIG_USB_SUPPORT=y
534# CONFIG_USB_ARCH_HAS_HCD is not set
535# CONFIG_USB_ARCH_HAS_OHCI is not set
536# CONFIG_USB_ARCH_HAS_EHCI is not set
537
538#
539# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
540#
541
542#
543# USB Gadget Support
544#
545# CONFIG_USB_GADGET is not set
546# CONFIG_MMC is not set
547# CONFIG_NEW_LEDS is not set
548# CONFIG_EDAC is not set
549CONFIG_RTC_LIB=y
550CONFIG_RTC_CLASS=y
551CONFIG_RTC_HCTOSYS=y
552CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
553# CONFIG_RTC_DEBUG is not set
554
555#
556# RTC interfaces
557#
558CONFIG_RTC_INTF_SYSFS=y
559CONFIG_RTC_INTF_PROC=y
560CONFIG_RTC_INTF_DEV=y
561# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
562# CONFIG_RTC_DRV_TEST is not set
563
564#
565# SPI RTC drivers
566#
567
568#
569# Platform RTC drivers
570#
571# CONFIG_RTC_DRV_CMOS is not set
572# CONFIG_RTC_DRV_DS1553 is not set
573# CONFIG_RTC_DRV_STK17TA8 is not set
574# CONFIG_RTC_DRV_DS1742 is not set
575# CONFIG_RTC_DRV_M48T86 is not set
576CONFIG_RTC_DRV_M48T59=y
577# CONFIG_RTC_DRV_V3020 is not set
578
579#
580# on-CPU RTC drivers
581#
582
583#
584# Userspace I/O
585#
586# CONFIG_UIO is not set
587
588#
589# File systems
590#
591# CONFIG_EXT2_FS is not set
592# CONFIG_EXT3_FS is not set
593# CONFIG_EXT4DEV_FS is not set
594# CONFIG_REISERFS_FS is not set
595# CONFIG_JFS_FS is not set
596# CONFIG_FS_POSIX_ACL is not set
597# CONFIG_XFS_FS is not set
598# CONFIG_GFS2_FS is not set
599# CONFIG_OCFS2_FS is not set
600# CONFIG_MINIX_FS is not set
601# CONFIG_ROMFS_FS is not set
602CONFIG_INOTIFY=y
603CONFIG_INOTIFY_USER=y
604# CONFIG_QUOTA is not set
605CONFIG_DNOTIFY=y
606# CONFIG_AUTOFS_FS is not set
607# CONFIG_AUTOFS4_FS is not set
608# CONFIG_FUSE_FS is not set
609
610#
611# CD-ROM/DVD Filesystems
612#
613# CONFIG_ISO9660_FS is not set
614# CONFIG_UDF_FS is not set
615
616#
617# DOS/FAT/NT Filesystems
618#
619# CONFIG_MSDOS_FS is not set
620# CONFIG_VFAT_FS is not set
621# CONFIG_NTFS_FS is not set
622
623#
624# Pseudo filesystems
625#
626CONFIG_PROC_FS=y
627CONFIG_PROC_KCORE=y
628CONFIG_PROC_SYSCTL=y
629CONFIG_SYSFS=y
630CONFIG_TMPFS=y
631# CONFIG_TMPFS_POSIX_ACL is not set
632# CONFIG_HUGETLB_PAGE is not set
633# CONFIG_CONFIGFS_FS is not set
634
635#
636# Miscellaneous filesystems
637#
638# CONFIG_ADFS_FS is not set
639# CONFIG_AFFS_FS is not set
640# CONFIG_HFS_FS is not set
641# CONFIG_HFSPLUS_FS is not set
642# CONFIG_BEFS_FS is not set
643# CONFIG_BFS_FS is not set
644# CONFIG_EFS_FS is not set
645# CONFIG_CRAMFS is not set
646# CONFIG_VXFS_FS is not set
647# CONFIG_HPFS_FS is not set
648# CONFIG_QNX4FS_FS is not set
649# CONFIG_SYSV_FS is not set
650# CONFIG_UFS_FS is not set
651CONFIG_NETWORK_FILESYSTEMS=y
652CONFIG_NFS_FS=y
653# CONFIG_NFS_V3 is not set
654# CONFIG_NFS_V4 is not set
655# CONFIG_NFS_DIRECTIO is not set
656# CONFIG_NFSD is not set
657CONFIG_ROOT_NFS=y
658CONFIG_LOCKD=y
659CONFIG_NFS_COMMON=y
660CONFIG_SUNRPC=y
661# CONFIG_SUNRPC_BIND34 is not set
662# CONFIG_RPCSEC_GSS_KRB5 is not set
663# CONFIG_RPCSEC_GSS_SPKM3 is not set
664# CONFIG_SMB_FS is not set
665# CONFIG_CIFS is not set
666# CONFIG_NCP_FS is not set
667# CONFIG_CODA_FS is not set
668# CONFIG_AFS_FS is not set
669
670#
671# Partition Types
672#
673CONFIG_PARTITION_ADVANCED=y
674# CONFIG_ACORN_PARTITION is not set
675# CONFIG_OSF_PARTITION is not set
676# CONFIG_AMIGA_PARTITION is not set
677# CONFIG_ATARI_PARTITION is not set
678# CONFIG_MAC_PARTITION is not set
679# CONFIG_MSDOS_PARTITION is not set
680# CONFIG_LDM_PARTITION is not set
681# CONFIG_SGI_PARTITION is not set
682# CONFIG_ULTRIX_PARTITION is not set
683# CONFIG_SUN_PARTITION is not set
684# CONFIG_KARMA_PARTITION is not set
685# CONFIG_EFI_PARTITION is not set
686# CONFIG_SYSV68_PARTITION is not set
687# CONFIG_NLS is not set
688# CONFIG_DLM is not set
689# CONFIG_UCC_SLOW is not set
690
691#
692# Library routines
693#
694CONFIG_BITREVERSE=y
695# CONFIG_CRC_CCITT is not set
696# CONFIG_CRC16 is not set
697# CONFIG_CRC_ITU_T is not set
698CONFIG_CRC32=y
699# CONFIG_CRC7 is not set
700# CONFIG_LIBCRC32C is not set
701CONFIG_PLIST=y
702CONFIG_HAS_IOMEM=y
703CONFIG_HAS_IOPORT=y
704CONFIG_HAS_DMA=y
705# CONFIG_INSTRUMENTATION is not set
706
707#
708# Kernel hacking
709#
710# CONFIG_PRINTK_TIME is not set
711CONFIG_ENABLE_WARN_DEPRECATED=y
712CONFIG_ENABLE_MUST_CHECK=y
713CONFIG_MAGIC_SYSRQ=y
714# CONFIG_UNUSED_SYMBOLS is not set
715# CONFIG_DEBUG_FS is not set
716# CONFIG_HEADERS_CHECK is not set
717CONFIG_DEBUG_KERNEL=y
718# CONFIG_DEBUG_SHIRQ is not set
719CONFIG_DETECT_SOFTLOCKUP=y
720CONFIG_SCHED_DEBUG=y
721# CONFIG_SCHEDSTATS is not set
722# CONFIG_TIMER_STATS is not set
723# CONFIG_DEBUG_SLAB is not set
724# CONFIG_DEBUG_RT_MUTEXES is not set
725# CONFIG_RT_MUTEX_TESTER is not set
726# CONFIG_DEBUG_SPINLOCK is not set
727CONFIG_DEBUG_MUTEXES=y
728# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
729# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
730# CONFIG_DEBUG_KOBJECT is not set
731# CONFIG_DEBUG_BUGVERBOSE is not set
732# CONFIG_DEBUG_INFO is not set
733# CONFIG_DEBUG_VM is not set
734# CONFIG_DEBUG_LIST is not set
735# CONFIG_DEBUG_SG is not set
736CONFIG_FORCED_INLINING=y
737# CONFIG_BOOT_PRINTK_DELAY is not set
738# CONFIG_FAULT_INJECTION is not set
739# CONFIG_SAMPLES is not set
740# CONFIG_DEBUG_STACKOVERFLOW is not set
741# CONFIG_DEBUG_STACK_USAGE is not set
742# CONFIG_DEBUG_PAGEALLOC is not set
743# CONFIG_DEBUGGER is not set
744# CONFIG_BDI_SWITCH is not set
745CONFIG_PPC_EARLY_DEBUG=y
746# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
747# CONFIG_PPC_EARLY_DEBUG_G5 is not set
748# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
749# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
750# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
751# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
752# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
753# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
754# CONFIG_PPC_EARLY_DEBUG_44x is not set
755# CONFIG_PPC_EARLY_DEBUG_CPM is not set
756
757#
758# Security options
759#
760# CONFIG_KEYS is not set
761# CONFIG_SECURITY is not set
762# CONFIG_SECURITY_FILE_CAPABILITIES is not set
763# CONFIG_CRYPTO is not set
764# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/sequoia_defconfig b/arch/powerpc/configs/sequoia_defconfig
index bc3c086ddfc0..abbfed6582e1 100644
--- a/arch/powerpc/configs/sequoia_defconfig
+++ b/arch/powerpc/configs/sequoia_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:49:17 2007 4# Mon Dec 24 11:23:22 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -129,6 +129,7 @@ CONFIG_DEFAULT_AS=y
129# CONFIG_DEFAULT_CFQ is not set 129# CONFIG_DEFAULT_CFQ is not set
130# CONFIG_DEFAULT_NOOP is not set 130# CONFIG_DEFAULT_NOOP is not set
131CONFIG_DEFAULT_IOSCHED="anticipatory" 131CONFIG_DEFAULT_IOSCHED="anticipatory"
132# CONFIG_PPC4xx_PCI_EXPRESS is not set
132 133
133# 134#
134# Platform support 135# Platform support
@@ -141,8 +142,10 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
141# CONFIG_BAMBOO is not set 142# CONFIG_BAMBOO is not set
142# CONFIG_EBONY is not set 143# CONFIG_EBONY is not set
143CONFIG_SEQUOIA=y 144CONFIG_SEQUOIA=y
145# CONFIG_TAISHAN is not set
146# CONFIG_KATMAI is not set
147# CONFIG_RAINIER is not set
144CONFIG_440EPX=y 148CONFIG_440EPX=y
145CONFIG_440A=y
146# CONFIG_MPIC is not set 149# CONFIG_MPIC is not set
147# CONFIG_MPIC_WEIRD is not set 150# CONFIG_MPIC_WEIRD is not set
148# CONFIG_PPC_I8259 is not set 151# CONFIG_PPC_I8259 is not set
@@ -446,9 +449,7 @@ CONFIG_MISC_DEVICES=y
446# CONFIG_FIREWIRE is not set 449# CONFIG_FIREWIRE is not set
447# CONFIG_IEEE1394 is not set 450# CONFIG_IEEE1394 is not set
448# CONFIG_I2O is not set 451# CONFIG_I2O is not set
449CONFIG_MACINTOSH_DRIVERS=y 452# CONFIG_MACINTOSH_DRIVERS is not set
450# CONFIG_MAC_EMUMOUSEBTN is not set
451# CONFIG_WINDFARM is not set
452CONFIG_NETDEVICES=y 453CONFIG_NETDEVICES=y
453# CONFIG_NETDEVICES_MULTIQUEUE is not set 454# CONFIG_NETDEVICES_MULTIQUEUE is not set
454# CONFIG_DUMMY is not set 455# CONFIG_DUMMY is not set
@@ -459,10 +460,28 @@ CONFIG_NETDEVICES=y
459# CONFIG_VETH is not set 460# CONFIG_VETH is not set
460# CONFIG_IP1000 is not set 461# CONFIG_IP1000 is not set
461# CONFIG_ARCNET is not set 462# CONFIG_ARCNET is not set
462# CONFIG_NET_ETHERNET is not set 463# CONFIG_PHYLIB is not set
464CONFIG_NET_ETHERNET=y
465# CONFIG_MII is not set
466# CONFIG_HAPPYMEAL is not set
467# CONFIG_SUNGEM is not set
468# CONFIG_CASSINI is not set
469# CONFIG_NET_VENDOR_3COM is not set
470# CONFIG_NET_TULIP is not set
471# CONFIG_HP100 is not set
472CONFIG_IBM_NEW_EMAC=y
473CONFIG_IBM_NEW_EMAC_RXB=128
474CONFIG_IBM_NEW_EMAC_TXB=64
475CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
476CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
477CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
478# CONFIG_IBM_NEW_EMAC_DEBUG is not set
463CONFIG_IBM_NEW_EMAC_ZMII=y 479CONFIG_IBM_NEW_EMAC_ZMII=y
464CONFIG_IBM_NEW_EMAC_RGMII=y 480CONFIG_IBM_NEW_EMAC_RGMII=y
481# CONFIG_IBM_NEW_EMAC_TAH is not set
465CONFIG_IBM_NEW_EMAC_EMAC4=y 482CONFIG_IBM_NEW_EMAC_EMAC4=y
483# CONFIG_NET_PCI is not set
484# CONFIG_B44 is not set
466CONFIG_NETDEV_1000=y 485CONFIG_NETDEV_1000=y
467# CONFIG_ACENIC is not set 486# CONFIG_ACENIC is not set
468# CONFIG_DL2K is not set 487# CONFIG_DL2K is not set
@@ -811,6 +830,7 @@ CONFIG_PPC_EARLY_DEBUG=y
811# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set 830# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
812# CONFIG_PPC_EARLY_DEBUG_BEAT is not set 831# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
813CONFIG_PPC_EARLY_DEBUG_44x=y 832CONFIG_PPC_EARLY_DEBUG_44x=y
833# CONFIG_PPC_EARLY_DEBUG_40x is not set
814# CONFIG_PPC_EARLY_DEBUG_CPM is not set 834# CONFIG_PPC_EARLY_DEBUG_CPM is not set
815CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300 835CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
816CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1 836CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x1
diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
new file mode 100644
index 000000000000..a034a5e452ef
--- /dev/null
+++ b/arch/powerpc/configs/storcenter_defconfig
@@ -0,0 +1,1174 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Tue Jan 8 09:33:54 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11CONFIG_6xx=y
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18# CONFIG_ALTIVEC is not set
19CONFIG_PPC_STD_MMU=y
20CONFIG_PPC_STD_MMU_32=y
21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set
23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y
26CONFIG_MMU=y
27CONFIG_GENERIC_CMOS_UPDATE=y
28CONFIG_GENERIC_TIME=y
29CONFIG_GENERIC_TIME_VSYSCALL=y
30CONFIG_GENERIC_CLOCKEVENTS=y
31CONFIG_GENERIC_HARDIRQS=y
32CONFIG_IRQ_PER_CPU=y
33CONFIG_RWSEM_XCHGADD_ALGORITHM=y
34CONFIG_ARCH_HAS_ILOG2_U32=y
35CONFIG_GENERIC_HWEIGHT=y
36CONFIG_GENERIC_CALIBRATE_DELAY=y
37CONFIG_GENERIC_FIND_NEXT_BIT=y
38# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
39CONFIG_PPC=y
40CONFIG_EARLY_PRINTK=y
41CONFIG_GENERIC_NVRAM=y
42CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y
45CONFIG_OF=y
46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set
51# CONFIG_PPC_DCR_NATIVE is not set
52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54
55#
56# General setup
57#
58CONFIG_EXPERIMENTAL=y
59CONFIG_BROKEN_ON_SMP=y
60CONFIG_INIT_ENV_ARG_LIMIT=32
61CONFIG_LOCALVERSION=""
62CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y
64CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set
67# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set
70# CONFIG_PID_NS is not set
71# CONFIG_AUDIT is not set
72# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set
75CONFIG_FAIR_GROUP_SCHED=y
76CONFIG_FAIR_USER_SCHED=y
77# CONFIG_FAIR_CGROUP_SCHED is not set
78CONFIG_SYSFS_DEPRECATED=y
79# CONFIG_RELAY is not set
80# CONFIG_BLK_DEV_INITRD is not set
81CONFIG_CC_OPTIMIZE_FOR_SIZE=y
82CONFIG_SYSCTL=y
83CONFIG_EMBEDDED=y
84CONFIG_SYSCTL_SYSCALL=y
85# CONFIG_KALLSYMS is not set
86CONFIG_HOTPLUG=y
87CONFIG_PRINTK=y
88CONFIG_BUG=y
89CONFIG_ELF_CORE=y
90CONFIG_BASE_FULL=y
91CONFIG_FUTEX=y
92CONFIG_ANON_INODES=y
93CONFIG_EPOLL=y
94CONFIG_SIGNALFD=y
95CONFIG_EVENTFD=y
96CONFIG_SHMEM=y
97CONFIG_VM_EVENT_COUNTERS=y
98CONFIG_SLUB_DEBUG=y
99# CONFIG_SLAB is not set
100CONFIG_SLUB=y
101# CONFIG_SLOB is not set
102CONFIG_RT_MUTEXES=y
103# CONFIG_TINY_SHMEM is not set
104CONFIG_BASE_SMALL=0
105CONFIG_MODULES=y
106CONFIG_MODULE_UNLOAD=y
107# CONFIG_MODULE_FORCE_UNLOAD is not set
108# CONFIG_MODVERSIONS is not set
109# CONFIG_MODULE_SRCVERSION_ALL is not set
110CONFIG_KMOD=y
111CONFIG_BLOCK=y
112CONFIG_LBD=y
113# CONFIG_BLK_DEV_IO_TRACE is not set
114# CONFIG_LSF is not set
115# CONFIG_BLK_DEV_BSG is not set
116
117#
118# IO Schedulers
119#
120CONFIG_IOSCHED_NOOP=y
121CONFIG_IOSCHED_AS=y
122CONFIG_IOSCHED_DEADLINE=y
123CONFIG_IOSCHED_CFQ=y
124# CONFIG_DEFAULT_AS is not set
125# CONFIG_DEFAULT_DEADLINE is not set
126CONFIG_DEFAULT_CFQ=y
127# CONFIG_DEFAULT_NOOP is not set
128CONFIG_DEFAULT_IOSCHED="cfq"
129
130#
131# Platform support
132#
133CONFIG_PPC_MULTIPLATFORM=y
134# CONFIG_PPC_82xx is not set
135# CONFIG_PPC_83xx is not set
136# CONFIG_PPC_86xx is not set
137CONFIG_CLASSIC32=y
138# CONFIG_PPC_CHRP is not set
139# CONFIG_PPC_MPC52xx is not set
140# CONFIG_PPC_MPC5200 is not set
141# CONFIG_PPC_EFIKA is not set
142# CONFIG_PPC_LITE5200 is not set
143# CONFIG_PPC_PMAC is not set
144# CONFIG_PPC_CELL is not set
145# CONFIG_PPC_CELL_NATIVE is not set
146# CONFIG_PQ2ADS is not set
147CONFIG_EMBEDDED6xx=y
148# CONFIG_LINKSTATION is not set
149CONFIG_STORCENTER=y
150# CONFIG_MPC7448HPC2 is not set
151# CONFIG_PPC_HOLLY is not set
152# CONFIG_PPC_PRPMC2800 is not set
153CONFIG_MPC10X_BRIDGE=y
154CONFIG_MPC10X_OPENPIC=y
155# CONFIG_MPC10X_STORE_GATHERING is not set
156CONFIG_MPIC=y
157# CONFIG_MPIC_WEIRD is not set
158# CONFIG_PPC_I8259 is not set
159# CONFIG_PPC_RTAS is not set
160# CONFIG_MMIO_NVRAM is not set
161# CONFIG_PPC_MPC106 is not set
162# CONFIG_PPC_970_NAP is not set
163# CONFIG_PPC_INDIRECT_IO is not set
164# CONFIG_GENERIC_IOMAP is not set
165# CONFIG_CPU_FREQ is not set
166# CONFIG_TAU is not set
167# CONFIG_CPM2 is not set
168# CONFIG_FSL_ULI1575 is not set
169
170#
171# Kernel options
172#
173# CONFIG_HIGHMEM is not set
174# CONFIG_TICK_ONESHOT is not set
175# CONFIG_NO_HZ is not set
176# CONFIG_HIGH_RES_TIMERS is not set
177CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
178CONFIG_HZ_100=y
179# CONFIG_HZ_250 is not set
180# CONFIG_HZ_300 is not set
181# CONFIG_HZ_1000 is not set
182CONFIG_HZ=100
183CONFIG_PREEMPT_NONE=y
184# CONFIG_PREEMPT_VOLUNTARY is not set
185# CONFIG_PREEMPT is not set
186CONFIG_BINFMT_ELF=y
187CONFIG_BINFMT_MISC=y
188CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
189# CONFIG_KEXEC is not set
190CONFIG_ARCH_FLATMEM_ENABLE=y
191CONFIG_ARCH_POPULATES_NODE_MAP=y
192CONFIG_SELECT_MEMORY_MODEL=y
193CONFIG_FLATMEM_MANUAL=y
194# CONFIG_DISCONTIGMEM_MANUAL is not set
195# CONFIG_SPARSEMEM_MANUAL is not set
196CONFIG_FLATMEM=y
197CONFIG_FLAT_NODE_MEM_MAP=y
198# CONFIG_SPARSEMEM_STATIC is not set
199# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
200CONFIG_SPLIT_PTLOCK_CPUS=4
201# CONFIG_RESOURCES_64BIT is not set
202CONFIG_ZONE_DMA_FLAG=1
203CONFIG_BOUNCE=y
204CONFIG_VIRT_TO_BUS=y
205CONFIG_PROC_DEVICETREE=y
206CONFIG_CMDLINE_BOOL=y
207CONFIG_CMDLINE="console=ttyS0,115200"
208# CONFIG_PM is not set
209CONFIG_SUSPEND_UP_POSSIBLE=y
210CONFIG_HIBERNATION_UP_POSSIBLE=y
211# CONFIG_SECCOMP is not set
212CONFIG_WANT_DEVICE_TREE=y
213CONFIG_DEVICE_TREE="storcenter.dts"
214CONFIG_ISA_DMA_API=y
215
216#
217# Bus options
218#
219CONFIG_ZONE_DMA=y
220CONFIG_GENERIC_ISA_DMA=y
221CONFIG_PPC_INDIRECT_PCI=y
222CONFIG_FSL_SOC=y
223CONFIG_PCI=y
224CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y
226# CONFIG_PCIEPORTBUS is not set
227CONFIG_ARCH_SUPPORTS_MSI=y
228# CONFIG_PCI_MSI is not set
229CONFIG_PCI_LEGACY=y
230# CONFIG_PCCARD is not set
231# CONFIG_HOTPLUG_PCI is not set
232
233#
234# Advanced setup
235#
236# CONFIG_ADVANCED_OPTIONS is not set
237
238#
239# Default settings for advanced configuration options are used
240#
241CONFIG_HIGHMEM_START=0xfe000000
242CONFIG_LOWMEM_SIZE=0x30000000
243CONFIG_KERNEL_START=0xc0000000
244CONFIG_TASK_SIZE=0xc0000000
245CONFIG_BOOT_LOAD=0x00800000
246
247#
248# Networking
249#
250CONFIG_NET=y
251
252#
253# Networking options
254#
255CONFIG_PACKET=m
256# CONFIG_PACKET_MMAP is not set
257CONFIG_UNIX=y
258# CONFIG_NET_KEY is not set
259CONFIG_INET=y
260CONFIG_IP_MULTICAST=y
261# CONFIG_IP_ADVANCED_ROUTER is not set
262CONFIG_IP_FIB_HASH=y
263CONFIG_IP_PNP=y
264CONFIG_IP_PNP_DHCP=y
265# CONFIG_IP_PNP_BOOTP is not set
266# CONFIG_IP_PNP_RARP is not set
267# CONFIG_NET_IPIP is not set
268# CONFIG_NET_IPGRE is not set
269# CONFIG_IP_MROUTE is not set
270# CONFIG_ARPD is not set
271# CONFIG_SYN_COOKIES is not set
272# CONFIG_INET_AH is not set
273# CONFIG_INET_ESP is not set
274# CONFIG_INET_IPCOMP is not set
275# CONFIG_INET_XFRM_TUNNEL is not set
276# CONFIG_INET_TUNNEL is not set
277# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
278# CONFIG_INET_XFRM_MODE_TUNNEL is not set
279# CONFIG_INET_XFRM_MODE_BEET is not set
280# CONFIG_INET_LRO is not set
281CONFIG_INET_DIAG=y
282CONFIG_INET_TCP_DIAG=y
283# CONFIG_TCP_CONG_ADVANCED is not set
284CONFIG_TCP_CONG_CUBIC=y
285CONFIG_DEFAULT_TCP_CONG="cubic"
286# CONFIG_TCP_MD5SIG is not set
287# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set
289# CONFIG_INET6_TUNNEL is not set
290# CONFIG_NETWORK_SECMARK is not set
291# CONFIG_NETFILTER is not set
292# CONFIG_IP_DCCP is not set
293# CONFIG_IP_SCTP is not set
294# CONFIG_TIPC is not set
295# CONFIG_ATM is not set
296# CONFIG_BRIDGE is not set
297# CONFIG_VLAN_8021Q is not set
298# CONFIG_DECNET is not set
299# CONFIG_LLC2 is not set
300# CONFIG_IPX is not set
301# CONFIG_ATALK is not set
302# CONFIG_X25 is not set
303# CONFIG_LAPB is not set
304# CONFIG_ECONET is not set
305# CONFIG_WAN_ROUTER is not set
306# CONFIG_NET_SCHED is not set
307
308#
309# Network testing
310#
311# CONFIG_NET_PKTGEN is not set
312# CONFIG_HAMRADIO is not set
313# CONFIG_IRDA is not set
314# CONFIG_BT is not set
315# CONFIG_AF_RXRPC is not set
316
317#
318# Wireless
319#
320# CONFIG_CFG80211 is not set
321# CONFIG_WIRELESS_EXT is not set
322# CONFIG_MAC80211 is not set
323# CONFIG_IEEE80211 is not set
324# CONFIG_RFKILL is not set
325# CONFIG_NET_9P is not set
326
327#
328# Device Drivers
329#
330
331#
332# Generic Driver Options
333#
334CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
335CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y
337# CONFIG_FW_LOADER is not set
338# CONFIG_SYS_HYPERVISOR is not set
339# CONFIG_CONNECTOR is not set
340CONFIG_MTD=y
341# CONFIG_MTD_DEBUG is not set
342# CONFIG_MTD_CONCAT is not set
343CONFIG_MTD_PARTITIONS=y
344# CONFIG_MTD_REDBOOT_PARTS is not set
345# CONFIG_MTD_CMDLINE_PARTS is not set
346
347#
348# User Modules And Translation Layers
349#
350CONFIG_MTD_CHAR=y
351CONFIG_MTD_BLKDEVS=y
352CONFIG_MTD_BLOCK=y
353CONFIG_FTL=y
354CONFIG_NFTL=y
355CONFIG_NFTL_RW=y
356# CONFIG_INFTL is not set
357# CONFIG_RFD_FTL is not set
358# CONFIG_SSFDC is not set
359# CONFIG_MTD_OOPS is not set
360
361#
362# RAM/ROM/Flash chip drivers
363#
364CONFIG_MTD_CFI=y
365# CONFIG_MTD_JEDECPROBE is not set
366CONFIG_MTD_GEN_PROBE=y
367# CONFIG_MTD_CFI_ADV_OPTIONS is not set
368CONFIG_MTD_MAP_BANK_WIDTH_1=y
369CONFIG_MTD_MAP_BANK_WIDTH_2=y
370CONFIG_MTD_MAP_BANK_WIDTH_4=y
371# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
372# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
373# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
374CONFIG_MTD_CFI_I1=y
375CONFIG_MTD_CFI_I2=y
376# CONFIG_MTD_CFI_I4 is not set
377# CONFIG_MTD_CFI_I8 is not set
378# CONFIG_MTD_CFI_INTELEXT is not set
379CONFIG_MTD_CFI_AMDSTD=y
380# CONFIG_MTD_CFI_STAA is not set
381CONFIG_MTD_CFI_UTIL=y
382# CONFIG_MTD_RAM is not set
383# CONFIG_MTD_ROM is not set
384# CONFIG_MTD_ABSENT is not set
385
386#
387# Mapping drivers for chip access
388#
389# CONFIG_MTD_COMPLEX_MAPPINGS is not set
390CONFIG_MTD_PHYSMAP=y
391CONFIG_MTD_PHYSMAP_START=0xFF800000
392CONFIG_MTD_PHYSMAP_LEN=0x00800000
393CONFIG_MTD_PHYSMAP_BANKWIDTH=1
394# CONFIG_MTD_PHYSMAP_OF is not set
395# CONFIG_MTD_INTEL_VR_NOR is not set
396# CONFIG_MTD_PLATRAM is not set
397
398#
399# Self-contained MTD device drivers
400#
401# CONFIG_MTD_PMC551 is not set
402# CONFIG_MTD_SLRAM is not set
403# CONFIG_MTD_PHRAM is not set
404# CONFIG_MTD_MTDRAM is not set
405# CONFIG_MTD_BLOCK2MTD is not set
406
407#
408# Disk-On-Chip Device Drivers
409#
410# CONFIG_MTD_DOC2000 is not set
411# CONFIG_MTD_DOC2001 is not set
412# CONFIG_MTD_DOC2001PLUS is not set
413# CONFIG_MTD_NAND is not set
414# CONFIG_MTD_ONENAND is not set
415
416#
417# UBI - Unsorted block images
418#
419# CONFIG_MTD_UBI is not set
420CONFIG_OF_DEVICE=y
421# CONFIG_PARPORT is not set
422CONFIG_BLK_DEV=y
423# CONFIG_BLK_DEV_FD is not set
424# CONFIG_BLK_CPQ_DA is not set
425# CONFIG_BLK_CPQ_CISS_DA is not set
426# CONFIG_BLK_DEV_DAC960 is not set
427# CONFIG_BLK_DEV_UMEM is not set
428# CONFIG_BLK_DEV_COW_COMMON is not set
429# CONFIG_BLK_DEV_LOOP is not set
430# CONFIG_BLK_DEV_NBD is not set
431# CONFIG_BLK_DEV_SX8 is not set
432# CONFIG_BLK_DEV_UB is not set
433# CONFIG_BLK_DEV_RAM is not set
434# CONFIG_CDROM_PKTCDVD is not set
435# CONFIG_ATA_OVER_ETH is not set
436CONFIG_MISC_DEVICES=y
437# CONFIG_PHANTOM is not set
438# CONFIG_EEPROM_93CX6 is not set
439# CONFIG_SGI_IOC4 is not set
440# CONFIG_TIFM_CORE is not set
441CONFIG_IDE=y
442CONFIG_IDE_MAX_HWIFS=4
443CONFIG_BLK_DEV_IDE=y
444
445#
446# Please see Documentation/ide.txt for help/info on IDE drives
447#
448# CONFIG_BLK_DEV_IDE_SATA is not set
449CONFIG_BLK_DEV_IDEDISK=y
450CONFIG_IDEDISK_MULTI_MODE=y
451# CONFIG_BLK_DEV_IDECD is not set
452# CONFIG_BLK_DEV_IDETAPE is not set
453# CONFIG_BLK_DEV_IDEFLOPPY is not set
454# CONFIG_BLK_DEV_IDESCSI is not set
455# CONFIG_IDE_TASK_IOCTL is not set
456CONFIG_IDE_PROC_FS=y
457
458#
459# IDE chipset support/bugfixes
460#
461CONFIG_IDE_GENERIC=y
462# CONFIG_BLK_DEV_PLATFORM is not set
463
464#
465# PCI IDE chipsets support
466#
467CONFIG_BLK_DEV_IDEPCI=y
468# CONFIG_IDEPCI_SHARE_IRQ is not set
469CONFIG_IDEPCI_PCIBUS_ORDER=y
470# CONFIG_BLK_DEV_GENERIC is not set
471# CONFIG_BLK_DEV_OPTI621 is not set
472CONFIG_BLK_DEV_IDEDMA_PCI=y
473# CONFIG_BLK_DEV_AEC62XX is not set
474# CONFIG_BLK_DEV_ALI15X3 is not set
475# CONFIG_BLK_DEV_AMD74XX is not set
476# CONFIG_BLK_DEV_CMD64X is not set
477# CONFIG_BLK_DEV_TRIFLEX is not set
478# CONFIG_BLK_DEV_CY82C693 is not set
479# CONFIG_BLK_DEV_CS5520 is not set
480# CONFIG_BLK_DEV_CS5530 is not set
481# CONFIG_BLK_DEV_HPT34X is not set
482# CONFIG_BLK_DEV_HPT366 is not set
483# CONFIG_BLK_DEV_JMICRON is not set
484# CONFIG_BLK_DEV_SC1200 is not set
485# CONFIG_BLK_DEV_PIIX is not set
486# CONFIG_BLK_DEV_IT8213 is not set
487# CONFIG_BLK_DEV_IT821X is not set
488# CONFIG_BLK_DEV_NS87415 is not set
489# CONFIG_BLK_DEV_PDC202XX_OLD is not set
490# CONFIG_BLK_DEV_PDC202XX_NEW is not set
491# CONFIG_BLK_DEV_SVWKS is not set
492# CONFIG_BLK_DEV_SIIMAGE is not set
493# CONFIG_BLK_DEV_SL82C105 is not set
494# CONFIG_BLK_DEV_SLC90E66 is not set
495# CONFIG_BLK_DEV_TRM290 is not set
496CONFIG_BLK_DEV_VIA82CXXX=y
497# CONFIG_BLK_DEV_TC86C001 is not set
498# CONFIG_IDE_ARM is not set
499CONFIG_BLK_DEV_IDEDMA=y
500CONFIG_IDE_ARCH_OBSOLETE_INIT=y
501# CONFIG_BLK_DEV_HD is not set
502
503#
504# SCSI device support
505#
506# CONFIG_RAID_ATTRS is not set
507CONFIG_SCSI=y
508CONFIG_SCSI_DMA=y
509# CONFIG_SCSI_TGT is not set
510# CONFIG_SCSI_NETLINK is not set
511CONFIG_SCSI_PROC_FS=y
512
513#
514# SCSI support type (disk, tape, CD-ROM)
515#
516CONFIG_BLK_DEV_SD=y
517# CONFIG_CHR_DEV_ST is not set
518# CONFIG_CHR_DEV_OSST is not set
519CONFIG_BLK_DEV_SR=y
520# CONFIG_BLK_DEV_SR_VENDOR is not set
521# CONFIG_CHR_DEV_SG is not set
522# CONFIG_CHR_DEV_SCH is not set
523
524#
525# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
526#
527# CONFIG_SCSI_MULTI_LUN is not set
528# CONFIG_SCSI_CONSTANTS is not set
529# CONFIG_SCSI_LOGGING is not set
530# CONFIG_SCSI_SCAN_ASYNC is not set
531CONFIG_SCSI_WAIT_SCAN=m
532
533#
534# SCSI Transports
535#
536CONFIG_SCSI_SPI_ATTRS=y
537# CONFIG_SCSI_FC_ATTRS is not set
538# CONFIG_SCSI_ISCSI_ATTRS is not set
539# CONFIG_SCSI_SAS_LIBSAS is not set
540# CONFIG_SCSI_SRP_ATTRS is not set
541CONFIG_SCSI_LOWLEVEL=y
542# CONFIG_ISCSI_TCP is not set
543# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
544# CONFIG_SCSI_3W_9XXX is not set
545# CONFIG_SCSI_ACARD is not set
546# CONFIG_SCSI_AACRAID is not set
547# CONFIG_SCSI_AIC7XXX is not set
548# CONFIG_SCSI_AIC7XXX_OLD is not set
549# CONFIG_SCSI_AIC79XX is not set
550# CONFIG_SCSI_AIC94XX is not set
551# CONFIG_SCSI_DPT_I2O is not set
552# CONFIG_SCSI_ADVANSYS is not set
553# CONFIG_SCSI_ARCMSR is not set
554# CONFIG_MEGARAID_NEWGEN is not set
555# CONFIG_MEGARAID_LEGACY is not set
556# CONFIG_MEGARAID_SAS is not set
557# CONFIG_SCSI_HPTIOP is not set
558# CONFIG_SCSI_BUSLOGIC is not set
559# CONFIG_SCSI_DMX3191D is not set
560# CONFIG_SCSI_EATA is not set
561# CONFIG_SCSI_FUTURE_DOMAIN is not set
562# CONFIG_SCSI_GDTH is not set
563# CONFIG_SCSI_IPS is not set
564# CONFIG_SCSI_INITIO is not set
565# CONFIG_SCSI_INIA100 is not set
566# CONFIG_SCSI_STEX is not set
567# CONFIG_SCSI_SYM53C8XX_2 is not set
568# CONFIG_SCSI_QLOGIC_1280 is not set
569# CONFIG_SCSI_QLA_FC is not set
570# CONFIG_SCSI_QLA_ISCSI is not set
571# CONFIG_SCSI_LPFC is not set
572# CONFIG_SCSI_DC395x is not set
573# CONFIG_SCSI_DC390T is not set
574# CONFIG_SCSI_NSP32 is not set
575# CONFIG_SCSI_DEBUG is not set
576# CONFIG_SCSI_SRP is not set
577# CONFIG_ATA is not set
578CONFIG_MD=y
579CONFIG_BLK_DEV_MD=y
580CONFIG_MD_LINEAR=y
581CONFIG_MD_RAID0=y
582CONFIG_MD_RAID1=y
583# CONFIG_MD_RAID10 is not set
584CONFIG_MD_RAID456=y
585CONFIG_MD_RAID5_RESHAPE=y
586# CONFIG_MD_MULTIPATH is not set
587# CONFIG_MD_FAULTY is not set
588# CONFIG_BLK_DEV_DM is not set
589# CONFIG_FUSION is not set
590
591#
592# IEEE 1394 (FireWire) support
593#
594# CONFIG_FIREWIRE is not set
595# CONFIG_IEEE1394 is not set
596# CONFIG_I2O is not set
597# CONFIG_MACINTOSH_DRIVERS is not set
598CONFIG_NETDEVICES=y
599# CONFIG_NETDEVICES_MULTIQUEUE is not set
600CONFIG_DUMMY=m
601# CONFIG_BONDING is not set
602# CONFIG_MACVLAN is not set
603# CONFIG_EQUALIZER is not set
604# CONFIG_TUN is not set
605# CONFIG_VETH is not set
606# CONFIG_IP1000 is not set
607# CONFIG_ARCNET is not set
608# CONFIG_NET_ETHERNET is not set
609CONFIG_NETDEV_1000=y
610# CONFIG_ACENIC is not set
611# CONFIG_DL2K is not set
612# CONFIG_E1000 is not set
613# CONFIG_E1000E is not set
614# CONFIG_NS83820 is not set
615# CONFIG_HAMACHI is not set
616# CONFIG_YELLOWFIN is not set
617CONFIG_R8169=y
618# CONFIG_R8169_NAPI is not set
619# CONFIG_SIS190 is not set
620# CONFIG_SKGE is not set
621# CONFIG_SKY2 is not set
622# CONFIG_SK98LIN is not set
623# CONFIG_VIA_VELOCITY is not set
624# CONFIG_TIGON3 is not set
625# CONFIG_BNX2 is not set
626# CONFIG_MV643XX_ETH is not set
627# CONFIG_QLA3XXX is not set
628# CONFIG_ATL1 is not set
629# CONFIG_NETDEV_10000 is not set
630# CONFIG_TR is not set
631
632#
633# Wireless LAN
634#
635# CONFIG_WLAN_PRE80211 is not set
636# CONFIG_WLAN_80211 is not set
637
638#
639# USB Network Adapters
640#
641# CONFIG_USB_CATC is not set
642# CONFIG_USB_KAWETH is not set
643# CONFIG_USB_PEGASUS is not set
644# CONFIG_USB_RTL8150 is not set
645# CONFIG_USB_USBNET is not set
646# CONFIG_WAN is not set
647# CONFIG_FDDI is not set
648# CONFIG_HIPPI is not set
649# CONFIG_PPP is not set
650# CONFIG_SLIP is not set
651# CONFIG_NET_FC is not set
652# CONFIG_SHAPER is not set
653# CONFIG_NETCONSOLE is not set
654# CONFIG_NETPOLL is not set
655# CONFIG_NET_POLL_CONTROLLER is not set
656# CONFIG_ISDN is not set
657# CONFIG_PHONE is not set
658
659#
660# Input device support
661#
662# CONFIG_INPUT is not set
663
664#
665# Hardware I/O ports
666#
667# CONFIG_SERIO is not set
668# CONFIG_GAMEPORT is not set
669
670#
671# Character devices
672#
673# CONFIG_VT is not set
674# CONFIG_SERIAL_NONSTANDARD is not set
675
676#
677# Serial drivers
678#
679CONFIG_SERIAL_8250=y
680CONFIG_SERIAL_8250_CONSOLE=y
681# CONFIG_SERIAL_8250_PCI is not set
682CONFIG_SERIAL_8250_NR_UARTS=2
683CONFIG_SERIAL_8250_RUNTIME_UARTS=2
684# CONFIG_SERIAL_8250_EXTENDED is not set
685
686#
687# Non-8250 serial port support
688#
689# CONFIG_SERIAL_UARTLITE is not set
690CONFIG_SERIAL_CORE=y
691CONFIG_SERIAL_CORE_CONSOLE=y
692# CONFIG_SERIAL_JSM is not set
693# CONFIG_SERIAL_OF_PLATFORM is not set
694CONFIG_UNIX98_PTYS=y
695CONFIG_LEGACY_PTYS=y
696CONFIG_LEGACY_PTY_COUNT=256
697# CONFIG_IPMI_HANDLER is not set
698CONFIG_HW_RANDOM=m
699CONFIG_NVRAM=y
700CONFIG_GEN_RTC=y
701# CONFIG_GEN_RTC_X is not set
702# CONFIG_R3964 is not set
703# CONFIG_APPLICOM is not set
704# CONFIG_RAW_DRIVER is not set
705# CONFIG_TCG_TPM is not set
706CONFIG_DEVPORT=y
707CONFIG_I2C=y
708CONFIG_I2C_BOARDINFO=y
709CONFIG_I2C_CHARDEV=y
710
711#
712# I2C Algorithms
713#
714# CONFIG_I2C_ALGOBIT is not set
715# CONFIG_I2C_ALGOPCF is not set
716# CONFIG_I2C_ALGOPCA is not set
717
718#
719# I2C Hardware Bus support
720#
721# CONFIG_I2C_ALI1535 is not set
722# CONFIG_I2C_ALI1563 is not set
723# CONFIG_I2C_ALI15X3 is not set
724# CONFIG_I2C_AMD756 is not set
725# CONFIG_I2C_AMD8111 is not set
726# CONFIG_I2C_I801 is not set
727# CONFIG_I2C_I810 is not set
728# CONFIG_I2C_PIIX4 is not set
729CONFIG_I2C_MPC=y
730# CONFIG_I2C_NFORCE2 is not set
731# CONFIG_I2C_OCORES is not set
732# CONFIG_I2C_PARPORT_LIGHT is not set
733# CONFIG_I2C_PROSAVAGE is not set
734# CONFIG_I2C_SAVAGE4 is not set
735# CONFIG_I2C_SIMTEC is not set
736# CONFIG_I2C_SIS5595 is not set
737# CONFIG_I2C_SIS630 is not set
738# CONFIG_I2C_SIS96X is not set
739# CONFIG_I2C_TAOS_EVM is not set
740# CONFIG_I2C_STUB is not set
741# CONFIG_I2C_TINY_USB is not set
742# CONFIG_I2C_VIA is not set
743# CONFIG_I2C_VIAPRO is not set
744# CONFIG_I2C_VOODOO3 is not set
745
746#
747# Miscellaneous I2C Chip support
748#
749# CONFIG_SENSORS_DS1337 is not set
750# CONFIG_SENSORS_DS1374 is not set
751# CONFIG_DS1682 is not set
752# CONFIG_SENSORS_EEPROM is not set
753# CONFIG_SENSORS_PCF8574 is not set
754# CONFIG_SENSORS_PCA9539 is not set
755# CONFIG_SENSORS_PCF8591 is not set
756# CONFIG_SENSORS_M41T00 is not set
757# CONFIG_SENSORS_MAX6875 is not set
758# CONFIG_SENSORS_TSL2550 is not set
759# CONFIG_I2C_DEBUG_CORE is not set
760# CONFIG_I2C_DEBUG_ALGO is not set
761# CONFIG_I2C_DEBUG_BUS is not set
762# CONFIG_I2C_DEBUG_CHIP is not set
763
764#
765# SPI support
766#
767# CONFIG_SPI is not set
768# CONFIG_SPI_MASTER is not set
769# CONFIG_W1 is not set
770# CONFIG_POWER_SUPPLY is not set
771# CONFIG_HWMON is not set
772# CONFIG_WATCHDOG is not set
773
774#
775# Sonics Silicon Backplane
776#
777CONFIG_SSB_POSSIBLE=y
778# CONFIG_SSB is not set
779
780#
781# Multifunction device drivers
782#
783# CONFIG_MFD_SM501 is not set
784
785#
786# Multimedia devices
787#
788# CONFIG_VIDEO_DEV is not set
789# CONFIG_DVB_CORE is not set
790# CONFIG_DAB is not set
791
792#
793# Graphics support
794#
795# CONFIG_AGP is not set
796# CONFIG_DRM is not set
797# CONFIG_VGASTATE is not set
798# CONFIG_VIDEO_OUTPUT_CONTROL is not set
799# CONFIG_FB is not set
800# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
801
802#
803# Display device support
804#
805# CONFIG_DISPLAY_SUPPORT is not set
806
807#
808# Sound
809#
810# CONFIG_SOUND is not set
811CONFIG_USB_SUPPORT=y
812CONFIG_USB_ARCH_HAS_HCD=y
813CONFIG_USB_ARCH_HAS_OHCI=y
814CONFIG_USB_ARCH_HAS_EHCI=y
815CONFIG_USB=y
816# CONFIG_USB_DEBUG is not set
817
818#
819# Miscellaneous USB options
820#
821CONFIG_USB_DEVICEFS=y
822CONFIG_USB_DEVICE_CLASS=y
823# CONFIG_USB_DYNAMIC_MINORS is not set
824# CONFIG_USB_OTG is not set
825
826#
827# USB Host Controller Drivers
828#
829CONFIG_USB_EHCI_HCD=y
830# CONFIG_USB_EHCI_SPLIT_ISO is not set
831# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
832# CONFIG_USB_EHCI_TT_NEWSCHED is not set
833# CONFIG_USB_ISP116X_HCD is not set
834CONFIG_USB_OHCI_HCD=y
835# CONFIG_USB_OHCI_HCD_PPC_OF is not set
836# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
837# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
838CONFIG_USB_OHCI_LITTLE_ENDIAN=y
839# CONFIG_USB_UHCI_HCD is not set
840# CONFIG_USB_SL811_HCD is not set
841# CONFIG_USB_R8A66597_HCD is not set
842
843#
844# USB Device Class drivers
845#
846# CONFIG_USB_ACM is not set
847# CONFIG_USB_PRINTER is not set
848
849#
850# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
851#
852
853#
854# may also be needed; see USB_STORAGE Help for more information
855#
856CONFIG_USB_STORAGE=y
857# CONFIG_USB_STORAGE_DEBUG is not set
858# CONFIG_USB_STORAGE_DATAFAB is not set
859# CONFIG_USB_STORAGE_FREECOM is not set
860# CONFIG_USB_STORAGE_ISD200 is not set
861# CONFIG_USB_STORAGE_DPCM is not set
862# CONFIG_USB_STORAGE_USBAT is not set
863# CONFIG_USB_STORAGE_SDDR09 is not set
864# CONFIG_USB_STORAGE_SDDR55 is not set
865# CONFIG_USB_STORAGE_JUMPSHOT is not set
866# CONFIG_USB_STORAGE_ALAUDA is not set
867# CONFIG_USB_STORAGE_KARMA is not set
868# CONFIG_USB_LIBUSUAL is not set
869
870#
871# USB Imaging devices
872#
873# CONFIG_USB_MDC800 is not set
874# CONFIG_USB_MICROTEK is not set
875# CONFIG_USB_MON is not set
876
877#
878# USB port drivers
879#
880
881#
882# USB Serial Converter support
883#
884# CONFIG_USB_SERIAL is not set
885
886#
887# USB Miscellaneous drivers
888#
889# CONFIG_USB_EMI62 is not set
890# CONFIG_USB_EMI26 is not set
891# CONFIG_USB_ADUTUX is not set
892# CONFIG_USB_AUERSWALD is not set
893# CONFIG_USB_RIO500 is not set
894# CONFIG_USB_LEGOTOWER is not set
895# CONFIG_USB_LCD is not set
896# CONFIG_USB_BERRY_CHARGE is not set
897# CONFIG_USB_LED is not set
898# CONFIG_USB_CYPRESS_CY7C63 is not set
899# CONFIG_USB_CYTHERM is not set
900# CONFIG_USB_PHIDGET is not set
901# CONFIG_USB_IDMOUSE is not set
902# CONFIG_USB_FTDI_ELAN is not set
903# CONFIG_USB_APPLEDISPLAY is not set
904# CONFIG_USB_SISUSBVGA is not set
905# CONFIG_USB_LD is not set
906# CONFIG_USB_TRANCEVIBRATOR is not set
907# CONFIG_USB_IOWARRIOR is not set
908# CONFIG_USB_TEST is not set
909
910#
911# USB DSL modem support
912#
913
914#
915# USB Gadget Support
916#
917# CONFIG_USB_GADGET is not set
918# CONFIG_MMC is not set
919# CONFIG_NEW_LEDS is not set
920# CONFIG_INFINIBAND is not set
921# CONFIG_EDAC is not set
922CONFIG_RTC_LIB=y
923CONFIG_RTC_CLASS=y
924CONFIG_RTC_HCTOSYS=y
925CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
926# CONFIG_RTC_DEBUG is not set
927
928#
929# RTC interfaces
930#
931CONFIG_RTC_INTF_SYSFS=y
932CONFIG_RTC_INTF_PROC=y
933CONFIG_RTC_INTF_DEV=y
934# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
935# CONFIG_RTC_DRV_TEST is not set
936
937#
938# I2C RTC drivers
939#
940CONFIG_RTC_DRV_DS1307=y
941# CONFIG_RTC_DRV_DS1374 is not set
942# CONFIG_RTC_DRV_DS1672 is not set
943# CONFIG_RTC_DRV_MAX6900 is not set
944# CONFIG_RTC_DRV_RS5C372 is not set
945# CONFIG_RTC_DRV_ISL1208 is not set
946# CONFIG_RTC_DRV_X1205 is not set
947# CONFIG_RTC_DRV_PCF8563 is not set
948# CONFIG_RTC_DRV_PCF8583 is not set
949# CONFIG_RTC_DRV_M41T80 is not set
950
951#
952# SPI RTC drivers
953#
954
955#
956# Platform RTC drivers
957#
958# CONFIG_RTC_DRV_CMOS is not set
959# CONFIG_RTC_DRV_DS1553 is not set
960# CONFIG_RTC_DRV_STK17TA8 is not set
961# CONFIG_RTC_DRV_DS1742 is not set
962# CONFIG_RTC_DRV_M48T86 is not set
963# CONFIG_RTC_DRV_M48T59 is not set
964# CONFIG_RTC_DRV_V3020 is not set
965
966#
967# on-CPU RTC drivers
968#
969
970#
971# Userspace I/O
972#
973# CONFIG_UIO is not set
974
975#
976# File systems
977#
978CONFIG_EXT2_FS=y
979# CONFIG_EXT2_FS_XATTR is not set
980# CONFIG_EXT2_FS_XIP is not set
981CONFIG_EXT3_FS=y
982CONFIG_EXT3_FS_XATTR=y
983# CONFIG_EXT3_FS_POSIX_ACL is not set
984# CONFIG_EXT3_FS_SECURITY is not set
985# CONFIG_EXT4DEV_FS is not set
986CONFIG_JBD=y
987CONFIG_FS_MBCACHE=y
988# CONFIG_REISERFS_FS is not set
989# CONFIG_JFS_FS is not set
990# CONFIG_FS_POSIX_ACL is not set
991CONFIG_XFS_FS=m
992# CONFIG_XFS_QUOTA is not set
993# CONFIG_XFS_SECURITY is not set
994# CONFIG_XFS_POSIX_ACL is not set
995# CONFIG_XFS_RT is not set
996# CONFIG_GFS2_FS is not set
997# CONFIG_OCFS2_FS is not set
998# CONFIG_MINIX_FS is not set
999# CONFIG_ROMFS_FS is not set
1000CONFIG_INOTIFY=y
1001CONFIG_INOTIFY_USER=y
1002# CONFIG_QUOTA is not set
1003CONFIG_DNOTIFY=y
1004# CONFIG_AUTOFS_FS is not set
1005# CONFIG_AUTOFS4_FS is not set
1006# CONFIG_FUSE_FS is not set
1007
1008#
1009# CD-ROM/DVD Filesystems
1010#
1011# CONFIG_ISO9660_FS is not set
1012# CONFIG_UDF_FS is not set
1013
1014#
1015# DOS/FAT/NT Filesystems
1016#
1017# CONFIG_MSDOS_FS is not set
1018# CONFIG_VFAT_FS is not set
1019# CONFIG_NTFS_FS is not set
1020
1021#
1022# Pseudo filesystems
1023#
1024CONFIG_PROC_FS=y
1025CONFIG_PROC_KCORE=y
1026CONFIG_PROC_SYSCTL=y
1027CONFIG_SYSFS=y
1028CONFIG_TMPFS=y
1029# CONFIG_TMPFS_POSIX_ACL is not set
1030# CONFIG_HUGETLB_PAGE is not set
1031# CONFIG_CONFIGFS_FS is not set
1032
1033#
1034# Miscellaneous filesystems
1035#
1036# CONFIG_ADFS_FS is not set
1037# CONFIG_AFFS_FS is not set
1038# CONFIG_HFS_FS is not set
1039# CONFIG_HFSPLUS_FS is not set
1040# CONFIG_BEFS_FS is not set
1041# CONFIG_BFS_FS is not set
1042# CONFIG_EFS_FS is not set
1043CONFIG_JFFS2_FS=y
1044CONFIG_JFFS2_FS_DEBUG=0
1045CONFIG_JFFS2_FS_WRITEBUFFER=y
1046# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1047# CONFIG_JFFS2_SUMMARY is not set
1048# CONFIG_JFFS2_FS_XATTR is not set
1049# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1050CONFIG_JFFS2_ZLIB=y
1051# CONFIG_JFFS2_LZO is not set
1052CONFIG_JFFS2_RTIME=y
1053# CONFIG_JFFS2_RUBIN is not set
1054# CONFIG_CRAMFS is not set
1055# CONFIG_VXFS_FS is not set
1056# CONFIG_HPFS_FS is not set
1057# CONFIG_QNX4FS_FS is not set
1058# CONFIG_SYSV_FS is not set
1059# CONFIG_UFS_FS is not set
1060# CONFIG_NETWORK_FILESYSTEMS is not set
1061
1062#
1063# Partition Types
1064#
1065CONFIG_PARTITION_ADVANCED=y
1066# CONFIG_ACORN_PARTITION is not set
1067# CONFIG_OSF_PARTITION is not set
1068# CONFIG_AMIGA_PARTITION is not set
1069# CONFIG_ATARI_PARTITION is not set
1070# CONFIG_MAC_PARTITION is not set
1071CONFIG_MSDOS_PARTITION=y
1072# CONFIG_BSD_DISKLABEL is not set
1073# CONFIG_MINIX_SUBPARTITION is not set
1074# CONFIG_SOLARIS_X86_PARTITION is not set
1075# CONFIG_UNIXWARE_DISKLABEL is not set
1076# CONFIG_LDM_PARTITION is not set
1077# CONFIG_SGI_PARTITION is not set
1078# CONFIG_ULTRIX_PARTITION is not set
1079# CONFIG_SUN_PARTITION is not set
1080# CONFIG_KARMA_PARTITION is not set
1081# CONFIG_EFI_PARTITION is not set
1082# CONFIG_SYSV68_PARTITION is not set
1083CONFIG_NLS=y
1084CONFIG_NLS_DEFAULT="utf8"
1085CONFIG_NLS_CODEPAGE_437=y
1086# CONFIG_NLS_CODEPAGE_737 is not set
1087# CONFIG_NLS_CODEPAGE_775 is not set
1088# CONFIG_NLS_CODEPAGE_850 is not set
1089# CONFIG_NLS_CODEPAGE_852 is not set
1090# CONFIG_NLS_CODEPAGE_855 is not set
1091# CONFIG_NLS_CODEPAGE_857 is not set
1092# CONFIG_NLS_CODEPAGE_860 is not set
1093# CONFIG_NLS_CODEPAGE_861 is not set
1094# CONFIG_NLS_CODEPAGE_862 is not set
1095# CONFIG_NLS_CODEPAGE_863 is not set
1096# CONFIG_NLS_CODEPAGE_864 is not set
1097# CONFIG_NLS_CODEPAGE_865 is not set
1098# CONFIG_NLS_CODEPAGE_866 is not set
1099# CONFIG_NLS_CODEPAGE_869 is not set
1100# CONFIG_NLS_CODEPAGE_936 is not set
1101# CONFIG_NLS_CODEPAGE_950 is not set
1102# CONFIG_NLS_CODEPAGE_932 is not set
1103# CONFIG_NLS_CODEPAGE_949 is not set
1104# CONFIG_NLS_CODEPAGE_874 is not set
1105# CONFIG_NLS_ISO8859_8 is not set
1106# CONFIG_NLS_CODEPAGE_1250 is not set
1107# CONFIG_NLS_CODEPAGE_1251 is not set
1108# CONFIG_NLS_ASCII is not set
1109CONFIG_NLS_ISO8859_1=y
1110# CONFIG_NLS_ISO8859_2 is not set
1111# CONFIG_NLS_ISO8859_3 is not set
1112# CONFIG_NLS_ISO8859_4 is not set
1113# CONFIG_NLS_ISO8859_5 is not set
1114# CONFIG_NLS_ISO8859_6 is not set
1115# CONFIG_NLS_ISO8859_7 is not set
1116# CONFIG_NLS_ISO8859_9 is not set
1117# CONFIG_NLS_ISO8859_13 is not set
1118# CONFIG_NLS_ISO8859_14 is not set
1119# CONFIG_NLS_ISO8859_15 is not set
1120# CONFIG_NLS_KOI8_R is not set
1121# CONFIG_NLS_KOI8_U is not set
1122CONFIG_NLS_UTF8=y
1123# CONFIG_DLM is not set
1124# CONFIG_UCC_SLOW is not set
1125
1126#
1127# Library routines
1128#
1129CONFIG_BITREVERSE=y
1130# CONFIG_CRC_CCITT is not set
1131# CONFIG_CRC16 is not set
1132# CONFIG_CRC_ITU_T is not set
1133CONFIG_CRC32=y
1134# CONFIG_CRC7 is not set
1135# CONFIG_LIBCRC32C is not set
1136CONFIG_ZLIB_INFLATE=y
1137CONFIG_ZLIB_DEFLATE=y
1138CONFIG_PLIST=y
1139CONFIG_HAS_IOMEM=y
1140CONFIG_HAS_IOPORT=y
1141CONFIG_HAS_DMA=y
1142CONFIG_INSTRUMENTATION=y
1143# CONFIG_PROFILING is not set
1144# CONFIG_MARKERS is not set
1145
1146#
1147# Kernel hacking
1148#
1149# CONFIG_PRINTK_TIME is not set
1150# CONFIG_ENABLE_WARN_DEPRECATED is not set
1151# CONFIG_ENABLE_MUST_CHECK is not set
1152# CONFIG_MAGIC_SYSRQ is not set
1153# CONFIG_UNUSED_SYMBOLS is not set
1154# CONFIG_DEBUG_FS is not set
1155# CONFIG_HEADERS_CHECK is not set
1156# CONFIG_DEBUG_KERNEL is not set
1157# CONFIG_SLUB_DEBUG_ON is not set
1158# CONFIG_DEBUG_BUGVERBOSE is not set
1159# CONFIG_SAMPLES is not set
1160# CONFIG_BOOTX_TEXT is not set
1161# CONFIG_PPC_EARLY_DEBUG is not set
1162
1163#
1164# Security options
1165#
1166# CONFIG_KEYS is not set
1167# CONFIG_SECURITY is not set
1168# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1169CONFIG_XOR_BLOCKS=y
1170CONFIG_ASYNC_CORE=y
1171CONFIG_ASYNC_MEMCPY=y
1172CONFIG_ASYNC_XOR=y
1173# CONFIG_CRYPTO is not set
1174# CONFIG_PPC_CLOCK is not set
diff --git a/arch/ppc/configs/stx_gp3_defconfig b/arch/powerpc/configs/stx_gp3_defconfig
index 70d6f842aa9b..e8137a839bd4 100644
--- a/arch/ppc/configs/stx_gp3_defconfig
+++ b/arch/powerpc/configs/stx_gp3_defconfig
@@ -1,126 +1,230 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc4 3# Linux kernel version: 2.6.24-rc8
4# Tue May 24 18:11:04 2005 4# Thu Jan 24 02:02:30 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y 38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
11CONFIG_PPC=y 40CONFIG_PPC=y
12CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
13CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
63CONFIG_LOCALVERSION_AUTO=y
28CONFIG_SWAP=y 64CONFIG_SWAP=y
29CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
30# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
33# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
34CONFIG_HOTPLUG=y
35CONFIG_KOBJECT_UEVENT=y
36# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
37CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
38CONFIG_KALLSYMS=y 87CONFIG_KALLSYMS=y
39# CONFIG_KALLSYMS_ALL is not set 88# CONFIG_KALLSYMS_ALL is not set
40# CONFIG_KALLSYMS_EXTRA_PASS is not set 89# CONFIG_KALLSYMS_EXTRA_PASS is not set
90CONFIG_HOTPLUG=y
41CONFIG_PRINTK=y 91CONFIG_PRINTK=y
42CONFIG_BUG=y 92CONFIG_BUG=y
93CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 94CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 95CONFIG_FUTEX=y
96CONFIG_ANON_INODES=y
45CONFIG_EPOLL=y 97CONFIG_EPOLL=y
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 98CONFIG_SIGNALFD=y
99CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 100CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 101CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 102CONFIG_SLUB_DEBUG=y
50CONFIG_CC_ALIGN_LOOPS=0 103# CONFIG_SLAB is not set
51CONFIG_CC_ALIGN_JUMPS=0 104CONFIG_SLUB=y
105# CONFIG_SLOB is not set
106CONFIG_SLABINFO=y
107CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 108# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 109CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58CONFIG_MODULES=y 110CONFIG_MODULES=y
59# CONFIG_MODULE_UNLOAD is not set 111# CONFIG_MODULE_UNLOAD is not set
60CONFIG_OBSOLETE_MODPARM=y
61CONFIG_MODVERSIONS=y 112CONFIG_MODVERSIONS=y
62# CONFIG_MODULE_SRCVERSION_ALL is not set 113# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y 114CONFIG_KMOD=y
115CONFIG_BLOCK=y
116# CONFIG_LBD is not set
117# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set
119# CONFIG_BLK_DEV_BSG is not set
64 120
65# 121#
66# Processor 122# IO Schedulers
67# 123#
68# CONFIG_6xx is not set 124CONFIG_IOSCHED_NOOP=y
69# CONFIG_40x is not set 125CONFIG_IOSCHED_AS=y
70# CONFIG_44x is not set 126CONFIG_IOSCHED_DEADLINE=y
71# CONFIG_POWER3 is not set 127CONFIG_IOSCHED_CFQ=y
72# CONFIG_POWER4 is not set 128# CONFIG_DEFAULT_AS is not set
73# CONFIG_8xx is not set 129# CONFIG_DEFAULT_DEADLINE is not set
74CONFIG_E500=y 130CONFIG_DEFAULT_CFQ=y
75CONFIG_BOOKE=y 131# CONFIG_DEFAULT_NOOP is not set
76CONFIG_FSL_BOOKE=y 132CONFIG_DEFAULT_IOSCHED="cfq"
77# CONFIG_PHYS_64BIT is not set
78# CONFIG_SPE is not set
79CONFIG_MATH_EMULATION=y
80# CONFIG_CPU_FREQ is not set
81# CONFIG_PM is not set
82CONFIG_85xx=y
83CONFIG_PPC_INDIRECT_PCI_BE=y
84 133
85# 134#
86# Freescale 85xx options 135# Platform support
87# 136#
137# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set
139# CONFIG_PPC_CELL is not set
140# CONFIG_PPC_CELL_NATIVE is not set
141# CONFIG_PQ2ADS is not set
88# CONFIG_MPC8540_ADS is not set 142# CONFIG_MPC8540_ADS is not set
89# CONFIG_MPC8555_CDS is not set
90# CONFIG_MPC8560_ADS is not set 143# CONFIG_MPC8560_ADS is not set
91# CONFIG_SBC8560 is not set 144# CONFIG_MPC85xx_CDS is not set
145# CONFIG_MPC85xx_MDS is not set
146# CONFIG_MPC85xx_DS is not set
92CONFIG_STX_GP3=y 147CONFIG_STX_GP3=y
93CONFIG_MPC8560=y 148CONFIG_MPC8560=y
149CONFIG_MPC85xx=y
150# CONFIG_IPIC is not set
151CONFIG_MPIC=y
152# CONFIG_MPIC_WEIRD is not set
153# CONFIG_PPC_I8259 is not set
154# CONFIG_PPC_RTAS is not set
155# CONFIG_MMIO_NVRAM is not set
156# CONFIG_PPC_MPC106 is not set
157# CONFIG_PPC_970_NAP is not set
158# CONFIG_PPC_INDIRECT_IO is not set
159# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set
161CONFIG_CPM2=y
162CONFIG_PPC_CPM_NEW_BINDING=y
163# CONFIG_FSL_ULI1575 is not set
164CONFIG_CPM=y
94 165
95# 166#
96# Platform options 167# Kernel options
97# 168#
98CONFIG_CPM2=y
99# CONFIG_PC_KEYBOARD is not set
100# CONFIG_SMP is not set
101# CONFIG_PREEMPT is not set
102CONFIG_HIGHMEM=y 169CONFIG_HIGHMEM=y
170# CONFIG_TICK_ONESHOT is not set
171# CONFIG_NO_HZ is not set
172# CONFIG_HIGH_RES_TIMERS is not set
173CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
174# CONFIG_HZ_100 is not set
175CONFIG_HZ_250=y
176# CONFIG_HZ_300 is not set
177# CONFIG_HZ_1000 is not set
178CONFIG_HZ=250
179CONFIG_PREEMPT_NONE=y
180# CONFIG_PREEMPT_VOLUNTARY is not set
181# CONFIG_PREEMPT is not set
103CONFIG_BINFMT_ELF=y 182CONFIG_BINFMT_ELF=y
104CONFIG_BINFMT_MISC=m 183CONFIG_BINFMT_MISC=m
184CONFIG_MATH_EMULATION=y
185CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
186CONFIG_ARCH_FLATMEM_ENABLE=y
187CONFIG_ARCH_POPULATES_NODE_MAP=y
188CONFIG_SELECT_MEMORY_MODEL=y
189CONFIG_FLATMEM_MANUAL=y
190# CONFIG_DISCONTIGMEM_MANUAL is not set
191# CONFIG_SPARSEMEM_MANUAL is not set
192CONFIG_FLATMEM=y
193CONFIG_FLAT_NODE_MEM_MAP=y
194# CONFIG_SPARSEMEM_STATIC is not set
195# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
196CONFIG_SPLIT_PTLOCK_CPUS=4
197# CONFIG_RESOURCES_64BIT is not set
198CONFIG_ZONE_DMA_FLAG=1
199CONFIG_BOUNCE=y
200CONFIG_VIRT_TO_BUS=y
201CONFIG_PROC_DEVICETREE=y
105# CONFIG_CMDLINE_BOOL is not set 202# CONFIG_CMDLINE_BOOL is not set
203# CONFIG_PM is not set
204CONFIG_SUSPEND_UP_POSSIBLE=y
205CONFIG_HIBERNATION_UP_POSSIBLE=y
206CONFIG_SECCOMP=y
207CONFIG_WANT_DEVICE_TREE=y
208CONFIG_DEVICE_TREE="stx_gp3_8560.dts"
106CONFIG_ISA_DMA_API=y 209CONFIG_ISA_DMA_API=y
107 210
108# 211#
109# Bus options 212# Bus options
110# 213#
214CONFIG_ZONE_DMA=y
215CONFIG_PPC_INDIRECT_PCI=y
216CONFIG_FSL_SOC=y
217CONFIG_FSL_PCI=y
111CONFIG_PCI=y 218CONFIG_PCI=y
112CONFIG_PCI_DOMAINS=y 219CONFIG_PCI_DOMAINS=y
113# CONFIG_PCI_LEGACY_PROC is not set 220CONFIG_PCI_SYSCALL=y
114# CONFIG_PCI_NAMES is not set 221# CONFIG_PCIEPORTBUS is not set
222CONFIG_ARCH_SUPPORTS_MSI=y
223# CONFIG_PCI_MSI is not set
224CONFIG_PCI_LEGACY=y
115# CONFIG_PCI_DEBUG is not set 225# CONFIG_PCI_DEBUG is not set
116
117#
118# PCCARD (PCMCIA/CardBus) support
119#
120# CONFIG_PCCARD is not set 226# CONFIG_PCCARD is not set
121CONFIG_RAPIDIO=y 227# CONFIG_HOTPLUG_PCI is not set
122CONFIG_RAPIDIO_8_BIT_TRANSPORT=y
123CONFIG_RAPIDIO_DISC_TIMEOUT=30
124 228
125# 229#
126# Advanced setup 230# Advanced setup
@@ -133,43 +237,173 @@ CONFIG_RAPIDIO_DISC_TIMEOUT=30
133CONFIG_HIGHMEM_START=0xfe000000 237CONFIG_HIGHMEM_START=0xfe000000
134CONFIG_LOWMEM_SIZE=0x30000000 238CONFIG_LOWMEM_SIZE=0x30000000
135CONFIG_KERNEL_START=0xc0000000 239CONFIG_KERNEL_START=0xc0000000
136CONFIG_TASK_SIZE=0x80000000 240CONFIG_TASK_SIZE=0xc0000000
137CONFIG_BOOT_LOAD=0x00800000 241CONFIG_BOOT_LOAD=0x00800000
138 242
139# 243#
244# Networking
245#
246CONFIG_NET=y
247
248#
249# Networking options
250#
251CONFIG_PACKET=y
252# CONFIG_PACKET_MMAP is not set
253CONFIG_UNIX=y
254CONFIG_XFRM=y
255# CONFIG_XFRM_USER is not set
256# CONFIG_XFRM_SUB_POLICY is not set
257# CONFIG_XFRM_MIGRATE is not set
258# CONFIG_NET_KEY is not set
259CONFIG_INET=y
260# CONFIG_IP_MULTICAST is not set
261# CONFIG_IP_ADVANCED_ROUTER is not set
262CONFIG_IP_FIB_HASH=y
263CONFIG_IP_PNP=y
264# CONFIG_IP_PNP_DHCP is not set
265CONFIG_IP_PNP_BOOTP=y
266# CONFIG_IP_PNP_RARP is not set
267# CONFIG_NET_IPIP is not set
268# CONFIG_NET_IPGRE is not set
269# CONFIG_ARPD is not set
270# CONFIG_SYN_COOKIES is not set
271# CONFIG_INET_AH is not set
272# CONFIG_INET_ESP is not set
273# CONFIG_INET_IPCOMP is not set
274# CONFIG_INET_XFRM_TUNNEL is not set
275# CONFIG_INET_TUNNEL is not set
276CONFIG_INET_XFRM_MODE_TRANSPORT=y
277CONFIG_INET_XFRM_MODE_TUNNEL=y
278CONFIG_INET_XFRM_MODE_BEET=y
279# CONFIG_INET_LRO is not set
280CONFIG_INET_DIAG=y
281CONFIG_INET_TCP_DIAG=y
282# CONFIG_TCP_CONG_ADVANCED is not set
283CONFIG_TCP_CONG_CUBIC=y
284CONFIG_DEFAULT_TCP_CONG="cubic"
285# CONFIG_TCP_MD5SIG is not set
286# CONFIG_IP_VS is not set
287# CONFIG_IPV6 is not set
288# CONFIG_INET6_XFRM_TUNNEL is not set
289# CONFIG_INET6_TUNNEL is not set
290# CONFIG_NETWORK_SECMARK is not set
291CONFIG_NETFILTER=y
292# CONFIG_NETFILTER_DEBUG is not set
293
294#
295# Core Netfilter Configuration
296#
297# CONFIG_NETFILTER_NETLINK is not set
298# CONFIG_NF_CONNTRACK_ENABLED is not set
299# CONFIG_NF_CONNTRACK is not set
300CONFIG_NETFILTER_XTABLES=m
301# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
302# CONFIG_NETFILTER_XT_TARGET_MARK is not set
303# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
304# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
305# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
306# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
307# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
308# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
309# CONFIG_NETFILTER_XT_MATCH_ESP is not set
310# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
311# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
312# CONFIG_NETFILTER_XT_MATCH_MAC is not set
313# CONFIG_NETFILTER_XT_MATCH_MARK is not set
314# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
315# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
316# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
317# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
318# CONFIG_NETFILTER_XT_MATCH_REALM is not set
319# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
320# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
321# CONFIG_NETFILTER_XT_MATCH_STRING is not set
322# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
323# CONFIG_NETFILTER_XT_MATCH_TIME is not set
324# CONFIG_NETFILTER_XT_MATCH_U32 is not set
325# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
326
327#
328# IP: Netfilter Configuration
329#
330# CONFIG_IP_NF_QUEUE is not set
331CONFIG_IP_NF_IPTABLES=m
332# CONFIG_IP_NF_MATCH_IPRANGE is not set
333# CONFIG_IP_NF_MATCH_TOS is not set
334# CONFIG_IP_NF_MATCH_RECENT is not set
335# CONFIG_IP_NF_MATCH_ECN is not set
336# CONFIG_IP_NF_MATCH_AH is not set
337# CONFIG_IP_NF_MATCH_TTL is not set
338# CONFIG_IP_NF_MATCH_OWNER is not set
339# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
340CONFIG_IP_NF_FILTER=m
341# CONFIG_IP_NF_TARGET_REJECT is not set
342# CONFIG_IP_NF_TARGET_LOG is not set
343# CONFIG_IP_NF_TARGET_ULOG is not set
344# CONFIG_IP_NF_MANGLE is not set
345# CONFIG_IP_NF_RAW is not set
346# CONFIG_IP_NF_ARPTABLES is not set
347# CONFIG_IP_DCCP is not set
348# CONFIG_IP_SCTP is not set
349# CONFIG_TIPC is not set
350# CONFIG_ATM is not set
351# CONFIG_BRIDGE is not set
352# CONFIG_VLAN_8021Q is not set
353# CONFIG_DECNET is not set
354# CONFIG_LLC2 is not set
355# CONFIG_IPX is not set
356# CONFIG_ATALK is not set
357# CONFIG_X25 is not set
358# CONFIG_LAPB is not set
359# CONFIG_ECONET is not set
360# CONFIG_WAN_ROUTER is not set
361# CONFIG_NET_SCHED is not set
362
363#
364# Network testing
365#
366CONFIG_NET_PKTGEN=y
367# CONFIG_HAMRADIO is not set
368# CONFIG_IRDA is not set
369# CONFIG_BT is not set
370# CONFIG_AF_RXRPC is not set
371
372#
373# Wireless
374#
375# CONFIG_CFG80211 is not set
376# CONFIG_WIRELESS_EXT is not set
377# CONFIG_MAC80211 is not set
378# CONFIG_IEEE80211 is not set
379# CONFIG_RFKILL is not set
380# CONFIG_NET_9P is not set
381
382#
140# Device Drivers 383# Device Drivers
141# 384#
142 385
143# 386#
144# Generic Driver Options 387# Generic Driver Options
145# 388#
389CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
146CONFIG_STANDALONE=y 390CONFIG_STANDALONE=y
147CONFIG_PREVENT_FIRMWARE_BUILD=y 391CONFIG_PREVENT_FIRMWARE_BUILD=y
148# CONFIG_FW_LOADER is not set 392# CONFIG_FW_LOADER is not set
149# CONFIG_DEBUG_DRIVER is not set 393# CONFIG_DEBUG_DRIVER is not set
150 394# CONFIG_DEBUG_DEVRES is not set
151# 395# CONFIG_SYS_HYPERVISOR is not set
152# Memory Technology Devices (MTD) 396# CONFIG_CONNECTOR is not set
153#
154# CONFIG_MTD is not set 397# CONFIG_MTD is not set
155 398CONFIG_OF_DEVICE=y
156#
157# Parallel port support
158#
159CONFIG_PARPORT=m 399CONFIG_PARPORT=m
160CONFIG_PARPORT_PC=m 400CONFIG_PARPORT_PC=m
161# CONFIG_PARPORT_PC_FIFO is not set 401# CONFIG_PARPORT_PC_FIFO is not set
162# CONFIG_PARPORT_PC_SUPERIO is not set 402# CONFIG_PARPORT_PC_SUPERIO is not set
163# CONFIG_PARPORT_GSC is not set 403# CONFIG_PARPORT_GSC is not set
404# CONFIG_PARPORT_AX88796 is not set
164# CONFIG_PARPORT_1284 is not set 405# CONFIG_PARPORT_1284 is not set
165 406CONFIG_BLK_DEV=y
166#
167# Plug and Play support
168#
169
170#
171# Block devices
172#
173# CONFIG_BLK_DEV_FD is not set 407# CONFIG_BLK_DEV_FD is not set
174# CONFIG_PARIDE is not set 408# CONFIG_PARIDE is not set
175# CONFIG_BLK_CPQ_DA is not set 409# CONFIG_BLK_CPQ_DA is not set
@@ -181,26 +415,19 @@ CONFIG_BLK_DEV_LOOP=m
181# CONFIG_BLK_DEV_CRYPTOLOOP is not set 415# CONFIG_BLK_DEV_CRYPTOLOOP is not set
182CONFIG_BLK_DEV_NBD=m 416CONFIG_BLK_DEV_NBD=m
183# CONFIG_BLK_DEV_SX8 is not set 417# CONFIG_BLK_DEV_SX8 is not set
184CONFIG_BLK_DEV_RAM=m 418CONFIG_BLK_DEV_RAM=y
185CONFIG_BLK_DEV_RAM_COUNT=16 419CONFIG_BLK_DEV_RAM_COUNT=16
186CONFIG_BLK_DEV_RAM_SIZE=4096 420CONFIG_BLK_DEV_RAM_SIZE=32768
187CONFIG_INITRAMFS_SOURCE="" 421CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
188# CONFIG_LBD is not set
189# CONFIG_CDROM_PKTCDVD is not set 422# CONFIG_CDROM_PKTCDVD is not set
190
191#
192# IO Schedulers
193#
194CONFIG_IOSCHED_NOOP=y
195CONFIG_IOSCHED_AS=y
196CONFIG_IOSCHED_DEADLINE=y
197CONFIG_IOSCHED_CFQ=y
198# CONFIG_ATA_OVER_ETH is not set 423# CONFIG_ATA_OVER_ETH is not set
199 424CONFIG_MISC_DEVICES=y
200# 425# CONFIG_PHANTOM is not set
201# ATA/ATAPI/MFM/RLL support 426# CONFIG_EEPROM_93CX6 is not set
202# 427# CONFIG_SGI_IOC4 is not set
428# CONFIG_TIFM_CORE is not set
203CONFIG_IDE=y 429CONFIG_IDE=y
430CONFIG_IDE_MAX_HWIFS=4
204CONFIG_BLK_DEV_IDE=y 431CONFIG_BLK_DEV_IDE=y
205 432
206# 433#
@@ -214,21 +441,58 @@ CONFIG_BLK_DEV_IDECD=m
214# CONFIG_BLK_DEV_IDEFLOPPY is not set 441# CONFIG_BLK_DEV_IDEFLOPPY is not set
215# CONFIG_BLK_DEV_IDESCSI is not set 442# CONFIG_BLK_DEV_IDESCSI is not set
216# CONFIG_IDE_TASK_IOCTL is not set 443# CONFIG_IDE_TASK_IOCTL is not set
444CONFIG_IDE_PROC_FS=y
217 445
218# 446#
219# IDE chipset support/bugfixes 447# IDE chipset support/bugfixes
220# 448#
221CONFIG_IDE_GENERIC=y 449CONFIG_IDE_GENERIC=y
222# CONFIG_BLK_DEV_IDEPCI is not set 450# CONFIG_BLK_DEV_PLATFORM is not set
451
452#
453# PCI IDE chipsets support
454#
455# CONFIG_IDEPCI_PCIBUS_ORDER is not set
456# CONFIG_BLK_DEV_GENERIC is not set
457# CONFIG_BLK_DEV_OPTI621 is not set
458# CONFIG_BLK_DEV_AEC62XX is not set
459# CONFIG_BLK_DEV_ALI15X3 is not set
460# CONFIG_BLK_DEV_AMD74XX is not set
461# CONFIG_BLK_DEV_CMD64X is not set
462# CONFIG_BLK_DEV_TRIFLEX is not set
463# CONFIG_BLK_DEV_CY82C693 is not set
464# CONFIG_BLK_DEV_CS5520 is not set
465# CONFIG_BLK_DEV_CS5530 is not set
466# CONFIG_BLK_DEV_HPT34X is not set
467# CONFIG_BLK_DEV_HPT366 is not set
468# CONFIG_BLK_DEV_JMICRON is not set
469# CONFIG_BLK_DEV_SC1200 is not set
470# CONFIG_BLK_DEV_PIIX is not set
471# CONFIG_BLK_DEV_IT8213 is not set
472# CONFIG_BLK_DEV_IT821X is not set
473# CONFIG_BLK_DEV_NS87415 is not set
474# CONFIG_BLK_DEV_PDC202XX_OLD is not set
475# CONFIG_BLK_DEV_PDC202XX_NEW is not set
476# CONFIG_BLK_DEV_SVWKS is not set
477# CONFIG_BLK_DEV_SIIMAGE is not set
478# CONFIG_BLK_DEV_SL82C105 is not set
479# CONFIG_BLK_DEV_SLC90E66 is not set
480# CONFIG_BLK_DEV_TRM290 is not set
481# CONFIG_BLK_DEV_VIA82CXXX is not set
482# CONFIG_BLK_DEV_TC86C001 is not set
223# CONFIG_IDE_ARM is not set 483# CONFIG_IDE_ARM is not set
224# CONFIG_BLK_DEV_IDEDMA is not set 484# CONFIG_BLK_DEV_IDEDMA is not set
225# CONFIG_IDEDMA_AUTO is not set 485CONFIG_IDE_ARCH_OBSOLETE_INIT=y
226# CONFIG_BLK_DEV_HD is not set 486# CONFIG_BLK_DEV_HD is not set
227 487
228# 488#
229# SCSI device support 489# SCSI device support
230# 490#
491# CONFIG_RAID_ATTRS is not set
231CONFIG_SCSI=m 492CONFIG_SCSI=m
493CONFIG_SCSI_DMA=y
494# CONFIG_SCSI_TGT is not set
495# CONFIG_SCSI_NETLINK is not set
232CONFIG_SCSI_PROC_FS=y 496CONFIG_SCSI_PROC_FS=y
233 497
234# 498#
@@ -240,6 +504,7 @@ CONFIG_CHR_DEV_ST=m
240CONFIG_BLK_DEV_SR=m 504CONFIG_BLK_DEV_SR=m
241# CONFIG_BLK_DEV_SR_VENDOR is not set 505# CONFIG_BLK_DEV_SR_VENDOR is not set
242CONFIG_CHR_DEV_SG=m 506CONFIG_CHR_DEV_SG=m
507# CONFIG_CHR_DEV_SCH is not set
243 508
244# 509#
245# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 510# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -247,17 +512,19 @@ CONFIG_CHR_DEV_SG=m
247CONFIG_SCSI_MULTI_LUN=y 512CONFIG_SCSI_MULTI_LUN=y
248CONFIG_SCSI_CONSTANTS=y 513CONFIG_SCSI_CONSTANTS=y
249# CONFIG_SCSI_LOGGING is not set 514# CONFIG_SCSI_LOGGING is not set
515# CONFIG_SCSI_SCAN_ASYNC is not set
516CONFIG_SCSI_WAIT_SCAN=m
250 517
251# 518#
252# SCSI Transport Attributes 519# SCSI Transports
253# 520#
254# CONFIG_SCSI_SPI_ATTRS is not set 521# CONFIG_SCSI_SPI_ATTRS is not set
255# CONFIG_SCSI_FC_ATTRS is not set 522# CONFIG_SCSI_FC_ATTRS is not set
256# CONFIG_SCSI_ISCSI_ATTRS is not set 523# CONFIG_SCSI_ISCSI_ATTRS is not set
257 524# CONFIG_SCSI_SAS_LIBSAS is not set
258# 525# CONFIG_SCSI_SRP_ATTRS is not set
259# SCSI low-level drivers 526CONFIG_SCSI_LOWLEVEL=y
260# 527# CONFIG_ISCSI_TCP is not set
261# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 528# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
262# CONFIG_SCSI_3W_9XXX is not set 529# CONFIG_SCSI_3W_9XXX is not set
263# CONFIG_SCSI_ACARD is not set 530# CONFIG_SCSI_ACARD is not set
@@ -265,10 +532,14 @@ CONFIG_SCSI_CONSTANTS=y
265# CONFIG_SCSI_AIC7XXX is not set 532# CONFIG_SCSI_AIC7XXX is not set
266# CONFIG_SCSI_AIC7XXX_OLD is not set 533# CONFIG_SCSI_AIC7XXX_OLD is not set
267# CONFIG_SCSI_AIC79XX is not set 534# CONFIG_SCSI_AIC79XX is not set
535# CONFIG_SCSI_AIC94XX is not set
268# CONFIG_SCSI_DPT_I2O is not set 536# CONFIG_SCSI_DPT_I2O is not set
537# CONFIG_SCSI_ADVANSYS is not set
538# CONFIG_SCSI_ARCMSR is not set
269# CONFIG_MEGARAID_NEWGEN is not set 539# CONFIG_MEGARAID_NEWGEN is not set
270# CONFIG_MEGARAID_LEGACY is not set 540# CONFIG_MEGARAID_LEGACY is not set
271# CONFIG_SCSI_SATA is not set 541# CONFIG_MEGARAID_SAS is not set
542# CONFIG_SCSI_HPTIOP is not set
272# CONFIG_SCSI_BUSLOGIC is not set 543# CONFIG_SCSI_BUSLOGIC is not set
273# CONFIG_SCSI_DMX3191D is not set 544# CONFIG_SCSI_DMX3191D is not set
274# CONFIG_SCSI_EATA is not set 545# CONFIG_SCSI_EATA is not set
@@ -279,233 +550,109 @@ CONFIG_SCSI_CONSTANTS=y
279# CONFIG_SCSI_INIA100 is not set 550# CONFIG_SCSI_INIA100 is not set
280# CONFIG_SCSI_PPA is not set 551# CONFIG_SCSI_PPA is not set
281# CONFIG_SCSI_IMM is not set 552# CONFIG_SCSI_IMM is not set
553# CONFIG_SCSI_STEX is not set
282# CONFIG_SCSI_SYM53C8XX_2 is not set 554# CONFIG_SCSI_SYM53C8XX_2 is not set
283# CONFIG_SCSI_IPR is not set
284# CONFIG_SCSI_QLOGIC_FC is not set
285# CONFIG_SCSI_QLOGIC_1280 is not set 555# CONFIG_SCSI_QLOGIC_1280 is not set
286CONFIG_SCSI_QLA2XXX=m 556# CONFIG_SCSI_QLA_FC is not set
287# CONFIG_SCSI_QLA21XX is not set 557# CONFIG_SCSI_QLA_ISCSI is not set
288# CONFIG_SCSI_QLA22XX is not set
289# CONFIG_SCSI_QLA2300 is not set
290# CONFIG_SCSI_QLA2322 is not set
291# CONFIG_SCSI_QLA6312 is not set
292# CONFIG_SCSI_LPFC is not set 558# CONFIG_SCSI_LPFC is not set
293# CONFIG_SCSI_DC395x is not set 559# CONFIG_SCSI_DC395x is not set
294# CONFIG_SCSI_DC390T is not set 560# CONFIG_SCSI_DC390T is not set
295# CONFIG_SCSI_NSP32 is not set 561# CONFIG_SCSI_NSP32 is not set
296# CONFIG_SCSI_DEBUG is not set 562# CONFIG_SCSI_DEBUG is not set
297 563# CONFIG_SCSI_SRP is not set
298# 564# CONFIG_ATA is not set
299# Multi-device support (RAID and LVM)
300#
301# CONFIG_MD is not set 565# CONFIG_MD is not set
302
303#
304# Fusion MPT device support
305#
306# CONFIG_FUSION is not set 566# CONFIG_FUSION is not set
307 567
308# 568#
309# IEEE 1394 (FireWire) support 569# IEEE 1394 (FireWire) support
310# 570#
571# CONFIG_FIREWIRE is not set
311# CONFIG_IEEE1394 is not set 572# CONFIG_IEEE1394 is not set
312
313#
314# I2O device support
315#
316# CONFIG_I2O is not set 573# CONFIG_I2O is not set
317 574# CONFIG_MACINTOSH_DRIVERS is not set
318#
319# Macintosh device drivers
320#
321
322#
323# Networking support
324#
325CONFIG_NET=y
326
327#
328# Networking options
329#
330CONFIG_PACKET=y
331# CONFIG_PACKET_MMAP is not set
332CONFIG_UNIX=y
333# CONFIG_NET_KEY is not set
334CONFIG_INET=y
335# CONFIG_IP_MULTICAST is not set
336# CONFIG_IP_ADVANCED_ROUTER is not set
337CONFIG_IP_PNP=y
338# CONFIG_IP_PNP_DHCP is not set
339CONFIG_IP_PNP_BOOTP=y
340# CONFIG_IP_PNP_RARP is not set
341# CONFIG_NET_IPIP is not set
342# CONFIG_NET_IPGRE is not set
343# CONFIG_ARPD is not set
344# CONFIG_SYN_COOKIES is not set
345# CONFIG_INET_AH is not set
346# CONFIG_INET_ESP is not set
347# CONFIG_INET_IPCOMP is not set
348# CONFIG_INET_TUNNEL is not set
349CONFIG_IP_TCPDIAG=y
350# CONFIG_IP_TCPDIAG_IPV6 is not set
351
352#
353# IP: Virtual Server Configuration
354#
355# CONFIG_IP_VS is not set
356# CONFIG_IPV6 is not set
357CONFIG_NETFILTER=y
358# CONFIG_NETFILTER_DEBUG is not set
359
360#
361# IP: Netfilter Configuration
362#
363CONFIG_IP_NF_CONNTRACK=m
364# CONFIG_IP_NF_CT_ACCT is not set
365# CONFIG_IP_NF_CONNTRACK_MARK is not set
366# CONFIG_IP_NF_CT_PROTO_SCTP is not set
367CONFIG_IP_NF_FTP=m
368CONFIG_IP_NF_IRC=m
369# CONFIG_IP_NF_TFTP is not set
370# CONFIG_IP_NF_AMANDA is not set
371# CONFIG_IP_NF_QUEUE is not set
372CONFIG_IP_NF_IPTABLES=m
373# CONFIG_IP_NF_MATCH_LIMIT is not set
374# CONFIG_IP_NF_MATCH_IPRANGE is not set
375# CONFIG_IP_NF_MATCH_MAC is not set
376# CONFIG_IP_NF_MATCH_PKTTYPE is not set
377# CONFIG_IP_NF_MATCH_MARK is not set
378# CONFIG_IP_NF_MATCH_MULTIPORT is not set
379# CONFIG_IP_NF_MATCH_TOS is not set
380# CONFIG_IP_NF_MATCH_RECENT is not set
381# CONFIG_IP_NF_MATCH_ECN is not set
382# CONFIG_IP_NF_MATCH_DSCP is not set
383# CONFIG_IP_NF_MATCH_AH_ESP is not set
384# CONFIG_IP_NF_MATCH_LENGTH is not set
385# CONFIG_IP_NF_MATCH_TTL is not set
386# CONFIG_IP_NF_MATCH_TCPMSS is not set
387# CONFIG_IP_NF_MATCH_HELPER is not set
388# CONFIG_IP_NF_MATCH_STATE is not set
389# CONFIG_IP_NF_MATCH_CONNTRACK is not set
390# CONFIG_IP_NF_MATCH_OWNER is not set
391# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
392# CONFIG_IP_NF_MATCH_REALM is not set
393# CONFIG_IP_NF_MATCH_SCTP is not set
394# CONFIG_IP_NF_MATCH_COMMENT is not set
395# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
396CONFIG_IP_NF_FILTER=m
397# CONFIG_IP_NF_TARGET_REJECT is not set
398# CONFIG_IP_NF_TARGET_LOG is not set
399# CONFIG_IP_NF_TARGET_ULOG is not set
400# CONFIG_IP_NF_TARGET_TCPMSS is not set
401CONFIG_IP_NF_NAT=m
402CONFIG_IP_NF_NAT_NEEDED=y
403CONFIG_IP_NF_TARGET_MASQUERADE=m
404CONFIG_IP_NF_TARGET_REDIRECT=m
405# CONFIG_IP_NF_TARGET_NETMAP is not set
406# CONFIG_IP_NF_TARGET_SAME is not set
407CONFIG_IP_NF_NAT_SNMP_BASIC=m
408CONFIG_IP_NF_NAT_IRC=m
409CONFIG_IP_NF_NAT_FTP=m
410# CONFIG_IP_NF_MANGLE is not set
411# CONFIG_IP_NF_RAW is not set
412# CONFIG_IP_NF_ARPTABLES is not set
413
414#
415# SCTP Configuration (EXPERIMENTAL)
416#
417# CONFIG_IP_SCTP is not set
418# CONFIG_ATM is not set
419# CONFIG_BRIDGE is not set
420# CONFIG_VLAN_8021Q is not set
421# CONFIG_DECNET is not set
422# CONFIG_LLC2 is not set
423# CONFIG_IPX is not set
424# CONFIG_ATALK is not set
425# CONFIG_X25 is not set
426# CONFIG_LAPB is not set
427# CONFIG_NET_DIVERT is not set
428# CONFIG_ECONET is not set
429# CONFIG_WAN_ROUTER is not set
430
431#
432# QoS and/or fair queueing
433#
434# CONFIG_NET_SCHED is not set
435# CONFIG_NET_CLS_ROUTE is not set
436
437#
438# Network testing
439#
440CONFIG_NET_PKTGEN=y
441# CONFIG_NETPOLL is not set
442# CONFIG_NET_POLL_CONTROLLER is not set
443# CONFIG_HAMRADIO is not set
444# CONFIG_IRDA is not set
445# CONFIG_BT is not set
446CONFIG_NETDEVICES=y 575CONFIG_NETDEVICES=y
576# CONFIG_NETDEVICES_MULTIQUEUE is not set
447# CONFIG_DUMMY is not set 577# CONFIG_DUMMY is not set
448# CONFIG_BONDING is not set 578# CONFIG_BONDING is not set
579# CONFIG_MACVLAN is not set
449# CONFIG_EQUALIZER is not set 580# CONFIG_EQUALIZER is not set
450# CONFIG_TUN is not set 581# CONFIG_TUN is not set
451 582# CONFIG_VETH is not set
452#
453# ARCnet devices
454#
455# CONFIG_ARCNET is not set 583# CONFIG_ARCNET is not set
456 584CONFIG_PHYLIB=y
457# 585
458# Ethernet (10 or 100Mbit) 586#
459# 587# MII PHY device drivers
588#
589CONFIG_MARVELL_PHY=y
590# CONFIG_DAVICOM_PHY is not set
591# CONFIG_QSEMI_PHY is not set
592# CONFIG_LXT_PHY is not set
593# CONFIG_CICADA_PHY is not set
594# CONFIG_VITESSE_PHY is not set
595# CONFIG_SMSC_PHY is not set
596# CONFIG_BROADCOM_PHY is not set
597# CONFIG_ICPLUS_PHY is not set
598# CONFIG_FIXED_PHY is not set
599# CONFIG_MDIO_BITBANG is not set
460CONFIG_NET_ETHERNET=y 600CONFIG_NET_ETHERNET=y
461# CONFIG_MII is not set 601# CONFIG_MII is not set
462# CONFIG_HAPPYMEAL is not set 602# CONFIG_HAPPYMEAL is not set
463# CONFIG_SUNGEM is not set 603# CONFIG_SUNGEM is not set
604# CONFIG_CASSINI is not set
464# CONFIG_NET_VENDOR_3COM is not set 605# CONFIG_NET_VENDOR_3COM is not set
465
466#
467# Tulip family network device support
468#
469# CONFIG_NET_TULIP is not set 606# CONFIG_NET_TULIP is not set
470# CONFIG_HP100 is not set 607# CONFIG_HP100 is not set
608# CONFIG_IBM_NEW_EMAC_ZMII is not set
609# CONFIG_IBM_NEW_EMAC_RGMII is not set
610# CONFIG_IBM_NEW_EMAC_TAH is not set
611# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
471# CONFIG_NET_PCI is not set 612# CONFIG_NET_PCI is not set
472 613# CONFIG_B44 is not set
473# 614# CONFIG_NET_POCKET is not set
474# Ethernet (1000 Mbit) 615# CONFIG_FS_ENET is not set
475# 616CONFIG_NETDEV_1000=y
476# CONFIG_ACENIC is not set 617# CONFIG_ACENIC is not set
477# CONFIG_DL2K is not set 618# CONFIG_DL2K is not set
478# CONFIG_E1000 is not set 619# CONFIG_E1000 is not set
620# CONFIG_E1000E is not set
621# CONFIG_IP1000 is not set
479# CONFIG_NS83820 is not set 622# CONFIG_NS83820 is not set
480# CONFIG_HAMACHI is not set 623# CONFIG_HAMACHI is not set
481# CONFIG_YELLOWFIN is not set 624# CONFIG_YELLOWFIN is not set
482# CONFIG_R8169 is not set 625# CONFIG_R8169 is not set
626# CONFIG_SIS190 is not set
627# CONFIG_SKGE is not set
628# CONFIG_SKY2 is not set
483# CONFIG_SK98LIN is not set 629# CONFIG_SK98LIN is not set
630# CONFIG_VIA_VELOCITY is not set
484# CONFIG_TIGON3 is not set 631# CONFIG_TIGON3 is not set
632# CONFIG_BNX2 is not set
485CONFIG_GIANFAR=y 633CONFIG_GIANFAR=y
486CONFIG_GFAR_NAPI=y 634CONFIG_GFAR_NAPI=y
487 635# CONFIG_QLA3XXX is not set
488# 636# CONFIG_ATL1 is not set
489# Ethernet (10000 Mbit) 637CONFIG_NETDEV_10000=y
490# 638# CONFIG_CHELSIO_T1 is not set
639# CONFIG_CHELSIO_T3 is not set
640# CONFIG_IXGBE is not set
491# CONFIG_IXGB is not set 641# CONFIG_IXGB is not set
492# CONFIG_S2IO is not set 642# CONFIG_S2IO is not set
493 643# CONFIG_MYRI10GE is not set
494# 644# CONFIG_NETXEN_NIC is not set
495# Token Ring devices 645# CONFIG_NIU is not set
496# 646# CONFIG_MLX4_CORE is not set
647# CONFIG_TEHUTI is not set
497# CONFIG_TR is not set 648# CONFIG_TR is not set
498 649
499# 650#
500# Wireless LAN (non-hamradio) 651# Wireless LAN
501#
502# CONFIG_NET_RADIO is not set
503
504#
505# Wan interfaces
506# 652#
653# CONFIG_WLAN_PRE80211 is not set
654# CONFIG_WLAN_80211 is not set
507# CONFIG_WAN is not set 655# CONFIG_WAN is not set
508CONFIG_RIONET=y
509# CONFIG_FDDI is not set 656# CONFIG_FDDI is not set
510# CONFIG_HIPPI is not set 657# CONFIG_HIPPI is not set
511# CONFIG_PLIP is not set 658# CONFIG_PLIP is not set
@@ -514,21 +661,17 @@ CONFIG_RIONET=y
514# CONFIG_NET_FC is not set 661# CONFIG_NET_FC is not set
515# CONFIG_SHAPER is not set 662# CONFIG_SHAPER is not set
516# CONFIG_NETCONSOLE is not set 663# CONFIG_NETCONSOLE is not set
517 664# CONFIG_NETPOLL is not set
518# 665# CONFIG_NET_POLL_CONTROLLER is not set
519# ISDN subsystem
520#
521# CONFIG_ISDN is not set 666# CONFIG_ISDN is not set
522
523#
524# Telephony Support
525#
526# CONFIG_PHONE is not set 667# CONFIG_PHONE is not set
527 668
528# 669#
529# Input device support 670# Input device support
530# 671#
531CONFIG_INPUT=y 672CONFIG_INPUT=y
673# CONFIG_INPUT_FF_MEMLESS is not set
674# CONFIG_INPUT_POLLDEV is not set
532 675
533# 676#
534# Userland interfaces 677# Userland interfaces
@@ -538,7 +681,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
538CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280 681CONFIG_INPUT_MOUSEDEV_SCREEN_X=1280
539CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024 682CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1024
540CONFIG_INPUT_JOYDEV=m 683CONFIG_INPUT_JOYDEV=m
541# CONFIG_INPUT_TSDEV is not set
542CONFIG_INPUT_EVDEV=m 684CONFIG_INPUT_EVDEV=m
543# CONFIG_INPUT_EVBUG is not set 685# CONFIG_INPUT_EVBUG is not set
544 686
@@ -551,11 +693,20 @@ CONFIG_KEYBOARD_ATKBD=y
551# CONFIG_KEYBOARD_LKKBD is not set 693# CONFIG_KEYBOARD_LKKBD is not set
552# CONFIG_KEYBOARD_XTKBD is not set 694# CONFIG_KEYBOARD_XTKBD is not set
553# CONFIG_KEYBOARD_NEWTON is not set 695# CONFIG_KEYBOARD_NEWTON is not set
696# CONFIG_KEYBOARD_STOWAWAY is not set
554CONFIG_INPUT_MOUSE=y 697CONFIG_INPUT_MOUSE=y
555CONFIG_MOUSE_PS2=y 698CONFIG_MOUSE_PS2=y
699CONFIG_MOUSE_PS2_ALPS=y
700CONFIG_MOUSE_PS2_LOGIPS2PP=y
701CONFIG_MOUSE_PS2_SYNAPTICS=y
702CONFIG_MOUSE_PS2_LIFEBOOK=y
703CONFIG_MOUSE_PS2_TRACKPOINT=y
704# CONFIG_MOUSE_PS2_TOUCHKIT is not set
556# CONFIG_MOUSE_SERIAL is not set 705# CONFIG_MOUSE_SERIAL is not set
706# CONFIG_MOUSE_APPLETOUCH is not set
557# CONFIG_MOUSE_VSXXXAA is not set 707# CONFIG_MOUSE_VSXXXAA is not set
558# CONFIG_INPUT_JOYSTICK is not set 708# CONFIG_INPUT_JOYSTICK is not set
709# CONFIG_INPUT_TABLET is not set
559# CONFIG_INPUT_TOUCHSCREEN is not set 710# CONFIG_INPUT_TOUCHSCREEN is not set
560# CONFIG_INPUT_MISC is not set 711# CONFIG_INPUT_MISC is not set
561 712
@@ -570,7 +721,6 @@ CONFIG_SERIO_SERPORT=y
570CONFIG_SERIO_LIBPS2=y 721CONFIG_SERIO_LIBPS2=y
571# CONFIG_SERIO_RAW is not set 722# CONFIG_SERIO_RAW is not set
572# CONFIG_GAMEPORT is not set 723# CONFIG_GAMEPORT is not set
573CONFIG_SOUND_GAMEPORT=y
574 724
575# 725#
576# Character devices 726# Character devices
@@ -586,6 +736,7 @@ CONFIG_SOUND_GAMEPORT=y
586# 736#
587# Non-8250 serial port support 737# Non-8250 serial port support
588# 738#
739# CONFIG_SERIAL_UARTLITE is not set
589CONFIG_SERIAL_CORE=y 740CONFIG_SERIAL_CORE=y
590CONFIG_SERIAL_CORE_CONSOLE=y 741CONFIG_SERIAL_CORE_CONSOLE=y
591CONFIG_SERIAL_CPM=y 742CONFIG_SERIAL_CPM=y
@@ -603,44 +754,17 @@ CONFIG_LEGACY_PTY_COUNT=256
603CONFIG_PRINTER=m 754CONFIG_PRINTER=m
604# CONFIG_LP_CONSOLE is not set 755# CONFIG_LP_CONSOLE is not set
605# CONFIG_PPDEV is not set 756# CONFIG_PPDEV is not set
606# CONFIG_TIPAR is not set
607
608#
609# IPMI
610#
611# CONFIG_IPMI_HANDLER is not set 757# CONFIG_IPMI_HANDLER is not set
612 758CONFIG_HW_RANDOM=m
613#
614# Watchdog Cards
615#
616# CONFIG_WATCHDOG is not set
617# CONFIG_NVRAM is not set 759# CONFIG_NVRAM is not set
618# CONFIG_GEN_RTC is not set 760# CONFIG_GEN_RTC is not set
619# CONFIG_DTLK is not set
620# CONFIG_R3964 is not set 761# CONFIG_R3964 is not set
621# CONFIG_APPLICOM is not set 762# CONFIG_APPLICOM is not set
622
623#
624# Ftape, the floppy tape device driver
625#
626CONFIG_AGP=m
627CONFIG_DRM=m
628# CONFIG_DRM_TDFX is not set
629# CONFIG_DRM_R128 is not set
630# CONFIG_DRM_RADEON is not set
631# CONFIG_DRM_MGA is not set
632# CONFIG_DRM_SIS is not set
633# CONFIG_RAW_DRIVER is not set 763# CONFIG_RAW_DRIVER is not set
634
635#
636# TPM devices
637#
638# CONFIG_TCG_TPM is not set 764# CONFIG_TCG_TPM is not set
639 765CONFIG_DEVPORT=y
640#
641# I2C support
642#
643CONFIG_I2C=m 766CONFIG_I2C=m
767CONFIG_I2C_BOARDINFO=y
644CONFIG_I2C_CHARDEV=m 768CONFIG_I2C_CHARDEV=m
645 769
646# 770#
@@ -663,32 +787,62 @@ CONFIG_I2C_ALGOBIT=m
663# CONFIG_I2C_PIIX4 is not set 787# CONFIG_I2C_PIIX4 is not set
664# CONFIG_I2C_MPC is not set 788# CONFIG_I2C_MPC is not set
665# CONFIG_I2C_NFORCE2 is not set 789# CONFIG_I2C_NFORCE2 is not set
790# CONFIG_I2C_OCORES is not set
666# CONFIG_I2C_PARPORT is not set 791# CONFIG_I2C_PARPORT is not set
667# CONFIG_I2C_PARPORT_LIGHT is not set 792# CONFIG_I2C_PARPORT_LIGHT is not set
668# CONFIG_I2C_PROSAVAGE is not set 793# CONFIG_I2C_PROSAVAGE is not set
669# CONFIG_I2C_SAVAGE4 is not set 794# CONFIG_I2C_SAVAGE4 is not set
670# CONFIG_SCx200_ACB is not set 795# CONFIG_I2C_SIMTEC is not set
671# CONFIG_I2C_SIS5595 is not set 796# CONFIG_I2C_SIS5595 is not set
672# CONFIG_I2C_SIS630 is not set 797# CONFIG_I2C_SIS630 is not set
673# CONFIG_I2C_SIS96X is not set 798# CONFIG_I2C_SIS96X is not set
799# CONFIG_I2C_TAOS_EVM is not set
674# CONFIG_I2C_STUB is not set 800# CONFIG_I2C_STUB is not set
675# CONFIG_I2C_VIA is not set 801# CONFIG_I2C_VIA is not set
676# CONFIG_I2C_VIAPRO is not set 802# CONFIG_I2C_VIAPRO is not set
677# CONFIG_I2C_VOODOO3 is not set 803# CONFIG_I2C_VOODOO3 is not set
678# CONFIG_I2C_PCA_ISA is not set
679 804
680# 805#
681# Hardware Sensors Chip support 806# Miscellaneous I2C Chip support
807#
808# CONFIG_SENSORS_DS1337 is not set
809# CONFIG_SENSORS_DS1374 is not set
810# CONFIG_DS1682 is not set
811# CONFIG_SENSORS_EEPROM is not set
812# CONFIG_SENSORS_PCF8574 is not set
813# CONFIG_SENSORS_PCA9539 is not set
814# CONFIG_SENSORS_PCF8591 is not set
815# CONFIG_SENSORS_M41T00 is not set
816# CONFIG_SENSORS_MAX6875 is not set
817# CONFIG_SENSORS_TSL2550 is not set
818# CONFIG_I2C_DEBUG_CORE is not set
819# CONFIG_I2C_DEBUG_ALGO is not set
820# CONFIG_I2C_DEBUG_BUS is not set
821# CONFIG_I2C_DEBUG_CHIP is not set
822
823#
824# SPI support
682# 825#
683# CONFIG_I2C_SENSOR is not set 826# CONFIG_SPI is not set
827# CONFIG_SPI_MASTER is not set
828# CONFIG_W1 is not set
829# CONFIG_POWER_SUPPLY is not set
830CONFIG_HWMON=y
831# CONFIG_HWMON_VID is not set
832# CONFIG_SENSORS_AD7418 is not set
684# CONFIG_SENSORS_ADM1021 is not set 833# CONFIG_SENSORS_ADM1021 is not set
685# CONFIG_SENSORS_ADM1025 is not set 834# CONFIG_SENSORS_ADM1025 is not set
686# CONFIG_SENSORS_ADM1026 is not set 835# CONFIG_SENSORS_ADM1026 is not set
836# CONFIG_SENSORS_ADM1029 is not set
687# CONFIG_SENSORS_ADM1031 is not set 837# CONFIG_SENSORS_ADM1031 is not set
688# CONFIG_SENSORS_ASB100 is not set 838# CONFIG_SENSORS_ADM9240 is not set
839# CONFIG_SENSORS_ADT7470 is not set
840# CONFIG_SENSORS_ATXP1 is not set
689# CONFIG_SENSORS_DS1621 is not set 841# CONFIG_SENSORS_DS1621 is not set
690# CONFIG_SENSORS_FSCHER is not set 842# CONFIG_SENSORS_I5K_AMB is not set
691# CONFIG_SENSORS_FSCPOS is not set 843# CONFIG_SENSORS_F71805F is not set
844# CONFIG_SENSORS_F71882FG is not set
845# CONFIG_SENSORS_F75375S is not set
692# CONFIG_SENSORS_GL518SM is not set 846# CONFIG_SENSORS_GL518SM is not set
693# CONFIG_SENSORS_GL520SM is not set 847# CONFIG_SENSORS_GL520SM is not set
694# CONFIG_SENSORS_IT87 is not set 848# CONFIG_SENSORS_IT87 is not set
@@ -702,53 +856,69 @@ CONFIG_I2C_ALGOBIT=m
702# CONFIG_SENSORS_LM87 is not set 856# CONFIG_SENSORS_LM87 is not set
703# CONFIG_SENSORS_LM90 is not set 857# CONFIG_SENSORS_LM90 is not set
704# CONFIG_SENSORS_LM92 is not set 858# CONFIG_SENSORS_LM92 is not set
859# CONFIG_SENSORS_LM93 is not set
705# CONFIG_SENSORS_MAX1619 is not set 860# CONFIG_SENSORS_MAX1619 is not set
861# CONFIG_SENSORS_MAX6650 is not set
706# CONFIG_SENSORS_PC87360 is not set 862# CONFIG_SENSORS_PC87360 is not set
707# CONFIG_SENSORS_SMSC47B397 is not set 863# CONFIG_SENSORS_PC87427 is not set
708# CONFIG_SENSORS_SIS5595 is not set 864# CONFIG_SENSORS_SIS5595 is not set
865# CONFIG_SENSORS_DME1737 is not set
709# CONFIG_SENSORS_SMSC47M1 is not set 866# CONFIG_SENSORS_SMSC47M1 is not set
867# CONFIG_SENSORS_SMSC47M192 is not set
868# CONFIG_SENSORS_SMSC47B397 is not set
869# CONFIG_SENSORS_THMC50 is not set
710# CONFIG_SENSORS_VIA686A is not set 870# CONFIG_SENSORS_VIA686A is not set
871# CONFIG_SENSORS_VT1211 is not set
872# CONFIG_SENSORS_VT8231 is not set
711# CONFIG_SENSORS_W83781D is not set 873# CONFIG_SENSORS_W83781D is not set
874# CONFIG_SENSORS_W83791D is not set
875# CONFIG_SENSORS_W83792D is not set
876# CONFIG_SENSORS_W83793 is not set
712# CONFIG_SENSORS_W83L785TS is not set 877# CONFIG_SENSORS_W83L785TS is not set
713# CONFIG_SENSORS_W83627HF is not set 878# CONFIG_SENSORS_W83627HF is not set
879# CONFIG_SENSORS_W83627EHF is not set
880# CONFIG_HWMON_DEBUG_CHIP is not set
881# CONFIG_WATCHDOG is not set
714 882
715# 883#
716# Other I2C Chip support 884# Sonics Silicon Backplane
717# 885#
718# CONFIG_SENSORS_DS1337 is not set 886CONFIG_SSB_POSSIBLE=y
719# CONFIG_SENSORS_EEPROM is not set 887# CONFIG_SSB is not set
720# CONFIG_SENSORS_PCF8574 is not set
721# CONFIG_SENSORS_PCF8591 is not set
722# CONFIG_SENSORS_RTC8564 is not set
723# CONFIG_SENSORS_M41T00 is not set
724# CONFIG_I2C_DEBUG_CORE is not set
725# CONFIG_I2C_DEBUG_ALGO is not set
726# CONFIG_I2C_DEBUG_BUS is not set
727# CONFIG_I2C_DEBUG_CHIP is not set
728 888
729# 889#
730# Dallas's 1-wire bus 890# Multifunction device drivers
731#
732# CONFIG_W1 is not set
733
734#
735# Misc devices
736# 891#
892# CONFIG_MFD_SM501 is not set
737 893
738# 894#
739# Multimedia devices 895# Multimedia devices
740# 896#
741# CONFIG_VIDEO_DEV is not set 897# CONFIG_VIDEO_DEV is not set
898# CONFIG_DVB_CORE is not set
899CONFIG_DAB=y
742 900
743# 901#
744# Digital Video Broadcasting Devices 902# Graphics support
745# 903#
746# CONFIG_DVB is not set 904CONFIG_AGP=m
905CONFIG_DRM=m
906# CONFIG_DRM_TDFX is not set
907# CONFIG_DRM_R128 is not set
908# CONFIG_DRM_RADEON is not set
909# CONFIG_DRM_MGA is not set
910# CONFIG_DRM_SIS is not set
911# CONFIG_DRM_VIA is not set
912# CONFIG_DRM_SAVAGE is not set
913# CONFIG_VGASTATE is not set
914# CONFIG_VIDEO_OUTPUT_CONTROL is not set
915# CONFIG_FB is not set
916# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
747 917
748# 918#
749# Graphics support 919# Display device support
750# 920#
751# CONFIG_FB is not set 921# CONFIG_DISPLAY_SUPPORT is not set
752 922
753# 923#
754# Sound 924# Sound
@@ -764,54 +934,64 @@ CONFIG_SOUND=m
764# Open Sound System 934# Open Sound System
765# 935#
766# CONFIG_SOUND_PRIME is not set 936# CONFIG_SOUND_PRIME is not set
767 937CONFIG_HID_SUPPORT=y
768# 938CONFIG_HID=y
769# USB support 939# CONFIG_HID_DEBUG is not set
770# 940# CONFIG_HIDRAW is not set
941CONFIG_USB_SUPPORT=y
771CONFIG_USB_ARCH_HAS_HCD=y 942CONFIG_USB_ARCH_HAS_HCD=y
772CONFIG_USB_ARCH_HAS_OHCI=y 943CONFIG_USB_ARCH_HAS_OHCI=y
944CONFIG_USB_ARCH_HAS_EHCI=y
773# CONFIG_USB is not set 945# CONFIG_USB is not set
774 946
775# 947#
776# USB Gadget Support 948# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
777# 949#
778# CONFIG_USB_GADGET is not set
779 950
780# 951#
781# MMC/SD Card support 952# USB Gadget Support
782# 953#
954# CONFIG_USB_GADGET is not set
783# CONFIG_MMC is not set 955# CONFIG_MMC is not set
956# CONFIG_NEW_LEDS is not set
957# CONFIG_INFINIBAND is not set
958# CONFIG_EDAC is not set
959# CONFIG_RTC_CLASS is not set
960# CONFIG_AUXDISPLAY is not set
784 961
785# 962#
786# InfiniBand support 963# Userspace I/O
787# 964#
788# CONFIG_INFINIBAND is not set 965# CONFIG_UIO is not set
789 966
790# 967#
791# File systems 968# File systems
792# 969#
793CONFIG_EXT2_FS=y 970CONFIG_EXT2_FS=y
794# CONFIG_EXT2_FS_XATTR is not set 971# CONFIG_EXT2_FS_XATTR is not set
972# CONFIG_EXT2_FS_XIP is not set
795CONFIG_EXT3_FS=y 973CONFIG_EXT3_FS=y
796CONFIG_EXT3_FS_XATTR=y 974CONFIG_EXT3_FS_XATTR=y
797# CONFIG_EXT3_FS_POSIX_ACL is not set 975# CONFIG_EXT3_FS_POSIX_ACL is not set
798# CONFIG_EXT3_FS_SECURITY is not set 976# CONFIG_EXT3_FS_SECURITY is not set
977# CONFIG_EXT4DEV_FS is not set
799CONFIG_JBD=y 978CONFIG_JBD=y
800CONFIG_JBD_DEBUG=y
801CONFIG_FS_MBCACHE=y 979CONFIG_FS_MBCACHE=y
802# CONFIG_REISERFS_FS is not set 980# CONFIG_REISERFS_FS is not set
803# CONFIG_JFS_FS is not set 981# CONFIG_JFS_FS is not set
804 982# CONFIG_FS_POSIX_ACL is not set
805#
806# XFS support
807#
808# CONFIG_XFS_FS is not set 983# CONFIG_XFS_FS is not set
984# CONFIG_GFS2_FS is not set
985# CONFIG_OCFS2_FS is not set
809# CONFIG_MINIX_FS is not set 986# CONFIG_MINIX_FS is not set
810# CONFIG_ROMFS_FS is not set 987# CONFIG_ROMFS_FS is not set
988CONFIG_INOTIFY=y
989CONFIG_INOTIFY_USER=y
811# CONFIG_QUOTA is not set 990# CONFIG_QUOTA is not set
812CONFIG_DNOTIFY=y 991CONFIG_DNOTIFY=y
813CONFIG_AUTOFS_FS=m 992CONFIG_AUTOFS_FS=m
814CONFIG_AUTOFS4_FS=y 993CONFIG_AUTOFS4_FS=y
994# CONFIG_FUSE_FS is not set
815 995
816# 996#
817# CD-ROM/DVD Filesystems 997# CD-ROM/DVD Filesystems
@@ -837,15 +1017,12 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
837# 1017#
838CONFIG_PROC_FS=y 1018CONFIG_PROC_FS=y
839# CONFIG_PROC_KCORE is not set 1019# CONFIG_PROC_KCORE is not set
1020CONFIG_PROC_SYSCTL=y
840CONFIG_SYSFS=y 1021CONFIG_SYSFS=y
841CONFIG_DEVFS_FS=y
842# CONFIG_DEVFS_MOUNT is not set
843# CONFIG_DEVFS_DEBUG is not set
844# CONFIG_DEVPTS_FS_XATTR is not set
845CONFIG_TMPFS=y 1022CONFIG_TMPFS=y
846# CONFIG_TMPFS_XATTR is not set 1023# CONFIG_TMPFS_POSIX_ACL is not set
847# CONFIG_HUGETLB_PAGE is not set 1024# CONFIG_HUGETLB_PAGE is not set
848CONFIG_RAMFS=y 1025# CONFIG_CONFIGFS_FS is not set
849 1026
850# 1027#
851# Miscellaneous filesystems 1028# Miscellaneous filesystems
@@ -863,19 +1040,19 @@ CONFIG_CRAMFS=m
863# CONFIG_QNX4FS_FS is not set 1040# CONFIG_QNX4FS_FS is not set
864# CONFIG_SYSV_FS is not set 1041# CONFIG_SYSV_FS is not set
865# CONFIG_UFS_FS is not set 1042# CONFIG_UFS_FS is not set
866 1043CONFIG_NETWORK_FILESYSTEMS=y
867#
868# Network File Systems
869#
870CONFIG_NFS_FS=y 1044CONFIG_NFS_FS=y
871CONFIG_NFS_V3=y 1045CONFIG_NFS_V3=y
1046# CONFIG_NFS_V3_ACL is not set
872# CONFIG_NFS_V4 is not set 1047# CONFIG_NFS_V4 is not set
873# CONFIG_NFS_DIRECTIO is not set 1048# CONFIG_NFS_DIRECTIO is not set
874# CONFIG_NFSD is not set 1049# CONFIG_NFSD is not set
875CONFIG_ROOT_NFS=y 1050CONFIG_ROOT_NFS=y
876CONFIG_LOCKD=y 1051CONFIG_LOCKD=y
877CONFIG_LOCKD_V4=y 1052CONFIG_LOCKD_V4=y
1053CONFIG_NFS_COMMON=y
878CONFIG_SUNRPC=y 1054CONFIG_SUNRPC=y
1055# CONFIG_SUNRPC_BIND34 is not set
879# CONFIG_RPCSEC_GSS_KRB5 is not set 1056# CONFIG_RPCSEC_GSS_KRB5 is not set
880# CONFIG_RPCSEC_GSS_SPKM3 is not set 1057# CONFIG_RPCSEC_GSS_SPKM3 is not set
881CONFIG_SMB_FS=m 1058CONFIG_SMB_FS=m
@@ -890,10 +1067,6 @@ CONFIG_SMB_FS=m
890# 1067#
891# CONFIG_PARTITION_ADVANCED is not set 1068# CONFIG_PARTITION_ADVANCED is not set
892CONFIG_MSDOS_PARTITION=y 1069CONFIG_MSDOS_PARTITION=y
893
894#
895# Native Language Support
896#
897CONFIG_NLS=y 1070CONFIG_NLS=y
898CONFIG_NLS_DEFAULT="iso8859-1" 1071CONFIG_NLS_DEFAULT="iso8859-1"
899# CONFIG_NLS_CODEPAGE_437 is not set 1072# CONFIG_NLS_CODEPAGE_437 is not set
@@ -934,56 +1107,77 @@ CONFIG_NLS_DEFAULT="iso8859-1"
934# CONFIG_NLS_KOI8_R is not set 1107# CONFIG_NLS_KOI8_R is not set
935# CONFIG_NLS_KOI8_U is not set 1108# CONFIG_NLS_KOI8_U is not set
936# CONFIG_NLS_UTF8 is not set 1109# CONFIG_NLS_UTF8 is not set
937# CONFIG_SCC_ENET is not set 1110# CONFIG_DLM is not set
938# CONFIG_FEC_ENET is not set
939
940#
941# CPM2 Options
942#
943 1111
944# 1112#
945# Library routines 1113# Library routines
946# 1114#
1115CONFIG_BITREVERSE=y
947CONFIG_CRC_CCITT=y 1116CONFIG_CRC_CCITT=y
1117# CONFIG_CRC16 is not set
1118# CONFIG_CRC_ITU_T is not set
948CONFIG_CRC32=y 1119CONFIG_CRC32=y
1120# CONFIG_CRC7 is not set
949# CONFIG_LIBCRC32C is not set 1121# CONFIG_LIBCRC32C is not set
950CONFIG_ZLIB_INFLATE=m 1122CONFIG_ZLIB_INFLATE=m
951 1123CONFIG_PLIST=y
952# 1124CONFIG_HAS_IOMEM=y
953# Profiling support 1125CONFIG_HAS_IOPORT=y
954# 1126CONFIG_HAS_DMA=y
1127CONFIG_INSTRUMENTATION=y
955# CONFIG_PROFILING is not set 1128# CONFIG_PROFILING is not set
1129# CONFIG_KPROBES is not set
1130# CONFIG_MARKERS is not set
956 1131
957# 1132#
958# Kernel hacking 1133# Kernel hacking
959# 1134#
960# CONFIG_PRINTK_TIME is not set 1135# CONFIG_PRINTK_TIME is not set
961CONFIG_DEBUG_KERNEL=y 1136CONFIG_ENABLE_WARN_DEPRECATED=y
1137CONFIG_ENABLE_MUST_CHECK=y
962# CONFIG_MAGIC_SYSRQ is not set 1138# CONFIG_MAGIC_SYSRQ is not set
963CONFIG_LOG_BUF_SHIFT=14 1139# CONFIG_UNUSED_SYMBOLS is not set
1140# CONFIG_DEBUG_FS is not set
1141# CONFIG_HEADERS_CHECK is not set
1142CONFIG_DEBUG_KERNEL=y
1143# CONFIG_DEBUG_SHIRQ is not set
1144CONFIG_DETECT_SOFTLOCKUP=y
1145CONFIG_SCHED_DEBUG=y
964# CONFIG_SCHEDSTATS is not set 1146# CONFIG_SCHEDSTATS is not set
965# CONFIG_DEBUG_SLAB is not set 1147# CONFIG_TIMER_STATS is not set
1148# CONFIG_SLUB_DEBUG_ON is not set
1149# CONFIG_DEBUG_RT_MUTEXES is not set
1150# CONFIG_RT_MUTEX_TESTER is not set
966# CONFIG_DEBUG_SPINLOCK is not set 1151# CONFIG_DEBUG_SPINLOCK is not set
1152# CONFIG_DEBUG_MUTEXES is not set
967# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1153# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1154# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
968# CONFIG_DEBUG_KOBJECT is not set 1155# CONFIG_DEBUG_KOBJECT is not set
969# CONFIG_DEBUG_HIGHMEM is not set 1156# CONFIG_DEBUG_HIGHMEM is not set
1157# CONFIG_DEBUG_BUGVERBOSE is not set
970# CONFIG_DEBUG_INFO is not set 1158# CONFIG_DEBUG_INFO is not set
971# CONFIG_DEBUG_FS is not set 1159# CONFIG_DEBUG_VM is not set
1160# CONFIG_DEBUG_LIST is not set
1161# CONFIG_DEBUG_SG is not set
1162CONFIG_FORCED_INLINING=y
1163# CONFIG_BOOT_PRINTK_DELAY is not set
1164# CONFIG_RCU_TORTURE_TEST is not set
1165# CONFIG_FAULT_INJECTION is not set
1166# CONFIG_SAMPLES is not set
1167# CONFIG_DEBUG_STACKOVERFLOW is not set
1168# CONFIG_DEBUG_STACK_USAGE is not set
1169# CONFIG_DEBUG_PAGEALLOC is not set
1170# CONFIG_DEBUGGER is not set
972# CONFIG_KGDB_CONSOLE is not set 1171# CONFIG_KGDB_CONSOLE is not set
973# CONFIG_XMON is not set
974CONFIG_BDI_SWITCH=y 1172CONFIG_BDI_SWITCH=y
1173# CONFIG_PPC_EARLY_DEBUG is not set
975 1174
976# 1175#
977# Security options 1176# Security options
978# 1177#
979# CONFIG_KEYS is not set 1178# CONFIG_KEYS is not set
980# CONFIG_SECURITY is not set 1179# CONFIG_SECURITY is not set
981 1180# CONFIG_SECURITY_FILE_CAPABILITIES is not set
982#
983# Cryptographic options
984#
985# CONFIG_CRYPTO is not set 1181# CONFIG_CRYPTO is not set
986 1182# CONFIG_PPC_CLOCK is not set
987# 1183CONFIG_PPC_LIB_RHEAP=y
988# Hardware crypto devices
989#
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/taishan_defconfig
index 02bb7e5d8ed5..ade84b92877e 100644
--- a/arch/powerpc/configs/lite5200_defconfig
+++ b/arch/powerpc/configs/taishan_defconfig
@@ -1,25 +1,25 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:48:24 2007 4# Mon Dec 24 11:23:39 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
8# 8#
9# Processor support 9# Processor support
10# 10#
11CONFIG_6xx=y 11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set 12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set 13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set 14# CONFIG_40x is not set
15# CONFIG_44x is not set 15CONFIG_44x=y
16# CONFIG_E200 is not set 16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y 17CONFIG_4xx=y
18# CONFIG_ALTIVEC is not set 18CONFIG_BOOKE=y
19CONFIG_PPC_STD_MMU=y 19CONFIG_PTE_64BIT=y
20CONFIG_PPC_STD_MMU_32=y 20CONFIG_PHYS_64BIT=y
21# CONFIG_PPC_MM_SLICES is not set 21# CONFIG_PPC_MM_SLICES is not set
22# CONFIG_SMP is not set 22CONFIG_NOT_COHERENT_CACHE=y
23CONFIG_PPC32=y 23CONFIG_PPC32=y
24CONFIG_WORD_SIZE=32 24CONFIG_WORD_SIZE=32
25CONFIG_PPC_MERGE=y 25CONFIG_PPC_MERGE=y
@@ -43,13 +43,14 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
43CONFIG_ARCH_MAY_HAVE_PC_FDC=y 43CONFIG_ARCH_MAY_HAVE_PC_FDC=y
44CONFIG_PPC_OF=y 44CONFIG_PPC_OF=y
45CONFIG_OF=y 45CONFIG_OF=y
46# CONFIG_PPC_UDBG_16550 is not set 46CONFIG_PPC_UDBG_16550=y
47# CONFIG_GENERIC_TBSYNC is not set 47# CONFIG_GENERIC_TBSYNC is not set
48CONFIG_AUDIT_ARCH=y 48CONFIG_AUDIT_ARCH=y
49CONFIG_GENERIC_BUG=y 49CONFIG_GENERIC_BUG=y
50# CONFIG_DEFAULT_UIMAGE is not set 50# CONFIG_DEFAULT_UIMAGE is not set
51# CONFIG_PPC_DCR_NATIVE is not set 51CONFIG_PPC_DCR_NATIVE=y
52# CONFIG_PPC_DCR_MMIO is not set 52# CONFIG_PPC_DCR_MMIO is not set
53CONFIG_PPC_DCR=y
53CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
54 55
55# 56#
@@ -63,7 +64,7 @@ CONFIG_LOCALVERSION_AUTO=y
63CONFIG_SWAP=y 64CONFIG_SWAP=y
64CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
65CONFIG_SYSVIPC_SYSCTL=y 66CONFIG_SYSVIPC_SYSCTL=y
66# CONFIG_POSIX_MQUEUE is not set 67CONFIG_POSIX_MQUEUE=y
67# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
68# CONFIG_TASKSTATS is not set 69# CONFIG_TASKSTATS is not set
69# CONFIG_USER_NS is not set 70# CONFIG_USER_NS is not set
@@ -72,7 +73,9 @@ CONFIG_SYSVIPC_SYSCTL=y
72# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
73CONFIG_LOG_BUF_SHIFT=14 74CONFIG_LOG_BUF_SHIFT=14
74# CONFIG_CGROUPS is not set 75# CONFIG_CGROUPS is not set
75# CONFIG_FAIR_GROUP_SCHED is not set 76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y 79CONFIG_SYSFS_DEPRECATED=y
77# CONFIG_RELAY is not set 80# CONFIG_RELAY is not set
78CONFIG_BLK_DEV_INITRD=y 81CONFIG_BLK_DEV_INITRD=y
@@ -80,8 +83,10 @@ CONFIG_INITRAMFS_SOURCE=""
80# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
81CONFIG_SYSCTL=y 84CONFIG_SYSCTL=y
82CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
83# CONFIG_SYSCTL_SYSCALL is not set 86CONFIG_SYSCTL_SYSCALL=y
84# CONFIG_KALLSYMS is not set 87CONFIG_KALLSYMS=y
88# CONFIG_KALLSYMS_ALL is not set
89# CONFIG_KALLSYMS_EXTRA_PASS is not set
85CONFIG_HOTPLUG=y 90CONFIG_HOTPLUG=y
86CONFIG_PRINTK=y 91CONFIG_PRINTK=y
87CONFIG_BUG=y 92CONFIG_BUG=y
@@ -89,7 +94,7 @@ CONFIG_ELF_CORE=y
89CONFIG_BASE_FULL=y 94CONFIG_BASE_FULL=y
90CONFIG_FUTEX=y 95CONFIG_FUTEX=y
91CONFIG_ANON_INODES=y 96CONFIG_ANON_INODES=y
92# CONFIG_EPOLL is not set 97CONFIG_EPOLL=y
93CONFIG_SIGNALFD=y 98CONFIG_SIGNALFD=y
94CONFIG_EVENTFD=y 99CONFIG_EVENTFD=y
95CONFIG_SHMEM=y 100CONFIG_SHMEM=y
@@ -106,9 +111,9 @@ CONFIG_MODULE_UNLOAD=y
106# CONFIG_MODULE_FORCE_UNLOAD is not set 111# CONFIG_MODULE_FORCE_UNLOAD is not set
107# CONFIG_MODVERSIONS is not set 112# CONFIG_MODVERSIONS is not set
108# CONFIG_MODULE_SRCVERSION_ALL is not set 113# CONFIG_MODULE_SRCVERSION_ALL is not set
109# CONFIG_KMOD is not set 114CONFIG_KMOD=y
110CONFIG_BLOCK=y 115CONFIG_BLOCK=y
111# CONFIG_LBD is not set 116CONFIG_LBD=y
112# CONFIG_BLK_DEV_IO_TRACE is not set 117# CONFIG_BLK_DEV_IO_TRACE is not set
113# CONFIG_LSF is not set 118# CONFIG_LSF is not set
114# CONFIG_BLK_DEV_BSG is not set 119# CONFIG_BLK_DEV_BSG is not set
@@ -125,26 +130,23 @@ CONFIG_DEFAULT_AS=y
125# CONFIG_DEFAULT_CFQ is not set 130# CONFIG_DEFAULT_CFQ is not set
126# CONFIG_DEFAULT_NOOP is not set 131# CONFIG_DEFAULT_NOOP is not set
127CONFIG_DEFAULT_IOSCHED="anticipatory" 132CONFIG_DEFAULT_IOSCHED="anticipatory"
133# CONFIG_PPC4xx_PCI_EXPRESS is not set
128 134
129# 135#
130# Platform support 136# Platform support
131# 137#
132CONFIG_PPC_MULTIPLATFORM=y 138# CONFIG_PPC_MPC52xx is not set
133# CONFIG_PPC_82xx is not set 139# CONFIG_PPC_MPC5200 is not set
134# CONFIG_PPC_83xx is not set
135# CONFIG_PPC_86xx is not set
136CONFIG_CLASSIC32=y
137# CONFIG_PPC_CHRP is not set
138CONFIG_PPC_MPC52xx=y
139CONFIG_PPC_MPC5200=y
140CONFIG_PPC_MPC5200_BUGFIX=y
141# CONFIG_PPC_EFIKA is not set
142CONFIG_PPC_LITE5200=y
143# CONFIG_PPC_PMAC is not set
144# CONFIG_PPC_CELL is not set 140# CONFIG_PPC_CELL is not set
145# CONFIG_PPC_CELL_NATIVE is not set 141# CONFIG_PPC_CELL_NATIVE is not set
146# CONFIG_PQ2ADS is not set 142# CONFIG_PQ2ADS is not set
147# CONFIG_EMBEDDED6xx is not set 143# CONFIG_BAMBOO is not set
144# CONFIG_EBONY is not set
145# CONFIG_SEQUOIA is not set
146CONFIG_TAISHAN=y
147# CONFIG_KATMAI is not set
148# CONFIG_RAINIER is not set
149CONFIG_440GX=y
148# CONFIG_MPIC is not set 150# CONFIG_MPIC is not set
149# CONFIG_MPIC_WEIRD is not set 151# CONFIG_MPIC_WEIRD is not set
150# CONFIG_PPC_I8259 is not set 152# CONFIG_PPC_I8259 is not set
@@ -155,21 +157,16 @@ CONFIG_PPC_LITE5200=y
155# CONFIG_PPC_INDIRECT_IO is not set 157# CONFIG_PPC_INDIRECT_IO is not set
156# CONFIG_GENERIC_IOMAP is not set 158# CONFIG_GENERIC_IOMAP is not set
157# CONFIG_CPU_FREQ is not set 159# CONFIG_CPU_FREQ is not set
158# CONFIG_TAU is not set
159# CONFIG_CPM2 is not set 160# CONFIG_CPM2 is not set
160# CONFIG_FSL_ULI1575 is not set 161# CONFIG_FSL_ULI1575 is not set
161CONFIG_PPC_BESTCOMM=y
162CONFIG_PPC_BESTCOMM_ATA=y
163CONFIG_PPC_BESTCOMM_FEC=y
164CONFIG_PPC_BESTCOMM_GEN_BD=y
165 162
166# 163#
167# Kernel options 164# Kernel options
168# 165#
169# CONFIG_HIGHMEM is not set 166# CONFIG_HIGHMEM is not set
170CONFIG_TICK_ONESHOT=y 167# CONFIG_TICK_ONESHOT is not set
171CONFIG_NO_HZ=y 168# CONFIG_NO_HZ is not set
172CONFIG_HIGH_RES_TIMERS=y 169# CONFIG_HIGH_RES_TIMERS is not set
173CONFIG_GENERIC_CLOCKEVENTS_BUILD=y 170CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
174# CONFIG_HZ_100 is not set 171# CONFIG_HZ_100 is not set
175CONFIG_HZ_250=y 172CONFIG_HZ_250=y
@@ -181,8 +178,8 @@ CONFIG_PREEMPT_NONE=y
181# CONFIG_PREEMPT is not set 178# CONFIG_PREEMPT is not set
182CONFIG_BINFMT_ELF=y 179CONFIG_BINFMT_ELF=y
183# CONFIG_BINFMT_MISC is not set 180# CONFIG_BINFMT_MISC is not set
181# CONFIG_MATH_EMULATION is not set
184CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
185# CONFIG_KEXEC is not set
186CONFIG_ARCH_FLATMEM_ENABLE=y 183CONFIG_ARCH_FLATMEM_ENABLE=y
187CONFIG_ARCH_POPULATES_NODE_MAP=y 184CONFIG_ARCH_POPULATES_NODE_MAP=y
188CONFIG_SELECT_MEMORY_MODEL=y 185CONFIG_SELECT_MEMORY_MODEL=y
@@ -194,32 +191,23 @@ CONFIG_FLAT_NODE_MEM_MAP=y
194# CONFIG_SPARSEMEM_STATIC is not set 191# CONFIG_SPARSEMEM_STATIC is not set
195# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set 192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
196CONFIG_SPLIT_PTLOCK_CPUS=4 193CONFIG_SPLIT_PTLOCK_CPUS=4
197# CONFIG_RESOURCES_64BIT is not set 194CONFIG_RESOURCES_64BIT=y
198CONFIG_ZONE_DMA_FLAG=1 195CONFIG_ZONE_DMA_FLAG=1
199CONFIG_BOUNCE=y 196CONFIG_BOUNCE=y
200CONFIG_VIRT_TO_BUS=y 197CONFIG_VIRT_TO_BUS=y
201CONFIG_PROC_DEVICETREE=y 198CONFIG_PROC_DEVICETREE=y
202# CONFIG_CMDLINE_BOOL is not set 199CONFIG_CMDLINE_BOOL=y
203CONFIG_PM=y 200CONFIG_CMDLINE=""
204# CONFIG_PM_LEGACY is not set
205# CONFIG_PM_DEBUG is not set
206CONFIG_PM_SLEEP=y
207CONFIG_SUSPEND_UP_POSSIBLE=y
208CONFIG_SUSPEND=y
209CONFIG_HIBERNATION_UP_POSSIBLE=y
210# CONFIG_HIBERNATION is not set
211CONFIG_SECCOMP=y 201CONFIG_SECCOMP=y
212CONFIG_WANT_DEVICE_TREE=y 202CONFIG_WANT_DEVICE_TREE=y
213CONFIG_DEVICE_TREE="" 203CONFIG_DEVICE_TREE="taishan.dts"
214CONFIG_ISA_DMA_API=y 204CONFIG_ISA_DMA_API=y
215 205
216# 206#
217# Bus options 207# Bus options
218# 208#
219CONFIG_ZONE_DMA=y 209CONFIG_ZONE_DMA=y
220CONFIG_GENERIC_ISA_DMA=y 210CONFIG_PPC_INDIRECT_PCI=y
221# CONFIG_PPC_INDIRECT_PCI is not set
222CONFIG_FSL_SOC=y
223CONFIG_PCI=y 211CONFIG_PCI=y
224CONFIG_PCI_DOMAINS=y 212CONFIG_PCI_DOMAINS=y
225CONFIG_PCI_SYSCALL=y 213CONFIG_PCI_SYSCALL=y
@@ -243,7 +231,9 @@ CONFIG_HIGHMEM_START=0xfe000000
243CONFIG_LOWMEM_SIZE=0x30000000 231CONFIG_LOWMEM_SIZE=0x30000000
244CONFIG_KERNEL_START=0xc0000000 232CONFIG_KERNEL_START=0xc0000000
245CONFIG_TASK_SIZE=0xc0000000 233CONFIG_TASK_SIZE=0xc0000000
246CONFIG_BOOT_LOAD=0x00800000 234CONFIG_CONSISTENT_START=0xff100000
235CONFIG_CONSISTENT_SIZE=0x00200000
236CONFIG_BOOT_LOAD=0x01000000
247 237
248# 238#
249# Networking 239# Networking
@@ -256,13 +246,9 @@ CONFIG_NET=y
256CONFIG_PACKET=y 246CONFIG_PACKET=y
257# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
258CONFIG_UNIX=y 248CONFIG_UNIX=y
259CONFIG_XFRM=y
260CONFIG_XFRM_USER=m
261# CONFIG_XFRM_SUB_POLICY is not set
262# CONFIG_XFRM_MIGRATE is not set
263# CONFIG_NET_KEY is not set 249# CONFIG_NET_KEY is not set
264CONFIG_INET=y 250CONFIG_INET=y
265CONFIG_IP_MULTICAST=y 251# CONFIG_IP_MULTICAST is not set
266# CONFIG_IP_ADVANCED_ROUTER is not set 252# CONFIG_IP_ADVANCED_ROUTER is not set
267CONFIG_IP_FIB_HASH=y 253CONFIG_IP_FIB_HASH=y
268CONFIG_IP_PNP=y 254CONFIG_IP_PNP=y
@@ -271,17 +257,16 @@ CONFIG_IP_PNP_BOOTP=y
271# CONFIG_IP_PNP_RARP is not set 257# CONFIG_IP_PNP_RARP is not set
272# CONFIG_NET_IPIP is not set 258# CONFIG_NET_IPIP is not set
273# CONFIG_NET_IPGRE is not set 259# CONFIG_NET_IPGRE is not set
274# CONFIG_IP_MROUTE is not set
275# CONFIG_ARPD is not set 260# CONFIG_ARPD is not set
276CONFIG_SYN_COOKIES=y 261# CONFIG_SYN_COOKIES is not set
277# CONFIG_INET_AH is not set 262# CONFIG_INET_AH is not set
278# CONFIG_INET_ESP is not set 263# CONFIG_INET_ESP is not set
279# CONFIG_INET_IPCOMP is not set 264# CONFIG_INET_IPCOMP is not set
280# CONFIG_INET_XFRM_TUNNEL is not set 265# CONFIG_INET_XFRM_TUNNEL is not set
281# CONFIG_INET_TUNNEL is not set 266# CONFIG_INET_TUNNEL is not set
282CONFIG_INET_XFRM_MODE_TRANSPORT=y 267# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
283CONFIG_INET_XFRM_MODE_TUNNEL=y 268# CONFIG_INET_XFRM_MODE_TUNNEL is not set
284CONFIG_INET_XFRM_MODE_BEET=y 269# CONFIG_INET_XFRM_MODE_BEET is not set
285# CONFIG_INET_LRO is not set 270# CONFIG_INET_LRO is not set
286CONFIG_INET_DIAG=y 271CONFIG_INET_DIAG=y
287CONFIG_INET_TCP_DIAG=y 272CONFIG_INET_TCP_DIAG=y
@@ -339,11 +324,12 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
339CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 324CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
340CONFIG_STANDALONE=y 325CONFIG_STANDALONE=y
341CONFIG_PREVENT_FIRMWARE_BUILD=y 326CONFIG_PREVENT_FIRMWARE_BUILD=y
342# CONFIG_FW_LOADER is not set 327CONFIG_FW_LOADER=y
343# CONFIG_DEBUG_DRIVER is not set 328# CONFIG_DEBUG_DRIVER is not set
344# CONFIG_DEBUG_DEVRES is not set 329# CONFIG_DEBUG_DEVRES is not set
345# CONFIG_SYS_HYPERVISOR is not set 330# CONFIG_SYS_HYPERVISOR is not set
346# CONFIG_CONNECTOR is not set 331CONFIG_CONNECTOR=y
332CONFIG_PROC_EVENTS=y
347# CONFIG_MTD is not set 333# CONFIG_MTD is not set
348CONFIG_OF_DEVICE=y 334CONFIG_OF_DEVICE=y
349# CONFIG_PARPORT is not set 335# CONFIG_PARPORT is not set
@@ -354,16 +340,16 @@ CONFIG_BLK_DEV=y
354# CONFIG_BLK_DEV_DAC960 is not set 340# CONFIG_BLK_DEV_DAC960 is not set
355# CONFIG_BLK_DEV_UMEM is not set 341# CONFIG_BLK_DEV_UMEM is not set
356# CONFIG_BLK_DEV_COW_COMMON is not set 342# CONFIG_BLK_DEV_COW_COMMON is not set
357CONFIG_BLK_DEV_LOOP=y 343# CONFIG_BLK_DEV_LOOP is not set
358# CONFIG_BLK_DEV_CRYPTOLOOP is not set
359# CONFIG_BLK_DEV_NBD is not set 344# CONFIG_BLK_DEV_NBD is not set
360# CONFIG_BLK_DEV_SX8 is not set 345# CONFIG_BLK_DEV_SX8 is not set
361CONFIG_BLK_DEV_RAM=y 346CONFIG_BLK_DEV_RAM=y
362CONFIG_BLK_DEV_RAM_COUNT=16 347CONFIG_BLK_DEV_RAM_COUNT=16
363CONFIG_BLK_DEV_RAM_SIZE=32768 348CONFIG_BLK_DEV_RAM_SIZE=35000
364CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 349CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
365# CONFIG_CDROM_PKTCDVD is not set 350# CONFIG_CDROM_PKTCDVD is not set
366# CONFIG_ATA_OVER_ETH is not set 351# CONFIG_ATA_OVER_ETH is not set
352# CONFIG_XILINX_SYSACE is not set
367CONFIG_MISC_DEVICES=y 353CONFIG_MISC_DEVICES=y
368# CONFIG_PHANTOM is not set 354# CONFIG_PHANTOM is not set
369# CONFIG_EEPROM_93CX6 is not set 355# CONFIG_EEPROM_93CX6 is not set
@@ -375,133 +361,10 @@ CONFIG_MISC_DEVICES=y
375# SCSI device support 361# SCSI device support
376# 362#
377# CONFIG_RAID_ATTRS is not set 363# CONFIG_RAID_ATTRS is not set
378CONFIG_SCSI=y 364# CONFIG_SCSI is not set
379CONFIG_SCSI_DMA=y 365# CONFIG_SCSI_DMA is not set
380# CONFIG_SCSI_TGT is not set
381# CONFIG_SCSI_NETLINK is not set 366# CONFIG_SCSI_NETLINK is not set
382# CONFIG_SCSI_PROC_FS is not set 367# CONFIG_ATA is not set
383
384#
385# SCSI support type (disk, tape, CD-ROM)
386#
387# CONFIG_BLK_DEV_SD is not set
388# CONFIG_CHR_DEV_ST is not set
389# CONFIG_CHR_DEV_OSST is not set
390# CONFIG_BLK_DEV_SR is not set
391# CONFIG_CHR_DEV_SG is not set
392# CONFIG_CHR_DEV_SCH is not set
393
394#
395# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
396#
397# CONFIG_SCSI_MULTI_LUN is not set
398# CONFIG_SCSI_CONSTANTS is not set
399# CONFIG_SCSI_LOGGING is not set
400# CONFIG_SCSI_SCAN_ASYNC is not set
401CONFIG_SCSI_WAIT_SCAN=m
402
403#
404# SCSI Transports
405#
406# CONFIG_SCSI_SPI_ATTRS is not set
407# CONFIG_SCSI_FC_ATTRS is not set
408# CONFIG_SCSI_ISCSI_ATTRS is not set
409# CONFIG_SCSI_SAS_LIBSAS is not set
410# CONFIG_SCSI_SRP_ATTRS is not set
411CONFIG_SCSI_LOWLEVEL=y
412# CONFIG_ISCSI_TCP is not set
413# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
414# CONFIG_SCSI_3W_9XXX is not set
415# CONFIG_SCSI_ACARD is not set
416# CONFIG_SCSI_AACRAID is not set
417# CONFIG_SCSI_AIC7XXX is not set
418# CONFIG_SCSI_AIC7XXX_OLD is not set
419# CONFIG_SCSI_AIC79XX is not set
420# CONFIG_SCSI_AIC94XX is not set
421# CONFIG_SCSI_DPT_I2O is not set
422# CONFIG_SCSI_ADVANSYS is not set
423# CONFIG_SCSI_ARCMSR is not set
424# CONFIG_MEGARAID_NEWGEN is not set
425# CONFIG_MEGARAID_LEGACY is not set
426# CONFIG_MEGARAID_SAS is not set
427# CONFIG_SCSI_HPTIOP is not set
428# CONFIG_SCSI_BUSLOGIC is not set
429# CONFIG_SCSI_DMX3191D is not set
430# CONFIG_SCSI_EATA is not set
431# CONFIG_SCSI_FUTURE_DOMAIN is not set
432# CONFIG_SCSI_GDTH is not set
433# CONFIG_SCSI_IPS is not set
434# CONFIG_SCSI_INITIO is not set
435# CONFIG_SCSI_INIA100 is not set
436# CONFIG_SCSI_STEX is not set
437# CONFIG_SCSI_SYM53C8XX_2 is not set
438# CONFIG_SCSI_IPR is not set
439# CONFIG_SCSI_QLOGIC_1280 is not set
440# CONFIG_SCSI_QLA_FC is not set
441# CONFIG_SCSI_QLA_ISCSI is not set
442# CONFIG_SCSI_LPFC is not set
443# CONFIG_SCSI_DC395x is not set
444# CONFIG_SCSI_DC390T is not set
445# CONFIG_SCSI_NSP32 is not set
446# CONFIG_SCSI_DEBUG is not set
447# CONFIG_SCSI_SRP is not set
448CONFIG_ATA=y
449# CONFIG_ATA_NONSTANDARD is not set
450# CONFIG_SATA_AHCI is not set
451# CONFIG_SATA_SVW is not set
452# CONFIG_ATA_PIIX is not set
453# CONFIG_SATA_MV is not set
454# CONFIG_SATA_NV is not set
455# CONFIG_PDC_ADMA is not set
456# CONFIG_SATA_QSTOR is not set
457# CONFIG_SATA_PROMISE is not set
458# CONFIG_SATA_SX4 is not set
459# CONFIG_SATA_SIL is not set
460# CONFIG_SATA_SIL24 is not set
461# CONFIG_SATA_SIS is not set
462# CONFIG_SATA_ULI is not set
463# CONFIG_SATA_VIA is not set
464# CONFIG_SATA_VITESSE is not set
465# CONFIG_SATA_INIC162X is not set
466# CONFIG_PATA_ALI is not set
467# CONFIG_PATA_AMD is not set
468# CONFIG_PATA_ARTOP is not set
469# CONFIG_PATA_ATIIXP is not set
470# CONFIG_PATA_CMD640_PCI is not set
471# CONFIG_PATA_CMD64X is not set
472# CONFIG_PATA_CS5520 is not set
473# CONFIG_PATA_CS5530 is not set
474# CONFIG_PATA_CYPRESS is not set
475# CONFIG_PATA_EFAR is not set
476# CONFIG_ATA_GENERIC is not set
477# CONFIG_PATA_HPT366 is not set
478# CONFIG_PATA_HPT37X is not set
479# CONFIG_PATA_HPT3X2N is not set
480# CONFIG_PATA_HPT3X3 is not set
481# CONFIG_PATA_IT821X is not set
482# CONFIG_PATA_IT8213 is not set
483# CONFIG_PATA_JMICRON is not set
484# CONFIG_PATA_TRIFLEX is not set
485# CONFIG_PATA_MARVELL is not set
486CONFIG_PATA_MPC52xx=y
487# CONFIG_PATA_MPIIX is not set
488# CONFIG_PATA_OLDPIIX is not set
489# CONFIG_PATA_NETCELL is not set
490# CONFIG_PATA_NS87410 is not set
491# CONFIG_PATA_NS87415 is not set
492# CONFIG_PATA_OPTI is not set
493# CONFIG_PATA_OPTIDMA is not set
494# CONFIG_PATA_PDC_OLD is not set
495# CONFIG_PATA_RADISYS is not set
496# CONFIG_PATA_RZ1000 is not set
497# CONFIG_PATA_SC1200 is not set
498# CONFIG_PATA_SERVERWORKS is not set
499# CONFIG_PATA_PDC2027X is not set
500# CONFIG_PATA_SIL680 is not set
501# CONFIG_PATA_SIS is not set
502# CONFIG_PATA_VIA is not set
503# CONFIG_PATA_WINBOND is not set
504# CONFIG_PATA_PLATFORM is not set
505# CONFIG_MD is not set 368# CONFIG_MD is not set
506# CONFIG_FUSION is not set 369# CONFIG_FUSION is not set
507 370
@@ -511,7 +374,9 @@ CONFIG_PATA_MPC52xx=y
511# CONFIG_FIREWIRE is not set 374# CONFIG_FIREWIRE is not set
512# CONFIG_IEEE1394 is not set 375# CONFIG_IEEE1394 is not set
513# CONFIG_I2O is not set 376# CONFIG_I2O is not set
514# CONFIG_MACINTOSH_DRIVERS is not set 377CONFIG_MACINTOSH_DRIVERS=y
378# CONFIG_MAC_EMUMOUSEBTN is not set
379# CONFIG_WINDFARM is not set
515CONFIG_NETDEVICES=y 380CONFIG_NETDEVICES=y
516# CONFIG_NETDEVICES_MULTIQUEUE is not set 381# CONFIG_NETDEVICES_MULTIQUEUE is not set
517# CONFIG_DUMMY is not set 382# CONFIG_DUMMY is not set
@@ -522,7 +387,28 @@ CONFIG_NETDEVICES=y
522# CONFIG_VETH is not set 387# CONFIG_VETH is not set
523# CONFIG_IP1000 is not set 388# CONFIG_IP1000 is not set
524# CONFIG_ARCNET is not set 389# CONFIG_ARCNET is not set
525# CONFIG_NET_ETHERNET is not set 390# CONFIG_PHYLIB is not set
391CONFIG_NET_ETHERNET=y
392# CONFIG_MII is not set
393# CONFIG_HAPPYMEAL is not set
394# CONFIG_SUNGEM is not set
395# CONFIG_CASSINI is not set
396# CONFIG_NET_VENDOR_3COM is not set
397# CONFIG_NET_TULIP is not set
398# CONFIG_HP100 is not set
399CONFIG_IBM_NEW_EMAC=y
400CONFIG_IBM_NEW_EMAC_RXB=128
401CONFIG_IBM_NEW_EMAC_TXB=64
402CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
403CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
404CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
405# CONFIG_IBM_NEW_EMAC_DEBUG is not set
406CONFIG_IBM_NEW_EMAC_ZMII=y
407CONFIG_IBM_NEW_EMAC_RGMII=y
408CONFIG_IBM_NEW_EMAC_TAH=y
409CONFIG_IBM_NEW_EMAC_EMAC4=y
410# CONFIG_NET_PCI is not set
411# CONFIG_B44 is not set
526CONFIG_NETDEV_1000=y 412CONFIG_NETDEV_1000=y
527# CONFIG_ACENIC is not set 413# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 414# CONFIG_DL2K is not set
@@ -539,7 +425,6 @@ CONFIG_NETDEV_1000=y
539# CONFIG_VIA_VELOCITY is not set 425# CONFIG_VIA_VELOCITY is not set
540# CONFIG_TIGON3 is not set 426# CONFIG_TIGON3 is not set
541# CONFIG_BNX2 is not set 427# CONFIG_BNX2 is not set
542# CONFIG_MV643XX_ETH is not set
543# CONFIG_QLA3XXX is not set 428# CONFIG_QLA3XXX is not set
544# CONFIG_ATL1 is not set 429# CONFIG_ATL1 is not set
545CONFIG_NETDEV_10000=y 430CONFIG_NETDEV_10000=y
@@ -565,7 +450,6 @@ CONFIG_NETDEV_10000=y
565# CONFIG_HIPPI is not set 450# CONFIG_HIPPI is not set
566# CONFIG_PPP is not set 451# CONFIG_PPP is not set
567# CONFIG_SLIP is not set 452# CONFIG_SLIP is not set
568# CONFIG_NET_FC is not set
569# CONFIG_SHAPER is not set 453# CONFIG_SHAPER is not set
570# CONFIG_NETCONSOLE is not set 454# CONFIG_NETCONSOLE is not set
571# CONFIG_NETPOLL is not set 455# CONFIG_NETPOLL is not set
@@ -593,7 +477,16 @@ CONFIG_NETDEV_10000=y
593# 477#
594# Serial drivers 478# Serial drivers
595# 479#
596# CONFIG_SERIAL_8250 is not set 480CONFIG_SERIAL_8250=y
481CONFIG_SERIAL_8250_CONSOLE=y
482# CONFIG_SERIAL_8250_PCI is not set
483CONFIG_SERIAL_8250_NR_UARTS=4
484CONFIG_SERIAL_8250_RUNTIME_UARTS=4
485CONFIG_SERIAL_8250_EXTENDED=y
486# CONFIG_SERIAL_8250_MANY_PORTS is not set
487CONFIG_SERIAL_8250_SHARE_IRQ=y
488# CONFIG_SERIAL_8250_DETECT_IRQ is not set
489# CONFIG_SERIAL_8250_RSA is not set
597 490
598# 491#
599# Non-8250 serial port support 492# Non-8250 serial port support
@@ -601,10 +494,8 @@ CONFIG_NETDEV_10000=y
601# CONFIG_SERIAL_UARTLITE is not set 494# CONFIG_SERIAL_UARTLITE is not set
602CONFIG_SERIAL_CORE=y 495CONFIG_SERIAL_CORE=y
603CONFIG_SERIAL_CORE_CONSOLE=y 496CONFIG_SERIAL_CORE_CONSOLE=y
604CONFIG_SERIAL_MPC52xx=y
605CONFIG_SERIAL_MPC52xx_CONSOLE=y
606CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600
607# CONFIG_SERIAL_JSM is not set 497# CONFIG_SERIAL_JSM is not set
498CONFIG_SERIAL_OF_PLATFORM=y
608CONFIG_UNIX98_PTYS=y 499CONFIG_UNIX98_PTYS=y
609CONFIG_LEGACY_PTYS=y 500CONFIG_LEGACY_PTYS=y
610CONFIG_LEGACY_PTY_COUNT=256 501CONFIG_LEGACY_PTY_COUNT=256
@@ -645,7 +536,7 @@ CONFIG_SSB_POSSIBLE=y
645# 536#
646# CONFIG_VIDEO_DEV is not set 537# CONFIG_VIDEO_DEV is not set
647# CONFIG_DVB_CORE is not set 538# CONFIG_DVB_CORE is not set
648# CONFIG_DAB is not set 539CONFIG_DAB=y
649 540
650# 541#
651# Graphics support 542# Graphics support
@@ -697,13 +588,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y
697CONFIG_EXT2_FS=y 588CONFIG_EXT2_FS=y
698# CONFIG_EXT2_FS_XATTR is not set 589# CONFIG_EXT2_FS_XATTR is not set
699# CONFIG_EXT2_FS_XIP is not set 590# CONFIG_EXT2_FS_XIP is not set
700CONFIG_EXT3_FS=y 591# CONFIG_EXT3_FS is not set
701CONFIG_EXT3_FS_XATTR=y
702# CONFIG_EXT3_FS_POSIX_ACL is not set
703# CONFIG_EXT3_FS_SECURITY is not set
704# CONFIG_EXT4DEV_FS is not set 592# CONFIG_EXT4DEV_FS is not set
705CONFIG_JBD=y
706CONFIG_FS_MBCACHE=y
707# CONFIG_REISERFS_FS is not set 593# CONFIG_REISERFS_FS is not set
708# CONFIG_JFS_FS is not set 594# CONFIG_JFS_FS is not set
709# CONFIG_FS_POSIX_ACL is not set 595# CONFIG_FS_POSIX_ACL is not set
@@ -755,15 +641,27 @@ CONFIG_TMPFS=y
755# CONFIG_BEFS_FS is not set 641# CONFIG_BEFS_FS is not set
756# CONFIG_BFS_FS is not set 642# CONFIG_BFS_FS is not set
757# CONFIG_EFS_FS is not set 643# CONFIG_EFS_FS is not set
758# CONFIG_CRAMFS is not set 644CONFIG_CRAMFS=y
759# CONFIG_VXFS_FS is not set 645# CONFIG_VXFS_FS is not set
760# CONFIG_HPFS_FS is not set 646# CONFIG_HPFS_FS is not set
761# CONFIG_QNX4FS_FS is not set 647# CONFIG_QNX4FS_FS is not set
762# CONFIG_SYSV_FS is not set 648# CONFIG_SYSV_FS is not set
763# CONFIG_UFS_FS is not set 649# CONFIG_UFS_FS is not set
764CONFIG_NETWORK_FILESYSTEMS=y 650CONFIG_NETWORK_FILESYSTEMS=y
765# CONFIG_NFS_FS is not set 651CONFIG_NFS_FS=y
652CONFIG_NFS_V3=y
653# CONFIG_NFS_V3_ACL is not set
654# CONFIG_NFS_V4 is not set
655# CONFIG_NFS_DIRECTIO is not set
766# CONFIG_NFSD is not set 656# CONFIG_NFSD is not set
657CONFIG_ROOT_NFS=y
658CONFIG_LOCKD=y
659CONFIG_LOCKD_V4=y
660CONFIG_NFS_COMMON=y
661CONFIG_SUNRPC=y
662# CONFIG_SUNRPC_BIND34 is not set
663# CONFIG_RPCSEC_GSS_KRB5 is not set
664# CONFIG_RPCSEC_GSS_SPKM3 is not set
767# CONFIG_SMB_FS is not set 665# CONFIG_SMB_FS is not set
768# CONFIG_CIFS is not set 666# CONFIG_CIFS is not set
769# CONFIG_NCP_FS is not set 667# CONFIG_NCP_FS is not set
@@ -782,25 +680,30 @@ CONFIG_MSDOS_PARTITION=y
782# 680#
783# Library routines 681# Library routines
784# 682#
683CONFIG_BITREVERSE=y
785# CONFIG_CRC_CCITT is not set 684# CONFIG_CRC_CCITT is not set
786# CONFIG_CRC16 is not set 685# CONFIG_CRC16 is not set
787# CONFIG_CRC_ITU_T is not set 686# CONFIG_CRC_ITU_T is not set
788# CONFIG_CRC32 is not set 687CONFIG_CRC32=y
789# CONFIG_CRC7 is not set 688# CONFIG_CRC7 is not set
790# CONFIG_LIBCRC32C is not set 689# CONFIG_LIBCRC32C is not set
690CONFIG_ZLIB_INFLATE=y
791CONFIG_PLIST=y 691CONFIG_PLIST=y
792CONFIG_HAS_IOMEM=y 692CONFIG_HAS_IOMEM=y
793CONFIG_HAS_IOPORT=y 693CONFIG_HAS_IOPORT=y
794CONFIG_HAS_DMA=y 694CONFIG_HAS_DMA=y
795# CONFIG_INSTRUMENTATION is not set 695CONFIG_INSTRUMENTATION=y
696# CONFIG_PROFILING is not set
697# CONFIG_KPROBES is not set
698# CONFIG_MARKERS is not set
796 699
797# 700#
798# Kernel hacking 701# Kernel hacking
799# 702#
800CONFIG_PRINTK_TIME=y 703# CONFIG_PRINTK_TIME is not set
801CONFIG_ENABLE_WARN_DEPRECATED=y 704CONFIG_ENABLE_WARN_DEPRECATED=y
802CONFIG_ENABLE_MUST_CHECK=y 705CONFIG_ENABLE_MUST_CHECK=y
803# CONFIG_MAGIC_SYSRQ is not set 706CONFIG_MAGIC_SYSRQ=y
804# CONFIG_UNUSED_SYMBOLS is not set 707# CONFIG_UNUSED_SYMBOLS is not set
805# CONFIG_DEBUG_FS is not set 708# CONFIG_DEBUG_FS is not set
806# CONFIG_HEADERS_CHECK is not set 709# CONFIG_HEADERS_CHECK is not set
@@ -819,7 +722,7 @@ CONFIG_SCHED_DEBUG=y
819# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 722# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
820# CONFIG_DEBUG_KOBJECT is not set 723# CONFIG_DEBUG_KOBJECT is not set
821# CONFIG_DEBUG_BUGVERBOSE is not set 724# CONFIG_DEBUG_BUGVERBOSE is not set
822CONFIG_DEBUG_INFO=y 725# CONFIG_DEBUG_INFO is not set
823# CONFIG_DEBUG_VM is not set 726# CONFIG_DEBUG_VM is not set
824# CONFIG_DEBUG_LIST is not set 727# CONFIG_DEBUG_LIST is not set
825# CONFIG_DEBUG_SG is not set 728# CONFIG_DEBUG_SG is not set
@@ -831,9 +734,10 @@ CONFIG_FORCED_INLINING=y
831# CONFIG_DEBUG_STACKOVERFLOW is not set 734# CONFIG_DEBUG_STACKOVERFLOW is not set
832# CONFIG_DEBUG_STACK_USAGE is not set 735# CONFIG_DEBUG_STACK_USAGE is not set
833# CONFIG_DEBUG_PAGEALLOC is not set 736# CONFIG_DEBUG_PAGEALLOC is not set
834# CONFIG_DEBUGGER is not set 737CONFIG_DEBUGGER=y
738# CONFIG_KGDB is not set
739# CONFIG_XMON is not set
835# CONFIG_BDI_SWITCH is not set 740# CONFIG_BDI_SWITCH is not set
836# CONFIG_BOOTX_TEXT is not set
837# CONFIG_PPC_EARLY_DEBUG is not set 741# CONFIG_PPC_EARLY_DEBUG is not set
838 742
839# 743#
@@ -842,6 +746,45 @@ CONFIG_FORCED_INLINING=y
842# CONFIG_KEYS is not set 746# CONFIG_KEYS is not set
843# CONFIG_SECURITY is not set 747# CONFIG_SECURITY is not set
844# CONFIG_SECURITY_FILE_CAPABILITIES is not set 748# CONFIG_SECURITY_FILE_CAPABILITIES is not set
845# CONFIG_CRYPTO is not set 749CONFIG_CRYPTO=y
846CONFIG_PPC_CLOCK=y 750CONFIG_CRYPTO_ALGAPI=y
847CONFIG_PPC_LIB_RHEAP=y 751CONFIG_CRYPTO_BLKCIPHER=y
752CONFIG_CRYPTO_MANAGER=y
753# CONFIG_CRYPTO_HMAC is not set
754# CONFIG_CRYPTO_XCBC is not set
755# CONFIG_CRYPTO_NULL is not set
756# CONFIG_CRYPTO_MD4 is not set
757CONFIG_CRYPTO_MD5=y
758# CONFIG_CRYPTO_SHA1 is not set
759# CONFIG_CRYPTO_SHA256 is not set
760# CONFIG_CRYPTO_SHA512 is not set
761# CONFIG_CRYPTO_WP512 is not set
762# CONFIG_CRYPTO_TGR192 is not set
763# CONFIG_CRYPTO_GF128MUL is not set
764CONFIG_CRYPTO_ECB=y
765CONFIG_CRYPTO_CBC=y
766CONFIG_CRYPTO_PCBC=y
767# CONFIG_CRYPTO_LRW is not set
768# CONFIG_CRYPTO_XTS is not set
769# CONFIG_CRYPTO_CRYPTD is not set
770CONFIG_CRYPTO_DES=y
771# CONFIG_CRYPTO_FCRYPT is not set
772# CONFIG_CRYPTO_BLOWFISH is not set
773# CONFIG_CRYPTO_TWOFISH is not set
774# CONFIG_CRYPTO_SERPENT is not set
775# CONFIG_CRYPTO_AES is not set
776# CONFIG_CRYPTO_CAST5 is not set
777# CONFIG_CRYPTO_CAST6 is not set
778# CONFIG_CRYPTO_TEA is not set
779# CONFIG_CRYPTO_ARC4 is not set
780# CONFIG_CRYPTO_KHAZAD is not set
781# CONFIG_CRYPTO_ANUBIS is not set
782# CONFIG_CRYPTO_SEED is not set
783# CONFIG_CRYPTO_DEFLATE is not set
784# CONFIG_CRYPTO_MICHAEL_MIC is not set
785# CONFIG_CRYPTO_CRC32C is not set
786# CONFIG_CRYPTO_CAMELLIA is not set
787# CONFIG_CRYPTO_TEST is not set
788# CONFIG_CRYPTO_AUTHENC is not set
789CONFIG_CRYPTO_HW=y
790# CONFIG_PPC_CLOCK is not set
diff --git a/arch/ppc/configs/TQM8540_defconfig b/arch/powerpc/configs/tqm8540_defconfig
index f33f0e772dcb..732de34cfc27 100644
--- a/arch/ppc/configs/TQM8540_defconfig
+++ b/arch/powerpc/configs/tqm8540_defconfig
@@ -1,66 +1,116 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc2 3# Linux kernel version: 2.6.24-rc8
4# Fri Nov 25 17:26:50 2005 4# Fri Jan 25 01:32:05 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
10CONFIG_PPC=y 40CONFIG_PPC=y
11CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
12CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 63CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 64CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
33CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
34# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
35# CONFIG_HOTPLUG is not set
36CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
38CONFIG_INITRAMFS_SOURCE="" 82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
40# CONFIG_KALLSYMS is not set 87# CONFIG_KALLSYMS is not set
88# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 89CONFIG_PRINTK=y
42CONFIG_BUG=y 90CONFIG_BUG=y
91CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 92CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 93CONFIG_FUTEX=y
94CONFIG_ANON_INODES=y
45# CONFIG_EPOLL is not set 95# CONFIG_EPOLL is not set
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 96CONFIG_SIGNALFD=y
97CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 98CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 99CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 100CONFIG_SLUB_DEBUG=y
50CONFIG_CC_ALIGN_LOOPS=0 101# CONFIG_SLAB is not set
51CONFIG_CC_ALIGN_JUMPS=0 102CONFIG_SLUB=y
103# CONFIG_SLOB is not set
104CONFIG_SLABINFO=y
105CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58# CONFIG_MODULES is not set 108# CONFIG_MODULES is not set
59 109CONFIG_BLOCK=y
60#
61# Block layer
62#
63# CONFIG_LBD is not set 110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113# CONFIG_BLK_DEV_BSG is not set
64 114
65# 115#
66# IO Schedulers 116# IO Schedulers
@@ -76,54 +126,62 @@ CONFIG_DEFAULT_AS=y
76CONFIG_DEFAULT_IOSCHED="anticipatory" 126CONFIG_DEFAULT_IOSCHED="anticipatory"
77 127
78# 128#
79# Processor 129# Platform support
80#
81# CONFIG_6xx is not set
82# CONFIG_40x is not set
83# CONFIG_44x is not set
84# CONFIG_POWER3 is not set
85# CONFIG_POWER4 is not set
86# CONFIG_8xx is not set
87# CONFIG_E200 is not set
88CONFIG_E500=y
89CONFIG_BOOKE=y
90CONFIG_FSL_BOOKE=y
91# CONFIG_PHYS_64BIT is not set
92CONFIG_SPE=y
93CONFIG_MATH_EMULATION=y
94# CONFIG_KEXEC is not set
95# CONFIG_CPU_FREQ is not set
96# CONFIG_WANT_EARLY_SERIAL is not set
97CONFIG_PPC_GEN550=y
98CONFIG_85xx=y
99CONFIG_PPC_INDIRECT_PCI_BE=y
100
101#
102# Freescale 85xx options
103# 130#
131# CONFIG_PPC_MPC52xx is not set
132# CONFIG_PPC_MPC5200 is not set
133# CONFIG_PPC_CELL is not set
134# CONFIG_PPC_CELL_NATIVE is not set
135# CONFIG_PQ2ADS is not set
104# CONFIG_MPC8540_ADS is not set 136# CONFIG_MPC8540_ADS is not set
105# CONFIG_MPC8548_CDS is not set
106# CONFIG_MPC8555_CDS is not set
107# CONFIG_MPC8560_ADS is not set 137# CONFIG_MPC8560_ADS is not set
108# CONFIG_SBC8560 is not set 138# CONFIG_MPC85xx_CDS is not set
139# CONFIG_MPC85xx_MDS is not set
140# CONFIG_MPC85xx_DS is not set
109# CONFIG_STX_GP3 is not set 141# CONFIG_STX_GP3 is not set
110CONFIG_TQM8540=y 142CONFIG_TQM8540=y
111# CONFIG_TQM8541 is not set 143# CONFIG_TQM8541 is not set
112# CONFIG_TQM8555 is not set 144# CONFIG_TQM8555 is not set
113# CONFIG_TQM8560 is not set 145# CONFIG_TQM8560 is not set
114CONFIG_MPC8540=y 146CONFIG_TQM85xx=y
147CONFIG_MPC85xx=y
148# CONFIG_IPIC is not set
149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159# CONFIG_CPM2 is not set
160CONFIG_PPC_CPM_NEW_BINDING=y
161# CONFIG_FSL_ULI1575 is not set
115 162
116# 163#
117# Platform options 164# Kernel options
118# 165#
119# CONFIG_HIGHMEM is not set 166# CONFIG_HIGHMEM is not set
167# CONFIG_TICK_ONESHOT is not set
168# CONFIG_NO_HZ is not set
169# CONFIG_HIGH_RES_TIMERS is not set
170CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
120# CONFIG_HZ_100 is not set 171# CONFIG_HZ_100 is not set
121CONFIG_HZ_250=y 172CONFIG_HZ_250=y
173# CONFIG_HZ_300 is not set
122# CONFIG_HZ_1000 is not set 174# CONFIG_HZ_1000 is not set
123CONFIG_HZ=250 175CONFIG_HZ=250
124CONFIG_PREEMPT_NONE=y 176CONFIG_PREEMPT_NONE=y
125# CONFIG_PREEMPT_VOLUNTARY is not set 177# CONFIG_PREEMPT_VOLUNTARY is not set
126# CONFIG_PREEMPT is not set 178# CONFIG_PREEMPT is not set
179CONFIG_BINFMT_ELF=y
180# CONFIG_BINFMT_MISC is not set
181CONFIG_MATH_EMULATION=y
182CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
183CONFIG_ARCH_FLATMEM_ENABLE=y
184CONFIG_ARCH_POPULATES_NODE_MAP=y
127CONFIG_SELECT_MEMORY_MODEL=y 185CONFIG_SELECT_MEMORY_MODEL=y
128CONFIG_FLATMEM_MANUAL=y 186CONFIG_FLATMEM_MANUAL=y
129# CONFIG_DISCONTIGMEM_MANUAL is not set 187# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -131,29 +189,36 @@ CONFIG_FLATMEM_MANUAL=y
131CONFIG_FLATMEM=y 189CONFIG_FLATMEM=y
132CONFIG_FLAT_NODE_MEM_MAP=y 190CONFIG_FLAT_NODE_MEM_MAP=y
133# CONFIG_SPARSEMEM_STATIC is not set 191# CONFIG_SPARSEMEM_STATIC is not set
192# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
134CONFIG_SPLIT_PTLOCK_CPUS=4 193CONFIG_SPLIT_PTLOCK_CPUS=4
135CONFIG_BINFMT_ELF=y 194# CONFIG_RESOURCES_64BIT is not set
136# CONFIG_BINFMT_MISC is not set 195CONFIG_ZONE_DMA_FLAG=1
196CONFIG_BOUNCE=y
197CONFIG_VIRT_TO_BUS=y
198# CONFIG_PROC_DEVICETREE is not set
137# CONFIG_CMDLINE_BOOL is not set 199# CONFIG_CMDLINE_BOOL is not set
138# CONFIG_PM is not set 200# CONFIG_PM is not set
139# CONFIG_HIBERNATION is not set 201CONFIG_SUSPEND_UP_POSSIBLE=y
202CONFIG_HIBERNATION_UP_POSSIBLE=y
140CONFIG_SECCOMP=y 203CONFIG_SECCOMP=y
204CONFIG_WANT_DEVICE_TREE=y
205CONFIG_DEVICE_TREE="tqm8540.dts"
141CONFIG_ISA_DMA_API=y 206CONFIG_ISA_DMA_API=y
142 207
143# 208#
144# Bus options 209# Bus options
145# 210#
146CONFIG_PPC_I8259=y 211CONFIG_ZONE_DMA=y
147CONFIG_PPC_INDIRECT_PCI=y 212CONFIG_PPC_INDIRECT_PCI=y
213CONFIG_FSL_SOC=y
214CONFIG_FSL_PCI=y
148CONFIG_PCI=y 215CONFIG_PCI=y
149CONFIG_PCI_DOMAINS=y 216CONFIG_PCI_DOMAINS=y
150# CONFIG_PCI_LEGACY_PROC is not set 217CONFIG_PCI_SYSCALL=y
151 218# CONFIG_PCIEPORTBUS is not set
152# 219CONFIG_ARCH_SUPPORTS_MSI=y
153# PCCARD (PCMCIA/CardBus) support 220# CONFIG_PCI_MSI is not set
154# 221CONFIG_PCI_LEGACY=y
155# CONFIG_PCCARD is not set
156# CONFIG_RAPIDIO is not set
157 222
158# 223#
159# Advanced setup 224# Advanced setup
@@ -166,7 +231,7 @@ CONFIG_PCI_DOMAINS=y
166CONFIG_HIGHMEM_START=0xfe000000 231CONFIG_HIGHMEM_START=0xfe000000
167CONFIG_LOWMEM_SIZE=0x30000000 232CONFIG_LOWMEM_SIZE=0x30000000
168CONFIG_KERNEL_START=0xc0000000 233CONFIG_KERNEL_START=0xc0000000
169CONFIG_TASK_SIZE=0x80000000 234CONFIG_TASK_SIZE=0xc0000000
170CONFIG_BOOT_LOAD=0x00800000 235CONFIG_BOOT_LOAD=0x00800000
171 236
172# 237#
@@ -180,6 +245,10 @@ CONFIG_NET=y
180CONFIG_PACKET=y 245CONFIG_PACKET=y
181# CONFIG_PACKET_MMAP is not set 246# CONFIG_PACKET_MMAP is not set
182CONFIG_UNIX=y 247CONFIG_UNIX=y
248CONFIG_XFRM=y
249# CONFIG_XFRM_USER is not set
250# CONFIG_XFRM_SUB_POLICY is not set
251# CONFIG_XFRM_MIGRATE is not set
183# CONFIG_NET_KEY is not set 252# CONFIG_NET_KEY is not set
184CONFIG_INET=y 253CONFIG_INET=y
185CONFIG_IP_MULTICAST=y 254CONFIG_IP_MULTICAST=y
@@ -197,23 +266,26 @@ CONFIG_SYN_COOKIES=y
197# CONFIG_INET_AH is not set 266# CONFIG_INET_AH is not set
198# CONFIG_INET_ESP is not set 267# CONFIG_INET_ESP is not set
199# CONFIG_INET_IPCOMP is not set 268# CONFIG_INET_IPCOMP is not set
269# CONFIG_INET_XFRM_TUNNEL is not set
200# CONFIG_INET_TUNNEL is not set 270# CONFIG_INET_TUNNEL is not set
271CONFIG_INET_XFRM_MODE_TRANSPORT=y
272CONFIG_INET_XFRM_MODE_TUNNEL=y
273CONFIG_INET_XFRM_MODE_BEET=y
274# CONFIG_INET_LRO is not set
201CONFIG_INET_DIAG=y 275CONFIG_INET_DIAG=y
202CONFIG_INET_TCP_DIAG=y 276CONFIG_INET_TCP_DIAG=y
203# CONFIG_TCP_CONG_ADVANCED is not set 277# CONFIG_TCP_CONG_ADVANCED is not set
204CONFIG_TCP_CONG_BIC=y 278CONFIG_TCP_CONG_CUBIC=y
279CONFIG_DEFAULT_TCP_CONG="cubic"
280# CONFIG_TCP_MD5SIG is not set
205# CONFIG_IPV6 is not set 281# CONFIG_IPV6 is not set
282# CONFIG_INET6_XFRM_TUNNEL is not set
283# CONFIG_INET6_TUNNEL is not set
284# CONFIG_NETWORK_SECMARK is not set
206# CONFIG_NETFILTER is not set 285# CONFIG_NETFILTER is not set
207
208#
209# DCCP Configuration (EXPERIMENTAL)
210#
211# CONFIG_IP_DCCP is not set 286# CONFIG_IP_DCCP is not set
212
213#
214# SCTP Configuration (EXPERIMENTAL)
215#
216# CONFIG_IP_SCTP is not set 287# CONFIG_IP_SCTP is not set
288# CONFIG_TIPC is not set
217# CONFIG_ATM is not set 289# CONFIG_ATM is not set
218# CONFIG_BRIDGE is not set 290# CONFIG_BRIDGE is not set
219# CONFIG_VLAN_8021Q is not set 291# CONFIG_VLAN_8021Q is not set
@@ -223,13 +295,8 @@ CONFIG_TCP_CONG_BIC=y
223# CONFIG_ATALK is not set 295# CONFIG_ATALK is not set
224# CONFIG_X25 is not set 296# CONFIG_X25 is not set
225# CONFIG_LAPB is not set 297# CONFIG_LAPB is not set
226# CONFIG_NET_DIVERT is not set
227# CONFIG_ECONET is not set 298# CONFIG_ECONET is not set
228# CONFIG_WAN_ROUTER is not set 299# CONFIG_WAN_ROUTER is not set
229
230#
231# QoS and/or fair queueing
232#
233# CONFIG_NET_SCHED is not set 300# CONFIG_NET_SCHED is not set
234 301
235# 302#
@@ -239,7 +306,17 @@ CONFIG_TCP_CONG_BIC=y
239# CONFIG_HAMRADIO is not set 306# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 307# CONFIG_IRDA is not set
241# CONFIG_BT is not set 308# CONFIG_BT is not set
309# CONFIG_AF_RXRPC is not set
310
311#
312# Wireless
313#
314# CONFIG_CFG80211 is not set
315# CONFIG_WIRELESS_EXT is not set
316# CONFIG_MAC80211 is not set
242# CONFIG_IEEE80211 is not set 317# CONFIG_IEEE80211 is not set
318# CONFIG_RFKILL is not set
319# CONFIG_NET_9P is not set
243 320
244# 321#
245# Device Drivers 322# Device Drivers
@@ -250,16 +327,8 @@ CONFIG_TCP_CONG_BIC=y
250# 327#
251CONFIG_STANDALONE=y 328CONFIG_STANDALONE=y
252CONFIG_PREVENT_FIRMWARE_BUILD=y 329CONFIG_PREVENT_FIRMWARE_BUILD=y
253# CONFIG_FW_LOADER is not set 330# CONFIG_SYS_HYPERVISOR is not set
254
255#
256# Connector - unified userspace <-> kernelspace linker
257#
258# CONFIG_CONNECTOR is not set 331# CONFIG_CONNECTOR is not set
259
260#
261# Memory Technology Devices (MTD)
262#
263CONFIG_MTD=y 332CONFIG_MTD=y
264# CONFIG_MTD_DEBUG is not set 333# CONFIG_MTD_DEBUG is not set
265CONFIG_MTD_CONCAT=y 334CONFIG_MTD_CONCAT=y
@@ -271,11 +340,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
271# User Modules And Translation Layers 340# User Modules And Translation Layers
272# 341#
273CONFIG_MTD_CHAR=y 342CONFIG_MTD_CHAR=y
343CONFIG_MTD_BLKDEVS=y
274CONFIG_MTD_BLOCK=y 344CONFIG_MTD_BLOCK=y
275# CONFIG_FTL is not set 345# CONFIG_FTL is not set
276# CONFIG_NFTL is not set 346# CONFIG_NFTL is not set
277# CONFIG_INFTL is not set 347# CONFIG_INFTL is not set
278# CONFIG_RFD_FTL is not set 348# CONFIG_RFD_FTL is not set
349# CONFIG_SSFDC is not set
350# CONFIG_MTD_OOPS is not set
279 351
280# 352#
281# RAM/ROM/Flash chip drivers 353# RAM/ROM/Flash chip drivers
@@ -296,7 +368,6 @@ CONFIG_MTD_CFI_I2=y
296# CONFIG_MTD_CFI_I8 is not set 368# CONFIG_MTD_CFI_I8 is not set
297# CONFIG_MTD_CFI_INTELEXT is not set 369# CONFIG_MTD_CFI_INTELEXT is not set
298CONFIG_MTD_CFI_AMDSTD=y 370CONFIG_MTD_CFI_AMDSTD=y
299CONFIG_MTD_CFI_AMDSTD_RETRY=0
300# CONFIG_MTD_CFI_STAA is not set 371# CONFIG_MTD_CFI_STAA is not set
301CONFIG_MTD_CFI_UTIL=y 372CONFIG_MTD_CFI_UTIL=y
302# CONFIG_MTD_RAM is not set 373# CONFIG_MTD_RAM is not set
@@ -308,7 +379,8 @@ CONFIG_MTD_CFI_UTIL=y
308# 379#
309# CONFIG_MTD_COMPLEX_MAPPINGS is not set 380# CONFIG_MTD_COMPLEX_MAPPINGS is not set
310# CONFIG_MTD_PHYSMAP is not set 381# CONFIG_MTD_PHYSMAP is not set
311CONFIG_MTD_TQM85xx=y 382# CONFIG_MTD_PHYSMAP_OF is not set
383# CONFIG_MTD_INTEL_VR_NOR is not set
312# CONFIG_MTD_PLATRAM is not set 384# CONFIG_MTD_PLATRAM is not set
313 385
314# 386#
@@ -318,7 +390,6 @@ CONFIG_MTD_TQM85xx=y
318# CONFIG_MTD_SLRAM is not set 390# CONFIG_MTD_SLRAM is not set
319# CONFIG_MTD_PHRAM is not set 391# CONFIG_MTD_PHRAM is not set
320# CONFIG_MTD_MTDRAM is not set 392# CONFIG_MTD_MTDRAM is not set
321# CONFIG_MTD_BLKMTD is not set
322# CONFIG_MTD_BLOCK2MTD is not set 393# CONFIG_MTD_BLOCK2MTD is not set
323 394
324# 395#
@@ -327,29 +398,16 @@ CONFIG_MTD_TQM85xx=y
327# CONFIG_MTD_DOC2000 is not set 398# CONFIG_MTD_DOC2000 is not set
328# CONFIG_MTD_DOC2001 is not set 399# CONFIG_MTD_DOC2001 is not set
329# CONFIG_MTD_DOC2001PLUS is not set 400# CONFIG_MTD_DOC2001PLUS is not set
330
331#
332# NAND Flash Device Drivers
333#
334# CONFIG_MTD_NAND is not set 401# CONFIG_MTD_NAND is not set
335
336#
337# OneNAND Flash Device Drivers
338#
339# CONFIG_MTD_ONENAND is not set 402# CONFIG_MTD_ONENAND is not set
340 403
341# 404#
342# Parallel port support 405# UBI - Unsorted block images
343# 406#
407# CONFIG_MTD_UBI is not set
408CONFIG_OF_DEVICE=y
344# CONFIG_PARPORT is not set 409# CONFIG_PARPORT is not set
345 410CONFIG_BLK_DEV=y
346#
347# Plug and Play support
348#
349
350#
351# Block devices
352#
353# CONFIG_BLK_DEV_FD is not set 411# CONFIG_BLK_DEV_FD is not set
354# CONFIG_BLK_CPQ_DA is not set 412# CONFIG_BLK_CPQ_DA is not set
355# CONFIG_BLK_CPQ_CISS_DA is not set 413# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -363,14 +421,16 @@ CONFIG_BLK_DEV_LOOP=y
363CONFIG_BLK_DEV_RAM=y 421CONFIG_BLK_DEV_RAM=y
364CONFIG_BLK_DEV_RAM_COUNT=16 422CONFIG_BLK_DEV_RAM_COUNT=16
365CONFIG_BLK_DEV_RAM_SIZE=32768 423CONFIG_BLK_DEV_RAM_SIZE=32768
366CONFIG_BLK_DEV_INITRD=y 424CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
367# CONFIG_CDROM_PKTCDVD is not set 425# CONFIG_CDROM_PKTCDVD is not set
368# CONFIG_ATA_OVER_ETH is not set 426# CONFIG_ATA_OVER_ETH is not set
369 427CONFIG_MISC_DEVICES=y
370# 428# CONFIG_PHANTOM is not set
371# ATA/ATAPI/MFM/RLL support 429# CONFIG_EEPROM_93CX6 is not set
372# 430# CONFIG_SGI_IOC4 is not set
431# CONFIG_TIFM_CORE is not set
373CONFIG_IDE=y 432CONFIG_IDE=y
433CONFIG_IDE_MAX_HWIFS=4
374CONFIG_BLK_DEV_IDE=y 434CONFIG_BLK_DEV_IDE=y
375 435
376# 436#
@@ -383,21 +443,24 @@ CONFIG_BLK_DEV_IDEDISK=y
383# CONFIG_BLK_DEV_IDETAPE is not set 443# CONFIG_BLK_DEV_IDETAPE is not set
384# CONFIG_BLK_DEV_IDEFLOPPY is not set 444# CONFIG_BLK_DEV_IDEFLOPPY is not set
385# CONFIG_IDE_TASK_IOCTL is not set 445# CONFIG_IDE_TASK_IOCTL is not set
446CONFIG_IDE_PROC_FS=y
386 447
387# 448#
388# IDE chipset support/bugfixes 449# IDE chipset support/bugfixes
389# 450#
390CONFIG_IDE_GENERIC=y 451CONFIG_IDE_GENERIC=y
452# CONFIG_BLK_DEV_PLATFORM is not set
453
454#
455# PCI IDE chipsets support
456#
391CONFIG_BLK_DEV_IDEPCI=y 457CONFIG_BLK_DEV_IDEPCI=y
392CONFIG_IDEPCI_SHARE_IRQ=y 458CONFIG_IDEPCI_SHARE_IRQ=y
459CONFIG_IDEPCI_PCIBUS_ORDER=y
393# CONFIG_BLK_DEV_OFFBOARD is not set 460# CONFIG_BLK_DEV_OFFBOARD is not set
394CONFIG_BLK_DEV_GENERIC=y 461CONFIG_BLK_DEV_GENERIC=y
395# CONFIG_BLK_DEV_OPTI621 is not set 462# CONFIG_BLK_DEV_OPTI621 is not set
396# CONFIG_BLK_DEV_SL82C105 is not set
397CONFIG_BLK_DEV_IDEDMA_PCI=y 463CONFIG_BLK_DEV_IDEDMA_PCI=y
398# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
399CONFIG_IDEDMA_PCI_AUTO=y
400# CONFIG_IDEDMA_ONLYDISK is not set
401# CONFIG_BLK_DEV_AEC62XX is not set 464# CONFIG_BLK_DEV_AEC62XX is not set
402# CONFIG_BLK_DEV_ALI15X3 is not set 465# CONFIG_BLK_DEV_ALI15X3 is not set
403# CONFIG_BLK_DEV_AMD74XX is not set 466# CONFIG_BLK_DEV_AMD74XX is not set
@@ -408,21 +471,24 @@ CONFIG_IDEDMA_PCI_AUTO=y
408# CONFIG_BLK_DEV_CS5530 is not set 471# CONFIG_BLK_DEV_CS5530 is not set
409# CONFIG_BLK_DEV_HPT34X is not set 472# CONFIG_BLK_DEV_HPT34X is not set
410# CONFIG_BLK_DEV_HPT366 is not set 473# CONFIG_BLK_DEV_HPT366 is not set
474# CONFIG_BLK_DEV_JMICRON is not set
411# CONFIG_BLK_DEV_SC1200 is not set 475# CONFIG_BLK_DEV_SC1200 is not set
412# CONFIG_BLK_DEV_PIIX is not set 476# CONFIG_BLK_DEV_PIIX is not set
477# CONFIG_BLK_DEV_IT8213 is not set
413# CONFIG_BLK_DEV_IT821X is not set 478# CONFIG_BLK_DEV_IT821X is not set
414# CONFIG_BLK_DEV_NS87415 is not set 479# CONFIG_BLK_DEV_NS87415 is not set
415# CONFIG_BLK_DEV_PDC202XX_OLD is not set 480# CONFIG_BLK_DEV_PDC202XX_OLD is not set
416# CONFIG_BLK_DEV_PDC202XX_NEW is not set 481# CONFIG_BLK_DEV_PDC202XX_NEW is not set
417# CONFIG_BLK_DEV_SVWKS is not set 482# CONFIG_BLK_DEV_SVWKS is not set
418# CONFIG_BLK_DEV_SIIMAGE is not set 483# CONFIG_BLK_DEV_SIIMAGE is not set
484# CONFIG_BLK_DEV_SL82C105 is not set
419# CONFIG_BLK_DEV_SLC90E66 is not set 485# CONFIG_BLK_DEV_SLC90E66 is not set
420# CONFIG_BLK_DEV_TRM290 is not set 486# CONFIG_BLK_DEV_TRM290 is not set
421CONFIG_BLK_DEV_VIA82CXXX=y 487CONFIG_BLK_DEV_VIA82CXXX=y
488# CONFIG_BLK_DEV_TC86C001 is not set
422# CONFIG_IDE_ARM is not set 489# CONFIG_IDE_ARM is not set
423CONFIG_BLK_DEV_IDEDMA=y 490CONFIG_BLK_DEV_IDEDMA=y
424# CONFIG_IDEDMA_IVB is not set 491CONFIG_IDE_ARCH_OBSOLETE_INIT=y
425CONFIG_IDEDMA_AUTO=y
426# CONFIG_BLK_DEV_HD is not set 492# CONFIG_BLK_DEV_HD is not set
427 493
428# 494#
@@ -430,49 +496,28 @@ CONFIG_IDEDMA_AUTO=y
430# 496#
431# CONFIG_RAID_ATTRS is not set 497# CONFIG_RAID_ATTRS is not set
432# CONFIG_SCSI is not set 498# CONFIG_SCSI is not set
433 499# CONFIG_SCSI_DMA is not set
434# 500# CONFIG_SCSI_NETLINK is not set
435# Multi-device support (RAID and LVM) 501# CONFIG_ATA is not set
436#
437# CONFIG_MD is not set 502# CONFIG_MD is not set
438
439#
440# Fusion MPT device support
441#
442# CONFIG_FUSION is not set 503# CONFIG_FUSION is not set
443 504
444# 505#
445# IEEE 1394 (FireWire) support 506# IEEE 1394 (FireWire) support
446# 507#
508# CONFIG_FIREWIRE is not set
447# CONFIG_IEEE1394 is not set 509# CONFIG_IEEE1394 is not set
448
449#
450# I2O device support
451#
452# CONFIG_I2O is not set 510# CONFIG_I2O is not set
453 511# CONFIG_MACINTOSH_DRIVERS is not set
454#
455# Macintosh device drivers
456#
457# CONFIG_WINDFARM is not set
458
459#
460# Network device support
461#
462CONFIG_NETDEVICES=y 512CONFIG_NETDEVICES=y
513# CONFIG_NETDEVICES_MULTIQUEUE is not set
463# CONFIG_DUMMY is not set 514# CONFIG_DUMMY is not set
464# CONFIG_BONDING is not set 515# CONFIG_BONDING is not set
516# CONFIG_MACVLAN is not set
465# CONFIG_EQUALIZER is not set 517# CONFIG_EQUALIZER is not set
466# CONFIG_TUN is not set 518# CONFIG_TUN is not set
467 519# CONFIG_VETH is not set
468#
469# ARCnet devices
470#
471# CONFIG_ARCNET is not set 520# CONFIG_ARCNET is not set
472
473#
474# PHY device support
475#
476CONFIG_PHYLIB=y 521CONFIG_PHYLIB=y
477 522
478# 523#
@@ -483,29 +528,30 @@ CONFIG_PHYLIB=y
483# CONFIG_QSEMI_PHY is not set 528# CONFIG_QSEMI_PHY is not set
484# CONFIG_LXT_PHY is not set 529# CONFIG_LXT_PHY is not set
485# CONFIG_CICADA_PHY is not set 530# CONFIG_CICADA_PHY is not set
486 531# CONFIG_VITESSE_PHY is not set
487# 532# CONFIG_SMSC_PHY is not set
488# Ethernet (10 or 100Mbit) 533# CONFIG_BROADCOM_PHY is not set
489# 534# CONFIG_ICPLUS_PHY is not set
535# CONFIG_FIXED_PHY is not set
536# CONFIG_MDIO_BITBANG is not set
490CONFIG_NET_ETHERNET=y 537CONFIG_NET_ETHERNET=y
491CONFIG_MII=y 538CONFIG_MII=y
492# CONFIG_HAPPYMEAL is not set 539# CONFIG_HAPPYMEAL is not set
493# CONFIG_SUNGEM is not set 540# CONFIG_SUNGEM is not set
494# CONFIG_CASSINI is not set 541# CONFIG_CASSINI is not set
495# CONFIG_NET_VENDOR_3COM is not set 542# CONFIG_NET_VENDOR_3COM is not set
496
497#
498# Tulip family network device support
499#
500# CONFIG_NET_TULIP is not set 543# CONFIG_NET_TULIP is not set
501# CONFIG_HP100 is not set 544# CONFIG_HP100 is not set
545# CONFIG_IBM_NEW_EMAC_ZMII is not set
546# CONFIG_IBM_NEW_EMAC_RGMII is not set
547# CONFIG_IBM_NEW_EMAC_TAH is not set
548# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
502CONFIG_NET_PCI=y 549CONFIG_NET_PCI=y
503# CONFIG_PCNET32 is not set 550# CONFIG_PCNET32 is not set
504# CONFIG_AMD8111_ETH is not set 551# CONFIG_AMD8111_ETH is not set
505# CONFIG_ADAPTEC_STARFIRE is not set 552# CONFIG_ADAPTEC_STARFIRE is not set
506# CONFIG_B44 is not set 553# CONFIG_B44 is not set
507# CONFIG_FORCEDETH is not set 554# CONFIG_FORCEDETH is not set
508# CONFIG_DGRS is not set
509# CONFIG_EEPRO100 is not set 555# CONFIG_EEPRO100 is not set
510CONFIG_E100=y 556CONFIG_E100=y
511# CONFIG_FEALNX is not set 557# CONFIG_FEALNX is not set
@@ -518,46 +564,46 @@ CONFIG_E100=y
518# CONFIG_SUNDANCE is not set 564# CONFIG_SUNDANCE is not set
519# CONFIG_TLAN is not set 565# CONFIG_TLAN is not set
520# CONFIG_VIA_RHINE is not set 566# CONFIG_VIA_RHINE is not set
521 567# CONFIG_SC92031 is not set
522# 568CONFIG_NETDEV_1000=y
523# Ethernet (1000 Mbit)
524#
525# CONFIG_ACENIC is not set 569# CONFIG_ACENIC is not set
526# CONFIG_DL2K is not set 570# CONFIG_DL2K is not set
527# CONFIG_E1000 is not set 571# CONFIG_E1000 is not set
572# CONFIG_E1000E is not set
573# CONFIG_IP1000 is not set
528# CONFIG_NS83820 is not set 574# CONFIG_NS83820 is not set
529# CONFIG_HAMACHI is not set 575# CONFIG_HAMACHI is not set
530# CONFIG_YELLOWFIN is not set 576# CONFIG_YELLOWFIN is not set
531# CONFIG_R8169 is not set 577# CONFIG_R8169 is not set
532# CONFIG_SIS190 is not set 578# CONFIG_SIS190 is not set
533# CONFIG_SKGE is not set 579# CONFIG_SKGE is not set
580# CONFIG_SKY2 is not set
534# CONFIG_SK98LIN is not set 581# CONFIG_SK98LIN is not set
535# CONFIG_VIA_VELOCITY is not set 582# CONFIG_VIA_VELOCITY is not set
536# CONFIG_TIGON3 is not set 583# CONFIG_TIGON3 is not set
537# CONFIG_BNX2 is not set 584# CONFIG_BNX2 is not set
538CONFIG_GIANFAR=y 585CONFIG_GIANFAR=y
539CONFIG_GFAR_NAPI=y 586CONFIG_GFAR_NAPI=y
540 587# CONFIG_QLA3XXX is not set
541# 588# CONFIG_ATL1 is not set
542# Ethernet (10000 Mbit) 589CONFIG_NETDEV_10000=y
543#
544# CONFIG_CHELSIO_T1 is not set 590# CONFIG_CHELSIO_T1 is not set
591# CONFIG_CHELSIO_T3 is not set
592# CONFIG_IXGBE is not set
545# CONFIG_IXGB is not set 593# CONFIG_IXGB is not set
546# CONFIG_S2IO is not set 594# CONFIG_S2IO is not set
547 595# CONFIG_MYRI10GE is not set
548# 596# CONFIG_NETXEN_NIC is not set
549# Token Ring devices 597# CONFIG_NIU is not set
550# 598# CONFIG_MLX4_CORE is not set
599# CONFIG_TEHUTI is not set
551# CONFIG_TR is not set 600# CONFIG_TR is not set
552 601
553# 602#
554# Wireless LAN (non-hamradio) 603# Wireless LAN
555#
556# CONFIG_NET_RADIO is not set
557
558#
559# Wan interfaces
560# 604#
605# CONFIG_WLAN_PRE80211 is not set
606# CONFIG_WLAN_80211 is not set
561# CONFIG_WAN is not set 607# CONFIG_WAN is not set
562# CONFIG_FDDI is not set 608# CONFIG_FDDI is not set
563# CONFIG_HIPPI is not set 609# CONFIG_HIPPI is not set
@@ -567,28 +613,21 @@ CONFIG_GFAR_NAPI=y
567# CONFIG_NETCONSOLE is not set 613# CONFIG_NETCONSOLE is not set
568# CONFIG_NETPOLL is not set 614# CONFIG_NETPOLL is not set
569# CONFIG_NET_POLL_CONTROLLER is not set 615# CONFIG_NET_POLL_CONTROLLER is not set
570
571#
572# ISDN subsystem
573#
574# CONFIG_ISDN is not set 616# CONFIG_ISDN is not set
575
576#
577# Telephony Support
578#
579# CONFIG_PHONE is not set 617# CONFIG_PHONE is not set
580 618
581# 619#
582# Input device support 620# Input device support
583# 621#
584CONFIG_INPUT=y 622CONFIG_INPUT=y
623# CONFIG_INPUT_FF_MEMLESS is not set
624# CONFIG_INPUT_POLLDEV is not set
585 625
586# 626#
587# Userland interfaces 627# Userland interfaces
588# 628#
589# CONFIG_INPUT_MOUSEDEV is not set 629# CONFIG_INPUT_MOUSEDEV is not set
590# CONFIG_INPUT_JOYDEV is not set 630# CONFIG_INPUT_JOYDEV is not set
591# CONFIG_INPUT_TSDEV is not set
592# CONFIG_INPUT_EVDEV is not set 631# CONFIG_INPUT_EVDEV is not set
593# CONFIG_INPUT_EVBUG is not set 632# CONFIG_INPUT_EVBUG is not set
594 633
@@ -598,6 +637,7 @@ CONFIG_INPUT=y
598# CONFIG_INPUT_KEYBOARD is not set 637# CONFIG_INPUT_KEYBOARD is not set
599# CONFIG_INPUT_MOUSE is not set 638# CONFIG_INPUT_MOUSE is not set
600# CONFIG_INPUT_JOYSTICK is not set 639# CONFIG_INPUT_JOYSTICK is not set
640# CONFIG_INPUT_TABLET is not set
601# CONFIG_INPUT_TOUCHSCREEN is not set 641# CONFIG_INPUT_TOUCHSCREEN is not set
602# CONFIG_INPUT_MISC is not set 642# CONFIG_INPUT_MISC is not set
603 643
@@ -618,52 +658,35 @@ CONFIG_INPUT=y
618# 658#
619CONFIG_SERIAL_8250=y 659CONFIG_SERIAL_8250=y
620CONFIG_SERIAL_8250_CONSOLE=y 660CONFIG_SERIAL_8250_CONSOLE=y
661CONFIG_SERIAL_8250_PCI=y
621CONFIG_SERIAL_8250_NR_UARTS=4 662CONFIG_SERIAL_8250_NR_UARTS=4
663CONFIG_SERIAL_8250_RUNTIME_UARTS=4
622# CONFIG_SERIAL_8250_EXTENDED is not set 664# CONFIG_SERIAL_8250_EXTENDED is not set
665CONFIG_SERIAL_8250_SHARE_IRQ=y
623 666
624# 667#
625# Non-8250 serial port support 668# Non-8250 serial port support
626# 669#
670# CONFIG_SERIAL_UARTLITE is not set
627CONFIG_SERIAL_CORE=y 671CONFIG_SERIAL_CORE=y
628CONFIG_SERIAL_CORE_CONSOLE=y 672CONFIG_SERIAL_CORE_CONSOLE=y
629# CONFIG_SERIAL_JSM is not set 673# CONFIG_SERIAL_JSM is not set
674# CONFIG_SERIAL_OF_PLATFORM is not set
630CONFIG_UNIX98_PTYS=y 675CONFIG_UNIX98_PTYS=y
631CONFIG_LEGACY_PTYS=y 676CONFIG_LEGACY_PTYS=y
632CONFIG_LEGACY_PTY_COUNT=256 677CONFIG_LEGACY_PTY_COUNT=256
633
634#
635# IPMI
636#
637# CONFIG_IPMI_HANDLER is not set 678# CONFIG_IPMI_HANDLER is not set
638 679CONFIG_HW_RANDOM=y
639#
640# Watchdog Cards
641#
642# CONFIG_WATCHDOG is not set
643# CONFIG_NVRAM is not set 680# CONFIG_NVRAM is not set
644CONFIG_GEN_RTC=y 681CONFIG_GEN_RTC=y
645# CONFIG_GEN_RTC_X is not set 682# CONFIG_GEN_RTC_X is not set
646# CONFIG_DTLK is not set
647# CONFIG_R3964 is not set 683# CONFIG_R3964 is not set
648# CONFIG_APPLICOM is not set 684# CONFIG_APPLICOM is not set
649
650#
651# Ftape, the floppy tape device driver
652#
653# CONFIG_AGP is not set
654# CONFIG_DRM is not set
655# CONFIG_RAW_DRIVER is not set 685# CONFIG_RAW_DRIVER is not set
656
657#
658# TPM devices
659#
660# CONFIG_TCG_TPM is not set 686# CONFIG_TCG_TPM is not set
661# CONFIG_TELCLOCK is not set 687CONFIG_DEVPORT=y
662
663#
664# I2C support
665#
666CONFIG_I2C=y 688CONFIG_I2C=y
689CONFIG_I2C_BOARDINFO=y
667CONFIG_I2C_CHARDEV=y 690CONFIG_I2C_CHARDEV=y
668 691
669# 692#
@@ -686,56 +709,60 @@ CONFIG_I2C_CHARDEV=y
686# CONFIG_I2C_PIIX4 is not set 709# CONFIG_I2C_PIIX4 is not set
687CONFIG_I2C_MPC=y 710CONFIG_I2C_MPC=y
688# CONFIG_I2C_NFORCE2 is not set 711# CONFIG_I2C_NFORCE2 is not set
712# CONFIG_I2C_OCORES is not set
689# CONFIG_I2C_PARPORT_LIGHT is not set 713# CONFIG_I2C_PARPORT_LIGHT is not set
690# CONFIG_I2C_PROSAVAGE is not set 714# CONFIG_I2C_PROSAVAGE is not set
691# CONFIG_I2C_SAVAGE4 is not set 715# CONFIG_I2C_SAVAGE4 is not set
692# CONFIG_SCx200_ACB is not set 716# CONFIG_I2C_SIMTEC is not set
693# CONFIG_I2C_SIS5595 is not set 717# CONFIG_I2C_SIS5595 is not set
694# CONFIG_I2C_SIS630 is not set 718# CONFIG_I2C_SIS630 is not set
695# CONFIG_I2C_SIS96X is not set 719# CONFIG_I2C_SIS96X is not set
720# CONFIG_I2C_TAOS_EVM is not set
696# CONFIG_I2C_VIA is not set 721# CONFIG_I2C_VIA is not set
697# CONFIG_I2C_VIAPRO is not set 722# CONFIG_I2C_VIAPRO is not set
698# CONFIG_I2C_VOODOO3 is not set 723# CONFIG_I2C_VOODOO3 is not set
699# CONFIG_I2C_PCA_ISA is not set
700 724
701# 725#
702# Miscellaneous I2C Chip support 726# Miscellaneous I2C Chip support
703# 727#
704CONFIG_SENSORS_DS1337=y 728CONFIG_SENSORS_DS1337=y
705# CONFIG_SENSORS_DS1374 is not set 729# CONFIG_SENSORS_DS1374 is not set
730# CONFIG_DS1682 is not set
706# CONFIG_SENSORS_EEPROM is not set 731# CONFIG_SENSORS_EEPROM is not set
707# CONFIG_SENSORS_PCF8574 is not set 732# CONFIG_SENSORS_PCF8574 is not set
708# CONFIG_SENSORS_PCA9539 is not set 733# CONFIG_SENSORS_PCA9539 is not set
709# CONFIG_SENSORS_PCF8591 is not set 734# CONFIG_SENSORS_PCF8591 is not set
710# CONFIG_SENSORS_RTC8564 is not set
711# CONFIG_SENSORS_M41T00 is not set 735# CONFIG_SENSORS_M41T00 is not set
712# CONFIG_SENSORS_MAX6875 is not set 736# CONFIG_SENSORS_MAX6875 is not set
713# CONFIG_RTC_X1205_I2C is not set 737# CONFIG_SENSORS_TSL2550 is not set
714# CONFIG_I2C_DEBUG_CORE is not set 738# CONFIG_I2C_DEBUG_CORE is not set
715# CONFIG_I2C_DEBUG_ALGO is not set 739# CONFIG_I2C_DEBUG_ALGO is not set
716# CONFIG_I2C_DEBUG_BUS is not set 740# CONFIG_I2C_DEBUG_BUS is not set
717# CONFIG_I2C_DEBUG_CHIP is not set 741# CONFIG_I2C_DEBUG_CHIP is not set
718 742
719# 743#
720# Dallas's 1-wire bus 744# SPI support
721# 745#
746# CONFIG_SPI is not set
747# CONFIG_SPI_MASTER is not set
722# CONFIG_W1 is not set 748# CONFIG_W1 is not set
723 749# CONFIG_POWER_SUPPLY is not set
724#
725# Hardware Monitoring support
726#
727CONFIG_HWMON=y 750CONFIG_HWMON=y
728# CONFIG_HWMON_VID is not set 751# CONFIG_HWMON_VID is not set
752# CONFIG_SENSORS_AD7418 is not set
729# CONFIG_SENSORS_ADM1021 is not set 753# CONFIG_SENSORS_ADM1021 is not set
730# CONFIG_SENSORS_ADM1025 is not set 754# CONFIG_SENSORS_ADM1025 is not set
731# CONFIG_SENSORS_ADM1026 is not set 755# CONFIG_SENSORS_ADM1026 is not set
756# CONFIG_SENSORS_ADM1029 is not set
732# CONFIG_SENSORS_ADM1031 is not set 757# CONFIG_SENSORS_ADM1031 is not set
733# CONFIG_SENSORS_ADM9240 is not set 758# CONFIG_SENSORS_ADM9240 is not set
734# CONFIG_SENSORS_ASB100 is not set 759# CONFIG_SENSORS_ADT7470 is not set
735# CONFIG_SENSORS_ATXP1 is not set 760# CONFIG_SENSORS_ATXP1 is not set
736# CONFIG_SENSORS_DS1621 is not set 761# CONFIG_SENSORS_DS1621 is not set
737# CONFIG_SENSORS_FSCHER is not set 762# CONFIG_SENSORS_I5K_AMB is not set
738# CONFIG_SENSORS_FSCPOS is not set 763# CONFIG_SENSORS_F71805F is not set
764# CONFIG_SENSORS_F71882FG is not set
765# CONFIG_SENSORS_F75375S is not set
739# CONFIG_SENSORS_GL518SM is not set 766# CONFIG_SENSORS_GL518SM is not set
740# CONFIG_SENSORS_GL520SM is not set 767# CONFIG_SENSORS_GL520SM is not set
741# CONFIG_SENSORS_IT87 is not set 768# CONFIG_SENSORS_IT87 is not set
@@ -749,52 +776,75 @@ CONFIG_SENSORS_LM75=y
749# CONFIG_SENSORS_LM87 is not set 776# CONFIG_SENSORS_LM87 is not set
750# CONFIG_SENSORS_LM90 is not set 777# CONFIG_SENSORS_LM90 is not set
751# CONFIG_SENSORS_LM92 is not set 778# CONFIG_SENSORS_LM92 is not set
779# CONFIG_SENSORS_LM93 is not set
752# CONFIG_SENSORS_MAX1619 is not set 780# CONFIG_SENSORS_MAX1619 is not set
781# CONFIG_SENSORS_MAX6650 is not set
753# CONFIG_SENSORS_PC87360 is not set 782# CONFIG_SENSORS_PC87360 is not set
783# CONFIG_SENSORS_PC87427 is not set
754# CONFIG_SENSORS_SIS5595 is not set 784# CONFIG_SENSORS_SIS5595 is not set
785# CONFIG_SENSORS_DME1737 is not set
755# CONFIG_SENSORS_SMSC47M1 is not set 786# CONFIG_SENSORS_SMSC47M1 is not set
787# CONFIG_SENSORS_SMSC47M192 is not set
756# CONFIG_SENSORS_SMSC47B397 is not set 788# CONFIG_SENSORS_SMSC47B397 is not set
789# CONFIG_SENSORS_THMC50 is not set
757# CONFIG_SENSORS_VIA686A is not set 790# CONFIG_SENSORS_VIA686A is not set
791# CONFIG_SENSORS_VT1211 is not set
792# CONFIG_SENSORS_VT8231 is not set
758# CONFIG_SENSORS_W83781D is not set 793# CONFIG_SENSORS_W83781D is not set
794# CONFIG_SENSORS_W83791D is not set
759# CONFIG_SENSORS_W83792D is not set 795# CONFIG_SENSORS_W83792D is not set
796# CONFIG_SENSORS_W83793 is not set
760# CONFIG_SENSORS_W83L785TS is not set 797# CONFIG_SENSORS_W83L785TS is not set
761# CONFIG_SENSORS_W83627HF is not set 798# CONFIG_SENSORS_W83627HF is not set
762# CONFIG_SENSORS_W83627EHF is not set 799# CONFIG_SENSORS_W83627EHF is not set
763CONFIG_HWMON_DEBUG_CHIP=y 800CONFIG_HWMON_DEBUG_CHIP=y
801# CONFIG_WATCHDOG is not set
764 802
765# 803#
766# Misc devices 804# Sonics Silicon Backplane
767# 805#
806CONFIG_SSB_POSSIBLE=y
807# CONFIG_SSB is not set
768 808
769# 809#
770# Multimedia Capabilities Port drivers 810# Multifunction device drivers
771# 811#
812# CONFIG_MFD_SM501 is not set
772 813
773# 814#
774# Multimedia devices 815# Multimedia devices
775# 816#
776# CONFIG_VIDEO_DEV is not set 817# CONFIG_VIDEO_DEV is not set
777 818# CONFIG_DVB_CORE is not set
778# 819CONFIG_DAB=y
779# Digital Video Broadcasting Devices
780#
781# CONFIG_DVB is not set
782 820
783# 821#
784# Graphics support 822# Graphics support
785# 823#
824# CONFIG_AGP is not set
825# CONFIG_DRM is not set
826# CONFIG_VGASTATE is not set
827# CONFIG_VIDEO_OUTPUT_CONTROL is not set
786# CONFIG_FB is not set 828# CONFIG_FB is not set
829# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
787 830
788# 831#
789# Sound 832# Display device support
790# 833#
791# CONFIG_SOUND is not set 834# CONFIG_DISPLAY_SUPPORT is not set
792 835
793# 836#
794# USB support 837# Sound
795# 838#
839# CONFIG_SOUND is not set
840CONFIG_HID_SUPPORT=y
841CONFIG_HID=y
842# CONFIG_HID_DEBUG is not set
843# CONFIG_HIDRAW is not set
844CONFIG_USB_SUPPORT=y
796CONFIG_USB_ARCH_HAS_HCD=y 845CONFIG_USB_ARCH_HAS_HCD=y
797CONFIG_USB_ARCH_HAS_OHCI=y 846CONFIG_USB_ARCH_HAS_OHCI=y
847CONFIG_USB_ARCH_HAS_EHCI=y
798# CONFIG_USB is not set 848# CONFIG_USB is not set
799 849
800# 850#
@@ -805,20 +855,16 @@ CONFIG_USB_ARCH_HAS_OHCI=y
805# USB Gadget Support 855# USB Gadget Support
806# 856#
807# CONFIG_USB_GADGET is not set 857# CONFIG_USB_GADGET is not set
808
809#
810# MMC/SD Card support
811#
812# CONFIG_MMC is not set 858# CONFIG_MMC is not set
813 859# CONFIG_NEW_LEDS is not set
814#
815# InfiniBand support
816#
817# CONFIG_INFINIBAND is not set 860# CONFIG_INFINIBAND is not set
861# CONFIG_EDAC is not set
862# CONFIG_RTC_CLASS is not set
818 863
819# 864#
820# SN Devices 865# Userspace I/O
821# 866#
867# CONFIG_UIO is not set
822 868
823# 869#
824# File systems 870# File systems
@@ -830,16 +876,19 @@ CONFIG_EXT3_FS=y
830CONFIG_EXT3_FS_XATTR=y 876CONFIG_EXT3_FS_XATTR=y
831# CONFIG_EXT3_FS_POSIX_ACL is not set 877# CONFIG_EXT3_FS_POSIX_ACL is not set
832# CONFIG_EXT3_FS_SECURITY is not set 878# CONFIG_EXT3_FS_SECURITY is not set
879# CONFIG_EXT4DEV_FS is not set
833CONFIG_JBD=y 880CONFIG_JBD=y
834# CONFIG_JBD_DEBUG is not set
835CONFIG_FS_MBCACHE=y 881CONFIG_FS_MBCACHE=y
836# CONFIG_REISERFS_FS is not set 882# CONFIG_REISERFS_FS is not set
837# CONFIG_JFS_FS is not set 883# CONFIG_JFS_FS is not set
838# CONFIG_FS_POSIX_ACL is not set 884# CONFIG_FS_POSIX_ACL is not set
839# CONFIG_XFS_FS is not set 885# CONFIG_XFS_FS is not set
886# CONFIG_GFS2_FS is not set
887# CONFIG_OCFS2_FS is not set
840# CONFIG_MINIX_FS is not set 888# CONFIG_MINIX_FS is not set
841# CONFIG_ROMFS_FS is not set 889# CONFIG_ROMFS_FS is not set
842CONFIG_INOTIFY=y 890CONFIG_INOTIFY=y
891CONFIG_INOTIFY_USER=y
843# CONFIG_QUOTA is not set 892# CONFIG_QUOTA is not set
844CONFIG_DNOTIFY=y 893CONFIG_DNOTIFY=y
845# CONFIG_AUTOFS_FS is not set 894# CONFIG_AUTOFS_FS is not set
@@ -864,11 +913,12 @@ CONFIG_DNOTIFY=y
864# 913#
865CONFIG_PROC_FS=y 914CONFIG_PROC_FS=y
866CONFIG_PROC_KCORE=y 915CONFIG_PROC_KCORE=y
916CONFIG_PROC_SYSCTL=y
867CONFIG_SYSFS=y 917CONFIG_SYSFS=y
868CONFIG_TMPFS=y 918CONFIG_TMPFS=y
919# CONFIG_TMPFS_POSIX_ACL is not set
869# CONFIG_HUGETLB_PAGE is not set 920# CONFIG_HUGETLB_PAGE is not set
870CONFIG_RAMFS=y 921# CONFIG_CONFIGFS_FS is not set
871# CONFIG_RELAYFS_FS is not set
872 922
873# 923#
874# Miscellaneous filesystems 924# Miscellaneous filesystems
@@ -880,13 +930,15 @@ CONFIG_RAMFS=y
880# CONFIG_BEFS_FS is not set 930# CONFIG_BEFS_FS is not set
881# CONFIG_BFS_FS is not set 931# CONFIG_BFS_FS is not set
882# CONFIG_EFS_FS is not set 932# CONFIG_EFS_FS is not set
883# CONFIG_JFFS_FS is not set
884CONFIG_JFFS2_FS=y 933CONFIG_JFFS2_FS=y
885CONFIG_JFFS2_FS_DEBUG=0 934CONFIG_JFFS2_FS_DEBUG=0
886CONFIG_JFFS2_FS_WRITEBUFFER=y 935CONFIG_JFFS2_FS_WRITEBUFFER=y
936# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
887# CONFIG_JFFS2_SUMMARY is not set 937# CONFIG_JFFS2_SUMMARY is not set
938# CONFIG_JFFS2_FS_XATTR is not set
888# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 939# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
889CONFIG_JFFS2_ZLIB=y 940CONFIG_JFFS2_ZLIB=y
941# CONFIG_JFFS2_LZO is not set
890CONFIG_JFFS2_RTIME=y 942CONFIG_JFFS2_RTIME=y
891# CONFIG_JFFS2_RUBIN is not set 943# CONFIG_JFFS2_RUBIN is not set
892CONFIG_CRAMFS=y 944CONFIG_CRAMFS=y
@@ -895,10 +947,7 @@ CONFIG_CRAMFS=y
895# CONFIG_QNX4FS_FS is not set 947# CONFIG_QNX4FS_FS is not set
896# CONFIG_SYSV_FS is not set 948# CONFIG_SYSV_FS is not set
897# CONFIG_UFS_FS is not set 949# CONFIG_UFS_FS is not set
898 950CONFIG_NETWORK_FILESYSTEMS=y
899#
900# Network File Systems
901#
902CONFIG_NFS_FS=y 951CONFIG_NFS_FS=y
903# CONFIG_NFS_V3 is not set 952# CONFIG_NFS_V3 is not set
904# CONFIG_NFS_V4 is not set 953# CONFIG_NFS_V4 is not set
@@ -908,6 +957,7 @@ CONFIG_ROOT_NFS=y
908CONFIG_LOCKD=y 957CONFIG_LOCKD=y
909CONFIG_NFS_COMMON=y 958CONFIG_NFS_COMMON=y
910CONFIG_SUNRPC=y 959CONFIG_SUNRPC=y
960# CONFIG_SUNRPC_BIND34 is not set
911# CONFIG_RPCSEC_GSS_KRB5 is not set 961# CONFIG_RPCSEC_GSS_KRB5 is not set
912# CONFIG_RPCSEC_GSS_SPKM3 is not set 962# CONFIG_RPCSEC_GSS_SPKM3 is not set
913# CONFIG_SMB_FS is not set 963# CONFIG_SMB_FS is not set
@@ -915,7 +965,6 @@ CONFIG_SUNRPC=y
915# CONFIG_NCP_FS is not set 965# CONFIG_NCP_FS is not set
916# CONFIG_CODA_FS is not set 966# CONFIG_CODA_FS is not set
917# CONFIG_AFS_FS is not set 967# CONFIG_AFS_FS is not set
918# CONFIG_9P_FS is not set
919 968
920# 969#
921# Partition Types 970# Partition Types
@@ -931,43 +980,53 @@ CONFIG_PARTITION_ADVANCED=y
931# CONFIG_SGI_PARTITION is not set 980# CONFIG_SGI_PARTITION is not set
932# CONFIG_ULTRIX_PARTITION is not set 981# CONFIG_ULTRIX_PARTITION is not set
933# CONFIG_SUN_PARTITION is not set 982# CONFIG_SUN_PARTITION is not set
983# CONFIG_KARMA_PARTITION is not set
934# CONFIG_EFI_PARTITION is not set 984# CONFIG_EFI_PARTITION is not set
935 985# CONFIG_SYSV68_PARTITION is not set
936#
937# Native Language Support
938#
939# CONFIG_NLS is not set 986# CONFIG_NLS is not set
987# CONFIG_DLM is not set
940 988
941# 989#
942# Library routines 990# Library routines
943# 991#
992CONFIG_BITREVERSE=y
944# CONFIG_CRC_CCITT is not set 993# CONFIG_CRC_CCITT is not set
945# CONFIG_CRC16 is not set 994# CONFIG_CRC16 is not set
995# CONFIG_CRC_ITU_T is not set
946CONFIG_CRC32=y 996CONFIG_CRC32=y
997# CONFIG_CRC7 is not set
947# CONFIG_LIBCRC32C is not set 998# CONFIG_LIBCRC32C is not set
948CONFIG_ZLIB_INFLATE=y 999CONFIG_ZLIB_INFLATE=y
949CONFIG_ZLIB_DEFLATE=y 1000CONFIG_ZLIB_DEFLATE=y
1001CONFIG_PLIST=y
1002CONFIG_HAS_IOMEM=y
1003CONFIG_HAS_IOPORT=y
1004CONFIG_HAS_DMA=y
1005CONFIG_INSTRUMENTATION=y
950# CONFIG_PROFILING is not set 1006# CONFIG_PROFILING is not set
1007# CONFIG_MARKERS is not set
951 1008
952# 1009#
953# Kernel hacking 1010# Kernel hacking
954# 1011#
955# CONFIG_PRINTK_TIME is not set 1012# CONFIG_PRINTK_TIME is not set
1013CONFIG_ENABLE_WARN_DEPRECATED=y
1014CONFIG_ENABLE_MUST_CHECK=y
1015# CONFIG_MAGIC_SYSRQ is not set
1016# CONFIG_UNUSED_SYMBOLS is not set
1017# CONFIG_DEBUG_FS is not set
1018# CONFIG_HEADERS_CHECK is not set
956# CONFIG_DEBUG_KERNEL is not set 1019# CONFIG_DEBUG_KERNEL is not set
957CONFIG_LOG_BUF_SHIFT=14 1020# CONFIG_SLUB_DEBUG_ON is not set
958# CONFIG_SERIAL_TEXT_DEBUG is not set 1021# CONFIG_DEBUG_BUGVERBOSE is not set
1022# CONFIG_SAMPLES is not set
1023# CONFIG_PPC_EARLY_DEBUG is not set
959 1024
960# 1025#
961# Security options 1026# Security options
962# 1027#
963# CONFIG_KEYS is not set 1028# CONFIG_KEYS is not set
964# CONFIG_SECURITY is not set 1029# CONFIG_SECURITY is not set
965 1030# CONFIG_SECURITY_FILE_CAPABILITIES is not set
966#
967# Cryptographic options
968#
969# CONFIG_CRYPTO is not set 1031# CONFIG_CRYPTO is not set
970 1032# CONFIG_PPC_CLOCK is not set
971#
972# Hardware crypto devices
973#
diff --git a/arch/ppc/configs/TQM8541_defconfig b/arch/powerpc/configs/tqm8541_defconfig
index e00cd62daa3f..1aff35f0c53a 100644
--- a/arch/ppc/configs/TQM8541_defconfig
+++ b/arch/powerpc/configs/tqm8541_defconfig
@@ -1,66 +1,116 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc2 3# Linux kernel version: 2.6.24-rc8
4# Wed Nov 30 13:36:28 2005 4# Fri Jan 25 01:31:28 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
10CONFIG_PPC=y 40CONFIG_PPC=y
11CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
12CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 63CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 64CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
33CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
34# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
35# CONFIG_HOTPLUG is not set
36CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
38CONFIG_INITRAMFS_SOURCE="" 82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
40# CONFIG_KALLSYMS is not set 87# CONFIG_KALLSYMS is not set
88# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 89CONFIG_PRINTK=y
42CONFIG_BUG=y 90CONFIG_BUG=y
91CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 92CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 93CONFIG_FUTEX=y
94CONFIG_ANON_INODES=y
45# CONFIG_EPOLL is not set 95# CONFIG_EPOLL is not set
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 96CONFIG_SIGNALFD=y
97CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 98CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 99CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 100CONFIG_SLUB_DEBUG=y
50CONFIG_CC_ALIGN_LOOPS=0 101# CONFIG_SLAB is not set
51CONFIG_CC_ALIGN_JUMPS=0 102CONFIG_SLUB=y
103# CONFIG_SLOB is not set
104CONFIG_SLABINFO=y
105CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58# CONFIG_MODULES is not set 108# CONFIG_MODULES is not set
59 109CONFIG_BLOCK=y
60#
61# Block layer
62#
63# CONFIG_LBD is not set 110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113# CONFIG_BLK_DEV_BSG is not set
64 114
65# 115#
66# IO Schedulers 116# IO Schedulers
@@ -76,56 +126,63 @@ CONFIG_DEFAULT_AS=y
76CONFIG_DEFAULT_IOSCHED="anticipatory" 126CONFIG_DEFAULT_IOSCHED="anticipatory"
77 127
78# 128#
79# Processor 129# Platform support
80#
81# CONFIG_6xx is not set
82# CONFIG_40x is not set
83# CONFIG_44x is not set
84# CONFIG_POWER3 is not set
85# CONFIG_POWER4 is not set
86# CONFIG_8xx is not set
87# CONFIG_E200 is not set
88CONFIG_E500=y
89CONFIG_BOOKE=y
90CONFIG_FSL_BOOKE=y
91# CONFIG_PHYS_64BIT is not set
92CONFIG_SPE=y
93CONFIG_MATH_EMULATION=y
94# CONFIG_KEXEC is not set
95# CONFIG_CPU_FREQ is not set
96# CONFIG_WANT_EARLY_SERIAL is not set
97CONFIG_PPC_GEN550=y
98CONFIG_85xx=y
99CONFIG_PPC_INDIRECT_PCI_BE=y
100
101#
102# Freescale 85xx options
103# 130#
131# CONFIG_PPC_MPC52xx is not set
132# CONFIG_PPC_MPC5200 is not set
133# CONFIG_PPC_CELL is not set
134# CONFIG_PPC_CELL_NATIVE is not set
135# CONFIG_PQ2ADS is not set
104# CONFIG_MPC8540_ADS is not set 136# CONFIG_MPC8540_ADS is not set
105# CONFIG_MPC8548_CDS is not set
106# CONFIG_MPC8555_CDS is not set
107# CONFIG_MPC8560_ADS is not set 137# CONFIG_MPC8560_ADS is not set
108# CONFIG_SBC8560 is not set 138# CONFIG_MPC85xx_CDS is not set
139# CONFIG_MPC85xx_MDS is not set
140# CONFIG_MPC85xx_DS is not set
109# CONFIG_STX_GP3 is not set 141# CONFIG_STX_GP3 is not set
110# CONFIG_TQM8540 is not set 142# CONFIG_TQM8540 is not set
111CONFIG_TQM8541=y 143CONFIG_TQM8541=y
112# CONFIG_TQM8555 is not set 144# CONFIG_TQM8555 is not set
113# CONFIG_TQM8560 is not set 145# CONFIG_TQM8560 is not set
114CONFIG_MPC8555=y 146CONFIG_TQM85xx=y
147CONFIG_MPC85xx=y
148# CONFIG_IPIC is not set
149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159CONFIG_CPM2=y
160CONFIG_PPC_CPM_NEW_BINDING=y
161# CONFIG_FSL_ULI1575 is not set
162CONFIG_CPM=y
115 163
116# 164#
117# Platform options 165# Kernel options
118# 166#
119CONFIG_CPM2=y
120# CONFIG_PC_KEYBOARD is not set
121# CONFIG_HIGHMEM is not set 167# CONFIG_HIGHMEM is not set
168# CONFIG_TICK_ONESHOT is not set
169# CONFIG_NO_HZ is not set
170# CONFIG_HIGH_RES_TIMERS is not set
171CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
122# CONFIG_HZ_100 is not set 172# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y 173CONFIG_HZ_250=y
174# CONFIG_HZ_300 is not set
124# CONFIG_HZ_1000 is not set 175# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250 176CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y 177CONFIG_PREEMPT_NONE=y
127# CONFIG_PREEMPT_VOLUNTARY is not set 178# CONFIG_PREEMPT_VOLUNTARY is not set
128# CONFIG_PREEMPT is not set 179# CONFIG_PREEMPT is not set
180CONFIG_BINFMT_ELF=y
181# CONFIG_BINFMT_MISC is not set
182CONFIG_MATH_EMULATION=y
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184CONFIG_ARCH_FLATMEM_ENABLE=y
185CONFIG_ARCH_POPULATES_NODE_MAP=y
129CONFIG_SELECT_MEMORY_MODEL=y 186CONFIG_SELECT_MEMORY_MODEL=y
130CONFIG_FLATMEM_MANUAL=y 187CONFIG_FLATMEM_MANUAL=y
131# CONFIG_DISCONTIGMEM_MANUAL is not set 188# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -133,28 +190,36 @@ CONFIG_FLATMEM_MANUAL=y
133CONFIG_FLATMEM=y 190CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y 191CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 192# CONFIG_SPARSEMEM_STATIC is not set
193# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 194CONFIG_SPLIT_PTLOCK_CPUS=4
137CONFIG_BINFMT_ELF=y 195# CONFIG_RESOURCES_64BIT is not set
138# CONFIG_BINFMT_MISC is not set 196CONFIG_ZONE_DMA_FLAG=1
197CONFIG_BOUNCE=y
198CONFIG_VIRT_TO_BUS=y
199# CONFIG_PROC_DEVICETREE is not set
139# CONFIG_CMDLINE_BOOL is not set 200# CONFIG_CMDLINE_BOOL is not set
140# CONFIG_PM is not set 201# CONFIG_PM is not set
141# CONFIG_HIBERNATION is not set 202CONFIG_SUSPEND_UP_POSSIBLE=y
203CONFIG_HIBERNATION_UP_POSSIBLE=y
142CONFIG_SECCOMP=y 204CONFIG_SECCOMP=y
205CONFIG_WANT_DEVICE_TREE=y
206CONFIG_DEVICE_TREE="tqm8541.dts"
143CONFIG_ISA_DMA_API=y 207CONFIG_ISA_DMA_API=y
144 208
145# 209#
146# Bus options 210# Bus options
147# 211#
148CONFIG_PPC_I8259=y 212CONFIG_ZONE_DMA=y
149CONFIG_PPC_INDIRECT_PCI=y 213CONFIG_PPC_INDIRECT_PCI=y
214CONFIG_FSL_SOC=y
215CONFIG_FSL_PCI=y
150CONFIG_PCI=y 216CONFIG_PCI=y
151CONFIG_PCI_DOMAINS=y 217CONFIG_PCI_DOMAINS=y
152# CONFIG_PCI_LEGACY_PROC is not set 218CONFIG_PCI_SYSCALL=y
153 219# CONFIG_PCIEPORTBUS is not set
154# 220CONFIG_ARCH_SUPPORTS_MSI=y
155# PCCARD (PCMCIA/CardBus) support 221# CONFIG_PCI_MSI is not set
156# 222CONFIG_PCI_LEGACY=y
157# CONFIG_PCCARD is not set
158 223
159# 224#
160# Advanced setup 225# Advanced setup
@@ -167,7 +232,7 @@ CONFIG_PCI_DOMAINS=y
167CONFIG_HIGHMEM_START=0xfe000000 232CONFIG_HIGHMEM_START=0xfe000000
168CONFIG_LOWMEM_SIZE=0x30000000 233CONFIG_LOWMEM_SIZE=0x30000000
169CONFIG_KERNEL_START=0xc0000000 234CONFIG_KERNEL_START=0xc0000000
170CONFIG_TASK_SIZE=0x80000000 235CONFIG_TASK_SIZE=0xc0000000
171CONFIG_BOOT_LOAD=0x00800000 236CONFIG_BOOT_LOAD=0x00800000
172 237
173# 238#
@@ -181,6 +246,10 @@ CONFIG_NET=y
181CONFIG_PACKET=y 246CONFIG_PACKET=y
182# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
183CONFIG_UNIX=y 248CONFIG_UNIX=y
249CONFIG_XFRM=y
250# CONFIG_XFRM_USER is not set
251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
184# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
185CONFIG_INET=y 254CONFIG_INET=y
186CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -198,23 +267,26 @@ CONFIG_SYN_COOKIES=y
198# CONFIG_INET_AH is not set 267# CONFIG_INET_AH is not set
199# CONFIG_INET_ESP is not set 268# CONFIG_INET_ESP is not set
200# CONFIG_INET_IPCOMP is not set 269# CONFIG_INET_IPCOMP is not set
270# CONFIG_INET_XFRM_TUNNEL is not set
201# CONFIG_INET_TUNNEL is not set 271# CONFIG_INET_TUNNEL is not set
272CONFIG_INET_XFRM_MODE_TRANSPORT=y
273CONFIG_INET_XFRM_MODE_TUNNEL=y
274CONFIG_INET_XFRM_MODE_BEET=y
275# CONFIG_INET_LRO is not set
202CONFIG_INET_DIAG=y 276CONFIG_INET_DIAG=y
203CONFIG_INET_TCP_DIAG=y 277CONFIG_INET_TCP_DIAG=y
204# CONFIG_TCP_CONG_ADVANCED is not set 278# CONFIG_TCP_CONG_ADVANCED is not set
205CONFIG_TCP_CONG_BIC=y 279CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set
206# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set
285# CONFIG_NETWORK_SECMARK is not set
207# CONFIG_NETFILTER is not set 286# CONFIG_NETFILTER is not set
208
209#
210# DCCP Configuration (EXPERIMENTAL)
211#
212# CONFIG_IP_DCCP is not set 287# CONFIG_IP_DCCP is not set
213
214#
215# SCTP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_SCTP is not set 288# CONFIG_IP_SCTP is not set
289# CONFIG_TIPC is not set
218# CONFIG_ATM is not set 290# CONFIG_ATM is not set
219# CONFIG_BRIDGE is not set 291# CONFIG_BRIDGE is not set
220# CONFIG_VLAN_8021Q is not set 292# CONFIG_VLAN_8021Q is not set
@@ -224,13 +296,8 @@ CONFIG_TCP_CONG_BIC=y
224# CONFIG_ATALK is not set 296# CONFIG_ATALK is not set
225# CONFIG_X25 is not set 297# CONFIG_X25 is not set
226# CONFIG_LAPB is not set 298# CONFIG_LAPB is not set
227# CONFIG_NET_DIVERT is not set
228# CONFIG_ECONET is not set 299# CONFIG_ECONET is not set
229# CONFIG_WAN_ROUTER is not set 300# CONFIG_WAN_ROUTER is not set
230
231#
232# QoS and/or fair queueing
233#
234# CONFIG_NET_SCHED is not set 301# CONFIG_NET_SCHED is not set
235 302
236# 303#
@@ -240,7 +307,17 @@ CONFIG_TCP_CONG_BIC=y
240# CONFIG_HAMRADIO is not set 307# CONFIG_HAMRADIO is not set
241# CONFIG_IRDA is not set 308# CONFIG_IRDA is not set
242# CONFIG_BT is not set 309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
243# CONFIG_IEEE80211 is not set 318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
320# CONFIG_NET_9P is not set
244 321
245# 322#
246# Device Drivers 323# Device Drivers
@@ -251,16 +328,8 @@ CONFIG_TCP_CONG_BIC=y
251# 328#
252CONFIG_STANDALONE=y 329CONFIG_STANDALONE=y
253CONFIG_PREVENT_FIRMWARE_BUILD=y 330CONFIG_PREVENT_FIRMWARE_BUILD=y
254# CONFIG_FW_LOADER is not set 331# CONFIG_SYS_HYPERVISOR is not set
255
256#
257# Connector - unified userspace <-> kernelspace linker
258#
259# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
260
261#
262# Memory Technology Devices (MTD)
263#
264CONFIG_MTD=y 333CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
266CONFIG_MTD_CONCAT=y 335CONFIG_MTD_CONCAT=y
@@ -272,11 +341,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
272# User Modules And Translation Layers 341# User Modules And Translation Layers
273# 342#
274CONFIG_MTD_CHAR=y 343CONFIG_MTD_CHAR=y
344CONFIG_MTD_BLKDEVS=y
275CONFIG_MTD_BLOCK=y 345CONFIG_MTD_BLOCK=y
276# CONFIG_FTL is not set 346# CONFIG_FTL is not set
277# CONFIG_NFTL is not set 347# CONFIG_NFTL is not set
278# CONFIG_INFTL is not set 348# CONFIG_INFTL is not set
279# CONFIG_RFD_FTL is not set 349# CONFIG_RFD_FTL is not set
350# CONFIG_SSFDC is not set
351# CONFIG_MTD_OOPS is not set
280 352
281# 353#
282# RAM/ROM/Flash chip drivers 354# RAM/ROM/Flash chip drivers
@@ -297,7 +369,6 @@ CONFIG_MTD_CFI_I2=y
297# CONFIG_MTD_CFI_I8 is not set 369# CONFIG_MTD_CFI_I8 is not set
298# CONFIG_MTD_CFI_INTELEXT is not set 370# CONFIG_MTD_CFI_INTELEXT is not set
299CONFIG_MTD_CFI_AMDSTD=y 371CONFIG_MTD_CFI_AMDSTD=y
300CONFIG_MTD_CFI_AMDSTD_RETRY=0
301# CONFIG_MTD_CFI_STAA is not set 372# CONFIG_MTD_CFI_STAA is not set
302CONFIG_MTD_CFI_UTIL=y 373CONFIG_MTD_CFI_UTIL=y
303# CONFIG_MTD_RAM is not set 374# CONFIG_MTD_RAM is not set
@@ -309,7 +380,8 @@ CONFIG_MTD_CFI_UTIL=y
309# 380#
310# CONFIG_MTD_COMPLEX_MAPPINGS is not set 381# CONFIG_MTD_COMPLEX_MAPPINGS is not set
311# CONFIG_MTD_PHYSMAP is not set 382# CONFIG_MTD_PHYSMAP is not set
312CONFIG_MTD_TQM85xx=y 383# CONFIG_MTD_PHYSMAP_OF is not set
384# CONFIG_MTD_INTEL_VR_NOR is not set
313# CONFIG_MTD_PLATRAM is not set 385# CONFIG_MTD_PLATRAM is not set
314 386
315# 387#
@@ -319,7 +391,6 @@ CONFIG_MTD_TQM85xx=y
319# CONFIG_MTD_SLRAM is not set 391# CONFIG_MTD_SLRAM is not set
320# CONFIG_MTD_PHRAM is not set 392# CONFIG_MTD_PHRAM is not set
321# CONFIG_MTD_MTDRAM is not set 393# CONFIG_MTD_MTDRAM is not set
322# CONFIG_MTD_BLKMTD is not set
323# CONFIG_MTD_BLOCK2MTD is not set 394# CONFIG_MTD_BLOCK2MTD is not set
324 395
325# 396#
@@ -328,29 +399,16 @@ CONFIG_MTD_TQM85xx=y
328# CONFIG_MTD_DOC2000 is not set 399# CONFIG_MTD_DOC2000 is not set
329# CONFIG_MTD_DOC2001 is not set 400# CONFIG_MTD_DOC2001 is not set
330# CONFIG_MTD_DOC2001PLUS is not set 401# CONFIG_MTD_DOC2001PLUS is not set
331
332#
333# NAND Flash Device Drivers
334#
335# CONFIG_MTD_NAND is not set 402# CONFIG_MTD_NAND is not set
336
337#
338# OneNAND Flash Device Drivers
339#
340# CONFIG_MTD_ONENAND is not set 403# CONFIG_MTD_ONENAND is not set
341 404
342# 405#
343# Parallel port support 406# UBI - Unsorted block images
344# 407#
408# CONFIG_MTD_UBI is not set
409CONFIG_OF_DEVICE=y
345# CONFIG_PARPORT is not set 410# CONFIG_PARPORT is not set
346 411CONFIG_BLK_DEV=y
347#
348# Plug and Play support
349#
350
351#
352# Block devices
353#
354# CONFIG_BLK_DEV_FD is not set 412# CONFIG_BLK_DEV_FD is not set
355# CONFIG_BLK_CPQ_DA is not set 413# CONFIG_BLK_CPQ_DA is not set
356# CONFIG_BLK_CPQ_CISS_DA is not set 414# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,14 +422,16 @@ CONFIG_BLK_DEV_LOOP=y
364CONFIG_BLK_DEV_RAM=y 422CONFIG_BLK_DEV_RAM=y
365CONFIG_BLK_DEV_RAM_COUNT=16 423CONFIG_BLK_DEV_RAM_COUNT=16
366CONFIG_BLK_DEV_RAM_SIZE=32768 424CONFIG_BLK_DEV_RAM_SIZE=32768
367CONFIG_BLK_DEV_INITRD=y 425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# CONFIG_CDROM_PKTCDVD is not set 426# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 427# CONFIG_ATA_OVER_ETH is not set
370 428CONFIG_MISC_DEVICES=y
371# 429# CONFIG_PHANTOM is not set
372# ATA/ATAPI/MFM/RLL support 430# CONFIG_EEPROM_93CX6 is not set
373# 431# CONFIG_SGI_IOC4 is not set
432# CONFIG_TIFM_CORE is not set
374CONFIG_IDE=y 433CONFIG_IDE=y
434CONFIG_IDE_MAX_HWIFS=4
375CONFIG_BLK_DEV_IDE=y 435CONFIG_BLK_DEV_IDE=y
376 436
377# 437#
@@ -384,21 +444,24 @@ CONFIG_BLK_DEV_IDEDISK=y
384# CONFIG_BLK_DEV_IDETAPE is not set 444# CONFIG_BLK_DEV_IDETAPE is not set
385# CONFIG_BLK_DEV_IDEFLOPPY is not set 445# CONFIG_BLK_DEV_IDEFLOPPY is not set
386# CONFIG_IDE_TASK_IOCTL is not set 446# CONFIG_IDE_TASK_IOCTL is not set
447CONFIG_IDE_PROC_FS=y
387 448
388# 449#
389# IDE chipset support/bugfixes 450# IDE chipset support/bugfixes
390# 451#
391CONFIG_IDE_GENERIC=y 452CONFIG_IDE_GENERIC=y
453# CONFIG_BLK_DEV_PLATFORM is not set
454
455#
456# PCI IDE chipsets support
457#
392CONFIG_BLK_DEV_IDEPCI=y 458CONFIG_BLK_DEV_IDEPCI=y
393CONFIG_IDEPCI_SHARE_IRQ=y 459CONFIG_IDEPCI_SHARE_IRQ=y
460CONFIG_IDEPCI_PCIBUS_ORDER=y
394# CONFIG_BLK_DEV_OFFBOARD is not set 461# CONFIG_BLK_DEV_OFFBOARD is not set
395CONFIG_BLK_DEV_GENERIC=y 462CONFIG_BLK_DEV_GENERIC=y
396# CONFIG_BLK_DEV_OPTI621 is not set 463# CONFIG_BLK_DEV_OPTI621 is not set
397# CONFIG_BLK_DEV_SL82C105 is not set
398CONFIG_BLK_DEV_IDEDMA_PCI=y 464CONFIG_BLK_DEV_IDEDMA_PCI=y
399# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
400CONFIG_IDEDMA_PCI_AUTO=y
401# CONFIG_IDEDMA_ONLYDISK is not set
402# CONFIG_BLK_DEV_AEC62XX is not set 465# CONFIG_BLK_DEV_AEC62XX is not set
403# CONFIG_BLK_DEV_ALI15X3 is not set 466# CONFIG_BLK_DEV_ALI15X3 is not set
404# CONFIG_BLK_DEV_AMD74XX is not set 467# CONFIG_BLK_DEV_AMD74XX is not set
@@ -409,21 +472,24 @@ CONFIG_IDEDMA_PCI_AUTO=y
409# CONFIG_BLK_DEV_CS5530 is not set 472# CONFIG_BLK_DEV_CS5530 is not set
410# CONFIG_BLK_DEV_HPT34X is not set 473# CONFIG_BLK_DEV_HPT34X is not set
411# CONFIG_BLK_DEV_HPT366 is not set 474# CONFIG_BLK_DEV_HPT366 is not set
475# CONFIG_BLK_DEV_JMICRON is not set
412# CONFIG_BLK_DEV_SC1200 is not set 476# CONFIG_BLK_DEV_SC1200 is not set
413# CONFIG_BLK_DEV_PIIX is not set 477# CONFIG_BLK_DEV_PIIX is not set
478# CONFIG_BLK_DEV_IT8213 is not set
414# CONFIG_BLK_DEV_IT821X is not set 479# CONFIG_BLK_DEV_IT821X is not set
415# CONFIG_BLK_DEV_NS87415 is not set 480# CONFIG_BLK_DEV_NS87415 is not set
416# CONFIG_BLK_DEV_PDC202XX_OLD is not set 481# CONFIG_BLK_DEV_PDC202XX_OLD is not set
417# CONFIG_BLK_DEV_PDC202XX_NEW is not set 482# CONFIG_BLK_DEV_PDC202XX_NEW is not set
418# CONFIG_BLK_DEV_SVWKS is not set 483# CONFIG_BLK_DEV_SVWKS is not set
419# CONFIG_BLK_DEV_SIIMAGE is not set 484# CONFIG_BLK_DEV_SIIMAGE is not set
485# CONFIG_BLK_DEV_SL82C105 is not set
420# CONFIG_BLK_DEV_SLC90E66 is not set 486# CONFIG_BLK_DEV_SLC90E66 is not set
421# CONFIG_BLK_DEV_TRM290 is not set 487# CONFIG_BLK_DEV_TRM290 is not set
422CONFIG_BLK_DEV_VIA82CXXX=y 488CONFIG_BLK_DEV_VIA82CXXX=y
489# CONFIG_BLK_DEV_TC86C001 is not set
423# CONFIG_IDE_ARM is not set 490# CONFIG_IDE_ARM is not set
424CONFIG_BLK_DEV_IDEDMA=y 491CONFIG_BLK_DEV_IDEDMA=y
425# CONFIG_IDEDMA_IVB is not set 492CONFIG_IDE_ARCH_OBSOLETE_INIT=y
426CONFIG_IDEDMA_AUTO=y
427# CONFIG_BLK_DEV_HD is not set 493# CONFIG_BLK_DEV_HD is not set
428 494
429# 495#
@@ -431,49 +497,28 @@ CONFIG_IDEDMA_AUTO=y
431# 497#
432# CONFIG_RAID_ATTRS is not set 498# CONFIG_RAID_ATTRS is not set
433# CONFIG_SCSI is not set 499# CONFIG_SCSI is not set
434 500# CONFIG_SCSI_DMA is not set
435# 501# CONFIG_SCSI_NETLINK is not set
436# Multi-device support (RAID and LVM) 502# CONFIG_ATA is not set
437#
438# CONFIG_MD is not set 503# CONFIG_MD is not set
439
440#
441# Fusion MPT device support
442#
443# CONFIG_FUSION is not set 504# CONFIG_FUSION is not set
444 505
445# 506#
446# IEEE 1394 (FireWire) support 507# IEEE 1394 (FireWire) support
447# 508#
509# CONFIG_FIREWIRE is not set
448# CONFIG_IEEE1394 is not set 510# CONFIG_IEEE1394 is not set
449
450#
451# I2O device support
452#
453# CONFIG_I2O is not set 511# CONFIG_I2O is not set
454 512# CONFIG_MACINTOSH_DRIVERS is not set
455#
456# Macintosh device drivers
457#
458# CONFIG_WINDFARM is not set
459
460#
461# Network device support
462#
463CONFIG_NETDEVICES=y 513CONFIG_NETDEVICES=y
514# CONFIG_NETDEVICES_MULTIQUEUE is not set
464# CONFIG_DUMMY is not set 515# CONFIG_DUMMY is not set
465# CONFIG_BONDING is not set 516# CONFIG_BONDING is not set
517# CONFIG_MACVLAN is not set
466# CONFIG_EQUALIZER is not set 518# CONFIG_EQUALIZER is not set
467# CONFIG_TUN is not set 519# CONFIG_TUN is not set
468 520# CONFIG_VETH is not set
469#
470# ARCnet devices
471#
472# CONFIG_ARCNET is not set 521# CONFIG_ARCNET is not set
473
474#
475# PHY device support
476#
477CONFIG_PHYLIB=y 522CONFIG_PHYLIB=y
478 523
479# 524#
@@ -484,29 +529,30 @@ CONFIG_PHYLIB=y
484# CONFIG_QSEMI_PHY is not set 529# CONFIG_QSEMI_PHY is not set
485# CONFIG_LXT_PHY is not set 530# CONFIG_LXT_PHY is not set
486# CONFIG_CICADA_PHY is not set 531# CONFIG_CICADA_PHY is not set
487 532# CONFIG_VITESSE_PHY is not set
488# 533# CONFIG_SMSC_PHY is not set
489# Ethernet (10 or 100Mbit) 534# CONFIG_BROADCOM_PHY is not set
490# 535# CONFIG_ICPLUS_PHY is not set
536# CONFIG_FIXED_PHY is not set
537# CONFIG_MDIO_BITBANG is not set
491CONFIG_NET_ETHERNET=y 538CONFIG_NET_ETHERNET=y
492CONFIG_MII=y 539CONFIG_MII=y
493# CONFIG_HAPPYMEAL is not set 540# CONFIG_HAPPYMEAL is not set
494# CONFIG_SUNGEM is not set 541# CONFIG_SUNGEM is not set
495# CONFIG_CASSINI is not set 542# CONFIG_CASSINI is not set
496# CONFIG_NET_VENDOR_3COM is not set 543# CONFIG_NET_VENDOR_3COM is not set
497
498#
499# Tulip family network device support
500#
501# CONFIG_NET_TULIP is not set 544# CONFIG_NET_TULIP is not set
502# CONFIG_HP100 is not set 545# CONFIG_HP100 is not set
546# CONFIG_IBM_NEW_EMAC_ZMII is not set
547# CONFIG_IBM_NEW_EMAC_RGMII is not set
548# CONFIG_IBM_NEW_EMAC_TAH is not set
549# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
503CONFIG_NET_PCI=y 550CONFIG_NET_PCI=y
504# CONFIG_PCNET32 is not set 551# CONFIG_PCNET32 is not set
505# CONFIG_AMD8111_ETH is not set 552# CONFIG_AMD8111_ETH is not set
506# CONFIG_ADAPTEC_STARFIRE is not set 553# CONFIG_ADAPTEC_STARFIRE is not set
507# CONFIG_B44 is not set 554# CONFIG_B44 is not set
508# CONFIG_FORCEDETH is not set 555# CONFIG_FORCEDETH is not set
509# CONFIG_DGRS is not set
510# CONFIG_EEPRO100 is not set 556# CONFIG_EEPRO100 is not set
511CONFIG_E100=y 557CONFIG_E100=y
512# CONFIG_FEALNX is not set 558# CONFIG_FEALNX is not set
@@ -519,47 +565,47 @@ CONFIG_E100=y
519# CONFIG_SUNDANCE is not set 565# CONFIG_SUNDANCE is not set
520# CONFIG_TLAN is not set 566# CONFIG_TLAN is not set
521# CONFIG_VIA_RHINE is not set 567# CONFIG_VIA_RHINE is not set
568# CONFIG_SC92031 is not set
522# CONFIG_FS_ENET is not set 569# CONFIG_FS_ENET is not set
523 570CONFIG_NETDEV_1000=y
524#
525# Ethernet (1000 Mbit)
526#
527# CONFIG_ACENIC is not set 571# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 572# CONFIG_DL2K is not set
529# CONFIG_E1000 is not set 573# CONFIG_E1000 is not set
574# CONFIG_E1000E is not set
575# CONFIG_IP1000 is not set
530# CONFIG_NS83820 is not set 576# CONFIG_NS83820 is not set
531# CONFIG_HAMACHI is not set 577# CONFIG_HAMACHI is not set
532# CONFIG_YELLOWFIN is not set 578# CONFIG_YELLOWFIN is not set
533# CONFIG_R8169 is not set 579# CONFIG_R8169 is not set
534# CONFIG_SIS190 is not set 580# CONFIG_SIS190 is not set
535# CONFIG_SKGE is not set 581# CONFIG_SKGE is not set
582# CONFIG_SKY2 is not set
536# CONFIG_SK98LIN is not set 583# CONFIG_SK98LIN is not set
537# CONFIG_VIA_VELOCITY is not set 584# CONFIG_VIA_VELOCITY is not set
538# CONFIG_TIGON3 is not set 585# CONFIG_TIGON3 is not set
539# CONFIG_BNX2 is not set 586# CONFIG_BNX2 is not set
540CONFIG_GIANFAR=y 587CONFIG_GIANFAR=y
541CONFIG_GFAR_NAPI=y 588CONFIG_GFAR_NAPI=y
542 589# CONFIG_QLA3XXX is not set
543# 590# CONFIG_ATL1 is not set
544# Ethernet (10000 Mbit) 591CONFIG_NETDEV_10000=y
545#
546# CONFIG_CHELSIO_T1 is not set 592# CONFIG_CHELSIO_T1 is not set
593# CONFIG_CHELSIO_T3 is not set
594# CONFIG_IXGBE is not set
547# CONFIG_IXGB is not set 595# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 596# CONFIG_S2IO is not set
549 597# CONFIG_MYRI10GE is not set
550# 598# CONFIG_NETXEN_NIC is not set
551# Token Ring devices 599# CONFIG_NIU is not set
552# 600# CONFIG_MLX4_CORE is not set
601# CONFIG_TEHUTI is not set
553# CONFIG_TR is not set 602# CONFIG_TR is not set
554 603
555# 604#
556# Wireless LAN (non-hamradio) 605# Wireless LAN
557#
558# CONFIG_NET_RADIO is not set
559
560#
561# Wan interfaces
562# 606#
607# CONFIG_WLAN_PRE80211 is not set
608# CONFIG_WLAN_80211 is not set
563# CONFIG_WAN is not set 609# CONFIG_WAN is not set
564# CONFIG_FDDI is not set 610# CONFIG_FDDI is not set
565# CONFIG_HIPPI is not set 611# CONFIG_HIPPI is not set
@@ -569,28 +615,21 @@ CONFIG_GFAR_NAPI=y
569# CONFIG_NETCONSOLE is not set 615# CONFIG_NETCONSOLE is not set
570# CONFIG_NETPOLL is not set 616# CONFIG_NETPOLL is not set
571# CONFIG_NET_POLL_CONTROLLER is not set 617# CONFIG_NET_POLL_CONTROLLER is not set
572
573#
574# ISDN subsystem
575#
576# CONFIG_ISDN is not set 618# CONFIG_ISDN is not set
577
578#
579# Telephony Support
580#
581# CONFIG_PHONE is not set 619# CONFIG_PHONE is not set
582 620
583# 621#
584# Input device support 622# Input device support
585# 623#
586CONFIG_INPUT=y 624CONFIG_INPUT=y
625# CONFIG_INPUT_FF_MEMLESS is not set
626# CONFIG_INPUT_POLLDEV is not set
587 627
588# 628#
589# Userland interfaces 629# Userland interfaces
590# 630#
591# CONFIG_INPUT_MOUSEDEV is not set 631# CONFIG_INPUT_MOUSEDEV is not set
592# CONFIG_INPUT_JOYDEV is not set 632# CONFIG_INPUT_JOYDEV is not set
593# CONFIG_INPUT_TSDEV is not set
594# CONFIG_INPUT_EVDEV is not set 633# CONFIG_INPUT_EVDEV is not set
595# CONFIG_INPUT_EVBUG is not set 634# CONFIG_INPUT_EVBUG is not set
596 635
@@ -600,6 +639,7 @@ CONFIG_INPUT=y
600# CONFIG_INPUT_KEYBOARD is not set 639# CONFIG_INPUT_KEYBOARD is not set
601# CONFIG_INPUT_MOUSE is not set 640# CONFIG_INPUT_MOUSE is not set
602# CONFIG_INPUT_JOYSTICK is not set 641# CONFIG_INPUT_JOYSTICK is not set
642# CONFIG_INPUT_TABLET is not set
603# CONFIG_INPUT_TOUCHSCREEN is not set 643# CONFIG_INPUT_TOUCHSCREEN is not set
604# CONFIG_INPUT_MISC is not set 644# CONFIG_INPUT_MISC is not set
605 645
@@ -620,53 +660,43 @@ CONFIG_INPUT=y
620# 660#
621CONFIG_SERIAL_8250=y 661CONFIG_SERIAL_8250=y
622CONFIG_SERIAL_8250_CONSOLE=y 662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_PCI=y
623CONFIG_SERIAL_8250_NR_UARTS=4 664CONFIG_SERIAL_8250_NR_UARTS=4
665CONFIG_SERIAL_8250_RUNTIME_UARTS=4
624# CONFIG_SERIAL_8250_EXTENDED is not set 666# CONFIG_SERIAL_8250_EXTENDED is not set
667CONFIG_SERIAL_8250_SHARE_IRQ=y
625 668
626# 669#
627# Non-8250 serial port support 670# Non-8250 serial port support
628# 671#
672# CONFIG_SERIAL_UARTLITE is not set
629CONFIG_SERIAL_CORE=y 673CONFIG_SERIAL_CORE=y
630CONFIG_SERIAL_CORE_CONSOLE=y 674CONFIG_SERIAL_CORE_CONSOLE=y
631# CONFIG_SERIAL_CPM is not set 675CONFIG_SERIAL_CPM=y
676CONFIG_SERIAL_CPM_CONSOLE=y
677CONFIG_SERIAL_CPM_SCC1=y
678# CONFIG_SERIAL_CPM_SCC2 is not set
679# CONFIG_SERIAL_CPM_SCC3 is not set
680# CONFIG_SERIAL_CPM_SCC4 is not set
681# CONFIG_SERIAL_CPM_SMC1 is not set
682# CONFIG_SERIAL_CPM_SMC2 is not set
632# CONFIG_SERIAL_JSM is not set 683# CONFIG_SERIAL_JSM is not set
684# CONFIG_SERIAL_OF_PLATFORM is not set
633CONFIG_UNIX98_PTYS=y 685CONFIG_UNIX98_PTYS=y
634CONFIG_LEGACY_PTYS=y 686CONFIG_LEGACY_PTYS=y
635CONFIG_LEGACY_PTY_COUNT=256 687CONFIG_LEGACY_PTY_COUNT=256
636
637#
638# IPMI
639#
640# CONFIG_IPMI_HANDLER is not set 688# CONFIG_IPMI_HANDLER is not set
641 689CONFIG_HW_RANDOM=y
642#
643# Watchdog Cards
644#
645# CONFIG_WATCHDOG is not set
646# CONFIG_NVRAM is not set 690# CONFIG_NVRAM is not set
647CONFIG_GEN_RTC=y 691CONFIG_GEN_RTC=y
648# CONFIG_GEN_RTC_X is not set 692# CONFIG_GEN_RTC_X is not set
649# CONFIG_DTLK is not set
650# CONFIG_R3964 is not set 693# CONFIG_R3964 is not set
651# CONFIG_APPLICOM is not set 694# CONFIG_APPLICOM is not set
652
653#
654# Ftape, the floppy tape device driver
655#
656# CONFIG_AGP is not set
657# CONFIG_DRM is not set
658# CONFIG_RAW_DRIVER is not set 695# CONFIG_RAW_DRIVER is not set
659
660#
661# TPM devices
662#
663# CONFIG_TCG_TPM is not set 696# CONFIG_TCG_TPM is not set
664# CONFIG_TELCLOCK is not set 697CONFIG_DEVPORT=y
665
666#
667# I2C support
668#
669CONFIG_I2C=y 698CONFIG_I2C=y
699CONFIG_I2C_BOARDINFO=y
670CONFIG_I2C_CHARDEV=y 700CONFIG_I2C_CHARDEV=y
671 701
672# 702#
@@ -688,60 +718,61 @@ CONFIG_I2C_CHARDEV=y
688# CONFIG_I2C_I810 is not set 718# CONFIG_I2C_I810 is not set
689# CONFIG_I2C_PIIX4 is not set 719# CONFIG_I2C_PIIX4 is not set
690CONFIG_I2C_MPC=y 720CONFIG_I2C_MPC=y
691# CONFIG_I2C_MPC8260 is not set
692# CONFIG_I2C_NFORCE2 is not set 721# CONFIG_I2C_NFORCE2 is not set
722# CONFIG_I2C_OCORES is not set
693# CONFIG_I2C_PARPORT_LIGHT is not set 723# CONFIG_I2C_PARPORT_LIGHT is not set
694# CONFIG_I2C_PROSAVAGE is not set 724# CONFIG_I2C_PROSAVAGE is not set
695# CONFIG_I2C_SAVAGE4 is not set 725# CONFIG_I2C_SAVAGE4 is not set
696# CONFIG_SCx200_ACB is not set 726# CONFIG_I2C_SIMTEC is not set
697# CONFIG_I2C_SIS5595 is not set 727# CONFIG_I2C_SIS5595 is not set
698# CONFIG_I2C_SIS630 is not set 728# CONFIG_I2C_SIS630 is not set
699# CONFIG_I2C_SIS96X is not set 729# CONFIG_I2C_SIS96X is not set
730# CONFIG_I2C_TAOS_EVM is not set
700# CONFIG_I2C_VIA is not set 731# CONFIG_I2C_VIA is not set
701# CONFIG_I2C_VIAPRO is not set 732# CONFIG_I2C_VIAPRO is not set
702# CONFIG_I2C_VOODOO3 is not set 733# CONFIG_I2C_VOODOO3 is not set
703# CONFIG_I2C_PCA_ISA is not set
704 734
705# 735#
706# Miscellaneous I2C Chip support 736# Miscellaneous I2C Chip support
707# 737#
708CONFIG_SENSORS_DS1337=y 738CONFIG_SENSORS_DS1337=y
709# CONFIG_SENSORS_DS1374 is not set 739# CONFIG_SENSORS_DS1374 is not set
740# CONFIG_DS1682 is not set
710# CONFIG_SENSORS_EEPROM is not set 741# CONFIG_SENSORS_EEPROM is not set
711# CONFIG_SENSORS_MAX6900 is not set
712# CONFIG_SENSORS_PCF8574 is not set 742# CONFIG_SENSORS_PCF8574 is not set
713# CONFIG_SENSORS_PCF8563 is not set
714# CONFIG_SENSORS_PCA9539 is not set 743# CONFIG_SENSORS_PCA9539 is not set
715# CONFIG_SENSORS_PCF8591 is not set 744# CONFIG_SENSORS_PCF8591 is not set
716# CONFIG_SENSORS_RTC8564 is not set
717# CONFIG_SENSORS_M41T00 is not set 745# CONFIG_SENSORS_M41T00 is not set
718# CONFIG_SENSORS_MAX6875 is not set 746# CONFIG_SENSORS_MAX6875 is not set
719# CONFIG_RTC_X1205_I2C is not set 747# CONFIG_SENSORS_TSL2550 is not set
720# CONFIG_I2C_DEBUG_CORE is not set 748# CONFIG_I2C_DEBUG_CORE is not set
721# CONFIG_I2C_DEBUG_ALGO is not set 749# CONFIG_I2C_DEBUG_ALGO is not set
722# CONFIG_I2C_DEBUG_BUS is not set 750# CONFIG_I2C_DEBUG_BUS is not set
723# CONFIG_I2C_DEBUG_CHIP is not set 751# CONFIG_I2C_DEBUG_CHIP is not set
724 752
725# 753#
726# Dallas's 1-wire bus 754# SPI support
727# 755#
756# CONFIG_SPI is not set
757# CONFIG_SPI_MASTER is not set
728# CONFIG_W1 is not set 758# CONFIG_W1 is not set
729 759# CONFIG_POWER_SUPPLY is not set
730#
731# Hardware Monitoring support
732#
733CONFIG_HWMON=y 760CONFIG_HWMON=y
734# CONFIG_HWMON_VID is not set 761# CONFIG_HWMON_VID is not set
762# CONFIG_SENSORS_AD7418 is not set
735# CONFIG_SENSORS_ADM1021 is not set 763# CONFIG_SENSORS_ADM1021 is not set
736# CONFIG_SENSORS_ADM1025 is not set 764# CONFIG_SENSORS_ADM1025 is not set
737# CONFIG_SENSORS_ADM1026 is not set 765# CONFIG_SENSORS_ADM1026 is not set
766# CONFIG_SENSORS_ADM1029 is not set
738# CONFIG_SENSORS_ADM1031 is not set 767# CONFIG_SENSORS_ADM1031 is not set
739# CONFIG_SENSORS_ADM9240 is not set 768# CONFIG_SENSORS_ADM9240 is not set
740# CONFIG_SENSORS_ASB100 is not set 769# CONFIG_SENSORS_ADT7470 is not set
741# CONFIG_SENSORS_ATXP1 is not set 770# CONFIG_SENSORS_ATXP1 is not set
742# CONFIG_SENSORS_DS1621 is not set 771# CONFIG_SENSORS_DS1621 is not set
743# CONFIG_SENSORS_FSCHER is not set 772# CONFIG_SENSORS_I5K_AMB is not set
744# CONFIG_SENSORS_FSCPOS is not set 773# CONFIG_SENSORS_F71805F is not set
774# CONFIG_SENSORS_F71882FG is not set
775# CONFIG_SENSORS_F75375S is not set
745# CONFIG_SENSORS_GL518SM is not set 776# CONFIG_SENSORS_GL518SM is not set
746# CONFIG_SENSORS_GL520SM is not set 777# CONFIG_SENSORS_GL520SM is not set
747# CONFIG_SENSORS_IT87 is not set 778# CONFIG_SENSORS_IT87 is not set
@@ -755,52 +786,75 @@ CONFIG_SENSORS_LM75=y
755# CONFIG_SENSORS_LM87 is not set 786# CONFIG_SENSORS_LM87 is not set
756# CONFIG_SENSORS_LM90 is not set 787# CONFIG_SENSORS_LM90 is not set
757# CONFIG_SENSORS_LM92 is not set 788# CONFIG_SENSORS_LM92 is not set
789# CONFIG_SENSORS_LM93 is not set
758# CONFIG_SENSORS_MAX1619 is not set 790# CONFIG_SENSORS_MAX1619 is not set
791# CONFIG_SENSORS_MAX6650 is not set
759# CONFIG_SENSORS_PC87360 is not set 792# CONFIG_SENSORS_PC87360 is not set
793# CONFIG_SENSORS_PC87427 is not set
760# CONFIG_SENSORS_SIS5595 is not set 794# CONFIG_SENSORS_SIS5595 is not set
795# CONFIG_SENSORS_DME1737 is not set
761# CONFIG_SENSORS_SMSC47M1 is not set 796# CONFIG_SENSORS_SMSC47M1 is not set
797# CONFIG_SENSORS_SMSC47M192 is not set
762# CONFIG_SENSORS_SMSC47B397 is not set 798# CONFIG_SENSORS_SMSC47B397 is not set
799# CONFIG_SENSORS_THMC50 is not set
763# CONFIG_SENSORS_VIA686A is not set 800# CONFIG_SENSORS_VIA686A is not set
801# CONFIG_SENSORS_VT1211 is not set
802# CONFIG_SENSORS_VT8231 is not set
764# CONFIG_SENSORS_W83781D is not set 803# CONFIG_SENSORS_W83781D is not set
804# CONFIG_SENSORS_W83791D is not set
765# CONFIG_SENSORS_W83792D is not set 805# CONFIG_SENSORS_W83792D is not set
806# CONFIG_SENSORS_W83793 is not set
766# CONFIG_SENSORS_W83L785TS is not set 807# CONFIG_SENSORS_W83L785TS is not set
767# CONFIG_SENSORS_W83627HF is not set 808# CONFIG_SENSORS_W83627HF is not set
768# CONFIG_SENSORS_W83627EHF is not set 809# CONFIG_SENSORS_W83627EHF is not set
769CONFIG_HWMON_DEBUG_CHIP=y 810CONFIG_HWMON_DEBUG_CHIP=y
811# CONFIG_WATCHDOG is not set
770 812
771# 813#
772# Misc devices 814# Sonics Silicon Backplane
773# 815#
816CONFIG_SSB_POSSIBLE=y
817# CONFIG_SSB is not set
774 818
775# 819#
776# Multimedia Capabilities Port drivers 820# Multifunction device drivers
777# 821#
822# CONFIG_MFD_SM501 is not set
778 823
779# 824#
780# Multimedia devices 825# Multimedia devices
781# 826#
782# CONFIG_VIDEO_DEV is not set 827# CONFIG_VIDEO_DEV is not set
783 828# CONFIG_DVB_CORE is not set
784# 829CONFIG_DAB=y
785# Digital Video Broadcasting Devices
786#
787# CONFIG_DVB is not set
788 830
789# 831#
790# Graphics support 832# Graphics support
791# 833#
834# CONFIG_AGP is not set
835# CONFIG_DRM is not set
836# CONFIG_VGASTATE is not set
837# CONFIG_VIDEO_OUTPUT_CONTROL is not set
792# CONFIG_FB is not set 838# CONFIG_FB is not set
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
793 840
794# 841#
795# Sound 842# Display device support
796# 843#
797# CONFIG_SOUND is not set 844# CONFIG_DISPLAY_SUPPORT is not set
798 845
799# 846#
800# USB support 847# Sound
801# 848#
849# CONFIG_SOUND is not set
850CONFIG_HID_SUPPORT=y
851CONFIG_HID=y
852# CONFIG_HID_DEBUG is not set
853# CONFIG_HIDRAW is not set
854CONFIG_USB_SUPPORT=y
802CONFIG_USB_ARCH_HAS_HCD=y 855CONFIG_USB_ARCH_HAS_HCD=y
803CONFIG_USB_ARCH_HAS_OHCI=y 856CONFIG_USB_ARCH_HAS_OHCI=y
857CONFIG_USB_ARCH_HAS_EHCI=y
804# CONFIG_USB is not set 858# CONFIG_USB is not set
805 859
806# 860#
@@ -811,20 +865,16 @@ CONFIG_USB_ARCH_HAS_OHCI=y
811# USB Gadget Support 865# USB Gadget Support
812# 866#
813# CONFIG_USB_GADGET is not set 867# CONFIG_USB_GADGET is not set
814
815#
816# MMC/SD Card support
817#
818# CONFIG_MMC is not set 868# CONFIG_MMC is not set
819 869# CONFIG_NEW_LEDS is not set
820#
821# InfiniBand support
822#
823# CONFIG_INFINIBAND is not set 870# CONFIG_INFINIBAND is not set
871# CONFIG_EDAC is not set
872# CONFIG_RTC_CLASS is not set
824 873
825# 874#
826# SN Devices 875# Userspace I/O
827# 876#
877# CONFIG_UIO is not set
828 878
829# 879#
830# File systems 880# File systems
@@ -836,16 +886,19 @@ CONFIG_EXT3_FS=y
836CONFIG_EXT3_FS_XATTR=y 886CONFIG_EXT3_FS_XATTR=y
837# CONFIG_EXT3_FS_POSIX_ACL is not set 887# CONFIG_EXT3_FS_POSIX_ACL is not set
838# CONFIG_EXT3_FS_SECURITY is not set 888# CONFIG_EXT3_FS_SECURITY is not set
889# CONFIG_EXT4DEV_FS is not set
839CONFIG_JBD=y 890CONFIG_JBD=y
840# CONFIG_JBD_DEBUG is not set
841CONFIG_FS_MBCACHE=y 891CONFIG_FS_MBCACHE=y
842# CONFIG_REISERFS_FS is not set 892# CONFIG_REISERFS_FS is not set
843# CONFIG_JFS_FS is not set 893# CONFIG_JFS_FS is not set
844# CONFIG_FS_POSIX_ACL is not set 894# CONFIG_FS_POSIX_ACL is not set
845# CONFIG_XFS_FS is not set 895# CONFIG_XFS_FS is not set
896# CONFIG_GFS2_FS is not set
897# CONFIG_OCFS2_FS is not set
846# CONFIG_MINIX_FS is not set 898# CONFIG_MINIX_FS is not set
847# CONFIG_ROMFS_FS is not set 899# CONFIG_ROMFS_FS is not set
848CONFIG_INOTIFY=y 900CONFIG_INOTIFY=y
901CONFIG_INOTIFY_USER=y
849# CONFIG_QUOTA is not set 902# CONFIG_QUOTA is not set
850CONFIG_DNOTIFY=y 903CONFIG_DNOTIFY=y
851# CONFIG_AUTOFS_FS is not set 904# CONFIG_AUTOFS_FS is not set
@@ -870,11 +923,12 @@ CONFIG_DNOTIFY=y
870# 923#
871CONFIG_PROC_FS=y 924CONFIG_PROC_FS=y
872CONFIG_PROC_KCORE=y 925CONFIG_PROC_KCORE=y
926CONFIG_PROC_SYSCTL=y
873CONFIG_SYSFS=y 927CONFIG_SYSFS=y
874CONFIG_TMPFS=y 928CONFIG_TMPFS=y
929# CONFIG_TMPFS_POSIX_ACL is not set
875# CONFIG_HUGETLB_PAGE is not set 930# CONFIG_HUGETLB_PAGE is not set
876CONFIG_RAMFS=y 931# CONFIG_CONFIGFS_FS is not set
877# CONFIG_RELAYFS_FS is not set
878 932
879# 933#
880# Miscellaneous filesystems 934# Miscellaneous filesystems
@@ -886,13 +940,15 @@ CONFIG_RAMFS=y
886# CONFIG_BEFS_FS is not set 940# CONFIG_BEFS_FS is not set
887# CONFIG_BFS_FS is not set 941# CONFIG_BFS_FS is not set
888# CONFIG_EFS_FS is not set 942# CONFIG_EFS_FS is not set
889# CONFIG_JFFS_FS is not set
890CONFIG_JFFS2_FS=y 943CONFIG_JFFS2_FS=y
891CONFIG_JFFS2_FS_DEBUG=0 944CONFIG_JFFS2_FS_DEBUG=0
892CONFIG_JFFS2_FS_WRITEBUFFER=y 945CONFIG_JFFS2_FS_WRITEBUFFER=y
946# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
893# CONFIG_JFFS2_SUMMARY is not set 947# CONFIG_JFFS2_SUMMARY is not set
948# CONFIG_JFFS2_FS_XATTR is not set
894# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 949# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
895CONFIG_JFFS2_ZLIB=y 950CONFIG_JFFS2_ZLIB=y
951# CONFIG_JFFS2_LZO is not set
896CONFIG_JFFS2_RTIME=y 952CONFIG_JFFS2_RTIME=y
897# CONFIG_JFFS2_RUBIN is not set 953# CONFIG_JFFS2_RUBIN is not set
898CONFIG_CRAMFS=y 954CONFIG_CRAMFS=y
@@ -901,10 +957,7 @@ CONFIG_CRAMFS=y
901# CONFIG_QNX4FS_FS is not set 957# CONFIG_QNX4FS_FS is not set
902# CONFIG_SYSV_FS is not set 958# CONFIG_SYSV_FS is not set
903# CONFIG_UFS_FS is not set 959# CONFIG_UFS_FS is not set
904 960CONFIG_NETWORK_FILESYSTEMS=y
905#
906# Network File Systems
907#
908CONFIG_NFS_FS=y 961CONFIG_NFS_FS=y
909# CONFIG_NFS_V3 is not set 962# CONFIG_NFS_V3 is not set
910# CONFIG_NFS_V4 is not set 963# CONFIG_NFS_V4 is not set
@@ -914,6 +967,7 @@ CONFIG_ROOT_NFS=y
914CONFIG_LOCKD=y 967CONFIG_LOCKD=y
915CONFIG_NFS_COMMON=y 968CONFIG_NFS_COMMON=y
916CONFIG_SUNRPC=y 969CONFIG_SUNRPC=y
970# CONFIG_SUNRPC_BIND34 is not set
917# CONFIG_RPCSEC_GSS_KRB5 is not set 971# CONFIG_RPCSEC_GSS_KRB5 is not set
918# CONFIG_RPCSEC_GSS_SPKM3 is not set 972# CONFIG_RPCSEC_GSS_SPKM3 is not set
919# CONFIG_SMB_FS is not set 973# CONFIG_SMB_FS is not set
@@ -921,7 +975,6 @@ CONFIG_SUNRPC=y
921# CONFIG_NCP_FS is not set 975# CONFIG_NCP_FS is not set
922# CONFIG_CODA_FS is not set 976# CONFIG_CODA_FS is not set
923# CONFIG_AFS_FS is not set 977# CONFIG_AFS_FS is not set
924# CONFIG_9P_FS is not set
925 978
926# 979#
927# Partition Types 980# Partition Types
@@ -937,50 +990,55 @@ CONFIG_PARTITION_ADVANCED=y
937# CONFIG_SGI_PARTITION is not set 990# CONFIG_SGI_PARTITION is not set
938# CONFIG_ULTRIX_PARTITION is not set 991# CONFIG_ULTRIX_PARTITION is not set
939# CONFIG_SUN_PARTITION is not set 992# CONFIG_SUN_PARTITION is not set
993# CONFIG_KARMA_PARTITION is not set
940# CONFIG_EFI_PARTITION is not set 994# CONFIG_EFI_PARTITION is not set
941 995# CONFIG_SYSV68_PARTITION is not set
942#
943# Native Language Support
944#
945# CONFIG_NLS is not set 996# CONFIG_NLS is not set
946# CONFIG_SCC_ENET is not set 997# CONFIG_DLM is not set
947# CONFIG_FEC_ENET is not set
948
949#
950# CPM2 Options
951#
952 998
953# 999#
954# Library routines 1000# Library routines
955# 1001#
1002CONFIG_BITREVERSE=y
956# CONFIG_CRC_CCITT is not set 1003# CONFIG_CRC_CCITT is not set
957# CONFIG_CRC16 is not set 1004# CONFIG_CRC16 is not set
1005# CONFIG_CRC_ITU_T is not set
958CONFIG_CRC32=y 1006CONFIG_CRC32=y
1007# CONFIG_CRC7 is not set
959# CONFIG_LIBCRC32C is not set 1008# CONFIG_LIBCRC32C is not set
960CONFIG_ZLIB_INFLATE=y 1009CONFIG_ZLIB_INFLATE=y
961CONFIG_ZLIB_DEFLATE=y 1010CONFIG_ZLIB_DEFLATE=y
1011CONFIG_PLIST=y
1012CONFIG_HAS_IOMEM=y
1013CONFIG_HAS_IOPORT=y
1014CONFIG_HAS_DMA=y
1015CONFIG_INSTRUMENTATION=y
962# CONFIG_PROFILING is not set 1016# CONFIG_PROFILING is not set
1017# CONFIG_MARKERS is not set
963 1018
964# 1019#
965# Kernel hacking 1020# Kernel hacking
966# 1021#
967# CONFIG_PRINTK_TIME is not set 1022# CONFIG_PRINTK_TIME is not set
1023CONFIG_ENABLE_WARN_DEPRECATED=y
1024CONFIG_ENABLE_MUST_CHECK=y
1025# CONFIG_MAGIC_SYSRQ is not set
1026# CONFIG_UNUSED_SYMBOLS is not set
1027# CONFIG_DEBUG_FS is not set
1028# CONFIG_HEADERS_CHECK is not set
968# CONFIG_DEBUG_KERNEL is not set 1029# CONFIG_DEBUG_KERNEL is not set
969CONFIG_LOG_BUF_SHIFT=14 1030# CONFIG_SLUB_DEBUG_ON is not set
1031# CONFIG_DEBUG_BUGVERBOSE is not set
1032# CONFIG_SAMPLES is not set
970# CONFIG_KGDB_CONSOLE is not set 1033# CONFIG_KGDB_CONSOLE is not set
971# CONFIG_SERIAL_TEXT_DEBUG is not set 1034# CONFIG_PPC_EARLY_DEBUG is not set
972 1035
973# 1036#
974# Security options 1037# Security options
975# 1038#
976# CONFIG_KEYS is not set 1039# CONFIG_KEYS is not set
977# CONFIG_SECURITY is not set 1040# CONFIG_SECURITY is not set
978 1041# CONFIG_SECURITY_FILE_CAPABILITIES is not set
979#
980# Cryptographic options
981#
982# CONFIG_CRYPTO is not set 1042# CONFIG_CRYPTO is not set
983 1043# CONFIG_PPC_CLOCK is not set
984# 1044CONFIG_PPC_LIB_RHEAP=y
985# Hardware crypto devices
986#
diff --git a/arch/ppc/configs/TQM8555_defconfig b/arch/powerpc/configs/tqm8555_defconfig
index 43a0d9df1e23..a3af2262128b 100644
--- a/arch/ppc/configs/TQM8555_defconfig
+++ b/arch/powerpc/configs/tqm8555_defconfig
@@ -1,66 +1,116 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc2 3# Linux kernel version: 2.6.24-rc8
4# Thu Nov 24 17:10:52 2005 4# Fri Jan 25 01:15:24 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
10CONFIG_PPC=y 40CONFIG_PPC=y
11CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
12CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 63CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 64CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
33CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
34# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
35# CONFIG_HOTPLUG is not set
36CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
38CONFIG_INITRAMFS_SOURCE="" 82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
40# CONFIG_KALLSYMS is not set 87# CONFIG_KALLSYMS is not set
88# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 89CONFIG_PRINTK=y
42CONFIG_BUG=y 90CONFIG_BUG=y
91CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 92CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 93CONFIG_FUTEX=y
94CONFIG_ANON_INODES=y
45# CONFIG_EPOLL is not set 95# CONFIG_EPOLL is not set
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 96CONFIG_SIGNALFD=y
97CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 98CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 99CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 100CONFIG_SLUB_DEBUG=y
50CONFIG_CC_ALIGN_LOOPS=0 101# CONFIG_SLAB is not set
51CONFIG_CC_ALIGN_JUMPS=0 102CONFIG_SLUB=y
103# CONFIG_SLOB is not set
104CONFIG_SLABINFO=y
105CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58# CONFIG_MODULES is not set 108# CONFIG_MODULES is not set
59 109CONFIG_BLOCK=y
60#
61# Block layer
62#
63# CONFIG_LBD is not set 110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113# CONFIG_BLK_DEV_BSG is not set
64 114
65# 115#
66# IO Schedulers 116# IO Schedulers
@@ -76,56 +126,63 @@ CONFIG_DEFAULT_AS=y
76CONFIG_DEFAULT_IOSCHED="anticipatory" 126CONFIG_DEFAULT_IOSCHED="anticipatory"
77 127
78# 128#
79# Processor 129# Platform support
80#
81# CONFIG_6xx is not set
82# CONFIG_40x is not set
83# CONFIG_44x is not set
84# CONFIG_POWER3 is not set
85# CONFIG_POWER4 is not set
86# CONFIG_8xx is not set
87# CONFIG_E200 is not set
88CONFIG_E500=y
89CONFIG_BOOKE=y
90CONFIG_FSL_BOOKE=y
91# CONFIG_PHYS_64BIT is not set
92CONFIG_SPE=y
93CONFIG_MATH_EMULATION=y
94# CONFIG_KEXEC is not set
95# CONFIG_CPU_FREQ is not set
96# CONFIG_WANT_EARLY_SERIAL is not set
97CONFIG_PPC_GEN550=y
98CONFIG_85xx=y
99CONFIG_PPC_INDIRECT_PCI_BE=y
100
101#
102# Freescale 85xx options
103# 130#
131# CONFIG_PPC_MPC52xx is not set
132# CONFIG_PPC_MPC5200 is not set
133# CONFIG_PPC_CELL is not set
134# CONFIG_PPC_CELL_NATIVE is not set
135# CONFIG_PQ2ADS is not set
104# CONFIG_MPC8540_ADS is not set 136# CONFIG_MPC8540_ADS is not set
105# CONFIG_MPC8548_CDS is not set
106# CONFIG_MPC8555_CDS is not set
107# CONFIG_MPC8560_ADS is not set 137# CONFIG_MPC8560_ADS is not set
108# CONFIG_SBC8560 is not set 138# CONFIG_MPC85xx_CDS is not set
139# CONFIG_MPC85xx_MDS is not set
140# CONFIG_MPC85xx_DS is not set
109# CONFIG_STX_GP3 is not set 141# CONFIG_STX_GP3 is not set
110# CONFIG_TQM8540 is not set 142# CONFIG_TQM8540 is not set
111# CONFIG_TQM8541 is not set 143# CONFIG_TQM8541 is not set
112CONFIG_TQM8555=y 144CONFIG_TQM8555=y
113# CONFIG_TQM8560 is not set 145# CONFIG_TQM8560 is not set
114CONFIG_MPC8555=y 146CONFIG_TQM85xx=y
147CONFIG_MPC85xx=y
148# CONFIG_IPIC is not set
149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159CONFIG_CPM2=y
160CONFIG_PPC_CPM_NEW_BINDING=y
161# CONFIG_FSL_ULI1575 is not set
162CONFIG_CPM=y
115 163
116# 164#
117# Platform options 165# Kernel options
118# 166#
119CONFIG_CPM2=y
120# CONFIG_PC_KEYBOARD is not set
121# CONFIG_HIGHMEM is not set 167# CONFIG_HIGHMEM is not set
168# CONFIG_TICK_ONESHOT is not set
169# CONFIG_NO_HZ is not set
170# CONFIG_HIGH_RES_TIMERS is not set
171CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
122# CONFIG_HZ_100 is not set 172# CONFIG_HZ_100 is not set
123CONFIG_HZ_250=y 173CONFIG_HZ_250=y
174# CONFIG_HZ_300 is not set
124# CONFIG_HZ_1000 is not set 175# CONFIG_HZ_1000 is not set
125CONFIG_HZ=250 176CONFIG_HZ=250
126CONFIG_PREEMPT_NONE=y 177CONFIG_PREEMPT_NONE=y
127# CONFIG_PREEMPT_VOLUNTARY is not set 178# CONFIG_PREEMPT_VOLUNTARY is not set
128# CONFIG_PREEMPT is not set 179# CONFIG_PREEMPT is not set
180CONFIG_BINFMT_ELF=y
181# CONFIG_BINFMT_MISC is not set
182CONFIG_MATH_EMULATION=y
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184CONFIG_ARCH_FLATMEM_ENABLE=y
185CONFIG_ARCH_POPULATES_NODE_MAP=y
129CONFIG_SELECT_MEMORY_MODEL=y 186CONFIG_SELECT_MEMORY_MODEL=y
130CONFIG_FLATMEM_MANUAL=y 187CONFIG_FLATMEM_MANUAL=y
131# CONFIG_DISCONTIGMEM_MANUAL is not set 188# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -133,28 +190,36 @@ CONFIG_FLATMEM_MANUAL=y
133CONFIG_FLATMEM=y 190CONFIG_FLATMEM=y
134CONFIG_FLAT_NODE_MEM_MAP=y 191CONFIG_FLAT_NODE_MEM_MAP=y
135# CONFIG_SPARSEMEM_STATIC is not set 192# CONFIG_SPARSEMEM_STATIC is not set
193# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
136CONFIG_SPLIT_PTLOCK_CPUS=4 194CONFIG_SPLIT_PTLOCK_CPUS=4
137CONFIG_BINFMT_ELF=y 195# CONFIG_RESOURCES_64BIT is not set
138# CONFIG_BINFMT_MISC is not set 196CONFIG_ZONE_DMA_FLAG=1
197CONFIG_BOUNCE=y
198CONFIG_VIRT_TO_BUS=y
199# CONFIG_PROC_DEVICETREE is not set
139# CONFIG_CMDLINE_BOOL is not set 200# CONFIG_CMDLINE_BOOL is not set
140# CONFIG_PM is not set 201# CONFIG_PM is not set
141# CONFIG_HIBERNATION is not set 202CONFIG_SUSPEND_UP_POSSIBLE=y
203CONFIG_HIBERNATION_UP_POSSIBLE=y
142CONFIG_SECCOMP=y 204CONFIG_SECCOMP=y
205CONFIG_WANT_DEVICE_TREE=y
206CONFIG_DEVICE_TREE="tqm8555.dts"
143CONFIG_ISA_DMA_API=y 207CONFIG_ISA_DMA_API=y
144 208
145# 209#
146# Bus options 210# Bus options
147# 211#
148CONFIG_PPC_I8259=y 212CONFIG_ZONE_DMA=y
149CONFIG_PPC_INDIRECT_PCI=y 213CONFIG_PPC_INDIRECT_PCI=y
214CONFIG_FSL_SOC=y
215CONFIG_FSL_PCI=y
150CONFIG_PCI=y 216CONFIG_PCI=y
151CONFIG_PCI_DOMAINS=y 217CONFIG_PCI_DOMAINS=y
152# CONFIG_PCI_LEGACY_PROC is not set 218CONFIG_PCI_SYSCALL=y
153 219# CONFIG_PCIEPORTBUS is not set
154# 220CONFIG_ARCH_SUPPORTS_MSI=y
155# PCCARD (PCMCIA/CardBus) support 221# CONFIG_PCI_MSI is not set
156# 222CONFIG_PCI_LEGACY=y
157# CONFIG_PCCARD is not set
158 223
159# 224#
160# Advanced setup 225# Advanced setup
@@ -167,7 +232,7 @@ CONFIG_PCI_DOMAINS=y
167CONFIG_HIGHMEM_START=0xfe000000 232CONFIG_HIGHMEM_START=0xfe000000
168CONFIG_LOWMEM_SIZE=0x30000000 233CONFIG_LOWMEM_SIZE=0x30000000
169CONFIG_KERNEL_START=0xc0000000 234CONFIG_KERNEL_START=0xc0000000
170CONFIG_TASK_SIZE=0x80000000 235CONFIG_TASK_SIZE=0xc0000000
171CONFIG_BOOT_LOAD=0x00800000 236CONFIG_BOOT_LOAD=0x00800000
172 237
173# 238#
@@ -181,6 +246,10 @@ CONFIG_NET=y
181CONFIG_PACKET=y 246CONFIG_PACKET=y
182# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
183CONFIG_UNIX=y 248CONFIG_UNIX=y
249CONFIG_XFRM=y
250# CONFIG_XFRM_USER is not set
251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
184# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
185CONFIG_INET=y 254CONFIG_INET=y
186CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -198,23 +267,26 @@ CONFIG_SYN_COOKIES=y
198# CONFIG_INET_AH is not set 267# CONFIG_INET_AH is not set
199# CONFIG_INET_ESP is not set 268# CONFIG_INET_ESP is not set
200# CONFIG_INET_IPCOMP is not set 269# CONFIG_INET_IPCOMP is not set
270# CONFIG_INET_XFRM_TUNNEL is not set
201# CONFIG_INET_TUNNEL is not set 271# CONFIG_INET_TUNNEL is not set
272CONFIG_INET_XFRM_MODE_TRANSPORT=y
273CONFIG_INET_XFRM_MODE_TUNNEL=y
274CONFIG_INET_XFRM_MODE_BEET=y
275# CONFIG_INET_LRO is not set
202CONFIG_INET_DIAG=y 276CONFIG_INET_DIAG=y
203CONFIG_INET_TCP_DIAG=y 277CONFIG_INET_TCP_DIAG=y
204# CONFIG_TCP_CONG_ADVANCED is not set 278# CONFIG_TCP_CONG_ADVANCED is not set
205CONFIG_TCP_CONG_BIC=y 279CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set
206# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set
285# CONFIG_NETWORK_SECMARK is not set
207# CONFIG_NETFILTER is not set 286# CONFIG_NETFILTER is not set
208
209#
210# DCCP Configuration (EXPERIMENTAL)
211#
212# CONFIG_IP_DCCP is not set 287# CONFIG_IP_DCCP is not set
213
214#
215# SCTP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_SCTP is not set 288# CONFIG_IP_SCTP is not set
289# CONFIG_TIPC is not set
218# CONFIG_ATM is not set 290# CONFIG_ATM is not set
219# CONFIG_BRIDGE is not set 291# CONFIG_BRIDGE is not set
220# CONFIG_VLAN_8021Q is not set 292# CONFIG_VLAN_8021Q is not set
@@ -224,13 +296,8 @@ CONFIG_TCP_CONG_BIC=y
224# CONFIG_ATALK is not set 296# CONFIG_ATALK is not set
225# CONFIG_X25 is not set 297# CONFIG_X25 is not set
226# CONFIG_LAPB is not set 298# CONFIG_LAPB is not set
227# CONFIG_NET_DIVERT is not set
228# CONFIG_ECONET is not set 299# CONFIG_ECONET is not set
229# CONFIG_WAN_ROUTER is not set 300# CONFIG_WAN_ROUTER is not set
230
231#
232# QoS and/or fair queueing
233#
234# CONFIG_NET_SCHED is not set 301# CONFIG_NET_SCHED is not set
235 302
236# 303#
@@ -240,7 +307,17 @@ CONFIG_TCP_CONG_BIC=y
240# CONFIG_HAMRADIO is not set 307# CONFIG_HAMRADIO is not set
241# CONFIG_IRDA is not set 308# CONFIG_IRDA is not set
242# CONFIG_BT is not set 309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
243# CONFIG_IEEE80211 is not set 318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
320# CONFIG_NET_9P is not set
244 321
245# 322#
246# Device Drivers 323# Device Drivers
@@ -251,16 +328,8 @@ CONFIG_TCP_CONG_BIC=y
251# 328#
252CONFIG_STANDALONE=y 329CONFIG_STANDALONE=y
253CONFIG_PREVENT_FIRMWARE_BUILD=y 330CONFIG_PREVENT_FIRMWARE_BUILD=y
254# CONFIG_FW_LOADER is not set 331# CONFIG_SYS_HYPERVISOR is not set
255
256#
257# Connector - unified userspace <-> kernelspace linker
258#
259# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
260
261#
262# Memory Technology Devices (MTD)
263#
264CONFIG_MTD=y 333CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
266CONFIG_MTD_CONCAT=y 335CONFIG_MTD_CONCAT=y
@@ -272,11 +341,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
272# User Modules And Translation Layers 341# User Modules And Translation Layers
273# 342#
274CONFIG_MTD_CHAR=y 343CONFIG_MTD_CHAR=y
344CONFIG_MTD_BLKDEVS=y
275CONFIG_MTD_BLOCK=y 345CONFIG_MTD_BLOCK=y
276# CONFIG_FTL is not set 346# CONFIG_FTL is not set
277# CONFIG_NFTL is not set 347# CONFIG_NFTL is not set
278# CONFIG_INFTL is not set 348# CONFIG_INFTL is not set
279# CONFIG_RFD_FTL is not set 349# CONFIG_RFD_FTL is not set
350# CONFIG_SSFDC is not set
351# CONFIG_MTD_OOPS is not set
280 352
281# 353#
282# RAM/ROM/Flash chip drivers 354# RAM/ROM/Flash chip drivers
@@ -297,7 +369,6 @@ CONFIG_MTD_CFI_I2=y
297# CONFIG_MTD_CFI_I8 is not set 369# CONFIG_MTD_CFI_I8 is not set
298# CONFIG_MTD_CFI_INTELEXT is not set 370# CONFIG_MTD_CFI_INTELEXT is not set
299CONFIG_MTD_CFI_AMDSTD=y 371CONFIG_MTD_CFI_AMDSTD=y
300CONFIG_MTD_CFI_AMDSTD_RETRY=0
301# CONFIG_MTD_CFI_STAA is not set 372# CONFIG_MTD_CFI_STAA is not set
302CONFIG_MTD_CFI_UTIL=y 373CONFIG_MTD_CFI_UTIL=y
303# CONFIG_MTD_RAM is not set 374# CONFIG_MTD_RAM is not set
@@ -309,7 +380,8 @@ CONFIG_MTD_CFI_UTIL=y
309# 380#
310# CONFIG_MTD_COMPLEX_MAPPINGS is not set 381# CONFIG_MTD_COMPLEX_MAPPINGS is not set
311# CONFIG_MTD_PHYSMAP is not set 382# CONFIG_MTD_PHYSMAP is not set
312CONFIG_MTD_TQM85xx=y 383# CONFIG_MTD_PHYSMAP_OF is not set
384# CONFIG_MTD_INTEL_VR_NOR is not set
313# CONFIG_MTD_PLATRAM is not set 385# CONFIG_MTD_PLATRAM is not set
314 386
315# 387#
@@ -319,7 +391,6 @@ CONFIG_MTD_TQM85xx=y
319# CONFIG_MTD_SLRAM is not set 391# CONFIG_MTD_SLRAM is not set
320# CONFIG_MTD_PHRAM is not set 392# CONFIG_MTD_PHRAM is not set
321# CONFIG_MTD_MTDRAM is not set 393# CONFIG_MTD_MTDRAM is not set
322# CONFIG_MTD_BLKMTD is not set
323# CONFIG_MTD_BLOCK2MTD is not set 394# CONFIG_MTD_BLOCK2MTD is not set
324 395
325# 396#
@@ -328,29 +399,16 @@ CONFIG_MTD_TQM85xx=y
328# CONFIG_MTD_DOC2000 is not set 399# CONFIG_MTD_DOC2000 is not set
329# CONFIG_MTD_DOC2001 is not set 400# CONFIG_MTD_DOC2001 is not set
330# CONFIG_MTD_DOC2001PLUS is not set 401# CONFIG_MTD_DOC2001PLUS is not set
331
332#
333# NAND Flash Device Drivers
334#
335# CONFIG_MTD_NAND is not set 402# CONFIG_MTD_NAND is not set
336
337#
338# OneNAND Flash Device Drivers
339#
340# CONFIG_MTD_ONENAND is not set 403# CONFIG_MTD_ONENAND is not set
341 404
342# 405#
343# Parallel port support 406# UBI - Unsorted block images
344# 407#
408# CONFIG_MTD_UBI is not set
409CONFIG_OF_DEVICE=y
345# CONFIG_PARPORT is not set 410# CONFIG_PARPORT is not set
346 411CONFIG_BLK_DEV=y
347#
348# Plug and Play support
349#
350
351#
352# Block devices
353#
354# CONFIG_BLK_DEV_FD is not set 412# CONFIG_BLK_DEV_FD is not set
355# CONFIG_BLK_CPQ_DA is not set 413# CONFIG_BLK_CPQ_DA is not set
356# CONFIG_BLK_CPQ_CISS_DA is not set 414# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,14 +422,16 @@ CONFIG_BLK_DEV_LOOP=y
364CONFIG_BLK_DEV_RAM=y 422CONFIG_BLK_DEV_RAM=y
365CONFIG_BLK_DEV_RAM_COUNT=16 423CONFIG_BLK_DEV_RAM_COUNT=16
366CONFIG_BLK_DEV_RAM_SIZE=32768 424CONFIG_BLK_DEV_RAM_SIZE=32768
367CONFIG_BLK_DEV_INITRD=y 425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# CONFIG_CDROM_PKTCDVD is not set 426# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 427# CONFIG_ATA_OVER_ETH is not set
370 428CONFIG_MISC_DEVICES=y
371# 429# CONFIG_PHANTOM is not set
372# ATA/ATAPI/MFM/RLL support 430# CONFIG_EEPROM_93CX6 is not set
373# 431# CONFIG_SGI_IOC4 is not set
432# CONFIG_TIFM_CORE is not set
374CONFIG_IDE=y 433CONFIG_IDE=y
434CONFIG_IDE_MAX_HWIFS=4
375CONFIG_BLK_DEV_IDE=y 435CONFIG_BLK_DEV_IDE=y
376 436
377# 437#
@@ -384,21 +444,24 @@ CONFIG_BLK_DEV_IDEDISK=y
384# CONFIG_BLK_DEV_IDETAPE is not set 444# CONFIG_BLK_DEV_IDETAPE is not set
385# CONFIG_BLK_DEV_IDEFLOPPY is not set 445# CONFIG_BLK_DEV_IDEFLOPPY is not set
386# CONFIG_IDE_TASK_IOCTL is not set 446# CONFIG_IDE_TASK_IOCTL is not set
447CONFIG_IDE_PROC_FS=y
387 448
388# 449#
389# IDE chipset support/bugfixes 450# IDE chipset support/bugfixes
390# 451#
391CONFIG_IDE_GENERIC=y 452CONFIG_IDE_GENERIC=y
453# CONFIG_BLK_DEV_PLATFORM is not set
454
455#
456# PCI IDE chipsets support
457#
392CONFIG_BLK_DEV_IDEPCI=y 458CONFIG_BLK_DEV_IDEPCI=y
393CONFIG_IDEPCI_SHARE_IRQ=y 459CONFIG_IDEPCI_SHARE_IRQ=y
460CONFIG_IDEPCI_PCIBUS_ORDER=y
394# CONFIG_BLK_DEV_OFFBOARD is not set 461# CONFIG_BLK_DEV_OFFBOARD is not set
395CONFIG_BLK_DEV_GENERIC=y 462CONFIG_BLK_DEV_GENERIC=y
396# CONFIG_BLK_DEV_OPTI621 is not set 463# CONFIG_BLK_DEV_OPTI621 is not set
397# CONFIG_BLK_DEV_SL82C105 is not set
398CONFIG_BLK_DEV_IDEDMA_PCI=y 464CONFIG_BLK_DEV_IDEDMA_PCI=y
399# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
400CONFIG_IDEDMA_PCI_AUTO=y
401# CONFIG_IDEDMA_ONLYDISK is not set
402# CONFIG_BLK_DEV_AEC62XX is not set 465# CONFIG_BLK_DEV_AEC62XX is not set
403# CONFIG_BLK_DEV_ALI15X3 is not set 466# CONFIG_BLK_DEV_ALI15X3 is not set
404# CONFIG_BLK_DEV_AMD74XX is not set 467# CONFIG_BLK_DEV_AMD74XX is not set
@@ -409,21 +472,24 @@ CONFIG_IDEDMA_PCI_AUTO=y
409# CONFIG_BLK_DEV_CS5530 is not set 472# CONFIG_BLK_DEV_CS5530 is not set
410# CONFIG_BLK_DEV_HPT34X is not set 473# CONFIG_BLK_DEV_HPT34X is not set
411# CONFIG_BLK_DEV_HPT366 is not set 474# CONFIG_BLK_DEV_HPT366 is not set
475# CONFIG_BLK_DEV_JMICRON is not set
412# CONFIG_BLK_DEV_SC1200 is not set 476# CONFIG_BLK_DEV_SC1200 is not set
413# CONFIG_BLK_DEV_PIIX is not set 477# CONFIG_BLK_DEV_PIIX is not set
478# CONFIG_BLK_DEV_IT8213 is not set
414# CONFIG_BLK_DEV_IT821X is not set 479# CONFIG_BLK_DEV_IT821X is not set
415# CONFIG_BLK_DEV_NS87415 is not set 480# CONFIG_BLK_DEV_NS87415 is not set
416# CONFIG_BLK_DEV_PDC202XX_OLD is not set 481# CONFIG_BLK_DEV_PDC202XX_OLD is not set
417# CONFIG_BLK_DEV_PDC202XX_NEW is not set 482# CONFIG_BLK_DEV_PDC202XX_NEW is not set
418# CONFIG_BLK_DEV_SVWKS is not set 483# CONFIG_BLK_DEV_SVWKS is not set
419# CONFIG_BLK_DEV_SIIMAGE is not set 484# CONFIG_BLK_DEV_SIIMAGE is not set
485# CONFIG_BLK_DEV_SL82C105 is not set
420# CONFIG_BLK_DEV_SLC90E66 is not set 486# CONFIG_BLK_DEV_SLC90E66 is not set
421# CONFIG_BLK_DEV_TRM290 is not set 487# CONFIG_BLK_DEV_TRM290 is not set
422CONFIG_BLK_DEV_VIA82CXXX=y 488CONFIG_BLK_DEV_VIA82CXXX=y
489# CONFIG_BLK_DEV_TC86C001 is not set
423# CONFIG_IDE_ARM is not set 490# CONFIG_IDE_ARM is not set
424CONFIG_BLK_DEV_IDEDMA=y 491CONFIG_BLK_DEV_IDEDMA=y
425# CONFIG_IDEDMA_IVB is not set 492CONFIG_IDE_ARCH_OBSOLETE_INIT=y
426CONFIG_IDEDMA_AUTO=y
427# CONFIG_BLK_DEV_HD is not set 493# CONFIG_BLK_DEV_HD is not set
428 494
429# 495#
@@ -431,49 +497,28 @@ CONFIG_IDEDMA_AUTO=y
431# 497#
432# CONFIG_RAID_ATTRS is not set 498# CONFIG_RAID_ATTRS is not set
433# CONFIG_SCSI is not set 499# CONFIG_SCSI is not set
434 500# CONFIG_SCSI_DMA is not set
435# 501# CONFIG_SCSI_NETLINK is not set
436# Multi-device support (RAID and LVM) 502# CONFIG_ATA is not set
437#
438# CONFIG_MD is not set 503# CONFIG_MD is not set
439
440#
441# Fusion MPT device support
442#
443# CONFIG_FUSION is not set 504# CONFIG_FUSION is not set
444 505
445# 506#
446# IEEE 1394 (FireWire) support 507# IEEE 1394 (FireWire) support
447# 508#
509# CONFIG_FIREWIRE is not set
448# CONFIG_IEEE1394 is not set 510# CONFIG_IEEE1394 is not set
449
450#
451# I2O device support
452#
453# CONFIG_I2O is not set 511# CONFIG_I2O is not set
454 512# CONFIG_MACINTOSH_DRIVERS is not set
455#
456# Macintosh device drivers
457#
458# CONFIG_WINDFARM is not set
459
460#
461# Network device support
462#
463CONFIG_NETDEVICES=y 513CONFIG_NETDEVICES=y
514# CONFIG_NETDEVICES_MULTIQUEUE is not set
464# CONFIG_DUMMY is not set 515# CONFIG_DUMMY is not set
465# CONFIG_BONDING is not set 516# CONFIG_BONDING is not set
517# CONFIG_MACVLAN is not set
466# CONFIG_EQUALIZER is not set 518# CONFIG_EQUALIZER is not set
467# CONFIG_TUN is not set 519# CONFIG_TUN is not set
468 520# CONFIG_VETH is not set
469#
470# ARCnet devices
471#
472# CONFIG_ARCNET is not set 521# CONFIG_ARCNET is not set
473
474#
475# PHY device support
476#
477CONFIG_PHYLIB=y 522CONFIG_PHYLIB=y
478 523
479# 524#
@@ -484,29 +529,30 @@ CONFIG_PHYLIB=y
484# CONFIG_QSEMI_PHY is not set 529# CONFIG_QSEMI_PHY is not set
485# CONFIG_LXT_PHY is not set 530# CONFIG_LXT_PHY is not set
486# CONFIG_CICADA_PHY is not set 531# CONFIG_CICADA_PHY is not set
487 532# CONFIG_VITESSE_PHY is not set
488# 533# CONFIG_SMSC_PHY is not set
489# Ethernet (10 or 100Mbit) 534# CONFIG_BROADCOM_PHY is not set
490# 535# CONFIG_ICPLUS_PHY is not set
536# CONFIG_FIXED_PHY is not set
537# CONFIG_MDIO_BITBANG is not set
491CONFIG_NET_ETHERNET=y 538CONFIG_NET_ETHERNET=y
492CONFIG_MII=y 539CONFIG_MII=y
493# CONFIG_HAPPYMEAL is not set 540# CONFIG_HAPPYMEAL is not set
494# CONFIG_SUNGEM is not set 541# CONFIG_SUNGEM is not set
495# CONFIG_CASSINI is not set 542# CONFIG_CASSINI is not set
496# CONFIG_NET_VENDOR_3COM is not set 543# CONFIG_NET_VENDOR_3COM is not set
497
498#
499# Tulip family network device support
500#
501# CONFIG_NET_TULIP is not set 544# CONFIG_NET_TULIP is not set
502# CONFIG_HP100 is not set 545# CONFIG_HP100 is not set
546# CONFIG_IBM_NEW_EMAC_ZMII is not set
547# CONFIG_IBM_NEW_EMAC_RGMII is not set
548# CONFIG_IBM_NEW_EMAC_TAH is not set
549# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
503CONFIG_NET_PCI=y 550CONFIG_NET_PCI=y
504# CONFIG_PCNET32 is not set 551# CONFIG_PCNET32 is not set
505# CONFIG_AMD8111_ETH is not set 552# CONFIG_AMD8111_ETH is not set
506# CONFIG_ADAPTEC_STARFIRE is not set 553# CONFIG_ADAPTEC_STARFIRE is not set
507# CONFIG_B44 is not set 554# CONFIG_B44 is not set
508# CONFIG_FORCEDETH is not set 555# CONFIG_FORCEDETH is not set
509# CONFIG_DGRS is not set
510# CONFIG_EEPRO100 is not set 556# CONFIG_EEPRO100 is not set
511CONFIG_E100=y 557CONFIG_E100=y
512# CONFIG_FEALNX is not set 558# CONFIG_FEALNX is not set
@@ -519,47 +565,47 @@ CONFIG_E100=y
519# CONFIG_SUNDANCE is not set 565# CONFIG_SUNDANCE is not set
520# CONFIG_TLAN is not set 566# CONFIG_TLAN is not set
521# CONFIG_VIA_RHINE is not set 567# CONFIG_VIA_RHINE is not set
568# CONFIG_SC92031 is not set
522# CONFIG_FS_ENET is not set 569# CONFIG_FS_ENET is not set
523 570CONFIG_NETDEV_1000=y
524#
525# Ethernet (1000 Mbit)
526#
527# CONFIG_ACENIC is not set 571# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 572# CONFIG_DL2K is not set
529# CONFIG_E1000 is not set 573# CONFIG_E1000 is not set
574# CONFIG_E1000E is not set
575# CONFIG_IP1000 is not set
530# CONFIG_NS83820 is not set 576# CONFIG_NS83820 is not set
531# CONFIG_HAMACHI is not set 577# CONFIG_HAMACHI is not set
532# CONFIG_YELLOWFIN is not set 578# CONFIG_YELLOWFIN is not set
533# CONFIG_R8169 is not set 579# CONFIG_R8169 is not set
534# CONFIG_SIS190 is not set 580# CONFIG_SIS190 is not set
535# CONFIG_SKGE is not set 581# CONFIG_SKGE is not set
582# CONFIG_SKY2 is not set
536# CONFIG_SK98LIN is not set 583# CONFIG_SK98LIN is not set
537# CONFIG_VIA_VELOCITY is not set 584# CONFIG_VIA_VELOCITY is not set
538# CONFIG_TIGON3 is not set 585# CONFIG_TIGON3 is not set
539# CONFIG_BNX2 is not set 586# CONFIG_BNX2 is not set
540CONFIG_GIANFAR=y 587CONFIG_GIANFAR=y
541CONFIG_GFAR_NAPI=y 588CONFIG_GFAR_NAPI=y
542 589# CONFIG_QLA3XXX is not set
543# 590# CONFIG_ATL1 is not set
544# Ethernet (10000 Mbit) 591CONFIG_NETDEV_10000=y
545#
546# CONFIG_CHELSIO_T1 is not set 592# CONFIG_CHELSIO_T1 is not set
593# CONFIG_CHELSIO_T3 is not set
594# CONFIG_IXGBE is not set
547# CONFIG_IXGB is not set 595# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 596# CONFIG_S2IO is not set
549 597# CONFIG_MYRI10GE is not set
550# 598# CONFIG_NETXEN_NIC is not set
551# Token Ring devices 599# CONFIG_NIU is not set
552# 600# CONFIG_MLX4_CORE is not set
601# CONFIG_TEHUTI is not set
553# CONFIG_TR is not set 602# CONFIG_TR is not set
554 603
555# 604#
556# Wireless LAN (non-hamradio) 605# Wireless LAN
557#
558# CONFIG_NET_RADIO is not set
559
560#
561# Wan interfaces
562# 606#
607# CONFIG_WLAN_PRE80211 is not set
608# CONFIG_WLAN_80211 is not set
563# CONFIG_WAN is not set 609# CONFIG_WAN is not set
564# CONFIG_FDDI is not set 610# CONFIG_FDDI is not set
565# CONFIG_HIPPI is not set 611# CONFIG_HIPPI is not set
@@ -569,28 +615,21 @@ CONFIG_GFAR_NAPI=y
569# CONFIG_NETCONSOLE is not set 615# CONFIG_NETCONSOLE is not set
570# CONFIG_NETPOLL is not set 616# CONFIG_NETPOLL is not set
571# CONFIG_NET_POLL_CONTROLLER is not set 617# CONFIG_NET_POLL_CONTROLLER is not set
572
573#
574# ISDN subsystem
575#
576# CONFIG_ISDN is not set 618# CONFIG_ISDN is not set
577
578#
579# Telephony Support
580#
581# CONFIG_PHONE is not set 619# CONFIG_PHONE is not set
582 620
583# 621#
584# Input device support 622# Input device support
585# 623#
586CONFIG_INPUT=y 624CONFIG_INPUT=y
625# CONFIG_INPUT_FF_MEMLESS is not set
626# CONFIG_INPUT_POLLDEV is not set
587 627
588# 628#
589# Userland interfaces 629# Userland interfaces
590# 630#
591# CONFIG_INPUT_MOUSEDEV is not set 631# CONFIG_INPUT_MOUSEDEV is not set
592# CONFIG_INPUT_JOYDEV is not set 632# CONFIG_INPUT_JOYDEV is not set
593# CONFIG_INPUT_TSDEV is not set
594# CONFIG_INPUT_EVDEV is not set 633# CONFIG_INPUT_EVDEV is not set
595# CONFIG_INPUT_EVBUG is not set 634# CONFIG_INPUT_EVBUG is not set
596 635
@@ -600,6 +639,7 @@ CONFIG_INPUT=y
600# CONFIG_INPUT_KEYBOARD is not set 639# CONFIG_INPUT_KEYBOARD is not set
601# CONFIG_INPUT_MOUSE is not set 640# CONFIG_INPUT_MOUSE is not set
602# CONFIG_INPUT_JOYSTICK is not set 641# CONFIG_INPUT_JOYSTICK is not set
642# CONFIG_INPUT_TABLET is not set
603# CONFIG_INPUT_TOUCHSCREEN is not set 643# CONFIG_INPUT_TOUCHSCREEN is not set
604# CONFIG_INPUT_MISC is not set 644# CONFIG_INPUT_MISC is not set
605 645
@@ -620,53 +660,43 @@ CONFIG_INPUT=y
620# 660#
621CONFIG_SERIAL_8250=y 661CONFIG_SERIAL_8250=y
622CONFIG_SERIAL_8250_CONSOLE=y 662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_PCI=y
623CONFIG_SERIAL_8250_NR_UARTS=4 664CONFIG_SERIAL_8250_NR_UARTS=4
665CONFIG_SERIAL_8250_RUNTIME_UARTS=4
624# CONFIG_SERIAL_8250_EXTENDED is not set 666# CONFIG_SERIAL_8250_EXTENDED is not set
667CONFIG_SERIAL_8250_SHARE_IRQ=y
625 668
626# 669#
627# Non-8250 serial port support 670# Non-8250 serial port support
628# 671#
672# CONFIG_SERIAL_UARTLITE is not set
629CONFIG_SERIAL_CORE=y 673CONFIG_SERIAL_CORE=y
630CONFIG_SERIAL_CORE_CONSOLE=y 674CONFIG_SERIAL_CORE_CONSOLE=y
631# CONFIG_SERIAL_CPM is not set 675CONFIG_SERIAL_CPM=y
676CONFIG_SERIAL_CPM_CONSOLE=y
677CONFIG_SERIAL_CPM_SCC1=y
678# CONFIG_SERIAL_CPM_SCC2 is not set
679# CONFIG_SERIAL_CPM_SCC3 is not set
680# CONFIG_SERIAL_CPM_SCC4 is not set
681# CONFIG_SERIAL_CPM_SMC1 is not set
682# CONFIG_SERIAL_CPM_SMC2 is not set
632# CONFIG_SERIAL_JSM is not set 683# CONFIG_SERIAL_JSM is not set
684# CONFIG_SERIAL_OF_PLATFORM is not set
633CONFIG_UNIX98_PTYS=y 685CONFIG_UNIX98_PTYS=y
634CONFIG_LEGACY_PTYS=y 686CONFIG_LEGACY_PTYS=y
635CONFIG_LEGACY_PTY_COUNT=256 687CONFIG_LEGACY_PTY_COUNT=256
636
637#
638# IPMI
639#
640# CONFIG_IPMI_HANDLER is not set 688# CONFIG_IPMI_HANDLER is not set
641 689CONFIG_HW_RANDOM=y
642#
643# Watchdog Cards
644#
645# CONFIG_WATCHDOG is not set
646# CONFIG_NVRAM is not set 690# CONFIG_NVRAM is not set
647CONFIG_GEN_RTC=y 691CONFIG_GEN_RTC=y
648# CONFIG_GEN_RTC_X is not set 692# CONFIG_GEN_RTC_X is not set
649# CONFIG_DTLK is not set
650# CONFIG_R3964 is not set 693# CONFIG_R3964 is not set
651# CONFIG_APPLICOM is not set 694# CONFIG_APPLICOM is not set
652
653#
654# Ftape, the floppy tape device driver
655#
656# CONFIG_AGP is not set
657# CONFIG_DRM is not set
658# CONFIG_RAW_DRIVER is not set 695# CONFIG_RAW_DRIVER is not set
659
660#
661# TPM devices
662#
663# CONFIG_TCG_TPM is not set 696# CONFIG_TCG_TPM is not set
664# CONFIG_TELCLOCK is not set 697CONFIG_DEVPORT=y
665
666#
667# I2C support
668#
669CONFIG_I2C=y 698CONFIG_I2C=y
699CONFIG_I2C_BOARDINFO=y
670CONFIG_I2C_CHARDEV=y 700CONFIG_I2C_CHARDEV=y
671 701
672# 702#
@@ -689,56 +719,60 @@ CONFIG_I2C_CHARDEV=y
689# CONFIG_I2C_PIIX4 is not set 719# CONFIG_I2C_PIIX4 is not set
690CONFIG_I2C_MPC=y 720CONFIG_I2C_MPC=y
691# CONFIG_I2C_NFORCE2 is not set 721# CONFIG_I2C_NFORCE2 is not set
722# CONFIG_I2C_OCORES is not set
692# CONFIG_I2C_PARPORT_LIGHT is not set 723# CONFIG_I2C_PARPORT_LIGHT is not set
693# CONFIG_I2C_PROSAVAGE is not set 724# CONFIG_I2C_PROSAVAGE is not set
694# CONFIG_I2C_SAVAGE4 is not set 725# CONFIG_I2C_SAVAGE4 is not set
695# CONFIG_SCx200_ACB is not set 726# CONFIG_I2C_SIMTEC is not set
696# CONFIG_I2C_SIS5595 is not set 727# CONFIG_I2C_SIS5595 is not set
697# CONFIG_I2C_SIS630 is not set 728# CONFIG_I2C_SIS630 is not set
698# CONFIG_I2C_SIS96X is not set 729# CONFIG_I2C_SIS96X is not set
730# CONFIG_I2C_TAOS_EVM is not set
699# CONFIG_I2C_VIA is not set 731# CONFIG_I2C_VIA is not set
700# CONFIG_I2C_VIAPRO is not set 732# CONFIG_I2C_VIAPRO is not set
701# CONFIG_I2C_VOODOO3 is not set 733# CONFIG_I2C_VOODOO3 is not set
702# CONFIG_I2C_PCA_ISA is not set
703 734
704# 735#
705# Miscellaneous I2C Chip support 736# Miscellaneous I2C Chip support
706# 737#
707CONFIG_SENSORS_DS1337=y 738CONFIG_SENSORS_DS1337=y
708# CONFIG_SENSORS_DS1374 is not set 739# CONFIG_SENSORS_DS1374 is not set
740# CONFIG_DS1682 is not set
709# CONFIG_SENSORS_EEPROM is not set 741# CONFIG_SENSORS_EEPROM is not set
710# CONFIG_SENSORS_PCF8574 is not set 742# CONFIG_SENSORS_PCF8574 is not set
711# CONFIG_SENSORS_PCA9539 is not set 743# CONFIG_SENSORS_PCA9539 is not set
712# CONFIG_SENSORS_PCF8591 is not set 744# CONFIG_SENSORS_PCF8591 is not set
713# CONFIG_SENSORS_RTC8564 is not set
714# CONFIG_SENSORS_M41T00 is not set 745# CONFIG_SENSORS_M41T00 is not set
715# CONFIG_SENSORS_MAX6875 is not set 746# CONFIG_SENSORS_MAX6875 is not set
716# CONFIG_RTC_X1205_I2C is not set 747# CONFIG_SENSORS_TSL2550 is not set
717# CONFIG_I2C_DEBUG_CORE is not set 748# CONFIG_I2C_DEBUG_CORE is not set
718# CONFIG_I2C_DEBUG_ALGO is not set 749# CONFIG_I2C_DEBUG_ALGO is not set
719# CONFIG_I2C_DEBUG_BUS is not set 750# CONFIG_I2C_DEBUG_BUS is not set
720# CONFIG_I2C_DEBUG_CHIP is not set 751# CONFIG_I2C_DEBUG_CHIP is not set
721 752
722# 753#
723# Dallas's 1-wire bus 754# SPI support
724# 755#
756# CONFIG_SPI is not set
757# CONFIG_SPI_MASTER is not set
725# CONFIG_W1 is not set 758# CONFIG_W1 is not set
726 759# CONFIG_POWER_SUPPLY is not set
727#
728# Hardware Monitoring support
729#
730CONFIG_HWMON=y 760CONFIG_HWMON=y
731# CONFIG_HWMON_VID is not set 761# CONFIG_HWMON_VID is not set
762# CONFIG_SENSORS_AD7418 is not set
732# CONFIG_SENSORS_ADM1021 is not set 763# CONFIG_SENSORS_ADM1021 is not set
733# CONFIG_SENSORS_ADM1025 is not set 764# CONFIG_SENSORS_ADM1025 is not set
734# CONFIG_SENSORS_ADM1026 is not set 765# CONFIG_SENSORS_ADM1026 is not set
766# CONFIG_SENSORS_ADM1029 is not set
735# CONFIG_SENSORS_ADM1031 is not set 767# CONFIG_SENSORS_ADM1031 is not set
736# CONFIG_SENSORS_ADM9240 is not set 768# CONFIG_SENSORS_ADM9240 is not set
737# CONFIG_SENSORS_ASB100 is not set 769# CONFIG_SENSORS_ADT7470 is not set
738# CONFIG_SENSORS_ATXP1 is not set 770# CONFIG_SENSORS_ATXP1 is not set
739# CONFIG_SENSORS_DS1621 is not set 771# CONFIG_SENSORS_DS1621 is not set
740# CONFIG_SENSORS_FSCHER is not set 772# CONFIG_SENSORS_I5K_AMB is not set
741# CONFIG_SENSORS_FSCPOS is not set 773# CONFIG_SENSORS_F71805F is not set
774# CONFIG_SENSORS_F71882FG is not set
775# CONFIG_SENSORS_F75375S is not set
742# CONFIG_SENSORS_GL518SM is not set 776# CONFIG_SENSORS_GL518SM is not set
743# CONFIG_SENSORS_GL520SM is not set 777# CONFIG_SENSORS_GL520SM is not set
744# CONFIG_SENSORS_IT87 is not set 778# CONFIG_SENSORS_IT87 is not set
@@ -752,52 +786,75 @@ CONFIG_SENSORS_LM75=y
752# CONFIG_SENSORS_LM87 is not set 786# CONFIG_SENSORS_LM87 is not set
753# CONFIG_SENSORS_LM90 is not set 787# CONFIG_SENSORS_LM90 is not set
754# CONFIG_SENSORS_LM92 is not set 788# CONFIG_SENSORS_LM92 is not set
789# CONFIG_SENSORS_LM93 is not set
755# CONFIG_SENSORS_MAX1619 is not set 790# CONFIG_SENSORS_MAX1619 is not set
791# CONFIG_SENSORS_MAX6650 is not set
756# CONFIG_SENSORS_PC87360 is not set 792# CONFIG_SENSORS_PC87360 is not set
793# CONFIG_SENSORS_PC87427 is not set
757# CONFIG_SENSORS_SIS5595 is not set 794# CONFIG_SENSORS_SIS5595 is not set
795# CONFIG_SENSORS_DME1737 is not set
758# CONFIG_SENSORS_SMSC47M1 is not set 796# CONFIG_SENSORS_SMSC47M1 is not set
797# CONFIG_SENSORS_SMSC47M192 is not set
759# CONFIG_SENSORS_SMSC47B397 is not set 798# CONFIG_SENSORS_SMSC47B397 is not set
799# CONFIG_SENSORS_THMC50 is not set
760# CONFIG_SENSORS_VIA686A is not set 800# CONFIG_SENSORS_VIA686A is not set
801# CONFIG_SENSORS_VT1211 is not set
802# CONFIG_SENSORS_VT8231 is not set
761# CONFIG_SENSORS_W83781D is not set 803# CONFIG_SENSORS_W83781D is not set
804# CONFIG_SENSORS_W83791D is not set
762# CONFIG_SENSORS_W83792D is not set 805# CONFIG_SENSORS_W83792D is not set
806# CONFIG_SENSORS_W83793 is not set
763# CONFIG_SENSORS_W83L785TS is not set 807# CONFIG_SENSORS_W83L785TS is not set
764# CONFIG_SENSORS_W83627HF is not set 808# CONFIG_SENSORS_W83627HF is not set
765# CONFIG_SENSORS_W83627EHF is not set 809# CONFIG_SENSORS_W83627EHF is not set
766CONFIG_HWMON_DEBUG_CHIP=y 810CONFIG_HWMON_DEBUG_CHIP=y
811# CONFIG_WATCHDOG is not set
767 812
768# 813#
769# Misc devices 814# Sonics Silicon Backplane
770# 815#
816CONFIG_SSB_POSSIBLE=y
817# CONFIG_SSB is not set
771 818
772# 819#
773# Multimedia Capabilities Port drivers 820# Multifunction device drivers
774# 821#
822# CONFIG_MFD_SM501 is not set
775 823
776# 824#
777# Multimedia devices 825# Multimedia devices
778# 826#
779# CONFIG_VIDEO_DEV is not set 827# CONFIG_VIDEO_DEV is not set
780 828# CONFIG_DVB_CORE is not set
781# 829CONFIG_DAB=y
782# Digital Video Broadcasting Devices
783#
784# CONFIG_DVB is not set
785 830
786# 831#
787# Graphics support 832# Graphics support
788# 833#
834# CONFIG_AGP is not set
835# CONFIG_DRM is not set
836# CONFIG_VGASTATE is not set
837# CONFIG_VIDEO_OUTPUT_CONTROL is not set
789# CONFIG_FB is not set 838# CONFIG_FB is not set
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
790 840
791# 841#
792# Sound 842# Display device support
793# 843#
794# CONFIG_SOUND is not set 844# CONFIG_DISPLAY_SUPPORT is not set
795 845
796# 846#
797# USB support 847# Sound
798# 848#
849# CONFIG_SOUND is not set
850CONFIG_HID_SUPPORT=y
851CONFIG_HID=y
852# CONFIG_HID_DEBUG is not set
853# CONFIG_HIDRAW is not set
854CONFIG_USB_SUPPORT=y
799CONFIG_USB_ARCH_HAS_HCD=y 855CONFIG_USB_ARCH_HAS_HCD=y
800CONFIG_USB_ARCH_HAS_OHCI=y 856CONFIG_USB_ARCH_HAS_OHCI=y
857CONFIG_USB_ARCH_HAS_EHCI=y
801# CONFIG_USB is not set 858# CONFIG_USB is not set
802 859
803# 860#
@@ -808,20 +865,16 @@ CONFIG_USB_ARCH_HAS_OHCI=y
808# USB Gadget Support 865# USB Gadget Support
809# 866#
810# CONFIG_USB_GADGET is not set 867# CONFIG_USB_GADGET is not set
811
812#
813# MMC/SD Card support
814#
815# CONFIG_MMC is not set 868# CONFIG_MMC is not set
816 869# CONFIG_NEW_LEDS is not set
817#
818# InfiniBand support
819#
820# CONFIG_INFINIBAND is not set 870# CONFIG_INFINIBAND is not set
871# CONFIG_EDAC is not set
872# CONFIG_RTC_CLASS is not set
821 873
822# 874#
823# SN Devices 875# Userspace I/O
824# 876#
877# CONFIG_UIO is not set
825 878
826# 879#
827# File systems 880# File systems
@@ -833,16 +886,19 @@ CONFIG_EXT3_FS=y
833CONFIG_EXT3_FS_XATTR=y 886CONFIG_EXT3_FS_XATTR=y
834# CONFIG_EXT3_FS_POSIX_ACL is not set 887# CONFIG_EXT3_FS_POSIX_ACL is not set
835# CONFIG_EXT3_FS_SECURITY is not set 888# CONFIG_EXT3_FS_SECURITY is not set
889# CONFIG_EXT4DEV_FS is not set
836CONFIG_JBD=y 890CONFIG_JBD=y
837# CONFIG_JBD_DEBUG is not set
838CONFIG_FS_MBCACHE=y 891CONFIG_FS_MBCACHE=y
839# CONFIG_REISERFS_FS is not set 892# CONFIG_REISERFS_FS is not set
840# CONFIG_JFS_FS is not set 893# CONFIG_JFS_FS is not set
841# CONFIG_FS_POSIX_ACL is not set 894# CONFIG_FS_POSIX_ACL is not set
842# CONFIG_XFS_FS is not set 895# CONFIG_XFS_FS is not set
896# CONFIG_GFS2_FS is not set
897# CONFIG_OCFS2_FS is not set
843# CONFIG_MINIX_FS is not set 898# CONFIG_MINIX_FS is not set
844# CONFIG_ROMFS_FS is not set 899# CONFIG_ROMFS_FS is not set
845CONFIG_INOTIFY=y 900CONFIG_INOTIFY=y
901CONFIG_INOTIFY_USER=y
846# CONFIG_QUOTA is not set 902# CONFIG_QUOTA is not set
847CONFIG_DNOTIFY=y 903CONFIG_DNOTIFY=y
848# CONFIG_AUTOFS_FS is not set 904# CONFIG_AUTOFS_FS is not set
@@ -867,11 +923,12 @@ CONFIG_DNOTIFY=y
867# 923#
868CONFIG_PROC_FS=y 924CONFIG_PROC_FS=y
869CONFIG_PROC_KCORE=y 925CONFIG_PROC_KCORE=y
926CONFIG_PROC_SYSCTL=y
870CONFIG_SYSFS=y 927CONFIG_SYSFS=y
871CONFIG_TMPFS=y 928CONFIG_TMPFS=y
929# CONFIG_TMPFS_POSIX_ACL is not set
872# CONFIG_HUGETLB_PAGE is not set 930# CONFIG_HUGETLB_PAGE is not set
873CONFIG_RAMFS=y 931# CONFIG_CONFIGFS_FS is not set
874# CONFIG_RELAYFS_FS is not set
875 932
876# 933#
877# Miscellaneous filesystems 934# Miscellaneous filesystems
@@ -883,13 +940,15 @@ CONFIG_RAMFS=y
883# CONFIG_BEFS_FS is not set 940# CONFIG_BEFS_FS is not set
884# CONFIG_BFS_FS is not set 941# CONFIG_BFS_FS is not set
885# CONFIG_EFS_FS is not set 942# CONFIG_EFS_FS is not set
886# CONFIG_JFFS_FS is not set
887CONFIG_JFFS2_FS=y 943CONFIG_JFFS2_FS=y
888CONFIG_JFFS2_FS_DEBUG=0 944CONFIG_JFFS2_FS_DEBUG=0
889CONFIG_JFFS2_FS_WRITEBUFFER=y 945CONFIG_JFFS2_FS_WRITEBUFFER=y
946# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
890# CONFIG_JFFS2_SUMMARY is not set 947# CONFIG_JFFS2_SUMMARY is not set
948# CONFIG_JFFS2_FS_XATTR is not set
891# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 949# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
892CONFIG_JFFS2_ZLIB=y 950CONFIG_JFFS2_ZLIB=y
951# CONFIG_JFFS2_LZO is not set
893CONFIG_JFFS2_RTIME=y 952CONFIG_JFFS2_RTIME=y
894# CONFIG_JFFS2_RUBIN is not set 953# CONFIG_JFFS2_RUBIN is not set
895CONFIG_CRAMFS=y 954CONFIG_CRAMFS=y
@@ -898,10 +957,7 @@ CONFIG_CRAMFS=y
898# CONFIG_QNX4FS_FS is not set 957# CONFIG_QNX4FS_FS is not set
899# CONFIG_SYSV_FS is not set 958# CONFIG_SYSV_FS is not set
900# CONFIG_UFS_FS is not set 959# CONFIG_UFS_FS is not set
901 960CONFIG_NETWORK_FILESYSTEMS=y
902#
903# Network File Systems
904#
905CONFIG_NFS_FS=y 961CONFIG_NFS_FS=y
906# CONFIG_NFS_V3 is not set 962# CONFIG_NFS_V3 is not set
907# CONFIG_NFS_V4 is not set 963# CONFIG_NFS_V4 is not set
@@ -911,6 +967,7 @@ CONFIG_ROOT_NFS=y
911CONFIG_LOCKD=y 967CONFIG_LOCKD=y
912CONFIG_NFS_COMMON=y 968CONFIG_NFS_COMMON=y
913CONFIG_SUNRPC=y 969CONFIG_SUNRPC=y
970# CONFIG_SUNRPC_BIND34 is not set
914# CONFIG_RPCSEC_GSS_KRB5 is not set 971# CONFIG_RPCSEC_GSS_KRB5 is not set
915# CONFIG_RPCSEC_GSS_SPKM3 is not set 972# CONFIG_RPCSEC_GSS_SPKM3 is not set
916# CONFIG_SMB_FS is not set 973# CONFIG_SMB_FS is not set
@@ -918,7 +975,6 @@ CONFIG_SUNRPC=y
918# CONFIG_NCP_FS is not set 975# CONFIG_NCP_FS is not set
919# CONFIG_CODA_FS is not set 976# CONFIG_CODA_FS is not set
920# CONFIG_AFS_FS is not set 977# CONFIG_AFS_FS is not set
921# CONFIG_9P_FS is not set
922 978
923# 979#
924# Partition Types 980# Partition Types
@@ -934,50 +990,55 @@ CONFIG_PARTITION_ADVANCED=y
934# CONFIG_SGI_PARTITION is not set 990# CONFIG_SGI_PARTITION is not set
935# CONFIG_ULTRIX_PARTITION is not set 991# CONFIG_ULTRIX_PARTITION is not set
936# CONFIG_SUN_PARTITION is not set 992# CONFIG_SUN_PARTITION is not set
993# CONFIG_KARMA_PARTITION is not set
937# CONFIG_EFI_PARTITION is not set 994# CONFIG_EFI_PARTITION is not set
938 995# CONFIG_SYSV68_PARTITION is not set
939#
940# Native Language Support
941#
942# CONFIG_NLS is not set 996# CONFIG_NLS is not set
943# CONFIG_SCC_ENET is not set 997# CONFIG_DLM is not set
944# CONFIG_FEC_ENET is not set
945
946#
947# CPM2 Options
948#
949 998
950# 999#
951# Library routines 1000# Library routines
952# 1001#
1002CONFIG_BITREVERSE=y
953# CONFIG_CRC_CCITT is not set 1003# CONFIG_CRC_CCITT is not set
954# CONFIG_CRC16 is not set 1004# CONFIG_CRC16 is not set
1005# CONFIG_CRC_ITU_T is not set
955CONFIG_CRC32=y 1006CONFIG_CRC32=y
1007# CONFIG_CRC7 is not set
956# CONFIG_LIBCRC32C is not set 1008# CONFIG_LIBCRC32C is not set
957CONFIG_ZLIB_INFLATE=y 1009CONFIG_ZLIB_INFLATE=y
958CONFIG_ZLIB_DEFLATE=y 1010CONFIG_ZLIB_DEFLATE=y
1011CONFIG_PLIST=y
1012CONFIG_HAS_IOMEM=y
1013CONFIG_HAS_IOPORT=y
1014CONFIG_HAS_DMA=y
1015CONFIG_INSTRUMENTATION=y
959# CONFIG_PROFILING is not set 1016# CONFIG_PROFILING is not set
1017# CONFIG_MARKERS is not set
960 1018
961# 1019#
962# Kernel hacking 1020# Kernel hacking
963# 1021#
964# CONFIG_PRINTK_TIME is not set 1022# CONFIG_PRINTK_TIME is not set
1023CONFIG_ENABLE_WARN_DEPRECATED=y
1024CONFIG_ENABLE_MUST_CHECK=y
1025# CONFIG_MAGIC_SYSRQ is not set
1026# CONFIG_UNUSED_SYMBOLS is not set
1027# CONFIG_DEBUG_FS is not set
1028# CONFIG_HEADERS_CHECK is not set
965# CONFIG_DEBUG_KERNEL is not set 1029# CONFIG_DEBUG_KERNEL is not set
966CONFIG_LOG_BUF_SHIFT=14 1030# CONFIG_SLUB_DEBUG_ON is not set
1031# CONFIG_DEBUG_BUGVERBOSE is not set
1032# CONFIG_SAMPLES is not set
967# CONFIG_KGDB_CONSOLE is not set 1033# CONFIG_KGDB_CONSOLE is not set
968# CONFIG_SERIAL_TEXT_DEBUG is not set 1034# CONFIG_PPC_EARLY_DEBUG is not set
969 1035
970# 1036#
971# Security options 1037# Security options
972# 1038#
973# CONFIG_KEYS is not set 1039# CONFIG_KEYS is not set
974# CONFIG_SECURITY is not set 1040# CONFIG_SECURITY is not set
975 1041# CONFIG_SECURITY_FILE_CAPABILITIES is not set
976#
977# Cryptographic options
978#
979# CONFIG_CRYPTO is not set 1042# CONFIG_CRYPTO is not set
980 1043# CONFIG_PPC_CLOCK is not set
981# 1044CONFIG_PPC_LIB_RHEAP=y
982# Hardware crypto devices
983#
diff --git a/arch/ppc/configs/TQM8560_defconfig b/arch/powerpc/configs/tqm8560_defconfig
index a814d17a2be9..0832e8996ac2 100644
--- a/arch/ppc/configs/TQM8560_defconfig
+++ b/arch/powerpc/configs/tqm8560_defconfig
@@ -1,66 +1,116 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.15-rc2 3# Linux kernel version: 2.6.24-rc8
4# Wed Nov 30 16:47:53 2005 4# Thu Jan 24 23:50:42 2008
5# 5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12CONFIG_PPC_85xx=y
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15# CONFIG_44x is not set
16# CONFIG_E200 is not set
17CONFIG_85xx=y
18CONFIG_E500=y
19CONFIG_BOOKE=y
20CONFIG_FSL_BOOKE=y
21# CONFIG_PHYS_64BIT is not set
22CONFIG_SPE=y
23# CONFIG_PPC_MM_SLICES is not set
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
6CONFIG_MMU=y 27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
7CONFIG_GENERIC_HARDIRQS=y 32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
10CONFIG_PPC=y 40CONFIG_PPC=y
11CONFIG_PPC32=y 41CONFIG_EARLY_PRINTK=y
12CONFIG_GENERIC_NVRAM=y 42CONFIG_GENERIC_NVRAM=y
13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y 44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51CONFIG_DEFAULT_UIMAGE=y
52# CONFIG_PPC_DCR_NATIVE is not set
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 55
16# 56#
17# Code maturity level options 57# General setup
18# 58#
19CONFIG_EXPERIMENTAL=y 59CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y 60CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32 61CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION="" 62CONFIG_LOCALVERSION=""
28CONFIG_LOCALVERSION_AUTO=y 63CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 64CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 65CONFIG_SYSVIPC=y
66CONFIG_SYSVIPC_SYSCTL=y
31# CONFIG_POSIX_MQUEUE is not set 67# CONFIG_POSIX_MQUEUE is not set
32# CONFIG_BSD_PROCESS_ACCT is not set 68# CONFIG_BSD_PROCESS_ACCT is not set
33CONFIG_SYSCTL=y 69# CONFIG_TASKSTATS is not set
70# CONFIG_USER_NS is not set
71# CONFIG_PID_NS is not set
34# CONFIG_AUDIT is not set 72# CONFIG_AUDIT is not set
35# CONFIG_HOTPLUG is not set
36CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 73# CONFIG_IKCONFIG is not set
74CONFIG_LOG_BUF_SHIFT=14
75# CONFIG_CGROUPS is not set
76CONFIG_FAIR_GROUP_SCHED=y
77CONFIG_FAIR_USER_SCHED=y
78# CONFIG_FAIR_CGROUP_SCHED is not set
79CONFIG_SYSFS_DEPRECATED=y
80# CONFIG_RELAY is not set
81CONFIG_BLK_DEV_INITRD=y
38CONFIG_INITRAMFS_SOURCE="" 82CONFIG_INITRAMFS_SOURCE=""
83# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
84CONFIG_SYSCTL=y
39CONFIG_EMBEDDED=y 85CONFIG_EMBEDDED=y
86CONFIG_SYSCTL_SYSCALL=y
40# CONFIG_KALLSYMS is not set 87# CONFIG_KALLSYMS is not set
88# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 89CONFIG_PRINTK=y
42CONFIG_BUG=y 90CONFIG_BUG=y
91CONFIG_ELF_CORE=y
43CONFIG_BASE_FULL=y 92CONFIG_BASE_FULL=y
44CONFIG_FUTEX=y 93CONFIG_FUTEX=y
94CONFIG_ANON_INODES=y
45# CONFIG_EPOLL is not set 95# CONFIG_EPOLL is not set
46# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 96CONFIG_SIGNALFD=y
97CONFIG_EVENTFD=y
47CONFIG_SHMEM=y 98CONFIG_SHMEM=y
48CONFIG_CC_ALIGN_FUNCTIONS=0 99CONFIG_VM_EVENT_COUNTERS=y
49CONFIG_CC_ALIGN_LABELS=0 100CONFIG_SLUB_DEBUG=y
50CONFIG_CC_ALIGN_LOOPS=0 101# CONFIG_SLAB is not set
51CONFIG_CC_ALIGN_JUMPS=0 102CONFIG_SLUB=y
103# CONFIG_SLOB is not set
104CONFIG_SLABINFO=y
105CONFIG_RT_MUTEXES=y
52# CONFIG_TINY_SHMEM is not set 106# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0 107CONFIG_BASE_SMALL=0
54
55#
56# Loadable module support
57#
58# CONFIG_MODULES is not set 108# CONFIG_MODULES is not set
59 109CONFIG_BLOCK=y
60#
61# Block layer
62#
63# CONFIG_LBD is not set 110# CONFIG_LBD is not set
111# CONFIG_BLK_DEV_IO_TRACE is not set
112# CONFIG_LSF is not set
113# CONFIG_BLK_DEV_BSG is not set
64 114
65# 115#
66# IO Schedulers 116# IO Schedulers
@@ -76,55 +126,63 @@ CONFIG_DEFAULT_AS=y
76CONFIG_DEFAULT_IOSCHED="anticipatory" 126CONFIG_DEFAULT_IOSCHED="anticipatory"
77 127
78# 128#
79# Processor 129# Platform support
80#
81# CONFIG_6xx is not set
82# CONFIG_40x is not set
83# CONFIG_44x is not set
84# CONFIG_POWER3 is not set
85# CONFIG_POWER4 is not set
86# CONFIG_8xx is not set
87# CONFIG_E200 is not set
88CONFIG_E500=y
89CONFIG_BOOKE=y
90CONFIG_FSL_BOOKE=y
91# CONFIG_PHYS_64BIT is not set
92CONFIG_SPE=y
93CONFIG_MATH_EMULATION=y
94# CONFIG_KEXEC is not set
95# CONFIG_CPU_FREQ is not set
96# CONFIG_WANT_EARLY_SERIAL is not set
97CONFIG_85xx=y
98CONFIG_PPC_INDIRECT_PCI_BE=y
99
100#
101# Freescale 85xx options
102# 130#
131# CONFIG_PPC_MPC52xx is not set
132# CONFIG_PPC_MPC5200 is not set
133# CONFIG_PPC_CELL is not set
134# CONFIG_PPC_CELL_NATIVE is not set
135# CONFIG_PQ2ADS is not set
103# CONFIG_MPC8540_ADS is not set 136# CONFIG_MPC8540_ADS is not set
104# CONFIG_MPC8548_CDS is not set
105# CONFIG_MPC8555_CDS is not set
106# CONFIG_MPC8560_ADS is not set 137# CONFIG_MPC8560_ADS is not set
107# CONFIG_SBC8560 is not set 138# CONFIG_MPC85xx_CDS is not set
139# CONFIG_MPC85xx_MDS is not set
140# CONFIG_MPC85xx_DS is not set
108# CONFIG_STX_GP3 is not set 141# CONFIG_STX_GP3 is not set
109# CONFIG_TQM8540 is not set 142# CONFIG_TQM8540 is not set
110# CONFIG_TQM8541 is not set 143# CONFIG_TQM8541 is not set
111# CONFIG_TQM8555 is not set 144# CONFIG_TQM8555 is not set
112CONFIG_TQM8560=y 145CONFIG_TQM8560=y
113CONFIG_MPC8560=y 146CONFIG_TQM85xx=y
147CONFIG_MPC85xx=y
148# CONFIG_IPIC is not set
149CONFIG_MPIC=y
150# CONFIG_MPIC_WEIRD is not set
151# CONFIG_PPC_I8259 is not set
152# CONFIG_PPC_RTAS is not set
153# CONFIG_MMIO_NVRAM is not set
154# CONFIG_PPC_MPC106 is not set
155# CONFIG_PPC_970_NAP is not set
156# CONFIG_PPC_INDIRECT_IO is not set
157# CONFIG_GENERIC_IOMAP is not set
158# CONFIG_CPU_FREQ is not set
159CONFIG_CPM2=y
160CONFIG_PPC_CPM_NEW_BINDING=y
161# CONFIG_FSL_ULI1575 is not set
162CONFIG_CPM=y
114 163
115# 164#
116# Platform options 165# Kernel options
117# 166#
118CONFIG_CPM2=y
119# CONFIG_PC_KEYBOARD is not set
120# CONFIG_HIGHMEM is not set 167# CONFIG_HIGHMEM is not set
168# CONFIG_TICK_ONESHOT is not set
169# CONFIG_NO_HZ is not set
170# CONFIG_HIGH_RES_TIMERS is not set
171CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
121# CONFIG_HZ_100 is not set 172# CONFIG_HZ_100 is not set
122CONFIG_HZ_250=y 173CONFIG_HZ_250=y
174# CONFIG_HZ_300 is not set
123# CONFIG_HZ_1000 is not set 175# CONFIG_HZ_1000 is not set
124CONFIG_HZ=250 176CONFIG_HZ=250
125CONFIG_PREEMPT_NONE=y 177CONFIG_PREEMPT_NONE=y
126# CONFIG_PREEMPT_VOLUNTARY is not set 178# CONFIG_PREEMPT_VOLUNTARY is not set
127# CONFIG_PREEMPT is not set 179# CONFIG_PREEMPT is not set
180CONFIG_BINFMT_ELF=y
181# CONFIG_BINFMT_MISC is not set
182CONFIG_MATH_EMULATION=y
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184CONFIG_ARCH_FLATMEM_ENABLE=y
185CONFIG_ARCH_POPULATES_NODE_MAP=y
128CONFIG_SELECT_MEMORY_MODEL=y 186CONFIG_SELECT_MEMORY_MODEL=y
129CONFIG_FLATMEM_MANUAL=y 187CONFIG_FLATMEM_MANUAL=y
130# CONFIG_DISCONTIGMEM_MANUAL is not set 188# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -132,29 +190,36 @@ CONFIG_FLATMEM_MANUAL=y
132CONFIG_FLATMEM=y 190CONFIG_FLATMEM=y
133CONFIG_FLAT_NODE_MEM_MAP=y 191CONFIG_FLAT_NODE_MEM_MAP=y
134# CONFIG_SPARSEMEM_STATIC is not set 192# CONFIG_SPARSEMEM_STATIC is not set
193# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
135CONFIG_SPLIT_PTLOCK_CPUS=4 194CONFIG_SPLIT_PTLOCK_CPUS=4
136CONFIG_BINFMT_ELF=y 195# CONFIG_RESOURCES_64BIT is not set
137# CONFIG_BINFMT_MISC is not set 196CONFIG_ZONE_DMA_FLAG=1
197CONFIG_BOUNCE=y
198CONFIG_VIRT_TO_BUS=y
199# CONFIG_PROC_DEVICETREE is not set
138# CONFIG_CMDLINE_BOOL is not set 200# CONFIG_CMDLINE_BOOL is not set
139# CONFIG_PM is not set 201# CONFIG_PM is not set
140# CONFIG_HIBERNATION is not set 202CONFIG_SUSPEND_UP_POSSIBLE=y
203CONFIG_HIBERNATION_UP_POSSIBLE=y
141CONFIG_SECCOMP=y 204CONFIG_SECCOMP=y
205CONFIG_WANT_DEVICE_TREE=y
206CONFIG_DEVICE_TREE="tqm8560.dts"
142CONFIG_ISA_DMA_API=y 207CONFIG_ISA_DMA_API=y
143 208
144# 209#
145# Bus options 210# Bus options
146# 211#
147CONFIG_PPC_I8259=y 212CONFIG_ZONE_DMA=y
148CONFIG_PPC_INDIRECT_PCI=y 213CONFIG_PPC_INDIRECT_PCI=y
214CONFIG_FSL_SOC=y
215CONFIG_FSL_PCI=y
149CONFIG_PCI=y 216CONFIG_PCI=y
150CONFIG_PCI_DOMAINS=y 217CONFIG_PCI_DOMAINS=y
151# CONFIG_PCI_LEGACY_PROC is not set 218CONFIG_PCI_SYSCALL=y
152 219# CONFIG_PCIEPORTBUS is not set
153# 220CONFIG_ARCH_SUPPORTS_MSI=y
154# PCCARD (PCMCIA/CardBus) support 221# CONFIG_PCI_MSI is not set
155# 222CONFIG_PCI_LEGACY=y
156# CONFIG_PCCARD is not set
157# CONFIG_RAPIDIO is not set
158 223
159# 224#
160# Advanced setup 225# Advanced setup
@@ -167,7 +232,7 @@ CONFIG_PCI_DOMAINS=y
167CONFIG_HIGHMEM_START=0xfe000000 232CONFIG_HIGHMEM_START=0xfe000000
168CONFIG_LOWMEM_SIZE=0x30000000 233CONFIG_LOWMEM_SIZE=0x30000000
169CONFIG_KERNEL_START=0xc0000000 234CONFIG_KERNEL_START=0xc0000000
170CONFIG_TASK_SIZE=0x80000000 235CONFIG_TASK_SIZE=0xc0000000
171CONFIG_BOOT_LOAD=0x00800000 236CONFIG_BOOT_LOAD=0x00800000
172 237
173# 238#
@@ -181,6 +246,10 @@ CONFIG_NET=y
181CONFIG_PACKET=y 246CONFIG_PACKET=y
182# CONFIG_PACKET_MMAP is not set 247# CONFIG_PACKET_MMAP is not set
183CONFIG_UNIX=y 248CONFIG_UNIX=y
249CONFIG_XFRM=y
250# CONFIG_XFRM_USER is not set
251# CONFIG_XFRM_SUB_POLICY is not set
252# CONFIG_XFRM_MIGRATE is not set
184# CONFIG_NET_KEY is not set 253# CONFIG_NET_KEY is not set
185CONFIG_INET=y 254CONFIG_INET=y
186CONFIG_IP_MULTICAST=y 255CONFIG_IP_MULTICAST=y
@@ -198,23 +267,26 @@ CONFIG_SYN_COOKIES=y
198# CONFIG_INET_AH is not set 267# CONFIG_INET_AH is not set
199# CONFIG_INET_ESP is not set 268# CONFIG_INET_ESP is not set
200# CONFIG_INET_IPCOMP is not set 269# CONFIG_INET_IPCOMP is not set
270# CONFIG_INET_XFRM_TUNNEL is not set
201# CONFIG_INET_TUNNEL is not set 271# CONFIG_INET_TUNNEL is not set
272CONFIG_INET_XFRM_MODE_TRANSPORT=y
273CONFIG_INET_XFRM_MODE_TUNNEL=y
274CONFIG_INET_XFRM_MODE_BEET=y
275# CONFIG_INET_LRO is not set
202CONFIG_INET_DIAG=y 276CONFIG_INET_DIAG=y
203CONFIG_INET_TCP_DIAG=y 277CONFIG_INET_TCP_DIAG=y
204# CONFIG_TCP_CONG_ADVANCED is not set 278# CONFIG_TCP_CONG_ADVANCED is not set
205CONFIG_TCP_CONG_BIC=y 279CONFIG_TCP_CONG_CUBIC=y
280CONFIG_DEFAULT_TCP_CONG="cubic"
281# CONFIG_TCP_MD5SIG is not set
206# CONFIG_IPV6 is not set 282# CONFIG_IPV6 is not set
283# CONFIG_INET6_XFRM_TUNNEL is not set
284# CONFIG_INET6_TUNNEL is not set
285# CONFIG_NETWORK_SECMARK is not set
207# CONFIG_NETFILTER is not set 286# CONFIG_NETFILTER is not set
208
209#
210# DCCP Configuration (EXPERIMENTAL)
211#
212# CONFIG_IP_DCCP is not set 287# CONFIG_IP_DCCP is not set
213
214#
215# SCTP Configuration (EXPERIMENTAL)
216#
217# CONFIG_IP_SCTP is not set 288# CONFIG_IP_SCTP is not set
289# CONFIG_TIPC is not set
218# CONFIG_ATM is not set 290# CONFIG_ATM is not set
219# CONFIG_BRIDGE is not set 291# CONFIG_BRIDGE is not set
220# CONFIG_VLAN_8021Q is not set 292# CONFIG_VLAN_8021Q is not set
@@ -224,13 +296,8 @@ CONFIG_TCP_CONG_BIC=y
224# CONFIG_ATALK is not set 296# CONFIG_ATALK is not set
225# CONFIG_X25 is not set 297# CONFIG_X25 is not set
226# CONFIG_LAPB is not set 298# CONFIG_LAPB is not set
227# CONFIG_NET_DIVERT is not set
228# CONFIG_ECONET is not set 299# CONFIG_ECONET is not set
229# CONFIG_WAN_ROUTER is not set 300# CONFIG_WAN_ROUTER is not set
230
231#
232# QoS and/or fair queueing
233#
234# CONFIG_NET_SCHED is not set 301# CONFIG_NET_SCHED is not set
235 302
236# 303#
@@ -240,7 +307,17 @@ CONFIG_TCP_CONG_BIC=y
240# CONFIG_HAMRADIO is not set 307# CONFIG_HAMRADIO is not set
241# CONFIG_IRDA is not set 308# CONFIG_IRDA is not set
242# CONFIG_BT is not set 309# CONFIG_BT is not set
310# CONFIG_AF_RXRPC is not set
311
312#
313# Wireless
314#
315# CONFIG_CFG80211 is not set
316# CONFIG_WIRELESS_EXT is not set
317# CONFIG_MAC80211 is not set
243# CONFIG_IEEE80211 is not set 318# CONFIG_IEEE80211 is not set
319# CONFIG_RFKILL is not set
320# CONFIG_NET_9P is not set
244 321
245# 322#
246# Device Drivers 323# Device Drivers
@@ -251,16 +328,8 @@ CONFIG_TCP_CONG_BIC=y
251# 328#
252CONFIG_STANDALONE=y 329CONFIG_STANDALONE=y
253CONFIG_PREVENT_FIRMWARE_BUILD=y 330CONFIG_PREVENT_FIRMWARE_BUILD=y
254# CONFIG_FW_LOADER is not set 331# CONFIG_SYS_HYPERVISOR is not set
255
256#
257# Connector - unified userspace <-> kernelspace linker
258#
259# CONFIG_CONNECTOR is not set 332# CONFIG_CONNECTOR is not set
260
261#
262# Memory Technology Devices (MTD)
263#
264CONFIG_MTD=y 333CONFIG_MTD=y
265# CONFIG_MTD_DEBUG is not set 334# CONFIG_MTD_DEBUG is not set
266CONFIG_MTD_CONCAT=y 335CONFIG_MTD_CONCAT=y
@@ -272,11 +341,14 @@ CONFIG_MTD_CMDLINE_PARTS=y
272# User Modules And Translation Layers 341# User Modules And Translation Layers
273# 342#
274CONFIG_MTD_CHAR=y 343CONFIG_MTD_CHAR=y
344CONFIG_MTD_BLKDEVS=y
275CONFIG_MTD_BLOCK=y 345CONFIG_MTD_BLOCK=y
276# CONFIG_FTL is not set 346# CONFIG_FTL is not set
277# CONFIG_NFTL is not set 347# CONFIG_NFTL is not set
278# CONFIG_INFTL is not set 348# CONFIG_INFTL is not set
279# CONFIG_RFD_FTL is not set 349# CONFIG_RFD_FTL is not set
350# CONFIG_SSFDC is not set
351# CONFIG_MTD_OOPS is not set
280 352
281# 353#
282# RAM/ROM/Flash chip drivers 354# RAM/ROM/Flash chip drivers
@@ -297,7 +369,6 @@ CONFIG_MTD_CFI_I2=y
297# CONFIG_MTD_CFI_I8 is not set 369# CONFIG_MTD_CFI_I8 is not set
298# CONFIG_MTD_CFI_INTELEXT is not set 370# CONFIG_MTD_CFI_INTELEXT is not set
299CONFIG_MTD_CFI_AMDSTD=y 371CONFIG_MTD_CFI_AMDSTD=y
300CONFIG_MTD_CFI_AMDSTD_RETRY=0
301# CONFIG_MTD_CFI_STAA is not set 372# CONFIG_MTD_CFI_STAA is not set
302CONFIG_MTD_CFI_UTIL=y 373CONFIG_MTD_CFI_UTIL=y
303# CONFIG_MTD_RAM is not set 374# CONFIG_MTD_RAM is not set
@@ -309,7 +380,8 @@ CONFIG_MTD_CFI_UTIL=y
309# 380#
310# CONFIG_MTD_COMPLEX_MAPPINGS is not set 381# CONFIG_MTD_COMPLEX_MAPPINGS is not set
311# CONFIG_MTD_PHYSMAP is not set 382# CONFIG_MTD_PHYSMAP is not set
312CONFIG_MTD_TQM85xx=y 383# CONFIG_MTD_PHYSMAP_OF is not set
384# CONFIG_MTD_INTEL_VR_NOR is not set
313# CONFIG_MTD_PLATRAM is not set 385# CONFIG_MTD_PLATRAM is not set
314 386
315# 387#
@@ -319,7 +391,6 @@ CONFIG_MTD_TQM85xx=y
319# CONFIG_MTD_SLRAM is not set 391# CONFIG_MTD_SLRAM is not set
320# CONFIG_MTD_PHRAM is not set 392# CONFIG_MTD_PHRAM is not set
321# CONFIG_MTD_MTDRAM is not set 393# CONFIG_MTD_MTDRAM is not set
322# CONFIG_MTD_BLKMTD is not set
323# CONFIG_MTD_BLOCK2MTD is not set 394# CONFIG_MTD_BLOCK2MTD is not set
324 395
325# 396#
@@ -328,29 +399,16 @@ CONFIG_MTD_TQM85xx=y
328# CONFIG_MTD_DOC2000 is not set 399# CONFIG_MTD_DOC2000 is not set
329# CONFIG_MTD_DOC2001 is not set 400# CONFIG_MTD_DOC2001 is not set
330# CONFIG_MTD_DOC2001PLUS is not set 401# CONFIG_MTD_DOC2001PLUS is not set
331
332#
333# NAND Flash Device Drivers
334#
335# CONFIG_MTD_NAND is not set 402# CONFIG_MTD_NAND is not set
336
337#
338# OneNAND Flash Device Drivers
339#
340# CONFIG_MTD_ONENAND is not set 403# CONFIG_MTD_ONENAND is not set
341 404
342# 405#
343# Parallel port support 406# UBI - Unsorted block images
344# 407#
408# CONFIG_MTD_UBI is not set
409CONFIG_OF_DEVICE=y
345# CONFIG_PARPORT is not set 410# CONFIG_PARPORT is not set
346 411CONFIG_BLK_DEV=y
347#
348# Plug and Play support
349#
350
351#
352# Block devices
353#
354# CONFIG_BLK_DEV_FD is not set 412# CONFIG_BLK_DEV_FD is not set
355# CONFIG_BLK_CPQ_DA is not set 413# CONFIG_BLK_CPQ_DA is not set
356# CONFIG_BLK_CPQ_CISS_DA is not set 414# CONFIG_BLK_CPQ_CISS_DA is not set
@@ -364,14 +422,16 @@ CONFIG_BLK_DEV_LOOP=y
364CONFIG_BLK_DEV_RAM=y 422CONFIG_BLK_DEV_RAM=y
365CONFIG_BLK_DEV_RAM_COUNT=16 423CONFIG_BLK_DEV_RAM_COUNT=16
366CONFIG_BLK_DEV_RAM_SIZE=32768 424CONFIG_BLK_DEV_RAM_SIZE=32768
367CONFIG_BLK_DEV_INITRD=y 425CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
368# CONFIG_CDROM_PKTCDVD is not set 426# CONFIG_CDROM_PKTCDVD is not set
369# CONFIG_ATA_OVER_ETH is not set 427# CONFIG_ATA_OVER_ETH is not set
370 428CONFIG_MISC_DEVICES=y
371# 429# CONFIG_PHANTOM is not set
372# ATA/ATAPI/MFM/RLL support 430# CONFIG_EEPROM_93CX6 is not set
373# 431# CONFIG_SGI_IOC4 is not set
432# CONFIG_TIFM_CORE is not set
374CONFIG_IDE=y 433CONFIG_IDE=y
434CONFIG_IDE_MAX_HWIFS=4
375CONFIG_BLK_DEV_IDE=y 435CONFIG_BLK_DEV_IDE=y
376 436
377# 437#
@@ -384,21 +444,24 @@ CONFIG_BLK_DEV_IDEDISK=y
384# CONFIG_BLK_DEV_IDETAPE is not set 444# CONFIG_BLK_DEV_IDETAPE is not set
385# CONFIG_BLK_DEV_IDEFLOPPY is not set 445# CONFIG_BLK_DEV_IDEFLOPPY is not set
386# CONFIG_IDE_TASK_IOCTL is not set 446# CONFIG_IDE_TASK_IOCTL is not set
447CONFIG_IDE_PROC_FS=y
387 448
388# 449#
389# IDE chipset support/bugfixes 450# IDE chipset support/bugfixes
390# 451#
391CONFIG_IDE_GENERIC=y 452CONFIG_IDE_GENERIC=y
453# CONFIG_BLK_DEV_PLATFORM is not set
454
455#
456# PCI IDE chipsets support
457#
392CONFIG_BLK_DEV_IDEPCI=y 458CONFIG_BLK_DEV_IDEPCI=y
393CONFIG_IDEPCI_SHARE_IRQ=y 459CONFIG_IDEPCI_SHARE_IRQ=y
460CONFIG_IDEPCI_PCIBUS_ORDER=y
394# CONFIG_BLK_DEV_OFFBOARD is not set 461# CONFIG_BLK_DEV_OFFBOARD is not set
395CONFIG_BLK_DEV_GENERIC=y 462CONFIG_BLK_DEV_GENERIC=y
396# CONFIG_BLK_DEV_OPTI621 is not set 463# CONFIG_BLK_DEV_OPTI621 is not set
397# CONFIG_BLK_DEV_SL82C105 is not set
398CONFIG_BLK_DEV_IDEDMA_PCI=y 464CONFIG_BLK_DEV_IDEDMA_PCI=y
399# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
400CONFIG_IDEDMA_PCI_AUTO=y
401# CONFIG_IDEDMA_ONLYDISK is not set
402# CONFIG_BLK_DEV_AEC62XX is not set 465# CONFIG_BLK_DEV_AEC62XX is not set
403# CONFIG_BLK_DEV_ALI15X3 is not set 466# CONFIG_BLK_DEV_ALI15X3 is not set
404# CONFIG_BLK_DEV_AMD74XX is not set 467# CONFIG_BLK_DEV_AMD74XX is not set
@@ -409,21 +472,24 @@ CONFIG_IDEDMA_PCI_AUTO=y
409# CONFIG_BLK_DEV_CS5530 is not set 472# CONFIG_BLK_DEV_CS5530 is not set
410# CONFIG_BLK_DEV_HPT34X is not set 473# CONFIG_BLK_DEV_HPT34X is not set
411# CONFIG_BLK_DEV_HPT366 is not set 474# CONFIG_BLK_DEV_HPT366 is not set
475# CONFIG_BLK_DEV_JMICRON is not set
412# CONFIG_BLK_DEV_SC1200 is not set 476# CONFIG_BLK_DEV_SC1200 is not set
413# CONFIG_BLK_DEV_PIIX is not set 477# CONFIG_BLK_DEV_PIIX is not set
478# CONFIG_BLK_DEV_IT8213 is not set
414# CONFIG_BLK_DEV_IT821X is not set 479# CONFIG_BLK_DEV_IT821X is not set
415# CONFIG_BLK_DEV_NS87415 is not set 480# CONFIG_BLK_DEV_NS87415 is not set
416# CONFIG_BLK_DEV_PDC202XX_OLD is not set 481# CONFIG_BLK_DEV_PDC202XX_OLD is not set
417# CONFIG_BLK_DEV_PDC202XX_NEW is not set 482# CONFIG_BLK_DEV_PDC202XX_NEW is not set
418# CONFIG_BLK_DEV_SVWKS is not set 483# CONFIG_BLK_DEV_SVWKS is not set
419# CONFIG_BLK_DEV_SIIMAGE is not set 484# CONFIG_BLK_DEV_SIIMAGE is not set
485# CONFIG_BLK_DEV_SL82C105 is not set
420# CONFIG_BLK_DEV_SLC90E66 is not set 486# CONFIG_BLK_DEV_SLC90E66 is not set
421# CONFIG_BLK_DEV_TRM290 is not set 487# CONFIG_BLK_DEV_TRM290 is not set
422CONFIG_BLK_DEV_VIA82CXXX=y 488CONFIG_BLK_DEV_VIA82CXXX=y
489# CONFIG_BLK_DEV_TC86C001 is not set
423# CONFIG_IDE_ARM is not set 490# CONFIG_IDE_ARM is not set
424CONFIG_BLK_DEV_IDEDMA=y 491CONFIG_BLK_DEV_IDEDMA=y
425# CONFIG_IDEDMA_IVB is not set 492CONFIG_IDE_ARCH_OBSOLETE_INIT=y
426CONFIG_IDEDMA_AUTO=y
427# CONFIG_BLK_DEV_HD is not set 493# CONFIG_BLK_DEV_HD is not set
428 494
429# 495#
@@ -431,49 +497,28 @@ CONFIG_IDEDMA_AUTO=y
431# 497#
432# CONFIG_RAID_ATTRS is not set 498# CONFIG_RAID_ATTRS is not set
433# CONFIG_SCSI is not set 499# CONFIG_SCSI is not set
434 500# CONFIG_SCSI_DMA is not set
435# 501# CONFIG_SCSI_NETLINK is not set
436# Multi-device support (RAID and LVM) 502# CONFIG_ATA is not set
437#
438# CONFIG_MD is not set 503# CONFIG_MD is not set
439
440#
441# Fusion MPT device support
442#
443# CONFIG_FUSION is not set 504# CONFIG_FUSION is not set
444 505
445# 506#
446# IEEE 1394 (FireWire) support 507# IEEE 1394 (FireWire) support
447# 508#
509# CONFIG_FIREWIRE is not set
448# CONFIG_IEEE1394 is not set 510# CONFIG_IEEE1394 is not set
449
450#
451# I2O device support
452#
453# CONFIG_I2O is not set 511# CONFIG_I2O is not set
454 512# CONFIG_MACINTOSH_DRIVERS is not set
455#
456# Macintosh device drivers
457#
458# CONFIG_WINDFARM is not set
459
460#
461# Network device support
462#
463CONFIG_NETDEVICES=y 513CONFIG_NETDEVICES=y
514# CONFIG_NETDEVICES_MULTIQUEUE is not set
464# CONFIG_DUMMY is not set 515# CONFIG_DUMMY is not set
465# CONFIG_BONDING is not set 516# CONFIG_BONDING is not set
517# CONFIG_MACVLAN is not set
466# CONFIG_EQUALIZER is not set 518# CONFIG_EQUALIZER is not set
467# CONFIG_TUN is not set 519# CONFIG_TUN is not set
468 520# CONFIG_VETH is not set
469#
470# ARCnet devices
471#
472# CONFIG_ARCNET is not set 521# CONFIG_ARCNET is not set
473
474#
475# PHY device support
476#
477CONFIG_PHYLIB=y 522CONFIG_PHYLIB=y
478 523
479# 524#
@@ -484,29 +529,30 @@ CONFIG_PHYLIB=y
484# CONFIG_QSEMI_PHY is not set 529# CONFIG_QSEMI_PHY is not set
485# CONFIG_LXT_PHY is not set 530# CONFIG_LXT_PHY is not set
486# CONFIG_CICADA_PHY is not set 531# CONFIG_CICADA_PHY is not set
487 532# CONFIG_VITESSE_PHY is not set
488# 533# CONFIG_SMSC_PHY is not set
489# Ethernet (10 or 100Mbit) 534# CONFIG_BROADCOM_PHY is not set
490# 535# CONFIG_ICPLUS_PHY is not set
536# CONFIG_FIXED_PHY is not set
537# CONFIG_MDIO_BITBANG is not set
491CONFIG_NET_ETHERNET=y 538CONFIG_NET_ETHERNET=y
492CONFIG_MII=y 539CONFIG_MII=y
493# CONFIG_HAPPYMEAL is not set 540# CONFIG_HAPPYMEAL is not set
494# CONFIG_SUNGEM is not set 541# CONFIG_SUNGEM is not set
495# CONFIG_CASSINI is not set 542# CONFIG_CASSINI is not set
496# CONFIG_NET_VENDOR_3COM is not set 543# CONFIG_NET_VENDOR_3COM is not set
497
498#
499# Tulip family network device support
500#
501# CONFIG_NET_TULIP is not set 544# CONFIG_NET_TULIP is not set
502# CONFIG_HP100 is not set 545# CONFIG_HP100 is not set
546# CONFIG_IBM_NEW_EMAC_ZMII is not set
547# CONFIG_IBM_NEW_EMAC_RGMII is not set
548# CONFIG_IBM_NEW_EMAC_TAH is not set
549# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
503CONFIG_NET_PCI=y 550CONFIG_NET_PCI=y
504# CONFIG_PCNET32 is not set 551# CONFIG_PCNET32 is not set
505# CONFIG_AMD8111_ETH is not set 552# CONFIG_AMD8111_ETH is not set
506# CONFIG_ADAPTEC_STARFIRE is not set 553# CONFIG_ADAPTEC_STARFIRE is not set
507# CONFIG_B44 is not set 554# CONFIG_B44 is not set
508# CONFIG_FORCEDETH is not set 555# CONFIG_FORCEDETH is not set
509# CONFIG_DGRS is not set
510# CONFIG_EEPRO100 is not set 556# CONFIG_EEPRO100 is not set
511CONFIG_E100=y 557CONFIG_E100=y
512# CONFIG_FEALNX is not set 558# CONFIG_FEALNX is not set
@@ -519,47 +565,47 @@ CONFIG_E100=y
519# CONFIG_SUNDANCE is not set 565# CONFIG_SUNDANCE is not set
520# CONFIG_TLAN is not set 566# CONFIG_TLAN is not set
521# CONFIG_VIA_RHINE is not set 567# CONFIG_VIA_RHINE is not set
568# CONFIG_SC92031 is not set
522# CONFIG_FS_ENET is not set 569# CONFIG_FS_ENET is not set
523 570CONFIG_NETDEV_1000=y
524#
525# Ethernet (1000 Mbit)
526#
527# CONFIG_ACENIC is not set 571# CONFIG_ACENIC is not set
528# CONFIG_DL2K is not set 572# CONFIG_DL2K is not set
529# CONFIG_E1000 is not set 573# CONFIG_E1000 is not set
574# CONFIG_E1000E is not set
575# CONFIG_IP1000 is not set
530# CONFIG_NS83820 is not set 576# CONFIG_NS83820 is not set
531# CONFIG_HAMACHI is not set 577# CONFIG_HAMACHI is not set
532# CONFIG_YELLOWFIN is not set 578# CONFIG_YELLOWFIN is not set
533# CONFIG_R8169 is not set 579# CONFIG_R8169 is not set
534# CONFIG_SIS190 is not set 580# CONFIG_SIS190 is not set
535# CONFIG_SKGE is not set 581# CONFIG_SKGE is not set
582# CONFIG_SKY2 is not set
536# CONFIG_SK98LIN is not set 583# CONFIG_SK98LIN is not set
537# CONFIG_VIA_VELOCITY is not set 584# CONFIG_VIA_VELOCITY is not set
538# CONFIG_TIGON3 is not set 585# CONFIG_TIGON3 is not set
539# CONFIG_BNX2 is not set 586# CONFIG_BNX2 is not set
540CONFIG_GIANFAR=y 587CONFIG_GIANFAR=y
541CONFIG_GFAR_NAPI=y 588CONFIG_GFAR_NAPI=y
542 589# CONFIG_QLA3XXX is not set
543# 590# CONFIG_ATL1 is not set
544# Ethernet (10000 Mbit) 591CONFIG_NETDEV_10000=y
545#
546# CONFIG_CHELSIO_T1 is not set 592# CONFIG_CHELSIO_T1 is not set
593# CONFIG_CHELSIO_T3 is not set
594# CONFIG_IXGBE is not set
547# CONFIG_IXGB is not set 595# CONFIG_IXGB is not set
548# CONFIG_S2IO is not set 596# CONFIG_S2IO is not set
549 597# CONFIG_MYRI10GE is not set
550# 598# CONFIG_NETXEN_NIC is not set
551# Token Ring devices 599# CONFIG_NIU is not set
552# 600# CONFIG_MLX4_CORE is not set
601# CONFIG_TEHUTI is not set
553# CONFIG_TR is not set 602# CONFIG_TR is not set
554 603
555# 604#
556# Wireless LAN (non-hamradio) 605# Wireless LAN
557#
558# CONFIG_NET_RADIO is not set
559
560#
561# Wan interfaces
562# 606#
607# CONFIG_WLAN_PRE80211 is not set
608# CONFIG_WLAN_80211 is not set
563# CONFIG_WAN is not set 609# CONFIG_WAN is not set
564# CONFIG_FDDI is not set 610# CONFIG_FDDI is not set
565# CONFIG_HIPPI is not set 611# CONFIG_HIPPI is not set
@@ -569,28 +615,21 @@ CONFIG_GFAR_NAPI=y
569# CONFIG_NETCONSOLE is not set 615# CONFIG_NETCONSOLE is not set
570# CONFIG_NETPOLL is not set 616# CONFIG_NETPOLL is not set
571# CONFIG_NET_POLL_CONTROLLER is not set 617# CONFIG_NET_POLL_CONTROLLER is not set
572
573#
574# ISDN subsystem
575#
576# CONFIG_ISDN is not set 618# CONFIG_ISDN is not set
577
578#
579# Telephony Support
580#
581# CONFIG_PHONE is not set 619# CONFIG_PHONE is not set
582 620
583# 621#
584# Input device support 622# Input device support
585# 623#
586CONFIG_INPUT=y 624CONFIG_INPUT=y
625# CONFIG_INPUT_FF_MEMLESS is not set
626# CONFIG_INPUT_POLLDEV is not set
587 627
588# 628#
589# Userland interfaces 629# Userland interfaces
590# 630#
591# CONFIG_INPUT_MOUSEDEV is not set 631# CONFIG_INPUT_MOUSEDEV is not set
592# CONFIG_INPUT_JOYDEV is not set 632# CONFIG_INPUT_JOYDEV is not set
593# CONFIG_INPUT_TSDEV is not set
594# CONFIG_INPUT_EVDEV is not set 633# CONFIG_INPUT_EVDEV is not set
595# CONFIG_INPUT_EVBUG is not set 634# CONFIG_INPUT_EVBUG is not set
596 635
@@ -600,6 +639,7 @@ CONFIG_INPUT=y
600# CONFIG_INPUT_KEYBOARD is not set 639# CONFIG_INPUT_KEYBOARD is not set
601# CONFIG_INPUT_MOUSE is not set 640# CONFIG_INPUT_MOUSE is not set
602# CONFIG_INPUT_JOYSTICK is not set 641# CONFIG_INPUT_JOYSTICK is not set
642# CONFIG_INPUT_TABLET is not set
603# CONFIG_INPUT_TOUCHSCREEN is not set 643# CONFIG_INPUT_TOUCHSCREEN is not set
604# CONFIG_INPUT_MISC is not set 644# CONFIG_INPUT_MISC is not set
605 645
@@ -620,12 +660,16 @@ CONFIG_INPUT=y
620# 660#
621CONFIG_SERIAL_8250=y 661CONFIG_SERIAL_8250=y
622CONFIG_SERIAL_8250_CONSOLE=y 662CONFIG_SERIAL_8250_CONSOLE=y
663CONFIG_SERIAL_8250_PCI=y
623CONFIG_SERIAL_8250_NR_UARTS=4 664CONFIG_SERIAL_8250_NR_UARTS=4
665CONFIG_SERIAL_8250_RUNTIME_UARTS=4
624# CONFIG_SERIAL_8250_EXTENDED is not set 666# CONFIG_SERIAL_8250_EXTENDED is not set
667CONFIG_SERIAL_8250_SHARE_IRQ=y
625 668
626# 669#
627# Non-8250 serial port support 670# Non-8250 serial port support
628# 671#
672# CONFIG_SERIAL_UARTLITE is not set
629CONFIG_SERIAL_CORE=y 673CONFIG_SERIAL_CORE=y
630CONFIG_SERIAL_CORE_CONSOLE=y 674CONFIG_SERIAL_CORE_CONSOLE=y
631CONFIG_SERIAL_CPM=y 675CONFIG_SERIAL_CPM=y
@@ -637,43 +681,22 @@ CONFIG_SERIAL_CPM_SCC1=y
637# CONFIG_SERIAL_CPM_SMC1 is not set 681# CONFIG_SERIAL_CPM_SMC1 is not set
638# CONFIG_SERIAL_CPM_SMC2 is not set 682# CONFIG_SERIAL_CPM_SMC2 is not set
639# CONFIG_SERIAL_JSM is not set 683# CONFIG_SERIAL_JSM is not set
684# CONFIG_SERIAL_OF_PLATFORM is not set
640CONFIG_UNIX98_PTYS=y 685CONFIG_UNIX98_PTYS=y
641CONFIG_LEGACY_PTYS=y 686CONFIG_LEGACY_PTYS=y
642CONFIG_LEGACY_PTY_COUNT=256 687CONFIG_LEGACY_PTY_COUNT=256
643
644#
645# IPMI
646#
647# CONFIG_IPMI_HANDLER is not set 688# CONFIG_IPMI_HANDLER is not set
648 689CONFIG_HW_RANDOM=y
649#
650# Watchdog Cards
651#
652# CONFIG_WATCHDOG is not set
653# CONFIG_NVRAM is not set 690# CONFIG_NVRAM is not set
654CONFIG_GEN_RTC=y 691CONFIG_GEN_RTC=y
655# CONFIG_GEN_RTC_X is not set 692# CONFIG_GEN_RTC_X is not set
656# CONFIG_DTLK is not set
657# CONFIG_R3964 is not set 693# CONFIG_R3964 is not set
658# CONFIG_APPLICOM is not set 694# CONFIG_APPLICOM is not set
659
660#
661# Ftape, the floppy tape device driver
662#
663# CONFIG_AGP is not set
664# CONFIG_DRM is not set
665# CONFIG_RAW_DRIVER is not set 695# CONFIG_RAW_DRIVER is not set
666
667#
668# TPM devices
669#
670# CONFIG_TCG_TPM is not set 696# CONFIG_TCG_TPM is not set
671# CONFIG_TELCLOCK is not set 697CONFIG_DEVPORT=y
672
673#
674# I2C support
675#
676CONFIG_I2C=y 698CONFIG_I2C=y
699CONFIG_I2C_BOARDINFO=y
677CONFIG_I2C_CHARDEV=y 700CONFIG_I2C_CHARDEV=y
678 701
679# 702#
@@ -695,60 +718,61 @@ CONFIG_I2C_CHARDEV=y
695# CONFIG_I2C_I810 is not set 718# CONFIG_I2C_I810 is not set
696# CONFIG_I2C_PIIX4 is not set 719# CONFIG_I2C_PIIX4 is not set
697CONFIG_I2C_MPC=y 720CONFIG_I2C_MPC=y
698# CONFIG_I2C_MPC8260 is not set
699# CONFIG_I2C_NFORCE2 is not set 721# CONFIG_I2C_NFORCE2 is not set
722# CONFIG_I2C_OCORES is not set
700# CONFIG_I2C_PARPORT_LIGHT is not set 723# CONFIG_I2C_PARPORT_LIGHT is not set
701# CONFIG_I2C_PROSAVAGE is not set 724# CONFIG_I2C_PROSAVAGE is not set
702# CONFIG_I2C_SAVAGE4 is not set 725# CONFIG_I2C_SAVAGE4 is not set
703# CONFIG_SCx200_ACB is not set 726# CONFIG_I2C_SIMTEC is not set
704# CONFIG_I2C_SIS5595 is not set 727# CONFIG_I2C_SIS5595 is not set
705# CONFIG_I2C_SIS630 is not set 728# CONFIG_I2C_SIS630 is not set
706# CONFIG_I2C_SIS96X is not set 729# CONFIG_I2C_SIS96X is not set
730# CONFIG_I2C_TAOS_EVM is not set
707# CONFIG_I2C_VIA is not set 731# CONFIG_I2C_VIA is not set
708# CONFIG_I2C_VIAPRO is not set 732# CONFIG_I2C_VIAPRO is not set
709# CONFIG_I2C_VOODOO3 is not set 733# CONFIG_I2C_VOODOO3 is not set
710# CONFIG_I2C_PCA_ISA is not set
711 734
712# 735#
713# Miscellaneous I2C Chip support 736# Miscellaneous I2C Chip support
714# 737#
715CONFIG_SENSORS_DS1337=y 738CONFIG_SENSORS_DS1337=y
716# CONFIG_SENSORS_DS1374 is not set 739# CONFIG_SENSORS_DS1374 is not set
740# CONFIG_DS1682 is not set
717# CONFIG_SENSORS_EEPROM is not set 741# CONFIG_SENSORS_EEPROM is not set
718# CONFIG_SENSORS_MAX6900 is not set
719# CONFIG_SENSORS_PCF8574 is not set 742# CONFIG_SENSORS_PCF8574 is not set
720# CONFIG_SENSORS_PCF8563 is not set
721# CONFIG_SENSORS_PCA9539 is not set 743# CONFIG_SENSORS_PCA9539 is not set
722# CONFIG_SENSORS_PCF8591 is not set 744# CONFIG_SENSORS_PCF8591 is not set
723# CONFIG_SENSORS_RTC8564 is not set
724# CONFIG_SENSORS_M41T00 is not set 745# CONFIG_SENSORS_M41T00 is not set
725# CONFIG_SENSORS_MAX6875 is not set 746# CONFIG_SENSORS_MAX6875 is not set
726# CONFIG_RTC_X1205_I2C is not set 747# CONFIG_SENSORS_TSL2550 is not set
727# CONFIG_I2C_DEBUG_CORE is not set 748# CONFIG_I2C_DEBUG_CORE is not set
728# CONFIG_I2C_DEBUG_ALGO is not set 749# CONFIG_I2C_DEBUG_ALGO is not set
729# CONFIG_I2C_DEBUG_BUS is not set 750# CONFIG_I2C_DEBUG_BUS is not set
730# CONFIG_I2C_DEBUG_CHIP is not set 751# CONFIG_I2C_DEBUG_CHIP is not set
731 752
732# 753#
733# Dallas's 1-wire bus 754# SPI support
734# 755#
756# CONFIG_SPI is not set
757# CONFIG_SPI_MASTER is not set
735# CONFIG_W1 is not set 758# CONFIG_W1 is not set
736 759# CONFIG_POWER_SUPPLY is not set
737#
738# Hardware Monitoring support
739#
740CONFIG_HWMON=y 760CONFIG_HWMON=y
741# CONFIG_HWMON_VID is not set 761# CONFIG_HWMON_VID is not set
762# CONFIG_SENSORS_AD7418 is not set
742# CONFIG_SENSORS_ADM1021 is not set 763# CONFIG_SENSORS_ADM1021 is not set
743# CONFIG_SENSORS_ADM1025 is not set 764# CONFIG_SENSORS_ADM1025 is not set
744# CONFIG_SENSORS_ADM1026 is not set 765# CONFIG_SENSORS_ADM1026 is not set
766# CONFIG_SENSORS_ADM1029 is not set
745# CONFIG_SENSORS_ADM1031 is not set 767# CONFIG_SENSORS_ADM1031 is not set
746# CONFIG_SENSORS_ADM9240 is not set 768# CONFIG_SENSORS_ADM9240 is not set
747# CONFIG_SENSORS_ASB100 is not set 769# CONFIG_SENSORS_ADT7470 is not set
748# CONFIG_SENSORS_ATXP1 is not set 770# CONFIG_SENSORS_ATXP1 is not set
749# CONFIG_SENSORS_DS1621 is not set 771# CONFIG_SENSORS_DS1621 is not set
750# CONFIG_SENSORS_FSCHER is not set 772# CONFIG_SENSORS_I5K_AMB is not set
751# CONFIG_SENSORS_FSCPOS is not set 773# CONFIG_SENSORS_F71805F is not set
774# CONFIG_SENSORS_F71882FG is not set
775# CONFIG_SENSORS_F75375S is not set
752# CONFIG_SENSORS_GL518SM is not set 776# CONFIG_SENSORS_GL518SM is not set
753# CONFIG_SENSORS_GL520SM is not set 777# CONFIG_SENSORS_GL520SM is not set
754# CONFIG_SENSORS_IT87 is not set 778# CONFIG_SENSORS_IT87 is not set
@@ -762,52 +786,75 @@ CONFIG_SENSORS_LM75=y
762# CONFIG_SENSORS_LM87 is not set 786# CONFIG_SENSORS_LM87 is not set
763# CONFIG_SENSORS_LM90 is not set 787# CONFIG_SENSORS_LM90 is not set
764# CONFIG_SENSORS_LM92 is not set 788# CONFIG_SENSORS_LM92 is not set
789# CONFIG_SENSORS_LM93 is not set
765# CONFIG_SENSORS_MAX1619 is not set 790# CONFIG_SENSORS_MAX1619 is not set
791# CONFIG_SENSORS_MAX6650 is not set
766# CONFIG_SENSORS_PC87360 is not set 792# CONFIG_SENSORS_PC87360 is not set
793# CONFIG_SENSORS_PC87427 is not set
767# CONFIG_SENSORS_SIS5595 is not set 794# CONFIG_SENSORS_SIS5595 is not set
795# CONFIG_SENSORS_DME1737 is not set
768# CONFIG_SENSORS_SMSC47M1 is not set 796# CONFIG_SENSORS_SMSC47M1 is not set
797# CONFIG_SENSORS_SMSC47M192 is not set
769# CONFIG_SENSORS_SMSC47B397 is not set 798# CONFIG_SENSORS_SMSC47B397 is not set
799# CONFIG_SENSORS_THMC50 is not set
770# CONFIG_SENSORS_VIA686A is not set 800# CONFIG_SENSORS_VIA686A is not set
801# CONFIG_SENSORS_VT1211 is not set
802# CONFIG_SENSORS_VT8231 is not set
771# CONFIG_SENSORS_W83781D is not set 803# CONFIG_SENSORS_W83781D is not set
804# CONFIG_SENSORS_W83791D is not set
772# CONFIG_SENSORS_W83792D is not set 805# CONFIG_SENSORS_W83792D is not set
806# CONFIG_SENSORS_W83793 is not set
773# CONFIG_SENSORS_W83L785TS is not set 807# CONFIG_SENSORS_W83L785TS is not set
774# CONFIG_SENSORS_W83627HF is not set 808# CONFIG_SENSORS_W83627HF is not set
775# CONFIG_SENSORS_W83627EHF is not set 809# CONFIG_SENSORS_W83627EHF is not set
776CONFIG_HWMON_DEBUG_CHIP=y 810CONFIG_HWMON_DEBUG_CHIP=y
811# CONFIG_WATCHDOG is not set
777 812
778# 813#
779# Misc devices 814# Sonics Silicon Backplane
780# 815#
816CONFIG_SSB_POSSIBLE=y
817# CONFIG_SSB is not set
781 818
782# 819#
783# Multimedia Capabilities Port drivers 820# Multifunction device drivers
784# 821#
822# CONFIG_MFD_SM501 is not set
785 823
786# 824#
787# Multimedia devices 825# Multimedia devices
788# 826#
789# CONFIG_VIDEO_DEV is not set 827# CONFIG_VIDEO_DEV is not set
790 828# CONFIG_DVB_CORE is not set
791# 829CONFIG_DAB=y
792# Digital Video Broadcasting Devices
793#
794# CONFIG_DVB is not set
795 830
796# 831#
797# Graphics support 832# Graphics support
798# 833#
834# CONFIG_AGP is not set
835# CONFIG_DRM is not set
836# CONFIG_VGASTATE is not set
837# CONFIG_VIDEO_OUTPUT_CONTROL is not set
799# CONFIG_FB is not set 838# CONFIG_FB is not set
839# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
800 840
801# 841#
802# Sound 842# Display device support
803# 843#
804# CONFIG_SOUND is not set 844# CONFIG_DISPLAY_SUPPORT is not set
805 845
806# 846#
807# USB support 847# Sound
808# 848#
849# CONFIG_SOUND is not set
850CONFIG_HID_SUPPORT=y
851CONFIG_HID=y
852# CONFIG_HID_DEBUG is not set
853# CONFIG_HIDRAW is not set
854CONFIG_USB_SUPPORT=y
809CONFIG_USB_ARCH_HAS_HCD=y 855CONFIG_USB_ARCH_HAS_HCD=y
810CONFIG_USB_ARCH_HAS_OHCI=y 856CONFIG_USB_ARCH_HAS_OHCI=y
857CONFIG_USB_ARCH_HAS_EHCI=y
811# CONFIG_USB is not set 858# CONFIG_USB is not set
812 859
813# 860#
@@ -818,20 +865,16 @@ CONFIG_USB_ARCH_HAS_OHCI=y
818# USB Gadget Support 865# USB Gadget Support
819# 866#
820# CONFIG_USB_GADGET is not set 867# CONFIG_USB_GADGET is not set
821
822#
823# MMC/SD Card support
824#
825# CONFIG_MMC is not set 868# CONFIG_MMC is not set
826 869# CONFIG_NEW_LEDS is not set
827#
828# InfiniBand support
829#
830# CONFIG_INFINIBAND is not set 870# CONFIG_INFINIBAND is not set
871# CONFIG_EDAC is not set
872# CONFIG_RTC_CLASS is not set
831 873
832# 874#
833# SN Devices 875# Userspace I/O
834# 876#
877# CONFIG_UIO is not set
835 878
836# 879#
837# File systems 880# File systems
@@ -843,16 +886,19 @@ CONFIG_EXT3_FS=y
843CONFIG_EXT3_FS_XATTR=y 886CONFIG_EXT3_FS_XATTR=y
844# CONFIG_EXT3_FS_POSIX_ACL is not set 887# CONFIG_EXT3_FS_POSIX_ACL is not set
845# CONFIG_EXT3_FS_SECURITY is not set 888# CONFIG_EXT3_FS_SECURITY is not set
889# CONFIG_EXT4DEV_FS is not set
846CONFIG_JBD=y 890CONFIG_JBD=y
847# CONFIG_JBD_DEBUG is not set
848CONFIG_FS_MBCACHE=y 891CONFIG_FS_MBCACHE=y
849# CONFIG_REISERFS_FS is not set 892# CONFIG_REISERFS_FS is not set
850# CONFIG_JFS_FS is not set 893# CONFIG_JFS_FS is not set
851# CONFIG_FS_POSIX_ACL is not set 894# CONFIG_FS_POSIX_ACL is not set
852# CONFIG_XFS_FS is not set 895# CONFIG_XFS_FS is not set
896# CONFIG_GFS2_FS is not set
897# CONFIG_OCFS2_FS is not set
853# CONFIG_MINIX_FS is not set 898# CONFIG_MINIX_FS is not set
854# CONFIG_ROMFS_FS is not set 899# CONFIG_ROMFS_FS is not set
855CONFIG_INOTIFY=y 900CONFIG_INOTIFY=y
901CONFIG_INOTIFY_USER=y
856# CONFIG_QUOTA is not set 902# CONFIG_QUOTA is not set
857CONFIG_DNOTIFY=y 903CONFIG_DNOTIFY=y
858# CONFIG_AUTOFS_FS is not set 904# CONFIG_AUTOFS_FS is not set
@@ -877,11 +923,12 @@ CONFIG_DNOTIFY=y
877# 923#
878CONFIG_PROC_FS=y 924CONFIG_PROC_FS=y
879CONFIG_PROC_KCORE=y 925CONFIG_PROC_KCORE=y
926CONFIG_PROC_SYSCTL=y
880CONFIG_SYSFS=y 927CONFIG_SYSFS=y
881CONFIG_TMPFS=y 928CONFIG_TMPFS=y
929# CONFIG_TMPFS_POSIX_ACL is not set
882# CONFIG_HUGETLB_PAGE is not set 930# CONFIG_HUGETLB_PAGE is not set
883CONFIG_RAMFS=y 931# CONFIG_CONFIGFS_FS is not set
884# CONFIG_RELAYFS_FS is not set
885 932
886# 933#
887# Miscellaneous filesystems 934# Miscellaneous filesystems
@@ -893,13 +940,15 @@ CONFIG_RAMFS=y
893# CONFIG_BEFS_FS is not set 940# CONFIG_BEFS_FS is not set
894# CONFIG_BFS_FS is not set 941# CONFIG_BFS_FS is not set
895# CONFIG_EFS_FS is not set 942# CONFIG_EFS_FS is not set
896# CONFIG_JFFS_FS is not set
897CONFIG_JFFS2_FS=y 943CONFIG_JFFS2_FS=y
898CONFIG_JFFS2_FS_DEBUG=0 944CONFIG_JFFS2_FS_DEBUG=0
899CONFIG_JFFS2_FS_WRITEBUFFER=y 945CONFIG_JFFS2_FS_WRITEBUFFER=y
946# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
900# CONFIG_JFFS2_SUMMARY is not set 947# CONFIG_JFFS2_SUMMARY is not set
948# CONFIG_JFFS2_FS_XATTR is not set
901# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 949# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
902CONFIG_JFFS2_ZLIB=y 950CONFIG_JFFS2_ZLIB=y
951# CONFIG_JFFS2_LZO is not set
903CONFIG_JFFS2_RTIME=y 952CONFIG_JFFS2_RTIME=y
904# CONFIG_JFFS2_RUBIN is not set 953# CONFIG_JFFS2_RUBIN is not set
905CONFIG_CRAMFS=y 954CONFIG_CRAMFS=y
@@ -908,10 +957,7 @@ CONFIG_CRAMFS=y
908# CONFIG_QNX4FS_FS is not set 957# CONFIG_QNX4FS_FS is not set
909# CONFIG_SYSV_FS is not set 958# CONFIG_SYSV_FS is not set
910# CONFIG_UFS_FS is not set 959# CONFIG_UFS_FS is not set
911 960CONFIG_NETWORK_FILESYSTEMS=y
912#
913# Network File Systems
914#
915CONFIG_NFS_FS=y 961CONFIG_NFS_FS=y
916# CONFIG_NFS_V3 is not set 962# CONFIG_NFS_V3 is not set
917# CONFIG_NFS_V4 is not set 963# CONFIG_NFS_V4 is not set
@@ -921,6 +967,7 @@ CONFIG_ROOT_NFS=y
921CONFIG_LOCKD=y 967CONFIG_LOCKD=y
922CONFIG_NFS_COMMON=y 968CONFIG_NFS_COMMON=y
923CONFIG_SUNRPC=y 969CONFIG_SUNRPC=y
970# CONFIG_SUNRPC_BIND34 is not set
924# CONFIG_RPCSEC_GSS_KRB5 is not set 971# CONFIG_RPCSEC_GSS_KRB5 is not set
925# CONFIG_RPCSEC_GSS_SPKM3 is not set 972# CONFIG_RPCSEC_GSS_SPKM3 is not set
926# CONFIG_SMB_FS is not set 973# CONFIG_SMB_FS is not set
@@ -928,7 +975,6 @@ CONFIG_SUNRPC=y
928# CONFIG_NCP_FS is not set 975# CONFIG_NCP_FS is not set
929# CONFIG_CODA_FS is not set 976# CONFIG_CODA_FS is not set
930# CONFIG_AFS_FS is not set 977# CONFIG_AFS_FS is not set
931# CONFIG_9P_FS is not set
932 978
933# 979#
934# Partition Types 980# Partition Types
@@ -944,49 +990,55 @@ CONFIG_PARTITION_ADVANCED=y
944# CONFIG_SGI_PARTITION is not set 990# CONFIG_SGI_PARTITION is not set
945# CONFIG_ULTRIX_PARTITION is not set 991# CONFIG_ULTRIX_PARTITION is not set
946# CONFIG_SUN_PARTITION is not set 992# CONFIG_SUN_PARTITION is not set
993# CONFIG_KARMA_PARTITION is not set
947# CONFIG_EFI_PARTITION is not set 994# CONFIG_EFI_PARTITION is not set
948 995# CONFIG_SYSV68_PARTITION is not set
949#
950# Native Language Support
951#
952# CONFIG_NLS is not set 996# CONFIG_NLS is not set
953# CONFIG_SCC_ENET is not set 997# CONFIG_DLM is not set
954# CONFIG_FEC_ENET is not set
955
956#
957# CPM2 Options
958#
959 998
960# 999#
961# Library routines 1000# Library routines
962# 1001#
1002CONFIG_BITREVERSE=y
963# CONFIG_CRC_CCITT is not set 1003# CONFIG_CRC_CCITT is not set
964# CONFIG_CRC16 is not set 1004# CONFIG_CRC16 is not set
1005# CONFIG_CRC_ITU_T is not set
965CONFIG_CRC32=y 1006CONFIG_CRC32=y
1007# CONFIG_CRC7 is not set
966# CONFIG_LIBCRC32C is not set 1008# CONFIG_LIBCRC32C is not set
967CONFIG_ZLIB_INFLATE=y 1009CONFIG_ZLIB_INFLATE=y
968CONFIG_ZLIB_DEFLATE=y 1010CONFIG_ZLIB_DEFLATE=y
1011CONFIG_PLIST=y
1012CONFIG_HAS_IOMEM=y
1013CONFIG_HAS_IOPORT=y
1014CONFIG_HAS_DMA=y
1015CONFIG_INSTRUMENTATION=y
969# CONFIG_PROFILING is not set 1016# CONFIG_PROFILING is not set
1017# CONFIG_MARKERS is not set
970 1018
971# 1019#
972# Kernel hacking 1020# Kernel hacking
973# 1021#
974# CONFIG_PRINTK_TIME is not set 1022# CONFIG_PRINTK_TIME is not set
1023CONFIG_ENABLE_WARN_DEPRECATED=y
1024CONFIG_ENABLE_MUST_CHECK=y
1025# CONFIG_MAGIC_SYSRQ is not set
1026# CONFIG_UNUSED_SYMBOLS is not set
1027# CONFIG_DEBUG_FS is not set
1028# CONFIG_HEADERS_CHECK is not set
975# CONFIG_DEBUG_KERNEL is not set 1029# CONFIG_DEBUG_KERNEL is not set
976CONFIG_LOG_BUF_SHIFT=14 1030# CONFIG_SLUB_DEBUG_ON is not set
1031# CONFIG_DEBUG_BUGVERBOSE is not set
1032# CONFIG_SAMPLES is not set
977# CONFIG_KGDB_CONSOLE is not set 1033# CONFIG_KGDB_CONSOLE is not set
1034# CONFIG_PPC_EARLY_DEBUG is not set
978 1035
979# 1036#
980# Security options 1037# Security options
981# 1038#
982# CONFIG_KEYS is not set 1039# CONFIG_KEYS is not set
983# CONFIG_SECURITY is not set 1040# CONFIG_SECURITY is not set
984 1041# CONFIG_SECURITY_FILE_CAPABILITIES is not set
985#
986# Cryptographic options
987#
988# CONFIG_CRYPTO is not set 1042# CONFIG_CRYPTO is not set
989 1043# CONFIG_PPC_CLOCK is not set
990# 1044CONFIG_PPC_LIB_RHEAP=y
991# Hardware crypto devices
992#
diff --git a/arch/powerpc/configs/walnut_defconfig b/arch/powerpc/configs/walnut_defconfig
index 79344639b7c9..e431128e8e9e 100644
--- a/arch/powerpc/configs/walnut_defconfig
+++ b/arch/powerpc/configs/walnut_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.24-rc4 3# Linux kernel version: 2.6.24-rc6
4# Thu Dec 6 16:49:33 2007 4# Mon Dec 24 11:23:58 2007
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -40,7 +40,7 @@ CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
40CONFIG_ARCH_MAY_HAVE_PC_FDC=y 40CONFIG_ARCH_MAY_HAVE_PC_FDC=y
41CONFIG_PPC_OF=y 41CONFIG_PPC_OF=y
42CONFIG_OF=y 42CONFIG_OF=y
43# CONFIG_PPC_UDBG_16550 is not set 43CONFIG_PPC_UDBG_16550=y
44# CONFIG_GENERIC_TBSYNC is not set 44# CONFIG_GENERIC_TBSYNC is not set
45CONFIG_AUDIT_ARCH=y 45CONFIG_AUDIT_ARCH=y
46CONFIG_GENERIC_BUG=y 46CONFIG_GENERIC_BUG=y
@@ -127,6 +127,7 @@ CONFIG_DEFAULT_AS=y
127# CONFIG_DEFAULT_CFQ is not set 127# CONFIG_DEFAULT_CFQ is not set
128# CONFIG_DEFAULT_NOOP is not set 128# CONFIG_DEFAULT_NOOP is not set
129CONFIG_DEFAULT_IOSCHED="anticipatory" 129CONFIG_DEFAULT_IOSCHED="anticipatory"
130# CONFIG_PPC4xx_PCI_EXPRESS is not set
130 131
131# 132#
132# Platform support 133# Platform support
@@ -136,7 +137,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
136# CONFIG_PPC_CELL is not set 137# CONFIG_PPC_CELL is not set
137# CONFIG_PPC_CELL_NATIVE is not set 138# CONFIG_PPC_CELL_NATIVE is not set
138# CONFIG_PQ2ADS is not set 139# CONFIG_PQ2ADS is not set
140# CONFIG_EP405 is not set
139# CONFIG_KILAUEA is not set 141# CONFIG_KILAUEA is not set
142# CONFIG_MAKALU is not set
140CONFIG_WALNUT=y 143CONFIG_WALNUT=y
141# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set 144# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
142CONFIG_405GP=y 145CONFIG_405GP=y
@@ -204,11 +207,17 @@ CONFIG_ISA_DMA_API=y
204# Bus options 207# Bus options
205# 208#
206CONFIG_ZONE_DMA=y 209CONFIG_ZONE_DMA=y
207# CONFIG_PCI is not set 210CONFIG_PPC_INDIRECT_PCI=y
208# CONFIG_PCI_DOMAINS is not set 211CONFIG_PCI=y
209# CONFIG_PCI_SYSCALL is not set 212CONFIG_PCI_DOMAINS=y
210# CONFIG_ARCH_SUPPORTS_MSI is not set 213CONFIG_PCI_SYSCALL=y
214# CONFIG_PCIEPORTBUS is not set
215CONFIG_ARCH_SUPPORTS_MSI=y
216# CONFIG_PCI_MSI is not set
217# CONFIG_PCI_LEGACY is not set
218# CONFIG_PCI_DEBUG is not set
211# CONFIG_PCCARD is not set 219# CONFIG_PCCARD is not set
220# CONFIG_HOTPLUG_PCI is not set
212 221
213# 222#
214# Advanced setup 223# Advanced setup
@@ -373,11 +382,13 @@ CONFIG_MTD_CFI_UTIL=y
373# CONFIG_MTD_COMPLEX_MAPPINGS is not set 382# CONFIG_MTD_COMPLEX_MAPPINGS is not set
374# CONFIG_MTD_PHYSMAP is not set 383# CONFIG_MTD_PHYSMAP is not set
375CONFIG_MTD_PHYSMAP_OF=y 384CONFIG_MTD_PHYSMAP_OF=y
385# CONFIG_MTD_INTEL_VR_NOR is not set
376# CONFIG_MTD_PLATRAM is not set 386# CONFIG_MTD_PLATRAM is not set
377 387
378# 388#
379# Self-contained MTD device drivers 389# Self-contained MTD device drivers
380# 390#
391# CONFIG_MTD_PMC551 is not set
381# CONFIG_MTD_SLRAM is not set 392# CONFIG_MTD_SLRAM is not set
382# CONFIG_MTD_PHRAM is not set 393# CONFIG_MTD_PHRAM is not set
383# CONFIG_MTD_MTDRAM is not set 394# CONFIG_MTD_MTDRAM is not set
@@ -400,9 +411,14 @@ CONFIG_OF_DEVICE=y
400# CONFIG_PARPORT is not set 411# CONFIG_PARPORT is not set
401CONFIG_BLK_DEV=y 412CONFIG_BLK_DEV=y
402# CONFIG_BLK_DEV_FD is not set 413# CONFIG_BLK_DEV_FD is not set
414# CONFIG_BLK_CPQ_DA is not set
415# CONFIG_BLK_CPQ_CISS_DA is not set
416# CONFIG_BLK_DEV_DAC960 is not set
417# CONFIG_BLK_DEV_UMEM is not set
403# CONFIG_BLK_DEV_COW_COMMON is not set 418# CONFIG_BLK_DEV_COW_COMMON is not set
404# CONFIG_BLK_DEV_LOOP is not set 419# CONFIG_BLK_DEV_LOOP is not set
405# CONFIG_BLK_DEV_NBD is not set 420# CONFIG_BLK_DEV_NBD is not set
421# CONFIG_BLK_DEV_SX8 is not set
406CONFIG_BLK_DEV_RAM=y 422CONFIG_BLK_DEV_RAM=y
407CONFIG_BLK_DEV_RAM_COUNT=16 423CONFIG_BLK_DEV_RAM_COUNT=16
408CONFIG_BLK_DEV_RAM_SIZE=35000 424CONFIG_BLK_DEV_RAM_SIZE=35000
@@ -411,7 +427,10 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
411# CONFIG_ATA_OVER_ETH is not set 427# CONFIG_ATA_OVER_ETH is not set
412# CONFIG_XILINX_SYSACE is not set 428# CONFIG_XILINX_SYSACE is not set
413CONFIG_MISC_DEVICES=y 429CONFIG_MISC_DEVICES=y
430# CONFIG_PHANTOM is not set
414# CONFIG_EEPROM_93CX6 is not set 431# CONFIG_EEPROM_93CX6 is not set
432# CONFIG_SGI_IOC4 is not set
433# CONFIG_TIFM_CORE is not set
415# CONFIG_IDE is not set 434# CONFIG_IDE is not set
416 435
417# 436#
@@ -423,6 +442,14 @@ CONFIG_MISC_DEVICES=y
423# CONFIG_SCSI_NETLINK is not set 442# CONFIG_SCSI_NETLINK is not set
424# CONFIG_ATA is not set 443# CONFIG_ATA is not set
425# CONFIG_MD is not set 444# CONFIG_MD is not set
445# CONFIG_FUSION is not set
446
447#
448# IEEE 1394 (FireWire) support
449#
450# CONFIG_FIREWIRE is not set
451# CONFIG_IEEE1394 is not set
452# CONFIG_I2O is not set
426# CONFIG_MACINTOSH_DRIVERS is not set 453# CONFIG_MACINTOSH_DRIVERS is not set
427CONFIG_NETDEVICES=y 454CONFIG_NETDEVICES=y
428# CONFIG_NETDEVICES_MULTIQUEUE is not set 455# CONFIG_NETDEVICES_MULTIQUEUE is not set
@@ -432,9 +459,17 @@ CONFIG_NETDEVICES=y
432# CONFIG_EQUALIZER is not set 459# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set 460# CONFIG_TUN is not set
434# CONFIG_VETH is not set 461# CONFIG_VETH is not set
462# CONFIG_IP1000 is not set
463# CONFIG_ARCNET is not set
435# CONFIG_PHYLIB is not set 464# CONFIG_PHYLIB is not set
436CONFIG_NET_ETHERNET=y 465CONFIG_NET_ETHERNET=y
437# CONFIG_MII is not set 466# CONFIG_MII is not set
467# CONFIG_HAPPYMEAL is not set
468# CONFIG_SUNGEM is not set
469# CONFIG_CASSINI is not set
470# CONFIG_NET_VENDOR_3COM is not set
471# CONFIG_NET_TULIP is not set
472# CONFIG_HP100 is not set
438CONFIG_IBM_NEW_EMAC=y 473CONFIG_IBM_NEW_EMAC=y
439CONFIG_IBM_NEW_EMAC_RXB=128 474CONFIG_IBM_NEW_EMAC_RXB=128
440CONFIG_IBM_NEW_EMAC_TXB=64 475CONFIG_IBM_NEW_EMAC_TXB=64
@@ -446,9 +481,38 @@ CONFIG_IBM_NEW_EMAC_ZMII=y
446# CONFIG_IBM_NEW_EMAC_RGMII is not set 481# CONFIG_IBM_NEW_EMAC_RGMII is not set
447# CONFIG_IBM_NEW_EMAC_TAH is not set 482# CONFIG_IBM_NEW_EMAC_TAH is not set
448# CONFIG_IBM_NEW_EMAC_EMAC4 is not set 483# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
484# CONFIG_NET_PCI is not set
449# CONFIG_B44 is not set 485# CONFIG_B44 is not set
450CONFIG_NETDEV_1000=y 486CONFIG_NETDEV_1000=y
487# CONFIG_ACENIC is not set
488# CONFIG_DL2K is not set
489# CONFIG_E1000 is not set
490# CONFIG_E1000E is not set
491# CONFIG_NS83820 is not set
492# CONFIG_HAMACHI is not set
493# CONFIG_YELLOWFIN is not set
494# CONFIG_R8169 is not set
495# CONFIG_SIS190 is not set
496# CONFIG_SKGE is not set
497# CONFIG_SKY2 is not set
498# CONFIG_SK98LIN is not set
499# CONFIG_VIA_VELOCITY is not set
500# CONFIG_TIGON3 is not set
501# CONFIG_BNX2 is not set
502# CONFIG_QLA3XXX is not set
503# CONFIG_ATL1 is not set
451CONFIG_NETDEV_10000=y 504CONFIG_NETDEV_10000=y
505# CONFIG_CHELSIO_T1 is not set
506# CONFIG_CHELSIO_T3 is not set
507# CONFIG_IXGBE is not set
508# CONFIG_IXGB is not set
509# CONFIG_S2IO is not set
510# CONFIG_MYRI10GE is not set
511# CONFIG_NETXEN_NIC is not set
512# CONFIG_NIU is not set
513# CONFIG_MLX4_CORE is not set
514# CONFIG_TEHUTI is not set
515# CONFIG_TR is not set
452 516
453# 517#
454# Wireless LAN 518# Wireless LAN
@@ -456,6 +520,8 @@ CONFIG_NETDEV_10000=y
456# CONFIG_WLAN_PRE80211 is not set 520# CONFIG_WLAN_PRE80211 is not set
457# CONFIG_WLAN_80211 is not set 521# CONFIG_WLAN_80211 is not set
458# CONFIG_WAN is not set 522# CONFIG_WAN is not set
523# CONFIG_FDDI is not set
524# CONFIG_HIPPI is not set
459# CONFIG_PPP is not set 525# CONFIG_PPP is not set
460# CONFIG_SLIP is not set 526# CONFIG_SLIP is not set
461# CONFIG_SHAPER is not set 527# CONFIG_SHAPER is not set
@@ -487,6 +553,7 @@ CONFIG_NETDEV_10000=y
487# 553#
488CONFIG_SERIAL_8250=y 554CONFIG_SERIAL_8250=y
489CONFIG_SERIAL_8250_CONSOLE=y 555CONFIG_SERIAL_8250_CONSOLE=y
556CONFIG_SERIAL_8250_PCI=y
490CONFIG_SERIAL_8250_NR_UARTS=4 557CONFIG_SERIAL_8250_NR_UARTS=4
491CONFIG_SERIAL_8250_RUNTIME_UARTS=4 558CONFIG_SERIAL_8250_RUNTIME_UARTS=4
492CONFIG_SERIAL_8250_EXTENDED=y 559CONFIG_SERIAL_8250_EXTENDED=y
@@ -501,6 +568,7 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
501# CONFIG_SERIAL_UARTLITE is not set 568# CONFIG_SERIAL_UARTLITE is not set
502CONFIG_SERIAL_CORE=y 569CONFIG_SERIAL_CORE=y
503CONFIG_SERIAL_CORE_CONSOLE=y 570CONFIG_SERIAL_CORE_CONSOLE=y
571# CONFIG_SERIAL_JSM is not set
504CONFIG_SERIAL_OF_PLATFORM=y 572CONFIG_SERIAL_OF_PLATFORM=y
505CONFIG_UNIX98_PTYS=y 573CONFIG_UNIX98_PTYS=y
506CONFIG_LEGACY_PTYS=y 574CONFIG_LEGACY_PTYS=y
@@ -510,8 +578,10 @@ CONFIG_LEGACY_PTY_COUNT=256
510# CONFIG_NVRAM is not set 578# CONFIG_NVRAM is not set
511# CONFIG_GEN_RTC is not set 579# CONFIG_GEN_RTC is not set
512# CONFIG_R3964 is not set 580# CONFIG_R3964 is not set
581# CONFIG_APPLICOM is not set
513# CONFIG_RAW_DRIVER is not set 582# CONFIG_RAW_DRIVER is not set
514# CONFIG_TCG_TPM is not set 583# CONFIG_TCG_TPM is not set
584CONFIG_DEVPORT=y
515# CONFIG_I2C is not set 585# CONFIG_I2C is not set
516 586
517# 587#
@@ -545,6 +615,8 @@ CONFIG_SSB_POSSIBLE=y
545# 615#
546# Graphics support 616# Graphics support
547# 617#
618# CONFIG_AGP is not set
619# CONFIG_DRM is not set
548# CONFIG_VGASTATE is not set 620# CONFIG_VGASTATE is not set
549CONFIG_VIDEO_OUTPUT_CONTROL=m 621CONFIG_VIDEO_OUTPUT_CONTROL=m
550# CONFIG_FB is not set 622# CONFIG_FB is not set
@@ -560,9 +632,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
560# 632#
561# CONFIG_SOUND is not set 633# CONFIG_SOUND is not set
562CONFIG_USB_SUPPORT=y 634CONFIG_USB_SUPPORT=y
563# CONFIG_USB_ARCH_HAS_HCD is not set 635CONFIG_USB_ARCH_HAS_HCD=y
564# CONFIG_USB_ARCH_HAS_OHCI is not set 636CONFIG_USB_ARCH_HAS_OHCI=y
565# CONFIG_USB_ARCH_HAS_EHCI is not set 637CONFIG_USB_ARCH_HAS_EHCI=y
638# CONFIG_USB is not set
566 639
567# 640#
568# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 641# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -574,6 +647,7 @@ CONFIG_USB_SUPPORT=y
574# CONFIG_USB_GADGET is not set 647# CONFIG_USB_GADGET is not set
575# CONFIG_MMC is not set 648# CONFIG_MMC is not set
576# CONFIG_NEW_LEDS is not set 649# CONFIG_NEW_LEDS is not set
650# CONFIG_INFINIBAND is not set
577# CONFIG_EDAC is not set 651# CONFIG_EDAC is not set
578# CONFIG_RTC_CLASS is not set 652# CONFIG_RTC_CLASS is not set
579 653
diff --git a/arch/powerpc/configs/warp_defconfig b/arch/powerpc/configs/warp_defconfig
new file mode 100644
index 000000000000..312557b5df53
--- /dev/null
+++ b/arch/powerpc/configs/warp_defconfig
@@ -0,0 +1,1057 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.24-rc6
4# Tue Jan 8 12:23:23 2008
5#
6# CONFIG_PPC64 is not set
7
8#
9# Processor support
10#
11# CONFIG_6xx is not set
12# CONFIG_PPC_85xx is not set
13# CONFIG_PPC_8xx is not set
14# CONFIG_40x is not set
15CONFIG_44x=y
16# CONFIG_E200 is not set
17CONFIG_PPC_FPU=y
18CONFIG_4xx=y
19CONFIG_BOOKE=y
20CONFIG_PTE_64BIT=y
21CONFIG_PHYS_64BIT=y
22# CONFIG_PPC_MM_SLICES is not set
23CONFIG_NOT_COHERENT_CACHE=y
24CONFIG_PPC32=y
25CONFIG_WORD_SIZE=32
26CONFIG_PPC_MERGE=y
27CONFIG_MMU=y
28CONFIG_GENERIC_CMOS_UPDATE=y
29CONFIG_GENERIC_TIME=y
30CONFIG_GENERIC_TIME_VSYSCALL=y
31CONFIG_GENERIC_CLOCKEVENTS=y
32CONFIG_GENERIC_HARDIRQS=y
33CONFIG_IRQ_PER_CPU=y
34CONFIG_RWSEM_XCHGADD_ALGORITHM=y
35CONFIG_ARCH_HAS_ILOG2_U32=y
36CONFIG_GENERIC_HWEIGHT=y
37CONFIG_GENERIC_CALIBRATE_DELAY=y
38CONFIG_GENERIC_FIND_NEXT_BIT=y
39# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
40CONFIG_PPC=y
41CONFIG_EARLY_PRINTK=y
42CONFIG_GENERIC_NVRAM=y
43CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
44CONFIG_ARCH_MAY_HAVE_PC_FDC=y
45CONFIG_PPC_OF=y
46CONFIG_OF=y
47CONFIG_PPC_UDBG_16550=y
48# CONFIG_GENERIC_TBSYNC is not set
49CONFIG_AUDIT_ARCH=y
50CONFIG_GENERIC_BUG=y
51# CONFIG_DEFAULT_UIMAGE is not set
52CONFIG_PPC_DCR_NATIVE=y
53# CONFIG_PPC_DCR_MMIO is not set
54CONFIG_PPC_DCR=y
55CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
56
57#
58# General setup
59#
60CONFIG_EXPERIMENTAL=y
61CONFIG_BROKEN_ON_SMP=y
62CONFIG_INIT_ENV_ARG_LIMIT=32
63CONFIG_LOCALVERSION="-pika"
64# CONFIG_LOCALVERSION_AUTO is not set
65CONFIG_SWAP=y
66CONFIG_SYSVIPC=y
67CONFIG_SYSVIPC_SYSCTL=y
68# CONFIG_POSIX_MQUEUE is not set
69# CONFIG_BSD_PROCESS_ACCT is not set
70# CONFIG_TASKSTATS is not set
71# CONFIG_USER_NS is not set
72# CONFIG_PID_NS is not set
73# CONFIG_AUDIT is not set
74# CONFIG_IKCONFIG is not set
75CONFIG_LOG_BUF_SHIFT=14
76# CONFIG_CGROUPS is not set
77CONFIG_FAIR_GROUP_SCHED=y
78CONFIG_FAIR_USER_SCHED=y
79# CONFIG_FAIR_CGROUP_SCHED is not set
80CONFIG_SYSFS_DEPRECATED=y
81# CONFIG_RELAY is not set
82CONFIG_BLK_DEV_INITRD=y
83CONFIG_INITRAMFS_SOURCE=""
84# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
85CONFIG_SYSCTL=y
86CONFIG_EMBEDDED=y
87CONFIG_SYSCTL_SYSCALL=y
88CONFIG_KALLSYMS=y
89# CONFIG_KALLSYMS_ALL is not set
90# CONFIG_KALLSYMS_EXTRA_PASS is not set
91# CONFIG_HOTPLUG is not set
92CONFIG_PRINTK=y
93CONFIG_BUG=y
94CONFIG_ELF_CORE=y
95CONFIG_BASE_FULL=y
96CONFIG_FUTEX=y
97CONFIG_ANON_INODES=y
98CONFIG_EPOLL=y
99CONFIG_SIGNALFD=y
100CONFIG_EVENTFD=y
101CONFIG_SHMEM=y
102CONFIG_VM_EVENT_COUNTERS=y
103CONFIG_SLAB=y
104# CONFIG_SLUB is not set
105# CONFIG_SLOB is not set
106CONFIG_RT_MUTEXES=y
107# CONFIG_TINY_SHMEM is not set
108CONFIG_BASE_SMALL=0
109CONFIG_MODULES=y
110CONFIG_MODULE_UNLOAD=y
111# CONFIG_MODULE_FORCE_UNLOAD is not set
112# CONFIG_MODVERSIONS is not set
113# CONFIG_MODULE_SRCVERSION_ALL is not set
114CONFIG_KMOD=y
115CONFIG_BLOCK=y
116# CONFIG_LBD is not set
117# CONFIG_BLK_DEV_IO_TRACE is not set
118# CONFIG_LSF is not set
119# CONFIG_BLK_DEV_BSG is not set
120
121#
122# IO Schedulers
123#
124CONFIG_IOSCHED_NOOP=y
125CONFIG_IOSCHED_AS=y
126CONFIG_IOSCHED_DEADLINE=y
127CONFIG_IOSCHED_CFQ=y
128CONFIG_DEFAULT_AS=y
129# CONFIG_DEFAULT_DEADLINE is not set
130# CONFIG_DEFAULT_CFQ is not set
131# CONFIG_DEFAULT_NOOP is not set
132CONFIG_DEFAULT_IOSCHED="anticipatory"
133
134#
135# Platform support
136#
137# CONFIG_PPC_MPC52xx is not set
138# CONFIG_PPC_MPC5200 is not set
139# CONFIG_PPC_CELL is not set
140# CONFIG_PPC_CELL_NATIVE is not set
141# CONFIG_PQ2ADS is not set
142# CONFIG_BAMBOO is not set
143# CONFIG_EBONY is not set
144# CONFIG_SEQUOIA is not set
145# CONFIG_TAISHAN is not set
146# CONFIG_KATMAI is not set
147# CONFIG_RAINIER is not set
148CONFIG_WARP=y
149CONFIG_440EP=y
150CONFIG_IBM440EP_ERR42=y
151# CONFIG_MPIC is not set
152# CONFIG_MPIC_WEIRD is not set
153# CONFIG_PPC_I8259 is not set
154# CONFIG_PPC_RTAS is not set
155# CONFIG_MMIO_NVRAM is not set
156# CONFIG_PPC_MPC106 is not set
157# CONFIG_PPC_970_NAP is not set
158# CONFIG_PPC_INDIRECT_IO is not set
159# CONFIG_GENERIC_IOMAP is not set
160# CONFIG_CPU_FREQ is not set
161# CONFIG_CPM2 is not set
162# CONFIG_FSL_ULI1575 is not set
163
164#
165# Kernel options
166#
167# CONFIG_HIGHMEM is not set
168# CONFIG_TICK_ONESHOT is not set
169# CONFIG_NO_HZ is not set
170# CONFIG_HIGH_RES_TIMERS is not set
171CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
172# CONFIG_HZ_100 is not set
173# CONFIG_HZ_250 is not set
174# CONFIG_HZ_300 is not set
175CONFIG_HZ_1000=y
176CONFIG_HZ=1000
177CONFIG_PREEMPT_NONE=y
178# CONFIG_PREEMPT_VOLUNTARY is not set
179# CONFIG_PREEMPT is not set
180CONFIG_BINFMT_ELF=y
181# CONFIG_BINFMT_MISC is not set
182# CONFIG_MATH_EMULATION is not set
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184CONFIG_ARCH_FLATMEM_ENABLE=y
185CONFIG_ARCH_POPULATES_NODE_MAP=y
186CONFIG_SELECT_MEMORY_MODEL=y
187CONFIG_FLATMEM_MANUAL=y
188# CONFIG_DISCONTIGMEM_MANUAL is not set
189# CONFIG_SPARSEMEM_MANUAL is not set
190CONFIG_FLATMEM=y
191CONFIG_FLAT_NODE_MEM_MAP=y
192# CONFIG_SPARSEMEM_STATIC is not set
193# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
194CONFIG_SPLIT_PTLOCK_CPUS=4
195CONFIG_RESOURCES_64BIT=y
196CONFIG_ZONE_DMA_FLAG=1
197CONFIG_BOUNCE=y
198CONFIG_VIRT_TO_BUS=y
199CONFIG_PROC_DEVICETREE=y
200CONFIG_CMDLINE_BOOL=y
201CONFIG_CMDLINE="ip=on"
202CONFIG_SECCOMP=y
203CONFIG_WANT_DEVICE_TREE=y
204CONFIG_DEVICE_TREE="warp.dts"
205CONFIG_ISA_DMA_API=y
206
207#
208# Bus options
209#
210CONFIG_ZONE_DMA=y
211# CONFIG_PCI is not set
212# CONFIG_PCI_DOMAINS is not set
213# CONFIG_PCI_SYSCALL is not set
214# CONFIG_ARCH_SUPPORTS_MSI is not set
215
216#
217# Advanced setup
218#
219# CONFIG_ADVANCED_OPTIONS is not set
220
221#
222# Default settings for advanced configuration options are used
223#
224CONFIG_HIGHMEM_START=0xfe000000
225CONFIG_LOWMEM_SIZE=0x30000000
226CONFIG_KERNEL_START=0xc0000000
227CONFIG_TASK_SIZE=0xc0000000
228CONFIG_CONSISTENT_START=0xff100000
229CONFIG_CONSISTENT_SIZE=0x00200000
230CONFIG_BOOT_LOAD=0x01000000
231
232#
233# Networking
234#
235CONFIG_NET=y
236
237#
238# Networking options
239#
240CONFIG_PACKET=y
241# CONFIG_PACKET_MMAP is not set
242CONFIG_UNIX=y
243CONFIG_XFRM=y
244# CONFIG_XFRM_USER is not set
245# CONFIG_XFRM_SUB_POLICY is not set
246# CONFIG_XFRM_MIGRATE is not set
247# CONFIG_NET_KEY is not set
248CONFIG_INET=y
249# CONFIG_IP_MULTICAST is not set
250# CONFIG_IP_ADVANCED_ROUTER is not set
251CONFIG_IP_FIB_HASH=y
252CONFIG_IP_PNP=y
253CONFIG_IP_PNP_DHCP=y
254# CONFIG_IP_PNP_BOOTP is not set
255# CONFIG_IP_PNP_RARP is not set
256# CONFIG_NET_IPIP is not set
257# CONFIG_NET_IPGRE is not set
258# CONFIG_ARPD is not set
259# CONFIG_SYN_COOKIES is not set
260# CONFIG_INET_AH is not set
261# CONFIG_INET_ESP is not set
262# CONFIG_INET_IPCOMP is not set
263# CONFIG_INET_XFRM_TUNNEL is not set
264# CONFIG_INET_TUNNEL is not set
265CONFIG_INET_XFRM_MODE_TRANSPORT=y
266CONFIG_INET_XFRM_MODE_TUNNEL=y
267CONFIG_INET_XFRM_MODE_BEET=y
268# CONFIG_INET_LRO is not set
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# CONFIG_IP_VS is not set
276# CONFIG_IPV6 is not set
277# CONFIG_INET6_XFRM_TUNNEL is not set
278# CONFIG_INET6_TUNNEL is not set
279# CONFIG_NETWORK_SECMARK is not set
280CONFIG_NETFILTER=y
281# CONFIG_NETFILTER_DEBUG is not set
282
283#
284# Core Netfilter Configuration
285#
286# CONFIG_NETFILTER_NETLINK is not set
287# CONFIG_NF_CONNTRACK_ENABLED is not set
288# CONFIG_NF_CONNTRACK is not set
289# CONFIG_NETFILTER_XTABLES is not set
290
291#
292# IP: Netfilter Configuration
293#
294# CONFIG_IP_NF_QUEUE is not set
295# CONFIG_IP_NF_IPTABLES is not set
296# CONFIG_IP_NF_ARPTABLES is not set
297# CONFIG_IP_DCCP is not set
298# CONFIG_IP_SCTP is not set
299# CONFIG_TIPC is not set
300# CONFIG_ATM is not set
301# CONFIG_BRIDGE is not set
302CONFIG_VLAN_8021Q=y
303# CONFIG_DECNET is not set
304# CONFIG_LLC2 is not set
305# CONFIG_IPX is not set
306# CONFIG_ATALK is not set
307# CONFIG_X25 is not set
308# CONFIG_LAPB is not set
309# CONFIG_ECONET is not set
310# CONFIG_WAN_ROUTER is not set
311# CONFIG_NET_SCHED is not set
312
313#
314# Network testing
315#
316# CONFIG_NET_PKTGEN is not set
317# CONFIG_HAMRADIO is not set
318# CONFIG_IRDA is not set
319# CONFIG_BT is not set
320# CONFIG_AF_RXRPC is not set
321
322#
323# Wireless
324#
325# CONFIG_CFG80211 is not set
326# CONFIG_WIRELESS_EXT is not set
327# CONFIG_MAC80211 is not set
328# CONFIG_IEEE80211 is not set
329# CONFIG_RFKILL is not set
330# CONFIG_NET_9P is not set
331
332#
333# Device Drivers
334#
335
336#
337# Generic Driver Options
338#
339# CONFIG_STANDALONE is not set
340CONFIG_PREVENT_FIRMWARE_BUILD=y
341# CONFIG_DEBUG_DRIVER is not set
342# CONFIG_DEBUG_DEVRES is not set
343# CONFIG_SYS_HYPERVISOR is not set
344# CONFIG_CONNECTOR is not set
345CONFIG_MTD=y
346# CONFIG_MTD_DEBUG is not set
347# CONFIG_MTD_CONCAT is not set
348CONFIG_MTD_PARTITIONS=y
349# CONFIG_MTD_REDBOOT_PARTS is not set
350# CONFIG_MTD_CMDLINE_PARTS is not set
351
352#
353# User Modules And Translation Layers
354#
355CONFIG_MTD_CHAR=y
356CONFIG_MTD_BLKDEVS=y
357CONFIG_MTD_BLOCK=y
358# CONFIG_FTL is not set
359# CONFIG_NFTL is not set
360# CONFIG_INFTL is not set
361# CONFIG_RFD_FTL is not set
362# CONFIG_SSFDC is not set
363CONFIG_MTD_OOPS=m
364
365#
366# RAM/ROM/Flash chip drivers
367#
368CONFIG_MTD_CFI=y
369# CONFIG_MTD_JEDECPROBE is not set
370CONFIG_MTD_GEN_PROBE=y
371# CONFIG_MTD_CFI_ADV_OPTIONS is not set
372CONFIG_MTD_MAP_BANK_WIDTH_1=y
373CONFIG_MTD_MAP_BANK_WIDTH_2=y
374CONFIG_MTD_MAP_BANK_WIDTH_4=y
375# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
376# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
377# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
378CONFIG_MTD_CFI_I1=y
379CONFIG_MTD_CFI_I2=y
380# CONFIG_MTD_CFI_I4 is not set
381# CONFIG_MTD_CFI_I8 is not set
382# CONFIG_MTD_CFI_INTELEXT is not set
383CONFIG_MTD_CFI_AMDSTD=y
384# CONFIG_MTD_CFI_STAA is not set
385CONFIG_MTD_CFI_UTIL=y
386# CONFIG_MTD_RAM is not set
387# CONFIG_MTD_ROM is not set
388# CONFIG_MTD_ABSENT is not set
389
390#
391# Mapping drivers for chip access
392#
393# CONFIG_MTD_COMPLEX_MAPPINGS is not set
394# CONFIG_MTD_PHYSMAP is not set
395CONFIG_MTD_PHYSMAP_OF=y
396# CONFIG_MTD_PLATRAM is not set
397
398#
399# Self-contained MTD device drivers
400#
401# CONFIG_MTD_SLRAM is not set
402# CONFIG_MTD_PHRAM is not set
403# CONFIG_MTD_MTDRAM is not set
404# CONFIG_MTD_BLOCK2MTD is not set
405
406#
407# Disk-On-Chip Device Drivers
408#
409# CONFIG_MTD_DOC2000 is not set
410# CONFIG_MTD_DOC2001 is not set
411# CONFIG_MTD_DOC2001PLUS is not set
412CONFIG_MTD_NAND=y
413# CONFIG_MTD_NAND_VERIFY_WRITE is not set
414CONFIG_MTD_NAND_ECC_SMC=y
415# CONFIG_MTD_NAND_MUSEUM_IDS is not set
416CONFIG_MTD_NAND_IDS=y
417CONFIG_MTD_NAND_NDFC=y
418# CONFIG_MTD_NAND_DISKONCHIP is not set
419# CONFIG_MTD_NAND_NANDSIM is not set
420# CONFIG_MTD_NAND_PLATFORM is not set
421# CONFIG_MTD_ALAUDA is not set
422# CONFIG_MTD_ONENAND is not set
423
424#
425# UBI - Unsorted block images
426#
427# CONFIG_MTD_UBI is not set
428CONFIG_OF_DEVICE=y
429# CONFIG_PARPORT is not set
430CONFIG_BLK_DEV=y
431# CONFIG_BLK_DEV_FD is not set
432# CONFIG_BLK_DEV_COW_COMMON is not set
433# CONFIG_BLK_DEV_LOOP is not set
434# CONFIG_BLK_DEV_NBD is not set
435# CONFIG_BLK_DEV_UB is not set
436CONFIG_BLK_DEV_RAM=y
437CONFIG_BLK_DEV_RAM_COUNT=16
438CONFIG_BLK_DEV_RAM_SIZE=4096
439CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
440# CONFIG_CDROM_PKTCDVD is not set
441# CONFIG_ATA_OVER_ETH is not set
442# CONFIG_XILINX_SYSACE is not set
443CONFIG_MISC_DEVICES=y
444# CONFIG_EEPROM_93CX6 is not set
445# CONFIG_IDE is not set
446
447#
448# SCSI device support
449#
450# CONFIG_RAID_ATTRS is not set
451CONFIG_SCSI=y
452CONFIG_SCSI_DMA=y
453# CONFIG_SCSI_TGT is not set
454# CONFIG_SCSI_NETLINK is not set
455CONFIG_SCSI_PROC_FS=y
456
457#
458# SCSI support type (disk, tape, CD-ROM)
459#
460CONFIG_BLK_DEV_SD=y
461# CONFIG_CHR_DEV_ST is not set
462# CONFIG_CHR_DEV_OSST is not set
463# CONFIG_BLK_DEV_SR is not set
464# CONFIG_CHR_DEV_SG is not set
465# CONFIG_CHR_DEV_SCH is not set
466
467#
468# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
469#
470# CONFIG_SCSI_MULTI_LUN is not set
471# CONFIG_SCSI_CONSTANTS is not set
472# CONFIG_SCSI_LOGGING is not set
473# CONFIG_SCSI_SCAN_ASYNC is not set
474# CONFIG_SCSI_WAIT_SCAN is not set
475
476#
477# SCSI Transports
478#
479CONFIG_SCSI_SPI_ATTRS=y
480# CONFIG_SCSI_FC_ATTRS is not set
481# CONFIG_SCSI_ISCSI_ATTRS is not set
482# CONFIG_SCSI_SAS_LIBSAS is not set
483# CONFIG_SCSI_SRP_ATTRS is not set
484# CONFIG_SCSI_LOWLEVEL is not set
485# CONFIG_ATA is not set
486# CONFIG_MD is not set
487# CONFIG_MACINTOSH_DRIVERS is not set
488CONFIG_NETDEVICES=y
489# CONFIG_NETDEVICES_MULTIQUEUE is not set
490# CONFIG_DUMMY is not set
491# CONFIG_BONDING is not set
492# CONFIG_MACVLAN is not set
493# CONFIG_EQUALIZER is not set
494# CONFIG_TUN is not set
495# CONFIG_VETH is not set
496# CONFIG_PHYLIB is not set
497CONFIG_NET_ETHERNET=y
498CONFIG_MII=y
499CONFIG_IBM_NEW_EMAC=y
500CONFIG_IBM_NEW_EMAC_RXB=128
501CONFIG_IBM_NEW_EMAC_TXB=64
502CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
503CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
504CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
505# CONFIG_IBM_NEW_EMAC_DEBUG is not set
506CONFIG_IBM_NEW_EMAC_ZMII=y
507# CONFIG_IBM_NEW_EMAC_RGMII is not set
508# CONFIG_IBM_NEW_EMAC_TAH is not set
509# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
510# CONFIG_B44 is not set
511# CONFIG_NETDEV_1000 is not set
512# CONFIG_NETDEV_10000 is not set
513
514#
515# Wireless LAN
516#
517# CONFIG_WLAN_PRE80211 is not set
518# CONFIG_WLAN_80211 is not set
519
520#
521# USB Network Adapters
522#
523# CONFIG_USB_CATC is not set
524# CONFIG_USB_KAWETH is not set
525# CONFIG_USB_PEGASUS is not set
526# CONFIG_USB_RTL8150 is not set
527# CONFIG_USB_USBNET is not set
528# CONFIG_WAN is not set
529# CONFIG_PPP is not set
530# CONFIG_SLIP is not set
531# CONFIG_SHAPER is not set
532# CONFIG_NETCONSOLE is not set
533# CONFIG_NETPOLL is not set
534# CONFIG_NET_POLL_CONTROLLER is not set
535# CONFIG_ISDN is not set
536# CONFIG_PHONE is not set
537
538#
539# Input device support
540#
541# CONFIG_INPUT is not set
542
543#
544# Hardware I/O ports
545#
546# CONFIG_SERIO is not set
547# CONFIG_GAMEPORT is not set
548
549#
550# Character devices
551#
552# CONFIG_VT is not set
553# CONFIG_SERIAL_NONSTANDARD is not set
554
555#
556# Serial drivers
557#
558CONFIG_SERIAL_8250=y
559CONFIG_SERIAL_8250_CONSOLE=y
560CONFIG_SERIAL_8250_NR_UARTS=4
561CONFIG_SERIAL_8250_RUNTIME_UARTS=4
562CONFIG_SERIAL_8250_EXTENDED=y
563# CONFIG_SERIAL_8250_MANY_PORTS is not set
564CONFIG_SERIAL_8250_SHARE_IRQ=y
565# CONFIG_SERIAL_8250_DETECT_IRQ is not set
566# CONFIG_SERIAL_8250_RSA is not set
567
568#
569# Non-8250 serial port support
570#
571# CONFIG_SERIAL_UARTLITE is not set
572CONFIG_SERIAL_CORE=y
573CONFIG_SERIAL_CORE_CONSOLE=y
574# CONFIG_SERIAL_OF_PLATFORM is not set
575CONFIG_UNIX98_PTYS=y
576CONFIG_LEGACY_PTYS=y
577CONFIG_LEGACY_PTY_COUNT=256
578# CONFIG_IPMI_HANDLER is not set
579CONFIG_HW_RANDOM=y
580# CONFIG_NVRAM is not set
581# CONFIG_GEN_RTC is not set
582# CONFIG_R3964 is not set
583# CONFIG_RAW_DRIVER is not set
584# CONFIG_TCG_TPM is not set
585CONFIG_I2C=y
586CONFIG_I2C_BOARDINFO=y
587# CONFIG_I2C_CHARDEV is not set
588
589#
590# I2C Algorithms
591#
592# CONFIG_I2C_ALGOBIT is not set
593# CONFIG_I2C_ALGOPCF is not set
594# CONFIG_I2C_ALGOPCA is not set
595
596#
597# I2C Hardware Bus support
598#
599CONFIG_I2C_IBM_IIC=y
600# CONFIG_I2C_MPC is not set
601# CONFIG_I2C_OCORES is not set
602# CONFIG_I2C_PARPORT_LIGHT is not set
603# CONFIG_I2C_SIMTEC is not set
604# CONFIG_I2C_TAOS_EVM is not set
605# CONFIG_I2C_STUB is not set
606# CONFIG_I2C_TINY_USB is not set
607
608#
609# Miscellaneous I2C Chip support
610#
611# CONFIG_SENSORS_DS1337 is not set
612# CONFIG_SENSORS_DS1374 is not set
613# CONFIG_DS1682 is not set
614CONFIG_SENSORS_EEPROM=y
615# CONFIG_SENSORS_PCF8574 is not set
616# CONFIG_SENSORS_PCA9539 is not set
617# CONFIG_SENSORS_PCF8591 is not set
618# CONFIG_SENSORS_M41T00 is not set
619# CONFIG_SENSORS_MAX6875 is not set
620# CONFIG_SENSORS_TSL2550 is not set
621# CONFIG_I2C_DEBUG_CORE is not set
622# CONFIG_I2C_DEBUG_ALGO is not set
623# CONFIG_I2C_DEBUG_BUS is not set
624# CONFIG_I2C_DEBUG_CHIP is not set
625
626#
627# SPI support
628#
629# CONFIG_SPI is not set
630# CONFIG_SPI_MASTER is not set
631# CONFIG_W1 is not set
632# CONFIG_POWER_SUPPLY is not set
633CONFIG_HWMON=y
634# CONFIG_HWMON_VID is not set
635CONFIG_SENSORS_AD7414=y
636# CONFIG_SENSORS_AD7418 is not set
637# CONFIG_SENSORS_ADM1021 is not set
638# CONFIG_SENSORS_ADM1025 is not set
639# CONFIG_SENSORS_ADM1026 is not set
640# CONFIG_SENSORS_ADM1029 is not set
641# CONFIG_SENSORS_ADM1031 is not set
642# CONFIG_SENSORS_ADM9240 is not set
643# CONFIG_SENSORS_ADT7470 is not set
644# CONFIG_SENSORS_ATXP1 is not set
645# CONFIG_SENSORS_DS1621 is not set
646# CONFIG_SENSORS_F71805F is not set
647# CONFIG_SENSORS_F71882FG is not set
648# CONFIG_SENSORS_F75375S is not set
649# CONFIG_SENSORS_GL518SM is not set
650# CONFIG_SENSORS_GL520SM is not set
651# CONFIG_SENSORS_IT87 is not set
652# CONFIG_SENSORS_LM63 is not set
653# CONFIG_SENSORS_LM75 is not set
654# CONFIG_SENSORS_LM77 is not set
655# CONFIG_SENSORS_LM78 is not set
656# CONFIG_SENSORS_LM80 is not set
657# CONFIG_SENSORS_LM83 is not set
658# CONFIG_SENSORS_LM85 is not set
659# CONFIG_SENSORS_LM87 is not set
660# CONFIG_SENSORS_LM90 is not set
661# CONFIG_SENSORS_LM92 is not set
662# CONFIG_SENSORS_LM93 is not set
663# CONFIG_SENSORS_MAX1619 is not set
664# CONFIG_SENSORS_MAX6650 is not set
665# CONFIG_SENSORS_PC87360 is not set
666# CONFIG_SENSORS_PC87427 is not set
667# CONFIG_SENSORS_DME1737 is not set
668# CONFIG_SENSORS_SMSC47M1 is not set
669# CONFIG_SENSORS_SMSC47M192 is not set
670# CONFIG_SENSORS_SMSC47B397 is not set
671# CONFIG_SENSORS_THMC50 is not set
672# CONFIG_SENSORS_VT1211 is not set
673# CONFIG_SENSORS_W83781D is not set
674# CONFIG_SENSORS_W83791D is not set
675# CONFIG_SENSORS_W83792D is not set
676# CONFIG_SENSORS_W83793 is not set
677# CONFIG_SENSORS_W83L785TS is not set
678# CONFIG_SENSORS_W83627HF is not set
679# CONFIG_SENSORS_W83627EHF is not set
680# CONFIG_HWMON_DEBUG_CHIP is not set
681# CONFIG_WATCHDOG is not set
682
683#
684# Sonics Silicon Backplane
685#
686CONFIG_SSB_POSSIBLE=y
687# CONFIG_SSB is not set
688
689#
690# Multifunction device drivers
691#
692# CONFIG_MFD_SM501 is not set
693
694#
695# Multimedia devices
696#
697# CONFIG_VIDEO_DEV is not set
698# CONFIG_DVB_CORE is not set
699# CONFIG_DAB is not set
700
701#
702# Graphics support
703#
704# CONFIG_VGASTATE is not set
705# CONFIG_VIDEO_OUTPUT_CONTROL is not set
706# CONFIG_FB is not set
707# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
708
709#
710# Display device support
711#
712# CONFIG_DISPLAY_SUPPORT is not set
713
714#
715# Sound
716#
717# CONFIG_SOUND is not set
718CONFIG_USB_SUPPORT=y
719CONFIG_USB_ARCH_HAS_HCD=y
720CONFIG_USB_ARCH_HAS_OHCI=y
721# CONFIG_USB_ARCH_HAS_EHCI is not set
722CONFIG_USB=y
723# CONFIG_USB_DEBUG is not set
724
725#
726# Miscellaneous USB options
727#
728# CONFIG_USB_DEVICEFS is not set
729CONFIG_USB_DEVICE_CLASS=y
730# CONFIG_USB_DYNAMIC_MINORS is not set
731# CONFIG_USB_OTG is not set
732
733#
734# USB Host Controller Drivers
735#
736# CONFIG_USB_ISP116X_HCD is not set
737CONFIG_USB_OHCI_HCD=y
738CONFIG_USB_OHCI_HCD_PPC_OF=y
739CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
740# CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set
741CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
742CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
743CONFIG_USB_OHCI_LITTLE_ENDIAN=y
744# CONFIG_USB_SL811_HCD is not set
745# CONFIG_USB_R8A66597_HCD is not set
746
747#
748# USB Device Class drivers
749#
750# CONFIG_USB_ACM is not set
751# CONFIG_USB_PRINTER is not set
752
753#
754# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
755#
756
757#
758# may also be needed; see USB_STORAGE Help for more information
759#
760CONFIG_USB_STORAGE=y
761# CONFIG_USB_STORAGE_DEBUG is not set
762# CONFIG_USB_STORAGE_DATAFAB is not set
763# CONFIG_USB_STORAGE_FREECOM is not set
764# CONFIG_USB_STORAGE_ISD200 is not set
765# CONFIG_USB_STORAGE_DPCM is not set
766# CONFIG_USB_STORAGE_USBAT is not set
767# CONFIG_USB_STORAGE_SDDR09 is not set
768# CONFIG_USB_STORAGE_SDDR55 is not set
769# CONFIG_USB_STORAGE_JUMPSHOT is not set
770# CONFIG_USB_STORAGE_ALAUDA is not set
771# CONFIG_USB_STORAGE_KARMA is not set
772# CONFIG_USB_LIBUSUAL is not set
773
774#
775# USB Imaging devices
776#
777# CONFIG_USB_MDC800 is not set
778# CONFIG_USB_MICROTEK is not set
779CONFIG_USB_MON=y
780
781#
782# USB port drivers
783#
784
785#
786# USB Serial Converter support
787#
788# CONFIG_USB_SERIAL is not set
789
790#
791# USB Miscellaneous drivers
792#
793# CONFIG_USB_EMI62 is not set
794# CONFIG_USB_EMI26 is not set
795# CONFIG_USB_ADUTUX is not set
796# CONFIG_USB_AUERSWALD is not set
797# CONFIG_USB_RIO500 is not set
798# CONFIG_USB_LEGOTOWER is not set
799# CONFIG_USB_LCD is not set
800# CONFIG_USB_BERRY_CHARGE is not set
801# CONFIG_USB_LED is not set
802# CONFIG_USB_CYPRESS_CY7C63 is not set
803# CONFIG_USB_CYTHERM is not set
804# CONFIG_USB_PHIDGET is not set
805# CONFIG_USB_IDMOUSE is not set
806# CONFIG_USB_FTDI_ELAN is not set
807# CONFIG_USB_APPLEDISPLAY is not set
808# CONFIG_USB_LD is not set
809# CONFIG_USB_TRANCEVIBRATOR is not set
810# CONFIG_USB_IOWARRIOR is not set
811
812#
813# USB DSL modem support
814#
815
816#
817# USB Gadget Support
818#
819# CONFIG_USB_GADGET is not set
820CONFIG_MMC=m
821# CONFIG_MMC_DEBUG is not set
822# CONFIG_MMC_UNSAFE_RESUME is not set
823
824#
825# MMC/SD Card Drivers
826#
827CONFIG_MMC_BLOCK=m
828CONFIG_MMC_BLOCK_BOUNCE=y
829# CONFIG_SDIO_UART is not set
830
831#
832# MMC/SD Host Controller Drivers
833#
834# CONFIG_MMC_WBSD is not set
835# CONFIG_NEW_LEDS is not set
836# CONFIG_EDAC is not set
837# CONFIG_RTC_CLASS is not set
838
839#
840# Userspace I/O
841#
842# CONFIG_UIO is not set
843
844#
845# File systems
846#
847CONFIG_EXT2_FS=y
848# CONFIG_EXT2_FS_XATTR is not set
849# CONFIG_EXT2_FS_XIP is not set
850# CONFIG_EXT3_FS is not set
851# CONFIG_EXT4DEV_FS is not set
852# CONFIG_REISERFS_FS is not set
853# CONFIG_JFS_FS is not set
854# CONFIG_FS_POSIX_ACL is not set
855# CONFIG_XFS_FS is not set
856# CONFIG_GFS2_FS is not set
857# CONFIG_OCFS2_FS is not set
858# CONFIG_MINIX_FS is not set
859# CONFIG_ROMFS_FS is not set
860CONFIG_INOTIFY=y
861CONFIG_INOTIFY_USER=y
862# CONFIG_QUOTA is not set
863CONFIG_DNOTIFY=y
864# CONFIG_AUTOFS_FS is not set
865# CONFIG_AUTOFS4_FS is not set
866# CONFIG_FUSE_FS is not set
867
868#
869# CD-ROM/DVD Filesystems
870#
871# CONFIG_ISO9660_FS is not set
872# CONFIG_UDF_FS is not set
873
874#
875# DOS/FAT/NT Filesystems
876#
877CONFIG_FAT_FS=y
878CONFIG_MSDOS_FS=y
879CONFIG_VFAT_FS=y
880CONFIG_FAT_DEFAULT_CODEPAGE=437
881CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
882# CONFIG_NTFS_FS is not set
883
884#
885# Pseudo filesystems
886#
887CONFIG_PROC_FS=y
888CONFIG_PROC_KCORE=y
889CONFIG_PROC_SYSCTL=y
890CONFIG_SYSFS=y
891# CONFIG_TMPFS is not set
892# CONFIG_HUGETLB_PAGE is not set
893# CONFIG_CONFIGFS_FS is not set
894
895#
896# Miscellaneous filesystems
897#
898# CONFIG_ADFS_FS is not set
899# CONFIG_AFFS_FS is not set
900# CONFIG_HFS_FS is not set
901# CONFIG_HFSPLUS_FS is not set
902# CONFIG_BEFS_FS is not set
903# CONFIG_BFS_FS is not set
904# CONFIG_EFS_FS is not set
905CONFIG_JFFS2_FS=y
906CONFIG_JFFS2_FS_DEBUG=0
907CONFIG_JFFS2_FS_WRITEBUFFER=y
908# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
909# CONFIG_JFFS2_SUMMARY is not set
910# CONFIG_JFFS2_FS_XATTR is not set
911# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
912CONFIG_JFFS2_ZLIB=y
913# CONFIG_JFFS2_LZO is not set
914CONFIG_JFFS2_RTIME=y
915# CONFIG_JFFS2_RUBIN is not set
916CONFIG_CRAMFS=y
917# CONFIG_VXFS_FS is not set
918# CONFIG_HPFS_FS is not set
919# CONFIG_QNX4FS_FS is not set
920# CONFIG_SYSV_FS is not set
921# CONFIG_UFS_FS is not set
922CONFIG_NETWORK_FILESYSTEMS=y
923CONFIG_NFS_FS=y
924CONFIG_NFS_V3=y
925# CONFIG_NFS_V3_ACL is not set
926# CONFIG_NFS_V4 is not set
927# CONFIG_NFS_DIRECTIO is not set
928# CONFIG_NFSD is not set
929CONFIG_ROOT_NFS=y
930CONFIG_LOCKD=y
931CONFIG_LOCKD_V4=y
932CONFIG_NFS_COMMON=y
933CONFIG_SUNRPC=y
934# CONFIG_SUNRPC_BIND34 is not set
935# CONFIG_RPCSEC_GSS_KRB5 is not set
936# CONFIG_RPCSEC_GSS_SPKM3 is not set
937# CONFIG_SMB_FS is not set
938# CONFIG_CIFS is not set
939# CONFIG_NCP_FS is not set
940# CONFIG_CODA_FS is not set
941# CONFIG_AFS_FS is not set
942
943#
944# Partition Types
945#
946# CONFIG_PARTITION_ADVANCED is not set
947CONFIG_MSDOS_PARTITION=y
948CONFIG_NLS=y
949CONFIG_NLS_DEFAULT="iso8859-1"
950CONFIG_NLS_CODEPAGE_437=y
951# CONFIG_NLS_CODEPAGE_737 is not set
952# CONFIG_NLS_CODEPAGE_775 is not set
953CONFIG_NLS_CODEPAGE_850=y
954# CONFIG_NLS_CODEPAGE_852 is not set
955# CONFIG_NLS_CODEPAGE_855 is not set
956# CONFIG_NLS_CODEPAGE_857 is not set
957# CONFIG_NLS_CODEPAGE_860 is not set
958# CONFIG_NLS_CODEPAGE_861 is not set
959# CONFIG_NLS_CODEPAGE_862 is not set
960# CONFIG_NLS_CODEPAGE_863 is not set
961# CONFIG_NLS_CODEPAGE_864 is not set
962# CONFIG_NLS_CODEPAGE_865 is not set
963# CONFIG_NLS_CODEPAGE_866 is not set
964# CONFIG_NLS_CODEPAGE_869 is not set
965# CONFIG_NLS_CODEPAGE_936 is not set
966# CONFIG_NLS_CODEPAGE_950 is not set
967# CONFIG_NLS_CODEPAGE_932 is not set
968# CONFIG_NLS_CODEPAGE_949 is not set
969# CONFIG_NLS_CODEPAGE_874 is not set
970# CONFIG_NLS_ISO8859_8 is not set
971# CONFIG_NLS_CODEPAGE_1250 is not set
972# CONFIG_NLS_CODEPAGE_1251 is not set
973CONFIG_NLS_ASCII=y
974CONFIG_NLS_ISO8859_1=y
975# CONFIG_NLS_ISO8859_2 is not set
976# CONFIG_NLS_ISO8859_3 is not set
977# CONFIG_NLS_ISO8859_4 is not set
978# CONFIG_NLS_ISO8859_5 is not set
979# CONFIG_NLS_ISO8859_6 is not set
980# CONFIG_NLS_ISO8859_7 is not set
981# CONFIG_NLS_ISO8859_9 is not set
982# CONFIG_NLS_ISO8859_13 is not set
983# CONFIG_NLS_ISO8859_14 is not set
984CONFIG_NLS_ISO8859_15=y
985# CONFIG_NLS_KOI8_R is not set
986# CONFIG_NLS_KOI8_U is not set
987CONFIG_NLS_UTF8=y
988# CONFIG_DLM is not set
989# CONFIG_UCC_SLOW is not set
990
991#
992# Library routines
993#
994CONFIG_BITREVERSE=y
995CONFIG_CRC_CCITT=y
996# CONFIG_CRC16 is not set
997# CONFIG_CRC_ITU_T is not set
998CONFIG_CRC32=y
999# CONFIG_CRC7 is not set
1000# CONFIG_LIBCRC32C is not set
1001CONFIG_ZLIB_INFLATE=y
1002CONFIG_ZLIB_DEFLATE=y
1003CONFIG_PLIST=y
1004CONFIG_HAS_IOMEM=y
1005CONFIG_HAS_IOPORT=y
1006CONFIG_HAS_DMA=y
1007# CONFIG_INSTRUMENTATION is not set
1008
1009#
1010# Kernel hacking
1011#
1012# CONFIG_PRINTK_TIME is not set
1013CONFIG_ENABLE_WARN_DEPRECATED=y
1014CONFIG_ENABLE_MUST_CHECK=y
1015CONFIG_MAGIC_SYSRQ=y
1016# CONFIG_UNUSED_SYMBOLS is not set
1017# CONFIG_DEBUG_FS is not set
1018# CONFIG_HEADERS_CHECK is not set
1019CONFIG_DEBUG_KERNEL=y
1020# CONFIG_DEBUG_SHIRQ is not set
1021CONFIG_DETECT_SOFTLOCKUP=y
1022# CONFIG_SCHED_DEBUG is not set
1023# CONFIG_SCHEDSTATS is not set
1024# CONFIG_TIMER_STATS is not set
1025# CONFIG_DEBUG_SLAB is not set
1026# CONFIG_DEBUG_RT_MUTEXES is not set
1027# CONFIG_RT_MUTEX_TESTER is not set
1028# CONFIG_DEBUG_SPINLOCK is not set
1029# CONFIG_DEBUG_MUTEXES is not set
1030# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
1031# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1032# CONFIG_DEBUG_KOBJECT is not set
1033# CONFIG_DEBUG_BUGVERBOSE is not set
1034CONFIG_DEBUG_INFO=y
1035# CONFIG_DEBUG_VM is not set
1036# CONFIG_DEBUG_LIST is not set
1037# CONFIG_DEBUG_SG is not set
1038CONFIG_FORCED_INLINING=y
1039# CONFIG_BOOT_PRINTK_DELAY is not set
1040# CONFIG_RCU_TORTURE_TEST is not set
1041# CONFIG_FAULT_INJECTION is not set
1042# CONFIG_SAMPLES is not set
1043# CONFIG_DEBUG_STACKOVERFLOW is not set
1044# CONFIG_DEBUG_STACK_USAGE is not set
1045# CONFIG_DEBUG_PAGEALLOC is not set
1046# CONFIG_DEBUGGER is not set
1047CONFIG_BDI_SWITCH=y
1048# CONFIG_PPC_EARLY_DEBUG is not set
1049
1050#
1051# Security options
1052#
1053# CONFIG_KEYS is not set
1054# CONFIG_SECURITY is not set
1055# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1056# CONFIG_CRYPTO is not set
1057# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index ca51f0cf27ab..58dbfeff9b4d 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5ifeq ($(CONFIG_PPC64),y) 5ifeq ($(CONFIG_PPC64),y)
6EXTRA_CFLAGS += -mno-minimal-toc 6CFLAGS_prom_init.o += -mno-minimal-toc
7endif 7endif
8ifeq ($(CONFIG_PPC32),y) 8ifeq ($(CONFIG_PPC32),y)
9CFLAGS_prom_init.o += -fPIC 9CFLAGS_prom_init.o += -fPIC
@@ -70,6 +70,7 @@ pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o
70obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ 70obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \
71 pci-common.o 71 pci-common.o
72obj-$(CONFIG_PCI_MSI) += msi.o 72obj-$(CONFIG_PCI_MSI) += msi.o
73obj-$(CONFIG_RAPIDIO) += rio.o
73obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ 74obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \
74 machine_kexec_$(CONFIG_WORD_SIZE).o 75 machine_kexec_$(CONFIG_WORD_SIZE).o
75obj-$(CONFIG_AUDIT) += audit.o 76obj-$(CONFIG_AUDIT) += audit.o
@@ -91,3 +92,13 @@ obj-$(CONFIG_PPC64) += $(obj64-y)
91 92
92extra-$(CONFIG_PPC_FPU) += fpu.o 93extra-$(CONFIG_PPC_FPU) += fpu.o
93extra-$(CONFIG_PPC64) += entry_64.o 94extra-$(CONFIG_PPC64) += entry_64.o
95
96extra-y += systbl_chk.i
97$(obj)/systbl.o: systbl_chk
98
99quiet_cmd_systbl_chk = CALL $<
100 cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i
101
102PHONY += systbl_chk
103systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i
104 $(call cmd,systbl_chk)
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 9c74fdf29eec..80e2eef05b2e 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -236,7 +236,7 @@ int __init btext_find_display(int allow_nonstdout)
236 if (rc == 0 || !allow_nonstdout) 236 if (rc == 0 || !allow_nonstdout)
237 return rc; 237 return rc;
238 238
239 for (np = NULL; (np = of_find_node_by_type(np, "display"));) { 239 for_each_node_by_type(np, "display") {
240 if (of_get_property(np, "linux,opened", NULL)) { 240 if (of_get_property(np, "linux,opened", NULL)) {
241 printk("trying %s ...\n", np->full_name); 241 printk("trying %s ...\n", np->full_name);
242 rc = btext_initialize(np); 242 rc = btext_initialize(np);
diff --git a/arch/powerpc/kernel/cpu_setup_44x.S b/arch/powerpc/kernel/cpu_setup_44x.S
index 8e1812e2f3ee..6250443ab9c9 100644
--- a/arch/powerpc/kernel/cpu_setup_44x.S
+++ b/arch/powerpc/kernel/cpu_setup_44x.S
@@ -23,11 +23,24 @@ _GLOBAL(__setup_cpu_440epx)
23 mflr r4 23 mflr r4
24 bl __init_fpu_44x 24 bl __init_fpu_44x
25 bl __plb_disable_wrp 25 bl __plb_disable_wrp
26 bl __fixup_440A_mcheck
26 mtlr r4 27 mtlr r4
27 blr 28 blr
28_GLOBAL(__setup_cpu_440grx) 29_GLOBAL(__setup_cpu_440grx)
29 b __plb_disable_wrp 30 mflr r4
31 bl __plb_disable_wrp
32 bl __fixup_440A_mcheck
33 mtlr r4
34 blr
35_GLOBAL(__setup_cpu_440gx)
36_GLOBAL(__setup_cpu_440spe)
37 b __fixup_440A_mcheck
30 38
39 /* Temporary fixup for arch/ppc until we kill the whole thing */
40#ifndef CONFIG_PPC_MERGE
41_GLOBAL(__fixup_440A_mcheck)
42 blr
43#endif
31 44
32/* enable APU between CPU and FPU */ 45/* enable APU between CPU and FPU */
33_GLOBAL(__init_fpu_44x) 46_GLOBAL(__init_fpu_44x)
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 9ed351f3c966..a4c2771b5e62 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -33,7 +33,9 @@ EXPORT_SYMBOL(cur_cpu_spec);
33#ifdef CONFIG_PPC32 33#ifdef CONFIG_PPC32
34extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec); 34extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec); 35extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
36extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec); 37extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
37extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); 39extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
38extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); 40extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
39extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); 41extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
@@ -85,6 +87,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
85 .pmc_type = PPC_PMC_IBM, 87 .pmc_type = PPC_PMC_IBM,
86 .oprofile_cpu_type = "ppc64/power3", 88 .oprofile_cpu_type = "ppc64/power3",
87 .oprofile_type = PPC_OPROFILE_RS64, 89 .oprofile_type = PPC_OPROFILE_RS64,
90 .machine_check = machine_check_generic,
88 .platform = "power3", 91 .platform = "power3",
89 }, 92 },
90 { /* Power3+ */ 93 { /* Power3+ */
@@ -99,6 +102,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
99 .pmc_type = PPC_PMC_IBM, 102 .pmc_type = PPC_PMC_IBM,
100 .oprofile_cpu_type = "ppc64/power3", 103 .oprofile_cpu_type = "ppc64/power3",
101 .oprofile_type = PPC_OPROFILE_RS64, 104 .oprofile_type = PPC_OPROFILE_RS64,
105 .machine_check = machine_check_generic,
102 .platform = "power3", 106 .platform = "power3",
103 }, 107 },
104 { /* Northstar */ 108 { /* Northstar */
@@ -113,6 +117,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
113 .pmc_type = PPC_PMC_IBM, 117 .pmc_type = PPC_PMC_IBM,
114 .oprofile_cpu_type = "ppc64/rs64", 118 .oprofile_cpu_type = "ppc64/rs64",
115 .oprofile_type = PPC_OPROFILE_RS64, 119 .oprofile_type = PPC_OPROFILE_RS64,
120 .machine_check = machine_check_generic,
116 .platform = "rs64", 121 .platform = "rs64",
117 }, 122 },
118 { /* Pulsar */ 123 { /* Pulsar */
@@ -127,6 +132,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
127 .pmc_type = PPC_PMC_IBM, 132 .pmc_type = PPC_PMC_IBM,
128 .oprofile_cpu_type = "ppc64/rs64", 133 .oprofile_cpu_type = "ppc64/rs64",
129 .oprofile_type = PPC_OPROFILE_RS64, 134 .oprofile_type = PPC_OPROFILE_RS64,
135 .machine_check = machine_check_generic,
130 .platform = "rs64", 136 .platform = "rs64",
131 }, 137 },
132 { /* I-star */ 138 { /* I-star */
@@ -141,6 +147,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
141 .pmc_type = PPC_PMC_IBM, 147 .pmc_type = PPC_PMC_IBM,
142 .oprofile_cpu_type = "ppc64/rs64", 148 .oprofile_cpu_type = "ppc64/rs64",
143 .oprofile_type = PPC_OPROFILE_RS64, 149 .oprofile_type = PPC_OPROFILE_RS64,
150 .machine_check = machine_check_generic,
144 .platform = "rs64", 151 .platform = "rs64",
145 }, 152 },
146 { /* S-star */ 153 { /* S-star */
@@ -155,6 +162,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
155 .pmc_type = PPC_PMC_IBM, 162 .pmc_type = PPC_PMC_IBM,
156 .oprofile_cpu_type = "ppc64/rs64", 163 .oprofile_cpu_type = "ppc64/rs64",
157 .oprofile_type = PPC_OPROFILE_RS64, 164 .oprofile_type = PPC_OPROFILE_RS64,
165 .machine_check = machine_check_generic,
158 .platform = "rs64", 166 .platform = "rs64",
159 }, 167 },
160 { /* Power4 */ 168 { /* Power4 */
@@ -169,6 +177,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
169 .pmc_type = PPC_PMC_IBM, 177 .pmc_type = PPC_PMC_IBM,
170 .oprofile_cpu_type = "ppc64/power4", 178 .oprofile_cpu_type = "ppc64/power4",
171 .oprofile_type = PPC_OPROFILE_POWER4, 179 .oprofile_type = PPC_OPROFILE_POWER4,
180 .machine_check = machine_check_generic,
172 .platform = "power4", 181 .platform = "power4",
173 }, 182 },
174 { /* Power4+ */ 183 { /* Power4+ */
@@ -183,6 +192,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
183 .pmc_type = PPC_PMC_IBM, 192 .pmc_type = PPC_PMC_IBM,
184 .oprofile_cpu_type = "ppc64/power4", 193 .oprofile_cpu_type = "ppc64/power4",
185 .oprofile_type = PPC_OPROFILE_POWER4, 194 .oprofile_type = PPC_OPROFILE_POWER4,
195 .machine_check = machine_check_generic,
186 .platform = "power4", 196 .platform = "power4",
187 }, 197 },
188 { /* PPC970 */ 198 { /* PPC970 */
@@ -200,6 +210,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
200 .cpu_restore = __restore_cpu_ppc970, 210 .cpu_restore = __restore_cpu_ppc970,
201 .oprofile_cpu_type = "ppc64/970", 211 .oprofile_cpu_type = "ppc64/970",
202 .oprofile_type = PPC_OPROFILE_POWER4, 212 .oprofile_type = PPC_OPROFILE_POWER4,
213 .machine_check = machine_check_generic,
203 .platform = "ppc970", 214 .platform = "ppc970",
204 }, 215 },
205 { /* PPC970FX */ 216 { /* PPC970FX */
@@ -217,6 +228,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
217 .cpu_restore = __restore_cpu_ppc970, 228 .cpu_restore = __restore_cpu_ppc970,
218 .oprofile_cpu_type = "ppc64/970", 229 .oprofile_cpu_type = "ppc64/970",
219 .oprofile_type = PPC_OPROFILE_POWER4, 230 .oprofile_type = PPC_OPROFILE_POWER4,
231 .machine_check = machine_check_generic,
220 .platform = "ppc970", 232 .platform = "ppc970",
221 }, 233 },
222 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */ 234 { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
@@ -234,6 +246,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
234 .cpu_restore = __restore_cpu_ppc970, 246 .cpu_restore = __restore_cpu_ppc970,
235 .oprofile_cpu_type = "ppc64/970MP", 247 .oprofile_cpu_type = "ppc64/970MP",
236 .oprofile_type = PPC_OPROFILE_POWER4, 248 .oprofile_type = PPC_OPROFILE_POWER4,
249 .machine_check = machine_check_generic,
237 .platform = "ppc970", 250 .platform = "ppc970",
238 }, 251 },
239 { /* PPC970MP */ 252 { /* PPC970MP */
@@ -251,6 +264,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
251 .cpu_restore = __restore_cpu_ppc970, 264 .cpu_restore = __restore_cpu_ppc970,
252 .oprofile_cpu_type = "ppc64/970MP", 265 .oprofile_cpu_type = "ppc64/970MP",
253 .oprofile_type = PPC_OPROFILE_POWER4, 266 .oprofile_type = PPC_OPROFILE_POWER4,
267 .machine_check = machine_check_generic,
254 .platform = "ppc970", 268 .platform = "ppc970",
255 }, 269 },
256 { /* PPC970GX */ 270 { /* PPC970GX */
@@ -267,6 +281,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
267 .cpu_setup = __setup_cpu_ppc970, 281 .cpu_setup = __setup_cpu_ppc970,
268 .oprofile_cpu_type = "ppc64/970", 282 .oprofile_cpu_type = "ppc64/970",
269 .oprofile_type = PPC_OPROFILE_POWER4, 283 .oprofile_type = PPC_OPROFILE_POWER4,
284 .machine_check = machine_check_generic,
270 .platform = "ppc970", 285 .platform = "ppc970",
271 }, 286 },
272 { /* Power5 GR */ 287 { /* Power5 GR */
@@ -286,6 +301,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
286 */ 301 */
287 .oprofile_mmcra_sihv = MMCRA_SIHV, 302 .oprofile_mmcra_sihv = MMCRA_SIHV,
288 .oprofile_mmcra_sipr = MMCRA_SIPR, 303 .oprofile_mmcra_sipr = MMCRA_SIPR,
304 .machine_check = machine_check_generic,
289 .platform = "power5", 305 .platform = "power5",
290 }, 306 },
291 { /* Power5++ */ 307 { /* Power5++ */
@@ -301,6 +317,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
301 .oprofile_type = PPC_OPROFILE_POWER4, 317 .oprofile_type = PPC_OPROFILE_POWER4,
302 .oprofile_mmcra_sihv = MMCRA_SIHV, 318 .oprofile_mmcra_sihv = MMCRA_SIHV,
303 .oprofile_mmcra_sipr = MMCRA_SIPR, 319 .oprofile_mmcra_sipr = MMCRA_SIPR,
320 .machine_check = machine_check_generic,
304 .platform = "power5+", 321 .platform = "power5+",
305 }, 322 },
306 { /* Power5 GS */ 323 { /* Power5 GS */
@@ -317,6 +334,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
317 .oprofile_type = PPC_OPROFILE_POWER4, 334 .oprofile_type = PPC_OPROFILE_POWER4,
318 .oprofile_mmcra_sihv = MMCRA_SIHV, 335 .oprofile_mmcra_sihv = MMCRA_SIHV,
319 .oprofile_mmcra_sipr = MMCRA_SIPR, 336 .oprofile_mmcra_sipr = MMCRA_SIPR,
337 .machine_check = machine_check_generic,
320 .platform = "power5+", 338 .platform = "power5+",
321 }, 339 },
322 { /* POWER6 in P5+ mode; 2.04-compliant processor */ 340 { /* POWER6 in P5+ mode; 2.04-compliant processor */
@@ -327,6 +345,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
327 .cpu_user_features = COMMON_USER_POWER5_PLUS, 345 .cpu_user_features = COMMON_USER_POWER5_PLUS,
328 .icache_bsize = 128, 346 .icache_bsize = 128,
329 .dcache_bsize = 128, 347 .dcache_bsize = 128,
348 .machine_check = machine_check_generic,
330 .platform = "power5+", 349 .platform = "power5+",
331 }, 350 },
332 { /* Power6 */ 351 { /* Power6 */
@@ -346,6 +365,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
346 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR, 365 .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
347 .oprofile_mmcra_clear = POWER6_MMCRA_THRM | 366 .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
348 POWER6_MMCRA_OTHER, 367 POWER6_MMCRA_OTHER,
368 .machine_check = machine_check_generic,
349 .platform = "power6x", 369 .platform = "power6x",
350 }, 370 },
351 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */ 371 { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
@@ -356,6 +376,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
356 .cpu_user_features = COMMON_USER_POWER6, 376 .cpu_user_features = COMMON_USER_POWER6,
357 .icache_bsize = 128, 377 .icache_bsize = 128,
358 .dcache_bsize = 128, 378 .dcache_bsize = 128,
379 .machine_check = machine_check_generic,
359 .platform = "power6", 380 .platform = "power6",
360 }, 381 },
361 { /* Cell Broadband Engine */ 382 { /* Cell Broadband Engine */
@@ -372,6 +393,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
372 .pmc_type = PPC_PMC_IBM, 393 .pmc_type = PPC_PMC_IBM,
373 .oprofile_cpu_type = "ppc64/cell-be", 394 .oprofile_cpu_type = "ppc64/cell-be",
374 .oprofile_type = PPC_OPROFILE_CELL, 395 .oprofile_type = PPC_OPROFILE_CELL,
396 .machine_check = machine_check_generic,
375 .platform = "ppc-cell-be", 397 .platform = "ppc-cell-be",
376 }, 398 },
377 { /* PA Semi PA6T */ 399 { /* PA Semi PA6T */
@@ -388,6 +410,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
388 .cpu_restore = __restore_cpu_pa6t, 410 .cpu_restore = __restore_cpu_pa6t,
389 .oprofile_cpu_type = "ppc64/pa6t", 411 .oprofile_cpu_type = "ppc64/pa6t",
390 .oprofile_type = PPC_OPROFILE_PA6T, 412 .oprofile_type = PPC_OPROFILE_PA6T,
413 .machine_check = machine_check_generic,
391 .platform = "pa6t", 414 .platform = "pa6t",
392 }, 415 },
393 { /* default match */ 416 { /* default match */
@@ -400,6 +423,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
400 .dcache_bsize = 128, 423 .dcache_bsize = 128,
401 .num_pmcs = 6, 424 .num_pmcs = 6,
402 .pmc_type = PPC_PMC_IBM, 425 .pmc_type = PPC_PMC_IBM,
426 .machine_check = machine_check_generic,
403 .platform = "power4", 427 .platform = "power4",
404 } 428 }
405#endif /* CONFIG_PPC64 */ 429#endif /* CONFIG_PPC64 */
@@ -414,6 +438,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
414 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB, 438 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
415 .icache_bsize = 32, 439 .icache_bsize = 32,
416 .dcache_bsize = 32, 440 .dcache_bsize = 32,
441 .machine_check = machine_check_generic,
417 .platform = "ppc601", 442 .platform = "ppc601",
418 }, 443 },
419 { /* 603 */ 444 { /* 603 */
@@ -425,6 +450,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
425 .icache_bsize = 32, 450 .icache_bsize = 32,
426 .dcache_bsize = 32, 451 .dcache_bsize = 32,
427 .cpu_setup = __setup_cpu_603, 452 .cpu_setup = __setup_cpu_603,
453 .machine_check = machine_check_generic,
428 .platform = "ppc603", 454 .platform = "ppc603",
429 }, 455 },
430 { /* 603e */ 456 { /* 603e */
@@ -436,6 +462,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
436 .icache_bsize = 32, 462 .icache_bsize = 32,
437 .dcache_bsize = 32, 463 .dcache_bsize = 32,
438 .cpu_setup = __setup_cpu_603, 464 .cpu_setup = __setup_cpu_603,
465 .machine_check = machine_check_generic,
439 .platform = "ppc603", 466 .platform = "ppc603",
440 }, 467 },
441 { /* 603ev */ 468 { /* 603ev */
@@ -447,6 +474,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
447 .icache_bsize = 32, 474 .icache_bsize = 32,
448 .dcache_bsize = 32, 475 .dcache_bsize = 32,
449 .cpu_setup = __setup_cpu_603, 476 .cpu_setup = __setup_cpu_603,
477 .machine_check = machine_check_generic,
450 .platform = "ppc603", 478 .platform = "ppc603",
451 }, 479 },
452 { /* 604 */ 480 { /* 604 */
@@ -459,6 +487,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
459 .dcache_bsize = 32, 487 .dcache_bsize = 32,
460 .num_pmcs = 2, 488 .num_pmcs = 2,
461 .cpu_setup = __setup_cpu_604, 489 .cpu_setup = __setup_cpu_604,
490 .machine_check = machine_check_generic,
462 .platform = "ppc604", 491 .platform = "ppc604",
463 }, 492 },
464 { /* 604e */ 493 { /* 604e */
@@ -471,6 +500,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
471 .dcache_bsize = 32, 500 .dcache_bsize = 32,
472 .num_pmcs = 4, 501 .num_pmcs = 4,
473 .cpu_setup = __setup_cpu_604, 502 .cpu_setup = __setup_cpu_604,
503 .machine_check = machine_check_generic,
474 .platform = "ppc604", 504 .platform = "ppc604",
475 }, 505 },
476 { /* 604r */ 506 { /* 604r */
@@ -483,6 +513,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
483 .dcache_bsize = 32, 513 .dcache_bsize = 32,
484 .num_pmcs = 4, 514 .num_pmcs = 4,
485 .cpu_setup = __setup_cpu_604, 515 .cpu_setup = __setup_cpu_604,
516 .machine_check = machine_check_generic,
486 .platform = "ppc604", 517 .platform = "ppc604",
487 }, 518 },
488 { /* 604ev */ 519 { /* 604ev */
@@ -495,6 +526,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
495 .dcache_bsize = 32, 526 .dcache_bsize = 32,
496 .num_pmcs = 4, 527 .num_pmcs = 4,
497 .cpu_setup = __setup_cpu_604, 528 .cpu_setup = __setup_cpu_604,
529 .machine_check = machine_check_generic,
498 .platform = "ppc604", 530 .platform = "ppc604",
499 }, 531 },
500 { /* 740/750 (0x4202, don't support TAU ?) */ 532 { /* 740/750 (0x4202, don't support TAU ?) */
@@ -507,6 +539,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
507 .dcache_bsize = 32, 539 .dcache_bsize = 32,
508 .num_pmcs = 4, 540 .num_pmcs = 4,
509 .cpu_setup = __setup_cpu_750, 541 .cpu_setup = __setup_cpu_750,
542 .machine_check = machine_check_generic,
510 .platform = "ppc750", 543 .platform = "ppc750",
511 }, 544 },
512 { /* 750CX (80100 and 8010x?) */ 545 { /* 750CX (80100 and 8010x?) */
@@ -519,6 +552,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
519 .dcache_bsize = 32, 552 .dcache_bsize = 32,
520 .num_pmcs = 4, 553 .num_pmcs = 4,
521 .cpu_setup = __setup_cpu_750cx, 554 .cpu_setup = __setup_cpu_750cx,
555 .machine_check = machine_check_generic,
522 .platform = "ppc750", 556 .platform = "ppc750",
523 }, 557 },
524 { /* 750CX (82201 and 82202) */ 558 { /* 750CX (82201 and 82202) */
@@ -531,6 +565,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
531 .dcache_bsize = 32, 565 .dcache_bsize = 32,
532 .num_pmcs = 4, 566 .num_pmcs = 4,
533 .cpu_setup = __setup_cpu_750cx, 567 .cpu_setup = __setup_cpu_750cx,
568 .machine_check = machine_check_generic,
534 .platform = "ppc750", 569 .platform = "ppc750",
535 }, 570 },
536 { /* 750CXe (82214) */ 571 { /* 750CXe (82214) */
@@ -543,6 +578,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
543 .dcache_bsize = 32, 578 .dcache_bsize = 32,
544 .num_pmcs = 4, 579 .num_pmcs = 4,
545 .cpu_setup = __setup_cpu_750cx, 580 .cpu_setup = __setup_cpu_750cx,
581 .machine_check = machine_check_generic,
546 .platform = "ppc750", 582 .platform = "ppc750",
547 }, 583 },
548 { /* 750CXe "Gekko" (83214) */ 584 { /* 750CXe "Gekko" (83214) */
@@ -555,6 +591,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
555 .dcache_bsize = 32, 591 .dcache_bsize = 32,
556 .num_pmcs = 4, 592 .num_pmcs = 4,
557 .cpu_setup = __setup_cpu_750cx, 593 .cpu_setup = __setup_cpu_750cx,
594 .machine_check = machine_check_generic,
558 .platform = "ppc750", 595 .platform = "ppc750",
559 }, 596 },
560 { /* 750CL */ 597 { /* 750CL */
@@ -567,6 +604,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
567 .dcache_bsize = 32, 604 .dcache_bsize = 32,
568 .num_pmcs = 4, 605 .num_pmcs = 4,
569 .cpu_setup = __setup_cpu_750, 606 .cpu_setup = __setup_cpu_750,
607 .machine_check = machine_check_generic,
570 .platform = "ppc750", 608 .platform = "ppc750",
571 }, 609 },
572 { /* 745/755 */ 610 { /* 745/755 */
@@ -579,6 +617,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
579 .dcache_bsize = 32, 617 .dcache_bsize = 32,
580 .num_pmcs = 4, 618 .num_pmcs = 4,
581 .cpu_setup = __setup_cpu_750, 619 .cpu_setup = __setup_cpu_750,
620 .machine_check = machine_check_generic,
582 .platform = "ppc750", 621 .platform = "ppc750",
583 }, 622 },
584 { /* 750FX rev 1.x */ 623 { /* 750FX rev 1.x */
@@ -591,6 +630,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
591 .dcache_bsize = 32, 630 .dcache_bsize = 32,
592 .num_pmcs = 4, 631 .num_pmcs = 4,
593 .cpu_setup = __setup_cpu_750, 632 .cpu_setup = __setup_cpu_750,
633 .machine_check = machine_check_generic,
594 .platform = "ppc750", 634 .platform = "ppc750",
595 }, 635 },
596 { /* 750FX rev 2.0 must disable HID0[DPM] */ 636 { /* 750FX rev 2.0 must disable HID0[DPM] */
@@ -603,6 +643,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
603 .dcache_bsize = 32, 643 .dcache_bsize = 32,
604 .num_pmcs = 4, 644 .num_pmcs = 4,
605 .cpu_setup = __setup_cpu_750, 645 .cpu_setup = __setup_cpu_750,
646 .machine_check = machine_check_generic,
606 .platform = "ppc750", 647 .platform = "ppc750",
607 }, 648 },
608 { /* 750FX (All revs except 2.0) */ 649 { /* 750FX (All revs except 2.0) */
@@ -615,6 +656,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
615 .dcache_bsize = 32, 656 .dcache_bsize = 32,
616 .num_pmcs = 4, 657 .num_pmcs = 4,
617 .cpu_setup = __setup_cpu_750fx, 658 .cpu_setup = __setup_cpu_750fx,
659 .machine_check = machine_check_generic,
618 .platform = "ppc750", 660 .platform = "ppc750",
619 }, 661 },
620 { /* 750GX */ 662 { /* 750GX */
@@ -627,6 +669,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
627 .dcache_bsize = 32, 669 .dcache_bsize = 32,
628 .num_pmcs = 4, 670 .num_pmcs = 4,
629 .cpu_setup = __setup_cpu_750fx, 671 .cpu_setup = __setup_cpu_750fx,
672 .machine_check = machine_check_generic,
630 .platform = "ppc750", 673 .platform = "ppc750",
631 }, 674 },
632 { /* 740/750 (L2CR bit need fixup for 740) */ 675 { /* 740/750 (L2CR bit need fixup for 740) */
@@ -639,6 +682,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
639 .dcache_bsize = 32, 682 .dcache_bsize = 32,
640 .num_pmcs = 4, 683 .num_pmcs = 4,
641 .cpu_setup = __setup_cpu_750, 684 .cpu_setup = __setup_cpu_750,
685 .machine_check = machine_check_generic,
642 .platform = "ppc750", 686 .platform = "ppc750",
643 }, 687 },
644 { /* 7400 rev 1.1 ? (no TAU) */ 688 { /* 7400 rev 1.1 ? (no TAU) */
@@ -652,6 +696,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
652 .dcache_bsize = 32, 696 .dcache_bsize = 32,
653 .num_pmcs = 4, 697 .num_pmcs = 4,
654 .cpu_setup = __setup_cpu_7400, 698 .cpu_setup = __setup_cpu_7400,
699 .machine_check = machine_check_generic,
655 .platform = "ppc7400", 700 .platform = "ppc7400",
656 }, 701 },
657 { /* 7400 */ 702 { /* 7400 */
@@ -665,6 +710,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
665 .dcache_bsize = 32, 710 .dcache_bsize = 32,
666 .num_pmcs = 4, 711 .num_pmcs = 4,
667 .cpu_setup = __setup_cpu_7400, 712 .cpu_setup = __setup_cpu_7400,
713 .machine_check = machine_check_generic,
668 .platform = "ppc7400", 714 .platform = "ppc7400",
669 }, 715 },
670 { /* 7410 */ 716 { /* 7410 */
@@ -678,6 +724,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
678 .dcache_bsize = 32, 724 .dcache_bsize = 32,
679 .num_pmcs = 4, 725 .num_pmcs = 4,
680 .cpu_setup = __setup_cpu_7410, 726 .cpu_setup = __setup_cpu_7410,
727 .machine_check = machine_check_generic,
681 .platform = "ppc7400", 728 .platform = "ppc7400",
682 }, 729 },
683 { /* 7450 2.0 - no doze/nap */ 730 { /* 7450 2.0 - no doze/nap */
@@ -693,6 +740,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
693 .cpu_setup = __setup_cpu_745x, 740 .cpu_setup = __setup_cpu_745x,
694 .oprofile_cpu_type = "ppc/7450", 741 .oprofile_cpu_type = "ppc/7450",
695 .oprofile_type = PPC_OPROFILE_G4, 742 .oprofile_type = PPC_OPROFILE_G4,
743 .machine_check = machine_check_generic,
696 .platform = "ppc7450", 744 .platform = "ppc7450",
697 }, 745 },
698 { /* 7450 2.1 */ 746 { /* 7450 2.1 */
@@ -708,6 +756,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
708 .cpu_setup = __setup_cpu_745x, 756 .cpu_setup = __setup_cpu_745x,
709 .oprofile_cpu_type = "ppc/7450", 757 .oprofile_cpu_type = "ppc/7450",
710 .oprofile_type = PPC_OPROFILE_G4, 758 .oprofile_type = PPC_OPROFILE_G4,
759 .machine_check = machine_check_generic,
711 .platform = "ppc7450", 760 .platform = "ppc7450",
712 }, 761 },
713 { /* 7450 2.3 and newer */ 762 { /* 7450 2.3 and newer */
@@ -723,6 +772,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
723 .cpu_setup = __setup_cpu_745x, 772 .cpu_setup = __setup_cpu_745x,
724 .oprofile_cpu_type = "ppc/7450", 773 .oprofile_cpu_type = "ppc/7450",
725 .oprofile_type = PPC_OPROFILE_G4, 774 .oprofile_type = PPC_OPROFILE_G4,
775 .machine_check = machine_check_generic,
726 .platform = "ppc7450", 776 .platform = "ppc7450",
727 }, 777 },
728 { /* 7455 rev 1.x */ 778 { /* 7455 rev 1.x */
@@ -738,6 +788,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
738 .cpu_setup = __setup_cpu_745x, 788 .cpu_setup = __setup_cpu_745x,
739 .oprofile_cpu_type = "ppc/7450", 789 .oprofile_cpu_type = "ppc/7450",
740 .oprofile_type = PPC_OPROFILE_G4, 790 .oprofile_type = PPC_OPROFILE_G4,
791 .machine_check = machine_check_generic,
741 .platform = "ppc7450", 792 .platform = "ppc7450",
742 }, 793 },
743 { /* 7455 rev 2.0 */ 794 { /* 7455 rev 2.0 */
@@ -753,6 +804,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
753 .cpu_setup = __setup_cpu_745x, 804 .cpu_setup = __setup_cpu_745x,
754 .oprofile_cpu_type = "ppc/7450", 805 .oprofile_cpu_type = "ppc/7450",
755 .oprofile_type = PPC_OPROFILE_G4, 806 .oprofile_type = PPC_OPROFILE_G4,
807 .machine_check = machine_check_generic,
756 .platform = "ppc7450", 808 .platform = "ppc7450",
757 }, 809 },
758 { /* 7455 others */ 810 { /* 7455 others */
@@ -768,6 +820,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
768 .cpu_setup = __setup_cpu_745x, 820 .cpu_setup = __setup_cpu_745x,
769 .oprofile_cpu_type = "ppc/7450", 821 .oprofile_cpu_type = "ppc/7450",
770 .oprofile_type = PPC_OPROFILE_G4, 822 .oprofile_type = PPC_OPROFILE_G4,
823 .machine_check = machine_check_generic,
771 .platform = "ppc7450", 824 .platform = "ppc7450",
772 }, 825 },
773 { /* 7447/7457 Rev 1.0 */ 826 { /* 7447/7457 Rev 1.0 */
@@ -783,6 +836,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
783 .cpu_setup = __setup_cpu_745x, 836 .cpu_setup = __setup_cpu_745x,
784 .oprofile_cpu_type = "ppc/7450", 837 .oprofile_cpu_type = "ppc/7450",
785 .oprofile_type = PPC_OPROFILE_G4, 838 .oprofile_type = PPC_OPROFILE_G4,
839 .machine_check = machine_check_generic,
786 .platform = "ppc7450", 840 .platform = "ppc7450",
787 }, 841 },
788 { /* 7447/7457 Rev 1.1 */ 842 { /* 7447/7457 Rev 1.1 */
@@ -798,6 +852,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
798 .cpu_setup = __setup_cpu_745x, 852 .cpu_setup = __setup_cpu_745x,
799 .oprofile_cpu_type = "ppc/7450", 853 .oprofile_cpu_type = "ppc/7450",
800 .oprofile_type = PPC_OPROFILE_G4, 854 .oprofile_type = PPC_OPROFILE_G4,
855 .machine_check = machine_check_generic,
801 .platform = "ppc7450", 856 .platform = "ppc7450",
802 }, 857 },
803 { /* 7447/7457 Rev 1.2 and later */ 858 { /* 7447/7457 Rev 1.2 and later */
@@ -812,6 +867,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
812 .cpu_setup = __setup_cpu_745x, 867 .cpu_setup = __setup_cpu_745x,
813 .oprofile_cpu_type = "ppc/7450", 868 .oprofile_cpu_type = "ppc/7450",
814 .oprofile_type = PPC_OPROFILE_G4, 869 .oprofile_type = PPC_OPROFILE_G4,
870 .machine_check = machine_check_generic,
815 .platform = "ppc7450", 871 .platform = "ppc7450",
816 }, 872 },
817 { /* 7447A */ 873 { /* 7447A */
@@ -827,6 +883,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
827 .cpu_setup = __setup_cpu_745x, 883 .cpu_setup = __setup_cpu_745x,
828 .oprofile_cpu_type = "ppc/7450", 884 .oprofile_cpu_type = "ppc/7450",
829 .oprofile_type = PPC_OPROFILE_G4, 885 .oprofile_type = PPC_OPROFILE_G4,
886 .machine_check = machine_check_generic,
830 .platform = "ppc7450", 887 .platform = "ppc7450",
831 }, 888 },
832 { /* 7448 */ 889 { /* 7448 */
@@ -842,6 +899,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
842 .cpu_setup = __setup_cpu_745x, 899 .cpu_setup = __setup_cpu_745x,
843 .oprofile_cpu_type = "ppc/7450", 900 .oprofile_cpu_type = "ppc/7450",
844 .oprofile_type = PPC_OPROFILE_G4, 901 .oprofile_type = PPC_OPROFILE_G4,
902 .machine_check = machine_check_generic,
845 .platform = "ppc7450", 903 .platform = "ppc7450",
846 }, 904 },
847 { /* 82xx (8240, 8245, 8260 are all 603e cores) */ 905 { /* 82xx (8240, 8245, 8260 are all 603e cores) */
@@ -853,6 +911,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
853 .icache_bsize = 32, 911 .icache_bsize = 32,
854 .dcache_bsize = 32, 912 .dcache_bsize = 32,
855 .cpu_setup = __setup_cpu_603, 913 .cpu_setup = __setup_cpu_603,
914 .machine_check = machine_check_generic,
856 .platform = "ppc603", 915 .platform = "ppc603",
857 }, 916 },
858 { /* All G2_LE (603e core, plus some) have the same pvr */ 917 { /* All G2_LE (603e core, plus some) have the same pvr */
@@ -864,6 +923,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
864 .icache_bsize = 32, 923 .icache_bsize = 32,
865 .dcache_bsize = 32, 924 .dcache_bsize = 32,
866 .cpu_setup = __setup_cpu_603, 925 .cpu_setup = __setup_cpu_603,
926 .machine_check = machine_check_generic,
867 .platform = "ppc603", 927 .platform = "ppc603",
868 }, 928 },
869 { /* e300c1 (a 603e core, plus some) on 83xx */ 929 { /* e300c1 (a 603e core, plus some) on 83xx */
@@ -875,6 +935,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
875 .icache_bsize = 32, 935 .icache_bsize = 32,
876 .dcache_bsize = 32, 936 .dcache_bsize = 32,
877 .cpu_setup = __setup_cpu_603, 937 .cpu_setup = __setup_cpu_603,
938 .machine_check = machine_check_generic,
878 .platform = "ppc603", 939 .platform = "ppc603",
879 }, 940 },
880 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */ 941 { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
@@ -886,9 +947,10 @@ static struct cpu_spec __initdata cpu_specs[] = {
886 .icache_bsize = 32, 947 .icache_bsize = 32,
887 .dcache_bsize = 32, 948 .dcache_bsize = 32,
888 .cpu_setup = __setup_cpu_603, 949 .cpu_setup = __setup_cpu_603,
950 .machine_check = machine_check_generic,
889 .platform = "ppc603", 951 .platform = "ppc603",
890 }, 952 },
891 { /* e300c3 on 83xx */ 953 { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
892 .pvr_mask = 0x7fff0000, 954 .pvr_mask = 0x7fff0000,
893 .pvr_value = 0x00850000, 955 .pvr_value = 0x00850000,
894 .cpu_name = "e300c3", 956 .cpu_name = "e300c3",
@@ -899,6 +961,18 @@ static struct cpu_spec __initdata cpu_specs[] = {
899 .cpu_setup = __setup_cpu_603, 961 .cpu_setup = __setup_cpu_603,
900 .platform = "ppc603", 962 .platform = "ppc603",
901 }, 963 },
964 { /* e300c4 (e300c1, plus one IU) */
965 .pvr_mask = 0x7fff0000,
966 .pvr_value = 0x00860000,
967 .cpu_name = "e300c4",
968 .cpu_features = CPU_FTRS_E300,
969 .cpu_user_features = COMMON_USER,
970 .icache_bsize = 32,
971 .dcache_bsize = 32,
972 .cpu_setup = __setup_cpu_603,
973 .machine_check = machine_check_generic,
974 .platform = "ppc603",
975 },
902 { /* default match, we assume split I/D cache & TB (non-601)... */ 976 { /* default match, we assume split I/D cache & TB (non-601)... */
903 .pvr_mask = 0x00000000, 977 .pvr_mask = 0x00000000,
904 .pvr_value = 0x00000000, 978 .pvr_value = 0x00000000,
@@ -907,6 +981,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
907 .cpu_user_features = COMMON_USER, 981 .cpu_user_features = COMMON_USER,
908 .icache_bsize = 32, 982 .icache_bsize = 32,
909 .dcache_bsize = 32, 983 .dcache_bsize = 32,
984 .machine_check = machine_check_generic,
910 .platform = "ppc603", 985 .platform = "ppc603",
911 }, 986 },
912#endif /* CLASSIC_PPC */ 987#endif /* CLASSIC_PPC */
@@ -933,6 +1008,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
933 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 1008 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
934 .icache_bsize = 16, 1009 .icache_bsize = 16,
935 .dcache_bsize = 16, 1010 .dcache_bsize = 16,
1011 .machine_check = machine_check_4xx,
936 .platform = "ppc403", 1012 .platform = "ppc403",
937 }, 1013 },
938 { /* 403GCX */ 1014 { /* 403GCX */
@@ -944,6 +1020,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
944 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB, 1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
945 .icache_bsize = 16, 1021 .icache_bsize = 16,
946 .dcache_bsize = 16, 1022 .dcache_bsize = 16,
1023 .machine_check = machine_check_4xx,
947 .platform = "ppc403", 1024 .platform = "ppc403",
948 }, 1025 },
949 { /* 403G ?? */ 1026 { /* 403G ?? */
@@ -954,6 +1031,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
954 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 1031 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
955 .icache_bsize = 16, 1032 .icache_bsize = 16,
956 .dcache_bsize = 16, 1033 .dcache_bsize = 16,
1034 .machine_check = machine_check_4xx,
957 .platform = "ppc403", 1035 .platform = "ppc403",
958 }, 1036 },
959 { /* 405GP */ 1037 { /* 405GP */
@@ -965,6 +1043,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
965 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1043 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
966 .icache_bsize = 32, 1044 .icache_bsize = 32,
967 .dcache_bsize = 32, 1045 .dcache_bsize = 32,
1046 .machine_check = machine_check_4xx,
968 .platform = "ppc405", 1047 .platform = "ppc405",
969 }, 1048 },
970 { /* STB 03xxx */ 1049 { /* STB 03xxx */
@@ -976,6 +1055,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
976 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1055 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
977 .icache_bsize = 32, 1056 .icache_bsize = 32,
978 .dcache_bsize = 32, 1057 .dcache_bsize = 32,
1058 .machine_check = machine_check_4xx,
979 .platform = "ppc405", 1059 .platform = "ppc405",
980 }, 1060 },
981 { /* STB 04xxx */ 1061 { /* STB 04xxx */
@@ -987,6 +1067,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
987 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1067 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
988 .icache_bsize = 32, 1068 .icache_bsize = 32,
989 .dcache_bsize = 32, 1069 .dcache_bsize = 32,
1070 .machine_check = machine_check_4xx,
990 .platform = "ppc405", 1071 .platform = "ppc405",
991 }, 1072 },
992 { /* NP405L */ 1073 { /* NP405L */
@@ -998,6 +1079,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
998 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1079 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
999 .icache_bsize = 32, 1080 .icache_bsize = 32,
1000 .dcache_bsize = 32, 1081 .dcache_bsize = 32,
1082 .machine_check = machine_check_4xx,
1001 .platform = "ppc405", 1083 .platform = "ppc405",
1002 }, 1084 },
1003 { /* NP4GS3 */ 1085 { /* NP4GS3 */
@@ -1009,6 +1091,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1009 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1091 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1010 .icache_bsize = 32, 1092 .icache_bsize = 32,
1011 .dcache_bsize = 32, 1093 .dcache_bsize = 32,
1094 .machine_check = machine_check_4xx,
1012 .platform = "ppc405", 1095 .platform = "ppc405",
1013 }, 1096 },
1014 { /* NP405H */ 1097 { /* NP405H */
@@ -1020,6 +1103,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1020 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1103 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1021 .icache_bsize = 32, 1104 .icache_bsize = 32,
1022 .dcache_bsize = 32, 1105 .dcache_bsize = 32,
1106 .machine_check = machine_check_4xx,
1023 .platform = "ppc405", 1107 .platform = "ppc405",
1024 }, 1108 },
1025 { /* 405GPr */ 1109 { /* 405GPr */
@@ -1031,6 +1115,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1031 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1115 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1032 .icache_bsize = 32, 1116 .icache_bsize = 32,
1033 .dcache_bsize = 32, 1117 .dcache_bsize = 32,
1118 .machine_check = machine_check_4xx,
1034 .platform = "ppc405", 1119 .platform = "ppc405",
1035 }, 1120 },
1036 { /* STBx25xx */ 1121 { /* STBx25xx */
@@ -1042,6 +1127,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1042 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1127 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1043 .icache_bsize = 32, 1128 .icache_bsize = 32,
1044 .dcache_bsize = 32, 1129 .dcache_bsize = 32,
1130 .machine_check = machine_check_4xx,
1045 .platform = "ppc405", 1131 .platform = "ppc405",
1046 }, 1132 },
1047 { /* 405LP */ 1133 { /* 405LP */
@@ -1052,6 +1138,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1052 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 1138 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
1053 .icache_bsize = 32, 1139 .icache_bsize = 32,
1054 .dcache_bsize = 32, 1140 .dcache_bsize = 32,
1141 .machine_check = machine_check_4xx,
1055 .platform = "ppc405", 1142 .platform = "ppc405",
1056 }, 1143 },
1057 { /* Xilinx Virtex-II Pro */ 1144 { /* Xilinx Virtex-II Pro */
@@ -1063,6 +1150,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1063 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1150 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1064 .icache_bsize = 32, 1151 .icache_bsize = 32,
1065 .dcache_bsize = 32, 1152 .dcache_bsize = 32,
1153 .machine_check = machine_check_4xx,
1066 .platform = "ppc405", 1154 .platform = "ppc405",
1067 }, 1155 },
1068 { /* Xilinx Virtex-4 FX */ 1156 { /* Xilinx Virtex-4 FX */
@@ -1074,6 +1162,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1074 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1162 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1075 .icache_bsize = 32, 1163 .icache_bsize = 32,
1076 .dcache_bsize = 32, 1164 .dcache_bsize = 32,
1165 .machine_check = machine_check_4xx,
1077 .platform = "ppc405", 1166 .platform = "ppc405",
1078 }, 1167 },
1079 { /* 405EP */ 1168 { /* 405EP */
@@ -1085,17 +1174,31 @@ static struct cpu_spec __initdata cpu_specs[] = {
1085 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1174 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1086 .icache_bsize = 32, 1175 .icache_bsize = 32,
1087 .dcache_bsize = 32, 1176 .dcache_bsize = 32,
1177 .machine_check = machine_check_4xx,
1088 .platform = "ppc405", 1178 .platform = "ppc405",
1089 }, 1179 },
1090 { /* 405EX */ 1180 { /* 405EX */
1091 .pvr_mask = 0xffff0000, 1181 .pvr_mask = 0xffff0004,
1092 .pvr_value = 0x12910000, 1182 .pvr_value = 0x12910004,
1093 .cpu_name = "405EX", 1183 .cpu_name = "405EX",
1094 .cpu_features = CPU_FTRS_40X, 1184 .cpu_features = CPU_FTRS_40X,
1095 .cpu_user_features = PPC_FEATURE_32 | 1185 .cpu_user_features = PPC_FEATURE_32 |
1096 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 1186 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1097 .icache_bsize = 32, 1187 .icache_bsize = 32,
1098 .dcache_bsize = 32, 1188 .dcache_bsize = 32,
1189 .machine_check = machine_check_4xx,
1190 .platform = "ppc405",
1191 },
1192 { /* 405EXr */
1193 .pvr_mask = 0xffff0004,
1194 .pvr_value = 0x12910000,
1195 .cpu_name = "405EXr",
1196 .cpu_features = CPU_FTRS_40X,
1197 .cpu_user_features = PPC_FEATURE_32 |
1198 PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
1199 .icache_bsize = 32,
1200 .dcache_bsize = 32,
1201 .machine_check = machine_check_4xx,
1099 .platform = "ppc405", 1202 .platform = "ppc405",
1100 }, 1203 },
1101 1204
@@ -1109,6 +1212,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1109 .cpu_user_features = COMMON_USER_BOOKE, 1212 .cpu_user_features = COMMON_USER_BOOKE,
1110 .icache_bsize = 32, 1213 .icache_bsize = 32,
1111 .dcache_bsize = 32, 1214 .dcache_bsize = 32,
1215 .machine_check = machine_check_4xx,
1112 .platform = "ppc440", 1216 .platform = "ppc440",
1113 }, 1217 },
1114 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ 1218 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
@@ -1120,6 +1224,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1120 .icache_bsize = 32, 1224 .icache_bsize = 32,
1121 .dcache_bsize = 32, 1225 .dcache_bsize = 32,
1122 .cpu_setup = __setup_cpu_440ep, 1226 .cpu_setup = __setup_cpu_440ep,
1227 .machine_check = machine_check_4xx,
1123 .platform = "ppc440", 1228 .platform = "ppc440",
1124 }, 1229 },
1125 { 1230 {
@@ -1130,6 +1235,19 @@ static struct cpu_spec __initdata cpu_specs[] = {
1130 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1235 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1131 .icache_bsize = 32, 1236 .icache_bsize = 32,
1132 .dcache_bsize = 32, 1237 .dcache_bsize = 32,
1238 .machine_check = machine_check_4xx,
1239 .platform = "ppc440",
1240 },
1241 { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
1242 .pvr_mask = 0xf0000ff7,
1243 .pvr_value = 0x400008d4,
1244 .cpu_name = "440EP Rev. C",
1245 .cpu_features = CPU_FTRS_44X,
1246 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1247 .icache_bsize = 32,
1248 .dcache_bsize = 32,
1249 .cpu_setup = __setup_cpu_440ep,
1250 .machine_check = machine_check_4xx,
1133 .platform = "ppc440", 1251 .platform = "ppc440",
1134 }, 1252 },
1135 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */ 1253 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
@@ -1141,6 +1259,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1141 .icache_bsize = 32, 1259 .icache_bsize = 32,
1142 .dcache_bsize = 32, 1260 .dcache_bsize = 32,
1143 .cpu_setup = __setup_cpu_440ep, 1261 .cpu_setup = __setup_cpu_440ep,
1262 .machine_check = machine_check_4xx,
1144 .platform = "ppc440", 1263 .platform = "ppc440",
1145 }, 1264 },
1146 { /* 440GRX */ 1265 { /* 440GRX */
@@ -1152,6 +1271,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1152 .icache_bsize = 32, 1271 .icache_bsize = 32,
1153 .dcache_bsize = 32, 1272 .dcache_bsize = 32,
1154 .cpu_setup = __setup_cpu_440grx, 1273 .cpu_setup = __setup_cpu_440grx,
1274 .machine_check = machine_check_440A,
1155 .platform = "ppc440", 1275 .platform = "ppc440",
1156 }, 1276 },
1157 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */ 1277 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
@@ -1163,6 +1283,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1163 .icache_bsize = 32, 1283 .icache_bsize = 32,
1164 .dcache_bsize = 32, 1284 .dcache_bsize = 32,
1165 .cpu_setup = __setup_cpu_440epx, 1285 .cpu_setup = __setup_cpu_440epx,
1286 .machine_check = machine_check_440A,
1166 .platform = "ppc440", 1287 .platform = "ppc440",
1167 }, 1288 },
1168 { /* 440GP Rev. B */ 1289 { /* 440GP Rev. B */
@@ -1173,6 +1294,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1173 .cpu_user_features = COMMON_USER_BOOKE, 1294 .cpu_user_features = COMMON_USER_BOOKE,
1174 .icache_bsize = 32, 1295 .icache_bsize = 32,
1175 .dcache_bsize = 32, 1296 .dcache_bsize = 32,
1297 .machine_check = machine_check_4xx,
1176 .platform = "ppc440gp", 1298 .platform = "ppc440gp",
1177 }, 1299 },
1178 { /* 440GP Rev. C */ 1300 { /* 440GP Rev. C */
@@ -1183,6 +1305,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1183 .cpu_user_features = COMMON_USER_BOOKE, 1305 .cpu_user_features = COMMON_USER_BOOKE,
1184 .icache_bsize = 32, 1306 .icache_bsize = 32,
1185 .dcache_bsize = 32, 1307 .dcache_bsize = 32,
1308 .machine_check = machine_check_4xx,
1186 .platform = "ppc440gp", 1309 .platform = "ppc440gp",
1187 }, 1310 },
1188 { /* 440GX Rev. A */ 1311 { /* 440GX Rev. A */
@@ -1193,6 +1316,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1193 .cpu_user_features = COMMON_USER_BOOKE, 1316 .cpu_user_features = COMMON_USER_BOOKE,
1194 .icache_bsize = 32, 1317 .icache_bsize = 32,
1195 .dcache_bsize = 32, 1318 .dcache_bsize = 32,
1319 .cpu_setup = __setup_cpu_440gx,
1320 .machine_check = machine_check_440A,
1196 .platform = "ppc440", 1321 .platform = "ppc440",
1197 }, 1322 },
1198 { /* 440GX Rev. B */ 1323 { /* 440GX Rev. B */
@@ -1203,6 +1328,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1203 .cpu_user_features = COMMON_USER_BOOKE, 1328 .cpu_user_features = COMMON_USER_BOOKE,
1204 .icache_bsize = 32, 1329 .icache_bsize = 32,
1205 .dcache_bsize = 32, 1330 .dcache_bsize = 32,
1331 .cpu_setup = __setup_cpu_440gx,
1332 .machine_check = machine_check_440A,
1206 .platform = "ppc440", 1333 .platform = "ppc440",
1207 }, 1334 },
1208 { /* 440GX Rev. C */ 1335 { /* 440GX Rev. C */
@@ -1213,6 +1340,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1213 .cpu_user_features = COMMON_USER_BOOKE, 1340 .cpu_user_features = COMMON_USER_BOOKE,
1214 .icache_bsize = 32, 1341 .icache_bsize = 32,
1215 .dcache_bsize = 32, 1342 .dcache_bsize = 32,
1343 .cpu_setup = __setup_cpu_440gx,
1344 .machine_check = machine_check_440A,
1216 .platform = "ppc440", 1345 .platform = "ppc440",
1217 }, 1346 },
1218 { /* 440GX Rev. F */ 1347 { /* 440GX Rev. F */
@@ -1223,6 +1352,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1223 .cpu_user_features = COMMON_USER_BOOKE, 1352 .cpu_user_features = COMMON_USER_BOOKE,
1224 .icache_bsize = 32, 1353 .icache_bsize = 32,
1225 .dcache_bsize = 32, 1354 .dcache_bsize = 32,
1355 .cpu_setup = __setup_cpu_440gx,
1356 .machine_check = machine_check_440A,
1226 .platform = "ppc440", 1357 .platform = "ppc440",
1227 }, 1358 },
1228 { /* 440SP Rev. A */ 1359 { /* 440SP Rev. A */
@@ -1233,6 +1364,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1233 .cpu_user_features = COMMON_USER_BOOKE, 1364 .cpu_user_features = COMMON_USER_BOOKE,
1234 .icache_bsize = 32, 1365 .icache_bsize = 32,
1235 .dcache_bsize = 32, 1366 .dcache_bsize = 32,
1367 .machine_check = machine_check_4xx,
1236 .platform = "ppc440", 1368 .platform = "ppc440",
1237 }, 1369 },
1238 { /* 440SPe Rev. A */ 1370 { /* 440SPe Rev. A */
@@ -1243,6 +1375,8 @@ static struct cpu_spec __initdata cpu_specs[] = {
1243 .cpu_user_features = COMMON_USER_BOOKE, 1375 .cpu_user_features = COMMON_USER_BOOKE,
1244 .icache_bsize = 32, 1376 .icache_bsize = 32,
1245 .dcache_bsize = 32, 1377 .dcache_bsize = 32,
1378 .cpu_setup = __setup_cpu_440spe,
1379 .machine_check = machine_check_440A,
1246 .platform = "ppc440", 1380 .platform = "ppc440",
1247 }, 1381 },
1248 { /* 440SPe Rev. B */ 1382 { /* 440SPe Rev. B */
@@ -1253,10 +1387,13 @@ static struct cpu_spec __initdata cpu_specs[] = {
1253 .cpu_user_features = COMMON_USER_BOOKE, 1387 .cpu_user_features = COMMON_USER_BOOKE,
1254 .icache_bsize = 32, 1388 .icache_bsize = 32,
1255 .dcache_bsize = 32, 1389 .dcache_bsize = 32,
1390 .cpu_setup = __setup_cpu_440spe,
1391 .machine_check = machine_check_440A,
1256 .platform = "ppc440", 1392 .platform = "ppc440",
1257 }, 1393 },
1258#endif /* CONFIG_44x */ 1394#endif /* CONFIG_44x */
1259#ifdef CONFIG_FSL_BOOKE 1395#ifdef CONFIG_FSL_BOOKE
1396#ifdef CONFIG_E200
1260 { /* e200z5 */ 1397 { /* e200z5 */
1261 .pvr_mask = 0xfff00000, 1398 .pvr_mask = 0xfff00000,
1262 .pvr_value = 0x81000000, 1399 .pvr_value = 0x81000000,
@@ -1267,6 +1404,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1267 PPC_FEATURE_HAS_EFP_SINGLE | 1404 PPC_FEATURE_HAS_EFP_SINGLE |
1268 PPC_FEATURE_UNIFIED_CACHE, 1405 PPC_FEATURE_UNIFIED_CACHE,
1269 .dcache_bsize = 32, 1406 .dcache_bsize = 32,
1407 .machine_check = machine_check_e200,
1270 .platform = "ppc5554", 1408 .platform = "ppc5554",
1271 }, 1409 },
1272 { /* e200z6 */ 1410 { /* e200z6 */
@@ -1280,8 +1418,10 @@ static struct cpu_spec __initdata cpu_specs[] = {
1280 PPC_FEATURE_HAS_EFP_SINGLE_COMP | 1418 PPC_FEATURE_HAS_EFP_SINGLE_COMP |
1281 PPC_FEATURE_UNIFIED_CACHE, 1419 PPC_FEATURE_UNIFIED_CACHE,
1282 .dcache_bsize = 32, 1420 .dcache_bsize = 32,
1421 .machine_check = machine_check_e200,
1283 .platform = "ppc5554", 1422 .platform = "ppc5554",
1284 }, 1423 },
1424#elif defined(CONFIG_E500)
1285 { /* e500 */ 1425 { /* e500 */
1286 .pvr_mask = 0xffff0000, 1426 .pvr_mask = 0xffff0000,
1287 .pvr_value = 0x80200000, 1427 .pvr_value = 0x80200000,
@@ -1296,6 +1436,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
1296 .num_pmcs = 4, 1436 .num_pmcs = 4,
1297 .oprofile_cpu_type = "ppc/e500", 1437 .oprofile_cpu_type = "ppc/e500",
1298 .oprofile_type = PPC_OPROFILE_BOOKE, 1438 .oprofile_type = PPC_OPROFILE_BOOKE,
1439 .machine_check = machine_check_e500,
1299 .platform = "ppc8540", 1440 .platform = "ppc8540",
1300 }, 1441 },
1301 { /* e500v2 */ 1442 { /* e500v2 */
@@ -1313,9 +1454,11 @@ static struct cpu_spec __initdata cpu_specs[] = {
1313 .num_pmcs = 4, 1454 .num_pmcs = 4,
1314 .oprofile_cpu_type = "ppc/e500", 1455 .oprofile_cpu_type = "ppc/e500",
1315 .oprofile_type = PPC_OPROFILE_BOOKE, 1456 .oprofile_type = PPC_OPROFILE_BOOKE,
1457 .machine_check = machine_check_e500,
1316 .platform = "ppc8548", 1458 .platform = "ppc8548",
1317 }, 1459 },
1318#endif 1460#endif
1461#endif
1319#if !CLASSIC_PPC 1462#if !CLASSIC_PPC
1320 { /* default match */ 1463 { /* default match */
1321 .pvr_mask = 0x00000000, 1464 .pvr_mask = 0x00000000,
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 77c749a13378..571132ed12c1 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -32,6 +32,8 @@
32#include <asm/lmb.h> 32#include <asm/lmb.h>
33#include <asm/firmware.h> 33#include <asm/firmware.h>
34#include <asm/smp.h> 34#include <asm/smp.h>
35#include <asm/system.h>
36#include <asm/setjmp.h>
35 37
36#ifdef DEBUG 38#ifdef DEBUG
37#include <asm/udbg.h> 39#include <asm/udbg.h>
@@ -45,6 +47,11 @@ int crashing_cpu = -1;
45static cpumask_t cpus_in_crash = CPU_MASK_NONE; 47static cpumask_t cpus_in_crash = CPU_MASK_NONE;
46cpumask_t cpus_in_sr = CPU_MASK_NONE; 48cpumask_t cpus_in_sr = CPU_MASK_NONE;
47 49
50#define CRASH_HANDLER_MAX 1
51/* NULL terminated list of shutdown handles */
52static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
53static DEFINE_SPINLOCK(crash_handlers_lock);
54
48#ifdef CONFIG_SMP 55#ifdef CONFIG_SMP
49static atomic_t enter_on_soft_reset = ATOMIC_INIT(0); 56static atomic_t enter_on_soft_reset = ATOMIC_INIT(0);
50 57
@@ -285,9 +292,72 @@ static inline void crash_kexec_stop_spus(void)
285} 292}
286#endif /* CONFIG_SPU_BASE */ 293#endif /* CONFIG_SPU_BASE */
287 294
295/*
296 * Register a function to be called on shutdown. Only use this if you
297 * can't reset your device in the second kernel.
298 */
299int crash_shutdown_register(crash_shutdown_t handler)
300{
301 unsigned int i, rc;
302
303 spin_lock(&crash_handlers_lock);
304 for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
305 if (!crash_shutdown_handles[i]) {
306 /* Insert handle at first empty entry */
307 crash_shutdown_handles[i] = handler;
308 rc = 0;
309 break;
310 }
311
312 if (i == CRASH_HANDLER_MAX) {
313 printk(KERN_ERR "Crash shutdown handles full, "
314 "not registered.\n");
315 rc = 1;
316 }
317
318 spin_unlock(&crash_handlers_lock);
319 return rc;
320}
321EXPORT_SYMBOL(crash_shutdown_register);
322
323int crash_shutdown_unregister(crash_shutdown_t handler)
324{
325 unsigned int i, rc;
326
327 spin_lock(&crash_handlers_lock);
328 for (i = 0 ; i < CRASH_HANDLER_MAX; i++)
329 if (crash_shutdown_handles[i] == handler)
330 break;
331
332 if (i == CRASH_HANDLER_MAX) {
333 printk(KERN_ERR "Crash shutdown handle not found\n");
334 rc = 1;
335 } else {
336 /* Shift handles down */
337 for (; crash_shutdown_handles[i]; i++)
338 crash_shutdown_handles[i] =
339 crash_shutdown_handles[i+1];
340 rc = 0;
341 }
342
343 spin_unlock(&crash_handlers_lock);
344 return rc;
345}
346EXPORT_SYMBOL(crash_shutdown_unregister);
347
348static unsigned long crash_shutdown_buf[JMP_BUF_LEN];
349
350static int handle_fault(struct pt_regs *regs)
351{
352 longjmp(crash_shutdown_buf, 1);
353 return 0;
354}
355
288void default_machine_crash_shutdown(struct pt_regs *regs) 356void default_machine_crash_shutdown(struct pt_regs *regs)
289{ 357{
290 unsigned int irq; 358 unsigned int i;
359 int (*old_handler)(struct pt_regs *regs);
360
291 361
292 /* 362 /*
293 * This function is only called after the system 363 * This function is only called after the system
@@ -301,15 +371,36 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
301 */ 371 */
302 hard_irq_disable(); 372 hard_irq_disable();
303 373
304 for_each_irq(irq) { 374 for_each_irq(i) {
305 struct irq_desc *desc = irq_desc + irq; 375 struct irq_desc *desc = irq_desc + i;
306 376
307 if (desc->status & IRQ_INPROGRESS) 377 if (desc->status & IRQ_INPROGRESS)
308 desc->chip->eoi(irq); 378 desc->chip->eoi(i);
309 379
310 if (!(desc->status & IRQ_DISABLED)) 380 if (!(desc->status & IRQ_DISABLED))
311 desc->chip->disable(irq); 381 desc->chip->disable(i);
382 }
383
384 /*
385 * Call registered shutdown routines savely. Swap out
386 * __debugger_fault_handler, and replace on exit.
387 */
388 old_handler = __debugger_fault_handler;
389 __debugger_fault_handler = handle_fault;
390 for (i = 0; crash_shutdown_handles[i]; i++) {
391 if (setjmp(crash_shutdown_buf) == 0) {
392 /*
393 * Insert syncs and delay to ensure
394 * instructions in the dangerous region don't
395 * leak away from this protected region.
396 */
397 asm volatile("sync; isync");
398 /* dangerous region */
399 crash_shutdown_handles[i]();
400 asm volatile("sync; isync");
401 }
312 } 402 }
403 __debugger_fault_handler = old_handler;
313 404
314 /* 405 /*
315 * Make a note of crashing cpu. Will be used in machine_kexec 406 * Make a note of crashing cpu. Will be used in machine_kexec
diff --git a/arch/powerpc/kernel/dma_64.c b/arch/powerpc/kernel/dma_64.c
index 14206e3f0819..84239076a5b8 100644
--- a/arch/powerpc/kernel/dma_64.c
+++ b/arch/powerpc/kernel/dma_64.c
@@ -112,10 +112,16 @@ EXPORT_SYMBOL(dma_iommu_ops);
112/* 112/*
113 * Generic direct DMA implementation 113 * Generic direct DMA implementation
114 * 114 *
115 * This implementation supports a global offset that can be applied if 115 * This implementation supports a per-device offset that can be applied if
116 * the address at which memory is visible to devices is not 0. 116 * the address at which memory is visible to devices is not 0. Platform code
117 * can set archdata.dma_data to an unsigned long holding the offset. By
118 * default the offset is zero.
117 */ 119 */
118unsigned long dma_direct_offset; 120
121static unsigned long get_dma_direct_offset(struct device *dev)
122{
123 return (unsigned long)dev->archdata.dma_data;
124}
119 125
120static void *dma_direct_alloc_coherent(struct device *dev, size_t size, 126static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
121 dma_addr_t *dma_handle, gfp_t flag) 127 dma_addr_t *dma_handle, gfp_t flag)
@@ -124,13 +130,12 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
124 void *ret; 130 void *ret;
125 int node = dev->archdata.numa_node; 131 int node = dev->archdata.numa_node;
126 132
127 /* TODO: Maybe use the numa node here too ? */
128 page = alloc_pages_node(node, flag, get_order(size)); 133 page = alloc_pages_node(node, flag, get_order(size));
129 if (page == NULL) 134 if (page == NULL)
130 return NULL; 135 return NULL;
131 ret = page_address(page); 136 ret = page_address(page);
132 memset(ret, 0, size); 137 memset(ret, 0, size);
133 *dma_handle = virt_to_abs(ret) | dma_direct_offset; 138 *dma_handle = virt_to_abs(ret) + get_dma_direct_offset(dev);
134 139
135 return ret; 140 return ret;
136} 141}
@@ -145,7 +150,7 @@ static dma_addr_t dma_direct_map_single(struct device *dev, void *ptr,
145 size_t size, 150 size_t size,
146 enum dma_data_direction direction) 151 enum dma_data_direction direction)
147{ 152{
148 return virt_to_abs(ptr) | dma_direct_offset; 153 return virt_to_abs(ptr) + get_dma_direct_offset(dev);
149} 154}
150 155
151static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr, 156static void dma_direct_unmap_single(struct device *dev, dma_addr_t dma_addr,
@@ -161,7 +166,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
161 int i; 166 int i;
162 167
163 for_each_sg(sgl, sg, nents, i) { 168 for_each_sg(sgl, sg, nents, i) {
164 sg->dma_address = sg_phys(sg) | dma_direct_offset; 169 sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
165 sg->dma_length = sg->length; 170 sg->dma_length = sg->length;
166 } 171 }
167 172
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 56aba84c1f6e..ad071a146a8d 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -289,11 +289,8 @@ interrupt_base:
289 CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception) 289 CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
290 290
291 /* Machine Check Interrupt */ 291 /* Machine Check Interrupt */
292#ifdef CONFIG_440A
293 MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
294#else
295 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) 292 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
296#endif 293 MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception)
297 294
298 /* Data Storage Interrupt */ 295 /* Data Storage Interrupt */
299 START_EXCEPTION(DataStorage) 296 START_EXCEPTION(DataStorage)
@@ -674,6 +671,15 @@ finish_tlb_load:
674 */ 671 */
675 672
676/* 673/*
674 * Adjust the machine check IVOR on 440A cores
675 */
676_GLOBAL(__fixup_440A_mcheck)
677 li r3,MachineCheckA@l
678 mtspr SPRN_IVOR1,r3
679 sync
680 blr
681
682/*
677 * extern void giveup_altivec(struct task_struct *prev) 683 * extern void giveup_altivec(struct task_struct *prev)
678 * 684 *
679 * The 44x core does not have an AltiVec unit. 685 * The 44x core does not have an AltiVec unit.
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index c34986835a4e..11b4f6d9ffce 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -903,6 +903,7 @@ handle_page_fault:
903 * the PTE insertion 903 * the PTE insertion
904 */ 904 */
90512: bl .save_nvgprs 90512: bl .save_nvgprs
906 mr r5,r3
906 addi r3,r1,STACK_FRAME_OVERHEAD 907 addi r3,r1,STACK_FRAME_OVERHEAD
907 ld r4,_DAR(r1) 908 ld r4,_DAR(r1)
908 bl .low_hash_fault 909 bl .low_hash_fault
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 8536e7676160..ba9393f8e77a 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -166,7 +166,7 @@ label:
166 mfspr r5,SPRN_ESR; \ 166 mfspr r5,SPRN_ESR; \
167 stw r5,_ESR(r11); \ 167 stw r5,_ESR(r11); \
168 addi r3,r1,STACK_FRAME_OVERHEAD; \ 168 addi r3,r1,STACK_FRAME_OVERHEAD; \
169 EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ 169 EXC_XFER_TEMPLATE(hdlr, n+4, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \
170 NOCOPY, mcheck_transfer_to_handler, \ 170 NOCOPY, mcheck_transfer_to_handler, \
171 ret_from_mcheck_exc) 171 ret_from_mcheck_exc)
172 172
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 7aecb39a5a45..d9cc2c288d9e 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -73,8 +73,8 @@ _ENTRY(_start);
73/* We try to not make any assumptions about how the boot loader 73/* We try to not make any assumptions about how the boot loader
74 * setup or used the TLBs. We invalidate all mappings from the 74 * setup or used the TLBs. We invalidate all mappings from the
75 * boot loader and load a single entry in TLB1[0] to map the 75 * boot loader and load a single entry in TLB1[0] to map the
76 * first 16M of kernel memory. Any boot info passed from the 76 * first 64M of kernel memory. Any boot info passed from the
77 * bootloader needs to live in this first 16M. 77 * bootloader needs to live in this first 64M.
78 * 78 *
79 * Requirement on bootloader: 79 * Requirement on bootloader:
80 * - The page we're executing in needs to reside in TLB1 and 80 * - The page we're executing in needs to reside in TLB1 and
@@ -167,7 +167,7 @@ skpinv: addi r6,r6,1 /* Increment */
167 mtspr SPRN_MAS0,r7 167 mtspr SPRN_MAS0,r7
168 tlbre 168 tlbre
169 169
170 /* Just modify the entry ID and EPN for the temp mapping */ 170 /* Just modify the entry ID, EPN and RPN for the temp mapping */
171 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */ 171 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
172 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ 172 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
173 mtspr SPRN_MAS0,r7 173 mtspr SPRN_MAS0,r7
@@ -177,9 +177,12 @@ skpinv: addi r6,r6,1 /* Increment */
177 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l 177 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
178 mtspr SPRN_MAS1,r6 178 mtspr SPRN_MAS1,r6
179 mfspr r6,SPRN_MAS2 179 mfspr r6,SPRN_MAS2
180 li r7,0 /* temp EPN = 0 */ 180 lis r7,PHYSICAL_START@h
181 rlwimi r7,r6,0,20,31 181 rlwimi r7,r6,0,20,31
182 mtspr SPRN_MAS2,r7 182 mtspr SPRN_MAS2,r7
183 mfspr r6,SPRN_MAS3
184 rlwimi r7,r6,0,20,31
185 mtspr SPRN_MAS3,r7
183 tlbwe 186 tlbwe
184 187
185 xori r6,r4,1 188 xori r6,r4,1
@@ -222,11 +225,11 @@ skpinv: addi r6,r6,1 /* Increment */
222 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */ 225 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
223 mtspr SPRN_MAS0,r6 226 mtspr SPRN_MAS0,r6
224 lis r6,(MAS1_VALID|MAS1_IPROT)@h 227 lis r6,(MAS1_VALID|MAS1_IPROT)@h
225 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_16M))@l 228 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_64M))@l
226 mtspr SPRN_MAS1,r6 229 mtspr SPRN_MAS1,r6
227 li r7,0 230 li r7,0
228 lis r6,KERNELBASE@h 231 lis r6,PAGE_OFFSET@h
229 ori r6,r6,KERNELBASE@l 232 ori r6,r6,PAGE_OFFSET@l
230 rlwimi r6,r7,0,20,31 233 rlwimi r6,r7,0,20,31
231 mtspr SPRN_MAS2,r6 234 mtspr SPRN_MAS2,r6
232 li r7,(MAS3_SX|MAS3_SW|MAS3_SR) 235 li r7,(MAS3_SX|MAS3_SW|MAS3_SR)
@@ -234,6 +237,9 @@ skpinv: addi r6,r6,1 /* Increment */
234 tlbwe 237 tlbwe
235 238
236/* 7. Jump to KERNELBASE mapping */ 239/* 7. Jump to KERNELBASE mapping */
240 lis r6,KERNELBASE@h
241 ori r6,r6,KERNELBASE@l
242 rlwimi r6,r7,0,20,31
237 lis r7,MSR_KERNEL@h 243 lis r7,MSR_KERNEL@h
238 ori r7,r7,MSR_KERNEL@l 244 ori r7,r7,MSR_KERNEL@l
239 bl 1f /* Find our address */ 245 bl 1f /* Find our address */
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 72fd87156b24..2f50bb5d00f9 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -41,6 +41,7 @@
41#include <linux/kobject.h> 41#include <linux/kobject.h>
42#include <linux/dma-mapping.h> 42#include <linux/dma-mapping.h>
43#include <linux/interrupt.h> 43#include <linux/interrupt.h>
44#include <linux/of.h>
44#include <linux/of_platform.h> 45#include <linux/of_platform.h>
45#include <asm/ibmebus.h> 46#include <asm/ibmebus.h>
46#include <asm/abs_addr.h> 47#include <asm/abs_addr.h>
@@ -52,7 +53,7 @@ static struct device ibmebus_bus_device = { /* fake "parent" device */
52struct bus_type ibmebus_bus_type; 53struct bus_type ibmebus_bus_type;
53 54
54/* These devices will automatically be added to the bus during init */ 55/* These devices will automatically be added to the bus during init */
55static struct of_device_id builtin_matches[] = { 56static struct of_device_id __initdata builtin_matches[] = {
56 { .compatible = "IBM,lhca" }, 57 { .compatible = "IBM,lhca" },
57 { .compatible = "IBM,lhea" }, 58 { .compatible = "IBM,lhea" },
58 {}, 59 {},
@@ -171,7 +172,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
171 172
172 root = of_find_node_by_path("/"); 173 root = of_find_node_by_path("/");
173 174
174 for (child = NULL; (child = of_get_next_child(root, child)); ) { 175 for_each_child_of_node(root, child) {
175 if (!of_match_node(matches, child)) 176 if (!of_match_node(matches, child))
176 continue; 177 continue;
177 178
@@ -197,16 +198,13 @@ int ibmebus_register_driver(struct of_platform_driver *drv)
197 /* If the driver uses devices that ibmebus doesn't know, add them */ 198 /* If the driver uses devices that ibmebus doesn't know, add them */
198 ibmebus_create_devices(drv->match_table); 199 ibmebus_create_devices(drv->match_table);
199 200
200 drv->driver.name = drv->name; 201 return of_register_driver(drv, &ibmebus_bus_type);
201 drv->driver.bus = &ibmebus_bus_type;
202
203 return driver_register(&drv->driver);
204} 202}
205EXPORT_SYMBOL(ibmebus_register_driver); 203EXPORT_SYMBOL(ibmebus_register_driver);
206 204
207void ibmebus_unregister_driver(struct of_platform_driver *drv) 205void ibmebus_unregister_driver(struct of_platform_driver *drv)
208{ 206{
209 driver_unregister(&drv->driver); 207 of_unregister_driver(drv);
210} 208}
211EXPORT_SYMBOL(ibmebus_unregister_driver); 209EXPORT_SYMBOL(ibmebus_unregister_driver);
212 210
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 79a85d656871..a3c406aca664 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -532,16 +532,14 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl, int nid)
532 return tbl; 532 return tbl;
533} 533}
534 534
535void iommu_free_table(struct device_node *dn) 535void iommu_free_table(struct iommu_table *tbl, const char *node_name)
536{ 536{
537 struct pci_dn *pdn = dn->data;
538 struct iommu_table *tbl = pdn->iommu_table;
539 unsigned long bitmap_sz, i; 537 unsigned long bitmap_sz, i;
540 unsigned int order; 538 unsigned int order;
541 539
542 if (!tbl || !tbl->it_map) { 540 if (!tbl || !tbl->it_map) {
543 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__, 541 printk(KERN_ERR "%s: expected TCE map for %s\n", __FUNCTION__,
544 dn->full_name); 542 node_name);
545 return; 543 return;
546 } 544 }
547 545
@@ -550,7 +548,7 @@ void iommu_free_table(struct device_node *dn)
550 for (i = 0; i < (tbl->it_size/64); i++) { 548 for (i = 0; i < (tbl->it_size/64); i++) {
551 if (tbl->it_map[i] != 0) { 549 if (tbl->it_map[i] != 0) {
552 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n", 550 printk(KERN_WARNING "%s: Unexpected TCEs for %s\n",
553 __FUNCTION__, dn->full_name); 551 __FUNCTION__, node_name);
554 break; 552 break;
555 } 553 }
556 } 554 }
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index f0f49d1be3d5..ee172aa42aa7 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -108,7 +108,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
108 if (size > 0x10000) 108 if (size > 0x10000)
109 size = 0x10000; 109 size = 0x10000;
110 110
111 printk(KERN_ERR "no ISA IO ranges or unexpected isa range," 111 printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
112 "mapping 64k\n"); 112 "mapping 64k\n");
113 113
114 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE, 114 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
@@ -116,7 +116,7 @@ static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
116 return; 116 return;
117 117
118inval_range: 118inval_range:
119 printk(KERN_ERR "no ISA IO ranges or unexpected isa range," 119 printk(KERN_ERR "no ISA IO ranges or unexpected isa range, "
120 "mapping 64k\n"); 120 "mapping 64k\n");
121 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE, 121 __ioremap_at(phb_io_base_phys, (void *)ISA_IO_BASE,
122 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED); 122 0x10000, _PAGE_NO_CACHE|_PAGE_GUARDED);
@@ -145,7 +145,7 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
145 for_each_node_by_type(np, "isa") { 145 for_each_node_by_type(np, "isa") {
146 /* Look for our hose being a parent */ 146 /* Look for our hose being a parent */
147 for (parent = of_get_parent(np); parent;) { 147 for (parent = of_get_parent(np); parent;) {
148 if (parent == hose->arch_data) { 148 if (parent == hose->dn) {
149 of_node_put(parent); 149 of_node_put(parent);
150 break; 150 break;
151 } 151 }
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 4ed58875ee17..76b862bd1fe9 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -4,6 +4,7 @@
4#include <linux/serial_core.h> 4#include <linux/serial_core.h>
5#include <linux/console.h> 5#include <linux/console.h>
6#include <linux/pci.h> 6#include <linux/pci.h>
7#include <linux/of_device.h>
7#include <asm/io.h> 8#include <asm/io.h>
8#include <asm/mmu.h> 9#include <asm/mmu.h>
9#include <asm/prom.h> 10#include <asm/prom.h>
@@ -31,6 +32,15 @@ static struct legacy_serial_info {
31 int irq_check_parent; 32 int irq_check_parent;
32 phys_addr_t taddr; 33 phys_addr_t taddr;
33} legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS]; 34} legacy_serial_infos[MAX_LEGACY_SERIAL_PORTS];
35
36static struct __initdata of_device_id parents[] = {
37 {.type = "soc",},
38 {.type = "tsi-bridge",},
39 {.type = "opb", .compatible = "ibm,opb",},
40 {.compatible = "simple-bus",},
41 {.compatible = "wrs,epld-localbus",},
42};
43
34static unsigned int legacy_serial_count; 44static unsigned int legacy_serial_count;
35static int legacy_serial_console = -1; 45static int legacy_serial_console = -1;
36 46
@@ -306,19 +316,21 @@ void __init find_legacy_serial_ports(void)
306 DBG(" no linux,stdout-path !\n"); 316 DBG(" no linux,stdout-path !\n");
307 } 317 }
308 318
309 /* First fill our array with SOC ports */ 319 /* Iterate over all the 16550 ports, looking for known parents */
310 for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) { 320 for_each_compatible_node(np, "serial", "ns16550") {
311 struct device_node *soc = of_get_parent(np); 321 struct device_node *parent = of_get_parent(np);
312 if (soc && !strcmp(soc->type, "soc")) { 322 if (!parent)
323 continue;
324 if (of_match_node(parents, parent) != NULL) {
313 index = add_legacy_soc_port(np, np); 325 index = add_legacy_soc_port(np, np);
314 if (index >= 0 && np == stdout) 326 if (index >= 0 && np == stdout)
315 legacy_serial_console = index; 327 legacy_serial_console = index;
316 } 328 }
317 of_node_put(soc); 329 of_node_put(parent);
318 } 330 }
319 331
320 /* First fill our array with ISA ports */ 332 /* Next, fill our array with ISA ports */
321 for (np = NULL; (np = of_find_node_by_type(np, "serial"));) { 333 for_each_node_by_type(np, "serial") {
322 struct device_node *isa = of_get_parent(np); 334 struct device_node *isa = of_get_parent(np);
323 if (isa && !strcmp(isa->name, "isa")) { 335 if (isa && !strcmp(isa->name, "isa")) {
324 index = add_legacy_isa_port(np, isa); 336 index = add_legacy_isa_port(np, isa);
@@ -328,29 +340,6 @@ void __init find_legacy_serial_ports(void)
328 of_node_put(isa); 340 of_node_put(isa);
329 } 341 }
330 342
331 /* First fill our array with tsi-bridge ports */
332 for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
333 struct device_node *tsi = of_get_parent(np);
334 if (tsi && !strcmp(tsi->type, "tsi-bridge")) {
335 index = add_legacy_soc_port(np, np);
336 if (index >= 0 && np == stdout)
337 legacy_serial_console = index;
338 }
339 of_node_put(tsi);
340 }
341
342 /* First fill our array with opb bus ports */
343 for (np = NULL; (np = of_find_compatible_node(np, "serial", "ns16550")) != NULL;) {
344 struct device_node *opb = of_get_parent(np);
345 if (opb && (!strcmp(opb->type, "opb") ||
346 of_device_is_compatible(opb, "ibm,opb"))) {
347 index = add_legacy_soc_port(np, np);
348 if (index >= 0 && np == stdout)
349 legacy_serial_console = index;
350 }
351 of_node_put(opb);
352 }
353
354#ifdef CONFIG_PCI 343#ifdef CONFIG_PCI
355 /* Next, try to locate PCI ports */ 344 /* Next, try to locate PCI ports */
356 for (np = NULL; (np = of_find_all_nodes(np));) { 345 for (np = NULL; (np = of_find_all_nodes(np));) {
@@ -474,7 +463,7 @@ static int __init serial_dev_init(void)
474 463
475 /* 464 /*
476 * Before we register the platfrom serial devices, we need 465 * Before we register the platfrom serial devices, we need
477 * to fixup their interrutps and their IO ports. 466 * to fixup their interrupts and their IO ports.
478 */ 467 */
479 DBG("Fixing serial ports interrupts and IO ports ...\n"); 468 DBG("Fixing serial ports interrupts and IO ports ...\n");
480 469
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index ff781b2eddec..dcb89a88df46 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -41,7 +41,6 @@
41/* #define LPARCFG_DEBUG */ 41/* #define LPARCFG_DEBUG */
42 42
43static struct proc_dir_entry *proc_ppc64_lparcfg; 43static struct proc_dir_entry *proc_ppc64_lparcfg;
44#define LPARCFG_BUFF_SIZE 4096
45 44
46/* 45/*
47 * Track sum of all purrs across all processors. This is used to further 46 * Track sum of all purrs across all processors. This is used to further
@@ -595,13 +594,6 @@ int __init lparcfg_init(void)
595 ent = create_proc_entry("ppc64/lparcfg", mode, NULL); 594 ent = create_proc_entry("ppc64/lparcfg", mode, NULL);
596 if (ent) { 595 if (ent) {
597 ent->proc_fops = &lparcfg_fops; 596 ent->proc_fops = &lparcfg_fops;
598 ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
599 if (!ent->data) {
600 printk(KERN_ERR
601 "Failed to allocate buffer for lparcfg\n");
602 remove_proc_entry("lparcfg", ent->parent);
603 return -ENOMEM;
604 }
605 } else { 597 } else {
606 printk(KERN_ERR "Failed to create ppc64/lparcfg\n"); 598 printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
607 return -EIO; 599 return -EIO;
@@ -613,10 +605,8 @@ int __init lparcfg_init(void)
613 605
614void __exit lparcfg_cleanup(void) 606void __exit lparcfg_cleanup(void)
615{ 607{
616 if (proc_ppc64_lparcfg) { 608 if (proc_ppc64_lparcfg)
617 kfree(proc_ppc64_lparcfg->data);
618 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent); 609 remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
619 }
620} 610}
621 611
622module_init(lparcfg_init); 612module_init(lparcfg_init);
diff --git a/arch/powerpc/kernel/misc.S b/arch/powerpc/kernel/misc.S
index 330c9dc7db86..7b9160220698 100644
--- a/arch/powerpc/kernel/misc.S
+++ b/arch/powerpc/kernel/misc.S
@@ -8,12 +8,17 @@
8 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com) 8 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
9 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com) 9 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
10 * 10 *
11 * setjmp/longjmp code by Paul Mackerras.
12 *
11 * This program is free software; you can redistribute it and/or 13 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License 14 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 15 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version. 16 * 2 of the License, or (at your option) any later version.
15 */ 17 */
16#include <asm/ppc_asm.h> 18#include <asm/ppc_asm.h>
19#include <asm/unistd.h>
20#include <asm/asm-compat.h>
21#include <asm/asm-offsets.h>
17 22
18 .text 23 .text
19 24
@@ -43,3 +48,71 @@ _GLOBAL(add_reloc_offset)
43 add r3,r3,r5 48 add r3,r3,r5
44 mtlr r0 49 mtlr r0
45 blr 50 blr
51
52_GLOBAL(kernel_execve)
53 li r0,__NR_execve
54 sc
55 bnslr
56 neg r3,r3
57 blr
58
59_GLOBAL(setjmp)
60 mflr r0
61 PPC_STL r0,0(r3)
62 PPC_STL r1,SZL(r3)
63 PPC_STL r2,2*SZL(r3)
64 mfcr r0
65 PPC_STL r0,3*SZL(r3)
66 PPC_STL r13,4*SZL(r3)
67 PPC_STL r14,5*SZL(r3)
68 PPC_STL r15,6*SZL(r3)
69 PPC_STL r16,7*SZL(r3)
70 PPC_STL r17,8*SZL(r3)
71 PPC_STL r18,9*SZL(r3)
72 PPC_STL r19,10*SZL(r3)
73 PPC_STL r20,11*SZL(r3)
74 PPC_STL r21,12*SZL(r3)
75 PPC_STL r22,13*SZL(r3)
76 PPC_STL r23,14*SZL(r3)
77 PPC_STL r24,15*SZL(r3)
78 PPC_STL r25,16*SZL(r3)
79 PPC_STL r26,17*SZL(r3)
80 PPC_STL r27,18*SZL(r3)
81 PPC_STL r28,19*SZL(r3)
82 PPC_STL r29,20*SZL(r3)
83 PPC_STL r30,21*SZL(r3)
84 PPC_STL r31,22*SZL(r3)
85 li r3,0
86 blr
87
88_GLOBAL(longjmp)
89 PPC_LCMPI r4,0
90 bne 1f
91 li r4,1
921: PPC_LL r13,4*SZL(r3)
93 PPC_LL r14,5*SZL(r3)
94 PPC_LL r15,6*SZL(r3)
95 PPC_LL r16,7*SZL(r3)
96 PPC_LL r17,8*SZL(r3)
97 PPC_LL r18,9*SZL(r3)
98 PPC_LL r19,10*SZL(r3)
99 PPC_LL r20,11*SZL(r3)
100 PPC_LL r21,12*SZL(r3)
101 PPC_LL r22,13*SZL(r3)
102 PPC_LL r23,14*SZL(r3)
103 PPC_LL r24,15*SZL(r3)
104 PPC_LL r25,16*SZL(r3)
105 PPC_LL r26,17*SZL(r3)
106 PPC_LL r27,18*SZL(r3)
107 PPC_LL r28,19*SZL(r3)
108 PPC_LL r29,20*SZL(r3)
109 PPC_LL r30,21*SZL(r3)
110 PPC_LL r31,22*SZL(r3)
111 PPC_LL r0,3*SZL(r3)
112 mtcrf 0x38,r0
113 PPC_LL r0,0(r3)
114 PPC_LL r1,SZL(r3)
115 PPC_LL r2,2*SZL(r3)
116 mtlr r0
117 mr r3,r4
118 blr
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 8b642ab26d37..5c2e253ddfb1 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -206,6 +206,45 @@ _GLOBAL(_nmask_and_or_msr)
206 isync 206 isync
207 blr /* Done */ 207 blr /* Done */
208 208
209#ifdef CONFIG_40x
210
211/*
212 * Do an IO access in real mode
213 */
214_GLOBAL(real_readb)
215 mfmsr r7
216 ori r0,r7,MSR_DR
217 xori r0,r0,MSR_DR
218 sync
219 mtmsr r0
220 sync
221 isync
222 lbz r3,0(r3)
223 sync
224 mtmsr r7
225 sync
226 isync
227 blr
228
229 /*
230 * Do an IO access in real mode
231 */
232_GLOBAL(real_writeb)
233 mfmsr r7
234 ori r0,r7,MSR_DR
235 xori r0,r0,MSR_DR
236 sync
237 mtmsr r0
238 sync
239 isync
240 stb r3,0(r4)
241 sync
242 mtmsr r7
243 sync
244 isync
245 blr
246
247#endif /* CONFIG_40x */
209 248
210/* 249/*
211 * Flush MMU TLB 250 * Flush MMU TLB
@@ -236,12 +275,6 @@ _GLOBAL(_tlbia)
236 /* Invalidate all entries in TLB1 */ 275 /* Invalidate all entries in TLB1 */
237 li r3, 0x0c 276 li r3, 0x0c
238 tlbivax 0,3 277 tlbivax 0,3
239 /* Invalidate all entries in TLB2 */
240 li r3, 0x14
241 tlbivax 0,3
242 /* Invalidate all entries in TLB3 */
243 li r3, 0x1c
244 tlbivax 0,3
245 msync 278 msync
246#ifdef CONFIG_SMP 279#ifdef CONFIG_SMP
247 tlbsync 280 tlbsync
@@ -336,12 +369,8 @@ _GLOBAL(_tlbie)
336#elif defined(CONFIG_FSL_BOOKE) 369#elif defined(CONFIG_FSL_BOOKE)
337 rlwinm r4, r3, 0, 0, 19 370 rlwinm r4, r3, 0, 0, 19
338 ori r5, r4, 0x08 /* TLBSEL = 1 */ 371 ori r5, r4, 0x08 /* TLBSEL = 1 */
339 ori r6, r4, 0x10 /* TLBSEL = 2 */
340 ori r7, r4, 0x18 /* TLBSEL = 3 */
341 tlbivax 0, r4 372 tlbivax 0, r4
342 tlbivax 0, r5 373 tlbivax 0, r5
343 tlbivax 0, r6
344 tlbivax 0, r7
345 msync 374 msync
346#if defined(CONFIG_SMP) 375#if defined(CONFIG_SMP)
347 tlbsync 376 tlbsync
@@ -793,13 +822,6 @@ _GLOBAL(kernel_thread)
793 addi r1,r1,16 822 addi r1,r1,16
794 blr 823 blr
795 824
796_GLOBAL(kernel_execve)
797 li r0,__NR_execve
798 sc
799 bnslr
800 neg r3,r3
801 blr
802
803/* 825/*
804 * This routine is just here to keep GCC happy - sigh... 826 * This routine is just here to keep GCC happy - sigh...
805 */ 827 */
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index bbb3ba54c51c..a3c491e88a72 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -518,13 +518,6 @@ _GLOBAL(giveup_altivec)
518 518
519#endif /* CONFIG_ALTIVEC */ 519#endif /* CONFIG_ALTIVEC */
520 520
521_GLOBAL(kernel_execve)
522 li r0,__NR_execve
523 sc
524 bnslr
525 neg r3,r3
526 blr
527
528/* kexec_wait(phys_cpu) 521/* kexec_wait(phys_cpu)
529 * 522 *
530 * wait for the flag to change, indicating this kernel is going away but 523 * wait for the flag to change, indicating this kernel is going away but
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c
index 07a89a398639..eab313858315 100644
--- a/arch/powerpc/kernel/module_32.c
+++ b/arch/powerpc/kernel/module_32.c
@@ -24,6 +24,7 @@
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/cache.h> 25#include <linux/cache.h>
26#include <linux/bug.h> 26#include <linux/bug.h>
27#include <linux/sort.h>
27 28
28#include "setup.h" 29#include "setup.h"
29 30
@@ -54,22 +55,60 @@ void module_free(struct module *mod, void *module_region)
54 addend) */ 55 addend) */
55static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num) 56static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
56{ 57{
57 unsigned int i, j, ret = 0; 58 unsigned int i, r_info, r_addend, _count_relocs;
58 59
59 /* Sure, this is order(n^2), but it's usually short, and not 60 _count_relocs = 0;
60 time critical */ 61 r_info = 0;
61 for (i = 0; i < num; i++) { 62 r_addend = 0;
62 for (j = 0; j < i; j++) { 63 for (i = 0; i < num; i++)
63 /* If this addend appeared before, it's 64 /* Only count 24-bit relocs, others don't need stubs */
64 already been counted */ 65 if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
65 if (ELF32_R_SYM(rela[i].r_info) 66 (r_info != ELF32_R_SYM(rela[i].r_info) ||
66 == ELF32_R_SYM(rela[j].r_info) 67 r_addend != rela[i].r_addend)) {
67 && rela[i].r_addend == rela[j].r_addend) 68 _count_relocs++;
68 break; 69 r_info = ELF32_R_SYM(rela[i].r_info);
70 r_addend = rela[i].r_addend;
69 } 71 }
70 if (j == i) ret++; 72
73 return _count_relocs;
74}
75
76static int relacmp(const void *_x, const void *_y)
77{
78 const Elf32_Rela *x, *y;
79
80 y = (Elf32_Rela *)_x;
81 x = (Elf32_Rela *)_y;
82
83 /* Compare the entire r_info (as opposed to ELF32_R_SYM(r_info) only) to
84 * make the comparison cheaper/faster. It won't affect the sorting or
85 * the counting algorithms' performance
86 */
87 if (x->r_info < y->r_info)
88 return -1;
89 else if (x->r_info > y->r_info)
90 return 1;
91 else if (x->r_addend < y->r_addend)
92 return -1;
93 else if (x->r_addend > y->r_addend)
94 return 1;
95 else
96 return 0;
97}
98
99static void relaswap(void *_x, void *_y, int size)
100{
101 uint32_t *x, *y, tmp;
102 int i;
103
104 y = (uint32_t *)_x;
105 x = (uint32_t *)_y;
106
107 for (i = 0; i < sizeof(Elf32_Rela) / sizeof(uint32_t); i++) {
108 tmp = x[i];
109 x[i] = y[i];
110 y[i] = tmp;
71 } 111 }
72 return ret;
73} 112}
74 113
75/* Get the potential trampolines size required of the init and 114/* Get the potential trampolines size required of the init and
@@ -100,6 +139,16 @@ static unsigned long get_plt_size(const Elf32_Ehdr *hdr,
100 DEBUGP("Ptr: %p. Number: %u\n", 139 DEBUGP("Ptr: %p. Number: %u\n",
101 (void *)hdr + sechdrs[i].sh_offset, 140 (void *)hdr + sechdrs[i].sh_offset,
102 sechdrs[i].sh_size / sizeof(Elf32_Rela)); 141 sechdrs[i].sh_size / sizeof(Elf32_Rela));
142
143 /* Sort the relocation information based on a symbol and
144 * addend key. This is a stable O(n*log n) complexity
145 * alogrithm but it will reduce the complexity of
146 * count_relocs() to linear complexity O(n)
147 */
148 sort((void *)hdr + sechdrs[i].sh_offset,
149 sechdrs[i].sh_size / sizeof(Elf32_Rela),
150 sizeof(Elf32_Rela), relacmp, relaswap);
151
103 ret += count_relocs((void *)hdr 152 ret += count_relocs((void *)hdr
104 + sechdrs[i].sh_offset, 153 + sechdrs[i].sh_offset,
105 sechdrs[i].sh_size 154 sechdrs[i].sh_size
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 75c7c4f19280..3a82b02b784b 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -24,6 +24,7 @@
24#include <asm/module.h> 24#include <asm/module.h>
25#include <asm/uaccess.h> 25#include <asm/uaccess.h>
26#include <asm/firmware.h> 26#include <asm/firmware.h>
27#include <linux/sort.h>
27 28
28#include "setup.h" 29#include "setup.h"
29 30
@@ -81,25 +82,23 @@ static struct ppc64_stub_entry ppc64_stub =
81 different addend) */ 82 different addend) */
82static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num) 83static unsigned int count_relocs(const Elf64_Rela *rela, unsigned int num)
83{ 84{
84 unsigned int i, j, ret = 0; 85 unsigned int i, r_info, r_addend, _count_relocs;
85 86
86 /* FIXME: Only count external ones --RR */ 87 /* FIXME: Only count external ones --RR */
87 /* Sure, this is order(n^2), but it's usually short, and not 88 _count_relocs = 0;
88 time critical */ 89 r_info = 0;
89 for (i = 0; i < num; i++) { 90 r_addend = 0;
91 for (i = 0; i < num; i++)
90 /* Only count 24-bit relocs, others don't need stubs */ 92 /* Only count 24-bit relocs, others don't need stubs */
91 if (ELF64_R_TYPE(rela[i].r_info) != R_PPC_REL24) 93 if (ELF64_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
92 continue; 94 (r_info != ELF64_R_SYM(rela[i].r_info) ||
93 for (j = 0; j < i; j++) { 95 r_addend != rela[i].r_addend)) {
94 /* If this addend appeared before, it's 96 _count_relocs++;
95 already been counted */ 97 r_info = ELF64_R_SYM(rela[i].r_info);
96 if (rela[i].r_info == rela[j].r_info 98 r_addend = rela[i].r_addend;
97 && rela[i].r_addend == rela[j].r_addend)
98 break;
99 } 99 }
100 if (j == i) ret++; 100
101 } 101 return _count_relocs;
102 return ret;
103} 102}
104 103
105void *module_alloc(unsigned long size) 104void *module_alloc(unsigned long size)
@@ -118,6 +117,44 @@ void module_free(struct module *mod, void *module_region)
118 table entries. */ 117 table entries. */
119} 118}
120 119
120static int relacmp(const void *_x, const void *_y)
121{
122 const Elf64_Rela *x, *y;
123
124 y = (Elf64_Rela *)_x;
125 x = (Elf64_Rela *)_y;
126
127 /* Compare the entire r_info (as opposed to ELF64_R_SYM(r_info) only) to
128 * make the comparison cheaper/faster. It won't affect the sorting or
129 * the counting algorithms' performance
130 */
131 if (x->r_info < y->r_info)
132 return -1;
133 else if (x->r_info > y->r_info)
134 return 1;
135 else if (x->r_addend < y->r_addend)
136 return -1;
137 else if (x->r_addend > y->r_addend)
138 return 1;
139 else
140 return 0;
141}
142
143static void relaswap(void *_x, void *_y, int size)
144{
145 uint64_t *x, *y, tmp;
146 int i;
147
148 y = (uint64_t *)_x;
149 x = (uint64_t *)_y;
150
151 for (i = 0; i < sizeof(Elf64_Rela) / sizeof(uint64_t); i++) {
152 tmp = x[i];
153 x[i] = y[i];
154 y[i] = tmp;
155 }
156}
157
121/* Get size of potential trampolines required. */ 158/* Get size of potential trampolines required. */
122static unsigned long get_stubs_size(const Elf64_Ehdr *hdr, 159static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
123 const Elf64_Shdr *sechdrs) 160 const Elf64_Shdr *sechdrs)
@@ -133,6 +170,16 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
133 DEBUGP("Ptr: %p. Number: %lu\n", 170 DEBUGP("Ptr: %p. Number: %lu\n",
134 (void *)sechdrs[i].sh_addr, 171 (void *)sechdrs[i].sh_addr,
135 sechdrs[i].sh_size / sizeof(Elf64_Rela)); 172 sechdrs[i].sh_size / sizeof(Elf64_Rela));
173
174 /* Sort the relocation information based on a symbol and
175 * addend key. This is a stable O(n*log n) complexity
176 * alogrithm but it will reduce the complexity of
177 * count_relocs() to linear complexity O(n)
178 */
179 sort((void *)sechdrs[i].sh_addr,
180 sechdrs[i].sh_size / sizeof(Elf64_Rela),
181 sizeof(Elf64_Rela), relacmp, relaswap);
182
136 relocs += count_relocs((void *)sechdrs[i].sh_addr, 183 relocs += count_relocs((void *)sechdrs[i].sh_addr,
137 sechdrs[i].sh_size 184 sechdrs[i].sh_size
138 / sizeof(Elf64_Rela)); 185 / sizeof(Elf64_Rela));
@@ -343,7 +390,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
343 /* Simply set it */ 390 /* Simply set it */
344 *(u32 *)location = value; 391 *(u32 *)location = value;
345 break; 392 break;
346 393
347 case R_PPC64_ADDR64: 394 case R_PPC64_ADDR64:
348 /* Simply set it */ 395 /* Simply set it */
349 *(unsigned long *)location = value; 396 *(unsigned long *)location = value;
@@ -399,7 +446,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
399 } 446 }
400 447
401 /* Only replace bits 2 through 26 */ 448 /* Only replace bits 2 through 26 */
402 *(uint32_t *)location 449 *(uint32_t *)location
403 = (*(uint32_t *)location & ~0x03fffffc) 450 = (*(uint32_t *)location & ~0x03fffffc)
404 | (value & 0x03fffffc); 451 | (value & 0x03fffffc);
405 break; 452 break;
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 3388ad619996..5748ddb47d9f 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -5,10 +5,10 @@
5#include <linux/module.h> 5#include <linux/module.h>
6#include <linux/mod_devicetable.h> 6#include <linux/mod_devicetable.h>
7#include <linux/slab.h> 7#include <linux/slab.h>
8#include <linux/of_device.h>
8 9
9#include <asm/errno.h> 10#include <asm/errno.h>
10#include <asm/dcr.h> 11#include <asm/dcr.h>
11#include <asm/of_device.h>
12 12
13static void of_device_make_bus_id(struct of_device *dev) 13static void of_device_make_bus_id(struct of_device *dev)
14{ 14{
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index aeaa20268ce2..fb698d47082d 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -19,6 +19,7 @@
19#include <linux/mod_devicetable.h> 19#include <linux/mod_devicetable.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21#include <linux/pci.h> 21#include <linux/pci.h>
22#include <linux/of.h>
22#include <linux/of_device.h> 23#include <linux/of_device.h>
23#include <linux/of_platform.h> 24#include <linux/of_platform.h>
24 25
@@ -40,7 +41,7 @@
40 * a bus type in the list 41 * a bus type in the list
41 */ 42 */
42 43
43static struct of_device_id of_default_bus_ids[] = { 44static const struct of_device_id of_default_bus_ids[] = {
44 { .type = "soc", }, 45 { .type = "soc", },
45 { .compatible = "soc", }, 46 { .compatible = "soc", },
46 { .type = "spider", }, 47 { .type = "spider", },
@@ -64,26 +65,6 @@ static int __init of_bus_driver_init(void)
64 65
65postcore_initcall(of_bus_driver_init); 66postcore_initcall(of_bus_driver_init);
66 67
67int of_register_platform_driver(struct of_platform_driver *drv)
68{
69 /* initialize common driver fields */
70 if (!drv->driver.name)
71 drv->driver.name = drv->name;
72 if (!drv->driver.owner)
73 drv->driver.owner = drv->owner;
74 drv->driver.bus = &of_platform_bus_type;
75
76 /* register with core */
77 return driver_register(&drv->driver);
78}
79EXPORT_SYMBOL(of_register_platform_driver);
80
81void of_unregister_platform_driver(struct of_platform_driver *drv)
82{
83 driver_unregister(&drv->driver);
84}
85EXPORT_SYMBOL(of_unregister_platform_driver);
86
87struct of_device* of_platform_device_create(struct device_node *np, 68struct of_device* of_platform_device_create(struct device_node *np,
88 const char *bus_id, 69 const char *bus_id,
89 struct device *parent) 70 struct device *parent)
@@ -120,15 +101,15 @@ EXPORT_SYMBOL(of_platform_device_create);
120 * @matches: match table, NULL to use the default, OF_NO_DEEP_PROBE to 101 * @matches: match table, NULL to use the default, OF_NO_DEEP_PROBE to
121 * disallow recursive creation of child busses 102 * disallow recursive creation of child busses
122 */ 103 */
123static int of_platform_bus_create(struct device_node *bus, 104static int of_platform_bus_create(const struct device_node *bus,
124 struct of_device_id *matches, 105 const struct of_device_id *matches,
125 struct device *parent) 106 struct device *parent)
126{ 107{
127 struct device_node *child; 108 struct device_node *child;
128 struct of_device *dev; 109 struct of_device *dev;
129 int rc = 0; 110 int rc = 0;
130 111
131 for (child = NULL; (child = of_get_next_child(bus, child)); ) { 112 for_each_child_of_node(bus, child) {
132 pr_debug(" create child: %s\n", child->full_name); 113 pr_debug(" create child: %s\n", child->full_name);
133 dev = of_platform_device_create(child, NULL, parent); 114 dev = of_platform_device_create(child, NULL, parent);
134 if (dev == NULL) 115 if (dev == NULL)
@@ -157,7 +138,7 @@ static int of_platform_bus_create(struct device_node *bus,
157 */ 138 */
158 139
159int of_platform_bus_probe(struct device_node *root, 140int of_platform_bus_probe(struct device_node *root,
160 struct of_device_id *matches, 141 const struct of_device_id *matches,
161 struct device *parent) 142 struct device *parent)
162{ 143{
163 struct device_node *child; 144 struct device_node *child;
@@ -190,7 +171,7 @@ int of_platform_bus_probe(struct device_node *root,
190 rc = of_platform_bus_create(root, matches, &dev->dev); 171 rc = of_platform_bus_create(root, matches, &dev->dev);
191 goto bail; 172 goto bail;
192 } 173 }
193 for (child = NULL; (child = of_get_next_child(root, child)); ) { 174 for_each_child_of_node(root, child) {
194 if (!of_match_node(matches, child)) 175 if (!of_match_node(matches, child))
195 continue; 176 continue;
196 177
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 2ae3b6f778a3..980fe32895c0 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -48,32 +48,26 @@
48static DEFINE_SPINLOCK(hose_spinlock); 48static DEFINE_SPINLOCK(hose_spinlock);
49 49
50/* XXX kill that some day ... */ 50/* XXX kill that some day ... */
51int global_phb_number; /* Global phb counter */ 51static int global_phb_number; /* Global phb counter */
52 52
53extern struct list_head hose_list; 53/* ISA Memory physical address */
54resource_size_t isa_mem_base;
54 55
55/* 56/* Default PCI flags is 0 */
56 * pci_controller(phb) initialized common variables. 57unsigned int ppc_pci_flags;
57 */
58static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
59{
60 memset(hose, 0, sizeof(struct pci_controller));
61
62 spin_lock(&hose_spinlock);
63 hose->global_number = global_phb_number++;
64 list_add_tail(&hose->list_node, &hose_list);
65 spin_unlock(&hose_spinlock);
66}
67 58
68struct pci_controller * pcibios_alloc_controller(struct device_node *dev) 59struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
69{ 60{
70 struct pci_controller *phb; 61 struct pci_controller *phb;
71 62
72 phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL); 63 phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
73 if (phb == NULL) 64 if (phb == NULL)
74 return NULL; 65 return NULL;
75 pci_setup_pci_controller(phb); 66 spin_lock(&hose_spinlock);
76 phb->arch_data = dev; 67 phb->global_number = global_phb_number++;
68 list_add_tail(&phb->list_node, &hose_list);
69 spin_unlock(&hose_spinlock);
70 phb->dn = dev;
77 phb->is_dynamic = mem_init_done; 71 phb->is_dynamic = mem_init_done;
78#ifdef CONFIG_PPC64 72#ifdef CONFIG_PPC64
79 if (dev) { 73 if (dev) {
@@ -126,15 +120,10 @@ int pcibios_vaddr_is_ioport(void __iomem *address)
126 */ 120 */
127int pci_domain_nr(struct pci_bus *bus) 121int pci_domain_nr(struct pci_bus *bus)
128{ 122{
129 if (firmware_has_feature(FW_FEATURE_ISERIES)) 123 struct pci_controller *hose = pci_bus_to_host(bus);
130 return 0;
131 else {
132 struct pci_controller *hose = pci_bus_to_host(bus);
133 124
134 return hose->global_number; 125 return hose->global_number;
135 }
136} 126}
137
138EXPORT_SYMBOL(pci_domain_nr); 127EXPORT_SYMBOL(pci_domain_nr);
139 128
140#ifdef CONFIG_PPC_OF 129#ifdef CONFIG_PPC_OF
@@ -153,7 +142,7 @@ struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
153 while(node) { 142 while(node) {
154 struct pci_controller *hose, *tmp; 143 struct pci_controller *hose, *tmp;
155 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) 144 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
156 if (hose->arch_data == node) 145 if (hose->dn == node)
157 return hose; 146 return hose;
158 node = node->parent; 147 node = node->parent;
159 } 148 }
@@ -201,6 +190,20 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
201 struct of_irq oirq; 190 struct of_irq oirq;
202 unsigned int virq; 191 unsigned int virq;
203 192
193 /* The current device-tree that iSeries generates from the HV
194 * PCI informations doesn't contain proper interrupt routing,
195 * and all the fallback would do is print out crap, so we
196 * don't attempt to resolve the interrupts here at all, some
197 * iSeries specific fixup does it.
198 *
199 * In the long run, we will hopefully fix the generated device-tree
200 * instead.
201 */
202#ifdef CONFIG_PPC_ISERIES
203 if (firmware_has_feature(FW_FEATURE_ISERIES))
204 return -1;
205#endif
206
204 DBG("Try to map irq for %s...\n", pci_name(pci_dev)); 207 DBG("Try to map irq for %s...\n", pci_name(pci_dev));
205 208
206#ifdef DEBUG 209#ifdef DEBUG
@@ -222,10 +225,11 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
222 if (pin == 0) 225 if (pin == 0)
223 return -1; 226 return -1;
224 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) || 227 if (pci_read_config_byte(pci_dev, PCI_INTERRUPT_LINE, &line) ||
225 line == 0xff) { 228 line == 0xff || line == 0) {
226 return -1; 229 return -1;
227 } 230 }
228 DBG(" -> no map ! Using irq line %d from PCI config\n", line); 231 DBG(" -> no map ! Using line %d (pin %d) from PCI config\n",
232 line, pin);
229 233
230 virq = irq_create_mapping(NULL, line); 234 virq = irq_create_mapping(NULL, line);
231 if (virq != NO_IRQ) 235 if (virq != NO_IRQ)
@@ -475,3 +479,717 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
475 *start = rsrc->start - offset; 479 *start = rsrc->start - offset;
476 *end = rsrc->end - offset; 480 *end = rsrc->end - offset;
477} 481}
482
483/**
484 * pci_process_bridge_OF_ranges - Parse PCI bridge resources from device tree
485 * @hose: newly allocated pci_controller to be setup
486 * @dev: device node of the host bridge
487 * @primary: set if primary bus (32 bits only, soon to be deprecated)
488 *
489 * This function will parse the "ranges" property of a PCI host bridge device
490 * node and setup the resource mapping of a pci controller based on its
491 * content.
492 *
493 * Life would be boring if it wasn't for a few issues that we have to deal
494 * with here:
495 *
496 * - We can only cope with one IO space range and up to 3 Memory space
497 * ranges. However, some machines (thanks Apple !) tend to split their
498 * space into lots of small contiguous ranges. So we have to coalesce.
499 *
500 * - We can only cope with all memory ranges having the same offset
501 * between CPU addresses and PCI addresses. Unfortunately, some bridges
502 * are setup for a large 1:1 mapping along with a small "window" which
503 * maps PCI address 0 to some arbitrary high address of the CPU space in
504 * order to give access to the ISA memory hole.
505 * The way out of here that I've chosen for now is to always set the
506 * offset based on the first resource found, then override it if we
507 * have a different offset and the previous was set by an ISA hole.
508 *
509 * - Some busses have IO space not starting at 0, which causes trouble with
510 * the way we do our IO resource renumbering. The code somewhat deals with
511 * it for 64 bits but I would expect problems on 32 bits.
512 *
513 * - Some 32 bits platforms such as 4xx can have physical space larger than
514 * 32 bits so we need to use 64 bits values for the parsing
515 */
516void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
517 struct device_node *dev,
518 int primary)
519{
520 const u32 *ranges;
521 int rlen;
522 int pna = of_n_addr_cells(dev);
523 int np = pna + 5;
524 int memno = 0, isa_hole = -1;
525 u32 pci_space;
526 unsigned long long pci_addr, cpu_addr, pci_next, cpu_next, size;
527 unsigned long long isa_mb = 0;
528 struct resource *res;
529
530 printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
531 dev->full_name, primary ? "(primary)" : "");
532
533 /* Get ranges property */
534 ranges = of_get_property(dev, "ranges", &rlen);
535 if (ranges == NULL)
536 return;
537
538 /* Parse it */
539 while ((rlen -= np * 4) >= 0) {
540 /* Read next ranges element */
541 pci_space = ranges[0];
542 pci_addr = of_read_number(ranges + 1, 2);
543 cpu_addr = of_translate_address(dev, ranges + 3);
544 size = of_read_number(ranges + pna + 3, 2);
545 ranges += np;
546 if (cpu_addr == OF_BAD_ADDR || size == 0)
547 continue;
548
549 /* Now consume following elements while they are contiguous */
550 for (; rlen >= np * sizeof(u32);
551 ranges += np, rlen -= np * 4) {
552 if (ranges[0] != pci_space)
553 break;
554 pci_next = of_read_number(ranges + 1, 2);
555 cpu_next = of_translate_address(dev, ranges + 3);
556 if (pci_next != pci_addr + size ||
557 cpu_next != cpu_addr + size)
558 break;
559 size += of_read_number(ranges + pna + 3, 2);
560 }
561
562 /* Act based on address space type */
563 res = NULL;
564 switch ((pci_space >> 24) & 0x3) {
565 case 1: /* PCI IO space */
566 printk(KERN_INFO
567 " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
568 cpu_addr, cpu_addr + size - 1, pci_addr);
569
570 /* We support only one IO range */
571 if (hose->pci_io_size) {
572 printk(KERN_INFO
573 " \\--> Skipped (too many) !\n");
574 continue;
575 }
576#ifdef CONFIG_PPC32
577 /* On 32 bits, limit I/O space to 16MB */
578 if (size > 0x01000000)
579 size = 0x01000000;
580
581 /* 32 bits needs to map IOs here */
582 hose->io_base_virt = ioremap(cpu_addr, size);
583
584 /* Expect trouble if pci_addr is not 0 */
585 if (primary)
586 isa_io_base =
587 (unsigned long)hose->io_base_virt;
588#endif /* CONFIG_PPC32 */
589 /* pci_io_size and io_base_phys always represent IO
590 * space starting at 0 so we factor in pci_addr
591 */
592 hose->pci_io_size = pci_addr + size;
593 hose->io_base_phys = cpu_addr - pci_addr;
594
595 /* Build resource */
596 res = &hose->io_resource;
597 res->flags = IORESOURCE_IO;
598 res->start = pci_addr;
599 break;
600 case 2: /* PCI Memory space */
601 printk(KERN_INFO
602 " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
603 cpu_addr, cpu_addr + size - 1, pci_addr,
604 (pci_space & 0x40000000) ? "Prefetch" : "");
605
606 /* We support only 3 memory ranges */
607 if (memno >= 3) {
608 printk(KERN_INFO
609 " \\--> Skipped (too many) !\n");
610 continue;
611 }
612 /* Handles ISA memory hole space here */
613 if (pci_addr == 0) {
614 isa_mb = cpu_addr;
615 isa_hole = memno;
616 if (primary || isa_mem_base == 0)
617 isa_mem_base = cpu_addr;
618 }
619
620 /* We get the PCI/Mem offset from the first range or
621 * the, current one if the offset came from an ISA
622 * hole. If they don't match, bugger.
623 */
624 if (memno == 0 ||
625 (isa_hole >= 0 && pci_addr != 0 &&
626 hose->pci_mem_offset == isa_mb))
627 hose->pci_mem_offset = cpu_addr - pci_addr;
628 else if (pci_addr != 0 &&
629 hose->pci_mem_offset != cpu_addr - pci_addr) {
630 printk(KERN_INFO
631 " \\--> Skipped (offset mismatch) !\n");
632 continue;
633 }
634
635 /* Build resource */
636 res = &hose->mem_resources[memno++];
637 res->flags = IORESOURCE_MEM;
638 if (pci_space & 0x40000000)
639 res->flags |= IORESOURCE_PREFETCH;
640 res->start = cpu_addr;
641 break;
642 }
643 if (res != NULL) {
644 res->name = dev->full_name;
645 res->end = res->start + size - 1;
646 res->parent = NULL;
647 res->sibling = NULL;
648 res->child = NULL;
649 }
650 }
651
652 /* Out of paranoia, let's put the ISA hole last if any */
653 if (isa_hole >= 0 && memno > 0 && isa_hole != (memno-1)) {
654 struct resource tmp = hose->mem_resources[isa_hole];
655 hose->mem_resources[isa_hole] = hose->mem_resources[memno-1];
656 hose->mem_resources[memno-1] = tmp;
657 }
658}
659
660/* Decide whether to display the domain number in /proc */
661int pci_proc_domain(struct pci_bus *bus)
662{
663 struct pci_controller *hose = pci_bus_to_host(bus);
664#ifdef CONFIG_PPC64
665 return hose->buid != 0;
666#else
667 if (!(ppc_pci_flags & PPC_PCI_ENABLE_PROC_DOMAINS))
668 return 0;
669 if (ppc_pci_flags & PPC_PCI_COMPAT_DOMAIN_0)
670 return hose->global_number != 0;
671 return 1;
672#endif
673}
674
675void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
676 struct resource *res)
677{
678 resource_size_t offset = 0, mask = (resource_size_t)-1;
679 struct pci_controller *hose = pci_bus_to_host(dev->bus);
680
681 if (!hose)
682 return;
683 if (res->flags & IORESOURCE_IO) {
684 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
685 mask = 0xffffffffu;
686 } else if (res->flags & IORESOURCE_MEM)
687 offset = hose->pci_mem_offset;
688
689 region->start = (res->start - offset) & mask;
690 region->end = (res->end - offset) & mask;
691}
692EXPORT_SYMBOL(pcibios_resource_to_bus);
693
694void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
695 struct pci_bus_region *region)
696{
697 resource_size_t offset = 0, mask = (resource_size_t)-1;
698 struct pci_controller *hose = pci_bus_to_host(dev->bus);
699
700 if (!hose)
701 return;
702 if (res->flags & IORESOURCE_IO) {
703 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
704 mask = 0xffffffffu;
705 } else if (res->flags & IORESOURCE_MEM)
706 offset = hose->pci_mem_offset;
707 res->start = (region->start + offset) & mask;
708 res->end = (region->end + offset) & mask;
709}
710EXPORT_SYMBOL(pcibios_bus_to_resource);
711
712/* Fixup a bus resource into a linux resource */
713static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
714{
715 struct pci_controller *hose = pci_bus_to_host(dev->bus);
716 resource_size_t offset = 0, mask = (resource_size_t)-1;
717
718 if (res->flags & IORESOURCE_IO) {
719 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
720 mask = 0xffffffffu;
721 } else if (res->flags & IORESOURCE_MEM)
722 offset = hose->pci_mem_offset;
723
724 res->start = (res->start + offset) & mask;
725 res->end = (res->end + offset) & mask;
726
727 pr_debug("PCI:%s %016llx-%016llx\n",
728 pci_name(dev),
729 (unsigned long long)res->start,
730 (unsigned long long)res->end);
731}
732
733
734/* This header fixup will do the resource fixup for all devices as they are
735 * probed, but not for bridge ranges
736 */
737static void __devinit pcibios_fixup_resources(struct pci_dev *dev)
738{
739 struct pci_controller *hose = pci_bus_to_host(dev->bus);
740 int i;
741
742 if (!hose) {
743 printk(KERN_ERR "No host bridge for PCI dev %s !\n",
744 pci_name(dev));
745 return;
746 }
747 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
748 struct resource *res = dev->resource + i;
749 if (!res->flags)
750 continue;
751 if (res->end == 0xffffffff) {
752 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n",
753 pci_name(dev), i,
754 (unsigned long long)res->start,
755 (unsigned long long)res->end,
756 (unsigned int)res->flags);
757 res->end -= res->start;
758 res->start = 0;
759 res->flags |= IORESOURCE_UNSET;
760 continue;
761 }
762
763 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] fixup...\n",
764 pci_name(dev), i,
765 (unsigned long long)res->start,\
766 (unsigned long long)res->end,
767 (unsigned int)res->flags);
768
769 fixup_resource(res, dev);
770 }
771
772 /* Call machine specific resource fixup */
773 if (ppc_md.pcibios_fixup_resources)
774 ppc_md.pcibios_fixup_resources(dev);
775}
776DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
777
778static void __devinit __pcibios_fixup_bus(struct pci_bus *bus)
779{
780 struct pci_controller *hose = pci_bus_to_host(bus);
781 struct pci_dev *dev = bus->self;
782
783 pr_debug("PCI: Fixup bus %d (%s)\n", bus->number, dev ? pci_name(dev) : "PHB");
784
785 /* Fixup PCI<->PCI bridges. Host bridges are handled separately, for
786 * now differently between 32 and 64 bits.
787 */
788 if (dev != NULL) {
789 struct resource *res;
790 int i;
791
792 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
793 if ((res = bus->resource[i]) == NULL)
794 continue;
795 if (!res->flags)
796 continue;
797 if (i >= 3 && bus->self->transparent)
798 continue;
799 /* On PowerMac, Apple leaves bridge windows open over
800 * an inaccessible region of memory space (0...fffff)
801 * which is somewhat bogus, but that's what they think
802 * means disabled...
803 *
804 * We clear those to force them to be reallocated later
805 *
806 * We detect such regions by the fact that the base is
807 * equal to the pci_mem_offset of the host bridge and
808 * their size is smaller than 1M.
809 */
810 if (res->flags & IORESOURCE_MEM &&
811 res->start == hose->pci_mem_offset &&
812 res->end < 0x100000) {
813 printk(KERN_INFO
814 "PCI: Closing bogus Apple Firmware"
815 " region %d on bus 0x%02x\n",
816 i, bus->number);
817 res->flags = 0;
818 continue;
819 }
820
821 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
822 pci_name(dev), i,
823 (unsigned long long)res->start,\
824 (unsigned long long)res->end,
825 (unsigned int)res->flags);
826
827 fixup_resource(res, dev);
828 }
829 }
830
831 /* Additional setup that is different between 32 and 64 bits for now */
832 pcibios_do_bus_setup(bus);
833
834 /* Platform specific bus fixups */
835 if (ppc_md.pcibios_fixup_bus)
836 ppc_md.pcibios_fixup_bus(bus);
837
838 /* Read default IRQs and fixup if necessary */
839 list_for_each_entry(dev, &bus->devices, bus_list) {
840 pci_read_irq_line(dev);
841 if (ppc_md.pci_irq_fixup)
842 ppc_md.pci_irq_fixup(dev);
843 }
844}
845
846void __devinit pcibios_fixup_bus(struct pci_bus *bus)
847{
848 /* When called from the generic PCI probe, read PCI<->PCI bridge
849 * bases before proceeding
850 */
851 if (bus->self != NULL)
852 pci_read_bridge_bases(bus);
853 __pcibios_fixup_bus(bus);
854}
855EXPORT_SYMBOL(pcibios_fixup_bus);
856
857/* When building a bus from the OF tree rather than probing, we need a
858 * slightly different version of the fixup which doesn't read the
859 * bridge bases using config space accesses
860 */
861void __devinit pcibios_fixup_of_probed_bus(struct pci_bus *bus)
862{
863 __pcibios_fixup_bus(bus);
864}
865
866static int skip_isa_ioresource_align(struct pci_dev *dev)
867{
868 if ((ppc_pci_flags & PPC_PCI_CAN_SKIP_ISA_ALIGN) &&
869 !(dev->bus->bridge_ctl & PCI_BRIDGE_CTL_ISA))
870 return 1;
871 return 0;
872}
873
874/*
875 * We need to avoid collisions with `mirrored' VGA ports
876 * and other strange ISA hardware, so we always want the
877 * addresses to be allocated in the 0x000-0x0ff region
878 * modulo 0x400.
879 *
880 * Why? Because some silly external IO cards only decode
881 * the low 10 bits of the IO address. The 0x00-0xff region
882 * is reserved for motherboard devices that decode all 16
883 * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
884 * but we want to try to avoid allocating at 0x2900-0x2bff
885 * which might have be mirrored at 0x0100-0x03ff..
886 */
887void pcibios_align_resource(void *data, struct resource *res,
888 resource_size_t size, resource_size_t align)
889{
890 struct pci_dev *dev = data;
891
892 if (res->flags & IORESOURCE_IO) {
893 resource_size_t start = res->start;
894
895 if (skip_isa_ioresource_align(dev))
896 return;
897 if (start & 0x300) {
898 start = (start + 0x3ff) & ~0x3ff;
899 res->start = start;
900 }
901 }
902}
903EXPORT_SYMBOL(pcibios_align_resource);
904
905/*
906 * Reparent resource children of pr that conflict with res
907 * under res, and make res replace those children.
908 */
909static int __init reparent_resources(struct resource *parent,
910 struct resource *res)
911{
912 struct resource *p, **pp;
913 struct resource **firstpp = NULL;
914
915 for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
916 if (p->end < res->start)
917 continue;
918 if (res->end < p->start)
919 break;
920 if (p->start < res->start || p->end > res->end)
921 return -1; /* not completely contained */
922 if (firstpp == NULL)
923 firstpp = pp;
924 }
925 if (firstpp == NULL)
926 return -1; /* didn't find any conflicting entries? */
927 res->parent = parent;
928 res->child = *firstpp;
929 res->sibling = *pp;
930 *firstpp = res;
931 *pp = NULL;
932 for (p = res->child; p != NULL; p = p->sibling) {
933 p->parent = res;
934 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
935 p->name,
936 (unsigned long long)p->start,
937 (unsigned long long)p->end, res->name);
938 }
939 return 0;
940}
941
942/*
943 * Handle resources of PCI devices. If the world were perfect, we could
944 * just allocate all the resource regions and do nothing more. It isn't.
945 * On the other hand, we cannot just re-allocate all devices, as it would
946 * require us to know lots of host bridge internals. So we attempt to
947 * keep as much of the original configuration as possible, but tweak it
948 * when it's found to be wrong.
949 *
950 * Known BIOS problems we have to work around:
951 * - I/O or memory regions not configured
952 * - regions configured, but not enabled in the command register
953 * - bogus I/O addresses above 64K used
954 * - expansion ROMs left enabled (this may sound harmless, but given
955 * the fact the PCI specs explicitly allow address decoders to be
956 * shared between expansion ROMs and other resource regions, it's
957 * at least dangerous)
958 *
959 * Our solution:
960 * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
961 * This gives us fixed barriers on where we can allocate.
962 * (2) Allocate resources for all enabled devices. If there is
963 * a collision, just mark the resource as unallocated. Also
964 * disable expansion ROMs during this step.
965 * (3) Try to allocate resources for disabled devices. If the
966 * resources were assigned correctly, everything goes well,
967 * if they weren't, they won't disturb allocation of other
968 * resources.
969 * (4) Assign new addresses to resources which were either
970 * not configured at all or misconfigured. If explicitly
971 * requested by the user, configure expansion ROM address
972 * as well.
973 */
974
975static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
976{
977 struct pci_bus *bus;
978 int i;
979 struct resource *res, *pr;
980
981 /* Depth-First Search on bus tree */
982 list_for_each_entry(bus, bus_list, node) {
983 for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) {
984 if ((res = bus->resource[i]) == NULL || !res->flags
985 || res->start > res->end)
986 continue;
987 if (bus->parent == NULL)
988 pr = (res->flags & IORESOURCE_IO) ?
989 &ioport_resource : &iomem_resource;
990 else {
991 /* Don't bother with non-root busses when
992 * re-assigning all resources. We clear the
993 * resource flags as if they were colliding
994 * and as such ensure proper re-allocation
995 * later.
996 */
997 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)
998 goto clear_resource;
999 pr = pci_find_parent_resource(bus->self, res);
1000 if (pr == res) {
1001 /* this happens when the generic PCI
1002 * code (wrongly) decides that this
1003 * bridge is transparent -- paulus
1004 */
1005 continue;
1006 }
1007 }
1008
1009 DBG("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
1010 "[0x%x], parent %p (%s)\n",
1011 bus->self ? pci_name(bus->self) : "PHB",
1012 bus->number, i,
1013 (unsigned long long)res->start,
1014 (unsigned long long)res->end,
1015 (unsigned int)res->flags,
1016 pr, (pr && pr->name) ? pr->name : "nil");
1017
1018 if (pr && !(pr->flags & IORESOURCE_UNSET)) {
1019 if (request_resource(pr, res) == 0)
1020 continue;
1021 /*
1022 * Must be a conflict with an existing entry.
1023 * Move that entry (or entries) under the
1024 * bridge resource and try again.
1025 */
1026 if (reparent_resources(pr, res) == 0)
1027 continue;
1028 }
1029 printk(KERN_WARNING
1030 "PCI: Cannot allocate resource region "
1031 "%d of PCI bridge %d, will remap\n",
1032 i, bus->number);
1033clear_resource:
1034 res->flags = 0;
1035 }
1036 pcibios_allocate_bus_resources(&bus->children);
1037 }
1038}
1039
1040static inline void __devinit alloc_resource(struct pci_dev *dev, int idx)
1041{
1042 struct resource *pr, *r = &dev->resource[idx];
1043
1044 DBG("PCI: Allocating %s: Resource %d: %016llx..%016llx [%x]\n",
1045 pci_name(dev), idx,
1046 (unsigned long long)r->start,
1047 (unsigned long long)r->end,
1048 (unsigned int)r->flags);
1049
1050 pr = pci_find_parent_resource(dev, r);
1051 if (!pr || (pr->flags & IORESOURCE_UNSET) ||
1052 request_resource(pr, r) < 0) {
1053 printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
1054 " of device %s, will remap\n", idx, pci_name(dev));
1055 if (pr)
1056 DBG("PCI: parent is %p: %016llx-%016llx [%x]\n", pr,
1057 (unsigned long long)pr->start,
1058 (unsigned long long)pr->end,
1059 (unsigned int)pr->flags);
1060 /* We'll assign a new address later */
1061 r->flags |= IORESOURCE_UNSET;
1062 r->end -= r->start;
1063 r->start = 0;
1064 }
1065}
1066
1067static void __init pcibios_allocate_resources(int pass)
1068{
1069 struct pci_dev *dev = NULL;
1070 int idx, disabled;
1071 u16 command;
1072 struct resource *r;
1073
1074 for_each_pci_dev(dev) {
1075 pci_read_config_word(dev, PCI_COMMAND, &command);
1076 for (idx = 0; idx < 6; idx++) {
1077 r = &dev->resource[idx];
1078 if (r->parent) /* Already allocated */
1079 continue;
1080 if (!r->flags || (r->flags & IORESOURCE_UNSET))
1081 continue; /* Not assigned at all */
1082 if (r->flags & IORESOURCE_IO)
1083 disabled = !(command & PCI_COMMAND_IO);
1084 else
1085 disabled = !(command & PCI_COMMAND_MEMORY);
1086 if (pass == disabled)
1087 alloc_resource(dev, idx);
1088 }
1089 if (pass)
1090 continue;
1091 r = &dev->resource[PCI_ROM_RESOURCE];
1092 if (r->flags & IORESOURCE_ROM_ENABLE) {
1093 /* Turn the ROM off, leave the resource region,
1094 * but keep it unregistered.
1095 */
1096 u32 reg;
1097 DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
1098 r->flags &= ~IORESOURCE_ROM_ENABLE;
1099 pci_read_config_dword(dev, dev->rom_base_reg, &reg);
1100 pci_write_config_dword(dev, dev->rom_base_reg,
1101 reg & ~PCI_ROM_ADDRESS_ENABLE);
1102 }
1103 }
1104}
1105
1106void __init pcibios_resource_survey(void)
1107{
1108 /* Allocate and assign resources. If we re-assign everything, then
1109 * we skip the allocate phase
1110 */
1111 pcibios_allocate_bus_resources(&pci_root_buses);
1112
1113 if (!(ppc_pci_flags & PPC_PCI_REASSIGN_ALL_RSRC)) {
1114 pcibios_allocate_resources(0);
1115 pcibios_allocate_resources(1);
1116 }
1117
1118 if (!(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) {
1119 DBG("PCI: Assigning unassigned resouces...\n");
1120 pci_assign_unassigned_resources();
1121 }
1122
1123 /* Call machine dependent fixup */
1124 if (ppc_md.pcibios_fixup)
1125 ppc_md.pcibios_fixup();
1126}
1127
1128#ifdef CONFIG_HOTPLUG
1129/* This is used by the pSeries hotplug driver to allocate resource
1130 * of newly plugged busses. We can try to consolidate with the
1131 * rest of the code later, for now, keep it as-is
1132 */
1133void __devinit pcibios_claim_one_bus(struct pci_bus *bus)
1134{
1135 struct pci_dev *dev;
1136 struct pci_bus *child_bus;
1137
1138 list_for_each_entry(dev, &bus->devices, bus_list) {
1139 int i;
1140
1141 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
1142 struct resource *r = &dev->resource[i];
1143
1144 if (r->parent || !r->start || !r->flags)
1145 continue;
1146 pci_claim_resource(dev, i);
1147 }
1148 }
1149
1150 list_for_each_entry(child_bus, &bus->children, node)
1151 pcibios_claim_one_bus(child_bus);
1152}
1153EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
1154#endif /* CONFIG_HOTPLUG */
1155
1156int pcibios_enable_device(struct pci_dev *dev, int mask)
1157{
1158 u16 cmd, old_cmd;
1159 int idx;
1160 struct resource *r;
1161
1162 if (ppc_md.pcibios_enable_device_hook)
1163 if (ppc_md.pcibios_enable_device_hook(dev))
1164 return -EINVAL;
1165
1166 pci_read_config_word(dev, PCI_COMMAND, &cmd);
1167 old_cmd = cmd;
1168 for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
1169 /* Only set up the requested stuff */
1170 if (!(mask & (1 << idx)))
1171 continue;
1172 r = &dev->resource[idx];
1173 if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
1174 continue;
1175 if ((idx == PCI_ROM_RESOURCE) &&
1176 (!(r->flags & IORESOURCE_ROM_ENABLE)))
1177 continue;
1178 if (r->parent == NULL) {
1179 printk(KERN_ERR "PCI: Device %s not available because"
1180 " of resource collisions\n", pci_name(dev));
1181 return -EINVAL;
1182 }
1183 if (r->flags & IORESOURCE_IO)
1184 cmd |= PCI_COMMAND_IO;
1185 if (r->flags & IORESOURCE_MEM)
1186 cmd |= PCI_COMMAND_MEMORY;
1187 }
1188 if (cmd != old_cmd) {
1189 printk("PCI: Enabling device %s (%04x -> %04x)\n",
1190 pci_name(dev), old_cmd, cmd);
1191 pci_write_config_word(dev, PCI_COMMAND, cmd);
1192 }
1193 return 0;
1194}
1195
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 0e2bee46304c..88db4ffaf11c 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -13,6 +13,7 @@
13#include <linux/bootmem.h> 13#include <linux/bootmem.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/of.h>
16 17
17#include <asm/processor.h> 18#include <asm/processor.h>
18#include <asm/io.h> 19#include <asm/io.h>
@@ -32,19 +33,12 @@
32#endif 33#endif
33 34
34unsigned long isa_io_base = 0; 35unsigned long isa_io_base = 0;
35unsigned long isa_mem_base = 0;
36unsigned long pci_dram_offset = 0; 36unsigned long pci_dram_offset = 0;
37int pcibios_assign_bus_offset = 1; 37int pcibios_assign_bus_offset = 1;
38 38
39void pcibios_make_OF_bus_map(void); 39void pcibios_make_OF_bus_map(void);
40 40
41static int pci_relocate_bridge_resource(struct pci_bus *bus, int i);
42static int probe_resource(struct pci_bus *parent, struct resource *pr,
43 struct resource *res, struct resource **conflict);
44static void update_bridge_base(struct pci_bus *bus, int i);
45static void pcibios_fixup_resources(struct pci_dev* dev);
46static void fixup_broken_pcnet32(struct pci_dev* dev); 41static void fixup_broken_pcnet32(struct pci_dev* dev);
47static int reparent_resources(struct resource *parent, struct resource *res);
48static void fixup_cpc710_pci64(struct pci_dev* dev); 42static void fixup_cpc710_pci64(struct pci_dev* dev);
49#ifdef CONFIG_PPC_OF 43#ifdef CONFIG_PPC_OF
50static u8* pci_to_OF_bus_map; 44static u8* pci_to_OF_bus_map;
@@ -53,7 +47,7 @@ static u8* pci_to_OF_bus_map;
53/* By default, we don't re-assign bus numbers. We do this only on 47/* By default, we don't re-assign bus numbers. We do this only on
54 * some pmacs 48 * some pmacs
55 */ 49 */
56int pci_assign_all_buses; 50static int pci_assign_all_buses;
57 51
58LIST_HEAD(hose_list); 52LIST_HEAD(hose_list);
59 53
@@ -100,505 +94,6 @@ fixup_cpc710_pci64(struct pci_dev* dev)
100} 94}
101DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); 95DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
102 96
103static void
104pcibios_fixup_resources(struct pci_dev *dev)
105{
106 struct pci_controller* hose = (struct pci_controller *)dev->sysdata;
107 int i;
108 unsigned long offset;
109
110 if (!hose) {
111 printk(KERN_ERR "No hose for PCI dev %s!\n", pci_name(dev));
112 return;
113 }
114 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
115 struct resource *res = dev->resource + i;
116 if (!res->flags)
117 continue;
118 if (res->end == 0xffffffff) {
119 DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
120 pci_name(dev), i, (u64)res->start, (u64)res->end);
121 res->end -= res->start;
122 res->start = 0;
123 res->flags |= IORESOURCE_UNSET;
124 continue;
125 }
126 offset = 0;
127 if (res->flags & IORESOURCE_MEM) {
128 offset = hose->pci_mem_offset;
129 } else if (res->flags & IORESOURCE_IO) {
130 offset = (unsigned long) hose->io_base_virt
131 - isa_io_base;
132 }
133 if (offset != 0) {
134 res->start += offset;
135 res->end += offset;
136 DBG("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
137 i, res->flags, pci_name(dev),
138 (u64)res->start - offset, (u64)res->start);
139 }
140 }
141
142 /* Call machine specific resource fixup */
143 if (ppc_md.pcibios_fixup_resources)
144 ppc_md.pcibios_fixup_resources(dev);
145}
146DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
147
148void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
149 struct resource *res)
150{
151 unsigned long offset = 0;
152 struct pci_controller *hose = dev->sysdata;
153
154 if (hose && res->flags & IORESOURCE_IO)
155 offset = (unsigned long)hose->io_base_virt - isa_io_base;
156 else if (hose && res->flags & IORESOURCE_MEM)
157 offset = hose->pci_mem_offset;
158 region->start = res->start - offset;
159 region->end = res->end - offset;
160}
161EXPORT_SYMBOL(pcibios_resource_to_bus);
162
163void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
164 struct pci_bus_region *region)
165{
166 unsigned long offset = 0;
167 struct pci_controller *hose = dev->sysdata;
168
169 if (hose && res->flags & IORESOURCE_IO)
170 offset = (unsigned long)hose->io_base_virt - isa_io_base;
171 else if (hose && res->flags & IORESOURCE_MEM)
172 offset = hose->pci_mem_offset;
173 res->start = region->start + offset;
174 res->end = region->end + offset;
175}
176EXPORT_SYMBOL(pcibios_bus_to_resource);
177
178/*
179 * We need to avoid collisions with `mirrored' VGA ports
180 * and other strange ISA hardware, so we always want the
181 * addresses to be allocated in the 0x000-0x0ff region
182 * modulo 0x400.
183 *
184 * Why? Because some silly external IO cards only decode
185 * the low 10 bits of the IO address. The 0x00-0xff region
186 * is reserved for motherboard devices that decode all 16
187 * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
188 * but we want to try to avoid allocating at 0x2900-0x2bff
189 * which might have be mirrored at 0x0100-0x03ff..
190 */
191void pcibios_align_resource(void *data, struct resource *res,
192 resource_size_t size, resource_size_t align)
193{
194 struct pci_dev *dev = data;
195
196 if (res->flags & IORESOURCE_IO) {
197 resource_size_t start = res->start;
198
199 if (size > 0x100) {
200 printk(KERN_ERR "PCI: I/O Region %s/%d too large"
201 " (%lld bytes)\n", pci_name(dev),
202 dev->resource - res, (unsigned long long)size);
203 }
204
205 if (start & 0x300) {
206 start = (start + 0x3ff) & ~0x3ff;
207 res->start = start;
208 }
209 }
210}
211EXPORT_SYMBOL(pcibios_align_resource);
212
213/*
214 * Handle resources of PCI devices. If the world were perfect, we could
215 * just allocate all the resource regions and do nothing more. It isn't.
216 * On the other hand, we cannot just re-allocate all devices, as it would
217 * require us to know lots of host bridge internals. So we attempt to
218 * keep as much of the original configuration as possible, but tweak it
219 * when it's found to be wrong.
220 *
221 * Known BIOS problems we have to work around:
222 * - I/O or memory regions not configured
223 * - regions configured, but not enabled in the command register
224 * - bogus I/O addresses above 64K used
225 * - expansion ROMs left enabled (this may sound harmless, but given
226 * the fact the PCI specs explicitly allow address decoders to be
227 * shared between expansion ROMs and other resource regions, it's
228 * at least dangerous)
229 *
230 * Our solution:
231 * (1) Allocate resources for all buses behind PCI-to-PCI bridges.
232 * This gives us fixed barriers on where we can allocate.
233 * (2) Allocate resources for all enabled devices. If there is
234 * a collision, just mark the resource as unallocated. Also
235 * disable expansion ROMs during this step.
236 * (3) Try to allocate resources for disabled devices. If the
237 * resources were assigned correctly, everything goes well,
238 * if they weren't, they won't disturb allocation of other
239 * resources.
240 * (4) Assign new addresses to resources which were either
241 * not configured at all or misconfigured. If explicitly
242 * requested by the user, configure expansion ROM address
243 * as well.
244 */
245
246static void __init
247pcibios_allocate_bus_resources(struct list_head *bus_list)
248{
249 struct pci_bus *bus;
250 int i;
251 struct resource *res, *pr;
252
253 /* Depth-First Search on bus tree */
254 list_for_each_entry(bus, bus_list, node) {
255 for (i = 0; i < 4; ++i) {
256 if ((res = bus->resource[i]) == NULL || !res->flags
257 || res->start > res->end)
258 continue;
259 if (bus->parent == NULL)
260 pr = (res->flags & IORESOURCE_IO)?
261 &ioport_resource: &iomem_resource;
262 else {
263 pr = pci_find_parent_resource(bus->self, res);
264 if (pr == res) {
265 /* this happens when the generic PCI
266 * code (wrongly) decides that this
267 * bridge is transparent -- paulus
268 */
269 continue;
270 }
271 }
272
273 DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
274 (u64)res->start, (u64)res->end, res->flags, pr);
275 if (pr) {
276 if (request_resource(pr, res) == 0)
277 continue;
278 /*
279 * Must be a conflict with an existing entry.
280 * Move that entry (or entries) under the
281 * bridge resource and try again.
282 */
283 if (reparent_resources(pr, res) == 0)
284 continue;
285 }
286 printk(KERN_ERR "PCI: Cannot allocate resource region "
287 "%d of PCI bridge %d\n", i, bus->number);
288 if (pci_relocate_bridge_resource(bus, i))
289 bus->resource[i] = NULL;
290 }
291 pcibios_allocate_bus_resources(&bus->children);
292 }
293}
294
295/*
296 * Reparent resource children of pr that conflict with res
297 * under res, and make res replace those children.
298 */
299static int __init
300reparent_resources(struct resource *parent, struct resource *res)
301{
302 struct resource *p, **pp;
303 struct resource **firstpp = NULL;
304
305 for (pp = &parent->child; (p = *pp) != NULL; pp = &p->sibling) {
306 if (p->end < res->start)
307 continue;
308 if (res->end < p->start)
309 break;
310 if (p->start < res->start || p->end > res->end)
311 return -1; /* not completely contained */
312 if (firstpp == NULL)
313 firstpp = pp;
314 }
315 if (firstpp == NULL)
316 return -1; /* didn't find any conflicting entries? */
317 res->parent = parent;
318 res->child = *firstpp;
319 res->sibling = *pp;
320 *firstpp = res;
321 *pp = NULL;
322 for (p = res->child; p != NULL; p = p->sibling) {
323 p->parent = res;
324 DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
325 p->name, (u64)p->start, (u64)p->end, res->name);
326 }
327 return 0;
328}
329
330/*
331 * A bridge has been allocated a range which is outside the range
332 * of its parent bridge, so it needs to be moved.
333 */
334static int __init
335pci_relocate_bridge_resource(struct pci_bus *bus, int i)
336{
337 struct resource *res, *pr, *conflict;
338 unsigned long try, size;
339 int j;
340 struct pci_bus *parent = bus->parent;
341
342 if (parent == NULL) {
343 /* shouldn't ever happen */
344 printk(KERN_ERR "PCI: can't move host bridge resource\n");
345 return -1;
346 }
347 res = bus->resource[i];
348 if (res == NULL)
349 return -1;
350 pr = NULL;
351 for (j = 0; j < 4; j++) {
352 struct resource *r = parent->resource[j];
353 if (!r)
354 continue;
355 if ((res->flags ^ r->flags) & (IORESOURCE_IO | IORESOURCE_MEM))
356 continue;
357 if (!((res->flags ^ r->flags) & IORESOURCE_PREFETCH)) {
358 pr = r;
359 break;
360 }
361 if (res->flags & IORESOURCE_PREFETCH)
362 pr = r;
363 }
364 if (pr == NULL)
365 return -1;
366 size = res->end - res->start;
367 if (pr->start > pr->end || size > pr->end - pr->start)
368 return -1;
369 try = pr->end;
370 for (;;) {
371 res->start = try - size;
372 res->end = try;
373 if (probe_resource(bus->parent, pr, res, &conflict) == 0)
374 break;
375 if (conflict->start <= pr->start + size)
376 return -1;
377 try = conflict->start - 1;
378 }
379 if (request_resource(pr, res)) {
380 DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
381 (u64)res->start, (u64)res->end);
382 return -1; /* "can't happen" */
383 }
384 update_bridge_base(bus, i);
385 printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
386 bus->number, i, (unsigned long long)res->start,
387 (unsigned long long)res->end);
388 return 0;
389}
390
391static int __init
392probe_resource(struct pci_bus *parent, struct resource *pr,
393 struct resource *res, struct resource **conflict)
394{
395 struct pci_bus *bus;
396 struct pci_dev *dev;
397 struct resource *r;
398 int i;
399
400 for (r = pr->child; r != NULL; r = r->sibling) {
401 if (r->end >= res->start && res->end >= r->start) {
402 *conflict = r;
403 return 1;
404 }
405 }
406 list_for_each_entry(bus, &parent->children, node) {
407 for (i = 0; i < 4; ++i) {
408 if ((r = bus->resource[i]) == NULL)
409 continue;
410 if (!r->flags || r->start > r->end || r == res)
411 continue;
412 if (pci_find_parent_resource(bus->self, r) != pr)
413 continue;
414 if (r->end >= res->start && res->end >= r->start) {
415 *conflict = r;
416 return 1;
417 }
418 }
419 }
420 list_for_each_entry(dev, &parent->devices, bus_list) {
421 for (i = 0; i < 6; ++i) {
422 r = &dev->resource[i];
423 if (!r->flags || (r->flags & IORESOURCE_UNSET))
424 continue;
425 if (pci_find_parent_resource(dev, r) != pr)
426 continue;
427 if (r->end >= res->start && res->end >= r->start) {
428 *conflict = r;
429 return 1;
430 }
431 }
432 }
433 return 0;
434}
435
436void __init
437update_bridge_resource(struct pci_dev *dev, struct resource *res)
438{
439 u8 io_base_lo, io_limit_lo;
440 u16 mem_base, mem_limit;
441 u16 cmd;
442 unsigned long start, end, off;
443 struct pci_controller *hose = dev->sysdata;
444
445 if (!hose) {
446 printk("update_bridge_base: no hose?\n");
447 return;
448 }
449 pci_read_config_word(dev, PCI_COMMAND, &cmd);
450 pci_write_config_word(dev, PCI_COMMAND,
451 cmd & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY));
452 if (res->flags & IORESOURCE_IO) {
453 off = (unsigned long) hose->io_base_virt - isa_io_base;
454 start = res->start - off;
455 end = res->end - off;
456 io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK;
457 io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK;
458 if (end > 0xffff)
459 io_base_lo |= PCI_IO_RANGE_TYPE_32;
460 else
461 io_base_lo |= PCI_IO_RANGE_TYPE_16;
462 pci_write_config_word(dev, PCI_IO_BASE_UPPER16,
463 start >> 16);
464 pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16,
465 end >> 16);
466 pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo);
467 pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);
468
469 } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
470 == IORESOURCE_MEM) {
471 off = hose->pci_mem_offset;
472 mem_base = ((res->start - off) >> 16) & PCI_MEMORY_RANGE_MASK;
473 mem_limit = ((res->end - off) >> 16) & PCI_MEMORY_RANGE_MASK;
474 pci_write_config_word(dev, PCI_MEMORY_BASE, mem_base);
475 pci_write_config_word(dev, PCI_MEMORY_LIMIT, mem_limit);
476
477 } else if ((res->flags & (IORESOURCE_MEM | IORESOURCE_PREFETCH))
478 == (IORESOURCE_MEM | IORESOURCE_PREFETCH)) {
479 off = hose->pci_mem_offset;
480 mem_base = ((res->start - off) >> 16) & PCI_PREF_RANGE_MASK;
481 mem_limit = ((res->end - off) >> 16) & PCI_PREF_RANGE_MASK;
482 pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, mem_base);
483 pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, mem_limit);
484
485 } else {
486 DBG(KERN_ERR "PCI: ugh, bridge %s res has flags=%lx\n",
487 pci_name(dev), res->flags);
488 }
489 pci_write_config_word(dev, PCI_COMMAND, cmd);
490}
491
492static void __init
493update_bridge_base(struct pci_bus *bus, int i)
494{
495 struct resource *res = bus->resource[i];
496 struct pci_dev *dev = bus->self;
497 update_bridge_resource(dev, res);
498}
499
500static inline void alloc_resource(struct pci_dev *dev, int idx)
501{
502 struct resource *pr, *r = &dev->resource[idx];
503
504 DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
505 pci_name(dev), idx, (u64)r->start, (u64)r->end, r->flags);
506 pr = pci_find_parent_resource(dev, r);
507 if (!pr || request_resource(pr, r) < 0) {
508 printk(KERN_ERR "PCI: Cannot allocate resource region %d"
509 " of device %s\n", idx, pci_name(dev));
510 if (pr)
511 DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
512 pr, (u64)pr->start, (u64)pr->end, pr->flags);
513 /* We'll assign a new address later */
514 r->flags |= IORESOURCE_UNSET;
515 r->end -= r->start;
516 r->start = 0;
517 }
518}
519
520static void __init
521pcibios_allocate_resources(int pass)
522{
523 struct pci_dev *dev = NULL;
524 int idx, disabled;
525 u16 command;
526 struct resource *r;
527
528 for_each_pci_dev(dev) {
529 pci_read_config_word(dev, PCI_COMMAND, &command);
530 for (idx = 0; idx < 6; idx++) {
531 r = &dev->resource[idx];
532 if (r->parent) /* Already allocated */
533 continue;
534 if (!r->flags || (r->flags & IORESOURCE_UNSET))
535 continue; /* Not assigned at all */
536 if (r->flags & IORESOURCE_IO)
537 disabled = !(command & PCI_COMMAND_IO);
538 else
539 disabled = !(command & PCI_COMMAND_MEMORY);
540 if (pass == disabled)
541 alloc_resource(dev, idx);
542 }
543 if (pass)
544 continue;
545 r = &dev->resource[PCI_ROM_RESOURCE];
546 if (r->flags & IORESOURCE_ROM_ENABLE) {
547 /* Turn the ROM off, leave the resource region, but keep it unregistered. */
548 u32 reg;
549 DBG("PCI: Switching off ROM of %s\n", pci_name(dev));
550 r->flags &= ~IORESOURCE_ROM_ENABLE;
551 pci_read_config_dword(dev, dev->rom_base_reg, &reg);
552 pci_write_config_dword(dev, dev->rom_base_reg,
553 reg & ~PCI_ROM_ADDRESS_ENABLE);
554 }
555 }
556}
557
558static void __init
559pcibios_assign_resources(void)
560{
561 struct pci_dev *dev = NULL;
562 int idx;
563 struct resource *r;
564
565 for_each_pci_dev(dev) {
566 int class = dev->class >> 8;
567
568 /* Don't touch classless devices and host bridges */
569 if (!class || class == PCI_CLASS_BRIDGE_HOST)
570 continue;
571
572 for (idx = 0; idx < 6; idx++) {
573 r = &dev->resource[idx];
574
575 /*
576 * We shall assign a new address to this resource,
577 * either because the BIOS (sic) forgot to do so
578 * or because we have decided the old address was
579 * unusable for some reason.
580 */
581 if ((r->flags & IORESOURCE_UNSET) && r->end &&
582 (!ppc_md.pcibios_enable_device_hook ||
583 !ppc_md.pcibios_enable_device_hook(dev, 1))) {
584 int rc;
585
586 r->flags &= ~IORESOURCE_UNSET;
587 rc = pci_assign_resource(dev, idx);
588 BUG_ON(rc);
589 }
590 }
591
592#if 0 /* don't assign ROMs */
593 r = &dev->resource[PCI_ROM_RESOURCE];
594 r->end -= r->start;
595 r->start = 0;
596 if (r->end)
597 pci_assign_resource(dev, PCI_ROM_RESOURCE);
598#endif
599 }
600}
601
602#ifdef CONFIG_PPC_OF 97#ifdef CONFIG_PPC_OF
603/* 98/*
604 * Functions below are used on OpenFirmware machines. 99 * Functions below are used on OpenFirmware machines.
@@ -619,7 +114,7 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
619 } else 114 } else
620 pci_to_OF_bus_map[pci_bus] = bus_range[0]; 115 pci_to_OF_bus_map[pci_bus] = bus_range[0];
621 116
622 for (node=node->child; node != 0;node = node->sibling) { 117 for_each_child_of_node(node, node) {
623 struct pci_dev* dev; 118 struct pci_dev* dev;
624 const unsigned int *class_code, *reg; 119 const unsigned int *class_code, *reg;
625 120
@@ -662,8 +157,8 @@ pcibios_make_OF_bus_map(void)
662 157
663 /* For each hose, we begin searching bridges */ 158 /* For each hose, we begin searching bridges */
664 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 159 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
665 struct device_node* node; 160 struct device_node* node = hose->dn;
666 node = (struct device_node *)hose->arch_data; 161
667 if (!node) 162 if (!node)
668 continue; 163 continue;
669 make_one_node_map(node, hose->first_busno); 164 make_one_node_map(node, hose->first_busno);
@@ -688,15 +183,18 @@ pcibios_make_OF_bus_map(void)
688typedef int (*pci_OF_scan_iterator)(struct device_node* node, void* data); 183typedef int (*pci_OF_scan_iterator)(struct device_node* node, void* data);
689 184
690static struct device_node* 185static struct device_node*
691scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void* data) 186scan_OF_pci_childs(struct device_node *parent, pci_OF_scan_iterator filter, void* data)
692{ 187{
188 struct device_node *node;
693 struct device_node* sub_node; 189 struct device_node* sub_node;
694 190
695 for (; node != 0;node = node->sibling) { 191 for_each_child_of_node(parent, node) {
696 const unsigned int *class_code; 192 const unsigned int *class_code;
697 193
698 if (filter(node, data)) 194 if (filter(node, data)) {
195 of_node_put(node);
699 return node; 196 return node;
197 }
700 198
701 /* For PCI<->PCI bridges or CardBus bridges, we go down 199 /* For PCI<->PCI bridges or CardBus bridges, we go down
702 * Note: some OFs create a parent node "multifunc-device" as 200 * Note: some OFs create a parent node "multifunc-device" as
@@ -708,9 +206,11 @@ scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void*
708 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) && 206 (*class_code >> 8) != PCI_CLASS_BRIDGE_CARDBUS)) &&
709 strcmp(node->name, "multifunc-device")) 207 strcmp(node->name, "multifunc-device"))
710 continue; 208 continue;
711 sub_node = scan_OF_pci_childs(node->child, filter, data); 209 sub_node = scan_OF_pci_childs(node, filter, data);
712 if (sub_node) 210 if (sub_node) {
211 of_node_put(node);
713 return sub_node; 212 return sub_node;
213 }
714 } 214 }
715 return NULL; 215 return NULL;
716} 216}
@@ -718,11 +218,11 @@ scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void*
718static struct device_node *scan_OF_for_pci_dev(struct device_node *parent, 218static struct device_node *scan_OF_for_pci_dev(struct device_node *parent,
719 unsigned int devfn) 219 unsigned int devfn)
720{ 220{
721 struct device_node *np = NULL; 221 struct device_node *np;
722 const u32 *reg; 222 const u32 *reg;
723 unsigned int psize; 223 unsigned int psize;
724 224
725 while ((np = of_get_next_child(parent, np)) != NULL) { 225 for_each_child_of_node(parent, np) {
726 reg = of_get_property(np, "reg", &psize); 226 reg = of_get_property(np, "reg", &psize);
727 if (reg == NULL || psize < 4) 227 if (reg == NULL || psize < 4)
728 continue; 228 continue;
@@ -742,7 +242,7 @@ static struct device_node *scan_OF_for_pci_bus(struct pci_bus *bus)
742 struct pci_controller *hose = pci_bus_to_host(bus); 242 struct pci_controller *hose = pci_bus_to_host(bus);
743 if (hose == NULL) 243 if (hose == NULL)
744 return NULL; 244 return NULL;
745 return of_node_get(hose->arch_data); 245 return of_node_get(hose->dn);
746 } 246 }
747 247
748 /* not a root bus, we need to get our parent */ 248 /* not a root bus, we need to get our parent */
@@ -812,9 +312,9 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
812 return -ENODEV; 312 return -ENODEV;
813 /* Make sure it's really a PCI device */ 313 /* Make sure it's really a PCI device */
814 hose = pci_find_hose_for_OF_device(node); 314 hose = pci_find_hose_for_OF_device(node);
815 if (!hose || !hose->arch_data) 315 if (!hose || !hose->dn)
816 return -ENODEV; 316 return -ENODEV;
817 if (!scan_OF_pci_childs(((struct device_node*)hose->arch_data)->child, 317 if (!scan_OF_pci_childs(hose->dn,
818 find_OF_pci_device_filter, (void *)node)) 318 find_OF_pci_device_filter, (void *)node))
819 return -ENODEV; 319 return -ENODEV;
820 reg = of_get_property(node, "reg", NULL); 320 reg = of_get_property(node, "reg", NULL);
@@ -843,120 +343,6 @@ pci_device_from_OF_node(struct device_node* node, u8* bus, u8* devfn)
843} 343}
844EXPORT_SYMBOL(pci_device_from_OF_node); 344EXPORT_SYMBOL(pci_device_from_OF_node);
845 345
846void __init
847pci_process_bridge_OF_ranges(struct pci_controller *hose,
848 struct device_node *dev, int primary)
849{
850 static unsigned int static_lc_ranges[256] __initdata;
851 const unsigned int *dt_ranges;
852 unsigned int *lc_ranges, *ranges, *prev, size;
853 int rlen = 0, orig_rlen;
854 int memno = 0;
855 struct resource *res;
856 int np, na = of_n_addr_cells(dev);
857 np = na + 5;
858
859 /* First we try to merge ranges to fix a problem with some pmacs
860 * that can have more than 3 ranges, fortunately using contiguous
861 * addresses -- BenH
862 */
863 dt_ranges = of_get_property(dev, "ranges", &rlen);
864 if (!dt_ranges)
865 return;
866 /* Sanity check, though hopefully that never happens */
867 if (rlen > sizeof(static_lc_ranges)) {
868 printk(KERN_WARNING "OF ranges property too large !\n");
869 rlen = sizeof(static_lc_ranges);
870 }
871 lc_ranges = static_lc_ranges;
872 memcpy(lc_ranges, dt_ranges, rlen);
873 orig_rlen = rlen;
874
875 /* Let's work on a copy of the "ranges" property instead of damaging
876 * the device-tree image in memory
877 */
878 ranges = lc_ranges;
879 prev = NULL;
880 while ((rlen -= np * sizeof(unsigned int)) >= 0) {
881 if (prev) {
882 if (prev[0] == ranges[0] && prev[1] == ranges[1] &&
883 (prev[2] + prev[na+4]) == ranges[2] &&
884 (prev[na+2] + prev[na+4]) == ranges[na+2]) {
885 prev[na+4] += ranges[na+4];
886 ranges[0] = 0;
887 ranges += np;
888 continue;
889 }
890 }
891 prev = ranges;
892 ranges += np;
893 }
894
895 /*
896 * The ranges property is laid out as an array of elements,
897 * each of which comprises:
898 * cells 0 - 2: a PCI address
899 * cells 3 or 3+4: a CPU physical address
900 * (size depending on dev->n_addr_cells)
901 * cells 4+5 or 5+6: the size of the range
902 */
903 ranges = lc_ranges;
904 rlen = orig_rlen;
905 while (ranges && (rlen -= np * sizeof(unsigned int)) >= 0) {
906 res = NULL;
907 size = ranges[na+4];
908 switch ((ranges[0] >> 24) & 0x3) {
909 case 1: /* I/O space */
910 if (ranges[2] != 0)
911 break;
912 hose->io_base_phys = ranges[na+2];
913 /* limit I/O space to 16MB */
914 if (size > 0x01000000)
915 size = 0x01000000;
916 hose->io_base_virt = ioremap(ranges[na+2], size);
917 if (primary)
918 isa_io_base = (unsigned long) hose->io_base_virt;
919 res = &hose->io_resource;
920 res->flags = IORESOURCE_IO;
921 res->start = ranges[2];
922 DBG("PCI: IO 0x%llx -> 0x%llx\n",
923 (u64)res->start, (u64)res->start + size - 1);
924 break;
925 case 2: /* memory space */
926 memno = 0;
927 if (ranges[1] == 0 && ranges[2] == 0
928 && ranges[na+4] <= (16 << 20)) {
929 /* 1st 16MB, i.e. ISA memory area */
930 if (primary)
931 isa_mem_base = ranges[na+2];
932 memno = 1;
933 }
934 while (memno < 3 && hose->mem_resources[memno].flags)
935 ++memno;
936 if (memno == 0)
937 hose->pci_mem_offset = ranges[na+2] - ranges[2];
938 if (memno < 3) {
939 res = &hose->mem_resources[memno];
940 res->flags = IORESOURCE_MEM;
941 if(ranges[0] & 0x40000000)
942 res->flags |= IORESOURCE_PREFETCH;
943 res->start = ranges[na+2];
944 DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
945 (u64)res->start, (u64)res->start + size - 1);
946 }
947 break;
948 }
949 if (res != NULL) {
950 res->name = dev->full_name;
951 res->end = res->start + size - 1;
952 res->parent = NULL;
953 res->sibling = NULL;
954 res->child = NULL;
955 }
956 ranges += np;
957 }
958}
959
960/* We create the "pci-OF-bus-map" property now so it appears in the 346/* We create the "pci-OF-bus-map" property now so it appears in the
961 * /proc device tree 347 * /proc device tree
962 */ 348 */
@@ -986,219 +372,7 @@ void pcibios_make_OF_bus_map(void)
986} 372}
987#endif /* CONFIG_PPC_OF */ 373#endif /* CONFIG_PPC_OF */
988 374
989#ifdef CONFIG_PPC_PMAC 375static int __init pcibios_init(void)
990/*
991 * This set of routines checks for PCI<->PCI bridges that have closed
992 * IO resources and have child devices. It tries to re-open an IO
993 * window on them.
994 *
995 * This is a _temporary_ fix to workaround a problem with Apple's OF
996 * closing IO windows on P2P bridges when the OF drivers of cards
997 * below this bridge don't claim any IO range (typically ATI or
998 * Adaptec).
999 *
1000 * A more complete fix would be to use drivers/pci/setup-bus.c, which
1001 * involves a working pcibios_fixup_pbus_ranges(), some more care about
1002 * ordering when creating the host bus resources, and maybe a few more
1003 * minor tweaks
1004 */
1005
1006/* Initialize bridges with base/limit values we have collected */
1007static void __init
1008do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga)
1009{
1010 struct pci_dev *bridge = bus->self;
1011 struct pci_controller* hose = (struct pci_controller *)bridge->sysdata;
1012 u32 l;
1013 u16 w;
1014 struct resource res;
1015
1016 if (bus->resource[0] == NULL)
1017 return;
1018 res = *(bus->resource[0]);
1019
1020 DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
1021 res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
1022 res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
1023 DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
1024
1025 /* Set up the top and bottom of the PCI I/O segment for this bus. */
1026 pci_read_config_dword(bridge, PCI_IO_BASE, &l);
1027 l &= 0xffff000f;
1028 l |= (res.start >> 8) & 0x00f0;
1029 l |= res.end & 0xf000;
1030 pci_write_config_dword(bridge, PCI_IO_BASE, l);
1031
1032 if ((l & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) {
1033 l = (res.start >> 16) | (res.end & 0xffff0000);
1034 pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, l);
1035 }
1036
1037 pci_read_config_word(bridge, PCI_COMMAND, &w);
1038 w |= PCI_COMMAND_IO;
1039 pci_write_config_word(bridge, PCI_COMMAND, w);
1040
1041#if 0 /* Enabling this causes XFree 4.2.0 to hang during PCI probe */
1042 if (enable_vga) {
1043 pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &w);
1044 w |= PCI_BRIDGE_CTL_VGA;
1045 pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, w);
1046 }
1047#endif
1048}
1049
1050/* This function is pretty basic and actually quite broken for the
1051 * general case, it's enough for us right now though. It's supposed
1052 * to tell us if we need to open an IO range at all or not and what
1053 * size.
1054 */
1055static int __init
1056check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga)
1057{
1058 struct pci_dev *dev;
1059 int i;
1060 int rc = 0;
1061
1062#define push_end(res, mask) do { \
1063 BUG_ON((mask+1) & mask); \
1064 res->end = (res->end + mask) | mask; \
1065} while (0)
1066
1067 list_for_each_entry(dev, &bus->devices, bus_list) {
1068 u16 class = dev->class >> 8;
1069
1070 if (class == PCI_CLASS_DISPLAY_VGA ||
1071 class == PCI_CLASS_NOT_DEFINED_VGA)
1072 *found_vga = 1;
1073 if (class >> 8 == PCI_BASE_CLASS_BRIDGE && dev->subordinate)
1074 rc |= check_for_io_childs(dev->subordinate, res, found_vga);
1075 if (class == PCI_CLASS_BRIDGE_CARDBUS)
1076 push_end(res, 0xfff);
1077
1078 for (i=0; i<PCI_NUM_RESOURCES; i++) {
1079 struct resource *r;
1080 unsigned long r_size;
1081
1082 if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI
1083 && i >= PCI_BRIDGE_RESOURCES)
1084 continue;
1085 r = &dev->resource[i];
1086 r_size = r->end - r->start;
1087 if (r_size < 0xfff)
1088 r_size = 0xfff;
1089 if (r->flags & IORESOURCE_IO && (r_size) != 0) {
1090 rc = 1;
1091 push_end(res, r_size);
1092 }
1093 }
1094 }
1095
1096 return rc;
1097}
1098
1099/* Here we scan all P2P bridges of a given level that have a closed
1100 * IO window. Note that the test for the presence of a VGA card should
1101 * be improved to take into account already configured P2P bridges,
1102 * currently, we don't see them and might end up configuring 2 bridges
1103 * with VGA pass through enabled
1104 */
1105static void __init
1106do_fixup_p2p_level(struct pci_bus *bus)
1107{
1108 struct pci_bus *b;
1109 int i, parent_io;
1110 int has_vga = 0;
1111
1112 for (parent_io=0; parent_io<4; parent_io++)
1113 if (bus->resource[parent_io]
1114 && bus->resource[parent_io]->flags & IORESOURCE_IO)
1115 break;
1116 if (parent_io >= 4)
1117 return;
1118
1119 list_for_each_entry(b, &bus->children, node) {
1120 struct pci_dev *d = b->self;
1121 struct pci_controller* hose = (struct pci_controller *)d->sysdata;
1122 struct resource *res = b->resource[0];
1123 struct resource tmp_res;
1124 unsigned long max;
1125 int found_vga = 0;
1126
1127 memset(&tmp_res, 0, sizeof(tmp_res));
1128 tmp_res.start = bus->resource[parent_io]->start;
1129
1130 /* We don't let low addresses go through that closed P2P bridge, well,
1131 * that may not be necessary but I feel safer that way
1132 */
1133 if (tmp_res.start == 0)
1134 tmp_res.start = 0x1000;
1135
1136 if (!list_empty(&b->devices) && res && res->flags == 0 &&
1137 res != bus->resource[parent_io] &&
1138 (d->class >> 8) == PCI_CLASS_BRIDGE_PCI &&
1139 check_for_io_childs(b, &tmp_res, &found_vga)) {
1140 u8 io_base_lo;
1141
1142 printk(KERN_INFO "Fixing up IO bus %s\n", b->name);
1143
1144 if (found_vga) {
1145 if (has_vga) {
1146 printk(KERN_WARNING "Skipping VGA, already active"
1147 " on bus segment\n");
1148 found_vga = 0;
1149 } else
1150 has_vga = 1;
1151 }
1152 pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo);
1153
1154 if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32)
1155 max = ((unsigned long) hose->io_base_virt
1156 - isa_io_base) + 0xffffffff;
1157 else
1158 max = ((unsigned long) hose->io_base_virt
1159 - isa_io_base) + 0xffff;
1160
1161 *res = tmp_res;
1162 res->flags = IORESOURCE_IO;
1163 res->name = b->name;
1164
1165 /* Find a resource in the parent where we can allocate */
1166 for (i = 0 ; i < 4; i++) {
1167 struct resource *r = bus->resource[i];
1168 if (!r)
1169 continue;
1170 if ((r->flags & IORESOURCE_IO) == 0)
1171 continue;
1172 DBG("Trying to allocate from %016llx, size %016llx from parent"
1173 " res %d: %016llx -> %016llx\n",
1174 res->start, res->end, i, r->start, r->end);
1175
1176 if (allocate_resource(r, res, res->end + 1, res->start, max,
1177 res->end + 1, NULL, NULL) < 0) {
1178 DBG("Failed !\n");
1179 continue;
1180 }
1181 do_update_p2p_io_resource(b, found_vga);
1182 break;
1183 }
1184 }
1185 do_fixup_p2p_level(b);
1186 }
1187}
1188
1189static void
1190pcibios_fixup_p2p_bridges(void)
1191{
1192 struct pci_bus *b;
1193
1194 list_for_each_entry(b, &pci_root_buses, node)
1195 do_fixup_p2p_level(b);
1196}
1197
1198#endif /* CONFIG_PPC_PMAC */
1199
1200static int __init
1201pcibios_init(void)
1202{ 376{
1203 struct pci_controller *hose, *tmp; 377 struct pci_controller *hose, *tmp;
1204 struct pci_bus *bus; 378 struct pci_bus *bus;
@@ -1206,6 +380,9 @@ pcibios_init(void)
1206 380
1207 printk(KERN_INFO "PCI: Probing PCI hardware\n"); 381 printk(KERN_INFO "PCI: Probing PCI hardware\n");
1208 382
383 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
384 pci_assign_all_buses = 1;
385
1209 /* Scan all of the recorded PCI controllers. */ 386 /* Scan all of the recorded PCI controllers. */
1210 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 387 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
1211 if (pci_assign_all_buses) 388 if (pci_assign_all_buses)
@@ -1213,9 +390,10 @@ pcibios_init(void)
1213 hose->last_busno = 0xff; 390 hose->last_busno = 0xff;
1214 bus = pci_scan_bus_parented(hose->parent, hose->first_busno, 391 bus = pci_scan_bus_parented(hose->parent, hose->first_busno,
1215 hose->ops, hose); 392 hose->ops, hose);
1216 if (bus) 393 if (bus) {
1217 pci_bus_add_devices(bus); 394 pci_bus_add_devices(bus);
1218 hose->last_busno = bus->subordinate; 395 hose->last_busno = bus->subordinate;
396 }
1219 if (pci_assign_all_buses || next_busno <= hose->last_busno) 397 if (pci_assign_all_buses || next_busno <= hose->last_busno)
1220 next_busno = hose->last_busno + pcibios_assign_bus_offset; 398 next_busno = hose->last_busno + pcibios_assign_bus_offset;
1221 } 399 }
@@ -1228,18 +406,8 @@ pcibios_init(void)
1228 if (pci_assign_all_buses && have_of) 406 if (pci_assign_all_buses && have_of)
1229 pcibios_make_OF_bus_map(); 407 pcibios_make_OF_bus_map();
1230 408
1231 /* Call machine dependent fixup */ 409 /* Call common code to handle resource allocation */
1232 if (ppc_md.pcibios_fixup) 410 pcibios_resource_survey();
1233 ppc_md.pcibios_fixup();
1234
1235 /* Allocate and assign resources */
1236 pcibios_allocate_bus_resources(&pci_root_buses);
1237 pcibios_allocate_resources(0);
1238 pcibios_allocate_resources(1);
1239#ifdef CONFIG_PPC_PMAC
1240 pcibios_fixup_p2p_bridges();
1241#endif /* CONFIG_PPC_PMAC */
1242 pcibios_assign_resources();
1243 411
1244 /* Call machine dependent post-init code */ 412 /* Call machine dependent post-init code */
1245 if (ppc_md.pcibios_after_init) 413 if (ppc_md.pcibios_after_init)
@@ -1250,14 +418,14 @@ pcibios_init(void)
1250 418
1251subsys_initcall(pcibios_init); 419subsys_initcall(pcibios_init);
1252 420
1253void pcibios_fixup_bus(struct pci_bus *bus) 421void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
1254{ 422{
1255 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 423 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
1256 unsigned long io_offset; 424 unsigned long io_offset;
1257 struct resource *res; 425 struct resource *res;
1258 struct pci_dev *dev;
1259 int i; 426 int i;
1260 427
428 /* Hookup PHB resources */
1261 io_offset = (unsigned long)hose->io_base_virt - isa_io_base; 429 io_offset = (unsigned long)hose->io_base_virt - isa_io_base;
1262 if (bus->parent == NULL) { 430 if (bus->parent == NULL) {
1263 /* This is a host bridge - fill in its resources */ 431 /* This is a host bridge - fill in its resources */
@@ -1272,8 +440,8 @@ void pcibios_fixup_bus(struct pci_bus *bus)
1272 res->end = IO_SPACE_LIMIT; 440 res->end = IO_SPACE_LIMIT;
1273 res->flags = IORESOURCE_IO; 441 res->flags = IORESOURCE_IO;
1274 } 442 }
1275 res->start += io_offset; 443 res->start = (res->start + io_offset) & 0xffffffffu;
1276 res->end += io_offset; 444 res->end = (res->end + io_offset) & 0xffffffffu;
1277 445
1278 for (i = 0; i < 3; ++i) { 446 for (i = 0; i < 3; ++i) {
1279 res = &hose->mem_resources[i]; 447 res = &hose->mem_resources[i];
@@ -1288,35 +456,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
1288 } 456 }
1289 bus->resource[i+1] = res; 457 bus->resource[i+1] = res;
1290 } 458 }
1291 } else {
1292 /* This is a subordinate bridge */
1293 pci_read_bridge_bases(bus);
1294
1295 for (i = 0; i < 4; ++i) {
1296 if ((res = bus->resource[i]) == NULL)
1297 continue;
1298 if (!res->flags || bus->self->transparent)
1299 continue;
1300 if (io_offset && (res->flags & IORESOURCE_IO)) {
1301 res->start += io_offset;
1302 res->end += io_offset;
1303 } else if (hose->pci_mem_offset
1304 && (res->flags & IORESOURCE_MEM)) {
1305 res->start += hose->pci_mem_offset;
1306 res->end += hose->pci_mem_offset;
1307 }
1308 }
1309 }
1310
1311 /* Platform specific bus fixups */
1312 if (ppc_md.pcibios_fixup_bus)
1313 ppc_md.pcibios_fixup_bus(bus);
1314
1315 /* Read default IRQs and fixup if necessary */
1316 list_for_each_entry(dev, &bus->devices, bus_list) {
1317 pci_read_irq_line(dev);
1318 if (ppc_md.pci_irq_fixup)
1319 ppc_md.pci_irq_fixup(dev);
1320 } 459 }
1321} 460}
1322 461
@@ -1328,37 +467,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq)
1328 /* XXX FIXME - update OF device tree node interrupt property */ 467 /* XXX FIXME - update OF device tree node interrupt property */
1329} 468}
1330 469
1331int pcibios_enable_device(struct pci_dev *dev, int mask)
1332{
1333 u16 cmd, old_cmd;
1334 int idx;
1335 struct resource *r;
1336
1337 if (ppc_md.pcibios_enable_device_hook)
1338 if (ppc_md.pcibios_enable_device_hook(dev, 0))
1339 return -EINVAL;
1340
1341 pci_read_config_word(dev, PCI_COMMAND, &cmd);
1342 old_cmd = cmd;
1343 for (idx=0; idx<6; idx++) {
1344 r = &dev->resource[idx];
1345 if (r->flags & IORESOURCE_UNSET) {
1346 printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev));
1347 return -EINVAL;
1348 }
1349 if (r->flags & IORESOURCE_IO)
1350 cmd |= PCI_COMMAND_IO;
1351 if (r->flags & IORESOURCE_MEM)
1352 cmd |= PCI_COMMAND_MEMORY;
1353 }
1354 if (cmd != old_cmd) {
1355 printk("PCI: Enabling device %s (%04x -> %04x)\n",
1356 pci_name(dev), old_cmd, cmd);
1357 pci_write_config_word(dev, PCI_COMMAND, cmd);
1358 }
1359 return 0;
1360}
1361
1362static struct pci_controller* 470static struct pci_controller*
1363pci_bus_to_hose(int bus) 471pci_bus_to_hose(int bus)
1364{ 472{
@@ -1381,17 +489,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn)
1381 struct pci_controller* hose; 489 struct pci_controller* hose;
1382 long result = -EOPNOTSUPP; 490 long result = -EOPNOTSUPP;
1383 491
1384 /* Argh ! Please forgive me for that hack, but that's the
1385 * simplest way to get existing XFree to not lockup on some
1386 * G5 machines... So when something asks for bus 0 io base
1387 * (bus 0 is HT root), we return the AGP one instead.
1388 */
1389#ifdef CONFIG_PPC_PMAC
1390 if (machine_is(powermac) && machine_is_compatible("MacRISC4"))
1391 if (bus == 0)
1392 bus = 0xf0;
1393#endif /* CONFIG_PPC_PMAC */
1394
1395 hose = pci_bus_to_hose(bus); 492 hose = pci_bus_to_hose(bus);
1396 if (!hose) 493 if (!hose)
1397 return -ENODEV; 494 return -ENODEV;
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 9f63bdcb0bdf..52750745edfd 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -31,7 +31,6 @@
31#include <asm/byteorder.h> 31#include <asm/byteorder.h>
32#include <asm/machdep.h> 32#include <asm/machdep.h>
33#include <asm/ppc-pci.h> 33#include <asm/ppc-pci.h>
34#include <asm/firmware.h>
35 34
36#ifdef DEBUG 35#ifdef DEBUG
37#include <asm/udbg.h> 36#include <asm/udbg.h>
@@ -41,10 +40,6 @@
41#endif 40#endif
42 41
43unsigned long pci_probe_only = 1; 42unsigned long pci_probe_only = 1;
44int pci_assign_all_buses = 0;
45
46static void fixup_resource(struct resource *res, struct pci_dev *dev);
47static void do_bus_setup(struct pci_bus *bus);
48 43
49/* pci_io_base -- the base address from which io bars are offsets. 44/* pci_io_base -- the base address from which io bars are offsets.
50 * This is the lowest I/O base address (so bar values are always positive), 45 * This is the lowest I/O base address (so bar values are always positive),
@@ -70,139 +65,31 @@ struct dma_mapping_ops *get_pci_dma_ops(void)
70} 65}
71EXPORT_SYMBOL(get_pci_dma_ops); 66EXPORT_SYMBOL(get_pci_dma_ops);
72 67
73static void fixup_broken_pcnet32(struct pci_dev* dev)
74{
75 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
76 dev->vendor = PCI_VENDOR_ID_AMD;
77 pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
78 }
79}
80DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
81 68
82void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, 69int pci_set_dma_mask(struct pci_dev *dev, u64 mask)
83 struct resource *res)
84{ 70{
85 unsigned long offset = 0; 71 return dma_set_mask(&dev->dev, mask);
86 struct pci_controller *hose = pci_bus_to_host(dev->bus);
87
88 if (!hose)
89 return;
90
91 if (res->flags & IORESOURCE_IO)
92 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
93
94 if (res->flags & IORESOURCE_MEM)
95 offset = hose->pci_mem_offset;
96
97 region->start = res->start - offset;
98 region->end = res->end - offset;
99} 72}
100 73
101void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, 74int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
102 struct pci_bus_region *region)
103{ 75{
104 unsigned long offset = 0; 76 int rc;
105 struct pci_controller *hose = pci_bus_to_host(dev->bus);
106
107 if (!hose)
108 return;
109 77
110 if (res->flags & IORESOURCE_IO) 78 rc = dma_set_mask(&dev->dev, mask);
111 offset = (unsigned long)hose->io_base_virt - _IO_BASE; 79 dev->dev.coherent_dma_mask = dev->dma_mask;
112 80
113 if (res->flags & IORESOURCE_MEM) 81 return rc;
114 offset = hose->pci_mem_offset;
115
116 res->start = region->start + offset;
117 res->end = region->end + offset;
118} 82}
119 83
120#ifdef CONFIG_HOTPLUG 84static void fixup_broken_pcnet32(struct pci_dev* dev)
121EXPORT_SYMBOL(pcibios_resource_to_bus);
122EXPORT_SYMBOL(pcibios_bus_to_resource);
123#endif
124
125/*
126 * We need to avoid collisions with `mirrored' VGA ports
127 * and other strange ISA hardware, so we always want the
128 * addresses to be allocated in the 0x000-0x0ff region
129 * modulo 0x400.
130 *
131 * Why? Because some silly external IO cards only decode
132 * the low 10 bits of the IO address. The 0x00-0xff region
133 * is reserved for motherboard devices that decode all 16
134 * bits, so it's ok to allocate at, say, 0x2800-0x28ff,
135 * but we want to try to avoid allocating at 0x2900-0x2bff
136 * which might have be mirrored at 0x0100-0x03ff..
137 */
138void pcibios_align_resource(void *data, struct resource *res,
139 resource_size_t size, resource_size_t align)
140{
141 struct pci_dev *dev = data;
142 struct pci_controller *hose = pci_bus_to_host(dev->bus);
143 resource_size_t start = res->start;
144 unsigned long alignto;
145
146 if (res->flags & IORESOURCE_IO) {
147 unsigned long offset = (unsigned long)hose->io_base_virt -
148 _IO_BASE;
149 /* Make sure we start at our min on all hoses */
150 if (start - offset < PCIBIOS_MIN_IO)
151 start = PCIBIOS_MIN_IO + offset;
152
153 /*
154 * Put everything into 0x00-0xff region modulo 0x400
155 */
156 if (start & 0x300)
157 start = (start + 0x3ff) & ~0x3ff;
158
159 } else if (res->flags & IORESOURCE_MEM) {
160 /* Make sure we start at our min on all hoses */
161 if (start - hose->pci_mem_offset < PCIBIOS_MIN_MEM)
162 start = PCIBIOS_MIN_MEM + hose->pci_mem_offset;
163
164 /* Align to multiple of size of minimum base. */
165 alignto = max(0x1000UL, align);
166 start = ALIGN(start, alignto);
167 }
168
169 res->start = start;
170}
171
172void __devinit pcibios_claim_one_bus(struct pci_bus *b)
173{ 85{
174 struct pci_dev *dev; 86 if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) {
175 struct pci_bus *child_bus; 87 dev->vendor = PCI_VENDOR_ID_AMD;
176 88 pci_write_config_word(dev, PCI_VENDOR_ID, PCI_VENDOR_ID_AMD);
177 list_for_each_entry(dev, &b->devices, bus_list) {
178 int i;
179
180 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
181 struct resource *r = &dev->resource[i];
182
183 if (r->parent || !r->start || !r->flags)
184 continue;
185 pci_claim_resource(dev, i);
186 }
187 } 89 }
188
189 list_for_each_entry(child_bus, &b->children, node)
190 pcibios_claim_one_bus(child_bus);
191} 90}
192#ifdef CONFIG_HOTPLUG 91DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TRIDENT, PCI_ANY_ID, fixup_broken_pcnet32);
193EXPORT_SYMBOL_GPL(pcibios_claim_one_bus);
194#endif
195
196static void __init pcibios_claim_of_setup(void)
197{
198 struct pci_bus *b;
199
200 if (firmware_has_feature(FW_FEATURE_ISERIES))
201 return;
202 92
203 list_for_each_entry(b, &pci_root_buses, node)
204 pcibios_claim_one_bus(b);
205}
206 93
207static u32 get_int_prop(struct device_node *np, const char *name, u32 def) 94static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
208{ 95{
@@ -270,7 +157,6 @@ static void pci_parse_of_addrs(struct device_node *node, struct pci_dev *dev)
270 res->end = base + size - 1; 157 res->end = base + size - 1;
271 res->flags = flags; 158 res->flags = flags;
272 res->name = pci_name(dev); 159 res->name = pci_name(dev);
273 fixup_resource(res, dev);
274 } 160 }
275} 161}
276 162
@@ -339,16 +225,17 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
339EXPORT_SYMBOL(of_create_pci_dev); 225EXPORT_SYMBOL(of_create_pci_dev);
340 226
341void __devinit of_scan_bus(struct device_node *node, 227void __devinit of_scan_bus(struct device_node *node,
342 struct pci_bus *bus) 228 struct pci_bus *bus)
343{ 229{
344 struct device_node *child = NULL; 230 struct device_node *child;
345 const u32 *reg; 231 const u32 *reg;
346 int reglen, devfn; 232 int reglen, devfn;
347 struct pci_dev *dev; 233 struct pci_dev *dev;
348 234
349 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number); 235 DBG("of_scan_bus(%s) bus no %d... \n", node->full_name, bus->number);
350 236
351 while ((child = of_get_next_child(node, child)) != NULL) { 237 /* Scan direct children */
238 for_each_child_of_node(node, child) {
352 DBG(" * %s\n", child->full_name); 239 DBG(" * %s\n", child->full_name);
353 reg = of_get_property(child, "reg", &reglen); 240 reg = of_get_property(child, "reg", &reglen);
354 if (reg == NULL || reglen < 20) 241 if (reg == NULL || reglen < 20)
@@ -359,19 +246,26 @@ void __devinit of_scan_bus(struct device_node *node,
359 dev = of_create_pci_dev(child, bus, devfn); 246 dev = of_create_pci_dev(child, bus, devfn);
360 if (!dev) 247 if (!dev)
361 continue; 248 continue;
362 DBG("dev header type: %x\n", dev->hdr_type); 249 DBG(" dev header type: %x\n", dev->hdr_type);
250 }
363 251
252 /* Ally all fixups */
253 pcibios_fixup_of_probed_bus(bus);
254
255 /* Now scan child busses */
256 list_for_each_entry(dev, &bus->devices, bus_list) {
364 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE || 257 if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
365 dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) 258 dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
366 of_scan_pci_bridge(child, dev); 259 struct device_node *child = pci_device_to_OF_node(dev);
260 if (dev)
261 of_scan_pci_bridge(child, dev);
262 }
367 } 263 }
368
369 do_bus_setup(bus);
370} 264}
371EXPORT_SYMBOL(of_scan_bus); 265EXPORT_SYMBOL(of_scan_bus);
372 266
373void __devinit of_scan_pci_bridge(struct device_node *node, 267void __devinit of_scan_pci_bridge(struct device_node *node,
374 struct pci_dev *dev) 268 struct pci_dev *dev)
375{ 269{
376 struct pci_bus *bus; 270 struct pci_bus *bus;
377 const u32 *busrange, *ranges; 271 const u32 *busrange, *ranges;
@@ -441,7 +335,6 @@ void __devinit of_scan_pci_bridge(struct device_node *node,
441 res->start = of_read_number(&ranges[1], 2); 335 res->start = of_read_number(&ranges[1], 2);
442 res->end = res->start + size - 1; 336 res->end = res->start + size - 1;
443 res->flags = flags; 337 res->flags = flags;
444 fixup_resource(res, dev);
445 } 338 }
446 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), 339 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus),
447 bus->number); 340 bus->number);
@@ -462,12 +355,12 @@ EXPORT_SYMBOL(of_scan_pci_bridge);
462void __devinit scan_phb(struct pci_controller *hose) 355void __devinit scan_phb(struct pci_controller *hose)
463{ 356{
464 struct pci_bus *bus; 357 struct pci_bus *bus;
465 struct device_node *node = hose->arch_data; 358 struct device_node *node = hose->dn;
466 int i, mode; 359 int i, mode;
467 struct resource *res;
468 360
469 DBG("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>"); 361 DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>");
470 362
363 /* Create an empty bus for the toplevel */
471 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); 364 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node);
472 if (bus == NULL) { 365 if (bus == NULL) {
473 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", 366 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
@@ -477,27 +370,27 @@ void __devinit scan_phb(struct pci_controller *hose)
477 bus->secondary = hose->first_busno; 370 bus->secondary = hose->first_busno;
478 hose->bus = bus; 371 hose->bus = bus;
479 372
480 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 373 /* Get some IO space for the new PHB */
481 pcibios_map_io_space(bus); 374 pcibios_map_io_space(bus);
482
483 bus->resource[0] = res = &hose->io_resource;
484 if (res->flags && request_resource(&ioport_resource, res)) {
485 printk(KERN_ERR "Failed to request PCI IO region "
486 "on PCI domain %04x\n", hose->global_number);
487 DBG("res->start = 0x%016lx, res->end = 0x%016lx\n",
488 res->start, res->end);
489 }
490 375
376 /* Wire up PHB bus resources */
377 DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n",
378 hose->io_resource.start, hose->io_resource.end,
379 hose->io_resource.flags);
380 bus->resource[0] = &hose->io_resource;
491 for (i = 0; i < 3; ++i) { 381 for (i = 0; i < 3; ++i) {
492 res = &hose->mem_resources[i]; 382 DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i,
493 bus->resource[i+1] = res; 383 hose->mem_resources[i].start,
494 if (res->flags && request_resource(&iomem_resource, res)) 384 hose->mem_resources[i].end,
495 printk(KERN_ERR "Failed to request PCI memory region " 385 hose->mem_resources[i].flags);
496 "on PCI domain %04x\n", hose->global_number); 386 bus->resource[i+1] = &hose->mem_resources[i];
497 } 387 }
388 DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset);
389 DBG("PCI: PHB IO offset = %08lx\n",
390 (unsigned long)hose->io_base_virt - _IO_BASE);
498 391
392 /* Get probe mode and perform scan */
499 mode = PCI_PROBE_NORMAL; 393 mode = PCI_PROBE_NORMAL;
500
501 if (node && ppc_md.pci_probe_mode) 394 if (node && ppc_md.pci_probe_mode)
502 mode = ppc_md.pci_probe_mode(bus); 395 mode = ppc_md.pci_probe_mode(bus);
503 DBG(" probe mode: %d\n", mode); 396 DBG(" probe mode: %d\n", mode);
@@ -514,15 +407,15 @@ static int __init pcibios_init(void)
514{ 407{
515 struct pci_controller *hose, *tmp; 408 struct pci_controller *hose, *tmp;
516 409
410 printk(KERN_INFO "PCI: Probing PCI hardware\n");
411
517 /* For now, override phys_mem_access_prot. If we need it, 412 /* For now, override phys_mem_access_prot. If we need it,
518 * later, we may move that initialization to each ppc_md 413 * later, we may move that initialization to each ppc_md
519 */ 414 */
520 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; 415 ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
521 416
522 if (firmware_has_feature(FW_FEATURE_ISERIES)) 417 if (pci_probe_only)
523 iSeries_pcibios_init(); 418 ppc_pci_flags |= PPC_PCI_PROBE_ONLY;
524
525 printk(KERN_DEBUG "PCI: Probing PCI hardware\n");
526 419
527 /* Scan all of the recorded PCI controllers. */ 420 /* Scan all of the recorded PCI controllers. */
528 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 421 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
@@ -530,19 +423,8 @@ static int __init pcibios_init(void)
530 pci_bus_add_devices(hose->bus); 423 pci_bus_add_devices(hose->bus);
531 } 424 }
532 425
533 if (!firmware_has_feature(FW_FEATURE_ISERIES)) { 426 /* Call common code to handle resource allocation */
534 if (pci_probe_only) 427 pcibios_resource_survey();
535 pcibios_claim_of_setup();
536 else
537 /* FIXME: `else' will be removed when
538 pci_assign_unassigned_resources() is able to work
539 correctly with [partially] allocated PCI tree. */
540 pci_assign_unassigned_resources();
541 }
542
543 /* Call machine dependent final fixup */
544 if (ppc_md.pcibios_fixup)
545 ppc_md.pcibios_fixup();
546 428
547 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n"); 429 printk(KERN_DEBUG "PCI: Probing PCI hardware done\n");
548 430
@@ -551,141 +433,6 @@ static int __init pcibios_init(void)
551 433
552subsys_initcall(pcibios_init); 434subsys_initcall(pcibios_init);
553 435
554int pcibios_enable_device(struct pci_dev *dev, int mask)
555{
556 u16 cmd, oldcmd;
557 int i;
558
559 pci_read_config_word(dev, PCI_COMMAND, &cmd);
560 oldcmd = cmd;
561
562 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
563 struct resource *res = &dev->resource[i];
564
565 /* Only set up the requested stuff */
566 if (!(mask & (1<<i)))
567 continue;
568
569 if (res->flags & IORESOURCE_IO)
570 cmd |= PCI_COMMAND_IO;
571 if (res->flags & IORESOURCE_MEM)
572 cmd |= PCI_COMMAND_MEMORY;
573 }
574
575 if (cmd != oldcmd) {
576 printk(KERN_DEBUG "PCI: Enabling device: (%s), cmd %x\n",
577 pci_name(dev), cmd);
578 /* Enable the appropriate bits in the PCI command register. */
579 pci_write_config_word(dev, PCI_COMMAND, cmd);
580 }
581 return 0;
582}
583
584/* Decide whether to display the domain number in /proc */
585int pci_proc_domain(struct pci_bus *bus)
586{
587 if (firmware_has_feature(FW_FEATURE_ISERIES))
588 return 0;
589 else {
590 struct pci_controller *hose = pci_bus_to_host(bus);
591 return hose->buid != 0;
592 }
593}
594
595void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
596 struct device_node *dev, int prim)
597{
598 const unsigned int *ranges;
599 unsigned int pci_space;
600 unsigned long size;
601 int rlen = 0;
602 int memno = 0;
603 struct resource *res;
604 int np, na = of_n_addr_cells(dev);
605 unsigned long pci_addr, cpu_phys_addr;
606
607 np = na + 5;
608
609 /* From "PCI Binding to 1275"
610 * The ranges property is laid out as an array of elements,
611 * each of which comprises:
612 * cells 0 - 2: a PCI address
613 * cells 3 or 3+4: a CPU physical address
614 * (size depending on dev->n_addr_cells)
615 * cells 4+5 or 5+6: the size of the range
616 */
617 ranges = of_get_property(dev, "ranges", &rlen);
618 if (ranges == NULL)
619 return;
620 hose->io_base_phys = 0;
621 while ((rlen -= np * sizeof(unsigned int)) >= 0) {
622 res = NULL;
623 pci_space = ranges[0];
624 pci_addr = ((unsigned long)ranges[1] << 32) | ranges[2];
625 cpu_phys_addr = of_translate_address(dev, &ranges[3]);
626 size = ((unsigned long)ranges[na+3] << 32) | ranges[na+4];
627 ranges += np;
628 if (size == 0)
629 continue;
630
631 /* Now consume following elements while they are contiguous */
632 while (rlen >= np * sizeof(unsigned int)) {
633 unsigned long addr, phys;
634
635 if (ranges[0] != pci_space)
636 break;
637 addr = ((unsigned long)ranges[1] << 32) | ranges[2];
638 phys = ranges[3];
639 if (na >= 2)
640 phys = (phys << 32) | ranges[4];
641 if (addr != pci_addr + size ||
642 phys != cpu_phys_addr + size)
643 break;
644
645 size += ((unsigned long)ranges[na+3] << 32)
646 | ranges[na+4];
647 ranges += np;
648 rlen -= np * sizeof(unsigned int);
649 }
650
651 switch ((pci_space >> 24) & 0x3) {
652 case 1: /* I/O space */
653 hose->io_base_phys = cpu_phys_addr - pci_addr;
654 /* handle from 0 to top of I/O window */
655 hose->pci_io_size = pci_addr + size;
656
657 res = &hose->io_resource;
658 res->flags = IORESOURCE_IO;
659 res->start = pci_addr;
660 DBG("phb%d: IO 0x%lx -> 0x%lx\n", hose->global_number,
661 res->start, res->start + size - 1);
662 break;
663 case 2: /* memory space */
664 memno = 0;
665 while (memno < 3 && hose->mem_resources[memno].flags)
666 ++memno;
667
668 if (memno == 0)
669 hose->pci_mem_offset = cpu_phys_addr - pci_addr;
670 if (memno < 3) {
671 res = &hose->mem_resources[memno];
672 res->flags = IORESOURCE_MEM;
673 res->start = cpu_phys_addr;
674 DBG("phb%d: MEM 0x%lx -> 0x%lx\n", hose->global_number,
675 res->start, res->start + size - 1);
676 }
677 break;
678 }
679 if (res != NULL) {
680 res->name = dev->full_name;
681 res->end = res->start + size - 1;
682 res->parent = NULL;
683 res->sibling = NULL;
684 res->child = NULL;
685 }
686 }
687}
688
689#ifdef CONFIG_HOTPLUG 436#ifdef CONFIG_HOTPLUG
690 437
691int pcibios_unmap_io_space(struct pci_bus *bus) 438int pcibios_unmap_io_space(struct pci_bus *bus)
@@ -719,8 +466,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
719 if (hose->io_base_alloc == 0) 466 if (hose->io_base_alloc == 0)
720 return 0; 467 return 0;
721 468
722 DBG("IO unmapping for PHB %s\n", 469 DBG("IO unmapping for PHB %s\n", hose->dn->full_name);
723 ((struct device_node *)hose->arch_data)->full_name);
724 DBG(" alloc=0x%p\n", hose->io_base_alloc); 470 DBG(" alloc=0x%p\n", hose->io_base_alloc);
725 471
726 /* This is a PHB, we fully unmap the IO area */ 472 /* This is a PHB, we fully unmap the IO area */
@@ -779,8 +525,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
779 hose->io_base_virt = (void __iomem *)(area->addr + 525 hose->io_base_virt = (void __iomem *)(area->addr +
780 hose->io_base_phys - phys_page); 526 hose->io_base_phys - phys_page);
781 527
782 DBG("IO mapping for PHB %s\n", 528 DBG("IO mapping for PHB %s\n", hose->dn->full_name);
783 ((struct device_node *)hose->arch_data)->full_name);
784 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n", 529 DBG(" phys=0x%016lx, virt=0x%p (alloc=0x%p)\n",
785 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc); 530 hose->io_base_phys, hose->io_base_virt, hose->io_base_alloc);
786 DBG(" size=0x%016lx (alloc=0x%016lx)\n", 531 DBG(" size=0x%016lx (alloc=0x%016lx)\n",
@@ -803,51 +548,13 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
803} 548}
804EXPORT_SYMBOL_GPL(pcibios_map_io_space); 549EXPORT_SYMBOL_GPL(pcibios_map_io_space);
805 550
806static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
807{
808 struct pci_controller *hose = pci_bus_to_host(dev->bus);
809 unsigned long offset;
810
811 if (res->flags & IORESOURCE_IO) {
812 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
813 res->start += offset;
814 res->end += offset;
815 } else if (res->flags & IORESOURCE_MEM) {
816 res->start += hose->pci_mem_offset;
817 res->end += hose->pci_mem_offset;
818 }
819}
820
821void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
822 struct pci_bus *bus)
823{
824 /* Update device resources. */
825 int i;
826
827 DBG("%s: Fixup resources:\n", pci_name(dev));
828 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
829 struct resource *res = &dev->resource[i];
830 if (!res->flags)
831 continue;
832
833 DBG(" 0x%02x < %08lx:0x%016lx...0x%016lx\n",
834 i, res->flags, res->start, res->end);
835
836 fixup_resource(res, dev);
837
838 DBG(" > %08lx:0x%016lx...0x%016lx\n",
839 res->flags, res->start, res->end);
840 }
841}
842EXPORT_SYMBOL(pcibios_fixup_device_resources);
843
844void __devinit pcibios_setup_new_device(struct pci_dev *dev) 551void __devinit pcibios_setup_new_device(struct pci_dev *dev)
845{ 552{
846 struct dev_archdata *sd = &dev->dev.archdata; 553 struct dev_archdata *sd = &dev->dev.archdata;
847 554
848 sd->of_node = pci_device_to_OF_node(dev); 555 sd->of_node = pci_device_to_OF_node(dev);
849 556
850 DBG("PCI device %s OF node: %s\n", pci_name(dev), 557 DBG("PCI: device %s OF node: %s\n", pci_name(dev),
851 sd->of_node ? sd->of_node->full_name : "<none>"); 558 sd->of_node ? sd->of_node->full_name : "<none>");
852 559
853 sd->dma_ops = pci_dma_ops; 560 sd->dma_ops = pci_dma_ops;
@@ -861,7 +568,7 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev)
861} 568}
862EXPORT_SYMBOL(pcibios_setup_new_device); 569EXPORT_SYMBOL(pcibios_setup_new_device);
863 570
864static void __devinit do_bus_setup(struct pci_bus *bus) 571void __devinit pcibios_do_bus_setup(struct pci_bus *bus)
865{ 572{
866 struct pci_dev *dev; 573 struct pci_dev *dev;
867 574
@@ -870,42 +577,7 @@ static void __devinit do_bus_setup(struct pci_bus *bus)
870 577
871 list_for_each_entry(dev, &bus->devices, bus_list) 578 list_for_each_entry(dev, &bus->devices, bus_list)
872 pcibios_setup_new_device(dev); 579 pcibios_setup_new_device(dev);
873
874 /* Read default IRQs and fixup if necessary */
875 list_for_each_entry(dev, &bus->devices, bus_list) {
876 pci_read_irq_line(dev);
877 if (ppc_md.pci_irq_fixup)
878 ppc_md.pci_irq_fixup(dev);
879 }
880}
881
882void __devinit pcibios_fixup_bus(struct pci_bus *bus)
883{
884 struct pci_dev *dev = bus->self;
885 struct device_node *np;
886
887 np = pci_bus_to_OF_node(bus);
888
889 DBG("pcibios_fixup_bus(%s)\n", np ? np->full_name : "<???>");
890
891 if (dev && pci_probe_only &&
892 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
893 /* This is a subordinate bridge */
894
895 pci_read_bridge_bases(bus);
896 pcibios_fixup_device_resources(dev, bus);
897 }
898
899 do_bus_setup(bus);
900
901 if (!pci_probe_only)
902 return;
903
904 list_for_each_entry(dev, &bus->devices, bus_list)
905 if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
906 pcibios_fixup_device_resources(dev, bus);
907} 580}
908EXPORT_SYMBOL(pcibios_fixup_bus);
909 581
910unsigned long pci_address_to_pio(phys_addr_t address) 582unsigned long pci_address_to_pio(phys_addr_t address)
911{ 583{
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index b4839038613d..1c67de52e3ce 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -56,11 +56,6 @@ static void * __devinit update_dn_pci_info(struct device_node *dn, void *data)
56 pdn->busno = (regs[0] >> 16) & 0xff; 56 pdn->busno = (regs[0] >> 16) & 0xff;
57 pdn->devfn = (regs[0] >> 8) & 0xff; 57 pdn->devfn = (regs[0] >> 8) & 0xff;
58 } 58 }
59 if (firmware_has_feature(FW_FEATURE_ISERIES)) {
60 const u32 *busp = of_get_property(dn, "linux,subbus", NULL);
61 if (busp)
62 pdn->bussubno = *busp;
63 }
64 59
65 pdn->pci_ext_config_space = (type && *type == 1); 60 pdn->pci_ext_config_space = (type && *type == 1);
66 return NULL; 61 return NULL;
@@ -133,7 +128,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
133 */ 128 */
134void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) 129void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb)
135{ 130{
136 struct device_node * dn = (struct device_node *) phb->arch_data; 131 struct device_node *dn = phb->dn;
137 struct pci_dn *pdn; 132 struct pci_dn *pdn;
138 133
139 /* PHB nodes themselves must not match */ 134 /* PHB nodes themselves must not match */
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 13ebeb2d71e6..aa9ff35b0e63 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -59,6 +59,7 @@ extern void single_step_exception(struct pt_regs *regs);
59extern int sys_sigreturn(struct pt_regs *regs); 59extern int sys_sigreturn(struct pt_regs *regs);
60 60
61EXPORT_SYMBOL(clear_pages); 61EXPORT_SYMBOL(clear_pages);
62EXPORT_SYMBOL(copy_page);
62EXPORT_SYMBOL(ISA_DMA_THRESHOLD); 63EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
63EXPORT_SYMBOL(DMA_MODE_READ); 64EXPORT_SYMBOL(DMA_MODE_READ);
64EXPORT_SYMBOL(DMA_MODE_WRITE); 65EXPORT_SYMBOL(DMA_MODE_WRITE);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index acc0d247d3c3..8b5efbce8d90 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -583,6 +583,20 @@ static void __init check_cpu_pa_features(unsigned long node)
583 ibm_pa_features, ARRAY_SIZE(ibm_pa_features)); 583 ibm_pa_features, ARRAY_SIZE(ibm_pa_features));
584} 584}
585 585
586#ifdef CONFIG_PPC64
587static void __init check_cpu_slb_size(unsigned long node)
588{
589 u32 *slb_size_ptr;
590
591 slb_size_ptr = of_get_flat_dt_prop(node, "ibm,slb-size", NULL);
592 if (slb_size_ptr != NULL) {
593 mmu_slb_size = *slb_size_ptr;
594 }
595}
596#else
597#define check_cpu_slb_size(node) do { } while(0)
598#endif
599
586static struct feature_property { 600static struct feature_property {
587 const char *name; 601 const char *name;
588 u32 min_value; 602 u32 min_value;
@@ -600,6 +614,29 @@ static struct feature_property {
600#endif /* CONFIG_PPC64 */ 614#endif /* CONFIG_PPC64 */
601}; 615};
602 616
617#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
618static inline void identical_pvr_fixup(unsigned long node)
619{
620 unsigned int pvr;
621 char *model = of_get_flat_dt_prop(node, "model", NULL);
622
623 /*
624 * Since 440GR(x)/440EP(x) processors have the same pvr,
625 * we check the node path and set bit 28 in the cur_cpu_spec
626 * pvr for EP(x) processor version. This bit is always 0 in
627 * the "real" pvr. Then we call identify_cpu again with
628 * the new logical pvr to enable FPU support.
629 */
630 if (model && strstr(model, "440EP")) {
631 pvr = cur_cpu_spec->pvr_value | 0x8;
632 identify_cpu(0, pvr);
633 DBG("Using logical pvr %x for %s\n", pvr, model);
634 }
635}
636#else
637#define identical_pvr_fixup(node) do { } while(0)
638#endif
639
603static void __init check_cpu_feature_properties(unsigned long node) 640static void __init check_cpu_feature_properties(unsigned long node)
604{ 641{
605 unsigned long i; 642 unsigned long i;
@@ -697,22 +734,13 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
697 prop = of_get_flat_dt_prop(node, "cpu-version", NULL); 734 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
698 if (prop && (*prop & 0xff000000) == 0x0f000000) 735 if (prop && (*prop & 0xff000000) == 0x0f000000)
699 identify_cpu(0, *prop); 736 identify_cpu(0, *prop);
700#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU) 737
701 /* 738 identical_pvr_fixup(node);
702 * Since 440GR(x)/440EP(x) processors have the same pvr,
703 * we check the node path and set bit 28 in the cur_cpu_spec
704 * pvr for EP(x) processor version. This bit is always 0 in
705 * the "real" pvr. Then we call identify_cpu again with
706 * the new logical pvr to enable FPU support.
707 */
708 if (strstr(uname, "440EP")) {
709 identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
710 }
711#endif
712 } 739 }
713 740
714 check_cpu_feature_properties(node); 741 check_cpu_feature_properties(node);
715 check_cpu_pa_features(node); 742 check_cpu_pa_features(node);
743 check_cpu_slb_size(node);
716 744
717#ifdef CONFIG_PPC_PSERIES 745#ifdef CONFIG_PPC_PSERIES
718 if (nthreads > 1) 746 if (nthreads > 1)
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 5d89a21dd0d6..5ab4c8466cc9 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2142,82 +2142,34 @@ static void __init fixup_device_tree_pmac(void)
2142#endif 2142#endif
2143 2143
2144#ifdef CONFIG_PPC_EFIKA 2144#ifdef CONFIG_PPC_EFIKA
2145/* The current fw of the Efika has a device tree needs quite a few 2145/*
2146 * fixups to be compliant with the mpc52xx bindings. It's currently 2146 * The MPC5200 FEC driver requires an phy-handle property to tell it how
2147 * unknown if it will ever be compliant (come on bPlan ...) so we do fixups. 2147 * to talk to the phy. If the phy-handle property is missing, then this
2148 * NOTE that we (barely) tolerate it because the EFIKA was out before 2148 * function is called to add the appropriate nodes and link it to the
2149 * the bindings were finished, for any new boards -> RTFM ! */ 2149 * ethernet node.
2150 2150 */
2151struct subst_entry { 2151static void __init fixup_device_tree_efika_add_phy(void)
2152 char *path;
2153 char *property;
2154 void *value;
2155 int value_len;
2156};
2157
2158static void __init fixup_device_tree_efika(void)
2159{ 2152{
2160 /* Substitution table */
2161 #define prop_cstr(x) x, sizeof(x)
2162 int prop_sound_irq[3] = { 2, 2, 0 };
2163 int prop_bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2164 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2165 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2166 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2167 struct subst_entry efika_subst_table[] = {
2168 { "/", "device_type", prop_cstr("efika") },
2169 { "/builtin", "device_type", prop_cstr("soc") },
2170 { "/builtin/ata", "compatible", prop_cstr("mpc5200b-ata\0mpc5200-ata"), },
2171 { "/builtin/bestcomm", "compatible", prop_cstr("mpc5200b-bestcomm\0mpc5200-bestcomm") },
2172 { "/builtin/bestcomm", "interrupts", prop_bcomm_irq, sizeof(prop_bcomm_irq) },
2173 { "/builtin/ethernet", "compatible", prop_cstr("mpc5200b-fec\0mpc5200-fec") },
2174 { "/builtin/pic", "compatible", prop_cstr("mpc5200b-pic\0mpc5200-pic") },
2175 { "/builtin/serial", "compatible", prop_cstr("mpc5200b-psc-uart\0mpc5200-psc-uart") },
2176 { "/builtin/sound", "compatible", prop_cstr("mpc5200b-psc-ac97\0mpc5200-psc-ac97") },
2177 { "/builtin/sound", "interrupts", prop_sound_irq, sizeof(prop_sound_irq) },
2178 { "/builtin/sram", "compatible", prop_cstr("mpc5200b-sram\0mpc5200-sram") },
2179 { "/builtin/sram", "device_type", prop_cstr("sram") },
2180 {}
2181 };
2182 #undef prop_cstr
2183
2184 /* Vars */
2185 u32 node; 2153 u32 node;
2186 char prop[64]; 2154 char prop[64];
2187 int rv, i; 2155 int rv;
2188 2156
2189 /* Check if we're really running on a EFIKA */ 2157 /* Check if /builtin/ethernet exists - bail if it doesn't */
2190 node = call_prom("finddevice", 1, 1, ADDR("/")); 2158 node = call_prom("finddevice", 1, 1, ADDR("/builtin/ethernet"));
2191 if (!PHANDLE_VALID(node)) 2159 if (!PHANDLE_VALID(node))
2192 return; 2160 return;
2193 2161
2194 rv = prom_getprop(node, "model", prop, sizeof(prop)); 2162 /* Check if the phy-handle property exists - bail if it does */
2195 if (rv == PROM_ERROR) 2163 rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
2196 return; 2164 if (!rv)
2197 if (strcmp(prop, "EFIKA5K2"))
2198 return; 2165 return;
2199 2166
2200 prom_printf("Applying EFIKA device tree fixups\n"); 2167 /*
2201 2168 * At this point the ethernet device doesn't have a phy described.
2202 /* Process substitution table */ 2169 * Now we need to add the missing phy node and linkage
2203 for (i=0; efika_subst_table[i].path; i++) { 2170 */
2204 struct subst_entry *se = &efika_subst_table[i];
2205
2206 node = call_prom("finddevice", 1, 1, ADDR(se->path));
2207 if (!PHANDLE_VALID(node)) {
2208 prom_printf("fixup_device_tree_efika: ",
2209 "skipped entry %x - not found\n", i);
2210 continue;
2211 }
2212
2213 rv = prom_setprop(node, se->path, se->property,
2214 se->value, se->value_len );
2215 if (rv == PROM_ERROR)
2216 prom_printf("fixup_device_tree_efika: ",
2217 "skipped entry %x - setprop error\n", i);
2218 }
2219 2171
2220 /* Make sure ethernet mdio bus node exists */ 2172 /* Check for an MDIO bus node - if missing then create one */
2221 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio")); 2173 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
2222 if (!PHANDLE_VALID(node)) { 2174 if (!PHANDLE_VALID(node)) {
2223 prom_printf("Adding Ethernet MDIO node\n"); 2175 prom_printf("Adding Ethernet MDIO node\n");
@@ -2226,8 +2178,8 @@ static void __init fixup_device_tree_efika(void)
2226 " new-device" 2178 " new-device"
2227 " 1 encode-int s\" #address-cells\" property" 2179 " 1 encode-int s\" #address-cells\" property"
2228 " 0 encode-int s\" #size-cells\" property" 2180 " 0 encode-int s\" #size-cells\" property"
2229 " s\" mdio\" 2dup device-name device-type" 2181 " s\" mdio\" device-name"
2230 " s\" mpc5200b-fec-phy\" encode-string" 2182 " s\" fsl,mpc5200b-mdio\" encode-string"
2231 " s\" compatible\" property" 2183 " s\" compatible\" property"
2232 " 0xf0003000 0x400 reg" 2184 " 0xf0003000 0x400 reg"
2233 " 0x2 encode-int" 2185 " 0x2 encode-int"
@@ -2237,8 +2189,10 @@ static void __init fixup_device_tree_efika(void)
2237 " finish-device"); 2189 " finish-device");
2238 }; 2190 };
2239 2191
2240 /* Make sure ethernet phy device node exist */ 2192 /* Check for a PHY device node - if missing then create one and
2241 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio/ethernet-phy")); 2193 * give it's phandle to the ethernet node */
2194 node = call_prom("finddevice", 1, 1,
2195 ADDR("/builtin/mdio/ethernet-phy"));
2242 if (!PHANDLE_VALID(node)) { 2196 if (!PHANDLE_VALID(node)) {
2243 prom_printf("Adding Ethernet PHY node\n"); 2197 prom_printf("Adding Ethernet PHY node\n");
2244 call_prom("interpret", 1, 1, 2198 call_prom("interpret", 1, 1,
@@ -2254,7 +2208,62 @@ static void __init fixup_device_tree_efika(void)
2254 " s\" phy-handle\" property" 2208 " s\" phy-handle\" property"
2255 " device-end"); 2209 " device-end");
2256 } 2210 }
2211}
2212
2213static void __init fixup_device_tree_efika(void)
2214{
2215 int sound_irq[3] = { 2, 2, 0 };
2216 int bcomm_irq[3*16] = { 3,0,0, 3,1,0, 3,2,0, 3,3,0,
2217 3,4,0, 3,5,0, 3,6,0, 3,7,0,
2218 3,8,0, 3,9,0, 3,10,0, 3,11,0,
2219 3,12,0, 3,13,0, 3,14,0, 3,15,0 };
2220 u32 node;
2221 char prop[64];
2222 int rv, len;
2223
2224 /* Check if we're really running on a EFIKA */
2225 node = call_prom("finddevice", 1, 1, ADDR("/"));
2226 if (!PHANDLE_VALID(node))
2227 return;
2228
2229 rv = prom_getprop(node, "model", prop, sizeof(prop));
2230 if (rv == PROM_ERROR)
2231 return;
2232 if (strcmp(prop, "EFIKA5K2"))
2233 return;
2234
2235 prom_printf("Applying EFIKA device tree fixups\n");
2236
2237 /* Claiming to be 'chrp' is death */
2238 node = call_prom("finddevice", 1, 1, ADDR("/"));
2239 rv = prom_getprop(node, "device_type", prop, sizeof(prop));
2240 if (rv != PROM_ERROR && (strcmp(prop, "chrp") == 0))
2241 prom_setprop(node, "/", "device_type", "efika", sizeof("efika"));
2242
2243 /* Fixup bestcomm interrupts property */
2244 node = call_prom("finddevice", 1, 1, ADDR("/builtin/bestcomm"));
2245 if (PHANDLE_VALID(node)) {
2246 len = prom_getproplen(node, "interrupts");
2247 if (len == 12) {
2248 prom_printf("Fixing bestcomm interrupts property\n");
2249 prom_setprop(node, "/builtin/bestcom", "interrupts",
2250 bcomm_irq, sizeof(bcomm_irq));
2251 }
2252 }
2253
2254 /* Fixup sound interrupts property */
2255 node = call_prom("finddevice", 1, 1, ADDR("/builtin/sound"));
2256 if (PHANDLE_VALID(node)) {
2257 rv = prom_getprop(node, "interrupts", prop, sizeof(prop));
2258 if (rv == PROM_ERROR) {
2259 prom_printf("Adding sound interrupts property\n");
2260 prom_setprop(node, "/builtin/sound", "interrupts",
2261 sound_irq, sizeof(sound_irq));
2262 }
2263 }
2257 2264
2265 /* Make sure ethernet phy-handle property exists */
2266 fixup_device_tree_efika_add_phy();
2258} 2267}
2259#else 2268#else
2260#define fixup_device_tree_efika() 2269#define fixup_device_tree_efika()
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index b5c96af955c6..90eb3a3e383e 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -273,7 +273,7 @@ int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq)
273#else 273#else
274 struct pci_controller *host; 274 struct pci_controller *host;
275 host = pci_bus_to_host(pdev->bus); 275 host = pci_bus_to_host(pdev->bus);
276 ppnode = host ? host->arch_data : NULL; 276 ppnode = host ? host->dn : NULL;
277#endif 277#endif
278 /* No node for host bridge ? give up */ 278 /* No node for host bridge ? give up */
279 if (ppnode == NULL) 279 if (ppnode == NULL)
@@ -419,7 +419,7 @@ static struct of_bus *of_match_bus(struct device_node *np)
419 419
420static int of_translate_one(struct device_node *parent, struct of_bus *bus, 420static int of_translate_one(struct device_node *parent, struct of_bus *bus,
421 struct of_bus *pbus, u32 *addr, 421 struct of_bus *pbus, u32 *addr,
422 int na, int ns, int pna) 422 int na, int ns, int pna, const char *rprop)
423{ 423{
424 const u32 *ranges; 424 const u32 *ranges;
425 unsigned int rlen; 425 unsigned int rlen;
@@ -438,7 +438,7 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
438 * to translate addresses that aren't supposed to be translated in 438 * to translate addresses that aren't supposed to be translated in
439 * the first place. --BenH. 439 * the first place. --BenH.
440 */ 440 */
441 ranges = of_get_property(parent, "ranges", &rlen); 441 ranges = of_get_property(parent, rprop, &rlen);
442 if (ranges == NULL || rlen == 0) { 442 if (ranges == NULL || rlen == 0) {
443 offset = of_read_number(addr, na); 443 offset = of_read_number(addr, na);
444 memset(addr, 0, pna * 4); 444 memset(addr, 0, pna * 4);
@@ -481,7 +481,8 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus,
481 * that can be mapped to a cpu physical address). This is not really specified 481 * that can be mapped to a cpu physical address). This is not really specified
482 * that way, but this is traditionally the way IBM at least do things 482 * that way, but this is traditionally the way IBM at least do things
483 */ 483 */
484u64 of_translate_address(struct device_node *dev, const u32 *in_addr) 484u64 __of_translate_address(struct device_node *dev, const u32 *in_addr,
485 const char *rprop)
485{ 486{
486 struct device_node *parent = NULL; 487 struct device_node *parent = NULL;
487 struct of_bus *bus, *pbus; 488 struct of_bus *bus, *pbus;
@@ -540,7 +541,7 @@ u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
540 pbus->name, pna, pns, parent->full_name); 541 pbus->name, pna, pns, parent->full_name);
541 542
542 /* Apply bus translation */ 543 /* Apply bus translation */
543 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna)) 544 if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
544 break; 545 break;
545 546
546 /* Complete the move up one level */ 547 /* Complete the move up one level */
@@ -556,8 +557,19 @@ u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
556 557
557 return result; 558 return result;
558} 559}
560
561u64 of_translate_address(struct device_node *dev, const u32 *in_addr)
562{
563 return __of_translate_address(dev, in_addr, "ranges");
564}
559EXPORT_SYMBOL(of_translate_address); 565EXPORT_SYMBOL(of_translate_address);
560 566
567u64 of_translate_dma_address(struct device_node *dev, const u32 *in_addr)
568{
569 return __of_translate_address(dev, in_addr, "dma-ranges");
570}
571EXPORT_SYMBOL(of_translate_dma_address);
572
561const u32 *of_get_address(struct device_node *dev, int index, u64 *size, 573const u32 *of_get_address(struct device_node *dev, int index, u64 *size,
562 unsigned int *flags) 574 unsigned int *flags)
563{ 575{
diff --git a/arch/ppc/kernel/rio.c b/arch/powerpc/kernel/rio.c
index 29487fedfc76..29487fedfc76 100644
--- a/arch/ppc/kernel/rio.c
+++ b/arch/powerpc/kernel/rio.c
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 21f14e57d1f3..433a0a0949fb 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -260,7 +260,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
260 260
261int __devinit rtas_setup_phb(struct pci_controller *phb) 261int __devinit rtas_setup_phb(struct pci_controller *phb)
262{ 262{
263 struct device_node *dev = phb->arch_data; 263 struct device_node *dev = phb->dn;
264 264
265 if (is_python(dev)) 265 if (is_python(dev))
266 python_countermeasures(dev); 266 python_countermeasures(dev);
@@ -280,10 +280,7 @@ void __init find_and_init_phbs(void)
280 struct pci_controller *phb; 280 struct pci_controller *phb;
281 struct device_node *root = of_find_node_by_path("/"); 281 struct device_node *root = of_find_node_by_path("/");
282 282
283 for (node = of_get_next_child(root, NULL); 283 for_each_child_of_node(root, node) {
284 node != NULL;
285 node = of_get_next_child(root, node)) {
286
287 if (node->type == NULL || (strcmp(node->type, "pci") != 0 && 284 if (node->type == NULL || (strcmp(node->type, "pci") != 0 &&
288 strcmp(node->type, "pciex") != 0)) 285 strcmp(node->type, "pciex") != 0))
289 continue; 286 continue;
@@ -311,10 +308,12 @@ void __init find_and_init_phbs(void)
311 if (prop) 308 if (prop)
312 pci_probe_only = *prop; 309 pci_probe_only = *prop;
313 310
311#ifdef CONFIG_PPC32 /* Will be made generic soon */
314 prop = of_get_property(of_chosen, 312 prop = of_get_property(of_chosen,
315 "linux,pci-assign-all-buses", NULL); 313 "linux,pci-assign-all-buses", NULL);
316 if (prop) 314 if (prop && *prop)
317 pci_assign_all_buses = *prop; 315 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
316#endif /* CONFIG_PPC32 */
318 } 317 }
319} 318}
320 319
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 2de00f870edc..6adb5a1e98bb 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,6 +33,7 @@
33#include <linux/serial.h> 33#include <linux/serial.h>
34#include <linux/serial_8250.h> 34#include <linux/serial_8250.h>
35#include <linux/debugfs.h> 35#include <linux/debugfs.h>
36#include <linux/percpu.h>
36#include <asm/io.h> 37#include <asm/io.h>
37#include <asm/prom.h> 38#include <asm/prom.h>
38#include <asm/processor.h> 39#include <asm/processor.h>
@@ -57,6 +58,7 @@
57#include <asm/mmu.h> 58#include <asm/mmu.h>
58#include <asm/lmb.h> 59#include <asm/lmb.h>
59#include <asm/xmon.h> 60#include <asm/xmon.h>
61#include <asm/cputhreads.h>
60 62
61#include "setup.h" 63#include "setup.h"
62 64
@@ -327,6 +329,31 @@ void __init check_for_initrd(void)
327 329
328#ifdef CONFIG_SMP 330#ifdef CONFIG_SMP
329 331
332int threads_per_core, threads_shift;
333cpumask_t threads_core_mask;
334
335static void __init cpu_init_thread_core_maps(int tpc)
336{
337 int i;
338
339 threads_per_core = tpc;
340 threads_core_mask = CPU_MASK_NONE;
341
342 /* This implementation only supports power of 2 number of threads
343 * for simplicity and performance
344 */
345 threads_shift = ilog2(tpc);
346 BUG_ON(tpc != (1 << threads_shift));
347
348 for (i = 0; i < tpc; i++)
349 cpu_set(i, threads_core_mask);
350
351 printk(KERN_INFO "CPU maps initialized for %d thread%s per core\n",
352 tpc, tpc > 1 ? "s" : "");
353 printk(KERN_DEBUG " (thread shift is %d)\n", threads_shift);
354}
355
356
330/** 357/**
331 * setup_cpu_maps - initialize the following cpu maps: 358 * setup_cpu_maps - initialize the following cpu maps:
332 * cpu_possible_map 359 * cpu_possible_map
@@ -350,22 +377,32 @@ void __init smp_setup_cpu_maps(void)
350{ 377{
351 struct device_node *dn = NULL; 378 struct device_node *dn = NULL;
352 int cpu = 0; 379 int cpu = 0;
380 int nthreads = 1;
381
382 DBG("smp_setup_cpu_maps()\n");
353 383
354 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) { 384 while ((dn = of_find_node_by_type(dn, "cpu")) && cpu < NR_CPUS) {
355 const int *intserv; 385 const int *intserv;
356 int j, len = sizeof(u32), nthreads = 1; 386 int j, len;
387
388 DBG(" * %s...\n", dn->full_name);
357 389
358 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s", 390 intserv = of_get_property(dn, "ibm,ppc-interrupt-server#s",
359 &len); 391 &len);
360 if (intserv) 392 if (intserv) {
361 nthreads = len / sizeof(int); 393 nthreads = len / sizeof(int);
362 else { 394 DBG(" ibm,ppc-interrupt-server#s -> %d threads\n",
395 nthreads);
396 } else {
397 DBG(" no ibm,ppc-interrupt-server#s -> 1 thread\n");
363 intserv = of_get_property(dn, "reg", NULL); 398 intserv = of_get_property(dn, "reg", NULL);
364 if (!intserv) 399 if (!intserv)
365 intserv = &cpu; /* assume logical == phys */ 400 intserv = &cpu; /* assume logical == phys */
366 } 401 }
367 402
368 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) { 403 for (j = 0; j < nthreads && cpu < NR_CPUS; j++) {
404 DBG(" thread %d -> cpu %d (hard id %d)\n",
405 j, cpu, intserv[j]);
369 cpu_set(cpu, cpu_present_map); 406 cpu_set(cpu, cpu_present_map);
370 set_hard_smp_processor_id(cpu, intserv[j]); 407 set_hard_smp_processor_id(cpu, intserv[j]);
371 cpu_set(cpu, cpu_possible_map); 408 cpu_set(cpu, cpu_possible_map);
@@ -373,6 +410,12 @@ void __init smp_setup_cpu_maps(void)
373 } 410 }
374 } 411 }
375 412
413 /* If no SMT supported, nthreads is forced to 1 */
414 if (!cpu_has_feature(CPU_FTR_SMT)) {
415 DBG(" SMT disabled ! nthreads forced to 1\n");
416 nthreads = 1;
417 }
418
376#ifdef CONFIG_PPC64 419#ifdef CONFIG_PPC64
377 /* 420 /*
378 * On pSeries LPAR, we need to know how many cpus 421 * On pSeries LPAR, we need to know how many cpus
@@ -395,7 +438,7 @@ void __init smp_setup_cpu_maps(void)
395 438
396 /* Double maxcpus for processors which have SMT capability */ 439 /* Double maxcpus for processors which have SMT capability */
397 if (cpu_has_feature(CPU_FTR_SMT)) 440 if (cpu_has_feature(CPU_FTR_SMT))
398 maxcpus *= 2; 441 maxcpus *= nthreads;
399 442
400 if (maxcpus > NR_CPUS) { 443 if (maxcpus > NR_CPUS) {
401 printk(KERN_WARNING 444 printk(KERN_WARNING
@@ -412,9 +455,16 @@ void __init smp_setup_cpu_maps(void)
412 out: 455 out:
413 of_node_put(dn); 456 of_node_put(dn);
414 } 457 }
415
416 vdso_data->processorCount = num_present_cpus(); 458 vdso_data->processorCount = num_present_cpus();
417#endif /* CONFIG_PPC64 */ 459#endif /* CONFIG_PPC64 */
460
461 /* Initialize CPU <=> thread mapping/
462 *
463 * WARNING: We assume that the number of threads is the same for
464 * every CPU in the system. If that is not the case, then some code
465 * here will have to be reworked
466 */
467 cpu_init_thread_core_maps(nthreads);
418} 468}
419 469
420/* 470/*
@@ -424,17 +474,19 @@ void __init smp_setup_cpu_maps(void)
424 */ 474 */
425void __init smp_setup_cpu_sibling_map(void) 475void __init smp_setup_cpu_sibling_map(void)
426{ 476{
427#if defined(CONFIG_PPC64) 477#ifdef CONFIG_PPC64
428 int cpu; 478 int i, cpu, base;
429 479
430 /*
431 * Do the sibling map; assume only two threads per processor.
432 */
433 for_each_possible_cpu(cpu) { 480 for_each_possible_cpu(cpu) {
434 cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); 481 DBG("Sibling map for CPU %d:", cpu);
435 if (cpu_has_feature(CPU_FTR_SMT)) 482 base = cpu_first_thread_in_core(cpu);
436 cpu_set(cpu ^ 0x1, per_cpu(cpu_sibling_map, cpu)); 483 for (i = 0; i < threads_per_core; i++) {
484 cpu_set(base + i, per_cpu(cpu_sibling_map, cpu));
485 DBG(" %d", base + i);
486 }
487 DBG("\n");
437 } 488 }
489
438#endif /* CONFIG_PPC64 */ 490#endif /* CONFIG_PPC64 */
439} 491}
440#endif /* CONFIG_SMP */ 492#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index 6126bca8b70a..d840bc772fd3 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -24,13 +24,12 @@
24#include <linux/signal.h> 24#include <linux/signal.h>
25#include <linux/errno.h> 25#include <linux/errno.h>
26#include <linux/elf.h> 26#include <linux/elf.h>
27#include <linux/ptrace.h>
27#ifdef CONFIG_PPC64 28#ifdef CONFIG_PPC64
28#include <linux/syscalls.h> 29#include <linux/syscalls.h>
29#include <linux/compat.h> 30#include <linux/compat.h>
30#include <linux/ptrace.h>
31#else 31#else
32#include <linux/wait.h> 32#include <linux/wait.h>
33#include <linux/ptrace.h>
34#include <linux/unistd.h> 33#include <linux/unistd.h>
35#include <linux/stddef.h> 34#include <linux/stddef.h>
36#include <linux/tty.h> 35#include <linux/tty.h>
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 338950aeb6f6..be35ffae10f0 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -76,6 +76,8 @@ void smp_call_function_interrupt(void);
76 76
77int smt_enabled_at_boot = 1; 77int smt_enabled_at_boot = 1;
78 78
79static int ipi_fail_ok;
80
79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 81static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
80 82
81#ifdef CONFIG_PPC64 83#ifdef CONFIG_PPC64
@@ -181,12 +183,13 @@ static struct call_data_struct {
181 * <wait> If true, wait (atomically) until function has completed on other CPUs. 183 * <wait> If true, wait (atomically) until function has completed on other CPUs.
182 * [RETURNS] 0 on success, else a negative status code. Does not return until 184 * [RETURNS] 0 on success, else a negative status code. Does not return until
183 * remote CPUs are nearly ready to execute <<func>> or are or have executed. 185 * remote CPUs are nearly ready to execute <<func>> or are or have executed.
186 * <map> is a cpu map of the cpus to send IPI to.
184 * 187 *
185 * You must not call this function with disabled interrupts or from a 188 * You must not call this function with disabled interrupts or from a
186 * hardware interrupt handler or from a bottom half handler. 189 * hardware interrupt handler or from a bottom half handler.
187 */ 190 */
188int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic, 191static int __smp_call_function_map(void (*func) (void *info), void *info,
189 int wait, cpumask_t map) 192 int nonatomic, int wait, cpumask_t map)
190{ 193{
191 struct call_data_struct data; 194 struct call_data_struct data;
192 int ret = -1, num_cpus; 195 int ret = -1, num_cpus;
@@ -203,8 +206,6 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
203 if (wait) 206 if (wait)
204 atomic_set(&data.finished, 0); 207 atomic_set(&data.finished, 0);
205 208
206 spin_lock(&call_lock);
207
208 /* remove 'self' from the map */ 209 /* remove 'self' from the map */
209 if (cpu_isset(smp_processor_id(), map)) 210 if (cpu_isset(smp_processor_id(), map))
210 cpu_clear(smp_processor_id(), map); 211 cpu_clear(smp_processor_id(), map);
@@ -231,7 +232,8 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
231 printk("smp_call_function on cpu %d: other cpus not " 232 printk("smp_call_function on cpu %d: other cpus not "
232 "responding (%d)\n", smp_processor_id(), 233 "responding (%d)\n", smp_processor_id(),
233 atomic_read(&data.started)); 234 atomic_read(&data.started));
234 debugger(NULL); 235 if (!ipi_fail_ok)
236 debugger(NULL);
235 goto out; 237 goto out;
236 } 238 }
237 } 239 }
@@ -258,14 +260,18 @@ int smp_call_function_map(void (*func) (void *info), void *info, int nonatomic,
258 out: 260 out:
259 call_data = NULL; 261 call_data = NULL;
260 HMT_medium(); 262 HMT_medium();
261 spin_unlock(&call_lock);
262 return ret; 263 return ret;
263} 264}
264 265
265static int __smp_call_function(void (*func)(void *info), void *info, 266static int __smp_call_function(void (*func)(void *info), void *info,
266 int nonatomic, int wait) 267 int nonatomic, int wait)
267{ 268{
268 return smp_call_function_map(func,info,nonatomic,wait,cpu_online_map); 269 int ret;
270 spin_lock(&call_lock);
271 ret =__smp_call_function_map(func, info, nonatomic, wait,
272 cpu_online_map);
273 spin_unlock(&call_lock);
274 return ret;
269} 275}
270 276
271int smp_call_function(void (*func) (void *info), void *info, int nonatomic, 277int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
@@ -278,8 +284,8 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
278} 284}
279EXPORT_SYMBOL(smp_call_function); 285EXPORT_SYMBOL(smp_call_function);
280 286
281int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int nonatomic, 287int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
282 int wait) 288 int nonatomic, int wait)
283{ 289{
284 cpumask_t map = CPU_MASK_NONE; 290 cpumask_t map = CPU_MASK_NONE;
285 int ret = 0; 291 int ret = 0;
@@ -291,9 +297,11 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int
291 return -EINVAL; 297 return -EINVAL;
292 298
293 cpu_set(cpu, map); 299 cpu_set(cpu, map);
294 if (cpu != get_cpu()) 300 if (cpu != get_cpu()) {
295 ret = smp_call_function_map(func,info,nonatomic,wait,map); 301 spin_lock(&call_lock);
296 else { 302 ret = __smp_call_function_map(func, info, nonatomic, wait, map);
303 spin_unlock(&call_lock);
304 } else {
297 local_irq_disable(); 305 local_irq_disable();
298 func(info); 306 func(info);
299 local_irq_enable(); 307 local_irq_enable();
@@ -305,7 +313,22 @@ EXPORT_SYMBOL(smp_call_function_single);
305 313
306void smp_send_stop(void) 314void smp_send_stop(void)
307{ 315{
308 __smp_call_function(stop_this_cpu, NULL, 1, 0); 316 int nolock;
317
318 /* It's OK to fail sending the IPI, since the alternative is to
319 * be stuck forever waiting on the other CPU to take the interrupt.
320 *
321 * It's better to at least continue and go through reboot, since this
322 * function is usually called at panic or reboot time in the first
323 * place.
324 */
325 ipi_fail_ok = 1;
326
327 /* Don't deadlock in case we got called through panic */
328 nolock = !spin_trylock(&call_lock);
329 __smp_call_function_map(stop_this_cpu, NULL, 1, 0, cpu_online_map);
330 if (!nolock)
331 spin_unlock(&call_lock);
309} 332}
310 333
311void smp_call_function_interrupt(void) 334void smp_call_function_interrupt(void)
diff --git a/arch/powerpc/kernel/systbl_chk.c b/arch/powerpc/kernel/systbl_chk.c
new file mode 100644
index 000000000000..238aa63ced8f
--- /dev/null
+++ b/arch/powerpc/kernel/systbl_chk.c
@@ -0,0 +1,58 @@
1/*
2 * This file, when run through CPP produces a list of syscall numbers
3 * in the order of systbl.h. That way we can check for gaps and syscalls
4 * that are out of order.
5 *
6 * Unfortunately, we cannot check for the correct ordering of entries
7 * using SYSX().
8 *
9 * Copyright © IBM Corporation
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
15 */
16#include <asm/unistd.h>
17
18#define SYSCALL(func) __NR_##func
19#define COMPAT_SYS(func) __NR_##func
20#define PPC_SYS(func) __NR_##func
21#ifdef CONFIG_PPC64
22#define OLDSYS(func) -1
23#define SYS32ONLY(func) -1
24#else
25#define OLDSYS(func) __NR_old##func
26#define SYS32ONLY(func) __NR_##func
27#endif
28#define SYSX(f, f3264, f32) -1
29
30#define SYSCALL_SPU(func) SYSCALL(func)
31#define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
32#define PPC_SYS_SPU(func) PPC_SYS(func)
33#define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
34
35/* Just insert a marker for ni_syscalls */
36#define __NR_ni_syscall -1
37
38/*
39 * These are the known exceptions.
40 * Hopefully, there will be no more.
41 */
42#define __NR_llseek __NR__llseek
43#undef __NR_umount
44#define __NR_umount __NR_umount2
45#define __NR_old_getrlimit __NR_getrlimit
46#define __NR_newstat __NR_stat
47#define __NR_newlstat __NR_lstat
48#define __NR_newfstat __NR_fstat
49#define __NR_newuname __NR_uname
50#define __NR_sysctl __NR__sysctl
51#define __NR_olddebug_setcontext __NR_sys_debug_setcontext
52
53/* We call sys_ugetrlimit for syscall number __NR_getrlimit */
54#define getrlimit ugetrlimit
55
56START_TABLE
57#include <asm/systbl.h>
58END_TABLE __NR_syscalls
diff --git a/arch/powerpc/kernel/systbl_chk.sh b/arch/powerpc/kernel/systbl_chk.sh
new file mode 100644
index 000000000000..19415e7674a5
--- /dev/null
+++ b/arch/powerpc/kernel/systbl_chk.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2#
3# Just process the CPP output from systbl_chk.c and complain
4# if anything is out of order.
5#
6# Copyright © 2008 IBM Corporation
7#
8# This program is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License
10# as published by the Free Software Foundation; either version
11# 2 of the License, or (at your option) any later version.
12
13awk 'BEGIN { num = -1; } # Ignore the beginning of the file
14 /^#/ { next; }
15 /^[ \t]*$/ { next; }
16 /^START_TABLE/ { num = 0; next; }
17 /^END_TABLE/ {
18 if (num != $2) {
19 printf "__NR_syscalls (%s) is not one more than the last syscall (%s)\n",
20 $2, num - 1;
21 exit(1);
22 }
23 num = -1; # Ignore the rest of the file
24 }
25 {
26 if (num == -1) next;
27 if (($1 != -1) && ($1 != num)) {
28 printf "Syscall %s out of order (expected %s)\n",
29 $1, num;
30 exit(1);
31 };
32 num++;
33 }' "$1"
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index a925a8eae121..5cd3db5cae41 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -116,9 +116,12 @@ static struct clock_event_device decrementer_clockevent = {
116 .features = CLOCK_EVT_FEAT_ONESHOT, 116 .features = CLOCK_EVT_FEAT_ONESHOT,
117}; 117};
118 118
119static DEFINE_PER_CPU(struct clock_event_device, decrementers); 119struct decrementer_clock {
120void init_decrementer_clockevent(void); 120 struct clock_event_device event;
121static DEFINE_PER_CPU(u64, decrementer_next_tb); 121 u64 next_tb;
122};
123
124static DEFINE_PER_CPU(struct decrementer_clock, decrementers);
122 125
123#ifdef CONFIG_PPC_ISERIES 126#ifdef CONFIG_PPC_ISERIES
124static unsigned long __initdata iSeries_recal_titan; 127static unsigned long __initdata iSeries_recal_titan;
@@ -216,7 +219,11 @@ static u64 read_purr(void)
216 */ 219 */
217static u64 read_spurr(u64 purr) 220static u64 read_spurr(u64 purr)
218{ 221{
219 if (cpu_has_feature(CPU_FTR_SPURR)) 222 /*
223 * cpus without PURR won't have a SPURR
224 * We already know the former when we use this, so tell gcc
225 */
226 if (cpu_has_feature(CPU_FTR_PURR) && cpu_has_feature(CPU_FTR_SPURR))
220 return mfspr(SPRN_SPURR); 227 return mfspr(SPRN_SPURR);
221 return purr; 228 return purr;
222} 229}
@@ -227,29 +234,30 @@ static u64 read_spurr(u64 purr)
227 */ 234 */
228void account_system_vtime(struct task_struct *tsk) 235void account_system_vtime(struct task_struct *tsk)
229{ 236{
230 u64 now, nowscaled, delta, deltascaled; 237 u64 now, nowscaled, delta, deltascaled, sys_time;
231 unsigned long flags; 238 unsigned long flags;
232 239
233 local_irq_save(flags); 240 local_irq_save(flags);
234 now = read_purr(); 241 now = read_purr();
235 delta = now - get_paca()->startpurr;
236 get_paca()->startpurr = now;
237 nowscaled = read_spurr(now); 242 nowscaled = read_spurr(now);
243 delta = now - get_paca()->startpurr;
238 deltascaled = nowscaled - get_paca()->startspurr; 244 deltascaled = nowscaled - get_paca()->startspurr;
245 get_paca()->startpurr = now;
239 get_paca()->startspurr = nowscaled; 246 get_paca()->startspurr = nowscaled;
240 if (!in_interrupt()) { 247 if (!in_interrupt()) {
241 /* deltascaled includes both user and system time. 248 /* deltascaled includes both user and system time.
242 * Hence scale it based on the purr ratio to estimate 249 * Hence scale it based on the purr ratio to estimate
243 * the system time */ 250 * the system time */
251 sys_time = get_paca()->system_time;
244 if (get_paca()->user_time) 252 if (get_paca()->user_time)
245 deltascaled = deltascaled * get_paca()->system_time / 253 deltascaled = deltascaled * sys_time /
246 (get_paca()->system_time + get_paca()->user_time); 254 (sys_time + get_paca()->user_time);
247 delta += get_paca()->system_time; 255 delta += sys_time;
248 get_paca()->system_time = 0; 256 get_paca()->system_time = 0;
249 } 257 }
250 account_system_time(tsk, 0, delta); 258 account_system_time(tsk, 0, delta);
251 get_paca()->purrdelta = delta;
252 account_system_time_scaled(tsk, deltascaled); 259 account_system_time_scaled(tsk, deltascaled);
260 get_paca()->purrdelta = delta;
253 get_paca()->spurrdelta = deltascaled; 261 get_paca()->spurrdelta = deltascaled;
254 local_irq_restore(flags); 262 local_irq_restore(flags);
255} 263}
@@ -326,11 +334,9 @@ void calculate_steal_time(void)
326 s64 stolen; 334 s64 stolen;
327 struct cpu_purr_data *pme; 335 struct cpu_purr_data *pme;
328 336
329 if (!cpu_has_feature(CPU_FTR_PURR)) 337 pme = &__get_cpu_var(cpu_purr_data);
330 return;
331 pme = &per_cpu(cpu_purr_data, smp_processor_id());
332 if (!pme->initialized) 338 if (!pme->initialized)
333 return; /* this can happen in early boot */ 339 return; /* !CPU_FTR_PURR or early in early boot */
334 tb = mftb(); 340 tb = mftb();
335 purr = mfspr(SPRN_PURR); 341 purr = mfspr(SPRN_PURR);
336 stolen = (tb - pme->tb) - (purr - pme->purr); 342 stolen = (tb - pme->tb) - (purr - pme->purr);
@@ -353,7 +359,7 @@ static void snapshot_purr(void)
353 if (!cpu_has_feature(CPU_FTR_PURR)) 359 if (!cpu_has_feature(CPU_FTR_PURR))
354 return; 360 return;
355 local_irq_save(flags); 361 local_irq_save(flags);
356 pme = &per_cpu(cpu_purr_data, smp_processor_id()); 362 pme = &__get_cpu_var(cpu_purr_data);
357 pme->tb = mftb(); 363 pme->tb = mftb();
358 pme->purr = mfspr(SPRN_PURR); 364 pme->purr = mfspr(SPRN_PURR);
359 pme->initialized = 1; 365 pme->initialized = 1;
@@ -556,8 +562,8 @@ void __init iSeries_time_init_early(void)
556void timer_interrupt(struct pt_regs * regs) 562void timer_interrupt(struct pt_regs * regs)
557{ 563{
558 struct pt_regs *old_regs; 564 struct pt_regs *old_regs;
559 int cpu = smp_processor_id(); 565 struct decrementer_clock *decrementer = &__get_cpu_var(decrementers);
560 struct clock_event_device *evt = &per_cpu(decrementers, cpu); 566 struct clock_event_device *evt = &decrementer->event;
561 u64 now; 567 u64 now;
562 568
563 /* Ensure a positive value is written to the decrementer, or else 569 /* Ensure a positive value is written to the decrementer, or else
@@ -570,9 +576,9 @@ void timer_interrupt(struct pt_regs * regs)
570#endif 576#endif
571 577
572 now = get_tb_or_rtc(); 578 now = get_tb_or_rtc();
573 if (now < per_cpu(decrementer_next_tb, cpu)) { 579 if (now < decrementer->next_tb) {
574 /* not time for this event yet */ 580 /* not time for this event yet */
575 now = per_cpu(decrementer_next_tb, cpu) - now; 581 now = decrementer->next_tb - now;
576 if (now <= DECREMENTER_MAX) 582 if (now <= DECREMENTER_MAX)
577 set_dec((int)now); 583 set_dec((int)now);
578 return; 584 return;
@@ -623,6 +629,45 @@ void wakeup_decrementer(void)
623 set_dec(ticks); 629 set_dec(ticks);
624} 630}
625 631
632#ifdef CONFIG_SUSPEND
633void generic_suspend_disable_irqs(void)
634{
635 preempt_disable();
636
637 /* Disable the decrementer, so that it doesn't interfere
638 * with suspending.
639 */
640
641 set_dec(0x7fffffff);
642 local_irq_disable();
643 set_dec(0x7fffffff);
644}
645
646void generic_suspend_enable_irqs(void)
647{
648 wakeup_decrementer();
649
650 local_irq_enable();
651 preempt_enable();
652}
653
654/* Overrides the weak version in kernel/power/main.c */
655void arch_suspend_disable_irqs(void)
656{
657 if (ppc_md.suspend_disable_irqs)
658 ppc_md.suspend_disable_irqs();
659 generic_suspend_disable_irqs();
660}
661
662/* Overrides the weak version in kernel/power/main.c */
663void arch_suspend_enable_irqs(void)
664{
665 generic_suspend_enable_irqs();
666 if (ppc_md.suspend_enable_irqs)
667 ppc_md.suspend_enable_irqs();
668}
669#endif
670
626#ifdef CONFIG_SMP 671#ifdef CONFIG_SMP
627void __init smp_space_timers(unsigned int max_cpus) 672void __init smp_space_timers(unsigned int max_cpus)
628{ 673{
@@ -811,7 +856,7 @@ void __init clocksource_init(void)
811static int decrementer_set_next_event(unsigned long evt, 856static int decrementer_set_next_event(unsigned long evt,
812 struct clock_event_device *dev) 857 struct clock_event_device *dev)
813{ 858{
814 __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt; 859 __get_cpu_var(decrementers).next_tb = get_tb_or_rtc() + evt;
815 set_dec(evt); 860 set_dec(evt);
816 return 0; 861 return 0;
817} 862}
@@ -825,7 +870,7 @@ static void decrementer_set_mode(enum clock_event_mode mode,
825 870
826static void register_decrementer_clockevent(int cpu) 871static void register_decrementer_clockevent(int cpu)
827{ 872{
828 struct clock_event_device *dec = &per_cpu(decrementers, cpu); 873 struct clock_event_device *dec = &per_cpu(decrementers, cpu).event;
829 874
830 *dec = decrementer_clockevent; 875 *dec = decrementer_clockevent;
831 dec->cpumask = cpumask_of_cpu(cpu); 876 dec->cpumask = cpumask_of_cpu(cpu);
@@ -836,7 +881,7 @@ static void register_decrementer_clockevent(int cpu)
836 clockevents_register_device(dec); 881 clockevents_register_device(dec);
837} 882}
838 883
839void init_decrementer_clockevent(void) 884static void __init init_decrementer_clockevent(void)
840{ 885{
841 int cpu = smp_processor_id(); 886 int cpu = smp_processor_id();
842 887
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 59c464e26f38..848a20475db8 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -334,18 +334,25 @@ static inline int check_io_access(struct pt_regs *regs)
334#define clear_single_step(regs) ((regs)->msr &= ~MSR_SE) 334#define clear_single_step(regs) ((regs)->msr &= ~MSR_SE)
335#endif 335#endif
336 336
337static int generic_machine_check_exception(struct pt_regs *regs) 337#if defined(CONFIG_4xx)
338int machine_check_4xx(struct pt_regs *regs)
338{ 339{
339 unsigned long reason = get_mc_reason(regs); 340 unsigned long reason = get_mc_reason(regs);
340 341
341#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
342 if (reason & ESR_IMCP) { 342 if (reason & ESR_IMCP) {
343 printk("Instruction"); 343 printk("Instruction");
344 mtspr(SPRN_ESR, reason & ~ESR_IMCP); 344 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
345 } else 345 } else
346 printk("Data"); 346 printk("Data");
347 printk(" machine check in kernel mode.\n"); 347 printk(" machine check in kernel mode.\n");
348#elif defined(CONFIG_440A) 348
349 return 0;
350}
351
352int machine_check_440A(struct pt_regs *regs)
353{
354 unsigned long reason = get_mc_reason(regs);
355
349 printk("Machine check in kernel mode.\n"); 356 printk("Machine check in kernel mode.\n");
350 if (reason & ESR_IMCP){ 357 if (reason & ESR_IMCP){
351 printk("Instruction Synchronous Machine Check exception\n"); 358 printk("Instruction Synchronous Machine Check exception\n");
@@ -375,7 +382,13 @@ static int generic_machine_check_exception(struct pt_regs *regs)
375 /* Clear MCSR */ 382 /* Clear MCSR */
376 mtspr(SPRN_MCSR, mcsr); 383 mtspr(SPRN_MCSR, mcsr);
377 } 384 }
378#elif defined (CONFIG_E500) 385 return 0;
386}
387#elif defined(CONFIG_E500)
388int machine_check_e500(struct pt_regs *regs)
389{
390 unsigned long reason = get_mc_reason(regs);
391
379 printk("Machine check in kernel mode.\n"); 392 printk("Machine check in kernel mode.\n");
380 printk("Caused by (from MCSR=%lx): ", reason); 393 printk("Caused by (from MCSR=%lx): ", reason);
381 394
@@ -403,7 +416,14 @@ static int generic_machine_check_exception(struct pt_regs *regs)
403 printk("Bus - Instruction Parity Error\n"); 416 printk("Bus - Instruction Parity Error\n");
404 if (reason & MCSR_BUS_RPERR) 417 if (reason & MCSR_BUS_RPERR)
405 printk("Bus - Read Parity Error\n"); 418 printk("Bus - Read Parity Error\n");
406#elif defined (CONFIG_E200) 419
420 return 0;
421}
422#elif defined(CONFIG_E200)
423int machine_check_e200(struct pt_regs *regs)
424{
425 unsigned long reason = get_mc_reason(regs);
426
407 printk("Machine check in kernel mode.\n"); 427 printk("Machine check in kernel mode.\n");
408 printk("Caused by (from MCSR=%lx): ", reason); 428 printk("Caused by (from MCSR=%lx): ", reason);
409 429
@@ -421,7 +441,14 @@ static int generic_machine_check_exception(struct pt_regs *regs)
421 printk("Bus - Read Bus Error on data load\n"); 441 printk("Bus - Read Bus Error on data load\n");
422 if (reason & MCSR_BUS_WRERR) 442 if (reason & MCSR_BUS_WRERR)
423 printk("Bus - Write Bus Error on buffered store or cache line push\n"); 443 printk("Bus - Write Bus Error on buffered store or cache line push\n");
424#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */ 444
445 return 0;
446}
447#else
448int machine_check_generic(struct pt_regs *regs)
449{
450 unsigned long reason = get_mc_reason(regs);
451
425 printk("Machine check in kernel mode.\n"); 452 printk("Machine check in kernel mode.\n");
426 printk("Caused by (from SRR1=%lx): ", reason); 453 printk("Caused by (from SRR1=%lx): ", reason);
427 switch (reason & 0x601F0000) { 454 switch (reason & 0x601F0000) {
@@ -451,22 +478,26 @@ static int generic_machine_check_exception(struct pt_regs *regs)
451 default: 478 default:
452 printk("Unknown values in msr\n"); 479 printk("Unknown values in msr\n");
453 } 480 }
454#endif /* CONFIG_4xx */
455
456 return 0; 481 return 0;
457} 482}
483#endif /* everything else */
458 484
459void machine_check_exception(struct pt_regs *regs) 485void machine_check_exception(struct pt_regs *regs)
460{ 486{
461 int recover = 0; 487 int recover = 0;
462 488
463 /* See if any machine dependent calls */ 489 /* See if any machine dependent calls. In theory, we would want
490 * to call the CPU first, and call the ppc_md. one if the CPU
491 * one returns a positive number. However there is existing code
492 * that assumes the board gets a first chance, so let's keep it
493 * that way for now and fix things later. --BenH.
494 */
464 if (ppc_md.machine_check_exception) 495 if (ppc_md.machine_check_exception)
465 recover = ppc_md.machine_check_exception(regs); 496 recover = ppc_md.machine_check_exception(regs);
466 else 497 else if (cur_cpu_spec->machine_check)
467 recover = generic_machine_check_exception(regs); 498 recover = cur_cpu_spec->machine_check(regs);
468 499
469 if (recover) 500 if (recover > 0)
470 return; 501 return;
471 502
472 if (user_mode(regs)) { 503 if (user_mode(regs)) {
@@ -476,7 +507,12 @@ void machine_check_exception(struct pt_regs *regs)
476 } 507 }
477 508
478#if defined(CONFIG_8xx) && defined(CONFIG_PCI) 509#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
479 /* the qspan pci read routines can cause machine checks -- Cort */ 510 /* the qspan pci read routines can cause machine checks -- Cort
511 *
512 * yuck !!! that totally needs to go away ! There are better ways
513 * to deal with that than having a wart in the mcheck handler.
514 * -- BenH
515 */
480 bad_page_fault(regs, regs->dar, SIGBUS); 516 bad_page_fault(regs, regs->dar, SIGBUS);
481 return; 517 return;
482#endif 518#endif
@@ -622,6 +658,9 @@ static void parse_fpe(struct pt_regs *regs)
622#define INST_POPCNTB 0x7c0000f4 658#define INST_POPCNTB 0x7c0000f4
623#define INST_POPCNTB_MASK 0xfc0007fe 659#define INST_POPCNTB_MASK 0xfc0007fe
624 660
661#define INST_ISEL 0x7c00001e
662#define INST_ISEL_MASK 0xfc00003e
663
625static int emulate_string_inst(struct pt_regs *regs, u32 instword) 664static int emulate_string_inst(struct pt_regs *regs, u32 instword)
626{ 665{
627 u8 rT = (instword >> 21) & 0x1f; 666 u8 rT = (instword >> 21) & 0x1f;
@@ -707,6 +746,23 @@ static int emulate_popcntb_inst(struct pt_regs *regs, u32 instword)
707 return 0; 746 return 0;
708} 747}
709 748
749static int emulate_isel(struct pt_regs *regs, u32 instword)
750{
751 u8 rT = (instword >> 21) & 0x1f;
752 u8 rA = (instword >> 16) & 0x1f;
753 u8 rB = (instword >> 11) & 0x1f;
754 u8 BC = (instword >> 6) & 0x1f;
755 u8 bit;
756 unsigned long tmp;
757
758 tmp = (rA == 0) ? 0 : regs->gpr[rA];
759 bit = (regs->ccr >> (31 - BC)) & 0x1;
760
761 regs->gpr[rT] = bit ? tmp : regs->gpr[rB];
762
763 return 0;
764}
765
710static int emulate_instruction(struct pt_regs *regs) 766static int emulate_instruction(struct pt_regs *regs)
711{ 767{
712 u32 instword; 768 u32 instword;
@@ -749,6 +805,11 @@ static int emulate_instruction(struct pt_regs *regs)
749 return emulate_popcntb_inst(regs, instword); 805 return emulate_popcntb_inst(regs, instword);
750 } 806 }
751 807
808 /* Emulate isel (Integer Select) instruction */
809 if ((instword & INST_ISEL_MASK) == INST_ISEL) {
810 return emulate_isel(regs, instword);
811 }
812
752 return -EINVAL; 813 return -EINVAL;
753} 814}
754 815
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index d723070c9a33..7aad6203e411 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -54,9 +54,16 @@ void __init udbg_early_init(void)
54#elif defined(CONFIG_PPC_EARLY_DEBUG_44x) 54#elif defined(CONFIG_PPC_EARLY_DEBUG_44x)
55 /* PPC44x debug */ 55 /* PPC44x debug */
56 udbg_init_44x_as1(); 56 udbg_init_44x_as1();
57#elif defined(CONFIG_PPC_EARLY_DEBUG_40x)
58 /* PPC40x debug */
59 udbg_init_40x_realmode();
57#elif defined(CONFIG_PPC_EARLY_DEBUG_CPM) 60#elif defined(CONFIG_PPC_EARLY_DEBUG_CPM)
58 udbg_init_cpm(); 61 udbg_init_cpm();
59#endif 62#endif
63
64#ifdef CONFIG_PPC_EARLY_DEBUG
65 console_loglevel = 10;
66#endif
60} 67}
61 68
62/* udbg library, used by xmon et al */ 69/* udbg library, used by xmon et al */
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 833a3d0bcfa7..cb01ebc59387 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -46,7 +46,7 @@ struct NS16550 {
46 46
47#define LCR_DLAB 0x80 47#define LCR_DLAB 0x80
48 48
49static volatile struct NS16550 __iomem *udbg_comport; 49static struct NS16550 __iomem *udbg_comport;
50 50
51static void udbg_550_putc(char c) 51static void udbg_550_putc(char c)
52{ 52{
@@ -117,7 +117,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
117{ 117{
118 unsigned int dll, dlm, divisor, prescaler, speed; 118 unsigned int dll, dlm, divisor, prescaler, speed;
119 u8 old_lcr; 119 u8 old_lcr;
120 volatile struct NS16550 __iomem *port = comport; 120 struct NS16550 __iomem *port = comport;
121 121
122 old_lcr = in_8(&port->lcr); 122 old_lcr = in_8(&port->lcr);
123 123
@@ -162,7 +162,7 @@ void udbg_maple_real_putc(char c)
162 162
163void __init udbg_init_maple_realmode(void) 163void __init udbg_init_maple_realmode(void)
164{ 164{
165 udbg_comport = (volatile struct NS16550 __iomem *)0xf40003f8; 165 udbg_comport = (struct NS16550 __iomem *)0xf40003f8;
166 166
167 udbg_putc = udbg_maple_real_putc; 167 udbg_putc = udbg_maple_real_putc;
168 udbg_getc = NULL; 168 udbg_getc = NULL;
@@ -184,7 +184,7 @@ void udbg_pas_real_putc(char c)
184 184
185void udbg_init_pas_realmode(void) 185void udbg_init_pas_realmode(void)
186{ 186{
187 udbg_comport = (volatile struct NS16550 __iomem *)0xfcff03f8UL; 187 udbg_comport = (struct NS16550 __iomem *)0xfcff03f8UL;
188 188
189 udbg_putc = udbg_pas_real_putc; 189 udbg_putc = udbg_pas_real_putc;
190 udbg_getc = NULL; 190 udbg_getc = NULL;
@@ -219,9 +219,42 @@ static int udbg_44x_as1_getc(void)
219void __init udbg_init_44x_as1(void) 219void __init udbg_init_44x_as1(void)
220{ 220{
221 udbg_comport = 221 udbg_comport =
222 (volatile struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR; 222 (struct NS16550 __iomem *)PPC44x_EARLY_DEBUG_VIRTADDR;
223 223
224 udbg_putc = udbg_44x_as1_putc; 224 udbg_putc = udbg_44x_as1_putc;
225 udbg_getc = udbg_44x_as1_getc; 225 udbg_getc = udbg_44x_as1_getc;
226} 226}
227#endif /* CONFIG_PPC_EARLY_DEBUG_44x */ 227#endif /* CONFIG_PPC_EARLY_DEBUG_44x */
228
229#ifdef CONFIG_PPC_EARLY_DEBUG_40x
230static void udbg_40x_real_putc(char c)
231{
232 if (udbg_comport) {
233 while ((real_readb(&udbg_comport->lsr) & LSR_THRE) == 0)
234 /* wait for idle */;
235 real_writeb(c, &udbg_comport->thr); eieio();
236 if (c == '\n')
237 udbg_40x_real_putc('\r');
238 }
239}
240
241static int udbg_40x_real_getc(void)
242{
243 if (udbg_comport) {
244 while ((real_readb(&udbg_comport->lsr) & LSR_DR) == 0)
245 ; /* wait for char */
246 return real_readb(&udbg_comport->rbr);
247 }
248 return -1;
249}
250
251void __init udbg_init_40x_realmode(void)
252{
253 udbg_comport = (struct NS16550 __iomem *)
254 CONFIG_PPC_EARLY_DEBUG_40x_PHYSADDR;
255
256 udbg_putc = udbg_40x_real_putc;
257 udbg_getc = udbg_40x_real_getc;
258 udbg_getc_poll = NULL;
259}
260#endif /* CONFIG_PPC_EARLY_DEBUG_40x */
diff --git a/arch/powerpc/math-emu/op-4.h b/arch/powerpc/math-emu/op-4.h
index fcdd6d064c54..c9ae626070da 100644
--- a/arch/powerpc/math-emu/op-4.h
+++ b/arch/powerpc/math-emu/op-4.h
@@ -194,19 +194,39 @@
194 (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0) 194 (X##_f[3] = I3, X##_f[2] = I2, X##_f[1] = I1, X##_f[0] = I0)
195 195
196#ifndef __FP_FRAC_ADD_4 196#ifndef __FP_FRAC_ADD_4
197#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ 197#define __FP_FRAC_ADD_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
198 (r0 = x0 + y0, \ 198 do { \
199 r1 = x1 + y1 + (r0 < x0), \ 199 int _c1, _c2, _c3; \
200 r2 = x2 + y2 + (r1 < x1), \ 200 r0 = x0 + y0; \
201 r3 = x3 + y3 + (r2 < x2)) 201 _c1 = r0 < x0; \
202 r1 = x1 + y1; \
203 _c2 = r1 < x1; \
204 r1 += _c1; \
205 _c2 |= r1 < _c1; \
206 r2 = x2 + y2; \
207 _c3 = r2 < x2; \
208 r2 += _c2; \
209 _c3 |= r2 < _c2; \
210 r3 = x3 + y3 + _c3; \
211 } while (0)
202#endif 212#endif
203 213
204#ifndef __FP_FRAC_SUB_4 214#ifndef __FP_FRAC_SUB_4
205#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \ 215#define __FP_FRAC_SUB_4(r3,r2,r1,r0,x3,x2,x1,x0,y3,y2,y1,y0) \
206 (r0 = x0 - y0, \ 216 do { \
207 r1 = x1 - y1 - (r0 > x0), \ 217 int _c1, _c2, _c3; \
208 r2 = x2 - y2 - (r1 > x1), \ 218 r0 = x0 - y0; \
209 r3 = x3 - y3 - (r2 > x2)) 219 _c1 = r0 > x0; \
220 r1 = x1 - y1; \
221 _c2 = r1 > x1; \
222 r1 -= _c1; \
223 _c2 |= r1 > _c1; \
224 r2 = x2 - y2; \
225 _c3 = r2 > x2; \
226 r2 -= _c2; \
227 _c3 |= r2 > _c2; \
228 r3 = x3 - y3 - _c3; \
229 } while (0)
210#endif 230#endif
211 231
212#ifndef __FP_FRAC_ADDI_4 232#ifndef __FP_FRAC_ADDI_4
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 20629ae95c50..41649a5d3602 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -22,3 +22,4 @@ obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o
22obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o 22obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
23obj-$(CONFIG_PPC_MM_SLICES) += slice.o 23obj-$(CONFIG_PPC_MM_SLICES) += slice.o
24obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 24obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
25obj-$(CONFIG_PPC_SUBPAGE_PROT) += subpage-prot.o
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 8135da06e0a4..7b2510799266 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -167,10 +167,8 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
167 if (notify_page_fault(regs)) 167 if (notify_page_fault(regs))
168 return 0; 168 return 0;
169 169
170 if (trap == 0x300) { 170 if (unlikely(debugger_fault_handler(regs)))
171 if (debugger_fault_handler(regs)) 171 return 0;
172 return 0;
173 }
174 172
175 /* On a kernel SLB miss we can only check for a valid exception entry */ 173 /* On a kernel SLB miss we can only check for a valid exception entry */
176 if (!user_mode(regs) && (address >= TASK_SIZE)) 174 if (!user_mode(regs) && (address >= TASK_SIZE))
@@ -189,7 +187,7 @@ int __kprobes do_page_fault(struct pt_regs *regs, unsigned long address,
189 return SIGSEGV; 187 return SIGSEGV;
190 /* in_atomic() in user mode is really bad, 188 /* in_atomic() in user mode is really bad,
191 as is current->mm == NULL. */ 189 as is current->mm == NULL. */
192 printk(KERN_EMERG "Page fault in user mode with" 190 printk(KERN_EMERG "Page fault in user mode with "
193 "in_atomic() = %d mm = %p\n", in_atomic(), mm); 191 "in_atomic() = %d mm = %p\n", in_atomic(), mm);
194 printk(KERN_EMERG "NIP = %lx MSR = %lx\n", 192 printk(KERN_EMERG "NIP = %lx MSR = %lx\n",
195 regs->nip, regs->msr); 193 regs->nip, regs->msr);
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 17139daeaff4..c93a966b7e4b 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -165,15 +165,15 @@ void invalidate_tlbcam_entry(int index)
165void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1, 165void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
166 unsigned long cam2) 166 unsigned long cam2)
167{ 167{
168 settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0); 168 settlbcam(0, PAGE_OFFSET, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
169 tlbcam_index++; 169 tlbcam_index++;
170 if (cam1) { 170 if (cam1) {
171 tlbcam_index++; 171 tlbcam_index++;
172 settlbcam(1, KERNELBASE+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0); 172 settlbcam(1, PAGE_OFFSET+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
173 } 173 }
174 if (cam2) { 174 if (cam2) {
175 tlbcam_index++; 175 tlbcam_index++;
176 settlbcam(2, KERNELBASE+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0); 176 settlbcam(2, PAGE_OFFSET+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
177 } 177 }
178} 178}
179 179
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S
index e935edd6b72b..21d248486479 100644
--- a/arch/powerpc/mm/hash_low_64.S
+++ b/arch/powerpc/mm/hash_low_64.S
@@ -331,7 +331,8 @@ htab_pte_insert_failure:
331 *****************************************************************************/ 331 *****************************************************************************/
332 332
333/* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, 333/* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
334 * pte_t *ptep, unsigned long trap, int local, int ssize) 334 * pte_t *ptep, unsigned long trap, int local, int ssize,
335 * int subpg_prot)
335 */ 336 */
336 337
337/* 338/*
@@ -429,12 +430,19 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT)
429 xor r28,r28,r0 /* hash */ 430 xor r28,r28,r0 /* hash */
430 431
431 /* Convert linux PTE bits into HW equivalents */ 432 /* Convert linux PTE bits into HW equivalents */
4324: andi. r3,r30,0x1fe /* Get basic set of flags */ 4334:
433 xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */ 434#ifdef CONFIG_PPC_SUBPAGE_PROT
435 andc r10,r30,r10
436 andi. r3,r10,0x1fe /* Get basic set of flags */
437 rlwinm r0,r10,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */
438#else
439 andi. r3,r30,0x1fe /* Get basic set of flags */
434 rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */ 440 rlwinm r0,r30,32-9+1,30,30 /* _PAGE_RW -> _PAGE_USER (r0) */
441#endif
442 xori r3,r3,HPTE_R_N /* _PAGE_EXEC -> NOEXEC */
435 rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */ 443 rlwinm r4,r30,32-7+1,30,30 /* _PAGE_DIRTY -> _PAGE_USER (r4) */
436 and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/ 444 and r0,r0,r4 /* _PAGE_RW & _PAGE_DIRTY ->r0 bit 30*/
437 andc r0,r30,r0 /* r0 = pte & ~r0 */ 445 andc r0,r3,r0 /* r0 = pte & ~r0 */
438 rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */ 446 rlwimi r3,r0,32-1,31,31 /* Insert result into PP lsb */
439 ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */ 447 ori r3,r3,HPTE_R_C /* Always add "C" bit for perf. */
440 448
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index f09730bf3a33..32f416175db1 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -96,6 +96,7 @@ int mmu_vmalloc_psize = MMU_PAGE_4K;
96int mmu_io_psize = MMU_PAGE_4K; 96int mmu_io_psize = MMU_PAGE_4K;
97int mmu_kernel_ssize = MMU_SEGSIZE_256M; 97int mmu_kernel_ssize = MMU_SEGSIZE_256M;
98int mmu_highuser_ssize = MMU_SEGSIZE_256M; 98int mmu_highuser_ssize = MMU_SEGSIZE_256M;
99u16 mmu_slb_size = 64;
99#ifdef CONFIG_HUGETLB_PAGE 100#ifdef CONFIG_HUGETLB_PAGE
100int mmu_huge_psize = MMU_PAGE_16M; 101int mmu_huge_psize = MMU_PAGE_16M;
101unsigned int HPAGE_SHIFT; 102unsigned int HPAGE_SHIFT;
@@ -368,18 +369,11 @@ static void __init htab_init_page_sizes(void)
368 * on what is available 369 * on what is available
369 */ 370 */
370 if (mmu_psize_defs[MMU_PAGE_16M].shift) 371 if (mmu_psize_defs[MMU_PAGE_16M].shift)
371 mmu_huge_psize = MMU_PAGE_16M; 372 set_huge_psize(MMU_PAGE_16M);
372 /* With 4k/4level pagetables, we can't (for now) cope with a 373 /* With 4k/4level pagetables, we can't (for now) cope with a
373 * huge page size < PMD_SIZE */ 374 * huge page size < PMD_SIZE */
374 else if (mmu_psize_defs[MMU_PAGE_1M].shift) 375 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
375 mmu_huge_psize = MMU_PAGE_1M; 376 set_huge_psize(MMU_PAGE_1M);
376
377 /* Calculate HPAGE_SHIFT and sanity check it */
378 if (mmu_psize_defs[mmu_huge_psize].shift > MIN_HUGEPTE_SHIFT &&
379 mmu_psize_defs[mmu_huge_psize].shift < SID_SHIFT)
380 HPAGE_SHIFT = mmu_psize_defs[mmu_huge_psize].shift;
381 else
382 HPAGE_SHIFT = 0; /* No huge pages dude ! */
383#endif /* CONFIG_HUGETLB_PAGE */ 377#endif /* CONFIG_HUGETLB_PAGE */
384} 378}
385 379
@@ -477,7 +471,7 @@ void __init htab_initialize(void)
477 unsigned long table; 471 unsigned long table;
478 unsigned long pteg_count; 472 unsigned long pteg_count;
479 unsigned long mode_rw; 473 unsigned long mode_rw;
480 unsigned long base = 0, size = 0; 474 unsigned long base = 0, size = 0, limit;
481 int i; 475 int i;
482 476
483 extern unsigned long tce_alloc_start, tce_alloc_end; 477 extern unsigned long tce_alloc_start, tce_alloc_end;
@@ -511,9 +505,15 @@ void __init htab_initialize(void)
511 _SDR1 = 0; 505 _SDR1 = 0;
512 } else { 506 } else {
513 /* Find storage for the HPT. Must be contiguous in 507 /* Find storage for the HPT. Must be contiguous in
514 * the absolute address space. 508 * the absolute address space. On cell we want it to be
509 * in the first 1 Gig.
515 */ 510 */
516 table = lmb_alloc(htab_size_bytes, htab_size_bytes); 511 if (machine_is(cell))
512 limit = 0x40000000;
513 else
514 limit = 0;
515
516 table = lmb_alloc_base(htab_size_bytes, htab_size_bytes, limit);
517 517
518 DBG("Hash table allocated at %lx, size: %lx\n", table, 518 DBG("Hash table allocated at %lx, size: %lx\n", table,
519 htab_size_bytes); 519 htab_size_bytes);
@@ -643,7 +643,7 @@ unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
643 * For now this makes the whole process use 4k pages. 643 * For now this makes the whole process use 4k pages.
644 */ 644 */
645#ifdef CONFIG_PPC_64K_PAGES 645#ifdef CONFIG_PPC_64K_PAGES
646static void demote_segment_4k(struct mm_struct *mm, unsigned long addr) 646void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
647{ 647{
648 if (mm->context.user_psize == MMU_PAGE_4K) 648 if (mm->context.user_psize == MMU_PAGE_4K)
649 return; 649 return;
@@ -651,13 +651,62 @@ static void demote_segment_4k(struct mm_struct *mm, unsigned long addr)
651#ifdef CONFIG_SPU_BASE 651#ifdef CONFIG_SPU_BASE
652 spu_flush_all_slbs(mm); 652 spu_flush_all_slbs(mm);
653#endif 653#endif
654 if (get_paca()->context.user_psize != MMU_PAGE_4K) {
655 get_paca()->context = mm->context;
656 slb_flush_and_rebolt();
657 }
654} 658}
655#endif /* CONFIG_PPC_64K_PAGES */ 659#endif /* CONFIG_PPC_64K_PAGES */
656 660
661#ifdef CONFIG_PPC_SUBPAGE_PROT
662/*
663 * This looks up a 2-bit protection code for a 4k subpage of a 64k page.
664 * Userspace sets the subpage permissions using the subpage_prot system call.
665 *
666 * Result is 0: full permissions, _PAGE_RW: read-only,
667 * _PAGE_USER or _PAGE_USER|_PAGE_RW: no access.
668 */
669static int subpage_protection(pgd_t *pgdir, unsigned long ea)
670{
671 struct subpage_prot_table *spt = pgd_subpage_prot(pgdir);
672 u32 spp = 0;
673 u32 **sbpm, *sbpp;
674
675 if (ea >= spt->maxaddr)
676 return 0;
677 if (ea < 0x100000000) {
678 /* addresses below 4GB use spt->low_prot */
679 sbpm = spt->low_prot;
680 } else {
681 sbpm = spt->protptrs[ea >> SBP_L3_SHIFT];
682 if (!sbpm)
683 return 0;
684 }
685 sbpp = sbpm[(ea >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)];
686 if (!sbpp)
687 return 0;
688 spp = sbpp[(ea >> PAGE_SHIFT) & (SBP_L1_COUNT - 1)];
689
690 /* extract 2-bit bitfield for this 4k subpage */
691 spp >>= 30 - 2 * ((ea >> 12) & 0xf);
692
693 /* turn 0,1,2,3 into combination of _PAGE_USER and _PAGE_RW */
694 spp = ((spp & 2) ? _PAGE_USER : 0) | ((spp & 1) ? _PAGE_RW : 0);
695 return spp;
696}
697
698#else /* CONFIG_PPC_SUBPAGE_PROT */
699static inline int subpage_protection(pgd_t *pgdir, unsigned long ea)
700{
701 return 0;
702}
703#endif
704
657/* Result code is: 705/* Result code is:
658 * 0 - handled 706 * 0 - handled
659 * 1 - normal page fault 707 * 1 - normal page fault
660 * -1 - critical hash insertion error 708 * -1 - critical hash insertion error
709 * -2 - access not permitted by subpage protection mechanism
661 */ 710 */
662int hash_page(unsigned long ea, unsigned long access, unsigned long trap) 711int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
663{ 712{
@@ -808,7 +857,14 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
808 rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); 857 rc = __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
809 else 858 else
810#endif /* CONFIG_PPC_HAS_HASH_64K */ 859#endif /* CONFIG_PPC_HAS_HASH_64K */
811 rc = __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize); 860 {
861 int spp = subpage_protection(pgdir, ea);
862 if (access & spp)
863 rc = -2;
864 else
865 rc = __hash_page_4K(ea, access, vsid, ptep, trap,
866 local, ssize, spp);
867 }
812 868
813#ifndef CONFIG_PPC_64K_PAGES 869#ifndef CONFIG_PPC_64K_PAGES
814 DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep)); 870 DBG_LOW(" o-pte: %016lx\n", pte_val(*ptep));
@@ -880,7 +936,8 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
880 __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize); 936 __hash_page_64K(ea, access, vsid, ptep, trap, local, ssize);
881 else 937 else
882#endif /* CONFIG_PPC_HAS_HASH_64K */ 938#endif /* CONFIG_PPC_HAS_HASH_64K */
883 __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize); 939 __hash_page_4K(ea, access, vsid, ptep, trap, local, ssize,
940 subpage_protection(pgdir, ea));
884 941
885 local_irq_restore(flags); 942 local_irq_restore(flags);
886} 943}
@@ -925,19 +982,17 @@ void flush_hash_range(unsigned long number, int local)
925 * low_hash_fault is called when we the low level hash code failed 982 * low_hash_fault is called when we the low level hash code failed
926 * to instert a PTE due to an hypervisor error 983 * to instert a PTE due to an hypervisor error
927 */ 984 */
928void low_hash_fault(struct pt_regs *regs, unsigned long address) 985void low_hash_fault(struct pt_regs *regs, unsigned long address, int rc)
929{ 986{
930 if (user_mode(regs)) { 987 if (user_mode(regs)) {
931 siginfo_t info; 988#ifdef CONFIG_PPC_SUBPAGE_PROT
932 989 if (rc == -2)
933 info.si_signo = SIGBUS; 990 _exception(SIGSEGV, regs, SEGV_ACCERR, address);
934 info.si_errno = 0; 991 else
935 info.si_code = BUS_ADRERR; 992#endif
936 info.si_addr = (void __user *)address; 993 _exception(SIGBUS, regs, BUS_ADRERR, address);
937 force_sig_info(SIGBUS, &info, current); 994 } else
938 return; 995 bad_page_fault(regs, address, SIGBUS);
939 }
940 bad_page_fault(regs, address, SIGBUS);
941} 996}
942 997
943#ifdef CONFIG_DEBUG_PAGEALLOC 998#ifdef CONFIG_DEBUG_PAGEALLOC
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 71efb38d599b..a02266dad215 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,18 +24,17 @@
24#include <asm/cputable.h> 24#include <asm/cputable.h>
25#include <asm/spu.h> 25#include <asm/spu.h>
26 26
27#define HPAGE_SHIFT_64K 16
28#define HPAGE_SHIFT_16M 24
29
27#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) 30#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
28#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) 31#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
29 32
30#ifdef CONFIG_PPC_64K_PAGES 33unsigned int hugepte_shift;
31#define HUGEPTE_INDEX_SIZE (PMD_SHIFT-HPAGE_SHIFT) 34#define PTRS_PER_HUGEPTE (1 << hugepte_shift)
32#else 35#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift)
33#define HUGEPTE_INDEX_SIZE (PUD_SHIFT-HPAGE_SHIFT)
34#endif
35#define PTRS_PER_HUGEPTE (1 << HUGEPTE_INDEX_SIZE)
36#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << HUGEPTE_INDEX_SIZE)
37 36
38#define HUGEPD_SHIFT (HPAGE_SHIFT + HUGEPTE_INDEX_SIZE) 37#define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift)
39#define HUGEPD_SIZE (1UL << HUGEPD_SHIFT) 38#define HUGEPD_SIZE (1UL << HUGEPD_SHIFT)
40#define HUGEPD_MASK (~(HUGEPD_SIZE-1)) 39#define HUGEPD_MASK (~(HUGEPD_SIZE-1))
41 40
@@ -82,11 +81,35 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
82 return 0; 81 return 0;
83} 82}
84 83
84/* Base page size affects how we walk hugetlb page tables */
85#ifdef CONFIG_PPC_64K_PAGES
86#define hpmd_offset(pud, addr) pmd_offset(pud, addr)
87#define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr)
88#else
89static inline
90pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
91{
92 if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
93 return pmd_offset(pud, addr);
94 else
95 return (pmd_t *) pud;
96}
97static inline
98pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
99{
100 if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
101 return pmd_alloc(mm, pud, addr);
102 else
103 return (pmd_t *) pud;
104}
105#endif
106
85/* Modelled after find_linux_pte() */ 107/* Modelled after find_linux_pte() */
86pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) 108pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
87{ 109{
88 pgd_t *pg; 110 pgd_t *pg;
89 pud_t *pu; 111 pud_t *pu;
112 pmd_t *pm;
90 113
91 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); 114 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
92 115
@@ -96,14 +119,9 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
96 if (!pgd_none(*pg)) { 119 if (!pgd_none(*pg)) {
97 pu = pud_offset(pg, addr); 120 pu = pud_offset(pg, addr);
98 if (!pud_none(*pu)) { 121 if (!pud_none(*pu)) {
99#ifdef CONFIG_PPC_64K_PAGES 122 pm = hpmd_offset(pu, addr);
100 pmd_t *pm;
101 pm = pmd_offset(pu, addr);
102 if (!pmd_none(*pm)) 123 if (!pmd_none(*pm))
103 return hugepte_offset((hugepd_t *)pm, addr); 124 return hugepte_offset((hugepd_t *)pm, addr);
104#else
105 return hugepte_offset((hugepd_t *)pu, addr);
106#endif
107 } 125 }
108 } 126 }
109 127
@@ -114,6 +132,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
114{ 132{
115 pgd_t *pg; 133 pgd_t *pg;
116 pud_t *pu; 134 pud_t *pu;
135 pmd_t *pm;
117 hugepd_t *hpdp = NULL; 136 hugepd_t *hpdp = NULL;
118 137
119 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); 138 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
@@ -124,14 +143,9 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
124 pu = pud_alloc(mm, pg, addr); 143 pu = pud_alloc(mm, pg, addr);
125 144
126 if (pu) { 145 if (pu) {
127#ifdef CONFIG_PPC_64K_PAGES 146 pm = hpmd_alloc(mm, pu, addr);
128 pmd_t *pm;
129 pm = pmd_alloc(mm, pu, addr);
130 if (pm) 147 if (pm)
131 hpdp = (hugepd_t *)pm; 148 hpdp = (hugepd_t *)pm;
132#else
133 hpdp = (hugepd_t *)pu;
134#endif
135 } 149 }
136 150
137 if (! hpdp) 151 if (! hpdp)
@@ -158,7 +172,6 @@ static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp)
158 PGF_CACHENUM_MASK)); 172 PGF_CACHENUM_MASK));
159} 173}
160 174
161#ifdef CONFIG_PPC_64K_PAGES
162static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, 175static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
163 unsigned long addr, unsigned long end, 176 unsigned long addr, unsigned long end,
164 unsigned long floor, unsigned long ceiling) 177 unsigned long floor, unsigned long ceiling)
@@ -191,7 +204,6 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
191 pud_clear(pud); 204 pud_clear(pud);
192 pmd_free_tlb(tlb, pmd); 205 pmd_free_tlb(tlb, pmd);
193} 206}
194#endif
195 207
196static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd, 208static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
197 unsigned long addr, unsigned long end, 209 unsigned long addr, unsigned long end,
@@ -210,9 +222,15 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
210 continue; 222 continue;
211 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling); 223 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
212#else 224#else
213 if (pud_none(*pud)) 225 if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
214 continue; 226 if (pud_none_or_clear_bad(pud))
215 free_hugepte_range(tlb, (hugepd_t *)pud); 227 continue;
228 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
229 } else {
230 if (pud_none(*pud))
231 continue;
232 free_hugepte_range(tlb, (hugepd_t *)pud);
233 }
216#endif 234#endif
217 } while (pud++, addr = next, addr != end); 235 } while (pud++, addr = next, addr != end);
218 236
@@ -526,6 +544,57 @@ repeat:
526 return err; 544 return err;
527} 545}
528 546
547void set_huge_psize(int psize)
548{
549 /* Check that it is a page size supported by the hardware and
550 * that it fits within pagetable limits. */
551 if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT &&
552 (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
553 mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) {
554 HPAGE_SHIFT = mmu_psize_defs[psize].shift;
555 mmu_huge_psize = psize;
556#ifdef CONFIG_PPC_64K_PAGES
557 hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
558#else
559 if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
560 hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
561 else
562 hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
563#endif
564
565 } else
566 HPAGE_SHIFT = 0;
567}
568
569static int __init hugepage_setup_sz(char *str)
570{
571 unsigned long long size;
572 int mmu_psize = -1;
573 int shift;
574
575 size = memparse(str, &str);
576
577 shift = __ffs(size);
578 switch (shift) {
579#ifndef CONFIG_PPC_64K_PAGES
580 case HPAGE_SHIFT_64K:
581 mmu_psize = MMU_PAGE_64K;
582 break;
583#endif
584 case HPAGE_SHIFT_16M:
585 mmu_psize = MMU_PAGE_16M;
586 break;
587 }
588
589 if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
590 set_huge_psize(mmu_psize);
591 else
592 printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
593
594 return 1;
595}
596__setup("hugepagesz=", hugepage_setup_sz);
597
529static void zero_ctor(struct kmem_cache *cache, void *addr) 598static void zero_ctor(struct kmem_cache *cache, void *addr)
530{ 599{
531 memset(addr, 0, kmem_cache_size(cache)); 600 memset(addr, 0, kmem_cache_size(cache));
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 8f4d2dc4cafb..4ce23bcf8a57 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -342,3 +342,16 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit)
342 } 342 }
343 } 343 }
344} 344}
345
346int __init lmb_is_reserved(unsigned long addr)
347{
348 int i;
349
350 for (i = 0; i < lmb.reserved.cnt; i++) {
351 unsigned long upper = lmb.reserved.region[i].base +
352 lmb.reserved.region[i].size - 1;
353 if ((addr >= lmb.reserved.region[i].base) && (addr <= upper))
354 return 1;
355 }
356 return 0;
357}
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 5402fb6b3aae..e8122447f019 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -213,15 +213,30 @@ void __init do_init_bootmem(void)
213 */ 213 */
214#ifdef CONFIG_HIGHMEM 214#ifdef CONFIG_HIGHMEM
215 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT); 215 free_bootmem_with_active_regions(0, total_lowmem >> PAGE_SHIFT);
216
217 /* reserve the sections we're already using */
218 for (i = 0; i < lmb.reserved.cnt; i++) {
219 unsigned long addr = lmb.reserved.region[i].base +
220 lmb_size_bytes(&lmb.reserved, i) - 1;
221 if (addr < total_lowmem)
222 reserve_bootmem(lmb.reserved.region[i].base,
223 lmb_size_bytes(&lmb.reserved, i));
224 else if (lmb.reserved.region[i].base < total_lowmem) {
225 unsigned long adjusted_size = total_lowmem -
226 lmb.reserved.region[i].base;
227 reserve_bootmem(lmb.reserved.region[i].base,
228 adjusted_size);
229 }
230 }
216#else 231#else
217 free_bootmem_with_active_regions(0, max_pfn); 232 free_bootmem_with_active_regions(0, max_pfn);
218#endif
219 233
220 /* reserve the sections we're already using */ 234 /* reserve the sections we're already using */
221 for (i = 0; i < lmb.reserved.cnt; i++) 235 for (i = 0; i < lmb.reserved.cnt; i++)
222 reserve_bootmem(lmb.reserved.region[i].base, 236 reserve_bootmem(lmb.reserved.region[i].base,
223 lmb_size_bytes(&lmb.reserved, i)); 237 lmb_size_bytes(&lmb.reserved, i));
224 238
239#endif
225 /* XXX need to clip this if using highmem? */ 240 /* XXX need to clip this if using highmem? */
226 sparse_memory_present_with_active_regions(0); 241 sparse_memory_present_with_active_regions(0);
227 242
@@ -334,11 +349,13 @@ void __init mem_init(void)
334 highmem_mapnr = total_lowmem >> PAGE_SHIFT; 349 highmem_mapnr = total_lowmem >> PAGE_SHIFT;
335 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) { 350 for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) {
336 struct page *page = pfn_to_page(pfn); 351 struct page *page = pfn_to_page(pfn);
337 352 if (lmb_is_reserved(pfn << PAGE_SHIFT))
353 continue;
338 ClearPageReserved(page); 354 ClearPageReserved(page);
339 init_page_count(page); 355 init_page_count(page);
340 __free_page(page); 356 __free_page(page);
341 totalhigh_pages++; 357 totalhigh_pages++;
358 reservedpages--;
342 } 359 }
343 totalram_pages += totalhigh_pages; 360 totalram_pages += totalhigh_pages;
344 printk(KERN_DEBUG "High memory: %luk\n", 361 printk(KERN_DEBUG "High memory: %luk\n",
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 50d7372bc2ce..47b06bad24ad 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -256,6 +256,7 @@ void slb_initialize(void)
256 static int slb_encoding_inited; 256 static int slb_encoding_inited;
257 extern unsigned int *slb_miss_kernel_load_linear; 257 extern unsigned int *slb_miss_kernel_load_linear;
258 extern unsigned int *slb_miss_kernel_load_io; 258 extern unsigned int *slb_miss_kernel_load_io;
259 extern unsigned int *slb_compare_rr_to_size;
259 260
260 /* Prepare our SLB miss handler based on our page size */ 261 /* Prepare our SLB miss handler based on our page size */
261 linear_llp = mmu_psize_defs[mmu_linear_psize].sllp; 262 linear_llp = mmu_psize_defs[mmu_linear_psize].sllp;
@@ -269,6 +270,8 @@ void slb_initialize(void)
269 SLB_VSID_KERNEL | linear_llp); 270 SLB_VSID_KERNEL | linear_llp);
270 patch_slb_encoding(slb_miss_kernel_load_io, 271 patch_slb_encoding(slb_miss_kernel_load_io,
271 SLB_VSID_KERNEL | io_llp); 272 SLB_VSID_KERNEL | io_llp);
273 patch_slb_encoding(slb_compare_rr_to_size,
274 mmu_slb_size);
272 275
273 DBG("SLB: linear LLP = %04x\n", linear_llp); 276 DBG("SLB: linear LLP = %04x\n", linear_llp);
274 DBG("SLB: io LLP = %04x\n", io_llp); 277 DBG("SLB: io LLP = %04x\n", io_llp);
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index 1328a81a84aa..657f6b37e9df 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -227,8 +227,9 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
227 227
2287: ld r10,PACASTABRR(r13) 2287: ld r10,PACASTABRR(r13)
229 addi r10,r10,1 229 addi r10,r10,1
230 /* use a cpu feature mask if we ever change our slb size */ 230 /* This gets soft patched on boot. */
231 cmpldi r10,SLB_NUM_ENTRIES 231_GLOBAL(slb_compare_rr_to_size)
232 cmpldi r10,0
232 233
233 blt+ 4f 234 blt+ 4f
234 li r10,SLB_NUM_BOLTED 235 li r10,SLB_NUM_BOLTED
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/subpage-prot.c
new file mode 100644
index 000000000000..4cafc0c33d0a
--- /dev/null
+++ b/arch/powerpc/mm/subpage-prot.c
@@ -0,0 +1,213 @@
1/*
2 * Copyright 2007-2008 Paul Mackerras, IBM Corp.
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 <linux/errno.h>
11#include <linux/kernel.h>
12#include <linux/gfp.h>
13#include <linux/slab.h>
14#include <linux/types.h>
15#include <linux/mm.h>
16#include <linux/hugetlb.h>
17
18#include <asm/pgtable.h>
19#include <asm/uaccess.h>
20#include <asm/tlbflush.h>
21
22/*
23 * Free all pages allocated for subpage protection maps and pointers.
24 * Also makes sure that the subpage_prot_table structure is
25 * reinitialized for the next user.
26 */
27void subpage_prot_free(pgd_t *pgd)
28{
29 struct subpage_prot_table *spt = pgd_subpage_prot(pgd);
30 unsigned long i, j, addr;
31 u32 **p;
32
33 for (i = 0; i < 4; ++i) {
34 if (spt->low_prot[i]) {
35 free_page((unsigned long)spt->low_prot[i]);
36 spt->low_prot[i] = NULL;
37 }
38 }
39 addr = 0;
40 for (i = 0; i < 2; ++i) {
41 p = spt->protptrs[i];
42 if (!p)
43 continue;
44 spt->protptrs[i] = NULL;
45 for (j = 0; j < SBP_L2_COUNT && addr < spt->maxaddr;
46 ++j, addr += PAGE_SIZE)
47 if (p[j])
48 free_page((unsigned long)p[j]);
49 free_page((unsigned long)p);
50 }
51 spt->maxaddr = 0;
52}
53
54static void hpte_flush_range(struct mm_struct *mm, unsigned long addr,
55 int npages)
56{
57 pgd_t *pgd;
58 pud_t *pud;
59 pmd_t *pmd;
60 pte_t *pte;
61 spinlock_t *ptl;
62
63 pgd = pgd_offset(mm, addr);
64 if (pgd_none(*pgd))
65 return;
66 pud = pud_offset(pgd, addr);
67 if (pud_none(*pud))
68 return;
69 pmd = pmd_offset(pud, addr);
70 if (pmd_none(*pmd))
71 return;
72 pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
73 arch_enter_lazy_mmu_mode();
74 for (; npages > 0; --npages) {
75 pte_update(mm, addr, pte, 0, 0);
76 addr += PAGE_SIZE;
77 ++pte;
78 }
79 arch_leave_lazy_mmu_mode();
80 pte_unmap_unlock(pte - 1, ptl);
81}
82
83/*
84 * Clear the subpage protection map for an address range, allowing
85 * all accesses that are allowed by the pte permissions.
86 */
87static void subpage_prot_clear(unsigned long addr, unsigned long len)
88{
89 struct mm_struct *mm = current->mm;
90 struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd);
91 u32 **spm, *spp;
92 int i, nw;
93 unsigned long next, limit;
94
95 down_write(&mm->mmap_sem);
96 limit = addr + len;
97 if (limit > spt->maxaddr)
98 limit = spt->maxaddr;
99 for (; addr < limit; addr = next) {
100 next = pmd_addr_end(addr, limit);
101 if (addr < 0x100000000) {
102 spm = spt->low_prot;
103 } else {
104 spm = spt->protptrs[addr >> SBP_L3_SHIFT];
105 if (!spm)
106 continue;
107 }
108 spp = spm[(addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1)];
109 if (!spp)
110 continue;
111 spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1);
112
113 i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
114 nw = PTRS_PER_PTE - i;
115 if (addr + (nw << PAGE_SHIFT) > next)
116 nw = (next - addr) >> PAGE_SHIFT;
117
118 memset(spp, 0, nw * sizeof(u32));
119
120 /* now flush any existing HPTEs for the range */
121 hpte_flush_range(mm, addr, nw);
122 }
123 up_write(&mm->mmap_sem);
124}
125
126/*
127 * Copy in a subpage protection map for an address range.
128 * The map has 2 bits per 4k subpage, so 32 bits per 64k page.
129 * Each 2-bit field is 0 to allow any access, 1 to prevent writes,
130 * 2 or 3 to prevent all accesses.
131 * Note that the normal page protections also apply; the subpage
132 * protection mechanism is an additional constraint, so putting 0
133 * in a 2-bit field won't allow writes to a page that is otherwise
134 * write-protected.
135 */
136long sys_subpage_prot(unsigned long addr, unsigned long len, u32 __user *map)
137{
138 struct mm_struct *mm = current->mm;
139 struct subpage_prot_table *spt = pgd_subpage_prot(mm->pgd);
140 u32 **spm, *spp;
141 int i, nw;
142 unsigned long next, limit;
143 int err;
144
145 /* Check parameters */
146 if ((addr & ~PAGE_MASK) || (len & ~PAGE_MASK) ||
147 addr >= TASK_SIZE || len >= TASK_SIZE || addr + len > TASK_SIZE)
148 return -EINVAL;
149
150 if (is_hugepage_only_range(mm, addr, len))
151 return -EINVAL;
152
153 if (!map) {
154 /* Clear out the protection map for the address range */
155 subpage_prot_clear(addr, len);
156 return 0;
157 }
158
159 if (!access_ok(VERIFY_READ, map, (len >> PAGE_SHIFT) * sizeof(u32)))
160 return -EFAULT;
161
162 down_write(&mm->mmap_sem);
163 for (limit = addr + len; addr < limit; addr = next) {
164 next = pmd_addr_end(addr, limit);
165 err = -ENOMEM;
166 if (addr < 0x100000000) {
167 spm = spt->low_prot;
168 } else {
169 spm = spt->protptrs[addr >> SBP_L3_SHIFT];
170 if (!spm) {
171 spm = (u32 **)get_zeroed_page(GFP_KERNEL);
172 if (!spm)
173 goto out;
174 spt->protptrs[addr >> SBP_L3_SHIFT] = spm;
175 }
176 }
177 spm += (addr >> SBP_L2_SHIFT) & (SBP_L2_COUNT - 1);
178 spp = *spm;
179 if (!spp) {
180 spp = (u32 *)get_zeroed_page(GFP_KERNEL);
181 if (!spp)
182 goto out;
183 *spm = spp;
184 }
185 spp += (addr >> PAGE_SHIFT) & (SBP_L1_COUNT - 1);
186
187 local_irq_disable();
188 demote_segment_4k(mm, addr);
189 local_irq_enable();
190
191 i = (addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
192 nw = PTRS_PER_PTE - i;
193 if (addr + (nw << PAGE_SHIFT) > next)
194 nw = (next - addr) >> PAGE_SHIFT;
195
196 up_write(&mm->mmap_sem);
197 err = -EFAULT;
198 if (__copy_from_user(spp, map, nw * sizeof(u32)))
199 goto out2;
200 map += nw;
201 down_write(&mm->mmap_sem);
202
203 /* now flush any existing HPTEs for the range */
204 hpte_flush_range(mm, addr, nw);
205 }
206 if (limit > spt->maxaddr)
207 spt->maxaddr = limit;
208 err = 0;
209 out:
210 up_write(&mm->mmap_sem);
211 out2:
212 return err;
213}
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
index bb6bff51ce48..13929771bee7 100644
--- a/arch/powerpc/oprofile/op_model_cell.c
+++ b/arch/powerpc/oprofile/op_model_cell.c
@@ -61,7 +61,7 @@ static unsigned int spu_cycle_reset;
61#define NUM_THREADS 2 /* number of physical threads in 61#define NUM_THREADS 2 /* number of physical threads in
62 * physical processor 62 * physical processor
63 */ 63 */
64#define NUM_TRACE_BUS_WORDS 4 64#define NUM_DEBUG_BUS_WORDS 4
65#define NUM_INPUT_BUS_WORDS 2 65#define NUM_INPUT_BUS_WORDS 2
66 66
67#define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */ 67#define MAX_SPU_COUNT 0xFFFFFF /* maximum 24 bit LFSR value */
@@ -169,7 +169,6 @@ static DEFINE_SPINLOCK(virt_cntr_lock);
169 169
170static u32 ctr_enabled; 170static u32 ctr_enabled;
171 171
172static unsigned char trace_bus[NUM_TRACE_BUS_WORDS];
173static unsigned char input_bus[NUM_INPUT_BUS_WORDS]; 172static unsigned char input_bus[NUM_INPUT_BUS_WORDS];
174 173
175/* 174/*
@@ -298,7 +297,7 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
298 297
299 p->signal_group = event / 100; 298 p->signal_group = event / 100;
300 p->bus_word = bus_word; 299 p->bus_word = bus_word;
301 p->sub_unit = (unit_mask & 0x0000f000) >> 12; 300 p->sub_unit = GET_SUB_UNIT(unit_mask);
302 301
303 pm_regs.pm07_cntrl[ctr] = 0; 302 pm_regs.pm07_cntrl[ctr] = 0;
304 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles); 303 pm_regs.pm07_cntrl[ctr] |= PM07_CTR_COUNT_CYCLES(count_cycles);
@@ -334,16 +333,16 @@ static void set_pm_event(u32 ctr, int event, u32 unit_mask)
334 p->bit = signal_bit; 333 p->bit = signal_bit;
335 } 334 }
336 335
337 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++) { 336 for (i = 0; i < NUM_DEBUG_BUS_WORDS; i++) {
338 if (bus_word & (1 << i)) { 337 if (bus_word & (1 << i)) {
339 pm_regs.debug_bus_control |= 338 pm_regs.debug_bus_control |=
340 (bus_type << (31 - (2 * i) + 1)); 339 (bus_type << (30 - (2 * i)));
341 340
342 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) { 341 for (j = 0; j < NUM_INPUT_BUS_WORDS; j++) {
343 if (input_bus[j] == 0xff) { 342 if (input_bus[j] == 0xff) {
344 input_bus[j] = i; 343 input_bus[j] = i;
345 pm_regs.group_control |= 344 pm_regs.group_control |=
346 (i << (31 - i)); 345 (i << (30 - (2 * j)));
347 346
348 break; 347 break;
349 } 348 }
@@ -450,6 +449,12 @@ static void cell_virtual_cntr(unsigned long data)
450 hdw_thread = 1 ^ hdw_thread; 449 hdw_thread = 1 ^ hdw_thread;
451 next_hdw_thread = hdw_thread; 450 next_hdw_thread = hdw_thread;
452 451
452 pm_regs.group_control = 0;
453 pm_regs.debug_bus_control = 0;
454
455 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
456 input_bus[i] = 0xff;
457
453 /* 458 /*
454 * There are some per thread events. Must do the 459 * There are some per thread events. Must do the
455 * set event, for the thread that is being started 460 * set event, for the thread that is being started
@@ -619,9 +624,6 @@ static int cell_reg_setup(struct op_counter_config *ctr,
619 pmc_cntrl[1][i].vcntr = i; 624 pmc_cntrl[1][i].vcntr = i;
620 } 625 }
621 626
622 for (i = 0; i < NUM_TRACE_BUS_WORDS; i++)
623 trace_bus[i] = 0xff;
624
625 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++) 627 for (i = 0; i < NUM_INPUT_BUS_WORDS; i++)
626 input_bus[i] = 0xff; 628 input_bus[i] = 0xff;
627 629
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
index 8f6699fcc145..74f31177e47a 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -14,28 +14,34 @@
14# help 14# help
15# This option enables support for the CPCI405 board. 15# This option enables support for the CPCI405 board.
16 16
17#config EP405 17config EP405
18# bool "EP405/EP405PC" 18 bool "EP405/EP405PC"
19# depends on 40x 19 depends on 40x
20# default n 20 default n
21# select 405GP 21 select 405GP
22# help 22 select PCI
23# This option enables support for the EP405/EP405PC boards. 23 help
24 24 This option enables support for the EP405/EP405PC boards.
25#config EP405PC
26# bool "EP405PC Support"
27# depends on EP405
28# default y
29# help
30# This option enables support for the extra features of the EP405PC board.
31 25
32config KILAUEA 26config KILAUEA
33 bool "Kilauea" 27 bool "Kilauea"
34 depends on 40x 28 depends on 40x
35 default n 29 default n
30 select 405EX
31 select PPC4xx_PCI_EXPRESS
36 help 32 help
37 This option enables support for the AMCC PPC405EX evaluation board. 33 This option enables support for the AMCC PPC405EX evaluation board.
38 34
35config MAKALU
36 bool "Makalu"
37 depends on 40x
38 default n
39 select 405EX
40 select PCI
41 select PPC4xx_PCI_EXPRESS
42 help
43 This option enables support for the AMCC PPC405EX board.
44
39#config REDWOOD_5 45#config REDWOOD_5
40# bool "Redwood-5" 46# bool "Redwood-5"
41# depends on 40x 47# depends on 40x
@@ -65,6 +71,7 @@ config WALNUT
65 depends on 40x 71 depends on 40x
66 default y 72 default y
67 select 405GP 73 select 405GP
74 select PCI
68 help 75 help
69 This option enables support for the IBM PPC405GP evaluation board. 76 This option enables support for the IBM PPC405GP evaluation board.
70 77
@@ -105,6 +112,11 @@ config 405GP
105config 405EP 112config 405EP
106 bool 113 bool
107 114
115config 405EX
116 bool
117 select IBM_NEW_EMAC_EMAC4
118 select IBM_NEW_EMAC_RGMII
119
108config 405GPR 120config 405GPR
109 bool 121 bool
110 122
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile
index 51dadeee6fc6..5533a5c8ce4e 100644
--- a/arch/powerpc/platforms/40x/Makefile
+++ b/arch/powerpc/platforms/40x/Makefile
@@ -1,3 +1,5 @@
1obj-$(CONFIG_KILAUEA) += kilauea.o 1obj-$(CONFIG_KILAUEA) += kilauea.o
2obj-$(CONFIG_MAKALU) += makalu.o
2obj-$(CONFIG_WALNUT) += walnut.o 3obj-$(CONFIG_WALNUT) += walnut.o
3obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o 4obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
5obj-$(CONFIG_EP405) += ep405.o
diff --git a/arch/powerpc/platforms/40x/ep405.c b/arch/powerpc/platforms/40x/ep405.c
new file mode 100644
index 000000000000..13d1345026da
--- /dev/null
+++ b/arch/powerpc/platforms/40x/ep405.c
@@ -0,0 +1,123 @@
1/*
2 * Architecture- / platform-specific boot-time initialization code for
3 * IBM PowerPC 4xx based boards. Adapted from original
4 * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek
5 * <dan@net4x.com>.
6 *
7 * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu>
8 *
9 * Rewritten and ported to the merged powerpc tree:
10 * Copyright 2007 IBM Corporation
11 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
12 *
13 * Adapted to EP405 by Ben. Herrenschmidt <benh@kernel.crashing.org>
14 *
15 * TODO: Wire up the PCI IRQ mux and the southbridge interrupts
16 *
17 * 2002 (c) MontaVista, Software, Inc. This file is licensed under
18 * the terms of the GNU General Public License version 2. This program
19 * is licensed "as is" without any warranty of any kind, whether express
20 * or implied.
21 */
22
23#include <linux/init.h>
24#include <linux/of_platform.h>
25
26#include <asm/machdep.h>
27#include <asm/prom.h>
28#include <asm/udbg.h>
29#include <asm/time.h>
30#include <asm/uic.h>
31#include <asm/pci-bridge.h>
32
33static struct device_node *bcsr_node;
34static void __iomem *bcsr_regs;
35
36/* BCSR registers */
37#define BCSR_ID 0
38#define BCSR_PCI_CTRL 1
39#define BCSR_FLASH_NV_POR_CTRL 2
40#define BCSR_FENET_UART_CTRL 3
41#define BCSR_PCI_IRQ 4
42#define BCSR_XIRQ_SELECT 5
43#define BCSR_XIRQ_ROUTING 6
44#define BCSR_XIRQ_STATUS 7
45#define BCSR_XIRQ_STATUS2 8
46#define BCSR_SW_STAT_LED_CTRL 9
47#define BCSR_GPIO_IRQ_PAR_CTRL 10
48/* there's more, can't be bothered typing them tho */
49
50
51static __initdata struct of_device_id ep405_of_bus[] = {
52 { .compatible = "ibm,plb3", },
53 { .compatible = "ibm,opb", },
54 { .compatible = "ibm,ebc", },
55 {},
56};
57
58static int __init ep405_device_probe(void)
59{
60 of_platform_bus_probe(NULL, ep405_of_bus, NULL);
61
62 return 0;
63}
64machine_device_initcall(ep405, ep405_device_probe);
65
66static void __init ep405_init_bcsr(void)
67{
68 const u8 *irq_routing;
69 int i;
70
71 /* Find the bloody thing & map it */
72 bcsr_node = of_find_compatible_node(NULL, NULL, "ep405-bcsr");
73 if (bcsr_node == NULL) {
74 printk(KERN_ERR "EP405 BCSR not found !\n");
75 return;
76 }
77 bcsr_regs = of_iomap(bcsr_node, 0);
78 if (bcsr_regs == NULL) {
79 printk(KERN_ERR "EP405 BCSR failed to map !\n");
80 return;
81 }
82
83 /* Get the irq-routing property and apply the routing to the CPLD */
84 irq_routing = of_get_property(bcsr_node, "irq-routing", NULL);
85 if (irq_routing == NULL)
86 return;
87 for (i = 0; i < 16; i++) {
88 u8 irq = irq_routing[i];
89 out_8(bcsr_regs + BCSR_XIRQ_SELECT, i);
90 out_8(bcsr_regs + BCSR_XIRQ_ROUTING, irq);
91 }
92 in_8(bcsr_regs + BCSR_XIRQ_SELECT);
93 mb();
94 out_8(bcsr_regs + BCSR_GPIO_IRQ_PAR_CTRL, 0xfe);
95}
96
97static void __init ep405_setup_arch(void)
98{
99 /* Find & init the BCSR CPLD */
100 ep405_init_bcsr();
101
102 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
103}
104
105static int __init ep405_probe(void)
106{
107 unsigned long root = of_get_flat_dt_root();
108
109 if (!of_flat_dt_is_compatible(root, "ep405"))
110 return 0;
111
112 return 1;
113}
114
115define_machine(ep405) {
116 .name = "EP405",
117 .probe = ep405_probe,
118 .setup_arch = ep405_setup_arch,
119 .progress = udbg_progress,
120 .init_IRQ = uic_init_tree,
121 .get_irq = uic_get_irq,
122 .calibrate_decr = generic_calibrate_decr,
123};
diff --git a/arch/powerpc/platforms/40x/kilauea.c b/arch/powerpc/platforms/40x/kilauea.c
index 1bffdbdd21b1..f9206a7fede0 100644
--- a/arch/powerpc/platforms/40x/kilauea.c
+++ b/arch/powerpc/platforms/40x/kilauea.c
@@ -19,8 +19,9 @@
19#include <asm/udbg.h> 19#include <asm/udbg.h>
20#include <asm/time.h> 20#include <asm/time.h>
21#include <asm/uic.h> 21#include <asm/uic.h>
22#include <asm/pci-bridge.h>
22 23
23static struct of_device_id kilauea_of_bus[] = { 24static __initdata struct of_device_id kilauea_of_bus[] = {
24 { .compatible = "ibm,plb4", }, 25 { .compatible = "ibm,plb4", },
25 { .compatible = "ibm,opb", }, 26 { .compatible = "ibm,opb", },
26 { .compatible = "ibm,ebc", }, 27 { .compatible = "ibm,ebc", },
@@ -29,14 +30,11 @@ static struct of_device_id kilauea_of_bus[] = {
29 30
30static int __init kilauea_device_probe(void) 31static int __init kilauea_device_probe(void)
31{ 32{
32 if (!machine_is(kilauea))
33 return 0;
34
35 of_platform_bus_probe(NULL, kilauea_of_bus, NULL); 33 of_platform_bus_probe(NULL, kilauea_of_bus, NULL);
36 34
37 return 0; 35 return 0;
38} 36}
39device_initcall(kilauea_device_probe); 37machine_device_initcall(kilauea, kilauea_device_probe);
40 38
41static int __init kilauea_probe(void) 39static int __init kilauea_probe(void)
42{ 40{
@@ -45,6 +43,8 @@ static int __init kilauea_probe(void)
45 if (!of_flat_dt_is_compatible(root, "amcc,kilauea")) 43 if (!of_flat_dt_is_compatible(root, "amcc,kilauea"))
46 return 0; 44 return 0;
47 45
46 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
47
48 return 1; 48 return 1;
49} 49}
50 50
diff --git a/arch/powerpc/platforms/40x/makalu.c b/arch/powerpc/platforms/40x/makalu.c
new file mode 100644
index 000000000000..4e4df72fc9cd
--- /dev/null
+++ b/arch/powerpc/platforms/40x/makalu.c
@@ -0,0 +1,58 @@
1/*
2 * Makalu board specific routines
3 *
4 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
5 *
6 * Based on the Walnut code by
7 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
8 * Copyright 2007 IBM Corporation
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#include <linux/init.h>
16#include <linux/of_platform.h>
17#include <asm/machdep.h>
18#include <asm/prom.h>
19#include <asm/udbg.h>
20#include <asm/time.h>
21#include <asm/uic.h>
22#include <asm/pci-bridge.h>
23
24static __initdata struct of_device_id makalu_of_bus[] = {
25 { .compatible = "ibm,plb4", },
26 { .compatible = "ibm,opb", },
27 { .compatible = "ibm,ebc", },
28 {},
29};
30
31static int __init makalu_device_probe(void)
32{
33 of_platform_bus_probe(NULL, makalu_of_bus, NULL);
34
35 return 0;
36}
37machine_device_initcall(makalu, makalu_device_probe);
38
39static int __init makalu_probe(void)
40{
41 unsigned long root = of_get_flat_dt_root();
42
43 if (!of_flat_dt_is_compatible(root, "amcc,makalu"))
44 return 0;
45
46 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
47
48 return 1;
49}
50
51define_machine(makalu) {
52 .name = "Makalu",
53 .probe = makalu_probe,
54 .progress = udbg_progress,
55 .init_IRQ = uic_init_tree,
56 .get_irq = uic_get_irq,
57 .calibrate_decr = generic_calibrate_decr,
58};
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index 14bbc328170f..88b66444dfb2 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -15,16 +15,23 @@
15#include <asm/time.h> 15#include <asm/time.h>
16#include <asm/xilinx_intc.h> 16#include <asm/xilinx_intc.h>
17 17
18static struct of_device_id xilinx_of_bus_ids[] __initdata = {
19 { .compatible = "xlnx,plb-v46-1.00.a", },
20 { .compatible = "xlnx,plb-v34-1.01.a", },
21 { .compatible = "xlnx,plb-v34-1.02.a", },
22 { .compatible = "xlnx,opb-v20-1.10.c", },
23 { .compatible = "xlnx,dcr-v29-1.00.a", },
24 { .compatible = "xlnx,compound", },
25 {}
26};
27
18static int __init virtex_device_probe(void) 28static int __init virtex_device_probe(void)
19{ 29{
20 if (!machine_is(virtex)) 30 of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL);
21 return 0;
22
23 of_platform_bus_probe(NULL, NULL, NULL);
24 31
25 return 0; 32 return 0;
26} 33}
27device_initcall(virtex_device_probe); 34machine_device_initcall(virtex, virtex_device_probe);
28 35
29static int __init virtex_probe(void) 36static int __init virtex_probe(void)
30{ 37{
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c
index ff6db2431798..5d9edd917f92 100644
--- a/arch/powerpc/platforms/40x/walnut.c
+++ b/arch/powerpc/platforms/40x/walnut.c
@@ -24,8 +24,9 @@
24#include <asm/udbg.h> 24#include <asm/udbg.h>
25#include <asm/time.h> 25#include <asm/time.h>
26#include <asm/uic.h> 26#include <asm/uic.h>
27#include <asm/pci-bridge.h>
27 28
28static struct of_device_id walnut_of_bus[] = { 29static __initdata struct of_device_id walnut_of_bus[] = {
29 { .compatible = "ibm,plb3", }, 30 { .compatible = "ibm,plb3", },
30 { .compatible = "ibm,opb", }, 31 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", }, 32 { .compatible = "ibm,ebc", },
@@ -34,15 +35,12 @@ static struct of_device_id walnut_of_bus[] = {
34 35
35static int __init walnut_device_probe(void) 36static int __init walnut_device_probe(void)
36{ 37{
37 if (!machine_is(walnut))
38 return 0;
39
40 /* FIXME: do bus probe here */
41 of_platform_bus_probe(NULL, walnut_of_bus, NULL); 38 of_platform_bus_probe(NULL, walnut_of_bus, NULL);
39 of_instantiate_rtc();
42 40
43 return 0; 41 return 0;
44} 42}
45device_initcall(walnut_device_probe); 43machine_device_initcall(walnut, walnut_device_probe);
46 44
47static int __init walnut_probe(void) 45static int __init walnut_probe(void)
48{ 46{
@@ -51,6 +49,8 @@ static int __init walnut_probe(void)
51 if (!of_flat_dt_is_compatible(root, "ibm,walnut")) 49 if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
52 return 0; 50 return 0;
53 51
52 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
53
54 return 1; 54 return 1;
55} 55}
56 56
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 8390cc164135..c062c4cbbed5 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -3,6 +3,7 @@ config BAMBOO
3 depends on 44x 3 depends on 44x
4 default n 4 default n
5 select 440EP 5 select 440EP
6 select PCI
6 help 7 help
7 This option enables support for the IBM PPC440EP evaluation board. 8 This option enables support for the IBM PPC440EP evaluation board.
8 9
@@ -11,6 +12,8 @@ config EBONY
11 depends on 44x 12 depends on 44x
12 default y 13 default y
13 select 440GP 14 select 440GP
15 select PCI
16 select OF_RTC
14 help 17 help
15 This option enables support for the IBM PPC440GP evaluation board. 18 This option enables support for the IBM PPC440GP evaluation board.
16 19
@@ -22,6 +25,48 @@ config SEQUOIA
22 help 25 help
23 This option enables support for the AMCC PPC440EPX evaluation board. 26 This option enables support for the AMCC PPC440EPX evaluation board.
24 27
28config TAISHAN
29 bool "Taishan"
30 depends on 44x
31 default n
32 select 440GX
33 select PCI
34 help
35 This option enables support for the AMCC PPC440GX "Taishan"
36 evaluation board.
37
38config KATMAI
39 bool "Katmai"
40 depends on 44x
41 default n
42 select 440SPe
43 select PCI
44 select PPC4xx_PCI_EXPRESS
45 help
46 This option enables support for the AMCC PPC440SPe evaluation board.
47
48config RAINIER
49 bool "Rainier"
50 depends on 44x
51 default n
52 select 440GRX
53 select PCI
54 help
55 This option enables support for the AMCC PPC440GRX evaluation board.
56
57config WARP
58 bool "PIKA Warp"
59 depends on 44x
60 default n
61 select 440EP
62 help
63 This option enables support for the PIKA Warp(tm) Appliance. The Warp
64 is a small computer replacement with up to 9 ports of FXO/FXS plus VOIP
65 stations and trunks.
66
67 See http://www.pikatechnologies.com/ and follow the "PIKA for Computer
68 Telephony Developers" link for more information.
69
25#config LUAN 70#config LUAN
26# bool "Luan" 71# bool "Luan"
27# depends on 44x 72# depends on 44x
@@ -44,6 +89,7 @@ config 440EP
44 select PPC_FPU 89 select PPC_FPU
45 select IBM440EP_ERR42 90 select IBM440EP_ERR42
46 select IBM_NEW_EMAC_ZMII 91 select IBM_NEW_EMAC_ZMII
92 select USB_ARCH_HAS_OHCI
47 93
48config 440EPX 94config 440EPX
49 bool 95 bool
@@ -52,20 +98,29 @@ config 440EPX
52 select IBM_NEW_EMAC_RGMII 98 select IBM_NEW_EMAC_RGMII
53 select IBM_NEW_EMAC_ZMII 99 select IBM_NEW_EMAC_ZMII
54 100
101config 440GRX
102 bool
103 select IBM_NEW_EMAC_EMAC4
104 select IBM_NEW_EMAC_RGMII
105 select IBM_NEW_EMAC_ZMII
106
55config 440GP 107config 440GP
56 bool 108 bool
57 select IBM_NEW_EMAC_ZMII 109 select IBM_NEW_EMAC_ZMII
58 110
59config 440GX 111config 440GX
60 bool 112 bool
113 select IBM_NEW_EMAC_EMAC4
114 select IBM_NEW_EMAC_RGMII
115 select IBM_NEW_EMAC_ZMII #test only
116 select IBM_NEW_EMAC_TAH #test only
61 117
62config 440SP 118config 440SP
63 bool 119 bool
64 120
65config 440A 121config 440SPe
122 select IBM_NEW_EMAC_EMAC4
66 bool 123 bool
67 depends on 440GX || 440EPX
68 default y
69 124
70# 44x errata/workaround config symbols, selected by the CPU models above 125# 44x errata/workaround config symbols, selected by the CPU models above
71config IBM440EP_ERR42 126config IBM440EP_ERR42
diff --git a/arch/powerpc/platforms/44x/Makefile b/arch/powerpc/platforms/44x/Makefile
index 10ce6740cc7d..0864d4f1cbc2 100644
--- a/arch/powerpc/platforms/44x/Makefile
+++ b/arch/powerpc/platforms/44x/Makefile
@@ -1,4 +1,9 @@
1obj-$(CONFIG_44x) := misc_44x.o 1obj-$(CONFIG_44x) := misc_44x.o
2obj-$(CONFIG_EBONY) += ebony.o 2obj-$(CONFIG_EBONY) += ebony.o
3obj-$(CONFIG_BAMBOO) += bamboo.o 3obj-$(CONFIG_TAISHAN) += taishan.o
4obj-$(CONFIG_BAMBOO) += bamboo.o
4obj-$(CONFIG_SEQUOIA) += sequoia.o 5obj-$(CONFIG_SEQUOIA) += sequoia.o
6obj-$(CONFIG_KATMAI) += katmai.o
7obj-$(CONFIG_RAINIER) += rainier.o
8obj-$(CONFIG_WARP) += warp.o
9obj-$(CONFIG_WARP) += warp-nand.o
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c
index be23f112184f..fb9a22a7e8d0 100644
--- a/arch/powerpc/platforms/44x/bamboo.c
+++ b/arch/powerpc/platforms/44x/bamboo.c
@@ -21,9 +21,11 @@
21#include <asm/udbg.h> 21#include <asm/udbg.h>
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h>
25
24#include "44x.h" 26#include "44x.h"
25 27
26static struct of_device_id bamboo_of_bus[] = { 28static __initdata struct of_device_id bamboo_of_bus[] = {
27 { .compatible = "ibm,plb4", }, 29 { .compatible = "ibm,plb4", },
28 { .compatible = "ibm,opb", }, 30 { .compatible = "ibm,opb", },
29 { .compatible = "ibm,ebc", }, 31 { .compatible = "ibm,ebc", },
@@ -32,14 +34,11 @@ static struct of_device_id bamboo_of_bus[] = {
32 34
33static int __init bamboo_device_probe(void) 35static int __init bamboo_device_probe(void)
34{ 36{
35 if (!machine_is(bamboo))
36 return 0;
37
38 of_platform_bus_probe(NULL, bamboo_of_bus, NULL); 37 of_platform_bus_probe(NULL, bamboo_of_bus, NULL);
39 38
40 return 0; 39 return 0;
41} 40}
42device_initcall(bamboo_device_probe); 41machine_device_initcall(bamboo, bamboo_device_probe);
43 42
44static int __init bamboo_probe(void) 43static int __init bamboo_probe(void)
45{ 44{
@@ -48,6 +47,8 @@ static int __init bamboo_probe(void)
48 if (!of_flat_dt_is_compatible(root, "amcc,bamboo")) 47 if (!of_flat_dt_is_compatible(root, "amcc,bamboo"))
49 return 0; 48 return 0;
50 49
50 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
51
51 return 1; 52 return 1;
52} 53}
53 54
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c
index 6cd3476767cc..1a8d467bff85 100644
--- a/arch/powerpc/platforms/44x/ebony.c
+++ b/arch/powerpc/platforms/44x/ebony.c
@@ -18,16 +18,18 @@
18 18
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <linux/rtc.h>
21 22
22#include <asm/machdep.h> 23#include <asm/machdep.h>
23#include <asm/prom.h> 24#include <asm/prom.h>
24#include <asm/udbg.h> 25#include <asm/udbg.h>
25#include <asm/time.h> 26#include <asm/time.h>
26#include <asm/uic.h> 27#include <asm/uic.h>
28#include <asm/pci-bridge.h>
27 29
28#include "44x.h" 30#include "44x.h"
29 31
30static struct of_device_id ebony_of_bus[] = { 32static __initdata struct of_device_id ebony_of_bus[] = {
31 { .compatible = "ibm,plb4", }, 33 { .compatible = "ibm,plb4", },
32 { .compatible = "ibm,opb", }, 34 { .compatible = "ibm,opb", },
33 { .compatible = "ibm,ebc", }, 35 { .compatible = "ibm,ebc", },
@@ -36,14 +38,12 @@ static struct of_device_id ebony_of_bus[] = {
36 38
37static int __init ebony_device_probe(void) 39static int __init ebony_device_probe(void)
38{ 40{
39 if (!machine_is(ebony))
40 return 0;
41
42 of_platform_bus_probe(NULL, ebony_of_bus, NULL); 41 of_platform_bus_probe(NULL, ebony_of_bus, NULL);
42 of_instantiate_rtc();
43 43
44 return 0; 44 return 0;
45} 45}
46device_initcall(ebony_device_probe); 46machine_device_initcall(ebony, ebony_device_probe);
47 47
48/* 48/*
49 * Called very early, MMU is off, device-tree isn't unflattened 49 * Called very early, MMU is off, device-tree isn't unflattened
@@ -55,6 +55,8 @@ static int __init ebony_probe(void)
55 if (!of_flat_dt_is_compatible(root, "ibm,ebony")) 55 if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
56 return 0; 56 return 0;
57 57
58 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
59
58 return 1; 60 return 1;
59} 61}
60 62
diff --git a/arch/powerpc/platforms/44x/katmai.c b/arch/powerpc/platforms/44x/katmai.c
new file mode 100644
index 000000000000..11134121f272
--- /dev/null
+++ b/arch/powerpc/platforms/44x/katmai.c
@@ -0,0 +1,63 @@
1/*
2 * Katmai board specific routines
3 *
4 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 * Copyright 2007 IBM Corp.
6 *
7 * Based on the Bamboo code by
8 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
9 * Copyright 2007 IBM Corporation
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16#include <linux/init.h>
17#include <linux/of_platform.h>
18
19#include <asm/machdep.h>
20#include <asm/prom.h>
21#include <asm/udbg.h>
22#include <asm/time.h>
23#include <asm/uic.h>
24#include <asm/pci-bridge.h>
25
26#include "44x.h"
27
28static __initdata struct of_device_id katmai_of_bus[] = {
29 { .compatible = "ibm,plb4", },
30 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", },
32 {},
33};
34
35static int __init katmai_device_probe(void)
36{
37 of_platform_bus_probe(NULL, katmai_of_bus, NULL);
38
39 return 0;
40}
41machine_device_initcall(katmai, katmai_device_probe);
42
43static int __init katmai_probe(void)
44{
45 unsigned long root = of_get_flat_dt_root();
46
47 if (!of_flat_dt_is_compatible(root, "amcc,katmai"))
48 return 0;
49
50 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
51
52 return 1;
53}
54
55define_machine(katmai) {
56 .name = "Katmai",
57 .probe = katmai_probe,
58 .progress = udbg_progress,
59 .init_IRQ = uic_init_tree,
60 .get_irq = uic_get_irq,
61 .restart = ppc44x_reset_system,
62 .calibrate_decr = generic_calibrate_decr,
63};
diff --git a/arch/powerpc/platforms/44x/rainier.c b/arch/powerpc/platforms/44x/rainier.c
new file mode 100644
index 000000000000..a7fae1cf69c1
--- /dev/null
+++ b/arch/powerpc/platforms/44x/rainier.c
@@ -0,0 +1,62 @@
1/*
2 * Rainier board specific routines
3 *
4 * Valentine Barshak <vbarshak@ru.mvista.com>
5 * Copyright 2007 MontaVista Software Inc.
6 *
7 * Based on the Bamboo code by
8 * Josh Boyer <jwboyer@linux.vnet.ibm.com>
9 * Copyright 2007 IBM Corporation
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16#include <linux/init.h>
17#include <linux/of_platform.h>
18
19#include <asm/machdep.h>
20#include <asm/prom.h>
21#include <asm/udbg.h>
22#include <asm/time.h>
23#include <asm/uic.h>
24#include <asm/pci-bridge.h>
25#include "44x.h"
26
27static __initdata struct of_device_id rainier_of_bus[] = {
28 { .compatible = "ibm,plb4", },
29 { .compatible = "ibm,opb", },
30 { .compatible = "ibm,ebc", },
31 {},
32};
33
34static int __init rainier_device_probe(void)
35{
36 of_platform_bus_probe(NULL, rainier_of_bus, NULL);
37
38 return 0;
39}
40machine_device_initcall(rainier, rainier_device_probe);
41
42static int __init rainier_probe(void)
43{
44 unsigned long root = of_get_flat_dt_root();
45
46 if (!of_flat_dt_is_compatible(root, "amcc,rainier"))
47 return 0;
48
49 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
50
51 return 1;
52}
53
54define_machine(rainier) {
55 .name = "Rainier",
56 .probe = rainier_probe,
57 .progress = udbg_progress,
58 .init_IRQ = uic_init_tree,
59 .get_irq = uic_get_irq,
60 .restart = ppc44x_reset_system,
61 .calibrate_decr = generic_calibrate_decr,
62};
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c
index 21a9dd14f297..d279db42c896 100644
--- a/arch/powerpc/platforms/44x/sequoia.c
+++ b/arch/powerpc/platforms/44x/sequoia.c
@@ -21,9 +21,11 @@
21#include <asm/udbg.h> 21#include <asm/udbg.h>
22#include <asm/time.h> 22#include <asm/time.h>
23#include <asm/uic.h> 23#include <asm/uic.h>
24#include <asm/pci-bridge.h>
25
24#include "44x.h" 26#include "44x.h"
25 27
26static struct of_device_id sequoia_of_bus[] = { 28static __initdata struct of_device_id sequoia_of_bus[] = {
27 { .compatible = "ibm,plb4", }, 29 { .compatible = "ibm,plb4", },
28 { .compatible = "ibm,opb", }, 30 { .compatible = "ibm,opb", },
29 { .compatible = "ibm,ebc", }, 31 { .compatible = "ibm,ebc", },
@@ -32,14 +34,11 @@ static struct of_device_id sequoia_of_bus[] = {
32 34
33static int __init sequoia_device_probe(void) 35static int __init sequoia_device_probe(void)
34{ 36{
35 if (!machine_is(sequoia))
36 return 0;
37
38 of_platform_bus_probe(NULL, sequoia_of_bus, NULL); 37 of_platform_bus_probe(NULL, sequoia_of_bus, NULL);
39 38
40 return 0; 39 return 0;
41} 40}
42device_initcall(sequoia_device_probe); 41machine_device_initcall(sequoia, sequoia_device_probe);
43 42
44static int __init sequoia_probe(void) 43static int __init sequoia_probe(void)
45{ 44{
@@ -48,6 +47,8 @@ static int __init sequoia_probe(void)
48 if (!of_flat_dt_is_compatible(root, "amcc,sequoia")) 47 if (!of_flat_dt_is_compatible(root, "amcc,sequoia"))
49 return 0; 48 return 0;
50 49
50 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
51
51 return 1; 52 return 1;
52} 53}
53 54
diff --git a/arch/powerpc/platforms/44x/taishan.c b/arch/powerpc/platforms/44x/taishan.c
new file mode 100644
index 000000000000..28ab7e2e02c3
--- /dev/null
+++ b/arch/powerpc/platforms/44x/taishan.c
@@ -0,0 +1,73 @@
1/*
2 * Taishan board specific routines based off ebony.c code
3 * original copyrights below
4 *
5 * Matt Porter <mporter@kernel.crashing.org>
6 * Copyright 2002-2005 MontaVista Software Inc.
7 *
8 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
9 * Copyright (c) 2003-2005 Zultys Technologies
10 *
11 * Rewritten and ported to the merged powerpc tree:
12 * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
13 *
14 * Modified from ebony.c for taishan:
15 * Copyright 2007 Hugh Blemings <hugh@au.ibm.com>, IBM Corporation.
16 *
17 * This program is free software; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 2 of the License, or (at your
20 * option) any later version.
21 */
22
23#include <linux/init.h>
24#include <linux/of_platform.h>
25
26#include <asm/machdep.h>
27#include <asm/prom.h>
28#include <asm/udbg.h>
29#include <asm/time.h>
30#include <asm/uic.h>
31#include <asm/pci-bridge.h>
32
33#include "44x.h"
34
35static __initdata struct of_device_id taishan_of_bus[] = {
36 { .compatible = "ibm,plb4", },
37 { .compatible = "ibm,opb", },
38 { .compatible = "ibm,ebc", },
39 {},
40};
41
42static int __init taishan_device_probe(void)
43{
44 of_platform_bus_probe(NULL, taishan_of_bus, NULL);
45
46 return 0;
47}
48machine_device_initcall(taishan, taishan_device_probe);
49
50/*
51 * Called very early, MMU is off, device-tree isn't unflattened
52 */
53static int __init taishan_probe(void)
54{
55 unsigned long root = of_get_flat_dt_root();
56
57 if (!of_flat_dt_is_compatible(root, "amcc,taishan"))
58 return 0;
59
60 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
61
62 return 1;
63}
64
65define_machine(taishan) {
66 .name = "Taishan",
67 .probe = taishan_probe,
68 .progress = udbg_progress,
69 .init_IRQ = uic_init_tree,
70 .get_irq = uic_get_irq,
71 .restart = ppc44x_reset_system,
72 .calibrate_decr = generic_calibrate_decr,
73};
diff --git a/arch/powerpc/platforms/44x/warp-nand.c b/arch/powerpc/platforms/44x/warp-nand.c
new file mode 100644
index 000000000000..84ab78ff8c03
--- /dev/null
+++ b/arch/powerpc/platforms/44x/warp-nand.c
@@ -0,0 +1,105 @@
1/*
2 * PIKA Warp(tm) NAND flash specific routines
3 *
4 * Copyright (c) 2008 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
6 */
7
8#include <linux/platform_device.h>
9#include <linux/mtd/mtd.h>
10#include <linux/mtd/map.h>
11#include <linux/mtd/partitions.h>
12#include <linux/mtd/nand.h>
13#include <linux/mtd/ndfc.h>
14
15#ifdef CONFIG_MTD_NAND_NDFC
16
17#define CS_NAND_0 1 /* use chip select 1 for NAND device 0 */
18
19#define WARP_NAND_FLASH_REG_ADDR 0xD0000000UL
20#define WARP_NAND_FLASH_REG_SIZE 0x2000
21
22static struct resource warp_ndfc = {
23 .start = WARP_NAND_FLASH_REG_ADDR,
24 .end = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE,
25 .flags = IORESOURCE_MEM,
26};
27
28static struct mtd_partition nand_parts[] = {
29 {
30 .name = "kernel",
31 .offset = 0,
32 .size = 0x0200000
33 },
34 {
35 .name = "root",
36 .offset = 0x0200000,
37 .size = 0x3400000
38 },
39 {
40 .name = "user",
41 .offset = 0x3600000,
42 .size = 0x0A00000
43 },
44};
45
46struct ndfc_controller_settings warp_ndfc_settings = {
47 .ccr_settings = (NDFC_CCR_BS(CS_NAND_0) | NDFC_CCR_ARAC1),
48 .ndfc_erpn = 0,
49};
50
51static struct ndfc_chip_settings warp_chip0_settings = {
52 .bank_settings = 0x80002222,
53};
54
55struct platform_nand_ctrl warp_nand_ctrl = {
56 .priv = &warp_ndfc_settings,
57};
58
59static struct platform_device warp_ndfc_device = {
60 .name = "ndfc-nand",
61 .id = 0,
62 .dev = {
63 .platform_data = &warp_nand_ctrl,
64 },
65 .num_resources = 1,
66 .resource = &warp_ndfc,
67};
68
69static struct nand_ecclayout nand_oob_16 = {
70 .eccbytes = 3,
71 .eccpos = { 0, 1, 2, 3, 6, 7 },
72 .oobfree = { {.offset = 8, .length = 16} }
73};
74
75static struct platform_nand_chip warp_nand_chip0 = {
76 .nr_chips = 1,
77 .chip_offset = CS_NAND_0,
78 .nr_partitions = ARRAY_SIZE(nand_parts),
79 .partitions = nand_parts,
80 .chip_delay = 50,
81 .ecclayout = &nand_oob_16,
82 .priv = &warp_chip0_settings,
83};
84
85static struct platform_device warp_nand_device = {
86 .name = "ndfc-chip",
87 .id = 0,
88 .num_resources = 1,
89 .resource = &warp_ndfc,
90 .dev = {
91 .platform_data = &warp_nand_chip0,
92 .parent = &warp_ndfc_device.dev,
93 }
94};
95
96static int warp_setup_nand_flash(void)
97{
98 platform_device_register(&warp_ndfc_device);
99 platform_device_register(&warp_nand_device);
100
101 return 0;
102}
103device_initcall(warp_setup_nand_flash);
104
105#endif
diff --git a/arch/powerpc/platforms/44x/warp.c b/arch/powerpc/platforms/44x/warp.c
new file mode 100644
index 000000000000..8f01563dbd2a
--- /dev/null
+++ b/arch/powerpc/platforms/44x/warp.c
@@ -0,0 +1,153 @@
1/*
2 * PIKA Warp(tm) board specific routines
3 *
4 * Copyright (c) 2008 PIKA Technologies
5 * Sean MacLennan <smaclennan@pikatech.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12#include <linux/init.h>
13#include <linux/of_platform.h>
14#include <linux/kthread.h>
15
16#include <asm/machdep.h>
17#include <asm/prom.h>
18#include <asm/udbg.h>
19#include <asm/time.h>
20#include <asm/uic.h>
21
22#include "44x.h"
23
24
25static __initdata struct of_device_id warp_of_bus[] = {
26 { .compatible = "ibm,plb4", },
27 { .compatible = "ibm,opb", },
28 { .compatible = "ibm,ebc", },
29 {},
30};
31
32static int __init warp_device_probe(void)
33{
34 of_platform_bus_probe(NULL, warp_of_bus, NULL);
35 return 0;
36}
37machine_device_initcall(warp, warp_device_probe);
38
39static int __init warp_probe(void)
40{
41 unsigned long root = of_get_flat_dt_root();
42
43 return of_flat_dt_is_compatible(root, "pika,warp");
44}
45
46define_machine(warp) {
47 .name = "Warp",
48 .probe = warp_probe,
49 .progress = udbg_progress,
50 .init_IRQ = uic_init_tree,
51 .get_irq = uic_get_irq,
52 .restart = ppc44x_reset_system,
53 .calibrate_decr = generic_calibrate_decr,
54};
55
56
57#define LED_GREEN (0x80000000 >> 0)
58#define LED_RED (0x80000000 >> 1)
59
60
61/* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */
62void warp_set_power_leds(int green, int red)
63{
64 static void __iomem *gpio_base = NULL;
65 unsigned leds;
66
67 if (gpio_base == NULL) {
68 struct device_node *np;
69
70 /* Power LEDS are on the second GPIO controller */
71 np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
72 if (np)
73 np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
74 if (np == NULL) {
75 printk(KERN_ERR __FILE__ ": Unable to find gpio\n");
76 return;
77 }
78
79 gpio_base = of_iomap(np, 0);
80 of_node_put(np);
81 if (gpio_base == NULL) {
82 printk(KERN_ERR __FILE__ ": Unable to map gpio");
83 return;
84 }
85 }
86
87 leds = in_be32(gpio_base);
88
89 switch (green) {
90 case 0: leds &= ~LED_GREEN; break;
91 case 1: leds |= LED_GREEN; break;
92 }
93 switch (red) {
94 case 0: leds &= ~LED_RED; break;
95 case 1: leds |= LED_RED; break;
96 }
97
98 out_be32(gpio_base, leds);
99}
100EXPORT_SYMBOL(warp_set_power_leds);
101
102
103#ifdef CONFIG_SENSORS_AD7414
104static int pika_dtm_thread(void __iomem *fpga)
105{
106 extern int ad7414_get_temp(int index);
107
108 while (!kthread_should_stop()) {
109 int temp = ad7414_get_temp(0);
110
111 out_be32(fpga, temp);
112
113 set_current_state(TASK_INTERRUPTIBLE);
114 schedule_timeout(HZ);
115 }
116
117 return 0;
118}
119
120static int __init pika_dtm_start(void)
121{
122 struct task_struct *dtm_thread;
123 struct device_node *np;
124 struct resource res;
125 void __iomem *fpga;
126
127 np = of_find_compatible_node(NULL, NULL, "pika,fpga");
128 if (np == NULL)
129 return -ENOENT;
130
131 /* We do not call of_iomap here since it would map in the entire
132 * fpga space, which is over 8k.
133 */
134 if (of_address_to_resource(np, 0, &res)) {
135 of_node_put(np);
136 return -ENOENT;
137 }
138 of_node_put(np);
139
140 fpga = ioremap(res.start + 0x20, 4);
141 if (fpga == NULL)
142 return -ENOENT;
143
144 dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm");
145 if (IS_ERR(dtm_thread)) {
146 iounmap(fpga);
147 return PTR_ERR(dtm_thread);
148 }
149
150 return 0;
151}
152device_initcall(pika_dtm_start);
153#endif
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index 2938d4927b83..515f244c90bb 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -1,38 +1,48 @@
1config PPC_MPC52xx 1config PPC_MPC52xx
2 bool 2 bool "52xx-based boards"
3 depends on PPC_MULTIPLATFORM && PPC32
3 select FSL_SOC 4 select FSL_SOC
4 select PPC_CLOCK 5 select PPC_CLOCK
5 default n
6
7config PPC_MPC5200
8 bool
9 select PPC_MPC52xx
10 default n
11 6
12config PPC_MPC5200_BUGFIX 7config PPC_MPC5200_SIMPLE
13 bool "MPC5200 (L25R) bugfix support" 8 bool "Generic support for simple MPC5200 based boards"
14 depends on PPC_MPC5200 9 depends on PPC_MPC52xx
15 default n 10 select DEFAULT_UIMAGE
11 select WANT_DEVICE_TREE
16 help 12 help
17 Enable workarounds for original MPC5200 errata. This is not required 13 This option enables support for a simple MPC52xx based boards which
18 for MPC5200B based boards. 14 do not need a custom platform specific setup. Such boards are
15 supported assuming the following:
19 16
20 It is safe to say 'Y' here 17 - GPIO pins are configured by the firmware,
18 - CDM configuration (clocking) is setup correctly by firmware,
19 - if the 'fsl,has-wdt' property is present in one of the
20 gpt nodes, then it is safe to use such gpt to reset the board,
21 - PCI is supported if enabled in the kernel configuration
22 and if there is a PCI bus node defined in the device tree.
23
24 Boards that are compatible with this generic platform support
25 are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'.
21 26
22config PPC_EFIKA 27config PPC_EFIKA
23 bool "bPlan Efika 5k2. MPC5200B based computer" 28 bool "bPlan Efika 5k2. MPC5200B based computer"
24 depends on PPC_MULTIPLATFORM && PPC32 29 depends on PPC_MPC52xx
25 select PPC_RTAS 30 select PPC_RTAS
26 select RTAS_PROC 31 select RTAS_PROC
27 select PPC_MPC52xx
28 select PPC_NATIVE 32 select PPC_NATIVE
29 default n
30 33
31config PPC_LITE5200 34config PPC_LITE5200
32 bool "Freescale Lite5200 Eval Board" 35 bool "Freescale Lite5200 Eval Board"
33 depends on PPC_MULTIPLATFORM && PPC32 36 depends on PPC_MPC52xx
37 select DEFAULT_UIMAGE
34 select WANT_DEVICE_TREE 38 select WANT_DEVICE_TREE
35 select PPC_MPC5200
36 default n
37 39
40config PPC_MPC5200_BUGFIX
41 bool "MPC5200 (L25R) bugfix support"
42 depends on PPC_MPC52xx
43 help
44 Enable workarounds for original MPC5200 errata. This is not required
45 for MPC5200B based boards.
46
47 It is safe to say 'Y' here
38 48
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile
index 307dbc178091..fe1b81bb5224 100644
--- a/arch/powerpc/platforms/52xx/Makefile
+++ b/arch/powerpc/platforms/52xx/Makefile
@@ -6,6 +6,7 @@ obj-y += mpc52xx_pic.o mpc52xx_common.o
6obj-$(CONFIG_PCI) += mpc52xx_pci.o 6obj-$(CONFIG_PCI) += mpc52xx_pci.o
7endif 7endif
8 8
9obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o
9obj-$(CONFIG_PPC_EFIKA) += efika.o 10obj-$(CONFIG_PPC_EFIKA) += efika.o
10obj-$(CONFIG_PPC_LITE5200) += lite5200.o 11obj-$(CONFIG_PPC_LITE5200) += lite5200.o
11 12
diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
index a0da70c8b502..a2068faef6ea 100644
--- a/arch/powerpc/platforms/52xx/efika.c
+++ b/arch/powerpc/platforms/52xx/efika.c
@@ -180,6 +180,9 @@ static void __init efika_setup_arch(void)
180{ 180{
181 rtas_initialize(); 181 rtas_initialize();
182 182
183 /* Map important registers from the internal memory map */
184 mpc52xx_map_common_devices();
185
183 efika_pcisetup(); 186 efika_pcisetup();
184 187
185#ifdef CONFIG_PM 188#ifdef CONFIG_PM
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 25d2bfa3d9dc..956f459e175c 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -32,6 +32,19 @@
32 * 32 *
33 */ 33 */
34 34
35/* mpc5200 device tree match tables */
36static struct of_device_id mpc5200_cdm_ids[] __initdata = {
37 { .compatible = "fsl,mpc5200-cdm", },
38 { .compatible = "mpc5200-cdm", },
39 {}
40};
41
42static struct of_device_id mpc5200_gpio_ids[] __initdata = {
43 { .compatible = "fsl,mpc5200-gpio", },
44 { .compatible = "mpc5200-gpio", },
45 {}
46};
47
35/* 48/*
36 * Fix clock configuration. 49 * Fix clock configuration.
37 * 50 *
@@ -42,10 +55,12 @@
42static void __init 55static void __init
43lite5200_fix_clock_config(void) 56lite5200_fix_clock_config(void)
44{ 57{
58 struct device_node *np;
45 struct mpc52xx_cdm __iomem *cdm; 59 struct mpc52xx_cdm __iomem *cdm;
46
47 /* Map zones */ 60 /* Map zones */
48 cdm = mpc52xx_find_and_map("mpc5200-cdm"); 61 np = of_find_matching_node(NULL, mpc5200_cdm_ids);
62 cdm = of_iomap(np, 0);
63 of_node_put(np);
49 if (!cdm) { 64 if (!cdm) {
50 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n", 65 printk(KERN_ERR "%s() failed; expect abnormal behaviour\n",
51 __FUNCTION__); 66 __FUNCTION__);
@@ -74,10 +89,13 @@ lite5200_fix_clock_config(void)
74static void __init 89static void __init
75lite5200_fix_port_config(void) 90lite5200_fix_port_config(void)
76{ 91{
92 struct device_node *np;
77 struct mpc52xx_gpio __iomem *gpio; 93 struct mpc52xx_gpio __iomem *gpio;
78 u32 port_config; 94 u32 port_config;
79 95
80 gpio = mpc52xx_find_and_map("mpc5200-gpio"); 96 np = of_find_matching_node(NULL, mpc5200_gpio_ids);
97 gpio = of_iomap(np, 0);
98 of_node_put(np);
81 if (!gpio) { 99 if (!gpio) {
82 printk(KERN_ERR "%s() failed. expect abnormal behavior\n", 100 printk(KERN_ERR "%s() failed. expect abnormal behavior\n",
83 __FUNCTION__); 101 __FUNCTION__);
@@ -131,22 +149,18 @@ static void lite5200_resume_finish(void __iomem *mbar)
131 149
132static void __init lite5200_setup_arch(void) 150static void __init lite5200_setup_arch(void)
133{ 151{
134#ifdef CONFIG_PCI
135 struct device_node *np;
136#endif
137
138 if (ppc_md.progress) 152 if (ppc_md.progress)
139 ppc_md.progress("lite5200_setup_arch()", 0); 153 ppc_md.progress("lite5200_setup_arch()", 0);
140 154
141 /* Fix things that firmware should have done. */ 155 /* Map important registers from the internal memory map */
142 lite5200_fix_clock_config(); 156 mpc52xx_map_common_devices();
143 lite5200_fix_port_config();
144 157
145 /* Some mpc5200 & mpc5200b related configuration */ 158 /* Some mpc5200 & mpc5200b related configuration */
146 mpc5200_setup_xlb_arbiter(); 159 mpc5200_setup_xlb_arbiter();
147 160
148 /* Map wdt for mpc52xx_restart() */ 161 /* Fix things that firmware should have done. */
149 mpc52xx_map_wdt(); 162 lite5200_fix_clock_config();
163 lite5200_fix_port_config();
150 164
151#ifdef CONFIG_PM 165#ifdef CONFIG_PM
152 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare; 166 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare;
@@ -154,13 +168,7 @@ static void __init lite5200_setup_arch(void)
154 lite5200_pm_init(); 168 lite5200_pm_init();
155#endif 169#endif
156 170
157#ifdef CONFIG_PCI 171 mpc52xx_setup_pci();
158 np = of_find_node_by_type(NULL, "pci");
159 if (np) {
160 mpc52xx_add_bridge(np);
161 of_node_put(np);
162 }
163#endif
164} 172}
165 173
166/* 174/*
diff --git a/arch/powerpc/platforms/52xx/lite5200_pm.c b/arch/powerpc/platforms/52xx/lite5200_pm.c
index ffa14aff5248..c0f13e8deb0b 100644
--- a/arch/powerpc/platforms/52xx/lite5200_pm.c
+++ b/arch/powerpc/platforms/52xx/lite5200_pm.c
@@ -42,6 +42,15 @@ static int lite5200_pm_set_target(suspend_state_t state)
42 42
43static int lite5200_pm_prepare(void) 43static int lite5200_pm_prepare(void)
44{ 44{
45 struct device_node *np;
46 const struct of_device_id immr_ids[] = {
47 { .compatible = "fsl,mpc5200-immr", },
48 { .compatible = "fsl,mpc5200b-immr", },
49 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
50 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
51 {}
52 };
53
45 /* deep sleep? let mpc52xx code handle that */ 54 /* deep sleep? let mpc52xx code handle that */
46 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY) 55 if (lite5200_pm_target_state == PM_SUSPEND_STANDBY)
47 return mpc52xx_pm_prepare(); 56 return mpc52xx_pm_prepare();
@@ -50,7 +59,9 @@ static int lite5200_pm_prepare(void)
50 return -EINVAL; 59 return -EINVAL;
51 60
52 /* map registers */ 61 /* map registers */
53 mbar = mpc52xx_find_and_map("mpc5200"); 62 np = of_find_matching_node(NULL, immr_ids);
63 mbar = of_iomap(np, 0);
64 of_node_put(np);
54 if (!mbar) { 65 if (!mbar) {
55 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); 66 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
56 return -ENOSYS; 67 return -ENOSYS;
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c
new file mode 100644
index 000000000000..c48b82bc2aad
--- /dev/null
+++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c
@@ -0,0 +1,85 @@
1/*
2 * Support for 'mpc5200-simple-platform' compatible boards.
3 *
4 * Written by Marian Balakowicz <m8@semihalf.com>
5 * Copyright (C) 2007 Semihalf
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 * Description:
13 * This code implements support for a simple MPC52xx based boards which
14 * do not need a custom platform specific setup. Such boards are
15 * supported assuming the following:
16 *
17 * - GPIO pins are configured by the firmware,
18 * - CDM configuration (clocking) is setup correctly by firmware,
19 * - if the 'fsl,has-wdt' property is present in one of the
20 * gpt nodes, then it is safe to use such gpt to reset the board,
21 * - PCI is supported if enabled in the kernel configuration
22 * and if there is a PCI bus node defined in the device tree.
23 *
24 * Boards that are compatible with this generic platform support
25 * are listed in a 'board' table.
26 */
27
28#undef DEBUG
29#include <asm/time.h>
30#include <asm/prom.h>
31#include <asm/machdep.h>
32#include <asm/mpc52xx.h>
33
34/*
35 * Setup the architecture
36 */
37static void __init mpc5200_simple_setup_arch(void)
38{
39 if (ppc_md.progress)
40 ppc_md.progress("mpc5200_simple_setup_arch()", 0);
41
42 /* Map important registers from the internal memory map */
43 mpc52xx_map_common_devices();
44
45 /* Some mpc5200 & mpc5200b related configuration */
46 mpc5200_setup_xlb_arbiter();
47
48 mpc52xx_setup_pci();
49}
50
51/* list of the supported boards */
52static char *board[] __initdata = {
53 "promess,motionpro",
54 "schindler,cm5200",
55 "tqc,tqm5200",
56 NULL
57};
58
59/*
60 * Called very early, MMU is off, device-tree isn't unflattened
61 */
62static int __init mpc5200_simple_probe(void)
63{
64 unsigned long node = of_get_flat_dt_root();
65 int i = 0;
66
67 while (board[i]) {
68 if (of_flat_dt_is_compatible(node, board[i]))
69 break;
70 i++;
71 }
72
73 return (board[i] != NULL);
74}
75
76define_machine(mpc5200_simple_platform) {
77 .name = "mpc5200-simple-platform",
78 .probe = mpc5200_simple_probe,
79 .setup_arch = mpc5200_simple_setup_arch,
80 .init = mpc52xx_declare_of_platform_devices,
81 .init_IRQ = mpc52xx_init_irq,
82 .get_irq = mpc52xx_get_irq,
83 .restart = mpc52xx_restart,
84 .calibrate_decr = generic_calibrate_decr,
85};
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 9850685c5429..9aa4425d80b2 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -13,57 +13,38 @@
13#undef DEBUG 13#undef DEBUG
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/spinlock.h>
16#include <linux/of_platform.h> 17#include <linux/of_platform.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <asm/prom.h> 19#include <asm/prom.h>
19#include <asm/mpc52xx.h> 20#include <asm/mpc52xx.h>
20 21
22/* MPC5200 device tree match tables */
23static struct of_device_id mpc52xx_xlb_ids[] __initdata = {
24 { .compatible = "fsl,mpc5200-xlb", },
25 { .compatible = "mpc5200-xlb", },
26 {}
27};
28static struct of_device_id mpc52xx_bus_ids[] __initdata = {
29 { .compatible = "fsl,mpc5200-immr", },
30 { .compatible = "fsl,mpc5200b-immr", },
31 { .compatible = "fsl,lpb", },
32
33 /* depreciated matches; shouldn't be used in new device trees */
34 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
35 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
36 {}
37};
38
21/* 39/*
22 * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart(). 40 * This variable is mapped in mpc52xx_map_wdt() and used in mpc52xx_restart().
23 * Permanent mapping is required because mpc52xx_restart() can be called 41 * Permanent mapping is required because mpc52xx_restart() can be called
24 * from interrupt context while node mapping (which calls ioremap()) 42 * from interrupt context while node mapping (which calls ioremap())
25 * cannot be used at such point. 43 * cannot be used at such point.
26 */ 44 */
27static volatile struct mpc52xx_gpt *mpc52xx_wdt = NULL; 45static spinlock_t mpc52xx_lock = SPIN_LOCK_UNLOCKED;
28 46static struct mpc52xx_gpt __iomem *mpc52xx_wdt;
29static void __iomem * 47static struct mpc52xx_cdm __iomem *mpc52xx_cdm;
30mpc52xx_map_node(struct device_node *ofn)
31{
32 const u32 *regaddr_p;
33 u64 regaddr64, size64;
34
35 if (!ofn)
36 return NULL;
37
38 regaddr_p = of_get_address(ofn, 0, &size64, NULL);
39 if (!regaddr_p) {
40 of_node_put(ofn);
41 return NULL;
42 }
43
44 regaddr64 = of_translate_address(ofn, regaddr_p);
45
46 of_node_put(ofn);
47
48 return ioremap((u32)regaddr64, (u32)size64);
49}
50
51void __iomem *
52mpc52xx_find_and_map(const char *compatible)
53{
54 return mpc52xx_map_node(
55 of_find_compatible_node(NULL, NULL, compatible));
56}
57
58EXPORT_SYMBOL(mpc52xx_find_and_map);
59
60void __iomem *
61mpc52xx_find_and_map_path(const char *path)
62{
63 return mpc52xx_map_node(of_find_node_by_path(path));
64}
65
66EXPORT_SYMBOL(mpc52xx_find_and_map_path);
67 48
68/** 49/**
69 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device 50 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
@@ -101,9 +82,12 @@ EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
101void __init 82void __init
102mpc5200_setup_xlb_arbiter(void) 83mpc5200_setup_xlb_arbiter(void)
103{ 84{
85 struct device_node *np;
104 struct mpc52xx_xlb __iomem *xlb; 86 struct mpc52xx_xlb __iomem *xlb;
105 87
106 xlb = mpc52xx_find_and_map("mpc5200-xlb"); 88 np = of_find_matching_node(NULL, mpc52xx_xlb_ids);
89 xlb = of_iomap(np, 0);
90 of_node_put(np);
107 if (!xlb) { 91 if (!xlb) {
108 printk(KERN_ERR __FILE__ ": " 92 printk(KERN_ERR __FILE__ ": "
109 "Error mapping XLB in mpc52xx_setup_cpu(). " 93 "Error mapping XLB in mpc52xx_setup_cpu(). "
@@ -124,41 +108,101 @@ mpc5200_setup_xlb_arbiter(void)
124 iounmap(xlb); 108 iounmap(xlb);
125} 109}
126 110
111/**
112 * mpc52xx_declare_of_platform_devices: register internal devices and children
113 * of the localplus bus to the of_platform
114 * bus.
115 */
127void __init 116void __init
128mpc52xx_declare_of_platform_devices(void) 117mpc52xx_declare_of_platform_devices(void)
129{ 118{
130 /* Find every child of the SOC node and add it to of_platform */ 119 /* Find every child of the SOC node and add it to of_platform */
131 if (of_platform_bus_probe(NULL, NULL, NULL)) 120 if (of_platform_bus_probe(NULL, mpc52xx_bus_ids, NULL))
132 printk(KERN_ERR __FILE__ ": " 121 printk(KERN_ERR __FILE__ ": "
133 "Error while probing of_platform bus\n"); 122 "Error while probing of_platform bus\n");
134} 123}
135 124
125/*
126 * match tables used by mpc52xx_map_common_devices()
127 */
128static struct of_device_id mpc52xx_gpt_ids[] __initdata = {
129 { .compatible = "fsl,mpc5200-gpt", },
130 { .compatible = "mpc5200-gpt", }, /* old */
131 {}
132};
133static struct of_device_id mpc52xx_cdm_ids[] __initdata = {
134 { .compatible = "fsl,mpc5200-cdm", },
135 { .compatible = "mpc5200-cdm", }, /* old */
136 {}
137};
138
139/**
140 * mpc52xx_map_common_devices: iomap devices required by common code
141 */
136void __init 142void __init
137mpc52xx_map_wdt(void) 143mpc52xx_map_common_devices(void)
138{ 144{
139 const void *has_wdt;
140 struct device_node *np; 145 struct device_node *np;
141 146
142 /* mpc52xx_wdt is mapped here and used in mpc52xx_restart, 147 /* mpc52xx_wdt is mapped here and used in mpc52xx_restart,
143 * possibly from a interrupt context. wdt is only implement 148 * possibly from a interrupt context. wdt is only implement
144 * on a gpt0, so check has-wdt property before mapping. 149 * on a gpt0, so check has-wdt property before mapping.
145 */ 150 */
146 for_each_compatible_node(np, NULL, "fsl,mpc5200-gpt") { 151 for_each_matching_node(np, mpc52xx_gpt_ids) {
147 has_wdt = of_get_property(np, "fsl,has-wdt", NULL); 152 if (of_get_property(np, "fsl,has-wdt", NULL) ||
148 if (has_wdt) { 153 of_get_property(np, "has-wdt", NULL)) {
149 mpc52xx_wdt = mpc52xx_map_node(np); 154 mpc52xx_wdt = of_iomap(np, 0);
150 return; 155 of_node_put(np);
156 break;
151 } 157 }
152 } 158 }
153 for_each_compatible_node(np, NULL, "mpc5200-gpt") { 159
154 has_wdt = of_get_property(np, "has-wdt", NULL); 160 /* Clock Distribution Module, used by PSC clock setting function */
155 if (has_wdt) { 161 np = of_find_matching_node(NULL, mpc52xx_cdm_ids);
156 mpc52xx_wdt = mpc52xx_map_node(np); 162 mpc52xx_cdm = of_iomap(np, 0);
157 return; 163 of_node_put(np);
158 } 164}
165
166/**
167 * mpc52xx_set_psc_clkdiv: Set clock divider in the CDM for PSC ports
168 *
169 * @psc_id: id of psc port; must be 1,2,3 or 6
170 * @clkdiv: clock divider value to put into CDM PSC register.
171 */
172int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
173{
174 unsigned long flags;
175 u16 __iomem *reg;
176 u32 val;
177 u32 mask;
178 u32 mclken_div;
179
180 if (!mpc52xx_cdm)
181 return -ENODEV;
182
183 mclken_div = 0x8000 | (clkdiv & 0x1FF);
184 switch (psc_id) {
185 case 1: reg = &mpc52xx_cdm->mclken_div_psc1; mask = 0x20; break;
186 case 2: reg = &mpc52xx_cdm->mclken_div_psc2; mask = 0x40; break;
187 case 3: reg = &mpc52xx_cdm->mclken_div_psc3; mask = 0x80; break;
188 case 6: reg = &mpc52xx_cdm->mclken_div_psc6; mask = 0x10; break;
189 default:
190 return -ENODEV;
159 } 191 }
192
193 /* Set the rate and enable the clock */
194 spin_lock_irqsave(&mpc52xx_lock, flags);
195 out_be16(reg, mclken_div);
196 val = in_be32(&mpc52xx_cdm->clk_enables);
197 out_be32(&mpc52xx_cdm->clk_enables, val | mask);
198 spin_unlock_irqrestore(&mpc52xx_lock, flags);
199
200 return 0;
160} 201}
161 202
203/**
204 * mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
205 */
162void 206void
163mpc52xx_restart(char *cmd) 207mpc52xx_restart(char *cmd)
164{ 208{
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a684b1..e3428ddd9040 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -99,6 +99,12 @@ struct mpc52xx_pci {
99 u8 reserved6[4]; /* PCI + 0xFC */ 99 u8 reserved6[4]; /* PCI + 0xFC */
100}; 100};
101 101
102/* MPC5200 device tree match tables */
103const struct of_device_id mpc52xx_pci_ids[] __initdata = {
104 { .type = "pci", .compatible = "fsl,mpc5200-pci", },
105 { .type = "pci", .compatible = "mpc5200-pci", },
106 {}
107};
102 108
103/* ======================================================================== */ 109/* ======================================================================== */
104/* PCI configuration acess */ 110/* PCI configuration acess */
@@ -363,7 +369,7 @@ mpc52xx_add_bridge(struct device_node *node)
363 369
364 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name); 370 pr_debug("Adding MPC52xx PCI host bridge %s\n", node->full_name);
365 371
366 pci_assign_all_buses = 1; 372 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
367 373
368 if (of_address_to_resource(node, 0, &rsrc) != 0) { 374 if (of_address_to_resource(node, 0, &rsrc) != 0) {
369 printk(KERN_ERR "Can't get %s resources\n", node->full_name); 375 printk(KERN_ERR "Can't get %s resources\n", node->full_name);
@@ -406,3 +412,15 @@ mpc52xx_add_bridge(struct device_node *node)
406 412
407 return 0; 413 return 0;
408} 414}
415
416void __init mpc52xx_setup_pci(void)
417{
418 struct device_node *pci;
419
420 pci = of_find_matching_node(NULL, mpc52xx_pci_ids);
421 if (!pci)
422 return;
423
424 mpc52xx_add_bridge(pci);
425 of_node_put(pci);
426}
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index 61100f270c68..d0dead8b9a95 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -29,6 +29,18 @@
29 * 29 *
30*/ 30*/
31 31
32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_pic_ids[] __initdata = {
34 { .compatible = "fsl,mpc5200-pic", },
35 { .compatible = "mpc5200-pic", },
36 {}
37};
38static struct of_device_id mpc52xx_sdma_ids[] __initdata = {
39 { .compatible = "fsl,mpc5200-bestcomm", },
40 { .compatible = "mpc5200-bestcomm", },
41 {}
42};
43
32static struct mpc52xx_intr __iomem *intr; 44static struct mpc52xx_intr __iomem *intr;
33static struct mpc52xx_sdma __iomem *sdma; 45static struct mpc52xx_sdma __iomem *sdma;
34static struct irq_host *mpc52xx_irqhost = NULL; 46static struct irq_host *mpc52xx_irqhost = NULL;
@@ -364,16 +376,18 @@ void __init mpc52xx_init_irq(void)
364{ 376{
365 u32 intr_ctrl; 377 u32 intr_ctrl;
366 struct device_node *picnode; 378 struct device_node *picnode;
379 struct device_node *np;
367 380
368 /* Remap the necessary zones */ 381 /* Remap the necessary zones */
369 picnode = of_find_compatible_node(NULL, NULL, "mpc5200-pic"); 382 picnode = of_find_matching_node(NULL, mpc52xx_pic_ids);
370 383 intr = of_iomap(picnode, 0);
371 intr = mpc52xx_find_and_map("mpc5200-pic");
372 if (!intr) 384 if (!intr)
373 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. " 385 panic(__FILE__ ": find_and_map failed on 'mpc5200-pic'. "
374 "Check node !"); 386 "Check node !");
375 387
376 sdma = mpc52xx_find_and_map("mpc5200-bestcomm"); 388 np = of_find_matching_node(NULL, mpc52xx_sdma_ids);
389 sdma = of_iomap(np, 0);
390 of_node_put(np);
377 if (!sdma) 391 if (!sdma)
378 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. " 392 panic(__FILE__ ": find_and_map failed on 'mpc5200-bestcomm'. "
379 "Check node !"); 393 "Check node !");
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
index 7ffa7babf254..c72d3304387f 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c
@@ -59,10 +59,21 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
59 59
60int mpc52xx_pm_prepare(void) 60int mpc52xx_pm_prepare(void)
61{ 61{
62 struct device_node *np;
63 const struct of_device_id immr_ids[] = {
64 { .compatible = "fsl,mpc5200-immr", },
65 { .compatible = "fsl,mpc5200b-immr", },
66 { .type = "soc", .compatible = "mpc5200", }, /* lite5200 */
67 { .type = "builtin", .compatible = "mpc5200", }, /* efika */
68 {}
69 };
70
62 /* map the whole register space */ 71 /* map the whole register space */
63 mbar = mpc52xx_find_and_map("mpc5200"); 72 np = of_find_matching_node(NULL, immr_ids);
73 mbar = of_iomap(np, 0);
74 of_node_put(np);
64 if (!mbar) { 75 if (!mbar) {
65 printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__); 76 pr_err("mpc52xx_pm_prepare(): could not map registers\n");
66 return -ENOSYS; 77 return -ENOSYS;
67 } 78 }
68 /* these offsets are from mpc5200 users manual */ 79 /* these offsets are from mpc5200 users manual */
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index 541fbb815631..4fad6c7bf9f1 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -26,6 +26,19 @@ config PQ2FADS
26 help 26 help
27 This option enables support for the PQ2FADS board 27 This option enables support for the PQ2FADS board
28 28
29config EP8248E
30 bool "Embedded Planet EP8248E (a.k.a. CWH-PPC-8248N-VE)"
31 select 8272
32 select 8260
33 select FSL_SOC
34 select PPC_CPM_NEW_BINDING
35 select MDIO_BITBANG
36 help
37 This enables support for the Embedded Planet EP8248E board.
38
39 This board is also resold by Freescale as the QUICCStart
40 MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.
41
29endchoice 42endchoice
30 43
31config PQ2ADS 44config PQ2ADS
diff --git a/arch/powerpc/platforms/82xx/Makefile b/arch/powerpc/platforms/82xx/Makefile
index 68c8b0c9772b..6cd5cd59bf2a 100644
--- a/arch/powerpc/platforms/82xx/Makefile
+++ b/arch/powerpc/platforms/82xx/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_MPC8272_ADS) += mpc8272_ads.o
5obj-$(CONFIG_CPM2) += pq2.o 5obj-$(CONFIG_CPM2) += pq2.o
6obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o 6obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
7obj-$(CONFIG_PQ2FADS) += pq2fads.o 7obj-$(CONFIG_PQ2FADS) += pq2fads.o
8obj-$(CONFIG_EP8248E) += ep8248e.o
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
new file mode 100644
index 000000000000..ba93d8ae9b0c
--- /dev/null
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -0,0 +1,324 @@
1/*
2 * Embedded Planet EP8248E support
3 *
4 * Copyright 2007 Freescale Semiconductor, Inc.
5 * Author: Scott Wood <scottwood@freescale.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <linux/init.h>
14#include <linux/interrupt.h>
15#include <linux/fsl_devices.h>
16#include <linux/mdio-bitbang.h>
17#include <linux/of_platform.h>
18
19#include <asm/io.h>
20#include <asm/cpm2.h>
21#include <asm/udbg.h>
22#include <asm/machdep.h>
23#include <asm/time.h>
24#include <asm/mpc8260.h>
25#include <asm/prom.h>
26
27#include <sysdev/fsl_soc.h>
28#include <sysdev/cpm2_pic.h>
29
30#include "pq2.h"
31
32static u8 __iomem *ep8248e_bcsr;
33static struct device_node *ep8248e_bcsr_node;
34
35#define BCSR7_SCC2_ENABLE 0x10
36
37#define BCSR8_PHY1_ENABLE 0x80
38#define BCSR8_PHY1_POWER 0x40
39#define BCSR8_PHY2_ENABLE 0x20
40#define BCSR8_PHY2_POWER 0x10
41#define BCSR8_MDIO_READ 0x04
42#define BCSR8_MDIO_CLOCK 0x02
43#define BCSR8_MDIO_DATA 0x01
44
45#define BCSR9_USB_ENABLE 0x80
46#define BCSR9_USB_POWER 0x40
47#define BCSR9_USB_HOST 0x20
48#define BCSR9_USB_FULL_SPEED_TARGET 0x10
49
50static void __init ep8248e_pic_init(void)
51{
52 struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic");
53 if (!np) {
54 printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
55 return;
56 }
57
58 cpm2_pic_init(np);
59 of_node_put(np);
60}
61
62static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level)
63{
64 if (level)
65 setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
66 else
67 clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_CLOCK);
68
69 /* Read back to flush the write. */
70 in_8(&ep8248e_bcsr[8]);
71}
72
73static void ep8248e_set_mdio_dir(struct mdiobb_ctrl *ctrl, int output)
74{
75 if (output)
76 clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
77 else
78 setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_READ);
79
80 /* Read back to flush the write. */
81 in_8(&ep8248e_bcsr[8]);
82}
83
84static void ep8248e_set_mdio_data(struct mdiobb_ctrl *ctrl, int data)
85{
86 if (data)
87 setbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
88 else
89 clrbits8(&ep8248e_bcsr[8], BCSR8_MDIO_DATA);
90
91 /* Read back to flush the write. */
92 in_8(&ep8248e_bcsr[8]);
93}
94
95static int ep8248e_get_mdio_data(struct mdiobb_ctrl *ctrl)
96{
97 return in_8(&ep8248e_bcsr[8]) & BCSR8_MDIO_DATA;
98}
99
100static const struct mdiobb_ops ep8248e_mdio_ops = {
101 .set_mdc = ep8248e_set_mdc,
102 .set_mdio_dir = ep8248e_set_mdio_dir,
103 .set_mdio_data = ep8248e_set_mdio_data,
104 .get_mdio_data = ep8248e_get_mdio_data,
105 .owner = THIS_MODULE,
106};
107
108static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
109 .ops = &ep8248e_mdio_ops,
110};
111
112static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
113 const struct of_device_id *match)
114{
115 struct mii_bus *bus;
116 struct resource res;
117 struct device_node *node;
118 int ret, i;
119
120 node = of_get_parent(ofdev->node);
121 of_node_put(node);
122 if (node != ep8248e_bcsr_node)
123 return -ENODEV;
124
125 ret = of_address_to_resource(ofdev->node, 0, &res);
126 if (ret)
127 return ret;
128
129 bus = alloc_mdio_bitbang(&ep8248e_mdio_ctrl);
130 if (!bus)
131 return -ENOMEM;
132
133 bus->phy_mask = 0;
134 bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
135
136 for (i = 0; i < PHY_MAX_ADDR; i++)
137 bus->irq[i] = -1;
138
139 bus->name = "ep8248e-mdio-bitbang";
140 bus->dev = &ofdev->dev;
141 bus->id = res.start;
142
143 return mdiobus_register(bus);
144}
145
146static int ep8248e_mdio_remove(struct of_device *ofdev)
147{
148 BUG();
149 return 0;
150}
151
152static const struct of_device_id ep8248e_mdio_match[] = {
153 {
154 .compatible = "fsl,ep8248e-mdio-bitbang",
155 },
156 {},
157};
158
159static struct of_platform_driver ep8248e_mdio_driver = {
160 .driver = {
161 .name = "ep8248e-mdio-bitbang",
162 },
163 .match_table = ep8248e_mdio_match,
164 .probe = ep8248e_mdio_probe,
165 .remove = ep8248e_mdio_remove,
166};
167
168struct cpm_pin {
169 int port, pin, flags;
170};
171
172static __initdata struct cpm_pin ep8248e_pins[] = {
173 /* SMC1 */
174 {2, 4, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
175 {2, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
176
177 /* SCC1 */
178 {2, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
179 {2, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
180 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
181 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
182 {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
183
184 /* FCC1 */
185 {0, 14, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
186 {0, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
187 {0, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
188 {0, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
189 {0, 18, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
190 {0, 19, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
191 {0, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
192 {0, 21, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
193 {0, 26, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
194 {0, 27, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
195 {0, 28, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
196 {0, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
197 {0, 30, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
198 {0, 31, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
199 {2, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
200 {2, 22, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
201
202 /* FCC2 */
203 {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
204 {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
205 {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
206 {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
207 {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
208 {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
209 {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
210 {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
211 {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
212 {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
213 {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
214 {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
215 {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
216 {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
217 {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
218 {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
219
220 /* I2C */
221 {4, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
222 {4, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY},
223
224 /* USB */
225 {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
226 {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
227 {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
228 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
229 {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
230 {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
231 {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
232};
233
234static void __init init_ioports(void)
235{
236 int i;
237
238 for (i = 0; i < ARRAY_SIZE(ep8248e_pins); i++) {
239 const struct cpm_pin *pin = &ep8248e_pins[i];
240 cpm2_set_pin(pin->port, pin->pin, pin->flags);
241 }
242
243 cpm2_smc_clk_setup(CPM_CLK_SMC1, CPM_BRG7);
244 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
245 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
246 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK8, CPM_CLK_TX); /* USB */
247 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK11, CPM_CLK_RX);
248 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_TX);
249 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
250 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
251}
252
253static void __init ep8248e_setup_arch(void)
254{
255 if (ppc_md.progress)
256 ppc_md.progress("ep8248e_setup_arch()", 0);
257
258 cpm2_reset();
259
260 /* When this is set, snooping CPM DMA from RAM causes
261 * machine checks. See erratum SIU18.
262 */
263 clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP);
264
265 ep8248e_bcsr_node =
266 of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
267 if (!ep8248e_bcsr_node) {
268 printk(KERN_ERR "No bcsr in device tree\n");
269 return;
270 }
271
272 ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
273 if (!ep8248e_bcsr) {
274 printk(KERN_ERR "Cannot map BCSR registers\n");
275 of_node_put(ep8248e_bcsr_node);
276 ep8248e_bcsr_node = NULL;
277 return;
278 }
279
280 setbits8(&ep8248e_bcsr[7], BCSR7_SCC2_ENABLE);
281 setbits8(&ep8248e_bcsr[8], BCSR8_PHY1_ENABLE | BCSR8_PHY1_POWER |
282 BCSR8_PHY2_ENABLE | BCSR8_PHY2_POWER);
283
284 init_ioports();
285
286 if (ppc_md.progress)
287 ppc_md.progress("ep8248e_setup_arch(), finish", 0);
288}
289
290static __initdata struct of_device_id of_bus_ids[] = {
291 { .compatible = "simple-bus", },
292 { .compatible = "fsl,ep8248e-bcsr", },
293 {},
294};
295
296static int __init declare_of_platform_devices(void)
297{
298 of_platform_bus_probe(NULL, of_bus_ids, NULL);
299 of_register_platform_driver(&ep8248e_mdio_driver);
300
301 return 0;
302}
303machine_device_initcall(ep8248e, declare_of_platform_devices);
304
305/*
306 * Called very early, device-tree isn't unflattened
307 */
308static int __init ep8248e_probe(void)
309{
310 unsigned long root = of_get_flat_dt_root();
311 return of_flat_dt_is_compatible(root, "fsl,ep8248e");
312}
313
314define_machine(ep8248e)
315{
316 .name = "Embedded Planet EP8248E",
317 .probe = ep8248e_probe,
318 .setup_arch = ep8248e_setup_arch,
319 .init_IRQ = ep8248e_pic_init,
320 .get_irq = cpm2_get_irq,
321 .calibrate_decr = generic_calibrate_decr,
322 .restart = pq2_restart,
323 .progress = udbg_progress,
324};
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index fd83440eb287..3fce6b375dbc 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -165,14 +165,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
165 165
166static int __init declare_of_platform_devices(void) 166static int __init declare_of_platform_devices(void)
167{ 167{
168 if (!machine_is(mpc8272_ads))
169 return 0;
170
171 /* Publish the QE devices */ 168 /* Publish the QE devices */
172 of_platform_bus_probe(NULL, of_bus_ids, NULL); 169 of_platform_bus_probe(NULL, of_bus_ids, NULL);
173 return 0; 170 return 0;
174} 171}
175device_initcall(declare_of_platform_devices); 172machine_device_initcall(mpc8272_ads, declare_of_platform_devices);
176 173
177/* 174/*
178 * Called very early, device-tree isn't unflattened 175 * Called very early, device-tree isn't unflattened
diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index a497cbaa1ac5..1b75902fad64 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -53,13 +53,13 @@ static void __init pq2_pci_add_bridge(struct device_node *np)
53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b) 53 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b)
54 goto err; 54 goto err;
55 55
56 pci_assign_all_buses = 1; 56 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
57 57
58 hose = pcibios_alloc_controller(np); 58 hose = pcibios_alloc_controller(np);
59 if (!hose) 59 if (!hose)
60 return; 60 return;
61 61
62 hose->arch_data = np; 62 hose->dn = np;
63 63
64 setup_indirect_pci(hose, r.start + 0x100, r.start + 0x104, 0); 64 setup_indirect_pci(hose, r.start + 0x100, r.start + 0x104, 0);
65 pci_process_bridge_OF_ranges(hose, np, 1); 65 pci_process_bridge_OF_ranges(hose, np, 1);
diff --git a/arch/powerpc/platforms/82xx/pq2fads.c b/arch/powerpc/platforms/82xx/pq2fads.c
index 4f457a9c79ae..68196e349994 100644
--- a/arch/powerpc/platforms/82xx/pq2fads.c
+++ b/arch/powerpc/platforms/82xx/pq2fads.c
@@ -15,12 +15,12 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/fsl_devices.h> 17#include <linux/fsl_devices.h>
18#include <linux/of_platform.h>
18 19
19#include <asm/io.h> 20#include <asm/io.h>
20#include <asm/cpm2.h> 21#include <asm/cpm2.h>
21#include <asm/udbg.h> 22#include <asm/udbg.h>
22#include <asm/machdep.h> 23#include <asm/machdep.h>
23#include <asm/of_platform.h>
24#include <asm/time.h> 24#include <asm/time.h>
25 25
26#include <sysdev/fsl_soc.h> 26#include <sysdev/fsl_soc.h>
@@ -176,14 +176,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
176 176
177static int __init declare_of_platform_devices(void) 177static int __init declare_of_platform_devices(void)
178{ 178{
179 if (!machine_is(pq2fads))
180 return 0;
181
182 /* Publish the QE devices */ 179 /* Publish the QE devices */
183 of_platform_bus_probe(NULL, of_bus_ids, NULL); 180 of_platform_bus_probe(NULL, of_bus_ids, NULL);
184 return 0; 181 return 0;
185} 182}
186device_initcall(declare_of_platform_devices); 183machine_device_initcall(pq2fads, declare_of_platform_devices);
187 184
188define_machine(pq2fads) 185define_machine(pq2fads)
189{ 186{
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index ec305f18abd8..13587e2e8680 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -1,18 +1,23 @@
1choice 1menuconfig MPC83xx
2 prompt "83xx Board Type" 2 bool "83xx Board Type"
3 depends on PPC_83xx 3 depends on PPC_83xx
4 default MPC834x_MDS 4 select PPC_UDBG_16550
5 select PPC_INDIRECT_PCI
6
7if MPC83xx
5 8
6config MPC8313_RDB 9config MPC831x_RDB
7 bool "Freescale MPC8313 RDB" 10 bool "Freescale MPC831x RDB"
8 select DEFAULT_UIMAGE 11 select DEFAULT_UIMAGE
12 select PPC_MPC831x
9 help 13 help
10 This option enables support for the MPC8313 RDB board. 14 This option enables support for the MPC8313 RDB and MPC8315 RDB boards.
11 15
12config MPC832x_MDS 16config MPC832x_MDS
13 bool "Freescale MPC832x MDS" 17 bool "Freescale MPC832x MDS"
14 select DEFAULT_UIMAGE 18 select DEFAULT_UIMAGE
15 select QUICC_ENGINE 19 select QUICC_ENGINE
20 select PPC_MPC832x
16 help 21 help
17 This option enables support for the MPC832x MDS evaluation board. 22 This option enables support for the MPC832x MDS evaluation board.
18 23
@@ -20,12 +25,14 @@ config MPC832x_RDB
20 bool "Freescale MPC832x RDB" 25 bool "Freescale MPC832x RDB"
21 select DEFAULT_UIMAGE 26 select DEFAULT_UIMAGE
22 select QUICC_ENGINE 27 select QUICC_ENGINE
28 select PPC_MPC832x
23 help 29 help
24 This option enables support for the MPC8323 RDB board. 30 This option enables support for the MPC8323 RDB board.
25 31
26config MPC834x_MDS 32config MPC834x_MDS
27 bool "Freescale MPC834x MDS" 33 bool "Freescale MPC834x MDS"
28 select DEFAULT_UIMAGE 34 select DEFAULT_UIMAGE
35 select PPC_MPC834x
29 help 36 help
30 This option enables support for the MPC 834x MDS evaluation board. 37 This option enables support for the MPC 834x MDS evaluation board.
31 38
@@ -37,6 +44,7 @@ config MPC834x_MDS
37config MPC834x_ITX 44config MPC834x_ITX
38 bool "Freescale MPC834x ITX" 45 bool "Freescale MPC834x ITX"
39 select DEFAULT_UIMAGE 46 select DEFAULT_UIMAGE
47 select PPC_MPC834x
40 help 48 help
41 This option enables support for the MPC 834x ITX evaluation board. 49 This option enables support for the MPC 834x ITX evaluation board.
42 50
@@ -50,28 +58,41 @@ config MPC836x_MDS
50 help 58 help
51 This option enables support for the MPC836x MDS Processor Board. 59 This option enables support for the MPC836x MDS Processor Board.
52 60
53endchoice 61config MPC837x_MDS
62 bool "Freescale MPC837x MDS"
63 select DEFAULT_UIMAGE
64 select PPC_MPC837x
65 help
66 This option enables support for the MPC837x MDS Processor Board.
67
68config MPC837x_RDB
69 bool "Freescale MPC837x RDB"
70 select DEFAULT_UIMAGE
71 select PPC_MPC837x
72 help
73 This option enables support for the MPC837x RDB Board.
74
75config SBC834x
76 bool "Wind River SBC834x"
77 select DEFAULT_UIMAGE
78 select PPC_MPC834x
79 help
80 This option enables support for the Wind River SBC834x board.
81
82endif
54 83
84# used for usb
55config PPC_MPC831x 85config PPC_MPC831x
56 bool 86 bool
57 select PPC_UDBG_16550
58 select PPC_INDIRECT_PCI
59 default y if MPC8313_RDB
60 87
88# used for math-emu
61config PPC_MPC832x 89config PPC_MPC832x
62 bool 90 bool
63 select PPC_UDBG_16550
64 select PPC_INDIRECT_PCI
65 default y if MPC832x_MDS || MPC832x_RDB
66 91
67config MPC834x 92# used for usb
93config PPC_MPC834x
68 bool 94 bool
69 select PPC_UDBG_16550
70 select PPC_INDIRECT_PCI
71 default y if MPC834x_MDS || MPC834x_ITX
72 95
73config PPC_MPC836x 96# used for usb
97config PPC_MPC837x
74 bool 98 bool
75 select PPC_UDBG_16550
76 select PPC_INDIRECT_PCI
77 default y if MPC836x_MDS
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 5a98f885779f..7e6dd3e259d8 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -3,9 +3,12 @@
3# 3#
4obj-y := misc.o usb.o 4obj-y := misc.o usb.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o 6obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o
7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o 7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o
8obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o 8obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o
9obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o 9obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
10obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o 10obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
11obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o 11obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
12obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
13obj-$(CONFIG_SBC834x) += sbc834x.o
14obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o
diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index 33766b8f2594..c4db5172b27a 100644
--- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/powerpc/platforms/83xx/mpc8313_rdb.c 2 * arch/powerpc/platforms/83xx/mpc831x_rdb.c
3 * 3 *
4 * Description: MPC8313x RDB board specific routines. 4 * Description: MPC831x RDB board specific routines.
5 * This file is based on mpc834x_sys.c 5 * This file is based on mpc834x_sys.c
6 * Author: Lo Wlison <r43300@freescale.com> 6 * Author: Lo Wlison <r43300@freescale.com>
7 * 7 *
@@ -14,6 +14,7 @@
14 */ 14 */
15 15
16#include <linux/pci.h> 16#include <linux/pci.h>
17#include <linux/of_platform.h>
17 18
18#include <asm/time.h> 19#include <asm/time.h>
19#include <asm/ipic.h> 20#include <asm/ipic.h>
@@ -21,26 +22,17 @@
21 22
22#include "mpc83xx.h" 23#include "mpc83xx.h"
23 24
24#undef DEBUG 25/*
25#ifdef DEBUG
26#define DBG(fmt...) udbg_printf(fmt)
27#else
28#define DBG(fmt...)
29#endif
30
31/* ************************************************************************
32 *
33 * Setup the architecture 26 * Setup the architecture
34 *
35 */ 27 */
36static void __init mpc8313_rdb_setup_arch(void) 28static void __init mpc831x_rdb_setup_arch(void)
37{ 29{
38#ifdef CONFIG_PCI 30#ifdef CONFIG_PCI
39 struct device_node *np; 31 struct device_node *np;
40#endif 32#endif
41 33
42 if (ppc_md.progress) 34 if (ppc_md.progress)
43 ppc_md.progress("mpc8313_rdb_setup_arch()", 0); 35 ppc_md.progress("mpc831x_rdb_setup_arch()", 0);
44 36
45#ifdef CONFIG_PCI 37#ifdef CONFIG_PCI
46 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") 38 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
@@ -49,7 +41,7 @@ static void __init mpc8313_rdb_setup_arch(void)
49 mpc831x_usb_cfg(); 41 mpc831x_usb_cfg();
50} 42}
51 43
52void __init mpc8313_rdb_init_IRQ(void) 44void __init mpc831x_rdb_init_IRQ(void)
53{ 45{
54 struct device_node *np; 46 struct device_node *np;
55 47
@@ -68,18 +60,31 @@ void __init mpc8313_rdb_init_IRQ(void)
68/* 60/*
69 * Called very early, MMU is off, device-tree isn't unflattened 61 * Called very early, MMU is off, device-tree isn't unflattened
70 */ 62 */
71static int __init mpc8313_rdb_probe(void) 63static int __init mpc831x_rdb_probe(void)
72{ 64{
73 unsigned long root = of_get_flat_dt_root(); 65 unsigned long root = of_get_flat_dt_root();
74 66
75 return of_flat_dt_is_compatible(root, "MPC8313ERDB"); 67 return of_flat_dt_is_compatible(root, "MPC8313ERDB") ||
68 of_flat_dt_is_compatible(root, "fsl,mpc8315erdb");
69}
70
71static struct of_device_id __initdata of_bus_ids[] = {
72 { .compatible = "simple-bus" },
73 {},
74};
75
76static int __init declare_of_platform_devices(void)
77{
78 of_platform_bus_probe(NULL, of_bus_ids, NULL);
79 return 0;
76} 80}
81machine_device_initcall(mpc831x_rdb, declare_of_platform_devices);
77 82
78define_machine(mpc8313_rdb) { 83define_machine(mpc831x_rdb) {
79 .name = "MPC8313 RDB", 84 .name = "MPC831x RDB",
80 .probe = mpc8313_rdb_probe, 85 .probe = mpc831x_rdb_probe,
81 .setup_arch = mpc8313_rdb_setup_arch, 86 .setup_arch = mpc831x_rdb_setup_arch,
82 .init_IRQ = mpc8313_rdb_init_IRQ, 87 .init_IRQ = mpc831x_rdb_init_IRQ,
83 .get_irq = ipic_get_irq, 88 .get_irq = ipic_get_irq,
84 .restart = mpc83xx_restart, 89 .restart = mpc83xx_restart,
85 .time_init = mpc83xx_time_init, 90 .time_init = mpc83xx_time_init,
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 39ee7a13b25a..6dbc6eabcb02 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -23,9 +23,9 @@
23#include <linux/seq_file.h> 23#include <linux/seq_file.h>
24#include <linux/root_dev.h> 24#include <linux/root_dev.h>
25#include <linux/initrd.h> 25#include <linux/initrd.h>
26#include <linux/of_platform.h>
27#include <linux/of_device.h>
26 28
27#include <asm/of_device.h>
28#include <asm/of_platform.h>
29#include <asm/system.h> 29#include <asm/system.h>
30#include <asm/atomic.h> 30#include <asm/atomic.h>
31#include <asm/time.h> 31#include <asm/time.h>
@@ -105,20 +105,18 @@ static struct of_device_id mpc832x_ids[] = {
105 { .type = "soc", }, 105 { .type = "soc", },
106 { .compatible = "soc", }, 106 { .compatible = "soc", },
107 { .type = "qe", }, 107 { .type = "qe", },
108 { .compatible = "fsl,qe", },
108 {}, 109 {},
109}; 110};
110 111
111static int __init mpc832x_declare_of_platform_devices(void) 112static int __init mpc832x_declare_of_platform_devices(void)
112{ 113{
113 if (!machine_is(mpc832x_mds))
114 return 0;
115
116 /* Publish the QE devices */ 114 /* Publish the QE devices */
117 of_platform_bus_probe(NULL, mpc832x_ids, NULL); 115 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
118 116
119 return 0; 117 return 0;
120} 118}
121device_initcall(mpc832x_declare_of_platform_devices); 119machine_device_initcall(mpc832x_mds, mpc832x_declare_of_platform_devices);
122 120
123static void __init mpc832x_sys_init_IRQ(void) 121static void __init mpc832x_sys_init_IRQ(void)
124{ 122{
@@ -137,10 +135,12 @@ static void __init mpc832x_sys_init_IRQ(void)
137 of_node_put(np); 135 of_node_put(np);
138 136
139#ifdef CONFIG_QUICC_ENGINE 137#ifdef CONFIG_QUICC_ENGINE
140 np = of_find_node_by_type(NULL, "qeic"); 138 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
141 if (!np) 139 if (!np) {
142 return; 140 np = of_find_node_by_type(NULL, "qeic");
143 141 if (!np)
142 return;
143 }
144 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); 144 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
145 of_node_put(np); 145 of_node_put(np);
146#endif /* CONFIG_QUICC_ENGINE */ 146#endif /* CONFIG_QUICC_ENGINE */
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index d4bd04001b99..9f0fd88b2b1f 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -19,8 +19,8 @@
19#include <linux/spi/spi.h> 19#include <linux/spi/spi.h>
20#include <linux/spi/mmc_spi.h> 20#include <linux/spi/mmc_spi.h>
21#include <linux/mmc/host.h> 21#include <linux/mmc/host.h>
22#include <linux/of_platform.h>
22 23
23#include <asm/of_platform.h>
24#include <asm/time.h> 24#include <asm/time.h>
25#include <asm/ipic.h> 25#include <asm/ipic.h>
26#include <asm/udbg.h> 26#include <asm/udbg.h>
@@ -63,9 +63,6 @@ static struct spi_board_info mpc832x_spi_boardinfo = {
63 63
64static int __init mpc832x_spi_init(void) 64static int __init mpc832x_spi_init(void)
65{ 65{
66 if (!machine_is(mpc832x_rdb))
67 return 0;
68
69 par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */ 66 par_io_config_pin(3, 0, 3, 0, 1, 0); /* SPI1 MOSI, I/O */
70 par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */ 67 par_io_config_pin(3, 1, 3, 0, 1, 0); /* SPI1 MISO, I/O */
71 par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */ 68 par_io_config_pin(3, 2, 3, 0, 1, 0); /* SPI1 CLK, I/O */
@@ -80,7 +77,7 @@ static int __init mpc832x_spi_init(void)
80 mpc83xx_spi_deactivate_cs); 77 mpc83xx_spi_deactivate_cs);
81} 78}
82 79
83device_initcall(mpc832x_spi_init); 80machine_device_initcall(mpc832x_rdb, mpc832x_spi_init);
84 81
85/* ************************************************************************ 82/* ************************************************************************
86 * 83 *
@@ -118,20 +115,18 @@ static struct of_device_id mpc832x_ids[] = {
118 { .type = "soc", }, 115 { .type = "soc", },
119 { .compatible = "soc", }, 116 { .compatible = "soc", },
120 { .type = "qe", }, 117 { .type = "qe", },
118 { .compatible = "fsl,qe", },
121 {}, 119 {},
122}; 120};
123 121
124static int __init mpc832x_declare_of_platform_devices(void) 122static int __init mpc832x_declare_of_platform_devices(void)
125{ 123{
126 if (!machine_is(mpc832x_rdb))
127 return 0;
128
129 /* Publish the QE devices */ 124 /* Publish the QE devices */
130 of_platform_bus_probe(NULL, mpc832x_ids, NULL); 125 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
131 126
132 return 0; 127 return 0;
133} 128}
134device_initcall(mpc832x_declare_of_platform_devices); 129machine_device_initcall(mpc832x_rdb, mpc832x_declare_of_platform_devices);
135 130
136void __init mpc832x_rdb_init_IRQ(void) 131void __init mpc832x_rdb_init_IRQ(void)
137{ 132{
@@ -151,10 +146,12 @@ void __init mpc832x_rdb_init_IRQ(void)
151 of_node_put(np); 146 of_node_put(np);
152 147
153#ifdef CONFIG_QUICC_ENGINE 148#ifdef CONFIG_QUICC_ENGINE
154 np = of_find_node_by_type(NULL, "qeic"); 149 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
155 if (!np) 150 if (!np) {
156 return; 151 np = of_find_node_by_type(NULL, "qeic");
157 152 if (!np)
153 return;
154 }
158 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); 155 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
159 of_node_put(np); 156 of_node_put(np);
160#endif /* CONFIG_QUICC_ENGINE */ 157#endif /* CONFIG_QUICC_ENGINE */
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index aa768199432d..50e8f632061c 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -23,6 +23,7 @@
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> 25#include <linux/root_dev.h>
26#include <linux/of_platform.h>
26 27
27#include <asm/system.h> 28#include <asm/system.h>
28#include <asm/atomic.h> 29#include <asm/atomic.h>
@@ -37,6 +38,17 @@
37 38
38#include "mpc83xx.h" 39#include "mpc83xx.h"
39 40
41static struct of_device_id __initdata mpc834x_itx_ids[] = {
42 { .compatible = "fsl,pq2pro-localbus", },
43 {},
44};
45
46static int __init mpc834x_itx_declare_of_platform_devices(void)
47{
48 return of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
49}
50machine_device_initcall(mpc834x_itx, mpc834x_itx_declare_of_platform_devices);
51
40/* ************************************************************************ 52/* ************************************************************************
41 * 53 *
42 * Setup the architecture 54 * Setup the architecture
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index a81bb3ce6b94..2b8a0a3f8557 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -23,6 +23,7 @@
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> 25#include <linux/root_dev.h>
26#include <linux/of_platform.h>
26 27
27#include <asm/system.h> 28#include <asm/system.h>
28#include <asm/atomic.h> 29#include <asm/atomic.h>
@@ -106,14 +107,27 @@ static void __init mpc834x_mds_init_IRQ(void)
106 ipic_set_default_priority(); 107 ipic_set_default_priority();
107} 108}
108 109
110static struct of_device_id mpc834x_ids[] = {
111 { .type = "soc", },
112 { .compatible = "soc", },
113 {},
114};
115
116static int __init mpc834x_declare_of_platform_devices(void)
117{
118 of_platform_bus_probe(NULL, mpc834x_ids, NULL);
119 return 0;
120}
121machine_device_initcall(mpc834x_mds, mpc834x_declare_of_platform_devices);
122
109/* 123/*
110 * Called very early, MMU is off, device-tree isn't unflattened 124 * Called very early, MMU is off, device-tree isn't unflattened
111 */ 125 */
112static int __init mpc834x_mds_probe(void) 126static int __init mpc834x_mds_probe(void)
113{ 127{
114 unsigned long root = of_get_flat_dt_root(); 128 unsigned long root = of_get_flat_dt_root();
115 129
116 return of_flat_dt_is_compatible(root, "MPC834xMDS"); 130 return of_flat_dt_is_compatible(root, "MPC834xMDS");
117} 131}
118 132
119define_machine(mpc834x_mds) { 133define_machine(mpc834x_mds) {
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index e40012f8f488..c2e5de60c055 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -29,9 +29,9 @@
29#include <linux/seq_file.h> 29#include <linux/seq_file.h>
30#include <linux/root_dev.h> 30#include <linux/root_dev.h>
31#include <linux/initrd.h> 31#include <linux/initrd.h>
32#include <linux/of_platform.h>
33#include <linux/of_device.h>
32 34
33#include <asm/of_device.h>
34#include <asm/of_platform.h>
35#include <asm/system.h> 35#include <asm/system.h>
36#include <asm/atomic.h> 36#include <asm/atomic.h>
37#include <asm/time.h> 37#include <asm/time.h>
@@ -136,20 +136,18 @@ static struct of_device_id mpc836x_ids[] = {
136 { .type = "soc", }, 136 { .type = "soc", },
137 { .compatible = "soc", }, 137 { .compatible = "soc", },
138 { .type = "qe", }, 138 { .type = "qe", },
139 { .compatible = "fsl,qe", },
139 {}, 140 {},
140}; 141};
141 142
142static int __init mpc836x_declare_of_platform_devices(void) 143static int __init mpc836x_declare_of_platform_devices(void)
143{ 144{
144 if (!machine_is(mpc836x_mds))
145 return 0;
146
147 /* Publish the QE devices */ 145 /* Publish the QE devices */
148 of_platform_bus_probe(NULL, mpc836x_ids, NULL); 146 of_platform_bus_probe(NULL, mpc836x_ids, NULL);
149 147
150 return 0; 148 return 0;
151} 149}
152device_initcall(mpc836x_declare_of_platform_devices); 150machine_device_initcall(mpc836x_mds, mpc836x_declare_of_platform_devices);
153 151
154static void __init mpc836x_mds_init_IRQ(void) 152static void __init mpc836x_mds_init_IRQ(void)
155{ 153{
@@ -168,10 +166,12 @@ static void __init mpc836x_mds_init_IRQ(void)
168 of_node_put(np); 166 of_node_put(np);
169 167
170#ifdef CONFIG_QUICC_ENGINE 168#ifdef CONFIG_QUICC_ENGINE
171 np = of_find_node_by_type(NULL, "qeic"); 169 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
172 if (!np) 170 if (!np) {
173 return; 171 np = of_find_node_by_type(NULL, "qeic");
174 172 if (!np)
173 return;
174 }
175 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); 175 qe_ic_init(np, 0, qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic);
176 of_node_put(np); 176 of_node_put(np);
177#endif /* CONFIG_QUICC_ENGINE */ 177#endif /* CONFIG_QUICC_ENGINE */
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
new file mode 100644
index 000000000000..8a9c26973605
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -0,0 +1,147 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc837x_mds.c
3 *
4 * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
5 *
6 * MPC837x MDS board specific routines
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#include <linux/pci.h>
15#include <linux/of.h>
16#include <linux/of_platform.h>
17
18#include <asm/time.h>
19#include <asm/ipic.h>
20#include <asm/udbg.h>
21#include <asm/prom.h>
22
23#include "mpc83xx.h"
24
25#define BCSR12_USB_SER_MASK 0x8a
26#define BCSR12_USB_SER_PIN 0x80
27#define BCSR12_USB_SER_DEVICE 0x02
28extern int mpc837x_usb_cfg(void);
29
30static int mpc837xmds_usb_cfg(void)
31{
32 struct device_node *np;
33 const void *phy_type, *mode;
34 void __iomem *bcsr_regs = NULL;
35 u8 bcsr12;
36 int ret;
37
38 ret = mpc837x_usb_cfg();
39 if (ret)
40 return ret;
41 /* Map BCSR area */
42 np = of_find_node_by_name(NULL, "bcsr");
43 if (np) {
44 struct resource res;
45
46 of_address_to_resource(np, 0, &res);
47 bcsr_regs = ioremap(res.start, res.end - res.start + 1);
48 of_node_put(np);
49 }
50 if (!bcsr_regs)
51 return -1;
52
53 np = of_find_node_by_name(NULL, "usb");
54 if (!np)
55 return -ENODEV;
56 phy_type = of_get_property(np, "phy_type", NULL);
57 if (phy_type && !strcmp(phy_type, "ulpi")) {
58 clrbits8(bcsr_regs + 12, BCSR12_USB_SER_PIN);
59 } else if (phy_type && !strcmp(phy_type, "serial")) {
60 mode = of_get_property(np, "dr_mode", NULL);
61 bcsr12 = in_8(bcsr_regs + 12) & ~BCSR12_USB_SER_MASK;
62 bcsr12 |= BCSR12_USB_SER_PIN;
63 if (mode && !strcmp(mode, "peripheral"))
64 bcsr12 |= BCSR12_USB_SER_DEVICE;
65 out_8(bcsr_regs + 12, bcsr12);
66 } else {
67 printk(KERN_ERR "USB DR: unsupported PHY\n");
68 }
69
70 of_node_put(np);
71 iounmap(bcsr_regs);
72 return 0;
73}
74
75/* ************************************************************************
76 *
77 * Setup the architecture
78 *
79 */
80static void __init mpc837x_mds_setup_arch(void)
81{
82#ifdef CONFIG_PCI
83 struct device_node *np;
84#endif
85
86 if (ppc_md.progress)
87 ppc_md.progress("mpc837x_mds_setup_arch()", 0);
88
89#ifdef CONFIG_PCI
90 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
91 mpc83xx_add_bridge(np);
92#endif
93 mpc837xmds_usb_cfg();
94}
95
96static struct of_device_id mpc837x_ids[] = {
97 { .type = "soc", },
98 { .compatible = "soc", },
99 {},
100};
101
102static int __init mpc837x_declare_of_platform_devices(void)
103{
104 /* Publish of_device */
105 of_platform_bus_probe(NULL, mpc837x_ids, NULL);
106
107 return 0;
108}
109machine_device_initcall(mpc837x_mds, mpc837x_declare_of_platform_devices);
110
111static void __init mpc837x_mds_init_IRQ(void)
112{
113 struct device_node *np;
114
115 np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
116 if (!np)
117 return;
118
119 ipic_init(np, 0);
120
121 /* Initialize the default interrupt mapping priorities,
122 * in case the boot rom changed something on us.
123 */
124 ipic_set_default_priority();
125}
126
127/*
128 * Called very early, MMU is off, device-tree isn't unflattened
129 */
130static int __init mpc837x_mds_probe(void)
131{
132 unsigned long root = of_get_flat_dt_root();
133
134 return of_flat_dt_is_compatible(root, "fsl,mpc837xmds");
135}
136
137define_machine(mpc837x_mds) {
138 .name = "MPC837x MDS",
139 .probe = mpc837x_mds_probe,
140 .setup_arch = mpc837x_mds_setup_arch,
141 .init_IRQ = mpc837x_mds_init_IRQ,
142 .get_irq = ipic_get_irq,
143 .restart = mpc83xx_restart,
144 .time_init = mpc83xx_time_init,
145 .calibrate_decr = generic_calibrate_decr,
146 .progress = udbg_progress,
147};
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
new file mode 100644
index 000000000000..2293ae51383d
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -0,0 +1,99 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc837x_rdb.c
3 *
4 * Copyright (C) 2007 Freescale Semicondutor, Inc. All rights reserved.
5 *
6 * MPC837x RDB board specific routines
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#include <linux/pci.h>
15#include <linux/of_platform.h>
16
17#include <asm/time.h>
18#include <asm/ipic.h>
19#include <asm/udbg.h>
20
21#include "mpc83xx.h"
22
23extern int mpc837x_usb_cfg(void);
24
25/* ************************************************************************
26 *
27 * Setup the architecture
28 *
29 */
30static void __init mpc837x_rdb_setup_arch(void)
31{
32#ifdef CONFIG_PCI
33 struct device_node *np;
34#endif
35
36 if (ppc_md.progress)
37 ppc_md.progress("mpc837x_rdb_setup_arch()", 0);
38
39#ifdef CONFIG_PCI
40 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
41 mpc83xx_add_bridge(np);
42#endif
43 mpc837x_usb_cfg();
44}
45
46static struct of_device_id mpc837x_ids[] = {
47 { .type = "soc", },
48 { .compatible = "soc", },
49 {},
50};
51
52static int __init mpc837x_declare_of_platform_devices(void)
53{
54 /* Publish of_device */
55 of_platform_bus_probe(NULL, mpc837x_ids, NULL);
56
57 return 0;
58}
59machine_device_initcall(mpc837x_rdb, mpc837x_declare_of_platform_devices);
60
61static void __init mpc837x_rdb_init_IRQ(void)
62{
63 struct device_node *np;
64
65 np = of_find_compatible_node(NULL, NULL, "fsl,ipic");
66 if (!np)
67 return;
68
69 ipic_init(np, 0);
70
71 /* Initialize the default interrupt mapping priorities,
72 * in case the boot rom changed something on us.
73 */
74 ipic_set_default_priority();
75}
76
77/*
78 * Called very early, MMU is off, device-tree isn't unflattened
79 */
80static int __init mpc837x_rdb_probe(void)
81{
82 unsigned long root = of_get_flat_dt_root();
83
84 return of_flat_dt_is_compatible(root, "fsl,mpc8377rdb") ||
85 of_flat_dt_is_compatible(root, "fsl,mpc8378rdb") ||
86 of_flat_dt_is_compatible(root, "fsl,mpc8379rdb");
87}
88
89define_machine(mpc837x_rdb) {
90 .name = "MPC837x RDB",
91 .probe = mpc837x_rdb_probe,
92 .setup_arch = mpc837x_rdb_setup_arch,
93 .init_IRQ = mpc837x_rdb_init_IRQ,
94 .get_irq = ipic_get_irq,
95 .restart = mpc83xx_restart,
96 .time_init = mpc83xx_time_init,
97 .calibrate_decr = generic_calibrate_decr,
98 .progress = udbg_progress,
99};
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index b778cb4f3fb5..88bb748aff0d 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -14,6 +14,7 @@
14#define MPC83XX_SCCR_USB_DRCM_11 0x00300000 14#define MPC83XX_SCCR_USB_DRCM_11 0x00300000
15#define MPC83XX_SCCR_USB_DRCM_01 0x00100000 15#define MPC83XX_SCCR_USB_DRCM_01 0x00100000
16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000 16#define MPC83XX_SCCR_USB_DRCM_10 0x00200000
17#define MPC837X_SCCR_USB_DRCM_11 0x00c00000
17 18
18/* system i/o configuration register low */ 19/* system i/o configuration register low */
19#define MPC83XX_SICRL_OFFS 0x114 20#define MPC83XX_SICRL_OFFS 0x114
@@ -22,6 +23,8 @@
22#define MPC834X_SICRL_USB1 0x20000000 23#define MPC834X_SICRL_USB1 0x20000000
23#define MPC831X_SICRL_USB_MASK 0x00000c00 24#define MPC831X_SICRL_USB_MASK 0x00000c00
24#define MPC831X_SICRL_USB_ULPI 0x00000800 25#define MPC831X_SICRL_USB_ULPI 0x00000800
26#define MPC837X_SICRL_USB_MASK 0xf0000000
27#define MPC837X_SICRL_USB_ULPI 0x50000000
25 28
26/* system i/o configuration register high */ 29/* system i/o configuration register high */
27#define MPC83XX_SICRH_OFFS 0x118 30#define MPC83XX_SICRH_OFFS 0x118
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 80425d7b14f8..14f1080c6c9d 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -54,7 +54,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
54 " bus 0\n", dev->full_name); 54 " bus 0\n", dev->full_name);
55 } 55 }
56 56
57 pci_assign_all_buses = 1; 57 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
58 hose = pcibios_alloc_controller(dev); 58 hose = pcibios_alloc_controller(dev);
59 if (!hose) 59 if (!hose)
60 return -ENOMEM; 60 return -ENOMEM;
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
new file mode 100644
index 000000000000..cf382474a83d
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -0,0 +1,115 @@
1/*
2 * arch/powerpc/platforms/83xx/sbc834x.c
3 *
4 * Wind River SBC834x board specific routines
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the mpc834x_mds.c support by Kumar Gala.
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/stddef.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/errno.h>
20#include <linux/reboot.h>
21#include <linux/pci.h>
22#include <linux/kdev_t.h>
23#include <linux/major.h>
24#include <linux/console.h>
25#include <linux/delay.h>
26#include <linux/seq_file.h>
27#include <linux/root_dev.h>
28#include <linux/of_platform.h>
29
30#include <asm/system.h>
31#include <asm/atomic.h>
32#include <asm/time.h>
33#include <asm/io.h>
34#include <asm/machdep.h>
35#include <asm/ipic.h>
36#include <asm/irq.h>
37#include <asm/prom.h>
38#include <asm/udbg.h>
39#include <sysdev/fsl_soc.h>
40
41#include "mpc83xx.h"
42
43/* ************************************************************************
44 *
45 * Setup the architecture
46 *
47 */
48static void __init sbc834x_setup_arch(void)
49{
50#ifdef CONFIG_PCI
51 struct device_node *np;
52#endif
53
54 if (ppc_md.progress)
55 ppc_md.progress("sbc834x_setup_arch()", 0);
56
57#ifdef CONFIG_PCI
58 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
59 mpc83xx_add_bridge(np);
60#endif
61
62}
63
64static void __init sbc834x_init_IRQ(void)
65{
66 struct device_node *np;
67
68 np = of_find_node_by_type(NULL, "ipic");
69 if (!np)
70 return;
71
72 ipic_init(np, 0);
73
74 /* Initialize the default interrupt mapping priorities,
75 * in case the boot rom changed something on us.
76 */
77 ipic_set_default_priority();
78
79 of_node_put(np);
80}
81
82static struct __initdata of_device_id sbc834x_ids[] = {
83 { .type = "soc", },
84 { .compatible = "soc", },
85 {},
86};
87
88static int __init sbc834x_declare_of_platform_devices(void)
89{
90 of_platform_bus_probe(NULL, sbc834x_ids, NULL);
91 return 0;
92}
93machine_device_initcall(sbc834x, sbc834x_declare_of_platform_devices);
94
95/*
96 * Called very early, MMU is off, device-tree isn't unflattened
97 */
98static int __init sbc834x_probe(void)
99{
100 unsigned long root = of_get_flat_dt_root();
101
102 return of_flat_dt_is_compatible(root, "SBC834x");
103}
104
105define_machine(sbc834x) {
106 .name = "SBC834x",
107 .probe = sbc834x_probe,
108 .setup_arch = sbc834x_setup_arch,
109 .init_IRQ = sbc834x_init_IRQ,
110 .get_irq = ipic_get_irq,
111 .restart = mpc83xx_restart,
112 .time_init = mpc83xx_time_init,
113 .calibrate_decr = generic_calibrate_decr,
114 .progress = udbg_progress,
115};
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index b45160f8d084..681230a30acd 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -22,7 +22,7 @@
22#include "mpc83xx.h" 22#include "mpc83xx.h"
23 23
24 24
25#ifdef CONFIG_MPC834x 25#ifdef CONFIG_PPC_MPC834x
26int mpc834x_usb_cfg(void) 26int mpc834x_usb_cfg(void)
27{ 27{
28 unsigned long sccr, sicrl, sicrh; 28 unsigned long sccr, sicrl, sicrh;
@@ -41,7 +41,7 @@ int mpc834x_usb_cfg(void)
41 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK; 41 sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
42 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI; 42 sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
43 43
44 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr"); 44 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
45 if (np) { 45 if (np) {
46 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */ 46 sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
47 47
@@ -67,7 +67,7 @@ int mpc834x_usb_cfg(void)
67 port0_is_dr = 1; 67 port0_is_dr = 1;
68 of_node_put(np); 68 of_node_put(np);
69 } 69 }
70 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph"); 70 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
71 if (np) { 71 if (np) {
72 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */ 72 sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
73 73
@@ -96,7 +96,7 @@ int mpc834x_usb_cfg(void)
96 iounmap(immap); 96 iounmap(immap);
97 return 0; 97 return 0;
98} 98}
99#endif /* CONFIG_MPC834x */ 99#endif /* CONFIG_PPC_MPC834x */
100 100
101#ifdef CONFIG_PPC_MPC831x 101#ifdef CONFIG_PPC_MPC831x
102int mpc831x_usb_cfg(void) 102int mpc831x_usb_cfg(void)
@@ -111,7 +111,7 @@ int mpc831x_usb_cfg(void)
111 const void *dr_mode; 111 const void *dr_mode;
112#endif 112#endif
113 113
114 np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr"); 114 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
115 if (!np) 115 if (!np)
116 return -ENODEV; 116 return -ENODEV;
117 prop = of_get_property(np, "phy_type", NULL); 117 prop = of_get_property(np, "phy_type", NULL);
@@ -179,3 +179,43 @@ int mpc831x_usb_cfg(void)
179 return ret; 179 return ret;
180} 180}
181#endif /* CONFIG_PPC_MPC831x */ 181#endif /* CONFIG_PPC_MPC831x */
182
183#ifdef CONFIG_PPC_MPC837x
184int mpc837x_usb_cfg(void)
185{
186 void __iomem *immap;
187 struct device_node *np = NULL;
188 const void *prop;
189 int ret = 0;
190
191 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
192 if (!np)
193 return -ENODEV;
194 prop = of_get_property(np, "phy_type", NULL);
195
196 if (!prop || (strcmp(prop, "ulpi") && strcmp(prop, "serial"))) {
197 printk(KERN_WARNING "837x USB PHY type not supported\n");
198 of_node_put(np);
199 return -EINVAL;
200 }
201
202 /* Map IMMR space for pin and clock settings */
203 immap = ioremap(get_immrbase(), 0x1000);
204 if (!immap) {
205 of_node_put(np);
206 return -ENOMEM;
207 }
208
209 /* Configure clock */
210 clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, MPC837X_SCCR_USB_DRCM_11,
211 MPC837X_SCCR_USB_DRCM_11);
212
213 /* Configure pin mux for ULPI/serial */
214 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, MPC837X_SICRL_USB_MASK,
215 MPC837X_SICRL_USB_ULPI);
216
217 iounmap(immap);
218 of_node_put(np);
219 return ret;
220}
221#endif /* CONFIG_PPC_MPC837x */
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 7748a3a426db..7e76ddbd5821 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -1,7 +1,14 @@
1choice 1menuconfig MPC85xx
2 prompt "Machine Type" 2 bool "Machine Type"
3 depends on PPC_85xx 3 depends on PPC_85xx
4 default MPC8540_ADS 4 select PPC_UDBG_16550
5 select PPC_INDIRECT_PCI if PCI
6 select MPIC
7 select FSL_PCI if PCI
8 select SERIAL_8250_SHARE_IRQ if SERIAL_8250
9 default y
10
11if MPC85xx
5 12
6config MPC8540_ADS 13config MPC8540_ADS
7 bool "Freescale MPC8540 ADS" 14 bool "Freescale MPC8540 ADS"
@@ -13,6 +20,7 @@ config MPC8560_ADS
13 bool "Freescale MPC8560 ADS" 20 bool "Freescale MPC8560 ADS"
14 select DEFAULT_UIMAGE 21 select DEFAULT_UIMAGE
15 select PPC_CPM_NEW_BINDING 22 select PPC_CPM_NEW_BINDING
23 select CPM2
16 help 24 help
17 This option enables support for the MPC 8560 ADS board 25 This option enables support for the MPC 8560 ADS board
18 26
@@ -38,25 +46,64 @@ config MPC85xx_DS
38 help 46 help
39 This option enables support for the MPC85xx DS (MPC8544 DS) board 47 This option enables support for the MPC85xx DS (MPC8544 DS) board
40 48
41endchoice 49config STX_GP3
50 bool "Silicon Turnkey Express GP3"
51 help
52 This option enables support for the Silicon Turnkey Express GP3
53 board.
54 select CPM2
55 select DEFAULT_UIMAGE
56 select PPC_CPM_NEW_BINDING
42 57
43config MPC8540 58config TQM8540
44 bool 59 bool "TQ Components TQM8540"
45 select PPC_UDBG_16550 60 help
46 select PPC_INDIRECT_PCI 61 This option enables support for the TQ Components TQM8540 board.
47 default y if MPC8540_ADS || MPC85xx_CDS 62 select DEFAULT_UIMAGE
63 select PPC_CPM_NEW_BINDING
64 select TQM85xx
48 65
49config MPC8560 66config TQM8541
50 bool 67 bool "TQ Components TQM8541"
68 help
69 This option enables support for the TQ Components TQM8541 board.
70 select DEFAULT_UIMAGE
71 select PPC_CPM_NEW_BINDING
72 select TQM85xx
73 select CPM2
74
75config TQM8555
76 bool "TQ Components TQM8555"
77 help
78 This option enables support for the TQ Components TQM8555 board.
79 select DEFAULT_UIMAGE
80 select PPC_CPM_NEW_BINDING
81 select TQM85xx
51 select CPM2 82 select CPM2
52 default y if MPC8560_ADS
53 83
54config MPC85xx 84config TQM8560
85 bool "TQ Components TQM8560"
86 help
87 This option enables support for the TQ Components TQM8560 board.
88 select DEFAULT_UIMAGE
89 select PPC_CPM_NEW_BINDING
90 select TQM85xx
91 select CPM2
92
93config SBC8548
94 bool "Wind River SBC8548"
95 select DEFAULT_UIMAGE
96 help
97 This option enables support for the Wind River SBC8548 board
98
99config SBC8560
100 bool "Wind River SBC8560"
101 select DEFAULT_UIMAGE
102 select PPC_CPM_NEW_BINDING if CPM2
103 help
104 This option enables support for the Wind River SBC8560 board
105
106endif # MPC85xx
107
108config TQM85xx
55 bool 109 bool
56 select PPC_UDBG_16550
57 select PPC_INDIRECT_PCI if PCI
58 select MPIC
59 select FSL_PCI if PCI
60 select SERIAL_8250_SHARE_IRQ if SERIAL_8250
61 default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \
62 || MPC85xx_MDS || MPC85xx_DS
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 5eca92023ec8..cb7af4ebd75f 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -6,3 +6,7 @@ obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
6obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o 6obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
7obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o 7obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o
8obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o 8obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o
9obj-$(CONFIG_STX_GP3) += stx_gp3.o
10obj-$(CONFIG_TQM85xx) += tqm85xx.o
11obj-$(CONFIG_SBC8560) += sbc8560.o
12obj-$(CONFIG_SBC8548) += sbc8548.o
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index bccdc25f83a2..4e0305096114 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -52,9 +52,9 @@ static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
52{ 52{
53 int cascade_irq; 53 int cascade_irq;
54 54
55 while ((cascade_irq = cpm2_get_irq()) >= 0) { 55 while ((cascade_irq = cpm2_get_irq()) >= 0)
56 generic_handle_irq(cascade_irq); 56 generic_handle_irq(cascade_irq);
57 } 57
58 desc->chip->eoi(irq); 58 desc->chip->eoi(irq);
59} 59}
60 60
@@ -70,13 +70,12 @@ static void __init mpc85xx_ads_pic_init(void)
70#endif 70#endif
71 71
72 np = of_find_node_by_type(np, "open-pic"); 72 np = of_find_node_by_type(np, "open-pic");
73 73 if (!np) {
74 if (np == NULL) {
75 printk(KERN_ERR "Could not find open-pic node\n"); 74 printk(KERN_ERR "Could not find open-pic node\n");
76 return; 75 return;
77 } 76 }
78 77
79 if(of_address_to_resource(np, 0, &r)) { 78 if (of_address_to_resource(np, 0, &r)) {
80 printk(KERN_ERR "Could not map mpic register space\n"); 79 printk(KERN_ERR "Could not map mpic register space\n");
81 of_node_put(np); 80 of_node_put(np);
82 return; 81 return;
@@ -100,6 +99,7 @@ static void __init mpc85xx_ads_pic_init(void)
100 irq = irq_of_parse_and_map(np, 0); 99 irq = irq_of_parse_and_map(np, 0);
101 100
102 cpm2_pic_init(np); 101 cpm2_pic_init(np);
102 of_node_put(np);
103 set_irq_chained_handler(irq, cpm2_cascade); 103 set_irq_chained_handler(irq, cpm2_cascade);
104#endif 104#endif
105} 105}
@@ -112,7 +112,7 @@ struct cpm_pin {
112 int port, pin, flags; 112 int port, pin, flags;
113}; 113};
114 114
115static struct cpm_pin mpc8560_ads_pins[] = { 115static const struct cpm_pin mpc8560_ads_pins[] = {
116 /* SCC1 */ 116 /* SCC1 */
117 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 117 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
118 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY}, 118 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
@@ -233,13 +233,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
233 233
234static int __init declare_of_platform_devices(void) 234static int __init declare_of_platform_devices(void)
235{ 235{
236 if (!machine_is(mpc85xx_ads))
237 return 0;
238
239 of_platform_bus_probe(NULL, of_bus_ids, NULL); 236 of_platform_bus_probe(NULL, of_bus_ids, NULL);
237
240 return 0; 238 return 0;
241} 239}
242device_initcall(declare_of_platform_devices); 240machine_device_initcall(mpc85xx_ads, declare_of_platform_devices);
243 241
244/* 242/*
245 * Called very early, device-tree isn't unflattened 243 * Called very early, device-tree isn't unflattened
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index 4d063eec6210..8b1de7884be6 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -222,9 +222,6 @@ static int mpc85xx_cds_8259_attach(void)
222 struct device_node *cascade_node = NULL; 222 struct device_node *cascade_node = NULL;
223 int cascade_irq; 223 int cascade_irq;
224 224
225 if (!machine_is(mpc85xx_cds))
226 return 0;
227
228 /* Initialize the i8259 controller */ 225 /* Initialize the i8259 controller */
229 for_each_node_by_type(np, "interrupt-controller") 226 for_each_node_by_type(np, "interrupt-controller")
230 if (of_device_is_compatible(np, "chrp,iic")) { 227 if (of_device_is_compatible(np, "chrp,iic")) {
@@ -262,8 +259,7 @@ static int mpc85xx_cds_8259_attach(void)
262 259
263 return 0; 260 return 0;
264} 261}
265 262machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
266device_initcall(mpc85xx_cds_8259_attach);
267 263
268#endif /* CONFIG_PPC_I8259 */ 264#endif /* CONFIG_PPC_I8259 */
269 265
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 59c121a97ac7..bdb3d0b38cd2 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -123,7 +123,7 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
123 struct device_node* node; 123 struct device_node* node;
124 struct resource rsrc; 124 struct resource rsrc;
125 125
126 node = (struct device_node *)hose->arch_data; 126 node = hose->dn;
127 of_address_to_resource(node, 0, &rsrc); 127 of_address_to_resource(node, 0, &rsrc);
128 128
129 if ((rsrc.start & 0xfffff) == primary_phb_addr) { 129 if ((rsrc.start & 0xfffff) == primary_phb_addr) {
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 61b3eedf41b9..25f8bc75e838 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -30,9 +30,9 @@
30#include <linux/initrd.h> 30#include <linux/initrd.h>
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/fsl_devices.h> 32#include <linux/fsl_devices.h>
33#include <linux/of_platform.h>
34#include <linux/of_device.h>
33 35
34#include <asm/of_device.h>
35#include <asm/of_platform.h>
36#include <asm/system.h> 36#include <asm/system.h>
37#include <asm/atomic.h> 37#include <asm/atomic.h>
38#include <asm/time.h> 38#include <asm/time.h>
@@ -94,21 +94,25 @@ static void __init mpc85xx_mds_setup_arch(void)
94#endif 94#endif
95 95
96#ifdef CONFIG_QUICC_ENGINE 96#ifdef CONFIG_QUICC_ENGINE
97 if ((np = of_find_node_by_name(NULL, "qe")) != NULL) { 97 np = of_find_compatible_node(NULL, NULL, "fsl,qe");
98 qe_reset(); 98 if (!np) {
99 of_node_put(np); 99 np = of_find_node_by_name(NULL, "qe");
100 if (!np)
101 return;
100 } 102 }
101 103
102 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { 104 qe_reset();
103 struct device_node *ucc = NULL; 105 of_node_put(np);
106
107 np = of_find_node_by_name(NULL, "par_io");
108 if (np) {
109 struct device_node *ucc;
104 110
105 par_io_init(np); 111 par_io_init(np);
106 of_node_put(np); 112 of_node_put(np);
107 113
108 for ( ;(ucc = of_find_node_by_name(ucc, "ucc")) != NULL;) 114 for_each_node_by_name(ucc, "ucc")
109 par_io_of_config(ucc); 115 par_io_of_config(ucc);
110
111 of_node_put(ucc);
112 } 116 }
113 117
114 if (bcsr_regs) { 118 if (bcsr_regs) {
@@ -131,7 +135,6 @@ static void __init mpc85xx_mds_setup_arch(void)
131 135
132 iounmap(bcsr_regs); 136 iounmap(bcsr_regs);
133 } 137 }
134
135#endif /* CONFIG_QUICC_ENGINE */ 138#endif /* CONFIG_QUICC_ENGINE */
136} 139}
137 140
@@ -139,20 +142,18 @@ static struct of_device_id mpc85xx_ids[] = {
139 { .type = "soc", }, 142 { .type = "soc", },
140 { .compatible = "soc", }, 143 { .compatible = "soc", },
141 { .type = "qe", }, 144 { .type = "qe", },
145 { .compatible = "fsl,qe", },
142 {}, 146 {},
143}; 147};
144 148
145static int __init mpc85xx_publish_devices(void) 149static int __init mpc85xx_publish_devices(void)
146{ 150{
147 if (!machine_is(mpc85xx_mds))
148 return 0;
149
150 /* Publish the QE devices */ 151 /* Publish the QE devices */
151 of_platform_bus_probe(NULL,mpc85xx_ids,NULL); 152 of_platform_bus_probe(NULL, mpc85xx_ids, NULL);
152 153
153 return 0; 154 return 0;
154} 155}
155device_initcall(mpc85xx_publish_devices); 156machine_device_initcall(mpc85xx_mds, mpc85xx_publish_devices);
156 157
157static void __init mpc85xx_mds_pic_init(void) 158static void __init mpc85xx_mds_pic_init(void)
158{ 159{
@@ -179,10 +180,12 @@ static void __init mpc85xx_mds_pic_init(void)
179 mpic_init(mpic); 180 mpic_init(mpic);
180 181
181#ifdef CONFIG_QUICC_ENGINE 182#ifdef CONFIG_QUICC_ENGINE
182 np = of_find_node_by_type(NULL, "qeic"); 183 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
183 if (!np) 184 if (!np) {
184 return; 185 np = of_find_node_by_type(NULL, "qeic");
185 186 if (!np)
187 return;
188 }
186 qe_ic_init(np, 0, qe_ic_cascade_muxed_mpic, NULL); 189 qe_ic_init(np, 0, qe_ic_cascade_muxed_mpic, NULL);
187 of_node_put(np); 190 of_node_put(np);
188#endif /* CONFIG_QUICC_ENGINE */ 191#endif /* CONFIG_QUICC_ENGINE */
diff --git a/arch/powerpc/platforms/85xx/sbc8548.c b/arch/powerpc/platforms/85xx/sbc8548.c
new file mode 100644
index 000000000000..488facb99fe8
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/sbc8548.c
@@ -0,0 +1,167 @@
1/*
2 * Wind River SBC8548 setup and early boot code.
3 *
4 * Copyright 2007 Wind River Systems Inc.
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the MPC8548CDS support - Copyright 2005 Freescale Inc.
9 *
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17#include <linux/stddef.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/errno.h>
21#include <linux/reboot.h>
22#include <linux/pci.h>
23#include <linux/kdev_t.h>
24#include <linux/major.h>
25#include <linux/console.h>
26#include <linux/delay.h>
27#include <linux/seq_file.h>
28#include <linux/initrd.h>
29#include <linux/module.h>
30#include <linux/interrupt.h>
31#include <linux/fsl_devices.h>
32#include <linux/of_platform.h>
33
34#include <asm/system.h>
35#include <asm/pgtable.h>
36#include <asm/page.h>
37#include <asm/atomic.h>
38#include <asm/time.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/ipic.h>
42#include <asm/pci-bridge.h>
43#include <asm/irq.h>
44#include <mm/mmu_decl.h>
45#include <asm/prom.h>
46#include <asm/udbg.h>
47#include <asm/mpic.h>
48
49#include <sysdev/fsl_soc.h>
50#include <sysdev/fsl_pci.h>
51
52static void __init sbc8548_pic_init(void)
53{
54 struct mpic *mpic;
55 struct resource r;
56 struct device_node *np = NULL;
57
58 np = of_find_node_by_type(np, "open-pic");
59
60 if (np == NULL) {
61 printk(KERN_ERR "Could not find open-pic node\n");
62 return;
63 }
64
65 if (of_address_to_resource(np, 0, &r)) {
66 printk(KERN_ERR "Failed to map mpic register space\n");
67 of_node_put(np);
68 return;
69 }
70
71 mpic = mpic_alloc(np, r.start,
72 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
73 0, 256, " OpenPIC ");
74 BUG_ON(mpic == NULL);
75
76 /* Return the mpic node */
77 of_node_put(np);
78
79 mpic_init(mpic);
80}
81
82/*
83 * Setup the architecture
84 */
85static void __init sbc8548_setup_arch(void)
86{
87#ifdef CONFIG_PCI
88 struct device_node *np;
89#endif
90
91 if (ppc_md.progress)
92 ppc_md.progress("sbc8548_setup_arch()", 0);
93
94#ifdef CONFIG_PCI
95 for_each_node_by_type(np, "pci") {
96 if (of_device_is_compatible(np, "fsl,mpc8540-pci") ||
97 of_device_is_compatible(np, "fsl,mpc8548-pcie")) {
98 struct resource rsrc;
99 of_address_to_resource(np, 0, &rsrc);
100 if ((rsrc.start & 0xfffff) == 0x8000)
101 fsl_add_bridge(np, 1);
102 else
103 fsl_add_bridge(np, 0);
104 }
105 }
106#endif
107}
108
109static void sbc8548_show_cpuinfo(struct seq_file *m)
110{
111 uint pvid, svid, phid1;
112 uint memsize = total_memory;
113
114 pvid = mfspr(SPRN_PVR);
115 svid = mfspr(SPRN_SVR);
116
117 seq_printf(m, "Vendor\t\t: Wind River\n");
118 seq_printf(m, "Machine\t\t: SBC8548\n");
119 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
120 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
121
122 /* Display cpu Pll setting */
123 phid1 = mfspr(SPRN_HID1);
124 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
125
126 /* Display the amount of memory */
127 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
128}
129
130static struct of_device_id __initdata of_bus_ids[] = {
131 { .name = "soc", },
132 { .type = "soc", },
133 {},
134};
135
136static int __init declare_of_platform_devices(void)
137{
138 of_platform_bus_probe(NULL, of_bus_ids, NULL);
139
140 return 0;
141}
142machine_device_initcall(sbc8548, declare_of_platform_devices);
143
144/*
145 * Called very early, device-tree isn't unflattened
146 */
147static int __init sbc8548_probe(void)
148{
149 unsigned long root = of_get_flat_dt_root();
150
151 return of_flat_dt_is_compatible(root, "SBC8548");
152}
153
154define_machine(sbc8548) {
155 .name = "SBC8548",
156 .probe = sbc8548_probe,
157 .setup_arch = sbc8548_setup_arch,
158 .init_IRQ = sbc8548_pic_init,
159 .show_cpuinfo = sbc8548_show_cpuinfo,
160 .get_irq = mpic_get_irq,
161 .restart = fsl_rstcr_restart,
162#ifdef CONFIG_PCI
163 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
164#endif
165 .calibrate_decr = generic_calibrate_decr,
166 .progress = udbg_progress,
167};
diff --git a/arch/powerpc/platforms/85xx/sbc8560.c b/arch/powerpc/platforms/85xx/sbc8560.c
new file mode 100644
index 000000000000..2c580cd24e4f
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/sbc8560.c
@@ -0,0 +1,283 @@
1/*
2 * Wind River SBC8560 setup and early boot code.
3 *
4 * Copyright 2007 Wind River Systems Inc.
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the MPC8560ADS support - Copyright 2005 Freescale Inc.
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/stddef.h>
17#include <linux/kernel.h>
18#include <linux/pci.h>
19#include <linux/kdev_t.h>
20#include <linux/delay.h>
21#include <linux/seq_file.h>
22#include <linux/of_platform.h>
23
24#include <asm/system.h>
25#include <asm/time.h>
26#include <asm/machdep.h>
27#include <asm/pci-bridge.h>
28#include <asm/mpic.h>
29#include <mm/mmu_decl.h>
30#include <asm/udbg.h>
31
32#include <sysdev/fsl_soc.h>
33#include <sysdev/fsl_pci.h>
34
35#ifdef CONFIG_CPM2
36#include <asm/cpm2.h>
37#include <sysdev/cpm2_pic.h>
38#endif
39
40#ifdef CONFIG_CPM2
41
42static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
43{
44 int cascade_irq;
45
46 while ((cascade_irq = cpm2_get_irq()) >= 0)
47 generic_handle_irq(cascade_irq);
48
49 desc->chip->eoi(irq);
50}
51
52#endif /* CONFIG_CPM2 */
53
54static void __init sbc8560_pic_init(void)
55{
56 struct mpic *mpic;
57 struct resource r;
58 struct device_node *np = NULL;
59#ifdef CONFIG_CPM2
60 int irq;
61#endif
62
63 np = of_find_node_by_type(np, "open-pic");
64 if (!np) {
65 printk(KERN_ERR "Could not find open-pic node\n");
66 return;
67 }
68
69 if (of_address_to_resource(np, 0, &r)) {
70 printk(KERN_ERR "Could not map mpic register space\n");
71 of_node_put(np);
72 return;
73 }
74
75 mpic = mpic_alloc(np, r.start,
76 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
77 0, 256, " OpenPIC ");
78 BUG_ON(mpic == NULL);
79 of_node_put(np);
80
81 mpic_init(mpic);
82
83#ifdef CONFIG_CPM2
84 /* Setup CPM2 PIC */
85 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
86 if (np == NULL) {
87 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
88 return;
89 }
90 irq = irq_of_parse_and_map(np, 0);
91
92 cpm2_pic_init(np);
93 of_node_put(np);
94 set_irq_chained_handler(irq, cpm2_cascade);
95#endif
96}
97
98/*
99 * Setup the architecture
100 */
101#ifdef CONFIG_CPM2
102struct cpm_pin {
103 int port, pin, flags;
104};
105
106static const struct cpm_pin sbc8560_pins[] = {
107 /* SCC1 */
108 {3, 29, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
109 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
110 {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
111
112 /* SCC2 */
113 {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
114 {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
115 {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
116
117 /* FCC2 */
118 {1, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
119 {1, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
120 {1, 20, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
121 {1, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
122 {1, 22, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
123 {1, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
124 {1, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
125 {1, 25, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
126 {1, 26, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
127 {1, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
128 {1, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
129 {1, 29, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
130 {1, 30, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
131 {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
132 {2, 18, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK14 */
133 {2, 19, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK13 */
134
135 /* FCC3 */
136 {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
137 {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
138 {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
139 {1, 7, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
140 {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
141 {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
142 {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
143 {1, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
144 {1, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
145 {1, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
146 {1, 14, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
147 {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
148 {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
149 {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
150 {2, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK16 */
151 {2, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK15 */
152};
153
154static void __init init_ioports(void)
155{
156 int i;
157
158 for (i = 0; i < ARRAY_SIZE(sbc8560_pins); i++) {
159 struct cpm_pin *pin = &sbc8560_pins[i];
160 cpm2_set_pin(pin->port, pin->pin, pin->flags);
161 }
162
163 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX);
164 cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX);
165 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_RX);
166 cpm2_clk_setup(CPM_CLK_SCC2, CPM_BRG2, CPM_CLK_TX);
167 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
168 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
169 cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK15, CPM_CLK_RX);
170 cpm2_clk_setup(CPM_CLK_FCC3, CPM_CLK16, CPM_CLK_TX);
171}
172#endif
173
174static void __init sbc8560_setup_arch(void)
175{
176#ifdef CONFIG_PCI
177 struct device_node *np;
178#endif
179
180 if (ppc_md.progress)
181 ppc_md.progress("sbc8560_setup_arch()", 0);
182
183#ifdef CONFIG_CPM2
184 cpm2_reset();
185 init_ioports();
186#endif
187
188#ifdef CONFIG_PCI
189 for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
190 fsl_add_bridge(np, 1);
191#endif
192}
193
194static void sbc8560_show_cpuinfo(struct seq_file *m)
195{
196 uint pvid, svid, phid1;
197 uint memsize = total_memory;
198
199 pvid = mfspr(SPRN_PVR);
200 svid = mfspr(SPRN_SVR);
201
202 seq_printf(m, "Vendor\t\t: Wind River\n");
203 seq_printf(m, "Machine\t\t: SBC8560\n");
204 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
205 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
206
207 /* Display cpu Pll setting */
208 phid1 = mfspr(SPRN_HID1);
209 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
210
211 /* Display the amount of memory */
212 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
213}
214
215static struct of_device_id __initdata of_bus_ids[] = {
216 { .name = "soc", },
217 { .type = "soc", },
218 { .name = "cpm", },
219 { .name = "localbus", },
220 {},
221};
222
223static int __init declare_of_platform_devices(void)
224{
225 of_platform_bus_probe(NULL, of_bus_ids, NULL);
226
227 return 0;
228}
229machine_device_initcall(sbc8560, declare_of_platform_devices);
230
231/*
232 * Called very early, device-tree isn't unflattened
233 */
234static int __init sbc8560_probe(void)
235{
236 unsigned long root = of_get_flat_dt_root();
237
238 return of_flat_dt_is_compatible(root, "SBC8560");
239}
240
241#ifdef CONFIG_RTC_DRV_M48T59
242static int __init sbc8560_rtc_init(void)
243{
244 struct device_node *np;
245 struct resource res;
246 struct platform_device *rtc_dev;
247
248 np = of_find_compatible_node(NULL, NULL, "m48t59");
249 if (np == NULL) {
250 printk("No RTC in DTB. Has it been eaten by wild dogs?\n");
251 return -ENODEV;
252 }
253
254 of_address_to_resource(np, 0, &res);
255 of_node_put(np);
256
257 printk("Found RTC (m48t59) at i/o 0x%x\n", res.start);
258
259 rtc_dev = platform_device_register_simple("rtc-m48t59", 0, &res, 1);
260
261 if (IS_ERR(rtc_dev)) {
262 printk("Registering sbc8560 RTC device failed\n");
263 return PTR_ERR(rtc_dev);
264 }
265
266 return 0;
267}
268
269arch_initcall(sbc8560_rtc_init);
270
271#endif /* M48T59 */
272
273define_machine(sbc8560) {
274 .name = "SBC8560",
275 .probe = sbc8560_probe,
276 .setup_arch = sbc8560_setup_arch,
277 .init_IRQ = sbc8560_pic_init,
278 .show_cpuinfo = sbc8560_show_cpuinfo,
279 .get_irq = mpic_get_irq,
280 .restart = fsl_rstcr_restart,
281 .calibrate_decr = generic_calibrate_decr,
282 .progress = udbg_progress,
283};
diff --git a/arch/powerpc/platforms/85xx/stx_gp3.c b/arch/powerpc/platforms/85xx/stx_gp3.c
new file mode 100644
index 000000000000..18499d7c9d9e
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/stx_gp3.c
@@ -0,0 +1,183 @@
1/*
2 * Based on MPC8560 ADS and arch/ppc stx_gp3 ports
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * Copyright 2008 Freescale Semiconductor Inc.
7 *
8 * Dan Malek <dan@embeddededge.com>
9 * Copyright 2004 Embedded Edge, LLC
10 *
11 * Copied from mpc8560_ads.c
12 * Copyright 2002, 2003 Motorola Inc.
13 *
14 * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
15 * Copyright 2004-2005 MontaVista Software, Inc.
16 *
17 * This program is free software; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 2 of the License, or (at your
20 * option) any later version.
21 */
22
23#include <linux/stddef.h>
24#include <linux/kernel.h>
25#include <linux/pci.h>
26#include <linux/kdev_t.h>
27#include <linux/delay.h>
28#include <linux/seq_file.h>
29#include <linux/of_platform.h>
30
31#include <asm/system.h>
32#include <asm/time.h>
33#include <asm/machdep.h>
34#include <asm/pci-bridge.h>
35#include <asm/mpic.h>
36#include <asm/prom.h>
37#include <mm/mmu_decl.h>
38#include <asm/udbg.h>
39
40#include <sysdev/fsl_soc.h>
41#include <sysdev/fsl_pci.h>
42
43#ifdef CONFIG_CPM2
44#include <asm/cpm2.h>
45#include <sysdev/cpm2_pic.h>
46
47static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
48{
49 int cascade_irq;
50
51 while ((cascade_irq = cpm2_get_irq()) >= 0)
52 generic_handle_irq(cascade_irq);
53
54 desc->chip->eoi(irq);
55}
56#endif /* CONFIG_CPM2 */
57
58static void __init stx_gp3_pic_init(void)
59{
60 struct mpic *mpic;
61 struct resource r;
62 struct device_node *np;
63#ifdef CONFIG_CPM2
64 int irq;
65#endif
66
67 np = of_find_node_by_type(NULL, "open-pic");
68 if (!np) {
69 printk(KERN_ERR "Could not find open-pic node\n");
70 return;
71 }
72
73 if (of_address_to_resource(np, 0, &r)) {
74 printk(KERN_ERR "Could not map mpic register space\n");
75 of_node_put(np);
76 return;
77 }
78
79 mpic = mpic_alloc(np, r.start,
80 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
81 0, 256, " OpenPIC ");
82 BUG_ON(mpic == NULL);
83 of_node_put(np);
84
85 mpic_init(mpic);
86
87#ifdef CONFIG_CPM2
88 /* Setup CPM2 PIC */
89 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
90 if (np == NULL) {
91 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
92 return;
93 }
94 irq = irq_of_parse_and_map(np, 0);
95
96 if (irq == NO_IRQ) {
97 of_node_put(np);
98 printk(KERN_ERR "PIC init: got no IRQ for cpm cascade\n");
99 return;
100 }
101
102 cpm2_pic_init(np);
103 of_node_put(np);
104 set_irq_chained_handler(irq, cpm2_cascade);
105#endif
106}
107
108/*
109 * Setup the architecture
110 */
111static void __init stx_gp3_setup_arch(void)
112{
113#ifdef CONFIG_PCI
114 struct device_node *np;
115#endif
116
117 if (ppc_md.progress)
118 ppc_md.progress("stx_gp3_setup_arch()", 0);
119
120#ifdef CONFIG_CPM2
121 cpm2_reset();
122#endif
123
124#ifdef CONFIG_PCI
125 for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
126 fsl_add_bridge(np, 1);
127#endif
128}
129
130static void stx_gp3_show_cpuinfo(struct seq_file *m)
131{
132 uint pvid, svid, phid1;
133 uint memsize = total_memory;
134
135 pvid = mfspr(SPRN_PVR);
136 svid = mfspr(SPRN_SVR);
137
138 seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
139 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
140 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
141
142 /* Display cpu Pll setting */
143 phid1 = mfspr(SPRN_HID1);
144 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
145
146 /* Display the amount of memory */
147 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
148}
149
150static struct of_device_id __initdata of_bus_ids[] = {
151 { .compatible = "simple-bus", },
152 {},
153};
154
155static int __init declare_of_platform_devices(void)
156{
157 of_platform_bus_probe(NULL, of_bus_ids, NULL);
158
159 return 0;
160}
161machine_device_initcall(stx_gp3, declare_of_platform_devices);
162
163/*
164 * Called very early, device-tree isn't unflattened
165 */
166static int __init stx_gp3_probe(void)
167{
168 unsigned long root = of_get_flat_dt_root();
169
170 return of_flat_dt_is_compatible(root, "stx,gp3-8560");
171}
172
173define_machine(stx_gp3) {
174 .name = "STX GP3",
175 .probe = stx_gp3_probe,
176 .setup_arch = stx_gp3_setup_arch,
177 .init_IRQ = stx_gp3_pic_init,
178 .show_cpuinfo = stx_gp3_show_cpuinfo,
179 .get_irq = mpic_get_irq,
180 .restart = fsl_rstcr_restart,
181 .calibrate_decr = generic_calibrate_decr,
182 .progress = udbg_progress,
183};
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
new file mode 100644
index 000000000000..77681acf1bae
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -0,0 +1,187 @@
1/*
2 * Based on MPC8560 ADS and arch/ppc tqm85xx ports
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
5 *
6 * Copyright 2008 Freescale Semiconductor Inc.
7 *
8 * Copyright (c) 2005-2006 DENX Software Engineering
9 * Stefan Roese <sr@denx.de>
10 *
11 * Based on original work by
12 * Kumar Gala <kumar.gala@freescale.com>
13 * Copyright 2004 Freescale Semiconductor Inc.
14 *
15 * This program is free software; you can redistribute it and/or modify it
16 * under the terms of the GNU General Public License as published by the
17 * Free Software Foundation; either version 2 of the License, or (at your
18 * option) any later version.
19 */
20
21#include <linux/stddef.h>
22#include <linux/kernel.h>
23#include <linux/pci.h>
24#include <linux/kdev_t.h>
25#include <linux/delay.h>
26#include <linux/seq_file.h>
27#include <linux/of_platform.h>
28
29#include <asm/system.h>
30#include <asm/time.h>
31#include <asm/machdep.h>
32#include <asm/pci-bridge.h>
33#include <asm/mpic.h>
34#include <asm/prom.h>
35#include <mm/mmu_decl.h>
36#include <asm/udbg.h>
37
38#include <sysdev/fsl_soc.h>
39#include <sysdev/fsl_pci.h>
40
41#ifdef CONFIG_CPM2
42#include <asm/cpm2.h>
43#include <sysdev/cpm2_pic.h>
44
45static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
46{
47 int cascade_irq;
48
49 while ((cascade_irq = cpm2_get_irq()) >= 0)
50 generic_handle_irq(cascade_irq);
51
52 desc->chip->eoi(irq);
53}
54#endif /* CONFIG_CPM2 */
55
56static void __init tqm85xx_pic_init(void)
57{
58 struct mpic *mpic;
59 struct resource r;
60 struct device_node *np;
61#ifdef CONFIG_CPM2
62 int irq;
63#endif
64
65 np = of_find_node_by_type(NULL, "open-pic");
66 if (!np) {
67 printk(KERN_ERR "Could not find open-pic node\n");
68 return;
69 }
70
71 if (of_address_to_resource(np, 0, &r)) {
72 printk(KERN_ERR "Could not map mpic register space\n");
73 of_node_put(np);
74 return;
75 }
76
77 mpic = mpic_alloc(np, r.start,
78 MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
79 0, 256, " OpenPIC ");
80 BUG_ON(mpic == NULL);
81 of_node_put(np);
82
83 mpic_init(mpic);
84
85#ifdef CONFIG_CPM2
86 /* Setup CPM2 PIC */
87 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic");
88 if (np == NULL) {
89 printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n");
90 return;
91 }
92 irq = irq_of_parse_and_map(np, 0);
93
94 if (irq == NO_IRQ) {
95 of_node_put(np);
96 printk(KERN_ERR "PIC init: got no IRQ for cpm cascade\n");
97 return;
98 }
99
100 cpm2_pic_init(np);
101 of_node_put(np);
102 set_irq_chained_handler(irq, cpm2_cascade);
103#endif
104}
105
106/*
107 * Setup the architecture
108 */
109static void __init tqm85xx_setup_arch(void)
110{
111#ifdef CONFIG_PCI
112 struct device_node *np;
113#endif
114
115 if (ppc_md.progress)
116 ppc_md.progress("tqm85xx_setup_arch()", 0);
117
118#ifdef CONFIG_CPM2
119 cpm2_reset();
120#endif
121
122#ifdef CONFIG_PCI
123 for_each_compatible_node(np, "pci", "fsl,mpc8540-pci")
124 fsl_add_bridge(np, 1);
125#endif
126}
127
128static void tqm85xx_show_cpuinfo(struct seq_file *m)
129{
130 uint pvid, svid, phid1;
131 uint memsize = total_memory;
132
133 pvid = mfspr(SPRN_PVR);
134 svid = mfspr(SPRN_SVR);
135
136 seq_printf(m, "Vendor\t\t: TQ Components\n");
137 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
138 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
139
140 /* Display cpu Pll setting */
141 phid1 = mfspr(SPRN_HID1);
142 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
143
144 /* Display the amount of memory */
145 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
146}
147
148static struct of_device_id __initdata of_bus_ids[] = {
149 { .compatible = "simple-bus", },
150 {},
151};
152
153static int __init declare_of_platform_devices(void)
154{
155 of_platform_bus_probe(NULL, of_bus_ids, NULL);
156
157 return 0;
158}
159machine_device_initcall(tqm85xx, declare_of_platform_devices);
160
161/*
162 * Called very early, device-tree isn't unflattened
163 */
164static int __init tqm85xx_probe(void)
165{
166 unsigned long root = of_get_flat_dt_root();
167
168 if ((of_flat_dt_is_compatible(root, "tqm,8540")) ||
169 (of_flat_dt_is_compatible(root, "tqm,8541")) ||
170 (of_flat_dt_is_compatible(root, "tqm,8555")) ||
171 (of_flat_dt_is_compatible(root, "tqm,8560")))
172 return 1;
173
174 return 0;
175}
176
177define_machine(tqm85xx) {
178 .name = "TQM85xx",
179 .probe = tqm85xx_probe,
180 .setup_arch = tqm85xx_setup_arch,
181 .init_IRQ = tqm85xx_pic_init,
182 .show_cpuinfo = tqm85xx_show_cpuinfo,
183 .get_irq = mpic_get_irq,
184 .restart = fsl_rstcr_restart,
185 .calibrate_decr = generic_calibrate_decr,
186 .progress = udbg_progress,
187};
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 6390895e5e92..0b07485641fe 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -34,9 +34,24 @@
34 34
35#include <asm/mpic.h> 35#include <asm/mpic.h>
36 36
37#include <linux/of_platform.h>
37#include <sysdev/fsl_pci.h> 38#include <sysdev/fsl_pci.h>
38#include <sysdev/fsl_soc.h> 39#include <sysdev/fsl_soc.h>
39 40
41static struct of_device_id __initdata mpc8610_ids[] = {
42 { .compatible = "fsl,mpc8610-immr", },
43 {}
44};
45
46static int __init mpc8610_declare_of_platform_devices(void)
47{
48 /* Without this call, the SSI device driver won't get probed. */
49 of_platform_bus_probe(NULL, mpc8610_ids, NULL);
50
51 return 0;
52}
53machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
54
40void __init 55void __init
41mpc86xx_hpcd_init_irq(void) 56mpc86xx_hpcd_init_irq(void)
42{ 57{
@@ -124,7 +139,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
124static void __devinit final_uli5288(struct pci_dev *dev) 139static void __devinit final_uli5288(struct pci_dev *dev)
125{ 140{
126 struct pci_controller *hose = pci_bus_to_host(dev->bus); 141 struct pci_controller *hose = pci_bus_to_host(dev->bus);
127 struct device_node *hosenode = hose ? hose->arch_data : NULL; 142 struct device_node *hosenode = hose ? hose->dn : NULL;
128 struct of_irq oirq; 143 struct of_irq oirq;
129 int virq, pin = 2; 144 int virq, pin = 2;
130 u32 laddr[3]; 145 u32 laddr[3];
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 32a531aebcb7..cfbe8c52e263 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -18,6 +18,7 @@
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/of_platform.h>
21 22
22#include <asm/system.h> 23#include <asm/system.h>
23#include <asm/time.h> 24#include <asm/time.h>
@@ -116,7 +117,7 @@ static int mpc86xx_exclude_device(struct pci_controller *hose,
116 struct device_node* node; 117 struct device_node* node;
117 struct resource rsrc; 118 struct resource rsrc;
118 119
119 node = (struct device_node *)hose->arch_data; 120 node = hose->dn;
120 of_address_to_resource(node, 0, &rsrc); 121 of_address_to_resource(node, 0, &rsrc);
121 122
122 if ((rsrc.start & 0xfffff) == 0x8000) { 123 if ((rsrc.start & 0xfffff) == 0x8000) {
@@ -212,6 +213,19 @@ mpc86xx_time_init(void)
212 return 0; 213 return 0;
213} 214}
214 215
216static __initdata struct of_device_id of_bus_ids[] = {
217 { .compatible = "simple-bus", },
218 {},
219};
220
221static int __init declare_of_platform_devices(void)
222{
223 of_platform_bus_probe(NULL, of_bus_ids, NULL);
224
225 return 0;
226}
227machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices);
228
215define_machine(mpc86xx_hpcn) { 229define_machine(mpc86xx_hpcn) {
216 .name = "MPC86xx HPCN", 230 .name = "MPC86xx HPCN",
217 .probe = mpc86xx_hpcn_probe, 231 .probe = mpc86xx_hpcn_probe,
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index bd28655043a0..7fd224ca233d 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -18,6 +18,7 @@ config MPC8XXFADS
18config MPC86XADS 18config MPC86XADS
19 bool "MPC86XADS" 19 bool "MPC86XADS"
20 select CPM1 20 select CPM1
21 select PPC_CPM_NEW_BINDING
21 help 22 help
22 MPC86x Application Development System by Freescale Semiconductor. 23 MPC86x Application Development System by Freescale Semiconductor.
23 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
@@ -43,6 +44,15 @@ config PPC_EP88XC
43 This board is also resold by Freescale as the QUICCStart 44 This board is also resold by Freescale as the QUICCStart
44 MPC885 Evaluation System and/or the CWH-PPC-885XN-VE. 45 MPC885 Evaluation System and/or the CWH-PPC-885XN-VE.
45 46
47config PPC_ADDER875
48 bool "Analogue & Micro Adder 875"
49 select CPM1
50 select PPC_CPM_NEW_BINDING
51 select REDBOOT
52 help
53 This enables support for the Analogue & Micro Adder 875
54 board.
55
46endchoice 56endchoice
47 57
48menu "Freescale Ethernet driver platform-specific options" 58menu "Freescale Ethernet driver platform-specific options"
diff --git a/arch/powerpc/platforms/8xx/Makefile b/arch/powerpc/platforms/8xx/Makefile
index 8b7098018b59..7b71d9c8fb45 100644
--- a/arch/powerpc/platforms/8xx/Makefile
+++ b/arch/powerpc/platforms/8xx/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PPC_8xx) += m8xx_setup.o
5obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o 5obj-$(CONFIG_MPC885ADS) += mpc885ads_setup.o
6obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o 6obj-$(CONFIG_MPC86XADS) += mpc86xads_setup.o
7obj-$(CONFIG_PPC_EP88XC) += ep88xc.o 7obj-$(CONFIG_PPC_EP88XC) += ep88xc.o
8obj-$(CONFIG_PPC_ADDER875) += adder875.o
diff --git a/arch/powerpc/platforms/8xx/adder875.c b/arch/powerpc/platforms/8xx/adder875.c
new file mode 100644
index 000000000000..c6bc0783c3b0
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/adder875.c
@@ -0,0 +1,118 @@
1/* Analogue & Micro Adder MPC875 board support
2 *
3 * Author: Scott Wood <scottwood@freescale.com>
4 *
5 * Copyright (c) 2007 Freescale Semiconductor, Inc.
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, version 2, as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/init.h>
13#include <linux/fs_enet_pd.h>
14#include <linux/of_platform.h>
15
16#include <asm/time.h>
17#include <asm/machdep.h>
18#include <asm/commproc.h>
19#include <asm/fs_pd.h>
20#include <asm/udbg.h>
21#include <asm/prom.h>
22
23#include <sysdev/commproc.h>
24
25struct cpm_pin {
26 int port, pin, flags;
27};
28
29static __initdata struct cpm_pin adder875_pins[] = {
30 /* SMC1 */
31 {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
32 {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
33
34 /* MII1 */
35 {CPM_PORTA, 0, CPM_PIN_INPUT},
36 {CPM_PORTA, 1, CPM_PIN_INPUT},
37 {CPM_PORTA, 2, CPM_PIN_INPUT},
38 {CPM_PORTA, 3, CPM_PIN_INPUT},
39 {CPM_PORTA, 4, CPM_PIN_OUTPUT},
40 {CPM_PORTA, 10, CPM_PIN_OUTPUT},
41 {CPM_PORTA, 11, CPM_PIN_OUTPUT},
42 {CPM_PORTB, 19, CPM_PIN_INPUT},
43 {CPM_PORTB, 31, CPM_PIN_INPUT},
44 {CPM_PORTC, 12, CPM_PIN_INPUT},
45 {CPM_PORTC, 13, CPM_PIN_INPUT},
46 {CPM_PORTE, 30, CPM_PIN_OUTPUT},
47 {CPM_PORTE, 31, CPM_PIN_OUTPUT},
48
49 /* MII2 */
50 {CPM_PORTE, 14, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
51 {CPM_PORTE, 15, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
52 {CPM_PORTE, 16, CPM_PIN_OUTPUT},
53 {CPM_PORTE, 17, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
54 {CPM_PORTE, 18, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
55 {CPM_PORTE, 19, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
56 {CPM_PORTE, 20, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
57 {CPM_PORTE, 21, CPM_PIN_OUTPUT},
58 {CPM_PORTE, 22, CPM_PIN_OUTPUT},
59 {CPM_PORTE, 23, CPM_PIN_OUTPUT},
60 {CPM_PORTE, 24, CPM_PIN_OUTPUT},
61 {CPM_PORTE, 25, CPM_PIN_OUTPUT},
62 {CPM_PORTE, 26, CPM_PIN_OUTPUT},
63 {CPM_PORTE, 27, CPM_PIN_OUTPUT},
64 {CPM_PORTE, 28, CPM_PIN_OUTPUT},
65 {CPM_PORTE, 29, CPM_PIN_OUTPUT},
66};
67
68static void __init init_ioports(void)
69{
70 int i;
71
72 for (i = 0; i < ARRAY_SIZE(adder875_pins); i++) {
73 const struct cpm_pin *pin = &adder875_pins[i];
74 cpm1_set_pin(pin->port, pin->pin, pin->flags);
75 }
76
77 cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
78
79 /* Set FEC1 and FEC2 to MII mode */
80 clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
81}
82
83static void __init adder875_setup(void)
84{
85 cpm_reset();
86 init_ioports();
87}
88
89static int __init adder875_probe(void)
90{
91 unsigned long root = of_get_flat_dt_root();
92 return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875");
93}
94
95static __initdata struct of_device_id of_bus_ids[] = {
96 { .compatible = "simple-bus", },
97 {},
98};
99
100static int __init declare_of_platform_devices(void)
101{
102 of_platform_bus_probe(NULL, of_bus_ids, NULL);
103 return 0;
104}
105machine_device_initcall(adder875, declare_of_platform_devices);
106
107define_machine(adder875) {
108 .name = "Adder MPC875",
109 .probe = adder875_probe,
110 .setup_arch = adder875_setup,
111 .init_IRQ = m8xx_pic_init,
112 .get_irq = mpc8xx_get_irq,
113 .restart = mpc8xx_restart,
114 .calibrate_decr = generic_calibrate_decr,
115 .set_rtc_time = mpc8xx_set_rtc_time,
116 .get_rtc_time = mpc8xx_get_rtc_time,
117 .progress = udbg_progress,
118};
diff --git a/arch/powerpc/platforms/8xx/ep88xc.c b/arch/powerpc/platforms/8xx/ep88xc.c
index c518b6cc5fab..a8dffa005775 100644
--- a/arch/powerpc/platforms/8xx/ep88xc.c
+++ b/arch/powerpc/platforms/8xx/ep88xc.c
@@ -16,8 +16,9 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/udbg.h> 17#include <asm/udbg.h>
18#include <asm/commproc.h> 18#include <asm/commproc.h>
19#include <asm/cpm1.h>
19 20
20#include <sysdev/commproc.h> 21#include "mpc8xx.h"
21 22
22struct cpm_pin { 23struct cpm_pin {
23 int port, pin, flags; 24 int port, pin, flags;
@@ -155,18 +156,17 @@ static struct of_device_id __initdata of_bus_ids[] = {
155static int __init declare_of_platform_devices(void) 156static int __init declare_of_platform_devices(void)
156{ 157{
157 /* Publish the QE devices */ 158 /* Publish the QE devices */
158 if (machine_is(ep88xc)) 159 of_platform_bus_probe(NULL, of_bus_ids, NULL);
159 of_platform_bus_probe(NULL, of_bus_ids, NULL);
160 160
161 return 0; 161 return 0;
162} 162}
163device_initcall(declare_of_platform_devices); 163machine_device_initcall(ep88xc, declare_of_platform_devices);
164 164
165define_machine(ep88xc) { 165define_machine(ep88xc) {
166 .name = "Embedded Planet EP88xC", 166 .name = "Embedded Planet EP88xC",
167 .probe = ep88xc_probe, 167 .probe = ep88xc_probe,
168 .setup_arch = ep88xc_setup_arch, 168 .setup_arch = ep88xc_setup_arch,
169 .init_IRQ = m8xx_pic_init, 169 .init_IRQ = mpc8xx_pics_init,
170 .get_irq = mpc8xx_get_irq, 170 .get_irq = mpc8xx_get_irq,
171 .restart = mpc8xx_restart, 171 .restart = mpc8xx_restart,
172 .calibrate_decr = mpc8xx_calibrate_decr, 172 .calibrate_decr = mpc8xx_calibrate_decr,
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index d35eda80e9e6..184f998d1be2 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/time.h> 17#include <linux/time.h>
18#include <linux/rtc.h> 18#include <linux/rtc.h>
19#include <linux/fsl_devices.h>
19 20
20#include <asm/io.h> 21#include <asm/io.h>
21#include <asm/mpc8xx.h> 22#include <asm/mpc8xx.h>
@@ -25,13 +26,11 @@
25#include <mm/mmu_decl.h> 26#include <mm/mmu_decl.h>
26 27
27#include <sysdev/mpc8xx_pic.h> 28#include <sysdev/mpc8xx_pic.h>
28#include <sysdev/commproc.h>
29 29
30#ifdef CONFIG_PCMCIA_M8XX 30#include "mpc8xx.h"
31
31struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops; 32struct mpc8xx_pcmcia_ops m8xx_pcmcia_ops;
32#endif
33 33
34void m8xx_calibrate_decr(void);
35extern int cpm_pic_init(void); 34extern int cpm_pic_init(void);
36extern int cpm_get_irq(void); 35extern int cpm_get_irq(void);
37 36
@@ -120,7 +119,7 @@ void __init mpc8xx_calibrate_decr(void)
120 ppc_tb_freq /= 16; 119 ppc_tb_freq /= 16;
121 ppc_proc_freq = 50000000; 120 ppc_proc_freq = 50000000;
122 if (!get_freq("clock-frequency", &ppc_proc_freq)) 121 if (!get_freq("clock-frequency", &ppc_proc_freq))
123 printk(KERN_ERR "WARNING: Estimating processor frequency" 122 printk(KERN_ERR "WARNING: Estimating processor frequency "
124 "(not found)\n"); 123 "(not found)\n");
125 124
126 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq); 125 printk("Decrementer Frequency = 0x%lx\n", ppc_tb_freq);
@@ -237,13 +236,13 @@ static void cpm_cascade(unsigned int irq, struct irq_desc *desc)
237 desc->chip->eoi(irq); 236 desc->chip->eoi(irq);
238} 237}
239 238
240/* Initialize the internal interrupt controller. The number of 239/* Initialize the internal interrupt controllers. The number of
241 * interrupts supported can vary with the processor type, and the 240 * interrupts supported can vary with the processor type, and the
242 * 82xx family can have up to 64. 241 * 82xx family can have up to 64.
243 * External interrupts can be either edge or level triggered, and 242 * External interrupts can be either edge or level triggered, and
244 * need to be initialized by the appropriate driver. 243 * need to be initialized by the appropriate driver.
245 */ 244 */
246void __init m8xx_pic_init(void) 245void __init mpc8xx_pics_init(void)
247{ 246{
248 int irq; 247 int irq;
249 248
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h
index cffa194ccf1f..17b1fe75e0b2 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads.h
+++ b/arch/powerpc/platforms/8xx/mpc86xads.h
@@ -15,27 +15,6 @@
15#ifndef __ASM_MPC86XADS_H__ 15#ifndef __ASM_MPC86XADS_H__
16#define __ASM_MPC86XADS_H__ 16#define __ASM_MPC86XADS_H__
17 17
18#include <sysdev/fsl_soc.h>
19
20/* U-Boot maps BCSR to 0xff080000 */
21#define BCSR_ADDR ((uint)0xff080000)
22#define BCSR_SIZE ((uint)32)
23#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
24#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
25#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
26#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
27#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
28
29#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
30#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
31
32#define MPC8xx_CPM_OFFSET (0x9c0)
33#define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET)
34#define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver
35
36#define PCMCIA_MEM_ADDR ((uint)0xff020000)
37#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
38
39/* Bits of interest in the BCSRs. 18/* Bits of interest in the BCSRs.
40 */ 19 */
41#define BCSR1_ETHEN ((uint)0x20000000) 20#define BCSR1_ETHEN ((uint)0x20000000)
@@ -64,28 +43,5 @@
64#define BCSR5_MII1_EN 0x02 43#define BCSR5_MII1_EN 0x02
65#define BCSR5_MII1_RST 0x01 44#define BCSR5_MII1_RST 0x01
66 45
67/* Interrupt level assignments */
68#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
69#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
70#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
71
72/* We don't use the 8259 */
73#define NR_8259_INTS 0
74
75/* CPM Ethernet through SCC1 */
76#define PA_ENET_RXD ((ushort)0x0001)
77#define PA_ENET_TXD ((ushort)0x0002)
78#define PA_ENET_TCLK ((ushort)0x0100)
79#define PA_ENET_RCLK ((ushort)0x0200)
80#define PB_ENET_TENA ((uint)0x00001000)
81#define PC_ENET_CLSN ((ushort)0x0010)
82#define PC_ENET_RENA ((ushort)0x0020)
83
84/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
85 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
86 */
87#define SICR_ENET_MASK ((uint)0x000000ff)
88#define SICR_ENET_CLKRT ((uint)0x0000002c)
89
90#endif /* __ASM_MPC86XADS_H__ */ 46#endif /* __ASM_MPC86XADS_H__ */
91#endif /* __KERNEL__ */ 47#endif /* __KERNEL__ */
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index 49012835f453..c028a5b71bbb 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -6,273 +6,141 @@
6 * 6 *
7 * Copyright 2005 MontaVista Software Inc. 7 * Copyright 2005 MontaVista Software Inc.
8 * 8 *
9 * Heavily modified by Scott Wood <scottwood@freescale.com>
10 * Copyright 2007 Freescale Semiconductor, Inc.
11 *
9 * This file is licensed under the terms of the GNU General Public License 12 * 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 13 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied. 14 * kind, whether express or implied.
12 */ 15 */
13 16
14#include <linux/init.h> 17#include <linux/init.h>
15#include <linux/module.h> 18#include <linux/of_platform.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 19
27#include <asm/delay.h>
28#include <asm/io.h> 20#include <asm/io.h>
29#include <asm/machdep.h> 21#include <asm/machdep.h>
30#include <asm/page.h>
31#include <asm/processor.h>
32#include <asm/system.h> 22#include <asm/system.h>
33#include <asm/time.h> 23#include <asm/time.h>
34#include <asm/mpc8xx.h>
35#include <asm/8xx_immap.h> 24#include <asm/8xx_immap.h>
36#include <asm/commproc.h> 25#include <asm/cpm1.h>
37#include <asm/fs_pd.h> 26#include <asm/fs_pd.h>
38#include <asm/prom.h> 27#include <asm/udbg.h>
39 28
40#include <sysdev/commproc.h> 29#include "mpc86xads.h"
30#include "mpc8xx.h"
41 31
42static void init_smc1_uart_ioports(struct fs_uart_platform_info* fpi); 32struct cpm_pin {
43static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi); 33 int port, pin, flags;
44static void init_scc1_ioports(struct fs_platform_info* ptr); 34};
45 35
46void __init mpc86xads_board_setup(void) 36static struct cpm_pin mpc866ads_pins[] = {
47{ 37 /* SMC1 */
48 cpm8xx_t *cp; 38 {CPM_PORTB, 24, CPM_PIN_INPUT}, /* RX */
49 unsigned int *bcsr_io; 39 {CPM_PORTB, 25, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
50 u8 tmpval8; 40
41 /* SMC2 */
42 {CPM_PORTB, 21, CPM_PIN_INPUT}, /* RX */
43 {CPM_PORTB, 20, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TX */
44
45 /* SCC1 */
46 {CPM_PORTA, 6, CPM_PIN_INPUT}, /* CLK1 */
47 {CPM_PORTA, 7, CPM_PIN_INPUT}, /* CLK2 */
48 {CPM_PORTA, 14, CPM_PIN_INPUT}, /* TX */
49 {CPM_PORTA, 15, CPM_PIN_INPUT}, /* RX */
50 {CPM_PORTB, 19, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* TENA */
51 {CPM_PORTC, 10, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* RENA */
52 {CPM_PORTC, 11, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_GPIO}, /* CLSN */
53
54 /* MII */
55 {CPM_PORTD, 3, CPM_PIN_OUTPUT},
56 {CPM_PORTD, 4, CPM_PIN_OUTPUT},
57 {CPM_PORTD, 5, CPM_PIN_OUTPUT},
58 {CPM_PORTD, 6, CPM_PIN_OUTPUT},
59 {CPM_PORTD, 7, CPM_PIN_OUTPUT},
60 {CPM_PORTD, 8, CPM_PIN_OUTPUT},
61 {CPM_PORTD, 9, CPM_PIN_OUTPUT},
62 {CPM_PORTD, 10, CPM_PIN_OUTPUT},
63 {CPM_PORTD, 11, CPM_PIN_OUTPUT},
64 {CPM_PORTD, 12, CPM_PIN_OUTPUT},
65 {CPM_PORTD, 13, CPM_PIN_OUTPUT},
66 {CPM_PORTD, 14, CPM_PIN_OUTPUT},
67 {CPM_PORTD, 15, CPM_PIN_OUTPUT},
68};
51 69
52 bcsr_io = ioremap(BCSR1, sizeof(unsigned long)); 70static void __init init_ioports(void)
53 cp = (cpm8xx_t *)immr_map(im_cpm); 71{
72 int i;
54 73
55 if (bcsr_io == NULL) { 74 for (i = 0; i < ARRAY_SIZE(mpc866ads_pins); i++) {
56 printk(KERN_CRIT "Could not remap BCSR\n"); 75 struct cpm_pin *pin = &mpc866ads_pins[i];
57 return; 76 cpm1_set_pin(pin->port, pin->pin, pin->flags);
58 } 77 }
59#ifdef CONFIG_SERIAL_CPM_SMC1
60 clrbits32(bcsr_io, BCSR1_RS232EN_1);
61 clrbits32(&cp->cp_simode, 0xe0000000 >> 17); /* brg1 */
62 tmpval8 = in_8(&(cp->cp_smc[0].smc_smcm)) | (SMCM_RX | SMCM_TX);
63 out_8(&(cp->cp_smc[0].smc_smcm), tmpval8);
64 clrbits16(&cp->cp_smc[0].smc_smcmr, SMCMR_REN | SMCMR_TEN);
65#else
66 setbits32(bcsr_io,BCSR1_RS232EN_1);
67 out_be16(&cp->cp_smc[0].smc_smcmr, 0);
68 out_8(&cp->cp_smc[0].smc_smce, 0);
69#endif
70 78
71#ifdef CONFIG_SERIAL_CPM_SMC2 79 cpm1_clk_setup(CPM_CLK_SMC1, CPM_BRG1, CPM_CLK_RTX);
72 clrbits32(bcsr_io,BCSR1_RS232EN_2); 80 cpm1_clk_setup(CPM_CLK_SMC2, CPM_BRG2, CPM_CLK_RTX);
73 clrbits32(&cp->cp_simode, 0xe0000000 >> 1); 81 cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK1, CPM_CLK_TX);
74 setbits32(&cp->cp_simode, 0x20000000 >> 1); /* brg2 */ 82 cpm1_clk_setup(CPM_CLK_SCC1, CPM_CLK2, CPM_CLK_RX);
75 tmpval8 = in_8(&(cp->cp_smc[1].smc_smcm)) | (SMCM_RX | SMCM_TX);
76 out_8(&(cp->cp_smc[1].smc_smcm), tmpval8);
77 clrbits16(&cp->cp_smc[1].smc_smcmr, SMCMR_REN | SMCMR_TEN);
78 83
79 init_smc2_uart_ioports(0); 84 /* Set FEC1 and FEC2 to MII mode */
80#else 85 clrbits32(&mpc8xx_immr->im_cpm.cp_cptr, 0x00000180);
81 setbits32(bcsr_io,BCSR1_RS232EN_2);
82 out_be16(&cp->cp_smc[1].smc_smcmr, 0);
83 out_8(&cp->cp_smc[1].smc_smce, 0);
84#endif
85 immr_unmap(cp);
86 iounmap(bcsr_io);
87} 86}
88 87
89 88static void __init mpc86xads_setup_arch(void)
90static void init_fec1_ioports(struct fs_platform_info* ptr)
91{ 89{
92 iop8xx_t *io_port = (iop8xx_t *)immr_map(im_ioport); 90 struct device_node *np;
93 91 u32 __iomem *bcsr_io;
94 /* configure FEC1 pins */
95
96 setbits16(&io_port->iop_pdpar, 0x1fff);
97 setbits16(&io_port->iop_pddir, 0x1fff);
98
99 immr_unmap(io_port);
100}
101 92
102void init_fec_ioports(struct fs_platform_info *fpi) 93 cpm_reset();
103{ 94 init_ioports();
104 int fec_no = fs_get_fec_index(fpi->fs_no);
105 95
106 switch (fec_no) { 96 np = of_find_compatible_node(NULL, NULL, "fsl,mpc866ads-bcsr");
107 case 0: 97 if (!np) {
108 init_fec1_ioports(fpi); 98 printk(KERN_CRIT "Could not find fsl,mpc866ads-bcsr node\n");
109 break;
110 default:
111 printk(KERN_ERR "init_fec_ioports: invalid FEC number\n");
112 return; 99 return;
113 } 100 }
114}
115
116static void init_scc1_ioports(struct fs_platform_info* fpi)
117{
118 unsigned *bcsr_io;
119 iop8xx_t *io_port;
120 cpm8xx_t *cp;
121 101
122 bcsr_io = ioremap(BCSR_ADDR, BCSR_SIZE); 102 bcsr_io = of_iomap(np, 0);
123 io_port = (iop8xx_t *)immr_map(im_ioport); 103 of_node_put(np);
124 cp = (cpm8xx_t *)immr_map(im_cpm);
125 104
126 if (bcsr_io == NULL) { 105 if (bcsr_io == NULL) {
127 printk(KERN_CRIT "Could not remap BCSR\n"); 106 printk(KERN_CRIT "Could not remap BCSR\n");
128 return; 107 return;
129 } 108 }
130 109
131 /* Configure port A pins for Txd and Rxd. 110 clrbits32(bcsr_io, BCSR1_RS232EN_1 | BCSR1_RS232EN_2 | BCSR1_ETHEN);
132 */
133 setbits16(&io_port->iop_papar, PA_ENET_RXD | PA_ENET_TXD);
134 clrbits16(&io_port->iop_padir, PA_ENET_RXD | PA_ENET_TXD);
135 clrbits16(&io_port->iop_paodr, PA_ENET_TXD);
136
137 /* Configure port C pins to enable CLSN and RENA.
138 */
139 clrbits16(&io_port->iop_pcpar, PC_ENET_CLSN | PC_ENET_RENA);
140 clrbits16(&io_port->iop_pcdir, PC_ENET_CLSN | PC_ENET_RENA);
141 setbits16(&io_port->iop_pcso, PC_ENET_CLSN | PC_ENET_RENA);
142
143 /* Configure port A for TCLK and RCLK.
144 */
145 setbits16(&io_port->iop_papar, PA_ENET_TCLK | PA_ENET_RCLK);
146 clrbits16(&io_port->iop_padir, PA_ENET_TCLK | PA_ENET_RCLK);
147 clrbits32(&cp->cp_pbpar, PB_ENET_TENA);
148 clrbits32(&cp->cp_pbdir, PB_ENET_TENA);
149
150 /* Configure Serial Interface clock routing.
151 * First, clear all SCC bits to zero, then set the ones we want.
152 */
153 clrbits32(&cp->cp_sicr, SICR_ENET_MASK);
154 setbits32(&cp->cp_sicr, SICR_ENET_CLKRT);
155
156 /* In the original SCC enet driver the following code is placed at
157 the end of the initialization */
158 setbits32(&cp->cp_pbpar, PB_ENET_TENA);
159 setbits32(&cp->cp_pbdir, PB_ENET_TENA);
160
161 clrbits32(bcsr_io+1, BCSR1_ETHEN);
162 iounmap(bcsr_io); 111 iounmap(bcsr_io);
163 immr_unmap(cp);
164 immr_unmap(io_port);
165} 112}
166 113
167void init_scc_ioports(struct fs_platform_info *fpi) 114static int __init mpc86xads_probe(void)
168{
169 int scc_no = fs_get_scc_index(fpi->fs_no);
170
171 switch (scc_no) {
172 case 0:
173 init_scc1_ioports(fpi);
174 break;
175 default:
176 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
177 return;
178 }
179}
180
181
182
183static void init_smc1_uart_ioports(struct fs_uart_platform_info* ptr)
184{ 115{
185 unsigned *bcsr_io; 116 unsigned long root = of_get_flat_dt_root();
186 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 117 return of_flat_dt_is_compatible(root, "fsl,mpc866ads");
187
188 setbits32(&cp->cp_pbpar, 0x000000c0);
189 clrbits32(&cp->cp_pbdir, 0x000000c0);
190 clrbits16(&cp->cp_pbodr, 0x00c0);
191 immr_unmap(cp);
192
193 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
194
195 if (bcsr_io == NULL) {
196 printk(KERN_CRIT "Could not remap BCSR1\n");
197 return;
198 }
199 clrbits32(bcsr_io,BCSR1_RS232EN_1);
200 iounmap(bcsr_io);
201} 118}
202 119
203static void init_smc2_uart_ioports(struct fs_uart_platform_info* fpi) 120static struct of_device_id __initdata of_bus_ids[] = {
204{ 121 { .name = "soc", },
205 unsigned *bcsr_io; 122 { .name = "cpm", },
206 cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); 123 { .name = "localbus", },
207 124 {},
208 setbits32(&cp->cp_pbpar, 0x00000c00); 125};
209 clrbits32(&cp->cp_pbdir, 0x00000c00);
210 clrbits16(&cp->cp_pbodr, 0x0c00);
211 immr_unmap(cp);
212
213 bcsr_io = ioremap(BCSR1, sizeof(unsigned long));
214
215 if (bcsr_io == NULL) {
216 printk(KERN_CRIT "Could not remap BCSR1\n");
217 return;
218 }
219 clrbits32(bcsr_io,BCSR1_RS232EN_2);
220 iounmap(bcsr_io);
221}
222 126
223void init_smc_ioports(struct fs_uart_platform_info *data) 127static int __init declare_of_platform_devices(void)
224{ 128{
225 int smc_no = fs_uart_id_fsid2smc(data->fs_no); 129 of_platform_bus_probe(NULL, of_bus_ids, NULL);
226
227 switch (smc_no) {
228 case 0:
229 init_smc1_uart_ioports(data);
230 data->brg = data->clk_rx;
231 break;
232 case 1:
233 init_smc2_uart_ioports(data);
234 data->brg = data->clk_rx;
235 break;
236 default:
237 printk(KERN_ERR "init_scc_ioports: invalid SCC number\n");
238 return;
239 }
240}
241 130
242int platform_device_skip(const char *model, int id)
243{
244 return 0; 131 return 0;
245} 132}
246 133machine_device_initcall(mpc86x_ads, declare_of_platform_devices);
247static void __init mpc86xads_setup_arch(void)
248{
249 cpm_reset();
250
251 mpc86xads_board_setup();
252
253 ROOT_DEV = Root_NFS;
254}
255
256static int __init mpc86xads_probe(void)
257{
258 char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
259 "model", NULL);
260 if (model == NULL)
261 return 0;
262 if (strcmp(model, "MPC866ADS"))
263 return 0;
264
265 return 1;
266}
267 134
268define_machine(mpc86x_ads) { 135define_machine(mpc86x_ads) {
269 .name = "MPC86x ADS", 136 .name = "MPC86x ADS",
270 .probe = mpc86xads_probe, 137 .probe = mpc86xads_probe,
271 .setup_arch = mpc86xads_setup_arch, 138 .setup_arch = mpc86xads_setup_arch,
272 .init_IRQ = m8xx_pic_init, 139 .init_IRQ = mpc8xx_pics_init,
273 .get_irq = mpc8xx_get_irq, 140 .get_irq = mpc8xx_get_irq,
274 .restart = mpc8xx_restart, 141 .restart = mpc8xx_restart,
275 .calibrate_decr = mpc8xx_calibrate_decr, 142 .calibrate_decr = mpc8xx_calibrate_decr,
276 .set_rtc_time = mpc8xx_set_rtc_time, 143 .set_rtc_time = mpc8xx_set_rtc_time,
277 .get_rtc_time = mpc8xx_get_rtc_time, 144 .get_rtc_time = mpc8xx_get_rtc_time,
145 .progress = udbg_progress,
278}; 146};
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index 2cf1b6a75173..6e7ded0233f6 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -36,11 +36,12 @@
36#include <asm/time.h> 36#include <asm/time.h>
37#include <asm/mpc8xx.h> 37#include <asm/mpc8xx.h>
38#include <asm/8xx_immap.h> 38#include <asm/8xx_immap.h>
39#include <asm/commproc.h> 39#include <asm/cpm1.h>
40#include <asm/fs_pd.h> 40#include <asm/fs_pd.h>
41#include <asm/udbg.h> 41#include <asm/udbg.h>
42 42
43#include <sysdev/commproc.h> 43#include "mpc885ads.h"
44#include "mpc8xx.h"
44 45
45static u32 __iomem *bcsr, *bcsr5; 46static u32 __iomem *bcsr, *bcsr5;
46 47
@@ -264,18 +265,17 @@ static struct of_device_id __initdata of_bus_ids[] = {
264static int __init declare_of_platform_devices(void) 265static int __init declare_of_platform_devices(void)
265{ 266{
266 /* Publish the QE devices */ 267 /* Publish the QE devices */
267 if (machine_is(mpc885_ads)) 268 of_platform_bus_probe(NULL, of_bus_ids, NULL);
268 of_platform_bus_probe(NULL, of_bus_ids, NULL);
269 269
270 return 0; 270 return 0;
271} 271}
272device_initcall(declare_of_platform_devices); 272machine_device_initcall(mpc885_ads, declare_of_platform_devices);
273 273
274define_machine(mpc885_ads) { 274define_machine(mpc885_ads) {
275 .name = "Freescale MPC885 ADS", 275 .name = "Freescale MPC885 ADS",
276 .probe = mpc885ads_probe, 276 .probe = mpc885ads_probe,
277 .setup_arch = mpc885ads_setup_arch, 277 .setup_arch = mpc885ads_setup_arch,
278 .init_IRQ = m8xx_pic_init, 278 .init_IRQ = mpc8xx_pics_init,
279 .get_irq = mpc8xx_get_irq, 279 .get_irq = mpc8xx_get_irq,
280 .restart = mpc8xx_restart, 280 .restart = mpc8xx_restart,
281 .calibrate_decr = mpc8xx_calibrate_decr, 281 .calibrate_decr = mpc8xx_calibrate_decr,
diff --git a/arch/powerpc/platforms/8xx/mpc8xx.h b/arch/powerpc/platforms/8xx/mpc8xx.h
new file mode 100644
index 000000000000..239a243a6161
--- /dev/null
+++ b/arch/powerpc/platforms/8xx/mpc8xx.h
@@ -0,0 +1,21 @@
1/*
2 * Prototypes, etc. for the Freescale MPC8xx embedded cpu chips
3 * May need to be cleaned as the port goes on ...
4 *
5 * Copyright (C) 2008 Jochen Friedrich <jochen@scram.de>
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#ifndef __MPC8xx_H
12#define __MPC8xx_H
13
14extern void mpc8xx_restart(char *cmd);
15extern void mpc8xx_calibrate_decr(void);
16extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
17extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
18extern void mpc8xx_pics_init(void);
19extern unsigned int mpc8xx_get_irq(void);
20
21#endif /* __MPC8xx_H */
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index ea22cad2cd0a..fdce10c4f074 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -21,7 +21,8 @@ config PPC_83xx
21 bool "Freescale 83xx" 21 bool "Freescale 83xx"
22 depends on 6xx 22 depends on 6xx
23 select FSL_SOC 23 select FSL_SOC
24 select 83xx 24 select MPC83xx
25 select IPIC
25 select WANT_DEVICE_TREE 26 select WANT_DEVICE_TREE
26 27
27config PPC_86xx 28config PPC_86xx
@@ -80,6 +81,10 @@ config XICS
80 bool 81 bool
81 default y 82 default y
82 83
84config IPIC
85 bool
86 default n
87
83config MPIC 88config MPIC
84 bool 89 bool
85 default n 90 default n
@@ -265,6 +270,7 @@ config TAU_AVERAGE
265config QUICC_ENGINE 270config QUICC_ENGINE
266 bool 271 bool
267 select PPC_LIB_RHEAP 272 select PPC_LIB_RHEAP
273 select CRC32
268 help 274 help
269 The QUICC Engine (QE) is a new generation of communications 275 The QUICC Engine (QE) is a new generation of communications
270 coprocessors on Freescale embedded CPUs (akin to CPM in older chips). 276 coprocessors on Freescale embedded CPUs (akin to CPM in older chips).
@@ -272,8 +278,8 @@ config QUICC_ENGINE
272 for a machine with a QE coprocessor. 278 for a machine with a QE coprocessor.
273 279
274config CPM2 280config CPM2
275 bool 281 bool "Enable support for the CPM2 (Communications Processor Module)"
276 default n 282 depends on MPC85xx || 8260
277 select CPM 283 select CPM
278 select PPC_LIB_RHEAP 284 select PPC_LIB_RHEAP
279 help 285 help
@@ -315,6 +321,12 @@ config FSL_ULI1575
315config CPM 321config CPM
316 bool 322 bool
317 323
324config OF_RTC
325 bool
326 help
327 Uses information from the OF or flattened device tree to instatiate
328 platform devices for direct mapped RTC chips like the DS1742 or DS1743.
329
318source "arch/powerpc/sysdev/bestcomm/Kconfig" 330source "arch/powerpc/sysdev/bestcomm/Kconfig"
319 331
320endmenu 332endmenu
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 99684ea606af..7fc41104d53e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -29,8 +29,8 @@ config PPC_85xx
29 bool "Freescale 85xx" 29 bool "Freescale 85xx"
30 select E500 30 select E500
31 select FSL_SOC 31 select FSL_SOC
32 select 85xx
33 select WANT_DEVICE_TREE 32 select WANT_DEVICE_TREE
33 select MPC85xx
34 34
35config PPC_8xx 35config PPC_8xx
36 bool "Freescale 8xx" 36 bool "Freescale 8xx"
@@ -43,6 +43,7 @@ config 40x
43 bool "AMCC 40x" 43 bool "AMCC 40x"
44 select PPC_DCR_NATIVE 44 select PPC_DCR_NATIVE
45 select WANT_DEVICE_TREE 45 select WANT_DEVICE_TREE
46 select PPC_UDBG_16550
46 47
47config 44x 48config 44x
48 bool "AMCC 44x" 49 bool "AMCC 44x"
@@ -92,14 +93,6 @@ config 6xx
92config 8xx 93config 8xx
93 bool 94 bool
94 95
95# this is temp to handle compat with arch=ppc
96config 83xx
97 bool
98
99# this is temp to handle compat with arch=ppc
100config 85xx
101 bool
102
103config E500 96config E500
104 bool 97 bool
105 98
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index 39d695cb9693..c89964c6fb1f 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -20,7 +20,7 @@ spu-manage-$(CONFIG_PPC_CELL_NATIVE) += spu_manage.o
20 20
21obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \ 21obj-$(CONFIG_SPU_BASE) += spu_callbacks.o spu_base.o \
22 spu_notify.o \ 22 spu_notify.o \
23 spu_syscalls.o \ 23 spu_syscalls.o spu_fault.o \
24 $(spu-priv1-y) \ 24 $(spu-priv1-y) \
25 $(spu-manage-y) \ 25 $(spu-manage-y) \
26 spufs/ 26 spufs/
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index 13d5a87f13b1..ec7c8f45a215 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -21,8 +21,9 @@
21 */ 21 */
22 22
23#include <linux/cpufreq.h> 23#include <linux/cpufreq.h>
24#include <linux/of_platform.h>
25
24#include <asm/machdep.h> 26#include <asm/machdep.h>
25#include <asm/of_platform.h>
26#include <asm/prom.h> 27#include <asm/prom.h>
27#include <asm/cell-regs.h> 28#include <asm/cell-regs.h>
28#include "cbe_cpufreq.h" 29#include "cbe_cpufreq.h"
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
index 6a2c1b0a9a94..69288f653144 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
@@ -23,7 +23,8 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/types.h> 24#include <linux/types.h>
25#include <linux/timer.h> 25#include <linux/timer.h>
26#include <asm/of_platform.h> 26#include <linux/of_platform.h>
27
27#include <asm/processor.h> 28#include <asm/processor.h>
28#include <asm/prom.h> 29#include <asm/prom.h>
29#include <asm/pmi.h> 30#include <asm/pmi.h>
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c
index 16a9b07e7b0c..dbc338f187a2 100644
--- a/arch/powerpc/platforms/cell/cbe_regs.c
+++ b/arch/powerpc/platforms/cell/cbe_regs.c
@@ -9,13 +9,13 @@
9#include <linux/percpu.h> 9#include <linux/percpu.h>
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/of_device.h>
13#include <linux/of_platform.h>
12 14
13#include <asm/io.h> 15#include <asm/io.h>
14#include <asm/pgtable.h> 16#include <asm/pgtable.h>
15#include <asm/prom.h> 17#include <asm/prom.h>
16#include <asm/ptrace.h> 18#include <asm/ptrace.h>
17#include <asm/of_device.h>
18#include <asm/of_platform.h>
19#include <asm/cell-regs.h> 19#include <asm/cell-regs.h>
20 20
21/* 21/*
@@ -256,6 +256,7 @@ void __init cbe_regs_init(void)
256 printk(KERN_ERR "cbe_regs: More BE chips than supported" 256 printk(KERN_ERR "cbe_regs: More BE chips than supported"
257 "!\n"); 257 "!\n");
258 cbe_regs_map_count--; 258 cbe_regs_map_count--;
259 of_node_put(cpu);
259 return; 260 return;
260 } 261 }
261 map->cpu_node = cpu; 262 map->cpu_node = cpu;
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c
index 9d7c2ef940a8..979d4b67efb4 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -238,7 +238,7 @@ static void __init spider_pci_setup_chip(struct spider_pci_bus *bus)
238static void __init spider_pci_add_one(struct pci_controller *phb) 238static void __init spider_pci_add_one(struct pci_controller *phb)
239{ 239{
240 struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count]; 240 struct spider_pci_bus *bus = &spider_pci_busses[spider_pci_count];
241 struct device_node *np = phb->arch_data; 241 struct device_node *np = phb->dn;
242 struct resource rsrc; 242 struct resource rsrc;
243 void __iomem *regs; 243 void __iomem *regs;
244 244
@@ -309,15 +309,12 @@ static int __init spider_pci_workaround_init(void)
309{ 309{
310 struct pci_controller *phb; 310 struct pci_controller *phb;
311 311
312 if (!machine_is(cell))
313 return 0;
314
315 /* Find spider bridges. We assume they have been all probed 312 /* Find spider bridges. We assume they have been all probed
316 * in setup_arch(). If that was to change, we would need to 313 * in setup_arch(). If that was to change, we would need to
317 * update this code to cope with dynamically added busses 314 * update this code to cope with dynamically added busses
318 */ 315 */
319 list_for_each_entry(phb, &hose_list, list_node) { 316 list_for_each_entry(phb, &hose_list, list_node) {
320 struct device_node *np = phb->arch_data; 317 struct device_node *np = phb->dn;
321 const char *model = of_get_property(np, "model", NULL); 318 const char *model = of_get_property(np, "model", NULL);
322 319
323 /* If no model property or name isn't exactly "pci", skip */ 320 /* If no model property or name isn't exactly "pci", skip */
@@ -343,4 +340,4 @@ static int __init spider_pci_workaround_init(void)
343 340
344 return 0; 341 return 0;
345} 342}
346arch_initcall(spider_pci_workaround_init); 343machine_arch_initcall(cell, spider_pci_workaround_init);
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index faabc3fdc130..df330666ccc9 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * IOMMU implementation for Cell Broadband Processor Architecture 2 * IOMMU implementation for Cell Broadband Processor Architecture
3 * 3 *
4 * (C) Copyright IBM Corporation 2006 4 * (C) Copyright IBM Corporation 2006-2008
5 * 5 *
6 * Author: Jeremy Kerr <jk@ozlabs.org> 6 * Author: Jeremy Kerr <jk@ozlabs.org>
7 * 7 *
@@ -26,14 +26,15 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/notifier.h> 28#include <linux/notifier.h>
29#include <linux/of_platform.h>
29 30
30#include <asm/prom.h> 31#include <asm/prom.h>
31#include <asm/iommu.h> 32#include <asm/iommu.h>
32#include <asm/machdep.h> 33#include <asm/machdep.h>
33#include <asm/pci-bridge.h> 34#include <asm/pci-bridge.h>
34#include <asm/udbg.h> 35#include <asm/udbg.h>
35#include <asm/of_platform.h>
36#include <asm/lmb.h> 36#include <asm/lmb.h>
37#include <asm/firmware.h>
37#include <asm/cell-regs.h> 38#include <asm/cell-regs.h>
38 39
39#include "interrupt.h" 40#include "interrupt.h"
@@ -305,29 +306,28 @@ static int cell_iommu_find_ioc(int nid, unsigned long *base)
305 return -ENODEV; 306 return -ENODEV;
306} 307}
307 308
308static void cell_iommu_setup_hardware(struct cbe_iommu *iommu, unsigned long size) 309static void cell_iommu_setup_page_tables(struct cbe_iommu *iommu,
310 unsigned long dbase, unsigned long dsize,
311 unsigned long fbase, unsigned long fsize)
309{ 312{
310 struct page *page; 313 struct page *page;
311 int ret, i; 314 int i;
312 unsigned long reg, segments, pages_per_segment, ptab_size, n_pte_pages; 315 unsigned long reg, segments, pages_per_segment, ptab_size, stab_size,
313 unsigned long xlate_base; 316 n_pte_pages, base;
314 unsigned int virq;
315
316 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
317 panic("%s: missing IOC register mappings for node %d\n",
318 __FUNCTION__, iommu->nid);
319 317
320 iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size); 318 base = dbase;
321 iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset; 319 if (fsize != 0)
320 base = min(fbase, dbase);
322 321
323 segments = size >> IO_SEGMENT_SHIFT; 322 segments = max(dbase + dsize, fbase + fsize) >> IO_SEGMENT_SHIFT;
324 pages_per_segment = 1ull << IO_PAGENO_BITS; 323 pages_per_segment = 1ull << IO_PAGENO_BITS;
325 324
326 pr_debug("%s: iommu[%d]: segments: %lu, pages per segment: %lu\n", 325 pr_debug("%s: iommu[%d]: segments: %lu, pages per segment: %lu\n",
327 __FUNCTION__, iommu->nid, segments, pages_per_segment); 326 __FUNCTION__, iommu->nid, segments, pages_per_segment);
328 327
329 /* set up the segment table */ 328 /* set up the segment table */
330 page = alloc_pages_node(iommu->nid, GFP_KERNEL, 0); 329 stab_size = segments * sizeof(unsigned long);
330 page = alloc_pages_node(iommu->nid, GFP_KERNEL, get_order(stab_size));
331 BUG_ON(!page); 331 BUG_ON(!page);
332 iommu->stab = page_address(page); 332 iommu->stab = page_address(page);
333 clear_page(iommu->stab); 333 clear_page(iommu->stab);
@@ -371,11 +371,25 @@ static void cell_iommu_setup_hardware(struct cbe_iommu *iommu, unsigned long siz
371 } 371 }
372 372
373 pr_debug("Setting up IOMMU stab:\n"); 373 pr_debug("Setting up IOMMU stab:\n");
374 for (i = 0; i * (1ul << IO_SEGMENT_SHIFT) < size; i++) { 374 for (i = base >> IO_SEGMENT_SHIFT; i < segments; i++) {
375 iommu->stab[i] = reg | 375 iommu->stab[i] = reg |
376 (__pa(iommu->ptab) + n_pte_pages * IOMMU_PAGE_SIZE * i); 376 (__pa(iommu->ptab) + n_pte_pages * IOMMU_PAGE_SIZE * i);
377 pr_debug("\t[%d] 0x%016lx\n", i, iommu->stab[i]); 377 pr_debug("\t[%d] 0x%016lx\n", i, iommu->stab[i]);
378 } 378 }
379}
380
381static void cell_iommu_enable_hardware(struct cbe_iommu *iommu)
382{
383 int ret;
384 unsigned long reg, xlate_base;
385 unsigned int virq;
386
387 if (cell_iommu_find_ioc(iommu->nid, &xlate_base))
388 panic("%s: missing IOC register mappings for node %d\n",
389 __FUNCTION__, iommu->nid);
390
391 iommu->xlate_regs = ioremap(xlate_base, IOC_Reg_Size);
392 iommu->cmd_regs = iommu->xlate_regs + IOC_IOCmd_Offset;
379 393
380 /* ensure that the STEs have updated */ 394 /* ensure that the STEs have updated */
381 mb(); 395 mb();
@@ -405,6 +419,13 @@ static void cell_iommu_setup_hardware(struct cbe_iommu *iommu, unsigned long siz
405 out_be64(iommu->cmd_regs + IOC_IOCmd_Cfg, reg); 419 out_be64(iommu->cmd_regs + IOC_IOCmd_Cfg, reg);
406} 420}
407 421
422static void cell_iommu_setup_hardware(struct cbe_iommu *iommu,
423 unsigned long base, unsigned long size)
424{
425 cell_iommu_setup_page_tables(iommu, base, size, 0, 0);
426 cell_iommu_enable_hardware(iommu);
427}
428
408#if 0/* Unused for now */ 429#if 0/* Unused for now */
409static struct iommu_window *find_window(struct cbe_iommu *iommu, 430static struct iommu_window *find_window(struct cbe_iommu *iommu,
410 unsigned long offset, unsigned long size) 431 unsigned long offset, unsigned long size)
@@ -422,25 +443,36 @@ static struct iommu_window *find_window(struct cbe_iommu *iommu,
422} 443}
423#endif 444#endif
424 445
446static inline u32 cell_iommu_get_ioid(struct device_node *np)
447{
448 const u32 *ioid;
449
450 ioid = of_get_property(np, "ioid", NULL);
451 if (ioid == NULL) {
452 printk(KERN_WARNING "iommu: missing ioid for %s using 0\n",
453 np->full_name);
454 return 0;
455 }
456
457 return *ioid;
458}
459
425static struct iommu_window * __init 460static struct iommu_window * __init
426cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np, 461cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
427 unsigned long offset, unsigned long size, 462 unsigned long offset, unsigned long size,
428 unsigned long pte_offset) 463 unsigned long pte_offset)
429{ 464{
430 struct iommu_window *window; 465 struct iommu_window *window;
431 const unsigned int *ioid; 466 u32 ioid;
432 467
433 ioid = of_get_property(np, "ioid", NULL); 468 ioid = cell_iommu_get_ioid(np);
434 if (ioid == NULL)
435 printk(KERN_WARNING "iommu: missing ioid for %s using 0\n",
436 np->full_name);
437 469
438 window = kmalloc_node(sizeof(*window), GFP_KERNEL, iommu->nid); 470 window = kmalloc_node(sizeof(*window), GFP_KERNEL, iommu->nid);
439 BUG_ON(window == NULL); 471 BUG_ON(window == NULL);
440 472
441 window->offset = offset; 473 window->offset = offset;
442 window->size = size; 474 window->size = size;
443 window->ioid = ioid ? *ioid : 0; 475 window->ioid = ioid;
444 window->iommu = iommu; 476 window->iommu = iommu;
445 window->pte_offset = pte_offset; 477 window->pte_offset = pte_offset;
446 478
@@ -489,16 +521,17 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)
489 return NULL; 521 return NULL;
490} 522}
491 523
492static void cell_dma_dev_setup(struct device *dev) 524static unsigned long cell_dma_direct_offset;
525
526static unsigned long dma_iommu_fixed_base;
527struct dma_mapping_ops dma_iommu_fixed_ops;
528
529static void cell_dma_dev_setup_iommu(struct device *dev)
493{ 530{
494 struct iommu_window *window; 531 struct iommu_window *window;
495 struct cbe_iommu *iommu; 532 struct cbe_iommu *iommu;
496 struct dev_archdata *archdata = &dev->archdata; 533 struct dev_archdata *archdata = &dev->archdata;
497 534
498 /* If we run without iommu, no need to do anything */
499 if (get_pci_dma_ops() == &dma_direct_ops)
500 return;
501
502 /* Current implementation uses the first window available in that 535 /* Current implementation uses the first window available in that
503 * node's iommu. We -might- do something smarter later though it may 536 * node's iommu. We -might- do something smarter later though it may
504 * never be necessary 537 * never be necessary
@@ -515,6 +548,23 @@ static void cell_dma_dev_setup(struct device *dev)
515 archdata->dma_data = &window->table; 548 archdata->dma_data = &window->table;
516} 549}
517 550
551static void cell_dma_dev_setup_static(struct device *dev);
552
553static void cell_dma_dev_setup(struct device *dev)
554{
555 struct dev_archdata *archdata = &dev->archdata;
556
557 /* Order is important here, these are not mutually exclusive */
558 if (get_dma_ops(dev) == &dma_iommu_fixed_ops)
559 cell_dma_dev_setup_static(dev);
560 else if (get_pci_dma_ops() == &dma_iommu_ops)
561 cell_dma_dev_setup_iommu(dev);
562 else if (get_pci_dma_ops() == &dma_direct_ops)
563 archdata->dma_data = (void *)cell_dma_direct_offset;
564 else
565 BUG();
566}
567
518static void cell_pci_dma_dev_setup(struct pci_dev *dev) 568static void cell_pci_dma_dev_setup(struct pci_dev *dev)
519{ 569{
520 cell_dma_dev_setup(&dev->dev); 570 cell_dma_dev_setup(&dev->dev);
@@ -560,10 +610,9 @@ static int __init cell_iommu_get_window(struct device_node *np,
560 return 0; 610 return 0;
561} 611}
562 612
563static void __init cell_iommu_init_one(struct device_node *np, unsigned long offset) 613static struct cbe_iommu * __init cell_iommu_alloc(struct device_node *np)
564{ 614{
565 struct cbe_iommu *iommu; 615 struct cbe_iommu *iommu;
566 unsigned long base, size;
567 int nid, i; 616 int nid, i;
568 617
569 /* Get node ID */ 618 /* Get node ID */
@@ -571,7 +620,7 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
571 if (nid < 0) { 620 if (nid < 0) {
572 printk(KERN_ERR "iommu: failed to get node for %s\n", 621 printk(KERN_ERR "iommu: failed to get node for %s\n",
573 np->full_name); 622 np->full_name);
574 return; 623 return NULL;
575 } 624 }
576 pr_debug("iommu: setting up iommu for node %d (%s)\n", 625 pr_debug("iommu: setting up iommu for node %d (%s)\n",
577 nid, np->full_name); 626 nid, np->full_name);
@@ -587,7 +636,7 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
587 if (cbe_nr_iommus >= NR_IOMMUS) { 636 if (cbe_nr_iommus >= NR_IOMMUS) {
588 printk(KERN_ERR "iommu: too many IOMMUs detected ! (%s)\n", 637 printk(KERN_ERR "iommu: too many IOMMUs detected ! (%s)\n",
589 np->full_name); 638 np->full_name);
590 return; 639 return NULL;
591 } 640 }
592 641
593 /* Init base fields */ 642 /* Init base fields */
@@ -598,6 +647,19 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
598 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i); 647 snprintf(iommu->name, sizeof(iommu->name), "iommu%d", i);
599 INIT_LIST_HEAD(&iommu->windows); 648 INIT_LIST_HEAD(&iommu->windows);
600 649
650 return iommu;
651}
652
653static void __init cell_iommu_init_one(struct device_node *np,
654 unsigned long offset)
655{
656 struct cbe_iommu *iommu;
657 unsigned long base, size;
658
659 iommu = cell_iommu_alloc(np);
660 if (!iommu)
661 return;
662
601 /* Obtain a window for it */ 663 /* Obtain a window for it */
602 cell_iommu_get_window(np, &base, &size); 664 cell_iommu_get_window(np, &base, &size);
603 665
@@ -605,7 +667,7 @@ static void __init cell_iommu_init_one(struct device_node *np, unsigned long off
605 base, base + size - 1); 667 base, base + size - 1);
606 668
607 /* Initialize the hardware */ 669 /* Initialize the hardware */
608 cell_iommu_setup_hardware(iommu, size); 670 cell_iommu_setup_hardware(iommu, base, size);
609 671
610 /* Setup the iommu_table */ 672 /* Setup the iommu_table */
611 cell_iommu_setup_window(iommu, np, base, size, 673 cell_iommu_setup_window(iommu, np, base, size,
@@ -653,7 +715,7 @@ static int __init cell_iommu_init_disabled(void)
653 715
654 /* If we have no Axon, we set up the spider DMA magic offset */ 716 /* If we have no Axon, we set up the spider DMA magic offset */
655 if (of_find_node_by_name(NULL, "axon") == NULL) 717 if (of_find_node_by_name(NULL, "axon") == NULL)
656 dma_direct_offset = SPIDER_DMA_OFFSET; 718 cell_dma_direct_offset = SPIDER_DMA_OFFSET;
657 719
658 /* Now we need to check to see where the memory is mapped 720 /* Now we need to check to see where the memory is mapped
659 * in PCI space. We assume that all busses use the same dma 721 * in PCI space. We assume that all busses use the same dma
@@ -687,20 +749,274 @@ static int __init cell_iommu_init_disabled(void)
687 return -ENODEV; 749 return -ENODEV;
688 } 750 }
689 751
690 dma_direct_offset += base; 752 cell_dma_direct_offset += base;
753
754 if (cell_dma_direct_offset != 0)
755 ppc_md.pci_dma_dev_setup = cell_pci_dma_dev_setup;
691 756
692 printk("iommu: disabled, direct DMA offset is 0x%lx\n", 757 printk("iommu: disabled, direct DMA offset is 0x%lx\n",
693 dma_direct_offset); 758 cell_dma_direct_offset);
694 759
695 return 0; 760 return 0;
696} 761}
697 762
698static int __init cell_iommu_init(void) 763/*
764 * Fixed IOMMU mapping support
765 *
766 * This code adds support for setting up a fixed IOMMU mapping on certain
767 * cell machines. For 64-bit devices this avoids the performance overhead of
768 * mapping and unmapping pages at runtime. 32-bit devices are unable to use
769 * the fixed mapping.
770 *
771 * The fixed mapping is established at boot, and maps all of physical memory
772 * 1:1 into device space at some offset. On machines with < 30 GB of memory
773 * we setup the fixed mapping immediately above the normal IOMMU window.
774 *
775 * For example a machine with 4GB of memory would end up with the normal
776 * IOMMU window from 0-2GB and the fixed mapping window from 2GB to 6GB. In
777 * this case a 64-bit device wishing to DMA to 1GB would be told to DMA to
778 * 3GB, plus any offset required by firmware. The firmware offset is encoded
779 * in the "dma-ranges" property.
780 *
781 * On machines with 30GB or more of memory, we are unable to place the fixed
782 * mapping above the normal IOMMU window as we would run out of address space.
783 * Instead we move the normal IOMMU window to coincide with the hash page
784 * table, this region does not need to be part of the fixed mapping as no
785 * device should ever be DMA'ing to it. We then setup the fixed mapping
786 * from 0 to 32GB.
787 */
788
789static u64 cell_iommu_get_fixed_address(struct device *dev)
699{ 790{
791 u64 cpu_addr, size, best_size, pci_addr = OF_BAD_ADDR;
792 struct device_node *tmp, *np;
793 const u32 *ranges = NULL;
794 int i, len, best;
795
796 np = dev->archdata.of_node;
797 of_node_get(np);
798 ranges = of_get_property(np, "dma-ranges", &len);
799 while (!ranges && np) {
800 tmp = of_get_parent(np);
801 of_node_put(np);
802 np = tmp;
803 ranges = of_get_property(np, "dma-ranges", &len);
804 }
805
806 if (!ranges) {
807 dev_dbg(dev, "iommu: no dma-ranges found\n");
808 goto out;
809 }
810
811 len /= sizeof(u32);
812
813 /* dma-ranges format:
814 * 1 cell: pci space
815 * 2 cells: pci address
816 * 2 cells: parent address
817 * 2 cells: size
818 */
819 for (i = 0, best = -1, best_size = 0; i < len; i += 7) {
820 cpu_addr = of_translate_dma_address(np, ranges +i + 3);
821 size = of_read_number(ranges + i + 5, 2);
822
823 if (cpu_addr == 0 && size > best_size) {
824 best = i;
825 best_size = size;
826 }
827 }
828
829 if (best >= 0)
830 pci_addr = of_read_number(ranges + best + 1, 2);
831 else
832 dev_dbg(dev, "iommu: no suitable range found!\n");
833
834out:
835 of_node_put(np);
836
837 return pci_addr;
838}
839
840static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask)
841{
842 if (!dev->dma_mask || !dma_supported(dev, dma_mask))
843 return -EIO;
844
845 if (dma_mask == DMA_BIT_MASK(64)) {
846 if (cell_iommu_get_fixed_address(dev) == OF_BAD_ADDR)
847 dev_dbg(dev, "iommu: 64-bit OK, but bad addr\n");
848 else {
849 dev_dbg(dev, "iommu: 64-bit OK, using fixed ops\n");
850 set_dma_ops(dev, &dma_iommu_fixed_ops);
851 cell_dma_dev_setup(dev);
852 }
853 } else {
854 dev_dbg(dev, "iommu: not 64-bit, using default ops\n");
855 set_dma_ops(dev, get_pci_dma_ops());
856 }
857
858 *dev->dma_mask = dma_mask;
859
860 return 0;
861}
862
863static void cell_dma_dev_setup_static(struct device *dev)
864{
865 struct dev_archdata *archdata = &dev->archdata;
866 u64 addr;
867
868 addr = cell_iommu_get_fixed_address(dev) + dma_iommu_fixed_base;
869 archdata->dma_data = (void *)addr;
870
871 dev_dbg(dev, "iommu: fixed addr = %lx\n", addr);
872}
873
874static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
875 struct device_node *np, unsigned long dbase, unsigned long dsize,
876 unsigned long fbase, unsigned long fsize)
877{
878 unsigned long base_pte, uaddr, *io_pte;
879 int i;
880
881 dma_iommu_fixed_base = fbase;
882
883 /* convert from bytes into page table indices */
884 dbase = dbase >> IOMMU_PAGE_SHIFT;
885 dsize = dsize >> IOMMU_PAGE_SHIFT;
886 fbase = fbase >> IOMMU_PAGE_SHIFT;
887 fsize = fsize >> IOMMU_PAGE_SHIFT;
888
889 pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase);
890
891 io_pte = iommu->ptab;
892 base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW
893 | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask);
894
895 uaddr = 0;
896 for (i = fbase; i < fbase + fsize; i++, uaddr += IOMMU_PAGE_SIZE) {
897 /* Don't touch the dynamic region */
898 if (i >= dbase && i < (dbase + dsize)) {
899 pr_debug("iommu: static/dynamic overlap, skipping\n");
900 continue;
901 }
902 io_pte[i] = base_pte | (__pa(uaddr) & IOPTE_RPN_Mask);
903 }
904
905 mb();
906}
907
908static int __init cell_iommu_fixed_mapping_init(void)
909{
910 unsigned long dbase, dsize, fbase, fsize, hbase, hend;
911 struct cbe_iommu *iommu;
700 struct device_node *np; 912 struct device_node *np;
701 913
702 if (!machine_is(cell)) 914 /* The fixed mapping is only supported on axon machines */
703 return -ENODEV; 915 np = of_find_node_by_name(NULL, "axon");
916 if (!np) {
917 pr_debug("iommu: fixed mapping disabled, no axons found\n");
918 return -1;
919 }
920
921 /* The default setup is to have the fixed mapping sit after the
922 * dynamic region, so find the top of the largest IOMMU window
923 * on any axon, then add the size of RAM and that's our max value.
924 * If that is > 32GB we have to do other shennanigans.
925 */
926 fbase = 0;
927 for_each_node_by_name(np, "axon") {
928 cell_iommu_get_window(np, &dbase, &dsize);
929 fbase = max(fbase, dbase + dsize);
930 }
931
932 fbase = _ALIGN_UP(fbase, 1 << IO_SEGMENT_SHIFT);
933 fsize = lmb_phys_mem_size();
934
935 if ((fbase + fsize) <= 0x800000000)
936 hbase = 0; /* use the device tree window */
937 else {
938 /* If we're over 32 GB we need to cheat. We can't map all of
939 * RAM with the fixed mapping, and also fit the dynamic
940 * region. So try to place the dynamic region where the hash
941 * table sits, drivers never need to DMA to it, we don't
942 * need a fixed mapping for that area.
943 */
944 if (!htab_address) {
945 pr_debug("iommu: htab is NULL, on LPAR? Huh?\n");
946 return -1;
947 }
948 hbase = __pa(htab_address);
949 hend = hbase + htab_size_bytes;
950
951 /* The window must start and end on a segment boundary */
952 if ((hbase != _ALIGN_UP(hbase, 1 << IO_SEGMENT_SHIFT)) ||
953 (hend != _ALIGN_UP(hend, 1 << IO_SEGMENT_SHIFT))) {
954 pr_debug("iommu: hash window not segment aligned\n");
955 return -1;
956 }
957
958 /* Check the hash window fits inside the real DMA window */
959 for_each_node_by_name(np, "axon") {
960 cell_iommu_get_window(np, &dbase, &dsize);
961
962 if (hbase < dbase || (hend > (dbase + dsize))) {
963 pr_debug("iommu: hash window doesn't fit in"
964 "real DMA window\n");
965 return -1;
966 }
967 }
968
969 fbase = 0;
970 }
971
972 /* Setup the dynamic regions */
973 for_each_node_by_name(np, "axon") {
974 iommu = cell_iommu_alloc(np);
975 BUG_ON(!iommu);
976
977 if (hbase == 0)
978 cell_iommu_get_window(np, &dbase, &dsize);
979 else {
980 dbase = hbase;
981 dsize = htab_size_bytes;
982 }
983
984 pr_debug("iommu: setting up %d, dynamic window %lx-%lx " \
985 "fixed window %lx-%lx\n", iommu->nid, dbase,
986 dbase + dsize, fbase, fbase + fsize);
987
988 cell_iommu_setup_page_tables(iommu, dbase, dsize, fbase, fsize);
989 cell_iommu_setup_fixed_ptab(iommu, np, dbase, dsize,
990 fbase, fsize);
991 cell_iommu_enable_hardware(iommu);
992 cell_iommu_setup_window(iommu, np, dbase, dsize, 0);
993 }
994
995 dma_iommu_fixed_ops = dma_direct_ops;
996 dma_iommu_fixed_ops.set_dma_mask = dma_set_mask_and_switch;
997
998 dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch;
999 set_pci_dma_ops(&dma_iommu_ops);
1000
1001 printk(KERN_DEBUG "IOMMU fixed mapping established.\n");
1002
1003 return 0;
1004}
1005
1006static int iommu_fixed_disabled;
1007
1008static int __init setup_iommu_fixed(char *str)
1009{
1010 if (strcmp(str, "off") == 0)
1011 iommu_fixed_disabled = 1;
1012
1013 return 1;
1014}
1015__setup("iommu_fixed=", setup_iommu_fixed);
1016
1017static int __init cell_iommu_init(void)
1018{
1019 struct device_node *np;
704 1020
705 /* If IOMMU is disabled or we have little enough RAM to not need 1021 /* If IOMMU is disabled or we have little enough RAM to not need
706 * to enable it, we setup a direct mapping. 1022 * to enable it, we setup a direct mapping.
@@ -717,6 +1033,9 @@ static int __init cell_iommu_init(void)
717 ppc_md.tce_build = tce_build_cell; 1033 ppc_md.tce_build = tce_build_cell;
718 ppc_md.tce_free = tce_free_cell; 1034 ppc_md.tce_free = tce_free_cell;
719 1035
1036 if (!iommu_fixed_disabled && cell_iommu_fixed_mapping_init() == 0)
1037 goto bail;
1038
720 /* Create an iommu for each /axon node. */ 1039 /* Create an iommu for each /axon node. */
721 for_each_node_by_name(np, "axon") { 1040 for_each_node_by_name(np, "axon") {
722 if (np->parent == NULL || np->parent->parent != NULL) 1041 if (np->parent == NULL || np->parent->parent != NULL)
@@ -744,5 +1063,6 @@ static int __init cell_iommu_init(void)
744 1063
745 return 0; 1064 return 0;
746} 1065}
747arch_initcall(cell_iommu_init); 1066machine_arch_initcall(cell, cell_iommu_init);
1067machine_arch_initcall(celleb_native, cell_iommu_init);
748 1068
diff --git a/arch/powerpc/platforms/cell/pmu.c b/arch/powerpc/platforms/cell/pmu.c
index 1ed303678887..69ed0d7f1646 100644
--- a/arch/powerpc/platforms/cell/pmu.c
+++ b/arch/powerpc/platforms/cell/pmu.c
@@ -213,7 +213,7 @@ u32 cbe_read_pm(u32 cpu, enum pm_reg_name reg)
213 break; 213 break;
214 214
215 case pm_interval: 215 case pm_interval:
216 READ_SHADOW_REG(val, pm_interval); 216 READ_MMIO_UPPER32(val, pm_interval);
217 break; 217 break;
218 218
219 case pm_start_stop: 219 case pm_start_stop:
@@ -381,9 +381,6 @@ static int __init cbe_init_pm_irq(void)
381 unsigned int irq; 381 unsigned int irq;
382 int rc, node; 382 int rc, node;
383 383
384 if (!machine_is(cell))
385 return 0;
386
387 for_each_node(node) { 384 for_each_node(node) {
388 irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI | 385 irq = irq_create_mapping(NULL, IIC_IRQ_IOEX_PMI |
389 (node << IIC_IRQ_NODE_SHIFT)); 386 (node << IIC_IRQ_NODE_SHIFT));
@@ -404,7 +401,7 @@ static int __init cbe_init_pm_irq(void)
404 401
405 return 0; 402 return 0;
406} 403}
407arch_initcall(cbe_init_pm_irq); 404machine_arch_initcall(cell, cbe_init_pm_irq);
408 405
409void cbe_sync_irq(int node) 406void cbe_sync_irq(int node)
410{ 407{
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 98e7ef8e6fc6..e6534b519c9a 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -30,6 +30,7 @@
30#include <linux/console.h> 30#include <linux/console.h>
31#include <linux/mutex.h> 31#include <linux/mutex.h>
32#include <linux/memory_hotplug.h> 32#include <linux/memory_hotplug.h>
33#include <linux/of_platform.h>
33 34
34#include <asm/mmu.h> 35#include <asm/mmu.h>
35#include <asm/processor.h> 36#include <asm/processor.h>
@@ -51,7 +52,6 @@
51#include <asm/spu_priv1.h> 52#include <asm/spu_priv1.h>
52#include <asm/udbg.h> 53#include <asm/udbg.h>
53#include <asm/mpic.h> 54#include <asm/mpic.h>
54#include <asm/of_platform.h>
55#include <asm/cell-regs.h> 55#include <asm/cell-regs.h>
56 56
57#include "interrupt.h" 57#include "interrupt.h"
@@ -85,9 +85,6 @@ static int __init cell_publish_devices(void)
85{ 85{
86 int node; 86 int node;
87 87
88 if (!machine_is(cell))
89 return 0;
90
91 /* Publish OF platform devices for southbridge IOs */ 88 /* Publish OF platform devices for southbridge IOs */
92 of_platform_bus_probe(NULL, NULL, NULL); 89 of_platform_bus_probe(NULL, NULL, NULL);
93 90
@@ -101,7 +98,7 @@ static int __init cell_publish_devices(void)
101 } 98 }
102 return 0; 99 return 0;
103} 100}
104device_initcall(cell_publish_devices); 101machine_device_initcall(cell, cell_publish_devices);
105 102
106static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc) 103static void cell_mpic_cascade(unsigned int irq, struct irq_desc *desc)
107{ 104{
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index e4438456c867..efb3964457b1 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -42,6 +42,7 @@
42#include <asm/firmware.h> 42#include <asm/firmware.h>
43#include <asm/system.h> 43#include <asm/system.h>
44#include <asm/rtas.h> 44#include <asm/rtas.h>
45#include <asm/cputhreads.h>
45 46
46#include "interrupt.h" 47#include "interrupt.h"
47#include <asm/udbg.h> 48#include <asm/udbg.h>
@@ -182,7 +183,7 @@ static int smp_cell_cpu_bootable(unsigned int nr)
182 */ 183 */
183 if (system_state < SYSTEM_RUNNING && 184 if (system_state < SYSTEM_RUNNING &&
184 cpu_has_feature(CPU_FTR_SMT) && 185 cpu_has_feature(CPU_FTR_SMT) &&
185 !smt_enabled_at_boot && nr % 2 != 0) 186 !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
186 return 0; 187 return 0;
187 188
188 return 1; 189 return 1;
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index a08862203643..e45cfa84911f 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -34,6 +34,7 @@
34#include <linux/linux_logo.h> 34#include <linux/linux_logo.h>
35#include <asm/spu.h> 35#include <asm/spu.h>
36#include <asm/spu_priv1.h> 36#include <asm/spu_priv1.h>
37#include <asm/spu_csa.h>
37#include <asm/xmon.h> 38#include <asm/xmon.h>
38#include <asm/prom.h> 39#include <asm/prom.h>
39 40
@@ -47,6 +48,13 @@ struct cbe_spu_info cbe_spu_info[MAX_NUMNODES];
47EXPORT_SYMBOL_GPL(cbe_spu_info); 48EXPORT_SYMBOL_GPL(cbe_spu_info);
48 49
49/* 50/*
51 * The spufs fault-handling code needs to call force_sig_info to raise signals
52 * on DMA errors. Export it here to avoid general kernel-wide access to this
53 * function
54 */
55EXPORT_SYMBOL_GPL(force_sig_info);
56
57/*
50 * Protects cbe_spu_info and spu->number. 58 * Protects cbe_spu_info and spu->number.
51 */ 59 */
52static DEFINE_SPINLOCK(spu_lock); 60static DEFINE_SPINLOCK(spu_lock);
@@ -66,6 +74,10 @@ static LIST_HEAD(spu_full_list);
66static DEFINE_SPINLOCK(spu_full_list_lock); 74static DEFINE_SPINLOCK(spu_full_list_lock);
67static DEFINE_MUTEX(spu_full_list_mutex); 75static DEFINE_MUTEX(spu_full_list_mutex);
68 76
77struct spu_slb {
78 u64 esid, vsid;
79};
80
69void spu_invalidate_slbs(struct spu *spu) 81void spu_invalidate_slbs(struct spu *spu)
70{ 82{
71 struct spu_priv2 __iomem *priv2 = spu->priv2; 83 struct spu_priv2 __iomem *priv2 = spu->priv2;
@@ -114,40 +126,36 @@ void spu_associate_mm(struct spu *spu, struct mm_struct *mm)
114} 126}
115EXPORT_SYMBOL_GPL(spu_associate_mm); 127EXPORT_SYMBOL_GPL(spu_associate_mm);
116 128
117static int __spu_trap_invalid_dma(struct spu *spu) 129int spu_64k_pages_available(void)
118{ 130{
119 pr_debug("%s\n", __FUNCTION__); 131 return mmu_psize_defs[MMU_PAGE_64K].shift != 0;
120 spu->dma_callback(spu, SPE_EVENT_INVALID_DMA);
121 return 0;
122} 132}
133EXPORT_SYMBOL_GPL(spu_64k_pages_available);
123 134
124static int __spu_trap_dma_align(struct spu *spu) 135static void spu_restart_dma(struct spu *spu)
125{ 136{
126 pr_debug("%s\n", __FUNCTION__); 137 struct spu_priv2 __iomem *priv2 = spu->priv2;
127 spu->dma_callback(spu, SPE_EVENT_DMA_ALIGNMENT);
128 return 0;
129}
130 138
131static int __spu_trap_error(struct spu *spu) 139 if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags))
132{ 140 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
133 pr_debug("%s\n", __FUNCTION__);
134 spu->dma_callback(spu, SPE_EVENT_SPE_ERROR);
135 return 0;
136} 141}
137 142
138static void spu_restart_dma(struct spu *spu) 143static inline void spu_load_slb(struct spu *spu, int slbe, struct spu_slb *slb)
139{ 144{
140 struct spu_priv2 __iomem *priv2 = spu->priv2; 145 struct spu_priv2 __iomem *priv2 = spu->priv2;
141 146
142 if (!test_bit(SPU_CONTEXT_SWITCH_PENDING, &spu->flags)) 147 pr_debug("%s: adding SLB[%d] 0x%016lx 0x%016lx\n",
143 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND); 148 __func__, slbe, slb->vsid, slb->esid);
149
150 out_be64(&priv2->slb_index_W, slbe);
151 out_be64(&priv2->slb_vsid_RW, slb->vsid);
152 out_be64(&priv2->slb_esid_RW, slb->esid);
144} 153}
145 154
146static int __spu_trap_data_seg(struct spu *spu, unsigned long ea) 155static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
147{ 156{
148 struct spu_priv2 __iomem *priv2 = spu->priv2;
149 struct mm_struct *mm = spu->mm; 157 struct mm_struct *mm = spu->mm;
150 u64 esid, vsid, llp; 158 struct spu_slb slb;
151 int psize; 159 int psize;
152 160
153 pr_debug("%s\n", __FUNCTION__); 161 pr_debug("%s\n", __FUNCTION__);
@@ -159,7 +167,7 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
159 printk("%s: invalid access during switch!\n", __func__); 167 printk("%s: invalid access during switch!\n", __func__);
160 return 1; 168 return 1;
161 } 169 }
162 esid = (ea & ESID_MASK) | SLB_ESID_V; 170 slb.esid = (ea & ESID_MASK) | SLB_ESID_V;
163 171
164 switch(REGION_ID(ea)) { 172 switch(REGION_ID(ea)) {
165 case USER_REGION_ID: 173 case USER_REGION_ID:
@@ -168,21 +176,21 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
168#else 176#else
169 psize = mm->context.user_psize; 177 psize = mm->context.user_psize;
170#endif 178#endif
171 vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) | 179 slb.vsid = (get_vsid(mm->context.id, ea, MMU_SEGSIZE_256M)
172 SLB_VSID_USER; 180 << SLB_VSID_SHIFT) | SLB_VSID_USER;
173 break; 181 break;
174 case VMALLOC_REGION_ID: 182 case VMALLOC_REGION_ID:
175 if (ea < VMALLOC_END) 183 if (ea < VMALLOC_END)
176 psize = mmu_vmalloc_psize; 184 psize = mmu_vmalloc_psize;
177 else 185 else
178 psize = mmu_io_psize; 186 psize = mmu_io_psize;
179 vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) | 187 slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
180 SLB_VSID_KERNEL; 188 << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
181 break; 189 break;
182 case KERNEL_REGION_ID: 190 case KERNEL_REGION_ID:
183 psize = mmu_linear_psize; 191 psize = mmu_linear_psize;
184 vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) | 192 slb.vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M)
185 SLB_VSID_KERNEL; 193 << SLB_VSID_SHIFT) | SLB_VSID_KERNEL;
186 break; 194 break;
187 default: 195 default:
188 /* Future: support kernel segments so that drivers 196 /* Future: support kernel segments so that drivers
@@ -191,11 +199,9 @@ static int __spu_trap_data_seg(struct spu *spu, unsigned long ea)
191 pr_debug("invalid region access at %016lx\n", ea); 199 pr_debug("invalid region access at %016lx\n", ea);
192 return 1; 200 return 1;
193 } 201 }
194 llp = mmu_psize_defs[psize].sllp; 202 slb.vsid |= mmu_psize_defs[psize].sllp;
195 203
196 out_be64(&priv2->slb_index_W, spu->slb_replace); 204 spu_load_slb(spu, spu->slb_replace, &slb);
197 out_be64(&priv2->slb_vsid_RW, vsid | llp);
198 out_be64(&priv2->slb_esid_RW, esid);
199 205
200 spu->slb_replace++; 206 spu->slb_replace++;
201 if (spu->slb_replace >= 8) 207 if (spu->slb_replace >= 8)
@@ -225,13 +231,83 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr)
225 return 1; 231 return 1;
226 } 232 }
227 233
234 spu->class_0_pending = 0;
228 spu->dar = ea; 235 spu->dar = ea;
229 spu->dsisr = dsisr; 236 spu->dsisr = dsisr;
230 mb(); 237
231 spu->stop_callback(spu); 238 spu->stop_callback(spu);
239
240 return 0;
241}
242
243static void __spu_kernel_slb(void *addr, struct spu_slb *slb)
244{
245 unsigned long ea = (unsigned long)addr;
246 u64 llp;
247
248 if (REGION_ID(ea) == KERNEL_REGION_ID)
249 llp = mmu_psize_defs[mmu_linear_psize].sllp;
250 else
251 llp = mmu_psize_defs[mmu_virtual_psize].sllp;
252
253 slb->vsid = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
254 SLB_VSID_KERNEL | llp;
255 slb->esid = (ea & ESID_MASK) | SLB_ESID_V;
256}
257
258/**
259 * Given an array of @nr_slbs SLB entries, @slbs, return non-zero if the
260 * address @new_addr is present.
261 */
262static inline int __slb_present(struct spu_slb *slbs, int nr_slbs,
263 void *new_addr)
264{
265 unsigned long ea = (unsigned long)new_addr;
266 int i;
267
268 for (i = 0; i < nr_slbs; i++)
269 if (!((slbs[i].esid ^ ea) & ESID_MASK))
270 return 1;
271
232 return 0; 272 return 0;
233} 273}
234 274
275/**
276 * Setup the SPU kernel SLBs, in preparation for a context save/restore. We
277 * need to map both the context save area, and the save/restore code.
278 *
279 * Because the lscsa and code may cross segment boundaires, we check to see
280 * if mappings are required for the start and end of each range. We currently
281 * assume that the mappings are smaller that one segment - if not, something
282 * is seriously wrong.
283 */
284void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
285 void *code, int code_size)
286{
287 struct spu_slb slbs[4];
288 int i, nr_slbs = 0;
289 /* start and end addresses of both mappings */
290 void *addrs[] = {
291 lscsa, (void *)lscsa + sizeof(*lscsa) - 1,
292 code, code + code_size - 1
293 };
294
295 /* check the set of addresses, and create a new entry in the slbs array
296 * if there isn't already a SLB for that address */
297 for (i = 0; i < ARRAY_SIZE(addrs); i++) {
298 if (__slb_present(slbs, nr_slbs, addrs[i]))
299 continue;
300
301 __spu_kernel_slb(addrs[i], &slbs[nr_slbs]);
302 nr_slbs++;
303 }
304
305 /* Add the set of SLBs */
306 for (i = 0; i < nr_slbs; i++)
307 spu_load_slb(spu, i, &slbs[i]);
308}
309EXPORT_SYMBOL_GPL(spu_setup_kernel_slbs);
310
235static irqreturn_t 311static irqreturn_t
236spu_irq_class_0(int irq, void *data) 312spu_irq_class_0(int irq, void *data)
237{ 313{
@@ -240,12 +316,13 @@ spu_irq_class_0(int irq, void *data)
240 316
241 spu = data; 317 spu = data;
242 318
319 spin_lock(&spu->register_lock);
243 mask = spu_int_mask_get(spu, 0); 320 mask = spu_int_mask_get(spu, 0);
244 stat = spu_int_stat_get(spu, 0); 321 stat = spu_int_stat_get(spu, 0) & mask;
245 stat &= mask;
246 322
247 spin_lock(&spu->register_lock);
248 spu->class_0_pending |= stat; 323 spu->class_0_pending |= stat;
324 spu->dsisr = spu_mfc_dsisr_get(spu);
325 spu->dar = spu_mfc_dar_get(spu);
249 spin_unlock(&spu->register_lock); 326 spin_unlock(&spu->register_lock);
250 327
251 spu->stop_callback(spu); 328 spu->stop_callback(spu);
@@ -255,31 +332,6 @@ spu_irq_class_0(int irq, void *data)
255 return IRQ_HANDLED; 332 return IRQ_HANDLED;
256} 333}
257 334
258int
259spu_irq_class_0_bottom(struct spu *spu)
260{
261 unsigned long flags;
262 unsigned long stat;
263
264 spin_lock_irqsave(&spu->register_lock, flags);
265 stat = spu->class_0_pending;
266 spu->class_0_pending = 0;
267
268 if (stat & 1) /* invalid DMA alignment */
269 __spu_trap_dma_align(spu);
270
271 if (stat & 2) /* invalid MFC DMA */
272 __spu_trap_invalid_dma(spu);
273
274 if (stat & 4) /* error on SPU */
275 __spu_trap_error(spu);
276
277 spin_unlock_irqrestore(&spu->register_lock, flags);
278
279 return (stat & 0x7) ? -EIO : 0;
280}
281EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);
282
283static irqreturn_t 335static irqreturn_t
284spu_irq_class_1(int irq, void *data) 336spu_irq_class_1(int irq, void *data)
285{ 337{
@@ -294,24 +346,23 @@ spu_irq_class_1(int irq, void *data)
294 stat = spu_int_stat_get(spu, 1) & mask; 346 stat = spu_int_stat_get(spu, 1) & mask;
295 dar = spu_mfc_dar_get(spu); 347 dar = spu_mfc_dar_get(spu);
296 dsisr = spu_mfc_dsisr_get(spu); 348 dsisr = spu_mfc_dsisr_get(spu);
297 if (stat & 2) /* mapping fault */ 349 if (stat & CLASS1_STORAGE_FAULT_INTR)
298 spu_mfc_dsisr_set(spu, 0ul); 350 spu_mfc_dsisr_set(spu, 0ul);
299 spu_int_stat_clear(spu, 1, stat); 351 spu_int_stat_clear(spu, 1, stat);
300 spin_unlock(&spu->register_lock); 352 spin_unlock(&spu->register_lock);
301 pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat, 353 pr_debug("%s: %lx %lx %lx %lx\n", __FUNCTION__, mask, stat,
302 dar, dsisr); 354 dar, dsisr);
303 355
304 if (stat & 1) /* segment fault */ 356 if (stat & CLASS1_SEGMENT_FAULT_INTR)
305 __spu_trap_data_seg(spu, dar); 357 __spu_trap_data_seg(spu, dar);
306 358
307 if (stat & 2) { /* mapping fault */ 359 if (stat & CLASS1_STORAGE_FAULT_INTR)
308 __spu_trap_data_map(spu, dar, dsisr); 360 __spu_trap_data_map(spu, dar, dsisr);
309 }
310 361
311 if (stat & 4) /* ls compare & suspend on get */ 362 if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_GET_INTR)
312 ; 363 ;
313 364
314 if (stat & 8) /* ls compare & suspend on put */ 365 if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
315 ; 366 ;
316 367
317 return stat ? IRQ_HANDLED : IRQ_NONE; 368 return stat ? IRQ_HANDLED : IRQ_NONE;
@@ -323,6 +374,8 @@ spu_irq_class_2(int irq, void *data)
323 struct spu *spu; 374 struct spu *spu;
324 unsigned long stat; 375 unsigned long stat;
325 unsigned long mask; 376 unsigned long mask;
377 const int mailbox_intrs =
378 CLASS2_MAILBOX_THRESHOLD_INTR | CLASS2_MAILBOX_INTR;
326 379
327 spu = data; 380 spu = data;
328 spin_lock(&spu->register_lock); 381 spin_lock(&spu->register_lock);
@@ -330,31 +383,30 @@ spu_irq_class_2(int irq, void *data)
330 mask = spu_int_mask_get(spu, 2); 383 mask = spu_int_mask_get(spu, 2);
331 /* ignore interrupts we're not waiting for */ 384 /* ignore interrupts we're not waiting for */
332 stat &= mask; 385 stat &= mask;
333 /* 386
334 * mailbox interrupts (0x1 and 0x10) are level triggered. 387 /* mailbox interrupts are level triggered. mask them now before
335 * mask them now before acknowledging. 388 * acknowledging */
336 */ 389 if (stat & mailbox_intrs)
337 if (stat & 0x11) 390 spu_int_mask_and(spu, 2, ~(stat & mailbox_intrs));
338 spu_int_mask_and(spu, 2, ~(stat & 0x11));
339 /* acknowledge all interrupts before the callbacks */ 391 /* acknowledge all interrupts before the callbacks */
340 spu_int_stat_clear(spu, 2, stat); 392 spu_int_stat_clear(spu, 2, stat);
341 spin_unlock(&spu->register_lock); 393 spin_unlock(&spu->register_lock);
342 394
343 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask); 395 pr_debug("class 2 interrupt %d, %lx, %lx\n", irq, stat, mask);
344 396
345 if (stat & 1) /* PPC core mailbox */ 397 if (stat & CLASS2_MAILBOX_INTR)
346 spu->ibox_callback(spu); 398 spu->ibox_callback(spu);
347 399
348 if (stat & 2) /* SPU stop-and-signal */ 400 if (stat & CLASS2_SPU_STOP_INTR)
349 spu->stop_callback(spu); 401 spu->stop_callback(spu);
350 402
351 if (stat & 4) /* SPU halted */ 403 if (stat & CLASS2_SPU_HALT_INTR)
352 spu->stop_callback(spu); 404 spu->stop_callback(spu);
353 405
354 if (stat & 8) /* DMA tag group complete */ 406 if (stat & CLASS2_SPU_DMA_TAG_GROUP_COMPLETE_INTR)
355 spu->mfc_callback(spu); 407 spu->mfc_callback(spu);
356 408
357 if (stat & 0x10) /* SPU mailbox threshold */ 409 if (stat & CLASS2_MAILBOX_THRESHOLD_INTR)
358 spu->wbox_callback(spu); 410 spu->wbox_callback(spu);
359 411
360 spu->stats.class2_intr++; 412 spu->stats.class2_intr++;
@@ -479,13 +531,27 @@ EXPORT_SYMBOL_GPL(spu_add_sysdev_attr);
479int spu_add_sysdev_attr_group(struct attribute_group *attrs) 531int spu_add_sysdev_attr_group(struct attribute_group *attrs)
480{ 532{
481 struct spu *spu; 533 struct spu *spu;
534 int rc = 0;
482 535
483 mutex_lock(&spu_full_list_mutex); 536 mutex_lock(&spu_full_list_mutex);
484 list_for_each_entry(spu, &spu_full_list, full_list) 537 list_for_each_entry(spu, &spu_full_list, full_list) {
485 sysfs_create_group(&spu->sysdev.kobj, attrs); 538 rc = sysfs_create_group(&spu->sysdev.kobj, attrs);
539
540 /* we're in trouble here, but try unwinding anyway */
541 if (rc) {
542 printk(KERN_ERR "%s: can't create sysfs group '%s'\n",
543 __func__, attrs->name);
544
545 list_for_each_entry_continue_reverse(spu,
546 &spu_full_list, full_list)
547 sysfs_remove_group(&spu->sysdev.kobj, attrs);
548 break;
549 }
550 }
551
486 mutex_unlock(&spu_full_list_mutex); 552 mutex_unlock(&spu_full_list_mutex);
487 553
488 return 0; 554 return rc;
489} 555}
490EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group); 556EXPORT_SYMBOL_GPL(spu_add_sysdev_attr_group);
491 557
diff --git a/arch/powerpc/platforms/cell/spu_fault.c b/arch/powerpc/platforms/cell/spu_fault.c
new file mode 100644
index 000000000000..c8b1cd42905d
--- /dev/null
+++ b/arch/powerpc/platforms/cell/spu_fault.c
@@ -0,0 +1,98 @@
1/*
2 * SPU mm fault handler
3 *
4 * (C) Copyright IBM Deutschland Entwicklung GmbH 2007
5 *
6 * Author: Arnd Bergmann <arndb@de.ibm.com>
7 * Author: Jeremy Kerr <jk@ozlabs.org>
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, or (at your option)
12 * 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
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23#include <linux/sched.h>
24#include <linux/mm.h>
25#include <linux/module.h>
26
27#include <asm/spu.h>
28#include <asm/spu_csa.h>
29
30/*
31 * This ought to be kept in sync with the powerpc specific do_page_fault
32 * function. Currently, there are a few corner cases that we haven't had
33 * to handle fortunately.
34 */
35int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
36 unsigned long dsisr, unsigned *flt)
37{
38 struct vm_area_struct *vma;
39 unsigned long is_write;
40 int ret;
41
42#if 0
43 if (!IS_VALID_EA(ea)) {
44 return -EFAULT;
45 }
46#endif /* XXX */
47 if (mm == NULL) {
48 return -EFAULT;
49 }
50 if (mm->pgd == NULL) {
51 return -EFAULT;
52 }
53
54 down_read(&mm->mmap_sem);
55 vma = find_vma(mm, ea);
56 if (!vma)
57 goto bad_area;
58 if (vma->vm_start <= ea)
59 goto good_area;
60 if (!(vma->vm_flags & VM_GROWSDOWN))
61 goto bad_area;
62 if (expand_stack(vma, ea))
63 goto bad_area;
64good_area:
65 is_write = dsisr & MFC_DSISR_ACCESS_PUT;
66 if (is_write) {
67 if (!(vma->vm_flags & VM_WRITE))
68 goto bad_area;
69 } else {
70 if (dsisr & MFC_DSISR_ACCESS_DENIED)
71 goto bad_area;
72 if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
73 goto bad_area;
74 }
75 ret = 0;
76 *flt = handle_mm_fault(mm, vma, ea, is_write);
77 if (unlikely(*flt & VM_FAULT_ERROR)) {
78 if (*flt & VM_FAULT_OOM) {
79 ret = -ENOMEM;
80 goto bad_area;
81 } else if (*flt & VM_FAULT_SIGBUS) {
82 ret = -EFAULT;
83 goto bad_area;
84 }
85 BUG();
86 }
87 if (*flt & VM_FAULT_MAJOR)
88 current->maj_flt++;
89 else
90 current->min_flt++;
91 up_read(&mm->mmap_sem);
92 return ret;
93
94bad_area:
95 up_read(&mm->mmap_sem);
96 return -EFAULT;
97}
98EXPORT_SYMBOL_GPL(spu_handle_mm_fault);
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c
index 1b010707488d..d351bdebf5f1 100644
--- a/arch/powerpc/platforms/cell/spu_manage.c
+++ b/arch/powerpc/platforms/cell/spu_manage.c
@@ -35,6 +35,7 @@
35#include <asm/firmware.h> 35#include <asm/firmware.h>
36#include <asm/prom.h> 36#include <asm/prom.h>
37 37
38#include "spufs/spufs.h"
38#include "interrupt.h" 39#include "interrupt.h"
39 40
40struct device_node *spu_devnode(struct spu *spu) 41struct device_node *spu_devnode(struct spu *spu)
@@ -345,7 +346,7 @@ static int __init of_create_spu(struct spu *spu, void *data)
345 } 346 }
346 ret = spu_map_interrupts_old(spu, spe); 347 ret = spu_map_interrupts_old(spu, spe);
347 if (ret) { 348 if (ret) {
348 printk(KERN_ERR "%s: could not map interrupts", 349 printk(KERN_ERR "%s: could not map interrupts\n",
349 spu->name); 350 spu->name);
350 goto out_unmap; 351 goto out_unmap;
351 } 352 }
@@ -369,6 +370,16 @@ static int of_destroy_spu(struct spu *spu)
369 return 0; 370 return 0;
370} 371}
371 372
373static void enable_spu_by_master_run(struct spu_context *ctx)
374{
375 ctx->ops->master_start(ctx);
376}
377
378static void disable_spu_by_master_run(struct spu_context *ctx)
379{
380 ctx->ops->master_stop(ctx);
381}
382
372/* Hardcoded affinity idxs for qs20 */ 383/* Hardcoded affinity idxs for qs20 */
373#define QS20_SPES_PER_BE 8 384#define QS20_SPES_PER_BE 8
374static int qs20_reg_idxs[QS20_SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 }; 385static int qs20_reg_idxs[QS20_SPES_PER_BE] = { 0, 2, 4, 6, 7, 5, 3, 1 };
@@ -411,10 +422,15 @@ static void init_affinity_qs20_harcoded(void)
411 422
412static int of_has_vicinity(void) 423static int of_has_vicinity(void)
413{ 424{
414 struct spu* spu; 425 struct device_node *dn;
415 426
416 spu = list_first_entry(&cbe_spu_info[0].spus, struct spu, cbe_list); 427 for_each_node_by_type(dn, "spe") {
417 return of_find_property(spu_devnode(spu), "vicinity", NULL) != NULL; 428 if (of_find_property(dn, "vicinity", NULL)) {
429 of_node_put(dn);
430 return 1;
431 }
432 }
433 return 0;
418} 434}
419 435
420static struct spu *devnode_spu(int cbe, struct device_node *dn) 436static struct spu *devnode_spu(int cbe, struct device_node *dn)
@@ -525,7 +541,7 @@ static int __init init_affinity(void)
525 if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0")) 541 if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
526 init_affinity_qs20_harcoded(); 542 init_affinity_qs20_harcoded();
527 else 543 else
528 printk("No affinity configuration found"); 544 printk("No affinity configuration found\n");
529 } 545 }
530 546
531 return 0; 547 return 0;
@@ -535,5 +551,7 @@ const struct spu_management_ops spu_management_of_ops = {
535 .enumerate_spus = of_enumerate_spus, 551 .enumerate_spus = of_enumerate_spus,
536 .create_spu = of_create_spu, 552 .create_spu = of_create_spu,
537 .destroy_spu = of_destroy_spu, 553 .destroy_spu = of_destroy_spu,
554 .enable_spu = enable_spu_by_master_run,
555 .disable_spu = disable_spu_by_master_run,
538 .init_affinity = init_affinity, 556 .init_affinity = init_affinity,
539}; 557};
diff --git a/arch/powerpc/platforms/cell/spufs/Makefile b/arch/powerpc/platforms/cell/spufs/Makefile
index 328afcf89503..d3a349fb42e5 100644
--- a/arch/powerpc/platforms/cell/spufs/Makefile
+++ b/arch/powerpc/platforms/cell/spufs/Makefile
@@ -1,8 +1,8 @@
1obj-y += switch.o fault.o lscsa_alloc.o
2 1
3obj-$(CONFIG_SPU_FS) += spufs.o 2obj-$(CONFIG_SPU_FS) += spufs.o
4spufs-y += inode.o file.o context.o syscalls.o coredump.o 3spufs-y += inode.o file.o context.o syscalls.o coredump.o
5spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o 4spufs-y += sched.o backing_ops.o hw_ops.o run.o gang.o
5spufs-y += switch.o fault.o lscsa_alloc.o
6 6
7# Rules to build switch.o with the help of SPU tool chain 7# Rules to build switch.o with the help of SPU tool chain
8SPU_CROSS := spu- 8SPU_CROSS := spu-
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index ec01214e51ee..50d98a154aaf 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -106,16 +106,20 @@ static unsigned int spu_backing_mbox_stat_poll(struct spu_context *ctx,
106 if (stat & 0xff0000) 106 if (stat & 0xff0000)
107 ret |= POLLIN | POLLRDNORM; 107 ret |= POLLIN | POLLRDNORM;
108 else { 108 else {
109 ctx->csa.priv1.int_stat_class0_RW &= ~0x1; 109 ctx->csa.priv1.int_stat_class2_RW &=
110 ctx->csa.priv1.int_mask_class2_RW |= 0x1; 110 ~CLASS2_MAILBOX_INTR;
111 ctx->csa.priv1.int_mask_class2_RW |=
112 CLASS2_ENABLE_MAILBOX_INTR;
111 } 113 }
112 } 114 }
113 if (events & (POLLOUT | POLLWRNORM)) { 115 if (events & (POLLOUT | POLLWRNORM)) {
114 if (stat & 0x00ff00) 116 if (stat & 0x00ff00)
115 ret = POLLOUT | POLLWRNORM; 117 ret = POLLOUT | POLLWRNORM;
116 else { 118 else {
117 ctx->csa.priv1.int_stat_class0_RW &= ~0x10; 119 ctx->csa.priv1.int_stat_class2_RW &=
118 ctx->csa.priv1.int_mask_class2_RW |= 0x10; 120 ~CLASS2_MAILBOX_THRESHOLD_INTR;
121 ctx->csa.priv1.int_mask_class2_RW |=
122 CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
119 } 123 }
120 } 124 }
121 spin_unlock_irq(&ctx->csa.register_lock); 125 spin_unlock_irq(&ctx->csa.register_lock);
@@ -139,7 +143,7 @@ static int spu_backing_ibox_read(struct spu_context *ctx, u32 * data)
139 ret = 4; 143 ret = 4;
140 } else { 144 } else {
141 /* make sure we get woken up by the interrupt */ 145 /* make sure we get woken up by the interrupt */
142 ctx->csa.priv1.int_mask_class2_RW |= 0x1UL; 146 ctx->csa.priv1.int_mask_class2_RW |= CLASS2_ENABLE_MAILBOX_INTR;
143 ret = 0; 147 ret = 0;
144 } 148 }
145 spin_unlock(&ctx->csa.register_lock); 149 spin_unlock(&ctx->csa.register_lock);
@@ -169,7 +173,8 @@ static int spu_backing_wbox_write(struct spu_context *ctx, u32 data)
169 } else { 173 } else {
170 /* make sure we get woken up by the interrupt when space 174 /* make sure we get woken up by the interrupt when space
171 becomes available */ 175 becomes available */
172 ctx->csa.priv1.int_mask_class2_RW |= 0x10; 176 ctx->csa.priv1.int_mask_class2_RW |=
177 CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR;
173 ret = 0; 178 ret = 0;
174 } 179 }
175 spin_unlock(&ctx->csa.register_lock); 180 spin_unlock(&ctx->csa.register_lock);
@@ -268,6 +273,11 @@ static char *spu_backing_get_ls(struct spu_context *ctx)
268 return ctx->csa.lscsa->ls; 273 return ctx->csa.lscsa->ls;
269} 274}
270 275
276static void spu_backing_privcntl_write(struct spu_context *ctx, u64 val)
277{
278 ctx->csa.priv2.spu_privcntl_RW = val;
279}
280
271static u32 spu_backing_runcntl_read(struct spu_context *ctx) 281static u32 spu_backing_runcntl_read(struct spu_context *ctx)
272{ 282{
273 return ctx->csa.prob.spu_runcntl_RW; 283 return ctx->csa.prob.spu_runcntl_RW;
@@ -285,6 +295,11 @@ static void spu_backing_runcntl_write(struct spu_context *ctx, u32 val)
285 spin_unlock(&ctx->csa.register_lock); 295 spin_unlock(&ctx->csa.register_lock);
286} 296}
287 297
298static void spu_backing_runcntl_stop(struct spu_context *ctx)
299{
300 spu_backing_runcntl_write(ctx, SPU_RUNCNTL_STOP);
301}
302
288static void spu_backing_master_start(struct spu_context *ctx) 303static void spu_backing_master_start(struct spu_context *ctx)
289{ 304{
290 struct spu_state *csa = &ctx->csa; 305 struct spu_state *csa = &ctx->csa;
@@ -358,7 +373,7 @@ static int spu_backing_send_mfc_command(struct spu_context *ctx,
358 373
359static void spu_backing_restart_dma(struct spu_context *ctx) 374static void spu_backing_restart_dma(struct spu_context *ctx)
360{ 375{
361 /* nothing to do here */ 376 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_RESTART_DMA_COMMAND;
362} 377}
363 378
364struct spu_context_ops spu_backing_ops = { 379struct spu_context_ops spu_backing_ops = {
@@ -379,8 +394,10 @@ struct spu_context_ops spu_backing_ops = {
379 .npc_write = spu_backing_npc_write, 394 .npc_write = spu_backing_npc_write,
380 .status_read = spu_backing_status_read, 395 .status_read = spu_backing_status_read,
381 .get_ls = spu_backing_get_ls, 396 .get_ls = spu_backing_get_ls,
397 .privcntl_write = spu_backing_privcntl_write,
382 .runcntl_read = spu_backing_runcntl_read, 398 .runcntl_read = spu_backing_runcntl_read,
383 .runcntl_write = spu_backing_runcntl_write, 399 .runcntl_write = spu_backing_runcntl_write,
400 .runcntl_stop = spu_backing_runcntl_stop,
384 .master_start = spu_backing_master_start, 401 .master_start = spu_backing_master_start,
385 .master_stop = spu_backing_master_stop, 402 .master_stop = spu_backing_master_stop,
386 .set_mfc_query = spu_backing_set_mfc_query, 403 .set_mfc_query = spu_backing_set_mfc_query,
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index adf0a030d6fe..133995ed5cc7 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -52,6 +52,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang)
52 init_waitqueue_head(&ctx->wbox_wq); 52 init_waitqueue_head(&ctx->wbox_wq);
53 init_waitqueue_head(&ctx->stop_wq); 53 init_waitqueue_head(&ctx->stop_wq);
54 init_waitqueue_head(&ctx->mfc_wq); 54 init_waitqueue_head(&ctx->mfc_wq);
55 init_waitqueue_head(&ctx->run_wq);
55 ctx->state = SPU_STATE_SAVED; 56 ctx->state = SPU_STATE_SAVED;
56 ctx->ops = &spu_backing_ops; 57 ctx->ops = &spu_backing_ops;
57 ctx->owner = get_task_mm(current); 58 ctx->owner = get_task_mm(current);
@@ -105,7 +106,17 @@ int put_spu_context(struct spu_context *ctx)
105void spu_forget(struct spu_context *ctx) 106void spu_forget(struct spu_context *ctx)
106{ 107{
107 struct mm_struct *mm; 108 struct mm_struct *mm;
108 spu_acquire_saved(ctx); 109
110 /*
111 * This is basically an open-coded spu_acquire_saved, except that
112 * we don't acquire the state mutex interruptible.
113 */
114 mutex_lock(&ctx->state_mutex);
115 if (ctx->state != SPU_STATE_SAVED) {
116 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
117 spu_deactivate(ctx);
118 }
119
109 mm = ctx->owner; 120 mm = ctx->owner;
110 ctx->owner = NULL; 121 ctx->owner = NULL;
111 mmput(mm); 122 mmput(mm);
@@ -133,47 +144,23 @@ void spu_unmap_mappings(struct spu_context *ctx)
133} 144}
134 145
135/** 146/**
136 * spu_acquire_runnable - lock spu contex and make sure it is in runnable state 147 * spu_acquire_saved - lock spu contex and make sure it is in saved state
137 * @ctx: spu contex to lock 148 * @ctx: spu contex to lock
138 *
139 * Note:
140 * Returns 0 and with the context locked on success
141 * Returns negative error and with the context _unlocked_ on failure.
142 */ 149 */
143int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags) 150int spu_acquire_saved(struct spu_context *ctx)
144{ 151{
145 int ret = -EINVAL; 152 int ret;
146
147 spu_acquire(ctx);
148 if (ctx->state == SPU_STATE_SAVED) {
149 /*
150 * Context is about to be freed, so we can't acquire it anymore.
151 */
152 if (!ctx->owner)
153 goto out_unlock;
154 ret = spu_activate(ctx, flags);
155 if (ret)
156 goto out_unlock;
157 }
158 153
159 return 0; 154 ret = spu_acquire(ctx);
160 155 if (ret)
161 out_unlock: 156 return ret;
162 spu_release(ctx);
163 return ret;
164}
165 157
166/**
167 * spu_acquire_saved - lock spu contex and make sure it is in saved state
168 * @ctx: spu contex to lock
169 */
170void spu_acquire_saved(struct spu_context *ctx)
171{
172 spu_acquire(ctx);
173 if (ctx->state != SPU_STATE_SAVED) { 158 if (ctx->state != SPU_STATE_SAVED) {
174 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags); 159 set_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags);
175 spu_deactivate(ctx); 160 spu_deactivate(ctx);
176 } 161 }
162
163 return 0;
177} 164}
178 165
179/** 166/**
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index 80f62363e1ce..0c6a96b82b2d 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -148,7 +148,9 @@ int spufs_coredump_extra_notes_size(void)
148 148
149 fd = 0; 149 fd = 0;
150 while ((ctx = coredump_next_context(&fd)) != NULL) { 150 while ((ctx = coredump_next_context(&fd)) != NULL) {
151 spu_acquire_saved(ctx); 151 rc = spu_acquire_saved(ctx);
152 if (rc)
153 break;
152 rc = spufs_ctx_note_size(ctx, fd); 154 rc = spufs_ctx_note_size(ctx, fd);
153 spu_release_saved(ctx); 155 spu_release_saved(ctx);
154 if (rc < 0) 156 if (rc < 0)
@@ -224,7 +226,9 @@ int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset)
224 226
225 fd = 0; 227 fd = 0;
226 while ((ctx = coredump_next_context(&fd)) != NULL) { 228 while ((ctx = coredump_next_context(&fd)) != NULL) {
227 spu_acquire_saved(ctx); 229 rc = spu_acquire_saved(ctx);
230 if (rc)
231 return rc;
228 232
229 for (j = 0; spufs_coredump_read[j].name != NULL; j++) { 233 for (j = 0; spufs_coredump_read[j].name != NULL; j++) {
230 rc = spufs_arch_write_note(ctx, j, file, fd, foffset); 234 rc = spufs_arch_write_note(ctx, j, file, fd, foffset);
diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c
index 917eab4be486..eff4d291ba85 100644
--- a/arch/powerpc/platforms/cell/spufs/fault.c
+++ b/arch/powerpc/platforms/cell/spufs/fault.c
@@ -28,117 +28,71 @@
28 28
29#include "spufs.h" 29#include "spufs.h"
30 30
31/* 31/**
32 * This ought to be kept in sync with the powerpc specific do_page_fault 32 * Handle an SPE event, depending on context SPU_CREATE_EVENTS_ENABLED flag.
33 * function. Currently, there are a few corner cases that we haven't had 33 *
34 * to handle fortunately. 34 * If the context was created with events, we just set the return event.
35 * Otherwise, send an appropriate signal to the process.
35 */ 36 */
36static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea, 37static void spufs_handle_event(struct spu_context *ctx,
37 unsigned long dsisr, unsigned *flt) 38 unsigned long ea, int type)
38{ 39{
39 struct vm_area_struct *vma; 40 siginfo_t info;
40 unsigned long is_write;
41 int ret;
42 41
43#if 0 42 if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) {
44 if (!IS_VALID_EA(ea)) { 43 ctx->event_return |= type;
45 return -EFAULT; 44 wake_up_all(&ctx->stop_wq);
46 } 45 return;
47#endif /* XXX */
48 if (mm == NULL) {
49 return -EFAULT;
50 }
51 if (mm->pgd == NULL) {
52 return -EFAULT;
53 } 46 }
54 47
55 down_read(&mm->mmap_sem); 48 memset(&info, 0, sizeof(info));
56 vma = find_vma(mm, ea); 49
57 if (!vma) 50 switch (type) {
58 goto bad_area; 51 case SPE_EVENT_INVALID_DMA:
59 if (vma->vm_start <= ea) 52 info.si_signo = SIGBUS;
60 goto good_area; 53 info.si_code = BUS_OBJERR;
61 if (!(vma->vm_flags & VM_GROWSDOWN)) 54 break;
62 goto bad_area; 55 case SPE_EVENT_SPE_DATA_STORAGE:
63 if (expand_stack(vma, ea)) 56 info.si_signo = SIGSEGV;
64 goto bad_area; 57 info.si_addr = (void __user *)ea;
65good_area: 58 info.si_code = SEGV_ACCERR;
66 is_write = dsisr & MFC_DSISR_ACCESS_PUT; 59 ctx->ops->restart_dma(ctx);
67 if (is_write) { 60 break;
68 if (!(vma->vm_flags & VM_WRITE)) 61 case SPE_EVENT_DMA_ALIGNMENT:
69 goto bad_area; 62 info.si_signo = SIGBUS;
70 } else { 63 /* DAR isn't set for an alignment fault :( */
71 if (dsisr & MFC_DSISR_ACCESS_DENIED) 64 info.si_code = BUS_ADRALN;
72 goto bad_area; 65 break;
73 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) 66 case SPE_EVENT_SPE_ERROR:
74 goto bad_area; 67 info.si_signo = SIGILL;
68 info.si_addr = (void __user *)(unsigned long)
69 ctx->ops->npc_read(ctx) - 4;
70 info.si_code = ILL_ILLOPC;
71 break;
75 } 72 }
76 ret = 0;
77 *flt = handle_mm_fault(mm, vma, ea, is_write);
78 if (unlikely(*flt & VM_FAULT_ERROR)) {
79 if (*flt & VM_FAULT_OOM) {
80 ret = -ENOMEM;
81 goto bad_area;
82 } else if (*flt & VM_FAULT_SIGBUS) {
83 ret = -EFAULT;
84 goto bad_area;
85 }
86 BUG();
87 }
88 if (*flt & VM_FAULT_MAJOR)
89 current->maj_flt++;
90 else
91 current->min_flt++;
92 up_read(&mm->mmap_sem);
93 return ret;
94 73
95bad_area: 74 if (info.si_signo)
96 up_read(&mm->mmap_sem); 75 force_sig_info(info.si_signo, &info, current);
97 return -EFAULT;
98} 76}
99 77
100static void spufs_handle_dma_error(struct spu_context *ctx, 78int spufs_handle_class0(struct spu_context *ctx)
101 unsigned long ea, int type)
102{ 79{
103 if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) { 80 unsigned long stat = ctx->csa.class_0_pending & CLASS0_INTR_MASK;
104 ctx->event_return |= type;
105 wake_up_all(&ctx->stop_wq);
106 } else {
107 siginfo_t info;
108 memset(&info, 0, sizeof(info));
109
110 switch (type) {
111 case SPE_EVENT_INVALID_DMA:
112 info.si_signo = SIGBUS;
113 info.si_code = BUS_OBJERR;
114 break;
115 case SPE_EVENT_SPE_DATA_STORAGE:
116 info.si_signo = SIGBUS;
117 info.si_addr = (void __user *)ea;
118 info.si_code = BUS_ADRERR;
119 break;
120 case SPE_EVENT_DMA_ALIGNMENT:
121 info.si_signo = SIGBUS;
122 /* DAR isn't set for an alignment fault :( */
123 info.si_code = BUS_ADRALN;
124 break;
125 case SPE_EVENT_SPE_ERROR:
126 info.si_signo = SIGILL;
127 info.si_addr = (void __user *)(unsigned long)
128 ctx->ops->npc_read(ctx) - 4;
129 info.si_code = ILL_ILLOPC;
130 break;
131 }
132 if (info.si_signo)
133 force_sig_info(info.si_signo, &info, current);
134 }
135}
136 81
137void spufs_dma_callback(struct spu *spu, int type) 82 if (likely(!stat))
138{ 83 return 0;
139 spufs_handle_dma_error(spu->ctx, spu->dar, type); 84
85 if (stat & CLASS0_DMA_ALIGNMENT_INTR)
86 spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_DMA_ALIGNMENT);
87
88 if (stat & CLASS0_INVALID_DMA_COMMAND_INTR)
89 spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_INVALID_DMA);
90
91 if (stat & CLASS0_SPU_ERROR_INTR)
92 spufs_handle_event(ctx, ctx->csa.dar, SPE_EVENT_SPE_ERROR);
93
94 return -EIO;
140} 95}
141EXPORT_SYMBOL_GPL(spufs_dma_callback);
142 96
143/* 97/*
144 * bottom half handler for page faults, we can't do this from 98 * bottom half handler for page faults, we can't do this from
@@ -154,7 +108,7 @@ int spufs_handle_class1(struct spu_context *ctx)
154 u64 ea, dsisr, access; 108 u64 ea, dsisr, access;
155 unsigned long flags; 109 unsigned long flags;
156 unsigned flt = 0; 110 unsigned flt = 0;
157 int ret; 111 int ret, ret2;
158 112
159 /* 113 /*
160 * dar and dsisr get passed from the registers 114 * dar and dsisr get passed from the registers
@@ -165,16 +119,8 @@ int spufs_handle_class1(struct spu_context *ctx)
165 * in time, we can still expect to get the same fault 119 * in time, we can still expect to get the same fault
166 * the immediately after the context restore. 120 * the immediately after the context restore.
167 */ 121 */
168 if (ctx->state == SPU_STATE_RUNNABLE) { 122 ea = ctx->csa.dar;
169 ea = ctx->spu->dar; 123 dsisr = ctx->csa.dsisr;
170 dsisr = ctx->spu->dsisr;
171 ctx->spu->dar= ctx->spu->dsisr = 0;
172 } else {
173 ea = ctx->csa.priv1.mfc_dar_RW;
174 dsisr = ctx->csa.priv1.mfc_dsisr_RW;
175 ctx->csa.priv1.mfc_dar_RW = 0;
176 ctx->csa.priv1.mfc_dsisr_RW = 0;
177 }
178 124
179 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))) 125 if (!(dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)))
180 return 0; 126 return 0;
@@ -201,7 +147,22 @@ int spufs_handle_class1(struct spu_context *ctx)
201 if (ret) 147 if (ret)
202 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt); 148 ret = spu_handle_mm_fault(current->mm, ea, dsisr, &flt);
203 149
204 spu_acquire(ctx); 150 /*
151 * If spu_acquire fails due to a pending signal we just want to return
152 * EINTR to userspace even if that means missing the dma restart or
153 * updating the page fault statistics.
154 */
155 ret2 = spu_acquire(ctx);
156 if (ret2)
157 goto out;
158
159 /*
160 * Clear dsisr under ctxt lock after handling the fault, so that
161 * time slicing will not preempt the context while the page fault
162 * handler is running. Context switch code removes mappings.
163 */
164 ctx->csa.dar = ctx->csa.dsisr = 0;
165
205 /* 166 /*
206 * If we handled the fault successfully and are in runnable 167 * If we handled the fault successfully and are in runnable
207 * state, restart the DMA. 168 * state, restart the DMA.
@@ -222,9 +183,9 @@ int spufs_handle_class1(struct spu_context *ctx)
222 if (ctx->spu) 183 if (ctx->spu)
223 ctx->ops->restart_dma(ctx); 184 ctx->ops->restart_dma(ctx);
224 } else 185 } else
225 spufs_handle_dma_error(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE); 186 spufs_handle_event(ctx, ea, SPE_EVENT_SPE_DATA_STORAGE);
226 187
188 out:
227 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM); 189 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
228 return ret; 190 return ret;
229} 191}
230EXPORT_SYMBOL_GPL(spufs_handle_class1);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index d9e56a503795..3fcd06418b01 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -40,6 +40,120 @@
40 40
41#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000) 41#define SPUFS_MMAP_4K (PAGE_SIZE == 0x1000)
42 42
43/* Simple attribute files */
44struct spufs_attr {
45 int (*get)(void *, u64 *);
46 int (*set)(void *, u64);
47 char get_buf[24]; /* enough to store a u64 and "\n\0" */
48 char set_buf[24];
49 void *data;
50 const char *fmt; /* format for read operation */
51 struct mutex mutex; /* protects access to these buffers */
52};
53
54static int spufs_attr_open(struct inode *inode, struct file *file,
55 int (*get)(void *, u64 *), int (*set)(void *, u64),
56 const char *fmt)
57{
58 struct spufs_attr *attr;
59
60 attr = kmalloc(sizeof(*attr), GFP_KERNEL);
61 if (!attr)
62 return -ENOMEM;
63
64 attr->get = get;
65 attr->set = set;
66 attr->data = inode->i_private;
67 attr->fmt = fmt;
68 mutex_init(&attr->mutex);
69 file->private_data = attr;
70
71 return nonseekable_open(inode, file);
72}
73
74static int spufs_attr_release(struct inode *inode, struct file *file)
75{
76 kfree(file->private_data);
77 return 0;
78}
79
80static ssize_t spufs_attr_read(struct file *file, char __user *buf,
81 size_t len, loff_t *ppos)
82{
83 struct spufs_attr *attr;
84 size_t size;
85 ssize_t ret;
86
87 attr = file->private_data;
88 if (!attr->get)
89 return -EACCES;
90
91 ret = mutex_lock_interruptible(&attr->mutex);
92 if (ret)
93 return ret;
94
95 if (*ppos) { /* continued read */
96 size = strlen(attr->get_buf);
97 } else { /* first read */
98 u64 val;
99 ret = attr->get(attr->data, &val);
100 if (ret)
101 goto out;
102
103 size = scnprintf(attr->get_buf, sizeof(attr->get_buf),
104 attr->fmt, (unsigned long long)val);
105 }
106
107 ret = simple_read_from_buffer(buf, len, ppos, attr->get_buf, size);
108out:
109 mutex_unlock(&attr->mutex);
110 return ret;
111}
112
113static ssize_t spufs_attr_write(struct file *file, const char __user *buf,
114 size_t len, loff_t *ppos)
115{
116 struct spufs_attr *attr;
117 u64 val;
118 size_t size;
119 ssize_t ret;
120
121 attr = file->private_data;
122 if (!attr->set)
123 return -EACCES;
124
125 ret = mutex_lock_interruptible(&attr->mutex);
126 if (ret)
127 return ret;
128
129 ret = -EFAULT;
130 size = min(sizeof(attr->set_buf) - 1, len);
131 if (copy_from_user(attr->set_buf, buf, size))
132 goto out;
133
134 ret = len; /* claim we got the whole input */
135 attr->set_buf[size] = '\0';
136 val = simple_strtol(attr->set_buf, NULL, 0);
137 attr->set(attr->data, val);
138out:
139 mutex_unlock(&attr->mutex);
140 return ret;
141}
142
143#define DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \
144static int __fops ## _open(struct inode *inode, struct file *file) \
145{ \
146 __simple_attr_check_format(__fmt, 0ull); \
147 return spufs_attr_open(inode, file, __get, __set, __fmt); \
148} \
149static struct file_operations __fops = { \
150 .owner = THIS_MODULE, \
151 .open = __fops ## _open, \
152 .release = spufs_attr_release, \
153 .read = spufs_attr_read, \
154 .write = spufs_attr_write, \
155};
156
43 157
44static int 158static int
45spufs_mem_open(struct inode *inode, struct file *file) 159spufs_mem_open(struct inode *inode, struct file *file)
@@ -84,9 +198,12 @@ spufs_mem_read(struct file *file, char __user *buffer,
84 struct spu_context *ctx = file->private_data; 198 struct spu_context *ctx = file->private_data;
85 ssize_t ret; 199 ssize_t ret;
86 200
87 spu_acquire(ctx); 201 ret = spu_acquire(ctx);
202 if (ret)
203 return ret;
88 ret = __spufs_mem_read(ctx, buffer, size, pos); 204 ret = __spufs_mem_read(ctx, buffer, size, pos);
89 spu_release(ctx); 205 spu_release(ctx);
206
90 return ret; 207 return ret;
91} 208}
92 209
@@ -106,7 +223,10 @@ spufs_mem_write(struct file *file, const char __user *buffer,
106 if (size > LS_SIZE - pos) 223 if (size > LS_SIZE - pos)
107 size = LS_SIZE - pos; 224 size = LS_SIZE - pos;
108 225
109 spu_acquire(ctx); 226 ret = spu_acquire(ctx);
227 if (ret)
228 return ret;
229
110 local_store = ctx->ops->get_ls(ctx); 230 local_store = ctx->ops->get_ls(ctx);
111 ret = copy_from_user(local_store + pos, buffer, size); 231 ret = copy_from_user(local_store + pos, buffer, size);
112 spu_release(ctx); 232 spu_release(ctx);
@@ -146,7 +266,8 @@ static unsigned long spufs_mem_mmap_nopfn(struct vm_area_struct *vma,
146 pr_debug("spufs_mem_mmap_nopfn address=0x%lx -> 0x%lx, offset=0x%lx\n", 266 pr_debug("spufs_mem_mmap_nopfn address=0x%lx -> 0x%lx, offset=0x%lx\n",
147 addr0, address, offset); 267 addr0, address, offset);
148 268
149 spu_acquire(ctx); 269 if (spu_acquire(ctx))
270 return NOPFN_REFAULT;
150 271
151 if (ctx->state == SPU_STATE_SAVED) { 272 if (ctx->state == SPU_STATE_SAVED) {
152 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) 273 vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
@@ -236,23 +357,32 @@ static unsigned long spufs_ps_nopfn(struct vm_area_struct *vma,
236{ 357{
237 struct spu_context *ctx = vma->vm_file->private_data; 358 struct spu_context *ctx = vma->vm_file->private_data;
238 unsigned long area, offset = address - vma->vm_start; 359 unsigned long area, offset = address - vma->vm_start;
239 int ret;
240 360
241 offset += vma->vm_pgoff << PAGE_SHIFT; 361 offset += vma->vm_pgoff << PAGE_SHIFT;
242 if (offset >= ps_size) 362 if (offset >= ps_size)
243 return NOPFN_SIGBUS; 363 return NOPFN_SIGBUS;
244 364
245 /* error here usually means a signal.. we might want to test 365 /*
246 * the error code more precisely though 366 * We have to wait for context to be loaded before we have
367 * pages to hand out to the user, but we don't want to wait
368 * with the mmap_sem held.
369 * It is possible to drop the mmap_sem here, but then we need
370 * to return NOPFN_REFAULT because the mappings may have
371 * hanged.
247 */ 372 */
248 ret = spu_acquire_runnable(ctx, 0); 373 if (spu_acquire(ctx))
249 if (ret)
250 return NOPFN_REFAULT; 374 return NOPFN_REFAULT;
251 375
252 area = ctx->spu->problem_phys + ps_offs; 376 if (ctx->state == SPU_STATE_SAVED) {
253 vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT); 377 up_read(&current->mm->mmap_sem);
254 spu_release(ctx); 378 spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
379 down_read(&current->mm->mmap_sem);
380 } else {
381 area = ctx->spu->problem_phys + ps_offs;
382 vm_insert_pfn(vma, address, (area + offset) >> PAGE_SHIFT);
383 }
255 384
385 spu_release(ctx);
256 return NOPFN_REFAULT; 386 return NOPFN_REFAULT;
257} 387}
258 388
@@ -286,25 +416,32 @@ static int spufs_cntl_mmap(struct file *file, struct vm_area_struct *vma)
286#define spufs_cntl_mmap NULL 416#define spufs_cntl_mmap NULL
287#endif /* !SPUFS_MMAP_4K */ 417#endif /* !SPUFS_MMAP_4K */
288 418
289static u64 spufs_cntl_get(void *data) 419static int spufs_cntl_get(void *data, u64 *val)
290{ 420{
291 struct spu_context *ctx = data; 421 struct spu_context *ctx = data;
292 u64 val; 422 int ret;
293 423
294 spu_acquire(ctx); 424 ret = spu_acquire(ctx);
295 val = ctx->ops->status_read(ctx); 425 if (ret)
426 return ret;
427 *val = ctx->ops->status_read(ctx);
296 spu_release(ctx); 428 spu_release(ctx);
297 429
298 return val; 430 return 0;
299} 431}
300 432
301static void spufs_cntl_set(void *data, u64 val) 433static int spufs_cntl_set(void *data, u64 val)
302{ 434{
303 struct spu_context *ctx = data; 435 struct spu_context *ctx = data;
436 int ret;
304 437
305 spu_acquire(ctx); 438 ret = spu_acquire(ctx);
439 if (ret)
440 return ret;
306 ctx->ops->runcntl_write(ctx, val); 441 ctx->ops->runcntl_write(ctx, val);
307 spu_release(ctx); 442 spu_release(ctx);
443
444 return 0;
308} 445}
309 446
310static int spufs_cntl_open(struct inode *inode, struct file *file) 447static int spufs_cntl_open(struct inode *inode, struct file *file)
@@ -317,7 +454,7 @@ static int spufs_cntl_open(struct inode *inode, struct file *file)
317 if (!i->i_openers++) 454 if (!i->i_openers++)
318 ctx->cntl = inode->i_mapping; 455 ctx->cntl = inode->i_mapping;
319 mutex_unlock(&ctx->mapping_lock); 456 mutex_unlock(&ctx->mapping_lock);
320 return simple_attr_open(inode, file, spufs_cntl_get, 457 return spufs_attr_open(inode, file, spufs_cntl_get,
321 spufs_cntl_set, "0x%08lx"); 458 spufs_cntl_set, "0x%08lx");
322} 459}
323 460
@@ -327,7 +464,7 @@ spufs_cntl_release(struct inode *inode, struct file *file)
327 struct spufs_inode_info *i = SPUFS_I(inode); 464 struct spufs_inode_info *i = SPUFS_I(inode);
328 struct spu_context *ctx = i->i_ctx; 465 struct spu_context *ctx = i->i_ctx;
329 466
330 simple_attr_close(inode, file); 467 spufs_attr_release(inode, file);
331 468
332 mutex_lock(&ctx->mapping_lock); 469 mutex_lock(&ctx->mapping_lock);
333 if (!--i->i_openers) 470 if (!--i->i_openers)
@@ -339,8 +476,8 @@ spufs_cntl_release(struct inode *inode, struct file *file)
339static const struct file_operations spufs_cntl_fops = { 476static const struct file_operations spufs_cntl_fops = {
340 .open = spufs_cntl_open, 477 .open = spufs_cntl_open,
341 .release = spufs_cntl_release, 478 .release = spufs_cntl_release,
342 .read = simple_attr_read, 479 .read = spufs_attr_read,
343 .write = simple_attr_write, 480 .write = spufs_attr_write,
344 .mmap = spufs_cntl_mmap, 481 .mmap = spufs_cntl_mmap,
345}; 482};
346 483
@@ -368,7 +505,9 @@ spufs_regs_read(struct file *file, char __user *buffer,
368 int ret; 505 int ret;
369 struct spu_context *ctx = file->private_data; 506 struct spu_context *ctx = file->private_data;
370 507
371 spu_acquire_saved(ctx); 508 ret = spu_acquire_saved(ctx);
509 if (ret)
510 return ret;
372 ret = __spufs_regs_read(ctx, buffer, size, pos); 511 ret = __spufs_regs_read(ctx, buffer, size, pos);
373 spu_release_saved(ctx); 512 spu_release_saved(ctx);
374 return ret; 513 return ret;
@@ -387,7 +526,9 @@ spufs_regs_write(struct file *file, const char __user *buffer,
387 return -EFBIG; 526 return -EFBIG;
388 *pos += size; 527 *pos += size;
389 528
390 spu_acquire_saved(ctx); 529 ret = spu_acquire_saved(ctx);
530 if (ret)
531 return ret;
391 532
392 ret = copy_from_user(lscsa->gprs + *pos - size, 533 ret = copy_from_user(lscsa->gprs + *pos - size,
393 buffer, size) ? -EFAULT : size; 534 buffer, size) ? -EFAULT : size;
@@ -419,7 +560,9 @@ spufs_fpcr_read(struct file *file, char __user * buffer,
419 int ret; 560 int ret;
420 struct spu_context *ctx = file->private_data; 561 struct spu_context *ctx = file->private_data;
421 562
422 spu_acquire_saved(ctx); 563 ret = spu_acquire_saved(ctx);
564 if (ret)
565 return ret;
423 ret = __spufs_fpcr_read(ctx, buffer, size, pos); 566 ret = __spufs_fpcr_read(ctx, buffer, size, pos);
424 spu_release_saved(ctx); 567 spu_release_saved(ctx);
425 return ret; 568 return ret;
@@ -436,10 +579,12 @@ spufs_fpcr_write(struct file *file, const char __user * buffer,
436 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size); 579 size = min_t(ssize_t, sizeof(lscsa->fpcr) - *pos, size);
437 if (size <= 0) 580 if (size <= 0)
438 return -EFBIG; 581 return -EFBIG;
439 *pos += size;
440 582
441 spu_acquire_saved(ctx); 583 ret = spu_acquire_saved(ctx);
584 if (ret)
585 return ret;
442 586
587 *pos += size;
443 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size, 588 ret = copy_from_user((char *)&lscsa->fpcr + *pos - size,
444 buffer, size) ? -EFAULT : size; 589 buffer, size) ? -EFAULT : size;
445 590
@@ -486,7 +631,10 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf,
486 631
487 udata = (void __user *)buf; 632 udata = (void __user *)buf;
488 633
489 spu_acquire(ctx); 634 count = spu_acquire(ctx);
635 if (count)
636 return count;
637
490 for (count = 0; (count + 4) <= len; count += 4, udata++) { 638 for (count = 0; (count + 4) <= len; count += 4, udata++) {
491 int ret; 639 int ret;
492 ret = ctx->ops->mbox_read(ctx, &mbox_data); 640 ret = ctx->ops->mbox_read(ctx, &mbox_data);
@@ -522,12 +670,15 @@ static ssize_t spufs_mbox_stat_read(struct file *file, char __user *buf,
522 size_t len, loff_t *pos) 670 size_t len, loff_t *pos)
523{ 671{
524 struct spu_context *ctx = file->private_data; 672 struct spu_context *ctx = file->private_data;
673 ssize_t ret;
525 u32 mbox_stat; 674 u32 mbox_stat;
526 675
527 if (len < 4) 676 if (len < 4)
528 return -EINVAL; 677 return -EINVAL;
529 678
530 spu_acquire(ctx); 679 ret = spu_acquire(ctx);
680 if (ret)
681 return ret;
531 682
532 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff; 683 mbox_stat = ctx->ops->mbox_stat_read(ctx) & 0xff;
533 684
@@ -562,6 +713,9 @@ void spufs_ibox_callback(struct spu *spu)
562{ 713{
563 struct spu_context *ctx = spu->ctx; 714 struct spu_context *ctx = spu->ctx;
564 715
716 if (!ctx)
717 return;
718
565 wake_up_all(&ctx->ibox_wq); 719 wake_up_all(&ctx->ibox_wq);
566 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN); 720 kill_fasync(&ctx->ibox_fasync, SIGIO, POLLIN);
567} 721}
@@ -593,7 +747,9 @@ static ssize_t spufs_ibox_read(struct file *file, char __user *buf,
593 747
594 udata = (void __user *)buf; 748 udata = (void __user *)buf;
595 749
596 spu_acquire(ctx); 750 count = spu_acquire(ctx);
751 if (count)
752 return count;
597 753
598 /* wait only for the first element */ 754 /* wait only for the first element */
599 count = 0; 755 count = 0;
@@ -639,7 +795,11 @@ static unsigned int spufs_ibox_poll(struct file *file, poll_table *wait)
639 795
640 poll_wait(file, &ctx->ibox_wq, wait); 796 poll_wait(file, &ctx->ibox_wq, wait);
641 797
642 spu_acquire(ctx); 798 /*
799 * For now keep this uninterruptible and also ignore the rule
800 * that poll should not sleep. Will be fixed later.
801 */
802 mutex_lock(&ctx->state_mutex);
643 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM); 803 mask = ctx->ops->mbox_stat_poll(ctx, POLLIN | POLLRDNORM);
644 spu_release(ctx); 804 spu_release(ctx);
645 805
@@ -657,12 +817,15 @@ static ssize_t spufs_ibox_stat_read(struct file *file, char __user *buf,
657 size_t len, loff_t *pos) 817 size_t len, loff_t *pos)
658{ 818{
659 struct spu_context *ctx = file->private_data; 819 struct spu_context *ctx = file->private_data;
820 ssize_t ret;
660 u32 ibox_stat; 821 u32 ibox_stat;
661 822
662 if (len < 4) 823 if (len < 4)
663 return -EINVAL; 824 return -EINVAL;
664 825
665 spu_acquire(ctx); 826 ret = spu_acquire(ctx);
827 if (ret)
828 return ret;
666 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff; 829 ibox_stat = (ctx->ops->mbox_stat_read(ctx) >> 16) & 0xff;
667 spu_release(ctx); 830 spu_release(ctx);
668 831
@@ -698,6 +861,9 @@ void spufs_wbox_callback(struct spu *spu)
698{ 861{
699 struct spu_context *ctx = spu->ctx; 862 struct spu_context *ctx = spu->ctx;
700 863
864 if (!ctx)
865 return;
866
701 wake_up_all(&ctx->wbox_wq); 867 wake_up_all(&ctx->wbox_wq);
702 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT); 868 kill_fasync(&ctx->wbox_fasync, SIGIO, POLLOUT);
703} 869}
@@ -731,7 +897,9 @@ static ssize_t spufs_wbox_write(struct file *file, const char __user *buf,
731 if (__get_user(wbox_data, udata)) 897 if (__get_user(wbox_data, udata))
732 return -EFAULT; 898 return -EFAULT;
733 899
734 spu_acquire(ctx); 900 count = spu_acquire(ctx);
901 if (count)
902 return count;
735 903
736 /* 904 /*
737 * make sure we can at least write one element, by waiting 905 * make sure we can at least write one element, by waiting
@@ -772,7 +940,11 @@ static unsigned int spufs_wbox_poll(struct file *file, poll_table *wait)
772 940
773 poll_wait(file, &ctx->wbox_wq, wait); 941 poll_wait(file, &ctx->wbox_wq, wait);
774 942
775 spu_acquire(ctx); 943 /*
944 * For now keep this uninterruptible and also ignore the rule
945 * that poll should not sleep. Will be fixed later.
946 */
947 mutex_lock(&ctx->state_mutex);
776 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM); 948 mask = ctx->ops->mbox_stat_poll(ctx, POLLOUT | POLLWRNORM);
777 spu_release(ctx); 949 spu_release(ctx);
778 950
@@ -790,12 +962,15 @@ static ssize_t spufs_wbox_stat_read(struct file *file, char __user *buf,
790 size_t len, loff_t *pos) 962 size_t len, loff_t *pos)
791{ 963{
792 struct spu_context *ctx = file->private_data; 964 struct spu_context *ctx = file->private_data;
965 ssize_t ret;
793 u32 wbox_stat; 966 u32 wbox_stat;
794 967
795 if (len < 4) 968 if (len < 4)
796 return -EINVAL; 969 return -EINVAL;
797 970
798 spu_acquire(ctx); 971 ret = spu_acquire(ctx);
972 if (ret)
973 return ret;
799 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff; 974 wbox_stat = (ctx->ops->mbox_stat_read(ctx) >> 8) & 0xff;
800 spu_release(ctx); 975 spu_release(ctx);
801 976
@@ -866,7 +1041,9 @@ static ssize_t spufs_signal1_read(struct file *file, char __user *buf,
866 int ret; 1041 int ret;
867 struct spu_context *ctx = file->private_data; 1042 struct spu_context *ctx = file->private_data;
868 1043
869 spu_acquire_saved(ctx); 1044 ret = spu_acquire_saved(ctx);
1045 if (ret)
1046 return ret;
870 ret = __spufs_signal1_read(ctx, buf, len, pos); 1047 ret = __spufs_signal1_read(ctx, buf, len, pos);
871 spu_release_saved(ctx); 1048 spu_release_saved(ctx);
872 1049
@@ -877,6 +1054,7 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
877 size_t len, loff_t *pos) 1054 size_t len, loff_t *pos)
878{ 1055{
879 struct spu_context *ctx; 1056 struct spu_context *ctx;
1057 ssize_t ret;
880 u32 data; 1058 u32 data;
881 1059
882 ctx = file->private_data; 1060 ctx = file->private_data;
@@ -887,7 +1065,9 @@ static ssize_t spufs_signal1_write(struct file *file, const char __user *buf,
887 if (copy_from_user(&data, buf, 4)) 1065 if (copy_from_user(&data, buf, 4))
888 return -EFAULT; 1066 return -EFAULT;
889 1067
890 spu_acquire(ctx); 1068 ret = spu_acquire(ctx);
1069 if (ret)
1070 return ret;
891 ctx->ops->signal1_write(ctx, data); 1071 ctx->ops->signal1_write(ctx, data);
892 spu_release(ctx); 1072 spu_release(ctx);
893 1073
@@ -997,7 +1177,9 @@ static ssize_t spufs_signal2_read(struct file *file, char __user *buf,
997 struct spu_context *ctx = file->private_data; 1177 struct spu_context *ctx = file->private_data;
998 int ret; 1178 int ret;
999 1179
1000 spu_acquire_saved(ctx); 1180 ret = spu_acquire_saved(ctx);
1181 if (ret)
1182 return ret;
1001 ret = __spufs_signal2_read(ctx, buf, len, pos); 1183 ret = __spufs_signal2_read(ctx, buf, len, pos);
1002 spu_release_saved(ctx); 1184 spu_release_saved(ctx);
1003 1185
@@ -1008,6 +1190,7 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
1008 size_t len, loff_t *pos) 1190 size_t len, loff_t *pos)
1009{ 1191{
1010 struct spu_context *ctx; 1192 struct spu_context *ctx;
1193 ssize_t ret;
1011 u32 data; 1194 u32 data;
1012 1195
1013 ctx = file->private_data; 1196 ctx = file->private_data;
@@ -1018,7 +1201,9 @@ static ssize_t spufs_signal2_write(struct file *file, const char __user *buf,
1018 if (copy_from_user(&data, buf, 4)) 1201 if (copy_from_user(&data, buf, 4))
1019 return -EFAULT; 1202 return -EFAULT;
1020 1203
1021 spu_acquire(ctx); 1204 ret = spu_acquire(ctx);
1205 if (ret)
1206 return ret;
1022 ctx->ops->signal2_write(ctx, data); 1207 ctx->ops->signal2_write(ctx, data);
1023 spu_release(ctx); 1208 spu_release(ctx);
1024 1209
@@ -1086,33 +1271,42 @@ static const struct file_operations spufs_signal2_nosched_fops = {
1086#define SPU_ATTR_ACQUIRE_SAVED 2 1271#define SPU_ATTR_ACQUIRE_SAVED 2
1087 1272
1088#define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \ 1273#define DEFINE_SPUFS_ATTRIBUTE(__name, __get, __set, __fmt, __acquire) \
1089static u64 __##__get(void *data) \ 1274static int __##__get(void *data, u64 *val) \
1090{ \ 1275{ \
1091 struct spu_context *ctx = data; \ 1276 struct spu_context *ctx = data; \
1092 u64 ret; \ 1277 int ret = 0; \
1093 \ 1278 \
1094 if (__acquire == SPU_ATTR_ACQUIRE) { \ 1279 if (__acquire == SPU_ATTR_ACQUIRE) { \
1095 spu_acquire(ctx); \ 1280 ret = spu_acquire(ctx); \
1096 ret = __get(ctx); \ 1281 if (ret) \
1282 return ret; \
1283 *val = __get(ctx); \
1097 spu_release(ctx); \ 1284 spu_release(ctx); \
1098 } else if (__acquire == SPU_ATTR_ACQUIRE_SAVED) { \ 1285 } else if (__acquire == SPU_ATTR_ACQUIRE_SAVED) { \
1099 spu_acquire_saved(ctx); \ 1286 ret = spu_acquire_saved(ctx); \
1100 ret = __get(ctx); \ 1287 if (ret) \
1288 return ret; \
1289 *val = __get(ctx); \
1101 spu_release_saved(ctx); \ 1290 spu_release_saved(ctx); \
1102 } else \ 1291 } else \
1103 ret = __get(ctx); \ 1292 *val = __get(ctx); \
1104 \ 1293 \
1105 return ret; \ 1294 return 0; \
1106} \ 1295} \
1107DEFINE_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt); 1296DEFINE_SPUFS_SIMPLE_ATTRIBUTE(__name, __##__get, __set, __fmt);
1108 1297
1109static void spufs_signal1_type_set(void *data, u64 val) 1298static int spufs_signal1_type_set(void *data, u64 val)
1110{ 1299{
1111 struct spu_context *ctx = data; 1300 struct spu_context *ctx = data;
1301 int ret;
1112 1302
1113 spu_acquire(ctx); 1303 ret = spu_acquire(ctx);
1304 if (ret)
1305 return ret;
1114 ctx->ops->signal1_type_set(ctx, val); 1306 ctx->ops->signal1_type_set(ctx, val);
1115 spu_release(ctx); 1307 spu_release(ctx);
1308
1309 return 0;
1116} 1310}
1117 1311
1118static u64 spufs_signal1_type_get(struct spu_context *ctx) 1312static u64 spufs_signal1_type_get(struct spu_context *ctx)
@@ -1123,13 +1317,18 @@ DEFINE_SPUFS_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get,
1123 spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE); 1317 spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE);
1124 1318
1125 1319
1126static void spufs_signal2_type_set(void *data, u64 val) 1320static int spufs_signal2_type_set(void *data, u64 val)
1127{ 1321{
1128 struct spu_context *ctx = data; 1322 struct spu_context *ctx = data;
1323 int ret;
1129 1324
1130 spu_acquire(ctx); 1325 ret = spu_acquire(ctx);
1326 if (ret)
1327 return ret;
1131 ctx->ops->signal2_type_set(ctx, val); 1328 ctx->ops->signal2_type_set(ctx, val);
1132 spu_release(ctx); 1329 spu_release(ctx);
1330
1331 return 0;
1133} 1332}
1134 1333
1135static u64 spufs_signal2_type_get(struct spu_context *ctx) 1334static u64 spufs_signal2_type_get(struct spu_context *ctx)
@@ -1329,6 +1528,9 @@ void spufs_mfc_callback(struct spu *spu)
1329{ 1528{
1330 struct spu_context *ctx = spu->ctx; 1529 struct spu_context *ctx = spu->ctx;
1331 1530
1531 if (!ctx)
1532 return;
1533
1332 wake_up_all(&ctx->mfc_wq); 1534 wake_up_all(&ctx->mfc_wq);
1333 1535
1334 pr_debug("%s %s\n", __FUNCTION__, spu->name); 1536 pr_debug("%s %s\n", __FUNCTION__, spu->name);
@@ -1375,12 +1577,17 @@ static ssize_t spufs_mfc_read(struct file *file, char __user *buffer,
1375 if (size != 4) 1577 if (size != 4)
1376 goto out; 1578 goto out;
1377 1579
1378 spu_acquire(ctx); 1580 ret = spu_acquire(ctx);
1581 if (ret)
1582 return ret;
1583
1584 ret = -EINVAL;
1379 if (file->f_flags & O_NONBLOCK) { 1585 if (file->f_flags & O_NONBLOCK) {
1380 status = ctx->ops->read_mfc_tagstatus(ctx); 1586 status = ctx->ops->read_mfc_tagstatus(ctx);
1381 if (!(status & ctx->tagwait)) 1587 if (!(status & ctx->tagwait))
1382 ret = -EAGAIN; 1588 ret = -EAGAIN;
1383 else 1589 else
1590 /* XXX(hch): shouldn't we clear ret here? */
1384 ctx->tagwait &= ~status; 1591 ctx->tagwait &= ~status;
1385 } else { 1592 } else {
1386 ret = spufs_wait(ctx->mfc_wq, 1593 ret = spufs_wait(ctx->mfc_wq,
@@ -1505,7 +1712,11 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer,
1505 if (ret) 1712 if (ret)
1506 goto out; 1713 goto out;
1507 1714
1508 ret = spu_acquire_runnable(ctx, 0); 1715 ret = spu_acquire(ctx);
1716 if (ret)
1717 goto out;
1718
1719 ret = spufs_wait(ctx->run_wq, ctx->state == SPU_STATE_RUNNABLE);
1509 if (ret) 1720 if (ret)
1510 goto out; 1721 goto out;
1511 1722
@@ -1539,7 +1750,11 @@ static unsigned int spufs_mfc_poll(struct file *file,poll_table *wait)
1539 1750
1540 poll_wait(file, &ctx->mfc_wq, wait); 1751 poll_wait(file, &ctx->mfc_wq, wait);
1541 1752
1542 spu_acquire(ctx); 1753 /*
1754 * For now keep this uninterruptible and also ignore the rule
1755 * that poll should not sleep. Will be fixed later.
1756 */
1757 mutex_lock(&ctx->state_mutex);
1543 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2); 1758 ctx->ops->set_mfc_query(ctx, ctx->tagwait, 2);
1544 free_elements = ctx->ops->get_mfc_free_elements(ctx); 1759 free_elements = ctx->ops->get_mfc_free_elements(ctx);
1545 tagstatus = ctx->ops->read_mfc_tagstatus(ctx); 1760 tagstatus = ctx->ops->read_mfc_tagstatus(ctx);
@@ -1562,7 +1777,9 @@ static int spufs_mfc_flush(struct file *file, fl_owner_t id)
1562 struct spu_context *ctx = file->private_data; 1777 struct spu_context *ctx = file->private_data;
1563 int ret; 1778 int ret;
1564 1779
1565 spu_acquire(ctx); 1780 ret = spu_acquire(ctx);
1781 if (ret)
1782 return ret;
1566#if 0 1783#if 0
1567/* this currently hangs */ 1784/* this currently hangs */
1568 ret = spufs_wait(ctx->mfc_wq, 1785 ret = spufs_wait(ctx->mfc_wq,
@@ -1605,12 +1822,18 @@ static const struct file_operations spufs_mfc_fops = {
1605 .mmap = spufs_mfc_mmap, 1822 .mmap = spufs_mfc_mmap,
1606}; 1823};
1607 1824
1608static void spufs_npc_set(void *data, u64 val) 1825static int spufs_npc_set(void *data, u64 val)
1609{ 1826{
1610 struct spu_context *ctx = data; 1827 struct spu_context *ctx = data;
1611 spu_acquire(ctx); 1828 int ret;
1829
1830 ret = spu_acquire(ctx);
1831 if (ret)
1832 return ret;
1612 ctx->ops->npc_write(ctx, val); 1833 ctx->ops->npc_write(ctx, val);
1613 spu_release(ctx); 1834 spu_release(ctx);
1835
1836 return 0;
1614} 1837}
1615 1838
1616static u64 spufs_npc_get(struct spu_context *ctx) 1839static u64 spufs_npc_get(struct spu_context *ctx)
@@ -1620,13 +1843,19 @@ static u64 spufs_npc_get(struct spu_context *ctx)
1620DEFINE_SPUFS_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set, 1843DEFINE_SPUFS_ATTRIBUTE(spufs_npc_ops, spufs_npc_get, spufs_npc_set,
1621 "0x%llx\n", SPU_ATTR_ACQUIRE); 1844 "0x%llx\n", SPU_ATTR_ACQUIRE);
1622 1845
1623static void spufs_decr_set(void *data, u64 val) 1846static int spufs_decr_set(void *data, u64 val)
1624{ 1847{
1625 struct spu_context *ctx = data; 1848 struct spu_context *ctx = data;
1626 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1849 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1627 spu_acquire_saved(ctx); 1850 int ret;
1851
1852 ret = spu_acquire_saved(ctx);
1853 if (ret)
1854 return ret;
1628 lscsa->decr.slot[0] = (u32) val; 1855 lscsa->decr.slot[0] = (u32) val;
1629 spu_release_saved(ctx); 1856 spu_release_saved(ctx);
1857
1858 return 0;
1630} 1859}
1631 1860
1632static u64 spufs_decr_get(struct spu_context *ctx) 1861static u64 spufs_decr_get(struct spu_context *ctx)
@@ -1637,15 +1866,21 @@ static u64 spufs_decr_get(struct spu_context *ctx)
1637DEFINE_SPUFS_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set, 1866DEFINE_SPUFS_ATTRIBUTE(spufs_decr_ops, spufs_decr_get, spufs_decr_set,
1638 "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED); 1867 "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED);
1639 1868
1640static void spufs_decr_status_set(void *data, u64 val) 1869static int spufs_decr_status_set(void *data, u64 val)
1641{ 1870{
1642 struct spu_context *ctx = data; 1871 struct spu_context *ctx = data;
1643 spu_acquire_saved(ctx); 1872 int ret;
1873
1874 ret = spu_acquire_saved(ctx);
1875 if (ret)
1876 return ret;
1644 if (val) 1877 if (val)
1645 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING; 1878 ctx->csa.priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
1646 else 1879 else
1647 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING; 1880 ctx->csa.priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
1648 spu_release_saved(ctx); 1881 spu_release_saved(ctx);
1882
1883 return 0;
1649} 1884}
1650 1885
1651static u64 spufs_decr_status_get(struct spu_context *ctx) 1886static u64 spufs_decr_status_get(struct spu_context *ctx)
@@ -1659,13 +1894,19 @@ DEFINE_SPUFS_ATTRIBUTE(spufs_decr_status_ops, spufs_decr_status_get,
1659 spufs_decr_status_set, "0x%llx\n", 1894 spufs_decr_status_set, "0x%llx\n",
1660 SPU_ATTR_ACQUIRE_SAVED); 1895 SPU_ATTR_ACQUIRE_SAVED);
1661 1896
1662static void spufs_event_mask_set(void *data, u64 val) 1897static int spufs_event_mask_set(void *data, u64 val)
1663{ 1898{
1664 struct spu_context *ctx = data; 1899 struct spu_context *ctx = data;
1665 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1900 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1666 spu_acquire_saved(ctx); 1901 int ret;
1902
1903 ret = spu_acquire_saved(ctx);
1904 if (ret)
1905 return ret;
1667 lscsa->event_mask.slot[0] = (u32) val; 1906 lscsa->event_mask.slot[0] = (u32) val;
1668 spu_release_saved(ctx); 1907 spu_release_saved(ctx);
1908
1909 return 0;
1669} 1910}
1670 1911
1671static u64 spufs_event_mask_get(struct spu_context *ctx) 1912static u64 spufs_event_mask_get(struct spu_context *ctx)
@@ -1690,13 +1931,19 @@ static u64 spufs_event_status_get(struct spu_context *ctx)
1690DEFINE_SPUFS_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get, 1931DEFINE_SPUFS_ATTRIBUTE(spufs_event_status_ops, spufs_event_status_get,
1691 NULL, "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED) 1932 NULL, "0x%llx\n", SPU_ATTR_ACQUIRE_SAVED)
1692 1933
1693static void spufs_srr0_set(void *data, u64 val) 1934static int spufs_srr0_set(void *data, u64 val)
1694{ 1935{
1695 struct spu_context *ctx = data; 1936 struct spu_context *ctx = data;
1696 struct spu_lscsa *lscsa = ctx->csa.lscsa; 1937 struct spu_lscsa *lscsa = ctx->csa.lscsa;
1697 spu_acquire_saved(ctx); 1938 int ret;
1939
1940 ret = spu_acquire_saved(ctx);
1941 if (ret)
1942 return ret;
1698 lscsa->srr0.slot[0] = (u32) val; 1943 lscsa->srr0.slot[0] = (u32) val;
1699 spu_release_saved(ctx); 1944 spu_release_saved(ctx);
1945
1946 return 0;
1700} 1947}
1701 1948
1702static u64 spufs_srr0_get(struct spu_context *ctx) 1949static u64 spufs_srr0_get(struct spu_context *ctx)
@@ -1727,10 +1974,12 @@ static u64 spufs_object_id_get(struct spu_context *ctx)
1727 return ctx->object_id; 1974 return ctx->object_id;
1728} 1975}
1729 1976
1730static void spufs_object_id_set(void *data, u64 id) 1977static int spufs_object_id_set(void *data, u64 id)
1731{ 1978{
1732 struct spu_context *ctx = data; 1979 struct spu_context *ctx = data;
1733 ctx->object_id = id; 1980 ctx->object_id = id;
1981
1982 return 0;
1734} 1983}
1735 1984
1736DEFINE_SPUFS_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get, 1985DEFINE_SPUFS_ATTRIBUTE(spufs_object_id_ops, spufs_object_id_get,
@@ -1777,13 +2026,13 @@ static const struct file_operations spufs_caps_fops = {
1777static ssize_t __spufs_mbox_info_read(struct spu_context *ctx, 2026static ssize_t __spufs_mbox_info_read(struct spu_context *ctx,
1778 char __user *buf, size_t len, loff_t *pos) 2027 char __user *buf, size_t len, loff_t *pos)
1779{ 2028{
1780 u32 mbox_stat;
1781 u32 data; 2029 u32 data;
1782 2030
1783 mbox_stat = ctx->csa.prob.mb_stat_R; 2031 /* EOF if there's no entry in the mbox */
1784 if (mbox_stat & 0x0000ff) { 2032 if (!(ctx->csa.prob.mb_stat_R & 0x0000ff))
1785 data = ctx->csa.prob.pu_mb_R; 2033 return 0;
1786 } 2034
2035 data = ctx->csa.prob.pu_mb_R;
1787 2036
1788 return simple_read_from_buffer(buf, len, pos, &data, sizeof data); 2037 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
1789} 2038}
@@ -1797,7 +2046,9 @@ static ssize_t spufs_mbox_info_read(struct file *file, char __user *buf,
1797 if (!access_ok(VERIFY_WRITE, buf, len)) 2046 if (!access_ok(VERIFY_WRITE, buf, len))
1798 return -EFAULT; 2047 return -EFAULT;
1799 2048
1800 spu_acquire_saved(ctx); 2049 ret = spu_acquire_saved(ctx);
2050 if (ret)
2051 return ret;
1801 spin_lock(&ctx->csa.register_lock); 2052 spin_lock(&ctx->csa.register_lock);
1802 ret = __spufs_mbox_info_read(ctx, buf, len, pos); 2053 ret = __spufs_mbox_info_read(ctx, buf, len, pos);
1803 spin_unlock(&ctx->csa.register_lock); 2054 spin_unlock(&ctx->csa.register_lock);
@@ -1815,13 +2066,13 @@ static const struct file_operations spufs_mbox_info_fops = {
1815static ssize_t __spufs_ibox_info_read(struct spu_context *ctx, 2066static ssize_t __spufs_ibox_info_read(struct spu_context *ctx,
1816 char __user *buf, size_t len, loff_t *pos) 2067 char __user *buf, size_t len, loff_t *pos)
1817{ 2068{
1818 u32 ibox_stat;
1819 u32 data; 2069 u32 data;
1820 2070
1821 ibox_stat = ctx->csa.prob.mb_stat_R; 2071 /* EOF if there's no entry in the ibox */
1822 if (ibox_stat & 0xff0000) { 2072 if (!(ctx->csa.prob.mb_stat_R & 0xff0000))
1823 data = ctx->csa.priv2.puint_mb_R; 2073 return 0;
1824 } 2074
2075 data = ctx->csa.priv2.puint_mb_R;
1825 2076
1826 return simple_read_from_buffer(buf, len, pos, &data, sizeof data); 2077 return simple_read_from_buffer(buf, len, pos, &data, sizeof data);
1827} 2078}
@@ -1835,7 +2086,9 @@ static ssize_t spufs_ibox_info_read(struct file *file, char __user *buf,
1835 if (!access_ok(VERIFY_WRITE, buf, len)) 2086 if (!access_ok(VERIFY_WRITE, buf, len))
1836 return -EFAULT; 2087 return -EFAULT;
1837 2088
1838 spu_acquire_saved(ctx); 2089 ret = spu_acquire_saved(ctx);
2090 if (ret)
2091 return ret;
1839 spin_lock(&ctx->csa.register_lock); 2092 spin_lock(&ctx->csa.register_lock);
1840 ret = __spufs_ibox_info_read(ctx, buf, len, pos); 2093 ret = __spufs_ibox_info_read(ctx, buf, len, pos);
1841 spin_unlock(&ctx->csa.register_lock); 2094 spin_unlock(&ctx->csa.register_lock);
@@ -1876,7 +2129,9 @@ static ssize_t spufs_wbox_info_read(struct file *file, char __user *buf,
1876 if (!access_ok(VERIFY_WRITE, buf, len)) 2129 if (!access_ok(VERIFY_WRITE, buf, len))
1877 return -EFAULT; 2130 return -EFAULT;
1878 2131
1879 spu_acquire_saved(ctx); 2132 ret = spu_acquire_saved(ctx);
2133 if (ret)
2134 return ret;
1880 spin_lock(&ctx->csa.register_lock); 2135 spin_lock(&ctx->csa.register_lock);
1881 ret = __spufs_wbox_info_read(ctx, buf, len, pos); 2136 ret = __spufs_wbox_info_read(ctx, buf, len, pos);
1882 spin_unlock(&ctx->csa.register_lock); 2137 spin_unlock(&ctx->csa.register_lock);
@@ -1926,7 +2181,9 @@ static ssize_t spufs_dma_info_read(struct file *file, char __user *buf,
1926 if (!access_ok(VERIFY_WRITE, buf, len)) 2181 if (!access_ok(VERIFY_WRITE, buf, len))
1927 return -EFAULT; 2182 return -EFAULT;
1928 2183
1929 spu_acquire_saved(ctx); 2184 ret = spu_acquire_saved(ctx);
2185 if (ret)
2186 return ret;
1930 spin_lock(&ctx->csa.register_lock); 2187 spin_lock(&ctx->csa.register_lock);
1931 ret = __spufs_dma_info_read(ctx, buf, len, pos); 2188 ret = __spufs_dma_info_read(ctx, buf, len, pos);
1932 spin_unlock(&ctx->csa.register_lock); 2189 spin_unlock(&ctx->csa.register_lock);
@@ -1977,7 +2234,9 @@ static ssize_t spufs_proxydma_info_read(struct file *file, char __user *buf,
1977 struct spu_context *ctx = file->private_data; 2234 struct spu_context *ctx = file->private_data;
1978 int ret; 2235 int ret;
1979 2236
1980 spu_acquire_saved(ctx); 2237 ret = spu_acquire_saved(ctx);
2238 if (ret)
2239 return ret;
1981 spin_lock(&ctx->csa.register_lock); 2240 spin_lock(&ctx->csa.register_lock);
1982 ret = __spufs_proxydma_info_read(ctx, buf, len, pos); 2241 ret = __spufs_proxydma_info_read(ctx, buf, len, pos);
1983 spin_unlock(&ctx->csa.register_lock); 2242 spin_unlock(&ctx->csa.register_lock);
@@ -2066,8 +2325,12 @@ static unsigned long long spufs_class2_intrs(struct spu_context *ctx)
2066static int spufs_show_stat(struct seq_file *s, void *private) 2325static int spufs_show_stat(struct seq_file *s, void *private)
2067{ 2326{
2068 struct spu_context *ctx = s->private; 2327 struct spu_context *ctx = s->private;
2328 int ret;
2329
2330 ret = spu_acquire(ctx);
2331 if (ret)
2332 return ret;
2069 2333
2070 spu_acquire(ctx);
2071 seq_printf(s, "%s %llu %llu %llu %llu " 2334 seq_printf(s, "%s %llu %llu %llu %llu "
2072 "%llu %llu %llu %llu %llu %llu %llu %llu\n", 2335 "%llu %llu %llu %llu %llu %llu %llu %llu\n",
2073 ctx_state_names[ctx->stats.util_state], 2336 ctx_state_names[ctx->stats.util_state],
diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c
index fc4ed1ffbd4f..64f8540b832c 100644
--- a/arch/powerpc/platforms/cell/spufs/hw_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c
@@ -76,16 +76,18 @@ static unsigned int spu_hw_mbox_stat_poll(struct spu_context *ctx,
76 if (stat & 0xff0000) 76 if (stat & 0xff0000)
77 ret |= POLLIN | POLLRDNORM; 77 ret |= POLLIN | POLLRDNORM;
78 else { 78 else {
79 spu_int_stat_clear(spu, 2, 0x1); 79 spu_int_stat_clear(spu, 2, CLASS2_MAILBOX_INTR);
80 spu_int_mask_or(spu, 2, 0x1); 80 spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
81 } 81 }
82 } 82 }
83 if (events & (POLLOUT | POLLWRNORM)) { 83 if (events & (POLLOUT | POLLWRNORM)) {
84 if (stat & 0x00ff00) 84 if (stat & 0x00ff00)
85 ret = POLLOUT | POLLWRNORM; 85 ret = POLLOUT | POLLWRNORM;
86 else { 86 else {
87 spu_int_stat_clear(spu, 2, 0x10); 87 spu_int_stat_clear(spu, 2,
88 spu_int_mask_or(spu, 2, 0x10); 88 CLASS2_MAILBOX_THRESHOLD_INTR);
89 spu_int_mask_or(spu, 2,
90 CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
89 } 91 }
90 } 92 }
91 spin_unlock_irq(&spu->register_lock); 93 spin_unlock_irq(&spu->register_lock);
@@ -106,7 +108,7 @@ static int spu_hw_ibox_read(struct spu_context *ctx, u32 * data)
106 ret = 4; 108 ret = 4;
107 } else { 109 } else {
108 /* make sure we get woken up by the interrupt */ 110 /* make sure we get woken up by the interrupt */
109 spu_int_mask_or(spu, 2, 0x1); 111 spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_INTR);
110 ret = 0; 112 ret = 0;
111 } 113 }
112 spin_unlock_irq(&spu->register_lock); 114 spin_unlock_irq(&spu->register_lock);
@@ -127,7 +129,7 @@ static int spu_hw_wbox_write(struct spu_context *ctx, u32 data)
127 } else { 129 } else {
128 /* make sure we get woken up by the interrupt when space 130 /* make sure we get woken up by the interrupt when space
129 becomes available */ 131 becomes available */
130 spu_int_mask_or(spu, 2, 0x10); 132 spu_int_mask_or(spu, 2, CLASS2_ENABLE_MAILBOX_THRESHOLD_INTR);
131 ret = 0; 133 ret = 0;
132 } 134 }
133 spin_unlock_irq(&spu->register_lock); 135 spin_unlock_irq(&spu->register_lock);
@@ -206,6 +208,11 @@ static char *spu_hw_get_ls(struct spu_context *ctx)
206 return ctx->spu->local_store; 208 return ctx->spu->local_store;
207} 209}
208 210
211static void spu_hw_privcntl_write(struct spu_context *ctx, u64 val)
212{
213 out_be64(&ctx->spu->priv2->spu_privcntl_RW, val);
214}
215
209static u32 spu_hw_runcntl_read(struct spu_context *ctx) 216static u32 spu_hw_runcntl_read(struct spu_context *ctx)
210{ 217{
211 return in_be32(&ctx->spu->problem->spu_runcntl_RW); 218 return in_be32(&ctx->spu->problem->spu_runcntl_RW);
@@ -215,11 +222,21 @@ static void spu_hw_runcntl_write(struct spu_context *ctx, u32 val)
215{ 222{
216 spin_lock_irq(&ctx->spu->register_lock); 223 spin_lock_irq(&ctx->spu->register_lock);
217 if (val & SPU_RUNCNTL_ISOLATE) 224 if (val & SPU_RUNCNTL_ISOLATE)
218 out_be64(&ctx->spu->priv2->spu_privcntl_RW, 4LL); 225 spu_hw_privcntl_write(ctx,
226 SPU_PRIVCNT_LOAD_REQUEST_ENABLE_MASK);
219 out_be32(&ctx->spu->problem->spu_runcntl_RW, val); 227 out_be32(&ctx->spu->problem->spu_runcntl_RW, val);
220 spin_unlock_irq(&ctx->spu->register_lock); 228 spin_unlock_irq(&ctx->spu->register_lock);
221} 229}
222 230
231static void spu_hw_runcntl_stop(struct spu_context *ctx)
232{
233 spin_lock_irq(&ctx->spu->register_lock);
234 out_be32(&ctx->spu->problem->spu_runcntl_RW, SPU_RUNCNTL_STOP);
235 while (in_be32(&ctx->spu->problem->spu_status_R) & SPU_STATUS_RUNNING)
236 cpu_relax();
237 spin_unlock_irq(&ctx->spu->register_lock);
238}
239
223static void spu_hw_master_start(struct spu_context *ctx) 240static void spu_hw_master_start(struct spu_context *ctx)
224{ 241{
225 struct spu *spu = ctx->spu; 242 struct spu *spu = ctx->spu;
@@ -319,8 +336,10 @@ struct spu_context_ops spu_hw_ops = {
319 .npc_write = spu_hw_npc_write, 336 .npc_write = spu_hw_npc_write,
320 .status_read = spu_hw_status_read, 337 .status_read = spu_hw_status_read,
321 .get_ls = spu_hw_get_ls, 338 .get_ls = spu_hw_get_ls,
339 .privcntl_write = spu_hw_privcntl_write,
322 .runcntl_read = spu_hw_runcntl_read, 340 .runcntl_read = spu_hw_runcntl_read,
323 .runcntl_write = spu_hw_runcntl_write, 341 .runcntl_write = spu_hw_runcntl_write,
342 .runcntl_stop = spu_hw_runcntl_stop,
324 .master_start = spu_hw_master_start, 343 .master_start = spu_hw_master_start,
325 .master_stop = spu_hw_master_stop, 344 .master_stop = spu_hw_master_stop,
326 .set_mfc_query = spu_hw_set_mfc_query, 345 .set_mfc_query = spu_hw_set_mfc_query,
diff --git a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
index f4b3c052dabf..0e9f325c9ff7 100644
--- a/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
+++ b/arch/powerpc/platforms/cell/spufs/lscsa_alloc.c
@@ -28,6 +28,8 @@
28#include <asm/spu_csa.h> 28#include <asm/spu_csa.h>
29#include <asm/mmu.h> 29#include <asm/mmu.h>
30 30
31#include "spufs.h"
32
31static int spu_alloc_lscsa_std(struct spu_state *csa) 33static int spu_alloc_lscsa_std(struct spu_state *csa)
32{ 34{
33 struct spu_lscsa *lscsa; 35 struct spu_lscsa *lscsa;
@@ -73,7 +75,7 @@ int spu_alloc_lscsa(struct spu_state *csa)
73 int i, j, n_4k; 75 int i, j, n_4k;
74 76
75 /* Check availability of 64K pages */ 77 /* Check availability of 64K pages */
76 if (mmu_psize_defs[MMU_PAGE_64K].shift == 0) 78 if (!spu_64k_pages_available())
77 goto fail; 79 goto fail;
78 80
79 csa->use_big_pages = 1; 81 csa->use_big_pages = 1;
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 1ce5e22ea5f4..c01a09da1e56 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -15,24 +15,55 @@ void spufs_stop_callback(struct spu *spu)
15{ 15{
16 struct spu_context *ctx = spu->ctx; 16 struct spu_context *ctx = spu->ctx;
17 17
18 wake_up_all(&ctx->stop_wq); 18 /*
19 * It should be impossible to preempt a context while an exception
20 * is being processed, since the context switch code is specially
21 * coded to deal with interrupts ... But, just in case, sanity check
22 * the context pointer. It is OK to return doing nothing since
23 * the exception will be regenerated when the context is resumed.
24 */
25 if (ctx) {
26 /* Copy exception arguments into module specific structure */
27 ctx->csa.class_0_pending = spu->class_0_pending;
28 ctx->csa.dsisr = spu->dsisr;
29 ctx->csa.dar = spu->dar;
30
31 /* ensure that the exception status has hit memory before a
32 * thread waiting on the context's stop queue is woken */
33 smp_wmb();
34
35 wake_up_all(&ctx->stop_wq);
36 }
37
38 /* Clear callback arguments from spu structure */
39 spu->class_0_pending = 0;
40 spu->dsisr = 0;
41 spu->dar = 0;
19} 42}
20 43
21static inline int spu_stopped(struct spu_context *ctx, u32 *stat) 44int spu_stopped(struct spu_context *ctx, u32 *stat)
22{ 45{
23 struct spu *spu; 46 u64 dsisr;
24 u64 pte_fault; 47 u32 stopped;
25 48
26 *stat = ctx->ops->status_read(ctx); 49 *stat = ctx->ops->status_read(ctx);
27 50
28 spu = ctx->spu; 51 if (test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
29 if (ctx->state != SPU_STATE_RUNNABLE ||
30 test_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags))
31 return 1; 52 return 1;
32 pte_fault = spu->dsisr & 53
33 (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED); 54 stopped = SPU_STATUS_INVALID_INSTR | SPU_STATUS_SINGLE_STEP |
34 return (!(*stat & SPU_STATUS_RUNNING) || pte_fault || spu->class_0_pending) ? 55 SPU_STATUS_STOPPED_BY_HALT | SPU_STATUS_STOPPED_BY_STOP;
35 1 : 0; 56 if (*stat & stopped)
57 return 1;
58
59 dsisr = ctx->csa.dsisr;
60 if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED))
61 return 1;
62
63 if (ctx->csa.class_0_pending)
64 return 1;
65
66 return 0;
36} 67}
37 68
38static int spu_setup_isolated(struct spu_context *ctx) 69static int spu_setup_isolated(struct spu_context *ctx)
@@ -128,34 +159,66 @@ out:
128 159
129static int spu_run_init(struct spu_context *ctx, u32 *npc) 160static int spu_run_init(struct spu_context *ctx, u32 *npc)
130{ 161{
162 unsigned long runcntl = SPU_RUNCNTL_RUNNABLE;
163 int ret;
164
131 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM); 165 spuctx_switch_state(ctx, SPU_UTIL_SYSTEM);
132 166
133 if (ctx->flags & SPU_CREATE_ISOLATE) { 167 /*
134 unsigned long runcntl; 168 * NOSCHED is synchronous scheduling with respect to the caller.
169 * The caller waits for the context to be loaded.
170 */
171 if (ctx->flags & SPU_CREATE_NOSCHED) {
172 if (ctx->state == SPU_STATE_SAVED) {
173 ret = spu_activate(ctx, 0);
174 if (ret)
175 return ret;
176 }
177 }
135 178
179 /*
180 * Apply special setup as required.
181 */
182 if (ctx->flags & SPU_CREATE_ISOLATE) {
136 if (!(ctx->ops->status_read(ctx) & SPU_STATUS_ISOLATED_STATE)) { 183 if (!(ctx->ops->status_read(ctx) & SPU_STATUS_ISOLATED_STATE)) {
137 int ret = spu_setup_isolated(ctx); 184 ret = spu_setup_isolated(ctx);
138 if (ret) 185 if (ret)
139 return ret; 186 return ret;
140 } 187 }
141 188
142 /* if userspace has set the runcntrl register (eg, to issue an 189 /*
143 * isolated exit), we need to re-set it here */ 190 * If userspace has set the runcntrl register (eg, to
191 * issue an isolated exit), we need to re-set it here
192 */
144 runcntl = ctx->ops->runcntl_read(ctx) & 193 runcntl = ctx->ops->runcntl_read(ctx) &
145 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE); 194 (SPU_RUNCNTL_RUNNABLE | SPU_RUNCNTL_ISOLATE);
146 if (runcntl == 0) 195 if (runcntl == 0)
147 runcntl = SPU_RUNCNTL_RUNNABLE; 196 runcntl = SPU_RUNCNTL_RUNNABLE;
197 }
198
199 if (ctx->flags & SPU_CREATE_NOSCHED) {
200 spuctx_switch_state(ctx, SPU_UTIL_USER);
148 ctx->ops->runcntl_write(ctx, runcntl); 201 ctx->ops->runcntl_write(ctx, runcntl);
149 } else { 202 } else {
150 unsigned long mode = SPU_PRIVCNTL_MODE_NORMAL; 203 unsigned long privcntl;
151 ctx->ops->npc_write(ctx, *npc); 204
152 if (test_thread_flag(TIF_SINGLESTEP)) 205 if (test_thread_flag(TIF_SINGLESTEP))
153 mode = SPU_PRIVCNTL_MODE_SINGLE_STEP; 206 privcntl = SPU_PRIVCNTL_MODE_SINGLE_STEP;
154 out_be64(&ctx->spu->priv2->spu_privcntl_RW, mode); 207 else
155 ctx->ops->runcntl_write(ctx, SPU_RUNCNTL_RUNNABLE); 208 privcntl = SPU_PRIVCNTL_MODE_NORMAL;
156 }
157 209
158 spuctx_switch_state(ctx, SPU_UTIL_USER); 210 ctx->ops->npc_write(ctx, *npc);
211 ctx->ops->privcntl_write(ctx, privcntl);
212 ctx->ops->runcntl_write(ctx, runcntl);
213
214 if (ctx->state == SPU_STATE_SAVED) {
215 ret = spu_activate(ctx, 0);
216 if (ret)
217 return ret;
218 } else {
219 spuctx_switch_state(ctx, SPU_UTIL_USER);
220 }
221 }
159 222
160 return 0; 223 return 0;
161} 224}
@@ -165,6 +228,8 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc,
165{ 228{
166 int ret = 0; 229 int ret = 0;
167 230
231 spu_del_from_rq(ctx);
232
168 *status = ctx->ops->status_read(ctx); 233 *status = ctx->ops->status_read(ctx);
169 *npc = ctx->ops->npc_read(ctx); 234 *npc = ctx->ops->npc_read(ctx);
170 235
@@ -177,26 +242,6 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc,
177 return ret; 242 return ret;
178} 243}
179 244
180static int spu_reacquire_runnable(struct spu_context *ctx, u32 *npc,
181 u32 *status)
182{
183 int ret;
184
185 ret = spu_run_fini(ctx, npc, status);
186 if (ret)
187 return ret;
188
189 if (*status & (SPU_STATUS_STOPPED_BY_STOP | SPU_STATUS_STOPPED_BY_HALT))
190 return *status;
191
192 ret = spu_acquire_runnable(ctx, 0);
193 if (ret)
194 return ret;
195
196 spuctx_switch_state(ctx, SPU_UTIL_USER);
197 return 0;
198}
199
200/* 245/*
201 * SPU syscall restarting is tricky because we violate the basic 246 * SPU syscall restarting is tricky because we violate the basic
202 * assumption that the signal handler is running on the interrupted 247 * assumption that the signal handler is running on the interrupted
@@ -247,7 +292,7 @@ static int spu_process_callback(struct spu_context *ctx)
247 u32 ls_pointer, npc; 292 u32 ls_pointer, npc;
248 void __iomem *ls; 293 void __iomem *ls;
249 long spu_ret; 294 long spu_ret;
250 int ret; 295 int ret, ret2;
251 296
252 /* get syscall block from local store */ 297 /* get syscall block from local store */
253 npc = ctx->ops->npc_read(ctx) & ~3; 298 npc = ctx->ops->npc_read(ctx) & ~3;
@@ -269,9 +314,11 @@ static int spu_process_callback(struct spu_context *ctx)
269 if (spu_ret <= -ERESTARTSYS) { 314 if (spu_ret <= -ERESTARTSYS) {
270 ret = spu_handle_restartsys(ctx, &spu_ret, &npc); 315 ret = spu_handle_restartsys(ctx, &spu_ret, &npc);
271 } 316 }
272 spu_acquire(ctx); 317 ret2 = spu_acquire(ctx);
273 if (ret == -ERESTARTSYS) 318 if (ret == -ERESTARTSYS)
274 return ret; 319 return ret;
320 if (ret2)
321 return -EINTR;
275 } 322 }
276 323
277 /* write result, jump over indirect pointer */ 324 /* write result, jump over indirect pointer */
@@ -281,18 +328,6 @@ static int spu_process_callback(struct spu_context *ctx)
281 return ret; 328 return ret;
282} 329}
283 330
284static inline int spu_process_events(struct spu_context *ctx)
285{
286 struct spu *spu = ctx->spu;
287 int ret = 0;
288
289 if (spu->class_0_pending)
290 ret = spu_irq_class_0_bottom(spu);
291 if (!ret && signal_pending(current))
292 ret = -ERESTARTSYS;
293 return ret;
294}
295
296long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event) 331long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
297{ 332{
298 int ret; 333 int ret;
@@ -302,29 +337,14 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
302 if (mutex_lock_interruptible(&ctx->run_mutex)) 337 if (mutex_lock_interruptible(&ctx->run_mutex))
303 return -ERESTARTSYS; 338 return -ERESTARTSYS;
304 339
305 ctx->ops->master_start(ctx); 340 spu_enable_spu(ctx);
306 ctx->event_return = 0; 341 ctx->event_return = 0;
307 342
308 spu_acquire(ctx); 343 ret = spu_acquire(ctx);
309 if (ctx->state == SPU_STATE_SAVED) { 344 if (ret)
310 __spu_update_sched_info(ctx); 345 goto out_unlock;
311 spu_set_timeslice(ctx);
312 346
313 ret = spu_activate(ctx, 0); 347 spu_update_sched_info(ctx);
314 if (ret) {
315 spu_release(ctx);
316 goto out;
317 }
318 } else {
319 /*
320 * We have to update the scheduling priority under active_mutex
321 * to protect against find_victim().
322 *
323 * No need to update the timeslice ASAP, it will get updated
324 * once the current one has expired.
325 */
326 spu_update_sched_info(ctx);
327 }
328 348
329 ret = spu_run_init(ctx, npc); 349 ret = spu_run_init(ctx, npc);
330 if (ret) { 350 if (ret) {
@@ -358,14 +378,12 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
358 if (ret) 378 if (ret)
359 break; 379 break;
360 380
361 if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) { 381 ret = spufs_handle_class0(ctx);
362 ret = spu_reacquire_runnable(ctx, npc, &status); 382 if (ret)
363 if (ret) 383 break;
364 goto out2;
365 continue;
366 }
367 ret = spu_process_events(ctx);
368 384
385 if (signal_pending(current))
386 ret = -ERESTARTSYS;
369 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP | 387 } while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
370 SPU_STATUS_STOPPED_BY_HALT | 388 SPU_STATUS_STOPPED_BY_HALT |
371 SPU_STATUS_SINGLE_STEP))); 389 SPU_STATUS_SINGLE_STEP)));
@@ -376,11 +394,10 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
376 ctx->stats.libassist++; 394 ctx->stats.libassist++;
377 395
378 396
379 ctx->ops->master_stop(ctx); 397 spu_disable_spu(ctx);
380 ret = spu_run_fini(ctx, npc, &status); 398 ret = spu_run_fini(ctx, npc, &status);
381 spu_yield(ctx); 399 spu_yield(ctx);
382 400
383out2:
384 if ((ret == 0) || 401 if ((ret == 0) ||
385 ((ret == -ERESTARTSYS) && 402 ((ret == -ERESTARTSYS) &&
386 ((status & SPU_STATUS_STOPPED_BY_HALT) || 403 ((status & SPU_STATUS_STOPPED_BY_HALT) ||
@@ -401,6 +418,7 @@ out2:
401 418
402out: 419out:
403 *event = ctx->event_return; 420 *event = ctx->event_return;
421out_unlock:
404 mutex_unlock(&ctx->run_mutex); 422 mutex_unlock(&ctx->run_mutex);
405 return ret; 423 return ret;
406} 424}
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 9ad53e637aee..00d914232af1 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -58,6 +58,7 @@ static unsigned long spu_avenrun[3];
58static struct spu_prio_array *spu_prio; 58static struct spu_prio_array *spu_prio;
59static struct task_struct *spusched_task; 59static struct task_struct *spusched_task;
60static struct timer_list spusched_timer; 60static struct timer_list spusched_timer;
61static struct timer_list spuloadavg_timer;
61 62
62/* 63/*
63 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0). 64 * Priority of a normal, non-rt, non-niced'd process (aka nice level 0).
@@ -105,15 +106,21 @@ void spu_set_timeslice(struct spu_context *ctx)
105void __spu_update_sched_info(struct spu_context *ctx) 106void __spu_update_sched_info(struct spu_context *ctx)
106{ 107{
107 /* 108 /*
108 * 32-Bit assignment are atomic on powerpc, and we don't care about 109 * assert that the context is not on the runqueue, so it is safe
109 * memory ordering here because retriving the controlling thread is 110 * to change its scheduling parameters.
110 * per defintion racy. 111 */
112 BUG_ON(!list_empty(&ctx->rq));
113
114 /*
115 * 32-Bit assignments are atomic on powerpc, and we don't care about
116 * memory ordering here because retrieving the controlling thread is
117 * per definition racy.
111 */ 118 */
112 ctx->tid = current->pid; 119 ctx->tid = current->pid;
113 120
114 /* 121 /*
115 * We do our own priority calculations, so we normally want 122 * We do our own priority calculations, so we normally want
116 * ->static_prio to start with. Unfortunately thies field 123 * ->static_prio to start with. Unfortunately this field
117 * contains junk for threads with a realtime scheduling 124 * contains junk for threads with a realtime scheduling
118 * policy so we have to look at ->prio in this case. 125 * policy so we have to look at ->prio in this case.
119 */ 126 */
@@ -124,23 +131,32 @@ void __spu_update_sched_info(struct spu_context *ctx)
124 ctx->policy = current->policy; 131 ctx->policy = current->policy;
125 132
126 /* 133 /*
127 * A lot of places that don't hold list_mutex poke into 134 * TO DO: the context may be loaded, so we may need to activate
128 * cpus_allowed, including grab_runnable_context which 135 * it again on a different node. But it shouldn't hurt anything
129 * already holds the runq_lock. So abuse runq_lock 136 * to update its parameters, because we know that the scheduler
130 * to protect this field aswell. 137 * is not actively looking at this field, since it is not on the
138 * runqueue. The context will be rescheduled on the proper node
139 * if it is timesliced or preempted.
131 */ 140 */
132 spin_lock(&spu_prio->runq_lock);
133 ctx->cpus_allowed = current->cpus_allowed; 141 ctx->cpus_allowed = current->cpus_allowed;
134 spin_unlock(&spu_prio->runq_lock);
135} 142}
136 143
137void spu_update_sched_info(struct spu_context *ctx) 144void spu_update_sched_info(struct spu_context *ctx)
138{ 145{
139 int node = ctx->spu->node; 146 int node;
140 147
141 mutex_lock(&cbe_spu_info[node].list_mutex); 148 if (ctx->state == SPU_STATE_RUNNABLE) {
142 __spu_update_sched_info(ctx); 149 node = ctx->spu->node;
143 mutex_unlock(&cbe_spu_info[node].list_mutex); 150
151 /*
152 * Take list_mutex to sync with find_victim().
153 */
154 mutex_lock(&cbe_spu_info[node].list_mutex);
155 __spu_update_sched_info(ctx);
156 mutex_unlock(&cbe_spu_info[node].list_mutex);
157 } else {
158 __spu_update_sched_info(ctx);
159 }
144} 160}
145 161
146static int __node_allowed(struct spu_context *ctx, int node) 162static int __node_allowed(struct spu_context *ctx, int node)
@@ -174,7 +190,7 @@ void do_notify_spus_active(void)
174 * Wake up the active spu_contexts. 190 * Wake up the active spu_contexts.
175 * 191 *
176 * When the awakened processes see their "notify_active" flag is set, 192 * When the awakened processes see their "notify_active" flag is set,
177 * they will call spu_switch_notify(); 193 * they will call spu_switch_notify().
178 */ 194 */
179 for_each_online_node(node) { 195 for_each_online_node(node) {
180 struct spu *spu; 196 struct spu *spu;
@@ -221,7 +237,6 @@ static void spu_bind_context(struct spu *spu, struct spu_context *ctx)
221 spu->wbox_callback = spufs_wbox_callback; 237 spu->wbox_callback = spufs_wbox_callback;
222 spu->stop_callback = spufs_stop_callback; 238 spu->stop_callback = spufs_stop_callback;
223 spu->mfc_callback = spufs_mfc_callback; 239 spu->mfc_callback = spufs_mfc_callback;
224 spu->dma_callback = spufs_dma_callback;
225 mb(); 240 mb();
226 spu_unmap_mappings(ctx); 241 spu_unmap_mappings(ctx);
227 spu_restore(&ctx->csa, spu); 242 spu_restore(&ctx->csa, spu);
@@ -409,7 +424,6 @@ static void spu_unbind_context(struct spu *spu, struct spu_context *ctx)
409 spu->wbox_callback = NULL; 424 spu->wbox_callback = NULL;
410 spu->stop_callback = NULL; 425 spu->stop_callback = NULL;
411 spu->mfc_callback = NULL; 426 spu->mfc_callback = NULL;
412 spu->dma_callback = NULL;
413 spu_associate_mm(spu, NULL); 427 spu_associate_mm(spu, NULL);
414 spu->pid = 0; 428 spu->pid = 0;
415 spu->tgid = 0; 429 spu->tgid = 0;
@@ -454,6 +468,13 @@ static void __spu_add_to_rq(struct spu_context *ctx)
454 } 468 }
455} 469}
456 470
471static void spu_add_to_rq(struct spu_context *ctx)
472{
473 spin_lock(&spu_prio->runq_lock);
474 __spu_add_to_rq(ctx);
475 spin_unlock(&spu_prio->runq_lock);
476}
477
457static void __spu_del_from_rq(struct spu_context *ctx) 478static void __spu_del_from_rq(struct spu_context *ctx)
458{ 479{
459 int prio = ctx->prio; 480 int prio = ctx->prio;
@@ -468,10 +489,24 @@ static void __spu_del_from_rq(struct spu_context *ctx)
468 } 489 }
469} 490}
470 491
492void spu_del_from_rq(struct spu_context *ctx)
493{
494 spin_lock(&spu_prio->runq_lock);
495 __spu_del_from_rq(ctx);
496 spin_unlock(&spu_prio->runq_lock);
497}
498
471static void spu_prio_wait(struct spu_context *ctx) 499static void spu_prio_wait(struct spu_context *ctx)
472{ 500{
473 DEFINE_WAIT(wait); 501 DEFINE_WAIT(wait);
474 502
503 /*
504 * The caller must explicitly wait for a context to be loaded
505 * if the nosched flag is set. If NOSCHED is not set, the caller
506 * queues the context and waits for an spu event or error.
507 */
508 BUG_ON(!(ctx->flags & SPU_CREATE_NOSCHED));
509
475 spin_lock(&spu_prio->runq_lock); 510 spin_lock(&spu_prio->runq_lock);
476 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE); 511 prepare_to_wait_exclusive(&ctx->stop_wq, &wait, TASK_INTERRUPTIBLE);
477 if (!signal_pending(current)) { 512 if (!signal_pending(current)) {
@@ -555,7 +590,7 @@ static struct spu *find_victim(struct spu_context *ctx)
555 /* 590 /*
556 * Look for a possible preemption candidate on the local node first. 591 * Look for a possible preemption candidate on the local node first.
557 * If there is no candidate look at the other nodes. This isn't 592 * If there is no candidate look at the other nodes. This isn't
558 * exactly fair, but so far the whole spu schedule tries to keep 593 * exactly fair, but so far the whole spu scheduler tries to keep
559 * a strong node affinity. We might want to fine-tune this in 594 * a strong node affinity. We might want to fine-tune this in
560 * the future. 595 * the future.
561 */ 596 */
@@ -571,6 +606,7 @@ static struct spu *find_victim(struct spu_context *ctx)
571 struct spu_context *tmp = spu->ctx; 606 struct spu_context *tmp = spu->ctx;
572 607
573 if (tmp && tmp->prio > ctx->prio && 608 if (tmp && tmp->prio > ctx->prio &&
609 !(tmp->flags & SPU_CREATE_NOSCHED) &&
574 (!victim || tmp->prio > victim->prio)) 610 (!victim || tmp->prio > victim->prio))
575 victim = spu->ctx; 611 victim = spu->ctx;
576 } 612 }
@@ -582,6 +618,10 @@ static struct spu *find_victim(struct spu_context *ctx)
582 * higher priority contexts before lower priority 618 * higher priority contexts before lower priority
583 * ones, so this is safe until we introduce 619 * ones, so this is safe until we introduce
584 * priority inheritance schemes. 620 * priority inheritance schemes.
621 *
622 * XXX if the highest priority context is locked,
623 * this can loop a long time. Might be better to
624 * look at another context or give up after X retries.
585 */ 625 */
586 if (!mutex_trylock(&victim->state_mutex)) { 626 if (!mutex_trylock(&victim->state_mutex)) {
587 victim = NULL; 627 victim = NULL;
@@ -589,10 +629,10 @@ static struct spu *find_victim(struct spu_context *ctx)
589 } 629 }
590 630
591 spu = victim->spu; 631 spu = victim->spu;
592 if (!spu) { 632 if (!spu || victim->prio <= ctx->prio) {
593 /* 633 /*
594 * This race can happen because we've dropped 634 * This race can happen because we've dropped
595 * the active list mutex. No a problem, just 635 * the active list mutex. Not a problem, just
596 * restart the search. 636 * restart the search.
597 */ 637 */
598 mutex_unlock(&victim->state_mutex); 638 mutex_unlock(&victim->state_mutex);
@@ -607,13 +647,10 @@ static struct spu *find_victim(struct spu_context *ctx)
607 647
608 victim->stats.invol_ctx_switch++; 648 victim->stats.invol_ctx_switch++;
609 spu->stats.invol_ctx_switch++; 649 spu->stats.invol_ctx_switch++;
650 spu_add_to_rq(victim);
651
610 mutex_unlock(&victim->state_mutex); 652 mutex_unlock(&victim->state_mutex);
611 /* 653
612 * We need to break out of the wait loop in spu_run
613 * manually to ensure this context gets put on the
614 * runqueue again ASAP.
615 */
616 wake_up(&victim->stop_wq);
617 return spu; 654 return spu;
618 } 655 }
619 } 656 }
@@ -621,6 +658,50 @@ static struct spu *find_victim(struct spu_context *ctx)
621 return NULL; 658 return NULL;
622} 659}
623 660
661static void __spu_schedule(struct spu *spu, struct spu_context *ctx)
662{
663 int node = spu->node;
664 int success = 0;
665
666 spu_set_timeslice(ctx);
667
668 mutex_lock(&cbe_spu_info[node].list_mutex);
669 if (spu->ctx == NULL) {
670 spu_bind_context(spu, ctx);
671 cbe_spu_info[node].nr_active++;
672 spu->alloc_state = SPU_USED;
673 success = 1;
674 }
675 mutex_unlock(&cbe_spu_info[node].list_mutex);
676
677 if (success)
678 wake_up_all(&ctx->run_wq);
679 else
680 spu_add_to_rq(ctx);
681}
682
683static void spu_schedule(struct spu *spu, struct spu_context *ctx)
684{
685 /* not a candidate for interruptible because it's called either
686 from the scheduler thread or from spu_deactivate */
687 mutex_lock(&ctx->state_mutex);
688 __spu_schedule(spu, ctx);
689 spu_release(ctx);
690}
691
692static void spu_unschedule(struct spu *spu, struct spu_context *ctx)
693{
694 int node = spu->node;
695
696 mutex_lock(&cbe_spu_info[node].list_mutex);
697 cbe_spu_info[node].nr_active--;
698 spu->alloc_state = SPU_FREE;
699 spu_unbind_context(spu, ctx);
700 ctx->stats.invol_ctx_switch++;
701 spu->stats.invol_ctx_switch++;
702 mutex_unlock(&cbe_spu_info[node].list_mutex);
703}
704
624/** 705/**
625 * spu_activate - find a free spu for a context and execute it 706 * spu_activate - find a free spu for a context and execute it
626 * @ctx: spu context to schedule 707 * @ctx: spu context to schedule
@@ -632,39 +713,47 @@ static struct spu *find_victim(struct spu_context *ctx)
632 */ 713 */
633int spu_activate(struct spu_context *ctx, unsigned long flags) 714int spu_activate(struct spu_context *ctx, unsigned long flags)
634{ 715{
635 do { 716 struct spu *spu;
636 struct spu *spu;
637 717
638 /* 718 /*
639 * If there are multiple threads waiting for a single context 719 * If there are multiple threads waiting for a single context
640 * only one actually binds the context while the others will 720 * only one actually binds the context while the others will
641 * only be able to acquire the state_mutex once the context 721 * only be able to acquire the state_mutex once the context
642 * already is in runnable state. 722 * already is in runnable state.
643 */ 723 */
644 if (ctx->spu) 724 if (ctx->spu)
645 return 0; 725 return 0;
646 726
647 spu = spu_get_idle(ctx); 727spu_activate_top:
648 /* 728 if (signal_pending(current))
649 * If this is a realtime thread we try to get it running by 729 return -ERESTARTSYS;
650 * preempting a lower priority thread.
651 */
652 if (!spu && rt_prio(ctx->prio))
653 spu = find_victim(ctx);
654 if (spu) {
655 int node = spu->node;
656 730
657 mutex_lock(&cbe_spu_info[node].list_mutex); 731 spu = spu_get_idle(ctx);
658 spu_bind_context(spu, ctx); 732 /*
659 cbe_spu_info[node].nr_active++; 733 * If this is a realtime thread we try to get it running by
660 mutex_unlock(&cbe_spu_info[node].list_mutex); 734 * preempting a lower priority thread.
661 return 0; 735 */
662 } 736 if (!spu && rt_prio(ctx->prio))
737 spu = find_victim(ctx);
738 if (spu) {
739 unsigned long runcntl;
740
741 runcntl = ctx->ops->runcntl_read(ctx);
742 __spu_schedule(spu, ctx);
743 if (runcntl & SPU_RUNCNTL_RUNNABLE)
744 spuctx_switch_state(ctx, SPU_UTIL_USER);
663 745
746 return 0;
747 }
748
749 if (ctx->flags & SPU_CREATE_NOSCHED) {
664 spu_prio_wait(ctx); 750 spu_prio_wait(ctx);
665 } while (!signal_pending(current)); 751 goto spu_activate_top;
752 }
666 753
667 return -ERESTARTSYS; 754 spu_add_to_rq(ctx);
755
756 return 0;
668} 757}
669 758
670/** 759/**
@@ -706,21 +795,19 @@ static int __spu_deactivate(struct spu_context *ctx, int force, int max_prio)
706 if (spu) { 795 if (spu) {
707 new = grab_runnable_context(max_prio, spu->node); 796 new = grab_runnable_context(max_prio, spu->node);
708 if (new || force) { 797 if (new || force) {
709 int node = spu->node; 798 spu_unschedule(spu, ctx);
710 799 if (new) {
711 mutex_lock(&cbe_spu_info[node].list_mutex); 800 if (new->flags & SPU_CREATE_NOSCHED)
712 spu_unbind_context(spu, ctx); 801 wake_up(&new->stop_wq);
713 spu->alloc_state = SPU_FREE; 802 else {
714 cbe_spu_info[node].nr_active--; 803 spu_release(ctx);
715 mutex_unlock(&cbe_spu_info[node].list_mutex); 804 spu_schedule(spu, new);
716 805 /* this one can't easily be made
717 ctx->stats.vol_ctx_switch++; 806 interruptible */
718 spu->stats.vol_ctx_switch++; 807 mutex_lock(&ctx->state_mutex);
719 808 }
720 if (new) 809 }
721 wake_up(&new->stop_wq);
722 } 810 }
723
724 } 811 }
725 812
726 return new != NULL; 813 return new != NULL;
@@ -757,43 +844,38 @@ void spu_yield(struct spu_context *ctx)
757 844
758static noinline void spusched_tick(struct spu_context *ctx) 845static noinline void spusched_tick(struct spu_context *ctx)
759{ 846{
847 struct spu_context *new = NULL;
848 struct spu *spu = NULL;
849 u32 status;
850
851 if (spu_acquire(ctx))
852 BUG(); /* a kernel thread never has signals pending */
853
854 if (ctx->state != SPU_STATE_RUNNABLE)
855 goto out;
856 if (spu_stopped(ctx, &status))
857 goto out;
760 if (ctx->flags & SPU_CREATE_NOSCHED) 858 if (ctx->flags & SPU_CREATE_NOSCHED)
761 return; 859 goto out;
762 if (ctx->policy == SCHED_FIFO) 860 if (ctx->policy == SCHED_FIFO)
763 return; 861 goto out;
764 862
765 if (--ctx->time_slice) 863 if (--ctx->time_slice)
766 return; 864 goto out;
767 865
768 /* 866 spu = ctx->spu;
769 * Unfortunately list_mutex ranks outside of state_mutex, so 867 new = grab_runnable_context(ctx->prio + 1, spu->node);
770 * we have to trylock here. If we fail give the context another 868 if (new) {
771 * tick and try again. 869 spu_unschedule(spu, ctx);
772 */ 870 spu_add_to_rq(ctx);
773 if (mutex_trylock(&ctx->state_mutex)) {
774 struct spu *spu = ctx->spu;
775 struct spu_context *new;
776
777 new = grab_runnable_context(ctx->prio + 1, spu->node);
778 if (new) {
779 spu_unbind_context(spu, ctx);
780 ctx->stats.invol_ctx_switch++;
781 spu->stats.invol_ctx_switch++;
782 spu->alloc_state = SPU_FREE;
783 cbe_spu_info[spu->node].nr_active--;
784 wake_up(&new->stop_wq);
785 /*
786 * We need to break out of the wait loop in
787 * spu_run manually to ensure this context
788 * gets put on the runqueue again ASAP.
789 */
790 wake_up(&ctx->stop_wq);
791 }
792 spu_set_timeslice(ctx);
793 mutex_unlock(&ctx->state_mutex);
794 } else { 871 } else {
795 ctx->time_slice++; 872 ctx->time_slice++;
796 } 873 }
874out:
875 spu_release(ctx);
876
877 if (new)
878 spu_schedule(spu, new);
797} 879}
798 880
799/** 881/**
@@ -817,35 +899,31 @@ static unsigned long count_active_contexts(void)
817} 899}
818 900
819/** 901/**
820 * spu_calc_load - given tick count, update the avenrun load estimates. 902 * spu_calc_load - update the avenrun load estimates.
821 * @tick: tick count
822 * 903 *
823 * No locking against reading these values from userspace, as for 904 * No locking against reading these values from userspace, as for
824 * the CPU loadavg code. 905 * the CPU loadavg code.
825 */ 906 */
826static void spu_calc_load(unsigned long ticks) 907static void spu_calc_load(void)
827{ 908{
828 unsigned long active_tasks; /* fixed-point */ 909 unsigned long active_tasks; /* fixed-point */
829 static int count = LOAD_FREQ; 910
830 911 active_tasks = count_active_contexts() * FIXED_1;
831 count -= ticks; 912 CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
832 913 CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
833 if (unlikely(count < 0)) { 914 CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
834 active_tasks = count_active_contexts() * FIXED_1;
835 do {
836 CALC_LOAD(spu_avenrun[0], EXP_1, active_tasks);
837 CALC_LOAD(spu_avenrun[1], EXP_5, active_tasks);
838 CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
839 count += LOAD_FREQ;
840 } while (count < 0);
841 }
842} 915}
843 916
844static void spusched_wake(unsigned long data) 917static void spusched_wake(unsigned long data)
845{ 918{
846 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK); 919 mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
847 wake_up_process(spusched_task); 920 wake_up_process(spusched_task);
848 spu_calc_load(SPUSCHED_TICK); 921}
922
923static void spuloadavg_wake(unsigned long data)
924{
925 mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ);
926 spu_calc_load();
849} 927}
850 928
851static int spusched_thread(void *unused) 929static int spusched_thread(void *unused)
@@ -857,17 +935,58 @@ static int spusched_thread(void *unused)
857 set_current_state(TASK_INTERRUPTIBLE); 935 set_current_state(TASK_INTERRUPTIBLE);
858 schedule(); 936 schedule();
859 for (node = 0; node < MAX_NUMNODES; node++) { 937 for (node = 0; node < MAX_NUMNODES; node++) {
860 mutex_lock(&cbe_spu_info[node].list_mutex); 938 struct mutex *mtx = &cbe_spu_info[node].list_mutex;
861 list_for_each_entry(spu, &cbe_spu_info[node].spus, cbe_list) 939
862 if (spu->ctx) 940 mutex_lock(mtx);
863 spusched_tick(spu->ctx); 941 list_for_each_entry(spu, &cbe_spu_info[node].spus,
864 mutex_unlock(&cbe_spu_info[node].list_mutex); 942 cbe_list) {
943 struct spu_context *ctx = spu->ctx;
944
945 if (ctx) {
946 mutex_unlock(mtx);
947 spusched_tick(ctx);
948 mutex_lock(mtx);
949 }
950 }
951 mutex_unlock(mtx);
865 } 952 }
866 } 953 }
867 954
868 return 0; 955 return 0;
869} 956}
870 957
958void spuctx_switch_state(struct spu_context *ctx,
959 enum spu_utilization_state new_state)
960{
961 unsigned long long curtime;
962 signed long long delta;
963 struct timespec ts;
964 struct spu *spu;
965 enum spu_utilization_state old_state;
966
967 ktime_get_ts(&ts);
968 curtime = timespec_to_ns(&ts);
969 delta = curtime - ctx->stats.tstamp;
970
971 WARN_ON(!mutex_is_locked(&ctx->state_mutex));
972 WARN_ON(delta < 0);
973
974 spu = ctx->spu;
975 old_state = ctx->stats.util_state;
976 ctx->stats.util_state = new_state;
977 ctx->stats.tstamp = curtime;
978
979 /*
980 * Update the physical SPU utilization statistics.
981 */
982 if (spu) {
983 ctx->stats.times[old_state] += delta;
984 spu->stats.times[old_state] += delta;
985 spu->stats.util_state = new_state;
986 spu->stats.tstamp = curtime;
987 }
988}
989
871#define LOAD_INT(x) ((x) >> FSHIFT) 990#define LOAD_INT(x) ((x) >> FSHIFT)
872#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) 991#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
873 992
@@ -881,7 +1000,7 @@ static int show_spu_loadavg(struct seq_file *s, void *private)
881 1000
882 /* 1001 /*
883 * Note that last_pid doesn't really make much sense for the 1002 * Note that last_pid doesn't really make much sense for the
884 * SPU loadavg (it even seems very odd on the CPU side..), 1003 * SPU loadavg (it even seems very odd on the CPU side...),
885 * but we include it here to have a 100% compatible interface. 1004 * but we include it here to have a 100% compatible interface.
886 */ 1005 */
887 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n", 1006 seq_printf(s, "%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
@@ -922,6 +1041,7 @@ int __init spu_sched_init(void)
922 spin_lock_init(&spu_prio->runq_lock); 1041 spin_lock_init(&spu_prio->runq_lock);
923 1042
924 setup_timer(&spusched_timer, spusched_wake, 0); 1043 setup_timer(&spusched_timer, spusched_wake, 0);
1044 setup_timer(&spuloadavg_timer, spuloadavg_wake, 0);
925 1045
926 spusched_task = kthread_run(spusched_thread, NULL, "spusched"); 1046 spusched_task = kthread_run(spusched_thread, NULL, "spusched");
927 if (IS_ERR(spusched_task)) { 1047 if (IS_ERR(spusched_task)) {
@@ -929,6 +1049,8 @@ int __init spu_sched_init(void)
929 goto out_free_spu_prio; 1049 goto out_free_spu_prio;
930 } 1050 }
931 1051
1052 mod_timer(&spuloadavg_timer, 0);
1053
932 entry = create_proc_entry("spu_loadavg", 0, NULL); 1054 entry = create_proc_entry("spu_loadavg", 0, NULL);
933 if (!entry) 1055 if (!entry)
934 goto out_stop_kthread; 1056 goto out_stop_kthread;
@@ -954,6 +1076,7 @@ void spu_sched_exit(void)
954 remove_proc_entry("spu_loadavg", NULL); 1076 remove_proc_entry("spu_loadavg", NULL);
955 1077
956 del_timer_sync(&spusched_timer); 1078 del_timer_sync(&spusched_timer);
1079 del_timer_sync(&spuloadavg_timer);
957 kthread_stop(spusched_task); 1080 kthread_stop(spusched_task);
958 1081
959 for (node = 0; node < MAX_NUMNODES; node++) { 1082 for (node = 0; node < MAX_NUMNODES; node++) {
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h
index ca47b991bda5..0e114038ea6f 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -71,6 +71,7 @@ struct spu_context {
71 wait_queue_head_t wbox_wq; 71 wait_queue_head_t wbox_wq;
72 wait_queue_head_t stop_wq; 72 wait_queue_head_t stop_wq;
73 wait_queue_head_t mfc_wq; 73 wait_queue_head_t mfc_wq;
74 wait_queue_head_t run_wq;
74 struct fasync_struct *ibox_fasync; 75 struct fasync_struct *ibox_fasync;
75 struct fasync_struct *wbox_fasync; 76 struct fasync_struct *wbox_fasync;
76 struct fasync_struct *mfc_fasync; 77 struct fasync_struct *mfc_fasync;
@@ -168,8 +169,10 @@ struct spu_context_ops {
168 void (*npc_write) (struct spu_context * ctx, u32 data); 169 void (*npc_write) (struct spu_context * ctx, u32 data);
169 u32(*status_read) (struct spu_context * ctx); 170 u32(*status_read) (struct spu_context * ctx);
170 char*(*get_ls) (struct spu_context * ctx); 171 char*(*get_ls) (struct spu_context * ctx);
172 void (*privcntl_write) (struct spu_context *ctx, u64 data);
171 u32 (*runcntl_read) (struct spu_context * ctx); 173 u32 (*runcntl_read) (struct spu_context * ctx);
172 void (*runcntl_write) (struct spu_context * ctx, u32 data); 174 void (*runcntl_write) (struct spu_context * ctx, u32 data);
175 void (*runcntl_stop) (struct spu_context * ctx);
173 void (*master_start) (struct spu_context * ctx); 176 void (*master_start) (struct spu_context * ctx);
174 void (*master_stop) (struct spu_context * ctx); 177 void (*master_stop) (struct spu_context * ctx);
175 int (*set_mfc_query)(struct spu_context * ctx, u32 mask, u32 mode); 178 int (*set_mfc_query)(struct spu_context * ctx, u32 mask, u32 mode);
@@ -219,15 +222,16 @@ void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx);
219 222
220/* fault handling */ 223/* fault handling */
221int spufs_handle_class1(struct spu_context *ctx); 224int spufs_handle_class1(struct spu_context *ctx);
225int spufs_handle_class0(struct spu_context *ctx);
222 226
223/* affinity */ 227/* affinity */
224struct spu *affinity_check(struct spu_context *ctx); 228struct spu *affinity_check(struct spu_context *ctx);
225 229
226/* context management */ 230/* context management */
227extern atomic_t nr_spu_contexts; 231extern atomic_t nr_spu_contexts;
228static inline void spu_acquire(struct spu_context *ctx) 232static inline int __must_check spu_acquire(struct spu_context *ctx)
229{ 233{
230 mutex_lock(&ctx->state_mutex); 234 return mutex_lock_interruptible(&ctx->state_mutex);
231} 235}
232 236
233static inline void spu_release(struct spu_context *ctx) 237static inline void spu_release(struct spu_context *ctx)
@@ -242,10 +246,11 @@ int put_spu_context(struct spu_context *ctx);
242void spu_unmap_mappings(struct spu_context *ctx); 246void spu_unmap_mappings(struct spu_context *ctx);
243 247
244void spu_forget(struct spu_context *ctx); 248void spu_forget(struct spu_context *ctx);
245int spu_acquire_runnable(struct spu_context *ctx, unsigned long flags); 249int __must_check spu_acquire_saved(struct spu_context *ctx);
246void spu_acquire_saved(struct spu_context *ctx);
247void spu_release_saved(struct spu_context *ctx); 250void spu_release_saved(struct spu_context *ctx);
248 251
252int spu_stopped(struct spu_context *ctx, u32 * stat);
253void spu_del_from_rq(struct spu_context *ctx);
249int spu_activate(struct spu_context *ctx, unsigned long flags); 254int spu_activate(struct spu_context *ctx, unsigned long flags);
250void spu_deactivate(struct spu_context *ctx); 255void spu_deactivate(struct spu_context *ctx);
251void spu_yield(struct spu_context *ctx); 256void spu_yield(struct spu_context *ctx);
@@ -279,7 +284,9 @@ extern char *isolated_loader;
279 } \ 284 } \
280 spu_release(ctx); \ 285 spu_release(ctx); \
281 schedule(); \ 286 schedule(); \
282 spu_acquire(ctx); \ 287 __ret = spu_acquire(ctx); \
288 if (__ret) \
289 break; \
283 } \ 290 } \
284 finish_wait(&(wq), &__wait); \ 291 finish_wait(&(wq), &__wait); \
285 __ret; \ 292 __ret; \
@@ -306,41 +313,16 @@ struct spufs_coredump_reader {
306extern struct spufs_coredump_reader spufs_coredump_read[]; 313extern struct spufs_coredump_reader spufs_coredump_read[];
307extern int spufs_coredump_num_notes; 314extern int spufs_coredump_num_notes;
308 315
309/* 316extern int spu_init_csa(struct spu_state *csa);
310 * This function is a little bit too large for an inline, but 317extern void spu_fini_csa(struct spu_state *csa);
311 * as fault.c is built into the kernel we can't move it out of 318extern int spu_save(struct spu_state *prev, struct spu *spu);
312 * line. 319extern int spu_restore(struct spu_state *new, struct spu *spu);
313 */ 320extern int spu_switch(struct spu_state *prev, struct spu_state *new,
314static inline void spuctx_switch_state(struct spu_context *ctx, 321 struct spu *spu);
315 enum spu_utilization_state new_state) 322extern int spu_alloc_lscsa(struct spu_state *csa);
316{ 323extern void spu_free_lscsa(struct spu_state *csa);
317 unsigned long long curtime; 324
318 signed long long delta; 325extern void spuctx_switch_state(struct spu_context *ctx,
319 struct timespec ts; 326 enum spu_utilization_state new_state);
320 struct spu *spu;
321 enum spu_utilization_state old_state;
322
323 ktime_get_ts(&ts);
324 curtime = timespec_to_ns(&ts);
325 delta = curtime - ctx->stats.tstamp;
326
327 WARN_ON(!mutex_is_locked(&ctx->state_mutex));
328 WARN_ON(delta < 0);
329
330 spu = ctx->spu;
331 old_state = ctx->stats.util_state;
332 ctx->stats.util_state = new_state;
333 ctx->stats.tstamp = curtime;
334
335 /*
336 * Update the physical SPU utilization statistics.
337 */
338 if (spu) {
339 ctx->stats.times[old_state] += delta;
340 spu->stats.times[old_state] += delta;
341 spu->stats.util_state = new_state;
342 spu->stats.tstamp = curtime;
343 }
344}
345 327
346#endif 328#endif
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 3d64c81cc6e2..6063c88c26d2 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -48,6 +48,8 @@
48#include <asm/spu_csa.h> 48#include <asm/spu_csa.h>
49#include <asm/mmu_context.h> 49#include <asm/mmu_context.h>
50 50
51#include "spufs.h"
52
51#include "spu_save_dump.h" 53#include "spu_save_dump.h"
52#include "spu_restore_dump.h" 54#include "spu_restore_dump.h"
53 55
@@ -691,35 +693,9 @@ static inline void resume_mfc_queue(struct spu_state *csa, struct spu *spu)
691 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESUME_DMA_QUEUE); 693 out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESUME_DMA_QUEUE);
692} 694}
693 695
694static inline void get_kernel_slb(u64 ea, u64 slb[2]) 696static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu,
697 unsigned int *code, int code_size)
695{ 698{
696 u64 llp;
697
698 if (REGION_ID(ea) == KERNEL_REGION_ID)
699 llp = mmu_psize_defs[mmu_linear_psize].sllp;
700 else
701 llp = mmu_psize_defs[mmu_virtual_psize].sllp;
702 slb[0] = (get_kernel_vsid(ea, MMU_SEGSIZE_256M) << SLB_VSID_SHIFT) |
703 SLB_VSID_KERNEL | llp;
704 slb[1] = (ea & ESID_MASK) | SLB_ESID_V;
705}
706
707static inline void load_mfc_slb(struct spu *spu, u64 slb[2], int slbe)
708{
709 struct spu_priv2 __iomem *priv2 = spu->priv2;
710
711 out_be64(&priv2->slb_index_W, slbe);
712 eieio();
713 out_be64(&priv2->slb_vsid_RW, slb[0]);
714 out_be64(&priv2->slb_esid_RW, slb[1]);
715 eieio();
716}
717
718static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu)
719{
720 u64 code_slb[2];
721 u64 lscsa_slb[2];
722
723 /* Save, Step 47: 699 /* Save, Step 47:
724 * Restore, Step 30. 700 * Restore, Step 30.
725 * If MFC_SR1[R]=1, write 0 to SLB_Invalidate_All 701 * If MFC_SR1[R]=1, write 0 to SLB_Invalidate_All
@@ -735,11 +711,7 @@ static inline void setup_mfc_slbs(struct spu_state *csa, struct spu *spu)
735 * translation is desired by OS environment). 711 * translation is desired by OS environment).
736 */ 712 */
737 spu_invalidate_slbs(spu); 713 spu_invalidate_slbs(spu);
738 get_kernel_slb((unsigned long)&spu_save_code[0], code_slb); 714 spu_setup_kernel_slbs(spu, csa->lscsa, code, code_size);
739 get_kernel_slb((unsigned long)csa->lscsa, lscsa_slb);
740 load_mfc_slb(spu, code_slb, 0);
741 if ((lscsa_slb[0] != code_slb[0]) || (lscsa_slb[1] != code_slb[1]))
742 load_mfc_slb(spu, lscsa_slb, 1);
743} 715}
744 716
745static inline void set_switch_active(struct spu_state *csa, struct spu *spu) 717static inline void set_switch_active(struct spu_state *csa, struct spu *spu)
@@ -768,9 +740,9 @@ static inline void enable_interrupts(struct spu_state *csa, struct spu *spu)
768 * (translation) interrupts. 740 * (translation) interrupts.
769 */ 741 */
770 spin_lock_irq(&spu->register_lock); 742 spin_lock_irq(&spu->register_lock);
771 spu_int_stat_clear(spu, 0, ~0ul); 743 spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
772 spu_int_stat_clear(spu, 1, ~0ul); 744 spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
773 spu_int_stat_clear(spu, 2, ~0ul); 745 spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
774 spu_int_mask_set(spu, 0, 0ul); 746 spu_int_mask_set(spu, 0, 0ul);
775 spu_int_mask_set(spu, 1, class1_mask); 747 spu_int_mask_set(spu, 1, class1_mask);
776 spu_int_mask_set(spu, 2, 0ul); 748 spu_int_mask_set(spu, 2, 0ul);
@@ -927,8 +899,8 @@ static inline void wait_tag_complete(struct spu_state *csa, struct spu *spu)
927 POLL_WHILE_FALSE(in_be32(&prob->dma_tagstatus_R) & mask); 899 POLL_WHILE_FALSE(in_be32(&prob->dma_tagstatus_R) & mask);
928 900
929 local_irq_save(flags); 901 local_irq_save(flags);
930 spu_int_stat_clear(spu, 0, ~(0ul)); 902 spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
931 spu_int_stat_clear(spu, 2, ~(0ul)); 903 spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
932 local_irq_restore(flags); 904 local_irq_restore(flags);
933} 905}
934 906
@@ -946,8 +918,8 @@ static inline void wait_spu_stopped(struct spu_state *csa, struct spu *spu)
946 POLL_WHILE_TRUE(in_be32(&prob->spu_status_R) & SPU_STATUS_RUNNING); 918 POLL_WHILE_TRUE(in_be32(&prob->spu_status_R) & SPU_STATUS_RUNNING);
947 919
948 local_irq_save(flags); 920 local_irq_save(flags);
949 spu_int_stat_clear(spu, 0, ~(0ul)); 921 spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
950 spu_int_stat_clear(spu, 2, ~(0ul)); 922 spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
951 local_irq_restore(flags); 923 local_irq_restore(flags);
952} 924}
953 925
@@ -1423,9 +1395,9 @@ static inline void clear_interrupts(struct spu_state *csa, struct spu *spu)
1423 spu_int_mask_set(spu, 0, 0ul); 1395 spu_int_mask_set(spu, 0, 0ul);
1424 spu_int_mask_set(spu, 1, 0ul); 1396 spu_int_mask_set(spu, 1, 0ul);
1425 spu_int_mask_set(spu, 2, 0ul); 1397 spu_int_mask_set(spu, 2, 0ul);
1426 spu_int_stat_clear(spu, 0, ~0ul); 1398 spu_int_stat_clear(spu, 0, CLASS0_INTR_MASK);
1427 spu_int_stat_clear(spu, 1, ~0ul); 1399 spu_int_stat_clear(spu, 1, CLASS1_INTR_MASK);
1428 spu_int_stat_clear(spu, 2, ~0ul); 1400 spu_int_stat_clear(spu, 2, CLASS2_INTR_MASK);
1429 spin_unlock_irq(&spu->register_lock); 1401 spin_unlock_irq(&spu->register_lock);
1430} 1402}
1431 1403
@@ -1866,7 +1838,8 @@ static void save_lscsa(struct spu_state *prev, struct spu *spu)
1866 */ 1838 */
1867 1839
1868 resume_mfc_queue(prev, spu); /* Step 46. */ 1840 resume_mfc_queue(prev, spu); /* Step 46. */
1869 setup_mfc_slbs(prev, spu); /* Step 47. */ 1841 /* Step 47. */
1842 setup_mfc_slbs(prev, spu, spu_save_code, sizeof(spu_save_code));
1870 set_switch_active(prev, spu); /* Step 48. */ 1843 set_switch_active(prev, spu); /* Step 48. */
1871 enable_interrupts(prev, spu); /* Step 49. */ 1844 enable_interrupts(prev, spu); /* Step 49. */
1872 save_ls_16kb(prev, spu); /* Step 50. */ 1845 save_ls_16kb(prev, spu); /* Step 50. */
@@ -1971,7 +1944,8 @@ static void restore_lscsa(struct spu_state *next, struct spu *spu)
1971 setup_spu_status_part1(next, spu); /* Step 27. */ 1944 setup_spu_status_part1(next, spu); /* Step 27. */
1972 setup_spu_status_part2(next, spu); /* Step 28. */ 1945 setup_spu_status_part2(next, spu); /* Step 28. */
1973 restore_mfc_rag(next, spu); /* Step 29. */ 1946 restore_mfc_rag(next, spu); /* Step 29. */
1974 setup_mfc_slbs(next, spu); /* Step 30. */ 1947 /* Step 30. */
1948 setup_mfc_slbs(next, spu, spu_restore_code, sizeof(spu_restore_code));
1975 set_spu_npc(next, spu); /* Step 31. */ 1949 set_spu_npc(next, spu); /* Step 31. */
1976 set_signot1(next, spu); /* Step 32. */ 1950 set_signot1(next, spu); /* Step 32. */
1977 set_signot2(next, spu); /* Step 33. */ 1951 set_signot2(next, spu); /* Step 33. */
@@ -2103,10 +2077,6 @@ int spu_save(struct spu_state *prev, struct spu *spu)
2103 int rc; 2077 int rc;
2104 2078
2105 acquire_spu_lock(spu); /* Step 1. */ 2079 acquire_spu_lock(spu); /* Step 1. */
2106 prev->dar = spu->dar;
2107 prev->dsisr = spu->dsisr;
2108 spu->dar = 0;
2109 spu->dsisr = 0;
2110 rc = __do_spu_save(prev, spu); /* Steps 2-53. */ 2080 rc = __do_spu_save(prev, spu); /* Steps 2-53. */
2111 release_spu_lock(spu); 2081 release_spu_lock(spu);
2112 if (rc != 0 && rc != 2 && rc != 6) { 2082 if (rc != 0 && rc != 2 && rc != 6) {
@@ -2133,9 +2103,6 @@ int spu_restore(struct spu_state *new, struct spu *spu)
2133 acquire_spu_lock(spu); 2103 acquire_spu_lock(spu);
2134 harvest(NULL, spu); 2104 harvest(NULL, spu);
2135 spu->slb_replace = 0; 2105 spu->slb_replace = 0;
2136 new->dar = 0;
2137 new->dsisr = 0;
2138 spu->class_0_pending = 0;
2139 rc = __do_spu_restore(new, spu); 2106 rc = __do_spu_restore(new, spu);
2140 release_spu_lock(spu); 2107 release_spu_lock(spu);
2141 if (rc) { 2108 if (rc) {
@@ -2215,10 +2182,8 @@ int spu_init_csa(struct spu_state *csa)
2215 2182
2216 return 0; 2183 return 0;
2217} 2184}
2218EXPORT_SYMBOL_GPL(spu_init_csa);
2219 2185
2220void spu_fini_csa(struct spu_state *csa) 2186void spu_fini_csa(struct spu_state *csa)
2221{ 2187{
2222 spu_free_lscsa(csa); 2188 spu_free_lscsa(csa);
2223} 2189}
2224EXPORT_SYMBOL_GPL(spu_fini_csa);
diff --git a/arch/powerpc/platforms/celleb/Kconfig b/arch/powerpc/platforms/celleb/Kconfig
index 04748d410fc9..372891edcdd2 100644
--- a/arch/powerpc/platforms/celleb/Kconfig
+++ b/arch/powerpc/platforms/celleb/Kconfig
@@ -2,6 +2,8 @@ config PPC_CELLEB
2 bool "Toshiba's Cell Reference Set 'Celleb' Architecture" 2 bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
3 depends on PPC_MULTIPLATFORM && PPC64 3 depends on PPC_MULTIPLATFORM && PPC64
4 select PPC_CELL 4 select PPC_CELL
5 select PPC_CELL_NATIVE
6 select PPC_RTAS
5 select PPC_INDIRECT_IO 7 select PPC_INDIRECT_IO
6 select PPC_OF_PLATFORM_PCI 8 select PPC_OF_PLATFORM_PCI
7 select HAS_TXX9_SERIAL 9 select HAS_TXX9_SERIAL
diff --git a/arch/powerpc/platforms/celleb/io-workarounds.c b/arch/powerpc/platforms/celleb/io-workarounds.c
index 2b912140bcbb..423339be1bac 100644
--- a/arch/powerpc/platforms/celleb/io-workarounds.c
+++ b/arch/powerpc/platforms/celleb/io-workarounds.c
@@ -22,6 +22,7 @@
22 22
23#undef DEBUG 23#undef DEBUG
24 24
25#include <linux/of.h>
25#include <linux/of_device.h> 26#include <linux/of_device.h>
26#include <linux/irq.h> 27#include <linux/irq.h>
27 28
@@ -222,7 +223,7 @@ void __init celleb_pci_add_one(struct pci_controller *phb,
222 void (*dummy_read)(struct pci_controller *)) 223 void (*dummy_read)(struct pci_controller *))
223{ 224{
224 struct celleb_pci_bus *bus = &celleb_pci_busses[celleb_pci_count]; 225 struct celleb_pci_bus *bus = &celleb_pci_busses[celleb_pci_count];
225 struct device_node *np = phb->arch_data; 226 struct device_node *np = phb->dn;
226 227
227 if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) { 228 if (celleb_pci_count >= MAX_CELLEB_PCI_BUS) {
228 printk(KERN_ERR "Too many pci bridges, workarounds" 229 printk(KERN_ERR "Too many pci bridges, workarounds"
@@ -256,13 +257,13 @@ int __init celleb_pci_workaround_init(void)
256 257
257 celleb_dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL); 258 celleb_dummy_page_va = kmalloc(PAGE_SIZE, GFP_KERNEL);
258 if (!celleb_dummy_page_va) { 259 if (!celleb_dummy_page_va) {
259 printk(KERN_ERR "Celleb: dummy read disabled." 260 printk(KERN_ERR "Celleb: dummy read disabled. "
260 "Alloc celleb_dummy_page_va failed\n"); 261 "Alloc celleb_dummy_page_va failed\n");
261 return 1; 262 return 1;
262 } 263 }
263 264
264 list_for_each_entry(phb, &hose_list, list_node) { 265 list_for_each_entry(phb, &hose_list, list_node) {
265 node = phb->arch_data; 266 node = phb->dn;
266 match = of_match_node(celleb_pci_workaround_match, node); 267 match = of_match_node(celleb_pci_workaround_match, node);
267 268
268 if (match) { 269 if (match) {
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c
index 755d869d8553..93b0efddd658 100644
--- a/arch/powerpc/platforms/celleb/iommu.c
+++ b/arch/powerpc/platforms/celleb/iommu.c
@@ -22,8 +22,9 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/of_platform.h>
25 26
26#include <asm/of_platform.h> 27#include <asm/machdep.h>
27 28
28#include "beat_wrapper.h" 29#include "beat_wrapper.h"
29 30
@@ -51,6 +52,8 @@ static int __init find_dma_window(u64 *io_space_id, u64 *ioid,
51 return 0; 52 return 0;
52} 53}
53 54
55static unsigned long celleb_dma_direct_offset;
56
54static void __init celleb_init_direct_mapping(void) 57static void __init celleb_init_direct_mapping(void)
55{ 58{
56 u64 lpar_addr, io_addr; 59 u64 lpar_addr, io_addr;
@@ -68,7 +71,18 @@ static void __init celleb_init_direct_mapping(void)
68 ioid, DMA_FLAGS); 71 ioid, DMA_FLAGS);
69 } 72 }
70 73
71 dma_direct_offset = dma_base; 74 celleb_dma_direct_offset = dma_base;
75}
76
77static void celleb_dma_dev_setup(struct device *dev)
78{
79 dev->archdata.dma_ops = get_pci_dma_ops();
80 dev->archdata.dma_data = (void *)celleb_dma_direct_offset;
81}
82
83static void celleb_pci_dma_dev_setup(struct pci_dev *pdev)
84{
85 celleb_dma_dev_setup(&pdev->dev);
72} 86}
73 87
74static int celleb_of_bus_notify(struct notifier_block *nb, 88static int celleb_of_bus_notify(struct notifier_block *nb,
@@ -80,7 +94,7 @@ static int celleb_of_bus_notify(struct notifier_block *nb,
80 if (action != BUS_NOTIFY_ADD_DEVICE) 94 if (action != BUS_NOTIFY_ADD_DEVICE)
81 return 0; 95 return 0;
82 96
83 dev->archdata.dma_ops = get_pci_dma_ops(); 97 celleb_dma_dev_setup(dev);
84 98
85 return 0; 99 return 0;
86} 100}
@@ -91,14 +105,12 @@ static struct notifier_block celleb_of_bus_notifier = {
91 105
92static int __init celleb_init_iommu(void) 106static int __init celleb_init_iommu(void)
93{ 107{
94 if (!machine_is(celleb))
95 return -ENODEV;
96
97 celleb_init_direct_mapping(); 108 celleb_init_direct_mapping();
98 set_pci_dma_ops(&dma_direct_ops); 109 set_pci_dma_ops(&dma_direct_ops);
110 ppc_md.pci_dma_dev_setup = celleb_pci_dma_dev_setup;
99 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); 111 bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier);
100 112
101 return 0; 113 return 0;
102} 114}
103 115
104arch_initcall(celleb_init_iommu); 116machine_arch_initcall(celleb_beat, celleb_init_iommu);
diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c
index 6bc32fda7a6b..51b390d34e4d 100644
--- a/arch/powerpc/platforms/celleb/pci.c
+++ b/arch/powerpc/platforms/celleb/pci.c
@@ -31,6 +31,7 @@
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/bootmem.h> 32#include <linux/bootmem.h>
33#include <linux/pci_regs.h> 33#include <linux/pci_regs.h>
34#include <linux/of.h>
34#include <linux/of_device.h> 35#include <linux/of_device.h>
35 36
36#include <asm/io.h> 37#include <asm/io.h>
@@ -138,8 +139,6 @@ static void celleb_config_read_fake(unsigned char *config, int where,
138 *val = celleb_fake_config_readl(p); 139 *val = celleb_fake_config_readl(p);
139 break; 140 break;
140 } 141 }
141
142 return;
143} 142}
144 143
145static void celleb_config_write_fake(unsigned char *config, int where, 144static void celleb_config_write_fake(unsigned char *config, int where,
@@ -158,7 +157,6 @@ static void celleb_config_write_fake(unsigned char *config, int where,
158 celleb_fake_config_writel(val, p); 157 celleb_fake_config_writel(val, p);
159 break; 158 break;
160 } 159 }
161 return;
162} 160}
163 161
164static int celleb_fake_pci_read_config(struct pci_bus *bus, 162static int celleb_fake_pci_read_config(struct pci_bus *bus,
@@ -351,6 +349,10 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
351 wi1 = of_get_property(node, "vendor-id", NULL); 349 wi1 = of_get_property(node, "vendor-id", NULL);
352 wi2 = of_get_property(node, "class-code", NULL); 350 wi2 = of_get_property(node, "class-code", NULL);
353 wi3 = of_get_property(node, "revision-id", NULL); 351 wi3 = of_get_property(node, "revision-id", NULL);
352 if (!wi0 || !wi1 || !wi2 || !wi3) {
353 printk(KERN_ERR "PCI: Missing device tree properties.\n");
354 goto error;
355 }
354 356
355 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff); 357 celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
356 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff); 358 celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
@@ -372,6 +374,10 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
372 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr); 374 celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);
373 375
374 li = of_get_property(node, "interrupts", &rlen); 376 li = of_get_property(node, "interrupts", &rlen);
377 if (!li) {
378 printk(KERN_ERR "PCI: interrupts not found.\n");
379 goto error;
380 }
375 val = li[0]; 381 val = li[0];
376 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1); 382 celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
377 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val); 383 celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
@@ -475,7 +481,7 @@ static struct of_device_id celleb_phb_match[] __initdata = {
475 481
476int __init celleb_setup_phb(struct pci_controller *phb) 482int __init celleb_setup_phb(struct pci_controller *phb)
477{ 483{
478 struct device_node *dev = phb->arch_data; 484 struct device_node *dev = phb->dn;
479 const struct of_device_id *match; 485 const struct of_device_id *match;
480 int (*setup_func)(struct device_node *, struct pci_controller *); 486 int (*setup_func)(struct device_node *, struct pci_controller *);
481 487
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c
index 9d076426676c..a3c7cfbcb323 100644
--- a/arch/powerpc/platforms/celleb/scc_epci.c
+++ b/arch/powerpc/platforms/celleb/scc_epci.c
@@ -95,7 +95,7 @@ void __init epci_workaround_init(struct pci_controller *hose)
95 private->dummy_page_da = dma_map_single(hose->parent, 95 private->dummy_page_da = dma_map_single(hose->parent,
96 celleb_dummy_page_va, PAGE_SIZE, DMA_FROM_DEVICE); 96 celleb_dummy_page_va, PAGE_SIZE, DMA_FROM_DEVICE);
97 if (private->dummy_page_da == DMA_ERROR_CODE) { 97 if (private->dummy_page_da == DMA_ERROR_CODE) {
98 printk(KERN_ERR "EPCI: dummy read disabled." 98 printk(KERN_ERR "EPCI: dummy read disabled. "
99 "Map dummy page failed.\n"); 99 "Map dummy page failed.\n");
100 return; 100 return;
101 } 101 }
diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/celleb/scc_uhc.c
index b59c38a06e3e..cb4307994087 100644
--- a/arch/powerpc/platforms/celleb/scc_uhc.c
+++ b/arch/powerpc/platforms/celleb/scc_uhc.c
@@ -47,7 +47,8 @@ static void enable_scc_uhc(struct pci_dev *dev)
47 u32 val = 0; 47 u32 val = 0;
48 int i; 48 int i;
49 49
50 if (!machine_is(celleb)) 50 if (!machine_is(celleb_beat) &&
51 !machine_is(celleb_native))
51 return; 52 return;
52 53
53 uhc_base = ioremap(pci_resource_start(dev, 0), 54 uhc_base = ioremap(pci_resource_start(dev, 0),
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index ddfb35ae741f..f27ae1e3fb58 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -40,6 +40,7 @@
40#include <linux/seq_file.h> 40#include <linux/seq_file.h>
41#include <linux/root_dev.h> 41#include <linux/root_dev.h>
42#include <linux/console.h> 42#include <linux/console.h>
43#include <linux/of_platform.h>
43 44
44#include <asm/mmu.h> 45#include <asm/mmu.h>
45#include <asm/processor.h> 46#include <asm/processor.h>
@@ -52,12 +53,16 @@
52#include <asm/time.h> 53#include <asm/time.h>
53#include <asm/spu_priv1.h> 54#include <asm/spu_priv1.h>
54#include <asm/firmware.h> 55#include <asm/firmware.h>
55#include <asm/of_platform.h> 56#include <asm/rtas.h>
57#include <asm/cell-regs.h>
56 58
57#include "interrupt.h" 59#include "interrupt.h"
58#include "beat_wrapper.h" 60#include "beat_wrapper.h"
59#include "beat.h" 61#include "beat.h"
60#include "pci.h" 62#include "pci.h"
63#include "../cell/interrupt.h"
64#include "../cell/pervasive.h"
65#include "../cell/ras.h"
61 66
62static char celleb_machine_type[128] = "Celleb"; 67static char celleb_machine_type[128] = "Celleb";
63 68
@@ -88,61 +93,122 @@ static void celleb_progress(char *s, unsigned short hex)
88 printk("*** %04x : %s\n", hex, s ? s : ""); 93 printk("*** %04x : %s\n", hex, s ? s : "");
89} 94}
90 95
91static void __init celleb_setup_arch(void) 96static void __init celleb_setup_arch_common(void)
97{
98 /* init to some ~sane value until calibrate_delay() runs */
99 loops_per_jiffy = 50000000;
100
101#ifdef CONFIG_DUMMY_CONSOLE
102 conswitchp = &dummy_con;
103#endif
104}
105
106static struct of_device_id celleb_bus_ids[] __initdata = {
107 { .type = "scc", },
108 { .type = "ioif", }, /* old style */
109 {},
110};
111
112static int __init celleb_publish_devices(void)
113{
114 /* Publish OF platform devices for southbridge IOs */
115 of_platform_bus_probe(NULL, celleb_bus_ids, NULL);
116
117 celleb_pci_workaround_init();
118
119 return 0;
120}
121machine_device_initcall(celleb_beat, celleb_publish_devices);
122machine_device_initcall(celleb_native, celleb_publish_devices);
123
124
125/*
126 * functions for Celleb-Beat
127 */
128static void __init celleb_setup_arch_beat(void)
92{ 129{
93#ifdef CONFIG_SPU_BASE 130#ifdef CONFIG_SPU_BASE
94 spu_priv1_ops = &spu_priv1_beat_ops; 131 spu_priv1_ops = &spu_priv1_beat_ops;
95 spu_management_ops = &spu_management_of_ops; 132 spu_management_ops = &spu_management_of_ops;
96#endif 133#endif
97 134
98#ifdef CONFIG_SMP 135#ifdef CONFIG_SMP
99 smp_init_celleb(); 136 smp_init_celleb();
100#endif 137#endif
101 138
102 /* init to some ~sane value until calibrate_delay() runs */ 139 celleb_setup_arch_common();
103 loops_per_jiffy = 50000000;
104
105#ifdef CONFIG_DUMMY_CONSOLE
106 conswitchp = &dummy_con;
107#endif
108} 140}
109 141
110static int __init celleb_probe(void) 142static int __init celleb_probe_beat(void)
111{ 143{
112 unsigned long root = of_get_flat_dt_root(); 144 unsigned long root = of_get_flat_dt_root();
113 145
114 if (!of_flat_dt_is_compatible(root, "Beat")) 146 if (!of_flat_dt_is_compatible(root, "Beat"))
115 return 0; 147 return 0;
116 148
117 powerpc_firmware_features |= FW_FEATURE_CELLEB_POSSIBLE; 149 powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS
150 | FW_FEATURE_BEAT | FW_FEATURE_LPAR;
118 hpte_init_beat_v3(); 151 hpte_init_beat_v3();
152
119 return 1; 153 return 1;
120} 154}
121 155
122static struct of_device_id celleb_bus_ids[] __initdata = {
123 { .type = "scc", },
124 { .type = "ioif", }, /* old style */
125 {},
126};
127 156
128static int __init celleb_publish_devices(void) 157/*
158 * functions for Celleb-native
159 */
160static void __init celleb_init_IRQ_native(void)
129{ 161{
130 if (!machine_is(celleb)) 162 iic_init_IRQ();
131 return 0; 163 spider_init_IRQ();
164}
132 165
133 /* Publish OF platform devices for southbridge IOs */ 166static void __init celleb_setup_arch_native(void)
134 of_platform_bus_probe(NULL, celleb_bus_ids, NULL); 167{
168#ifdef CONFIG_SPU_BASE
169 spu_priv1_ops = &spu_priv1_mmio_ops;
170 spu_management_ops = &spu_management_of_ops;
171#endif
135 172
136 celleb_pci_workaround_init(); 173 cbe_regs_init();
137 174
138 return 0; 175#ifdef CONFIG_CBE_RAS
176 cbe_ras_init();
177#endif
178
179#ifdef CONFIG_SMP
180 smp_init_cell();
181#endif
182
183 cbe_pervasive_init();
184
185 /* XXX: nvram initialization should be added */
186
187 celleb_setup_arch_common();
139} 188}
140device_initcall(celleb_publish_devices);
141 189
142define_machine(celleb) { 190static int __init celleb_probe_native(void)
143 .name = "Cell Reference Set", 191{
144 .probe = celleb_probe, 192 unsigned long root = of_get_flat_dt_root();
145 .setup_arch = celleb_setup_arch, 193
194 if (of_flat_dt_is_compatible(root, "Beat") ||
195 !of_flat_dt_is_compatible(root, "TOSHIBA,Celleb"))
196 return 0;
197
198 powerpc_firmware_features |= FW_FEATURE_CELLEB_ALWAYS;
199 hpte_init_native();
200
201 return 1;
202}
203
204
205/*
206 * machine definitions
207 */
208define_machine(celleb_beat) {
209 .name = "Cell Reference Set (Beat)",
210 .probe = celleb_probe_beat,
211 .setup_arch = celleb_setup_arch_beat,
146 .show_cpuinfo = celleb_show_cpuinfo, 212 .show_cpuinfo = celleb_show_cpuinfo,
147 .restart = beat_restart, 213 .restart = beat_restart,
148 .power_off = beat_power_off, 214 .power_off = beat_power_off,
@@ -167,3 +233,26 @@ define_machine(celleb) {
167 .machine_crash_shutdown = default_machine_crash_shutdown, 233 .machine_crash_shutdown = default_machine_crash_shutdown,
168#endif 234#endif
169}; 235};
236
237define_machine(celleb_native) {
238 .name = "Cell Reference Set (native)",
239 .probe = celleb_probe_native,
240 .setup_arch = celleb_setup_arch_native,
241 .show_cpuinfo = celleb_show_cpuinfo,
242 .restart = rtas_restart,
243 .power_off = rtas_power_off,
244 .halt = rtas_halt,
245 .get_boot_time = rtas_get_boot_time,
246 .get_rtc_time = rtas_get_rtc_time,
247 .set_rtc_time = rtas_set_rtc_time,
248 .calibrate_decr = generic_calibrate_decr,
249 .progress = celleb_progress,
250 .pci_probe_mode = celleb_pci_probe_mode,
251 .pci_setup_phb = celleb_setup_phb,
252 .init_IRQ = celleb_init_IRQ_native,
253#ifdef CONFIG_KEXEC
254 .machine_kexec = default_machine_kexec,
255 .machine_kexec_prepare = default_machine_kexec_prepare,
256 .machine_crash_shutdown = default_machine_crash_shutdown,
257#endif
258};
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 0340a342f772..609c46db4a1b 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -198,7 +198,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d
198 printk ("RTAS supporting Pegasos OF not found, please upgrade" 198 printk ("RTAS supporting Pegasos OF not found, please upgrade"
199 " your firmware\n"); 199 " your firmware\n");
200 } 200 }
201 pci_assign_all_buses = 1; 201 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
202 /* keep the reference to the root node */ 202 /* keep the reference to the root node */
203} 203}
204 204
@@ -354,7 +354,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,
354 * mode as well. The same fixup must be done to the class-code property in 354 * mode as well. The same fixup must be done to the class-code property in
355 * the IDE node /pci@80000000/ide@C,1 355 * the IDE node /pci@80000000/ide@C,1
356 */ 356 */
357static void __devinit chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) 357static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
358{ 358{
359 u8 progif; 359 u8 progif;
360 struct pci_dev *viaisa; 360 struct pci_dev *viaisa;
@@ -375,4 +375,4 @@ static void __devinit chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
375 375
376 pci_dev_put(viaisa); 376 pci_dev_put(viaisa);
377} 377}
378DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata); 378DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, chrp_pci_fixup_vt8231_ata);
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 59306261f5b2..116babbaaf81 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -115,7 +115,7 @@ void chrp_show_cpuinfo(struct seq_file *m)
115 seq_printf(m, "machine\t\t: CHRP %s\n", model); 115 seq_printf(m, "machine\t\t: CHRP %s\n", model);
116 116
117 /* longtrail (goldengate) stuff */ 117 /* longtrail (goldengate) stuff */
118 if (!strncmp(model, "IBM,LongTrail", 13)) { 118 if (model && !strncmp(model, "IBM,LongTrail", 13)) {
119 /* VLSI VAS96011/12 `Golden Gate 2' */ 119 /* VLSI VAS96011/12 `Golden Gate 2' */
120 /* Memory banks */ 120 /* Memory banks */
121 sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL) 121 sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
@@ -203,15 +203,20 @@ static void __init sio_fixup_irq(const char *name, u8 device, u8 level,
203static void __init sio_init(void) 203static void __init sio_init(void)
204{ 204{
205 struct device_node *root; 205 struct device_node *root;
206 const char *model;
206 207
207 if ((root = of_find_node_by_path("/")) && 208 root = of_find_node_by_path("/");
208 !strncmp(of_get_property(root, "model", NULL), 209 if (!root)
209 "IBM,LongTrail", 13)) { 210 return;
211
212 model = of_get_property(root, "model", NULL);
213 if (model && !strncmp(model, "IBM,LongTrail", 13)) {
210 /* logical device 0 (KBC/Keyboard) */ 214 /* logical device 0 (KBC/Keyboard) */
211 sio_fixup_irq("keyboard", 0, 1, 2); 215 sio_fixup_irq("keyboard", 0, 1, 2);
212 /* select logical device 1 (KBC/Mouse) */ 216 /* select logical device 1 (KBC/Mouse) */
213 sio_fixup_irq("mouse", 1, 12, 2); 217 sio_fixup_irq("mouse", 1, 12, 2);
214 } 218 }
219
215 of_node_put(root); 220 of_node_put(root);
216} 221}
217 222
@@ -251,6 +256,57 @@ static void briq_restart(char *cmd)
251 for(;;); 256 for(;;);
252} 257}
253 258
259/*
260 * Per default, input/output-device points to the keyboard/screen
261 * If no card is installed, the built-in serial port is used as a fallback.
262 * But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
263 * the the built-in serial node. Instead, a /failsafe node is created.
264 */
265static void chrp_init_early(void)
266{
267 struct device_node *node;
268 const char *property;
269
270 if (strstr(cmd_line, "console="))
271 return;
272 /* find the boot console from /chosen/stdout */
273 if (!of_chosen)
274 return;
275 node = of_find_node_by_path("/");
276 if (!node)
277 return;
278 property = of_get_property(node, "model", NULL);
279 if (!property)
280 goto out_put;
281 if (strcmp(property, "Pegasos2"))
282 goto out_put;
283 /* this is a Pegasos2 */
284 property = of_get_property(of_chosen, "linux,stdout-path", NULL);
285 if (!property)
286 goto out_put;
287 of_node_put(node);
288 node = of_find_node_by_path(property);
289 if (!node)
290 return;
291 property = of_get_property(node, "device_type", NULL);
292 if (!property)
293 goto out_put;
294 if (strcmp(property, "serial"))
295 goto out_put;
296 /*
297 * The 9pin connector is either /failsafe
298 * or /pci@80000000/isa@C/serial@i2F8
299 * The optional graphics card has also type 'serial' in VGA mode.
300 */
301 property = of_get_property(node, "name", NULL);
302 if (!property)
303 goto out_put;
304 if (!strcmp(property, "failsafe") || !strcmp(property, "serial"))
305 add_preferred_console("ttyS", 0, NULL);
306out_put:
307 of_node_put(node);
308}
309
254void __init chrp_setup_arch(void) 310void __init chrp_setup_arch(void)
255{ 311{
256 struct device_node *root = of_find_node_by_path("/"); 312 struct device_node *root = of_find_node_by_path("/");
@@ -594,6 +650,7 @@ define_machine(chrp) {
594 .probe = chrp_probe, 650 .probe = chrp_probe,
595 .setup_arch = chrp_setup_arch, 651 .setup_arch = chrp_setup_arch,
596 .init = chrp_init2, 652 .init = chrp_init2,
653 .init_early = chrp_init_early,
597 .show_cpuinfo = chrp_show_cpuinfo, 654 .show_cpuinfo = chrp_show_cpuinfo,
598 .init_IRQ = chrp_init_IRQ, 655 .init_IRQ = chrp_init_IRQ,
599 .restart = rtas_restart, 656 .restart = rtas_restart,
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig
index 8924095a7928..6c8083757938 100644
--- a/arch/powerpc/platforms/embedded6xx/Kconfig
+++ b/arch/powerpc/platforms/embedded6xx/Kconfig
@@ -9,6 +9,8 @@ config LINKSTATION
9 select FSL_SOC 9 select FSL_SOC
10 select PPC_UDBG_16550 if SERIAL_8250 10 select PPC_UDBG_16550 if SERIAL_8250
11 select DEFAULT_UIMAGE 11 select DEFAULT_UIMAGE
12 select MPC10X_OPENPIC
13 select MPC10X_BRIDGE
12 help 14 help
13 Select LINKSTATION if configuring for one of PPC- (MPC8241) 15 Select LINKSTATION if configuring for one of PPC- (MPC8241)
14 based NAS systems from Buffalo Technology. So far only 16 based NAS systems from Buffalo Technology. So far only
@@ -16,6 +18,19 @@ config LINKSTATION
16 Linkstation-I HD-HLAN and HD-HGLAN versions, and PPC-based 18 Linkstation-I HD-HLAN and HD-HGLAN versions, and PPC-based
17 Terastation systems should be supported too. 19 Terastation systems should be supported too.
18 20
21config STORCENTER
22 bool "IOMEGA StorCenter"
23 depends on EMBEDDED6xx
24 select MPIC
25 select FSL_SOC
26 select PPC_UDBG_16550 if SERIAL_8250
27 select WANT_DEVICE_TREE
28 select MPC10X_OPENPIC
29 select MPC10X_BRIDGE
30 help
31 Select STORCENTER if configuring for the iomega StorCenter
32 with an 8241 CPU in it.
33
19config MPC7448HPC2 34config MPC7448HPC2
20 bool "Freescale MPC7448HPC2(Taiga)" 35 bool "Freescale MPC7448HPC2(Taiga)"
21 depends on EMBEDDED6xx 36 depends on EMBEDDED6xx
@@ -23,6 +38,7 @@ config MPC7448HPC2
23 select DEFAULT_UIMAGE 38 select DEFAULT_UIMAGE
24 select PPC_UDBG_16550 39 select PPC_UDBG_16550
25 select WANT_DEVICE_TREE 40 select WANT_DEVICE_TREE
41 select TSI108_BRIDGE
26 help 42 help
27 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) 43 Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga)
28 platform 44 platform
@@ -33,6 +49,7 @@ config PPC_HOLLY
33 select TSI108_BRIDGE 49 select TSI108_BRIDGE
34 select PPC_UDBG_16550 50 select PPC_UDBG_16550
35 select WANT_DEVICE_TREE 51 select WANT_DEVICE_TREE
52 select TSI108_BRIDGE
36 help 53 help
37 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval 54 Select PPC_HOLLY if configuring for an IBM 750GX/CL Eval
38 Board with TSI108/9 bridge (Hickory/Holly) 55 Board with TSI108/9 bridge (Hickory/Holly)
@@ -48,17 +65,13 @@ config PPC_PRPMC2800
48 65
49config TSI108_BRIDGE 66config TSI108_BRIDGE
50 bool 67 bool
51 depends on MPC7448HPC2 || PPC_HOLLY
52 select PCI 68 select PCI
53 select MPIC 69 select MPIC
54 select MPIC_WEIRD 70 select MPIC_WEIRD
55 default y
56 71
57config MPC10X_BRIDGE 72config MPC10X_BRIDGE
58 bool 73 bool
59 depends on LINKSTATION
60 select PPC_INDIRECT_PCI 74 select PPC_INDIRECT_PCI
61 default y
62 75
63config MV64X60 76config MV64X60
64 bool 77 bool
@@ -67,8 +80,6 @@ config MV64X60
67 80
68config MPC10X_OPENPIC 81config MPC10X_OPENPIC
69 bool 82 bool
70 depends on LINKSTATION
71 default y
72 83
73config MPC10X_STORE_GATHERING 84config MPC10X_STORE_GATHERING
74 bool "Enable MPC10x store gathering" 85 bool "Enable MPC10x store gathering"
diff --git a/arch/powerpc/platforms/embedded6xx/Makefile b/arch/powerpc/platforms/embedded6xx/Makefile
index 844947cfc5db..06524d3ffd2e 100644
--- a/arch/powerpc/platforms/embedded6xx/Makefile
+++ b/arch/powerpc/platforms/embedded6xx/Makefile
@@ -3,5 +3,6 @@
3# 3#
4obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o 4obj-$(CONFIG_MPC7448HPC2) += mpc7448_hpc2.o
5obj-$(CONFIG_LINKSTATION) += linkstation.o ls_uart.o 5obj-$(CONFIG_LINKSTATION) += linkstation.o ls_uart.o
6obj-$(CONFIG_STORCENTER) += storcenter.o
6obj-$(CONFIG_PPC_HOLLY) += holly.o 7obj-$(CONFIG_PPC_HOLLY) += holly.o
7obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o 8obj-$(CONFIG_PPC_PRPMC2800) += prpmc2800.o
diff --git a/arch/powerpc/platforms/embedded6xx/holly.c b/arch/powerpc/platforms/embedded6xx/holly.c
index b6de2b5223dd..b21fde589ca7 100644
--- a/arch/powerpc/platforms/embedded6xx/holly.c
+++ b/arch/powerpc/platforms/embedded6xx/holly.c
@@ -20,12 +20,12 @@
20#include <linux/console.h> 20#include <linux/console.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/ide.h>
24#include <linux/seq_file.h> 23#include <linux/seq_file.h>
25#include <linux/root_dev.h> 24#include <linux/root_dev.h>
26#include <linux/serial.h> 25#include <linux/serial.h>
27#include <linux/tty.h> 26#include <linux/tty.h>
28#include <linux/serial_core.h> 27#include <linux/serial_core.h>
28#include <linux/of_platform.h>
29 29
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/time.h> 31#include <asm/time.h>
@@ -39,7 +39,6 @@
39#include <asm/tsi108_irq.h> 39#include <asm/tsi108_irq.h>
40#include <asm/tsi108_pci.h> 40#include <asm/tsi108_pci.h>
41#include <asm/mpic.h> 41#include <asm/mpic.h>
42#include <asm/of_platform.h>
43 42
44#undef DEBUG 43#undef DEBUG
45 44
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c
index c99264cedda5..9d891bd5df5a 100644
--- a/arch/powerpc/platforms/embedded6xx/ls_uart.c
+++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c
@@ -117,9 +117,6 @@ static int __init ls_uarts_init(void)
117 phys_addr_t phys_addr; 117 phys_addr_t phys_addr;
118 int len; 118 int len;
119 119
120 if (!machine_is(linkstation))
121 return 0;
122
123 avr = of_find_node_by_path("/soc10x/serial@80004500"); 120 avr = of_find_node_by_path("/soc10x/serial@80004500");
124 if (!avr) 121 if (!avr)
125 return -EINVAL; 122 return -EINVAL;
@@ -142,4 +139,4 @@ static int __init ls_uarts_init(void)
142 return 0; 139 return 0;
143} 140}
144 141
145late_initcall(ls_uarts_init); 142machine_late_initcall(linkstation, ls_uarts_init);
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index a2c04b9d42b1..d4f8bf581e3a 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -53,8 +53,6 @@
53 53
54#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000 54#define MPC7448HPC2_PCI_CFG_PHYS 0xfb000000
55 55
56extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
57
58int mpc7448_hpc2_exclude_device(struct pci_controller *hose, 56int mpc7448_hpc2_exclude_device(struct pci_controller *hose,
59 u_char bus, u_char devfn) 57 u_char bus, u_char devfn)
60{ 58{
diff --git a/arch/powerpc/platforms/embedded6xx/storcenter.c b/arch/powerpc/platforms/embedded6xx/storcenter.c
new file mode 100644
index 000000000000..e12e9d298716
--- /dev/null
+++ b/arch/powerpc/platforms/embedded6xx/storcenter.c
@@ -0,0 +1,192 @@
1/*
2 * Board setup routines for the storcenter
3 *
4 * Copyright 2007 (C) Oyvind Repvik (nail@nslu2-linux.org)
5 * Copyright 2007 Andy Wilcox, Jon Loeliger
6 *
7 * Based on linkstation.c by G. Liakhovetski
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
11 * any kind, whether express or implied.
12 */
13
14#include <linux/kernel.h>
15#include <linux/pci.h>
16#include <linux/initrd.h>
17#include <linux/mtd/physmap.h>
18#include <linux/of_platform.h>
19
20#include <asm/system.h>
21#include <asm/time.h>
22#include <asm/prom.h>
23#include <asm/mpic.h>
24#include <asm/pci-bridge.h>
25
26#include "mpc10x.h"
27
28
29#ifdef CONFIG_MTD_PHYSMAP
30static struct mtd_partition storcenter_physmap_partitions[] = {
31 {
32 .name = "kernel",
33 .offset = 0x000000,
34 .size = 0x170000,
35 },
36 {
37 .name = "rootfs",
38 .offset = 0x170000,
39 .size = 0x590000,
40 },
41 {
42 .name = "uboot",
43 .offset = 0x700000,
44 .size = 0x040000,
45 },
46 {
47 .name = "config",
48 .offset = 0x740000,
49 .size = 0x0c0000,
50 },
51};
52#endif
53
54
55static __initdata struct of_device_id storcenter_of_bus[] = {
56 { .name = "soc", },
57 {},
58};
59
60static int __init storcenter_device_probe(void)
61{
62 of_platform_bus_probe(NULL, storcenter_of_bus, NULL);
63 return 0;
64}
65machine_device_initcall(storcenter, storcenter_device_probe);
66
67
68static int __init storcenter_add_bridge(struct device_node *dev)
69{
70#ifdef CONFIG_PCI
71 int len;
72 struct pci_controller *hose;
73 const int *bus_range;
74
75 printk("Adding PCI host bridge %s\n", dev->full_name);
76
77 hose = pcibios_alloc_controller(dev);
78 if (hose == NULL)
79 return -ENOMEM;
80
81 bus_range = of_get_property(dev, "bus-range", &len);
82 hose->first_busno = bus_range ? bus_range[0] : 0;
83 hose->last_busno = bus_range ? bus_range[1] : 0xff;
84
85 setup_indirect_pci(hose, MPC10X_MAPB_CNFG_ADDR, MPC10X_MAPB_CNFG_DATA, 0);
86
87 /* Interpret the "ranges" property */
88 /* This also maps the I/O region and sets isa_io/mem_base */
89 pci_process_bridge_OF_ranges(hose, dev, 1);
90#endif
91
92 return 0;
93}
94
95static void __init storcenter_setup_arch(void)
96{
97 struct device_node *np;
98
99#ifdef CONFIG_MTD_PHYSMAP
100 physmap_set_partitions(storcenter_physmap_partitions,
101 ARRAY_SIZE(storcenter_physmap_partitions));
102#endif
103
104 /* Lookup PCI host bridges */
105 for_each_compatible_node(np, "pci", "mpc10x-pci")
106 storcenter_add_bridge(np);
107
108 printk(KERN_INFO "IOMEGA StorCenter\n");
109}
110
111/*
112 * Interrupt setup and service. Interrrupts on the turbostation come
113 * from the four PCI slots plus onboard 8241 devices: I2C, DUART.
114 */
115static void __init storcenter_init_IRQ(void)
116{
117 struct mpic *mpic;
118 struct device_node *dnp;
119 const void *prop;
120 int size;
121 phys_addr_t paddr;
122
123 dnp = of_find_node_by_type(NULL, "open-pic");
124 if (dnp == NULL)
125 return;
126
127 prop = of_get_property(dnp, "reg", &size);
128 if (prop == NULL) {
129 of_node_put(dnp);
130 return;
131 }
132
133 paddr = (phys_addr_t)of_translate_address(dnp, prop);
134 mpic = mpic_alloc(dnp, paddr, MPIC_PRIMARY | MPIC_WANTS_RESET,
135 4, 32, " EPIC ");
136
137 of_node_put(dnp);
138
139 BUG_ON(mpic == NULL);
140
141 /* PCI IRQs */
142 /*
143 * 2.6.12 patch:
144 * openpic_set_sources(0, 5, OpenPIC_Addr + 0x10200);
145 * openpic_set_sources(5, 2, OpenPIC_Addr + 0x11120);
146 * first_irq, num_irqs, __iomem first_ISR
147 * o_ss: i, src: 0, fdf50200
148 * o_ss: i, src: 1, fdf50220
149 * o_ss: i, src: 2, fdf50240
150 * o_ss: i, src: 3, fdf50260
151 * o_ss: i, src: 4, fdf50280
152 * o_ss: i, src: 5, fdf51120
153 * o_ss: i, src: 6, fdf51140
154 */
155 mpic_assign_isu(mpic, 0, paddr + 0x10200);
156 mpic_assign_isu(mpic, 1, paddr + 0x10220);
157 mpic_assign_isu(mpic, 2, paddr + 0x10240);
158 mpic_assign_isu(mpic, 3, paddr + 0x10260);
159 mpic_assign_isu(mpic, 4, paddr + 0x10280);
160 mpic_assign_isu(mpic, 5, paddr + 0x11120);
161 mpic_assign_isu(mpic, 6, paddr + 0x11140);
162
163 mpic_init(mpic);
164}
165
166static void storcenter_restart(char *cmd)
167{
168 local_irq_disable();
169
170 /* Set exception prefix high - to the firmware */
171 _nmask_and_or_msr(0, MSR_IP);
172
173 /* Wait for reset to happen */
174 for (;;) ;
175}
176
177static int __init storcenter_probe(void)
178{
179 unsigned long root = of_get_flat_dt_root();
180
181 return of_flat_dt_is_compatible(root, "storcenter");
182}
183
184define_machine(storcenter){
185 .name = "IOMEGA StorCenter",
186 .probe = storcenter_probe,
187 .setup_arch = storcenter_setup_arch,
188 .init_IRQ = storcenter_init_IRQ,
189 .get_irq = mpic_get_irq,
190 .restart = storcenter_restart,
191 .calibrate_decr = generic_calibrate_decr,
192};
diff --git a/arch/powerpc/platforms/iseries/Makefile b/arch/powerpc/platforms/iseries/Makefile
index a65f1b44abf8..cc7161ff1666 100644
--- a/arch/powerpc/platforms/iseries/Makefile
+++ b/arch/powerpc/platforms/iseries/Makefile
@@ -5,7 +5,7 @@ extra-y += dt.o
5obj-y += exception.o 5obj-y += exception.o
6obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \ 6obj-y += hvlog.o hvlpconfig.o lpardata.o setup.o dt_mod.o mf.o lpevents.o \
7 hvcall.o proc.o htab.o iommu.o misc.o irq.o 7 hvcall.o proc.o htab.o iommu.o misc.o irq.o
8obj-$(CONFIG_PCI) += pci.o vpdinfo.o 8obj-$(CONFIG_PCI) += pci.o
9obj-$(CONFIG_SMP) += smp.o 9obj-$(CONFIG_SMP) += smp.o
10obj-$(CONFIG_VIOPATH) += viopath.o vio.o 10obj-$(CONFIG_VIOPATH) += viopath.o vio.o
11obj-$(CONFIG_MODULES) += ksyms.o 11obj-$(CONFIG_MODULES) += ksyms.o
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 49e9c664ea89..6a0c6f6675cd 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -163,8 +163,10 @@ static struct iommu_table *iommu_table_find(struct iommu_table * tbl)
163 (it->it_type == TCE_PCI) && 163 (it->it_type == TCE_PCI) &&
164 (it->it_offset == tbl->it_offset) && 164 (it->it_offset == tbl->it_offset) &&
165 (it->it_index == tbl->it_index) && 165 (it->it_index == tbl->it_index) &&
166 (it->it_size == tbl->it_size)) 166 (it->it_size == tbl->it_size)) {
167 of_node_put(node);
167 return it; 168 return it;
169 }
168 } 170 }
169 return NULL; 171 return NULL;
170} 172}
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index 275f49449839..e5b40e3e0082 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -239,7 +239,7 @@ int HvLpEvent_unregisterHandler(HvLpEvent_Type eventType)
239 * other CPUs, and that the deleted handler isn't 239 * other CPUs, and that the deleted handler isn't
240 * still running on another CPU when we return. 240 * still running on another CPU when we return.
241 */ 241 */
242 synchronize_rcu(); 242 synchronize_sched();
243 return 0; 243 return 0;
244 } 244 }
245 } 245 }
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c
index da87162000f0..cc562e4c2f32 100644
--- a/arch/powerpc/platforms/iseries/pci.c
+++ b/arch/powerpc/platforms/iseries/pci.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2001 Allan Trautman, IBM Corporation 2 * Copyright (C) 2001 Allan Trautman, IBM Corporation
3 * Copyright (C) 2005,2007 Stephen Rothwell, IBM Corp
3 * 4 *
4 * iSeries specific routines for PCI. 5 * iSeries specific routines for PCI.
5 * 6 *
@@ -19,13 +20,18 @@
19 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 22 */
23
24#undef DEBUG
25
22#include <linux/kernel.h> 26#include <linux/kernel.h>
23#include <linux/list.h> 27#include <linux/list.h>
24#include <linux/string.h> 28#include <linux/string.h>
25#include <linux/init.h> 29#include <linux/init.h>
26#include <linux/module.h> 30#include <linux/module.h>
27#include <linux/pci.h> 31#include <linux/pci.h>
32#include <linux/of.h>
28 33
34#include <asm/types.h>
29#include <asm/io.h> 35#include <asm/io.h>
30#include <asm/irq.h> 36#include <asm/irq.h>
31#include <asm/prom.h> 37#include <asm/prom.h>
@@ -35,6 +41,7 @@
35#include <asm/abs_addr.h> 41#include <asm/abs_addr.h>
36#include <asm/firmware.h> 42#include <asm/firmware.h>
37 43
44#include <asm/iseries/hv_types.h>
38#include <asm/iseries/hv_call_xm.h> 45#include <asm/iseries/hv_call_xm.h>
39#include <asm/iseries/mf.h> 46#include <asm/iseries/mf.h>
40#include <asm/iseries/iommu.h> 47#include <asm/iseries/iommu.h>
@@ -45,15 +52,8 @@
45#include "pci.h" 52#include "pci.h"
46#include "call_pci.h" 53#include "call_pci.h"
47 54
48/* 55#define PCI_RETRY_MAX 3
49 * Forward declares of prototypes. 56static int limit_pci_retries = 1; /* Set Retry Error on. */
50 */
51static struct device_node *find_Device_Node(int bus, int devfn);
52
53static int Pci_Retry_Max = 3; /* Only retry 3 times */
54static int Pci_Error_Flag = 1; /* Set Retry Error on. */
55
56static struct pci_ops iSeries_pci_ops;
57 57
58/* 58/*
59 * Table defines 59 * Table defines
@@ -62,6 +62,7 @@ static struct pci_ops iSeries_pci_ops;
62#define IOMM_TABLE_MAX_ENTRIES 1024 62#define IOMM_TABLE_MAX_ENTRIES 1024
63#define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL 63#define IOMM_TABLE_ENTRY_SIZE 0x0000000000400000UL
64#define BASE_IO_MEMORY 0xE000000000000000UL 64#define BASE_IO_MEMORY 0xE000000000000000UL
65#define END_IO_MEMORY 0xEFFFFFFFFFFFFFFFUL
65 66
66static unsigned long max_io_memory = BASE_IO_MEMORY; 67static unsigned long max_io_memory = BASE_IO_MEMORY;
67static long current_iomm_table_entry; 68static long current_iomm_table_entry;
@@ -70,12 +71,237 @@ static long current_iomm_table_entry;
70 * Lookup Tables. 71 * Lookup Tables.
71 */ 72 */
72static struct device_node *iomm_table[IOMM_TABLE_MAX_ENTRIES]; 73static struct device_node *iomm_table[IOMM_TABLE_MAX_ENTRIES];
73static u8 iobar_table[IOMM_TABLE_MAX_ENTRIES]; 74static u64 ds_addr_table[IOMM_TABLE_MAX_ENTRIES];
74 75
75static const char pci_io_text[] = "iSeries PCI I/O";
76static DEFINE_SPINLOCK(iomm_table_lock); 76static DEFINE_SPINLOCK(iomm_table_lock);
77 77
78/* 78/*
79 * Generate a Direct Select Address for the Hypervisor
80 */
81static inline u64 iseries_ds_addr(struct device_node *node)
82{
83 struct pci_dn *pdn = PCI_DN(node);
84 const u32 *sbp = of_get_property(node, "linux,subbus", NULL);
85
86 return ((u64)pdn->busno << 48) + ((u64)(sbp ? *sbp : 0) << 40)
87 + ((u64)0x10 << 32);
88}
89
90/*
91 * Size of Bus VPD data
92 */
93#define BUS_VPDSIZE 1024
94
95/*
96 * Bus Vpd Tags
97 */
98#define VPD_END_OF_AREA 0x79
99#define VPD_ID_STRING 0x82
100#define VPD_VENDOR_AREA 0x84
101
102/*
103 * Mfg Area Tags
104 */
105#define VPD_FRU_FRAME_ID 0x4649 /* "FI" */
106#define VPD_SLOT_MAP_FORMAT 0x4D46 /* "MF" */
107#define VPD_SLOT_MAP 0x534D /* "SM" */
108
109/*
110 * Structures of the areas
111 */
112struct mfg_vpd_area {
113 u16 tag;
114 u8 length;
115 u8 data1;
116 u8 data2;
117};
118#define MFG_ENTRY_SIZE 3
119
120struct slot_map {
121 u8 agent;
122 u8 secondary_agent;
123 u8 phb;
124 char card_location[3];
125 char parms[8];
126 char reserved[2];
127};
128#define SLOT_ENTRY_SIZE 16
129
130/*
131 * Parse the Slot Area
132 */
133static void __init iseries_parse_slot_area(struct slot_map *map, int len,
134 HvAgentId agent, u8 *phb, char card[4])
135{
136 /*
137 * Parse Slot label until we find the one requested
138 */
139 while (len > 0) {
140 if (map->agent == agent) {
141 /*
142 * If Phb wasn't found, grab the entry first one found.
143 */
144 if (*phb == 0xff)
145 *phb = map->phb;
146 /* Found it, extract the data. */
147 if (map->phb == *phb) {
148 memcpy(card, &map->card_location, 3);
149 card[3] = 0;
150 break;
151 }
152 }
153 /* Point to the next Slot */
154 map = (struct slot_map *)((char *)map + SLOT_ENTRY_SIZE);
155 len -= SLOT_ENTRY_SIZE;
156 }
157}
158
159/*
160 * Parse the Mfg Area
161 */
162static void __init iseries_parse_mfg_area(struct mfg_vpd_area *area, int len,
163 HvAgentId agent, u8 *phb, u8 *frame, char card[4])
164{
165 u16 slot_map_fmt = 0;
166
167 /* Parse Mfg Data */
168 while (len > 0) {
169 int mfg_tag_len = area->length;
170 /* Frame ID (FI 4649020310 ) */
171 if (area->tag == VPD_FRU_FRAME_ID)
172 *frame = area->data1;
173 /* Slot Map Format (MF 4D46020004 ) */
174 else if (area->tag == VPD_SLOT_MAP_FORMAT)
175 slot_map_fmt = (area->data1 * 256)
176 + area->data2;
177 /* Slot Map (SM 534D90 */
178 else if (area->tag == VPD_SLOT_MAP) {
179 struct slot_map *slot_map;
180
181 if (slot_map_fmt == 0x1004)
182 slot_map = (struct slot_map *)((char *)area
183 + MFG_ENTRY_SIZE + 1);
184 else
185 slot_map = (struct slot_map *)((char *)area
186 + MFG_ENTRY_SIZE);
187 iseries_parse_slot_area(slot_map, mfg_tag_len,
188 agent, phb, card);
189 }
190 /*
191 * Point to the next Mfg Area
192 * Use defined size, sizeof give wrong answer
193 */
194 area = (struct mfg_vpd_area *)((char *)area + mfg_tag_len
195 + MFG_ENTRY_SIZE);
196 len -= (mfg_tag_len + MFG_ENTRY_SIZE);
197 }
198}
199
200/*
201 * Look for "BUS".. Data is not Null terminated.
202 * PHBID of 0xFF indicates PHB was not found in VPD Data.
203 */
204static u8 __init iseries_parse_phbid(u8 *area, int len)
205{
206 while (len > 0) {
207 if ((*area == 'B') && (*(area + 1) == 'U')
208 && (*(area + 2) == 'S')) {
209 area += 3;
210 while (*area == ' ')
211 area++;
212 return *area & 0x0F;
213 }
214 area++;
215 len--;
216 }
217 return 0xff;
218}
219
220/*
221 * Parse out the VPD Areas
222 */
223static void __init iseries_parse_vpd(u8 *data, int data_len,
224 HvAgentId agent, u8 *frame, char card[4])
225{
226 u8 phb = 0xff;
227
228 while (data_len > 0) {
229 int len;
230 u8 tag = *data;
231
232 if (tag == VPD_END_OF_AREA)
233 break;
234 len = *(data + 1) + (*(data + 2) * 256);
235 data += 3;
236 data_len -= 3;
237 if (tag == VPD_ID_STRING)
238 phb = iseries_parse_phbid(data, len);
239 else if (tag == VPD_VENDOR_AREA)
240 iseries_parse_mfg_area((struct mfg_vpd_area *)data, len,
241 agent, &phb, frame, card);
242 /* Point to next Area. */
243 data += len;
244 data_len -= len;
245 }
246}
247
248static int __init iseries_get_location_code(u16 bus, HvAgentId agent,
249 u8 *frame, char card[4])
250{
251 int status = 0;
252 int bus_vpd_len = 0;
253 u8 *bus_vpd = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
254
255 if (bus_vpd == NULL) {
256 printk("PCI: Bus VPD Buffer allocation failure.\n");
257 return 0;
258 }
259 bus_vpd_len = HvCallPci_getBusVpd(bus, iseries_hv_addr(bus_vpd),
260 BUS_VPDSIZE);
261 if (bus_vpd_len == 0) {
262 printk("PCI: Bus VPD Buffer zero length.\n");
263 goto out_free;
264 }
265 /* printk("PCI: bus_vpd: %p, %d\n",bus_vpd, bus_vpd_len); */
266 /* Make sure this is what I think it is */
267 if (*bus_vpd != VPD_ID_STRING) {
268 printk("PCI: Bus VPD Buffer missing starting tag.\n");
269 goto out_free;
270 }
271 iseries_parse_vpd(bus_vpd, bus_vpd_len, agent, frame, card);
272 status = 1;
273out_free:
274 kfree(bus_vpd);
275 return status;
276}
277
278/*
279 * Prints the device information.
280 * - Pass in pci_dev* pointer to the device.
281 * - Pass in the device count
282 *
283 * Format:
284 * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
285 * controller
286 */
287static void __init iseries_device_information(struct pci_dev *pdev,
288 u16 bus, HvSubBusNumber subbus)
289{
290 u8 frame = 0;
291 char card[4];
292 HvAgentId agent;
293
294 agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
295 ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
296
297 if (iseries_get_location_code(bus, agent, &frame, card)) {
298 printk(KERN_INFO "PCI: %s, Vendor %04X Frame%3d, "
299 "Card %4s 0x%04X\n", pci_name(pdev), pdev->vendor,
300 frame, card, (int)(pdev->class >> 8));
301 }
302}
303
304/*
79 * iomm_table_allocate_entry 305 * iomm_table_allocate_entry
80 * 306 *
81 * Adds pci_dev entry in address translation table 307 * Adds pci_dev entry in address translation table
@@ -87,7 +313,7 @@ static DEFINE_SPINLOCK(iomm_table_lock);
87 * - CurrentIndex is incremented to keep track of the last entry. 313 * - CurrentIndex is incremented to keep track of the last entry.
88 * - Builds the resource entry for allocated BARs. 314 * - Builds the resource entry for allocated BARs.
89 */ 315 */
90static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num) 316static void __init iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
91{ 317{
92 struct resource *bar_res = &dev->resource[bar_num]; 318 struct resource *bar_res = &dev->resource[bar_num];
93 long bar_size = pci_resource_len(dev, bar_num); 319 long bar_size = pci_resource_len(dev, bar_num);
@@ -101,7 +327,6 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
101 * Set Resource values. 327 * Set Resource values.
102 */ 328 */
103 spin_lock(&iomm_table_lock); 329 spin_lock(&iomm_table_lock);
104 bar_res->name = pci_io_text;
105 bar_res->start = BASE_IO_MEMORY + 330 bar_res->start = BASE_IO_MEMORY +
106 IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry; 331 IOMM_TABLE_ENTRY_SIZE * current_iomm_table_entry;
107 bar_res->end = bar_res->start + bar_size - 1; 332 bar_res->end = bar_res->start + bar_size - 1;
@@ -110,7 +335,8 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
110 */ 335 */
111 while (bar_size > 0 ) { 336 while (bar_size > 0 ) {
112 iomm_table[current_iomm_table_entry] = dev->sysdata; 337 iomm_table[current_iomm_table_entry] = dev->sysdata;
113 iobar_table[current_iomm_table_entry] = bar_num; 338 ds_addr_table[current_iomm_table_entry] =
339 iseries_ds_addr(dev->sysdata) | (bar_num << 24);
114 bar_size -= IOMM_TABLE_ENTRY_SIZE; 340 bar_size -= IOMM_TABLE_ENTRY_SIZE;
115 ++current_iomm_table_entry; 341 ++current_iomm_table_entry;
116 } 342 }
@@ -130,7 +356,7 @@ static void iomm_table_allocate_entry(struct pci_dev *dev, int bar_num)
130 * - Loops through The Bar resources(0 - 5) including the ROM 356 * - Loops through The Bar resources(0 - 5) including the ROM
131 * is resource(6). 357 * is resource(6).
132 */ 358 */
133static void allocate_device_bars(struct pci_dev *dev) 359static void __init allocate_device_bars(struct pci_dev *dev)
134{ 360{
135 int bar_num; 361 int bar_num;
136 362
@@ -145,79 +371,19 @@ static void allocate_device_bars(struct pci_dev *dev)
145 * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx 371 * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx
146 * PCI: Connect Bus Unit Failed 0x18.58.10 Rc: 0x00xx 372 * PCI: Connect Bus Unit Failed 0x18.58.10 Rc: 0x00xx
147 */ 373 */
148static void pci_Log_Error(char *Error_Text, int Bus, int SubBus, 374static void pci_log_error(char *error, int bus, int subbus,
149 int AgentId, int HvRc) 375 int agent, int hv_res)
150{ 376{
151 if (HvRc == 0x0302) 377 if (hv_res == 0x0302)
152 return; 378 return;
153 printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X", 379 printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",
154 Error_Text, Bus, SubBus, AgentId, HvRc); 380 error, bus, subbus, agent, hv_res);
155}
156
157/*
158 * iSeries_pci_final_fixup(void)
159 */
160void __init iSeries_pci_final_fixup(void)
161{
162 struct pci_dev *pdev = NULL;
163 struct device_node *node;
164 int DeviceCount = 0;
165
166 /* Fix up at the device node and pci_dev relationship */
167 mf_display_src(0xC9000100);
168
169 printk("pcibios_final_fixup\n");
170 for_each_pci_dev(pdev) {
171 node = find_Device_Node(pdev->bus->number, pdev->devfn);
172 printk("pci dev %p (%x.%x), node %p\n", pdev,
173 pdev->bus->number, pdev->devfn, node);
174
175 if (node != NULL) {
176 struct pci_dn *pdn = PCI_DN(node);
177 const u32 *agent;
178
179 agent = of_get_property(node, "linux,agent-id", NULL);
180 if ((pdn != NULL) && (agent != NULL)) {
181 u8 irq = iSeries_allocate_IRQ(pdn->busno, 0,
182 pdn->bussubno);
183 int err;
184
185 err = HvCallXm_connectBusUnit(pdn->busno, pdn->bussubno,
186 *agent, irq);
187 if (err)
188 pci_Log_Error("Connect Bus Unit",
189 pdn->busno, pdn->bussubno, *agent, err);
190 else {
191 err = HvCallPci_configStore8(pdn->busno, pdn->bussubno,
192 *agent,
193 PCI_INTERRUPT_LINE,
194 irq);
195 if (err)
196 pci_Log_Error("PciCfgStore Irq Failed!",
197 pdn->busno, pdn->bussubno, *agent, err);
198 }
199 if (!err)
200 pdev->irq = irq;
201 }
202
203 ++DeviceCount;
204 pdev->sysdata = (void *)node;
205 PCI_DN(node)->pcidev = pdev;
206 allocate_device_bars(pdev);
207 iSeries_Device_Information(pdev, DeviceCount);
208 iommu_devnode_init_iSeries(pdev, node);
209 } else
210 printk("PCI: Device Tree not found for 0x%016lX\n",
211 (unsigned long)pdev);
212 }
213 iSeries_activate_IRQs();
214 mf_display_src(0xC9000200);
215} 381}
216 382
217/* 383/*
218 * Look down the chain to find the matching Device Device 384 * Look down the chain to find the matching Device Device
219 */ 385 */
220static struct device_node *find_Device_Node(int bus, int devfn) 386static struct device_node *find_device_node(int bus, int devfn)
221{ 387{
222 struct device_node *node; 388 struct device_node *node;
223 389
@@ -230,22 +396,66 @@ static struct device_node *find_Device_Node(int bus, int devfn)
230 return NULL; 396 return NULL;
231} 397}
232 398
233#if 0
234/* 399/*
235 * Returns the device node for the passed pci_dev 400 * iSeries_pcibios_fixup_resources
236 * Sanity Check Node PciDev to passed pci_dev 401 *
237 * If none is found, returns a NULL which the client must handle. 402 * Fixes up all resources for devices
238 */ 403 */
239static struct device_node *get_Device_Node(struct pci_dev *pdev) 404void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev)
240{ 405{
406 const u32 *agent;
407 const u32 *sub_bus;
408 unsigned char bus = pdev->bus->number;
241 struct device_node *node; 409 struct device_node *node;
410 int i;
411
412 node = find_device_node(bus, pdev->devfn);
413 pr_debug("PCI: iSeries %s, pdev %p, node %p\n",
414 pci_name(pdev), pdev, node);
415 if (!node) {
416 printk("PCI: %s disabled, device tree entry not found !\n",
417 pci_name(pdev));
418 for (i = 0; i <= PCI_ROM_RESOURCE; i++)
419 pdev->resource[i].flags = 0;
420 return;
421 }
422 sub_bus = of_get_property(node, "linux,subbus", NULL);
423 agent = of_get_property(node, "linux,agent-id", NULL);
424 if (agent && sub_bus) {
425 u8 irq = iSeries_allocate_IRQ(bus, 0, *sub_bus);
426 int err;
427
428 err = HvCallXm_connectBusUnit(bus, *sub_bus, *agent, irq);
429 if (err)
430 pci_log_error("Connect Bus Unit",
431 bus, *sub_bus, *agent, err);
432 else {
433 err = HvCallPci_configStore8(bus, *sub_bus,
434 *agent, PCI_INTERRUPT_LINE, irq);
435 if (err)
436 pci_log_error("PciCfgStore Irq Failed!",
437 bus, *sub_bus, *agent, err);
438 else
439 pdev->irq = irq;
440 }
441 }
242 442
243 node = pdev->sysdata; 443 pdev->sysdata = node;
244 if (node == NULL || PCI_DN(node)->pcidev != pdev) 444 allocate_device_bars(pdev);
245 node = find_Device_Node(pdev->bus->number, pdev->devfn); 445 iseries_device_information(pdev, bus, *sub_bus);
246 return node; 446 iommu_devnode_init_iSeries(pdev, node);
447}
448
449/*
450 * iSeries_pci_final_fixup(void)
451 */
452void __init iSeries_pci_final_fixup(void)
453{
454 /* Fix up at the device node and pci_dev relationship */
455 mf_display_src(0xC9000100);
456 iSeries_activate_IRQs();
457 mf_display_src(0xC9000200);
247} 458}
248#endif
249 459
250/* 460/*
251 * Config space read and write functions. 461 * Config space read and write functions.
@@ -269,7 +479,7 @@ static u64 hv_cfg_write_func[4] = {
269static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn, 479static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
270 int offset, int size, u32 *val) 480 int offset, int size, u32 *val)
271{ 481{
272 struct device_node *node = find_Device_Node(bus->number, devfn); 482 struct device_node *node = find_device_node(bus->number, devfn);
273 u64 fn; 483 u64 fn;
274 struct HvCallPci_LoadReturn ret; 484 struct HvCallPci_LoadReturn ret;
275 485
@@ -299,7 +509,7 @@ static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
299static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn, 509static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn,
300 int offset, int size, u32 val) 510 int offset, int size, u32 val)
301{ 511{
302 struct device_node *node = find_Device_Node(bus->number, devfn); 512 struct device_node *node = find_device_node(bus->number, devfn);
303 u64 fn; 513 u64 fn;
304 u64 ret; 514 u64 ret;
305 515
@@ -331,22 +541,22 @@ static struct pci_ops iSeries_pci_ops = {
331 * PCI: Device 23.90 ReadL Retry( 1) 541 * PCI: Device 23.90 ReadL Retry( 1)
332 * PCI: Device 23.90 ReadL Retry Successful(1) 542 * PCI: Device 23.90 ReadL Retry Successful(1)
333 */ 543 */
334static int CheckReturnCode(char *TextHdr, struct device_node *DevNode, 544static int check_return_code(char *type, struct device_node *dn,
335 int *retry, u64 ret) 545 int *retry, u64 ret)
336{ 546{
337 if (ret != 0) { 547 if (ret != 0) {
338 struct pci_dn *pdn = PCI_DN(DevNode); 548 struct pci_dn *pdn = PCI_DN(dn);
339 549
340 (*retry)++; 550 (*retry)++;
341 printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n", 551 printk("PCI: %s: Device 0x%04X:%02X I/O Error(%2d): 0x%04X\n",
342 TextHdr, pdn->busno, pdn->devfn, 552 type, pdn->busno, pdn->devfn,
343 *retry, (int)ret); 553 *retry, (int)ret);
344 /* 554 /*
345 * Bump the retry and check for retry count exceeded. 555 * Bump the retry and check for retry count exceeded.
346 * If, Exceeded, panic the system. 556 * If, Exceeded, panic the system.
347 */ 557 */
348 if (((*retry) > Pci_Retry_Max) && 558 if (((*retry) > PCI_RETRY_MAX) &&
349 (Pci_Error_Flag > 0)) { 559 (limit_pci_retries > 0)) {
350 mf_display_src(0xB6000103); 560 mf_display_src(0xB6000103);
351 panic_timeout = 0; 561 panic_timeout = 0;
352 panic("PCI: Hardware I/O Error, SRC B6000103, " 562 panic("PCI: Hardware I/O Error, SRC B6000103, "
@@ -363,28 +573,39 @@ static int CheckReturnCode(char *TextHdr, struct device_node *DevNode,
363 * the exposure of being device global. 573 * the exposure of being device global.
364 */ 574 */
365static inline struct device_node *xlate_iomm_address( 575static inline struct device_node *xlate_iomm_address(
366 const volatile void __iomem *IoAddress, 576 const volatile void __iomem *addr,
367 u64 *dsaptr, u64 *BarOffsetPtr) 577 u64 *dsaptr, u64 *bar_offset, const char *func)
368{ 578{
369 unsigned long OrigIoAddr; 579 unsigned long orig_addr;
370 unsigned long BaseIoAddr; 580 unsigned long base_addr;
371 unsigned long TableIndex; 581 unsigned long ind;
372 struct device_node *DevNode; 582 struct device_node *dn;
583
584 orig_addr = (unsigned long __force)addr;
585 if ((orig_addr < BASE_IO_MEMORY) || (orig_addr >= max_io_memory)) {
586 static unsigned long last_jiffies;
587 static int num_printed;
373 588
374 OrigIoAddr = (unsigned long __force)IoAddress; 589 if ((jiffies - last_jiffies) > 60 * HZ) {
375 if ((OrigIoAddr < BASE_IO_MEMORY) || (OrigIoAddr >= max_io_memory)) 590 last_jiffies = jiffies;
591 num_printed = 0;
592 }
593 if (num_printed++ < 10)
594 printk(KERN_ERR
595 "iSeries_%s: invalid access at IO address %p\n",
596 func, addr);
376 return NULL; 597 return NULL;
377 BaseIoAddr = OrigIoAddr - BASE_IO_MEMORY; 598 }
378 TableIndex = BaseIoAddr / IOMM_TABLE_ENTRY_SIZE; 599 base_addr = orig_addr - BASE_IO_MEMORY;
379 DevNode = iomm_table[TableIndex]; 600 ind = base_addr / IOMM_TABLE_ENTRY_SIZE;
380 601 dn = iomm_table[ind];
381 if (DevNode != NULL) { 602
382 int barnum = iobar_table[TableIndex]; 603 if (dn != NULL) {
383 *dsaptr = iseries_ds_addr(DevNode) | (barnum << 24); 604 *dsaptr = ds_addr_table[ind];
384 *BarOffsetPtr = BaseIoAddr % IOMM_TABLE_ENTRY_SIZE; 605 *bar_offset = base_addr % IOMM_TABLE_ENTRY_SIZE;
385 } else 606 } else
386 panic("PCI: Invalid PCI IoAddress detected!\n"); 607 panic("PCI: Invalid PCI IO address detected!\n");
387 return DevNode; 608 return dn;
388} 609}
389 610
390/* 611/*
@@ -392,91 +613,58 @@ static inline struct device_node *xlate_iomm_address(
392 * On MM I/O error, all ones are returned and iSeries_pci_IoError is cal 613 * On MM I/O error, all ones are returned and iSeries_pci_IoError is cal
393 * else, data is returned in Big Endian format. 614 * else, data is returned in Big Endian format.
394 */ 615 */
395static u8 iSeries_Read_Byte(const volatile void __iomem *IoAddress) 616static u8 iseries_readb(const volatile void __iomem *addr)
396{ 617{
397 u64 BarOffset; 618 u64 bar_offset;
398 u64 dsa; 619 u64 dsa;
399 int retry = 0; 620 int retry = 0;
400 struct HvCallPci_LoadReturn ret; 621 struct HvCallPci_LoadReturn ret;
401 struct device_node *DevNode = 622 struct device_node *dn =
402 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 623 xlate_iomm_address(addr, &dsa, &bar_offset, "read_byte");
403
404 if (DevNode == NULL) {
405 static unsigned long last_jiffies;
406 static int num_printed;
407 624
408 if ((jiffies - last_jiffies) > 60 * HZ) { 625 if (dn == NULL)
409 last_jiffies = jiffies;
410 num_printed = 0;
411 }
412 if (num_printed++ < 10)
413 printk(KERN_ERR "iSeries_Read_Byte: invalid access at IO address %p\n",
414 IoAddress);
415 return 0xff; 626 return 0xff;
416 }
417 do { 627 do {
418 HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0); 628 HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, bar_offset, 0);
419 } while (CheckReturnCode("RDB", DevNode, &retry, ret.rc) != 0); 629 } while (check_return_code("RDB", dn, &retry, ret.rc) != 0);
420 630
421 return ret.value; 631 return ret.value;
422} 632}
423 633
424static u16 iSeries_Read_Word(const volatile void __iomem *IoAddress) 634static u16 iseries_readw_be(const volatile void __iomem *addr)
425{ 635{
426 u64 BarOffset; 636 u64 bar_offset;
427 u64 dsa; 637 u64 dsa;
428 int retry = 0; 638 int retry = 0;
429 struct HvCallPci_LoadReturn ret; 639 struct HvCallPci_LoadReturn ret;
430 struct device_node *DevNode = 640 struct device_node *dn =
431 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 641 xlate_iomm_address(addr, &dsa, &bar_offset, "read_word");
432 642
433 if (DevNode == NULL) { 643 if (dn == NULL)
434 static unsigned long last_jiffies;
435 static int num_printed;
436
437 if ((jiffies - last_jiffies) > 60 * HZ) {
438 last_jiffies = jiffies;
439 num_printed = 0;
440 }
441 if (num_printed++ < 10)
442 printk(KERN_ERR "iSeries_Read_Word: invalid access at IO address %p\n",
443 IoAddress);
444 return 0xffff; 644 return 0xffff;
445 }
446 do { 645 do {
447 HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa, 646 HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa,
448 BarOffset, 0); 647 bar_offset, 0);
449 } while (CheckReturnCode("RDW", DevNode, &retry, ret.rc) != 0); 648 } while (check_return_code("RDW", dn, &retry, ret.rc) != 0);
450 649
451 return ret.value; 650 return ret.value;
452} 651}
453 652
454static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress) 653static u32 iseries_readl_be(const volatile void __iomem *addr)
455{ 654{
456 u64 BarOffset; 655 u64 bar_offset;
457 u64 dsa; 656 u64 dsa;
458 int retry = 0; 657 int retry = 0;
459 struct HvCallPci_LoadReturn ret; 658 struct HvCallPci_LoadReturn ret;
460 struct device_node *DevNode = 659 struct device_node *dn =
461 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 660 xlate_iomm_address(addr, &dsa, &bar_offset, "read_long");
462
463 if (DevNode == NULL) {
464 static unsigned long last_jiffies;
465 static int num_printed;
466 661
467 if ((jiffies - last_jiffies) > 60 * HZ) { 662 if (dn == NULL)
468 last_jiffies = jiffies;
469 num_printed = 0;
470 }
471 if (num_printed++ < 10)
472 printk(KERN_ERR "iSeries_Read_Long: invalid access at IO address %p\n",
473 IoAddress);
474 return 0xffffffff; 663 return 0xffffffff;
475 }
476 do { 664 do {
477 HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa, 665 HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa,
478 BarOffset, 0); 666 bar_offset, 0);
479 } while (CheckReturnCode("RDL", DevNode, &retry, ret.rc) != 0); 667 } while (check_return_code("RDL", dn, &retry, ret.rc) != 0);
480 668
481 return ret.value; 669 return ret.value;
482} 670}
@@ -485,134 +673,72 @@ static u32 iSeries_Read_Long(const volatile void __iomem *IoAddress)
485 * Write MM I/O Instructions for the iSeries 673 * Write MM I/O Instructions for the iSeries
486 * 674 *
487 */ 675 */
488static void iSeries_Write_Byte(u8 data, volatile void __iomem *IoAddress) 676static void iseries_writeb(u8 data, volatile void __iomem *addr)
489{ 677{
490 u64 BarOffset; 678 u64 bar_offset;
491 u64 dsa; 679 u64 dsa;
492 int retry = 0; 680 int retry = 0;
493 u64 rc; 681 u64 rc;
494 struct device_node *DevNode = 682 struct device_node *dn =
495 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 683 xlate_iomm_address(addr, &dsa, &bar_offset, "write_byte");
496
497 if (DevNode == NULL) {
498 static unsigned long last_jiffies;
499 static int num_printed;
500 684
501 if ((jiffies - last_jiffies) > 60 * HZ) { 685 if (dn == NULL)
502 last_jiffies = jiffies;
503 num_printed = 0;
504 }
505 if (num_printed++ < 10)
506 printk(KERN_ERR "iSeries_Write_Byte: invalid access at IO address %p\n", IoAddress);
507 return; 686 return;
508 }
509 do { 687 do {
510 rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0); 688 rc = HvCall4(HvCallPciBarStore8, dsa, bar_offset, data, 0);
511 } while (CheckReturnCode("WWB", DevNode, &retry, rc) != 0); 689 } while (check_return_code("WWB", dn, &retry, rc) != 0);
512} 690}
513 691
514static void iSeries_Write_Word(u16 data, volatile void __iomem *IoAddress) 692static void iseries_writew_be(u16 data, volatile void __iomem *addr)
515{ 693{
516 u64 BarOffset; 694 u64 bar_offset;
517 u64 dsa; 695 u64 dsa;
518 int retry = 0; 696 int retry = 0;
519 u64 rc; 697 u64 rc;
520 struct device_node *DevNode = 698 struct device_node *dn =
521 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 699 xlate_iomm_address(addr, &dsa, &bar_offset, "write_word");
522 700
523 if (DevNode == NULL) { 701 if (dn == NULL)
524 static unsigned long last_jiffies;
525 static int num_printed;
526
527 if ((jiffies - last_jiffies) > 60 * HZ) {
528 last_jiffies = jiffies;
529 num_printed = 0;
530 }
531 if (num_printed++ < 10)
532 printk(KERN_ERR "iSeries_Write_Word: invalid access at IO address %p\n",
533 IoAddress);
534 return; 702 return;
535 }
536 do { 703 do {
537 rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, data, 0); 704 rc = HvCall4(HvCallPciBarStore16, dsa, bar_offset, data, 0);
538 } while (CheckReturnCode("WWW", DevNode, &retry, rc) != 0); 705 } while (check_return_code("WWW", dn, &retry, rc) != 0);
539} 706}
540 707
541static void iSeries_Write_Long(u32 data, volatile void __iomem *IoAddress) 708static void iseries_writel_be(u32 data, volatile void __iomem *addr)
542{ 709{
543 u64 BarOffset; 710 u64 bar_offset;
544 u64 dsa; 711 u64 dsa;
545 int retry = 0; 712 int retry = 0;
546 u64 rc; 713 u64 rc;
547 struct device_node *DevNode = 714 struct device_node *dn =
548 xlate_iomm_address(IoAddress, &dsa, &BarOffset); 715 xlate_iomm_address(addr, &dsa, &bar_offset, "write_long");
549
550 if (DevNode == NULL) {
551 static unsigned long last_jiffies;
552 static int num_printed;
553 716
554 if ((jiffies - last_jiffies) > 60 * HZ) { 717 if (dn == NULL)
555 last_jiffies = jiffies;
556 num_printed = 0;
557 }
558 if (num_printed++ < 10)
559 printk(KERN_ERR "iSeries_Write_Long: invalid access at IO address %p\n",
560 IoAddress);
561 return; 718 return;
562 }
563 do { 719 do {
564 rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, data, 0); 720 rc = HvCall4(HvCallPciBarStore32, dsa, bar_offset, data, 0);
565 } while (CheckReturnCode("WWL", DevNode, &retry, rc) != 0); 721 } while (check_return_code("WWL", dn, &retry, rc) != 0);
566}
567
568static u8 iseries_readb(const volatile void __iomem *addr)
569{
570 return iSeries_Read_Byte(addr);
571} 722}
572 723
573static u16 iseries_readw(const volatile void __iomem *addr) 724static u16 iseries_readw(const volatile void __iomem *addr)
574{ 725{
575 return le16_to_cpu(iSeries_Read_Word(addr)); 726 return le16_to_cpu(iseries_readw_be(addr));
576} 727}
577 728
578static u32 iseries_readl(const volatile void __iomem *addr) 729static u32 iseries_readl(const volatile void __iomem *addr)
579{ 730{
580 return le32_to_cpu(iSeries_Read_Long(addr)); 731 return le32_to_cpu(iseries_readl_be(addr));
581}
582
583static u16 iseries_readw_be(const volatile void __iomem *addr)
584{
585 return iSeries_Read_Word(addr);
586}
587
588static u32 iseries_readl_be(const volatile void __iomem *addr)
589{
590 return iSeries_Read_Long(addr);
591}
592
593static void iseries_writeb(u8 data, volatile void __iomem *addr)
594{
595 iSeries_Write_Byte(data, addr);
596} 732}
597 733
598static void iseries_writew(u16 data, volatile void __iomem *addr) 734static void iseries_writew(u16 data, volatile void __iomem *addr)
599{ 735{
600 iSeries_Write_Word(cpu_to_le16(data), addr); 736 iseries_writew_be(cpu_to_le16(data), addr);
601} 737}
602 738
603static void iseries_writel(u32 data, volatile void __iomem *addr) 739static void iseries_writel(u32 data, volatile void __iomem *addr)
604{ 740{
605 iSeries_Write_Long(cpu_to_le32(data), addr); 741 iseries_writel(cpu_to_le32(data), addr);
606}
607
608static void iseries_writew_be(u16 data, volatile void __iomem *addr)
609{
610 iSeries_Write_Word(data, addr);
611}
612
613static void iseries_writel_be(u32 data, volatile void __iomem *addr)
614{
615 iSeries_Write_Long(data, addr);
616} 742}
617 743
618static void iseries_readsb(const volatile void __iomem *addr, void *buf, 744static void iseries_readsb(const volatile void __iomem *addr, void *buf,
@@ -620,7 +746,7 @@ static void iseries_readsb(const volatile void __iomem *addr, void *buf,
620{ 746{
621 u8 *dst = buf; 747 u8 *dst = buf;
622 while(count-- > 0) 748 while(count-- > 0)
623 *(dst++) = iSeries_Read_Byte(addr); 749 *(dst++) = iseries_readb(addr);
624} 750}
625 751
626static void iseries_readsw(const volatile void __iomem *addr, void *buf, 752static void iseries_readsw(const volatile void __iomem *addr, void *buf,
@@ -628,7 +754,7 @@ static void iseries_readsw(const volatile void __iomem *addr, void *buf,
628{ 754{
629 u16 *dst = buf; 755 u16 *dst = buf;
630 while(count-- > 0) 756 while(count-- > 0)
631 *(dst++) = iSeries_Read_Word(addr); 757 *(dst++) = iseries_readw_be(addr);
632} 758}
633 759
634static void iseries_readsl(const volatile void __iomem *addr, void *buf, 760static void iseries_readsl(const volatile void __iomem *addr, void *buf,
@@ -636,7 +762,7 @@ static void iseries_readsl(const volatile void __iomem *addr, void *buf,
636{ 762{
637 u32 *dst = buf; 763 u32 *dst = buf;
638 while(count-- > 0) 764 while(count-- > 0)
639 *(dst++) = iSeries_Read_Long(addr); 765 *(dst++) = iseries_readl_be(addr);
640} 766}
641 767
642static void iseries_writesb(volatile void __iomem *addr, const void *buf, 768static void iseries_writesb(volatile void __iomem *addr, const void *buf,
@@ -644,7 +770,7 @@ static void iseries_writesb(volatile void __iomem *addr, const void *buf,
644{ 770{
645 const u8 *src = buf; 771 const u8 *src = buf;
646 while(count-- > 0) 772 while(count-- > 0)
647 iSeries_Write_Byte(*(src++), addr); 773 iseries_writeb(*(src++), addr);
648} 774}
649 775
650static void iseries_writesw(volatile void __iomem *addr, const void *buf, 776static void iseries_writesw(volatile void __iomem *addr, const void *buf,
@@ -652,7 +778,7 @@ static void iseries_writesw(volatile void __iomem *addr, const void *buf,
652{ 778{
653 const u16 *src = buf; 779 const u16 *src = buf;
654 while(count-- > 0) 780 while(count-- > 0)
655 iSeries_Write_Word(*(src++), addr); 781 iseries_writew_be(*(src++), addr);
656} 782}
657 783
658static void iseries_writesl(volatile void __iomem *addr, const void *buf, 784static void iseries_writesl(volatile void __iomem *addr, const void *buf,
@@ -660,7 +786,7 @@ static void iseries_writesl(volatile void __iomem *addr, const void *buf,
660{ 786{
661 const u32 *src = buf; 787 const u32 *src = buf;
662 while(count-- > 0) 788 while(count-- > 0)
663 iSeries_Write_Long(*(src++), addr); 789 iseries_writel_be(*(src++), addr);
664} 790}
665 791
666static void iseries_memset_io(volatile void __iomem *addr, int c, 792static void iseries_memset_io(volatile void __iomem *addr, int c,
@@ -669,7 +795,7 @@ static void iseries_memset_io(volatile void __iomem *addr, int c,
669 volatile char __iomem *d = addr; 795 volatile char __iomem *d = addr;
670 796
671 while (n-- > 0) 797 while (n-- > 0)
672 iSeries_Write_Byte(c, d++); 798 iseries_writeb(c, d++);
673} 799}
674 800
675static void iseries_memcpy_fromio(void *dest, const volatile void __iomem *src, 801static void iseries_memcpy_fromio(void *dest, const volatile void __iomem *src,
@@ -679,7 +805,7 @@ static void iseries_memcpy_fromio(void *dest, const volatile void __iomem *src,
679 const volatile char __iomem *s = src; 805 const volatile char __iomem *s = src;
680 806
681 while (n-- > 0) 807 while (n-- > 0)
682 *d++ = iSeries_Read_Byte(s++); 808 *d++ = iseries_readb(s++);
683} 809}
684 810
685static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src, 811static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src,
@@ -689,7 +815,7 @@ static void iseries_memcpy_toio(volatile void __iomem *dest, const void *src,
689 volatile char __iomem *d = dest; 815 volatile char __iomem *d = dest;
690 816
691 while (n-- > 0) 817 while (n-- > 0)
692 iSeries_Write_Byte(*s++, d++); 818 iseries_writeb(*s++, d++);
693} 819}
694 820
695/* We only set MMIO ops. The default PIO ops will be default 821/* We only set MMIO ops. The default PIO ops will be default
@@ -742,6 +868,8 @@ void __init iSeries_pcibios_init(void)
742 /* Install IO hooks */ 868 /* Install IO hooks */
743 ppc_pci_io = iseries_pci_io; 869 ppc_pci_io = iseries_pci_io;
744 870
871 pci_probe_only = 1;
872
745 /* iSeries has no IO space in the common sense, it needs to set 873 /* iSeries has no IO space in the common sense, it needs to set
746 * the IO base to 0 874 * the IO base to 0
747 */ 875 */
@@ -767,11 +895,21 @@ void __init iSeries_pcibios_init(void)
767 phb = pcibios_alloc_controller(node); 895 phb = pcibios_alloc_controller(node);
768 if (phb == NULL) 896 if (phb == NULL)
769 continue; 897 continue;
898 /* All legacy iSeries PHBs are in domain zero */
899 phb->global_number = 0;
770 900
771 phb->pci_mem_offset = bus;
772 phb->first_busno = bus; 901 phb->first_busno = bus;
773 phb->last_busno = bus; 902 phb->last_busno = bus;
774 phb->ops = &iSeries_pci_ops; 903 phb->ops = &iSeries_pci_ops;
904 phb->io_base_virt = (void __iomem *)_IO_BASE;
905 phb->io_resource.flags = IORESOURCE_IO;
906 phb->io_resource.start = BASE_IO_MEMORY;
907 phb->io_resource.end = END_IO_MEMORY;
908 phb->io_resource.name = "iSeries PCI IO";
909 phb->mem_resources[0].flags = IORESOURCE_MEM;
910 phb->mem_resources[0].start = BASE_IO_MEMORY;
911 phb->mem_resources[0].end = END_IO_MEMORY;
912 phb->mem_resources[0].name = "Series PCI MEM";
775 } 913 }
776 914
777 of_node_put(root); 915 of_node_put(root);
diff --git a/arch/powerpc/platforms/iseries/pci.h b/arch/powerpc/platforms/iseries/pci.h
index 33a8489fde54..d9cf974c2718 100644
--- a/arch/powerpc/platforms/iseries/pci.h
+++ b/arch/powerpc/platforms/iseries/pci.h
@@ -30,10 +30,6 @@
30 * End Change Activity 30 * End Change Activity
31 */ 31 */
32 32
33#include <asm/pci-bridge.h>
34
35struct pci_dev; /* For Forward Reference */
36
37/* 33/*
38 * Decodes Linux DevFn to iSeries DevFn, bridge device, or function. 34 * Decodes Linux DevFn to iSeries DevFn, bridge device, or function.
39 * For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h 35 * For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h
@@ -47,17 +43,16 @@ struct pci_dev; /* For Forward Reference */
47#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7) 43#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7)
48#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7) 44#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
49 45
50/* 46struct pci_dev;
51 * Generate a Direct Select Address for the Hypervisor 47
52 */ 48#ifdef CONFIG_PCI
53static inline u64 iseries_ds_addr(struct device_node *node) 49extern void iSeries_pcibios_init(void);
54{ 50extern void iSeries_pci_final_fixup(void);
55 struct pci_dn *pdn = PCI_DN(node); 51extern void iSeries_pcibios_fixup_resources(struct pci_dev *dev);
56 52#else
57 return ((u64)pdn->busno << 48) + ((u64)pdn->bussubno << 40) 53static inline void iSeries_pcibios_init(void) { }
58 + ((u64)0x10 << 32); 54static inline void iSeries_pci_final_fixup(void) { }
59} 55static inline void iSeries_pcibios_fixup_resources(struct pci_dev *dev) {}
60 56#endif
61extern void iSeries_Device_Information(struct pci_dev*, int);
62 57
63#endif /* _PLATFORMS_ISERIES_PCI_H */ 58#endif /* _PLATFORMS_ISERIES_PCI_H */
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 0877a8834110..b72120751bbe 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -63,6 +63,7 @@
63#include "main_store.h" 63#include "main_store.h"
64#include "call_sm.h" 64#include "call_sm.h"
65#include "call_hpt.h" 65#include "call_hpt.h"
66#include "pci.h"
66 67
67#ifdef DEBUG 68#ifdef DEBUG
68#define DBG(fmt...) udbg_printf(fmt) 69#define DBG(fmt...) udbg_printf(fmt)
@@ -74,11 +75,6 @@
74static unsigned long build_iSeries_Memory_Map(void); 75static unsigned long build_iSeries_Memory_Map(void);
75static void iseries_shared_idle(void); 76static void iseries_shared_idle(void);
76static void iseries_dedicated_idle(void); 77static void iseries_dedicated_idle(void);
77#ifdef CONFIG_PCI
78extern void iSeries_pci_final_fixup(void);
79#else
80static void iSeries_pci_final_fixup(void) { }
81#endif
82 78
83 79
84struct MemoryBlock { 80struct MemoryBlock {
@@ -112,13 +108,13 @@ static unsigned long iSeries_process_Condor_mainstore_vpd(
112 * correctly. 108 * correctly.
113 */ 109 */
114 mb_array[0].logicalStart = 0; 110 mb_array[0].logicalStart = 0;
115 mb_array[0].logicalEnd = 0x100000000; 111 mb_array[0].logicalEnd = 0x100000000UL;
116 mb_array[0].absStart = 0; 112 mb_array[0].absStart = 0;
117 mb_array[0].absEnd = 0x100000000; 113 mb_array[0].absEnd = 0x100000000UL;
118 114
119 if (holeSize) { 115 if (holeSize) {
120 numMemoryBlocks = 2; 116 numMemoryBlocks = 2;
121 holeStart = holeStart & 0x000fffffffffffff; 117 holeStart = holeStart & 0x000fffffffffffffUL;
122 holeStart = addr_to_chunk(holeStart); 118 holeStart = addr_to_chunk(holeStart);
123 holeFirstChunk = holeStart; 119 holeFirstChunk = holeStart;
124 holeSize = addr_to_chunk(holeSize); 120 holeSize = addr_to_chunk(holeSize);
@@ -128,9 +124,9 @@ static unsigned long iSeries_process_Condor_mainstore_vpd(
128 mb_array[0].logicalEnd = holeFirstChunk; 124 mb_array[0].logicalEnd = holeFirstChunk;
129 mb_array[0].absEnd = holeFirstChunk; 125 mb_array[0].absEnd = holeFirstChunk;
130 mb_array[1].logicalStart = holeFirstChunk; 126 mb_array[1].logicalStart = holeFirstChunk;
131 mb_array[1].logicalEnd = 0x100000000 - holeSizeChunks; 127 mb_array[1].logicalEnd = 0x100000000UL - holeSizeChunks;
132 mb_array[1].absStart = holeFirstChunk + holeSizeChunks; 128 mb_array[1].absStart = holeFirstChunk + holeSizeChunks;
133 mb_array[1].absEnd = 0x100000000; 129 mb_array[1].absEnd = 0x100000000UL;
134 } 130 }
135 return numMemoryBlocks; 131 return numMemoryBlocks;
136} 132}
@@ -234,9 +230,9 @@ static unsigned long iSeries_process_Regatta_mainstore_vpd(
234 mb_array[i].logicalEnd, 230 mb_array[i].logicalEnd,
235 mb_array[i].absStart, mb_array[i].absEnd); 231 mb_array[i].absStart, mb_array[i].absEnd);
236 mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart & 232 mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart &
237 0x000fffffffffffff); 233 0x000fffffffffffffUL);
238 mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd & 234 mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd &
239 0x000fffffffffffff); 235 0x000fffffffffffffUL);
240 mb_array[i].logicalStart = 236 mb_array[i].logicalStart =
241 addr_to_chunk(mb_array[i].logicalStart); 237 addr_to_chunk(mb_array[i].logicalStart);
242 mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd); 238 mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd);
@@ -320,7 +316,7 @@ struct mschunks_map mschunks_map = {
320}; 316};
321EXPORT_SYMBOL(mschunks_map); 317EXPORT_SYMBOL(mschunks_map);
322 318
323void mschunks_alloc(unsigned long num_chunks) 319static void mschunks_alloc(unsigned long num_chunks)
324{ 320{
325 klimit = _ALIGN(klimit, sizeof(u32)); 321 klimit = _ALIGN(klimit, sizeof(u32));
326 mschunks_map.mapping = (u32 *)klimit; 322 mschunks_map.mapping = (u32 *)klimit;
@@ -499,6 +495,8 @@ static void __init iSeries_setup_arch(void)
499 itVpdAreas.xSlicMaxLogicalProcs); 495 itVpdAreas.xSlicMaxLogicalProcs);
500 printk("Max physical processors = %d\n", 496 printk("Max physical processors = %d\n",
501 itVpdAreas.xSlicMaxPhysicalProcs); 497 itVpdAreas.xSlicMaxPhysicalProcs);
498
499 iSeries_pcibios_init();
502} 500}
503 501
504static void iSeries_show_cpuinfo(struct seq_file *m) 502static void iSeries_show_cpuinfo(struct seq_file *m)
@@ -641,24 +639,25 @@ static int __init iseries_probe(void)
641} 639}
642 640
643define_machine(iseries) { 641define_machine(iseries) {
644 .name = "iSeries", 642 .name = "iSeries",
645 .setup_arch = iSeries_setup_arch, 643 .setup_arch = iSeries_setup_arch,
646 .show_cpuinfo = iSeries_show_cpuinfo, 644 .show_cpuinfo = iSeries_show_cpuinfo,
647 .init_IRQ = iSeries_init_IRQ, 645 .init_IRQ = iSeries_init_IRQ,
648 .get_irq = iSeries_get_irq, 646 .get_irq = iSeries_get_irq,
649 .init_early = iSeries_init_early, 647 .init_early = iSeries_init_early,
650 .pcibios_fixup = iSeries_pci_final_fixup, 648 .pcibios_fixup = iSeries_pci_final_fixup,
651 .restart = mf_reboot, 649 .pcibios_fixup_resources= iSeries_pcibios_fixup_resources,
652 .power_off = mf_power_off, 650 .restart = mf_reboot,
653 .halt = mf_power_off, 651 .power_off = mf_power_off,
654 .get_boot_time = iSeries_get_boot_time, 652 .halt = mf_power_off,
655 .set_rtc_time = iSeries_set_rtc_time, 653 .get_boot_time = iSeries_get_boot_time,
656 .get_rtc_time = iSeries_get_rtc_time, 654 .set_rtc_time = iSeries_set_rtc_time,
657 .calibrate_decr = generic_calibrate_decr, 655 .get_rtc_time = iSeries_get_rtc_time,
658 .progress = iSeries_progress, 656 .calibrate_decr = generic_calibrate_decr,
659 .probe = iseries_probe, 657 .progress = iSeries_progress,
660 .ioremap = iseries_ioremap, 658 .probe = iseries_probe,
661 .iounmap = iseries_iounmap, 659 .ioremap = iseries_ioremap,
660 .iounmap = iseries_iounmap,
662 /* XXX Implement enable_pmcs for iSeries */ 661 /* XXX Implement enable_pmcs for iSeries */
663}; 662};
664 663
diff --git a/arch/powerpc/platforms/iseries/setup.h b/arch/powerpc/platforms/iseries/setup.h
index 0a47ac53c959..729754bbb018 100644
--- a/arch/powerpc/platforms/iseries/setup.h
+++ b/arch/powerpc/platforms/iseries/setup.h
@@ -17,6 +17,7 @@
17#ifndef __ISERIES_SETUP_H__ 17#ifndef __ISERIES_SETUP_H__
18#define __ISERIES_SETUP_H__ 18#define __ISERIES_SETUP_H__
19 19
20extern void *iSeries_early_setup(void);
20extern unsigned long iSeries_get_boot_time(void); 21extern unsigned long iSeries_get_boot_time(void);
21extern int iSeries_set_rtc_time(struct rtc_time *tm); 22extern int iSeries_set_rtc_time(struct rtc_time *tm);
22extern void iSeries_get_rtc_time(struct rtc_time *tm); 23extern void iSeries_get_rtc_time(struct rtc_time *tm);
diff --git a/arch/powerpc/platforms/iseries/vpdinfo.c b/arch/powerpc/platforms/iseries/vpdinfo.c
deleted file mode 100644
index 9f83878a0c2e..000000000000
--- a/arch/powerpc/platforms/iseries/vpdinfo.c
+++ /dev/null
@@ -1,275 +0,0 @@
1/*
2 * This code gets the card location of the hardware
3 * Copyright (C) 2001 <Allan H Trautman> <IBM Corp>
4 * Copyright (C) 2005 Stephen Rothwel, IBM Corp
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
17 * along with this program; if not, write to the:
18 * Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
21 *
22 * Change Activity:
23 * Created, Feb 2, 2001
24 * Ported to ppc64, August 20, 2001
25 * End Change Activity
26 */
27#include <linux/init.h>
28#include <linux/module.h>
29#include <linux/pci.h>
30
31#include <asm/types.h>
32#include <asm/resource.h>
33#include <asm/abs_addr.h>
34#include <asm/pci-bridge.h>
35#include <asm/iseries/hv_types.h>
36
37#include "pci.h"
38#include "call_pci.h"
39
40/*
41 * Size of Bus VPD data
42 */
43#define BUS_VPDSIZE 1024
44
45/*
46 * Bus Vpd Tags
47 */
48#define VpdEndOfAreaTag 0x79
49#define VpdIdStringTag 0x82
50#define VpdVendorAreaTag 0x84
51
52/*
53 * Mfg Area Tags
54 */
55#define VpdFruFrameId 0x4649 // "FI"
56#define VpdSlotMapFormat 0x4D46 // "MF"
57#define VpdSlotMap 0x534D // "SM"
58
59/*
60 * Structures of the areas
61 */
62struct MfgVpdAreaStruct {
63 u16 Tag;
64 u8 TagLength;
65 u8 AreaData1;
66 u8 AreaData2;
67};
68typedef struct MfgVpdAreaStruct MfgArea;
69#define MFG_ENTRY_SIZE 3
70
71struct SlotMapStruct {
72 u8 AgentId;
73 u8 SecondaryAgentId;
74 u8 PhbId;
75 char CardLocation[3];
76 char Parms[8];
77 char Reserved[2];
78};
79typedef struct SlotMapStruct SlotMap;
80#define SLOT_ENTRY_SIZE 16
81
82/*
83 * Parse the Slot Area
84 */
85static void __init iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
86 HvAgentId agent, u8 *PhbId, char card[4])
87{
88 int SlotMapLen = MapLen;
89 SlotMap *SlotMapPtr = MapPtr;
90
91 /*
92 * Parse Slot label until we find the one requested
93 */
94 while (SlotMapLen > 0) {
95 if (SlotMapPtr->AgentId == agent) {
96 /*
97 * If Phb wasn't found, grab the entry first one found.
98 */
99 if (*PhbId == 0xff)
100 *PhbId = SlotMapPtr->PhbId;
101 /* Found it, extract the data. */
102 if (SlotMapPtr->PhbId == *PhbId) {
103 memcpy(card, &SlotMapPtr->CardLocation, 3);
104 card[3] = 0;
105 break;
106 }
107 }
108 /* Point to the next Slot */
109 SlotMapPtr = (SlotMap *)((char *)SlotMapPtr + SLOT_ENTRY_SIZE);
110 SlotMapLen -= SLOT_ENTRY_SIZE;
111 }
112}
113
114/*
115 * Parse the Mfg Area
116 */
117static void __init iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen,
118 HvAgentId agent, u8 *PhbId,
119 u8 *frame, char card[4])
120{
121 MfgArea *MfgAreaPtr = (MfgArea *)AreaData;
122 int MfgAreaLen = AreaLen;
123 u16 SlotMapFmt = 0;
124
125 /* Parse Mfg Data */
126 while (MfgAreaLen > 0) {
127 int MfgTagLen = MfgAreaPtr->TagLength;
128 /* Frame ID (FI 4649020310 ) */
129 if (MfgAreaPtr->Tag == VpdFruFrameId) /* FI */
130 *frame = MfgAreaPtr->AreaData1;
131 /* Slot Map Format (MF 4D46020004 ) */
132 else if (MfgAreaPtr->Tag == VpdSlotMapFormat) /* MF */
133 SlotMapFmt = (MfgAreaPtr->AreaData1 * 256)
134 + MfgAreaPtr->AreaData2;
135 /* Slot Map (SM 534D90 */
136 else if (MfgAreaPtr->Tag == VpdSlotMap) { /* SM */
137 SlotMap *SlotMapPtr;
138
139 if (SlotMapFmt == 0x1004)
140 SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
141 + MFG_ENTRY_SIZE + 1);
142 else
143 SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
144 + MFG_ENTRY_SIZE);
145 iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen,
146 agent, PhbId, card);
147 }
148 /*
149 * Point to the next Mfg Area
150 * Use defined size, sizeof give wrong answer
151 */
152 MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen
153 + MFG_ENTRY_SIZE);
154 MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE);
155 }
156}
157
158/*
159 * Look for "BUS".. Data is not Null terminated.
160 * PHBID of 0xFF indicates PHB was not found in VPD Data.
161 */
162static int __init iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
163{
164 u8 *PhbPtr = AreaPtr;
165 int DataLen = AreaLength;
166 char PhbId = 0xFF;
167
168 while (DataLen > 0) {
169 if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U')
170 && (*(PhbPtr + 2) == 'S')) {
171 PhbPtr += 3;
172 while (*PhbPtr == ' ')
173 ++PhbPtr;
174 PhbId = (*PhbPtr & 0x0F);
175 break;
176 }
177 ++PhbPtr;
178 --DataLen;
179 }
180 return PhbId;
181}
182
183/*
184 * Parse out the VPD Areas
185 */
186static void __init iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
187 HvAgentId agent, u8 *frame, char card[4])
188{
189 u8 *TagPtr = VpdData;
190 int DataLen = VpdDataLen - 3;
191 u8 PhbId = 0xff;
192
193 while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
194 int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);
195 u8 *AreaData = TagPtr + 3;
196
197 if (*TagPtr == VpdIdStringTag)
198 PhbId = iSeries_Parse_PhbId(AreaData, AreaLen);
199 else if (*TagPtr == VpdVendorAreaTag)
200 iSeries_Parse_MfgArea(AreaData, AreaLen,
201 agent, &PhbId, frame, card);
202 /* Point to next Area. */
203 TagPtr = AreaData + AreaLen;
204 DataLen -= AreaLen;
205 }
206}
207
208static int __init iSeries_Get_Location_Code(u16 bus, HvAgentId agent,
209 u8 *frame, char card[4])
210{
211 int status = 0;
212 int BusVpdLen = 0;
213 u8 *BusVpdPtr = kmalloc(BUS_VPDSIZE, GFP_KERNEL);
214
215 if (BusVpdPtr == NULL) {
216 printk("PCI: Bus VPD Buffer allocation failure.\n");
217 return 0;
218 }
219 BusVpdLen = HvCallPci_getBusVpd(bus, iseries_hv_addr(BusVpdPtr),
220 BUS_VPDSIZE);
221 if (BusVpdLen == 0) {
222 printk("PCI: Bus VPD Buffer zero length.\n");
223 goto out_free;
224 }
225 /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */
226 /* Make sure this is what I think it is */
227 if (*BusVpdPtr != VpdIdStringTag) { /* 0x82 */
228 printk("PCI: Bus VPD Buffer missing starting tag.\n");
229 goto out_free;
230 }
231 iSeries_Parse_Vpd(BusVpdPtr, BusVpdLen, agent, frame, card);
232 status = 1;
233out_free:
234 kfree(BusVpdPtr);
235 return status;
236}
237
238/*
239 * Prints the device information.
240 * - Pass in pci_dev* pointer to the device.
241 * - Pass in the device count
242 *
243 * Format:
244 * PCI: Bus 0, Device 26, Vendor 0x12AE Frame 1, Card C10 Ethernet
245 * controller
246 */
247void __init iSeries_Device_Information(struct pci_dev *PciDev, int count)
248{
249 struct device_node *DevNode = PciDev->sysdata;
250 struct pci_dn *pdn;
251 u16 bus;
252 u8 frame = 0;
253 char card[4];
254 HvSubBusNumber subbus;
255 HvAgentId agent;
256
257 if (DevNode == NULL) {
258 printk("%d. PCI: iSeries_Device_Information DevNode is NULL\n",
259 count);
260 return;
261 }
262
263 pdn = PCI_DN(DevNode);
264 bus = pdn->busno;
265 subbus = pdn->bussubno;
266 agent = ISERIES_PCI_AGENTID(ISERIES_GET_DEVICE_FROM_SUBBUS(subbus),
267 ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus));
268
269 if (iSeries_Get_Location_Code(bus, agent, &frame, card)) {
270 printk("%d. PCI: Bus%3d, Device%3d, Vendor %04X Frame%3d, "
271 "Card %4s 0x%04X\n", count, bus,
272 PCI_SLOT(PciDev->devfn), PciDev->vendor, frame,
273 card, (int)(PciDev->class >> 8));
274 }
275}
diff --git a/arch/powerpc/platforms/maple/Kconfig b/arch/powerpc/platforms/maple/Kconfig
index f7c95eb5d8ba..a6467a5591fa 100644
--- a/arch/powerpc/platforms/maple/Kconfig
+++ b/arch/powerpc/platforms/maple/Kconfig
@@ -1,6 +1,7 @@
1config PPC_MAPLE 1config PPC_MAPLE
2 depends on PPC_MULTIPLATFORM && PPC64 2 depends on PPC_MULTIPLATFORM && PPC64
3 bool "Maple 970FX Evaluation Board" 3 bool "Maple 970FX Evaluation Board"
4 select PCI
4 select MPIC 5 select MPIC
5 select U3_DART 6 select U3_DART
6 select MPIC_U3_HT_IRQS 7 select MPIC_U3_HT_IRQS
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 771ed0cf29a5..3ffa0ac170ee 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -558,7 +558,7 @@ void __init maple_pci_init(void)
558 * safe assumptions hopefully. 558 * safe assumptions hopefully.
559 */ 559 */
560 if (u3_agp) { 560 if (u3_agp) {
561 struct device_node *np = u3_agp->arch_data; 561 struct device_node *np = u3_agp->dn;
562 PCI_DN(np)->busno = 0xf0; 562 PCI_DN(np)->busno = 0xf0;
563 for (np = np->child; np; np = np->sibling) 563 for (np = np->child; np; np = np->sibling)
564 PCI_DN(np)->busno = 0xf0; 564 PCI_DN(np)->busno = 0xf0;
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 144177d77cf1..3ce2d73b4177 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -42,6 +42,7 @@
42#include <linux/serial.h> 42#include <linux/serial.h>
43#include <linux/smp.h> 43#include <linux/smp.h>
44#include <linux/bitops.h> 44#include <linux/bitops.h>
45#include <linux/of_device.h>
45 46
46#include <asm/processor.h> 47#include <asm/processor.h>
47#include <asm/sections.h> 48#include <asm/sections.h>
@@ -56,7 +57,6 @@
56#include <asm/dma.h> 57#include <asm/dma.h>
57#include <asm/cputable.h> 58#include <asm/cputable.h>
58#include <asm/time.h> 59#include <asm/time.h>
59#include <asm/of_device.h>
60#include <asm/lmb.h> 60#include <asm/lmb.h>
61#include <asm/mpic.h> 61#include <asm/mpic.h>
62#include <asm/rtas.h> 62#include <asm/rtas.h>
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index 735e1536cbfc..348e0619e3e5 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -3,6 +3,7 @@ config PPC_PASEMI
3 bool "PA Semi SoC-based platforms" 3 bool "PA Semi SoC-based platforms"
4 default n 4 default n
5 select MPIC 5 select MPIC
6 select PCI
6 select PPC_UDBG_16550 7 select PPC_UDBG_16550
7 select PPC_NATIVE 8 select PPC_NATIVE
8 select MPIC_BROKEN_REGREAD 9 select MPIC_BROKEN_REGREAD
@@ -17,7 +18,7 @@ config PPC_PASEMI_IOMMU
17 bool "PA Semi IOMMU support" 18 bool "PA Semi IOMMU support"
18 depends on PPC_PASEMI 19 depends on PPC_PASEMI
19 help 20 help
20 IOMMU support for PA6T-1682M 21 IOMMU support for PA Semi PWRficient
21 22
22config PPC_PASEMI_IOMMU_DMA_FORCE 23config PPC_PASEMI_IOMMU_DMA_FORCE
23 bool "Force DMA engine to use IOMMU" 24 bool "Force DMA engine to use IOMMU"
@@ -36,13 +37,4 @@ config PPC_PASEMI_MDIO
36 help 37 help
37 Driver for MDIO via GPIO on PWRficient platforms 38 Driver for MDIO via GPIO on PWRficient platforms
38 39
39config ELECTRA_IDE
40 tristate "Electra IDE driver"
41 default y
42 depends on PPC_PASEMI && ATA
43 select PATA_PLATFORM
44 help
45 This includes driver support for the Electra on-board IDE
46 interface.
47
48endmenu 40endmenu
diff --git a/arch/powerpc/platforms/pasemi/Makefile b/arch/powerpc/platforms/pasemi/Makefile
index e636daa7a80e..8f52d7515793 100644
--- a/arch/powerpc/platforms/pasemi/Makefile
+++ b/arch/powerpc/platforms/pasemi/Makefile
@@ -1,4 +1,3 @@
1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o dma_lib.o 1obj-y += setup.o pci.o time.o idle.o powersave.o iommu.o dma_lib.o
2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o 2obj-$(CONFIG_PPC_PASEMI_MDIO) += gpio_mdio.o
3obj-$(CONFIG_ELECTRA_IDE) += electra_ide.o
4obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o 3obj-$(CONFIG_PPC_PASEMI_CPUFREQ) += cpufreq.o
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c
index 1cfb8b0c8fec..58556b028a4c 100644
--- a/arch/powerpc/platforms/pasemi/cpufreq.c
+++ b/arch/powerpc/platforms/pasemi/cpufreq.c
@@ -32,6 +32,7 @@
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/prom.h> 33#include <asm/prom.h>
34#include <asm/time.h> 34#include <asm/time.h>
35#include <asm/smp.h>
35 36
36#define SDCASR_REG 0x0100 37#define SDCASR_REG 0x0100
37#define SDCASR_REG_STRIDE 0x1000 38#define SDCASR_REG_STRIDE 0x1000
@@ -124,6 +125,11 @@ static void set_astate(int cpu, unsigned int astate)
124 local_irq_restore(flags); 125 local_irq_restore(flags);
125} 126}
126 127
128int check_astate(void)
129{
130 return get_cur_astate(hard_smp_processor_id());
131}
132
127void restore_astate(int cpu) 133void restore_astate(int cpu)
128{ 134{
129 set_astate(cpu, current_astate); 135 set_astate(cpu, current_astate);
@@ -147,7 +153,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
147 if (!cpu) 153 if (!cpu)
148 goto out; 154 goto out;
149 155
150 dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc"); 156 dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
157 if (!dn)
158 dn = of_find_compatible_node(NULL, NULL,
159 "pasemi,pwrficient-sdc");
151 if (!dn) 160 if (!dn)
152 goto out; 161 goto out;
153 err = of_address_to_resource(dn, 0, &res); 162 err = of_address_to_resource(dn, 0, &res);
@@ -160,7 +169,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
160 goto out; 169 goto out;
161 } 170 }
162 171
163 dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo"); 172 dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
173 if (!dn)
174 dn = of_find_compatible_node(NULL, NULL,
175 "pasemi,pwrficient-gizmo");
164 if (!dn) { 176 if (!dn) {
165 err = -ENODEV; 177 err = -ENODEV;
166 goto out_unmap_sdcasr; 178 goto out_unmap_sdcasr;
@@ -292,7 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
292 304
293static int __init pas_cpufreq_init(void) 305static int __init pas_cpufreq_init(void)
294{ 306{
295 if (!machine_is_compatible("PA6T-1682M")) 307 if (!machine_is_compatible("PA6T-1682M") &&
308 !machine_is_compatible("pasemi,pwrficient"))
296 return -ENODEV; 309 return -ENODEV;
297 310
298 return cpufreq_register_driver(&pas_cpufreq_driver); 311 return cpufreq_register_driver(&pas_cpufreq_driver);
diff --git a/arch/powerpc/platforms/pasemi/electra_ide.c b/arch/powerpc/platforms/pasemi/electra_ide.c
deleted file mode 100644
index 12fb0c949263..000000000000
--- a/arch/powerpc/platforms/pasemi/electra_ide.c
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * Copyright (C) 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#include <linux/platform_device.h>
21
22#include <asm/prom.h>
23#include <asm/system.h>
24
25/* The electra IDE interface is incredibly simple: Just a device on the localbus
26 * with interrupts hooked up to one of the GPIOs. The device tree contains the
27 * address window and interrupt mappings already, and the pata_platform driver handles
28 * the rest. We just need to hook the two up.
29 */
30
31#define MAX_IFS 4 /* really, we have only one */
32
33static struct platform_device *pdevs[MAX_IFS];
34
35static int __devinit electra_ide_init(void)
36{
37 struct device_node *np;
38 struct resource r[3];
39 int ret = 0;
40 int i;
41
42 np = of_find_compatible_node(NULL, "ide", "electra-ide");
43 i = 0;
44
45 while (np && i < MAX_IFS) {
46 memset(r, 0, sizeof(r));
47
48 /* pata_platform wants two address ranges: one for the base registers,
49 * another for the control (altstatus). It's located at offset 0x3f6 in
50 * the window, but the device tree only has one large register window
51 * that covers both ranges. So we need to split it up by hand here:
52 */
53
54 ret = of_address_to_resource(np, 0, &r[0]);
55 if (ret)
56 goto out;
57 ret = of_address_to_resource(np, 0, &r[1]);
58 if (ret)
59 goto out;
60
61 r[1].start += 0x3f6;
62 r[0].end = r[1].start-1;
63
64 r[2].start = irq_of_parse_and_map(np, 0);
65 r[2].end = irq_of_parse_and_map(np, 0);
66 r[2].flags = IORESOURCE_IRQ;
67
68 pr_debug("registering platform device at 0x%lx/0x%lx, irq is %ld\n",
69 r[0].start, r[1].start, r[2].start);
70 pdevs[i] = platform_device_register_simple("pata_platform", i, r, 3);
71 if (IS_ERR(pdevs[i])) {
72 ret = PTR_ERR(pdevs[i]);
73 pdevs[i] = NULL;
74 goto out;
75 }
76 np = of_find_compatible_node(np, "ide", "electra-ide");
77 }
78out:
79 return ret;
80}
81module_init(electra_ide_init);
82
83static void __devexit electra_ide_exit(void)
84{
85 int i;
86
87 for (i = 0; i < MAX_IFS; i++)
88 if (pdevs[i])
89 platform_device_unregister(pdevs[i]);
90}
91module_exit(electra_ide_exit);
92
93
94MODULE_LICENSE("GPL");
95MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>");
96MODULE_DESCRIPTION("PA Semi Electra IDE driver");
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index dae9f658122e..b46542990cf8 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -30,7 +30,7 @@
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/phy.h> 31#include <linux/phy.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <asm/of_platform.h> 33#include <linux/of_platform.h>
34 34
35#define DELAY 1 35#define DELAY 1
36 36
@@ -218,45 +218,27 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
218 const struct of_device_id *match) 218 const struct of_device_id *match)
219{ 219{
220 struct device *dev = &ofdev->dev; 220 struct device *dev = &ofdev->dev;
221 struct device_node *np = ofdev->node; 221 struct device_node *phy_dn, *np = ofdev->node;
222 struct device_node *gpio_np;
223 struct mii_bus *new_bus; 222 struct mii_bus *new_bus;
224 struct resource res;
225 struct gpio_priv *priv; 223 struct gpio_priv *priv;
226 const unsigned int *prop; 224 const unsigned int *prop;
227 int err = 0; 225 int err;
228 int i; 226 int i;
229 227
230 gpio_np = of_find_compatible_node(NULL, "gpio", "1682m-gpio"); 228 err = -ENOMEM;
231
232 if (!gpio_np)
233 return -ENODEV;
234
235 err = of_address_to_resource(gpio_np, 0, &res);
236 of_node_put(gpio_np);
237
238 if (err)
239 return -EINVAL;
240
241 if (!gpio_regs)
242 gpio_regs = ioremap(res.start, 0x100);
243
244 if (!gpio_regs)
245 return -EPERM;
246
247 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL); 229 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL);
248 if (priv == NULL) 230 if (!priv)
249 return -ENOMEM; 231 goto out;
250 232
251 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL); 233 new_bus = kzalloc(sizeof(struct mii_bus), GFP_KERNEL);
252 234
253 if (new_bus == NULL) 235 if (!new_bus)
254 return -ENOMEM; 236 goto out_free_priv;
255 237
256 new_bus->name = "pasemi gpio mdio bus", 238 new_bus->name = "pasemi gpio mdio bus";
257 new_bus->read = &gpio_mdio_read, 239 new_bus->read = &gpio_mdio_read;
258 new_bus->write = &gpio_mdio_write, 240 new_bus->write = &gpio_mdio_write;
259 new_bus->reset = &gpio_mdio_reset, 241 new_bus->reset = &gpio_mdio_reset;
260 242
261 prop = of_get_property(np, "reg", NULL); 243 prop = of_get_property(np, "reg", NULL);
262 new_bus->id = *prop; 244 new_bus->id = *prop;
@@ -265,9 +247,24 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
265 new_bus->phy_mask = 0; 247 new_bus->phy_mask = 0;
266 248
267 new_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 249 new_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
268 for(i = 0; i < PHY_MAX_ADDR; ++i)
269 new_bus->irq[i] = irq_create_mapping(NULL, 10);
270 250
251 if (!new_bus->irq)
252 goto out_free_bus;
253
254 for (i = 0; i < PHY_MAX_ADDR; i++)
255 new_bus->irq[i] = NO_IRQ;
256
257 for (phy_dn = of_get_next_child(np, NULL);
258 phy_dn != NULL;
259 phy_dn = of_get_next_child(np, phy_dn)) {
260 const unsigned int *ip, *regp;
261
262 ip = of_get_property(phy_dn, "interrupts", NULL);
263 regp = of_get_property(phy_dn, "reg", NULL);
264 if (!ip || !regp || *regp >= PHY_MAX_ADDR)
265 continue;
266 new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
267 }
271 268
272 prop = of_get_property(np, "mdc-pin", NULL); 269 prop = of_get_property(np, "mdc-pin", NULL);
273 priv->mdc_pin = *prop; 270 priv->mdc_pin = *prop;
@@ -280,17 +277,21 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
280 277
281 err = mdiobus_register(new_bus); 278 err = mdiobus_register(new_bus);
282 279
283 if (0 != err) { 280 if (err != 0) {
284 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n", 281 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n",
285 new_bus->name, err); 282 new_bus->name, err);
286 goto bus_register_fail; 283 goto out_free_irq;
287 } 284 }
288 285
289 return 0; 286 return 0;
290 287
291bus_register_fail: 288out_free_irq:
289 kfree(new_bus->irq);
290out_free_bus:
292 kfree(new_bus); 291 kfree(new_bus);
293 292out_free_priv:
293 kfree(priv);
294out:
294 return err; 295 return err;
295} 296}
296 297
@@ -317,6 +318,7 @@ static struct of_device_id gpio_mdio_match[] =
317 }, 318 },
318 {}, 319 {},
319}; 320};
321MODULE_DEVICE_TABLE(of, gpio_mdio_match);
320 322
321static struct of_platform_driver gpio_mdio_driver = 323static struct of_platform_driver gpio_mdio_driver =
322{ 324{
@@ -330,12 +332,32 @@ static struct of_platform_driver gpio_mdio_driver =
330 332
331int gpio_mdio_init(void) 333int gpio_mdio_init(void)
332{ 334{
335 struct device_node *np;
336
337 np = of_find_compatible_node(NULL, NULL, "1682m-gpio");
338 if (!np)
339 np = of_find_compatible_node(NULL, NULL,
340 "pasemi,pwrficient-gpio");
341 if (!np)
342 return -ENODEV;
343 gpio_regs = of_iomap(np, 0);
344 of_node_put(np);
345
346 if (!gpio_regs)
347 return -ENODEV;
348
333 return of_register_platform_driver(&gpio_mdio_driver); 349 return of_register_platform_driver(&gpio_mdio_driver);
334} 350}
351module_init(gpio_mdio_init);
335 352
336void gpio_mdio_exit(void) 353void gpio_mdio_exit(void)
337{ 354{
338 of_unregister_platform_driver(&gpio_mdio_driver); 355 of_unregister_platform_driver(&gpio_mdio_driver);
356 if (gpio_regs)
357 iounmap(gpio_regs);
339} 358}
340device_initcall(gpio_mdio_init); 359module_exit(gpio_mdio_exit);
341 360
361MODULE_LICENSE("GPL");
362MODULE_AUTHOR("Olof Johansson <olof@lixom.net>");
363MODULE_DESCRIPTION("Driver for MDIO over GPIO on PA Semi PWRficient-based boards");
diff --git a/arch/powerpc/platforms/pasemi/idle.c b/arch/powerpc/platforms/pasemi/idle.c
index d8e1fcc78513..43911d8b0206 100644
--- a/arch/powerpc/platforms/pasemi/idle.c
+++ b/arch/powerpc/platforms/pasemi/idle.c
@@ -74,9 +74,6 @@ static int pasemi_system_reset_exception(struct pt_regs *regs)
74 74
75static int __init pasemi_idle_init(void) 75static int __init pasemi_idle_init(void)
76{ 76{
77 if (!machine_is(pasemi))
78 return -ENODEV;
79
80#ifndef CONFIG_PPC_PASEMI_CPUFREQ 77#ifndef CONFIG_PPC_PASEMI_CPUFREQ
81 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n"); 78 printk(KERN_WARNING "No cpufreq driver, powersavings modes disabled\n");
82 current_mode = 0; 79 current_mode = 0;
@@ -88,7 +85,7 @@ static int __init pasemi_idle_init(void)
88 85
89 return 0; 86 return 0;
90} 87}
91late_initcall(pasemi_idle_init); 88machine_late_initcall(pasemi, pasemi_idle_init);
92 89
93static int __init idle_param(char *p) 90static int __init idle_param(char *p)
94{ 91{
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index 58b344c6fc38..b1e524f7489d 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -17,8 +17,14 @@ extern void idle_doze(void);
17 17
18/* Restore astate to last set */ 18/* Restore astate to last set */
19#ifdef CONFIG_PPC_PASEMI_CPUFREQ 19#ifdef CONFIG_PPC_PASEMI_CPUFREQ
20extern int check_astate(void);
20extern void restore_astate(int cpu); 21extern void restore_astate(int cpu);
21#else 22#else
23static inline int check_astate(void)
24{
25 /* Always return >0 so we never power save */
26 return 1;
27}
22static inline void restore_astate(int cpu) 28static inline void restore_astate(int cpu)
23{ 29{
24} 30}
diff --git a/arch/powerpc/platforms/pasemi/powersave.S b/arch/powerpc/platforms/pasemi/powersave.S
index 6d0fba6aab17..56f45adcd089 100644
--- a/arch/powerpc/platforms/pasemi/powersave.S
+++ b/arch/powerpc/platforms/pasemi/powersave.S
@@ -62,7 +62,16 @@ sleep_common:
62 mflr r0 62 mflr r0
63 std r0, 16(r1) 63 std r0, 16(r1)
64 stdu r1,-64(r1) 64 stdu r1,-64(r1)
65#ifdef CONFIG_PPC_PASEMI_CPUFREQ
66 std r3, 48(r1)
65 67
68 /* Only do power savings when in astate 0 */
69 bl .check_astate
70 cmpwi r3,0
71 bne 1f
72
73 ld r3, 48(r1)
74#endif
66 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE) 75 LOAD_REG_IMMEDIATE(r6,MSR_DR|MSR_IR|MSR_ME|MSR_EE)
67 mfmsr r4 76 mfmsr r4
68 andc r5,r4,r6 77 andc r5,r4,r6
@@ -73,7 +82,7 @@ sleep_common:
73 82
74 mtmsrd r4,0 83 mtmsrd r4,0
75 84
76 addi r1,r1,64 851: addi r1,r1,64
77 ld r0,16(r1) 86 ld r0,16(r1)
78 mtlr r0 87 mtlr r0
79 blr 88 blr
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 3d62060498b4..c64fb5bfb37e 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -27,6 +27,7 @@
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <linux/console.h> 28#include <linux/console.h>
29#include <linux/pci.h> 29#include <linux/pci.h>
30#include <linux/of_platform.h>
30 31
31#include <asm/prom.h> 32#include <asm/prom.h>
32#include <asm/system.h> 33#include <asm/system.h>
@@ -35,7 +36,7 @@
35#include <asm/mpic.h> 36#include <asm/mpic.h>
36#include <asm/smp.h> 37#include <asm/smp.h>
37#include <asm/time.h> 38#include <asm/time.h>
38#include <asm/of_platform.h> 39#include <asm/mmu.h>
39 40
40#include <pcmcia/ss.h> 41#include <pcmcia/ss.h>
41#include <pcmcia/cistpl.h> 42#include <pcmcia/cistpl.h>
@@ -43,6 +44,10 @@
43 44
44#include "pasemi.h" 45#include "pasemi.h"
45 46
47#if !defined(CONFIG_SMP)
48static void smp_send_stop(void) {}
49#endif
50
46/* SDC reset register, must be pre-mapped at reset time */ 51/* SDC reset register, must be pre-mapped at reset time */
47static void __iomem *reset_reg; 52static void __iomem *reset_reg;
48 53
@@ -56,10 +61,14 @@ struct mce_regs {
56 61
57static struct mce_regs mce_regs[MAX_MCE_REGS]; 62static struct mce_regs mce_regs[MAX_MCE_REGS];
58static int num_mce_regs; 63static int num_mce_regs;
64static int nmi_virq = NO_IRQ;
59 65
60 66
61static void pas_restart(char *cmd) 67static void pas_restart(char *cmd)
62{ 68{
69 /* Need to put others cpu in hold loop so they're not sleeping */
70 smp_send_stop();
71 udelay(10000);
63 printk("Restarting...\n"); 72 printk("Restarting...\n");
64 while (1) 73 while (1)
65 out_le32(reset_reg, 0x6000000); 74 out_le32(reset_reg, 0x6000000);
@@ -126,9 +135,6 @@ static int __init pas_setup_mce_regs(void)
126 struct pci_dev *dev; 135 struct pci_dev *dev;
127 int reg; 136 int reg;
128 137
129 if (!machine_is(pasemi))
130 return -ENODEV;
131
132 /* Remap various SoC status registers for use by the MCE handler */ 138 /* Remap various SoC status registers for use by the MCE handler */
133 139
134 reg = 0; 140 reg = 0;
@@ -172,7 +178,7 @@ static int __init pas_setup_mce_regs(void)
172 178
173 return 0; 179 return 0;
174} 180}
175device_initcall(pas_setup_mce_regs); 181machine_device_initcall(pasemi, pas_setup_mce_regs);
176 182
177static __init void pas_init_IRQ(void) 183static __init void pas_init_IRQ(void)
178{ 184{
@@ -181,6 +187,8 @@ static __init void pas_init_IRQ(void)
181 unsigned long openpic_addr; 187 unsigned long openpic_addr;
182 const unsigned int *opprop; 188 const unsigned int *opprop;
183 int naddr, opplen; 189 int naddr, opplen;
190 int mpic_flags;
191 const unsigned int *nmiprop;
184 struct mpic *mpic; 192 struct mpic *mpic;
185 193
186 mpic_node = NULL; 194 mpic_node = NULL;
@@ -213,13 +221,26 @@ static __init void pas_init_IRQ(void)
213 openpic_addr = of_read_number(opprop, naddr); 221 openpic_addr = of_read_number(opprop, naddr);
214 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); 222 printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr);
215 223
224 mpic_flags = MPIC_PRIMARY | MPIC_LARGE_VECTORS | MPIC_NO_BIAS;
225
226 nmiprop = of_get_property(mpic_node, "nmi-source", NULL);
227 if (nmiprop)
228 mpic_flags |= MPIC_ENABLE_MCK;
229
216 mpic = mpic_alloc(mpic_node, openpic_addr, 230 mpic = mpic_alloc(mpic_node, openpic_addr,
217 MPIC_PRIMARY|MPIC_LARGE_VECTORS, 231 mpic_flags, 0, 0, "PASEMI-OPIC");
218 0, 0, " PAS-OPIC ");
219 BUG_ON(!mpic); 232 BUG_ON(!mpic);
220 233
221 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000); 234 mpic_assign_isu(mpic, 0, openpic_addr + 0x10000);
222 mpic_init(mpic); 235 mpic_init(mpic);
236 /* The NMI/MCK source needs to be prio 15 */
237 if (nmiprop) {
238 nmi_virq = irq_create_mapping(NULL, *nmiprop);
239 mpic_irq_set_priority(nmi_virq, 15);
240 set_irq_type(nmi_virq, IRQ_TYPE_EDGE_RISING);
241 mpic_unmask_irq(nmi_virq);
242 }
243
223 of_node_put(mpic_node); 244 of_node_put(mpic_node);
224 of_node_put(root); 245 of_node_put(root);
225} 246}
@@ -239,6 +260,14 @@ static int pas_machine_check_handler(struct pt_regs *regs)
239 260
240 srr0 = regs->nip; 261 srr0 = regs->nip;
241 srr1 = regs->msr; 262 srr1 = regs->msr;
263
264 if (nmi_virq != NO_IRQ && mpic_get_mcirq() == nmi_virq) {
265 printk(KERN_ERR "NMI delivered\n");
266 debugger(regs);
267 mpic_end_irq(nmi_virq);
268 goto out;
269 }
270
242 dsisr = mfspr(SPRN_DSISR); 271 dsisr = mfspr(SPRN_DSISR);
243 printk(KERN_ERR "Machine Check on CPU %d\n", cpu); 272 printk(KERN_ERR "Machine Check on CPU %d\n", cpu);
244 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1); 273 printk(KERN_ERR "SRR0 0x%016lx SRR1 0x%016lx\n", srr0, srr1);
@@ -295,14 +324,14 @@ static int pas_machine_check_handler(struct pt_regs *regs)
295 int i; 324 int i;
296 325
297 printk(KERN_ERR "slb contents:\n"); 326 printk(KERN_ERR "slb contents:\n");
298 for (i = 0; i < SLB_NUM_ENTRIES; i++) { 327 for (i = 0; i < mmu_slb_size; i++) {
299 asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i)); 328 asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i));
300 asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i)); 329 asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i));
301 printk(KERN_ERR "%02d %016lx %016lx\n", i, e, v); 330 printk(KERN_ERR "%02d %016lx %016lx\n", i, e, v);
302 } 331 }
303 } 332 }
304 333
305 334out:
306 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */ 335 /* SRR1[62] is from MSR[62] if recoverable, so pass that back */
307 return !!(srr1 & 0x2); 336 return !!(srr1 & 0x2);
308} 337}
@@ -362,16 +391,17 @@ static inline void pasemi_pcmcia_init(void)
362 391
363 392
364static struct of_device_id pasemi_bus_ids[] = { 393static struct of_device_id pasemi_bus_ids[] = {
394 /* Unfortunately needed for legacy firmwares */
365 { .type = "localbus", }, 395 { .type = "localbus", },
366 { .type = "sdc", }, 396 { .type = "sdc", },
397 /* These are the proper entries, which newer firmware uses */
398 { .compatible = "pasemi,localbus", },
399 { .compatible = "pasemi,sdc", },
367 {}, 400 {},
368}; 401};
369 402
370static int __init pasemi_publish_devices(void) 403static int __init pasemi_publish_devices(void)
371{ 404{
372 if (!machine_is(pasemi))
373 return 0;
374
375 pasemi_pcmcia_init(); 405 pasemi_pcmcia_init();
376 406
377 /* Publish OF platform devices for SDC and other non-PCI devices */ 407 /* Publish OF platform devices for SDC and other non-PCI devices */
@@ -379,7 +409,7 @@ static int __init pasemi_publish_devices(void)
379 409
380 return 0; 410 return 0;
381} 411}
382device_initcall(pasemi_publish_devices); 412machine_device_initcall(pasemi, pasemi_publish_devices);
383 413
384 414
385/* 415/*
@@ -389,7 +419,8 @@ static int __init pas_probe(void)
389{ 419{
390 unsigned long root = of_get_flat_dt_root(); 420 unsigned long root = of_get_flat_dt_root();
391 421
392 if (!of_flat_dt_is_compatible(root, "PA6T-1682M")) 422 if (!of_flat_dt_is_compatible(root, "PA6T-1682M") &&
423 !of_flat_dt_is_compatible(root, "pasemi,pwrficient"))
393 return 0; 424 return 0;
394 425
395 hpte_init_native(); 426 hpte_init_native();
@@ -400,7 +431,7 @@ static int __init pas_probe(void)
400} 431}
401 432
402define_machine(pasemi) { 433define_machine(pasemi) {
403 .name = "PA Semi PA6T-1682M", 434 .name = "PA Semi PWRficient",
404 .probe = pas_probe, 435 .probe = pas_probe,
405 .setup_arch = pas_setup_arch, 436 .setup_arch = pas_setup_arch,
406 .init_early = pas_init_early, 437 .init_early = pas_init_early,
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index da2007e3db0e..21226b74c9b2 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -585,8 +585,7 @@ static void __init kw_i2c_probe(void)
585 struct device_node *np, *child, *parent; 585 struct device_node *np, *child, *parent;
586 586
587 /* Probe keywest-i2c busses */ 587 /* Probe keywest-i2c busses */
588 for (np = NULL; 588 for_each_compatible_node(np, "i2c","keywest-i2c") {
589 (np = of_find_compatible_node(np, "i2c","keywest-i2c")) != NULL;){
590 struct pmac_i2c_host_kw *host; 589 struct pmac_i2c_host_kw *host;
591 int multibus, chans, i; 590 int multibus, chans, i;
592 591
@@ -1462,9 +1461,6 @@ int __init pmac_i2c_init(void)
1462 return 0; 1461 return 0;
1463 i2c_inited = 1; 1462 i2c_inited = 1;
1464 1463
1465 if (!machine_is(powermac))
1466 return 0;
1467
1468 /* Probe keywest-i2c busses */ 1464 /* Probe keywest-i2c busses */
1469 kw_i2c_probe(); 1465 kw_i2c_probe();
1470 1466
@@ -1483,7 +1479,7 @@ int __init pmac_i2c_init(void)
1483 1479
1484 return 0; 1480 return 0;
1485} 1481}
1486arch_initcall(pmac_i2c_init); 1482machine_arch_initcall(powermac, pmac_i2c_init);
1487 1483
1488/* Since pmac_i2c_init can be called too early for the platform device 1484/* Since pmac_i2c_init can be called too early for the platform device
1489 * registration, we need to do it at a later time. In our case, subsys 1485 * registration, we need to do it at a later time. In our case, subsys
@@ -1515,4 +1511,4 @@ static int __init pmac_i2c_create_platform_devices(void)
1515 1511
1516 return 0; 1512 return 0;
1517} 1513}
1518subsys_initcall(pmac_i2c_create_platform_devices); 1514machine_subsys_initcall(powermac, pmac_i2c_create_platform_devices);
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index f852ae3e0ee4..1c58db9d42cb 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -40,8 +40,6 @@
40static int has_uninorth; 40static int has_uninorth;
41#ifdef CONFIG_PPC64 41#ifdef CONFIG_PPC64
42static struct pci_controller *u3_agp; 42static struct pci_controller *u3_agp;
43static struct pci_controller *u4_pcie;
44static struct pci_controller *u3_ht;
45#else 43#else
46static int has_second_ohare; 44static int has_second_ohare;
47#endif /* CONFIG_PPC64 */ 45#endif /* CONFIG_PPC64 */
@@ -314,12 +312,15 @@ static int u3_ht_skip_device(struct pci_controller *hose,
314 312
315 /* We only allow config cycles to devices that are in OF device-tree 313 /* We only allow config cycles to devices that are in OF device-tree
316 * as we are apparently having some weird things going on with some 314 * as we are apparently having some weird things going on with some
317 * revs of K2 on recent G5s 315 * revs of K2 on recent G5s, except for the host bridge itself, which
316 * is missing from the tree but we know we can probe.
318 */ 317 */
319 if (bus->self) 318 if (bus->self)
320 busdn = pci_device_to_OF_node(bus->self); 319 busdn = pci_device_to_OF_node(bus->self);
320 else if (devfn == 0)
321 return 0;
321 else 322 else
322 busdn = hose->arch_data; 323 busdn = hose->dn;
323 for (dn = busdn->child; dn; dn = dn->sibling) 324 for (dn = busdn->child; dn; dn = dn->sibling)
324 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn) 325 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn)
325 break; 326 break;
@@ -344,14 +345,15 @@ static int u3_ht_skip_device(struct pci_controller *hose,
344 + (((unsigned int)bus) << 16) \ 345 + (((unsigned int)bus) << 16) \
345 + 0x01000000UL) 346 + 0x01000000UL)
346 347
347static volatile void __iomem *u3_ht_cfg_access(struct pci_controller* hose, 348static void __iomem *u3_ht_cfg_access(struct pci_controller *hose, u8 bus,
348 u8 bus, u8 devfn, u8 offset) 349 u8 devfn, u8 offset, int *swap)
349{ 350{
351 *swap = 1;
350 if (bus == hose->first_busno) { 352 if (bus == hose->first_busno) {
351 /* For now, we don't self probe U3 HT bridge */ 353 if (devfn != 0)
352 if (PCI_SLOT(devfn) == 0) 354 return hose->cfg_data + U3_HT_CFA0(devfn, offset);
353 return NULL; 355 *swap = 0;
354 return hose->cfg_data + U3_HT_CFA0(devfn, offset); 356 return ((void __iomem *)hose->cfg_addr) + (offset << 2);
355 } else 357 } else
356 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); 358 return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset);
357} 359}
@@ -360,14 +362,15 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
360 int offset, int len, u32 *val) 362 int offset, int len, u32 *val)
361{ 363{
362 struct pci_controller *hose; 364 struct pci_controller *hose;
363 volatile void __iomem *addr; 365 void __iomem *addr;
366 int swap;
364 367
365 hose = pci_bus_to_host(bus); 368 hose = pci_bus_to_host(bus);
366 if (hose == NULL) 369 if (hose == NULL)
367 return PCIBIOS_DEVICE_NOT_FOUND; 370 return PCIBIOS_DEVICE_NOT_FOUND;
368 if (offset >= 0x100) 371 if (offset >= 0x100)
369 return PCIBIOS_BAD_REGISTER_NUMBER; 372 return PCIBIOS_BAD_REGISTER_NUMBER;
370 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); 373 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
371 if (!addr) 374 if (!addr)
372 return PCIBIOS_DEVICE_NOT_FOUND; 375 return PCIBIOS_DEVICE_NOT_FOUND;
373 376
@@ -397,10 +400,10 @@ static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
397 *val = in_8(addr); 400 *val = in_8(addr);
398 break; 401 break;
399 case 2: 402 case 2:
400 *val = in_le16(addr); 403 *val = swap ? in_le16(addr) : in_be16(addr);
401 break; 404 break;
402 default: 405 default:
403 *val = in_le32(addr); 406 *val = swap ? in_le32(addr) : in_be32(addr);
404 break; 407 break;
405 } 408 }
406 return PCIBIOS_SUCCESSFUL; 409 return PCIBIOS_SUCCESSFUL;
@@ -410,14 +413,15 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
410 int offset, int len, u32 val) 413 int offset, int len, u32 val)
411{ 414{
412 struct pci_controller *hose; 415 struct pci_controller *hose;
413 volatile void __iomem *addr; 416 void __iomem *addr;
417 int swap;
414 418
415 hose = pci_bus_to_host(bus); 419 hose = pci_bus_to_host(bus);
416 if (hose == NULL) 420 if (hose == NULL)
417 return PCIBIOS_DEVICE_NOT_FOUND; 421 return PCIBIOS_DEVICE_NOT_FOUND;
418 if (offset >= 0x100) 422 if (offset >= 0x100)
419 return PCIBIOS_BAD_REGISTER_NUMBER; 423 return PCIBIOS_BAD_REGISTER_NUMBER;
420 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); 424 addr = u3_ht_cfg_access(hose, bus->number, devfn, offset, &swap);
421 if (!addr) 425 if (!addr)
422 return PCIBIOS_DEVICE_NOT_FOUND; 426 return PCIBIOS_DEVICE_NOT_FOUND;
423 427
@@ -439,10 +443,10 @@ static int u3_ht_write_config(struct pci_bus *bus, unsigned int devfn,
439 out_8(addr, val); 443 out_8(addr, val);
440 break; 444 break;
441 case 2: 445 case 2:
442 out_le16(addr, val); 446 swap ? out_le16(addr, val) : out_be16(addr, val);
443 break; 447 break;
444 default: 448 default:
445 out_le32((u32 __iomem *)addr, val); 449 swap ? out_le32(addr, val) : out_be32(addr, val);
446 break; 450 break;
447 } 451 }
448 return PCIBIOS_SUCCESSFUL; 452 return PCIBIOS_SUCCESSFUL;
@@ -725,7 +729,7 @@ static void __init setup_bandit(struct pci_controller *hose,
725static int __init setup_uninorth(struct pci_controller *hose, 729static int __init setup_uninorth(struct pci_controller *hose,
726 struct resource *addr) 730 struct resource *addr)
727{ 731{
728 pci_assign_all_buses = 1; 732 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
729 has_uninorth = 1; 733 has_uninorth = 1;
730 hose->ops = &macrisc_pci_ops; 734 hose->ops = &macrisc_pci_ops;
731 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000); 735 hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
@@ -773,31 +777,72 @@ static void __init setup_u4_pcie(struct pci_controller* hose)
773 */ 777 */
774 hose->first_busno = 0x00; 778 hose->first_busno = 0x00;
775 hose->last_busno = 0xff; 779 hose->last_busno = 0xff;
776 u4_pcie = hose;
777} 780}
778 781
779static void __init setup_u3_ht(struct pci_controller* hose) 782static void __init parse_region_decode(struct pci_controller *hose,
783 u32 decode)
780{ 784{
781 struct device_node *np = (struct device_node *)hose->arch_data; 785 unsigned long base, end, next = -1;
782 struct pci_controller *other = NULL; 786 int i, cur = -1;
783 int i, cur;
784 787
788 /* Iterate through all bits. We ignore the last bit as this region is
789 * reserved for the ROM among other niceties
790 */
791 for (i = 0; i < 31; i++) {
792 if ((decode & (0x80000000 >> i)) == 0)
793 continue;
794 if (i < 16) {
795 base = 0xf0000000 | (((u32)i) << 24);
796 end = base + 0x00ffffff;
797 } else {
798 base = ((u32)i-16) << 28;
799 end = base + 0x0fffffff;
800 }
801 if (base != next) {
802 if (++cur >= 3) {
803 printk(KERN_WARNING "PCI: Too many ranges !\n");
804 break;
805 }
806 hose->mem_resources[cur].flags = IORESOURCE_MEM;
807 hose->mem_resources[cur].name = hose->dn->full_name;
808 hose->mem_resources[cur].start = base;
809 hose->mem_resources[cur].end = end;
810 DBG(" %d: 0x%08lx-0x%08lx\n", cur, base, end);
811 } else {
812 DBG(" : -0x%08lx\n", end);
813 hose->mem_resources[cur].end = end;
814 }
815 next = end + 1;
816 }
817}
818
819static void __init setup_u3_ht(struct pci_controller* hose)
820{
821 struct device_node *np = hose->dn;
822 struct resource cfg_res, self_res;
823 u32 decode;
785 824
786 hose->ops = &u3_ht_pci_ops; 825 hose->ops = &u3_ht_pci_ops;
787 826
788 /* We hard code the address because of the different size of 827 /* Get base addresses from OF tree
789 * the reg address cell, we shall fix that by killing struct
790 * reg_property and using some accessor functions instead
791 */ 828 */
792 hose->cfg_data = ioremap(0xf2000000, 0x02000000); 829 if (of_address_to_resource(np, 0, &cfg_res) ||
830 of_address_to_resource(np, 1, &self_res)) {
831 printk(KERN_ERR "PCI: Failed to get U3/U4 HT resources !\n");
832 return;
833 }
834
835 /* Map external cfg space access into cfg_data and self registers
836 * into cfg_addr
837 */
838 hose->cfg_data = ioremap(cfg_res.start, 0x02000000);
839 hose->cfg_addr = ioremap(self_res.start,
840 self_res.end - self_res.start + 1);
793 841
794 /* 842 /*
795 * /ht node doesn't expose a "ranges" property, so we "remove" 843 * /ht node doesn't expose a "ranges" property, we read the register
796 * regions that have been allocated to AGP. So far, this version of 844 * that controls the decoding logic and use that for memory regions.
797 * the code doesn't assign any of the 0xfxxxxxxx "fine" memory regions 845 * The IO region is hard coded since it is fixed in HW as well.
798 * to /ht. We need to fix that sooner or later by either parsing all
799 * child "ranges" properties or figuring out the U3 address space
800 * decoding logic and then read its configuration register (if any).
801 */ 846 */
802 hose->io_base_phys = 0xf4000000; 847 hose->io_base_phys = 0xf4000000;
803 hose->pci_io_size = 0x00400000; 848 hose->pci_io_size = 0x00400000;
@@ -808,76 +853,33 @@ static void __init setup_u3_ht(struct pci_controller* hose)
808 hose->pci_mem_offset = 0; 853 hose->pci_mem_offset = 0;
809 hose->first_busno = 0; 854 hose->first_busno = 0;
810 hose->last_busno = 0xef; 855 hose->last_busno = 0xef;
811 hose->mem_resources[0].name = np->full_name;
812 hose->mem_resources[0].start = 0x80000000;
813 hose->mem_resources[0].end = 0xefffffff;
814 hose->mem_resources[0].flags = IORESOURCE_MEM;
815
816 u3_ht = hose;
817 856
818 if (u3_agp != NULL) 857 /* Note: fix offset when cfg_addr becomes a void * */
819 other = u3_agp; 858 decode = in_be32(hose->cfg_addr + 0x80);
820 else if (u4_pcie != NULL)
821 other = u4_pcie;
822
823 if (other == NULL) {
824 DBG("U3/4 has no AGP/PCIE, using full resource range\n");
825 return;
826 }
827 859
828 /* Fixup bus range vs. PCIE */ 860 DBG("PCI: Apple HT bridge decode register: 0x%08x\n", decode);
829 if (u4_pcie)
830 hose->last_busno = u4_pcie->first_busno - 1;
831 861
832 /* We "remove" the AGP resources from the resources allocated to HT, 862 /* NOTE: The decode register setup is a bit weird... region
833 * that is we create "holes". However, that code does assumptions 863 * 0xf8000000 for example is marked as enabled in there while it's
834 * that so far happen to be true (cross fingers...), typically that 864 & actually the memory controller registers.
835 * resources in the AGP node are properly ordered 865 * That means that we are incorrectly attributing it to HT.
866 *
867 * In a similar vein, region 0xf4000000 is actually the HT IO space but
868 * also marked as enabled in here and 0xf9000000 is used by some other
869 * internal bits of the northbridge.
870 *
871 * Unfortunately, we can't just mask out those bit as we would end
872 * up with more regions than we can cope (linux can only cope with
873 * 3 memory regions for a PHB at this stage).
874 *
875 * So for now, we just do a little hack. We happen to -know- that
876 * Apple firmware doesn't assign things below 0xfa000000 for that
877 * bridge anyway so we mask out all bits we don't want.
836 */ 878 */
837 cur = 0; 879 decode &= 0x003fffff;
838 for (i=0; i<3; i++) { 880
839 struct resource *res = &other->mem_resources[i]; 881 /* Now parse the resulting bits and build resources */
840 if (res->flags != IORESOURCE_MEM) 882 parse_region_decode(hose, decode);
841 continue;
842 /* We don't care about "fine" resources */
843 if (res->start >= 0xf0000000)
844 continue;
845 /* Check if it's just a matter of "shrinking" us in one
846 * direction
847 */
848 if (hose->mem_resources[cur].start == res->start) {
849 DBG("U3/HT: shrink start of %d, %08lx -> %08lx\n",
850 cur, hose->mem_resources[cur].start,
851 res->end + 1);
852 hose->mem_resources[cur].start = res->end + 1;
853 continue;
854 }
855 if (hose->mem_resources[cur].end == res->end) {
856 DBG("U3/HT: shrink end of %d, %08lx -> %08lx\n",
857 cur, hose->mem_resources[cur].end,
858 res->start - 1);
859 hose->mem_resources[cur].end = res->start - 1;
860 continue;
861 }
862 /* No, it's not the case, we need a hole */
863 if (cur == 2) {
864 /* not enough resources for a hole, we drop part
865 * of the range
866 */
867 printk(KERN_WARNING "Running out of resources"
868 " for /ht host !\n");
869 hose->mem_resources[cur].end = res->start - 1;
870 continue;
871 }
872 cur++;
873 DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
874 cur-1, res->start - 1, cur, res->end + 1);
875 hose->mem_resources[cur].name = np->full_name;
876 hose->mem_resources[cur].flags = IORESOURCE_MEM;
877 hose->mem_resources[cur].start = res->end + 1;
878 hose->mem_resources[cur].end = hose->mem_resources[cur-1].end;
879 hose->mem_resources[cur-1].end = res->start - 1;
880 }
881} 883}
882#endif /* CONFIG_PPC64 */ 884#endif /* CONFIG_PPC64 */
883 885
@@ -994,6 +996,8 @@ void __init pmac_pci_init(void)
994 struct device_node *np, *root; 996 struct device_node *np, *root;
995 struct device_node *ht = NULL; 997 struct device_node *ht = NULL;
996 998
999 ppc_pci_flags = PPC_PCI_CAN_SKIP_ISA_ALIGN;
1000
997 root = of_find_node_by_path("/"); 1001 root = of_find_node_by_path("/");
998 if (root == NULL) { 1002 if (root == NULL) {
999 printk(KERN_CRIT "pmac_pci_init: can't find root " 1003 printk(KERN_CRIT "pmac_pci_init: can't find root "
@@ -1032,15 +1036,15 @@ void __init pmac_pci_init(void)
1032 * future though 1036 * future though
1033 */ 1037 */
1034 if (u3_agp) { 1038 if (u3_agp) {
1035 struct device_node *np = u3_agp->arch_data; 1039 struct device_node *np = u3_agp->dn;
1036 PCI_DN(np)->busno = 0xf0; 1040 PCI_DN(np)->busno = 0xf0;
1037 for (np = np->child; np; np = np->sibling) 1041 for (np = np->child; np; np = np->sibling)
1038 PCI_DN(np)->busno = 0xf0; 1042 PCI_DN(np)->busno = 0xf0;
1039 } 1043 }
1040 /* pmac_check_ht_link(); */ 1044 /* pmac_check_ht_link(); */
1041 1045
1042 /* Tell pci.c to not use the common resource allocation mechanism */ 1046 /* We can allocate missing resources if any */
1043 pci_probe_only = 1; 1047 pci_probe_only = 0;
1044 1048
1045#else /* CONFIG_PPC64 */ 1049#else /* CONFIG_PPC64 */
1046 init_p2pbridge(); 1050 init_p2pbridge();
@@ -1051,13 +1055,13 @@ void __init pmac_pci_init(void)
1051 * some offset between bus number and domains for now when we 1055 * some offset between bus number and domains for now when we
1052 * assign all busses should help for now 1056 * assign all busses should help for now
1053 */ 1057 */
1054 if (pci_assign_all_buses) 1058 if (ppc_pci_flags & PPC_PCI_REASSIGN_ALL_BUS)
1055 pcibios_assign_bus_offset = 0x10; 1059 pcibios_assign_bus_offset = 0x10;
1056#endif 1060#endif
1057} 1061}
1058 1062
1059int 1063#ifdef CONFIG_PPC32
1060pmac_pci_enable_device_hook(struct pci_dev *dev, int initial) 1064int pmac_pci_enable_device_hook(struct pci_dev *dev)
1061{ 1065{
1062 struct device_node* node; 1066 struct device_node* node;
1063 int updatecfg = 0; 1067 int updatecfg = 0;
@@ -1099,24 +1103,21 @@ pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
1099 updatecfg = 1; 1103 updatecfg = 1;
1100 } 1104 }
1101 1105
1106 /*
1107 * Fixup various header fields on 32 bits. We don't do that on
1108 * 64 bits as some of these have strange values behind the HT
1109 * bridge and we must not, for example, enable MWI or set the
1110 * cache line size on them.
1111 */
1102 if (updatecfg) { 1112 if (updatecfg) {
1103 u16 cmd; 1113 u16 cmd;
1104 1114
1105 /*
1106 * Make sure PCI is correctly configured
1107 *
1108 * We use old pci_bios versions of the function since, by
1109 * default, gmac is not powered up, and so will be absent
1110 * from the kernel initial PCI lookup.
1111 *
1112 * Should be replaced by 2.4 new PCI mechanisms and really
1113 * register the device.
1114 */
1115 pci_read_config_word(dev, PCI_COMMAND, &cmd); 1115 pci_read_config_word(dev, PCI_COMMAND, &cmd);
1116 cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER 1116 cmd |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
1117 | PCI_COMMAND_INVALIDATE; 1117 | PCI_COMMAND_INVALIDATE;
1118 pci_write_config_word(dev, PCI_COMMAND, cmd); 1118 pci_write_config_word(dev, PCI_COMMAND, cmd);
1119 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 16); 1119 pci_write_config_byte(dev, PCI_LATENCY_TIMER, 16);
1120
1120 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 1121 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE,
1121 L1_CACHE_BYTES >> 2); 1122 L1_CACHE_BYTES >> 2);
1122 } 1123 }
@@ -1124,6 +1125,18 @@ pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
1124 return 0; 1125 return 0;
1125} 1126}
1126 1127
1128void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev)
1129{
1130 struct device_node *node = pci_device_to_OF_node(dev);
1131
1132 /* We don't want to assign resources to USB controllers
1133 * absent from the OF tree (iBook second controller)
1134 */
1135 if (dev->class == PCI_CLASS_SERIAL_USB_OHCI && !node)
1136 dev->resource[0].flags = 0;
1137}
1138DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_APPLE, PCI_ANY_ID, pmac_pci_fixup_ohci);
1139
1127/* We power down some devices after they have been probed. They'll 1140/* We power down some devices after they have been probed. They'll
1128 * be powered back on later on 1141 * be powered back on later on
1129 */ 1142 */
@@ -1171,7 +1184,6 @@ void __init pmac_pcibios_after_init(void)
1171 of_node_put(nd); 1184 of_node_put(nd);
1172} 1185}
1173 1186
1174#ifdef CONFIG_PPC32
1175void pmac_pci_fixup_cardbus(struct pci_dev* dev) 1187void pmac_pci_fixup_cardbus(struct pci_dev* dev)
1176{ 1188{
1177 if (!machine_is(powermac)) 1189 if (!machine_is(powermac))
@@ -1259,7 +1271,7 @@ void pmac_pci_fixup_pciata(struct pci_dev* dev)
1259 } 1271 }
1260} 1272}
1261DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata); 1273DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata);
1262#endif 1274#endif /* CONFIG_PPC32 */
1263 1275
1264/* 1276/*
1265 * Disable second function on K2-SATA, it's broken 1277 * Disable second function on K2-SATA, it's broken
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index 45d54b9ad9e0..db20de512f3e 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -363,8 +363,7 @@ int __init pmac_pfunc_base_install(void)
363 363
364 return 0; 364 return 0;
365} 365}
366 366machine_arch_initcall(powermac, pmac_pfunc_base_install);
367arch_initcall(pmac_pfunc_base_install);
368 367
369#ifdef CONFIG_PM 368#ifdef CONFIG_PM
370 369
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 84c0d4ef76a2..40736400ef80 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -690,6 +690,5 @@ static int __init init_pmacpic_sysfs(void)
690 sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic); 690 sysdev_driver_register(&pmacpic_sysclass, &driver_pmacpic);
691 return 0; 691 return 0;
692} 692}
693 693machine_subsys_initcall(powermac, init_pmacpic_sysfs);
694subsys_initcall(init_pmacpic_sysfs);
695 694
diff --git a/arch/powerpc/platforms/powermac/pmac.h b/arch/powerpc/platforms/powermac/pmac.h
index fcde070f7054..b3abaaf61eb4 100644
--- a/arch/powerpc/platforms/powermac/pmac.h
+++ b/arch/powerpc/platforms/powermac/pmac.h
@@ -26,7 +26,7 @@ extern void pmac_pci_init(void);
26extern void pmac_nvram_update(void); 26extern void pmac_nvram_update(void);
27extern unsigned char pmac_nvram_read_byte(int addr); 27extern unsigned char pmac_nvram_read_byte(int addr);
28extern void pmac_nvram_write_byte(int addr, unsigned char val); 28extern void pmac_nvram_write_byte(int addr, unsigned char val);
29extern int pmac_pci_enable_device_hook(struct pci_dev *dev, int initial); 29extern int pmac_pci_enable_device_hook(struct pci_dev *dev);
30extern void pmac_pcibios_after_init(void); 30extern void pmac_pcibios_after_init(void);
31extern int of_show_percpuinfo(struct seq_file *m, int i); 31extern int of_show_percpuinfo(struct seq_file *m, int i);
32 32
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 02c533096627..36ff1b6b7fac 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -51,6 +51,8 @@
51#include <linux/root_dev.h> 51#include <linux/root_dev.h>
52#include <linux/bitops.h> 52#include <linux/bitops.h>
53#include <linux/suspend.h> 53#include <linux/suspend.h>
54#include <linux/of_device.h>
55#include <linux/of_platform.h>
54 56
55#include <asm/reg.h> 57#include <asm/reg.h>
56#include <asm/sections.h> 58#include <asm/sections.h>
@@ -68,8 +70,6 @@
68#include <asm/btext.h> 70#include <asm/btext.h>
69#include <asm/pmac_feature.h> 71#include <asm/pmac_feature.h>
70#include <asm/time.h> 72#include <asm/time.h>
71#include <asm/of_device.h>
72#include <asm/of_platform.h>
73#include <asm/mmu_context.h> 73#include <asm/mmu_context.h>
74#include <asm/iommu.h> 74#include <asm/iommu.h>
75#include <asm/smu.h> 75#include <asm/smu.h>
@@ -94,7 +94,6 @@ extern struct machdep_calls pmac_md;
94#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ 94#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
95 95
96#ifdef CONFIG_PPC64 96#ifdef CONFIG_PPC64
97#include <asm/udbg.h>
98int sccdbg; 97int sccdbg;
99#endif 98#endif
100 99
@@ -398,17 +397,13 @@ static int initializing = 1;
398 397
399static int pmac_late_init(void) 398static int pmac_late_init(void)
400{ 399{
401 if (!machine_is(powermac))
402 return -ENODEV;
403
404 initializing = 0; 400 initializing = 0;
405 /* this is udbg (which is __init) and we can later use it during 401 /* this is udbg (which is __init) and we can later use it during
406 * cpu hotplug (in smp_core99_kick_cpu) */ 402 * cpu hotplug (in smp_core99_kick_cpu) */
407 ppc_md.progress = NULL; 403 ppc_md.progress = NULL;
408 return 0; 404 return 0;
409} 405}
410 406machine_late_initcall(powermac, pmac_late_init);
411late_initcall(pmac_late_init);
412 407
413/* 408/*
414 * This is __init_refok because we check for "initializing" before 409 * This is __init_refok because we check for "initializing" before
@@ -535,9 +530,6 @@ static int __init pmac_declare_of_platform_devices(void)
535 if (machine_is(chrp)) 530 if (machine_is(chrp))
536 return -1; 531 return -1;
537 532
538 if (!machine_is(powermac))
539 return 0;
540
541 np = of_find_node_by_name(NULL, "valkyrie"); 533 np = of_find_node_by_name(NULL, "valkyrie");
542 if (np) 534 if (np)
543 of_platform_device_create(np, "valkyrie", NULL); 535 of_platform_device_create(np, "valkyrie", NULL);
@@ -552,8 +544,7 @@ static int __init pmac_declare_of_platform_devices(void)
552 544
553 return 0; 545 return 0;
554} 546}
555 547machine_device_initcall(powermac, pmac_declare_of_platform_devices);
556device_initcall(pmac_declare_of_platform_devices);
557 548
558/* 549/*
559 * Called very early, MMU is off, device-tree isn't unflattened 550 * Called very early, MMU is off, device-tree isn't unflattened
@@ -613,9 +604,11 @@ static int pmac_pci_probe_mode(struct pci_bus *bus)
613 604
614 /* We need to use normal PCI probing for the AGP bus, 605 /* We need to use normal PCI probing for the AGP bus,
615 * since the device for the AGP bridge isn't in the tree. 606 * since the device for the AGP bridge isn't in the tree.
607 * Same for the PCIe host on U4 and the HT host bridge.
616 */ 608 */
617 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") || 609 if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
618 of_device_is_compatible(node, "u4-pcie"))) 610 of_device_is_compatible(node, "u4-pcie") ||
611 of_device_is_compatible(node, "u3-ht")))
619 return PCI_PROBE_NORMAL; 612 return PCI_PROBE_NORMAL;
620 return PCI_PROBE_DEVTREE; 613 return PCI_PROBE_DEVTREE;
621} 614}
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index bf9da56942e8..bbbefd64ab59 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -84,12 +84,14 @@ long __init pmac_time_init(void)
84 return delta; 84 return delta;
85} 85}
86 86
87#if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU)
87static void to_rtc_time(unsigned long now, struct rtc_time *tm) 88static void to_rtc_time(unsigned long now, struct rtc_time *tm)
88{ 89{
89 to_tm(now, tm); 90 to_tm(now, tm);
90 tm->tm_year -= 1900; 91 tm->tm_year -= 1900;
91 tm->tm_mon -= 1; 92 tm->tm_mon -= 1;
92} 93}
94#endif
93 95
94static unsigned long from_rtc_time(struct rtc_time *tm) 96static unsigned long from_rtc_time(struct rtc_time *tm)
95{ 97{
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 298f1c9679fb..a5f4e95dfc3d 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -61,17 +61,6 @@ config PS3_DYNAMIC_DMA
61 This support is mainly for Linux kernel development. If unsure, 61 This support is mainly for Linux kernel development. If unsure,
62 say N. 62 say N.
63 63
64config PS3_USE_LPAR_ADDR
65 depends on PPC_PS3 && EXPERIMENTAL
66 bool "PS3 use lpar address space"
67 default y
68 help
69 This option is solely for experimentation by experts. Disables
70 translation of lpar addresses. SPE support currently won't work
71 without this set to y.
72
73 If you have any doubt, choose the default y.
74
75config PS3_VUART 64config PS3_VUART
76 depends on PPC_PS3 65 depends on PPC_PS3
77 tristate 66 tristate
@@ -138,4 +127,17 @@ config PS3_FLASH
138 be disabled on the kernel command line using "ps3flash=off", to 127 be disabled on the kernel command line using "ps3flash=off", to
139 not allocate this fixed buffer. 128 not allocate this fixed buffer.
140 129
130config PS3_LPM
131 tristate "PS3 Logical Performance Monitor support"
132 depends on PPC_PS3
133 help
134 Include support for the PS3 Logical Performance Monitor.
135
136 This support is required to use the logical performance monitor
137 of the PS3's LV1 hypervisor.
138
139 If you intend to use the advanced performance monitoring and
140 profiling support of the Cell processor with programs like
141 oprofile and perfmon2, then say Y or M, otherwise say N.
142
141endmenu 143endmenu
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index fd063fe0c9b3..9d251d0ca8c6 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -23,6 +23,7 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/kthread.h> 24#include <linux/kthread.h>
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/reboot.h>
26 27
27#include <asm/firmware.h> 28#include <asm/firmware.h>
28#include <asm/lv1call.h> 29#include <asm/lv1call.h>
@@ -30,6 +31,89 @@
30 31
31#include "platform.h" 32#include "platform.h"
32 33
34static int __init ps3_register_lpm_devices(void)
35{
36 int result;
37 u64 tmp1;
38 u64 tmp2;
39 struct ps3_system_bus_device *dev;
40
41 pr_debug(" -> %s:%d\n", __func__, __LINE__);
42
43 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
44 if (!dev)
45 return -ENOMEM;
46
47 dev->match_id = PS3_MATCH_ID_LPM;
48 dev->dev_type = PS3_DEVICE_TYPE_LPM;
49
50 /* The current lpm driver only supports a single BE processor. */
51
52 result = ps3_repository_read_be_node_id(0, &dev->lpm.node_id);
53
54 if (result) {
55 pr_debug("%s:%d: ps3_repository_read_be_node_id failed \n",
56 __func__, __LINE__);
57 goto fail_read_repo;
58 }
59
60 result = ps3_repository_read_lpm_privileges(dev->lpm.node_id, &tmp1,
61 &dev->lpm.rights);
62
63 if (result) {
64 pr_debug("%s:%d: ps3_repository_read_lpm_privleges failed \n",
65 __func__, __LINE__);
66 goto fail_read_repo;
67 }
68
69 lv1_get_logical_partition_id(&tmp2);
70
71 if (tmp1 != tmp2) {
72 pr_debug("%s:%d: wrong lpar\n",
73 __func__, __LINE__);
74 result = -ENODEV;
75 goto fail_rights;
76 }
77
78 if (!(dev->lpm.rights & PS3_LPM_RIGHTS_USE_LPM)) {
79 pr_debug("%s:%d: don't have rights to use lpm\n",
80 __func__, __LINE__);
81 result = -EPERM;
82 goto fail_rights;
83 }
84
85 pr_debug("%s:%d: pu_id %lu, rights %lu(%lxh)\n",
86 __func__, __LINE__, dev->lpm.pu_id, dev->lpm.rights,
87 dev->lpm.rights);
88
89 result = ps3_repository_read_pu_id(0, &dev->lpm.pu_id);
90
91 if (result) {
92 pr_debug("%s:%d: ps3_repository_read_pu_id failed \n",
93 __func__, __LINE__);
94 goto fail_read_repo;
95 }
96
97 result = ps3_system_bus_device_register(dev);
98
99 if (result) {
100 pr_debug("%s:%d ps3_system_bus_device_register failed\n",
101 __func__, __LINE__);
102 goto fail_register;
103 }
104
105 pr_debug(" <- %s:%d\n", __func__, __LINE__);
106 return 0;
107
108
109fail_register:
110fail_rights:
111fail_read_repo:
112 kfree(dev);
113 pr_debug(" <- %s:%d: failed\n", __func__, __LINE__);
114 return result;
115}
116
33/** 117/**
34 * ps3_setup_gelic_device - Setup and register a gelic device instance. 118 * ps3_setup_gelic_device - Setup and register a gelic device instance.
35 * 119 *
@@ -238,166 +322,6 @@ static int __init ps3_setup_vuart_device(enum ps3_match_id match_id,
238 return result; 322 return result;
239} 323}
240 324
241static int ps3stor_wait_for_completion(u64 dev_id, u64 tag,
242 unsigned int timeout)
243{
244 int result = -1;
245 unsigned int retries = 0;
246 u64 status;
247
248 for (retries = 0; retries < timeout; retries++) {
249 result = lv1_storage_check_async_status(dev_id, tag, &status);
250 if (!result)
251 break;
252
253 msleep(1);
254 }
255
256 if (result)
257 pr_debug("%s:%u: check_async_status: %s, status %lx\n",
258 __func__, __LINE__, ps3_result(result), status);
259
260 return result;
261}
262
263/**
264 * ps3_storage_wait_for_device - Wait for a storage device to become ready.
265 * @repo: The repository device to wait for.
266 *
267 * Uses the hypervisor's storage device notification mechanism to wait until
268 * a storage device is ready. The device notification mechanism uses a
269 * psuedo device (id = -1) to asynchronously notify the guest when storage
270 * devices become ready. The notification device has a block size of 512
271 * bytes.
272 */
273
274static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
275{
276 int error = -ENODEV;
277 int result;
278 const u64 notification_dev_id = (u64)-1LL;
279 const unsigned int timeout = HZ;
280 u64 lpar;
281 u64 tag;
282 void *buf;
283 enum ps3_notify_type {
284 notify_device_ready = 0,
285 notify_region_probe = 1,
286 notify_region_update = 2,
287 };
288 struct {
289 u64 operation_code; /* must be zero */
290 u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
291 } *notify_cmd;
292 struct {
293 u64 event_type; /* enum ps3_notify_type */
294 u64 bus_id;
295 u64 dev_id;
296 u64 dev_type;
297 u64 dev_port;
298 } *notify_event;
299
300 pr_debug(" -> %s:%u: (%u:%u:%u)\n", __func__, __LINE__, repo->bus_id,
301 repo->dev_id, repo->dev_type);
302
303 buf = kzalloc(512, GFP_KERNEL);
304 if (!buf)
305 return -ENOMEM;
306
307 lpar = ps3_mm_phys_to_lpar(__pa(buf));
308 notify_cmd = buf;
309 notify_event = buf;
310
311 result = lv1_open_device(repo->bus_id, notification_dev_id, 0);
312 if (result) {
313 printk(KERN_ERR "%s:%u: lv1_open_device %s\n", __func__,
314 __LINE__, ps3_result(result));
315 goto fail_free;
316 }
317
318 /* Setup and write the request for device notification. */
319
320 notify_cmd->operation_code = 0; /* must be zero */
321 notify_cmd->event_mask = 1UL << notify_region_probe;
322
323 result = lv1_storage_write(notification_dev_id, 0, 0, 1, 0, lpar,
324 &tag);
325 if (result) {
326 printk(KERN_ERR "%s:%u: write failed %s\n", __func__, __LINE__,
327 ps3_result(result));
328 goto fail_close;
329 }
330
331 /* Wait for the write completion */
332
333 result = ps3stor_wait_for_completion(notification_dev_id, tag,
334 timeout);
335 if (result) {
336 printk(KERN_ERR "%s:%u: write not completed %s\n", __func__,
337 __LINE__, ps3_result(result));
338 goto fail_close;
339 }
340
341 /* Loop here processing the requested notification events. */
342
343 while (1) {
344 memset(notify_event, 0, sizeof(*notify_event));
345
346 result = lv1_storage_read(notification_dev_id, 0, 0, 1, 0,
347 lpar, &tag);
348 if (result) {
349 printk(KERN_ERR "%s:%u: write failed %s\n", __func__,
350 __LINE__, ps3_result(result));
351 break;
352 }
353
354 result = ps3stor_wait_for_completion(notification_dev_id, tag,
355 timeout);
356 if (result) {
357 printk(KERN_ERR "%s:%u: read not completed %s\n",
358 __func__, __LINE__, ps3_result(result));
359 break;
360 }
361
362 pr_debug("%s:%d: notify event (%u:%u:%u): event_type 0x%lx, "
363 "port %lu\n", __func__, __LINE__, repo->bus_index,
364 repo->dev_index, repo->dev_type,
365 notify_event->event_type, notify_event->dev_port);
366
367 if (notify_event->event_type != notify_region_probe ||
368 notify_event->bus_id != repo->bus_id) {
369 pr_debug("%s:%u: bad notify_event: event %lu, "
370 "dev_id %lu, dev_type %lu\n",
371 __func__, __LINE__, notify_event->event_type,
372 notify_event->dev_id, notify_event->dev_type);
373 break;
374 }
375
376 if (notify_event->dev_id == repo->dev_id &&
377 notify_event->dev_type == repo->dev_type) {
378 pr_debug("%s:%u: device ready (%u:%u:%u)\n", __func__,
379 __LINE__, repo->bus_index, repo->dev_index,
380 repo->dev_type);
381 error = 0;
382 break;
383 }
384
385 if (notify_event->dev_id == repo->dev_id &&
386 notify_event->dev_type == PS3_DEV_TYPE_NOACCESS) {
387 pr_debug("%s:%u: no access: dev_id %u\n", __func__,
388 __LINE__, repo->dev_id);
389 break;
390 }
391 }
392
393fail_close:
394 lv1_close_device(repo->bus_id, notification_dev_id);
395fail_free:
396 kfree(buf);
397 pr_debug(" <- %s:%u\n", __func__, __LINE__);
398 return error;
399}
400
401static int ps3_setup_storage_dev(const struct ps3_repository_device *repo, 325static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
402 enum ps3_match_id match_id) 326 enum ps3_match_id match_id)
403{ 327{
@@ -449,16 +373,6 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
449 goto fail_find_interrupt; 373 goto fail_find_interrupt;
450 } 374 }
451 375
452 /* FIXME: Arrange to only do this on a 'cold' boot */
453
454 result = ps3_storage_wait_for_device(repo);
455 if (result) {
456 printk(KERN_ERR "%s:%u: storage_notification failed %d\n",
457 __func__, __LINE__, result);
458 result = -ENODEV;
459 goto fail_probe_notification;
460 }
461
462 for (i = 0; i < num_regions; i++) { 376 for (i = 0; i < num_regions; i++) {
463 unsigned int id; 377 unsigned int id;
464 u64 start, size; 378 u64 start, size;
@@ -494,7 +408,6 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
494 408
495fail_device_register: 409fail_device_register:
496fail_read_region: 410fail_read_region:
497fail_probe_notification:
498fail_find_interrupt: 411fail_find_interrupt:
499 kfree(p); 412 kfree(p);
500fail_malloc: 413fail_malloc:
@@ -659,62 +572,268 @@ static int ps3_register_repository_device(
659 return result; 572 return result;
660} 573}
661 574
575static void ps3_find_and_add_device(u64 bus_id, u64 dev_id)
576{
577 struct ps3_repository_device repo;
578 int res;
579 unsigned int retries;
580 unsigned long rem;
581
582 /*
583 * On some firmware versions (e.g. 1.90), the device may not show up
584 * in the repository immediately
585 */
586 for (retries = 0; retries < 10; retries++) {
587 res = ps3_repository_find_device_by_id(&repo, bus_id, dev_id);
588 if (!res)
589 goto found;
590
591 rem = msleep_interruptible(100);
592 if (rem)
593 break;
594 }
595 pr_warning("%s:%u: device %lu:%lu not found\n", __func__, __LINE__,
596 bus_id, dev_id);
597 return;
598
599found:
600 if (retries)
601 pr_debug("%s:%u: device %lu:%lu found after %u retries\n",
602 __func__, __LINE__, bus_id, dev_id, retries);
603
604 ps3_register_repository_device(&repo);
605 return;
606}
607
608#define PS3_NOTIFICATION_DEV_ID ULONG_MAX
609#define PS3_NOTIFICATION_INTERRUPT_ID 0
610
611struct ps3_notification_device {
612 struct ps3_system_bus_device sbd;
613 spinlock_t lock;
614 u64 tag;
615 u64 lv1_status;
616 struct completion done;
617};
618
619enum ps3_notify_type {
620 notify_device_ready = 0,
621 notify_region_probe = 1,
622 notify_region_update = 2,
623};
624
625struct ps3_notify_cmd {
626 u64 operation_code; /* must be zero */
627 u64 event_mask; /* OR of 1UL << enum ps3_notify_type */
628};
629
630struct ps3_notify_event {
631 u64 event_type; /* enum ps3_notify_type */
632 u64 bus_id;
633 u64 dev_id;
634 u64 dev_type;
635 u64 dev_port;
636};
637
638static irqreturn_t ps3_notification_interrupt(int irq, void *data)
639{
640 struct ps3_notification_device *dev = data;
641 int res;
642 u64 tag, status;
643
644 spin_lock(&dev->lock);
645 res = lv1_storage_get_async_status(PS3_NOTIFICATION_DEV_ID, &tag,
646 &status);
647 if (tag != dev->tag)
648 pr_err("%s:%u: tag mismatch, got %lx, expected %lx\n",
649 __func__, __LINE__, tag, dev->tag);
650
651 if (res) {
652 pr_err("%s:%u: res %d status 0x%lx\n", __func__, __LINE__, res,
653 status);
654 } else {
655 pr_debug("%s:%u: completed, status 0x%lx\n", __func__,
656 __LINE__, status);
657 dev->lv1_status = status;
658 complete(&dev->done);
659 }
660 spin_unlock(&dev->lock);
661 return IRQ_HANDLED;
662}
663
664static int ps3_notification_read_write(struct ps3_notification_device *dev,
665 u64 lpar, int write)
666{
667 const char *op = write ? "write" : "read";
668 unsigned long flags;
669 int res;
670
671 init_completion(&dev->done);
672 spin_lock_irqsave(&dev->lock, flags);
673 res = write ? lv1_storage_write(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
674 &dev->tag)
675 : lv1_storage_read(dev->sbd.dev_id, 0, 0, 1, 0, lpar,
676 &dev->tag);
677 spin_unlock_irqrestore(&dev->lock, flags);
678 if (res) {
679 pr_err("%s:%u: %s failed %d\n", __func__, __LINE__, op, res);
680 return -EPERM;
681 }
682 pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
683
684 res = wait_event_interruptible(dev->done.wait,
685 dev->done.done || kthread_should_stop());
686 if (kthread_should_stop())
687 res = -EINTR;
688 if (res) {
689 pr_debug("%s:%u: interrupted %s\n", __func__, __LINE__, op);
690 return res;
691 }
692
693 if (dev->lv1_status) {
694 pr_err("%s:%u: %s not completed, status 0x%lx\n", __func__,
695 __LINE__, op, dev->lv1_status);
696 return -EIO;
697 }
698 pr_debug("%s:%u: notification %s completed\n", __func__, __LINE__, op);
699
700 return 0;
701}
702
703static struct task_struct *probe_task;
704
662/** 705/**
663 * ps3_probe_thread - Background repository probing at system startup. 706 * ps3_probe_thread - Background repository probing at system startup.
664 * 707 *
665 * This implementation only supports background probing on a single bus. 708 * This implementation only supports background probing on a single bus.
709 * It uses the hypervisor's storage device notification mechanism to wait until
710 * a storage device is ready. The device notification mechanism uses a
711 * pseudo device to asynchronously notify the guest when storage devices become
712 * ready. The notification device has a block size of 512 bytes.
666 */ 713 */
667 714
668static int ps3_probe_thread(void *data) 715static int ps3_probe_thread(void *data)
669{ 716{
670 struct ps3_repository_device *repo = data; 717 struct ps3_notification_device dev;
671 int result; 718 int res;
672 unsigned int ms = 250; 719 unsigned int irq;
720 u64 lpar;
721 void *buf;
722 struct ps3_notify_cmd *notify_cmd;
723 struct ps3_notify_event *notify_event;
673 724
674 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__); 725 pr_debug(" -> %s:%u: kthread started\n", __func__, __LINE__);
675 726
727 buf = kzalloc(512, GFP_KERNEL);
728 if (!buf)
729 return -ENOMEM;
730
731 lpar = ps3_mm_phys_to_lpar(__pa(buf));
732 notify_cmd = buf;
733 notify_event = buf;
734
735 /* dummy system bus device */
736 dev.sbd.bus_id = (u64)data;
737 dev.sbd.dev_id = PS3_NOTIFICATION_DEV_ID;
738 dev.sbd.interrupt_id = PS3_NOTIFICATION_INTERRUPT_ID;
739
740 res = lv1_open_device(dev.sbd.bus_id, dev.sbd.dev_id, 0);
741 if (res) {
742 pr_err("%s:%u: lv1_open_device failed %s\n", __func__,
743 __LINE__, ps3_result(res));
744 goto fail_free;
745 }
746
747 res = ps3_sb_event_receive_port_setup(&dev.sbd, PS3_BINDING_CPU_ANY,
748 &irq);
749 if (res) {
750 pr_err("%s:%u: ps3_sb_event_receive_port_setup failed %d\n",
751 __func__, __LINE__, res);
752 goto fail_close_device;
753 }
754
755 spin_lock_init(&dev.lock);
756
757 res = request_irq(irq, ps3_notification_interrupt, IRQF_DISABLED,
758 "ps3_notification", &dev);
759 if (res) {
760 pr_err("%s:%u: request_irq failed %d\n", __func__, __LINE__,
761 res);
762 goto fail_sb_event_receive_port_destroy;
763 }
764
765 /* Setup and write the request for device notification. */
766 notify_cmd->operation_code = 0; /* must be zero */
767 notify_cmd->event_mask = 1UL << notify_region_probe;
768
769 res = ps3_notification_read_write(&dev, lpar, 1);
770 if (res)
771 goto fail_free_irq;
772
773 /* Loop here processing the requested notification events. */
676 do { 774 do {
677 try_to_freeze(); 775 try_to_freeze();
678 776
679 pr_debug("%s:%u: probing...\n", __func__, __LINE__); 777 memset(notify_event, 0, sizeof(*notify_event));
680 778
681 do { 779 res = ps3_notification_read_write(&dev, lpar, 0);
682 result = ps3_repository_find_device(repo); 780 if (res)
683
684 if (result == -ENODEV)
685 pr_debug("%s:%u: nothing new\n", __func__,
686 __LINE__);
687 else if (result)
688 pr_debug("%s:%u: find device error.\n",
689 __func__, __LINE__);
690 else {
691 pr_debug("%s:%u: found device (%u:%u:%u)\n",
692 __func__, __LINE__, repo->bus_index,
693 repo->dev_index, repo->dev_type);
694 ps3_register_repository_device(repo);
695 ps3_repository_bump_device(repo);
696 ms = 250;
697 }
698 } while (!result);
699
700 pr_debug("%s:%u: ms %u\n", __func__, __LINE__, ms);
701
702 if ( ms > 60000)
703 break; 781 break;
704 782
705 msleep_interruptible(ms); 783 pr_debug("%s:%u: notify event type 0x%lx bus id %lu dev id %lu"
784 " type %lu port %lu\n", __func__, __LINE__,
785 notify_event->event_type, notify_event->bus_id,
786 notify_event->dev_id, notify_event->dev_type,
787 notify_event->dev_port);
706 788
707 /* An exponential backoff. */ 789 if (notify_event->event_type != notify_region_probe ||
708 ms <<= 1; 790 notify_event->bus_id != dev.sbd.bus_id) {
791 pr_warning("%s:%u: bad notify_event: event %lu, "
792 "dev_id %lu, dev_type %lu\n",
793 __func__, __LINE__, notify_event->event_type,
794 notify_event->dev_id,
795 notify_event->dev_type);
796 continue;
797 }
798
799 ps3_find_and_add_device(dev.sbd.bus_id, notify_event->dev_id);
709 800
710 } while (!kthread_should_stop()); 801 } while (!kthread_should_stop());
711 802
803fail_free_irq:
804 free_irq(irq, &dev);
805fail_sb_event_receive_port_destroy:
806 ps3_sb_event_receive_port_destroy(&dev.sbd, irq);
807fail_close_device:
808 lv1_close_device(dev.sbd.bus_id, dev.sbd.dev_id);
809fail_free:
810 kfree(buf);
811
812 probe_task = NULL;
813
712 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__); 814 pr_debug(" <- %s:%u: kthread finished\n", __func__, __LINE__);
713 815
714 return 0; 816 return 0;
715} 817}
716 818
717/** 819/**
820 * ps3_stop_probe_thread - Stops the background probe thread.
821 *
822 */
823
824static int ps3_stop_probe_thread(struct notifier_block *nb, unsigned long code,
825 void *data)
826{
827 if (probe_task)
828 kthread_stop(probe_task);
829 return 0;
830}
831
832static struct notifier_block nb = {
833 .notifier_call = ps3_stop_probe_thread
834};
835
836/**
718 * ps3_start_probe_thread - Starts the background probe thread. 837 * ps3_start_probe_thread - Starts the background probe thread.
719 * 838 *
720 */ 839 */
@@ -723,7 +842,7 @@ static int __init ps3_start_probe_thread(enum ps3_bus_type bus_type)
723{ 842{
724 int result; 843 int result;
725 struct task_struct *task; 844 struct task_struct *task;
726 static struct ps3_repository_device repo; /* must be static */ 845 struct ps3_repository_device repo;
727 846
728 pr_debug(" -> %s:%d\n", __func__, __LINE__); 847 pr_debug(" -> %s:%d\n", __func__, __LINE__);
729 848
@@ -746,7 +865,8 @@ static int __init ps3_start_probe_thread(enum ps3_bus_type bus_type)
746 return -ENODEV; 865 return -ENODEV;
747 } 866 }
748 867
749 task = kthread_run(ps3_probe_thread, &repo, "ps3-probe-%u", bus_type); 868 task = kthread_run(ps3_probe_thread, (void *)repo.bus_id,
869 "ps3-probe-%u", bus_type);
750 870
751 if (IS_ERR(task)) { 871 if (IS_ERR(task)) {
752 result = PTR_ERR(task); 872 result = PTR_ERR(task);
@@ -755,6 +875,9 @@ static int __init ps3_start_probe_thread(enum ps3_bus_type bus_type)
755 return result; 875 return result;
756 } 876 }
757 877
878 probe_task = task;
879 register_reboot_notifier(&nb);
880
758 pr_debug(" <- %s:%d\n", __func__, __LINE__); 881 pr_debug(" <- %s:%d\n", __func__, __LINE__);
759 return 0; 882 return 0;
760} 883}
@@ -787,6 +910,8 @@ static int __init ps3_register_devices(void)
787 910
788 ps3_register_sound_devices(); 911 ps3_register_sound_devices();
789 912
913 ps3_register_lpm_devices();
914
790 pr_debug(" <- %s:%d\n", __func__, __LINE__); 915 pr_debug(" <- %s:%d\n", __func__, __LINE__);
791 return 0; 916 return 0;
792} 917}
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 7bb3e1620974..68900476c842 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -36,11 +36,6 @@
36#endif 36#endif
37 37
38enum { 38enum {
39#if defined(CONFIG_PS3_USE_LPAR_ADDR)
40 USE_LPAR_ADDR = 1,
41#else
42 USE_LPAR_ADDR = 0,
43#endif
44#if defined(CONFIG_PS3_DYNAMIC_DMA) 39#if defined(CONFIG_PS3_DYNAMIC_DMA)
45 USE_DYNAMIC_DMA = 1, 40 USE_DYNAMIC_DMA = 1,
46#else 41#else
@@ -137,11 +132,8 @@ static struct map map;
137unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr) 132unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr)
138{ 133{
139 BUG_ON(is_kernel_addr(phys_addr)); 134 BUG_ON(is_kernel_addr(phys_addr));
140 if (USE_LPAR_ADDR) 135 return (phys_addr < map.rm.size || phys_addr >= map.total)
141 return phys_addr; 136 ? phys_addr : phys_addr + map.r1.offset;
142 else
143 return (phys_addr < map.rm.size || phys_addr >= map.total)
144 ? phys_addr : phys_addr + map.r1.offset;
145} 137}
146 138
147EXPORT_SYMBOL(ps3_mm_phys_to_lpar); 139EXPORT_SYMBOL(ps3_mm_phys_to_lpar);
@@ -309,7 +301,7 @@ static int __init ps3_mm_add_memory(void)
309 301
310 BUG_ON(!mem_init_done); 302 BUG_ON(!mem_init_done);
311 303
312 start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; 304 start_addr = map.rm.size;
313 start_pfn = start_addr >> PAGE_SHIFT; 305 start_pfn = start_addr >> PAGE_SHIFT;
314 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT; 306 nr_pages = (map.r1.size + PAGE_SIZE - 1) >> PAGE_SHIFT;
315 307
@@ -359,7 +351,7 @@ static unsigned long dma_sb_lpar_to_bus(struct ps3_dma_region *r,
359static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r, 351static void __maybe_unused _dma_dump_region(const struct ps3_dma_region *r,
360 const char *func, int line) 352 const char *func, int line)
361{ 353{
362 DBG("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id, 354 DBG("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
363 r->dev->dev_id); 355 r->dev->dev_id);
364 DBG("%s:%d: page_size %u\n", func, line, r->page_size); 356 DBG("%s:%d: page_size %u\n", func, line, r->page_size);
365 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 357 DBG("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
@@ -394,7 +386,7 @@ struct dma_chunk {
394static void _dma_dump_chunk (const struct dma_chunk* c, const char* func, 386static void _dma_dump_chunk (const struct dma_chunk* c, const char* func,
395 int line) 387 int line)
396{ 388{
397 DBG("%s:%d: r.dev %u:%u\n", func, line, 389 DBG("%s:%d: r.dev %lu:%lu\n", func, line,
398 c->region->dev->bus_id, c->region->dev->dev_id); 390 c->region->dev->bus_id, c->region->dev->dev_id);
399 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr); 391 DBG("%s:%d: r.bus_addr %lxh\n", func, line, c->region->bus_addr);
400 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size); 392 DBG("%s:%d: r.page_size %u\n", func, line, c->region->page_size);
@@ -658,7 +650,7 @@ static int dma_sb_region_create(struct ps3_dma_region *r)
658 BUG_ON(!r); 650 BUG_ON(!r);
659 651
660 if (!r->dev->bus_id) { 652 if (!r->dev->bus_id) {
661 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__, 653 pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
662 r->dev->bus_id, r->dev->dev_id); 654 r->dev->bus_id, r->dev->dev_id);
663 return 0; 655 return 0;
664 } 656 }
@@ -724,7 +716,7 @@ static int dma_sb_region_free(struct ps3_dma_region *r)
724 BUG_ON(!r); 716 BUG_ON(!r);
725 717
726 if (!r->dev->bus_id) { 718 if (!r->dev->bus_id) {
727 pr_info("%s:%d: %u:%u no dma\n", __func__, __LINE__, 719 pr_info("%s:%d: %lu:%lu no dma\n", __func__, __LINE__,
728 r->dev->bus_id, r->dev->dev_id); 720 r->dev->bus_id, r->dev->dev_id);
729 return 0; 721 return 0;
730 } 722 }
@@ -1007,7 +999,7 @@ static int dma_sb_region_create_linear(struct ps3_dma_region *r)
1007 999
1008 if (r->offset + r->len > map.rm.size) { 1000 if (r->offset + r->len > map.rm.size) {
1009 /* Map (part of) 2nd RAM chunk */ 1001 /* Map (part of) 2nd RAM chunk */
1010 virt_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size; 1002 virt_addr = map.rm.size;
1011 len = r->len; 1003 len = r->len;
1012 if (r->offset >= map.rm.size) 1004 if (r->offset >= map.rm.size)
1013 virt_addr += r->offset - map.rm.size; 1005 virt_addr += r->offset - map.rm.size;
diff --git a/arch/powerpc/platforms/ps3/platform.h b/arch/powerpc/platforms/ps3/platform.h
index 01f0c9506e11..235c13ebacd9 100644
--- a/arch/powerpc/platforms/ps3/platform.h
+++ b/arch/powerpc/platforms/ps3/platform.h
@@ -89,13 +89,11 @@ enum ps3_dev_type {
89 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */ 89 PS3_DEV_TYPE_STOR_ROM = TYPE_ROM, /* 5 */
90 PS3_DEV_TYPE_SB_GPIO = 6, 90 PS3_DEV_TYPE_SB_GPIO = 6,
91 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */ 91 PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC, /* 14 */
92 PS3_DEV_TYPE_STOR_DUMMY = 32,
93 PS3_DEV_TYPE_NOACCESS = 255,
94}; 92};
95 93
96int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str, 94int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
97 u64 *value); 95 u64 *value);
98int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id); 96int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id);
99int ps3_repository_read_bus_type(unsigned int bus_index, 97int ps3_repository_read_bus_type(unsigned int bus_index,
100 enum ps3_bus_type *bus_type); 98 enum ps3_bus_type *bus_type);
101int ps3_repository_read_bus_num_dev(unsigned int bus_index, 99int ps3_repository_read_bus_num_dev(unsigned int bus_index,
@@ -119,7 +117,7 @@ enum ps3_reg_type {
119int ps3_repository_read_dev_str(unsigned int bus_index, 117int ps3_repository_read_dev_str(unsigned int bus_index,
120 unsigned int dev_index, const char *dev_str, u64 *value); 118 unsigned int dev_index, const char *dev_str, u64 *value);
121int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index, 119int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
122 unsigned int *dev_id); 120 u64 *dev_id);
123int ps3_repository_read_dev_type(unsigned int bus_index, 121int ps3_repository_read_dev_type(unsigned int bus_index,
124 unsigned int dev_index, enum ps3_dev_type *dev_type); 122 unsigned int dev_index, enum ps3_dev_type *dev_type);
125int ps3_repository_read_dev_intr(unsigned int bus_index, 123int ps3_repository_read_dev_intr(unsigned int bus_index,
@@ -138,21 +136,17 @@ int ps3_repository_read_dev_reg(unsigned int bus_index,
138/* repository bus enumerators */ 136/* repository bus enumerators */
139 137
140struct ps3_repository_device { 138struct ps3_repository_device {
141 enum ps3_bus_type bus_type;
142 unsigned int bus_index; 139 unsigned int bus_index;
143 unsigned int bus_id;
144 enum ps3_dev_type dev_type;
145 unsigned int dev_index; 140 unsigned int dev_index;
146 unsigned int dev_id; 141 enum ps3_bus_type bus_type;
142 enum ps3_dev_type dev_type;
143 u64 bus_id;
144 u64 dev_id;
147}; 145};
148 146
149static inline struct ps3_repository_device *ps3_repository_bump_device(
150 struct ps3_repository_device *repo)
151{
152 repo->dev_index++;
153 return repo;
154}
155int ps3_repository_find_device(struct ps3_repository_device *repo); 147int ps3_repository_find_device(struct ps3_repository_device *repo);
148int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
149 u64 bus_id, u64 dev_id);
156int ps3_repository_find_devices(enum ps3_bus_type bus_type, 150int ps3_repository_find_devices(enum ps3_bus_type bus_type,
157 int (*callback)(const struct ps3_repository_device *repo)); 151 int (*callback)(const struct ps3_repository_device *repo));
158int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from, 152int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
@@ -186,10 +180,10 @@ int ps3_repository_read_stor_dev_region(unsigned int bus_index,
186 unsigned int dev_index, unsigned int region_index, 180 unsigned int dev_index, unsigned int region_index,
187 unsigned int *region_id, u64 *region_start, u64 *region_size); 181 unsigned int *region_id, u64 *region_start, u64 *region_size);
188 182
189/* repository pu and memory info */ 183/* repository logical pu and memory info */
190 184
191int ps3_repository_read_num_pu(unsigned int *num_pu); 185int ps3_repository_read_num_pu(u64 *num_pu);
192int ps3_repository_read_ppe_id(unsigned int *pu_index, unsigned int *ppe_id); 186int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id);
193int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base); 187int ps3_repository_read_rm_base(unsigned int ppe_id, u64 *rm_base);
194int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size); 188int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size);
195int ps3_repository_read_region_total(u64 *region_total); 189int ps3_repository_read_region_total(u64 *region_total);
@@ -200,9 +194,15 @@ int ps3_repository_read_mm_info(u64 *rm_base, u64 *rm_size,
200 194
201int ps3_repository_read_num_be(unsigned int *num_be); 195int ps3_repository_read_num_be(unsigned int *num_be);
202int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id); 196int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id);
197int ps3_repository_read_be_id(u64 node_id, u64 *be_id);
203int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq); 198int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq);
204int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq); 199int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq);
205 200
201/* repository performance monitor info */
202
203int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
204 u64 *rights);
205
206/* repository 'Other OS' area */ 206/* repository 'Other OS' area */
207 207
208int ps3_repository_read_boot_dat_addr(u64 *lpar_addr); 208int ps3_repository_read_boot_dat_addr(u64 *lpar_addr);
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 1c94824f7b63..22063adeb38b 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -33,7 +33,7 @@ enum ps3_lpar_id {
33}; 33};
34 34
35#define dump_field(_a, _b) _dump_field(_a, _b, __func__, __LINE__) 35#define dump_field(_a, _b) _dump_field(_a, _b, __func__, __LINE__)
36static void _dump_field(const char *hdr, u64 n, const char* func, int line) 36static void _dump_field(const char *hdr, u64 n, const char *func, int line)
37{ 37{
38#if defined(DEBUG) 38#if defined(DEBUG)
39 char s[16]; 39 char s[16];
@@ -50,8 +50,8 @@ static void _dump_field(const char *hdr, u64 n, const char* func, int line)
50 50
51#define dump_node_name(_a, _b, _c, _d, _e) \ 51#define dump_node_name(_a, _b, _c, _d, _e) \
52 _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__) 52 _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__)
53static void _dump_node_name (unsigned int lpar_id, u64 n1, u64 n2, u64 n3, 53static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
54 u64 n4, const char* func, int line) 54 u64 n4, const char *func, int line)
55{ 55{
56 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); 56 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
57 _dump_field("n1: ", n1, func, line); 57 _dump_field("n1: ", n1, func, line);
@@ -63,7 +63,7 @@ static void _dump_node_name (unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
63#define dump_node(_a, _b, _c, _d, _e, _f, _g) \ 63#define dump_node(_a, _b, _c, _d, _e, _f, _g) \
64 _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__) 64 _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
65static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, 65static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
66 u64 v1, u64 v2, const char* func, int line) 66 u64 v1, u64 v2, const char *func, int line)
67{ 67{
68 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); 68 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id);
69 _dump_field("n1: ", n1, func, line); 69 _dump_field("n1: ", n1, func, line);
@@ -165,21 +165,18 @@ int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
165 make_first_field("bus", bus_index), 165 make_first_field("bus", bus_index),
166 make_field(bus_str, 0), 166 make_field(bus_str, 0),
167 0, 0, 167 0, 0,
168 value, 0); 168 value, NULL);
169} 169}
170 170
171int ps3_repository_read_bus_id(unsigned int bus_index, unsigned int *bus_id) 171int ps3_repository_read_bus_id(unsigned int bus_index, u64 *bus_id)
172{ 172{
173 int result; 173 int result;
174 u64 v1;
175 u64 v2; /* unused */
176 174
177 result = read_node(PS3_LPAR_ID_PME, 175 result = read_node(PS3_LPAR_ID_PME,
178 make_first_field("bus", bus_index), 176 make_first_field("bus", bus_index),
179 make_field("id", 0), 177 make_field("id", 0),
180 0, 0, 178 0, 0,
181 &v1, &v2); 179 bus_id, NULL);
182 *bus_id = v1;
183 return result; 180 return result;
184} 181}
185 182
@@ -193,7 +190,7 @@ int ps3_repository_read_bus_type(unsigned int bus_index,
193 make_first_field("bus", bus_index), 190 make_first_field("bus", bus_index),
194 make_field("type", 0), 191 make_field("type", 0),
195 0, 0, 192 0, 0,
196 &v1, 0); 193 &v1, NULL);
197 *bus_type = v1; 194 *bus_type = v1;
198 return result; 195 return result;
199} 196}
@@ -208,7 +205,7 @@ int ps3_repository_read_bus_num_dev(unsigned int bus_index,
208 make_first_field("bus", bus_index), 205 make_first_field("bus", bus_index),
209 make_field("num_dev", 0), 206 make_field("num_dev", 0),
210 0, 0, 207 0, 0,
211 &v1, 0); 208 &v1, NULL);
212 *num_dev = v1; 209 *num_dev = v1;
213 return result; 210 return result;
214} 211}
@@ -221,22 +218,20 @@ int ps3_repository_read_dev_str(unsigned int bus_index,
221 make_field("dev", dev_index), 218 make_field("dev", dev_index),
222 make_field(dev_str, 0), 219 make_field(dev_str, 0),
223 0, 220 0,
224 value, 0); 221 value, NULL);
225} 222}
226 223
227int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index, 224int ps3_repository_read_dev_id(unsigned int bus_index, unsigned int dev_index,
228 unsigned int *dev_id) 225 u64 *dev_id)
229{ 226{
230 int result; 227 int result;
231 u64 v1;
232 228
233 result = read_node(PS3_LPAR_ID_PME, 229 result = read_node(PS3_LPAR_ID_PME,
234 make_first_field("bus", bus_index), 230 make_first_field("bus", bus_index),
235 make_field("dev", dev_index), 231 make_field("dev", dev_index),
236 make_field("id", 0), 232 make_field("id", 0),
237 0, 233 0,
238 &v1, 0); 234 dev_id, NULL);
239 *dev_id = v1;
240 return result; 235 return result;
241} 236}
242 237
@@ -251,14 +246,14 @@ int ps3_repository_read_dev_type(unsigned int bus_index,
251 make_field("dev", dev_index), 246 make_field("dev", dev_index),
252 make_field("type", 0), 247 make_field("type", 0),
253 0, 248 0,
254 &v1, 0); 249 &v1, NULL);
255 *dev_type = v1; 250 *dev_type = v1;
256 return result; 251 return result;
257} 252}
258 253
259int ps3_repository_read_dev_intr(unsigned int bus_index, 254int ps3_repository_read_dev_intr(unsigned int bus_index,
260 unsigned int dev_index, unsigned int intr_index, 255 unsigned int dev_index, unsigned int intr_index,
261 enum ps3_interrupt_type *intr_type, unsigned int* interrupt_id) 256 enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id)
262{ 257{
263 int result; 258 int result;
264 u64 v1; 259 u64 v1;
@@ -287,7 +282,7 @@ int ps3_repository_read_dev_reg_type(unsigned int bus_index,
287 make_field("dev", dev_index), 282 make_field("dev", dev_index),
288 make_field("reg", reg_index), 283 make_field("reg", reg_index),
289 make_field("type", 0), 284 make_field("type", 0),
290 &v1, 0); 285 &v1, NULL);
291 *reg_type = v1; 286 *reg_type = v1;
292 return result; 287 return result;
293} 288}
@@ -332,7 +327,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
332 return result; 327 return result;
333 } 328 }
334 329
335 pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %u, num_dev %u\n", 330 pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %lu, num_dev %u\n",
336 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, 331 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
337 num_dev); 332 num_dev);
338 333
@@ -349,47 +344,95 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
349 return result; 344 return result;
350 } 345 }
351 346
352 if (tmp.bus_type == PS3_BUS_TYPE_STORAGE) { 347 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index,
353 /* 348 &tmp.dev_id);
354 * A storage device may show up in the repository before the
355 * hypervisor has finished probing its type and regions
356 */
357 unsigned int num_regions;
358
359 if (tmp.dev_type == PS3_DEV_TYPE_STOR_DUMMY) {
360 pr_debug("%s:%u storage device not ready\n", __func__,
361 __LINE__);
362 return -ENODEV;
363 }
364 349
365 result = ps3_repository_read_stor_dev_num_regions(tmp.bus_index, 350 if (result) {
366 tmp.dev_index, 351 pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__,
367 &num_regions); 352 __LINE__);
353 return result;
354 }
355
356 pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %lu\n",
357 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
358
359 *repo = tmp;
360 return 0;
361}
362
363int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
364 u64 bus_id, u64 dev_id)
365{
366 int result = -ENODEV;
367 struct ps3_repository_device tmp;
368 unsigned int num_dev;
369
370 pr_debug(" -> %s:%u: find device by id %lu:%lu\n", __func__, __LINE__,
371 bus_id, dev_id);
372
373 for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) {
374 result = ps3_repository_read_bus_id(tmp.bus_index,
375 &tmp.bus_id);
368 if (result) { 376 if (result) {
369 pr_debug("%s:%d read_stor_dev_num_regions failed\n", 377 pr_debug("%s:%u read_bus_id(%u) failed\n", __func__,
370 __func__, __LINE__); 378 __LINE__, tmp.bus_index);
371 return result; 379 return result;
372 } 380 }
373 381
374 if (!num_regions) { 382 if (tmp.bus_id == bus_id)
375 pr_debug("%s:%u storage device has no regions yet\n", 383 goto found_bus;
376 __func__, __LINE__); 384
377 return -ENODEV; 385 pr_debug("%s:%u: skip, bus_id %lu\n", __func__, __LINE__,
378 } 386 tmp.bus_id);
379 } 387 }
388 pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
389 return result;
380 390
381 result = ps3_repository_read_dev_id(tmp.bus_index, tmp.dev_index, 391found_bus:
382 &tmp.dev_id); 392 result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type);
393 if (result) {
394 pr_debug("%s:%u read_bus_type(%u) failed\n", __func__,
395 __LINE__, tmp.bus_index);
396 return result;
397 }
383 398
399 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
384 if (result) { 400 if (result) {
385 pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__, 401 pr_debug("%s:%u read_bus_num_dev failed\n", __func__,
386 __LINE__); 402 __LINE__);
387 return result; 403 return result;
388 } 404 }
389 405
390 pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %u\n", 406 for (tmp.dev_index = 0; tmp.dev_index < num_dev; tmp.dev_index++) {
391 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); 407 result = ps3_repository_read_dev_id(tmp.bus_index,
408 tmp.dev_index,
409 &tmp.dev_id);
410 if (result) {
411 pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__,
412 __LINE__, tmp.bus_index, tmp.dev_index);
413 return result;
414 }
392 415
416 if (tmp.dev_id == dev_id)
417 goto found_dev;
418
419 pr_debug("%s:%u: skip, dev_id %lu\n", __func__, __LINE__,
420 tmp.dev_id);
421 }
422 pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__);
423 return result;
424
425found_dev:
426 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
427 &tmp.dev_type);
428 if (result) {
429 pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__);
430 return result;
431 }
432
433 pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%lu:%lu)\n",
434 __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index,
435 tmp.dev_index, tmp.bus_id, tmp.dev_id);
393 *repo = tmp; 436 *repo = tmp;
394 return 0; 437 return 0;
395} 438}
@@ -402,50 +445,34 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,
402 445
403 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type); 446 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
404 447
405 for (repo.bus_index = 0; repo.bus_index < 10; repo.bus_index++) { 448 repo.bus_type = bus_type;
449 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
450 if (result) {
451 pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__);
452 return result;
453 }
406 454
407 result = ps3_repository_read_bus_type(repo.bus_index, 455 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
408 &repo.bus_type); 456 if (result) {
457 pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
458 repo.bus_index);
459 return result;
460 }
409 461
410 if (result) { 462 for (repo.dev_index = 0; ; repo.dev_index++) {
411 pr_debug("%s:%d read_bus_type(%u) failed\n", 463 result = ps3_repository_find_device(&repo);
412 __func__, __LINE__, repo.bus_index); 464 if (result == -ENODEV) {
465 result = 0;
466 break;
467 } else if (result)
413 break; 468 break;
414 }
415
416 if (repo.bus_type != bus_type) {
417 pr_debug("%s:%d: skip, bus_type %u\n", __func__,
418 __LINE__, repo.bus_type);
419 continue;
420 }
421
422 result = ps3_repository_read_bus_id(repo.bus_index,
423 &repo.bus_id);
424 469
470 result = callback(&repo);
425 if (result) { 471 if (result) {
426 pr_debug("%s:%d read_bus_id(%u) failed\n", 472 pr_debug("%s:%d: abort at callback\n", __func__,
427 __func__, __LINE__, repo.bus_index); 473 __LINE__);
428 continue; 474 break;
429 }
430
431 for (repo.dev_index = 0; ; repo.dev_index++) {
432 result = ps3_repository_find_device(&repo);
433
434 if (result == -ENODEV) {
435 result = 0;
436 break;
437 } else if (result)
438 break;
439
440 result = callback(&repo);
441
442 if (result) {
443 pr_debug("%s:%d: abort at callback\n", __func__,
444 __LINE__);
445 break;
446 }
447 } 475 }
448 break;
449 } 476 }
450 477
451 pr_debug(" <- %s:%d\n", __func__, __LINE__); 478 pr_debug(" <- %s:%d\n", __func__, __LINE__);
@@ -561,7 +588,7 @@ int ps3_repository_read_stor_dev_port(unsigned int bus_index,
561 make_first_field("bus", bus_index), 588 make_first_field("bus", bus_index),
562 make_field("dev", dev_index), 589 make_field("dev", dev_index),
563 make_field("port", 0), 590 make_field("port", 0),
564 0, port, 0); 591 0, port, NULL);
565} 592}
566 593
567int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index, 594int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
@@ -571,7 +598,7 @@ int ps3_repository_read_stor_dev_blk_size(unsigned int bus_index,
571 make_first_field("bus", bus_index), 598 make_first_field("bus", bus_index),
572 make_field("dev", dev_index), 599 make_field("dev", dev_index),
573 make_field("blk_size", 0), 600 make_field("blk_size", 0),
574 0, blk_size, 0); 601 0, blk_size, NULL);
575} 602}
576 603
577int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index, 604int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
@@ -581,7 +608,7 @@ int ps3_repository_read_stor_dev_num_blocks(unsigned int bus_index,
581 make_first_field("bus", bus_index), 608 make_first_field("bus", bus_index),
582 make_field("dev", dev_index), 609 make_field("dev", dev_index),
583 make_field("n_blocks", 0), 610 make_field("n_blocks", 0),
584 0, num_blocks, 0); 611 0, num_blocks, NULL);
585} 612}
586 613
587int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index, 614int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
@@ -594,7 +621,7 @@ int ps3_repository_read_stor_dev_num_regions(unsigned int bus_index,
594 make_first_field("bus", bus_index), 621 make_first_field("bus", bus_index),
595 make_field("dev", dev_index), 622 make_field("dev", dev_index),
596 make_field("n_regs", 0), 623 make_field("n_regs", 0),
597 0, &v1, 0); 624 0, &v1, NULL);
598 *num_regions = v1; 625 *num_regions = v1;
599 return result; 626 return result;
600} 627}
@@ -611,7 +638,7 @@ int ps3_repository_read_stor_dev_region_id(unsigned int bus_index,
611 make_field("dev", dev_index), 638 make_field("dev", dev_index),
612 make_field("region", region_index), 639 make_field("region", region_index),
613 make_field("id", 0), 640 make_field("id", 0),
614 &v1, 0); 641 &v1, NULL);
615 *region_id = v1; 642 *region_id = v1;
616 return result; 643 return result;
617} 644}
@@ -624,7 +651,7 @@ int ps3_repository_read_stor_dev_region_size(unsigned int bus_index,
624 make_field("dev", dev_index), 651 make_field("dev", dev_index),
625 make_field("region", region_index), 652 make_field("region", region_index),
626 make_field("size", 0), 653 make_field("size", 0),
627 region_size, 0); 654 region_size, NULL);
628} 655}
629 656
630int ps3_repository_read_stor_dev_region_start(unsigned int bus_index, 657int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
@@ -635,7 +662,7 @@ int ps3_repository_read_stor_dev_region_start(unsigned int bus_index,
635 make_field("dev", dev_index), 662 make_field("dev", dev_index),
636 make_field("region", region_index), 663 make_field("region", region_index),
637 make_field("start", 0), 664 make_field("start", 0),
638 region_start, 0); 665 region_start, NULL);
639} 666}
640 667
641int ps3_repository_read_stor_dev_info(unsigned int bus_index, 668int ps3_repository_read_stor_dev_info(unsigned int bus_index,
@@ -684,6 +711,35 @@ int ps3_repository_read_stor_dev_region(unsigned int bus_index,
684 return result; 711 return result;
685} 712}
686 713
714/**
715 * ps3_repository_read_num_pu - Number of logical PU processors for this lpar.
716 */
717
718int ps3_repository_read_num_pu(u64 *num_pu)
719{
720 *num_pu = 0;
721 return read_node(PS3_LPAR_ID_CURRENT,
722 make_first_field("bi", 0),
723 make_field("pun", 0),
724 0, 0,
725 num_pu, NULL);
726}
727
728/**
729 * ps3_repository_read_pu_id - Read the logical PU id.
730 * @pu_index: Zero based index.
731 * @pu_id: The logical PU id.
732 */
733
734int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id)
735{
736 return read_node(PS3_LPAR_ID_CURRENT,
737 make_first_field("bi", 0),
738 make_field("pu", pu_index),
739 0, 0,
740 pu_id, NULL);
741}
742
687int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size) 743int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
688{ 744{
689 return read_node(PS3_LPAR_ID_CURRENT, 745 return read_node(PS3_LPAR_ID_CURRENT,
@@ -691,7 +747,7 @@ int ps3_repository_read_rm_size(unsigned int ppe_id, u64 *rm_size)
691 make_field("pu", 0), 747 make_field("pu", 0),
692 ppe_id, 748 ppe_id,
693 make_field("rm_size", 0), 749 make_field("rm_size", 0),
694 rm_size, 0); 750 rm_size, NULL);
695} 751}
696 752
697int ps3_repository_read_region_total(u64 *region_total) 753int ps3_repository_read_region_total(u64 *region_total)
@@ -700,7 +756,7 @@ int ps3_repository_read_region_total(u64 *region_total)
700 make_first_field("bi", 0), 756 make_first_field("bi", 0),
701 make_field("rgntotal", 0), 757 make_field("rgntotal", 0),
702 0, 0, 758 0, 0,
703 region_total, 0); 759 region_total, NULL);
704} 760}
705 761
706/** 762/**
@@ -736,7 +792,7 @@ int ps3_repository_read_num_spu_reserved(unsigned int *num_spu_reserved)
736 make_first_field("bi", 0), 792 make_first_field("bi", 0),
737 make_field("spun", 0), 793 make_field("spun", 0),
738 0, 0, 794 0, 0,
739 &v1, 0); 795 &v1, NULL);
740 *num_spu_reserved = v1; 796 *num_spu_reserved = v1;
741 return result; 797 return result;
742} 798}
@@ -755,7 +811,7 @@ int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id)
755 make_first_field("bi", 0), 811 make_first_field("bi", 0),
756 make_field("spursvn", 0), 812 make_field("spursvn", 0),
757 0, 0, 813 0, 0,
758 &v1, 0); 814 &v1, NULL);
759 *num_resource_id = v1; 815 *num_resource_id = v1;
760 return result; 816 return result;
761} 817}
@@ -768,7 +824,7 @@ int ps3_repository_read_num_spu_resource_id(unsigned int *num_resource_id)
768 */ 824 */
769 825
770int ps3_repository_read_spu_resource_id(unsigned int res_index, 826int ps3_repository_read_spu_resource_id(unsigned int res_index,
771 enum ps3_spu_resource_type* resource_type, unsigned int *resource_id) 827 enum ps3_spu_resource_type *resource_type, unsigned int *resource_id)
772{ 828{
773 int result; 829 int result;
774 u64 v1; 830 u64 v1;
@@ -785,14 +841,14 @@ int ps3_repository_read_spu_resource_id(unsigned int res_index,
785 return result; 841 return result;
786} 842}
787 843
788int ps3_repository_read_boot_dat_address(u64 *address) 844static int ps3_repository_read_boot_dat_address(u64 *address)
789{ 845{
790 return read_node(PS3_LPAR_ID_CURRENT, 846 return read_node(PS3_LPAR_ID_CURRENT,
791 make_first_field("bi", 0), 847 make_first_field("bi", 0),
792 make_field("boot_dat", 0), 848 make_field("boot_dat", 0),
793 make_field("address", 0), 849 make_field("address", 0),
794 0, 850 0,
795 address, 0); 851 address, NULL);
796} 852}
797 853
798int ps3_repository_read_boot_dat_size(unsigned int *size) 854int ps3_repository_read_boot_dat_size(unsigned int *size)
@@ -805,7 +861,7 @@ int ps3_repository_read_boot_dat_size(unsigned int *size)
805 make_field("boot_dat", 0), 861 make_field("boot_dat", 0),
806 make_field("size", 0), 862 make_field("size", 0),
807 0, 863 0,
808 &v1, 0); 864 &v1, NULL);
809 *size = v1; 865 *size = v1;
810 return result; 866 return result;
811} 867}
@@ -820,7 +876,7 @@ int ps3_repository_read_vuart_av_port(unsigned int *port)
820 make_field("vir_uart", 0), 876 make_field("vir_uart", 0),
821 make_field("port", 0), 877 make_field("port", 0),
822 make_field("avset", 0), 878 make_field("avset", 0),
823 &v1, 0); 879 &v1, NULL);
824 *port = v1; 880 *port = v1;
825 return result; 881 return result;
826} 882}
@@ -835,7 +891,7 @@ int ps3_repository_read_vuart_sysmgr_port(unsigned int *port)
835 make_field("vir_uart", 0), 891 make_field("vir_uart", 0),
836 make_field("port", 0), 892 make_field("port", 0),
837 make_field("sysmgr", 0), 893 make_field("sysmgr", 0),
838 &v1, 0); 894 &v1, NULL);
839 *port = v1; 895 *port = v1;
840 return result; 896 return result;
841} 897}
@@ -856,6 +912,10 @@ int ps3_repository_read_boot_dat_info(u64 *lpar_addr, unsigned int *size)
856 : ps3_repository_read_boot_dat_size(size); 912 : ps3_repository_read_boot_dat_size(size);
857} 913}
858 914
915/**
916 * ps3_repository_read_num_be - Number of physical BE processors in the system.
917 */
918
859int ps3_repository_read_num_be(unsigned int *num_be) 919int ps3_repository_read_num_be(unsigned int *num_be)
860{ 920{
861 int result; 921 int result;
@@ -866,11 +926,17 @@ int ps3_repository_read_num_be(unsigned int *num_be)
866 0, 926 0,
867 0, 927 0,
868 0, 928 0,
869 &v1, 0); 929 &v1, NULL);
870 *num_be = v1; 930 *num_be = v1;
871 return result; 931 return result;
872} 932}
873 933
934/**
935 * ps3_repository_read_be_node_id - Read the physical BE processor node id.
936 * @be_index: Zero based index.
937 * @node_id: The BE processor node id.
938 */
939
874int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id) 940int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id)
875{ 941{
876 return read_node(PS3_LPAR_ID_PME, 942 return read_node(PS3_LPAR_ID_PME,
@@ -878,7 +944,23 @@ int ps3_repository_read_be_node_id(unsigned int be_index, u64 *node_id)
878 0, 944 0,
879 0, 945 0,
880 0, 946 0,
881 node_id, 0); 947 node_id, NULL);
948}
949
950/**
951 * ps3_repository_read_be_id - Read the physical BE processor id.
952 * @node_id: The BE processor node id.
953 * @be_id: The BE processor id.
954 */
955
956int ps3_repository_read_be_id(u64 node_id, u64 *be_id)
957{
958 return read_node(PS3_LPAR_ID_PME,
959 make_first_field("be", 0),
960 node_id,
961 0,
962 0,
963 be_id, NULL);
882} 964}
883 965
884int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq) 966int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq)
@@ -888,7 +970,7 @@ int ps3_repository_read_tb_freq(u64 node_id, u64 *tb_freq)
888 node_id, 970 node_id,
889 make_field("clock", 0), 971 make_field("clock", 0),
890 0, 972 0,
891 tb_freq, 0); 973 tb_freq, NULL);
892} 974}
893 975
894int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq) 976int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
@@ -897,11 +979,29 @@ int ps3_repository_read_be_tb_freq(unsigned int be_index, u64 *tb_freq)
897 u64 node_id; 979 u64 node_id;
898 980
899 *tb_freq = 0; 981 *tb_freq = 0;
900 result = ps3_repository_read_be_node_id(0, &node_id); 982 result = ps3_repository_read_be_node_id(be_index, &node_id);
901 return result ? result 983 return result ? result
902 : ps3_repository_read_tb_freq(node_id, tb_freq); 984 : ps3_repository_read_tb_freq(node_id, tb_freq);
903} 985}
904 986
987int ps3_repository_read_lpm_privileges(unsigned int be_index, u64 *lpar,
988 u64 *rights)
989{
990 int result;
991 u64 node_id;
992
993 *lpar = 0;
994 *rights = 0;
995 result = ps3_repository_read_be_node_id(be_index, &node_id);
996 return result ? result
997 : read_node(PS3_LPAR_ID_PME,
998 make_first_field("be", 0),
999 node_id,
1000 make_field("lpm", 0),
1001 make_field("priv", 0),
1002 lpar, rights);
1003}
1004
905#if defined(DEBUG) 1005#if defined(DEBUG)
906 1006
907int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) 1007int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
@@ -1034,7 +1134,7 @@ static int dump_device_info(struct ps3_repository_device *repo,
1034 continue; 1134 continue;
1035 } 1135 }
1036 1136
1037 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %u\n", __func__, 1137 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__,
1038 __LINE__, repo->bus_index, repo->dev_index, 1138 __LINE__, repo->bus_index, repo->dev_index,
1039 repo->dev_type, repo->dev_id); 1139 repo->dev_type, repo->dev_id);
1040 1140
@@ -1091,7 +1191,7 @@ int ps3_repository_dump_bus_info(void)
1091 continue; 1191 continue;
1092 } 1192 }
1093 1193
1094 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %u, num_dev %u\n", 1194 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n",
1095 __func__, __LINE__, repo.bus_index, repo.bus_type, 1195 __func__, __LINE__, repo.bus_index, repo.bus_type,
1096 repo.bus_id, num_dev); 1196 repo.bus_id, num_dev);
1097 1197
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index d1630a074acf..5ad41189b494 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -28,6 +28,7 @@
28#include <asm/spu_priv1.h> 28#include <asm/spu_priv1.h>
29#include <asm/lv1call.h> 29#include <asm/lv1call.h>
30 30
31#include "../cell/spufs/spufs.h"
31#include "platform.h" 32#include "platform.h"
32 33
33/* spu_management_ops */ 34/* spu_management_ops */
@@ -419,10 +420,34 @@ static int ps3_init_affinity(void)
419 return 0; 420 return 0;
420} 421}
421 422
423/**
424 * ps3_enable_spu - Enable SPU run control.
425 *
426 * An outstanding enhancement for the PS3 would be to add a guard to check
427 * for incorrect access to the spu problem state when the spu context is
428 * disabled. This check could be implemented with a flag added to the spu
429 * context that would inhibit mapping problem state pages, and a routine
430 * to unmap spu problem state pages. When the spu is enabled with
431 * ps3_enable_spu() the flag would be set allowing pages to be mapped,
432 * and when the spu is disabled with ps3_disable_spu() the flag would be
433 * cleared and the mapped problem state pages would be unmapped.
434 */
435
436static void ps3_enable_spu(struct spu_context *ctx)
437{
438}
439
440static void ps3_disable_spu(struct spu_context *ctx)
441{
442 ctx->ops->runcntl_stop(ctx);
443}
444
422const struct spu_management_ops spu_management_ps3_ops = { 445const struct spu_management_ops spu_management_ps3_ops = {
423 .enumerate_spus = ps3_enumerate_spus, 446 .enumerate_spus = ps3_enumerate_spus,
424 .create_spu = ps3_create_spu, 447 .create_spu = ps3_create_spu,
425 .destroy_spu = ps3_destroy_spu, 448 .destroy_spu = ps3_destroy_spu,
449 .enable_spu = ps3_enable_spu,
450 .disable_spu = ps3_disable_spu,
426 .init_affinity = ps3_init_affinity, 451 .init_affinity = ps3_init_affinity,
427}; 452};
428 453
@@ -505,8 +530,6 @@ static void mfc_sr1_set(struct spu *spu, u64 sr1)
505 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK 530 static const u64 allowed = ~(MFC_STATE1_LOCAL_STORAGE_DECODE_MASK
506 | MFC_STATE1_PROBLEM_STATE_MASK); 531 | MFC_STATE1_PROBLEM_STATE_MASK);
507 532
508 sr1 |= MFC_STATE1_MASTER_RUN_CONTROL_MASK;
509
510 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed)); 533 BUG_ON((sr1 & allowed) != (spu_pdata(spu)->cache.sr1 & allowed));
511 534
512 spu_pdata(spu)->cache.sr1 = sr1; 535 spu_pdata(spu)->cache.sr1 = sr1;
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 6405f4a36763..43c493fca2d0 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -42,8 +42,8 @@ struct {
42 int gpu; 42 int gpu;
43} static usage_hack; 43} static usage_hack;
44 44
45static int ps3_is_device(struct ps3_system_bus_device *dev, 45static int ps3_is_device(struct ps3_system_bus_device *dev, u64 bus_id,
46 unsigned int bus_id, unsigned int dev_id) 46 u64 dev_id)
47{ 47{
48 return dev->bus_id == bus_id && dev->dev_id == dev_id; 48 return dev->bus_id == bus_id && dev->dev_id == dev_id;
49} 49}
@@ -182,8 +182,8 @@ int ps3_open_hv_device(struct ps3_system_bus_device *dev)
182 case PS3_MATCH_ID_SYSTEM_MANAGER: 182 case PS3_MATCH_ID_SYSTEM_MANAGER:
183 pr_debug("%s:%d: unsupported match_id: %u\n", __func__, 183 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
184 __LINE__, dev->match_id); 184 __LINE__, dev->match_id);
185 pr_debug("%s:%d: bus_id: %u\n", __func__, 185 pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
186 __LINE__, dev->bus_id); 186 dev->bus_id);
187 BUG(); 187 BUG();
188 return -EINVAL; 188 return -EINVAL;
189 189
@@ -220,8 +220,8 @@ int ps3_close_hv_device(struct ps3_system_bus_device *dev)
220 case PS3_MATCH_ID_SYSTEM_MANAGER: 220 case PS3_MATCH_ID_SYSTEM_MANAGER:
221 pr_debug("%s:%d: unsupported match_id: %u\n", __func__, 221 pr_debug("%s:%d: unsupported match_id: %u\n", __func__,
222 __LINE__, dev->match_id); 222 __LINE__, dev->match_id);
223 pr_debug("%s:%d: bus_id: %u\n", __func__, 223 pr_debug("%s:%d: bus_id: %lu\n", __func__, __LINE__,
224 __LINE__, dev->bus_id); 224 dev->bus_id);
225 BUG(); 225 BUG();
226 return -EINVAL; 226 return -EINVAL;
227 227
@@ -240,7 +240,7 @@ EXPORT_SYMBOL_GPL(ps3_close_hv_device);
240static void _dump_mmio_region(const struct ps3_mmio_region* r, 240static void _dump_mmio_region(const struct ps3_mmio_region* r,
241 const char* func, int line) 241 const char* func, int line)
242{ 242{
243 pr_debug("%s:%d: dev %u:%u\n", func, line, r->dev->bus_id, 243 pr_debug("%s:%d: dev %lu:%lu\n", func, line, r->dev->bus_id,
244 r->dev->dev_id); 244 r->dev->dev_id);
245 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr); 245 pr_debug("%s:%d: bus_addr %lxh\n", func, line, r->bus_addr);
246 pr_debug("%s:%d: len %lxh\n", func, line, r->len); 246 pr_debug("%s:%d: len %lxh\n", func, line, r->len);
@@ -715,6 +715,7 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
715 static unsigned int dev_ioc0_count; 715 static unsigned int dev_ioc0_count;
716 static unsigned int dev_sb_count; 716 static unsigned int dev_sb_count;
717 static unsigned int dev_vuart_count; 717 static unsigned int dev_vuart_count;
718 static unsigned int dev_lpm_count;
718 719
719 if (!dev->core.parent) 720 if (!dev->core.parent)
720 dev->core.parent = &ps3_system_bus; 721 dev->core.parent = &ps3_system_bus;
@@ -737,6 +738,10 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
737 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id), 738 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
738 "vuart_%02x", ++dev_vuart_count); 739 "vuart_%02x", ++dev_vuart_count);
739 break; 740 break;
741 case PS3_DEVICE_TYPE_LPM:
742 snprintf(dev->core.bus_id, sizeof(dev->core.bus_id),
743 "lpm_%02x", ++dev_lpm_count);
744 break;
740 default: 745 default:
741 BUG(); 746 BUG();
742 }; 747 };
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index fb3d636e088b..9eb539ee5f9a 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -29,6 +29,8 @@
29#include <linux/rbtree.h> 29#include <linux/rbtree.h>
30#include <linux/seq_file.h> 30#include <linux/seq_file.h>
31#include <linux/spinlock.h> 31#include <linux/spinlock.h>
32#include <linux/of.h>
33
32#include <asm/atomic.h> 34#include <asm/atomic.h>
33#include <asm/eeh.h> 35#include <asm/eeh.h>
34#include <asm/eeh_event.h> 36#include <asm/eeh_event.h>
@@ -169,7 +171,6 @@ static void rtas_slot_error_detail(struct pci_dn *pdn, int severity,
169 */ 171 */
170static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) 172static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
171{ 173{
172 struct device_node *dn;
173 struct pci_dev *dev = pdn->pcidev; 174 struct pci_dev *dev = pdn->pcidev;
174 u32 cfg; 175 u32 cfg;
175 int cap, i; 176 int cap, i;
@@ -243,12 +244,12 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
243 244
244 /* Gather status on devices under the bridge */ 245 /* Gather status on devices under the bridge */
245 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { 246 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
246 dn = pdn->node->child; 247 struct device_node *dn;
247 while (dn) { 248
249 for_each_child_of_node(pdn->node, dn) {
248 pdn = PCI_DN(dn); 250 pdn = PCI_DN(dn);
249 if (pdn) 251 if (pdn)
250 n += gather_pci_data(pdn, buf+n, len-n); 252 n += gather_pci_data(pdn, buf+n, len-n);
251 dn = dn->sibling;
252 } 253 }
253 } 254 }
254 255
@@ -372,7 +373,7 @@ struct device_node * find_device_pe(struct device_node *dn)
372 return dn; 373 return dn;
373} 374}
374 375
375/** Mark all devices that are peers of this device as failed. 376/** Mark all devices that are children of this device as failed.
376 * Mark the device driver too, so that it can see the failure 377 * Mark the device driver too, so that it can see the failure
377 * immediately; this is critical, since some drivers poll 378 * immediately; this is critical, since some drivers poll
378 * status registers in interrupts ... If a driver is polling, 379 * status registers in interrupts ... If a driver is polling,
@@ -380,9 +381,11 @@ struct device_node * find_device_pe(struct device_node *dn)
380 * an interrupt context, which is bad. 381 * an interrupt context, which is bad.
381 */ 382 */
382 383
383static void __eeh_mark_slot (struct device_node *dn, int mode_flag) 384static void __eeh_mark_slot(struct device_node *parent, int mode_flag)
384{ 385{
385 while (dn) { 386 struct device_node *dn;
387
388 for_each_child_of_node(parent, dn) {
386 if (PCI_DN(dn)) { 389 if (PCI_DN(dn)) {
387 /* Mark the pci device driver too */ 390 /* Mark the pci device driver too */
388 struct pci_dev *dev = PCI_DN(dn)->pcidev; 391 struct pci_dev *dev = PCI_DN(dn)->pcidev;
@@ -392,10 +395,8 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag)
392 if (dev && dev->driver) 395 if (dev && dev->driver)
393 dev->error_state = pci_channel_io_frozen; 396 dev->error_state = pci_channel_io_frozen;
394 397
395 if (dn->child) 398 __eeh_mark_slot(dn, mode_flag);
396 __eeh_mark_slot (dn->child, mode_flag);
397 } 399 }
398 dn = dn->sibling;
399 } 400 }
400} 401}
401 402
@@ -415,19 +416,19 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag)
415 if (dev) 416 if (dev)
416 dev->error_state = pci_channel_io_frozen; 417 dev->error_state = pci_channel_io_frozen;
417 418
418 __eeh_mark_slot (dn->child, mode_flag); 419 __eeh_mark_slot(dn, mode_flag);
419} 420}
420 421
421static void __eeh_clear_slot (struct device_node *dn, int mode_flag) 422static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
422{ 423{
423 while (dn) { 424 struct device_node *dn;
425
426 for_each_child_of_node(parent, dn) {
424 if (PCI_DN(dn)) { 427 if (PCI_DN(dn)) {
425 PCI_DN(dn)->eeh_mode &= ~mode_flag; 428 PCI_DN(dn)->eeh_mode &= ~mode_flag;
426 PCI_DN(dn)->eeh_check_count = 0; 429 PCI_DN(dn)->eeh_check_count = 0;
427 if (dn->child) 430 __eeh_clear_slot(dn, mode_flag);
428 __eeh_clear_slot (dn->child, mode_flag);
429 } 431 }
430 dn = dn->sibling;
431 } 432 }
432} 433}
433 434
@@ -444,7 +445,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag)
444 445
445 PCI_DN(dn)->eeh_mode &= ~mode_flag; 446 PCI_DN(dn)->eeh_mode &= ~mode_flag;
446 PCI_DN(dn)->eeh_check_count = 0; 447 PCI_DN(dn)->eeh_check_count = 0;
447 __eeh_clear_slot (dn->child, mode_flag); 448 __eeh_clear_slot(dn, mode_flag);
448 spin_unlock_irqrestore(&confirm_error_lock, flags); 449 spin_unlock_irqrestore(&confirm_error_lock, flags);
449} 450}
450 451
@@ -480,6 +481,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
480 no_dn++; 481 no_dn++;
481 return 0; 482 return 0;
482 } 483 }
484 dn = find_device_pe(dn);
483 pdn = PCI_DN(dn); 485 pdn = PCI_DN(dn);
484 486
485 /* Access to IO BARs might get this far and still not want checking. */ 487 /* Access to IO BARs might get this far and still not want checking. */
@@ -545,7 +547,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
545 547
546 /* Note that config-io to empty slots may fail; 548 /* Note that config-io to empty slots may fail;
547 * they are empty when they don't have children. */ 549 * they are empty when they don't have children. */
548 if ((rets[0] == 5) && (dn->child == NULL)) { 550 if ((rets[0] == 5) && (rets[2] == 0) && (dn->child == NULL)) {
549 false_positives++; 551 false_positives++;
550 pdn->eeh_false_positives ++; 552 pdn->eeh_false_positives ++;
551 rc = 0; 553 rc = 0;
@@ -848,11 +850,8 @@ void eeh_restore_bars(struct pci_dn *pdn)
848 if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code)) 850 if ((pdn->eeh_mode & EEH_MODE_SUPPORTED) && !IS_BRIDGE(pdn->class_code))
849 __restore_bars (pdn); 851 __restore_bars (pdn);
850 852
851 dn = pdn->node->child; 853 for_each_child_of_node(pdn->node, dn)
852 while (dn) {
853 eeh_restore_bars (PCI_DN(dn)); 854 eeh_restore_bars (PCI_DN(dn));
854 dn = dn->sibling;
855 }
856} 855}
857 856
858/** 857/**
@@ -1130,7 +1129,8 @@ static void eeh_add_device_early(struct device_node *dn)
1130void eeh_add_device_tree_early(struct device_node *dn) 1129void eeh_add_device_tree_early(struct device_node *dn)
1131{ 1130{
1132 struct device_node *sib; 1131 struct device_node *sib;
1133 for (sib = dn->child; sib; sib = sib->sibling) 1132
1133 for_each_child_of_node(dn, sib)
1134 eeh_add_device_tree_early(sib); 1134 eeh_add_device_tree_early(sib);
1135 eeh_add_device_early(dn); 1135 eeh_add_device_early(dn);
1136} 1136}
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 57e025e84ab4..68ea5eee39a8 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -310,8 +310,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
310 const char *location, *pci_str, *drv_str; 310 const char *location, *pci_str, *drv_str;
311 311
312 frozen_dn = find_device_pe(event->dn); 312 frozen_dn = find_device_pe(event->dn);
313 frozen_bus = pcibios_find_pci_bus(frozen_dn);
314
315 if (!frozen_dn) { 313 if (!frozen_dn) {
316 314
317 location = of_get_property(event->dn, "ibm,loc-code", NULL); 315 location = of_get_property(event->dn, "ibm,loc-code", NULL);
@@ -321,6 +319,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
321 location, pci_name(event->dev)); 319 location, pci_name(event->dev));
322 return NULL; 320 return NULL;
323 } 321 }
322
323 frozen_bus = pcibios_find_pci_bus(frozen_dn);
324 location = of_get_property(frozen_dn, "ibm,loc-code", NULL); 324 location = of_get_property(frozen_dn, "ibm,loc-code", NULL);
325 location = location ? location : "unknown"; 325 location = location ? location : "unknown";
326 326
@@ -354,13 +354,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
354 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) 354 if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
355 goto excess_failures; 355 goto excess_failures;
356 356
357 /* Get the current PCI slot state. */
358 rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
359 if (rc < 0) {
360 printk(KERN_WARNING "EEH: Permanent failure\n");
361 goto hard_fail;
362 }
363
364 printk(KERN_WARNING 357 printk(KERN_WARNING
365 "EEH: This PCI device has failed %d times in the last hour:\n", 358 "EEH: This PCI device has failed %d times in the last hour:\n",
366 frozen_pdn->eeh_freeze_count); 359 frozen_pdn->eeh_freeze_count);
@@ -376,6 +369,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
376 */ 369 */
377 pci_walk_bus(frozen_bus, eeh_report_error, &result); 370 pci_walk_bus(frozen_bus, eeh_report_error, &result);
378 371
372 /* Get the current PCI slot state. This can take a long time,
373 * sometimes over 3 seconds for certain systems. */
374 rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
375 if (rc < 0) {
376 printk(KERN_WARNING "EEH: Permanent failure\n");
377 goto hard_fail;
378 }
379
379 /* Since rtas may enable MMIO when posting the error log, 380 /* Since rtas may enable MMIO when posting the error log,
380 * don't post the error log until after all dev drivers 381 * don't post the error log until after all dev drivers
381 * have been informed. 382 * have been informed.
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index be17d2395072..a65c76308201 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -251,7 +251,7 @@ static void iommu_table_setparms(struct pci_controller *phb,
251 const unsigned long *basep; 251 const unsigned long *basep;
252 const u32 *sizep; 252 const u32 *sizep;
253 253
254 node = (struct device_node *)phb->arch_data; 254 node = phb->dn;
255 255
256 basep = of_get_property(node, "linux,tce-base", NULL); 256 basep = of_get_property(node, "linux,tce-base", NULL);
257 sizep = of_get_property(node, "linux,tce-size", NULL); 257 sizep = of_get_property(node, "linux,tce-size", NULL);
@@ -296,11 +296,12 @@ static void iommu_table_setparms(struct pci_controller *phb,
296static void iommu_table_setparms_lpar(struct pci_controller *phb, 296static void iommu_table_setparms_lpar(struct pci_controller *phb,
297 struct device_node *dn, 297 struct device_node *dn,
298 struct iommu_table *tbl, 298 struct iommu_table *tbl,
299 const void *dma_window) 299 const void *dma_window,
300 int bussubno)
300{ 301{
301 unsigned long offset, size; 302 unsigned long offset, size;
302 303
303 tbl->it_busno = PCI_DN(dn)->bussubno; 304 tbl->it_busno = bussubno;
304 of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size); 305 of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size);
305 306
306 tbl->it_base = 0; 307 tbl->it_base = 0;
@@ -420,17 +421,10 @@ static void pci_dma_bus_setup_pSeriesLP(struct pci_bus *bus)
420 pdn->full_name, ppci->iommu_table); 421 pdn->full_name, ppci->iommu_table);
421 422
422 if (!ppci->iommu_table) { 423 if (!ppci->iommu_table) {
423 /* Bussubno hasn't been copied yet.
424 * Do it now because iommu_table_setparms_lpar needs it.
425 */
426
427 ppci->bussubno = bus->number;
428
429 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, 424 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
430 ppci->phb->node); 425 ppci->phb->node);
431 426 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window,
432 iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window); 427 bus->number);
433
434 ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node); 428 ppci->iommu_table = iommu_init_table(tbl, ppci->phb->node);
435 DBG(" created table: %p\n", ppci->iommu_table); 429 DBG(" created table: %p\n", ppci->iommu_table);
436 } 430 }
@@ -523,14 +517,10 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev)
523 517
524 pci = PCI_DN(pdn); 518 pci = PCI_DN(pdn);
525 if (!pci->iommu_table) { 519 if (!pci->iommu_table) {
526 /* iommu_table_setparms_lpar needs bussubno. */
527 pci->bussubno = pci->phb->bus->number;
528
529 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL, 520 tbl = kmalloc_node(sizeof(struct iommu_table), GFP_KERNEL,
530 pci->phb->node); 521 pci->phb->node);
531 522 iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window,
532 iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window); 523 pci->phb->bus->number);
533
534 pci->iommu_table = iommu_init_table(tbl, pci->phb->node); 524 pci->iommu_table = iommu_init_table(tbl, pci->phb->node);
535 DBG(" created table: %p\n", pci->iommu_table); 525 DBG(" created table: %p\n", pci->iommu_table);
536 } else { 526 } else {
@@ -556,7 +546,7 @@ static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long acti
556 case PSERIES_RECONFIG_REMOVE: 546 case PSERIES_RECONFIG_REMOVE:
557 if (pci && pci->iommu_table && 547 if (pci && pci->iommu_table &&
558 of_get_property(np, "ibm,dma-window", NULL)) 548 of_get_property(np, "ibm,dma-window", NULL))
559 iommu_free_table(np); 549 iommu_free_table(pci->iommu_table, np->full_name);
560 break; 550 break;
561 default: 551 default:
562 err = NOTIFY_DONE; 552 err = NOTIFY_DONE;
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 47f0e0857f0e..5a5a19e40bb4 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -83,7 +83,7 @@ EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
83 83
84/* Must be called before pci_bus_add_devices */ 84/* Must be called before pci_bus_add_devices */
85void 85void
86pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus) 86pcibios_fixup_new_pci_devices(struct pci_bus *bus)
87{ 87{
88 struct pci_dev *dev; 88 struct pci_dev *dev;
89 89
@@ -98,8 +98,6 @@ pcibios_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus)
98 /* Fill device archdata and setup iommu table */ 98 /* Fill device archdata and setup iommu table */
99 pcibios_setup_new_device(dev); 99 pcibios_setup_new_device(dev);
100 100
101 if(fix_bus)
102 pcibios_fixup_device_resources(dev, bus);
103 pci_read_irq_line(dev); 101 pci_read_irq_line(dev);
104 for (i = 0; i < PCI_NUM_RESOURCES; i++) { 102 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
105 struct resource *r = &dev->resource[i]; 103 struct resource *r = &dev->resource[i];
@@ -132,8 +130,8 @@ pcibios_pci_config_bridge(struct pci_dev *dev)
132 130
133 pci_scan_child_bus(child_bus); 131 pci_scan_child_bus(child_bus);
134 132
135 /* Fixup new pci devices without touching bus struct */ 133 /* Fixup new pci devices */
136 pcibios_fixup_new_pci_devices(child_bus, 0); 134 pcibios_fixup_new_pci_devices(child_bus);
137 135
138 /* Make the discovered devices available */ 136 /* Make the discovered devices available */
139 pci_bus_add_devices(child_bus); 137 pci_bus_add_devices(child_bus);
@@ -169,7 +167,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
169 /* use ofdt-based probe */ 167 /* use ofdt-based probe */
170 of_scan_bus(dn, bus); 168 of_scan_bus(dn, bus);
171 if (!list_empty(&bus->devices)) { 169 if (!list_empty(&bus->devices)) {
172 pcibios_fixup_new_pci_devices(bus, 0); 170 pcibios_fixup_new_pci_devices(bus);
173 pci_bus_add_devices(bus); 171 pci_bus_add_devices(bus);
174 eeh_add_device_tree_late(bus); 172 eeh_add_device_tree_late(bus);
175 } 173 }
@@ -178,7 +176,7 @@ pcibios_add_pci_devices(struct pci_bus * bus)
178 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); 176 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn);
179 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); 177 num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0));
180 if (num) { 178 if (num) {
181 pcibios_fixup_new_pci_devices(bus, 1); 179 pcibios_fixup_new_pci_devices(bus);
182 pci_bus_add_devices(bus); 180 pci_bus_add_devices(bus);
183 eeh_add_device_tree_late(bus); 181 eeh_add_device_tree_late(bus);
184 } 182 }
@@ -208,7 +206,7 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn)
208 eeh_add_device_tree_early(dn); 206 eeh_add_device_tree_early(dn);
209 207
210 scan_phb(phb); 208 scan_phb(phb);
211 pcibios_fixup_new_pci_devices(phb->bus, 0); 209 pcibios_fixup_new_pci_devices(phb->bus);
212 pci_bus_add_devices(phb->bus); 210 pci_bus_add_devices(phb->bus);
213 eeh_add_device_tree_late(phb->bus); 211 eeh_add_device_tree_late(phb->bus);
214 212
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
index d003c80fa31d..d8680b589dc9 100644
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
@@ -8,11 +8,6 @@ static inline long poll_pending(void)
8 return plpar_hcall_norets(H_POLL_PENDING); 8 return plpar_hcall_norets(H_POLL_PENDING);
9} 9}
10 10
11static inline long prod_processor(void)
12{
13 return plpar_hcall_norets(H_PROD);
14}
15
16static inline long cede_processor(void) 11static inline long cede_processor(void)
17{ 12{
18 return plpar_hcall_norets(H_CEDE); 13 return plpar_hcall_norets(H_CEDE);
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 116305b22a2b..ea4c65917a64 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -46,6 +46,7 @@
46#include <asm/pSeries_reconfig.h> 46#include <asm/pSeries_reconfig.h>
47#include <asm/mpic.h> 47#include <asm/mpic.h>
48#include <asm/vdso_datapage.h> 48#include <asm/vdso_datapage.h>
49#include <asm/cputhreads.h>
49 50
50#include "plpar_wrappers.h" 51#include "plpar_wrappers.h"
51#include "pseries.h" 52#include "pseries.h"
@@ -202,7 +203,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr)
202 */ 203 */
203 if (system_state < SYSTEM_RUNNING && 204 if (system_state < SYSTEM_RUNNING &&
204 cpu_has_feature(CPU_FTR_SMT) && 205 cpu_has_feature(CPU_FTR_SMT) &&
205 !smt_enabled_at_boot && nr % 2 != 0) 206 !smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
206 return 0; 207 return 0;
207 208
208 return 1; 209 return 1;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 66e7d68ffeb1..8f8dd9c3ca6b 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -87,19 +87,25 @@ static int ibm_int_off;
87/* Direct HW low level accessors */ 87/* Direct HW low level accessors */
88 88
89 89
90static inline unsigned int direct_xirr_info_get(int n_cpu) 90static inline unsigned int direct_xirr_info_get(void)
91{ 91{
92 return in_be32(&xics_per_cpu[n_cpu]->xirr.word); 92 int cpu = smp_processor_id();
93
94 return in_be32(&xics_per_cpu[cpu]->xirr.word);
93} 95}
94 96
95static inline void direct_xirr_info_set(int n_cpu, int value) 97static inline void direct_xirr_info_set(int value)
96{ 98{
97 out_be32(&xics_per_cpu[n_cpu]->xirr.word, value); 99 int cpu = smp_processor_id();
100
101 out_be32(&xics_per_cpu[cpu]->xirr.word, value);
98} 102}
99 103
100static inline void direct_cppr_info(int n_cpu, u8 value) 104static inline void direct_cppr_info(u8 value)
101{ 105{
102 out_8(&xics_per_cpu[n_cpu]->xirr.bytes[0], value); 106 int cpu = smp_processor_id();
107
108 out_8(&xics_per_cpu[cpu]->xirr.bytes[0], value);
103} 109}
104 110
105static inline void direct_qirr_info(int n_cpu, u8 value) 111static inline void direct_qirr_info(int n_cpu, u8 value)
@@ -111,7 +117,7 @@ static inline void direct_qirr_info(int n_cpu, u8 value)
111/* LPAR low level accessors */ 117/* LPAR low level accessors */
112 118
113 119
114static inline unsigned int lpar_xirr_info_get(int n_cpu) 120static inline unsigned int lpar_xirr_info_get(void)
115{ 121{
116 unsigned long lpar_rc; 122 unsigned long lpar_rc;
117 unsigned long return_value; 123 unsigned long return_value;
@@ -122,7 +128,7 @@ static inline unsigned int lpar_xirr_info_get(int n_cpu)
122 return (unsigned int)return_value; 128 return (unsigned int)return_value;
123} 129}
124 130
125static inline void lpar_xirr_info_set(int n_cpu, int value) 131static inline void lpar_xirr_info_set(int value)
126{ 132{
127 unsigned long lpar_rc; 133 unsigned long lpar_rc;
128 unsigned long val64 = value & 0xffffffff; 134 unsigned long val64 = value & 0xffffffff;
@@ -133,7 +139,7 @@ static inline void lpar_xirr_info_set(int n_cpu, int value)
133 val64); 139 val64);
134} 140}
135 141
136static inline void lpar_cppr_info(int n_cpu, u8 value) 142static inline void lpar_cppr_info(u8 value)
137{ 143{
138 unsigned long lpar_rc; 144 unsigned long lpar_rc;
139 145
@@ -275,21 +281,19 @@ static unsigned int xics_startup(unsigned int virq)
275 281
276static void xics_eoi_direct(unsigned int virq) 282static void xics_eoi_direct(unsigned int virq)
277{ 283{
278 int cpu = smp_processor_id();
279 unsigned int irq = (unsigned int)irq_map[virq].hwirq; 284 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
280 285
281 iosync(); 286 iosync();
282 direct_xirr_info_set(cpu, (0xff << 24) | irq); 287 direct_xirr_info_set((0xff << 24) | irq);
283} 288}
284 289
285 290
286static void xics_eoi_lpar(unsigned int virq) 291static void xics_eoi_lpar(unsigned int virq)
287{ 292{
288 int cpu = smp_processor_id();
289 unsigned int irq = (unsigned int)irq_map[virq].hwirq; 293 unsigned int irq = (unsigned int)irq_map[virq].hwirq;
290 294
291 iosync(); 295 iosync();
292 lpar_xirr_info_set(cpu, (0xff << 24) | irq); 296 lpar_xirr_info_set((0xff << 24) | irq);
293} 297}
294 298
295static inline unsigned int xics_remap_irq(unsigned int vec) 299static inline unsigned int xics_remap_irq(unsigned int vec)
@@ -312,16 +316,12 @@ static inline unsigned int xics_remap_irq(unsigned int vec)
312 316
313static unsigned int xics_get_irq_direct(void) 317static unsigned int xics_get_irq_direct(void)
314{ 318{
315 unsigned int cpu = smp_processor_id(); 319 return xics_remap_irq(direct_xirr_info_get());
316
317 return xics_remap_irq(direct_xirr_info_get(cpu));
318} 320}
319 321
320static unsigned int xics_get_irq_lpar(void) 322static unsigned int xics_get_irq_lpar(void)
321{ 323{
322 unsigned int cpu = smp_processor_id(); 324 return xics_remap_irq(lpar_xirr_info_get());
323
324 return xics_remap_irq(lpar_xirr_info_get(cpu));
325} 325}
326 326
327#ifdef CONFIG_SMP 327#ifdef CONFIG_SMP
@@ -387,12 +387,12 @@ void xics_cause_IPI(int cpu)
387 387
388#endif /* CONFIG_SMP */ 388#endif /* CONFIG_SMP */
389 389
390static void xics_set_cpu_priority(int cpu, unsigned char cppr) 390static void xics_set_cpu_priority(unsigned char cppr)
391{ 391{
392 if (firmware_has_feature(FW_FEATURE_LPAR)) 392 if (firmware_has_feature(FW_FEATURE_LPAR))
393 lpar_cppr_info(cpu, cppr); 393 lpar_cppr_info(cppr);
394 else 394 else
395 direct_cppr_info(cpu, cppr); 395 direct_cppr_info(cppr);
396 iosync(); 396 iosync();
397} 397}
398 398
@@ -440,9 +440,7 @@ static void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
440 440
441void xics_setup_cpu(void) 441void xics_setup_cpu(void)
442{ 442{
443 int cpu = smp_processor_id(); 443 xics_set_cpu_priority(0xff);
444
445 xics_set_cpu_priority(cpu, 0xff);
446 444
447 /* 445 /*
448 * Put the calling processor into the GIQ. This is really only 446 * Put the calling processor into the GIQ. This is really only
@@ -783,7 +781,7 @@ void xics_teardown_cpu(int secondary)
783 unsigned int ipi; 781 unsigned int ipi;
784 struct irq_desc *desc; 782 struct irq_desc *desc;
785 783
786 xics_set_cpu_priority(cpu, 0); 784 xics_set_cpu_priority(0);
787 785
788 /* 786 /*
789 * Clear IPI 787 * Clear IPI
@@ -824,10 +822,11 @@ void xics_teardown_cpu(int secondary)
824void xics_migrate_irqs_away(void) 822void xics_migrate_irqs_away(void)
825{ 823{
826 int status; 824 int status;
827 unsigned int irq, virq, cpu = smp_processor_id(); 825 int cpu = smp_processor_id(), hw_cpu = hard_smp_processor_id();
826 unsigned int irq, virq;
828 827
829 /* Reject any interrupt that was queued to us... */ 828 /* Reject any interrupt that was queued to us... */
830 xics_set_cpu_priority(cpu, 0); 829 xics_set_cpu_priority(0);
831 830
832 /* remove ourselves from the global interrupt queue */ 831 /* remove ourselves from the global interrupt queue */
833 status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE, 832 status = rtas_set_indicator_fast(GLOBAL_INTERRUPT_QUEUE,
@@ -835,7 +834,7 @@ void xics_migrate_irqs_away(void)
835 WARN_ON(status < 0); 834 WARN_ON(status < 0);
836 835
837 /* Allow IPIs again... */ 836 /* Allow IPIs again... */
838 xics_set_cpu_priority(cpu, DEFAULT_PRIORITY); 837 xics_set_cpu_priority(DEFAULT_PRIORITY);
839 838
840 for_each_irq(virq) { 839 for_each_irq(virq) {
841 struct irq_desc *desc; 840 struct irq_desc *desc;
@@ -874,7 +873,7 @@ void xics_migrate_irqs_away(void)
874 * The irq has to be migrated only in the single cpu 873 * The irq has to be migrated only in the single cpu
875 * case. 874 * case.
876 */ 875 */
877 if (xics_status[0] != get_hard_smp_processor_id(cpu)) 876 if (xics_status[0] != hw_cpu)
878 goto unlock; 877 goto unlock;
879 878
880 printk(KERN_WARNING "IRQ %u affinity broken off cpu %u\n", 879 printk(KERN_WARNING "IRQ %u affinity broken off cpu %u\n",
diff --git a/arch/powerpc/platforms/pseries/xics.h b/arch/powerpc/platforms/pseries/xics.h
index db0ec3ba3ae2..9ffd809d29e2 100644
--- a/arch/powerpc/platforms/pseries/xics.h
+++ b/arch/powerpc/platforms/pseries/xics.h
@@ -21,9 +21,6 @@ extern void xics_cause_IPI(int cpu);
21extern void xics_request_IPIs(void); 21extern void xics_request_IPIs(void);
22extern void xics_migrate_irqs_away(void); 22extern void xics_migrate_irqs_away(void);
23 23
24/* first argument is ignored for now*/
25void pSeriesLP_cppr_info(int n_cpu, u8 value);
26
27struct xics_ipi_struct { 24struct xics_ipi_struct {
28 volatile unsigned long value; 25 volatile unsigned long value;
29} ____cacheline_aligned; 26} ____cacheline_aligned;
diff --git a/arch/powerpc/sysdev/Kconfig b/arch/powerpc/sysdev/Kconfig
new file mode 100644
index 000000000000..72fb35b9ebca
--- /dev/null
+++ b/arch/powerpc/sysdev/Kconfig
@@ -0,0 +1,8 @@
1# For a description of the syntax of this configuration file,
2# see Documentation/kbuild/kconfig-language.txt.
3#
4
5config PPC4xx_PCI_EXPRESS
6 bool
7 depends on PCI && 4xx
8 default n
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 99a77d743d48..15f3e8527d77 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -2,7 +2,7 @@ ifeq ($(CONFIG_PPC64),y)
2EXTRA_CFLAGS += -mno-minimal-toc 2EXTRA_CFLAGS += -mno-minimal-toc
3endif 3endif
4 4
5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o 5mpic-msi-obj-$(CONFIG_PCI_MSI) += mpic_msi.o mpic_u3msi.o mpic_pasemi_msi.o
6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y) 6obj-$(CONFIG_MPIC) += mpic.o $(mpic-msi-obj-y)
7 7
8obj-$(CONFIG_PPC_MPC106) += grackle.o 8obj-$(CONFIG_PPC_MPC106) += grackle.o
@@ -12,6 +12,7 @@ obj-$(CONFIG_U3_DART) += dart_iommu.o
12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o 12obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o
13obj-$(CONFIG_FSL_SOC) += fsl_soc.o 13obj-$(CONFIG_FSL_SOC) += fsl_soc.o
14obj-$(CONFIG_FSL_PCI) += fsl_pci.o 14obj-$(CONFIG_FSL_PCI) += fsl_pci.o
15obj-$(CONFIG_RAPIDIO) += fsl_rio.o
15obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o 16obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o
16obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ 17obj-$(CONFIG_QUICC_ENGINE) += qe_lib/
17obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/ 18obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
@@ -24,16 +25,20 @@ obj-$(CONFIG_AXON_RAM) += axonram.o
24ifeq ($(CONFIG_PPC_MERGE),y) 25ifeq ($(CONFIG_PPC_MERGE),y)
25obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o 26obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
26obj-$(CONFIG_PPC_I8259) += i8259.o 27obj-$(CONFIG_PPC_I8259) += i8259.o
27obj-$(CONFIG_PPC_83xx) += ipic.o 28obj-$(CONFIG_IPIC) += ipic.o
28obj-$(CONFIG_4xx) += uic.o 29obj-$(CONFIG_4xx) += uic.o
29obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o 30obj-$(CONFIG_XILINX_VIRTEX) += xilinx_intc.o
31obj-$(CONFIG_OF_RTC) += of_rtc.o
32ifeq ($(CONFIG_PCI),y)
33obj-$(CONFIG_4xx) += ppc4xx_pci.o
34endif
30endif 35endif
31 36
32# Temporary hack until we have migrated to asm-powerpc 37# Temporary hack until we have migrated to asm-powerpc
33ifeq ($(ARCH),powerpc) 38ifeq ($(ARCH),powerpc)
34obj-$(CONFIG_CPM) += cpm_common.o 39obj-$(CONFIG_CPM) += cpm_common.o
35obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o 40obj-$(CONFIG_CPM2) += cpm2.o cpm2_pic.o
36obj-$(CONFIG_PPC_DCR) += dcr.o 41obj-$(CONFIG_PPC_DCR) += dcr.o
37obj-$(CONFIG_8xx) += mpc8xx_pic.o commproc.o 42obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o
38obj-$(CONFIG_UCODE_PATCH) += micropatch.o 43obj-$(CONFIG_UCODE_PATCH) += micropatch.o
39endif 44endif
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 5eaf3e3f4b8b..d359d6e92975 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -42,8 +42,9 @@
42#include <linux/slab.h> 42#include <linux/slab.h>
43#include <linux/string.h> 43#include <linux/string.h>
44#include <linux/types.h> 44#include <linux/types.h>
45#include <asm/of_device.h> 45#include <linux/of_device.h>
46#include <asm/of_platform.h> 46#include <linux/of_platform.h>
47
47#include <asm/page.h> 48#include <asm/page.h>
48#include <asm/prom.h> 49#include <asm/prom.h>
49 50
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index 740ad73ce5cc..f589999361e0 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -29,11 +29,17 @@
29 29
30#define DRIVER_NAME "bestcomm-core" 30#define DRIVER_NAME "bestcomm-core"
31 31
32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_sram_ids[] __devinitdata = {
34 { .compatible = "fsl,mpc5200-sram", },
35 { .compatible = "mpc5200-sram", },
36 {}
37};
38
32 39
33struct bcom_engine *bcom_eng = NULL; 40struct bcom_engine *bcom_eng = NULL;
34EXPORT_SYMBOL_GPL(bcom_eng); /* needed for inline functions */ 41EXPORT_SYMBOL_GPL(bcom_eng); /* needed for inline functions */
35 42
36
37/* ======================================================================== */ 43/* ======================================================================== */
38/* Public and private API */ 44/* Public and private API */
39/* ======================================================================== */ 45/* ======================================================================== */
@@ -373,7 +379,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
373 of_node_get(op->node); 379 of_node_get(op->node);
374 380
375 /* Prepare SRAM */ 381 /* Prepare SRAM */
376 ofn_sram = of_find_compatible_node(NULL, "sram", "mpc5200-sram"); 382 ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids);
377 if (!ofn_sram) { 383 if (!ofn_sram) {
378 printk(KERN_ERR DRIVER_NAME ": " 384 printk(KERN_ERR DRIVER_NAME ": "
379 "No SRAM found in device tree\n"); 385 "No SRAM found in device tree\n");
@@ -478,10 +484,8 @@ mpc52xx_bcom_remove(struct of_device *op)
478} 484}
479 485
480static struct of_device_id mpc52xx_bcom_of_match[] = { 486static struct of_device_id mpc52xx_bcom_of_match[] = {
481 { 487 { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", },
482 .type = "dma-controller", 488 { .type = "dma-controller", .compatible = "mpc5200-bestcomm", },
483 .compatible = "mpc5200-bestcomm",
484 },
485 {}, 489 {},
486}; 490};
487 491
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.h b/arch/powerpc/sysdev/bestcomm/bestcomm.h
index e802cb4eb69a..c960a8b49655 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.h
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.h
@@ -20,7 +20,7 @@ struct bcom_bd; /* defined later on ... */
20 20
21 21
22/* ======================================================================== */ 22/* ======================================================================== */
23/* Generic task managment */ 23/* Generic task management */
24/* ======================================================================== */ 24/* ======================================================================== */
25 25
26/** 26/**
diff --git a/arch/powerpc/sysdev/commproc.h b/arch/powerpc/sysdev/commproc.h
deleted file mode 100644
index 9155ba467274..000000000000
--- a/arch/powerpc/sysdev/commproc.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _POWERPC_SYSDEV_COMMPROC_H
2#define _POWERPC_SYSDEV_COMMPROC_H
3
4extern void cpm_reset(void);
5extern void mpc8xx_restart(char *cmd);
6extern void mpc8xx_calibrate_decr(void);
7extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
8extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
9extern void m8xx_pic_init(void);
10extern unsigned int mpc8xx_get_irq(void);
11
12#endif
diff --git a/arch/powerpc/sysdev/commproc.c b/arch/powerpc/sysdev/cpm1.c
index f6a63780bbde..df8bd2b64796 100644
--- a/arch/powerpc/sysdev/commproc.c
+++ b/arch/powerpc/sysdev/cpm1.c
@@ -30,11 +30,10 @@
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/irq.h> 31#include <linux/irq.h>
32#include <linux/module.h> 32#include <linux/module.h>
33#include <asm/mpc8xx.h>
34#include <asm/page.h> 33#include <asm/page.h>
35#include <asm/pgtable.h> 34#include <asm/pgtable.h>
36#include <asm/8xx_immap.h> 35#include <asm/8xx_immap.h>
37#include <asm/commproc.h> 36#include <asm/cpm1.h>
38#include <asm/io.h> 37#include <asm/io.h>
39#include <asm/tlbflush.h> 38#include <asm/tlbflush.h>
40#include <asm/rheap.h> 39#include <asm/rheap.h>
@@ -48,8 +47,6 @@
48#ifndef CONFIG_PPC_CPM_NEW_BINDING 47#ifndef CONFIG_PPC_CPM_NEW_BINDING
49static void m8xx_cpm_dpinit(void); 48static void m8xx_cpm_dpinit(void);
50#endif 49#endif
51static uint host_buffer; /* One page of host buffer */
52static uint host_end; /* end + 1 */
53cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */ 50cpm8xx_t __iomem *cpmp; /* Pointer to comm processor space */
54immap_t __iomem *mpc8xx_immr; 51immap_t __iomem *mpc8xx_immr;
55static cpic8xx_t __iomem *cpic_reg; 52static cpic8xx_t __iomem *cpic_reg;
@@ -240,40 +237,33 @@ void __init cpm_reset(void)
240#endif 237#endif
241} 238}
242 239
243/* We used to do this earlier, but have to postpone as long as possible 240static DEFINE_SPINLOCK(cmd_lock);
244 * to ensure the kernel VM is now running.
245 */
246static void
247alloc_host_memory(void)
248{
249 dma_addr_t physaddr;
250 241
251 /* Set the host page for allocation. 242#define MAX_CR_CMD_LOOPS 10000
252 */
253 host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
254 GFP_KERNEL);
255 host_end = host_buffer + PAGE_SIZE;
256}
257 243
258/* We also own one page of host buffer space for the allocation of 244int cpm_command(u32 command, u8 opcode)
259 * UART "fifos" and the like.
260 */
261uint
262m8xx_cpm_hostalloc(uint size)
263{ 245{
264 uint retloc; 246 int i, ret;
247 unsigned long flags;
265 248
266 if (host_buffer == 0) 249 if (command & 0xffffff0f)
267 alloc_host_memory(); 250 return -EINVAL;
268 251
269 if ((host_buffer + size) >= host_end) 252 spin_lock_irqsave(&cmd_lock, flags);
270 return(0);
271 253
272 retloc = host_buffer; 254 ret = 0;
273 host_buffer += size; 255 out_be16(&cpmp->cp_cpcr, command | CPM_CR_FLG | (opcode << 8));
256 for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
257 if ((in_be16(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
258 goto out;
274 259
275 return(retloc); 260 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
261 ret = -EIO;
262out:
263 spin_unlock_irqrestore(&cmd_lock, flags);
264 return ret;
276} 265}
266EXPORT_SYMBOL(cpm_command);
277 267
278/* Set a baud rate generator. This needs lots of work. There are 268/* Set a baud rate generator. This needs lots of work. There are
279 * four BRGs, any of which can be wired to any channel. 269 * four BRGs, any of which can be wired to any channel.
@@ -300,7 +290,7 @@ cpm_setbrg(uint brg, uint rate)
300 out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN); 290 out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN);
301 else 291 else
302 out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) | 292 out_be32(bp, (((BRG_UART_CLK_DIV16 / rate) - 1) << 1) |
303 CPM_BRG_EN | CPM_BRG_DIV16); 293 CPM_BRG_EN | CPM_BRG_DIV16);
304} 294}
305 295
306#ifndef CONFIG_PPC_CPM_NEW_BINDING 296#ifndef CONFIG_PPC_CPM_NEW_BINDING
@@ -408,7 +398,7 @@ EXPORT_SYMBOL(cpm_dpram_phys);
408#endif /* !CONFIG_PPC_CPM_NEW_BINDING */ 398#endif /* !CONFIG_PPC_CPM_NEW_BINDING */
409 399
410struct cpm_ioport16 { 400struct cpm_ioport16 {
411 __be16 dir, par, sor, dat, intr; 401 __be16 dir, par, odr_sor, dat, intr;
412 __be16 res[3]; 402 __be16 res[3];
413}; 403};
414 404
@@ -438,6 +428,13 @@ static void cpm1_set_pin32(int port, int pin, int flags)
438 else 428 else
439 clrbits32(&iop->par, pin); 429 clrbits32(&iop->par, pin);
440 430
431 if (port == CPM_PORTB) {
432 if (flags & CPM_PIN_OPENDRAIN)
433 setbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
434 else
435 clrbits16(&mpc8xx_immr->im_cpm.cp_pbodr, pin);
436 }
437
441 if (port == CPM_PORTE) { 438 if (port == CPM_PORTE) {
442 if (flags & CPM_PIN_SECONDARY) 439 if (flags & CPM_PIN_SECONDARY)
443 setbits32(&iop->sor, pin); 440 setbits32(&iop->sor, pin);
@@ -471,11 +468,17 @@ static void cpm1_set_pin16(int port, int pin, int flags)
471 else 468 else
472 clrbits16(&iop->par, pin); 469 clrbits16(&iop->par, pin);
473 470
471 if (port == CPM_PORTA) {
472 if (flags & CPM_PIN_OPENDRAIN)
473 setbits16(&iop->odr_sor, pin);
474 else
475 clrbits16(&iop->odr_sor, pin);
476 }
474 if (port == CPM_PORTC) { 477 if (port == CPM_PORTC) {
475 if (flags & CPM_PIN_SECONDARY) 478 if (flags & CPM_PIN_SECONDARY)
476 setbits16(&iop->sor, pin); 479 setbits16(&iop->odr_sor, pin);
477 else 480 else
478 clrbits16(&iop->sor, pin); 481 clrbits16(&iop->odr_sor, pin);
479 } 482 }
480} 483}
481 484
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2.c
index c1d824032020..7be711232124 100644
--- a/arch/powerpc/sysdev/cpm2_common.c
+++ b/arch/powerpc/sysdev/cpm2.c
@@ -82,6 +82,31 @@ void __init cpm2_reset(void)
82 cpmp = &cpm2_immr->im_cpm; 82 cpmp = &cpm2_immr->im_cpm;
83} 83}
84 84
85static DEFINE_SPINLOCK(cmd_lock);
86
87#define MAX_CR_CMD_LOOPS 10000
88
89int cpm_command(u32 command, u8 opcode)
90{
91 int i, ret;
92 unsigned long flags;
93
94 spin_lock_irqsave(&cmd_lock, flags);
95
96 ret = 0;
97 out_be32(&cpmp->cp_cpcr, command | opcode | CPM_CR_FLG);
98 for (i = 0; i < MAX_CR_CMD_LOOPS; i++)
99 if ((in_be32(&cpmp->cp_cpcr) & CPM_CR_FLG) == 0)
100 goto out;
101
102 printk(KERN_ERR "%s(): Not able to issue CPM command\n", __FUNCTION__);
103 ret = -EIO;
104out:
105 spin_unlock_irqrestore(&cmd_lock, flags);
106 return ret;
107}
108EXPORT_SYMBOL(cpm_command);
109
85/* Set a baud rate generator. This needs lots of work. There are 110/* Set a baud rate generator. This needs lots of work. There are
86 * eight BRGs, which can be connected to the CPM channels or output 111 * eight BRGs, which can be connected to the CPM channels or output
87 * as clocks. The BRGs are in two different block of internal 112 * as clocks. The BRGs are in two different block of internal
@@ -128,8 +153,7 @@ cpm2_fastbrg(uint brg, uint rate, int div16)
128 153
129 if (brg < 4) { 154 if (brg < 4) {
130 bp = cpm2_map_size(im_brgc1, 16); 155 bp = cpm2_map_size(im_brgc1, 16);
131 } 156 } else {
132 else {
133 bp = cpm2_map_size(im_brgc5, 16); 157 bp = cpm2_map_size(im_brgc5, 16);
134 brg -= 4; 158 brg -= 4;
135 } 159 }
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 33df4c347ca7..bf13c2174a4e 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -33,8 +33,8 @@ void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc)
33 struct ccsr_pci __iomem *pci; 33 struct ccsr_pci __iomem *pci;
34 int i; 34 int i;
35 35
36 pr_debug("PCI memory map start 0x%x, size 0x%x\n", rsrc->start, 36 pr_debug("PCI memory map start 0x%016llx, size 0x%016llx\n",
37 rsrc->end - rsrc->start + 1); 37 (u64)rsrc->start, (u64)rsrc->end - (u64)rsrc->start + 1);
38 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1); 38 pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
39 39
40 /* Disable all windows (except powar0 since its ignored) */ 40 /* Disable all windows (except powar0 since its ignored) */
@@ -46,17 +46,17 @@ void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc)
46 /* Setup outbound MEM window */ 46 /* Setup outbound MEM window */
47 for(i = 0; i < 3; i++) 47 for(i = 0; i < 3; i++)
48 if (hose->mem_resources[i].flags & IORESOURCE_MEM){ 48 if (hose->mem_resources[i].flags & IORESOURCE_MEM){
49 pr_debug("PCI MEM resource start 0x%08x, size 0x%08x.\n", 49 resource_size_t pci_addr_start =
50 hose->mem_resources[i].start, 50 hose->mem_resources[i].start -
51 hose->mem_resources[i].end 51 hose->pci_mem_offset;
52 - hose->mem_resources[i].start + 1); 52 pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n",
53 out_be32(&pci->pow[i+1].potar, 53 (u64)hose->mem_resources[i].start,
54 (hose->mem_resources[i].start >> 12) 54 (u64)hose->mem_resources[i].end
55 & 0x000fffff); 55 - (u64)hose->mem_resources[i].start + 1);
56 out_be32(&pci->pow[i+1].potar, (pci_addr_start >> 12));
56 out_be32(&pci->pow[i+1].potear, 0); 57 out_be32(&pci->pow[i+1].potear, 0);
57 out_be32(&pci->pow[i+1].powbar, 58 out_be32(&pci->pow[i+1].powbar,
58 (hose->mem_resources[i].start >> 12) 59 (hose->mem_resources[i].start >> 12));
59 & 0x000fffff);
60 /* Enable, Mem R/W */ 60 /* Enable, Mem R/W */
61 out_be32(&pci->pow[i+1].powar, 0x80044000 61 out_be32(&pci->pow[i+1].powar, 0x80044000
62 | (__ilog2(hose->mem_resources[i].end 62 | (__ilog2(hose->mem_resources[i].end
@@ -65,15 +65,14 @@ void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc)
65 65
66 /* Setup outbound IO window */ 66 /* Setup outbound IO window */
67 if (hose->io_resource.flags & IORESOURCE_IO){ 67 if (hose->io_resource.flags & IORESOURCE_IO){
68 pr_debug("PCI IO resource start 0x%08x, size 0x%08x, phy base 0x%08x.\n", 68 pr_debug("PCI IO resource start 0x%016llx, size 0x%016llx, "
69 hose->io_resource.start, 69 "phy base 0x%016llx.\n",
70 hose->io_resource.end - hose->io_resource.start + 1, 70 (u64)hose->io_resource.start,
71 hose->io_base_phys); 71 (u64)hose->io_resource.end - (u64)hose->io_resource.start + 1,
72 out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12) 72 (u64)hose->io_base_phys);
73 & 0x000fffff); 73 out_be32(&pci->pow[i+1].potar, (hose->io_resource.start >> 12));
74 out_be32(&pci->pow[i+1].potear, 0); 74 out_be32(&pci->pow[i+1].potear, 0);
75 out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12) 75 out_be32(&pci->pow[i+1].powbar, (hose->io_base_phys >> 12));
76 & 0x000fffff);
77 /* Enable, IO R/W */ 76 /* Enable, IO R/W */
78 out_be32(&pci->pow[i+1].powar, 0x80088000 77 out_be32(&pci->pow[i+1].powar, 0x80088000
79 | (__ilog2(hose->io_resource.end 78 | (__ilog2(hose->io_resource.end
@@ -107,55 +106,17 @@ void __init setup_pci_cmd(struct pci_controller *hose)
107 } 106 }
108} 107}
109 108
110static void __init quirk_fsl_pcie_transparent(struct pci_dev *dev) 109static int fsl_pcie_bus_fixup;
111{
112 struct resource *res;
113 int i, res_idx = PCI_BRIDGE_RESOURCES;
114 struct pci_controller *hose;
115 110
111static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
112{
116 /* if we aren't a PCIe don't bother */ 113 /* if we aren't a PCIe don't bother */
117 if (!pci_find_capability(dev, PCI_CAP_ID_EXP)) 114 if (!pci_find_capability(dev, PCI_CAP_ID_EXP))
118 return ; 115 return ;
119 116
120 /* 117 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
121 * Make the bridge be transparent. 118 fsl_pcie_bus_fixup = 1;
122 */ 119 return ;
123 dev->transparent = 1;
124
125 hose = pci_bus_to_host(dev->bus);
126 if (!hose) {
127 printk(KERN_ERR "Can't find hose for bus %d\n",
128 dev->bus->number);
129 return;
130 }
131
132 /* Clear out any of the virtual P2P bridge registers */
133 pci_write_config_word(dev, PCI_IO_BASE_UPPER16, 0);
134 pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, 0);
135 pci_write_config_byte(dev, PCI_IO_BASE, 0x10);
136 pci_write_config_byte(dev, PCI_IO_LIMIT, 0);
137 pci_write_config_word(dev, PCI_MEMORY_BASE, 0x10);
138 pci_write_config_word(dev, PCI_MEMORY_LIMIT, 0);
139 pci_write_config_word(dev, PCI_PREF_BASE_UPPER32, 0x0);
140 pci_write_config_word(dev, PCI_PREF_LIMIT_UPPER32, 0x0);
141 pci_write_config_word(dev, PCI_PREF_MEMORY_BASE, 0x10);
142 pci_write_config_word(dev, PCI_PREF_MEMORY_LIMIT, 0);
143
144 if (hose->io_resource.flags) {
145 res = &dev->resource[res_idx++];
146 res->start = hose->io_resource.start;
147 res->end = hose->io_resource.end;
148 res->flags = hose->io_resource.flags;
149 update_bridge_resource(dev, res);
150 }
151
152 for (i = 0; i < 3; i++) {
153 res = &dev->resource[res_idx + i];
154 res->start = hose->mem_resources[i].start;
155 res->end = hose->mem_resources[i].end;
156 res->flags = hose->mem_resources[i].flags;
157 update_bridge_resource(dev, res);
158 }
159} 120}
160 121
161int __init fsl_pcie_check_link(struct pci_controller *hose) 122int __init fsl_pcie_check_link(struct pci_controller *hose)
@@ -172,11 +133,24 @@ void fsl_pcibios_fixup_bus(struct pci_bus *bus)
172 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 133 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
173 int i; 134 int i;
174 135
175 /* deal with bogus pci_bus when we don't have anything connected on PCIe */ 136 if ((bus->parent == hose->bus) &&
176 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { 137 ((fsl_pcie_bus_fixup &&
177 if (bus->parent) { 138 early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) ||
178 for (i = 0; i < 4; ++i) 139 (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)))
179 bus->resource[i] = bus->parent->resource[i]; 140 {
141 for (i = 0; i < 4; ++i) {
142 struct resource *res = bus->resource[i];
143 struct resource *par = bus->parent->resource[i];
144 if (res) {
145 res->start = 0;
146 res->end = 0;
147 res->flags = 0;
148 }
149 if (res && par) {
150 res->start = par->start;
151 res->end = par->end;
152 res->flags = par->flags;
153 }
180 } 154 }
181 } 155 }
182} 156}
@@ -202,7 +176,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
202 printk(KERN_WARNING "Can't get bus-range for %s, assume" 176 printk(KERN_WARNING "Can't get bus-range for %s, assume"
203 " bus 0\n", dev->full_name); 177 " bus 0\n", dev->full_name);
204 178
205 pci_assign_all_buses = 1; 179 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
206 hose = pcibios_alloc_controller(dev); 180 hose = pcibios_alloc_controller(dev);
207 if (!hose) 181 if (!hose)
208 return -ENOMEM; 182 return -ENOMEM;
@@ -222,7 +196,7 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
222 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK; 196 hose->indirect_type |= PPC_INDIRECT_TYPE_NO_PCIE_LINK;
223 } 197 }
224 198
225 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx." 199 printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
226 "Firmware bus number: %d->%d\n", 200 "Firmware bus number: %d->%d\n",
227 (unsigned long long)rsrc.start, hose->first_busno, 201 (unsigned long long)rsrc.start, hose->first_busno,
228 hose->last_busno); 202 hose->last_busno);
@@ -240,23 +214,23 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary)
240 return 0; 214 return 0;
241} 215}
242 216
243DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_transparent); 217DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548E, quirk_fsl_pcie_header);
244DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_transparent); 218DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8548, quirk_fsl_pcie_header);
245DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_transparent); 219DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543E, quirk_fsl_pcie_header);
246DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_transparent); 220DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8543, quirk_fsl_pcie_header);
247DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_transparent); 221DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8547E, quirk_fsl_pcie_header);
248DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_transparent); 222DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545E, quirk_fsl_pcie_header);
249DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_transparent); 223DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8545, quirk_fsl_pcie_header);
250DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_transparent); 224DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568E, quirk_fsl_pcie_header);
251DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_transparent); 225DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8568, quirk_fsl_pcie_header);
252DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_transparent); 226DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567E, quirk_fsl_pcie_header);
253DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_transparent); 227DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8567, quirk_fsl_pcie_header);
254DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transparent); 228DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_header);
255DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent); 229DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_header);
256DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent); 230DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_header);
257DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent); 231DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_header);
258DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent); 232DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_header);
259DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent); 233DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_header);
260DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); 234DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
261DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); 235DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
262DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_transparent); 236DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index af2425e4655f..af2425e4655f 100644
--- a/arch/ppc/syslib/ppc85xx_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
diff --git a/arch/ppc/syslib/ppc85xx_rio.h b/arch/powerpc/sysdev/fsl_rio.h
index 6d3ff30b1579..6d3ff30b1579 100644
--- a/arch/ppc/syslib/ppc85xx_rio.h
+++ b/arch/powerpc/sysdev/fsl_rio.h
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 3ace7474809e..e48b20e934ca 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -24,6 +24,7 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/of_platform.h> 25#include <linux/of_platform.h>
26#include <linux/phy.h> 26#include <linux/phy.h>
27#include <linux/phy_fixed.h>
27#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
28#include <linux/fsl_devices.h> 29#include <linux/fsl_devices.h>
29#include <linux/fs_enet_pd.h> 30#include <linux/fs_enet_pd.h>
@@ -54,10 +55,18 @@ phys_addr_t get_immrbase(void)
54 soc = of_find_node_by_type(NULL, "soc"); 55 soc = of_find_node_by_type(NULL, "soc");
55 if (soc) { 56 if (soc) {
56 int size; 57 int size;
57 const void *prop = of_get_property(soc, "reg", &size); 58 u32 naddr;
59 const u32 *prop = of_get_property(soc, "#address-cells", &size);
58 60
61 if (prop && size == 4)
62 naddr = *prop;
63 else
64 naddr = 2;
65
66 prop = of_get_property(soc, "ranges", &size);
59 if (prop) 67 if (prop)
60 immrbase = of_translate_address(soc, prop); 68 immrbase = of_translate_address(soc, prop + naddr);
69
61 of_node_put(soc); 70 of_node_put(soc);
62 } 71 }
63 72
@@ -66,7 +75,7 @@ phys_addr_t get_immrbase(void)
66 75
67EXPORT_SYMBOL(get_immrbase); 76EXPORT_SYMBOL(get_immrbase);
68 77
69#if defined(CONFIG_CPM2) || defined(CONFIG_8xx) 78#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
70 79
71static u32 brgfreq = -1; 80static u32 brgfreq = -1;
72 81
@@ -91,11 +100,21 @@ u32 get_brgfreq(void)
91 100
92 /* Legacy device binding -- will go away when no users are left. */ 101 /* Legacy device binding -- will go away when no users are left. */
93 node = of_find_node_by_type(NULL, "cpm"); 102 node = of_find_node_by_type(NULL, "cpm");
103 if (!node)
104 node = of_find_compatible_node(NULL, NULL, "fsl,qe");
105 if (!node)
106 node = of_find_node_by_type(NULL, "qe");
107
94 if (node) { 108 if (node) {
95 prop = of_get_property(node, "brg-frequency", &size); 109 prop = of_get_property(node, "brg-frequency", &size);
96 if (prop && size == 4) 110 if (prop && size == 4)
97 brgfreq = *prop; 111 brgfreq = *prop;
98 112
113 if (brgfreq == -1 || brgfreq == 0) {
114 prop = of_get_property(node, "bus-frequency", &size);
115 if (prop && size == 4)
116 brgfreq = *prop / 2;
117 }
99 of_node_put(node); 118 of_node_put(node);
100 } 119 }
101 120
@@ -130,17 +149,51 @@ u32 get_baudrate(void)
130EXPORT_SYMBOL(get_baudrate); 149EXPORT_SYMBOL(get_baudrate);
131#endif /* CONFIG_CPM2 */ 150#endif /* CONFIG_CPM2 */
132 151
133static int __init gfar_mdio_of_init(void) 152#ifdef CONFIG_FIXED_PHY
153static int __init of_add_fixed_phys(void)
134{ 154{
155 int ret;
135 struct device_node *np; 156 struct device_node *np;
136 unsigned int i; 157 u32 *fixed_link;
158 struct fixed_phy_status status = {};
159
160 for_each_node_by_name(np, "ethernet") {
161 fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
162 if (!fixed_link)
163 continue;
164
165 status.link = 1;
166 status.duplex = fixed_link[1];
167 status.speed = fixed_link[2];
168 status.pause = fixed_link[3];
169 status.asym_pause = fixed_link[4];
170
171 ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status);
172 if (ret) {
173 of_node_put(np);
174 return ret;
175 }
176 }
177
178 return 0;
179}
180arch_initcall(of_add_fixed_phys);
181#endif /* CONFIG_FIXED_PHY */
182
183static int __init gfar_mdio_of_init(void)
184{
185 struct device_node *np = NULL;
137 struct platform_device *mdio_dev; 186 struct platform_device *mdio_dev;
138 struct resource res; 187 struct resource res;
139 int ret; 188 int ret;
140 189
141 for (np = NULL, i = 0; 190 np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio");
142 (np = of_find_compatible_node(np, "mdio", "gianfar")) != NULL; 191
143 i++) { 192 /* try the deprecated version */
193 if (!np)
194 np = of_find_compatible_node(np, "mdio", "gianfar");
195
196 if (np) {
144 int k; 197 int k;
145 struct device_node *child = NULL; 198 struct device_node *child = NULL;
146 struct gianfar_mdio_data mdio_data; 199 struct gianfar_mdio_data mdio_data;
@@ -179,11 +232,13 @@ static int __init gfar_mdio_of_init(void)
179 goto unreg; 232 goto unreg;
180 } 233 }
181 234
235 of_node_put(np);
182 return 0; 236 return 0;
183 237
184unreg: 238unreg:
185 platform_device_unregister(mdio_dev); 239 platform_device_unregister(mdio_dev);
186err: 240err:
241 of_node_put(np);
187 return ret; 242 return ret;
188} 243}
189 244
@@ -193,7 +248,6 @@ static const char *gfar_tx_intr = "tx";
193static const char *gfar_rx_intr = "rx"; 248static const char *gfar_rx_intr = "rx";
194static const char *gfar_err_intr = "error"; 249static const char *gfar_err_intr = "error";
195 250
196
197static int __init gfar_of_init(void) 251static int __init gfar_of_init(void)
198{ 252{
199 struct device_node *np; 253 struct device_node *np;
@@ -277,29 +331,43 @@ static int __init gfar_of_init(void)
277 gfar_data.interface = PHY_INTERFACE_MODE_MII; 331 gfar_data.interface = PHY_INTERFACE_MODE_MII;
278 332
279 ph = of_get_property(np, "phy-handle", NULL); 333 ph = of_get_property(np, "phy-handle", NULL);
280 phy = of_find_node_by_phandle(*ph); 334 if (ph == NULL) {
335 u32 *fixed_link;
281 336
282 if (phy == NULL) { 337 fixed_link = (u32 *)of_get_property(np, "fixed-link",
283 ret = -ENODEV; 338 NULL);
284 goto unreg; 339 if (!fixed_link) {
285 } 340 ret = -ENODEV;
341 goto unreg;
342 }
286 343
287 mdio = of_get_parent(phy); 344 gfar_data.bus_id = 0;
345 gfar_data.phy_id = fixed_link[0];
346 } else {
347 phy = of_find_node_by_phandle(*ph);
348
349 if (phy == NULL) {
350 ret = -ENODEV;
351 goto unreg;
352 }
353
354 mdio = of_get_parent(phy);
355
356 id = of_get_property(phy, "reg", NULL);
357 ret = of_address_to_resource(mdio, 0, &res);
358 if (ret) {
359 of_node_put(phy);
360 of_node_put(mdio);
361 goto unreg;
362 }
363
364 gfar_data.phy_id = *id;
365 gfar_data.bus_id = res.start;
288 366
289 id = of_get_property(phy, "reg", NULL);
290 ret = of_address_to_resource(mdio, 0, &res);
291 if (ret) {
292 of_node_put(phy); 367 of_node_put(phy);
293 of_node_put(mdio); 368 of_node_put(mdio);
294 goto unreg;
295 } 369 }
296 370
297 gfar_data.phy_id = *id;
298 gfar_data.bus_id = res.start;
299
300 of_node_put(phy);
301 of_node_put(mdio);
302
303 ret = 371 ret =
304 platform_device_add_data(gfar_dev, &gfar_data, 372 platform_device_add_data(gfar_dev, &gfar_data,
305 sizeof(struct 373 sizeof(struct
@@ -390,13 +458,11 @@ static void __init of_register_i2c_devices(struct device_node *adap_node,
390static int __init fsl_i2c_of_init(void) 458static int __init fsl_i2c_of_init(void)
391{ 459{
392 struct device_node *np; 460 struct device_node *np;
393 unsigned int i; 461 unsigned int i = 0;
394 struct platform_device *i2c_dev; 462 struct platform_device *i2c_dev;
395 int ret; 463 int ret;
396 464
397 for (np = NULL, i = 0; 465 for_each_compatible_node(np, NULL, "fsl-i2c") {
398 (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL;
399 i++) {
400 struct resource r[2]; 466 struct resource r[2];
401 struct fsl_i2c_platform_data i2c_data; 467 struct fsl_i2c_platform_data i2c_data;
402 const unsigned char *flags = NULL; 468 const unsigned char *flags = NULL;
@@ -432,7 +498,7 @@ static int __init fsl_i2c_of_init(void)
432 if (ret) 498 if (ret)
433 goto unreg; 499 goto unreg;
434 500
435 of_register_i2c_devices(np, i); 501 of_register_i2c_devices(np, i++);
436 } 502 }
437 503
438 return 0; 504 return 0;
@@ -528,14 +594,12 @@ static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type)
528static int __init fsl_usb_of_init(void) 594static int __init fsl_usb_of_init(void)
529{ 595{
530 struct device_node *np; 596 struct device_node *np;
531 unsigned int i; 597 unsigned int i = 0;
532 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL, 598 struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
533 *usb_dev_dr_client = NULL; 599 *usb_dev_dr_client = NULL;
534 int ret; 600 int ret;
535 601
536 for (np = NULL, i = 0; 602 for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
537 (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
538 i++) {
539 struct resource r[2]; 603 struct resource r[2];
540 struct fsl_usb2_platform_data usb_data; 604 struct fsl_usb2_platform_data usb_data;
541 const unsigned char *prop = NULL; 605 const unsigned char *prop = NULL;
@@ -578,11 +642,10 @@ static int __init fsl_usb_of_init(void)
578 fsl_usb2_platform_data)); 642 fsl_usb2_platform_data));
579 if (ret) 643 if (ret)
580 goto unreg_mph; 644 goto unreg_mph;
645 i++;
581 } 646 }
582 647
583 for (np = NULL; 648 for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
584 (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
585 i++) {
586 struct resource r[2]; 649 struct resource r[2];
587 struct fsl_usb2_platform_data usb_data; 650 struct fsl_usb2_platform_data usb_data;
588 const unsigned char *prop = NULL; 651 const unsigned char *prop = NULL;
@@ -654,6 +717,7 @@ static int __init fsl_usb_of_init(void)
654 fsl_usb2_platform_data)))) 717 fsl_usb2_platform_data))))
655 goto unreg_dr; 718 goto unreg_dr;
656 } 719 }
720 i++;
657 } 721 }
658 return 0; 722 return 0;
659 723
@@ -1125,13 +1189,12 @@ arch_initcall(fs_enet_of_init);
1125 1189
1126static int __init fsl_pcmcia_of_init(void) 1190static int __init fsl_pcmcia_of_init(void)
1127{ 1191{
1128 struct device_node *np = NULL; 1192 struct device_node *np;
1129 /* 1193 /*
1130 * Register all the devices which type is "pcmcia" 1194 * Register all the devices which type is "pcmcia"
1131 */ 1195 */
1132 while ((np = of_find_compatible_node(np, 1196 for_each_compatible_node(np, "pcmcia", "fsl,pq-pcmcia")
1133 "pcmcia", "fsl,pq-pcmcia")) != NULL) 1197 of_platform_device_create(np, "m8xx-pcmcia", NULL);
1134 of_platform_device_create(np, "m8xx-pcmcia", NULL);
1135 return 0; 1198 return 0;
1136} 1199}
1137 1200
@@ -1213,31 +1276,17 @@ arch_initcall(cpm_smc_uart_of_init);
1213#endif /* CONFIG_8xx */ 1276#endif /* CONFIG_8xx */
1214#endif /* CONFIG_PPC_CPM_NEW_BINDING */ 1277#endif /* CONFIG_PPC_CPM_NEW_BINDING */
1215 1278
1216int __init fsl_spi_init(struct spi_board_info *board_infos, 1279static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
1217 unsigned int num_board_infos, 1280 struct spi_board_info *board_infos,
1218 void (*activate_cs)(u8 cs, u8 polarity), 1281 unsigned int num_board_infos,
1219 void (*deactivate_cs)(u8 cs, u8 polarity)) 1282 void (*activate_cs)(u8 cs, u8 polarity),
1283 void (*deactivate_cs)(u8 cs, u8 polarity))
1220{ 1284{
1221 struct device_node *np; 1285 struct device_node *np;
1222 unsigned int i; 1286 unsigned int i = 0;
1223 const u32 *sysclk;
1224
1225 /* SPI controller is either clocked from QE or SoC clock */
1226 np = of_find_node_by_type(NULL, "qe");
1227 if (!np)
1228 np = of_find_node_by_type(NULL, "soc");
1229
1230 if (!np)
1231 return -ENODEV;
1232
1233 sysclk = of_get_property(np, "bus-frequency", NULL);
1234 if (!sysclk)
1235 return -ENODEV;
1236 1287
1237 for (np = NULL, i = 1; 1288 for_each_compatible_node(np, type, compatible) {
1238 (np = of_find_compatible_node(np, "spi", "fsl_spi")) != NULL; 1289 int ret;
1239 i++) {
1240 int ret = 0;
1241 unsigned int j; 1290 unsigned int j;
1242 const void *prop; 1291 const void *prop;
1243 struct resource res[2]; 1292 struct resource res[2];
@@ -1249,13 +1298,17 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
1249 1298
1250 memset(res, 0, sizeof(res)); 1299 memset(res, 0, sizeof(res));
1251 1300
1252 pdata.sysclk = *sysclk; 1301 pdata.sysclk = sysclk;
1253 1302
1254 prop = of_get_property(np, "reg", NULL); 1303 prop = of_get_property(np, "reg", NULL);
1255 if (!prop) 1304 if (!prop)
1256 goto err; 1305 goto err;
1257 pdata.bus_num = *(u32 *)prop; 1306 pdata.bus_num = *(u32 *)prop;
1258 1307
1308 prop = of_get_property(np, "cell-index", NULL);
1309 if (prop)
1310 i = *(u32 *)prop;
1311
1259 prop = of_get_property(np, "mode", NULL); 1312 prop = of_get_property(np, "mode", NULL);
1260 if (prop && !strcmp(prop, "cpu-qe")) 1313 if (prop && !strcmp(prop, "cpu-qe"))
1261 pdata.qe_mode = 1; 1314 pdata.qe_mode = 1;
@@ -1266,7 +1319,7 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
1266 } 1319 }
1267 1320
1268 if (!pdata.max_chipselect) 1321 if (!pdata.max_chipselect)
1269 goto err; 1322 continue;
1270 1323
1271 ret = of_address_to_resource(np, 0, &res[0]); 1324 ret = of_address_to_resource(np, 0, &res[0]);
1272 if (ret) 1325 if (ret)
@@ -1293,13 +1346,58 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,
1293 if (ret) 1346 if (ret)
1294 goto unreg; 1347 goto unreg;
1295 1348
1296 continue; 1349 goto next;
1297unreg: 1350unreg:
1298 platform_device_del(pdev); 1351 platform_device_del(pdev);
1299err: 1352err:
1300 continue; 1353 pr_err("%s: registration failed\n", np->full_name);
1354next:
1355 i++;
1356 }
1357
1358 return i;
1359}
1360
1361int __init fsl_spi_init(struct spi_board_info *board_infos,
1362 unsigned int num_board_infos,
1363 void (*activate_cs)(u8 cs, u8 polarity),
1364 void (*deactivate_cs)(u8 cs, u8 polarity))
1365{
1366 u32 sysclk = -1;
1367 int ret;
1368
1369#ifdef CONFIG_QUICC_ENGINE
1370 /* SPI controller is either clocked from QE or SoC clock */
1371 sysclk = get_brgfreq();
1372#endif
1373 if (sysclk == -1) {
1374 struct device_node *np;
1375 const u32 *freq;
1376 int size;
1377
1378 np = of_find_node_by_type(NULL, "soc");
1379 if (!np)
1380 return -ENODEV;
1381
1382 freq = of_get_property(np, "clock-frequency", &size);
1383 if (!freq || size != sizeof(*freq) || *freq == 0) {
1384 freq = of_get_property(np, "bus-frequency", &size);
1385 if (!freq || size != sizeof(*freq) || *freq == 0) {
1386 of_node_put(np);
1387 return -ENODEV;
1388 }
1389 }
1390
1391 sysclk = *freq;
1392 of_node_put(np);
1301 } 1393 }
1302 1394
1395 ret = of_fsl_spi_probe(NULL, "fsl,spi", sysclk, board_infos,
1396 num_board_infos, activate_cs, deactivate_cs);
1397 if (!ret)
1398 of_fsl_spi_probe("spi", "fsl_spi", sysclk, board_infos,
1399 num_board_infos, activate_cs, deactivate_cs);
1400
1303 return spi_register_board_info(board_infos, num_board_infos); 1401 return spi_register_board_info(board_infos, num_board_infos);
1304} 1402}
1305 1403
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index 11ad5622eb76..d502927644c6 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -57,7 +57,7 @@ void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
59 if (machine_is_compatible("PowerMac1,1")) 59 if (machine_is_compatible("PowerMac1,1"))
60 pci_assign_all_buses = 1; 60 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
61 if (machine_is_compatible("AAPL,PowerBook1998")) 61 if (machine_is_compatible("AAPL,PowerBook1998"))
62 grackle_set_loop_snoop(hose, 1); 62 grackle_set_loop_snoop(hose, 1);
63#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 e898ff4d2b97..ae0dbf4c1d66 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -30,11 +30,67 @@
30#include "ipic.h" 30#include "ipic.h"
31 31
32static struct ipic * primary_ipic; 32static struct ipic * primary_ipic;
33static struct irq_chip ipic_level_irq_chip, ipic_edge_irq_chip;
33static DEFINE_SPINLOCK(ipic_lock); 34static DEFINE_SPINLOCK(ipic_lock);
34 35
35static struct ipic_info ipic_info[] = { 36static struct ipic_info ipic_info[] = {
37 [1] = {
38 .mask = IPIC_SIMSR_H,
39 .prio = IPIC_SIPRR_C,
40 .force = IPIC_SIFCR_H,
41 .bit = 16,
42 .prio_mask = 0,
43 },
44 [2] = {
45 .mask = IPIC_SIMSR_H,
46 .prio = IPIC_SIPRR_C,
47 .force = IPIC_SIFCR_H,
48 .bit = 17,
49 .prio_mask = 1,
50 },
51 [3] = {
52 .mask = IPIC_SIMSR_H,
53 .prio = IPIC_SIPRR_C,
54 .force = IPIC_SIFCR_H,
55 .bit = 18,
56 .prio_mask = 2,
57 },
58 [4] = {
59 .mask = IPIC_SIMSR_H,
60 .prio = IPIC_SIPRR_C,
61 .force = IPIC_SIFCR_H,
62 .bit = 19,
63 .prio_mask = 3,
64 },
65 [5] = {
66 .mask = IPIC_SIMSR_H,
67 .prio = IPIC_SIPRR_C,
68 .force = IPIC_SIFCR_H,
69 .bit = 20,
70 .prio_mask = 4,
71 },
72 [6] = {
73 .mask = IPIC_SIMSR_H,
74 .prio = IPIC_SIPRR_C,
75 .force = IPIC_SIFCR_H,
76 .bit = 21,
77 .prio_mask = 5,
78 },
79 [7] = {
80 .mask = IPIC_SIMSR_H,
81 .prio = IPIC_SIPRR_C,
82 .force = IPIC_SIFCR_H,
83 .bit = 22,
84 .prio_mask = 6,
85 },
86 [8] = {
87 .mask = IPIC_SIMSR_H,
88 .prio = IPIC_SIPRR_C,
89 .force = IPIC_SIFCR_H,
90 .bit = 23,
91 .prio_mask = 7,
92 },
36 [9] = { 93 [9] = {
37 .pend = IPIC_SIPNR_H,
38 .mask = IPIC_SIMSR_H, 94 .mask = IPIC_SIMSR_H,
39 .prio = IPIC_SIPRR_D, 95 .prio = IPIC_SIPRR_D,
40 .force = IPIC_SIFCR_H, 96 .force = IPIC_SIFCR_H,
@@ -42,7 +98,6 @@ static struct ipic_info ipic_info[] = {
42 .prio_mask = 0, 98 .prio_mask = 0,
43 }, 99 },
44 [10] = { 100 [10] = {
45 .pend = IPIC_SIPNR_H,
46 .mask = IPIC_SIMSR_H, 101 .mask = IPIC_SIMSR_H,
47 .prio = IPIC_SIPRR_D, 102 .prio = IPIC_SIPRR_D,
48 .force = IPIC_SIFCR_H, 103 .force = IPIC_SIFCR_H,
@@ -50,15 +105,27 @@ static struct ipic_info ipic_info[] = {
50 .prio_mask = 1, 105 .prio_mask = 1,
51 }, 106 },
52 [11] = { 107 [11] = {
53 .pend = IPIC_SIPNR_H,
54 .mask = IPIC_SIMSR_H, 108 .mask = IPIC_SIMSR_H,
55 .prio = IPIC_SIPRR_D, 109 .prio = IPIC_SIPRR_D,
56 .force = IPIC_SIFCR_H, 110 .force = IPIC_SIFCR_H,
57 .bit = 26, 111 .bit = 26,
58 .prio_mask = 2, 112 .prio_mask = 2,
59 }, 113 },
114 [12] = {
115 .mask = IPIC_SIMSR_H,
116 .prio = IPIC_SIPRR_D,
117 .force = IPIC_SIFCR_H,
118 .bit = 27,
119 .prio_mask = 3,
120 },
121 [13] = {
122 .mask = IPIC_SIMSR_H,
123 .prio = IPIC_SIPRR_D,
124 .force = IPIC_SIFCR_H,
125 .bit = 28,
126 .prio_mask = 4,
127 },
60 [14] = { 128 [14] = {
61 .pend = IPIC_SIPNR_H,
62 .mask = IPIC_SIMSR_H, 129 .mask = IPIC_SIMSR_H,
63 .prio = IPIC_SIPRR_D, 130 .prio = IPIC_SIPRR_D,
64 .force = IPIC_SIFCR_H, 131 .force = IPIC_SIFCR_H,
@@ -66,7 +133,6 @@ static struct ipic_info ipic_info[] = {
66 .prio_mask = 5, 133 .prio_mask = 5,
67 }, 134 },
68 [15] = { 135 [15] = {
69 .pend = IPIC_SIPNR_H,
70 .mask = IPIC_SIMSR_H, 136 .mask = IPIC_SIMSR_H,
71 .prio = IPIC_SIPRR_D, 137 .prio = IPIC_SIPRR_D,
72 .force = IPIC_SIFCR_H, 138 .force = IPIC_SIFCR_H,
@@ -74,7 +140,6 @@ static struct ipic_info ipic_info[] = {
74 .prio_mask = 6, 140 .prio_mask = 6,
75 }, 141 },
76 [16] = { 142 [16] = {
77 .pend = IPIC_SIPNR_H,
78 .mask = IPIC_SIMSR_H, 143 .mask = IPIC_SIMSR_H,
79 .prio = IPIC_SIPRR_D, 144 .prio = IPIC_SIPRR_D,
80 .force = IPIC_SIFCR_H, 145 .force = IPIC_SIFCR_H,
@@ -82,7 +147,7 @@ static struct ipic_info ipic_info[] = {
82 .prio_mask = 7, 147 .prio_mask = 7,
83 }, 148 },
84 [17] = { 149 [17] = {
85 .pend = IPIC_SEPNR, 150 .ack = IPIC_SEPNR,
86 .mask = IPIC_SEMSR, 151 .mask = IPIC_SEMSR,
87 .prio = IPIC_SMPRR_A, 152 .prio = IPIC_SMPRR_A,
88 .force = IPIC_SEFCR, 153 .force = IPIC_SEFCR,
@@ -90,7 +155,7 @@ static struct ipic_info ipic_info[] = {
90 .prio_mask = 5, 155 .prio_mask = 5,
91 }, 156 },
92 [18] = { 157 [18] = {
93 .pend = IPIC_SEPNR, 158 .ack = IPIC_SEPNR,
94 .mask = IPIC_SEMSR, 159 .mask = IPIC_SEMSR,
95 .prio = IPIC_SMPRR_A, 160 .prio = IPIC_SMPRR_A,
96 .force = IPIC_SEFCR, 161 .force = IPIC_SEFCR,
@@ -98,7 +163,7 @@ static struct ipic_info ipic_info[] = {
98 .prio_mask = 6, 163 .prio_mask = 6,
99 }, 164 },
100 [19] = { 165 [19] = {
101 .pend = IPIC_SEPNR, 166 .ack = IPIC_SEPNR,
102 .mask = IPIC_SEMSR, 167 .mask = IPIC_SEMSR,
103 .prio = IPIC_SMPRR_A, 168 .prio = IPIC_SMPRR_A,
104 .force = IPIC_SEFCR, 169 .force = IPIC_SEFCR,
@@ -106,7 +171,7 @@ static struct ipic_info ipic_info[] = {
106 .prio_mask = 7, 171 .prio_mask = 7,
107 }, 172 },
108 [20] = { 173 [20] = {
109 .pend = IPIC_SEPNR, 174 .ack = IPIC_SEPNR,
110 .mask = IPIC_SEMSR, 175 .mask = IPIC_SEMSR,
111 .prio = IPIC_SMPRR_B, 176 .prio = IPIC_SMPRR_B,
112 .force = IPIC_SEFCR, 177 .force = IPIC_SEFCR,
@@ -114,7 +179,7 @@ static struct ipic_info ipic_info[] = {
114 .prio_mask = 4, 179 .prio_mask = 4,
115 }, 180 },
116 [21] = { 181 [21] = {
117 .pend = IPIC_SEPNR, 182 .ack = IPIC_SEPNR,
118 .mask = IPIC_SEMSR, 183 .mask = IPIC_SEMSR,
119 .prio = IPIC_SMPRR_B, 184 .prio = IPIC_SMPRR_B,
120 .force = IPIC_SEFCR, 185 .force = IPIC_SEFCR,
@@ -122,7 +187,7 @@ static struct ipic_info ipic_info[] = {
122 .prio_mask = 5, 187 .prio_mask = 5,
123 }, 188 },
124 [22] = { 189 [22] = {
125 .pend = IPIC_SEPNR, 190 .ack = IPIC_SEPNR,
126 .mask = IPIC_SEMSR, 191 .mask = IPIC_SEMSR,
127 .prio = IPIC_SMPRR_B, 192 .prio = IPIC_SMPRR_B,
128 .force = IPIC_SEFCR, 193 .force = IPIC_SEFCR,
@@ -130,7 +195,7 @@ static struct ipic_info ipic_info[] = {
130 .prio_mask = 6, 195 .prio_mask = 6,
131 }, 196 },
132 [23] = { 197 [23] = {
133 .pend = IPIC_SEPNR, 198 .ack = IPIC_SEPNR,
134 .mask = IPIC_SEMSR, 199 .mask = IPIC_SEMSR,
135 .prio = IPIC_SMPRR_B, 200 .prio = IPIC_SMPRR_B,
136 .force = IPIC_SEFCR, 201 .force = IPIC_SEFCR,
@@ -138,7 +203,6 @@ static struct ipic_info ipic_info[] = {
138 .prio_mask = 7, 203 .prio_mask = 7,
139 }, 204 },
140 [32] = { 205 [32] = {
141 .pend = IPIC_SIPNR_H,
142 .mask = IPIC_SIMSR_H, 206 .mask = IPIC_SIMSR_H,
143 .prio = IPIC_SIPRR_A, 207 .prio = IPIC_SIPRR_A,
144 .force = IPIC_SIFCR_H, 208 .force = IPIC_SIFCR_H,
@@ -146,7 +210,6 @@ static struct ipic_info ipic_info[] = {
146 .prio_mask = 0, 210 .prio_mask = 0,
147 }, 211 },
148 [33] = { 212 [33] = {
149 .pend = IPIC_SIPNR_H,
150 .mask = IPIC_SIMSR_H, 213 .mask = IPIC_SIMSR_H,
151 .prio = IPIC_SIPRR_A, 214 .prio = IPIC_SIPRR_A,
152 .force = IPIC_SIFCR_H, 215 .force = IPIC_SIFCR_H,
@@ -154,7 +217,6 @@ static struct ipic_info ipic_info[] = {
154 .prio_mask = 1, 217 .prio_mask = 1,
155 }, 218 },
156 [34] = { 219 [34] = {
157 .pend = IPIC_SIPNR_H,
158 .mask = IPIC_SIMSR_H, 220 .mask = IPIC_SIMSR_H,
159 .prio = IPIC_SIPRR_A, 221 .prio = IPIC_SIPRR_A,
160 .force = IPIC_SIFCR_H, 222 .force = IPIC_SIFCR_H,
@@ -162,7 +224,6 @@ static struct ipic_info ipic_info[] = {
162 .prio_mask = 2, 224 .prio_mask = 2,
163 }, 225 },
164 [35] = { 226 [35] = {
165 .pend = IPIC_SIPNR_H,
166 .mask = IPIC_SIMSR_H, 227 .mask = IPIC_SIMSR_H,
167 .prio = IPIC_SIPRR_A, 228 .prio = IPIC_SIPRR_A,
168 .force = IPIC_SIFCR_H, 229 .force = IPIC_SIFCR_H,
@@ -170,7 +231,6 @@ static struct ipic_info ipic_info[] = {
170 .prio_mask = 3, 231 .prio_mask = 3,
171 }, 232 },
172 [36] = { 233 [36] = {
173 .pend = IPIC_SIPNR_H,
174 .mask = IPIC_SIMSR_H, 234 .mask = IPIC_SIMSR_H,
175 .prio = IPIC_SIPRR_A, 235 .prio = IPIC_SIPRR_A,
176 .force = IPIC_SIFCR_H, 236 .force = IPIC_SIFCR_H,
@@ -178,7 +238,6 @@ static struct ipic_info ipic_info[] = {
178 .prio_mask = 4, 238 .prio_mask = 4,
179 }, 239 },
180 [37] = { 240 [37] = {
181 .pend = IPIC_SIPNR_H,
182 .mask = IPIC_SIMSR_H, 241 .mask = IPIC_SIMSR_H,
183 .prio = IPIC_SIPRR_A, 242 .prio = IPIC_SIPRR_A,
184 .force = IPIC_SIFCR_H, 243 .force = IPIC_SIFCR_H,
@@ -186,7 +245,6 @@ static struct ipic_info ipic_info[] = {
186 .prio_mask = 5, 245 .prio_mask = 5,
187 }, 246 },
188 [38] = { 247 [38] = {
189 .pend = IPIC_SIPNR_H,
190 .mask = IPIC_SIMSR_H, 248 .mask = IPIC_SIMSR_H,
191 .prio = IPIC_SIPRR_A, 249 .prio = IPIC_SIPRR_A,
192 .force = IPIC_SIFCR_H, 250 .force = IPIC_SIFCR_H,
@@ -194,15 +252,69 @@ static struct ipic_info ipic_info[] = {
194 .prio_mask = 6, 252 .prio_mask = 6,
195 }, 253 },
196 [39] = { 254 [39] = {
197 .pend = IPIC_SIPNR_H,
198 .mask = IPIC_SIMSR_H, 255 .mask = IPIC_SIMSR_H,
199 .prio = IPIC_SIPRR_A, 256 .prio = IPIC_SIPRR_A,
200 .force = IPIC_SIFCR_H, 257 .force = IPIC_SIFCR_H,
201 .bit = 7, 258 .bit = 7,
202 .prio_mask = 7, 259 .prio_mask = 7,
203 }, 260 },
261 [40] = {
262 .mask = IPIC_SIMSR_H,
263 .prio = IPIC_SIPRR_B,
264 .force = IPIC_SIFCR_H,
265 .bit = 8,
266 .prio_mask = 0,
267 },
268 [41] = {
269 .mask = IPIC_SIMSR_H,
270 .prio = IPIC_SIPRR_B,
271 .force = IPIC_SIFCR_H,
272 .bit = 9,
273 .prio_mask = 1,
274 },
275 [42] = {
276 .mask = IPIC_SIMSR_H,
277 .prio = IPIC_SIPRR_B,
278 .force = IPIC_SIFCR_H,
279 .bit = 10,
280 .prio_mask = 2,
281 },
282 [43] = {
283 .mask = IPIC_SIMSR_H,
284 .prio = IPIC_SIPRR_B,
285 .force = IPIC_SIFCR_H,
286 .bit = 11,
287 .prio_mask = 3,
288 },
289 [44] = {
290 .mask = IPIC_SIMSR_H,
291 .prio = IPIC_SIPRR_B,
292 .force = IPIC_SIFCR_H,
293 .bit = 12,
294 .prio_mask = 4,
295 },
296 [45] = {
297 .mask = IPIC_SIMSR_H,
298 .prio = IPIC_SIPRR_B,
299 .force = IPIC_SIFCR_H,
300 .bit = 13,
301 .prio_mask = 5,
302 },
303 [46] = {
304 .mask = IPIC_SIMSR_H,
305 .prio = IPIC_SIPRR_B,
306 .force = IPIC_SIFCR_H,
307 .bit = 14,
308 .prio_mask = 6,
309 },
310 [47] = {
311 .mask = IPIC_SIMSR_H,
312 .prio = IPIC_SIPRR_B,
313 .force = IPIC_SIFCR_H,
314 .bit = 15,
315 .prio_mask = 7,
316 },
204 [48] = { 317 [48] = {
205 .pend = IPIC_SEPNR,
206 .mask = IPIC_SEMSR, 318 .mask = IPIC_SEMSR,
207 .prio = IPIC_SMPRR_A, 319 .prio = IPIC_SMPRR_A,
208 .force = IPIC_SEFCR, 320 .force = IPIC_SEFCR,
@@ -210,7 +322,6 @@ static struct ipic_info ipic_info[] = {
210 .prio_mask = 4, 322 .prio_mask = 4,
211 }, 323 },
212 [64] = { 324 [64] = {
213 .pend = IPIC_SIPNR_L,
214 .mask = IPIC_SIMSR_L, 325 .mask = IPIC_SIMSR_L,
215 .prio = IPIC_SMPRR_A, 326 .prio = IPIC_SMPRR_A,
216 .force = IPIC_SIFCR_L, 327 .force = IPIC_SIFCR_L,
@@ -218,7 +329,6 @@ static struct ipic_info ipic_info[] = {
218 .prio_mask = 0, 329 .prio_mask = 0,
219 }, 330 },
220 [65] = { 331 [65] = {
221 .pend = IPIC_SIPNR_L,
222 .mask = IPIC_SIMSR_L, 332 .mask = IPIC_SIMSR_L,
223 .prio = IPIC_SMPRR_A, 333 .prio = IPIC_SMPRR_A,
224 .force = IPIC_SIFCR_L, 334 .force = IPIC_SIFCR_L,
@@ -226,7 +336,6 @@ static struct ipic_info ipic_info[] = {
226 .prio_mask = 1, 336 .prio_mask = 1,
227 }, 337 },
228 [66] = { 338 [66] = {
229 .pend = IPIC_SIPNR_L,
230 .mask = IPIC_SIMSR_L, 339 .mask = IPIC_SIMSR_L,
231 .prio = IPIC_SMPRR_A, 340 .prio = IPIC_SMPRR_A,
232 .force = IPIC_SIFCR_L, 341 .force = IPIC_SIFCR_L,
@@ -234,7 +343,6 @@ static struct ipic_info ipic_info[] = {
234 .prio_mask = 2, 343 .prio_mask = 2,
235 }, 344 },
236 [67] = { 345 [67] = {
237 .pend = IPIC_SIPNR_L,
238 .mask = IPIC_SIMSR_L, 346 .mask = IPIC_SIMSR_L,
239 .prio = IPIC_SMPRR_A, 347 .prio = IPIC_SMPRR_A,
240 .force = IPIC_SIFCR_L, 348 .force = IPIC_SIFCR_L,
@@ -242,7 +350,6 @@ static struct ipic_info ipic_info[] = {
242 .prio_mask = 3, 350 .prio_mask = 3,
243 }, 351 },
244 [68] = { 352 [68] = {
245 .pend = IPIC_SIPNR_L,
246 .mask = IPIC_SIMSR_L, 353 .mask = IPIC_SIMSR_L,
247 .prio = IPIC_SMPRR_B, 354 .prio = IPIC_SMPRR_B,
248 .force = IPIC_SIFCR_L, 355 .force = IPIC_SIFCR_L,
@@ -250,7 +357,6 @@ static struct ipic_info ipic_info[] = {
250 .prio_mask = 0, 357 .prio_mask = 0,
251 }, 358 },
252 [69] = { 359 [69] = {
253 .pend = IPIC_SIPNR_L,
254 .mask = IPIC_SIMSR_L, 360 .mask = IPIC_SIMSR_L,
255 .prio = IPIC_SMPRR_B, 361 .prio = IPIC_SMPRR_B,
256 .force = IPIC_SIFCR_L, 362 .force = IPIC_SIFCR_L,
@@ -258,7 +364,6 @@ static struct ipic_info ipic_info[] = {
258 .prio_mask = 1, 364 .prio_mask = 1,
259 }, 365 },
260 [70] = { 366 [70] = {
261 .pend = IPIC_SIPNR_L,
262 .mask = IPIC_SIMSR_L, 367 .mask = IPIC_SIMSR_L,
263 .prio = IPIC_SMPRR_B, 368 .prio = IPIC_SMPRR_B,
264 .force = IPIC_SIFCR_L, 369 .force = IPIC_SIFCR_L,
@@ -266,7 +371,6 @@ static struct ipic_info ipic_info[] = {
266 .prio_mask = 2, 371 .prio_mask = 2,
267 }, 372 },
268 [71] = { 373 [71] = {
269 .pend = IPIC_SIPNR_L,
270 .mask = IPIC_SIMSR_L, 374 .mask = IPIC_SIMSR_L,
271 .prio = IPIC_SMPRR_B, 375 .prio = IPIC_SMPRR_B,
272 .force = IPIC_SIFCR_L, 376 .force = IPIC_SIFCR_L,
@@ -274,96 +378,131 @@ static struct ipic_info ipic_info[] = {
274 .prio_mask = 3, 378 .prio_mask = 3,
275 }, 379 },
276 [72] = { 380 [72] = {
277 .pend = IPIC_SIPNR_L,
278 .mask = IPIC_SIMSR_L, 381 .mask = IPIC_SIMSR_L,
279 .prio = 0, 382 .prio = 0,
280 .force = IPIC_SIFCR_L, 383 .force = IPIC_SIFCR_L,
281 .bit = 8, 384 .bit = 8,
282 }, 385 },
283 [73] = { 386 [73] = {
284 .pend = IPIC_SIPNR_L,
285 .mask = IPIC_SIMSR_L, 387 .mask = IPIC_SIMSR_L,
286 .prio = 0, 388 .prio = 0,
287 .force = IPIC_SIFCR_L, 389 .force = IPIC_SIFCR_L,
288 .bit = 9, 390 .bit = 9,
289 }, 391 },
290 [74] = { 392 [74] = {
291 .pend = IPIC_SIPNR_L,
292 .mask = IPIC_SIMSR_L, 393 .mask = IPIC_SIMSR_L,
293 .prio = 0, 394 .prio = 0,
294 .force = IPIC_SIFCR_L, 395 .force = IPIC_SIFCR_L,
295 .bit = 10, 396 .bit = 10,
296 }, 397 },
297 [75] = { 398 [75] = {
298 .pend = IPIC_SIPNR_L,
299 .mask = IPIC_SIMSR_L, 399 .mask = IPIC_SIMSR_L,
300 .prio = 0, 400 .prio = 0,
301 .force = IPIC_SIFCR_L, 401 .force = IPIC_SIFCR_L,
302 .bit = 11, 402 .bit = 11,
303 }, 403 },
304 [76] = { 404 [76] = {
305 .pend = IPIC_SIPNR_L,
306 .mask = IPIC_SIMSR_L, 405 .mask = IPIC_SIMSR_L,
307 .prio = 0, 406 .prio = 0,
308 .force = IPIC_SIFCR_L, 407 .force = IPIC_SIFCR_L,
309 .bit = 12, 408 .bit = 12,
310 }, 409 },
311 [77] = { 410 [77] = {
312 .pend = IPIC_SIPNR_L,
313 .mask = IPIC_SIMSR_L, 411 .mask = IPIC_SIMSR_L,
314 .prio = 0, 412 .prio = 0,
315 .force = IPIC_SIFCR_L, 413 .force = IPIC_SIFCR_L,
316 .bit = 13, 414 .bit = 13,
317 }, 415 },
318 [78] = { 416 [78] = {
319 .pend = IPIC_SIPNR_L,
320 .mask = IPIC_SIMSR_L, 417 .mask = IPIC_SIMSR_L,
321 .prio = 0, 418 .prio = 0,
322 .force = IPIC_SIFCR_L, 419 .force = IPIC_SIFCR_L,
323 .bit = 14, 420 .bit = 14,
324 }, 421 },
325 [79] = { 422 [79] = {
326 .pend = IPIC_SIPNR_L,
327 .mask = IPIC_SIMSR_L, 423 .mask = IPIC_SIMSR_L,
328 .prio = 0, 424 .prio = 0,
329 .force = IPIC_SIFCR_L, 425 .force = IPIC_SIFCR_L,
330 .bit = 15, 426 .bit = 15,
331 }, 427 },
332 [80] = { 428 [80] = {
333 .pend = IPIC_SIPNR_L,
334 .mask = IPIC_SIMSR_L, 429 .mask = IPIC_SIMSR_L,
335 .prio = 0, 430 .prio = 0,
336 .force = IPIC_SIFCR_L, 431 .force = IPIC_SIFCR_L,
337 .bit = 16, 432 .bit = 16,
338 }, 433 },
434 [81] = {
435 .mask = IPIC_SIMSR_L,
436 .prio = 0,
437 .force = IPIC_SIFCR_L,
438 .bit = 17,
439 },
440 [82] = {
441 .mask = IPIC_SIMSR_L,
442 .prio = 0,
443 .force = IPIC_SIFCR_L,
444 .bit = 18,
445 },
446 [83] = {
447 .mask = IPIC_SIMSR_L,
448 .prio = 0,
449 .force = IPIC_SIFCR_L,
450 .bit = 19,
451 },
339 [84] = { 452 [84] = {
340 .pend = IPIC_SIPNR_L,
341 .mask = IPIC_SIMSR_L, 453 .mask = IPIC_SIMSR_L,
342 .prio = 0, 454 .prio = 0,
343 .force = IPIC_SIFCR_L, 455 .force = IPIC_SIFCR_L,
344 .bit = 20, 456 .bit = 20,
345 }, 457 },
346 [85] = { 458 [85] = {
347 .pend = IPIC_SIPNR_L,
348 .mask = IPIC_SIMSR_L, 459 .mask = IPIC_SIMSR_L,
349 .prio = 0, 460 .prio = 0,
350 .force = IPIC_SIFCR_L, 461 .force = IPIC_SIFCR_L,
351 .bit = 21, 462 .bit = 21,
352 }, 463 },
464 [86] = {
465 .mask = IPIC_SIMSR_L,
466 .prio = 0,
467 .force = IPIC_SIFCR_L,
468 .bit = 22,
469 },
470 [87] = {
471 .mask = IPIC_SIMSR_L,
472 .prio = 0,
473 .force = IPIC_SIFCR_L,
474 .bit = 23,
475 },
476 [88] = {
477 .mask = IPIC_SIMSR_L,
478 .prio = 0,
479 .force = IPIC_SIFCR_L,
480 .bit = 24,
481 },
482 [89] = {
483 .mask = IPIC_SIMSR_L,
484 .prio = 0,
485 .force = IPIC_SIFCR_L,
486 .bit = 25,
487 },
353 [90] = { 488 [90] = {
354 .pend = IPIC_SIPNR_L,
355 .mask = IPIC_SIMSR_L, 489 .mask = IPIC_SIMSR_L,
356 .prio = 0, 490 .prio = 0,
357 .force = IPIC_SIFCR_L, 491 .force = IPIC_SIFCR_L,
358 .bit = 26, 492 .bit = 26,
359 }, 493 },
360 [91] = { 494 [91] = {
361 .pend = IPIC_SIPNR_L,
362 .mask = IPIC_SIMSR_L, 495 .mask = IPIC_SIMSR_L,
363 .prio = 0, 496 .prio = 0,
364 .force = IPIC_SIFCR_L, 497 .force = IPIC_SIFCR_L,
365 .bit = 27, 498 .bit = 27,
366 }, 499 },
500 [94] = {
501 .mask = IPIC_SIMSR_L,
502 .prio = 0,
503 .force = IPIC_SIFCR_L,
504 .bit = 30,
505 },
367}; 506};
368 507
369static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg) 508static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg)
@@ -412,6 +551,10 @@ static void ipic_mask_irq(unsigned int virq)
412 temp &= ~(1 << (31 - ipic_info[src].bit)); 551 temp &= ~(1 << (31 - ipic_info[src].bit));
413 ipic_write(ipic->regs, ipic_info[src].mask, temp); 552 ipic_write(ipic->regs, ipic_info[src].mask, temp);
414 553
554 /* mb() can't guarantee that masking is finished. But it does finish
555 * for nearly all cases. */
556 mb();
557
415 spin_unlock_irqrestore(&ipic_lock, flags); 558 spin_unlock_irqrestore(&ipic_lock, flags);
416} 559}
417 560
@@ -424,9 +567,13 @@ static void ipic_ack_irq(unsigned int virq)
424 567
425 spin_lock_irqsave(&ipic_lock, flags); 568 spin_lock_irqsave(&ipic_lock, flags);
426 569
427 temp = ipic_read(ipic->regs, ipic_info[src].pend); 570 temp = ipic_read(ipic->regs, ipic_info[src].ack);
428 temp |= (1 << (31 - ipic_info[src].bit)); 571 temp |= (1 << (31 - ipic_info[src].bit));
429 ipic_write(ipic->regs, ipic_info[src].pend, temp); 572 ipic_write(ipic->regs, ipic_info[src].ack, temp);
573
574 /* mb() can't guarantee that ack is finished. But it does finish
575 * for nearly all cases. */
576 mb();
430 577
431 spin_unlock_irqrestore(&ipic_lock, flags); 578 spin_unlock_irqrestore(&ipic_lock, flags);
432} 579}
@@ -444,9 +591,13 @@ static void ipic_mask_irq_and_ack(unsigned int virq)
444 temp &= ~(1 << (31 - ipic_info[src].bit)); 591 temp &= ~(1 << (31 - ipic_info[src].bit));
445 ipic_write(ipic->regs, ipic_info[src].mask, temp); 592 ipic_write(ipic->regs, ipic_info[src].mask, temp);
446 593
447 temp = ipic_read(ipic->regs, ipic_info[src].pend); 594 temp = ipic_read(ipic->regs, ipic_info[src].ack);
448 temp |= (1 << (31 - ipic_info[src].bit)); 595 temp |= (1 << (31 - ipic_info[src].bit));
449 ipic_write(ipic->regs, ipic_info[src].pend, temp); 596 ipic_write(ipic->regs, ipic_info[src].ack, temp);
597
598 /* mb() can't guarantee that ack is finished. But it does finish
599 * for nearly all cases. */
600 mb();
450 601
451 spin_unlock_irqrestore(&ipic_lock, flags); 602 spin_unlock_irqrestore(&ipic_lock, flags);
452} 603}
@@ -468,14 +619,22 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
468 flow_type); 619 flow_type);
469 return -EINVAL; 620 return -EINVAL;
470 } 621 }
622 /* ipic supports only edge mode on external interrupts */
623 if ((flow_type & IRQ_TYPE_EDGE_FALLING) && !ipic_info[src].ack) {
624 printk(KERN_ERR "ipic: edge sense not supported on internal "
625 "interrupts\n");
626 return -EINVAL;
627 }
471 628
472 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL); 629 desc->status &= ~(IRQ_TYPE_SENSE_MASK | IRQ_LEVEL);
473 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK; 630 desc->status |= flow_type & IRQ_TYPE_SENSE_MASK;
474 if (flow_type & IRQ_TYPE_LEVEL_LOW) { 631 if (flow_type & IRQ_TYPE_LEVEL_LOW) {
475 desc->status |= IRQ_LEVEL; 632 desc->status |= IRQ_LEVEL;
476 desc->handle_irq = handle_level_irq; 633 desc->handle_irq = handle_level_irq;
634 desc->chip = &ipic_level_irq_chip;
477 } else { 635 } else {
478 desc->handle_irq = handle_edge_irq; 636 desc->handle_irq = handle_edge_irq;
637 desc->chip = &ipic_edge_irq_chip;
479 } 638 }
480 639
481 /* only EXT IRQ senses are programmable on ipic 640 /* only EXT IRQ senses are programmable on ipic
@@ -500,7 +659,16 @@ static int ipic_set_irq_type(unsigned int virq, unsigned int flow_type)
500 return 0; 659 return 0;
501} 660}
502 661
503static struct irq_chip ipic_irq_chip = { 662/* level interrupts and edge interrupts have different ack operations */
663static struct irq_chip ipic_level_irq_chip = {
664 .typename = " IPIC ",
665 .unmask = ipic_unmask_irq,
666 .mask = ipic_mask_irq,
667 .mask_ack = ipic_mask_irq,
668 .set_type = ipic_set_irq_type,
669};
670
671static struct irq_chip ipic_edge_irq_chip = {
504 .typename = " IPIC ", 672 .typename = " IPIC ",
505 .unmask = ipic_unmask_irq, 673 .unmask = ipic_unmask_irq,
506 .mask = ipic_mask_irq, 674 .mask = ipic_mask_irq,
@@ -519,13 +687,9 @@ static int ipic_host_map(struct irq_host *h, unsigned int virq,
519 irq_hw_number_t hw) 687 irq_hw_number_t hw)
520{ 688{
521 struct ipic *ipic = h->host_data; 689 struct ipic *ipic = h->host_data;
522 struct irq_chip *chip;
523
524 /* Default chip */
525 chip = &ipic->hc_irq;
526 690
527 set_irq_chip_data(virq, ipic); 691 set_irq_chip_data(virq, ipic);
528 set_irq_chip_and_handler(virq, chip, handle_level_irq); 692 set_irq_chip_and_handler(virq, &ipic_level_irq_chip, handle_level_irq);
529 693
530 /* Set default irq type */ 694 /* Set default irq type */
531 set_irq_type(virq, IRQ_TYPE_NONE); 695 set_irq_type(virq, IRQ_TYPE_NONE);
@@ -584,7 +748,6 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
584 ipic->regs = ioremap(res.start, res.end - res.start + 1); 748 ipic->regs = ioremap(res.start, res.end - res.start + 1);
585 749
586 ipic->irqhost->host_data = ipic; 750 ipic->irqhost->host_data = ipic;
587 ipic->hc_irq = ipic_irq_chip;
588 751
589 /* init hw */ 752 /* init hw */
590 ipic_write(ipic->regs, IPIC_SICNR, 0x0); 753 ipic_write(ipic->regs, IPIC_SICNR, 0x0);
@@ -593,6 +756,10 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
593 * configure SICFR accordingly */ 756 * configure SICFR accordingly */
594 if (flags & IPIC_SPREADMODE_GRP_A) 757 if (flags & IPIC_SPREADMODE_GRP_A)
595 temp |= SICFR_IPSA; 758 temp |= SICFR_IPSA;
759 if (flags & IPIC_SPREADMODE_GRP_B)
760 temp |= SICFR_IPSB;
761 if (flags & IPIC_SPREADMODE_GRP_C)
762 temp |= SICFR_IPSC;
596 if (flags & IPIC_SPREADMODE_GRP_D) 763 if (flags & IPIC_SPREADMODE_GRP_D)
597 temp |= SICFR_IPSD; 764 temp |= SICFR_IPSD;
598 if (flags & IPIC_SPREADMODE_MIX_A) 765 if (flags & IPIC_SPREADMODE_MIX_A)
@@ -600,7 +767,7 @@ struct ipic * __init ipic_init(struct device_node *node, unsigned int flags)
600 if (flags & IPIC_SPREADMODE_MIX_B) 767 if (flags & IPIC_SPREADMODE_MIX_B)
601 temp |= SICFR_MPSB; 768 temp |= SICFR_MPSB;
602 769
603 ipic_write(ipic->regs, IPIC_SICNR, temp); 770 ipic_write(ipic->regs, IPIC_SICFR, temp);
604 771
605 /* handle MCP route */ 772 /* handle MCP route */
606 temp = 0; 773 temp = 0;
@@ -672,10 +839,12 @@ void ipic_set_highest_priority(unsigned int virq)
672 839
673void ipic_set_default_priority(void) 840void ipic_set_default_priority(void)
674{ 841{
675 ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_SIPRR_A_DEFAULT); 842 ipic_write(primary_ipic->regs, IPIC_SIPRR_A, IPIC_PRIORITY_DEFAULT);
676 ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_SIPRR_D_DEFAULT); 843 ipic_write(primary_ipic->regs, IPIC_SIPRR_B, IPIC_PRIORITY_DEFAULT);
677 ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_SMPRR_A_DEFAULT); 844 ipic_write(primary_ipic->regs, IPIC_SIPRR_C, IPIC_PRIORITY_DEFAULT);
678 ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_SMPRR_B_DEFAULT); 845 ipic_write(primary_ipic->regs, IPIC_SIPRR_D, IPIC_PRIORITY_DEFAULT);
846 ipic_write(primary_ipic->regs, IPIC_SMPRR_A, IPIC_PRIORITY_DEFAULT);
847 ipic_write(primary_ipic->regs, IPIC_SMPRR_B, IPIC_PRIORITY_DEFAULT);
679} 848}
680 849
681void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq) 850void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
diff --git a/arch/powerpc/sysdev/ipic.h b/arch/powerpc/sysdev/ipic.h
index bb309a501b2d..9391c57b0c51 100644
--- a/arch/powerpc/sysdev/ipic.h
+++ b/arch/powerpc/sysdev/ipic.h
@@ -23,13 +23,12 @@
23#define IPIC_IRQ_EXT7 23 23#define IPIC_IRQ_EXT7 23
24 24
25/* Default Priority Registers */ 25/* Default Priority Registers */
26#define IPIC_SIPRR_A_DEFAULT 0x05309770 26#define IPIC_PRIORITY_DEFAULT 0x05309770
27#define IPIC_SIPRR_D_DEFAULT 0x05309770
28#define IPIC_SMPRR_A_DEFAULT 0x05309770
29#define IPIC_SMPRR_B_DEFAULT 0x05309770
30 27
31/* System Global Interrupt Configuration Register */ 28/* System Global Interrupt Configuration Register */
32#define SICFR_IPSA 0x00010000 29#define SICFR_IPSA 0x00010000
30#define SICFR_IPSB 0x00020000
31#define SICFR_IPSC 0x00040000
33#define SICFR_IPSD 0x00080000 32#define SICFR_IPSD 0x00080000
34#define SICFR_MPSA 0x00200000 33#define SICFR_MPSA 0x00200000
35#define SICFR_MPSB 0x00400000 34#define SICFR_MPSB 0x00400000
@@ -45,13 +44,11 @@ struct ipic {
45 44
46 /* The remapper for this IPIC */ 45 /* The remapper for this IPIC */
47 struct irq_host *irqhost; 46 struct irq_host *irqhost;
48
49 /* The "linux" controller struct */
50 struct irq_chip hc_irq;
51}; 47};
52 48
53struct ipic_info { 49struct ipic_info {
54 u8 pend; /* pending register offset from base */ 50 u8 ack; /* pending register offset from base if the irq
51 supports ack operation */
55 u8 mask; /* mask register offset from base */ 52 u8 mask; /* mask register offset from base */
56 u8 prio; /* priority register offset from base */ 53 u8 prio; /* priority register offset from base */
57 u8 force; /* force register offset from base */ 54 u8 force; /* force register offset from base */
diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c
index 712b10a55f87..d8d602840757 100644
--- a/arch/powerpc/sysdev/micropatch.c
+++ b/arch/powerpc/sysdev/micropatch.c
@@ -16,7 +16,7 @@
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#include <asm/8xx_immap.h> 18#include <asm/8xx_immap.h>
19#include <asm/commproc.h> 19#include <asm/cpm1.h>
20 20
21/* 21/*
22 * I2C/SPI relocation patch arrays. 22 * I2C/SPI relocation patch arrays.
diff --git a/arch/powerpc/sysdev/mmio_nvram.c b/arch/powerpc/sysdev/mmio_nvram.c
index e073e246293d..7b49633a4bd0 100644
--- a/arch/powerpc/sysdev/mmio_nvram.c
+++ b/arch/powerpc/sysdev/mmio_nvram.c
@@ -99,7 +99,7 @@ int __init mmio_nvram_init(void)
99 nvram_addr = r.start; 99 nvram_addr = r.start;
100 mmio_nvram_len = r.end - r.start + 1; 100 mmio_nvram_len = r.end - r.start + 1;
101 if ( (!mmio_nvram_len) || (!nvram_addr) ) { 101 if ( (!mmio_nvram_len) || (!nvram_addr) ) {
102 printk(KERN_WARNING "nvram: address or lenght is 0\n"); 102 printk(KERN_WARNING "nvram: address or length is 0\n");
103 ret = -EIO; 103 ret = -EIO;
104 goto out; 104 goto out;
105 } 105 }
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
index 7aa4ff5f5ec8..0e74a4bd9827 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.c
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -10,7 +10,6 @@
10#include <asm/irq.h> 10#include <asm/irq.h>
11#include <asm/io.h> 11#include <asm/io.h>
12#include <asm/8xx_immap.h> 12#include <asm/8xx_immap.h>
13#include <asm/mpc8xx.h>
14 13
15#include "mpc8xx_pic.h" 14#include "mpc8xx_pic.h"
16 15
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 212a94f5d34b..6ffdda244bb1 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -83,6 +83,7 @@ static u32 mpic_infos[][MPIC_IDX_END] = {
83 MPIC_CPU_WHOAMI, 83 MPIC_CPU_WHOAMI,
84 MPIC_CPU_INTACK, 84 MPIC_CPU_INTACK,
85 MPIC_CPU_EOI, 85 MPIC_CPU_EOI,
86 MPIC_CPU_MCACK,
86 87
87 MPIC_IRQ_BASE, 88 MPIC_IRQ_BASE,
88 MPIC_IRQ_STRIDE, 89 MPIC_IRQ_STRIDE,
@@ -121,6 +122,7 @@ static u32 mpic_infos[][MPIC_IDX_END] = {
121 TSI108_CPU_WHOAMI, 122 TSI108_CPU_WHOAMI,
122 TSI108_CPU_INTACK, 123 TSI108_CPU_INTACK,
123 TSI108_CPU_EOI, 124 TSI108_CPU_EOI,
125 TSI108_CPU_MCACK,
124 126
125 TSI108_IRQ_BASE, 127 TSI108_IRQ_BASE,
126 TSI108_IRQ_STRIDE, 128 TSI108_IRQ_STRIDE,
@@ -265,7 +267,7 @@ static inline void _mpic_irq_write(struct mpic *mpic, unsigned int src_no,
265 */ 267 */
266 268
267 269
268static void _mpic_map_mmio(struct mpic *mpic, unsigned long phys_addr, 270static void _mpic_map_mmio(struct mpic *mpic, phys_addr_t phys_addr,
269 struct mpic_reg_bank *rb, unsigned int offset, 271 struct mpic_reg_bank *rb, unsigned int offset,
270 unsigned int size) 272 unsigned int size)
271{ 273{
@@ -285,7 +287,7 @@ static void _mpic_map_dcr(struct mpic *mpic, struct mpic_reg_bank *rb,
285 BUG_ON(!DCR_MAP_OK(rb->dhost)); 287 BUG_ON(!DCR_MAP_OK(rb->dhost));
286} 288}
287 289
288static inline void mpic_map(struct mpic *mpic, unsigned long phys_addr, 290static inline void mpic_map(struct mpic *mpic, phys_addr_t phys_addr,
289 struct mpic_reg_bank *rb, unsigned int offset, 291 struct mpic_reg_bank *rb, unsigned int offset,
290 unsigned int size) 292 unsigned int size)
291{ 293{
@@ -612,12 +614,11 @@ static inline void mpic_eoi(struct mpic *mpic)
612} 614}
613 615
614#ifdef CONFIG_SMP 616#ifdef CONFIG_SMP
615static irqreturn_t mpic_ipi_action(int irq, void *dev_id) 617static irqreturn_t mpic_ipi_action(int irq, void *data)
616{ 618{
617 struct mpic *mpic; 619 long ipi = (long)data;
618 620
619 mpic = mpic_find(irq, NULL); 621 smp_message_recv(ipi);
620 smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
621 622
622 return IRQ_HANDLED; 623 return IRQ_HANDLED;
623} 624}
@@ -842,6 +843,24 @@ int mpic_set_irq_type(unsigned int virq, unsigned int flow_type)
842 return 0; 843 return 0;
843} 844}
844 845
846void mpic_set_vector(unsigned int virq, unsigned int vector)
847{
848 struct mpic *mpic = mpic_from_irq(virq);
849 unsigned int src = mpic_irq_to_hw(virq);
850 unsigned int vecpri;
851
852 DBG("mpic: set_vector(mpic:@%p,virq:%d,src:%d,vector:0x%x)\n",
853 mpic, virq, src, vector);
854
855 if (src >= mpic->irq_count)
856 return;
857
858 vecpri = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
859 vecpri = vecpri & ~MPIC_INFO(VECPRI_VECTOR_MASK);
860 vecpri |= vector;
861 mpic_irq_write(src, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
862}
863
845static struct irq_chip mpic_irq_chip = { 864static struct irq_chip mpic_irq_chip = {
846 .mask = mpic_mask_irq, 865 .mask = mpic_mask_irq,
847 .unmask = mpic_unmask_irq, 866 .unmask = mpic_unmask_irq,
@@ -1109,6 +1128,11 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1109 mb(); 1128 mb();
1110 } 1129 }
1111 1130
1131 if (flags & MPIC_ENABLE_MCK)
1132 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1133 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1134 | MPIC_GREG_GCONF_MCK);
1135
1112 /* Read feature register, calculate num CPUs and, for non-ISU 1136 /* Read feature register, calculate num CPUs and, for non-ISU
1113 * MPICs, num sources as well. On ISU MPICs, sources are counted 1137 * MPICs, num sources as well. On ISU MPICs, sources are counted
1114 * as ISUs are added 1138 * as ISUs are added
@@ -1230,6 +1254,8 @@ void __init mpic_init(struct mpic *mpic)
1230 mpic_u3msi_init(mpic); 1254 mpic_u3msi_init(mpic);
1231 } 1255 }
1232 1256
1257 mpic_pasemi_msi_init(mpic);
1258
1233 for (i = 0; i < mpic->num_sources; i++) { 1259 for (i = 0; i < mpic->num_sources; i++) {
1234 /* start with vector = source number, and masked */ 1260 /* start with vector = source number, and masked */
1235 u32 vecpri = MPIC_VECPRI_MASK | i | 1261 u32 vecpri = MPIC_VECPRI_MASK | i |
@@ -1253,6 +1279,11 @@ void __init mpic_init(struct mpic *mpic)
1253 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0)) 1279 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1254 | MPIC_GREG_GCONF_8259_PTHROU_DIS); 1280 | MPIC_GREG_GCONF_8259_PTHROU_DIS);
1255 1281
1282 if (mpic->flags & MPIC_NO_BIAS)
1283 mpic_write(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0),
1284 mpic_read(mpic->gregs, MPIC_INFO(GREG_GLOBAL_CONF_0))
1285 | MPIC_GREG_GCONF_NO_BIAS);
1286
1256 /* Set current processor priority to 0 */ 1287 /* Set current processor priority to 0 */
1257 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0); 1288 mpic_cpu_write(MPIC_INFO(CPU_CURRENT_TASK_PRI), 0);
1258 1289
@@ -1419,13 +1450,13 @@ void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask)
1419 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); 1450 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
1420} 1451}
1421 1452
1422unsigned int mpic_get_one_irq(struct mpic *mpic) 1453static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
1423{ 1454{
1424 u32 src; 1455 u32 src;
1425 1456
1426 src = mpic_cpu_read(MPIC_INFO(CPU_INTACK)) & MPIC_INFO(VECPRI_VECTOR_MASK); 1457 src = mpic_cpu_read(reg) & MPIC_INFO(VECPRI_VECTOR_MASK);
1427#ifdef DEBUG_LOW 1458#ifdef DEBUG_LOW
1428 DBG("%s: get_one_irq(): %d\n", mpic->name, src); 1459 DBG("%s: get_one_irq(reg 0x%x): %d\n", mpic->name, reg, src);
1429#endif 1460#endif
1430 if (unlikely(src == mpic->spurious_vec)) { 1461 if (unlikely(src == mpic->spurious_vec)) {
1431 if (mpic->flags & MPIC_SPV_EOI) 1462 if (mpic->flags & MPIC_SPV_EOI)
@@ -1443,6 +1474,11 @@ unsigned int mpic_get_one_irq(struct mpic *mpic)
1443 return irq_linear_revmap(mpic->irqhost, src); 1474 return irq_linear_revmap(mpic->irqhost, src);
1444} 1475}
1445 1476
1477unsigned int mpic_get_one_irq(struct mpic *mpic)
1478{
1479 return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_INTACK));
1480}
1481
1446unsigned int mpic_get_irq(void) 1482unsigned int mpic_get_irq(void)
1447{ 1483{
1448 struct mpic *mpic = mpic_primary; 1484 struct mpic *mpic = mpic_primary;
@@ -1452,12 +1488,20 @@ unsigned int mpic_get_irq(void)
1452 return mpic_get_one_irq(mpic); 1488 return mpic_get_one_irq(mpic);
1453} 1489}
1454 1490
1491unsigned int mpic_get_mcirq(void)
1492{
1493 struct mpic *mpic = mpic_primary;
1494
1495 BUG_ON(mpic == NULL);
1496
1497 return _mpic_get_one_irq(mpic, MPIC_INFO(CPU_MCACK));
1498}
1455 1499
1456#ifdef CONFIG_SMP 1500#ifdef CONFIG_SMP
1457void mpic_request_ipis(void) 1501void mpic_request_ipis(void)
1458{ 1502{
1459 struct mpic *mpic = mpic_primary; 1503 struct mpic *mpic = mpic_primary;
1460 int i, err; 1504 long i, err;
1461 static char *ipi_names[] = { 1505 static char *ipi_names[] = {
1462 "IPI0 (call function)", 1506 "IPI0 (call function)",
1463 "IPI1 (reschedule)", 1507 "IPI1 (reschedule)",
@@ -1472,14 +1516,14 @@ void mpic_request_ipis(void)
1472 unsigned int vipi = irq_create_mapping(mpic->irqhost, 1516 unsigned int vipi = irq_create_mapping(mpic->irqhost,
1473 mpic->ipi_vecs[0] + i); 1517 mpic->ipi_vecs[0] + i);
1474 if (vipi == NO_IRQ) { 1518 if (vipi == NO_IRQ) {
1475 printk(KERN_ERR "Failed to map IPI %d\n", i); 1519 printk(KERN_ERR "Failed to map IPI %ld\n", i);
1476 break; 1520 break;
1477 } 1521 }
1478 err = request_irq(vipi, mpic_ipi_action, 1522 err = request_irq(vipi, mpic_ipi_action,
1479 IRQF_DISABLED|IRQF_PERCPU, 1523 IRQF_DISABLED|IRQF_PERCPU,
1480 ipi_names[i], mpic); 1524 ipi_names[i], (void *)i);
1481 if (err) { 1525 if (err) {
1482 printk(KERN_ERR "Request of irq %d for IPI %d failed\n", 1526 printk(KERN_ERR "Request of irq %d for IPI %ld failed\n",
1483 vipi, i); 1527 vipi, i);
1484 break; 1528 break;
1485 } 1529 }
diff --git a/arch/powerpc/sysdev/mpic.h b/arch/powerpc/sysdev/mpic.h
index 1cb6bd841027..fbf8a266941c 100644
--- a/arch/powerpc/sysdev/mpic.h
+++ b/arch/powerpc/sysdev/mpic.h
@@ -17,6 +17,7 @@ extern int mpic_msi_init_allocator(struct mpic *mpic);
17extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num); 17extern irq_hw_number_t mpic_msi_alloc_hwirqs(struct mpic *mpic, int num);
18extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num); 18extern void mpic_msi_free_hwirqs(struct mpic *mpic, int offset, int num);
19extern int mpic_u3msi_init(struct mpic *mpic); 19extern int mpic_u3msi_init(struct mpic *mpic);
20extern int mpic_pasemi_msi_init(struct mpic *mpic);
20#else 21#else
21static inline void mpic_msi_reserve_hwirq(struct mpic *mpic, 22static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
22 irq_hw_number_t hwirq) 23 irq_hw_number_t hwirq)
@@ -28,12 +29,15 @@ static inline int mpic_u3msi_init(struct mpic *mpic)
28{ 29{
29 return -1; 30 return -1;
30} 31}
32
33static inline int mpic_pasemi_msi_init(struct mpic *mpic)
34{
35 return -1;
36}
31#endif 37#endif
32 38
33extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type); 39extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
34extern void mpic_end_irq(unsigned int irq); 40extern void mpic_set_vector(unsigned int virq, unsigned int vector);
35extern void mpic_mask_irq(unsigned int irq);
36extern void mpic_unmask_irq(unsigned int irq);
37extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask); 41extern void mpic_set_affinity(unsigned int irq, cpumask_t cpumask);
38 42
39#endif /* _POWERPC_SYSDEV_MPIC_H */ 43#endif /* _POWERPC_SYSDEV_MPIC_H */
diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c
new file mode 100644
index 000000000000..d6bfda30ac87
--- /dev/null
+++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c
@@ -0,0 +1,172 @@
1/*
2 * Copyright 2007, Olof Johansson, PA Semi
3 *
4 * Based on arch/powerpc/sysdev/mpic_u3msi.c:
5 *
6 * Copyright 2006, Segher Boessenkool, IBM Corporation.
7 * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; version 2 of the
12 * License.
13 *
14 */
15
16#undef DEBUG
17
18#include <linux/irq.h>
19#include <linux/bootmem.h>
20#include <linux/msi.h>
21#include <asm/mpic.h>
22#include <asm/prom.h>
23#include <asm/hw_irq.h>
24#include <asm/ppc-pci.h>
25
26#include "mpic.h"
27
28/* Allocate 16 interrupts per device, to give an alignment of 16,
29 * since that's the size of the grouping w.r.t. affinity. If someone
30 * needs more than 32 MSI's down the road we'll have to rethink this,
31 * but it should be OK for now.
32 */
33#define ALLOC_CHUNK 16
34
35#define PASEMI_MSI_ADDR 0xfc080000
36
37/* A bit ugly, can we get this from the pci_dev somehow? */
38static struct mpic *msi_mpic;
39
40
41static void mpic_pasemi_msi_mask_irq(unsigned int irq)
42{
43 pr_debug("mpic_pasemi_msi_mask_irq %d\n", irq);
44 mask_msi_irq(irq);
45 mpic_mask_irq(irq);
46}
47
48static void mpic_pasemi_msi_unmask_irq(unsigned int irq)
49{
50 pr_debug("mpic_pasemi_msi_unmask_irq %d\n", irq);
51 mpic_unmask_irq(irq);
52 unmask_msi_irq(irq);
53}
54
55static struct irq_chip mpic_pasemi_msi_chip = {
56 .shutdown = mpic_pasemi_msi_mask_irq,
57 .mask = mpic_pasemi_msi_mask_irq,
58 .unmask = mpic_pasemi_msi_unmask_irq,
59 .eoi = mpic_end_irq,
60 .set_type = mpic_set_irq_type,
61 .set_affinity = mpic_set_affinity,
62 .typename = "PASEMI-MSI ",
63};
64
65static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)
66{
67 if (type == PCI_CAP_ID_MSIX)
68 pr_debug("pasemi_msi: MSI-X untested, trying anyway\n");
69
70 return 0;
71}
72
73static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)
74{
75 struct msi_desc *entry;
76
77 pr_debug("pasemi_msi_teardown_msi_irqs, pdev %p\n", pdev);
78
79 list_for_each_entry(entry, &pdev->msi_list, list) {
80 if (entry->irq == NO_IRQ)
81 continue;
82
83 set_irq_msi(entry->irq, NULL);
84 mpic_msi_free_hwirqs(msi_mpic, virq_to_hw(entry->irq),
85 ALLOC_CHUNK);
86 irq_dispose_mapping(entry->irq);
87 }
88
89 return;
90}
91
92static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
93{
94 irq_hw_number_t hwirq;
95 unsigned int virq;
96 struct msi_desc *entry;
97 struct msi_msg msg;
98 u64 addr;
99
100 pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n",
101 pdev, nvec, type);
102
103 msg.address_hi = 0;
104 msg.address_lo = PASEMI_MSI_ADDR;
105
106 list_for_each_entry(entry, &pdev->msi_list, list) {
107 /* Allocate 16 interrupts for now, since that's the grouping for
108 * affinity. This can be changed later if it turns out 32 is too
109 * few MSIs for someone, but restrictions will apply to how the
110 * sources can be changed independently.
111 */
112 hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK);
113 if (hwirq < 0) {
114 pr_debug("pasemi_msi: failed allocating hwirq\n");
115 return hwirq;
116 }
117
118 virq = irq_create_mapping(msi_mpic->irqhost, hwirq);
119 if (virq == NO_IRQ) {
120 pr_debug("pasemi_msi: failed mapping hwirq 0x%lx\n", hwirq);
121 mpic_msi_free_hwirqs(msi_mpic, hwirq, ALLOC_CHUNK);
122 return -ENOSPC;
123 }
124
125 /* Vector on MSI is really an offset, the hardware adds
126 * it to the value written at the magic address. So set
127 * it to 0 to remain sane.
128 */
129 mpic_set_vector(virq, 0);
130
131 set_irq_msi(virq, entry);
132 set_irq_chip(virq, &mpic_pasemi_msi_chip);
133 set_irq_type(virq, IRQ_TYPE_EDGE_RISING);
134
135 pr_debug("pasemi_msi: allocated virq 0x%x (hw 0x%lx) addr 0x%lx\n",
136 virq, hwirq, addr);
137
138 /* Likewise, the device writes [0...511] into the target
139 * register to generate MSI [512...1023]
140 */
141 msg.data = hwirq-0x200;
142 write_msi_msg(virq, &msg);
143 }
144
145 return 0;
146}
147
148int mpic_pasemi_msi_init(struct mpic *mpic)
149{
150 int rc;
151
152 if (!mpic->irqhost->of_node ||
153 !of_device_is_compatible(mpic->irqhost->of_node,
154 "pasemi,pwrficient-openpic"))
155 return -ENODEV;
156
157 rc = mpic_msi_init_allocator(mpic);
158 if (rc) {
159 pr_debug("pasemi_msi: Error allocating bitmap!\n");
160 return rc;
161 }
162
163 pr_debug("pasemi_msi: Registering PA Semi MPIC MSI callbacks\n");
164
165 msi_mpic = mpic;
166 WARN_ON(ppc_md.setup_msi_irqs);
167 ppc_md.setup_msi_irqs = pasemi_msi_setup_msi_irqs;
168 ppc_md.teardown_msi_irqs = pasemi_msi_teardown_msi_irqs;
169 ppc_md.msi_check_device = pasemi_msi_check_device;
170
171 return 0;
172}
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 4316f5a48a0f..efda0028909d 100644
--- a/arch/powerpc/sysdev/mv64x60_dev.c
+++ b/arch/powerpc/sysdev/mv64x60_dev.c
@@ -241,7 +241,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
241 241
242 /* only register the shared platform device the first time through */ 242 /* only register the shared platform device the first time through */
243 if (id == 0 && (err = eth_register_shared_pdev(np))) 243 if (id == 0 && (err = eth_register_shared_pdev(np)))
244 return err;; 244 return err;
245 245
246 memset(r, 0, sizeof(r)); 246 memset(r, 0, sizeof(r));
247 of_irq_to_resource(np, 0, &r[0]); 247 of_irq_to_resource(np, 0, &r[0]);
@@ -445,22 +445,19 @@ static int __init mv64x60_device_setup(void)
445 int id; 445 int id;
446 int err; 446 int err;
447 447
448 for (id = 0; 448 id = 0;
449 (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++) 449 for_each_compatible_node(np, "serial", "marvell,mpsc")
450 if ((err = mv64x60_mpsc_device_setup(np, id))) 450 if ((err = mv64x60_mpsc_device_setup(np, id++)))
451 goto error; 451 goto error;
452 452
453 for (id = 0; 453 id = 0;
454 (np = of_find_compatible_node(np, "network", 454 for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
455 "marvell,mv64x60-eth")); 455 if ((err = mv64x60_eth_device_setup(np, id++)))
456 id++)
457 if ((err = mv64x60_eth_device_setup(np, id)))
458 goto error; 456 goto error;
459 457
460 for (id = 0; 458 id = 0;
461 (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c")); 459 for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
462 id++) 460 if ((err = mv64x60_i2c_device_setup(np, id++)))
463 if ((err = mv64x60_i2c_device_setup(np, id)))
464 goto error; 461 goto error;
465 462
466 /* support up to one watchdog timer */ 463 /* support up to one watchdog timer */
@@ -471,7 +468,6 @@ static int __init mv64x60_device_setup(void)
471 of_node_put(np); 468 of_node_put(np);
472 } 469 }
473 470
474
475 return 0; 471 return 0;
476 472
477error: 473error:
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 6933f9c73b43..d21ab8fa4993 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -164,8 +164,8 @@ static int __init mv64x60_add_bridge(struct device_node *dev)
164 164
165void __init mv64x60_pci_init(void) 165void __init mv64x60_pci_init(void)
166{ 166{
167 struct device_node *np = NULL; 167 struct device_node *np;
168 168
169 while ((np = of_find_compatible_node(np, "pci", "marvell,mv64x60-pci"))) 169 for_each_compatible_node(np, "pci", "marvell,mv64x60-pci")
170 mv64x60_add_bridge(np); 170 mv64x60_add_bridge(np);
171} 171}
diff --git a/arch/powerpc/sysdev/mv64x60_udbg.c b/arch/powerpc/sysdev/mv64x60_udbg.c
index 367e7b13ec00..35c77c7d0616 100644
--- a/arch/powerpc/sysdev/mv64x60_udbg.c
+++ b/arch/powerpc/sysdev/mv64x60_udbg.c
@@ -85,10 +85,10 @@ static void mv64x60_udbg_init(void)
85 if (!stdout) 85 if (!stdout)
86 return; 86 return;
87 87
88 for (np = NULL; 88 for_each_compatible_node(np, "serial", "marvell,mpsc") {
89 (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); )
90 if (np == stdout) 89 if (np == stdout)
91 break; 90 break;
91 }
92 92
93 of_node_put(stdout); 93 of_node_put(stdout);
94 if (!np) 94 if (!np)
diff --git a/arch/powerpc/sysdev/of_rtc.c b/arch/powerpc/sysdev/of_rtc.c
new file mode 100644
index 000000000000..3d54450640c1
--- /dev/null
+++ b/arch/powerpc/sysdev/of_rtc.c
@@ -0,0 +1,59 @@
1/*
2 * Instantiate mmio-mapped RTC chips based on device tree information
3 *
4 * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
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#include <linux/kernel.h>
12#include <linux/of.h>
13#include <linux/init.h>
14#include <linux/of_platform.h>
15
16static __initdata struct {
17 const char *compatible;
18 char *plat_name;
19} of_rtc_table[] = {
20 { "ds1743-nvram", "rtc-ds1742" },
21};
22
23void __init of_instantiate_rtc(void)
24{
25 struct device_node *node;
26 int err;
27 int i;
28
29 for (i = 0; i < ARRAY_SIZE(of_rtc_table); i++) {
30 char *plat_name = of_rtc_table[i].plat_name;
31
32 for_each_compatible_node(node, NULL,
33 of_rtc_table[i].compatible) {
34 struct resource *res;
35
36 res = kmalloc(sizeof(*res), GFP_KERNEL);
37 if (!res) {
38 printk(KERN_ERR "OF RTC: Out of memory "
39 "allocating resource structure for %s\n",
40 node->full_name);
41 continue;
42 }
43
44 err = of_address_to_resource(node, 0, res);
45 if (err) {
46 printk(KERN_ERR "OF RTC: Error "
47 "translating resources for %s\n",
48 node->full_name);
49 continue;
50 }
51
52 printk(KERN_INFO "OF_RTC: %s is a %s @ 0x%llx-0x%llx\n",
53 node->full_name, plat_name,
54 (unsigned long long)res->start,
55 (unsigned long long)res->end);
56 platform_device_register_simple(plat_name, -1, res, 1);
57 }
58 }
59}
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c
index 20edd1e94eff..c858749263e0 100644
--- a/arch/powerpc/sysdev/pmi.c
+++ b/arch/powerpc/sysdev/pmi.c
@@ -28,9 +28,9 @@
28#include <linux/completion.h> 28#include <linux/completion.h>
29#include <linux/spinlock.h> 29#include <linux/spinlock.h>
30#include <linux/workqueue.h> 30#include <linux/workqueue.h>
31#include <linux/of_device.h>
32#include <linux/of_platform.h>
31 33
32#include <asm/of_device.h>
33#include <asm/of_platform.h>
34#include <asm/io.h> 34#include <asm/io.h>
35#include <asm/pmi.h> 35#include <asm/pmi.h>
36#include <asm/prom.h> 36#include <asm/prom.h>
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c
new file mode 100644
index 000000000000..5abfcd157483
--- /dev/null
+++ b/arch/powerpc/sysdev/ppc4xx_pci.c
@@ -0,0 +1,1528 @@
1/*
2 * PCI / PCI-X / PCI-Express support for 4xx parts
3 *
4 * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Most PCI Express code is coming from Stefan Roese implementation for
7 * arch/ppc in the Denx tree, slightly reworked by me.
8 *
9 * Copyright 2007 DENX Software Engineering, Stefan Roese <sr@denx.de>
10 *
11 * Some of that comes itself from a previous implementation for 440SPE only
12 * by Roland Dreier:
13 *
14 * Copyright (c) 2005 Cisco Systems. All rights reserved.
15 * Roland Dreier <rolandd@cisco.com>
16 *
17 */
18
19#undef DEBUG
20
21#include <linux/kernel.h>
22#include <linux/pci.h>
23#include <linux/init.h>
24#include <linux/of.h>
25#include <linux/bootmem.h>
26#include <linux/delay.h>
27
28#include <asm/io.h>
29#include <asm/pci-bridge.h>
30#include <asm/machdep.h>
31#include <asm/dcr.h>
32#include <asm/dcr-regs.h>
33
34#include "ppc4xx_pci.h"
35
36static int dma_offset_set;
37
38/* Move that to a useable header */
39extern unsigned long total_memory;
40
41#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL))
42#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32))
43
44#ifdef CONFIG_RESOURCES_64BIT
45#define RES_TO_U32_LOW(val) U64_TO_U32_LOW(val)
46#define RES_TO_U32_HIGH(val) U64_TO_U32_HIGH(val)
47#else
48#define RES_TO_U32_LOW(val) (val)
49#define RES_TO_U32_HIGH(val) (0)
50#endif
51
52static inline int ppc440spe_revA(void)
53{
54 /* Catch both 440SPe variants, with and without RAID6 support */
55 if ((mfspr(SPRN_PVR) & 0xffefffff) == 0x53421890)
56 return 1;
57 else
58 return 0;
59}
60
61static void fixup_ppc4xx_pci_bridge(struct pci_dev *dev)
62{
63 struct pci_controller *hose;
64 int i;
65
66 if (dev->devfn != 0 || dev->bus->self != NULL)
67 return;
68
69 hose = pci_bus_to_host(dev->bus);
70 if (hose == NULL)
71 return;
72
73 if (!of_device_is_compatible(hose->dn, "ibm,plb-pciex") &&
74 !of_device_is_compatible(hose->dn, "ibm,plb-pcix") &&
75 !of_device_is_compatible(hose->dn, "ibm,plb-pci"))
76 return;
77
78 /* Hide the PCI host BARs from the kernel as their content doesn't
79 * fit well in the resource management
80 */
81 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
82 dev->resource[i].start = dev->resource[i].end = 0;
83 dev->resource[i].flags = 0;
84 }
85
86 printk(KERN_INFO "PCI: Hiding 4xx host bridge resources %s\n",
87 pci_name(dev));
88}
89DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_ppc4xx_pci_bridge);
90
91static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose,
92 void __iomem *reg,
93 struct resource *res)
94{
95 u64 size;
96 const u32 *ranges;
97 int rlen;
98 int pna = of_n_addr_cells(hose->dn);
99 int np = pna + 5;
100
101 /* Default */
102 res->start = 0;
103 res->end = size = 0x80000000;
104 res->flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
105
106 /* Get dma-ranges property */
107 ranges = of_get_property(hose->dn, "dma-ranges", &rlen);
108 if (ranges == NULL)
109 goto out;
110
111 /* Walk it */
112 while ((rlen -= np * 4) >= 0) {
113 u32 pci_space = ranges[0];
114 u64 pci_addr = of_read_number(ranges + 1, 2);
115 u64 cpu_addr = of_translate_dma_address(hose->dn, ranges + 3);
116 size = of_read_number(ranges + pna + 3, 2);
117 ranges += np;
118 if (cpu_addr == OF_BAD_ADDR || size == 0)
119 continue;
120
121 /* We only care about memory */
122 if ((pci_space & 0x03000000) != 0x02000000)
123 continue;
124
125 /* We currently only support memory at 0, and pci_addr
126 * within 32 bits space
127 */
128 if (cpu_addr != 0 || pci_addr > 0xffffffff) {
129 printk(KERN_WARNING "%s: Ignored unsupported dma range"
130 " 0x%016llx...0x%016llx -> 0x%016llx\n",
131 hose->dn->full_name,
132 pci_addr, pci_addr + size - 1, cpu_addr);
133 continue;
134 }
135
136 /* Check if not prefetchable */
137 if (!(pci_space & 0x40000000))
138 res->flags &= ~IORESOURCE_PREFETCH;
139
140
141 /* Use that */
142 res->start = pci_addr;
143#ifndef CONFIG_RESOURCES_64BIT
144 /* Beware of 32 bits resources */
145 if ((pci_addr + size) > 0x100000000ull)
146 res->end = 0xffffffff;
147 else
148#endif
149 res->end = res->start + size - 1;
150 break;
151 }
152
153 /* We only support one global DMA offset */
154 if (dma_offset_set && pci_dram_offset != res->start) {
155 printk(KERN_ERR "%s: dma-ranges(s) mismatch\n",
156 hose->dn->full_name);
157 return -ENXIO;
158 }
159
160 /* Check that we can fit all of memory as we don't support
161 * DMA bounce buffers
162 */
163 if (size < total_memory) {
164 printk(KERN_ERR "%s: dma-ranges too small "
165 "(size=%llx total_memory=%lx)\n",
166 hose->dn->full_name, size, total_memory);
167 return -ENXIO;
168 }
169
170 /* Check we are a power of 2 size and that base is a multiple of size*/
171 if (!is_power_of_2(size) ||
172 (res->start & (size - 1)) != 0) {
173 printk(KERN_ERR "%s: dma-ranges unaligned\n",
174 hose->dn->full_name);
175 return -ENXIO;
176 }
177
178 /* Check that we are fully contained within 32 bits space */
179 if (res->end > 0xffffffff) {
180 printk(KERN_ERR "%s: dma-ranges outside of 32 bits space\n",
181 hose->dn->full_name);
182 return -ENXIO;
183 }
184 out:
185 dma_offset_set = 1;
186 pci_dram_offset = res->start;
187
188 printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n",
189 pci_dram_offset);
190 return 0;
191}
192
193/*
194 * 4xx PCI 2.x part
195 */
196
197static void __init ppc4xx_configure_pci_PMMs(struct pci_controller *hose,
198 void __iomem *reg)
199{
200 u32 la, ma, pcila, pciha;
201 int i, j;
202
203 /* Setup outbound memory windows */
204 for (i = j = 0; i < 3; i++) {
205 struct resource *res = &hose->mem_resources[i];
206
207 /* we only care about memory windows */
208 if (!(res->flags & IORESOURCE_MEM))
209 continue;
210 if (j > 2) {
211 printk(KERN_WARNING "%s: Too many ranges\n",
212 hose->dn->full_name);
213 break;
214 }
215
216 /* Calculate register values */
217 la = res->start;
218 pciha = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
219 pcila = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
220
221 ma = res->end + 1 - res->start;
222 if (!is_power_of_2(ma) || ma < 0x1000 || ma > 0xffffffffu) {
223 printk(KERN_WARNING "%s: Resource out of range\n",
224 hose->dn->full_name);
225 continue;
226 }
227 ma = (0xffffffffu << ilog2(ma)) | 0x1;
228 if (res->flags & IORESOURCE_PREFETCH)
229 ma |= 0x2;
230
231 /* Program register values */
232 writel(la, reg + PCIL0_PMM0LA + (0x10 * j));
233 writel(pcila, reg + PCIL0_PMM0PCILA + (0x10 * j));
234 writel(pciha, reg + PCIL0_PMM0PCIHA + (0x10 * j));
235 writel(ma, reg + PCIL0_PMM0MA + (0x10 * j));
236 j++;
237 }
238}
239
240static void __init ppc4xx_configure_pci_PTMs(struct pci_controller *hose,
241 void __iomem *reg,
242 const struct resource *res)
243{
244 resource_size_t size = res->end - res->start + 1;
245 u32 sa;
246
247 /* Calculate window size */
248 sa = (0xffffffffu << ilog2(size)) | 1;
249 sa |= 0x1;
250
251 /* RAM is always at 0 local for now */
252 writel(0, reg + PCIL0_PTM1LA);
253 writel(sa, reg + PCIL0_PTM1MS);
254
255 /* Map on PCI side */
256 early_write_config_dword(hose, hose->first_busno, 0,
257 PCI_BASE_ADDRESS_1, res->start);
258 early_write_config_dword(hose, hose->first_busno, 0,
259 PCI_BASE_ADDRESS_2, 0x00000000);
260 early_write_config_word(hose, hose->first_busno, 0,
261 PCI_COMMAND, 0x0006);
262}
263
264static void __init ppc4xx_probe_pci_bridge(struct device_node *np)
265{
266 /* NYI */
267 struct resource rsrc_cfg;
268 struct resource rsrc_reg;
269 struct resource dma_window;
270 struct pci_controller *hose = NULL;
271 void __iomem *reg = NULL;
272 const int *bus_range;
273 int primary = 0;
274
275 /* Fetch config space registers address */
276 if (of_address_to_resource(np, 0, &rsrc_cfg)) {
277 printk(KERN_ERR "%s:Can't get PCI config register base !",
278 np->full_name);
279 return;
280 }
281 /* Fetch host bridge internal registers address */
282 if (of_address_to_resource(np, 3, &rsrc_reg)) {
283 printk(KERN_ERR "%s: Can't get PCI internal register base !",
284 np->full_name);
285 return;
286 }
287
288 /* Check if primary bridge */
289 if (of_get_property(np, "primary", NULL))
290 primary = 1;
291
292 /* Get bus range if any */
293 bus_range = of_get_property(np, "bus-range", NULL);
294
295 /* Map registers */
296 reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
297 if (reg == NULL) {
298 printk(KERN_ERR "%s: Can't map registers !", np->full_name);
299 goto fail;
300 }
301
302 /* Allocate the host controller data structure */
303 hose = pcibios_alloc_controller(np);
304 if (!hose)
305 goto fail;
306
307 hose->first_busno = bus_range ? bus_range[0] : 0x0;
308 hose->last_busno = bus_range ? bus_range[1] : 0xff;
309
310 /* Setup config space */
311 setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
312
313 /* Disable all windows */
314 writel(0, reg + PCIL0_PMM0MA);
315 writel(0, reg + PCIL0_PMM1MA);
316 writel(0, reg + PCIL0_PMM2MA);
317 writel(0, reg + PCIL0_PTM1MS);
318 writel(0, reg + PCIL0_PTM2MS);
319
320 /* Parse outbound mapping resources */
321 pci_process_bridge_OF_ranges(hose, np, primary);
322
323 /* Parse inbound mapping resources */
324 if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
325 goto fail;
326
327 /* Configure outbound ranges POMs */
328 ppc4xx_configure_pci_PMMs(hose, reg);
329
330 /* Configure inbound ranges PIMs */
331 ppc4xx_configure_pci_PTMs(hose, reg, &dma_window);
332
333 /* We don't need the registers anymore */
334 iounmap(reg);
335 return;
336
337 fail:
338 if (hose)
339 pcibios_free_controller(hose);
340 if (reg)
341 iounmap(reg);
342}
343
344/*
345 * 4xx PCI-X part
346 */
347
348static void __init ppc4xx_configure_pcix_POMs(struct pci_controller *hose,
349 void __iomem *reg)
350{
351 u32 lah, lal, pciah, pcial, sa;
352 int i, j;
353
354 /* Setup outbound memory windows */
355 for (i = j = 0; i < 3; i++) {
356 struct resource *res = &hose->mem_resources[i];
357
358 /* we only care about memory windows */
359 if (!(res->flags & IORESOURCE_MEM))
360 continue;
361 if (j > 1) {
362 printk(KERN_WARNING "%s: Too many ranges\n",
363 hose->dn->full_name);
364 break;
365 }
366
367 /* Calculate register values */
368 lah = RES_TO_U32_HIGH(res->start);
369 lal = RES_TO_U32_LOW(res->start);
370 pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
371 pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
372 sa = res->end + 1 - res->start;
373 if (!is_power_of_2(sa) || sa < 0x100000 ||
374 sa > 0xffffffffu) {
375 printk(KERN_WARNING "%s: Resource out of range\n",
376 hose->dn->full_name);
377 continue;
378 }
379 sa = (0xffffffffu << ilog2(sa)) | 0x1;
380
381 /* Program register values */
382 if (j == 0) {
383 writel(lah, reg + PCIX0_POM0LAH);
384 writel(lal, reg + PCIX0_POM0LAL);
385 writel(pciah, reg + PCIX0_POM0PCIAH);
386 writel(pcial, reg + PCIX0_POM0PCIAL);
387 writel(sa, reg + PCIX0_POM0SA);
388 } else {
389 writel(lah, reg + PCIX0_POM1LAH);
390 writel(lal, reg + PCIX0_POM1LAL);
391 writel(pciah, reg + PCIX0_POM1PCIAH);
392 writel(pcial, reg + PCIX0_POM1PCIAL);
393 writel(sa, reg + PCIX0_POM1SA);
394 }
395 j++;
396 }
397}
398
399static void __init ppc4xx_configure_pcix_PIMs(struct pci_controller *hose,
400 void __iomem *reg,
401 const struct resource *res,
402 int big_pim,
403 int enable_msi_hole)
404{
405 resource_size_t size = res->end - res->start + 1;
406 u32 sa;
407
408 /* RAM is always at 0 */
409 writel(0x00000000, reg + PCIX0_PIM0LAH);
410 writel(0x00000000, reg + PCIX0_PIM0LAL);
411
412 /* Calculate window size */
413 sa = (0xffffffffu << ilog2(size)) | 1;
414 sa |= 0x1;
415 if (res->flags & IORESOURCE_PREFETCH)
416 sa |= 0x2;
417 if (enable_msi_hole)
418 sa |= 0x4;
419 writel(sa, reg + PCIX0_PIM0SA);
420 if (big_pim)
421 writel(0xffffffff, reg + PCIX0_PIM0SAH);
422
423 /* Map on PCI side */
424 writel(0x00000000, reg + PCIX0_BAR0H);
425 writel(res->start, reg + PCIX0_BAR0L);
426 writew(0x0006, reg + PCIX0_COMMAND);
427}
428
429static void __init ppc4xx_probe_pcix_bridge(struct device_node *np)
430{
431 struct resource rsrc_cfg;
432 struct resource rsrc_reg;
433 struct resource dma_window;
434 struct pci_controller *hose = NULL;
435 void __iomem *reg = NULL;
436 const int *bus_range;
437 int big_pim = 0, msi = 0, primary = 0;
438
439 /* Fetch config space registers address */
440 if (of_address_to_resource(np, 0, &rsrc_cfg)) {
441 printk(KERN_ERR "%s:Can't get PCI-X config register base !",
442 np->full_name);
443 return;
444 }
445 /* Fetch host bridge internal registers address */
446 if (of_address_to_resource(np, 3, &rsrc_reg)) {
447 printk(KERN_ERR "%s: Can't get PCI-X internal register base !",
448 np->full_name);
449 return;
450 }
451
452 /* Check if it supports large PIMs (440GX) */
453 if (of_get_property(np, "large-inbound-windows", NULL))
454 big_pim = 1;
455
456 /* Check if we should enable MSIs inbound hole */
457 if (of_get_property(np, "enable-msi-hole", NULL))
458 msi = 1;
459
460 /* Check if primary bridge */
461 if (of_get_property(np, "primary", NULL))
462 primary = 1;
463
464 /* Get bus range if any */
465 bus_range = of_get_property(np, "bus-range", NULL);
466
467 /* Map registers */
468 reg = ioremap(rsrc_reg.start, rsrc_reg.end + 1 - rsrc_reg.start);
469 if (reg == NULL) {
470 printk(KERN_ERR "%s: Can't map registers !", np->full_name);
471 goto fail;
472 }
473
474 /* Allocate the host controller data structure */
475 hose = pcibios_alloc_controller(np);
476 if (!hose)
477 goto fail;
478
479 hose->first_busno = bus_range ? bus_range[0] : 0x0;
480 hose->last_busno = bus_range ? bus_range[1] : 0xff;
481
482 /* Setup config space */
483 setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4, 0);
484
485 /* Disable all windows */
486 writel(0, reg + PCIX0_POM0SA);
487 writel(0, reg + PCIX0_POM1SA);
488 writel(0, reg + PCIX0_POM2SA);
489 writel(0, reg + PCIX0_PIM0SA);
490 writel(0, reg + PCIX0_PIM1SA);
491 writel(0, reg + PCIX0_PIM2SA);
492 if (big_pim) {
493 writel(0, reg + PCIX0_PIM0SAH);
494 writel(0, reg + PCIX0_PIM2SAH);
495 }
496
497 /* Parse outbound mapping resources */
498 pci_process_bridge_OF_ranges(hose, np, primary);
499
500 /* Parse inbound mapping resources */
501 if (ppc4xx_parse_dma_ranges(hose, reg, &dma_window) != 0)
502 goto fail;
503
504 /* Configure outbound ranges POMs */
505 ppc4xx_configure_pcix_POMs(hose, reg);
506
507 /* Configure inbound ranges PIMs */
508 ppc4xx_configure_pcix_PIMs(hose, reg, &dma_window, big_pim, msi);
509
510 /* We don't need the registers anymore */
511 iounmap(reg);
512 return;
513
514 fail:
515 if (hose)
516 pcibios_free_controller(hose);
517 if (reg)
518 iounmap(reg);
519}
520
521#ifdef CONFIG_PPC4xx_PCI_EXPRESS
522
523/*
524 * 4xx PCI-Express part
525 *
526 * We support 3 parts currently based on the compatible property:
527 *
528 * ibm,plb-pciex-440spe
529 * ibm,plb-pciex-405ex
530 *
531 * Anything else will be rejected for now as they are all subtly
532 * different unfortunately.
533 *
534 */
535
536#define MAX_PCIE_BUS_MAPPED 0x40
537
538struct ppc4xx_pciex_port
539{
540 struct pci_controller *hose;
541 struct device_node *node;
542 unsigned int index;
543 int endpoint;
544 int link;
545 int has_ibpre;
546 unsigned int sdr_base;
547 dcr_host_t dcrs;
548 struct resource cfg_space;
549 struct resource utl_regs;
550 void __iomem *utl_base;
551};
552
553static struct ppc4xx_pciex_port *ppc4xx_pciex_ports;
554static unsigned int ppc4xx_pciex_port_count;
555
556struct ppc4xx_pciex_hwops
557{
558 int (*core_init)(struct device_node *np);
559 int (*port_init_hw)(struct ppc4xx_pciex_port *port);
560 int (*setup_utl)(struct ppc4xx_pciex_port *port);
561};
562
563static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops;
564
565#ifdef CONFIG_44x
566
567/* Check various reset bits of the 440SPe PCIe core */
568static int __init ppc440spe_pciex_check_reset(struct device_node *np)
569{
570 u32 valPE0, valPE1, valPE2;
571 int err = 0;
572
573 /* SDR0_PEGPLLLCT1 reset */
574 if (!(mfdcri(SDR0, PESDR0_PLLLCT1) & 0x01000000)) {
575 /*
576 * the PCIe core was probably already initialised
577 * by firmware - let's re-reset RCSSET regs
578 *
579 * -- Shouldn't we also re-reset the whole thing ? -- BenH
580 */
581 pr_debug("PCIE: SDR0_PLLLCT1 already reset.\n");
582 mtdcri(SDR0, PESDR0_440SPE_RCSSET, 0x01010000);
583 mtdcri(SDR0, PESDR1_440SPE_RCSSET, 0x01010000);
584 mtdcri(SDR0, PESDR2_440SPE_RCSSET, 0x01010000);
585 }
586
587 valPE0 = mfdcri(SDR0, PESDR0_440SPE_RCSSET);
588 valPE1 = mfdcri(SDR0, PESDR1_440SPE_RCSSET);
589 valPE2 = mfdcri(SDR0, PESDR2_440SPE_RCSSET);
590
591 /* SDR0_PExRCSSET rstgu */
592 if (!(valPE0 & 0x01000000) ||
593 !(valPE1 & 0x01000000) ||
594 !(valPE2 & 0x01000000)) {
595 printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstgu error\n");
596 err = -1;
597 }
598
599 /* SDR0_PExRCSSET rstdl */
600 if (!(valPE0 & 0x00010000) ||
601 !(valPE1 & 0x00010000) ||
602 !(valPE2 & 0x00010000)) {
603 printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstdl error\n");
604 err = -1;
605 }
606
607 /* SDR0_PExRCSSET rstpyn */
608 if ((valPE0 & 0x00001000) ||
609 (valPE1 & 0x00001000) ||
610 (valPE2 & 0x00001000)) {
611 printk(KERN_INFO "PCIE: SDR0_PExRCSSET rstpyn error\n");
612 err = -1;
613 }
614
615 /* SDR0_PExRCSSET hldplb */
616 if ((valPE0 & 0x10000000) ||
617 (valPE1 & 0x10000000) ||
618 (valPE2 & 0x10000000)) {
619 printk(KERN_INFO "PCIE: SDR0_PExRCSSET hldplb error\n");
620 err = -1;
621 }
622
623 /* SDR0_PExRCSSET rdy */
624 if ((valPE0 & 0x00100000) ||
625 (valPE1 & 0x00100000) ||
626 (valPE2 & 0x00100000)) {
627 printk(KERN_INFO "PCIE: SDR0_PExRCSSET rdy error\n");
628 err = -1;
629 }
630
631 /* SDR0_PExRCSSET shutdown */
632 if ((valPE0 & 0x00000100) ||
633 (valPE1 & 0x00000100) ||
634 (valPE2 & 0x00000100)) {
635 printk(KERN_INFO "PCIE: SDR0_PExRCSSET shutdown error\n");
636 err = -1;
637 }
638
639 return err;
640}
641
642/* Global PCIe core initializations for 440SPe core */
643static int __init ppc440spe_pciex_core_init(struct device_node *np)
644{
645 int time_out = 20;
646
647 /* Set PLL clock receiver to LVPECL */
648 mtdcri(SDR0, PESDR0_PLLLCT1, mfdcri(SDR0, PESDR0_PLLLCT1) | 1 << 28);
649
650 /* Shouldn't we do all the calibration stuff etc... here ? */
651 if (ppc440spe_pciex_check_reset(np))
652 return -ENXIO;
653
654 if (!(mfdcri(SDR0, PESDR0_PLLLCT2) & 0x10000)) {
655 printk(KERN_INFO "PCIE: PESDR_PLLCT2 resistance calibration "
656 "failed (0x%08x)\n",
657 mfdcri(SDR0, PESDR0_PLLLCT2));
658 return -1;
659 }
660
661 /* De-assert reset of PCIe PLL, wait for lock */
662 mtdcri(SDR0, PESDR0_PLLLCT1,
663 mfdcri(SDR0, PESDR0_PLLLCT1) & ~(1 << 24));
664 udelay(3);
665
666 while (time_out) {
667 if (!(mfdcri(SDR0, PESDR0_PLLLCT3) & 0x10000000)) {
668 time_out--;
669 udelay(1);
670 } else
671 break;
672 }
673 if (!time_out) {
674 printk(KERN_INFO "PCIE: VCO output not locked\n");
675 return -1;
676 }
677
678 pr_debug("PCIE initialization OK\n");
679
680 return 3;
681}
682
683static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
684{
685 u32 val = 1 << 24;
686
687 if (port->endpoint)
688 val = PTYPE_LEGACY_ENDPOINT << 20;
689 else
690 val = PTYPE_ROOT_PORT << 20;
691
692 if (port->index == 0)
693 val |= LNKW_X8 << 12;
694 else
695 val |= LNKW_X4 << 12;
696
697 mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET, val);
698 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x20222222);
699 if (ppc440spe_revA())
700 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x11000000);
701 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL0SET1, 0x35000000);
702 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL1SET1, 0x35000000);
703 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL2SET1, 0x35000000);
704 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL3SET1, 0x35000000);
705 if (port->index == 0) {
706 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL4SET1,
707 0x35000000);
708 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL5SET1,
709 0x35000000);
710 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL6SET1,
711 0x35000000);
712 mtdcri(SDR0, port->sdr_base + PESDRn_440SPE_HSSL7SET1,
713 0x35000000);
714 }
715 val = mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET);
716 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
717 (val & ~(1 << 24 | 1 << 16)) | 1 << 12);
718
719 return 0;
720}
721
722static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
723{
724 return ppc440spe_pciex_init_port_hw(port);
725}
726
727static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
728{
729 int rc = ppc440spe_pciex_init_port_hw(port);
730
731 port->has_ibpre = 1;
732
733 return rc;
734}
735
736static int ppc440speA_pciex_init_utl(struct ppc4xx_pciex_port *port)
737{
738 /* XXX Check what that value means... I hate magic */
739 dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x68782800);
740
741 /*
742 * Set buffer allocations and then assert VRB and TXE.
743 */
744 out_be32(port->utl_base + PEUTL_OUTTR, 0x08000000);
745 out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
746 out_be32(port->utl_base + PEUTL_OPDBSZ, 0x10000000);
747 out_be32(port->utl_base + PEUTL_PBBSZ, 0x53000000);
748 out_be32(port->utl_base + PEUTL_IPHBSZ, 0x08000000);
749 out_be32(port->utl_base + PEUTL_IPDBSZ, 0x10000000);
750 out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
751 out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
752
753 return 0;
754}
755
756static int ppc440speB_pciex_init_utl(struct ppc4xx_pciex_port *port)
757{
758 /* Report CRS to the operating system */
759 out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
760
761 return 0;
762}
763
764static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata =
765{
766 .core_init = ppc440spe_pciex_core_init,
767 .port_init_hw = ppc440speA_pciex_init_port_hw,
768 .setup_utl = ppc440speA_pciex_init_utl,
769};
770
771static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata =
772{
773 .core_init = ppc440spe_pciex_core_init,
774 .port_init_hw = ppc440speB_pciex_init_port_hw,
775 .setup_utl = ppc440speB_pciex_init_utl,
776};
777
778#endif /* CONFIG_44x */
779
780#ifdef CONFIG_40x
781
782static int __init ppc405ex_pciex_core_init(struct device_node *np)
783{
784 /* Nothing to do, return 2 ports */
785 return 2;
786}
787
788static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port)
789{
790 /* Assert the PE0_PHY reset */
791 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01010000);
792 msleep(1);
793
794 /* deassert the PE0_hotreset */
795 if (port->endpoint)
796 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01111000);
797 else
798 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x01101000);
799
800 /* poll for phy !reset */
801 /* XXX FIXME add timeout */
802 while (!(mfdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSTA) & 0x00001000))
803 ;
804
805 /* deassert the PE0_gpl_utl_reset */
806 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000);
807}
808
809static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
810{
811 u32 val;
812
813 if (port->endpoint)
814 val = PTYPE_LEGACY_ENDPOINT;
815 else
816 val = PTYPE_ROOT_PORT;
817
818 mtdcri(SDR0, port->sdr_base + PESDRn_DLPSET,
819 1 << 24 | val << 20 | LNKW_X1 << 12);
820
821 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET1, 0x00000000);
822 mtdcri(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01010000);
823 mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET1, 0x720F0000);
824 mtdcri(SDR0, port->sdr_base + PESDRn_405EX_PHYSET2, 0x70600003);
825
826 /*
827 * Only reset the PHY when no link is currently established.
828 * This is for the Atheros PCIe board which has problems to establish
829 * the link (again) after this PHY reset. All other currently tested
830 * PCIe boards don't show this problem.
831 * This has to be re-tested and fixed in a later release!
832 */
833#if 0 /* XXX FIXME: Not resetting the PHY will leave all resources
834 * configured as done previously by U-Boot. Then Linux will currently
835 * not reassign them. So the PHY reset is now done always. This will
836 * lead to problems with the Atheros PCIe board again.
837 */
838 val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
839 if (!(val & 0x00001000))
840 ppc405ex_pcie_phy_reset(port);
841#else
842 ppc405ex_pcie_phy_reset(port);
843#endif
844
845 dcr_write(port->dcrs, DCRO_PEGPL_CFG, 0x10000000); /* guarded on */
846
847 port->has_ibpre = 1;
848
849 return 0;
850}
851
852static int ppc405ex_pciex_init_utl(struct ppc4xx_pciex_port *port)
853{
854 dcr_write(port->dcrs, DCRO_PEGPL_SPECIAL, 0x0);
855
856 /*
857 * Set buffer allocations and then assert VRB and TXE.
858 */
859 out_be32(port->utl_base + PEUTL_OUTTR, 0x02000000);
860 out_be32(port->utl_base + PEUTL_INTR, 0x02000000);
861 out_be32(port->utl_base + PEUTL_OPDBSZ, 0x04000000);
862 out_be32(port->utl_base + PEUTL_PBBSZ, 0x21000000);
863 out_be32(port->utl_base + PEUTL_IPHBSZ, 0x02000000);
864 out_be32(port->utl_base + PEUTL_IPDBSZ, 0x04000000);
865 out_be32(port->utl_base + PEUTL_RCIRQEN, 0x00f00000);
866 out_be32(port->utl_base + PEUTL_PCTL, 0x80800066);
867
868 out_be32(port->utl_base + PEUTL_PBCTL, 0x08000000);
869
870 return 0;
871}
872
873static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata =
874{
875 .core_init = ppc405ex_pciex_core_init,
876 .port_init_hw = ppc405ex_pciex_init_port_hw,
877 .setup_utl = ppc405ex_pciex_init_utl,
878};
879
880#endif /* CONFIG_40x */
881
882
883/* Check that the core has been initied and if not, do it */
884static int __init ppc4xx_pciex_check_core_init(struct device_node *np)
885{
886 static int core_init;
887 int count = -ENODEV;
888
889 if (core_init++)
890 return 0;
891
892#ifdef CONFIG_44x
893 if (of_device_is_compatible(np, "ibm,plb-pciex-440spe")) {
894 if (ppc440spe_revA())
895 ppc4xx_pciex_hwops = &ppc440speA_pcie_hwops;
896 else
897 ppc4xx_pciex_hwops = &ppc440speB_pcie_hwops;
898 }
899#endif /* CONFIG_44x */
900#ifdef CONFIG_40x
901 if (of_device_is_compatible(np, "ibm,plb-pciex-405ex"))
902 ppc4xx_pciex_hwops = &ppc405ex_pcie_hwops;
903#endif
904 if (ppc4xx_pciex_hwops == NULL) {
905 printk(KERN_WARNING "PCIE: unknown host type %s\n",
906 np->full_name);
907 return -ENODEV;
908 }
909
910 count = ppc4xx_pciex_hwops->core_init(np);
911 if (count > 0) {
912 ppc4xx_pciex_ports =
913 kzalloc(count * sizeof(struct ppc4xx_pciex_port),
914 GFP_KERNEL);
915 if (ppc4xx_pciex_ports) {
916 ppc4xx_pciex_port_count = count;
917 return 0;
918 }
919 printk(KERN_WARNING "PCIE: failed to allocate ports array\n");
920 return -ENOMEM;
921 }
922 return -ENODEV;
923}
924
925static void __init ppc4xx_pciex_port_init_mapping(struct ppc4xx_pciex_port *port)
926{
927 /* We map PCI Express configuration based on the reg property */
928 dcr_write(port->dcrs, DCRO_PEGPL_CFGBAH,
929 RES_TO_U32_HIGH(port->cfg_space.start));
930 dcr_write(port->dcrs, DCRO_PEGPL_CFGBAL,
931 RES_TO_U32_LOW(port->cfg_space.start));
932
933 /* XXX FIXME: Use size from reg property. For now, map 512M */
934 dcr_write(port->dcrs, DCRO_PEGPL_CFGMSK, 0xe0000001);
935
936 /* We map UTL registers based on the reg property */
937 dcr_write(port->dcrs, DCRO_PEGPL_REGBAH,
938 RES_TO_U32_HIGH(port->utl_regs.start));
939 dcr_write(port->dcrs, DCRO_PEGPL_REGBAL,
940 RES_TO_U32_LOW(port->utl_regs.start));
941
942 /* XXX FIXME: Use size from reg property */
943 dcr_write(port->dcrs, DCRO_PEGPL_REGMSK, 0x00007001);
944
945 /* Disable all other outbound windows */
946 dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, 0);
947 dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, 0);
948 dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0);
949 dcr_write(port->dcrs, DCRO_PEGPL_MSGMSK, 0);
950}
951
952static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port,
953 unsigned int sdr_offset,
954 unsigned int mask,
955 unsigned int value,
956 int timeout_ms)
957{
958 u32 val;
959
960 while(timeout_ms--) {
961 val = mfdcri(SDR0, port->sdr_base + sdr_offset);
962 if ((val & mask) == value) {
963 pr_debug("PCIE%d: Wait on SDR %x success with tm %d (%08x)\n",
964 port->index, sdr_offset, timeout_ms, val);
965 return 0;
966 }
967 msleep(1);
968 }
969 return -1;
970}
971
972static int __init ppc4xx_pciex_port_init(struct ppc4xx_pciex_port *port)
973{
974 int rc = 0;
975
976 /* Init HW */
977 if (ppc4xx_pciex_hwops->port_init_hw)
978 rc = ppc4xx_pciex_hwops->port_init_hw(port);
979 if (rc != 0)
980 return rc;
981
982 printk(KERN_INFO "PCIE%d: Checking link...\n",
983 port->index);
984
985 /* Wait for reset to complete */
986 if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, 1 << 20, 0, 10)) {
987 printk(KERN_WARNING "PCIE%d: PGRST failed\n",
988 port->index);
989 return -1;
990 }
991
992 /* Check for card presence detect if supported, if not, just wait for
993 * link unconditionally.
994 *
995 * note that we don't fail if there is no link, we just filter out
996 * config space accesses. That way, it will be easier to implement
997 * hotplug later on.
998 */
999 if (!port->has_ibpre ||
1000 !ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
1001 1 << 28, 1 << 28, 100)) {
1002 printk(KERN_INFO
1003 "PCIE%d: Device detected, waiting for link...\n",
1004 port->index);
1005 if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP,
1006 0x1000, 0x1000, 2000))
1007 printk(KERN_WARNING
1008 "PCIE%d: Link up failed\n", port->index);
1009 else {
1010 printk(KERN_INFO
1011 "PCIE%d: link is up !\n", port->index);
1012 port->link = 1;
1013 }
1014 } else
1015 printk(KERN_INFO "PCIE%d: No device detected.\n", port->index);
1016
1017 /*
1018 * Initialize mapping: disable all regions and configure
1019 * CFG and REG regions based on resources in the device tree
1020 */
1021 ppc4xx_pciex_port_init_mapping(port);
1022
1023 /*
1024 * Map UTL
1025 */
1026 port->utl_base = ioremap(port->utl_regs.start, 0x100);
1027 BUG_ON(port->utl_base == NULL);
1028
1029 /*
1030 * Setup UTL registers --BenH.
1031 */
1032 if (ppc4xx_pciex_hwops->setup_utl)
1033 ppc4xx_pciex_hwops->setup_utl(port);
1034
1035 /*
1036 * Check for VC0 active and assert RDY.
1037 */
1038 if (port->link &&
1039 ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS,
1040 1 << 16, 1 << 16, 5000)) {
1041 printk(KERN_INFO "PCIE%d: VC0 not active\n", port->index);
1042 port->link = 0;
1043 }
1044
1045 mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
1046 mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) | 1 << 20);
1047 msleep(100);
1048
1049 return 0;
1050}
1051
1052static int ppc4xx_pciex_validate_bdf(struct ppc4xx_pciex_port *port,
1053 struct pci_bus *bus,
1054 unsigned int devfn)
1055{
1056 static int message;
1057
1058 /* Endpoint can not generate upstream(remote) config cycles */
1059 if (port->endpoint && bus->number != port->hose->first_busno)
1060 return PCIBIOS_DEVICE_NOT_FOUND;
1061
1062 /* Check we are within the mapped range */
1063 if (bus->number > port->hose->last_busno) {
1064 if (!message) {
1065 printk(KERN_WARNING "Warning! Probing bus %u"
1066 " out of range !\n", bus->number);
1067 message++;
1068 }
1069 return PCIBIOS_DEVICE_NOT_FOUND;
1070 }
1071
1072 /* The root complex has only one device / function */
1073 if (bus->number == port->hose->first_busno && devfn != 0)
1074 return PCIBIOS_DEVICE_NOT_FOUND;
1075
1076 /* The other side of the RC has only one device as well */
1077 if (bus->number == (port->hose->first_busno + 1) &&
1078 PCI_SLOT(devfn) != 0)
1079 return PCIBIOS_DEVICE_NOT_FOUND;
1080
1081 /* Check if we have a link */
1082 if ((bus->number != port->hose->first_busno) && !port->link)
1083 return PCIBIOS_DEVICE_NOT_FOUND;
1084
1085 return 0;
1086}
1087
1088static void __iomem *ppc4xx_pciex_get_config_base(struct ppc4xx_pciex_port *port,
1089 struct pci_bus *bus,
1090 unsigned int devfn)
1091{
1092 int relbus;
1093
1094 /* Remove the casts when we finally remove the stupid volatile
1095 * in struct pci_controller
1096 */
1097 if (bus->number == port->hose->first_busno)
1098 return (void __iomem *)port->hose->cfg_addr;
1099
1100 relbus = bus->number - (port->hose->first_busno + 1);
1101 return (void __iomem *)port->hose->cfg_data +
1102 ((relbus << 20) | (devfn << 12));
1103}
1104
1105static int ppc4xx_pciex_read_config(struct pci_bus *bus, unsigned int devfn,
1106 int offset, int len, u32 *val)
1107{
1108 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
1109 struct ppc4xx_pciex_port *port =
1110 &ppc4xx_pciex_ports[hose->indirect_type];
1111 void __iomem *addr;
1112 u32 gpl_cfg;
1113
1114 BUG_ON(hose != port->hose);
1115
1116 if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
1117 return PCIBIOS_DEVICE_NOT_FOUND;
1118
1119 addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
1120
1121 /*
1122 * Reading from configuration space of non-existing device can
1123 * generate transaction errors. For the read duration we suppress
1124 * assertion of machine check exceptions to avoid those.
1125 */
1126 gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
1127 dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
1128
1129 /* Make sure no CRS is recorded */
1130 out_be32(port->utl_base + PEUTL_RCSTA, 0x00040000);
1131
1132 switch (len) {
1133 case 1:
1134 *val = in_8((u8 *)(addr + offset));
1135 break;
1136 case 2:
1137 *val = in_le16((u16 *)(addr + offset));
1138 break;
1139 default:
1140 *val = in_le32((u32 *)(addr + offset));
1141 break;
1142 }
1143
1144 pr_debug("pcie-config-read: bus=%3d [%3d..%3d] devfn=0x%04x"
1145 " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
1146 bus->number, hose->first_busno, hose->last_busno,
1147 devfn, offset, len, addr + offset, *val);
1148
1149 /* Check for CRS (440SPe rev B does that for us but heh ..) */
1150 if (in_be32(port->utl_base + PEUTL_RCSTA) & 0x00040000) {
1151 pr_debug("Got CRS !\n");
1152 if (len != 4 || offset != 0)
1153 return PCIBIOS_DEVICE_NOT_FOUND;
1154 *val = 0xffff0001;
1155 }
1156
1157 dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
1158
1159 return PCIBIOS_SUCCESSFUL;
1160}
1161
1162static int ppc4xx_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
1163 int offset, int len, u32 val)
1164{
1165 struct pci_controller *hose = (struct pci_controller *) bus->sysdata;
1166 struct ppc4xx_pciex_port *port =
1167 &ppc4xx_pciex_ports[hose->indirect_type];
1168 void __iomem *addr;
1169 u32 gpl_cfg;
1170
1171 if (ppc4xx_pciex_validate_bdf(port, bus, devfn) != 0)
1172 return PCIBIOS_DEVICE_NOT_FOUND;
1173
1174 addr = ppc4xx_pciex_get_config_base(port, bus, devfn);
1175
1176 /*
1177 * Reading from configuration space of non-existing device can
1178 * generate transaction errors. For the read duration we suppress
1179 * assertion of machine check exceptions to avoid those.
1180 */
1181 gpl_cfg = dcr_read(port->dcrs, DCRO_PEGPL_CFG);
1182 dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg | GPL_DMER_MASK_DISA);
1183
1184 pr_debug("pcie-config-write: bus=%3d [%3d..%3d] devfn=0x%04x"
1185 " offset=0x%04x len=%d, addr=0x%p val=0x%08x\n",
1186 bus->number, hose->first_busno, hose->last_busno,
1187 devfn, offset, len, addr + offset, val);
1188
1189 switch (len) {
1190 case 1:
1191 out_8((u8 *)(addr + offset), val);
1192 break;
1193 case 2:
1194 out_le16((u16 *)(addr + offset), val);
1195 break;
1196 default:
1197 out_le32((u32 *)(addr + offset), val);
1198 break;
1199 }
1200
1201 dcr_write(port->dcrs, DCRO_PEGPL_CFG, gpl_cfg);
1202
1203 return PCIBIOS_SUCCESSFUL;
1204}
1205
1206static struct pci_ops ppc4xx_pciex_pci_ops =
1207{
1208 .read = ppc4xx_pciex_read_config,
1209 .write = ppc4xx_pciex_write_config,
1210};
1211
1212static void __init ppc4xx_configure_pciex_POMs(struct ppc4xx_pciex_port *port,
1213 struct pci_controller *hose,
1214 void __iomem *mbase)
1215{
1216 u32 lah, lal, pciah, pcial, sa;
1217 int i, j;
1218
1219 /* Setup outbound memory windows */
1220 for (i = j = 0; i < 3; i++) {
1221 struct resource *res = &hose->mem_resources[i];
1222
1223 /* we only care about memory windows */
1224 if (!(res->flags & IORESOURCE_MEM))
1225 continue;
1226 if (j > 1) {
1227 printk(KERN_WARNING "%s: Too many ranges\n",
1228 port->node->full_name);
1229 break;
1230 }
1231
1232 /* Calculate register values */
1233 lah = RES_TO_U32_HIGH(res->start);
1234 lal = RES_TO_U32_LOW(res->start);
1235 pciah = RES_TO_U32_HIGH(res->start - hose->pci_mem_offset);
1236 pcial = RES_TO_U32_LOW(res->start - hose->pci_mem_offset);
1237 sa = res->end + 1 - res->start;
1238 if (!is_power_of_2(sa) || sa < 0x100000 ||
1239 sa > 0xffffffffu) {
1240 printk(KERN_WARNING "%s: Resource out of range\n",
1241 port->node->full_name);
1242 continue;
1243 }
1244 sa = (0xffffffffu << ilog2(sa)) | 0x1;
1245
1246 /* Program register values */
1247 switch (j) {
1248 case 0:
1249 out_le32(mbase + PECFG_POM0LAH, pciah);
1250 out_le32(mbase + PECFG_POM0LAL, pcial);
1251 dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAH, lah);
1252 dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAL, lal);
1253 dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKH, 0x7fffffff);
1254 dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa | 3);
1255 break;
1256 case 1:
1257 out_le32(mbase + PECFG_POM1LAH, pciah);
1258 out_le32(mbase + PECFG_POM1LAL, pcial);
1259 dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAH, lah);
1260 dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAL, lal);
1261 dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKH, 0x7fffffff);
1262 dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, sa | 3);
1263 break;
1264 }
1265 j++;
1266 }
1267
1268 /* Configure IO, always 64K starting at 0 */
1269 if (hose->io_resource.flags & IORESOURCE_IO) {
1270 lah = RES_TO_U32_HIGH(hose->io_base_phys);
1271 lal = RES_TO_U32_LOW(hose->io_base_phys);
1272 out_le32(mbase + PECFG_POM2LAH, 0);
1273 out_le32(mbase + PECFG_POM2LAL, 0);
1274 dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAH, lah);
1275 dcr_write(port->dcrs, DCRO_PEGPL_OMR3BAL, lal);
1276 dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKH, 0x7fffffff);
1277 dcr_write(port->dcrs, DCRO_PEGPL_OMR3MSKL, 0xffff0000 | 3);
1278 }
1279}
1280
1281static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port,
1282 struct pci_controller *hose,
1283 void __iomem *mbase,
1284 struct resource *res)
1285{
1286 resource_size_t size = res->end - res->start + 1;
1287 u64 sa;
1288
1289 /* Calculate window size */
1290 sa = (0xffffffffffffffffull << ilog2(size));;
1291 if (res->flags & IORESOURCE_PREFETCH)
1292 sa |= 0x8;
1293
1294 out_le32(mbase + PECFG_BAR0HMPA, RES_TO_U32_HIGH(sa));
1295 out_le32(mbase + PECFG_BAR0LMPA, RES_TO_U32_LOW(sa));
1296
1297 /* The setup of the split looks weird to me ... let's see if it works */
1298 out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
1299 out_le32(mbase + PECFG_PIM0LAH, 0x00000000);
1300 out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
1301 out_le32(mbase + PECFG_PIM1LAH, 0x00000000);
1302 out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
1303 out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
1304
1305 /* Enable inbound mapping */
1306 out_le32(mbase + PECFG_PIMEN, 0x1);
1307
1308 out_le32(mbase + PCI_BASE_ADDRESS_0, RES_TO_U32_LOW(res->start));
1309 out_le32(mbase + PCI_BASE_ADDRESS_1, RES_TO_U32_HIGH(res->start));
1310
1311 /* Enable I/O, Mem, and Busmaster cycles */
1312 out_le16(mbase + PCI_COMMAND,
1313 in_le16(mbase + PCI_COMMAND) |
1314 PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
1315}
1316
1317static void __init ppc4xx_pciex_port_setup_hose(struct ppc4xx_pciex_port *port)
1318{
1319 struct resource dma_window;
1320 struct pci_controller *hose = NULL;
1321 const int *bus_range;
1322 int primary = 0, busses;
1323 void __iomem *mbase = NULL, *cfg_data = NULL;
1324
1325 /* XXX FIXME: Handle endpoint mode properly */
1326 if (port->endpoint) {
1327 printk(KERN_WARNING "PCIE%d: Port in endpoint mode !\n",
1328 port->index);
1329 return;
1330 }
1331
1332 /* Check if primary bridge */
1333 if (of_get_property(port->node, "primary", NULL))
1334 primary = 1;
1335
1336 /* Get bus range if any */
1337 bus_range = of_get_property(port->node, "bus-range", NULL);
1338
1339 /* Allocate the host controller data structure */
1340 hose = pcibios_alloc_controller(port->node);
1341 if (!hose)
1342 goto fail;
1343
1344 /* We stick the port number in "indirect_type" so the config space
1345 * ops can retrieve the port data structure easily
1346 */
1347 hose->indirect_type = port->index;
1348
1349 /* Get bus range */
1350 hose->first_busno = bus_range ? bus_range[0] : 0x0;
1351 hose->last_busno = bus_range ? bus_range[1] : 0xff;
1352
1353 /* Because of how big mapping the config space is (1M per bus), we
1354 * limit how many busses we support. In the long run, we could replace
1355 * that with something akin to kmap_atomic instead. We set aside 1 bus
1356 * for the host itself too.
1357 */
1358 busses = hose->last_busno - hose->first_busno; /* This is off by 1 */
1359 if (busses > MAX_PCIE_BUS_MAPPED) {
1360 busses = MAX_PCIE_BUS_MAPPED;
1361 hose->last_busno = hose->first_busno + busses;
1362 }
1363
1364 /* We map the external config space in cfg_data and the host config
1365 * space in cfg_addr. External space is 1M per bus, internal space
1366 * is 4K
1367 */
1368 cfg_data = ioremap(port->cfg_space.start +
1369 (hose->first_busno + 1) * 0x100000,
1370 busses * 0x100000);
1371 mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000);
1372 if (cfg_data == NULL || mbase == NULL) {
1373 printk(KERN_ERR "%s: Can't map config space !",
1374 port->node->full_name);
1375 goto fail;
1376 }
1377
1378 hose->cfg_data = cfg_data;
1379 hose->cfg_addr = mbase;
1380
1381 pr_debug("PCIE %s, bus %d..%d\n", port->node->full_name,
1382 hose->first_busno, hose->last_busno);
1383 pr_debug(" config space mapped at: root @0x%p, other @0x%p\n",
1384 hose->cfg_addr, hose->cfg_data);
1385
1386 /* Setup config space */
1387 hose->ops = &ppc4xx_pciex_pci_ops;
1388 port->hose = hose;
1389 mbase = (void __iomem *)hose->cfg_addr;
1390
1391 /*
1392 * Set bus numbers on our root port
1393 */
1394 out_8(mbase + PCI_PRIMARY_BUS, hose->first_busno);
1395 out_8(mbase + PCI_SECONDARY_BUS, hose->first_busno + 1);
1396 out_8(mbase + PCI_SUBORDINATE_BUS, hose->last_busno);
1397
1398 /*
1399 * OMRs are already reset, also disable PIMs
1400 */
1401 out_le32(mbase + PECFG_PIMEN, 0);
1402
1403 /* Parse outbound mapping resources */
1404 pci_process_bridge_OF_ranges(hose, port->node, primary);
1405
1406 /* Parse inbound mapping resources */
1407 if (ppc4xx_parse_dma_ranges(hose, mbase, &dma_window) != 0)
1408 goto fail;
1409
1410 /* Configure outbound ranges POMs */
1411 ppc4xx_configure_pciex_POMs(port, hose, mbase);
1412
1413 /* Configure inbound ranges PIMs */
1414 ppc4xx_configure_pciex_PIMs(port, hose, mbase, &dma_window);
1415
1416 /* The root complex doesn't show up if we don't set some vendor
1417 * and device IDs into it. Those are the same bogus one that the
1418 * initial code in arch/ppc add. We might want to change that.
1419 */
1420 out_le16(mbase + 0x200, 0xaaa0 + port->index);
1421 out_le16(mbase + 0x202, 0xbed0 + port->index);
1422
1423 /* Set Class Code to PCI-PCI bridge and Revision Id to 1 */
1424 out_le32(mbase + 0x208, 0x06040001);
1425
1426 printk(KERN_INFO "PCIE%d: successfully set as root-complex\n",
1427 port->index);
1428 return;
1429 fail:
1430 if (hose)
1431 pcibios_free_controller(hose);
1432 if (cfg_data)
1433 iounmap(cfg_data);
1434 if (mbase)
1435 iounmap(mbase);
1436}
1437
1438static void __init ppc4xx_probe_pciex_bridge(struct device_node *np)
1439{
1440 struct ppc4xx_pciex_port *port;
1441 const u32 *pval;
1442 int portno;
1443 unsigned int dcrs;
1444
1445 /* First, proceed to core initialization as we assume there's
1446 * only one PCIe core in the system
1447 */
1448 if (ppc4xx_pciex_check_core_init(np))
1449 return;
1450
1451 /* Get the port number from the device-tree */
1452 pval = of_get_property(np, "port", NULL);
1453 if (pval == NULL) {
1454 printk(KERN_ERR "PCIE: Can't find port number for %s\n",
1455 np->full_name);
1456 return;
1457 }
1458 portno = *pval;
1459 if (portno >= ppc4xx_pciex_port_count) {
1460 printk(KERN_ERR "PCIE: port number out of range for %s\n",
1461 np->full_name);
1462 return;
1463 }
1464 port = &ppc4xx_pciex_ports[portno];
1465 port->index = portno;
1466 port->node = of_node_get(np);
1467 pval = of_get_property(np, "sdr-base", NULL);
1468 if (pval == NULL) {
1469 printk(KERN_ERR "PCIE: missing sdr-base for %s\n",
1470 np->full_name);
1471 return;
1472 }
1473 port->sdr_base = *pval;
1474
1475 /* XXX Currently, we only support root complex mode */
1476 port->endpoint = 0;
1477
1478 /* Fetch config space registers address */
1479 if (of_address_to_resource(np, 0, &port->cfg_space)) {
1480 printk(KERN_ERR "%s: Can't get PCI-E config space !",
1481 np->full_name);
1482 return;
1483 }
1484 /* Fetch host bridge internal registers address */
1485 if (of_address_to_resource(np, 1, &port->utl_regs)) {
1486 printk(KERN_ERR "%s: Can't get UTL register base !",
1487 np->full_name);
1488 return;
1489 }
1490
1491 /* Map DCRs */
1492 dcrs = dcr_resource_start(np, 0);
1493 if (dcrs == 0) {
1494 printk(KERN_ERR "%s: Can't get DCR register base !",
1495 np->full_name);
1496 return;
1497 }
1498 port->dcrs = dcr_map(np, dcrs, dcr_resource_len(np, 0));
1499
1500 /* Initialize the port specific registers */
1501 if (ppc4xx_pciex_port_init(port)) {
1502 printk(KERN_WARNING "PCIE%d: Port init failed\n", port->index);
1503 return;
1504 }
1505
1506 /* Setup the linux hose data structure */
1507 ppc4xx_pciex_port_setup_hose(port);
1508}
1509
1510#endif /* CONFIG_PPC4xx_PCI_EXPRESS */
1511
1512static int __init ppc4xx_pci_find_bridges(void)
1513{
1514 struct device_node *np;
1515
1516#ifdef CONFIG_PPC4xx_PCI_EXPRESS
1517 for_each_compatible_node(np, NULL, "ibm,plb-pciex")
1518 ppc4xx_probe_pciex_bridge(np);
1519#endif
1520 for_each_compatible_node(np, NULL, "ibm,plb-pcix")
1521 ppc4xx_probe_pcix_bridge(np);
1522 for_each_compatible_node(np, NULL, "ibm,plb-pci")
1523 ppc4xx_probe_pci_bridge(np);
1524
1525 return 0;
1526}
1527arch_initcall(ppc4xx_pci_find_bridges);
1528
diff --git a/arch/powerpc/sysdev/ppc4xx_pci.h b/arch/powerpc/sysdev/ppc4xx_pci.h
new file mode 100644
index 000000000000..1c07908dc6ef
--- /dev/null
+++ b/arch/powerpc/sysdev/ppc4xx_pci.h
@@ -0,0 +1,369 @@
1/*
2 * PCI / PCI-X / PCI-Express support for 4xx parts
3 *
4 * Copyright 2007 Ben. Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Bits and pieces extracted from arch/ppc support by
7 *
8 * Matt Porter <mporter@kernel.crashing.org>
9 *
10 * Copyright 2002-2005 MontaVista Software Inc.
11 */
12#ifndef __PPC4XX_PCI_H__
13#define __PPC4XX_PCI_H__
14
15/*
16 * 4xx PCI-X bridge register definitions
17 */
18#define PCIX0_VENDID 0x000
19#define PCIX0_DEVID 0x002
20#define PCIX0_COMMAND 0x004
21#define PCIX0_STATUS 0x006
22#define PCIX0_REVID 0x008
23#define PCIX0_CLS 0x009
24#define PCIX0_CACHELS 0x00c
25#define PCIX0_LATTIM 0x00d
26#define PCIX0_HDTYPE 0x00e
27#define PCIX0_BIST 0x00f
28#define PCIX0_BAR0L 0x010
29#define PCIX0_BAR0H 0x014
30#define PCIX0_BAR1 0x018
31#define PCIX0_BAR2L 0x01c
32#define PCIX0_BAR2H 0x020
33#define PCIX0_BAR3 0x024
34#define PCIX0_CISPTR 0x028
35#define PCIX0_SBSYSVID 0x02c
36#define PCIX0_SBSYSID 0x02e
37#define PCIX0_EROMBA 0x030
38#define PCIX0_CAP 0x034
39#define PCIX0_RES0 0x035
40#define PCIX0_RES1 0x036
41#define PCIX0_RES2 0x038
42#define PCIX0_INTLN 0x03c
43#define PCIX0_INTPN 0x03d
44#define PCIX0_MINGNT 0x03e
45#define PCIX0_MAXLTNCY 0x03f
46#define PCIX0_BRDGOPT1 0x040
47#define PCIX0_BRDGOPT2 0x044
48#define PCIX0_ERREN 0x050
49#define PCIX0_ERRSTS 0x054
50#define PCIX0_PLBBESR 0x058
51#define PCIX0_PLBBEARL 0x05c
52#define PCIX0_PLBBEARH 0x060
53#define PCIX0_POM0LAL 0x068
54#define PCIX0_POM0LAH 0x06c
55#define PCIX0_POM0SA 0x070
56#define PCIX0_POM0PCIAL 0x074
57#define PCIX0_POM0PCIAH 0x078
58#define PCIX0_POM1LAL 0x07c
59#define PCIX0_POM1LAH 0x080
60#define PCIX0_POM1SA 0x084
61#define PCIX0_POM1PCIAL 0x088
62#define PCIX0_POM1PCIAH 0x08c
63#define PCIX0_POM2SA 0x090
64#define PCIX0_PIM0SAL 0x098
65#define PCIX0_PIM0SA PCIX0_PIM0SAL
66#define PCIX0_PIM0LAL 0x09c
67#define PCIX0_PIM0LAH 0x0a0
68#define PCIX0_PIM1SA 0x0a4
69#define PCIX0_PIM1LAL 0x0a8
70#define PCIX0_PIM1LAH 0x0ac
71#define PCIX0_PIM2SAL 0x0b0
72#define PCIX0_PIM2SA PCIX0_PIM2SAL
73#define PCIX0_PIM2LAL 0x0b4
74#define PCIX0_PIM2LAH 0x0b8
75#define PCIX0_OMCAPID 0x0c0
76#define PCIX0_OMNIPTR 0x0c1
77#define PCIX0_OMMC 0x0c2
78#define PCIX0_OMMA 0x0c4
79#define PCIX0_OMMUA 0x0c8
80#define PCIX0_OMMDATA 0x0cc
81#define PCIX0_OMMEOI 0x0ce
82#define PCIX0_PMCAPID 0x0d0
83#define PCIX0_PMNIPTR 0x0d1
84#define PCIX0_PMC 0x0d2
85#define PCIX0_PMCSR 0x0d4
86#define PCIX0_PMCSRBSE 0x0d6
87#define PCIX0_PMDATA 0x0d7
88#define PCIX0_PMSCRR 0x0d8
89#define PCIX0_CAPID 0x0dc
90#define PCIX0_NIPTR 0x0dd
91#define PCIX0_CMD 0x0de
92#define PCIX0_STS 0x0e0
93#define PCIX0_IDR 0x0e4
94#define PCIX0_CID 0x0e8
95#define PCIX0_RID 0x0ec
96#define PCIX0_PIM0SAH 0x0f8
97#define PCIX0_PIM2SAH 0x0fc
98#define PCIX0_MSGIL 0x100
99#define PCIX0_MSGIH 0x104
100#define PCIX0_MSGOL 0x108
101#define PCIX0_MSGOH 0x10c
102#define PCIX0_IM 0x1f8
103
104/*
105 * 4xx PCI bridge register definitions
106 */
107#define PCIL0_PMM0LA 0x00
108#define PCIL0_PMM0MA 0x04
109#define PCIL0_PMM0PCILA 0x08
110#define PCIL0_PMM0PCIHA 0x0c
111#define PCIL0_PMM1LA 0x10
112#define PCIL0_PMM1MA 0x14
113#define PCIL0_PMM1PCILA 0x18
114#define PCIL0_PMM1PCIHA 0x1c
115#define PCIL0_PMM2LA 0x20
116#define PCIL0_PMM2MA 0x24
117#define PCIL0_PMM2PCILA 0x28
118#define PCIL0_PMM2PCIHA 0x2c
119#define PCIL0_PTM1MS 0x30
120#define PCIL0_PTM1LA 0x34
121#define PCIL0_PTM2MS 0x38
122#define PCIL0_PTM2LA 0x3c
123
124/*
125 * 4xx PCIe bridge register definitions
126 */
127
128/* DCR offsets */
129#define DCRO_PEGPL_CFGBAH 0x00
130#define DCRO_PEGPL_CFGBAL 0x01
131#define DCRO_PEGPL_CFGMSK 0x02
132#define DCRO_PEGPL_MSGBAH 0x03
133#define DCRO_PEGPL_MSGBAL 0x04
134#define DCRO_PEGPL_MSGMSK 0x05
135#define DCRO_PEGPL_OMR1BAH 0x06
136#define DCRO_PEGPL_OMR1BAL 0x07
137#define DCRO_PEGPL_OMR1MSKH 0x08
138#define DCRO_PEGPL_OMR1MSKL 0x09
139#define DCRO_PEGPL_OMR2BAH 0x0a
140#define DCRO_PEGPL_OMR2BAL 0x0b
141#define DCRO_PEGPL_OMR2MSKH 0x0c
142#define DCRO_PEGPL_OMR2MSKL 0x0d
143#define DCRO_PEGPL_OMR3BAH 0x0e
144#define DCRO_PEGPL_OMR3BAL 0x0f
145#define DCRO_PEGPL_OMR3MSKH 0x10
146#define DCRO_PEGPL_OMR3MSKL 0x11
147#define DCRO_PEGPL_REGBAH 0x12
148#define DCRO_PEGPL_REGBAL 0x13
149#define DCRO_PEGPL_REGMSK 0x14
150#define DCRO_PEGPL_SPECIAL 0x15
151#define DCRO_PEGPL_CFG 0x16
152#define DCRO_PEGPL_ESR 0x17
153#define DCRO_PEGPL_EARH 0x18
154#define DCRO_PEGPL_EARL 0x19
155#define DCRO_PEGPL_EATR 0x1a
156
157/* DMER mask */
158#define GPL_DMER_MASK_DISA 0x02000000
159
160/*
161 * System DCRs (SDRs)
162 */
163#define PESDR0_PLLLCT1 0x03a0
164#define PESDR0_PLLLCT2 0x03a1
165#define PESDR0_PLLLCT3 0x03a2
166
167/*
168 * 440SPe additional DCRs
169 */
170#define PESDR0_440SPE_UTLSET1 0x0300
171#define PESDR0_440SPE_UTLSET2 0x0301
172#define PESDR0_440SPE_DLPSET 0x0302
173#define PESDR0_440SPE_LOOP 0x0303
174#define PESDR0_440SPE_RCSSET 0x0304
175#define PESDR0_440SPE_RCSSTS 0x0305
176#define PESDR0_440SPE_HSSL0SET1 0x0306
177#define PESDR0_440SPE_HSSL0SET2 0x0307
178#define PESDR0_440SPE_HSSL0STS 0x0308
179#define PESDR0_440SPE_HSSL1SET1 0x0309
180#define PESDR0_440SPE_HSSL1SET2 0x030a
181#define PESDR0_440SPE_HSSL1STS 0x030b
182#define PESDR0_440SPE_HSSL2SET1 0x030c
183#define PESDR0_440SPE_HSSL2SET2 0x030d
184#define PESDR0_440SPE_HSSL2STS 0x030e
185#define PESDR0_440SPE_HSSL3SET1 0x030f
186#define PESDR0_440SPE_HSSL3SET2 0x0310
187#define PESDR0_440SPE_HSSL3STS 0x0311
188#define PESDR0_440SPE_HSSL4SET1 0x0312
189#define PESDR0_440SPE_HSSL4SET2 0x0313
190#define PESDR0_440SPE_HSSL4STS 0x0314
191#define PESDR0_440SPE_HSSL5SET1 0x0315
192#define PESDR0_440SPE_HSSL5SET2 0x0316
193#define PESDR0_440SPE_HSSL5STS 0x0317
194#define PESDR0_440SPE_HSSL6SET1 0x0318
195#define PESDR0_440SPE_HSSL6SET2 0x0319
196#define PESDR0_440SPE_HSSL6STS 0x031a
197#define PESDR0_440SPE_HSSL7SET1 0x031b
198#define PESDR0_440SPE_HSSL7SET2 0x031c
199#define PESDR0_440SPE_HSSL7STS 0x031d
200#define PESDR0_440SPE_HSSCTLSET 0x031e
201#define PESDR0_440SPE_LANE_ABCD 0x031f
202#define PESDR0_440SPE_LANE_EFGH 0x0320
203
204#define PESDR1_440SPE_UTLSET1 0x0340
205#define PESDR1_440SPE_UTLSET2 0x0341
206#define PESDR1_440SPE_DLPSET 0x0342
207#define PESDR1_440SPE_LOOP 0x0343
208#define PESDR1_440SPE_RCSSET 0x0344
209#define PESDR1_440SPE_RCSSTS 0x0345
210#define PESDR1_440SPE_HSSL0SET1 0x0346
211#define PESDR1_440SPE_HSSL0SET2 0x0347
212#define PESDR1_440SPE_HSSL0STS 0x0348
213#define PESDR1_440SPE_HSSL1SET1 0x0349
214#define PESDR1_440SPE_HSSL1SET2 0x034a
215#define PESDR1_440SPE_HSSL1STS 0x034b
216#define PESDR1_440SPE_HSSL2SET1 0x034c
217#define PESDR1_440SPE_HSSL2SET2 0x034d
218#define PESDR1_440SPE_HSSL2STS 0x034e
219#define PESDR1_440SPE_HSSL3SET1 0x034f
220#define PESDR1_440SPE_HSSL3SET2 0x0350
221#define PESDR1_440SPE_HSSL3STS 0x0351
222#define PESDR1_440SPE_HSSCTLSET 0x0352
223#define PESDR1_440SPE_LANE_ABCD 0x0353
224
225#define PESDR2_440SPE_UTLSET1 0x0370
226#define PESDR2_440SPE_UTLSET2 0x0371
227#define PESDR2_440SPE_DLPSET 0x0372
228#define PESDR2_440SPE_LOOP 0x0373
229#define PESDR2_440SPE_RCSSET 0x0374
230#define PESDR2_440SPE_RCSSTS 0x0375
231#define PESDR2_440SPE_HSSL0SET1 0x0376
232#define PESDR2_440SPE_HSSL0SET2 0x0377
233#define PESDR2_440SPE_HSSL0STS 0x0378
234#define PESDR2_440SPE_HSSL1SET1 0x0379
235#define PESDR2_440SPE_HSSL1SET2 0x037a
236#define PESDR2_440SPE_HSSL1STS 0x037b
237#define PESDR2_440SPE_HSSL2SET1 0x037c
238#define PESDR2_440SPE_HSSL2SET2 0x037d
239#define PESDR2_440SPE_HSSL2STS 0x037e
240#define PESDR2_440SPE_HSSL3SET1 0x037f
241#define PESDR2_440SPE_HSSL3SET2 0x0380
242#define PESDR2_440SPE_HSSL3STS 0x0381
243#define PESDR2_440SPE_HSSCTLSET 0x0382
244#define PESDR2_440SPE_LANE_ABCD 0x0383
245
246/*
247 * 405EX additional DCRs
248 */
249#define PESDR0_405EX_UTLSET1 0x0400
250#define PESDR0_405EX_UTLSET2 0x0401
251#define PESDR0_405EX_DLPSET 0x0402
252#define PESDR0_405EX_LOOP 0x0403
253#define PESDR0_405EX_RCSSET 0x0404
254#define PESDR0_405EX_RCSSTS 0x0405
255#define PESDR0_405EX_PHYSET1 0x0406
256#define PESDR0_405EX_PHYSET2 0x0407
257#define PESDR0_405EX_BIST 0x0408
258#define PESDR0_405EX_LPB 0x040B
259#define PESDR0_405EX_PHYSTA 0x040C
260
261#define PESDR1_405EX_UTLSET1 0x0440
262#define PESDR1_405EX_UTLSET2 0x0441
263#define PESDR1_405EX_DLPSET 0x0442
264#define PESDR1_405EX_LOOP 0x0443
265#define PESDR1_405EX_RCSSET 0x0444
266#define PESDR1_405EX_RCSSTS 0x0445
267#define PESDR1_405EX_PHYSET1 0x0446
268#define PESDR1_405EX_PHYSET2 0x0447
269#define PESDR1_405EX_BIST 0x0448
270#define PESDR1_405EX_LPB 0x044B
271#define PESDR1_405EX_PHYSTA 0x044C
272
273/*
274 * Of the above, some are common offsets from the base
275 */
276#define PESDRn_UTLSET1 0x00
277#define PESDRn_UTLSET2 0x01
278#define PESDRn_DLPSET 0x02
279#define PESDRn_LOOP 0x03
280#define PESDRn_RCSSET 0x04
281#define PESDRn_RCSSTS 0x05
282
283/* 440spe only */
284#define PESDRn_440SPE_HSSL0SET1 0x06
285#define PESDRn_440SPE_HSSL0SET2 0x07
286#define PESDRn_440SPE_HSSL0STS 0x08
287#define PESDRn_440SPE_HSSL1SET1 0x09
288#define PESDRn_440SPE_HSSL1SET2 0x0a
289#define PESDRn_440SPE_HSSL1STS 0x0b
290#define PESDRn_440SPE_HSSL2SET1 0x0c
291#define PESDRn_440SPE_HSSL2SET2 0x0d
292#define PESDRn_440SPE_HSSL2STS 0x0e
293#define PESDRn_440SPE_HSSL3SET1 0x0f
294#define PESDRn_440SPE_HSSL3SET2 0x10
295#define PESDRn_440SPE_HSSL3STS 0x11
296
297/* 440spe port 0 only */
298#define PESDRn_440SPE_HSSL4SET1 0x12
299#define PESDRn_440SPE_HSSL4SET2 0x13
300#define PESDRn_440SPE_HSSL4STS 0x14
301#define PESDRn_440SPE_HSSL5SET1 0x15
302#define PESDRn_440SPE_HSSL5SET2 0x16
303#define PESDRn_440SPE_HSSL5STS 0x17
304#define PESDRn_440SPE_HSSL6SET1 0x18
305#define PESDRn_440SPE_HSSL6SET2 0x19
306#define PESDRn_440SPE_HSSL6STS 0x1a
307#define PESDRn_440SPE_HSSL7SET1 0x1b
308#define PESDRn_440SPE_HSSL7SET2 0x1c
309#define PESDRn_440SPE_HSSL7STS 0x1d
310
311/* 405ex only */
312#define PESDRn_405EX_PHYSET1 0x06
313#define PESDRn_405EX_PHYSET2 0x07
314#define PESDRn_405EX_PHYSTA 0x0c
315
316/*
317 * UTL register offsets
318 */
319#define PEUTL_PBCTL 0x00
320#define PEUTL_PBBSZ 0x20
321#define PEUTL_OPDBSZ 0x68
322#define PEUTL_IPHBSZ 0x70
323#define PEUTL_IPDBSZ 0x78
324#define PEUTL_OUTTR 0x90
325#define PEUTL_INTR 0x98
326#define PEUTL_PCTL 0xa0
327#define PEUTL_RCSTA 0xB0
328#define PEUTL_RCIRQEN 0xb8
329
330/*
331 * Config space register offsets
332 */
333#define PECFG_ECRTCTL 0x074
334
335#define PECFG_BAR0LMPA 0x210
336#define PECFG_BAR0HMPA 0x214
337#define PECFG_BAR1MPA 0x218
338#define PECFG_BAR2LMPA 0x220
339#define PECFG_BAR2HMPA 0x224
340
341#define PECFG_PIMEN 0x33c
342#define PECFG_PIM0LAL 0x340
343#define PECFG_PIM0LAH 0x344
344#define PECFG_PIM1LAL 0x348
345#define PECFG_PIM1LAH 0x34c
346#define PECFG_PIM01SAL 0x350
347#define PECFG_PIM01SAH 0x354
348
349#define PECFG_POM0LAL 0x380
350#define PECFG_POM0LAH 0x384
351#define PECFG_POM1LAL 0x388
352#define PECFG_POM1LAH 0x38c
353#define PECFG_POM2LAL 0x390
354#define PECFG_POM2LAH 0x394
355
356
357enum
358{
359 PTYPE_ENDPOINT = 0x0,
360 PTYPE_LEGACY_ENDPOINT = 0x1,
361 PTYPE_ROOT_PORT = 0x4,
362
363 LNKW_X1 = 0x1,
364 LNKW_X4 = 0x4,
365 LNKW_X8 = 0x8
366};
367
368
369#endif /* __PPC4XX_PCI_H__ */
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig
index f611d344a126..adc66212a419 100644
--- a/arch/powerpc/sysdev/qe_lib/Kconfig
+++ b/arch/powerpc/sysdev/qe_lib/Kconfig
@@ -4,7 +4,7 @@
4 4
5config UCC_SLOW 5config UCC_SLOW
6 bool 6 bool
7 default n 7 default y if SERIAL_QE
8 help 8 help
9 This option provides qe_lib support to UCC slow 9 This option provides qe_lib support to UCC slow
10 protocols: UART, BISYNC, QMC 10 protocols: UART, BISYNC, QMC
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 3d57d3835b04..5ef844da9355 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -25,6 +25,7 @@
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/crc32.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <asm/page.h> 30#include <asm/page.h>
30#include <asm/pgtable.h> 31#include <asm/pgtable.h>
@@ -64,17 +65,22 @@ static phys_addr_t qebase = -1;
64phys_addr_t get_qe_base(void) 65phys_addr_t get_qe_base(void)
65{ 66{
66 struct device_node *qe; 67 struct device_node *qe;
68 unsigned int size;
69 const void *prop;
67 70
68 if (qebase != -1) 71 if (qebase != -1)
69 return qebase; 72 return qebase;
70 73
71 qe = of_find_node_by_type(NULL, "qe"); 74 qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
72 if (qe) { 75 if (!qe) {
73 unsigned int size; 76 qe = of_find_node_by_type(NULL, "qe");
74 const void *prop = of_get_property(qe, "reg", &size); 77 if (!qe)
75 qebase = of_translate_address(qe, prop); 78 return qebase;
76 of_node_put(qe); 79 }
77 }; 80
81 prop = of_get_property(qe, "reg", &size);
82 qebase = of_translate_address(qe, prop);
83 of_node_put(qe);
78 84
79 return qebase; 85 return qebase;
80} 86}
@@ -152,34 +158,45 @@ static unsigned int brg_clk = 0;
152unsigned int get_brg_clk(void) 158unsigned int get_brg_clk(void)
153{ 159{
154 struct device_node *qe; 160 struct device_node *qe;
161 unsigned int size;
162 const u32 *prop;
163
155 if (brg_clk) 164 if (brg_clk)
156 return brg_clk; 165 return brg_clk;
157 166
158 qe = of_find_node_by_type(NULL, "qe"); 167 qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
159 if (qe) { 168 if (!qe) {
160 unsigned int size; 169 qe = of_find_node_by_type(NULL, "qe");
161 const u32 *prop = of_get_property(qe, "brg-frequency", &size); 170 if (!qe)
162 brg_clk = *prop; 171 return brg_clk;
163 of_node_put(qe); 172 }
164 }; 173
174 prop = of_get_property(qe, "brg-frequency", &size);
175 if (!prop || size != sizeof(*prop))
176 return brg_clk;
177
178 brg_clk = *prop;
179 of_node_put(qe);
180
165 return brg_clk; 181 return brg_clk;
166} 182}
167 183
168/* Program the BRG to the given sampling rate and multiplier 184/* Program the BRG to the given sampling rate and multiplier
169 * 185 *
170 * @brg: the BRG, 1-16 186 * @brg: the BRG, QE_BRG1 - QE_BRG16
171 * @rate: the desired sampling rate 187 * @rate: the desired sampling rate
172 * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or 188 * @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or
173 * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01, 189 * GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01,
174 * then 'multiplier' should be 8. 190 * then 'multiplier' should be 8.
175 *
176 * Also note that the value programmed into the BRGC register must be even.
177 */ 191 */
178void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier) 192int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
179{ 193{
180 u32 divisor, tempval; 194 u32 divisor, tempval;
181 u32 div16 = 0; 195 u32 div16 = 0;
182 196
197 if ((brg < QE_BRG1) || (brg > QE_BRG16))
198 return -EINVAL;
199
183 divisor = get_brg_clk() / (rate * multiplier); 200 divisor = get_brg_clk() / (rate * multiplier);
184 201
185 if (divisor > QE_BRGC_DIVISOR_MAX + 1) { 202 if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
@@ -196,8 +213,43 @@ void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
196 tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) | 213 tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
197 QE_BRGC_ENABLE | div16; 214 QE_BRGC_ENABLE | div16;
198 215
199 out_be32(&qe_immr->brg.brgc[brg - 1], tempval); 216 out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
217
218 return 0;
219}
220EXPORT_SYMBOL(qe_setbrg);
221
222/* Convert a string to a QE clock source enum
223 *
224 * This function takes a string, typically from a property in the device
225 * tree, and returns the corresponding "enum qe_clock" value.
226*/
227enum qe_clock qe_clock_source(const char *source)
228{
229 unsigned int i;
230
231 if (strcasecmp(source, "none") == 0)
232 return QE_CLK_NONE;
233
234 if (strncasecmp(source, "brg", 3) == 0) {
235 i = simple_strtoul(source + 3, NULL, 10);
236 if ((i >= 1) && (i <= 16))
237 return (QE_BRG1 - 1) + i;
238 else
239 return QE_CLK_DUMMY;
240 }
241
242 if (strncasecmp(source, "clk", 3) == 0) {
243 i = simple_strtoul(source + 3, NULL, 10);
244 if ((i >= 1) && (i <= 24))
245 return (QE_CLK1 - 1) + i;
246 else
247 return QE_CLK_DUMMY;
248 }
249
250 return QE_CLK_DUMMY;
200} 251}
252EXPORT_SYMBOL(qe_clock_source);
201 253
202/* Initialize SNUMs (thread serial numbers) according to 254/* Initialize SNUMs (thread serial numbers) according to
203 * QE Module Control chapter, SNUM table 255 * QE Module Control chapter, SNUM table
@@ -285,7 +337,7 @@ static rh_info_t qe_muram_info;
285static void qe_muram_init(void) 337static void qe_muram_init(void)
286{ 338{
287 struct device_node *np; 339 struct device_node *np;
288 u32 address; 340 const u32 *address;
289 u64 size; 341 u64 size;
290 unsigned int flags; 342 unsigned int flags;
291 343
@@ -298,11 +350,21 @@ static void qe_muram_init(void)
298 /* XXX: This is a subset of the available muram. It 350 /* XXX: This is a subset of the available muram. It
299 * varies with the processor and the microcode patches activated. 351 * varies with the processor and the microcode patches activated.
300 */ 352 */
301 if ((np = of_find_node_by_name(NULL, "data-only")) != NULL) { 353 np = of_find_compatible_node(NULL, NULL, "fsl,qe-muram-data");
302 address = *of_get_address(np, 0, &size, &flags); 354 if (!np) {
303 of_node_put(np); 355 np = of_find_node_by_name(NULL, "data-only");
304 rh_attach_region(&qe_muram_info, address, (int) size); 356 if (!np) {
357 WARN_ON(1);
358 return;
359 }
305 } 360 }
361
362 address = of_get_address(np, 0, &size, &flags);
363 WARN_ON(!address);
364
365 of_node_put(np);
366 if (address)
367 rh_attach_region(&qe_muram_info, *address, (int)size);
306} 368}
307 369
308/* This function returns an index into the MURAM area. 370/* This function returns an index into the MURAM area.
@@ -358,3 +420,249 @@ void *qe_muram_addr(unsigned long offset)
358 return (void *)&qe_immr->muram[offset]; 420 return (void *)&qe_immr->muram[offset];
359} 421}
360EXPORT_SYMBOL(qe_muram_addr); 422EXPORT_SYMBOL(qe_muram_addr);
423
424/* The maximum number of RISCs we support */
425#define MAX_QE_RISC 2
426
427/* Firmware information stored here for qe_get_firmware_info() */
428static struct qe_firmware_info qe_firmware_info;
429
430/*
431 * Set to 1 if QE firmware has been uploaded, and therefore
432 * qe_firmware_info contains valid data.
433 */
434static int qe_firmware_uploaded;
435
436/*
437 * Upload a QE microcode
438 *
439 * This function is a worker function for qe_upload_firmware(). It does
440 * the actual uploading of the microcode.
441 */
442static void qe_upload_microcode(const void *base,
443 const struct qe_microcode *ucode)
444{
445 const __be32 *code = base + be32_to_cpu(ucode->code_offset);
446 unsigned int i;
447
448 if (ucode->major || ucode->minor || ucode->revision)
449 printk(KERN_INFO "qe-firmware: "
450 "uploading microcode '%s' version %u.%u.%u\n",
451 ucode->id, ucode->major, ucode->minor, ucode->revision);
452 else
453 printk(KERN_INFO "qe-firmware: "
454 "uploading microcode '%s'\n", ucode->id);
455
456 /* Use auto-increment */
457 out_be32(&qe_immr->iram.iadd, be32_to_cpu(ucode->iram_offset) |
458 QE_IRAM_IADD_AIE | QE_IRAM_IADD_BADDR);
459
460 for (i = 0; i < be32_to_cpu(ucode->count); i++)
461 out_be32(&qe_immr->iram.idata, be32_to_cpu(code[i]));
462}
463
464/*
465 * Upload a microcode to the I-RAM at a specific address.
466 *
467 * See Documentation/powerpc/qe-firmware.txt for information on QE microcode
468 * uploading.
469 *
470 * Currently, only version 1 is supported, so the 'version' field must be
471 * set to 1.
472 *
473 * The SOC model and revision are not validated, they are only displayed for
474 * informational purposes.
475 *
476 * 'calc_size' is the calculated size, in bytes, of the firmware structure and
477 * all of the microcode structures, minus the CRC.
478 *
479 * 'length' is the size that the structure says it is, including the CRC.
480 */
481int qe_upload_firmware(const struct qe_firmware *firmware)
482{
483 unsigned int i;
484 unsigned int j;
485 u32 crc;
486 size_t calc_size = sizeof(struct qe_firmware);
487 size_t length;
488 const struct qe_header *hdr;
489
490 if (!firmware) {
491 printk(KERN_ERR "qe-firmware: invalid pointer\n");
492 return -EINVAL;
493 }
494
495 hdr = &firmware->header;
496 length = be32_to_cpu(hdr->length);
497
498 /* Check the magic */
499 if ((hdr->magic[0] != 'Q') || (hdr->magic[1] != 'E') ||
500 (hdr->magic[2] != 'F')) {
501 printk(KERN_ERR "qe-firmware: not a microcode\n");
502 return -EPERM;
503 }
504
505 /* Check the version */
506 if (hdr->version != 1) {
507 printk(KERN_ERR "qe-firmware: unsupported version\n");
508 return -EPERM;
509 }
510
511 /* Validate some of the fields */
512 if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) {
513 printk(KERN_ERR "qe-firmware: invalid data\n");
514 return -EINVAL;
515 }
516
517 /* Validate the length and check if there's a CRC */
518 calc_size += (firmware->count - 1) * sizeof(struct qe_microcode);
519
520 for (i = 0; i < firmware->count; i++)
521 /*
522 * For situations where the second RISC uses the same microcode
523 * as the first, the 'code_offset' and 'count' fields will be
524 * zero, so it's okay to add those.
525 */
526 calc_size += sizeof(__be32) *
527 be32_to_cpu(firmware->microcode[i].count);
528
529 /* Validate the length */
530 if (length != calc_size + sizeof(__be32)) {
531 printk(KERN_ERR "qe-firmware: invalid length\n");
532 return -EPERM;
533 }
534
535 /* Validate the CRC */
536 crc = be32_to_cpu(*(__be32 *)((void *)firmware + calc_size));
537 if (crc != crc32(0, firmware, calc_size)) {
538 printk(KERN_ERR "qe-firmware: firmware CRC is invalid\n");
539 return -EIO;
540 }
541
542 /*
543 * If the microcode calls for it, split the I-RAM.
544 */
545 if (!firmware->split)
546 setbits16(&qe_immr->cp.cercr, QE_CP_CERCR_CIR);
547
548 if (firmware->soc.model)
549 printk(KERN_INFO
550 "qe-firmware: firmware '%s' for %u V%u.%u\n",
551 firmware->id, be16_to_cpu(firmware->soc.model),
552 firmware->soc.major, firmware->soc.minor);
553 else
554 printk(KERN_INFO "qe-firmware: firmware '%s'\n",
555 firmware->id);
556
557 /*
558 * The QE only supports one microcode per RISC, so clear out all the
559 * saved microcode information and put in the new.
560 */
561 memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
562 strcpy(qe_firmware_info.id, firmware->id);
563 qe_firmware_info.extended_modes = firmware->extended_modes;
564 memcpy(qe_firmware_info.vtraps, firmware->vtraps,
565 sizeof(firmware->vtraps));
566
567 /* Loop through each microcode. */
568 for (i = 0; i < firmware->count; i++) {
569 const struct qe_microcode *ucode = &firmware->microcode[i];
570
571 /* Upload a microcode if it's present */
572 if (ucode->code_offset)
573 qe_upload_microcode(firmware, ucode);
574
575 /* Program the traps for this processor */
576 for (j = 0; j < 16; j++) {
577 u32 trap = be32_to_cpu(ucode->traps[j]);
578
579 if (trap)
580 out_be32(&qe_immr->rsp[i].tibcr[j], trap);
581 }
582
583 /* Enable traps */
584 out_be32(&qe_immr->rsp[i].eccr, be32_to_cpu(ucode->eccr));
585 }
586
587 qe_firmware_uploaded = 1;
588
589 return 0;
590}
591EXPORT_SYMBOL(qe_upload_firmware);
592
593/*
594 * Get info on the currently-loaded firmware
595 *
596 * This function also checks the device tree to see if the boot loader has
597 * uploaded a firmware already.
598 */
599struct qe_firmware_info *qe_get_firmware_info(void)
600{
601 static int initialized;
602 struct property *prop;
603 struct device_node *qe;
604 struct device_node *fw = NULL;
605 const char *sprop;
606 unsigned int i;
607
608 /*
609 * If we haven't checked yet, and a driver hasn't uploaded a firmware
610 * yet, then check the device tree for information.
611 */
612 if (initialized || qe_firmware_uploaded)
613 return NULL;
614
615 initialized = 1;
616
617 /*
618 * Newer device trees have an "fsl,qe" compatible property for the QE
619 * node, but we still need to support older device trees.
620 */
621 qe = of_find_compatible_node(NULL, NULL, "fsl,qe");
622 if (!qe) {
623 qe = of_find_node_by_type(NULL, "qe");
624 if (!qe)
625 return NULL;
626 }
627
628 /* Find the 'firmware' child node */
629 for_each_child_of_node(qe, fw) {
630 if (strcmp(fw->name, "firmware") == 0)
631 break;
632 }
633
634 of_node_put(qe);
635
636 /* Did we find the 'firmware' node? */
637 if (!fw)
638 return NULL;
639
640 qe_firmware_uploaded = 1;
641
642 /* Copy the data into qe_firmware_info*/
643 sprop = of_get_property(fw, "id", NULL);
644 if (sprop)
645 strncpy(qe_firmware_info.id, sprop,
646 sizeof(qe_firmware_info.id) - 1);
647
648 prop = of_find_property(fw, "extended-modes", NULL);
649 if (prop && (prop->length == sizeof(u64))) {
650 const u64 *iprop = prop->value;
651
652 qe_firmware_info.extended_modes = *iprop;
653 }
654
655 prop = of_find_property(fw, "virtual-traps", NULL);
656 if (prop && (prop->length == 32)) {
657 const u32 *iprop = prop->value;
658
659 for (i = 0; i < ARRAY_SIZE(qe_firmware_info.vtraps); i++)
660 qe_firmware_info.vtraps[i] = iprop[i];
661 }
662
663 of_node_put(fw);
664
665 return &qe_firmware_info;
666}
667EXPORT_SYMBOL(qe_get_firmware_info);
668
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
index 0174b3aeef8f..b2870b208ddb 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c
@@ -19,6 +19,7 @@
19#include <linux/stddef.h> 19#include <linux/stddef.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/module.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/immap_qe.h> 25#include <asm/immap_qe.h>
@@ -41,6 +42,7 @@ u32 ucc_slow_get_qe_cr_subblock(int uccs_num)
41 default: return QE_CR_SUBBLOCK_INVALID; 42 default: return QE_CR_SUBBLOCK_INVALID;
42 } 43 }
43} 44}
45EXPORT_SYMBOL(ucc_slow_get_qe_cr_subblock);
44 46
45void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs) 47void ucc_slow_poll_transmitter_now(struct ucc_slow_private * uccs)
46{ 48{
@@ -56,6 +58,7 @@ void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)
56 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id, 58 qe_issue_cmd(QE_GRACEFUL_STOP_TX, id,
57 QE_CR_PROTOCOL_UNSPECIFIED, 0); 59 QE_CR_PROTOCOL_UNSPECIFIED, 0);
58} 60}
61EXPORT_SYMBOL(ucc_slow_graceful_stop_tx);
59 62
60void ucc_slow_stop_tx(struct ucc_slow_private * uccs) 63void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
61{ 64{
@@ -65,6 +68,7 @@ void ucc_slow_stop_tx(struct ucc_slow_private * uccs)
65 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 68 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
66 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0); 69 qe_issue_cmd(QE_STOP_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
67} 70}
71EXPORT_SYMBOL(ucc_slow_stop_tx);
68 72
69void ucc_slow_restart_tx(struct ucc_slow_private * uccs) 73void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
70{ 74{
@@ -74,6 +78,7 @@ void ucc_slow_restart_tx(struct ucc_slow_private * uccs)
74 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num); 78 id = ucc_slow_get_qe_cr_subblock(us_info->ucc_num);
75 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0); 79 qe_issue_cmd(QE_RESTART_TX, id, QE_CR_PROTOCOL_UNSPECIFIED, 0);
76} 80}
81EXPORT_SYMBOL(ucc_slow_restart_tx);
77 82
78void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode) 83void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
79{ 84{
@@ -94,6 +99,7 @@ void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode)
94 } 99 }
95 out_be32(&us_regs->gumr_l, gumr_l); 100 out_be32(&us_regs->gumr_l, gumr_l);
96} 101}
102EXPORT_SYMBOL(ucc_slow_enable);
97 103
98void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) 104void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
99{ 105{
@@ -114,6 +120,7 @@ void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode)
114 } 120 }
115 out_be32(&us_regs->gumr_l, gumr_l); 121 out_be32(&us_regs->gumr_l, gumr_l);
116} 122}
123EXPORT_SYMBOL(ucc_slow_disable);
117 124
118/* Initialize the UCC for Slow operations 125/* Initialize the UCC for Slow operations
119 * 126 *
@@ -347,6 +354,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc
347 *uccs_ret = uccs; 354 *uccs_ret = uccs;
348 return 0; 355 return 0;
349} 356}
357EXPORT_SYMBOL(ucc_slow_init);
350 358
351void ucc_slow_free(struct ucc_slow_private * uccs) 359void ucc_slow_free(struct ucc_slow_private * uccs)
352{ 360{
@@ -366,5 +374,5 @@ void ucc_slow_free(struct ucc_slow_private * uccs)
366 374
367 kfree(uccs); 375 kfree(uccs);
368} 376}
369 377EXPORT_SYMBOL(ucc_slow_free);
370 378
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c
index a113d800cbf0..be2808a292f7 100644
--- a/arch/powerpc/sysdev/tsi108_dev.c
+++ b/arch/powerpc/sysdev/tsi108_dev.c
@@ -66,14 +66,12 @@ EXPORT_SYMBOL(get_vir_csrbase);
66static int __init tsi108_eth_of_init(void) 66static int __init tsi108_eth_of_init(void)
67{ 67{
68 struct device_node *np; 68 struct device_node *np;
69 unsigned int i; 69 unsigned int i = 0;
70 struct platform_device *tsi_eth_dev; 70 struct platform_device *tsi_eth_dev;
71 struct resource res; 71 struct resource res;
72 int ret; 72 int ret;
73 73
74 for (np = NULL, i = 0; 74 for_each_compatible_node(np, "network", "tsi108-ethernet") {
75 (np = of_find_compatible_node(np, "network", "tsi108-ethernet")) != NULL;
76 i++) {
77 struct resource r[2]; 75 struct resource r[2];
78 struct device_node *phy, *mdio; 76 struct device_node *phy, *mdio;
79 hw_info tsi_eth_data; 77 hw_info tsi_eth_data;
@@ -98,7 +96,7 @@ static int __init tsi108_eth_of_init(void)
98 __FUNCTION__,r[1].name, r[1].start, r[1].end); 96 __FUNCTION__,r[1].name, r[1].start, r[1].end);
99 97
100 tsi_eth_dev = 98 tsi_eth_dev =
101 platform_device_register_simple("tsi-ethernet", i, &r[0], 99 platform_device_register_simple("tsi-ethernet", i++, &r[0],
102 1); 100 1);
103 101
104 if (IS_ERR(tsi_eth_dev)) { 102 if (IS_ERR(tsi_eth_dev)) {
@@ -154,6 +152,7 @@ static int __init tsi108_eth_of_init(void)
154unreg: 152unreg:
155 platform_device_unregister(tsi_eth_dev); 153 platform_device_unregister(tsi_eth_dev);
156err: 154err:
155 of_node_put(np);
157 return ret; 156 return ret;
158} 157}
159 158
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index 847a5496b869..625b275c3795 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -53,21 +53,23 @@ struct uic {
53 53
54 /* The remapper for this UIC */ 54 /* The remapper for this UIC */
55 struct irq_host *irqhost; 55 struct irq_host *irqhost;
56
57 /* For secondary UICs, the cascade interrupt's irqaction */
58 struct irqaction cascade;
59}; 56};
60 57
61static void uic_unmask_irq(unsigned int virq) 58static void uic_unmask_irq(unsigned int virq)
62{ 59{
60 struct irq_desc *desc = get_irq_desc(virq);
63 struct uic *uic = get_irq_chip_data(virq); 61 struct uic *uic = get_irq_chip_data(virq);
64 unsigned int src = uic_irq_to_hw(virq); 62 unsigned int src = uic_irq_to_hw(virq);
65 unsigned long flags; 63 unsigned long flags;
66 u32 er; 64 u32 er, sr;
67 65
66 sr = 1 << (31-src);
68 spin_lock_irqsave(&uic->lock, flags); 67 spin_lock_irqsave(&uic->lock, flags);
68 /* ack level-triggered interrupts here */
69 if (desc->status & IRQ_LEVEL)
70 mtdcr(uic->dcrbase + UIC_SR, sr);
69 er = mfdcr(uic->dcrbase + UIC_ER); 71 er = mfdcr(uic->dcrbase + UIC_ER);
70 er |= 1 << (31 - src); 72 er |= sr;
71 mtdcr(uic->dcrbase + UIC_ER, er); 73 mtdcr(uic->dcrbase + UIC_ER, er);
72 spin_unlock_irqrestore(&uic->lock, flags); 74 spin_unlock_irqrestore(&uic->lock, flags);
73} 75}
@@ -99,6 +101,7 @@ static void uic_ack_irq(unsigned int virq)
99 101
100static void uic_mask_ack_irq(unsigned int virq) 102static void uic_mask_ack_irq(unsigned int virq)
101{ 103{
104 struct irq_desc *desc = get_irq_desc(virq);
102 struct uic *uic = get_irq_chip_data(virq); 105 struct uic *uic = get_irq_chip_data(virq);
103 unsigned int src = uic_irq_to_hw(virq); 106 unsigned int src = uic_irq_to_hw(virq);
104 unsigned long flags; 107 unsigned long flags;
@@ -109,7 +112,16 @@ static void uic_mask_ack_irq(unsigned int virq)
109 er = mfdcr(uic->dcrbase + UIC_ER); 112 er = mfdcr(uic->dcrbase + UIC_ER);
110 er &= ~sr; 113 er &= ~sr;
111 mtdcr(uic->dcrbase + UIC_ER, er); 114 mtdcr(uic->dcrbase + UIC_ER, er);
112 mtdcr(uic->dcrbase + UIC_SR, sr); 115 /* On the UIC, acking (i.e. clearing the SR bit)
116 * a level irq will have no effect if the interrupt
117 * is still asserted by the device, even if
118 * the interrupt is already masked. Therefore
119 * we only ack the egde interrupts here, while
120 * level interrupts are ack'ed after the actual
121 * isr call in the uic_unmask_irq()
122 */
123 if (!(desc->status & IRQ_LEVEL))
124 mtdcr(uic->dcrbase + UIC_SR, sr);
113 spin_unlock_irqrestore(&uic->lock, flags); 125 spin_unlock_irqrestore(&uic->lock, flags);
114} 126}
115 127
@@ -173,64 +185,6 @@ static struct irq_chip uic_irq_chip = {
173 .set_type = uic_set_irq_type, 185 .set_type = uic_set_irq_type,
174}; 186};
175 187
176/**
177 * handle_uic_irq - irq flow handler for UIC
178 * @irq: the interrupt number
179 * @desc: the interrupt description structure for this irq
180 *
181 * This is modified version of the generic handle_level_irq() suitable
182 * for the UIC. On the UIC, acking (i.e. clearing the SR bit) a level
183 * irq will have no effect if the interrupt is still asserted by the
184 * device, even if the interrupt is already masked. Therefore, unlike
185 * the standard handle_level_irq(), we must ack the interrupt *after*
186 * invoking the ISR (which should have de-asserted the interrupt in
187 * the external source). For edge interrupts we ack at the beginning
188 * instead of the end, to keep the window in which we can miss an
189 * interrupt as small as possible.
190 */
191void fastcall handle_uic_irq(unsigned int irq, struct irq_desc *desc)
192{
193 unsigned int cpu = smp_processor_id();
194 struct irqaction *action;
195 irqreturn_t action_ret;
196
197 spin_lock(&desc->lock);
198 if (desc->status & IRQ_LEVEL)
199 desc->chip->mask(irq);
200 else
201 desc->chip->mask_ack(irq);
202
203 if (unlikely(desc->status & IRQ_INPROGRESS))
204 goto out_unlock;
205 desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
206 kstat_cpu(cpu).irqs[irq]++;
207
208 /*
209 * If its disabled or no action available
210 * keep it masked and get out of here
211 */
212 action = desc->action;
213 if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
214 desc->status |= IRQ_PENDING;
215 goto out_unlock;
216 }
217
218 desc->status |= IRQ_INPROGRESS;
219 desc->status &= ~IRQ_PENDING;
220 spin_unlock(&desc->lock);
221
222 action_ret = handle_IRQ_event(irq, action);
223
224 spin_lock(&desc->lock);
225 desc->status &= ~IRQ_INPROGRESS;
226 if (desc->status & IRQ_LEVEL)
227 desc->chip->ack(irq);
228 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
229 desc->chip->unmask(irq);
230out_unlock:
231 spin_unlock(&desc->lock);
232}
233
234static int uic_host_map(struct irq_host *h, unsigned int virq, 188static int uic_host_map(struct irq_host *h, unsigned int virq,
235 irq_hw_number_t hw) 189 irq_hw_number_t hw)
236{ 190{
@@ -239,7 +193,7 @@ static int uic_host_map(struct irq_host *h, unsigned int virq,
239 set_irq_chip_data(virq, uic); 193 set_irq_chip_data(virq, uic);
240 /* Despite the name, handle_level_irq() works for both level 194 /* Despite the name, handle_level_irq() works for both level
241 * and edge irqs on UIC. FIXME: check this is correct */ 195 * and edge irqs on UIC. FIXME: check this is correct */
242 set_irq_chip_and_handler(virq, &uic_irq_chip, handle_uic_irq); 196 set_irq_chip_and_handler(virq, &uic_irq_chip, handle_level_irq);
243 197
244 /* Set default irq type */ 198 /* Set default irq type */
245 set_irq_type(virq, IRQ_TYPE_NONE); 199 set_irq_type(virq, IRQ_TYPE_NONE);
@@ -264,23 +218,36 @@ static struct irq_host_ops uic_host_ops = {
264 .xlate = uic_host_xlate, 218 .xlate = uic_host_xlate,
265}; 219};
266 220
267irqreturn_t uic_cascade(int virq, void *data) 221void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
268{ 222{
269 struct uic *uic = data; 223 struct uic *uic = get_irq_data(virq);
270 u32 msr; 224 u32 msr;
271 int src; 225 int src;
272 int subvirq; 226 int subvirq;
273 227
228 spin_lock(&desc->lock);
229 if (desc->status & IRQ_LEVEL)
230 desc->chip->mask(virq);
231 else
232 desc->chip->mask_ack(virq);
233 spin_unlock(&desc->lock);
234
274 msr = mfdcr(uic->dcrbase + UIC_MSR); 235 msr = mfdcr(uic->dcrbase + UIC_MSR);
275 if (!msr) /* spurious interrupt */ 236 if (!msr) /* spurious interrupt */
276 return IRQ_HANDLED; 237 goto uic_irq_ret;
277 238
278 src = 32 - ffs(msr); 239 src = 32 - ffs(msr);
279 240
280 subvirq = irq_linear_revmap(uic->irqhost, src); 241 subvirq = irq_linear_revmap(uic->irqhost, src);
281 generic_handle_irq(subvirq); 242 generic_handle_irq(subvirq);
282 243
283 return IRQ_HANDLED; 244uic_irq_ret:
245 spin_lock(&desc->lock);
246 if (desc->status & IRQ_LEVEL)
247 desc->chip->ack(virq);
248 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
249 desc->chip->unmask(virq);
250 spin_unlock(&desc->lock);
284} 251}
285 252
286static struct uic * __init uic_init_one(struct device_node *node) 253static struct uic * __init uic_init_one(struct device_node *node)
@@ -342,33 +309,27 @@ void __init uic_init_tree(void)
342 const u32 *interrupts; 309 const u32 *interrupts;
343 310
344 /* First locate and initialize the top-level UIC */ 311 /* First locate and initialize the top-level UIC */
345 312 for_each_compatible_node(np, NULL, "ibm,uic") {
346 np = of_find_compatible_node(NULL, NULL, "ibm,uic");
347 while (np) {
348 interrupts = of_get_property(np, "interrupts", NULL); 313 interrupts = of_get_property(np, "interrupts", NULL);
349 if (! interrupts) 314 if (!interrupts)
350 break; 315 break;
351
352 np = of_find_compatible_node(np, NULL, "ibm,uic");
353 } 316 }
354 317
355 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the 318 BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the
356 * top-level interrupt controller */ 319 * top-level interrupt controller */
357 primary_uic = uic_init_one(np); 320 primary_uic = uic_init_one(np);
358 if (! primary_uic) 321 if (!primary_uic)
359 panic("Unable to initialize primary UIC %s\n", np->full_name); 322 panic("Unable to initialize primary UIC %s\n", np->full_name);
360 323
361 irq_set_default_host(primary_uic->irqhost); 324 irq_set_default_host(primary_uic->irqhost);
362 of_node_put(np); 325 of_node_put(np);
363 326
364 /* The scan again for cascaded UICs */ 327 /* The scan again for cascaded UICs */
365 np = of_find_compatible_node(NULL, NULL, "ibm,uic"); 328 for_each_compatible_node(np, NULL, "ibm,uic") {
366 while (np) {
367 interrupts = of_get_property(np, "interrupts", NULL); 329 interrupts = of_get_property(np, "interrupts", NULL);
368 if (interrupts) { 330 if (interrupts) {
369 /* Secondary UIC */ 331 /* Secondary UIC */
370 int cascade_virq; 332 int cascade_virq;
371 int ret;
372 333
373 uic = uic_init_one(np); 334 uic = uic_init_one(np);
374 if (! uic) 335 if (! uic)
@@ -377,20 +338,11 @@ void __init uic_init_tree(void)
377 338
378 cascade_virq = irq_of_parse_and_map(np, 0); 339 cascade_virq = irq_of_parse_and_map(np, 0);
379 340
380 uic->cascade.handler = uic_cascade; 341 set_irq_data(cascade_virq, uic);
381 uic->cascade.name = "UIC cascade"; 342 set_irq_chained_handler(cascade_virq, uic_irq_cascade);
382 uic->cascade.dev_id = uic;
383
384 ret = setup_irq(cascade_virq, &uic->cascade);
385 if (ret)
386 printk(KERN_ERR "Failed to setup_irq(%d) for "
387 "UIC%d cascade\n", cascade_virq,
388 uic->index);
389 343
390 /* FIXME: setup critical cascade?? */ 344 /* FIXME: setup critical cascade?? */
391 } 345 }
392
393 np = of_find_compatible_node(np, NULL, "ibm,uic");
394 } 346 }
395} 347}
396 348
diff --git a/arch/powerpc/sysdev/xilinx_intc.c b/arch/powerpc/sysdev/xilinx_intc.c
index c2f17cc43dfa..ba8eea2bcce0 100644
--- a/arch/powerpc/sysdev/xilinx_intc.c
+++ b/arch/powerpc/sysdev/xilinx_intc.c
@@ -135,10 +135,16 @@ void __init xilinx_intc_init_tree(void)
135 struct device_node *np; 135 struct device_node *np;
136 136
137 /* find top level interrupt controller */ 137 /* find top level interrupt controller */
138 for_each_compatible_node(np, NULL, "xilinx,intc") { 138 for_each_compatible_node(np, NULL, "xlnx,opb-intc-1.00.c") {
139 if (!of_get_property(np, "interrupts", NULL)) 139 if (!of_get_property(np, "interrupts", NULL))
140 break; 140 break;
141 } 141 }
142 if (!np) {
143 for_each_compatible_node(np, NULL, "xlnx,xps-intc-1.00.a") {
144 if (!of_get_property(np, "interrupts", NULL))
145 break;
146 }
147 }
142 148
143 /* xilinx interrupt controller needs to be top level */ 149 /* xilinx interrupt controller needs to be top level */
144 BUG_ON(!np); 150 BUG_ON(!np);
diff --git a/arch/powerpc/xmon/setjmp.S b/arch/powerpc/xmon/setjmp.S
index 96a91f10e2ec..04c0b305ad4a 100644
--- a/arch/powerpc/xmon/setjmp.S
+++ b/arch/powerpc/xmon/setjmp.S
@@ -12,67 +12,6 @@
12#include <asm/ppc_asm.h> 12#include <asm/ppc_asm.h>
13#include <asm/asm-offsets.h> 13#include <asm/asm-offsets.h>
14 14
15_GLOBAL(xmon_setjmp)
16 mflr r0
17 PPC_STL r0,0(r3)
18 PPC_STL r1,SZL(r3)
19 PPC_STL r2,2*SZL(r3)
20 mfcr r0
21 PPC_STL r0,3*SZL(r3)
22 PPC_STL r13,4*SZL(r3)
23 PPC_STL r14,5*SZL(r3)
24 PPC_STL r15,6*SZL(r3)
25 PPC_STL r16,7*SZL(r3)
26 PPC_STL r17,8*SZL(r3)
27 PPC_STL r18,9*SZL(r3)
28 PPC_STL r19,10*SZL(r3)
29 PPC_STL r20,11*SZL(r3)
30 PPC_STL r21,12*SZL(r3)
31 PPC_STL r22,13*SZL(r3)
32 PPC_STL r23,14*SZL(r3)
33 PPC_STL r24,15*SZL(r3)
34 PPC_STL r25,16*SZL(r3)
35 PPC_STL r26,17*SZL(r3)
36 PPC_STL r27,18*SZL(r3)
37 PPC_STL r28,19*SZL(r3)
38 PPC_STL r29,20*SZL(r3)
39 PPC_STL r30,21*SZL(r3)
40 PPC_STL r31,22*SZL(r3)
41 li r3,0
42 blr
43
44_GLOBAL(xmon_longjmp)
45 PPC_LCMPI r4,0
46 bne 1f
47 li r4,1
481: PPC_LL r13,4*SZL(r3)
49 PPC_LL r14,5*SZL(r3)
50 PPC_LL r15,6*SZL(r3)
51 PPC_LL r16,7*SZL(r3)
52 PPC_LL r17,8*SZL(r3)
53 PPC_LL r18,9*SZL(r3)
54 PPC_LL r19,10*SZL(r3)
55 PPC_LL r20,11*SZL(r3)
56 PPC_LL r21,12*SZL(r3)
57 PPC_LL r22,13*SZL(r3)
58 PPC_LL r23,14*SZL(r3)
59 PPC_LL r24,15*SZL(r3)
60 PPC_LL r25,16*SZL(r3)
61 PPC_LL r26,17*SZL(r3)
62 PPC_LL r27,18*SZL(r3)
63 PPC_LL r28,19*SZL(r3)
64 PPC_LL r29,20*SZL(r3)
65 PPC_LL r30,21*SZL(r3)
66 PPC_LL r31,22*SZL(r3)
67 PPC_LL r0,3*SZL(r3)
68 mtcrf 0x38,r0
69 PPC_LL r0,0(r3)
70 PPC_LL r1,SZL(r3)
71 PPC_LL r2,2*SZL(r3)
72 mtlr r0
73 mr r3,r4
74 blr
75
76/* 15/*
77 * Grab the register values as they are now. 16 * Grab the register values as they are now.
78 * This won't do a particularily good job because we really 17 * This won't do a particularily good job because we really
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 121b04d165d1..a34172ddc468 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -40,6 +40,7 @@
40#include <asm/spu.h> 40#include <asm/spu.h>
41#include <asm/spu_priv1.h> 41#include <asm/spu_priv1.h>
42#include <asm/firmware.h> 42#include <asm/firmware.h>
43#include <asm/setjmp.h>
43 44
44#ifdef CONFIG_PPC64 45#ifdef CONFIG_PPC64
45#include <asm/hvcall.h> 46#include <asm/hvcall.h>
@@ -71,12 +72,9 @@ static unsigned long ncsum = 4096;
71static int termch; 72static int termch;
72static char tmpstr[128]; 73static char tmpstr[128];
73 74
74#define JMP_BUF_LEN 23
75static long bus_error_jmp[JMP_BUF_LEN]; 75static long bus_error_jmp[JMP_BUF_LEN];
76static int catch_memory_errors; 76static int catch_memory_errors;
77static long *xmon_fault_jmp[NR_CPUS]; 77static long *xmon_fault_jmp[NR_CPUS];
78#define setjmp xmon_setjmp
79#define longjmp xmon_longjmp
80 78
81/* Breakpoint stuff */ 79/* Breakpoint stuff */
82struct bpt { 80struct bpt {
@@ -153,13 +151,15 @@ static const char *getvecname(unsigned long vec);
153 151
154static int do_spu_cmd(void); 152static int do_spu_cmd(void);
155 153
154#ifdef CONFIG_44x
155static void dump_tlb_44x(void);
156#endif
157
156int xmon_no_auto_backtrace; 158int xmon_no_auto_backtrace;
157 159
158extern void xmon_enter(void); 160extern void xmon_enter(void);
159extern void xmon_leave(void); 161extern void xmon_leave(void);
160 162
161extern long setjmp(long *);
162extern void longjmp(long *, long);
163extern void xmon_save_regs(struct pt_regs *); 163extern void xmon_save_regs(struct pt_regs *);
164 164
165#ifdef CONFIG_PPC64 165#ifdef CONFIG_PPC64
@@ -231,6 +231,9 @@ Commands:\n\
231#ifdef CONFIG_PPC_STD_MMU_32 231#ifdef CONFIG_PPC_STD_MMU_32
232" u dump segment registers\n" 232" u dump segment registers\n"
233#endif 233#endif
234#ifdef CONFIG_44x
235" u dump TLB\n"
236#endif
234" ? help\n" 237" ? help\n"
235" zr reboot\n\ 238" zr reboot\n\
236 zh halt\n" 239 zh halt\n"
@@ -856,6 +859,11 @@ cmds(struct pt_regs *excp)
856 dump_segments(); 859 dump_segments();
857 break; 860 break;
858#endif 861#endif
862#ifdef CONFIG_4xx
863 case 'u':
864 dump_tlb_44x();
865 break;
866#endif
859 default: 867 default:
860 printf("Unrecognized command: "); 868 printf("Unrecognized command: ");
861 do { 869 do {
@@ -2527,16 +2535,33 @@ static void xmon_print_symbol(unsigned long address, const char *mid,
2527static void dump_slb(void) 2535static void dump_slb(void)
2528{ 2536{
2529 int i; 2537 int i;
2530 unsigned long tmp; 2538 unsigned long esid,vsid,valid;
2539 unsigned long llp;
2531 2540
2532 printf("SLB contents of cpu %x\n", smp_processor_id()); 2541 printf("SLB contents of cpu %x\n", smp_processor_id());
2533 2542
2534 for (i = 0; i < SLB_NUM_ENTRIES; i++) { 2543 for (i = 0; i < mmu_slb_size; i++) {
2535 asm volatile("slbmfee %0,%1" : "=r" (tmp) : "r" (i)); 2544 asm volatile("slbmfee %0,%1" : "=r" (esid) : "r" (i));
2536 printf("%02d %016lx ", i, tmp); 2545 asm volatile("slbmfev %0,%1" : "=r" (vsid) : "r" (i));
2537 2546 valid = (esid & SLB_ESID_V);
2538 asm volatile("slbmfev %0,%1" : "=r" (tmp) : "r" (i)); 2547 if (valid | esid | vsid) {
2539 printf("%016lx\n", tmp); 2548 printf("%02d %016lx %016lx", i, esid, vsid);
2549 if (valid) {
2550 llp = vsid & SLB_VSID_LLP;
2551 if (vsid & SLB_VSID_B_1T) {
2552 printf(" 1T ESID=%9lx VSID=%13lx LLP:%3lx \n",
2553 GET_ESID_1T(esid),
2554 (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT_1T,
2555 llp);
2556 } else {
2557 printf(" 256M ESID=%9lx VSID=%13lx LLP:%3lx \n",
2558 GET_ESID(esid),
2559 (vsid & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
2560 llp);
2561 }
2562 } else
2563 printf("\n");
2564 }
2540 } 2565 }
2541} 2566}
2542 2567
@@ -2581,6 +2606,32 @@ void dump_segments(void)
2581} 2606}
2582#endif 2607#endif
2583 2608
2609#ifdef CONFIG_44x
2610static void dump_tlb_44x(void)
2611{
2612 int i;
2613
2614 for (i = 0; i < PPC44x_TLB_SIZE; i++) {
2615 unsigned long w0,w1,w2;
2616 asm volatile("tlbre %0,%1,0" : "=r" (w0) : "r" (i));
2617 asm volatile("tlbre %0,%1,1" : "=r" (w1) : "r" (i));
2618 asm volatile("tlbre %0,%1,2" : "=r" (w2) : "r" (i));
2619 printf("[%02x] %08x %08x %08x ", i, w0, w1, w2);
2620 if (w0 & PPC44x_TLB_VALID) {
2621 printf("V %08x -> %01x%08x %c%c%c%c%c",
2622 w0 & PPC44x_TLB_EPN_MASK,
2623 w1 & PPC44x_TLB_ERPN_MASK,
2624 w1 & PPC44x_TLB_RPN_MASK,
2625 (w2 & PPC44x_TLB_W) ? 'W' : 'w',
2626 (w2 & PPC44x_TLB_I) ? 'I' : 'i',
2627 (w2 & PPC44x_TLB_M) ? 'M' : 'm',
2628 (w2 & PPC44x_TLB_G) ? 'G' : 'g',
2629 (w2 & PPC44x_TLB_E) ? 'E' : 'e');
2630 }
2631 printf("\n");
2632 }
2633}
2634#endif /* CONFIG_44x */
2584void xmon_init(int enable) 2635void xmon_init(int enable)
2585{ 2636{
2586#ifdef CONFIG_PPC_ISERIES 2637#ifdef CONFIG_PPC_ISERIES
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index 06bb5b77ea62..25ef55bacd99 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -10,7 +10,7 @@
10 * This version of the driver is somewhat selectable for the different 10 * This version of the driver is somewhat selectable for the different
11 * processor/board combinations. It works for the boards I know about 11 * processor/board combinations. It works for the boards I know about
12 * now, and should be easily modified to include others. Some of the 12 * now, and should be easily modified to include others. Some of the
13 * configuration information is contained in <asm/commproc.h> and the 13 * configuration information is contained in <asm/cpm1.h> and the
14 * remainder is here. 14 * remainder is here.
15 * 15 *
16 * Buffer descriptors are kept in the CPM dual port RAM, and the frame 16 * Buffer descriptors are kept in the CPM dual port RAM, and the frame
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 9da880be4dc0..9d656de0f0f1 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -34,7 +34,7 @@
34#include <asm/page.h> 34#include <asm/page.h>
35#include <asm/pgtable.h> 35#include <asm/pgtable.h>
36#include <asm/8xx_immap.h> 36#include <asm/8xx_immap.h>
37#include <asm/commproc.h> 37#include <asm/cpm1.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/tlbflush.h> 39#include <asm/tlbflush.h>
40#include <asm/rheap.h> 40#include <asm/rheap.h>
@@ -55,8 +55,6 @@
55}) 55})
56 56
57static void m8xx_cpm_dpinit(void); 57static void m8xx_cpm_dpinit(void);
58static uint host_buffer; /* One page of host buffer */
59static uint host_end; /* end + 1 */
60cpm8xx_t *cpmp; /* Pointer to comm processor space */ 58cpm8xx_t *cpmp; /* Pointer to comm processor space */
61 59
62/* CPM interrupt vector functions. 60/* CPM interrupt vector functions.
@@ -68,7 +66,6 @@ struct cpm_action {
68static struct cpm_action cpm_vecs[CPMVEC_NR]; 66static struct cpm_action cpm_vecs[CPMVEC_NR];
69static irqreturn_t cpm_interrupt(int irq, void * dev); 67static irqreturn_t cpm_interrupt(int irq, void * dev);
70static irqreturn_t cpm_error_interrupt(int irq, void *dev); 68static irqreturn_t cpm_error_interrupt(int irq, void *dev);
71static void alloc_host_memory(void);
72/* Define a table of names to identify CPM interrupt handlers in 69/* Define a table of names to identify CPM interrupt handlers in
73 * /proc/interrupts. 70 * /proc/interrupts.
74 */ 71 */
@@ -158,21 +155,6 @@ m8xx_cpm_reset(void)
158 cpmp = (cpm8xx_t *)commproc; 155 cpmp = (cpm8xx_t *)commproc;
159} 156}
160 157
161/* We used to do this earlier, but have to postpone as long as possible
162 * to ensure the kernel VM is now running.
163 */
164static void
165alloc_host_memory(void)
166{
167 dma_addr_t physaddr;
168
169 /* Set the host page for allocation.
170 */
171 host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
172 GFP_KERNEL);
173 host_end = host_buffer + PAGE_SIZE;
174}
175
176/* This is called during init_IRQ. We used to do it above, but this 158/* This is called during init_IRQ. We used to do it above, but this
177 * was too early since init_IRQ was not yet called. 159 * was too early since init_IRQ was not yet called.
178 */ 160 */
@@ -319,26 +301,6 @@ cpm_free_handler(int cpm_vec)
319 cpm_vecs[cpm_vec].dev_id = NULL; 301 cpm_vecs[cpm_vec].dev_id = NULL;
320} 302}
321 303
322/* We also own one page of host buffer space for the allocation of
323 * UART "fifos" and the like.
324 */
325uint
326m8xx_cpm_hostalloc(uint size)
327{
328 uint retloc;
329
330 if (host_buffer == 0)
331 alloc_host_memory();
332
333 if ((host_buffer + size) >= host_end)
334 return(0);
335
336 retloc = host_buffer;
337 host_buffer += size;
338
339 return(retloc);
340}
341
342/* Set a baud rate generator. This needs lots of work. There are 304/* Set a baud rate generator. This needs lots of work. There are
343 * four BRGs, any of which can be wired to any channel. 305 * four BRGs, any of which can be wired to any channel.
344 * The internal baud rate clock is the system clock divided by 16. 306 * The internal baud rate clock is the system clock divided by 16.
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index eace3bc118d2..c6d047ae77ac 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -8,7 +8,7 @@
8 * This version of the driver is somewhat selectable for the different 8 * This version of the driver is somewhat selectable for the different
9 * processor/board combinations. It works for the boards I know about 9 * processor/board combinations. It works for the boards I know about
10 * now, and should be easily modified to include others. Some of the 10 * now, and should be easily modified to include others. Some of the
11 * configuration information is contained in <asm/commproc.h> and the 11 * configuration information is contained in <asm/cpm1.h> and the
12 * remainder is here. 12 * remainder is here.
13 * 13 *
14 * Buffer descriptors are kept in the CPM dual port RAM, and the frame 14 * Buffer descriptors are kept in the CPM dual port RAM, and the frame
@@ -43,7 +43,7 @@
43#include <asm/pgtable.h> 43#include <asm/pgtable.h>
44#include <asm/mpc8xx.h> 44#include <asm/mpc8xx.h>
45#include <asm/uaccess.h> 45#include <asm/uaccess.h>
46#include <asm/commproc.h> 46#include <asm/cpm1.h>
47#include <asm/cacheflush.h> 47#include <asm/cacheflush.h>
48 48
49/* 49/*
@@ -80,7 +80,7 @@
80 * programming documents for details unique to your board. 80 * programming documents for details unique to your board.
81 * 81 *
82 * For the TQM8xx(L) modules, there is no control register interface. 82 * For the TQM8xx(L) modules, there is no control register interface.
83 * All functions are directly controlled using I/O pins. See <asm/commproc.h>. 83 * All functions are directly controlled using I/O pins. See <asm/cpm1.h>.
84 */ 84 */
85 85
86/* The transmitter timeout 86/* The transmitter timeout
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 0288279be9aa..11b0aa6ca97e 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -53,7 +53,7 @@
53#include <asm/mpc8xx.h> 53#include <asm/mpc8xx.h>
54#include <asm/irq.h> 54#include <asm/irq.h>
55#include <asm/uaccess.h> 55#include <asm/uaccess.h>
56#include <asm/commproc.h> 56#include <asm/cpm1.h>
57 57
58#ifdef CONFIG_USE_MDIO 58#ifdef CONFIG_USE_MDIO
59/* Forward declarations of some structures to support different PHYs 59/* Forward declarations of some structures to support different PHYs
diff --git a/arch/ppc/8xx_io/micropatch.c b/arch/ppc/8xx_io/micropatch.c
index cfad46ba17e3..9a5d95da7c28 100644
--- a/arch/ppc/8xx_io/micropatch.c
+++ b/arch/ppc/8xx_io/micropatch.c
@@ -16,7 +16,7 @@
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#include <asm/8xx_immap.h> 18#include <asm/8xx_immap.h>
19#include <asm/commproc.h> 19#include <asm/cpm1.h>
20 20
21/* 21/*
22 * I2C/SPI relocation patch arrays. 22 * I2C/SPI relocation patch arrays.
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 6473fa7cb4b9..db5934cdafb3 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -78,18 +78,18 @@ choice
78 default 6xx 78 default 6xx
79 79
80config 6xx 80config 6xx
81 bool "6xx/7xx/74xx/52xx/82xx/83xx" 81 bool "6xx/7xx/74xx/52xx/82xx"
82 select PPC_FPU 82 select PPC_FPU
83 help 83 help
84 There are four types of PowerPC chips supported. The more common 84 There are four types of PowerPC chips supported. The more common
85 types (601, 603, 604, 740, 750, 7400), the older Freescale 85 types (601, 603, 604, 740, 750, 7400), the older Freescale
86 (formerly Motorola) embedded versions (821, 823, 850, 855, 860, 86 (formerly Motorola) embedded versions (821, 823, 850, 855, 860,
87 52xx, 82xx, 83xx), the IBM embedded versions (403 and 405) and 87 52xx, 82xx), the IBM embedded versions (403 and 405) and
88 the Book E embedded processors from IBM (44x) and Freescale (85xx). 88 the Book E embedded processors from IBM (44x) and Freescale (85xx).
89 For support for 64-bit processors, set ARCH=powerpc. 89 For support for 64-bit processors, set ARCH=powerpc.
90 Unless you are building a kernel for one of the embedded processor 90 Unless you are building a kernel for one of the embedded processor
91 systems, choose 6xx. 91 systems, choose 6xx.
92 Also note that because the 52xx, 82xx, & 83xx family have a 603e 92 Also note that because the 52xx, 82xx family have a 603e
93 core, specific support for that chipset is asked later on. 93 core, specific support for that chipset is asked later on.
94 94
95config 40x 95config 40x
@@ -104,12 +104,6 @@ config 8xx
104 bool "8xx" 104 bool "8xx"
105 select PPC_LIB_RHEAP 105 select PPC_LIB_RHEAP
106 106
107config E200
108 bool "e200"
109
110config E500
111 bool "e500"
112
113endchoice 107endchoice
114 108
115config PPC_FPU 109config PPC_FPU
@@ -124,25 +118,14 @@ config PPC_DCR
124 depends on PPC_DCR_NATIVE 118 depends on PPC_DCR_NATIVE
125 default y 119 default y
126 120
127config BOOKE
128 bool
129 depends on E200 || E500
130 default y
131
132config FSL_BOOKE
133 bool
134 depends on E200 || E500
135 default y
136
137config PTE_64BIT 121config PTE_64BIT
138 bool 122 bool
139 depends on 44x || E500 123 depends on 44x
140 default y if 44x 124 default y if 44x
141 default y if E500 && PHYS_64BIT
142 125
143config PHYS_64BIT 126config PHYS_64BIT
144 bool 'Large physical address support' if E500 127 bool
145 depends on 44x || E500 128 depends on 44x
146 default y if 44x 129 default y if 44x
147 ---help--- 130 ---help---
148 This option enables kernel support for larger than 32-bit physical 131 This option enables kernel support for larger than 32-bit physical
@@ -153,7 +136,7 @@ config PHYS_64BIT
153config ALTIVEC 136config ALTIVEC
154 bool "AltiVec Support" 137 bool "AltiVec Support"
155 depends on 6xx 138 depends on 6xx
156 depends on !8260 && !83xx 139 depends on !8260
157 ---help--- 140 ---help---
158 This option enables kernel support for the Altivec extensions to the 141 This option enables kernel support for the Altivec extensions to the
159 PowerPC processor. The kernel currently supports saving and restoring 142 PowerPC processor. The kernel currently supports saving and restoring
@@ -167,24 +150,9 @@ config ALTIVEC
167 150
168 If in doubt, say Y here. 151 If in doubt, say Y here.
169 152
170config SPE
171 bool "SPE Support"
172 depends on E200 || E500
173 ---help---
174 This option enables kernel support for the Signal Processing
175 Extensions (SPE) to the PowerPC processor. The kernel currently
176 supports saving and restoring SPE registers, and turning on the
177 'spe enable' bit so user processes can execute SPE instructions.
178
179 This option is only useful if you have a processor that supports
180 SPE (e500, otherwise known as 85xx series), but does not have any
181 effect on a non-spe cpu (it does, however add code to the kernel).
182
183 If in doubt, say Y here.
184
185config TAU 153config TAU
186 bool "Thermal Management Support" 154 bool "Thermal Management Support"
187 depends on 6xx && !8260 && !83xx 155 depends on 6xx && !8260
188 help 156 help
189 G3 and G4 processors have an on-chip temperature sensor called the 157 G3 and G4 processors have an on-chip temperature sensor called the
190 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die 158 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die
@@ -228,7 +196,7 @@ config TAU_AVERAGE
228 196
229config MATH_EMULATION 197config MATH_EMULATION
230 bool "Math emulation" 198 bool "Math emulation"
231 depends on 4xx || 8xx || E200 || E500 199 depends on 4xx || 8xx
232 ---help--- 200 ---help---
233 Some PowerPC chips designed for embedded applications do not have 201 Some PowerPC chips designed for embedded applications do not have
234 a floating-point unit and therefore do not implement the 202 a floating-point unit and therefore do not implement the
@@ -279,7 +247,6 @@ config PPC601_SYNC_FIX
279 If in doubt, say Y here. 247 If in doubt, say Y here.
280 248
281source arch/ppc/platforms/4xx/Kconfig 249source arch/ppc/platforms/4xx/Kconfig
282source arch/ppc/platforms/85xx/Kconfig
283 250
284config PPC_STD_MMU 251config PPC_STD_MMU
285 bool 252 bool
@@ -288,7 +255,7 @@ config PPC_STD_MMU
288 255
289config NOT_COHERENT_CACHE 256config NOT_COHERENT_CACHE
290 bool 257 bool
291 depends on 4xx || 8xx || E200 258 depends on 4xx || 8xx
292 default y 259 default y
293 260
294endmenu 261endmenu
@@ -721,16 +688,6 @@ config LITE5200B
721 Support for the LITE5200B dev board for the MPC5200 from Freescale. 688 Support for the LITE5200B dev board for the MPC5200 from Freescale.
722 This is the new board with 2 PCI slots. 689 This is the new board with 2 PCI slots.
723 690
724config MPC834x_SYS
725 bool "Freescale MPC834x SYS"
726 help
727 This option enables support for the MPC 834x SYS evaluation board.
728
729 Be aware that PCI buses can only function when SYS board is plugged
730 into the PIB (Platform IO Board) board from Freescale which provide
731 3 PCI slots. The PIBs PCI initialization is the bootloader's
732 responsibility.
733
734config EV64360 691config EV64360
735 bool "Marvell-EV64360BP" 692 bool "Marvell-EV64360BP"
736 help 693 help
@@ -774,18 +731,6 @@ config 8272
774 The MPC8272 CPM has a different internal dpram setup than other CPM2 731 The MPC8272 CPM has a different internal dpram setup than other CPM2
775 devices 732 devices
776 733
777config 83xx
778 bool
779 default y if MPC834x_SYS
780
781config MPC834x
782 bool
783 default y if MPC834x_SYS
784
785config PPC_83xx
786 bool
787 default y if 83xx
788
789config CPM1 734config CPM1
790 bool 735 bool
791 depends on 8xx 736 depends on 8xx
@@ -811,8 +756,7 @@ config PPC_GEN550
811 bool 756 bool
812 depends on SANDPOINT || SPRUCE || PPLUS || \ 757 depends on SANDPOINT || SPRUCE || PPLUS || \
813 PRPMC750 || PRPMC800 || LOPEC || \ 758 PRPMC750 || PRPMC800 || LOPEC || \
814 (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \ 759 (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D
815 83xx
816 default y 760 default y
817 761
818config FORCE 762config FORCE
@@ -1068,13 +1012,13 @@ config GENERIC_ISA_DMA
1068 1012
1069config PPC_I8259 1013config PPC_I8259
1070 bool 1014 bool
1071 default y if 85xx || PPC_PREP 1015 default y if PPC_PREP
1072 default n 1016 default n
1073 1017
1074config PPC_INDIRECT_PCI 1018config PPC_INDIRECT_PCI
1075 bool 1019 bool
1076 depends on PCI 1020 depends on PCI
1077 default y if 40x || 44x || 85xx || 83xx || PPC_PREP 1021 default y if 40x || 44x || PPC_PREP
1078 default n 1022 default n
1079 1023
1080config EISA 1024config EISA
@@ -1091,8 +1035,8 @@ config MCA
1091 bool 1035 bool
1092 1036
1093config PCI 1037config PCI
1094 bool "PCI support" if 40x || CPM2 || 83xx || 85xx || PPC_MPC52xx 1038 bool "PCI support" if 40x || CPM2 || PPC_MPC52xx
1095 default y if !40x && !CPM2 && !8xx && !83xx && !85xx 1039 default y if !40x && !CPM2 && !8xx
1096 default PCI_QSPAN if !4xx && !CPM2 && 8xx 1040 default PCI_QSPAN if !4xx && !CPM2 && 8xx
1097 help 1041 help
1098 Find out whether your system includes a PCI bus. PCI is the name of 1042 Find out whether your system includes a PCI bus. PCI is the name of
@@ -1106,11 +1050,6 @@ config PCI_DOMAINS
1106config PCI_SYSCALL 1050config PCI_SYSCALL
1107 def_bool PCI 1051 def_bool PCI
1108 1052
1109config MPC83xx_PCI2
1110 bool "Support for 2nd PCI host controller"
1111 depends on PCI && MPC834x
1112 default y if MPC834x_SYS
1113
1114config PCI_QSPAN 1053config PCI_QSPAN
1115 bool "QSpan PCI" 1054 bool "QSpan PCI"
1116 depends on !4xx && !CPM2 && 8xx 1055 depends on !4xx && !CPM2 && 8xx
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index 95894ef7beaa..8df7f0e4c3a6 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -36,14 +36,8 @@ LINUXINCLUDE += -Iarch/$(ARCH)/include
36 36
37CHECKFLAGS += -D__powerpc__ 37CHECKFLAGS += -D__powerpc__
38 38
39ifndef CONFIG_FSL_BOOKE
40KBUILD_CFLAGS += -mstring
41endif
42
43cpu-as-$(CONFIG_4xx) += -Wa,-m405 39cpu-as-$(CONFIG_4xx) += -Wa,-m405
44cpu-as-$(CONFIG_6xx) += -Wa,-maltivec 40cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
45cpu-as-$(CONFIG_E500) += -Wa,-me500
46cpu-as-$(CONFIG_E200) += -Wa,-me200
47 41
48KBUILD_AFLAGS += $(cpu-as-y) 42KBUILD_AFLAGS += $(cpu-as-y)
49KBUILD_CFLAGS += $(cpu-as-y) 43KBUILD_CFLAGS += $(cpu-as-y)
@@ -55,7 +49,6 @@ head-y := arch/ppc/kernel/head.o
55head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o 49head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
56head-$(CONFIG_4xx) := arch/ppc/kernel/head_4xx.o 50head-$(CONFIG_4xx) := arch/ppc/kernel/head_4xx.o
57head-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o 51head-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o
58head-$(CONFIG_FSL_BOOKE) := arch/ppc/kernel/head_fsl_booke.o
59 52
60head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o 53head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
61 54
@@ -65,8 +58,6 @@ core-y += arch/ppc/kernel/ arch/powerpc/kernel/ \
65 arch/ppc/syslib/ arch/powerpc/sysdev/ \ 58 arch/ppc/syslib/ arch/powerpc/sysdev/ \
66 arch/powerpc/lib/ 59 arch/powerpc/lib/
67core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/ 60core-$(CONFIG_4xx) += arch/ppc/platforms/4xx/
68core-$(CONFIG_83xx) += arch/ppc/platforms/83xx/
69core-$(CONFIG_85xx) += arch/ppc/platforms/85xx/
70core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/ 61core-$(CONFIG_MATH_EMULATION) += arch/powerpc/math-emu/
71core-$(CONFIG_XMON) += arch/ppc/xmon/ 62core-$(CONFIG_XMON) += arch/ppc/xmon/
72drivers-$(CONFIG_8xx) += arch/ppc/8xx_io/ 63drivers-$(CONFIG_8xx) += arch/ppc/8xx_io/
diff --git a/arch/ppc/boot/simple/iic.c b/arch/ppc/boot/simple/iic.c
index e4efd838bfaa..5e91489426b4 100644
--- a/arch/ppc/boot/simple/iic.c
+++ b/arch/ppc/boot/simple/iic.c
@@ -5,7 +5,7 @@
5#include <linux/types.h> 5#include <linux/types.h>
6#include <asm/uaccess.h> 6#include <asm/uaccess.h>
7#include <asm/mpc8xx.h> 7#include <asm/mpc8xx.h>
8#include <asm/commproc.h> 8#include <asm/cpm1.h>
9 9
10 10
11/* IIC functions. 11/* IIC functions.
diff --git a/arch/ppc/boot/simple/m8xx_tty.c b/arch/ppc/boot/simple/m8xx_tty.c
index ea615d8ca541..f28924e6aeb4 100644
--- a/arch/ppc/boot/simple/m8xx_tty.c
+++ b/arch/ppc/boot/simple/m8xx_tty.c
@@ -11,7 +11,7 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <asm/mpc8xx.h> 13#include <asm/mpc8xx.h>
14#include <asm/commproc.h> 14#include <asm/cpm1.h>
15 15
16#ifdef CONFIG_MBX 16#ifdef CONFIG_MBX
17#define MBX_CSR1 ((volatile u_char *)0xfa100000) 17#define MBX_CSR1 ((volatile u_char *)0xfa100000)
diff --git a/arch/ppc/configs/mpc8540_ads_defconfig b/arch/ppc/configs/mpc8540_ads_defconfig
deleted file mode 100644
index bf676ebd99ab..000000000000
--- a/arch/ppc/configs/mpc8540_ads_defconfig
+++ /dev/null
@@ -1,706 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11-rc1
4# Thu Jan 20 01:23:13 2005
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y
11CONFIG_PPC=y
12CONFIG_PPC32=y
13CONFIG_GENERIC_NVRAM=y
14
15#
16# Code maturity level options
17#
18CONFIG_EXPERIMENTAL=y
19CONFIG_CLEAN_COMPILE=y
20CONFIG_BROKEN_ON_SMP=y
21
22#
23# General setup
24#
25CONFIG_LOCALVERSION=""
26CONFIG_SWAP=y
27CONFIG_SYSVIPC=y
28# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32CONFIG_LOG_BUF_SHIFT=14
33# CONFIG_HOTPLUG is not set
34CONFIG_KOBJECT_UEVENT=y
35# CONFIG_IKCONFIG is not set
36CONFIG_EMBEDDED=y
37# CONFIG_KALLSYMS is not set
38CONFIG_FUTEX=y
39# CONFIG_EPOLL is not set
40# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
41CONFIG_SHMEM=y
42CONFIG_CC_ALIGN_FUNCTIONS=0
43CONFIG_CC_ALIGN_LABELS=0
44CONFIG_CC_ALIGN_LOOPS=0
45CONFIG_CC_ALIGN_JUMPS=0
46# CONFIG_TINY_SHMEM is not set
47
48#
49# Loadable module support
50#
51# CONFIG_MODULES is not set
52
53#
54# Processor
55#
56# CONFIG_6xx is not set
57# CONFIG_40x is not set
58# CONFIG_44x is not set
59# CONFIG_POWER3 is not set
60# CONFIG_POWER4 is not set
61# CONFIG_8xx is not set
62CONFIG_E500=y
63CONFIG_BOOKE=y
64CONFIG_FSL_BOOKE=y
65CONFIG_SPE=y
66CONFIG_MATH_EMULATION=y
67# CONFIG_CPU_FREQ is not set
68CONFIG_PPC_GEN550=y
69CONFIG_85xx=y
70CONFIG_PPC_INDIRECT_PCI_BE=y
71
72#
73# Freescale 85xx options
74#
75CONFIG_MPC8540_ADS=y
76# CONFIG_MPC8555_CDS is not set
77# CONFIG_MPC8560_ADS is not set
78# CONFIG_SBC8560 is not set
79CONFIG_MPC8540=y
80
81#
82# Platform options
83#
84# CONFIG_SMP is not set
85# CONFIG_PREEMPT is not set
86# CONFIG_HIGHMEM is not set
87CONFIG_BINFMT_ELF=y
88# CONFIG_BINFMT_MISC is not set
89# CONFIG_CMDLINE_BOOL is not set
90
91#
92# Bus options
93#
94CONFIG_PCI=y
95CONFIG_PCI_DOMAINS=y
96# CONFIG_PCI_LEGACY_PROC is not set
97CONFIG_PCI_NAMES=y
98
99#
100# PCCARD (PCMCIA/CardBus) support
101#
102# CONFIG_PCCARD is not set
103
104#
105# PC-card bridges
106#
107
108#
109# Advanced setup
110#
111# CONFIG_ADVANCED_OPTIONS is not set
112
113#
114# Default settings for advanced configuration options are used
115#
116CONFIG_HIGHMEM_START=0xfe000000
117CONFIG_LOWMEM_SIZE=0x30000000
118CONFIG_KERNEL_START=0xc0000000
119CONFIG_TASK_SIZE=0x80000000
120CONFIG_BOOT_LOAD=0x00800000
121
122#
123# Device Drivers
124#
125
126#
127# Generic Driver Options
128#
129CONFIG_STANDALONE=y
130CONFIG_PREVENT_FIRMWARE_BUILD=y
131# CONFIG_FW_LOADER is not set
132
133#
134# Memory Technology Devices (MTD)
135#
136# CONFIG_MTD is not set
137
138#
139# Parallel port support
140#
141# CONFIG_PARPORT is not set
142
143#
144# Plug and Play support
145#
146
147#
148# Block devices
149#
150# CONFIG_BLK_DEV_FD is not set
151# CONFIG_BLK_CPQ_DA is not set
152# CONFIG_BLK_CPQ_CISS_DA is not set
153# CONFIG_BLK_DEV_DAC960 is not set
154# CONFIG_BLK_DEV_UMEM is not set
155# CONFIG_BLK_DEV_COW_COMMON is not set
156CONFIG_BLK_DEV_LOOP=y
157# CONFIG_BLK_DEV_CRYPTOLOOP is not set
158# CONFIG_BLK_DEV_NBD is not set
159# CONFIG_BLK_DEV_SX8 is not set
160CONFIG_BLK_DEV_RAM=y
161CONFIG_BLK_DEV_RAM_COUNT=16
162CONFIG_BLK_DEV_RAM_SIZE=32768
163CONFIG_BLK_DEV_INITRD=y
164CONFIG_INITRAMFS_SOURCE=""
165# CONFIG_LBD is not set
166# CONFIG_CDROM_PKTCDVD is not set
167
168#
169# IO Schedulers
170#
171CONFIG_IOSCHED_NOOP=y
172CONFIG_IOSCHED_AS=y
173CONFIG_IOSCHED_DEADLINE=y
174CONFIG_IOSCHED_CFQ=y
175# CONFIG_ATA_OVER_ETH is not set
176
177#
178# ATA/ATAPI/MFM/RLL support
179#
180# CONFIG_IDE is not set
181
182#
183# SCSI device support
184#
185# CONFIG_SCSI is not set
186
187#
188# Multi-device support (RAID and LVM)
189#
190# CONFIG_MD is not set
191
192#
193# Fusion MPT device support
194#
195
196#
197# IEEE 1394 (FireWire) support
198#
199# CONFIG_IEEE1394 is not set
200
201#
202# I2O device support
203#
204# CONFIG_I2O is not set
205
206#
207# Macintosh device drivers
208#
209
210#
211# Networking support
212#
213CONFIG_NET=y
214
215#
216# Networking options
217#
218CONFIG_PACKET=y
219# CONFIG_PACKET_MMAP is not set
220# CONFIG_NETLINK_DEV is not set
221CONFIG_UNIX=y
222# CONFIG_NET_KEY is not set
223CONFIG_INET=y
224CONFIG_IP_MULTICAST=y
225# CONFIG_IP_ADVANCED_ROUTER is not set
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_TUNNEL is not set
239CONFIG_IP_TCPDIAG=y
240# CONFIG_IP_TCPDIAG_IPV6 is not set
241# CONFIG_IPV6 is not set
242# CONFIG_NETFILTER is not set
243
244#
245# SCTP Configuration (EXPERIMENTAL)
246#
247# CONFIG_IP_SCTP is not set
248# CONFIG_ATM is not set
249# CONFIG_BRIDGE is not set
250# CONFIG_VLAN_8021Q is not set
251# CONFIG_DECNET is not set
252# CONFIG_LLC2 is not set
253# CONFIG_IPX is not set
254# CONFIG_ATALK is not set
255# CONFIG_X25 is not set
256# CONFIG_LAPB is not set
257# CONFIG_NET_DIVERT is not set
258# CONFIG_ECONET is not set
259# CONFIG_WAN_ROUTER is not set
260
261#
262# QoS and/or fair queueing
263#
264# CONFIG_NET_SCHED is not set
265# CONFIG_NET_CLS_ROUTE is not set
266
267#
268# Network testing
269#
270# CONFIG_NET_PKTGEN is not set
271# CONFIG_NETPOLL is not set
272# CONFIG_NET_POLL_CONTROLLER is not set
273# CONFIG_HAMRADIO is not set
274# CONFIG_IRDA is not set
275# CONFIG_BT is not set
276CONFIG_NETDEVICES=y
277# CONFIG_DUMMY is not set
278# CONFIG_BONDING is not set
279# CONFIG_EQUALIZER is not set
280# CONFIG_TUN is not set
281
282#
283# ARCnet devices
284#
285# CONFIG_ARCNET is not set
286
287#
288# Ethernet (10 or 100Mbit)
289#
290CONFIG_NET_ETHERNET=y
291CONFIG_MII=y
292# CONFIG_HAPPYMEAL is not set
293# CONFIG_SUNGEM is not set
294# CONFIG_NET_VENDOR_3COM is not set
295
296#
297# Tulip family network device support
298#
299# CONFIG_NET_TULIP is not set
300# CONFIG_HP100 is not set
301# CONFIG_NET_PCI is not set
302
303#
304# Ethernet (1000 Mbit)
305#
306# CONFIG_ACENIC is not set
307# CONFIG_DL2K is not set
308# CONFIG_E1000 is not set
309# CONFIG_NS83820 is not set
310# CONFIG_HAMACHI is not set
311# CONFIG_YELLOWFIN is not set
312# CONFIG_R8169 is not set
313# CONFIG_SK98LIN is not set
314# CONFIG_TIGON3 is not set
315CONFIG_GIANFAR=y
316CONFIG_GFAR_NAPI=y
317
318#
319# Ethernet (10000 Mbit)
320#
321# CONFIG_IXGB is not set
322# CONFIG_S2IO is not set
323
324#
325# Token Ring devices
326#
327# CONFIG_TR is not set
328
329#
330# Wireless LAN (non-hamradio)
331#
332# CONFIG_NET_RADIO is not set
333
334#
335# Wan interfaces
336#
337# CONFIG_WAN is not set
338# CONFIG_FDDI is not set
339# CONFIG_HIPPI is not set
340# CONFIG_PPP is not set
341# CONFIG_SLIP is not set
342# CONFIG_SHAPER is not set
343# CONFIG_NETCONSOLE is not set
344
345#
346# ISDN subsystem
347#
348# CONFIG_ISDN is not set
349
350#
351# Telephony Support
352#
353# CONFIG_PHONE is not set
354
355#
356# Input device support
357#
358CONFIG_INPUT=y
359
360#
361# Userland interfaces
362#
363# CONFIG_INPUT_MOUSEDEV is not set
364# CONFIG_INPUT_JOYDEV is not set
365# CONFIG_INPUT_TSDEV is not set
366# CONFIG_INPUT_EVDEV is not set
367# CONFIG_INPUT_EVBUG is not set
368
369#
370# Input I/O drivers
371#
372# CONFIG_GAMEPORT is not set
373CONFIG_SOUND_GAMEPORT=y
374# CONFIG_SERIO is not set
375# CONFIG_SERIO_I8042 is not set
376
377#
378# Input Device Drivers
379#
380# CONFIG_INPUT_KEYBOARD is not set
381# CONFIG_INPUT_MOUSE is not set
382# CONFIG_INPUT_JOYSTICK is not set
383# CONFIG_INPUT_TOUCHSCREEN is not set
384# CONFIG_INPUT_MISC is not set
385
386#
387# Character devices
388#
389# CONFIG_VT is not set
390# CONFIG_SERIAL_NONSTANDARD is not set
391
392#
393# Serial drivers
394#
395CONFIG_SERIAL_8250=y
396CONFIG_SERIAL_8250_CONSOLE=y
397CONFIG_SERIAL_8250_NR_UARTS=4
398# CONFIG_SERIAL_8250_EXTENDED is not set
399
400#
401# Non-8250 serial port support
402#
403CONFIG_SERIAL_CORE=y
404CONFIG_SERIAL_CORE_CONSOLE=y
405CONFIG_UNIX98_PTYS=y
406CONFIG_LEGACY_PTYS=y
407CONFIG_LEGACY_PTY_COUNT=256
408
409#
410# IPMI
411#
412# CONFIG_IPMI_HANDLER is not set
413
414#
415# Watchdog Cards
416#
417# CONFIG_WATCHDOG is not set
418# CONFIG_NVRAM is not set
419CONFIG_GEN_RTC=y
420# CONFIG_GEN_RTC_X is not set
421# CONFIG_DTLK is not set
422# CONFIG_R3964 is not set
423# CONFIG_APPLICOM is not set
424
425#
426# Ftape, the floppy tape device driver
427#
428# CONFIG_AGP is not set
429# CONFIG_DRM is not set
430# CONFIG_RAW_DRIVER is not set
431
432#
433# I2C support
434#
435CONFIG_I2C=y
436CONFIG_I2C_CHARDEV=y
437
438#
439# I2C Algorithms
440#
441# CONFIG_I2C_ALGOBIT is not set
442# CONFIG_I2C_ALGOPCF is not set
443# CONFIG_I2C_ALGOPCA is not set
444
445#
446# I2C Hardware Bus support
447#
448# CONFIG_I2C_ALI1535 is not set
449# CONFIG_I2C_ALI1563 is not set
450# CONFIG_I2C_ALI15X3 is not set
451# CONFIG_I2C_AMD756 is not set
452# CONFIG_I2C_AMD8111 is not set
453# CONFIG_I2C_I801 is not set
454# CONFIG_I2C_I810 is not set
455CONFIG_I2C_MPC=y
456# CONFIG_I2C_NFORCE2 is not set
457# CONFIG_I2C_PARPORT_LIGHT is not set
458# CONFIG_I2C_PIIX4 is not set
459# CONFIG_I2C_PROSAVAGE is not set
460# CONFIG_I2C_SAVAGE4 is not set
461# CONFIG_SCx200_ACB is not set
462# CONFIG_I2C_SIS5595 is not set
463# CONFIG_I2C_SIS630 is not set
464# CONFIG_I2C_SIS96X is not set
465# CONFIG_I2C_VIA is not set
466# CONFIG_I2C_VIAPRO is not set
467# CONFIG_I2C_VOODOO3 is not set
468# CONFIG_I2C_PCA_ISA is not set
469
470#
471# Hardware Sensors Chip support
472#
473# CONFIG_I2C_SENSOR is not set
474# CONFIG_SENSORS_ADM1021 is not set
475# CONFIG_SENSORS_ADM1025 is not set
476# CONFIG_SENSORS_ADM1026 is not set
477# CONFIG_SENSORS_ADM1031 is not set
478# CONFIG_SENSORS_ASB100 is not set
479# CONFIG_SENSORS_DS1621 is not set
480# CONFIG_SENSORS_FSCHER is not set
481# CONFIG_SENSORS_GL518SM is not set
482# CONFIG_SENSORS_IT87 is not set
483# CONFIG_SENSORS_LM63 is not set
484# CONFIG_SENSORS_LM75 is not set
485# CONFIG_SENSORS_LM77 is not set
486# CONFIG_SENSORS_LM78 is not set
487# CONFIG_SENSORS_LM80 is not set
488# CONFIG_SENSORS_LM83 is not set
489# CONFIG_SENSORS_LM85 is not set
490# CONFIG_SENSORS_LM87 is not set
491# CONFIG_SENSORS_LM90 is not set
492# CONFIG_SENSORS_MAX1619 is not set
493# CONFIG_SENSORS_PC87360 is not set
494# CONFIG_SENSORS_SMSC47B397 is not set
495# CONFIG_SENSORS_SMSC47M1 is not set
496# CONFIG_SENSORS_VIA686A is not set
497# CONFIG_SENSORS_W83781D is not set
498# CONFIG_SENSORS_W83L785TS is not set
499# CONFIG_SENSORS_W83627HF is not set
500
501#
502# Other I2C Chip support
503#
504# CONFIG_SENSORS_EEPROM is not set
505# CONFIG_SENSORS_PCF8574 is not set
506# CONFIG_SENSORS_PCF8591 is not set
507# CONFIG_SENSORS_RTC8564 is not set
508# CONFIG_I2C_DEBUG_CORE is not set
509# CONFIG_I2C_DEBUG_ALGO is not set
510# CONFIG_I2C_DEBUG_BUS is not set
511# CONFIG_I2C_DEBUG_CHIP is not set
512
513#
514# Dallas's 1-wire bus
515#
516# CONFIG_W1 is not set
517
518#
519# Misc devices
520#
521
522#
523# Multimedia devices
524#
525# CONFIG_VIDEO_DEV is not set
526
527#
528# Digital Video Broadcasting Devices
529#
530# CONFIG_DVB is not set
531
532#
533# Graphics support
534#
535# CONFIG_FB is not set
536# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
537
538#
539# Sound
540#
541# CONFIG_SOUND is not set
542
543#
544# USB support
545#
546# CONFIG_USB is not set
547CONFIG_USB_ARCH_HAS_HCD=y
548CONFIG_USB_ARCH_HAS_OHCI=y
549
550#
551# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
552#
553
554#
555# USB Gadget Support
556#
557# CONFIG_USB_GADGET is not set
558
559#
560# MMC/SD Card support
561#
562# CONFIG_MMC is not set
563
564#
565# InfiniBand support
566#
567# CONFIG_INFINIBAND is not set
568
569#
570# File systems
571#
572CONFIG_EXT2_FS=y
573# CONFIG_EXT2_FS_XATTR is not set
574CONFIG_EXT3_FS=y
575CONFIG_EXT3_FS_XATTR=y
576# CONFIG_EXT3_FS_POSIX_ACL is not set
577# CONFIG_EXT3_FS_SECURITY is not set
578CONFIG_JBD=y
579# CONFIG_JBD_DEBUG is not set
580CONFIG_FS_MBCACHE=y
581# CONFIG_REISERFS_FS is not set
582# CONFIG_JFS_FS is not set
583# CONFIG_XFS_FS is not set
584# CONFIG_MINIX_FS is not set
585# CONFIG_ROMFS_FS is not set
586# CONFIG_QUOTA is not set
587CONFIG_DNOTIFY=y
588# CONFIG_AUTOFS_FS is not set
589# CONFIG_AUTOFS4_FS is not set
590
591#
592# CD-ROM/DVD Filesystems
593#
594# CONFIG_ISO9660_FS is not set
595# CONFIG_UDF_FS is not set
596
597#
598# DOS/FAT/NT Filesystems
599#
600# CONFIG_MSDOS_FS is not set
601# CONFIG_VFAT_FS is not set
602# CONFIG_NTFS_FS is not set
603
604#
605# Pseudo filesystems
606#
607CONFIG_PROC_FS=y
608CONFIG_PROC_KCORE=y
609CONFIG_SYSFS=y
610# CONFIG_DEVFS_FS is not set
611# CONFIG_DEVPTS_FS_XATTR is not set
612CONFIG_TMPFS=y
613# CONFIG_TMPFS_XATTR is not set
614# CONFIG_HUGETLB_PAGE is not set
615CONFIG_RAMFS=y
616
617#
618# Miscellaneous filesystems
619#
620# CONFIG_ADFS_FS is not set
621# CONFIG_AFFS_FS is not set
622# CONFIG_HFS_FS is not set
623# CONFIG_HFSPLUS_FS is not set
624# CONFIG_BEFS_FS is not set
625# CONFIG_BFS_FS is not set
626# CONFIG_EFS_FS is not set
627# CONFIG_CRAMFS is not set
628# CONFIG_VXFS_FS is not set
629# CONFIG_HPFS_FS is not set
630# CONFIG_QNX4FS_FS is not set
631# CONFIG_SYSV_FS is not set
632# CONFIG_UFS_FS is not set
633
634#
635# Network File Systems
636#
637CONFIG_NFS_FS=y
638# CONFIG_NFS_V3 is not set
639# CONFIG_NFS_V4 is not set
640# CONFIG_NFS_DIRECTIO is not set
641# CONFIG_NFSD is not set
642CONFIG_ROOT_NFS=y
643CONFIG_LOCKD=y
644# CONFIG_EXPORTFS is not set
645CONFIG_SUNRPC=y
646# CONFIG_RPCSEC_GSS_KRB5 is not set
647# CONFIG_RPCSEC_GSS_SPKM3 is not set
648# CONFIG_SMB_FS is not set
649# CONFIG_CIFS is not set
650# CONFIG_NCP_FS is not set
651# CONFIG_CODA_FS is not set
652# CONFIG_AFS_FS is not set
653
654#
655# Partition Types
656#
657CONFIG_PARTITION_ADVANCED=y
658# CONFIG_ACORN_PARTITION is not set
659# CONFIG_OSF_PARTITION is not set
660# CONFIG_AMIGA_PARTITION is not set
661# CONFIG_ATARI_PARTITION is not set
662# CONFIG_MAC_PARTITION is not set
663# CONFIG_MSDOS_PARTITION is not set
664# CONFIG_LDM_PARTITION is not set
665# CONFIG_SGI_PARTITION is not set
666# CONFIG_ULTRIX_PARTITION is not set
667# CONFIG_SUN_PARTITION is not set
668# CONFIG_EFI_PARTITION is not set
669
670#
671# Native Language Support
672#
673# CONFIG_NLS is not set
674
675#
676# Library routines
677#
678# CONFIG_CRC_CCITT is not set
679CONFIG_CRC32=y
680# CONFIG_LIBCRC32C is not set
681
682#
683# Profiling support
684#
685# CONFIG_PROFILING is not set
686
687#
688# Kernel hacking
689#
690# CONFIG_DEBUG_KERNEL is not set
691# CONFIG_SERIAL_TEXT_DEBUG is not set
692
693#
694# Security options
695#
696# CONFIG_KEYS is not set
697# CONFIG_SECURITY is not set
698
699#
700# Cryptographic options
701#
702# CONFIG_CRYPTO is not set
703
704#
705# Hardware crypto devices
706#
diff --git a/arch/ppc/configs/mpc8548_cds_defconfig b/arch/ppc/configs/mpc8548_cds_defconfig
deleted file mode 100644
index f36fc5db540b..000000000000
--- a/arch/ppc/configs/mpc8548_cds_defconfig
+++ /dev/null
@@ -1,658 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc4
4# Tue May 24 22:36:27 2005
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y
11CONFIG_PPC=y
12CONFIG_PPC32=y
13CONFIG_GENERIC_NVRAM=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15
16#
17# Code maturity level options
18#
19CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION=""
28CONFIG_SWAP=y
29CONFIG_SYSVIPC=y
30# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y
33# CONFIG_AUDIT is not set
34# CONFIG_HOTPLUG is not set
35CONFIG_KOBJECT_UEVENT=y
36# CONFIG_IKCONFIG is not set
37CONFIG_EMBEDDED=y
38# CONFIG_KALLSYMS is not set
39CONFIG_PRINTK=y
40CONFIG_BUG=y
41CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y
43# CONFIG_EPOLL is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0
52
53#
54# Loadable module support
55#
56# CONFIG_MODULES is not set
57
58#
59# Processor
60#
61# CONFIG_6xx is not set
62# CONFIG_40x is not set
63# CONFIG_44x is not set
64# CONFIG_POWER3 is not set
65# CONFIG_POWER4 is not set
66# CONFIG_8xx is not set
67CONFIG_E500=y
68CONFIG_BOOKE=y
69CONFIG_FSL_BOOKE=y
70# CONFIG_PHYS_64BIT is not set
71CONFIG_SPE=y
72CONFIG_MATH_EMULATION=y
73# CONFIG_CPU_FREQ is not set
74# CONFIG_PM is not set
75CONFIG_85xx=y
76CONFIG_PPC_INDIRECT_PCI_BE=y
77
78#
79# Freescale 85xx options
80#
81# CONFIG_MPC8540_ADS is not set
82CONFIG_MPC8548_CDS=y
83# CONFIG_MPC8555_CDS is not set
84# CONFIG_MPC8560_ADS is not set
85# CONFIG_SBC8560 is not set
86# CONFIG_STX_GP3 is not set
87CONFIG_MPC8548=y
88
89#
90# Platform options
91#
92# CONFIG_SMP is not set
93# CONFIG_PREEMPT is not set
94# CONFIG_HIGHMEM is not set
95CONFIG_BINFMT_ELF=y
96# CONFIG_BINFMT_MISC is not set
97# CONFIG_CMDLINE_BOOL is not set
98CONFIG_ISA_DMA_API=y
99
100#
101# Bus options
102#
103# CONFIG_PCI is not set
104# CONFIG_PCI_DOMAINS is not set
105
106#
107# PCCARD (PCMCIA/CardBus) support
108#
109# CONFIG_PCCARD is not set
110
111#
112# Advanced setup
113#
114# CONFIG_ADVANCED_OPTIONS is not set
115
116#
117# Default settings for advanced configuration options are used
118#
119CONFIG_HIGHMEM_START=0xfe000000
120CONFIG_LOWMEM_SIZE=0x30000000
121CONFIG_KERNEL_START=0xc0000000
122CONFIG_TASK_SIZE=0x80000000
123CONFIG_BOOT_LOAD=0x00800000
124
125#
126# Device Drivers
127#
128
129#
130# Generic Driver Options
131#
132CONFIG_STANDALONE=y
133CONFIG_PREVENT_FIRMWARE_BUILD=y
134# CONFIG_FW_LOADER is not set
135
136#
137# Memory Technology Devices (MTD)
138#
139# CONFIG_MTD is not set
140
141#
142# Parallel port support
143#
144# CONFIG_PARPORT is not set
145
146#
147# Plug and Play support
148#
149
150#
151# Block devices
152#
153# CONFIG_BLK_DEV_FD is not set
154# CONFIG_BLK_DEV_COW_COMMON is not set
155CONFIG_BLK_DEV_LOOP=y
156# CONFIG_BLK_DEV_CRYPTOLOOP is not set
157# CONFIG_BLK_DEV_NBD is not set
158CONFIG_BLK_DEV_RAM=y
159CONFIG_BLK_DEV_RAM_COUNT=16
160CONFIG_BLK_DEV_RAM_SIZE=32768
161CONFIG_BLK_DEV_INITRD=y
162CONFIG_INITRAMFS_SOURCE=""
163# CONFIG_LBD is not set
164# CONFIG_CDROM_PKTCDVD is not set
165
166#
167# IO Schedulers
168#
169CONFIG_IOSCHED_NOOP=y
170CONFIG_IOSCHED_AS=y
171CONFIG_IOSCHED_DEADLINE=y
172CONFIG_IOSCHED_CFQ=y
173# CONFIG_ATA_OVER_ETH is not set
174
175#
176# ATA/ATAPI/MFM/RLL support
177#
178# CONFIG_IDE is not set
179
180#
181# SCSI device support
182#
183# CONFIG_SCSI is not set
184
185#
186# Multi-device support (RAID and LVM)
187#
188# CONFIG_MD is not set
189
190#
191# Fusion MPT device support
192#
193
194#
195# IEEE 1394 (FireWire) support
196#
197
198#
199# I2O device support
200#
201
202#
203# Macintosh device drivers
204#
205
206#
207# Networking support
208#
209CONFIG_NET=y
210
211#
212# Networking options
213#
214CONFIG_PACKET=y
215# CONFIG_PACKET_MMAP is not set
216CONFIG_UNIX=y
217# CONFIG_NET_KEY is not set
218CONFIG_INET=y
219CONFIG_IP_MULTICAST=y
220# CONFIG_IP_ADVANCED_ROUTER is not set
221CONFIG_IP_PNP=y
222CONFIG_IP_PNP_DHCP=y
223CONFIG_IP_PNP_BOOTP=y
224# CONFIG_IP_PNP_RARP is not set
225# CONFIG_NET_IPIP is not set
226# CONFIG_NET_IPGRE is not set
227# CONFIG_IP_MROUTE is not set
228# CONFIG_ARPD is not set
229CONFIG_SYN_COOKIES=y
230# CONFIG_INET_AH is not set
231# CONFIG_INET_ESP is not set
232# CONFIG_INET_IPCOMP is not set
233# CONFIG_INET_TUNNEL is not set
234CONFIG_IP_TCPDIAG=y
235# CONFIG_IP_TCPDIAG_IPV6 is not set
236# CONFIG_IPV6 is not set
237# CONFIG_NETFILTER is not set
238
239#
240# SCTP Configuration (EXPERIMENTAL)
241#
242# CONFIG_IP_SCTP is not set
243# CONFIG_ATM is not set
244# CONFIG_BRIDGE is not set
245# CONFIG_VLAN_8021Q is not set
246# CONFIG_DECNET is not set
247# CONFIG_LLC2 is not set
248# CONFIG_IPX is not set
249# CONFIG_ATALK is not set
250# CONFIG_X25 is not set
251# CONFIG_LAPB is not set
252# CONFIG_NET_DIVERT is not set
253# CONFIG_ECONET is not set
254# CONFIG_WAN_ROUTER is not set
255
256#
257# QoS and/or fair queueing
258#
259# CONFIG_NET_SCHED is not set
260# CONFIG_NET_CLS_ROUTE is not set
261
262#
263# Network testing
264#
265# CONFIG_NET_PKTGEN is not set
266# CONFIG_NETPOLL is not set
267# CONFIG_NET_POLL_CONTROLLER is not set
268# CONFIG_HAMRADIO is not set
269# CONFIG_IRDA is not set
270# CONFIG_BT is not set
271CONFIG_NETDEVICES=y
272# CONFIG_DUMMY is not set
273# CONFIG_BONDING is not set
274# CONFIG_EQUALIZER is not set
275# CONFIG_TUN is not set
276
277#
278# Ethernet (10 or 100Mbit)
279#
280CONFIG_NET_ETHERNET=y
281CONFIG_MII=y
282
283#
284# Ethernet (1000 Mbit)
285#
286CONFIG_GIANFAR=y
287CONFIG_GFAR_NAPI=y
288
289#
290# Ethernet (10000 Mbit)
291#
292
293#
294# Token Ring devices
295#
296
297#
298# Wireless LAN (non-hamradio)
299#
300# CONFIG_NET_RADIO is not set
301
302#
303# Wan interfaces
304#
305# CONFIG_WAN is not set
306# CONFIG_PPP is not set
307# CONFIG_SLIP is not set
308# CONFIG_SHAPER is not set
309# CONFIG_NETCONSOLE is not set
310
311#
312# ISDN subsystem
313#
314# CONFIG_ISDN is not set
315
316#
317# Telephony Support
318#
319# CONFIG_PHONE is not set
320
321#
322# Input device support
323#
324CONFIG_INPUT=y
325
326#
327# Userland interfaces
328#
329# CONFIG_INPUT_MOUSEDEV is not set
330# CONFIG_INPUT_JOYDEV is not set
331# CONFIG_INPUT_TSDEV is not set
332# CONFIG_INPUT_EVDEV is not set
333# CONFIG_INPUT_EVBUG is not set
334
335#
336# Input Device Drivers
337#
338# CONFIG_INPUT_KEYBOARD is not set
339# CONFIG_INPUT_MOUSE is not set
340# CONFIG_INPUT_JOYSTICK is not set
341# CONFIG_INPUT_TOUCHSCREEN is not set
342# CONFIG_INPUT_MISC is not set
343
344#
345# Hardware I/O ports
346#
347# CONFIG_SERIO is not set
348# CONFIG_GAMEPORT is not set
349CONFIG_SOUND_GAMEPORT=y
350
351#
352# Character devices
353#
354# CONFIG_VT is not set
355# CONFIG_SERIAL_NONSTANDARD is not set
356
357#
358# Serial drivers
359#
360CONFIG_SERIAL_8250=y
361CONFIG_SERIAL_8250_CONSOLE=y
362CONFIG_SERIAL_8250_NR_UARTS=4
363# CONFIG_SERIAL_8250_EXTENDED is not set
364
365#
366# Non-8250 serial port support
367#
368CONFIG_SERIAL_CORE=y
369CONFIG_SERIAL_CORE_CONSOLE=y
370CONFIG_UNIX98_PTYS=y
371CONFIG_LEGACY_PTYS=y
372CONFIG_LEGACY_PTY_COUNT=256
373
374#
375# IPMI
376#
377# CONFIG_IPMI_HANDLER is not set
378
379#
380# Watchdog Cards
381#
382# CONFIG_WATCHDOG is not set
383# CONFIG_NVRAM is not set
384CONFIG_GEN_RTC=y
385# CONFIG_GEN_RTC_X is not set
386# CONFIG_DTLK is not set
387# CONFIG_R3964 is not set
388
389#
390# Ftape, the floppy tape device driver
391#
392# CONFIG_AGP is not set
393# CONFIG_DRM is not set
394# CONFIG_RAW_DRIVER is not set
395
396#
397# TPM devices
398#
399
400#
401# I2C support
402#
403CONFIG_I2C=y
404CONFIG_I2C_CHARDEV=y
405
406#
407# I2C Algorithms
408#
409# CONFIG_I2C_ALGOBIT is not set
410# CONFIG_I2C_ALGOPCF is not set
411# CONFIG_I2C_ALGOPCA is not set
412
413#
414# I2C Hardware Bus support
415#
416CONFIG_I2C_MPC=y
417# CONFIG_I2C_PARPORT_LIGHT is not set
418# CONFIG_I2C_PCA_ISA is not set
419
420#
421# Hardware Sensors Chip support
422#
423# CONFIG_I2C_SENSOR is not set
424# CONFIG_SENSORS_ADM1021 is not set
425# CONFIG_SENSORS_ADM1025 is not set
426# CONFIG_SENSORS_ADM1026 is not set
427# CONFIG_SENSORS_ADM1031 is not set
428# CONFIG_SENSORS_ASB100 is not set
429# CONFIG_SENSORS_DS1621 is not set
430# CONFIG_SENSORS_FSCHER is not set
431# CONFIG_SENSORS_FSCPOS is not set
432# CONFIG_SENSORS_GL518SM is not set
433# CONFIG_SENSORS_GL520SM is not set
434# CONFIG_SENSORS_IT87 is not set
435# CONFIG_SENSORS_LM63 is not set
436# CONFIG_SENSORS_LM75 is not set
437# CONFIG_SENSORS_LM77 is not set
438# CONFIG_SENSORS_LM78 is not set
439# CONFIG_SENSORS_LM80 is not set
440# CONFIG_SENSORS_LM83 is not set
441# CONFIG_SENSORS_LM85 is not set
442# CONFIG_SENSORS_LM87 is not set
443# CONFIG_SENSORS_LM90 is not set
444# CONFIG_SENSORS_LM92 is not set
445# CONFIG_SENSORS_MAX1619 is not set
446# CONFIG_SENSORS_PC87360 is not set
447# CONFIG_SENSORS_SMSC47B397 is not set
448# CONFIG_SENSORS_SMSC47M1 is not set
449# CONFIG_SENSORS_W83781D is not set
450# CONFIG_SENSORS_W83L785TS is not set
451# CONFIG_SENSORS_W83627HF is not set
452
453#
454# Other I2C Chip support
455#
456# CONFIG_SENSORS_DS1337 is not set
457# CONFIG_SENSORS_EEPROM is not set
458# CONFIG_SENSORS_PCF8574 is not set
459# CONFIG_SENSORS_PCF8591 is not set
460# CONFIG_SENSORS_RTC8564 is not set
461# CONFIG_SENSORS_M41T00 is not set
462# CONFIG_I2C_DEBUG_CORE is not set
463# CONFIG_I2C_DEBUG_ALGO is not set
464# CONFIG_I2C_DEBUG_BUS is not set
465# CONFIG_I2C_DEBUG_CHIP is not set
466
467#
468# Dallas's 1-wire bus
469#
470# CONFIG_W1 is not set
471
472#
473# Misc devices
474#
475
476#
477# Multimedia devices
478#
479# CONFIG_VIDEO_DEV is not set
480
481#
482# Digital Video Broadcasting Devices
483#
484# CONFIG_DVB is not set
485
486#
487# Graphics support
488#
489# CONFIG_FB is not set
490
491#
492# Sound
493#
494# CONFIG_SOUND is not set
495
496#
497# USB support
498#
499# CONFIG_USB_ARCH_HAS_HCD is not set
500# CONFIG_USB_ARCH_HAS_OHCI is not set
501
502#
503# USB Gadget Support
504#
505# CONFIG_USB_GADGET is not set
506
507#
508# MMC/SD Card support
509#
510# CONFIG_MMC is not set
511
512#
513# InfiniBand support
514#
515# CONFIG_INFINIBAND is not set
516
517#
518# File systems
519#
520CONFIG_EXT2_FS=y
521# CONFIG_EXT2_FS_XATTR is not set
522CONFIG_EXT3_FS=y
523CONFIG_EXT3_FS_XATTR=y
524# CONFIG_EXT3_FS_POSIX_ACL is not set
525# CONFIG_EXT3_FS_SECURITY is not set
526CONFIG_JBD=y
527# CONFIG_JBD_DEBUG is not set
528CONFIG_FS_MBCACHE=y
529# CONFIG_REISERFS_FS is not set
530# CONFIG_JFS_FS is not set
531
532#
533# XFS support
534#
535# CONFIG_XFS_FS is not set
536# CONFIG_MINIX_FS is not set
537# CONFIG_ROMFS_FS is not set
538# CONFIG_QUOTA is not set
539CONFIG_DNOTIFY=y
540# CONFIG_AUTOFS_FS is not set
541# CONFIG_AUTOFS4_FS is not set
542
543#
544# CD-ROM/DVD Filesystems
545#
546# CONFIG_ISO9660_FS is not set
547# CONFIG_UDF_FS is not set
548
549#
550# DOS/FAT/NT Filesystems
551#
552# CONFIG_MSDOS_FS is not set
553# CONFIG_VFAT_FS is not set
554# CONFIG_NTFS_FS is not set
555
556#
557# Pseudo filesystems
558#
559CONFIG_PROC_FS=y
560CONFIG_PROC_KCORE=y
561CONFIG_SYSFS=y
562# CONFIG_DEVFS_FS is not set
563# CONFIG_DEVPTS_FS_XATTR is not set
564CONFIG_TMPFS=y
565# CONFIG_TMPFS_XATTR is not set
566# CONFIG_HUGETLB_PAGE is not set
567CONFIG_RAMFS=y
568
569#
570# Miscellaneous filesystems
571#
572# CONFIG_ADFS_FS is not set
573# CONFIG_AFFS_FS is not set
574# CONFIG_HFS_FS is not set
575# CONFIG_HFSPLUS_FS is not set
576# CONFIG_BEFS_FS is not set
577# CONFIG_BFS_FS is not set
578# CONFIG_EFS_FS is not set
579# CONFIG_CRAMFS is not set
580# CONFIG_VXFS_FS is not set
581# CONFIG_HPFS_FS is not set
582# CONFIG_QNX4FS_FS is not set
583# CONFIG_SYSV_FS is not set
584# CONFIG_UFS_FS is not set
585
586#
587# Network File Systems
588#
589CONFIG_NFS_FS=y
590# CONFIG_NFS_V3 is not set
591# CONFIG_NFS_V4 is not set
592# CONFIG_NFS_DIRECTIO is not set
593# CONFIG_NFSD is not set
594CONFIG_ROOT_NFS=y
595CONFIG_LOCKD=y
596CONFIG_SUNRPC=y
597# CONFIG_RPCSEC_GSS_KRB5 is not set
598# CONFIG_RPCSEC_GSS_SPKM3 is not set
599# CONFIG_SMB_FS is not set
600# CONFIG_CIFS is not set
601# CONFIG_NCP_FS is not set
602# CONFIG_CODA_FS is not set
603# CONFIG_AFS_FS is not set
604
605#
606# Partition Types
607#
608CONFIG_PARTITION_ADVANCED=y
609# CONFIG_ACORN_PARTITION is not set
610# CONFIG_OSF_PARTITION is not set
611# CONFIG_AMIGA_PARTITION is not set
612# CONFIG_ATARI_PARTITION is not set
613# CONFIG_MAC_PARTITION is not set
614# CONFIG_MSDOS_PARTITION is not set
615# CONFIG_LDM_PARTITION is not set
616# CONFIG_SGI_PARTITION is not set
617# CONFIG_ULTRIX_PARTITION is not set
618# CONFIG_SUN_PARTITION is not set
619# CONFIG_EFI_PARTITION is not set
620
621#
622# Native Language Support
623#
624# CONFIG_NLS is not set
625
626#
627# Library routines
628#
629# CONFIG_CRC_CCITT is not set
630CONFIG_CRC32=y
631# CONFIG_LIBCRC32C is not set
632
633#
634# Profiling support
635#
636# CONFIG_PROFILING is not set
637
638#
639# Kernel hacking
640#
641# CONFIG_PRINTK_TIME is not set
642# CONFIG_DEBUG_KERNEL is not set
643CONFIG_LOG_BUF_SHIFT=14
644
645#
646# Security options
647#
648# CONFIG_KEYS is not set
649# CONFIG_SECURITY is not set
650
651#
652# Cryptographic options
653#
654# CONFIG_CRYPTO is not set
655
656#
657# Hardware crypto devices
658#
diff --git a/arch/ppc/configs/mpc8555_cds_defconfig b/arch/ppc/configs/mpc8555_cds_defconfig
deleted file mode 100644
index 4f1e320acfbe..000000000000
--- a/arch/ppc/configs/mpc8555_cds_defconfig
+++ /dev/null
@@ -1,784 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc4
4# Tue May 17 11:56:01 2005
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y
11CONFIG_PPC=y
12CONFIG_PPC32=y
13CONFIG_GENERIC_NVRAM=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15
16#
17# Code maturity level options
18#
19CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION=""
28CONFIG_SWAP=y
29CONFIG_SYSVIPC=y
30# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y
33# CONFIG_AUDIT is not set
34# CONFIG_HOTPLUG is not set
35CONFIG_KOBJECT_UEVENT=y
36# CONFIG_IKCONFIG is not set
37CONFIG_EMBEDDED=y
38# CONFIG_KALLSYMS is not set
39CONFIG_PRINTK=y
40CONFIG_BUG=y
41CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y
43# CONFIG_EPOLL is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0
52
53#
54# Loadable module support
55#
56# CONFIG_MODULES is not set
57
58#
59# Processor
60#
61# CONFIG_6xx is not set
62# CONFIG_40x is not set
63# CONFIG_44x is not set
64# CONFIG_POWER3 is not set
65# CONFIG_POWER4 is not set
66# CONFIG_8xx is not set
67CONFIG_E500=y
68CONFIG_BOOKE=y
69CONFIG_FSL_BOOKE=y
70# CONFIG_PHYS_64BIT is not set
71CONFIG_SPE=y
72CONFIG_MATH_EMULATION=y
73# CONFIG_CPU_FREQ is not set
74CONFIG_PPC_GEN550=y
75# CONFIG_PM is not set
76CONFIG_85xx=y
77CONFIG_PPC_INDIRECT_PCI_BE=y
78
79#
80# Freescale 85xx options
81#
82# CONFIG_MPC8540_ADS is not set
83CONFIG_MPC8555_CDS=y
84# CONFIG_MPC8560_ADS is not set
85# CONFIG_SBC8560 is not set
86# CONFIG_STX_GP3 is not set
87CONFIG_MPC8555=y
88CONFIG_85xx_PCI2=y
89
90#
91# Platform options
92#
93CONFIG_CPM2=y
94# CONFIG_PC_KEYBOARD is not set
95# CONFIG_SMP is not set
96# CONFIG_PREEMPT is not set
97# CONFIG_HIGHMEM is not set
98CONFIG_BINFMT_ELF=y
99# CONFIG_BINFMT_MISC is not set
100# CONFIG_CMDLINE_BOOL is not set
101CONFIG_ISA_DMA_API=y
102
103#
104# Bus options
105#
106CONFIG_PCI=y
107CONFIG_PCI_DOMAINS=y
108# CONFIG_PCI_LEGACY_PROC is not set
109CONFIG_PCI_NAMES=y
110
111#
112# PCCARD (PCMCIA/CardBus) support
113#
114# CONFIG_PCCARD is not set
115
116#
117# Advanced setup
118#
119# CONFIG_ADVANCED_OPTIONS is not set
120
121#
122# Default settings for advanced configuration options are used
123#
124CONFIG_HIGHMEM_START=0xfe000000
125CONFIG_LOWMEM_SIZE=0x30000000
126CONFIG_KERNEL_START=0xc0000000
127CONFIG_TASK_SIZE=0x80000000
128CONFIG_BOOT_LOAD=0x00800000
129
130#
131# Device Drivers
132#
133
134#
135# Generic Driver Options
136#
137CONFIG_STANDALONE=y
138CONFIG_PREVENT_FIRMWARE_BUILD=y
139# CONFIG_FW_LOADER is not set
140
141#
142# Memory Technology Devices (MTD)
143#
144# CONFIG_MTD is not set
145
146#
147# Parallel port support
148#
149# CONFIG_PARPORT is not set
150
151#
152# Plug and Play support
153#
154
155#
156# Block devices
157#
158# CONFIG_BLK_DEV_FD is not set
159# CONFIG_BLK_CPQ_DA is not set
160# CONFIG_BLK_CPQ_CISS_DA is not set
161# CONFIG_BLK_DEV_DAC960 is not set
162# CONFIG_BLK_DEV_UMEM is not set
163# CONFIG_BLK_DEV_COW_COMMON is not set
164CONFIG_BLK_DEV_LOOP=y
165# CONFIG_BLK_DEV_CRYPTOLOOP is not set
166# CONFIG_BLK_DEV_NBD is not set
167# CONFIG_BLK_DEV_SX8 is not set
168CONFIG_BLK_DEV_RAM=y
169CONFIG_BLK_DEV_RAM_COUNT=16
170CONFIG_BLK_DEV_RAM_SIZE=32768
171CONFIG_BLK_DEV_INITRD=y
172CONFIG_INITRAMFS_SOURCE=""
173# CONFIG_LBD is not set
174# CONFIG_CDROM_PKTCDVD is not set
175
176#
177# IO Schedulers
178#
179CONFIG_IOSCHED_NOOP=y
180CONFIG_IOSCHED_AS=y
181CONFIG_IOSCHED_DEADLINE=y
182CONFIG_IOSCHED_CFQ=y
183# CONFIG_ATA_OVER_ETH is not set
184
185#
186# ATA/ATAPI/MFM/RLL support
187#
188CONFIG_IDE=y
189CONFIG_BLK_DEV_IDE=y
190
191#
192# Please see Documentation/ide.txt for help/info on IDE drives
193#
194# CONFIG_BLK_DEV_IDE_SATA is not set
195CONFIG_BLK_DEV_IDEDISK=y
196# CONFIG_IDEDISK_MULTI_MODE is not set
197# CONFIG_BLK_DEV_IDECD is not set
198# CONFIG_BLK_DEV_IDETAPE is not set
199# CONFIG_BLK_DEV_IDEFLOPPY is not set
200# CONFIG_IDE_TASK_IOCTL is not set
201
202#
203# IDE chipset support/bugfixes
204#
205CONFIG_IDE_GENERIC=y
206CONFIG_BLK_DEV_IDEPCI=y
207CONFIG_IDEPCI_SHARE_IRQ=y
208# CONFIG_BLK_DEV_OFFBOARD is not set
209CONFIG_BLK_DEV_GENERIC=y
210# CONFIG_BLK_DEV_OPTI621 is not set
211# CONFIG_BLK_DEV_SL82C105 is not set
212CONFIG_BLK_DEV_IDEDMA_PCI=y
213# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
214CONFIG_IDEDMA_PCI_AUTO=y
215# CONFIG_IDEDMA_ONLYDISK is not set
216# CONFIG_BLK_DEV_AEC62XX is not set
217# CONFIG_BLK_DEV_ALI15X3 is not set
218# CONFIG_BLK_DEV_AMD74XX is not set
219# CONFIG_BLK_DEV_CMD64X is not set
220# CONFIG_BLK_DEV_TRIFLEX is not set
221# CONFIG_BLK_DEV_CY82C693 is not set
222# CONFIG_BLK_DEV_CS5520 is not set
223# CONFIG_BLK_DEV_CS5530 is not set
224# CONFIG_BLK_DEV_HPT34X is not set
225# CONFIG_BLK_DEV_HPT366 is not set
226# CONFIG_BLK_DEV_SC1200 is not set
227# CONFIG_BLK_DEV_PIIX is not set
228# CONFIG_BLK_DEV_NS87415 is not set
229# CONFIG_BLK_DEV_PDC202XX_OLD is not set
230# CONFIG_BLK_DEV_PDC202XX_NEW is not set
231# CONFIG_BLK_DEV_SVWKS is not set
232# CONFIG_BLK_DEV_SIIMAGE is not set
233# CONFIG_BLK_DEV_SLC90E66 is not set
234# CONFIG_BLK_DEV_TRM290 is not set
235CONFIG_BLK_DEV_VIA82CXXX=y
236# CONFIG_IDE_ARM is not set
237CONFIG_BLK_DEV_IDEDMA=y
238# CONFIG_IDEDMA_IVB is not set
239CONFIG_IDEDMA_AUTO=y
240# CONFIG_BLK_DEV_HD is not set
241
242#
243# SCSI device support
244#
245# CONFIG_SCSI is not set
246
247#
248# Multi-device support (RAID and LVM)
249#
250# CONFIG_MD is not set
251
252#
253# Fusion MPT device support
254#
255
256#
257# IEEE 1394 (FireWire) support
258#
259# CONFIG_IEEE1394 is not set
260
261#
262# I2O device support
263#
264# CONFIG_I2O is not set
265
266#
267# Macintosh device drivers
268#
269
270#
271# Networking support
272#
273CONFIG_NET=y
274
275#
276# Networking options
277#
278CONFIG_PACKET=y
279# CONFIG_PACKET_MMAP is not set
280CONFIG_UNIX=y
281# CONFIG_NET_KEY is not set
282CONFIG_INET=y
283CONFIG_IP_MULTICAST=y
284# CONFIG_IP_ADVANCED_ROUTER is not set
285CONFIG_IP_PNP=y
286CONFIG_IP_PNP_DHCP=y
287CONFIG_IP_PNP_BOOTP=y
288# CONFIG_IP_PNP_RARP is not set
289# CONFIG_NET_IPIP is not set
290# CONFIG_NET_IPGRE is not set
291# CONFIG_IP_MROUTE is not set
292# CONFIG_ARPD is not set
293CONFIG_SYN_COOKIES=y
294# CONFIG_INET_AH is not set
295# CONFIG_INET_ESP is not set
296# CONFIG_INET_IPCOMP is not set
297# CONFIG_INET_TUNNEL is not set
298CONFIG_IP_TCPDIAG=y
299# CONFIG_IP_TCPDIAG_IPV6 is not set
300# CONFIG_IPV6 is not set
301# CONFIG_NETFILTER is not set
302
303#
304# SCTP Configuration (EXPERIMENTAL)
305#
306# CONFIG_IP_SCTP is not set
307# CONFIG_ATM is not set
308# CONFIG_BRIDGE is not set
309# CONFIG_VLAN_8021Q is not set
310# CONFIG_DECNET is not set
311# CONFIG_LLC2 is not set
312# CONFIG_IPX is not set
313# CONFIG_ATALK is not set
314# CONFIG_X25 is not set
315# CONFIG_LAPB is not set
316# CONFIG_NET_DIVERT is not set
317# CONFIG_ECONET is not set
318# CONFIG_WAN_ROUTER is not set
319
320#
321# QoS and/or fair queueing
322#
323# CONFIG_NET_SCHED is not set
324# CONFIG_NET_CLS_ROUTE is not set
325
326#
327# Network testing
328#
329# CONFIG_NET_PKTGEN is not set
330# CONFIG_NETPOLL is not set
331# CONFIG_NET_POLL_CONTROLLER is not set
332# CONFIG_HAMRADIO is not set
333# CONFIG_IRDA is not set
334# CONFIG_BT is not set
335CONFIG_NETDEVICES=y
336# CONFIG_DUMMY is not set
337# CONFIG_BONDING is not set
338# CONFIG_EQUALIZER is not set
339# CONFIG_TUN is not set
340
341#
342# ARCnet devices
343#
344# CONFIG_ARCNET is not set
345
346#
347# Ethernet (10 or 100Mbit)
348#
349CONFIG_NET_ETHERNET=y
350CONFIG_MII=y
351# CONFIG_HAPPYMEAL is not set
352# CONFIG_SUNGEM is not set
353# CONFIG_NET_VENDOR_3COM is not set
354
355#
356# Tulip family network device support
357#
358# CONFIG_NET_TULIP is not set
359# CONFIG_HP100 is not set
360# CONFIG_NET_PCI is not set
361
362#
363# Ethernet (1000 Mbit)
364#
365# CONFIG_ACENIC is not set
366# CONFIG_DL2K is not set
367# CONFIG_E1000 is not set
368# CONFIG_NS83820 is not set
369# CONFIG_HAMACHI is not set
370# CONFIG_YELLOWFIN is not set
371# CONFIG_R8169 is not set
372# CONFIG_SK98LIN is not set
373# CONFIG_TIGON3 is not set
374CONFIG_GIANFAR=y
375CONFIG_GFAR_NAPI=y
376
377#
378# Ethernet (10000 Mbit)
379#
380# CONFIG_IXGB is not set
381# CONFIG_S2IO is not set
382
383#
384# Token Ring devices
385#
386# CONFIG_TR is not set
387
388#
389# Wireless LAN (non-hamradio)
390#
391# CONFIG_NET_RADIO is not set
392
393#
394# Wan interfaces
395#
396# CONFIG_WAN is not set
397# CONFIG_FDDI is not set
398# CONFIG_HIPPI is not set
399# CONFIG_PPP is not set
400# CONFIG_SLIP is not set
401# CONFIG_SHAPER is not set
402# CONFIG_NETCONSOLE is not set
403
404#
405# ISDN subsystem
406#
407# CONFIG_ISDN is not set
408
409#
410# Telephony Support
411#
412# CONFIG_PHONE is not set
413
414#
415# Input device support
416#
417CONFIG_INPUT=y
418
419#
420# Userland interfaces
421#
422# CONFIG_INPUT_MOUSEDEV is not set
423# CONFIG_INPUT_JOYDEV is not set
424# CONFIG_INPUT_TSDEV is not set
425# CONFIG_INPUT_EVDEV is not set
426# CONFIG_INPUT_EVBUG is not set
427
428#
429# Input Device Drivers
430#
431# CONFIG_INPUT_KEYBOARD is not set
432# CONFIG_INPUT_MOUSE is not set
433# CONFIG_INPUT_JOYSTICK is not set
434# CONFIG_INPUT_TOUCHSCREEN is not set
435# CONFIG_INPUT_MISC is not set
436
437#
438# Hardware I/O ports
439#
440# CONFIG_SERIO is not set
441# CONFIG_GAMEPORT is not set
442CONFIG_SOUND_GAMEPORT=y
443
444#
445# Character devices
446#
447# CONFIG_VT is not set
448# CONFIG_SERIAL_NONSTANDARD is not set
449
450#
451# Serial drivers
452#
453CONFIG_SERIAL_8250=y
454CONFIG_SERIAL_8250_CONSOLE=y
455CONFIG_SERIAL_8250_NR_UARTS=4
456# CONFIG_SERIAL_8250_EXTENDED is not set
457
458#
459# Non-8250 serial port support
460#
461CONFIG_SERIAL_CORE=y
462CONFIG_SERIAL_CORE_CONSOLE=y
463# CONFIG_SERIAL_CPM is not set
464# CONFIG_SERIAL_JSM is not set
465CONFIG_UNIX98_PTYS=y
466CONFIG_LEGACY_PTYS=y
467CONFIG_LEGACY_PTY_COUNT=256
468
469#
470# IPMI
471#
472# CONFIG_IPMI_HANDLER is not set
473
474#
475# Watchdog Cards
476#
477# CONFIG_WATCHDOG is not set
478# CONFIG_NVRAM is not set
479CONFIG_GEN_RTC=y
480# CONFIG_GEN_RTC_X is not set
481# CONFIG_DTLK is not set
482# CONFIG_R3964 is not set
483# CONFIG_APPLICOM is not set
484
485#
486# Ftape, the floppy tape device driver
487#
488# CONFIG_AGP is not set
489# CONFIG_DRM is not set
490# CONFIG_RAW_DRIVER is not set
491
492#
493# TPM devices
494#
495# CONFIG_TCG_TPM is not set
496
497#
498# I2C support
499#
500CONFIG_I2C=y
501CONFIG_I2C_CHARDEV=y
502
503#
504# I2C Algorithms
505#
506# CONFIG_I2C_ALGOBIT is not set
507# CONFIG_I2C_ALGOPCF is not set
508# CONFIG_I2C_ALGOPCA is not set
509
510#
511# I2C Hardware Bus support
512#
513# CONFIG_I2C_ALI1535 is not set
514# CONFIG_I2C_ALI1563 is not set
515# CONFIG_I2C_ALI15X3 is not set
516# CONFIG_I2C_AMD756 is not set
517# CONFIG_I2C_AMD8111 is not set
518# CONFIG_I2C_I801 is not set
519# CONFIG_I2C_I810 is not set
520# CONFIG_I2C_PIIX4 is not set
521CONFIG_I2C_MPC=y
522# CONFIG_I2C_NFORCE2 is not set
523# CONFIG_I2C_PARPORT_LIGHT is not set
524# CONFIG_I2C_PROSAVAGE is not set
525# CONFIG_I2C_SAVAGE4 is not set
526# CONFIG_SCx200_ACB is not set
527# CONFIG_I2C_SIS5595 is not set
528# CONFIG_I2C_SIS630 is not set
529# CONFIG_I2C_SIS96X is not set
530# CONFIG_I2C_VIA is not set
531# CONFIG_I2C_VIAPRO is not set
532# CONFIG_I2C_VOODOO3 is not set
533# CONFIG_I2C_PCA_ISA is not set
534
535#
536# Hardware Sensors Chip support
537#
538# CONFIG_I2C_SENSOR is not set
539# CONFIG_SENSORS_ADM1021 is not set
540# CONFIG_SENSORS_ADM1025 is not set
541# CONFIG_SENSORS_ADM1026 is not set
542# CONFIG_SENSORS_ADM1031 is not set
543# CONFIG_SENSORS_ASB100 is not set
544# CONFIG_SENSORS_DS1621 is not set
545# CONFIG_SENSORS_FSCHER is not set
546# CONFIG_SENSORS_FSCPOS is not set
547# CONFIG_SENSORS_GL518SM is not set
548# CONFIG_SENSORS_GL520SM is not set
549# CONFIG_SENSORS_IT87 is not set
550# CONFIG_SENSORS_LM63 is not set
551# CONFIG_SENSORS_LM75 is not set
552# CONFIG_SENSORS_LM77 is not set
553# CONFIG_SENSORS_LM78 is not set
554# CONFIG_SENSORS_LM80 is not set
555# CONFIG_SENSORS_LM83 is not set
556# CONFIG_SENSORS_LM85 is not set
557# CONFIG_SENSORS_LM87 is not set
558# CONFIG_SENSORS_LM90 is not set
559# CONFIG_SENSORS_LM92 is not set
560# CONFIG_SENSORS_MAX1619 is not set
561# CONFIG_SENSORS_PC87360 is not set
562# CONFIG_SENSORS_SMSC47B397 is not set
563# CONFIG_SENSORS_SIS5595 is not set
564# CONFIG_SENSORS_SMSC47M1 is not set
565# CONFIG_SENSORS_VIA686A is not set
566# CONFIG_SENSORS_W83781D is not set
567# CONFIG_SENSORS_W83L785TS is not set
568# CONFIG_SENSORS_W83627HF is not set
569
570#
571# Other I2C Chip support
572#
573# CONFIG_SENSORS_DS1337 is not set
574# CONFIG_SENSORS_EEPROM is not set
575# CONFIG_SENSORS_PCF8574 is not set
576# CONFIG_SENSORS_PCF8591 is not set
577# CONFIG_SENSORS_RTC8564 is not set
578# CONFIG_SENSORS_M41T00 is not set
579# CONFIG_I2C_DEBUG_CORE is not set
580# CONFIG_I2C_DEBUG_ALGO is not set
581# CONFIG_I2C_DEBUG_BUS is not set
582# CONFIG_I2C_DEBUG_CHIP is not set
583
584#
585# Dallas's 1-wire bus
586#
587# CONFIG_W1 is not set
588
589#
590# Misc devices
591#
592
593#
594# Multimedia devices
595#
596# CONFIG_VIDEO_DEV is not set
597
598#
599# Digital Video Broadcasting Devices
600#
601# CONFIG_DVB is not set
602
603#
604# Graphics support
605#
606# CONFIG_FB is not set
607
608#
609# Sound
610#
611# CONFIG_SOUND is not set
612
613#
614# USB support
615#
616CONFIG_USB_ARCH_HAS_HCD=y
617CONFIG_USB_ARCH_HAS_OHCI=y
618# CONFIG_USB is not set
619
620#
621# USB Gadget Support
622#
623# CONFIG_USB_GADGET is not set
624
625#
626# MMC/SD Card support
627#
628# CONFIG_MMC is not set
629
630#
631# InfiniBand support
632#
633# CONFIG_INFINIBAND is not set
634
635#
636# File systems
637#
638CONFIG_EXT2_FS=y
639# CONFIG_EXT2_FS_XATTR is not set
640CONFIG_EXT3_FS=y
641CONFIG_EXT3_FS_XATTR=y
642# CONFIG_EXT3_FS_POSIX_ACL is not set
643# CONFIG_EXT3_FS_SECURITY is not set
644CONFIG_JBD=y
645# CONFIG_JBD_DEBUG is not set
646CONFIG_FS_MBCACHE=y
647# CONFIG_REISERFS_FS is not set
648# CONFIG_JFS_FS is not set
649
650#
651# XFS support
652#
653# CONFIG_XFS_FS is not set
654# CONFIG_MINIX_FS is not set
655# CONFIG_ROMFS_FS is not set
656# CONFIG_QUOTA is not set
657CONFIG_DNOTIFY=y
658# CONFIG_AUTOFS_FS is not set
659# CONFIG_AUTOFS4_FS is not set
660
661#
662# CD-ROM/DVD Filesystems
663#
664# CONFIG_ISO9660_FS is not set
665# CONFIG_UDF_FS is not set
666
667#
668# DOS/FAT/NT Filesystems
669#
670# CONFIG_MSDOS_FS is not set
671# CONFIG_VFAT_FS is not set
672# CONFIG_NTFS_FS is not set
673
674#
675# Pseudo filesystems
676#
677CONFIG_PROC_FS=y
678CONFIG_PROC_KCORE=y
679CONFIG_SYSFS=y
680# CONFIG_DEVFS_FS is not set
681# CONFIG_DEVPTS_FS_XATTR is not set
682CONFIG_TMPFS=y
683# CONFIG_TMPFS_XATTR is not set
684# CONFIG_HUGETLB_PAGE is not set
685CONFIG_RAMFS=y
686
687#
688# Miscellaneous filesystems
689#
690# CONFIG_ADFS_FS is not set
691# CONFIG_AFFS_FS is not set
692# CONFIG_HFS_FS is not set
693# CONFIG_HFSPLUS_FS is not set
694# CONFIG_BEFS_FS is not set
695# CONFIG_BFS_FS is not set
696# CONFIG_EFS_FS is not set
697# CONFIG_CRAMFS is not set
698# CONFIG_VXFS_FS is not set
699# CONFIG_HPFS_FS is not set
700# CONFIG_QNX4FS_FS is not set
701# CONFIG_SYSV_FS is not set
702# CONFIG_UFS_FS is not set
703
704#
705# Network File Systems
706#
707CONFIG_NFS_FS=y
708# CONFIG_NFS_V3 is not set
709# CONFIG_NFS_V4 is not set
710# CONFIG_NFS_DIRECTIO is not set
711# CONFIG_NFSD is not set
712CONFIG_ROOT_NFS=y
713CONFIG_LOCKD=y
714CONFIG_SUNRPC=y
715# CONFIG_RPCSEC_GSS_KRB5 is not set
716# CONFIG_RPCSEC_GSS_SPKM3 is not set
717# CONFIG_SMB_FS is not set
718# CONFIG_CIFS is not set
719# CONFIG_NCP_FS is not set
720# CONFIG_CODA_FS is not set
721# CONFIG_AFS_FS is not set
722
723#
724# Partition Types
725#
726CONFIG_PARTITION_ADVANCED=y
727# CONFIG_ACORN_PARTITION is not set
728# CONFIG_OSF_PARTITION is not set
729# CONFIG_AMIGA_PARTITION is not set
730# CONFIG_ATARI_PARTITION is not set
731# CONFIG_MAC_PARTITION is not set
732# CONFIG_MSDOS_PARTITION is not set
733# CONFIG_LDM_PARTITION is not set
734# CONFIG_SGI_PARTITION is not set
735# CONFIG_ULTRIX_PARTITION is not set
736# CONFIG_SUN_PARTITION is not set
737# CONFIG_EFI_PARTITION is not set
738
739#
740# Native Language Support
741#
742# CONFIG_NLS is not set
743# CONFIG_SCC_ENET is not set
744# CONFIG_FEC_ENET is not set
745
746#
747# CPM2 Options
748#
749
750#
751# Library routines
752#
753# CONFIG_CRC_CCITT is not set
754CONFIG_CRC32=y
755# CONFIG_LIBCRC32C is not set
756
757#
758# Profiling support
759#
760# CONFIG_PROFILING is not set
761
762#
763# Kernel hacking
764#
765# CONFIG_PRINTK_TIME is not set
766# CONFIG_DEBUG_KERNEL is not set
767CONFIG_LOG_BUF_SHIFT=14
768# CONFIG_KGDB_CONSOLE is not set
769# CONFIG_SERIAL_TEXT_DEBUG is not set
770
771#
772# Security options
773#
774# CONFIG_KEYS is not set
775# CONFIG_SECURITY is not set
776
777#
778# Cryptographic options
779#
780# CONFIG_CRYPTO is not set
781
782#
783# Hardware crypto devices
784#
diff --git a/arch/ppc/configs/mpc8560_ads_defconfig b/arch/ppc/configs/mpc8560_ads_defconfig
deleted file mode 100644
index f12d48fcbba7..000000000000
--- a/arch/ppc/configs/mpc8560_ads_defconfig
+++ /dev/null
@@ -1,769 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6
4# Thu Aug 11 18:14:45 2005
5#
6CONFIG_MMU=y
7CONFIG_GENERIC_HARDIRQS=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_HAVE_DEC_LOCK=y
11CONFIG_PPC=y
12CONFIG_PPC32=y
13CONFIG_GENERIC_NVRAM=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
15
16#
17# Code maturity level options
18#
19CONFIG_EXPERIMENTAL=y
20CONFIG_CLEAN_COMPILE=y
21CONFIG_BROKEN_ON_SMP=y
22CONFIG_INIT_ENV_ARG_LIMIT=32
23
24#
25# General setup
26#
27CONFIG_LOCALVERSION=""
28CONFIG_SWAP=y
29CONFIG_SYSVIPC=y
30# CONFIG_POSIX_MQUEUE is not set
31# CONFIG_BSD_PROCESS_ACCT is not set
32CONFIG_SYSCTL=y
33# CONFIG_AUDIT is not set
34# CONFIG_HOTPLUG is not set
35CONFIG_KOBJECT_UEVENT=y
36# CONFIG_IKCONFIG is not set
37CONFIG_EMBEDDED=y
38# CONFIG_KALLSYMS is not set
39CONFIG_PRINTK=y
40CONFIG_BUG=y
41CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y
43# CONFIG_EPOLL is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0
47CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0
52
53#
54# Loadable module support
55#
56# CONFIG_MODULES is not set
57
58#
59# Processor
60#
61# CONFIG_6xx is not set
62# CONFIG_40x is not set
63# CONFIG_44x is not set
64# CONFIG_POWER3 is not set
65# CONFIG_POWER4 is not set
66# CONFIG_8xx is not set
67# CONFIG_E200 is not set
68CONFIG_E500=y
69CONFIG_BOOKE=y
70CONFIG_FSL_BOOKE=y
71# CONFIG_PHYS_64BIT is not set
72CONFIG_SPE=y
73CONFIG_MATH_EMULATION=y
74# CONFIG_KEXEC is not set
75# CONFIG_CPU_FREQ is not set
76# CONFIG_PM is not set
77CONFIG_85xx=y
78CONFIG_PPC_INDIRECT_PCI_BE=y
79
80#
81# Freescale 85xx options
82#
83# CONFIG_MPC8540_ADS is not set
84# CONFIG_MPC8548_CDS is not set
85# CONFIG_MPC8555_CDS is not set
86CONFIG_MPC8560_ADS=y
87# CONFIG_SBC8560 is not set
88# CONFIG_STX_GP3 is not set
89CONFIG_MPC8560=y
90
91#
92# Platform options
93#
94CONFIG_CPM2=y
95# CONFIG_PC_KEYBOARD is not set
96# CONFIG_SMP is not set
97# CONFIG_HIGHMEM is not set
98# CONFIG_HZ_100 is not set
99CONFIG_HZ_250=y
100# CONFIG_HZ_1000 is not set
101CONFIG_HZ=250
102CONFIG_PREEMPT_NONE=y
103# CONFIG_PREEMPT_VOLUNTARY is not set
104# CONFIG_PREEMPT is not set
105CONFIG_SELECT_MEMORY_MODEL=y
106CONFIG_FLATMEM_MANUAL=y
107# CONFIG_DISCONTIGMEM_MANUAL is not set
108# CONFIG_SPARSEMEM_MANUAL is not set
109CONFIG_FLATMEM=y
110CONFIG_FLAT_NODE_MEM_MAP=y
111CONFIG_BINFMT_ELF=y
112# CONFIG_BINFMT_MISC is not set
113# CONFIG_CMDLINE_BOOL is not set
114CONFIG_SECCOMP=y
115CONFIG_ISA_DMA_API=y
116
117#
118# Bus options
119#
120CONFIG_PCI=y
121CONFIG_PCI_DOMAINS=y
122# CONFIG_PCI_LEGACY_PROC is not set
123CONFIG_PCI_NAMES=y
124
125#
126# PCCARD (PCMCIA/CardBus) support
127#
128# CONFIG_PCCARD is not set
129
130#
131# Advanced setup
132#
133# CONFIG_ADVANCED_OPTIONS is not set
134
135#
136# Default settings for advanced configuration options are used
137#
138CONFIG_HIGHMEM_START=0xfe000000
139CONFIG_LOWMEM_SIZE=0x30000000
140CONFIG_KERNEL_START=0xc0000000
141CONFIG_TASK_SIZE=0x80000000
142CONFIG_BOOT_LOAD=0x00800000
143
144#
145# Networking
146#
147CONFIG_NET=y
148
149#
150# Networking options
151#
152CONFIG_PACKET=y
153# CONFIG_PACKET_MMAP is not set
154CONFIG_UNIX=y
155# CONFIG_NET_KEY is not set
156CONFIG_INET=y
157CONFIG_IP_MULTICAST=y
158# CONFIG_IP_ADVANCED_ROUTER is not set
159CONFIG_IP_FIB_HASH=y
160CONFIG_IP_PNP=y
161CONFIG_IP_PNP_DHCP=y
162CONFIG_IP_PNP_BOOTP=y
163# CONFIG_IP_PNP_RARP is not set
164# CONFIG_NET_IPIP is not set
165# CONFIG_NET_IPGRE is not set
166# CONFIG_IP_MROUTE is not set
167# CONFIG_ARPD is not set
168CONFIG_SYN_COOKIES=y
169# CONFIG_INET_AH is not set
170# CONFIG_INET_ESP is not set
171# CONFIG_INET_IPCOMP is not set
172# CONFIG_INET_TUNNEL is not set
173CONFIG_IP_TCPDIAG=y
174# CONFIG_IP_TCPDIAG_IPV6 is not set
175# CONFIG_TCP_CONG_ADVANCED is not set
176CONFIG_TCP_CONG_BIC=y
177# CONFIG_IPV6 is not set
178# CONFIG_NETFILTER is not set
179
180#
181# SCTP Configuration (EXPERIMENTAL)
182#
183# CONFIG_IP_SCTP is not set
184# CONFIG_ATM is not set
185# CONFIG_BRIDGE is not set
186# CONFIG_VLAN_8021Q is not set
187# CONFIG_DECNET is not set
188# CONFIG_LLC2 is not set
189# CONFIG_IPX is not set
190# CONFIG_ATALK is not set
191# CONFIG_X25 is not set
192# CONFIG_LAPB is not set
193# CONFIG_NET_DIVERT is not set
194# CONFIG_ECONET is not set
195# CONFIG_WAN_ROUTER is not set
196# CONFIG_NET_SCHED is not set
197# CONFIG_NET_CLS_ROUTE is not set
198
199#
200# Network testing
201#
202# CONFIG_NET_PKTGEN is not set
203# CONFIG_HAMRADIO is not set
204# CONFIG_IRDA is not set
205# CONFIG_BT is not set
206
207#
208# Device Drivers
209#
210
211#
212# Generic Driver Options
213#
214CONFIG_STANDALONE=y
215CONFIG_PREVENT_FIRMWARE_BUILD=y
216# CONFIG_FW_LOADER is not set
217
218#
219# Memory Technology Devices (MTD)
220#
221# CONFIG_MTD is not set
222
223#
224# Parallel port support
225#
226# CONFIG_PARPORT is not set
227
228#
229# Plug and Play support
230#
231
232#
233# Block devices
234#
235# CONFIG_BLK_DEV_FD is not set
236# CONFIG_BLK_CPQ_DA is not set
237# CONFIG_BLK_CPQ_CISS_DA is not set
238# CONFIG_BLK_DEV_DAC960 is not set
239# CONFIG_BLK_DEV_UMEM is not set
240# CONFIG_BLK_DEV_COW_COMMON is not set
241CONFIG_BLK_DEV_LOOP=y
242# CONFIG_BLK_DEV_CRYPTOLOOP is not set
243# CONFIG_BLK_DEV_NBD is not set
244# CONFIG_BLK_DEV_SX8 is not set
245CONFIG_BLK_DEV_RAM=y
246CONFIG_BLK_DEV_RAM_COUNT=16
247CONFIG_BLK_DEV_RAM_SIZE=32768
248CONFIG_BLK_DEV_INITRD=y
249CONFIG_INITRAMFS_SOURCE=""
250# CONFIG_LBD is not set
251# CONFIG_CDROM_PKTCDVD is not set
252
253#
254# IO Schedulers
255#
256CONFIG_IOSCHED_NOOP=y
257CONFIG_IOSCHED_AS=y
258CONFIG_IOSCHED_DEADLINE=y
259CONFIG_IOSCHED_CFQ=y
260# CONFIG_ATA_OVER_ETH is not set
261
262#
263# ATA/ATAPI/MFM/RLL support
264#
265# CONFIG_IDE is not set
266
267#
268# SCSI device support
269#
270# CONFIG_SCSI is not set
271
272#
273# Multi-device support (RAID and LVM)
274#
275# CONFIG_MD is not set
276
277#
278# Fusion MPT device support
279#
280# CONFIG_FUSION is not set
281
282#
283# IEEE 1394 (FireWire) support
284#
285# CONFIG_IEEE1394 is not set
286
287#
288# I2O device support
289#
290# CONFIG_I2O is not set
291
292#
293# Macintosh device drivers
294#
295
296#
297# Network device support
298#
299CONFIG_NETDEVICES=y
300# CONFIG_DUMMY is not set
301# CONFIG_BONDING is not set
302# CONFIG_EQUALIZER is not set
303# CONFIG_TUN is not set
304
305#
306# ARCnet devices
307#
308# CONFIG_ARCNET is not set
309
310#
311# Ethernet (10 or 100Mbit)
312#
313CONFIG_NET_ETHERNET=y
314CONFIG_MII=y
315# CONFIG_HAPPYMEAL is not set
316# CONFIG_SUNGEM is not set
317# CONFIG_NET_VENDOR_3COM is not set
318
319#
320# Tulip family network device support
321#
322# CONFIG_NET_TULIP is not set
323# CONFIG_HP100 is not set
324# CONFIG_NET_PCI is not set
325
326#
327# Ethernet (1000 Mbit)
328#
329# CONFIG_ACENIC is not set
330# CONFIG_DL2K is not set
331# CONFIG_E1000 is not set
332# CONFIG_NS83820 is not set
333# CONFIG_HAMACHI is not set
334# CONFIG_YELLOWFIN is not set
335# CONFIG_R8169 is not set
336# CONFIG_SKGE is not set
337# CONFIG_SK98LIN is not set
338# CONFIG_TIGON3 is not set
339# CONFIG_BNX2 is not set
340CONFIG_GIANFAR=y
341CONFIG_GFAR_NAPI=y
342
343#
344# Ethernet (10000 Mbit)
345#
346# CONFIG_IXGB is not set
347# CONFIG_S2IO is not set
348
349#
350# Token Ring devices
351#
352# CONFIG_TR is not set
353
354#
355# Wireless LAN (non-hamradio)
356#
357# CONFIG_NET_RADIO is not set
358
359#
360# Wan interfaces
361#
362# CONFIG_WAN is not set
363# CONFIG_FDDI is not set
364# CONFIG_HIPPI is not set
365# CONFIG_PPP is not set
366# CONFIG_SLIP is not set
367# CONFIG_SHAPER is not set
368# CONFIG_NETCONSOLE is not set
369# CONFIG_NETPOLL is not set
370# CONFIG_NET_POLL_CONTROLLER is not set
371
372#
373# ISDN subsystem
374#
375# CONFIG_ISDN is not set
376
377#
378# Telephony Support
379#
380# CONFIG_PHONE is not set
381
382#
383# Input device support
384#
385CONFIG_INPUT=y
386
387#
388# Userland interfaces
389#
390# CONFIG_INPUT_MOUSEDEV is not set
391# CONFIG_INPUT_JOYDEV is not set
392# CONFIG_INPUT_TSDEV is not set
393# CONFIG_INPUT_EVDEV is not set
394# CONFIG_INPUT_EVBUG is not set
395
396#
397# Input Device Drivers
398#
399# CONFIG_INPUT_KEYBOARD is not set
400# CONFIG_INPUT_MOUSE is not set
401# CONFIG_INPUT_JOYSTICK is not set
402# CONFIG_INPUT_TOUCHSCREEN is not set
403# CONFIG_INPUT_MISC is not set
404
405#
406# Hardware I/O ports
407#
408# CONFIG_SERIO is not set
409# CONFIG_GAMEPORT is not set
410
411#
412# Character devices
413#
414# CONFIG_VT is not set
415# CONFIG_SERIAL_NONSTANDARD is not set
416
417#
418# Serial drivers
419#
420# CONFIG_SERIAL_8250 is not set
421
422#
423# Non-8250 serial port support
424#
425CONFIG_SERIAL_CORE=y
426CONFIG_SERIAL_CORE_CONSOLE=y
427CONFIG_SERIAL_CPM=y
428CONFIG_SERIAL_CPM_CONSOLE=y
429CONFIG_SERIAL_CPM_SCC1=y
430CONFIG_SERIAL_CPM_SCC2=y
431# CONFIG_SERIAL_CPM_SCC3 is not set
432# CONFIG_SERIAL_CPM_SCC4 is not set
433# CONFIG_SERIAL_CPM_SMC1 is not set
434# CONFIG_SERIAL_CPM_SMC2 is not set
435# CONFIG_SERIAL_JSM is not set
436CONFIG_UNIX98_PTYS=y
437CONFIG_LEGACY_PTYS=y
438CONFIG_LEGACY_PTY_COUNT=256
439
440#
441# IPMI
442#
443# CONFIG_IPMI_HANDLER is not set
444
445#
446# Watchdog Cards
447#
448# CONFIG_WATCHDOG is not set
449# CONFIG_NVRAM is not set
450CONFIG_GEN_RTC=y
451# CONFIG_GEN_RTC_X is not set
452# CONFIG_DTLK is not set
453# CONFIG_R3964 is not set
454# CONFIG_APPLICOM is not set
455
456#
457# Ftape, the floppy tape device driver
458#
459# CONFIG_AGP is not set
460# CONFIG_DRM is not set
461# CONFIG_RAW_DRIVER is not set
462
463#
464# TPM devices
465#
466# CONFIG_TCG_TPM is not set
467
468#
469# I2C support
470#
471CONFIG_I2C=y
472CONFIG_I2C_CHARDEV=y
473
474#
475# I2C Algorithms
476#
477# CONFIG_I2C_ALGOBIT is not set
478# CONFIG_I2C_ALGOPCF is not set
479# CONFIG_I2C_ALGOPCA is not set
480
481#
482# I2C Hardware Bus support
483#
484# CONFIG_I2C_ALI1535 is not set
485# CONFIG_I2C_ALI1563 is not set
486# CONFIG_I2C_ALI15X3 is not set
487# CONFIG_I2C_AMD756 is not set
488# CONFIG_I2C_AMD8111 is not set
489# CONFIG_I2C_I801 is not set
490# CONFIG_I2C_I810 is not set
491# CONFIG_I2C_PIIX4 is not set
492CONFIG_I2C_MPC=y
493# CONFIG_I2C_NFORCE2 is not set
494# CONFIG_I2C_PARPORT_LIGHT is not set
495# CONFIG_I2C_PROSAVAGE is not set
496# CONFIG_I2C_SAVAGE4 is not set
497# CONFIG_SCx200_ACB is not set
498# CONFIG_I2C_SIS5595 is not set
499# CONFIG_I2C_SIS630 is not set
500# CONFIG_I2C_SIS96X is not set
501# CONFIG_I2C_VIA is not set
502# CONFIG_I2C_VIAPRO is not set
503# CONFIG_I2C_VOODOO3 is not set
504# CONFIG_I2C_PCA_ISA is not set
505# CONFIG_I2C_SENSOR is not set
506
507#
508# Miscellaneous I2C Chip support
509#
510# CONFIG_SENSORS_DS1337 is not set
511# CONFIG_SENSORS_DS1374 is not set
512# CONFIG_SENSORS_EEPROM is not set
513# CONFIG_SENSORS_PCF8574 is not set
514# CONFIG_SENSORS_PCA9539 is not set
515# CONFIG_SENSORS_PCF8591 is not set
516# CONFIG_SENSORS_RTC8564 is not set
517# CONFIG_SENSORS_M41T00 is not set
518# CONFIG_SENSORS_MAX6875 is not set
519# CONFIG_I2C_DEBUG_CORE is not set
520# CONFIG_I2C_DEBUG_ALGO is not set
521# CONFIG_I2C_DEBUG_BUS is not set
522# CONFIG_I2C_DEBUG_CHIP is not set
523
524#
525# Dallas's 1-wire bus
526#
527# CONFIG_W1 is not set
528
529#
530# Hardware Monitoring support
531#
532CONFIG_HWMON=y
533# CONFIG_SENSORS_ADM1021 is not set
534# CONFIG_SENSORS_ADM1025 is not set
535# CONFIG_SENSORS_ADM1026 is not set
536# CONFIG_SENSORS_ADM1031 is not set
537# CONFIG_SENSORS_ADM9240 is not set
538# CONFIG_SENSORS_ASB100 is not set
539# CONFIG_SENSORS_ATXP1 is not set
540# CONFIG_SENSORS_DS1621 is not set
541# CONFIG_SENSORS_FSCHER is not set
542# CONFIG_SENSORS_FSCPOS is not set
543# CONFIG_SENSORS_GL518SM is not set
544# CONFIG_SENSORS_GL520SM is not set
545# CONFIG_SENSORS_IT87 is not set
546# CONFIG_SENSORS_LM63 is not set
547# CONFIG_SENSORS_LM75 is not set
548# CONFIG_SENSORS_LM77 is not set
549# CONFIG_SENSORS_LM78 is not set
550# CONFIG_SENSORS_LM80 is not set
551# CONFIG_SENSORS_LM83 is not set
552# CONFIG_SENSORS_LM85 is not set
553# CONFIG_SENSORS_LM87 is not set
554# CONFIG_SENSORS_LM90 is not set
555# CONFIG_SENSORS_LM92 is not set
556# CONFIG_SENSORS_MAX1619 is not set
557# CONFIG_SENSORS_PC87360 is not set
558# CONFIG_SENSORS_SIS5595 is not set
559# CONFIG_SENSORS_SMSC47M1 is not set
560# CONFIG_SENSORS_SMSC47B397 is not set
561# CONFIG_SENSORS_VIA686A is not set
562# CONFIG_SENSORS_W83781D is not set
563# CONFIG_SENSORS_W83L785TS is not set
564# CONFIG_SENSORS_W83627HF is not set
565# CONFIG_SENSORS_W83627EHF is not set
566# CONFIG_HWMON_DEBUG_CHIP is not set
567
568#
569# Misc devices
570#
571
572#
573# Multimedia devices
574#
575# CONFIG_VIDEO_DEV is not set
576
577#
578# Digital Video Broadcasting Devices
579#
580# CONFIG_DVB is not set
581
582#
583# Graphics support
584#
585# CONFIG_FB is not set
586
587#
588# Sound
589#
590# CONFIG_SOUND is not set
591
592#
593# USB support
594#
595CONFIG_USB_ARCH_HAS_HCD=y
596CONFIG_USB_ARCH_HAS_OHCI=y
597# CONFIG_USB is not set
598
599#
600# USB Gadget Support
601#
602# CONFIG_USB_GADGET is not set
603
604#
605# MMC/SD Card support
606#
607# CONFIG_MMC is not set
608
609#
610# InfiniBand support
611#
612# CONFIG_INFINIBAND is not set
613
614#
615# SN Devices
616#
617
618#
619# File systems
620#
621CONFIG_EXT2_FS=y
622# CONFIG_EXT2_FS_XATTR is not set
623# CONFIG_EXT2_FS_XIP is not set
624CONFIG_EXT3_FS=y
625CONFIG_EXT3_FS_XATTR=y
626# CONFIG_EXT3_FS_POSIX_ACL is not set
627# CONFIG_EXT3_FS_SECURITY is not set
628CONFIG_JBD=y
629# CONFIG_JBD_DEBUG is not set
630CONFIG_FS_MBCACHE=y
631# CONFIG_REISERFS_FS is not set
632# CONFIG_JFS_FS is not set
633# CONFIG_FS_POSIX_ACL is not set
634
635#
636# XFS support
637#
638# CONFIG_XFS_FS is not set
639# CONFIG_MINIX_FS is not set
640# CONFIG_ROMFS_FS is not set
641CONFIG_INOTIFY=y
642# CONFIG_QUOTA is not set
643CONFIG_DNOTIFY=y
644# CONFIG_AUTOFS_FS is not set
645# CONFIG_AUTOFS4_FS is not set
646
647#
648# CD-ROM/DVD Filesystems
649#
650# CONFIG_ISO9660_FS is not set
651# CONFIG_UDF_FS is not set
652
653#
654# DOS/FAT/NT Filesystems
655#
656# CONFIG_MSDOS_FS is not set
657# CONFIG_VFAT_FS is not set
658# CONFIG_NTFS_FS is not set
659
660#
661# Pseudo filesystems
662#
663CONFIG_PROC_FS=y
664CONFIG_PROC_KCORE=y
665CONFIG_SYSFS=y
666# CONFIG_DEVPTS_FS_XATTR is not set
667CONFIG_TMPFS=y
668# CONFIG_TMPFS_XATTR is not set
669# CONFIG_HUGETLB_PAGE is not set
670CONFIG_RAMFS=y
671
672#
673# Miscellaneous filesystems
674#
675# CONFIG_ADFS_FS is not set
676# CONFIG_AFFS_FS is not set
677# CONFIG_HFS_FS is not set
678# CONFIG_HFSPLUS_FS is not set
679# CONFIG_BEFS_FS is not set
680# CONFIG_BFS_FS is not set
681# CONFIG_EFS_FS is not set
682# CONFIG_CRAMFS is not set
683# CONFIG_VXFS_FS is not set
684# CONFIG_HPFS_FS is not set
685# CONFIG_QNX4FS_FS is not set
686# CONFIG_SYSV_FS is not set
687# CONFIG_UFS_FS is not set
688
689#
690# Network File Systems
691#
692CONFIG_NFS_FS=y
693# CONFIG_NFS_V3 is not set
694# CONFIG_NFS_V4 is not set
695# CONFIG_NFS_DIRECTIO is not set
696# CONFIG_NFSD is not set
697CONFIG_ROOT_NFS=y
698CONFIG_LOCKD=y
699CONFIG_NFS_COMMON=y
700CONFIG_SUNRPC=y
701# CONFIG_RPCSEC_GSS_KRB5 is not set
702# CONFIG_RPCSEC_GSS_SPKM3 is not set
703# CONFIG_SMB_FS is not set
704# CONFIG_CIFS is not set
705# CONFIG_NCP_FS is not set
706# CONFIG_CODA_FS is not set
707# CONFIG_AFS_FS is not set
708
709#
710# Partition Types
711#
712CONFIG_PARTITION_ADVANCED=y
713# CONFIG_ACORN_PARTITION is not set
714# CONFIG_OSF_PARTITION is not set
715# CONFIG_AMIGA_PARTITION is not set
716# CONFIG_ATARI_PARTITION is not set
717# CONFIG_MAC_PARTITION is not set
718# CONFIG_MSDOS_PARTITION is not set
719# CONFIG_LDM_PARTITION is not set
720# CONFIG_SGI_PARTITION is not set
721# CONFIG_ULTRIX_PARTITION is not set
722# CONFIG_SUN_PARTITION is not set
723# CONFIG_EFI_PARTITION is not set
724
725#
726# Native Language Support
727#
728# CONFIG_NLS is not set
729# CONFIG_SCC_ENET is not set
730# CONFIG_FEC_ENET is not set
731
732#
733# CPM2 Options
734#
735
736#
737# Library routines
738#
739# CONFIG_CRC_CCITT is not set
740CONFIG_CRC32=y
741# CONFIG_LIBCRC32C is not set
742
743#
744# Profiling support
745#
746# CONFIG_PROFILING is not set
747
748#
749# Kernel hacking
750#
751# CONFIG_PRINTK_TIME is not set
752# CONFIG_DEBUG_KERNEL is not set
753CONFIG_LOG_BUF_SHIFT=14
754# CONFIG_KGDB_CONSOLE is not set
755
756#
757# Security options
758#
759# CONFIG_KEYS is not set
760# CONFIG_SECURITY is not set
761
762#
763# Cryptographic options
764#
765# CONFIG_CRYPTO is not set
766
767#
768# Hardware crypto devices
769#
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
index 6b4f022111e7..7b739054968f 100644
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -4,7 +4,6 @@
4extra-$(CONFIG_PPC_STD_MMU) := head.o 4extra-$(CONFIG_PPC_STD_MMU) := head.o
5extra-$(CONFIG_40x) := head_4xx.o 5extra-$(CONFIG_40x) := head_4xx.o
6extra-$(CONFIG_44x) := head_44x.o 6extra-$(CONFIG_44x) := head_44x.o
7extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o
8extra-$(CONFIG_8xx) := head_8xx.o 7extra-$(CONFIG_8xx) := head_8xx.o
9extra-y += vmlinux.lds 8extra-y += vmlinux.lds
10 9
@@ -13,7 +12,6 @@ obj-y := entry.o traps.o time.o misc.o \
13 ppc_htab.o 12 ppc_htab.o
14obj-$(CONFIG_MODULES) += ppc_ksyms.o 13obj-$(CONFIG_MODULES) += ppc_ksyms.o
15obj-$(CONFIG_PCI) += pci.o 14obj-$(CONFIG_PCI) += pci.o
16obj-$(CONFIG_RAPIDIO) += rio.o
17obj-$(CONFIG_KGDB) += ppc-stub.o 15obj-$(CONFIG_KGDB) += ppc-stub.o
18obj-$(CONFIG_SMP) += smp.o smp-tbsync.o 16obj-$(CONFIG_SMP) += smp.o smp-tbsync.o
19obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 17obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c
index e8e94321b59e..a51a17714231 100644
--- a/arch/ppc/kernel/asm-offsets.c
+++ b/arch/ppc/kernel/asm-offsets.c
@@ -54,12 +54,6 @@ main(void)
54 DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr)); 54 DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr));
55 DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr)); 55 DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr));
56#endif /* CONFIG_ALTIVEC */ 56#endif /* CONFIG_ALTIVEC */
57#ifdef CONFIG_SPE
58 DEFINE(THREAD_EVR0, offsetof(struct thread_struct, evr[0]));
59 DEFINE(THREAD_ACC, offsetof(struct thread_struct, acc));
60 DEFINE(THREAD_SPEFSCR, offsetof(struct thread_struct, spefscr));
61 DEFINE(THREAD_USED_SPE, offsetof(struct thread_struct, used_spe));
62#endif /* CONFIG_SPE */
63 /* Interrupt register frame */ 57 /* Interrupt register frame */
64 DEFINE(STACK_FRAME_OVERHEAD, STACK_FRAME_OVERHEAD); 58 DEFINE(STACK_FRAME_OVERHEAD, STACK_FRAME_OVERHEAD);
65 DEFINE(INT_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs)); 59 DEFINE(INT_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs));
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
index 59e77eb63338..5f3a5d068a5c 100644
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -519,12 +519,7 @@ BEGIN_FTR_SECTION
519 stw r12,THREAD+THREAD_VRSAVE(r2) 519 stw r12,THREAD+THREAD_VRSAVE(r2)
520END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 520END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
521#endif /* CONFIG_ALTIVEC */ 521#endif /* CONFIG_ALTIVEC */
522#ifdef CONFIG_SPE 522 and. r0,r0,r11 /* FP or altivec enabled? */
523 oris r0,r0,MSR_SPE@h /* Disable SPE */
524 mfspr r12,SPRN_SPEFSCR /* save spefscr register value */
525 stw r12,THREAD+THREAD_SPEFSCR(r2)
526#endif /* CONFIG_SPE */
527 and. r0,r0,r11 /* FP or altivec or SPE enabled? */
528 beq+ 1f 523 beq+ 1f
529 andc r11,r11,r0 524 andc r11,r11,r0
530 MTMSRD(r11) 525 MTMSRD(r11)
@@ -557,11 +552,6 @@ BEGIN_FTR_SECTION
557 mtspr SPRN_VRSAVE,r0 /* if G4, restore VRSAVE reg */ 552 mtspr SPRN_VRSAVE,r0 /* if G4, restore VRSAVE reg */
558END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 553END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
559#endif /* CONFIG_ALTIVEC */ 554#endif /* CONFIG_ALTIVEC */
560#ifdef CONFIG_SPE
561 lwz r0,THREAD+THREAD_SPEFSCR(r2)
562 mtspr SPRN_SPEFSCR,r0 /* restore SPEFSCR reg */
563#endif /* CONFIG_SPE */
564
565 lwz r0,_CCR(r1) 555 lwz r0,_CCR(r1)
566 mtcrf 0xFF,r0 556 mtcrf 0xFF,r0
567 /* r3-r12 are destroyed -- Cort */ 557 /* r3-r12 are destroyed -- Cort */
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S
index 75bbc937ed73..ebb5a403829f 100644
--- a/arch/ppc/kernel/head_44x.S
+++ b/arch/ppc/kernel/head_44x.S
@@ -195,7 +195,7 @@ skpinv: addi r4,r4,1 /* Increment */
195 li r5,0 195 li r5,0
196 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G) 196 ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G)
197 197
198 li r0,0 /* TLB slot 0 */ 198 li r0,62 /* TLB slot 62 */
199 199
200 tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ 200 tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */
201 tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */ 201 tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */
diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h
index f3d274c6b231..166d597b6db2 100644
--- a/arch/ppc/kernel/head_booke.h
+++ b/arch/ppc/kernel/head_booke.h
@@ -212,60 +212,6 @@ label:
212 * save (and later restore) the MSR via SPRN_CSRR1, which will still have 212 * save (and later restore) the MSR via SPRN_CSRR1, which will still have
213 * the MSR_DE bit set. 213 * the MSR_DE bit set.
214 */ 214 */
215#ifdef CONFIG_E200
216#define DEBUG_EXCEPTION \
217 START_EXCEPTION(Debug); \
218 DEBUG_EXCEPTION_PROLOG; \
219 \
220 /* \
221 * If there is a single step or branch-taken exception in an \
222 * exception entry sequence, it was probably meant to apply to \
223 * the code where the exception occurred (since exception entry \
224 * doesn't turn off DE automatically). We simulate the effect \
225 * of turning off DE on entry to an exception handler by turning \
226 * off DE in the CSRR1 value and clearing the debug status. \
227 */ \
228 mfspr r10,SPRN_DBSR; /* check single-step/branch taken */ \
229 andis. r10,r10,DBSR_IC@h; \
230 beq+ 2f; \
231 \
232 lis r10,KERNELBASE@h; /* check if exception in vectors */ \
233 ori r10,r10,KERNELBASE@l; \
234 cmplw r12,r10; \
235 blt+ 2f; /* addr below exception vectors */ \
236 \
237 lis r10,Debug@h; \
238 ori r10,r10,Debug@l; \
239 cmplw r12,r10; \
240 bgt+ 2f; /* addr above exception vectors */ \
241 \
242 /* here it looks like we got an inappropriate debug exception. */ \
2431: rlwinm r9,r9,0,~MSR_DE; /* clear DE in the CDRR1 value */ \
244 lis r10,DBSR_IC@h; /* clear the IC event */ \
245 mtspr SPRN_DBSR,r10; \
246 /* restore state and get out */ \
247 lwz r10,_CCR(r11); \
248 lwz r0,GPR0(r11); \
249 lwz r1,GPR1(r11); \
250 mtcrf 0x80,r10; \
251 mtspr SPRN_DSRR0,r12; \
252 mtspr SPRN_DSRR1,r9; \
253 lwz r9,GPR9(r11); \
254 lwz r12,GPR12(r11); \
255 mtspr DEBUG_SPRG,r8; \
256 BOOKE_LOAD_EXC_LEVEL_STACK(DEBUG); /* r8 points to the debug stack */ \
257 lwz r10,GPR10-INT_FRAME_SIZE(r8); \
258 lwz r11,GPR11-INT_FRAME_SIZE(r8); \
259 mfspr r8,DEBUG_SPRG; \
260 \
261 RFDI; \
262 b .; \
263 \
264 /* continue normal handling for a critical exception... */ \
2652: mfspr r4,SPRN_DBSR; \
266 addi r3,r1,STACK_FRAME_OVERHEAD; \
267 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
268#else
269#define DEBUG_EXCEPTION \ 215#define DEBUG_EXCEPTION \
270 START_EXCEPTION(Debug); \ 216 START_EXCEPTION(Debug); \
271 CRITICAL_EXCEPTION_PROLOG; \ 217 CRITICAL_EXCEPTION_PROLOG; \
@@ -318,7 +264,6 @@ label:
3182: mfspr r4,SPRN_DBSR; \ 2642: mfspr r4,SPRN_DBSR; \
319 addi r3,r1,STACK_FRAME_OVERHEAD; \ 265 addi r3,r1,STACK_FRAME_OVERHEAD; \
320 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc) 266 EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
321#endif
322 267
323#define INSTRUCTION_STORAGE_EXCEPTION \ 268#define INSTRUCTION_STORAGE_EXCEPTION \
324 START_EXCEPTION(InstructionStorage) \ 269 START_EXCEPTION(InstructionStorage) \
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
deleted file mode 100644
index 1f155d399d57..000000000000
--- a/arch/ppc/kernel/head_fsl_booke.S
+++ /dev/null
@@ -1,1065 +0,0 @@
1/*
2 * Kernel execution entry point code.
3 *
4 * Copyright (c) 1995-1996 Gary Thomas <gdt@linuxppc.org>
5 * Initial PowerPC version.
6 * Copyright (c) 1996 Cort Dougan <cort@cs.nmt.edu>
7 * Rewritten for PReP
8 * Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
9 * Low-level exception handers, MMU support, and rewrite.
10 * Copyright (c) 1997 Dan Malek <dmalek@jlc.net>
11 * PowerPC 8xx modifications.
12 * Copyright (c) 1998-1999 TiVo, Inc.
13 * PowerPC 403GCX modifications.
14 * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
15 * PowerPC 403GCX/405GP modifications.
16 * Copyright 2000 MontaVista Software Inc.
17 * PPC405 modifications
18 * PowerPC 403GCX/405GP modifications.
19 * Author: MontaVista Software, Inc.
20 * frank_rowand@mvista.com or source@mvista.com
21 * debbie_chu@mvista.com
22 * Copyright 2002-2004 MontaVista Software, Inc.
23 * PowerPC 44x support, Matt Porter <mporter@kernel.crashing.org>
24 * Copyright 2004 Freescale Semiconductor, Inc
25 * PowerPC e500 modifications, Kumar Gala <galak@kernel.crashing.org>
26 *
27 * This program is free software; you can redistribute it and/or modify it
28 * under the terms of the GNU General Public License as published by the
29 * Free Software Foundation; either version 2 of the License, or (at your
30 * option) any later version.
31 */
32
33#include <linux/threads.h>
34#include <asm/processor.h>
35#include <asm/page.h>
36#include <asm/mmu.h>
37#include <asm/pgtable.h>
38#include <asm/cputable.h>
39#include <asm/thread_info.h>
40#include <asm/ppc_asm.h>
41#include <asm/asm-offsets.h>
42#include "head_booke.h"
43
44/* As with the other PowerPC ports, it is expected that when code
45 * execution begins here, the following registers contain valid, yet
46 * optional, information:
47 *
48 * r3 - Board info structure pointer (DRAM, frequency, MAC address, etc.)
49 * r4 - Starting address of the init RAM disk
50 * r5 - Ending address of the init RAM disk
51 * r6 - Start of kernel command line string (e.g. "mem=128")
52 * r7 - End of kernel command line string
53 *
54 */
55 .text
56_GLOBAL(_stext)
57_GLOBAL(_start)
58 /*
59 * Reserve a word at a fixed location to store the address
60 * of abatron_pteptrs
61 */
62 nop
63/*
64 * Save parameters we are passed
65 */
66 mr r31,r3
67 mr r30,r4
68 mr r29,r5
69 mr r28,r6
70 mr r27,r7
71 li r24,0 /* CPU number */
72
73/* We try to not make any assumptions about how the boot loader
74 * setup or used the TLBs. We invalidate all mappings from the
75 * boot loader and load a single entry in TLB1[0] to map the
76 * first 16M of kernel memory. Any boot info passed from the
77 * bootloader needs to live in this first 16M.
78 *
79 * Requirement on bootloader:
80 * - The page we're executing in needs to reside in TLB1 and
81 * have IPROT=1. If not an invalidate broadcast could
82 * evict the entry we're currently executing in.
83 *
84 * r3 = Index of TLB1 were executing in
85 * r4 = Current MSR[IS]
86 * r5 = Index of TLB1 temp mapping
87 *
88 * Later in mapin_ram we will correctly map lowmem, and resize TLB1[0]
89 * if needed
90 */
91
92/* 1. Find the index of the entry we're executing in */
93 bl invstr /* Find our address */
94invstr: mflr r6 /* Make it accessible */
95 mfmsr r7
96 rlwinm r4,r7,27,31,31 /* extract MSR[IS] */
97 mfspr r7, SPRN_PID0
98 slwi r7,r7,16
99 or r7,r7,r4
100 mtspr SPRN_MAS6,r7
101 tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
102#ifndef CONFIG_E200
103 mfspr r7,SPRN_MAS1
104 andis. r7,r7,MAS1_VALID@h
105 bne match_TLB
106 mfspr r7,SPRN_PID1
107 slwi r7,r7,16
108 or r7,r7,r4
109 mtspr SPRN_MAS6,r7
110 tlbsx 0,r6 /* search MSR[IS], SPID=PID1 */
111 mfspr r7,SPRN_MAS1
112 andis. r7,r7,MAS1_VALID@h
113 bne match_TLB
114 mfspr r7, SPRN_PID2
115 slwi r7,r7,16
116 or r7,r7,r4
117 mtspr SPRN_MAS6,r7
118 tlbsx 0,r6 /* Fall through, we had to match */
119#endif
120match_TLB:
121 mfspr r7,SPRN_MAS0
122 rlwinm r3,r7,16,20,31 /* Extract MAS0(Entry) */
123
124 mfspr r7,SPRN_MAS1 /* Insure IPROT set */
125 oris r7,r7,MAS1_IPROT@h
126 mtspr SPRN_MAS1,r7
127 tlbwe
128
129/* 2. Invalidate all entries except the entry we're executing in */
130 mfspr r9,SPRN_TLB1CFG
131 andi. r9,r9,0xfff
132 li r6,0 /* Set Entry counter to 0 */
1331: lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
134 rlwimi r7,r6,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r6) */
135 mtspr SPRN_MAS0,r7
136 tlbre
137 mfspr r7,SPRN_MAS1
138 rlwinm r7,r7,0,2,31 /* Clear MAS1 Valid and IPROT */
139 cmpw r3,r6
140 beq skpinv /* Dont update the current execution TLB */
141 mtspr SPRN_MAS1,r7
142 tlbwe
143 isync
144skpinv: addi r6,r6,1 /* Increment */
145 cmpw r6,r9 /* Are we done? */
146 bne 1b /* If not, repeat */
147
148 /* Invalidate TLB0 */
149 li r6,0x04
150 tlbivax 0,r6
151#ifdef CONFIG_SMP
152 tlbsync
153#endif
154 /* Invalidate TLB1 */
155 li r6,0x0c
156 tlbivax 0,r6
157#ifdef CONFIG_SMP
158 tlbsync
159#endif
160 msync
161
162/* 3. Setup a temp mapping and jump to it */
163 andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */
164 addi r5, r5, 0x1
165 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
166 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
167 mtspr SPRN_MAS0,r7
168 tlbre
169
170 /* Just modify the entry ID and EPN for the temp mapping */
171 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
172 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
173 mtspr SPRN_MAS0,r7
174 xori r6,r4,1 /* Setup TMP mapping in the other Address space */
175 slwi r6,r6,12
176 oris r6,r6,(MAS1_VALID|MAS1_IPROT)@h
177 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_4K))@l
178 mtspr SPRN_MAS1,r6
179 mfspr r6,SPRN_MAS2
180 li r7,0 /* temp EPN = 0 */
181 rlwimi r7,r6,0,20,31
182 mtspr SPRN_MAS2,r7
183 tlbwe
184
185 xori r6,r4,1
186 slwi r6,r6,5 /* setup new context with other address space */
187 bl 1f /* Find our address */
1881: mflr r9
189 rlwimi r7,r9,0,20,31
190 addi r7,r7,24
191 mtspr SPRN_SRR0,r7
192 mtspr SPRN_SRR1,r6
193 rfi
194
195/* 4. Clear out PIDs & Search info */
196 li r6,0
197 mtspr SPRN_PID0,r6
198#ifndef CONFIG_E200
199 mtspr SPRN_PID1,r6
200 mtspr SPRN_PID2,r6
201#endif
202 mtspr SPRN_MAS6,r6
203
204/* 5. Invalidate mapping we started in */
205 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
206 rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
207 mtspr SPRN_MAS0,r7
208 tlbre
209 mfspr r6,SPRN_MAS1
210 rlwinm r6,r6,0,2,0 /* clear IPROT */
211 mtspr SPRN_MAS1,r6
212 tlbwe
213 /* Invalidate TLB1 */
214 li r9,0x0c
215 tlbivax 0,r9
216#ifdef CONFIG_SMP
217 tlbsync
218#endif
219 msync
220
221/* 6. Setup KERNELBASE mapping in TLB1[0] */
222 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
223 mtspr SPRN_MAS0,r6
224 lis r6,(MAS1_VALID|MAS1_IPROT)@h
225 ori r6,r6,(MAS1_TSIZE(BOOKE_PAGESZ_16M))@l
226 mtspr SPRN_MAS1,r6
227 li r7,0
228 lis r6,KERNELBASE@h
229 ori r6,r6,KERNELBASE@l
230 rlwimi r6,r7,0,20,31
231 mtspr SPRN_MAS2,r6
232 li r7,(MAS3_SX|MAS3_SW|MAS3_SR)
233 mtspr SPRN_MAS3,r7
234 tlbwe
235
236/* 7. Jump to KERNELBASE mapping */
237 lis r7,MSR_KERNEL@h
238 ori r7,r7,MSR_KERNEL@l
239 bl 1f /* Find our address */
2401: mflr r9
241 rlwimi r6,r9,0,20,31
242 addi r6,r6,24
243 mtspr SPRN_SRR0,r6
244 mtspr SPRN_SRR1,r7
245 rfi /* start execution out of TLB1[0] entry */
246
247/* 8. Clear out the temp mapping */
248 lis r7,0x1000 /* Set MAS0(TLBSEL) = 1 */
249 rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
250 mtspr SPRN_MAS0,r7
251 tlbre
252 mfspr r8,SPRN_MAS1
253 rlwinm r8,r8,0,2,0 /* clear IPROT */
254 mtspr SPRN_MAS1,r8
255 tlbwe
256 /* Invalidate TLB1 */
257 li r9,0x0c
258 tlbivax 0,r9
259#ifdef CONFIG_SMP
260 tlbsync
261#endif
262 msync
263
264 /* Establish the interrupt vector offsets */
265 SET_IVOR(0, CriticalInput);
266 SET_IVOR(1, MachineCheck);
267 SET_IVOR(2, DataStorage);
268 SET_IVOR(3, InstructionStorage);
269 SET_IVOR(4, ExternalInput);
270 SET_IVOR(5, Alignment);
271 SET_IVOR(6, Program);
272 SET_IVOR(7, FloatingPointUnavailable);
273 SET_IVOR(8, SystemCall);
274 SET_IVOR(9, AuxillaryProcessorUnavailable);
275 SET_IVOR(10, Decrementer);
276 SET_IVOR(11, FixedIntervalTimer);
277 SET_IVOR(12, WatchdogTimer);
278 SET_IVOR(13, DataTLBError);
279 SET_IVOR(14, InstructionTLBError);
280 SET_IVOR(15, Debug);
281 SET_IVOR(32, SPEUnavailable);
282 SET_IVOR(33, SPEFloatingPointData);
283 SET_IVOR(34, SPEFloatingPointRound);
284#ifndef CONFIG_E200
285 SET_IVOR(35, PerformanceMonitor);
286#endif
287
288 /* Establish the interrupt vector base */
289 lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
290 mtspr SPRN_IVPR,r4
291
292 /* Setup the defaults for TLB entries */
293 li r2,(MAS4_TSIZED(BOOKE_PAGESZ_4K))@l
294#ifdef CONFIG_E200
295 oris r2,r2,MAS4_TLBSELD(1)@h
296#endif
297 mtspr SPRN_MAS4, r2
298
299#if 0
300 /* Enable DOZE */
301 mfspr r2,SPRN_HID0
302 oris r2,r2,HID0_DOZE@h
303 mtspr SPRN_HID0, r2
304#endif
305#ifdef CONFIG_E200
306 /* enable dedicated debug exception handling resources (Debug APU) */
307 mfspr r2,SPRN_HID0
308 ori r2,r2,HID0_DAPUEN@l
309 mtspr SPRN_HID0,r2
310#endif
311
312#if !defined(CONFIG_BDI_SWITCH)
313 /*
314 * The Abatron BDI JTAG debugger does not tolerate others
315 * mucking with the debug registers.
316 */
317 lis r2,DBCR0_IDM@h
318 mtspr SPRN_DBCR0,r2
319 isync
320 /* clear any residual debug events */
321 li r2,-1
322 mtspr SPRN_DBSR,r2
323#endif
324
325 /*
326 * This is where the main kernel code starts.
327 */
328
329 /* ptr to current */
330 lis r2,init_task@h
331 ori r2,r2,init_task@l
332
333 /* ptr to current thread */
334 addi r4,r2,THREAD /* init task's THREAD */
335 mtspr SPRN_SPRG3,r4
336
337 /* stack */
338 lis r1,init_thread_union@h
339 ori r1,r1,init_thread_union@l
340 li r0,0
341 stwu r0,THREAD_SIZE-STACK_FRAME_OVERHEAD(r1)
342
343 bl early_init
344
345 mfspr r3,SPRN_TLB1CFG
346 andi. r3,r3,0xfff
347 lis r4,num_tlbcam_entries@ha
348 stw r3,num_tlbcam_entries@l(r4)
349/*
350 * Decide what sort of machine this is and initialize the MMU.
351 */
352 mr r3,r31
353 mr r4,r30
354 mr r5,r29
355 mr r6,r28
356 mr r7,r27
357 bl machine_init
358 bl MMU_init
359
360 /* Setup PTE pointers for the Abatron bdiGDB */
361 lis r6, swapper_pg_dir@h
362 ori r6, r6, swapper_pg_dir@l
363 lis r5, abatron_pteptrs@h
364 ori r5, r5, abatron_pteptrs@l
365 lis r4, KERNELBASE@h
366 ori r4, r4, KERNELBASE@l
367 stw r5, 0(r4) /* Save abatron_pteptrs at a fixed location */
368 stw r6, 0(r5)
369
370 /* Let's move on */
371 lis r4,start_kernel@h
372 ori r4,r4,start_kernel@l
373 lis r3,MSR_KERNEL@h
374 ori r3,r3,MSR_KERNEL@l
375 mtspr SPRN_SRR0,r4
376 mtspr SPRN_SRR1,r3
377 rfi /* change context and jump to start_kernel */
378
379/* Macros to hide the PTE size differences
380 *
381 * FIND_PTE -- walks the page tables given EA & pgdir pointer
382 * r10 -- EA of fault
383 * r11 -- PGDIR pointer
384 * r12 -- free
385 * label 2: is the bailout case
386 *
387 * if we find the pte (fall through):
388 * r11 is low pte word
389 * r12 is pointer to the pte
390 */
391#ifdef CONFIG_PTE_64BIT
392#define PTE_FLAGS_OFFSET 4
393#define FIND_PTE \
394 rlwinm r12, r10, 13, 19, 29; /* Compute pgdir/pmd offset */ \
395 lwzx r11, r12, r11; /* Get pgd/pmd entry */ \
396 rlwinm. r12, r11, 0, 0, 20; /* Extract pt base address */ \
397 beq 2f; /* Bail if no table */ \
398 rlwimi r12, r10, 23, 20, 28; /* Compute pte address */ \
399 lwz r11, 4(r12); /* Get pte entry */
400#else
401#define PTE_FLAGS_OFFSET 0
402#define FIND_PTE \
403 rlwimi r11, r10, 12, 20, 29; /* Create L1 (pgdir/pmd) address */ \
404 lwz r11, 0(r11); /* Get L1 entry */ \
405 rlwinm. r12, r11, 0, 0, 19; /* Extract L2 (pte) base address */ \
406 beq 2f; /* Bail if no table */ \
407 rlwimi r12, r10, 22, 20, 29; /* Compute PTE address */ \
408 lwz r11, 0(r12); /* Get Linux PTE */
409#endif
410
411/*
412 * Interrupt vector entry code
413 *
414 * The Book E MMUs are always on so we don't need to handle
415 * interrupts in real mode as with previous PPC processors. In
416 * this case we handle interrupts in the kernel virtual address
417 * space.
418 *
419 * Interrupt vectors are dynamically placed relative to the
420 * interrupt prefix as determined by the address of interrupt_base.
421 * The interrupt vectors offsets are programmed using the labels
422 * for each interrupt vector entry.
423 *
424 * Interrupt vectors must be aligned on a 16 byte boundary.
425 * We align on a 32 byte cache line boundary for good measure.
426 */
427
428interrupt_base:
429 /* Critical Input Interrupt */
430 CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception)
431
432 /* Machine Check Interrupt */
433#ifdef CONFIG_E200
434 /* no RFMCI, MCSRRs on E200 */
435 CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
436#else
437 MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception)
438#endif
439
440 /* Data Storage Interrupt */
441 START_EXCEPTION(DataStorage)
442 mtspr SPRN_SPRG0, r10 /* Save some working registers */
443 mtspr SPRN_SPRG1, r11
444 mtspr SPRN_SPRG4W, r12
445 mtspr SPRN_SPRG5W, r13
446 mfcr r11
447 mtspr SPRN_SPRG7W, r11
448
449 /*
450 * Check if it was a store fault, if not then bail
451 * because a user tried to access a kernel or
452 * read-protected page. Otherwise, get the
453 * offending address and handle it.
454 */
455 mfspr r10, SPRN_ESR
456 andis. r10, r10, ESR_ST@h
457 beq 2f
458
459 mfspr r10, SPRN_DEAR /* Get faulting address */
460
461 /* If we are faulting a kernel address, we have to use the
462 * kernel page tables.
463 */
464 lis r11, TASK_SIZE@h
465 ori r11, r11, TASK_SIZE@l
466 cmplw 0, r10, r11
467 bge 2f
468
469 /* Get the PGD for the current thread */
4703:
471 mfspr r11,SPRN_SPRG3
472 lwz r11,PGDIR(r11)
4734:
474 FIND_PTE
475
476 /* Are _PAGE_USER & _PAGE_RW set & _PAGE_HWWRITE not? */
477 andi. r13, r11, _PAGE_RW|_PAGE_USER|_PAGE_HWWRITE
478 cmpwi 0, r13, _PAGE_RW|_PAGE_USER
479 bne 2f /* Bail if not */
480
481 /* Update 'changed'. */
482 ori r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
483 stw r11, PTE_FLAGS_OFFSET(r12) /* Update Linux page table */
484
485 /* MAS2 not updated as the entry does exist in the tlb, this
486 fault taken to detect state transition (eg: COW -> DIRTY)
487 */
488 andi. r11, r11, _PAGE_HWEXEC
489 rlwimi r11, r11, 31, 27, 27 /* SX <- _PAGE_HWEXEC */
490 ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */
491
492 /* update search PID in MAS6, AS = 0 */
493 mfspr r12, SPRN_PID0
494 slwi r12, r12, 16
495 mtspr SPRN_MAS6, r12
496
497 /* find the TLB index that caused the fault. It has to be here. */
498 tlbsx 0, r10
499
500 /* only update the perm bits, assume the RPN is fine */
501 mfspr r12, SPRN_MAS3
502 rlwimi r12, r11, 0, 20, 31
503 mtspr SPRN_MAS3,r12
504 tlbwe
505
506 /* Done...restore registers and get out of here. */
507 mfspr r11, SPRN_SPRG7R
508 mtcr r11
509 mfspr r13, SPRN_SPRG5R
510 mfspr r12, SPRN_SPRG4R
511 mfspr r11, SPRN_SPRG1
512 mfspr r10, SPRN_SPRG0
513 rfi /* Force context change */
514
5152:
516 /*
517 * The bailout. Restore registers to pre-exception conditions
518 * and call the heavyweights to help us out.
519 */
520 mfspr r11, SPRN_SPRG7R
521 mtcr r11
522 mfspr r13, SPRN_SPRG5R
523 mfspr r12, SPRN_SPRG4R
524 mfspr r11, SPRN_SPRG1
525 mfspr r10, SPRN_SPRG0
526 b data_access
527
528 /* Instruction Storage Interrupt */
529 INSTRUCTION_STORAGE_EXCEPTION
530
531 /* External Input Interrupt */
532 EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE)
533
534 /* Alignment Interrupt */
535 ALIGNMENT_EXCEPTION
536
537 /* Program Interrupt */
538 PROGRAM_EXCEPTION
539
540 /* Floating Point Unavailable Interrupt */
541#ifdef CONFIG_PPC_FPU
542 FP_UNAVAILABLE_EXCEPTION
543#else
544#ifdef CONFIG_E200
545 /* E200 treats 'normal' floating point instructions as FP Unavail exception */
546 EXCEPTION(0x0800, FloatingPointUnavailable, program_check_exception, EXC_XFER_EE)
547#else
548 EXCEPTION(0x0800, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE)
549#endif
550#endif
551
552 /* System Call Interrupt */
553 START_EXCEPTION(SystemCall)
554 NORMAL_EXCEPTION_PROLOG
555 EXC_XFER_EE_LITE(0x0c00, DoSyscall)
556
557 /* Auxillary Processor Unavailable Interrupt */
558 EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE)
559
560 /* Decrementer Interrupt */
561 DECREMENTER_EXCEPTION
562
563 /* Fixed Internal Timer Interrupt */
564 /* TODO: Add FIT support */
565 EXCEPTION(0x3100, FixedIntervalTimer, unknown_exception, EXC_XFER_EE)
566
567 /* Watchdog Timer Interrupt */
568#ifdef CONFIG_BOOKE_WDT
569 CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException)
570#else
571 CRITICAL_EXCEPTION(0x3200, WatchdogTimer, unknown_exception)
572#endif
573
574 /* Data TLB Error Interrupt */
575 START_EXCEPTION(DataTLBError)
576 mtspr SPRN_SPRG0, r10 /* Save some working registers */
577 mtspr SPRN_SPRG1, r11
578 mtspr SPRN_SPRG4W, r12
579 mtspr SPRN_SPRG5W, r13
580 mfcr r11
581 mtspr SPRN_SPRG7W, r11
582 mfspr r10, SPRN_DEAR /* Get faulting address */
583
584 /* If we are faulting a kernel address, we have to use the
585 * kernel page tables.
586 */
587 lis r11, TASK_SIZE@h
588 ori r11, r11, TASK_SIZE@l
589 cmplw 5, r10, r11
590 blt 5, 3f
591 lis r11, swapper_pg_dir@h
592 ori r11, r11, swapper_pg_dir@l
593
594 mfspr r12,SPRN_MAS1 /* Set TID to 0 */
595 rlwinm r12,r12,0,16,1
596 mtspr SPRN_MAS1,r12
597
598 b 4f
599
600 /* Get the PGD for the current thread */
6013:
602 mfspr r11,SPRN_SPRG3
603 lwz r11,PGDIR(r11)
604
6054:
606 FIND_PTE
607 andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
608 beq 2f /* Bail if not present */
609
610#ifdef CONFIG_PTE_64BIT
611 lwz r13, 0(r12)
612#endif
613 ori r11, r11, _PAGE_ACCESSED
614 stw r11, PTE_FLAGS_OFFSET(r12)
615
616 /* Jump to common tlb load */
617 b finish_tlb_load
6182:
619 /* The bailout. Restore registers to pre-exception conditions
620 * and call the heavyweights to help us out.
621 */
622 mfspr r11, SPRN_SPRG7R
623 mtcr r11
624 mfspr r13, SPRN_SPRG5R
625 mfspr r12, SPRN_SPRG4R
626 mfspr r11, SPRN_SPRG1
627 mfspr r10, SPRN_SPRG0
628 b data_access
629
630 /* Instruction TLB Error Interrupt */
631 /*
632 * Nearly the same as above, except we get our
633 * information from different registers and bailout
634 * to a different point.
635 */
636 START_EXCEPTION(InstructionTLBError)
637 mtspr SPRN_SPRG0, r10 /* Save some working registers */
638 mtspr SPRN_SPRG1, r11
639 mtspr SPRN_SPRG4W, r12
640 mtspr SPRN_SPRG5W, r13
641 mfcr r11
642 mtspr SPRN_SPRG7W, r11
643 mfspr r10, SPRN_SRR0 /* Get faulting address */
644
645 /* If we are faulting a kernel address, we have to use the
646 * kernel page tables.
647 */
648 lis r11, TASK_SIZE@h
649 ori r11, r11, TASK_SIZE@l
650 cmplw 5, r10, r11
651 blt 5, 3f
652 lis r11, swapper_pg_dir@h
653 ori r11, r11, swapper_pg_dir@l
654
655 mfspr r12,SPRN_MAS1 /* Set TID to 0 */
656 rlwinm r12,r12,0,16,1
657 mtspr SPRN_MAS1,r12
658
659 b 4f
660
661 /* Get the PGD for the current thread */
6623:
663 mfspr r11,SPRN_SPRG3
664 lwz r11,PGDIR(r11)
665
6664:
667 FIND_PTE
668 andi. r13, r11, _PAGE_PRESENT /* Is the page present? */
669 beq 2f /* Bail if not present */
670
671#ifdef CONFIG_PTE_64BIT
672 lwz r13, 0(r12)
673#endif
674 ori r11, r11, _PAGE_ACCESSED
675 stw r11, PTE_FLAGS_OFFSET(r12)
676
677 /* Jump to common TLB load point */
678 b finish_tlb_load
679
6802:
681 /* The bailout. Restore registers to pre-exception conditions
682 * and call the heavyweights to help us out.
683 */
684 mfspr r11, SPRN_SPRG7R
685 mtcr r11
686 mfspr r13, SPRN_SPRG5R
687 mfspr r12, SPRN_SPRG4R
688 mfspr r11, SPRN_SPRG1
689 mfspr r10, SPRN_SPRG0
690 b InstructionStorage
691
692#ifdef CONFIG_SPE
693 /* SPE Unavailable */
694 START_EXCEPTION(SPEUnavailable)
695 NORMAL_EXCEPTION_PROLOG
696 bne load_up_spe
697 addi r3,r1,STACK_FRAME_OVERHEAD
698 EXC_XFER_EE_LITE(0x2010, KernelSPE)
699#else
700 EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE)
701#endif /* CONFIG_SPE */
702
703 /* SPE Floating Point Data */
704#ifdef CONFIG_SPE
705 EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE);
706#else
707 EXCEPTION(0x2040, SPEFloatingPointData, unknown_exception, EXC_XFER_EE)
708#endif /* CONFIG_SPE */
709
710 /* SPE Floating Point Round */
711 EXCEPTION(0x2050, SPEFloatingPointRound, unknown_exception, EXC_XFER_EE)
712
713 /* Performance Monitor */
714 EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD)
715
716
717 /* Debug Interrupt */
718 DEBUG_EXCEPTION
719
720/*
721 * Local functions
722 */
723
724 /*
725 * Data TLB exceptions will bail out to this point
726 * if they can't resolve the lightweight TLB fault.
727 */
728data_access:
729 NORMAL_EXCEPTION_PROLOG
730 mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */
731 stw r5,_ESR(r11)
732 mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */
733 andis. r10,r5,(ESR_ILK|ESR_DLK)@h
734 bne 1f
735 EXC_XFER_EE_LITE(0x0300, handle_page_fault)
7361:
737 addi r3,r1,STACK_FRAME_OVERHEAD
738 EXC_XFER_EE_LITE(0x0300, CacheLockingException)
739
740/*
741
742 * Both the instruction and data TLB miss get to this
743 * point to load the TLB.
744 * r10 - EA of fault
745 * r11 - TLB (info from Linux PTE)
746 * r12, r13 - available to use
747 * CR5 - results of addr < TASK_SIZE
748 * MAS0, MAS1 - loaded with proper value when we get here
749 * MAS2, MAS3 - will need additional info from Linux PTE
750 * Upon exit, we reload everything and RFI.
751 */
752finish_tlb_load:
753 /*
754 * We set execute, because we don't have the granularity to
755 * properly set this at the page level (Linux problem).
756 * Many of these bits are software only. Bits we don't set
757 * here we (properly should) assume have the appropriate value.
758 */
759
760 mfspr r12, SPRN_MAS2
761#ifdef CONFIG_PTE_64BIT
762 rlwimi r12, r11, 26, 24, 31 /* extract ...WIMGE from pte */
763#else
764 rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */
765#endif
766 mtspr SPRN_MAS2, r12
767
768 bge 5, 1f
769
770 /* is user addr */
771 andi. r12, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC)
772 andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */
773 srwi r10, r12, 1
774 or r12, r12, r10 /* Copy user perms into supervisor */
775 iseleq r12, 0, r12
776 b 2f
777
778 /* is kernel addr */
7791: rlwinm r12, r11, 31, 29, 29 /* Extract _PAGE_HWWRITE into SW */
780 ori r12, r12, (MAS3_SX | MAS3_SR)
781
782#ifdef CONFIG_PTE_64BIT
7832: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */
784 rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */
785 mtspr SPRN_MAS3, r12
786BEGIN_FTR_SECTION
787 srwi r10, r13, 8 /* grab RPN[8:31] */
788 mtspr SPRN_MAS7, r10
789END_FTR_SECTION_IFSET(CPU_FTR_BIG_PHYS)
790#else
7912: rlwimi r11, r12, 0, 20, 31 /* Extract RPN from PTE and merge with perms */
792 mtspr SPRN_MAS3, r11
793#endif
794#ifdef CONFIG_E200
795 /* Round robin TLB1 entries assignment */
796 mfspr r12, SPRN_MAS0
797
798 /* Extract TLB1CFG(NENTRY) */
799 mfspr r11, SPRN_TLB1CFG
800 andi. r11, r11, 0xfff
801
802 /* Extract MAS0(NV) */
803 andi. r13, r12, 0xfff
804 addi r13, r13, 1
805 cmpw 0, r13, r11
806 addi r12, r12, 1
807
808 /* check if we need to wrap */
809 blt 7f
810
811 /* wrap back to first free tlbcam entry */
812 lis r13, tlbcam_index@ha
813 lwz r13, tlbcam_index@l(r13)
814 rlwimi r12, r13, 0, 20, 31
8157:
816 mtspr SPRN_MAS0,r12
817#endif /* CONFIG_E200 */
818
819 tlbwe
820
821 /* Done...restore registers and get out of here. */
822 mfspr r11, SPRN_SPRG7R
823 mtcr r11
824 mfspr r13, SPRN_SPRG5R
825 mfspr r12, SPRN_SPRG4R
826 mfspr r11, SPRN_SPRG1
827 mfspr r10, SPRN_SPRG0
828 rfi /* Force context change */
829
830#ifdef CONFIG_SPE
831/* Note that the SPE support is closely modeled after the AltiVec
832 * support. Changes to one are likely to be applicable to the
833 * other! */
834load_up_spe:
835/*
836 * Disable SPE for the task which had SPE previously,
837 * and save its SPE registers in its thread_struct.
838 * Enables SPE for use in the kernel on return.
839 * On SMP we know the SPE units are free, since we give it up every
840 * switch. -- Kumar
841 */
842 mfmsr r5
843 oris r5,r5,MSR_SPE@h
844 mtmsr r5 /* enable use of SPE now */
845 isync
846/*
847 * For SMP, we don't do lazy SPE switching because it just gets too
848 * horrendously complex, especially when a task switches from one CPU
849 * to another. Instead we call giveup_spe in switch_to.
850 */
851#ifndef CONFIG_SMP
852 lis r3,last_task_used_spe@ha
853 lwz r4,last_task_used_spe@l(r3)
854 cmpi 0,r4,0
855 beq 1f
856 addi r4,r4,THREAD /* want THREAD of last_task_used_spe */
857 SAVE_32EVRS(0,r10,r4)
858 evxor evr10, evr10, evr10 /* clear out evr10 */
859 evmwumiaa evr10, evr10, evr10 /* evr10 <- ACC = 0 * 0 + ACC */
860 li r5,THREAD_ACC
861 evstddx evr10, r4, r5 /* save off accumulator */
862 lwz r5,PT_REGS(r4)
863 lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5)
864 lis r10,MSR_SPE@h
865 andc r4,r4,r10 /* disable SPE for previous task */
866 stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
8671:
868#endif /* CONFIG_SMP */
869 /* enable use of SPE after return */
870 oris r9,r9,MSR_SPE@h
871 mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */
872 li r4,1
873 li r10,THREAD_ACC
874 stw r4,THREAD_USED_SPE(r5)
875 evlddx evr4,r10,r5
876 evmra evr4,evr4
877 REST_32EVRS(0,r10,r5)
878#ifndef CONFIG_SMP
879 subi r4,r5,THREAD
880 stw r4,last_task_used_spe@l(r3)
881#endif /* CONFIG_SMP */
882 /* restore registers and return */
8832: REST_4GPRS(3, r11)
884 lwz r10,_CCR(r11)
885 REST_GPR(1, r11)
886 mtcr r10
887 lwz r10,_LINK(r11)
888 mtlr r10
889 REST_GPR(10, r11)
890 mtspr SPRN_SRR1,r9
891 mtspr SPRN_SRR0,r12
892 REST_GPR(9, r11)
893 REST_GPR(12, r11)
894 lwz r11,GPR11(r11)
895 rfi
896
897/*
898 * SPE unavailable trap from kernel - print a message, but let
899 * the task use SPE in the kernel until it returns to user mode.
900 */
901KernelSPE:
902 lwz r3,_MSR(r1)
903 oris r3,r3,MSR_SPE@h
904 stw r3,_MSR(r1) /* enable use of SPE after return */
905 lis r3,87f@h
906 ori r3,r3,87f@l
907 mr r4,r2 /* current */
908 lwz r5,_NIP(r1)
909 bl printk
910 b ret_from_except
91187: .string "SPE used in kernel (task=%p, pc=%x) \n"
912 .align 4,0
913
914#endif /* CONFIG_SPE */
915
916/*
917 * Global functions
918 */
919
920/*
921 * extern void loadcam_entry(unsigned int index)
922 *
923 * Load TLBCAM[index] entry in to the L2 CAM MMU
924 */
925_GLOBAL(loadcam_entry)
926 lis r4,TLBCAM@ha
927 addi r4,r4,TLBCAM@l
928 mulli r5,r3,20
929 add r3,r5,r4
930 lwz r4,0(r3)
931 mtspr SPRN_MAS0,r4
932 lwz r4,4(r3)
933 mtspr SPRN_MAS1,r4
934 lwz r4,8(r3)
935 mtspr SPRN_MAS2,r4
936 lwz r4,12(r3)
937 mtspr SPRN_MAS3,r4
938 tlbwe
939 isync
940 blr
941
942/*
943 * extern void giveup_altivec(struct task_struct *prev)
944 *
945 * The e500 core does not have an AltiVec unit.
946 */
947_GLOBAL(giveup_altivec)
948 blr
949
950#ifdef CONFIG_SPE
951/*
952 * extern void giveup_spe(struct task_struct *prev)
953 *
954 */
955_GLOBAL(giveup_spe)
956 mfmsr r5
957 oris r5,r5,MSR_SPE@h
958 mtmsr r5 /* enable use of SPE now */
959 isync
960 cmpi 0,r3,0
961 beqlr- /* if no previous owner, done */
962 addi r3,r3,THREAD /* want THREAD of task */
963 lwz r5,PT_REGS(r3)
964 cmpi 0,r5,0
965 SAVE_32EVRS(0, r4, r3)
966 evxor evr6, evr6, evr6 /* clear out evr6 */
967 evmwumiaa evr6, evr6, evr6 /* evr6 <- ACC = 0 * 0 + ACC */
968 li r4,THREAD_ACC
969 evstddx evr6, r4, r3 /* save off accumulator */
970 mfspr r6,SPRN_SPEFSCR
971 stw r6,THREAD_SPEFSCR(r3) /* save spefscr register value */
972 beq 1f
973 lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5)
974 lis r3,MSR_SPE@h
975 andc r4,r4,r3 /* disable SPE for previous task */
976 stw r4,_MSR-STACK_FRAME_OVERHEAD(r5)
9771:
978#ifndef CONFIG_SMP
979 li r5,0
980 lis r4,last_task_used_spe@ha
981 stw r5,last_task_used_spe@l(r4)
982#endif /* CONFIG_SMP */
983 blr
984#endif /* CONFIG_SPE */
985
986/*
987 * extern void giveup_fpu(struct task_struct *prev)
988 *
989 * Not all FSL Book-E cores have an FPU
990 */
991#ifndef CONFIG_PPC_FPU
992_GLOBAL(giveup_fpu)
993 blr
994#endif
995
996/*
997 * extern void abort(void)
998 *
999 * At present, this routine just applies a system reset.
1000 */
1001_GLOBAL(abort)
1002 li r13,0
1003 mtspr SPRN_DBCR0,r13 /* disable all debug events */
1004 isync
1005 mfmsr r13
1006 ori r13,r13,MSR_DE@l /* Enable Debug Events */
1007 mtmsr r13
1008 isync
1009 mfspr r13,SPRN_DBCR0
1010 lis r13,(DBCR0_IDM|DBCR0_RST_CHIP)@h
1011 mtspr SPRN_DBCR0,r13
1012 isync
1013
1014_GLOBAL(set_context)
1015
1016#ifdef CONFIG_BDI_SWITCH
1017 /* Context switch the PTE pointer for the Abatron BDI2000.
1018 * The PGDIR is the second parameter.
1019 */
1020 lis r5, abatron_pteptrs@h
1021 ori r5, r5, abatron_pteptrs@l
1022 stw r4, 0x4(r5)
1023#endif
1024 mtspr SPRN_PID,r3
1025 isync /* Force context change */
1026 blr
1027
1028/*
1029 * We put a few things here that have to be page-aligned. This stuff
1030 * goes at the beginning of the data segment, which is page-aligned.
1031 */
1032 .data
1033 .align 12
1034 .globl sdata
1035sdata:
1036 .globl empty_zero_page
1037empty_zero_page:
1038 .space 4096
1039 .globl swapper_pg_dir
1040swapper_pg_dir:
1041 .space 4096
1042
1043/* Reserved 4k for the critical exception stack & 4k for the machine
1044 * check stack per CPU for kernel mode exceptions */
1045 .section .bss
1046 .align 12
1047exception_stack_bottom:
1048 .space BOOKE_EXCEPTION_STACK_SIZE * NR_CPUS
1049 .globl exception_stack_top
1050exception_stack_top:
1051
1052/*
1053 * This space gets a copy of optional info passed to us by the bootstrap
1054 * which is used to pass parameters into the kernel like root=/dev/sda1, etc.
1055 */
1056 .globl cmd_line
1057cmd_line:
1058 .space 512
1059
1060/*
1061 * Room for two PTE pointers, usually the kernel and current user pointers
1062 * to their respective root page table.
1063 */
1064abatron_pteptrs:
1065 .space 8
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index e0c850d85c53..d5e0dfc9ffec 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -165,24 +165,7 @@ _GLOBAL(_tlbia)
165 ble 1b 165 ble 1b
166 166
167 isync 167 isync
168#elif defined(CONFIG_FSL_BOOKE) 168#else /* !(CONFIG_40x || CONFIG_44x) */
169 /* Invalidate all entries in TLB0 */
170 li r3, 0x04
171 tlbivax 0,3
172 /* Invalidate all entries in TLB1 */
173 li r3, 0x0c
174 tlbivax 0,3
175 /* Invalidate all entries in TLB2 */
176 li r3, 0x14
177 tlbivax 0,3
178 /* Invalidate all entries in TLB3 */
179 li r3, 0x1c
180 tlbivax 0,3
181 msync
182#ifdef CONFIG_SMP
183 tlbsync
184#endif /* CONFIG_SMP */
185#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
186#if defined(CONFIG_SMP) 169#if defined(CONFIG_SMP)
187 rlwinm r8,r1,0,0,18 170 rlwinm r8,r1,0,0,18
188 lwz r8,TI_CPU(r8) 171 lwz r8,TI_CPU(r8)
@@ -268,20 +251,7 @@ _GLOBAL(_tlbie)
268 tlbwe r3, r3, PPC44x_TLB_PAGEID 251 tlbwe r3, r3, PPC44x_TLB_PAGEID
269 isync 252 isync
27010: 25310:
271#elif defined(CONFIG_FSL_BOOKE) 254#else /* !(CONFIG_40x || CONFIG_44x) */
272 rlwinm r4, r3, 0, 0, 19
273 ori r5, r4, 0x08 /* TLBSEL = 1 */
274 ori r6, r4, 0x10 /* TLBSEL = 2 */
275 ori r7, r4, 0x18 /* TLBSEL = 3 */
276 tlbivax 0, r4
277 tlbivax 0, r5
278 tlbivax 0, r6
279 tlbivax 0, r7
280 msync
281#if defined(CONFIG_SMP)
282 tlbsync
283#endif /* CONFIG_SMP */
284#else /* !(CONFIG_40x || CONFIG_44x || CONFIG_FSL_BOOKE) */
285#if defined(CONFIG_SMP) 255#if defined(CONFIG_SMP)
286 rlwinm r8,r1,0,0,18 256 rlwinm r8,r1,0,0,18
287 lwz r8,TI_CPU(r8) 257 lwz r8,TI_CPU(r8)
@@ -338,18 +308,6 @@ _GLOBAL(flush_instruction_cache)
338 lis r3, KERNELBASE@h 308 lis r3, KERNELBASE@h
339 iccci 0,r3 309 iccci 0,r3
340#endif 310#endif
341#elif CONFIG_FSL_BOOKE
342BEGIN_FTR_SECTION
343 mfspr r3,SPRN_L1CSR0
344 ori r3,r3,L1CSR0_CFI|L1CSR0_CLFC
345 /* msync; isync recommended here */
346 mtspr SPRN_L1CSR0,r3
347 isync
348 blr
349END_FTR_SECTION_IFSET(CPU_FTR_UNIFIED_ID_CACHE)
350 mfspr r3,SPRN_L1CSR1
351 ori r3,r3,L1CSR1_ICFI|L1CSR1_ICLFR
352 mtspr SPRN_L1CSR1,r3
353#else 311#else
354 mfspr r3,SPRN_PVR 312 mfspr r3,SPRN_PVR
355 rlwinm r3,r3,16,16,31 313 rlwinm r3,r3,16,16,31
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 22494ec123ea..c35350250cfc 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -45,7 +45,7 @@
45#include <asm/dcr.h> 45#include <asm/dcr.h>
46 46
47#ifdef CONFIG_8xx 47#ifdef CONFIG_8xx
48#include <asm/commproc.h> 48#include <asm/cpm1.h>
49#endif 49#endif
50 50
51extern void transfer_to_handler(void); 51extern void transfer_to_handler(void);
@@ -166,12 +166,6 @@ EXPORT_SYMBOL(last_task_used_altivec);
166#endif 166#endif
167EXPORT_SYMBOL(giveup_altivec); 167EXPORT_SYMBOL(giveup_altivec);
168#endif /* CONFIG_ALTIVEC */ 168#endif /* CONFIG_ALTIVEC */
169#ifdef CONFIG_SPE
170#ifndef CONFIG_SMP
171EXPORT_SYMBOL(last_task_used_spe);
172#endif
173EXPORT_SYMBOL(giveup_spe);
174#endif /* CONFIG_SPE */
175#ifdef CONFIG_SMP 169#ifdef CONFIG_SMP
176EXPORT_SYMBOL(smp_call_function); 170EXPORT_SYMBOL(smp_call_function);
177EXPORT_SYMBOL(smp_hw_index); 171EXPORT_SYMBOL(smp_hw_index);
@@ -244,8 +238,7 @@ EXPORT_SYMBOL(debugger_fault_handler);
244EXPORT_SYMBOL(cpm_install_handler); 238EXPORT_SYMBOL(cpm_install_handler);
245EXPORT_SYMBOL(cpm_free_handler); 239EXPORT_SYMBOL(cpm_free_handler);
246#endif /* CONFIG_8xx */ 240#endif /* CONFIG_8xx */
247#if defined(CONFIG_8xx) || defined(CONFIG_40x) || defined(CONFIG_85xx) ||\ 241#if defined(CONFIG_8xx) || defined(CONFIG_40x)
248 defined(CONFIG_83xx)
249EXPORT_SYMBOL(__res); 242EXPORT_SYMBOL(__res);
250#endif 243#endif
251 244
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 5255bd80aa6b..d51368d72e39 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -37,10 +37,8 @@
37#include <asm/nvram.h> 37#include <asm/nvram.h>
38#include <asm/xmon.h> 38#include <asm/xmon.h>
39#include <asm/ocp.h> 39#include <asm/ocp.h>
40#include <asm/prom.h>
41 40
42#define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \ 41#define USES_PPC_SYS (defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \
43 defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \
44 defined(CONFIG_PPC_MPC52xx)) 42 defined(CONFIG_PPC_MPC52xx))
45 43
46#if USES_PPC_SYS 44#if USES_PPC_SYS
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index c78568905c3b..a467a429c2fe 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -194,11 +194,7 @@ static inline int check_io_access(struct pt_regs *regs)
194/* On 4xx, the reason for the machine check or program exception 194/* On 4xx, the reason for the machine check or program exception
195 is in the ESR. */ 195 is in the ESR. */
196#define get_reason(regs) ((regs)->dsisr) 196#define get_reason(regs) ((regs)->dsisr)
197#ifndef CONFIG_FSL_BOOKE
198#define get_mc_reason(regs) ((regs)->dsisr) 197#define get_mc_reason(regs) ((regs)->dsisr)
199#else
200#define get_mc_reason(regs) (mfspr(SPRN_MCSR))
201#endif
202#define REASON_FP ESR_FP 198#define REASON_FP ESR_FP
203#define REASON_ILLEGAL (ESR_PIL | ESR_PUO) 199#define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
204#define REASON_PRIVILEGED ESR_PPR 200#define REASON_PRIVILEGED ESR_PPR
@@ -231,39 +227,25 @@ platform_machine_check(struct pt_regs *regs)
231{ 227{
232} 228}
233 229
234void machine_check_exception(struct pt_regs *regs) 230#if defined(CONFIG_4xx)
231int machine_check_4xx(struct pt_regs *regs)
235{ 232{
236 unsigned long reason = get_mc_reason(regs); 233 unsigned long reason = get_mc_reason(regs);
237 234
238 if (user_mode(regs)) {
239 regs->msr |= MSR_RI;
240 _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
241 return;
242 }
243
244#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
245 /* the qspan pci read routines can cause machine checks -- Cort */
246 bad_page_fault(regs, regs->dar, SIGBUS);
247 return;
248#endif
249
250 if (debugger_fault_handler) {
251 debugger_fault_handler(regs);
252 regs->msr |= MSR_RI;
253 return;
254 }
255
256 if (check_io_access(regs))
257 return;
258
259#if defined(CONFIG_4xx) && !defined(CONFIG_440A)
260 if (reason & ESR_IMCP) { 235 if (reason & ESR_IMCP) {
261 printk("Instruction"); 236 printk("Instruction");
262 mtspr(SPRN_ESR, reason & ~ESR_IMCP); 237 mtspr(SPRN_ESR, reason & ~ESR_IMCP);
263 } else 238 } else
264 printk("Data"); 239 printk("Data");
265 printk(" machine check in kernel mode.\n"); 240 printk(" machine check in kernel mode.\n");
266#elif defined(CONFIG_440A) 241
242 return 0;
243}
244
245int machine_check_440A(struct pt_regs *regs)
246{
247 unsigned long reason = get_mc_reason(regs);
248
267 printk("Machine check in kernel mode.\n"); 249 printk("Machine check in kernel mode.\n");
268 if (reason & ESR_IMCP){ 250 if (reason & ESR_IMCP){
269 printk("Instruction Synchronous Machine Check exception\n"); 251 printk("Instruction Synchronous Machine Check exception\n");
@@ -293,55 +275,13 @@ void machine_check_exception(struct pt_regs *regs)
293 /* Clear MCSR */ 275 /* Clear MCSR */
294 mtspr(SPRN_MCSR, mcsr); 276 mtspr(SPRN_MCSR, mcsr);
295 } 277 }
296#elif defined (CONFIG_E500) 278 return 0;
297 printk("Machine check in kernel mode.\n"); 279}
298 printk("Caused by (from MCSR=%lx): ", reason); 280#else
299 281int machine_check_generic(struct pt_regs *regs)
300 if (reason & MCSR_MCP) 282{
301 printk("Machine Check Signal\n"); 283 unsigned long reason = get_mc_reason(regs);
302 if (reason & MCSR_ICPERR) 284
303 printk("Instruction Cache Parity Error\n");
304 if (reason & MCSR_DCP_PERR)
305 printk("Data Cache Push Parity Error\n");
306 if (reason & MCSR_DCPERR)
307 printk("Data Cache Parity Error\n");
308 if (reason & MCSR_GL_CI)
309 printk("Guarded Load or Cache-Inhibited stwcx.\n");
310 if (reason & MCSR_BUS_IAERR)
311 printk("Bus - Instruction Address Error\n");
312 if (reason & MCSR_BUS_RAERR)
313 printk("Bus - Read Address Error\n");
314 if (reason & MCSR_BUS_WAERR)
315 printk("Bus - Write Address Error\n");
316 if (reason & MCSR_BUS_IBERR)
317 printk("Bus - Instruction Data Error\n");
318 if (reason & MCSR_BUS_RBERR)
319 printk("Bus - Read Data Bus Error\n");
320 if (reason & MCSR_BUS_WBERR)
321 printk("Bus - Write Data Bus Error\n");
322 if (reason & MCSR_BUS_IPERR)
323 printk("Bus - Instruction Parity Error\n");
324 if (reason & MCSR_BUS_RPERR)
325 printk("Bus - Read Parity Error\n");
326#elif defined (CONFIG_E200)
327 printk("Machine check in kernel mode.\n");
328 printk("Caused by (from MCSR=%lx): ", reason);
329
330 if (reason & MCSR_MCP)
331 printk("Machine Check Signal\n");
332 if (reason & MCSR_CP_PERR)
333 printk("Cache Push Parity Error\n");
334 if (reason & MCSR_CPERR)
335 printk("Cache Parity Error\n");
336 if (reason & MCSR_EXCP_ERR)
337 printk("ISI, ITLB, or Bus Error on first instruction fetch for an exception handler\n");
338 if (reason & MCSR_BUS_IRERR)
339 printk("Bus - Read Bus Error on instruction fetch\n");
340 if (reason & MCSR_BUS_DRERR)
341 printk("Bus - Read Bus Error on data load\n");
342 if (reason & MCSR_BUS_WRERR)
343 printk("Bus - Write Bus Error on buffered store or cache line push\n");
344#else /* !CONFIG_4xx && !CONFIG_E500 && !CONFIG_E200 */
345 printk("Machine check in kernel mode.\n"); 285 printk("Machine check in kernel mode.\n");
346 printk("Caused by (from SRR1=%lx): ", reason); 286 printk("Caused by (from SRR1=%lx): ", reason);
347 switch (reason & 0x601F0000) { 287 switch (reason & 0x601F0000) {
@@ -371,7 +311,39 @@ void machine_check_exception(struct pt_regs *regs)
371 default: 311 default:
372 printk("Unknown values in msr\n"); 312 printk("Unknown values in msr\n");
373 } 313 }
374#endif /* CONFIG_4xx */ 314 return 0;
315}
316#endif /* everything else */
317
318void machine_check_exception(struct pt_regs *regs)
319{
320 int recover = 0;
321
322 if (cur_cpu_spec->machine_check)
323 recover = cur_cpu_spec->machine_check(regs);
324 if (recover > 0)
325 return;
326
327 if (user_mode(regs)) {
328 regs->msr |= MSR_RI;
329 _exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
330 return;
331 }
332
333#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
334 /* the qspan pci read routines can cause machine checks -- Cort */
335 bad_page_fault(regs, regs->dar, SIGBUS);
336 return;
337#endif
338
339 if (debugger_fault_handler) {
340 debugger_fault_handler(regs);
341 regs->msr |= MSR_RI;
342 return;
343 }
344
345 if (check_io_access(regs))
346 return;
375 347
376 /* 348 /*
377 * Optional platform-provided routine to print out 349 * Optional platform-provided routine to print out
@@ -830,63 +802,6 @@ void altivec_assist_exception(struct pt_regs *regs)
830} 802}
831#endif /* CONFIG_ALTIVEC */ 803#endif /* CONFIG_ALTIVEC */
832 804
833#ifdef CONFIG_E500
834void performance_monitor_exception(struct pt_regs *regs)
835{
836 perf_irq(regs);
837}
838#endif
839
840#ifdef CONFIG_FSL_BOOKE
841void CacheLockingException(struct pt_regs *regs, unsigned long address,
842 unsigned long error_code)
843{
844 /* We treat cache locking instructions from the user
845 * as priv ops, in the future we could try to do
846 * something smarter
847 */
848 if (error_code & (ESR_DLK|ESR_ILK))
849 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip);
850 return;
851}
852#endif /* CONFIG_FSL_BOOKE */
853
854#ifdef CONFIG_SPE
855void SPEFloatingPointException(struct pt_regs *regs)
856{
857 unsigned long spefscr;
858 int fpexc_mode;
859 int code = 0;
860
861 spefscr = current->thread.spefscr;
862 fpexc_mode = current->thread.fpexc_mode;
863
864 /* Hardware does not necessarily set sticky
865 * underflow/overflow/invalid flags */
866 if ((spefscr & SPEFSCR_FOVF) && (fpexc_mode & PR_FP_EXC_OVF)) {
867 code = FPE_FLTOVF;
868 spefscr |= SPEFSCR_FOVFS;
869 }
870 else if ((spefscr & SPEFSCR_FUNF) && (fpexc_mode & PR_FP_EXC_UND)) {
871 code = FPE_FLTUND;
872 spefscr |= SPEFSCR_FUNFS;
873 }
874 else if ((spefscr & SPEFSCR_FDBZ) && (fpexc_mode & PR_FP_EXC_DIV))
875 code = FPE_FLTDIV;
876 else if ((spefscr & SPEFSCR_FINV) && (fpexc_mode & PR_FP_EXC_INV)) {
877 code = FPE_FLTINV;
878 spefscr |= SPEFSCR_FINVS;
879 }
880 else if ((spefscr & (SPEFSCR_FG | SPEFSCR_FX)) && (fpexc_mode & PR_FP_EXC_RES))
881 code = FPE_FLTRES;
882
883 current->thread.spefscr = spefscr;
884
885 _exception(SIGFPE, regs, code, regs->nip);
886 return;
887}
888#endif
889
890#ifdef CONFIG_BOOKE_WDT 805#ifdef CONFIG_BOOKE_WDT
891/* 806/*
892 * Default handler for a Watchdog exception, 807 * Default handler for a Watchdog exception,
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
index 6536a25cfcb8..fbb577a0d165 100644
--- a/arch/ppc/mm/44x_mmu.c
+++ b/arch/ppc/mm/44x_mmu.c
@@ -60,38 +60,28 @@ extern char etext[], _stext[];
60 * Just needed it declared someplace. 60 * Just needed it declared someplace.
61 */ 61 */
62unsigned int tlb_44x_index = 0; 62unsigned int tlb_44x_index = 0;
63unsigned int tlb_44x_hwater = 62; 63unsigned int tlb_44x_hwater = PPC4XX_TLB_SIZE - 1 - PPC44x_EARLY_TLBS;
64int icache_44x_need_flush; 64int icache_44x_need_flush;
65 65
66/* 66/*
67 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem 67 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
68 */ 68 */
69static void __init 69static void __init ppc44x_pin_tlb(unsigned int virt, unsigned int phys)
70ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
71{ 70{
72 unsigned long attrib = 0; 71 __asm__ __volatile__(
73 72 "tlbwe %2,%3,%4\n"
74 __asm__ __volatile__("\ 73 "tlbwe %1,%3,%5\n"
75 clrrwi %2,%2,10\n\ 74 "tlbwe %0,%3,%6\n"
76 ori %2,%2,%4\n\
77 clrrwi %1,%1,10\n\
78 li %0,0\n\
79 ori %0,%0,%5\n\
80 tlbwe %2,%3,%6\n\
81 tlbwe %1,%3,%7\n\
82 tlbwe %0,%3,%8"
83 : 75 :
84 : "r" (attrib), "r" (phys), "r" (virt), "r" (slot), 76 : "r" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G),
85 "i" (PPC44x_TLB_VALID | PPC44x_TLB_256M), 77 "r" (phys),
86 "i" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G), 78 "r" (virt | PPC44x_TLB_VALID | PPC44x_TLB_256M),
79 "r" (tlb_44x_hwater--), /* slot for this TLB entry */
87 "i" (PPC44x_TLB_PAGEID), 80 "i" (PPC44x_TLB_PAGEID),
88 "i" (PPC44x_TLB_XLAT), 81 "i" (PPC44x_TLB_XLAT),
89 "i" (PPC44x_TLB_ATTRIB)); 82 "i" (PPC44x_TLB_ATTRIB));
90} 83}
91 84
92/*
93 * MMU_init_hw does the chip-specific initialization of the MMU hardware.
94 */
95void __init MMU_init_hw(void) 85void __init MMU_init_hw(void)
96{ 86{
97 flush_instruction_cache(); 87 flush_instruction_cache();
@@ -99,22 +89,13 @@ void __init MMU_init_hw(void)
99 89
100unsigned long __init mmu_mapin_ram(void) 90unsigned long __init mmu_mapin_ram(void)
101{ 91{
102 unsigned int pinned_tlbs = 1; 92 unsigned long addr;
103 int i;
104
105 /* Determine number of entries necessary to cover lowmem */
106 pinned_tlbs = (unsigned int)
107 (_ALIGN(total_lowmem, PPC_PIN_SIZE) >> PPC44x_PIN_SHIFT);
108
109 /* Write upper watermark to save location */
110 tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs;
111 93
112 /* If necessary, set additional pinned TLBs */ 94 /* Pin in enough TLBs to cover any lowmem not covered by the
113 if (pinned_tlbs > 1) 95 * initial 256M mapping established in head_44x.S */
114 for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { 96 for (addr = PPC_PIN_SIZE; addr < total_lowmem;
115 unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC_PIN_SIZE; 97 addr += PPC_PIN_SIZE)
116 ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); 98 ppc44x_pin_tlb(addr + PAGE_OFFSET, addr);
117 }
118 99
119 return total_lowmem; 100 return total_lowmem;
120} 101}
diff --git a/arch/ppc/mm/Makefile b/arch/ppc/mm/Makefile
index cd3eae147cf8..691ba2bae05d 100644
--- a/arch/ppc/mm/Makefile
+++ b/arch/ppc/mm/Makefile
@@ -8,4 +8,3 @@ obj-y := fault.o init.o mem_pieces.o \
8obj-$(CONFIG_PPC_STD_MMU) += hashtable.o ppc_mmu.o tlb.o 8obj-$(CONFIG_PPC_STD_MMU) += hashtable.o ppc_mmu.o tlb.o
9obj-$(CONFIG_40x) += 4xx_mmu.o 9obj-$(CONFIG_40x) += 4xx_mmu.o
10obj-$(CONFIG_44x) += 44x_mmu.o 10obj-$(CONFIG_44x) += 44x_mmu.o
11obj-$(CONFIG_FSL_BOOKE) += fsl_booke_mmu.o
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c
deleted file mode 100644
index 123da03ab118..000000000000
--- a/arch/ppc/mm/fsl_booke_mmu.c
+++ /dev/null
@@ -1,236 +0,0 @@
1/*
2 * Modifications by Kumar Gala (galak@kernel.crashing.org) to support
3 * E500 Book E processors.
4 *
5 * Copyright 2004 Freescale Semiconductor, Inc
6 *
7 * This file contains the routines for initializing the MMU
8 * on the 4xx series of chips.
9 * -- paulus
10 *
11 * Derived from arch/ppc/mm/init.c:
12 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
13 *
14 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
15 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
16 * Copyright (C) 1996 Paul Mackerras
17 * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk).
18 *
19 * Derived from "arch/i386/mm/init.c"
20 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds
21 *
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * as published by the Free Software Foundation; either version
25 * 2 of the License, or (at your option) any later version.
26 *
27 */
28
29#include <linux/signal.h>
30#include <linux/sched.h>
31#include <linux/kernel.h>
32#include <linux/errno.h>
33#include <linux/string.h>
34#include <linux/types.h>
35#include <linux/ptrace.h>
36#include <linux/mman.h>
37#include <linux/mm.h>
38#include <linux/swap.h>
39#include <linux/stddef.h>
40#include <linux/vmalloc.h>
41#include <linux/init.h>
42#include <linux/delay.h>
43#include <linux/highmem.h>
44
45#include <asm/pgalloc.h>
46#include <asm/prom.h>
47#include <asm/io.h>
48#include <asm/mmu_context.h>
49#include <asm/pgtable.h>
50#include <asm/mmu.h>
51#include <asm/uaccess.h>
52#include <asm/smp.h>
53#include <asm/bootx.h>
54#include <asm/machdep.h>
55#include <asm/setup.h>
56
57extern void loadcam_entry(unsigned int index);
58unsigned int tlbcam_index;
59unsigned int num_tlbcam_entries;
60static unsigned long __cam0, __cam1, __cam2;
61extern unsigned long total_lowmem;
62extern unsigned long __max_low_memory;
63#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE
64
65#define NUM_TLBCAMS (16)
66
67struct tlbcam {
68 u32 MAS0;
69 u32 MAS1;
70 u32 MAS2;
71 u32 MAS3;
72 u32 MAS7;
73} TLBCAM[NUM_TLBCAMS];
74
75struct tlbcamrange {
76 unsigned long start;
77 unsigned long limit;
78 phys_addr_t phys;
79} tlbcam_addrs[NUM_TLBCAMS];
80
81extern unsigned int tlbcam_index;
82
83/*
84 * Return PA for this VA if it is mapped by a CAM, or 0
85 */
86unsigned long v_mapped_by_tlbcam(unsigned long va)
87{
88 int b;
89 for (b = 0; b < tlbcam_index; ++b)
90 if (va >= tlbcam_addrs[b].start && va < tlbcam_addrs[b].limit)
91 return tlbcam_addrs[b].phys + (va - tlbcam_addrs[b].start);
92 return 0;
93}
94
95/*
96 * Return VA for a given PA or 0 if not mapped
97 */
98unsigned long p_mapped_by_tlbcam(unsigned long pa)
99{
100 int b;
101 for (b = 0; b < tlbcam_index; ++b)
102 if (pa >= tlbcam_addrs[b].phys
103 && pa < (tlbcam_addrs[b].limit-tlbcam_addrs[b].start)
104 +tlbcam_addrs[b].phys)
105 return tlbcam_addrs[b].start+(pa-tlbcam_addrs[b].phys);
106 return 0;
107}
108
109/*
110 * Set up one of the I/D BAT (block address translation) register pairs.
111 * The parameters are not checked; in particular size must be a power
112 * of 4 between 4k and 256M.
113 */
114void settlbcam(int index, unsigned long virt, phys_addr_t phys,
115 unsigned int size, int flags, unsigned int pid)
116{
117 unsigned int tsize, lz;
118
119 asm ("cntlzw %0,%1" : "=r" (lz) : "r" (size));
120 tsize = (21 - lz) / 2;
121
122#ifdef CONFIG_SMP
123 if ((flags & _PAGE_NO_CACHE) == 0)
124 flags |= _PAGE_COHERENT;
125#endif
126
127 TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index) | MAS0_NV(index+1);
128 TLBCAM[index].MAS1 = MAS1_VALID | MAS1_IPROT | MAS1_TSIZE(tsize) | MAS1_TID(pid);
129 TLBCAM[index].MAS2 = virt & PAGE_MASK;
130
131 TLBCAM[index].MAS2 |= (flags & _PAGE_WRITETHRU) ? MAS2_W : 0;
132 TLBCAM[index].MAS2 |= (flags & _PAGE_NO_CACHE) ? MAS2_I : 0;
133 TLBCAM[index].MAS2 |= (flags & _PAGE_COHERENT) ? MAS2_M : 0;
134 TLBCAM[index].MAS2 |= (flags & _PAGE_GUARDED) ? MAS2_G : 0;
135 TLBCAM[index].MAS2 |= (flags & _PAGE_ENDIAN) ? MAS2_E : 0;
136
137 TLBCAM[index].MAS3 = (phys & PAGE_MASK) | MAS3_SX | MAS3_SR;
138 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_SW : 0);
139
140#ifndef CONFIG_KGDB /* want user access for breakpoints */
141 if (flags & _PAGE_USER) {
142 TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
143 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
144 }
145#else
146 TLBCAM[index].MAS3 |= MAS3_UX | MAS3_UR;
147 TLBCAM[index].MAS3 |= ((flags & _PAGE_RW) ? MAS3_UW : 0);
148#endif
149
150 tlbcam_addrs[index].start = virt;
151 tlbcam_addrs[index].limit = virt + size - 1;
152 tlbcam_addrs[index].phys = phys;
153
154 loadcam_entry(index);
155}
156
157void invalidate_tlbcam_entry(int index)
158{
159 TLBCAM[index].MAS0 = MAS0_TLBSEL(1) | MAS0_ESEL(index);
160 TLBCAM[index].MAS1 = ~MAS1_VALID;
161
162 loadcam_entry(index);
163}
164
165void __init cam_mapin_ram(unsigned long cam0, unsigned long cam1,
166 unsigned long cam2)
167{
168 settlbcam(0, KERNELBASE, PPC_MEMSTART, cam0, _PAGE_KERNEL, 0);
169 tlbcam_index++;
170 if (cam1) {
171 tlbcam_index++;
172 settlbcam(1, KERNELBASE+cam0, PPC_MEMSTART+cam0, cam1, _PAGE_KERNEL, 0);
173 }
174 if (cam2) {
175 tlbcam_index++;
176 settlbcam(2, KERNELBASE+cam0+cam1, PPC_MEMSTART+cam0+cam1, cam2, _PAGE_KERNEL, 0);
177 }
178}
179
180/*
181 * MMU_init_hw does the chip-specific initialization of the MMU hardware.
182 */
183void __init MMU_init_hw(void)
184{
185 flush_instruction_cache();
186}
187
188unsigned long __init mmu_mapin_ram(void)
189{
190 cam_mapin_ram(__cam0, __cam1, __cam2);
191
192 return __cam0 + __cam1 + __cam2;
193}
194
195
196void __init
197adjust_total_lowmem(void)
198{
199 unsigned long max_low_mem = MAX_LOW_MEM;
200 unsigned long cam_max = 0x10000000;
201 unsigned long ram;
202
203 /* adjust CAM size to max_low_mem */
204 if (max_low_mem < cam_max)
205 cam_max = max_low_mem;
206
207 /* adjust lowmem size to max_low_mem */
208 if (max_low_mem < total_lowmem)
209 ram = max_low_mem;
210 else
211 ram = total_lowmem;
212
213 /* Calculate CAM values */
214 __cam0 = 1UL << 2 * (__ilog2(ram) / 2);
215 if (__cam0 > cam_max)
216 __cam0 = cam_max;
217 ram -= __cam0;
218 if (ram) {
219 __cam1 = 1UL << 2 * (__ilog2(ram) / 2);
220 if (__cam1 > cam_max)
221 __cam1 = cam_max;
222 ram -= __cam1;
223 }
224 if (ram) {
225 __cam2 = 1UL << 2 * (__ilog2(ram) / 2);
226 if (__cam2 > cam_max)
227 __cam2 = cam_max;
228 ram -= __cam2;
229 }
230
231 printk(KERN_INFO "Memory CAM mapping: CAM0=%ldMb, CAM1=%ldMb,"
232 " CAM2=%ldMb residual: %ldMb\n",
233 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
234 (total_lowmem - __cam0 - __cam1 - __cam2) >> 20);
235 __max_low_memory = max_low_mem = __cam0 + __cam1 + __cam2;
236}
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index dd898d32480e..7444df3889c5 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -241,12 +241,6 @@ void __init MMU_init(void)
241 if (__max_memory && total_memory > __max_memory) 241 if (__max_memory && total_memory > __max_memory)
242 total_memory = __max_memory; 242 total_memory = __max_memory;
243 total_lowmem = total_memory; 243 total_lowmem = total_memory;
244#ifdef CONFIG_FSL_BOOKE
245 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB
246 * entries, so we need to adjust lowmem to match the amount we can map
247 * in the fixed entries */
248 adjust_total_lowmem();
249#endif /* CONFIG_FSL_BOOKE */
250 if (total_lowmem > __max_low_memory) { 244 if (total_lowmem > __max_low_memory) {
251 total_lowmem = __max_low_memory; 245 total_lowmem = __max_low_memory;
252#ifndef CONFIG_HIGHMEM 246#ifndef CONFIG_HIGHMEM
diff --git a/arch/ppc/mm/mmu_context.c b/arch/ppc/mm/mmu_context.c
index 85afa7f8aa78..dacf45ced473 100644
--- a/arch/ppc/mm/mmu_context.c
+++ b/arch/ppc/mm/mmu_context.c
@@ -2,7 +2,7 @@
2 * This file contains the routines for handling the MMU on those 2 * This file contains the routines for handling the MMU on those
3 * PowerPC implementations where the MMU substantially follows the 3 * PowerPC implementations where the MMU substantially follows the
4 * architecture specification. This includes the 6xx, 7xx, 7xxx, 4 * architecture specification. This includes the 6xx, 7xx, 7xxx,
5 * 8260, and 83xx implementations but excludes the 8xx and 4xx. 5 * and 8260 implementations but excludes the 8xx and 4xx.
6 * -- paulus 6 * -- paulus
7 * 7 *
8 * Derived from arch/ppc/mm/init.c: 8 * Derived from arch/ppc/mm/init.c:
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h
index b298b60c202f..5f813e386b87 100644
--- a/arch/ppc/mm/mmu_decl.h
+++ b/arch/ppc/mm/mmu_decl.h
@@ -58,12 +58,6 @@ extern unsigned int num_tlbcam_entries;
58extern void MMU_init_hw(void); 58extern void MMU_init_hw(void);
59extern unsigned long mmu_mapin_ram(void); 59extern unsigned long mmu_mapin_ram(void);
60 60
61#elif defined(CONFIG_FSL_BOOKE)
62#define flush_HPTE(pid, va, pg) _tlbie(va, pid)
63extern void MMU_init_hw(void);
64extern unsigned long mmu_mapin_ram(void);
65extern void adjust_total_lowmem(void);
66
67#else 61#else
68/* anything except 4xx or 8xx */ 62/* anything except 4xx or 8xx */
69extern void MMU_init_hw(void); 63extern void MMU_init_hw(void);
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
index 1f51e6c94507..fadacfd18806 100644
--- a/arch/ppc/mm/pgtable.c
+++ b/arch/ppc/mm/pgtable.c
@@ -42,10 +42,6 @@ int io_bat_index;
42#define HAVE_BATS 1 42#define HAVE_BATS 1
43#endif 43#endif
44 44
45#if defined(CONFIG_FSL_BOOKE)
46#define HAVE_TLBCAM 1
47#endif
48
49extern char etext[], _stext[]; 45extern char etext[], _stext[];
50 46
51#ifdef CONFIG_SMP 47#ifdef CONFIG_SMP
@@ -63,15 +59,6 @@ void setbat(int index, unsigned long virt, unsigned long phys,
63#define p_mapped_by_bats(x) (0UL) 59#define p_mapped_by_bats(x) (0UL)
64#endif /* HAVE_BATS */ 60#endif /* HAVE_BATS */
65 61
66#ifdef HAVE_TLBCAM
67extern unsigned int tlbcam_index;
68extern unsigned long v_mapped_by_tlbcam(unsigned long va);
69extern unsigned long p_mapped_by_tlbcam(unsigned long pa);
70#else /* !HAVE_TLBCAM */
71#define v_mapped_by_tlbcam(x) (0UL)
72#define p_mapped_by_tlbcam(x) (0UL)
73#endif /* HAVE_TLBCAM */
74
75#ifdef CONFIG_PTE_64BIT 62#ifdef CONFIG_PTE_64BIT
76/* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */ 63/* 44x uses an 8kB pgdir because it has 8-byte Linux PTEs. */
77#define PGDIR_ORDER 1 64#define PGDIR_ORDER 1
@@ -213,9 +200,6 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
213 if ((v = p_mapped_by_bats(p)) /*&& p_mapped_by_bats(p+size-1)*/ ) 200 if ((v = p_mapped_by_bats(p)) /*&& p_mapped_by_bats(p+size-1)*/ )
214 goto out; 201 goto out;
215 202
216 if ((v = p_mapped_by_tlbcam(p)))
217 goto out;
218
219 if (mem_init_done) { 203 if (mem_init_done) {
220 struct vm_struct *area; 204 struct vm_struct *area;
221 area = get_vm_area(size, VM_IOREMAP); 205 area = get_vm_area(size, VM_IOREMAP);
@@ -341,18 +325,6 @@ void __init io_block_mapping(unsigned long virt, phys_addr_t phys,
341 } 325 }
342#endif /* HAVE_BATS */ 326#endif /* HAVE_BATS */
343 327
344#ifdef HAVE_TLBCAM
345 /*
346 * Use a CAM for this if possible...
347 */
348 if (tlbcam_index < num_tlbcam_entries && is_power_of_4(size)
349 && (virt & (size - 1)) == 0 && (phys & (size - 1)) == 0) {
350 settlbcam(tlbcam_index, virt, phys, size, flags, 0);
351 ++tlbcam_index;
352 return;
353 }
354#endif /* HAVE_TLBCAM */
355
356 /* No BATs available, put it in the page tables. */ 328 /* No BATs available, put it in the page tables. */
357 for (i = 0; i < size; i += PAGE_SIZE) 329 for (i = 0; i < size; i += PAGE_SIZE)
358 map_page(virt + i, phys + i, flags); 330 map_page(virt + i, phys + i, flags);
diff --git a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c
index 973f1e6afa53..0c1dc155996a 100644
--- a/arch/ppc/mm/ppc_mmu.c
+++ b/arch/ppc/mm/ppc_mmu.c
@@ -2,7 +2,7 @@
2 * This file contains the routines for handling the MMU on those 2 * This file contains the routines for handling the MMU on those
3 * PowerPC implementations where the MMU substantially follows the 3 * PowerPC implementations where the MMU substantially follows the
4 * architecture specification. This includes the 6xx, 7xx, 7xxx, 4 * architecture specification. This includes the 6xx, 7xx, 7xxx,
5 * 8260, and 83xx implementations but excludes the 8xx and 4xx. 5 * and 8260 implementations but excludes the 8xx and 4xx.
6 * -- paulus 6 * -- paulus
7 * 7 *
8 * Derived from arch/ppc/mm/init.c: 8 * Derived from arch/ppc/mm/init.c:
diff --git a/arch/ppc/platforms/83xx/Makefile b/arch/ppc/platforms/83xx/Makefile
deleted file mode 100644
index eb55341d6a17..000000000000
--- a/arch/ppc/platforms/83xx/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
1#
2# Makefile for the PowerPC 83xx linux kernel.
3#
4obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
deleted file mode 100644
index cb0a7493ff64..000000000000
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ /dev/null
@@ -1,326 +0,0 @@
1/*
2 * MPC834x SYS board specific routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h>
29#include <linux/initrd.h>
30#include <linux/module.h>
31#include <linux/fsl_devices.h>
32
33#include <asm/system.h>
34#include <asm/pgtable.h>
35#include <asm/page.h>
36#include <asm/atomic.h>
37#include <asm/time.h>
38#include <asm/io.h>
39#include <asm/machdep.h>
40#include <asm/ipic.h>
41#include <asm/bootinfo.h>
42#include <asm/pci-bridge.h>
43#include <asm/mpc83xx.h>
44#include <asm/irq.h>
45#include <asm/kgdb.h>
46#include <asm/ppc_sys.h>
47#include <mm/mmu_decl.h>
48
49#include <syslib/ppc83xx_setup.h>
50
51#ifndef CONFIG_PCI
52unsigned long isa_io_base = 0;
53unsigned long isa_mem_base = 0;
54#endif
55
56extern unsigned long total_memory; /* in mm/init */
57
58unsigned char __res[sizeof (bd_t)];
59
60#ifdef CONFIG_PCI
61int
62mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
63{
64 static char pci_irq_table[][4] =
65 /*
66 * PCI IDSEL/INTPIN->INTLINE
67 * A B C D
68 */
69 {
70 {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */
71 {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */
72 {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x13 */
73 {0, 0, 0, 0},
74 {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x15 */
75 {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x16 */
76 {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x17 */
77 {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x18 */
78 {0, 0, 0, 0}, /* idsel 0x19 */
79 {0, 0, 0, 0}, /* idsel 0x20 */
80 };
81
82 const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4;
83 return PCI_IRQ_TABLE_LOOKUP;
84}
85
86int
87mpc83xx_exclude_device(u_char bus, u_char devfn)
88{
89 return PCIBIOS_SUCCESSFUL;
90}
91#endif /* CONFIG_PCI */
92
93/* ************************************************************************
94 *
95 * Setup the architecture
96 *
97 */
98static void __init
99mpc834x_sys_setup_arch(void)
100{
101 bd_t *binfo = (bd_t *) __res;
102 unsigned int freq;
103 struct gianfar_platform_data *pdata;
104 struct gianfar_mdio_data *mdata;
105
106 /* get the core frequency */
107 freq = binfo->bi_intfreq;
108
109 /* Set loops_per_jiffy to a half-way reasonable value,
110 for use until calibrate_delay gets called. */
111 loops_per_jiffy = freq / HZ;
112
113#ifdef CONFIG_PCI
114 /* setup PCI host bridges */
115 mpc83xx_setup_hose();
116#endif
117 mpc83xx_early_serial_map();
118
119 /* setup the board related info for the MDIO bus */
120 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC83xx_MDIO);
121
122 mdata->irq[0] = MPC83xx_IRQ_EXT1;
123 mdata->irq[1] = MPC83xx_IRQ_EXT2;
124 mdata->irq[2] = PHY_POLL;
125 mdata->irq[31] = PHY_POLL;
126
127 /* setup the board related information for the enet controllers */
128 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC1);
129 if (pdata) {
130 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
131 pdata->bus_id = 0;
132 pdata->phy_id = 0;
133 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
134 }
135
136 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC83xx_TSEC2);
137 if (pdata) {
138 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
139 pdata->bus_id = 0;
140 pdata->phy_id = 1;
141 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
142 }
143
144#ifdef CONFIG_BLK_DEV_INITRD
145 if (initrd_start)
146 ROOT_DEV = Root_RAM0;
147 else
148#endif
149#ifdef CONFIG_ROOT_NFS
150 ROOT_DEV = Root_NFS;
151#else
152 ROOT_DEV = Root_HDA1;
153#endif
154}
155
156static void __init
157mpc834x_sys_map_io(void)
158{
159 /* we steal the lowest ioremap addr for virt space */
160 io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO);
161}
162
163int
164mpc834x_sys_show_cpuinfo(struct seq_file *m)
165{
166 uint pvid, svid, phid1;
167 bd_t *binfo = (bd_t *) __res;
168 unsigned int freq;
169
170 /* get the core frequency */
171 freq = binfo->bi_intfreq;
172
173 pvid = mfspr(SPRN_PVR);
174 svid = mfspr(SPRN_SVR);
175
176 seq_printf(m, "Vendor\t\t: Freescale Inc.\n");
177 seq_printf(m, "Machine\t\t: mpc%s sys\n", cur_ppc_sys_spec->ppc_sys_name);
178 seq_printf(m, "core clock\t: %d MHz\n"
179 "bus clock\t: %d MHz\n",
180 (int)(binfo->bi_intfreq / 1000000),
181 (int)(binfo->bi_busfreq / 1000000));
182 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
183 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
184
185 /* Display cpu Pll setting */
186 phid1 = mfspr(SPRN_HID1);
187 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
188
189 /* Display the amount of memory */
190 seq_printf(m, "Memory\t\t: %d MB\n", (int)(binfo->bi_memsize / (1024 * 1024)));
191
192 return 0;
193}
194
195
196void __init
197mpc834x_sys_init_IRQ(void)
198{
199 bd_t *binfo = (bd_t *) __res;
200
201 u8 senses[8] = {
202 0, /* EXT 0 */
203 IRQ_SENSE_LEVEL, /* EXT 1 */
204 IRQ_SENSE_LEVEL, /* EXT 2 */
205 0, /* EXT 3 */
206#ifdef CONFIG_PCI
207 IRQ_SENSE_LEVEL, /* EXT 4 */
208 IRQ_SENSE_LEVEL, /* EXT 5 */
209 IRQ_SENSE_LEVEL, /* EXT 6 */
210 IRQ_SENSE_LEVEL, /* EXT 7 */
211#else
212 0, /* EXT 4 */
213 0, /* EXT 5 */
214 0, /* EXT 6 */
215 0, /* EXT 7 */
216#endif
217 };
218
219 ipic_init(binfo->bi_immr_base + 0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8);
220
221 /* Initialize the default interrupt mapping priorities,
222 * in case the boot rom changed something on us.
223 */
224 ipic_set_default_priority();
225}
226
227static __inline__ void
228mpc834x_sys_set_bat(void)
229{
230 /* we steal the lowest ioremap addr for virt space */
231 mb();
232 mtspr(SPRN_DBAT1U, VIRT_IMMRBAR | 0x1e);
233 mtspr(SPRN_DBAT1L, immrbar | 0x2a);
234 mb();
235}
236
237void __init
238platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
239 unsigned long r6, unsigned long r7)
240{
241 bd_t *binfo = (bd_t *) __res;
242
243 /* parse_bootinfo must always be called first */
244 parse_bootinfo(find_bootinfo());
245
246 /*
247 * If we were passed in a board information, copy it into the
248 * residual data area.
249 */
250 if (r3) {
251 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
252 sizeof (bd_t));
253 }
254
255#if defined(CONFIG_BLK_DEV_INITRD)
256 /*
257 * If the init RAM disk has been configured in, and there's a valid
258 * starting address for it, set it up.
259 */
260 if (r4) {
261 initrd_start = r4 + KERNELBASE;
262 initrd_end = r5 + KERNELBASE;
263 }
264#endif /* CONFIG_BLK_DEV_INITRD */
265
266 /* Copy the kernel command line arguments to a safe place. */
267 if (r6) {
268 *(char *) (r7 + KERNELBASE) = 0;
269 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
270 }
271
272 immrbar = binfo->bi_immr_base;
273
274 mpc834x_sys_set_bat();
275
276#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
277 {
278 struct uart_port p;
279
280 memset(&p, 0, sizeof (p));
281 p.iotype = UPIO_MEM;
282 p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4500);
283 p.uartclk = binfo->bi_busfreq;
284
285 gen550_init(0, &p);
286
287 memset(&p, 0, sizeof (p));
288 p.iotype = UPIO_MEM;
289 p.membase = (unsigned char __iomem *)(VIRT_IMMRBAR + 0x4600);
290 p.uartclk = binfo->bi_busfreq;
291
292 gen550_init(1, &p);
293 }
294#endif
295
296 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
297
298 /* setup the PowerPC module struct */
299 ppc_md.setup_arch = mpc834x_sys_setup_arch;
300 ppc_md.show_cpuinfo = mpc834x_sys_show_cpuinfo;
301
302 ppc_md.init_IRQ = mpc834x_sys_init_IRQ;
303 ppc_md.get_irq = ipic_get_irq;
304
305 ppc_md.restart = mpc83xx_restart;
306 ppc_md.power_off = mpc83xx_power_off;
307 ppc_md.halt = mpc83xx_halt;
308
309 ppc_md.find_end_of_memory = mpc83xx_find_end_of_memory;
310 ppc_md.setup_io_mappings = mpc834x_sys_map_io;
311
312 ppc_md.time_init = mpc83xx_time_init;
313 ppc_md.set_rtc_time = NULL;
314 ppc_md.get_rtc_time = NULL;
315 ppc_md.calibrate_decr = mpc83xx_calibrate_decr;
316
317 ppc_md.early_serial_map = mpc83xx_early_serial_map;
318#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
319 ppc_md.progress = gen550_progress;
320#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
321
322 if (ppc_md.progress)
323 ppc_md.progress("mpc834x_sys_init(): exit", 0);
324
325 return;
326}
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h
deleted file mode 100644
index d2e06c95b083..000000000000
--- a/arch/ppc/platforms/83xx/mpc834x_sys.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * MPC834X SYS common board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc.
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#include <linux/init.h>
19#include <syslib/ppc83xx_setup.h>
20#include <asm/ppcboot.h>
21
22#define VIRT_IMMRBAR ((uint)0xfe000000)
23
24#define BCSR_PHYS_ADDR ((uint)0xf8000000)
25#define BCSR_SIZE ((uint)(32 * 1024))
26
27#define BCSR_MISC_REG2_OFF 0x07
28#define BCSR_MISC_REG2_PORESET 0x01
29
30#define BCSR_MISC_REG3_OFF 0x08
31#define BCSR_MISC_REG3_CNFLOCK 0x80
32
33#define PIRQA MPC83xx_IRQ_EXT4
34#define PIRQB MPC83xx_IRQ_EXT5
35#define PIRQC MPC83xx_IRQ_EXT6
36#define PIRQD MPC83xx_IRQ_EXT7
37
38#define MPC83xx_PCI1_LOWER_IO 0x00000000
39#define MPC83xx_PCI1_UPPER_IO 0x00ffffff
40#define MPC83xx_PCI1_LOWER_MEM 0x80000000
41#define MPC83xx_PCI1_UPPER_MEM 0x9fffffff
42#define MPC83xx_PCI1_IO_BASE 0xe2000000
43#define MPC83xx_PCI1_MEM_OFFSET 0x00000000
44#define MPC83xx_PCI1_IO_SIZE 0x01000000
45
46#define MPC83xx_PCI2_LOWER_IO 0x00000000
47#define MPC83xx_PCI2_UPPER_IO 0x00ffffff
48#define MPC83xx_PCI2_LOWER_MEM 0xa0000000
49#define MPC83xx_PCI2_UPPER_MEM 0xbfffffff
50#define MPC83xx_PCI2_IO_BASE 0xe3000000
51#define MPC83xx_PCI2_MEM_OFFSET 0x00000000
52#define MPC83xx_PCI2_IO_SIZE 0x01000000
53
54#endif /* __MACH_MPC83XX_SYS_H__ */
diff --git a/arch/ppc/platforms/85xx/Kconfig b/arch/ppc/platforms/85xx/Kconfig
deleted file mode 100644
index 6f2d0add7de6..000000000000
--- a/arch/ppc/platforms/85xx/Kconfig
+++ /dev/null
@@ -1,106 +0,0 @@
1config 85xx
2 bool
3 depends on E500
4 default y
5
6config PPC_INDIRECT_PCI_BE
7 bool
8 depends on 85xx
9 default y
10
11menu "Freescale 85xx options"
12 depends on E500
13
14choice
15 prompt "Machine Type"
16 depends on 85xx
17 default MPC8540_ADS
18
19config MPC8540_ADS
20 bool "Freescale MPC8540 ADS"
21 help
22 This option enables support for the MPC 8540 ADS evaluation board.
23
24config MPC8548_CDS
25 bool "Freescale MPC8548 CDS"
26 help
27 This option enables support for the MPC8548 CDS evaluation board.
28
29config MPC8555_CDS
30 bool "Freescale MPC8555 CDS"
31 help
32 This option enables support for the MPC8555 CDS evaluation board.
33
34config MPC8560_ADS
35 bool "Freescale MPC8560 ADS"
36 help
37 This option enables support for the MPC 8560 ADS evaluation board.
38
39config SBC8560
40 bool "WindRiver PowerQUICC III SBC8560"
41 help
42 This option enables support for the WindRiver PowerQUICC III
43 SBC8560 board.
44
45config STX_GP3
46 bool "Silicon Turnkey Express GP3"
47 help
48 This option enables support for the Silicon Turnkey Express GP3
49 board.
50
51config TQM8540
52 bool "TQ Components TQM8540"
53 help
54 This option enables support for the TQ Components TQM8540 board.
55
56config TQM8541
57 bool "TQ Components TQM8541"
58 help
59 This option enables support for the TQ Components TQM8541 board.
60
61config TQM8555
62 bool "TQ Components TQM8555"
63 help
64 This option enables support for the TQ Components TQM8555 board.
65
66config TQM8560
67 bool "TQ Components TQM8560"
68 help
69 This option enables support for the TQ Components TQM8560 board.
70
71endchoice
72
73# It's often necessary to know the specific 85xx processor type.
74# Fortunately, it is implied (so far) from the board type, so we
75# don't need to ask more redundant questions.
76config MPC8540
77 bool
78 depends on MPC8540_ADS || TQM8540
79 default y
80
81config MPC8548
82 bool
83 depends on MPC8548_CDS
84 default y
85
86config MPC8555
87 bool
88 depends on MPC8555_CDS || TQM8541 || TQM8555
89 default y
90
91config MPC8560
92 bool
93 depends on SBC8560 || MPC8560_ADS || STX_GP3 || TQM8560
94 default y
95
96config 85xx_PCI2
97 bool "Support for 2nd PCI host controller"
98 depends on MPC8555_CDS
99 default y
100
101config PPC_GEN550
102 bool
103 depends on MPC8540 || SBC8560 || MPC8555
104 default y
105
106endmenu
diff --git a/arch/ppc/platforms/85xx/Makefile b/arch/ppc/platforms/85xx/Makefile
deleted file mode 100644
index 6c4753c144d3..000000000000
--- a/arch/ppc/platforms/85xx/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
1#
2# Makefile for the PowerPC 85xx linux kernel.
3#
4obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads_common.o mpc8540_ads.o
5obj-$(CONFIG_MPC8548_CDS) += mpc85xx_cds_common.o
6obj-$(CONFIG_MPC8555_CDS) += mpc85xx_cds_common.o
7obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads_common.o mpc8560_ads.o
8obj-$(CONFIG_SBC8560) += sbc85xx.o sbc8560.o
9obj-$(CONFIG_STX_GP3) += stx_gp3.o
10obj-$(CONFIG_TQM8540) += tqm85xx.o
11obj-$(CONFIG_TQM8541) += tqm85xx.o
12obj-$(CONFIG_TQM8555) += tqm85xx.o
13obj-$(CONFIG_TQM8560) += tqm85xx.o
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c
deleted file mode 100644
index 00a3ba57063f..000000000000
--- a/arch/ppc/platforms/85xx/mpc8540_ads.c
+++ /dev/null
@@ -1,226 +0,0 @@
1/*
2 * MPC8540ADS board specific routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h>
29#include <linux/initrd.h>
30#include <linux/module.h>
31#include <linux/fsl_devices.h>
32
33#include <asm/system.h>
34#include <asm/pgtable.h>
35#include <asm/page.h>
36#include <asm/atomic.h>
37#include <asm/time.h>
38#include <asm/io.h>
39#include <asm/machdep.h>
40#include <asm/open_pic.h>
41#include <asm/bootinfo.h>
42#include <asm/pci-bridge.h>
43#include <asm/mpc85xx.h>
44#include <asm/irq.h>
45#include <asm/immap_85xx.h>
46#include <asm/kgdb.h>
47#include <asm/ppc_sys.h>
48#include <mm/mmu_decl.h>
49
50#include <syslib/ppc85xx_setup.h>
51
52/* ************************************************************************
53 *
54 * Setup the architecture
55 *
56 */
57static void __init
58mpc8540ads_setup_arch(void)
59{
60 bd_t *binfo = (bd_t *) __res;
61 unsigned int freq;
62 struct gianfar_platform_data *pdata;
63 struct gianfar_mdio_data *mdata;
64
65 /* get the core frequency */
66 freq = binfo->bi_intfreq;
67
68 if (ppc_md.progress)
69 ppc_md.progress("mpc8540ads_setup_arch()", 0);
70
71 /* Set loops_per_jiffy to a half-way reasonable value,
72 for use until calibrate_delay gets called. */
73 loops_per_jiffy = freq / HZ;
74
75#ifdef CONFIG_PCI
76 /* setup PCI host bridges */
77 mpc85xx_setup_hose();
78#endif
79
80#ifdef CONFIG_SERIAL_8250
81 mpc85xx_early_serial_map();
82#endif
83
84#ifdef CONFIG_SERIAL_TEXT_DEBUG
85 /* Invalidate the entry we stole earlier the serial ports
86 * should be properly mapped */
87 invalidate_tlbcam_entry(num_tlbcam_entries - 1);
88#endif
89
90 /* setup the board related info for the MDIO bus */
91 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
92
93 mdata->irq[0] = MPC85xx_IRQ_EXT5;
94 mdata->irq[1] = MPC85xx_IRQ_EXT5;
95 mdata->irq[2] = PHY_POLL;
96 mdata->irq[3] = MPC85xx_IRQ_EXT5;
97 mdata->irq[31] = PHY_POLL;
98
99 /* setup the board related information for the enet controllers */
100 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
101 if (pdata) {
102 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
103 pdata->bus_id = 0;
104 pdata->phy_id = 0;
105 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
106 }
107
108 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
109 if (pdata) {
110 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
111 pdata->bus_id = 0;
112 pdata->phy_id = 1;
113 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
114 }
115
116 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
117 if (pdata) {
118 pdata->board_flags = 0;
119 pdata->bus_id = 0;
120 pdata->phy_id = 3;
121 memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
122 }
123
124#ifdef CONFIG_BLK_DEV_INITRD
125 if (initrd_start)
126 ROOT_DEV = Root_RAM0;
127 else
128#endif
129#ifdef CONFIG_ROOT_NFS
130 ROOT_DEV = Root_NFS;
131#else
132 ROOT_DEV = Root_HDA1;
133#endif
134}
135
136/* ************************************************************************ */
137void __init
138platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
139 unsigned long r6, unsigned long r7)
140{
141 /* parse_bootinfo must always be called first */
142 parse_bootinfo(find_bootinfo());
143
144 /*
145 * If we were passed in a board information, copy it into the
146 * residual data area.
147 */
148 if (r3) {
149 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
150 sizeof (bd_t));
151 }
152#ifdef CONFIG_SERIAL_TEXT_DEBUG
153 {
154 bd_t *binfo = (bd_t *) __res;
155 struct uart_port p;
156
157 /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
158 settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base,
159 binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
160
161 memset(&p, 0, sizeof (p));
162 p.iotype = UPIO_MEM;
163 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
164 p.uartclk = binfo->bi_busfreq;
165
166 gen550_init(0, &p);
167
168 memset(&p, 0, sizeof (p));
169 p.iotype = UPIO_MEM;
170 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
171 p.uartclk = binfo->bi_busfreq;
172
173 gen550_init(1, &p);
174 }
175#endif
176
177#if defined(CONFIG_BLK_DEV_INITRD)
178 /*
179 * If the init RAM disk has been configured in, and there's a valid
180 * starting address for it, set it up.
181 */
182 if (r4) {
183 initrd_start = r4 + KERNELBASE;
184 initrd_end = r5 + KERNELBASE;
185 }
186#endif /* CONFIG_BLK_DEV_INITRD */
187
188 /* Copy the kernel command line arguments to a safe place. */
189
190 if (r6) {
191 *(char *) (r7 + KERNELBASE) = 0;
192 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
193 }
194
195 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
196
197 /* setup the PowerPC module struct */
198 ppc_md.setup_arch = mpc8540ads_setup_arch;
199 ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
200
201 ppc_md.init_IRQ = mpc85xx_ads_init_IRQ;
202 ppc_md.get_irq = openpic_get_irq;
203
204 ppc_md.restart = mpc85xx_restart;
205 ppc_md.power_off = mpc85xx_power_off;
206 ppc_md.halt = mpc85xx_halt;
207
208 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
209
210 ppc_md.time_init = NULL;
211 ppc_md.set_rtc_time = NULL;
212 ppc_md.get_rtc_time = NULL;
213 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
214
215#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
216 ppc_md.progress = gen550_progress;
217#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
218#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
219 ppc_md.early_serial_map = mpc85xx_early_serial_map;
220#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
221
222 if (ppc_md.progress)
223 ppc_md.progress("mpc8540ads_init(): exit", 0);
224
225 return;
226}
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h
deleted file mode 100644
index 7559f9e6fc28..000000000000
--- a/arch/ppc/platforms/85xx/mpc8540_ads.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * MPC8540ADS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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_MPC8540ADS_H__
16#define __MACH_MPC8540ADS_H__
17
18#include <linux/initrd.h>
19#include <syslib/ppc85xx_setup.h>
20#include <platforms/85xx/mpc85xx_ads_common.h>
21
22#endif /* __MACH_MPC8540ADS_H__ */
diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h
deleted file mode 100644
index 4f79c372c4e7..000000000000
--- a/arch/ppc/platforms/85xx/mpc8555_cds.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * MPC8555CDS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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_MPC8555CDS_H__
16#define __MACH_MPC8555CDS_H__
17
18#include <syslib/ppc85xx_setup.h>
19#include <platforms/85xx/mpc85xx_cds_common.h>
20
21#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
22
23#endif /* __MACH_MPC8555CDS_H__ */
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c
deleted file mode 100644
index 3a060468dd95..000000000000
--- a/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ /dev/null
@@ -1,303 +0,0 @@
1/*
2 * MPC8560ADS board specific routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h>
29#include <linux/initrd.h>
30#include <linux/module.h>
31#include <linux/fsl_devices.h>
32#include <linux/fs_enet_pd.h>
33
34#include <asm/system.h>
35#include <asm/pgtable.h>
36#include <asm/page.h>
37#include <asm/atomic.h>
38#include <asm/time.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/open_pic.h>
42#include <asm/bootinfo.h>
43#include <asm/pci-bridge.h>
44#include <asm/mpc85xx.h>
45#include <asm/irq.h>
46#include <asm/immap_85xx.h>
47#include <asm/kgdb.h>
48#include <asm/ppc_sys.h>
49#include <asm/cpm2.h>
50#include <mm/mmu_decl.h>
51
52#include <syslib/cpm2_pic.h>
53#include <syslib/ppc85xx_common.h>
54#include <syslib/ppc85xx_setup.h>
55
56
57/* ************************************************************************
58 *
59 * Setup the architecture
60 *
61 */
62static void init_fcc_ioports(void)
63{
64 struct immap *immap;
65 struct io_port *io;
66 u32 tempval;
67
68 immap = cpm2_immr;
69
70 io = &immap->im_ioport;
71 /* FCC2/3 are on the ports B/C. */
72 tempval = in_be32(&io->iop_pdirb);
73 tempval &= ~PB2_DIRB0;
74 tempval |= PB2_DIRB1;
75 out_be32(&io->iop_pdirb, tempval);
76
77 tempval = in_be32(&io->iop_psorb);
78 tempval &= ~PB2_PSORB0;
79 tempval |= PB2_PSORB1;
80 out_be32(&io->iop_psorb, tempval);
81
82 tempval = in_be32(&io->iop_pparb);
83 tempval |= (PB2_DIRB0 | PB2_DIRB1);
84 out_be32(&io->iop_pparb, tempval);
85
86 tempval = in_be32(&io->iop_pdirb);
87 tempval &= ~PB3_DIRB0;
88 tempval |= PB3_DIRB1;
89 out_be32(&io->iop_pdirb, tempval);
90
91 tempval = in_be32(&io->iop_psorb);
92 tempval &= ~PB3_PSORB0;
93 tempval |= PB3_PSORB1;
94 out_be32(&io->iop_psorb, tempval);
95
96 tempval = in_be32(&io->iop_pparb);
97 tempval |= (PB3_DIRB0 | PB3_DIRB1);
98 out_be32(&io->iop_pparb, tempval);
99
100 tempval = in_be32(&io->iop_pdirc);
101 tempval |= PC3_DIRC1;
102 out_be32(&io->iop_pdirc, tempval);
103
104 tempval = in_be32(&io->iop_pparc);
105 tempval |= PC3_DIRC1;
106 out_be32(&io->iop_pparc, tempval);
107
108 /* Port C has clocks...... */
109 tempval = in_be32(&io->iop_psorc);
110 tempval &= ~(CLK_TRX);
111 out_be32(&io->iop_psorc, tempval);
112
113 tempval = in_be32(&io->iop_pdirc);
114 tempval &= ~(CLK_TRX);
115 out_be32(&io->iop_pdirc, tempval);
116 tempval = in_be32(&io->iop_pparc);
117 tempval |= (CLK_TRX);
118 out_be32(&io->iop_pparc, tempval);
119
120 /* Configure Serial Interface clock routing.
121 * First, clear all FCC bits to zero,
122 * then set the ones we want.
123 */
124 immap->im_cpmux.cmx_fcr &= ~(CPMUX_CLK_MASK);
125 immap->im_cpmux.cmx_fcr |= CPMUX_CLK_ROUTE;
126}
127
128static void __init
129mpc8560ads_setup_arch(void)
130{
131 bd_t *binfo = (bd_t *) __res;
132 unsigned int freq;
133 struct gianfar_platform_data *pdata;
134 struct gianfar_mdio_data *mdata;
135 struct fs_platform_info *fpi;
136
137 cpm2_reset();
138
139 /* get the core frequency */
140 freq = binfo->bi_intfreq;
141
142 if (ppc_md.progress)
143 ppc_md.progress("mpc8560ads_setup_arch()", 0);
144
145 /* Set loops_per_jiffy to a half-way reasonable value,
146 for use until calibrate_delay gets called. */
147 loops_per_jiffy = freq / HZ;
148
149#ifdef CONFIG_PCI
150 /* setup PCI host bridges */
151 mpc85xx_setup_hose();
152#endif
153
154 /* setup the board related info for the MDIO bus */
155 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
156
157 mdata->irq[0] = MPC85xx_IRQ_EXT5;
158 mdata->irq[1] = MPC85xx_IRQ_EXT5;
159 mdata->irq[2] = PHY_POLL;
160 mdata->irq[3] = MPC85xx_IRQ_EXT5;
161 mdata->irq[31] = PHY_POLL;
162
163 /* setup the board related information for the enet controllers */
164 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
165 if (pdata) {
166 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
167 pdata->bus_id = 0;
168 pdata->phy_id = 0;
169 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
170 }
171
172 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
173 if (pdata) {
174 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
175 pdata->bus_id = 0;
176 pdata->phy_id = 1;
177 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
178 }
179
180 init_fcc_ioports();
181 ppc_sys_device_remove(MPC85xx_CPM_FCC1);
182
183 fpi = (struct fs_platform_info *) ppc_sys_get_pdata(MPC85xx_CPM_FCC2);
184 if (fpi) {
185 memcpy(fpi->macaddr, binfo->bi_enet2addr, 6);
186 fpi->bus_id = "0:02";
187 fpi->phy_addr = 2;
188 fpi->dpram_offset = (u32)cpm2_immr->im_dprambase;
189 fpi->fcc_regs_c = (u32)&cpm2_immr->im_fcc_c[1];
190 }
191
192 fpi = (struct fs_platform_info *) ppc_sys_get_pdata(MPC85xx_CPM_FCC3);
193 if (fpi) {
194 memcpy(fpi->macaddr, binfo->bi_enet2addr, 6);
195 fpi->macaddr[5] += 1;
196 fpi->bus_id = "0:03";
197 fpi->phy_addr = 3;
198 fpi->dpram_offset = (u32)cpm2_immr->im_dprambase;
199 fpi->fcc_regs_c = (u32)&cpm2_immr->im_fcc_c[2];
200 }
201
202#ifdef CONFIG_BLK_DEV_INITRD
203 if (initrd_start)
204 ROOT_DEV = Root_RAM0;
205 else
206#endif
207#ifdef CONFIG_ROOT_NFS
208 ROOT_DEV = Root_NFS;
209#else
210 ROOT_DEV = Root_HDA1;
211#endif
212}
213
214static irqreturn_t cpm2_cascade(int irq, void *dev_id)
215{
216 while ((irq = cpm2_get_irq()) >= 0)
217 __do_IRQ(irq);
218 return IRQ_HANDLED;
219}
220
221static struct irqaction cpm2_irqaction = {
222 .handler = cpm2_cascade,
223 .flags = IRQF_DISABLED,
224 .mask = CPU_MASK_NONE,
225 .name = "cpm2_cascade",
226};
227
228static void __init
229mpc8560_ads_init_IRQ(void)
230{
231 /* Setup OpenPIC */
232 mpc85xx_ads_init_IRQ();
233
234 /* Setup CPM2 PIC */
235 cpm2_init_IRQ();
236
237 setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
238
239 return;
240}
241
242
243
244/* ************************************************************************ */
245void __init
246platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
247 unsigned long r6, unsigned long r7)
248{
249 /* parse_bootinfo must always be called first */
250 parse_bootinfo(find_bootinfo());
251
252 /*
253 * If we were passed in a board information, copy it into the
254 * residual data area.
255 */
256 if (r3) {
257 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
258 sizeof (bd_t));
259
260 }
261#if defined(CONFIG_BLK_DEV_INITRD)
262 /*
263 * If the init RAM disk has been configured in, and there's a valid
264 * starting address for it, set it up.
265 */
266 if (r4) {
267 initrd_start = r4 + KERNELBASE;
268 initrd_end = r5 + KERNELBASE;
269 }
270#endif /* CONFIG_BLK_DEV_INITRD */
271
272 /* Copy the kernel command line arguments to a safe place. */
273
274 if (r6) {
275 *(char *) (r7 + KERNELBASE) = 0;
276 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
277 }
278
279 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
280
281 /* setup the PowerPC module struct */
282 ppc_md.setup_arch = mpc8560ads_setup_arch;
283 ppc_md.show_cpuinfo = mpc85xx_ads_show_cpuinfo;
284
285 ppc_md.init_IRQ = mpc8560_ads_init_IRQ;
286 ppc_md.get_irq = openpic_get_irq;
287
288 ppc_md.restart = mpc85xx_restart;
289 ppc_md.power_off = mpc85xx_power_off;
290 ppc_md.halt = mpc85xx_halt;
291
292 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
293
294 ppc_md.time_init = NULL;
295 ppc_md.set_rtc_time = NULL;
296 ppc_md.get_rtc_time = NULL;
297 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
298
299 if (ppc_md.progress)
300 ppc_md.progress("mpc8560ads_init(): exit", 0);
301
302 return;
303}
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h
deleted file mode 100644
index 9f185ab2e019..000000000000
--- a/arch/ppc/platforms/85xx/mpc8560_ads.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * MPC8540ADS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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_MPC8560ADS_H
16#define __MACH_MPC8560ADS_H
17
18#include <syslib/ppc85xx_setup.h>
19#include <platforms/85xx/mpc85xx_ads_common.h>
20
21#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
22#define PHY_INTERRUPT MPC85xx_IRQ_EXT7
23
24#endif /* __MACH_MPC8560ADS_H */
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
deleted file mode 100644
index 674806e001f6..000000000000
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
+++ /dev/null
@@ -1,198 +0,0 @@
1/*
2 * MPC85xx ADS board common routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/serial.h>
26#include <linux/module.h>
27
28#include <asm/system.h>
29#include <asm/pgtable.h>
30#include <asm/page.h>
31#include <asm/atomic.h>
32#include <asm/time.h>
33#include <asm/io.h>
34#include <asm/machdep.h>
35#include <asm/open_pic.h>
36#include <asm/bootinfo.h>
37#include <asm/pci-bridge.h>
38#include <asm/mpc85xx.h>
39#include <asm/irq.h>
40#include <asm/immap_85xx.h>
41#include <asm/ppc_sys.h>
42
43#include <mm/mmu_decl.h>
44
45#include <syslib/ppc85xx_rio.h>
46
47#include <platforms/85xx/mpc85xx_ads_common.h>
48
49#ifndef CONFIG_PCI
50unsigned long isa_io_base = 0;
51unsigned long isa_mem_base = 0;
52#endif
53
54extern unsigned long total_memory; /* in mm/init */
55
56unsigned char __res[sizeof (bd_t)];
57
58/* Internal interrupts are all Level Sensitive, and Positive Polarity */
59static u_char mpc85xx_ads_openpic_initsenses[] __initdata = {
60 MPC85XX_INTERNAL_IRQ_SENSES,
61 0x0, /* External 0: */
62#if defined(CONFIG_PCI)
63 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */
64 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI slot 1 */
65 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI slot 2 */
66 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 4: PCI slot 3 */
67#else
68 0x0, /* External 1: */
69 0x0, /* External 2: */
70 0x0, /* External 3: */
71 0x0, /* External 4: */
72#endif
73 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */
74 0x0, /* External 6: */
75 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */
76 0x0, /* External 8: */
77 0x0, /* External 9: */
78 0x0, /* External 10: */
79 0x0, /* External 11: */
80};
81
82/* ************************************************************************ */
83int
84mpc85xx_ads_show_cpuinfo(struct seq_file *m)
85{
86 uint pvid, svid, phid1;
87 uint memsize = total_memory;
88 bd_t *binfo = (bd_t *) __res;
89 unsigned int freq;
90
91 /* get the core frequency */
92 freq = binfo->bi_intfreq;
93
94 pvid = mfspr(SPRN_PVR);
95 svid = mfspr(SPRN_SVR);
96
97 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
98 seq_printf(m, "Machine\t\t: mpc%sads\n", cur_ppc_sys_spec->ppc_sys_name);
99 seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
100 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
101 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
102
103 /* Display cpu Pll setting */
104 phid1 = mfspr(SPRN_HID1);
105 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
106
107 /* Display the amount of memory */
108 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
109
110 return 0;
111}
112
113void __init
114mpc85xx_ads_init_IRQ(void)
115{
116 bd_t *binfo = (bd_t *) __res;
117 /* Determine the Physical Address of the OpenPIC regs */
118 phys_addr_t OpenPIC_PAddr =
119 binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
120 OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
121 OpenPIC_InitSenses = mpc85xx_ads_openpic_initsenses;
122 OpenPIC_NumInitSenses = sizeof (mpc85xx_ads_openpic_initsenses);
123
124 /* Skip reserved space and internal sources */
125 openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
126 /* Map PIC IRQs 0-11 */
127 openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000);
128
129 /* we let openpic interrupts starting from an offset, to
130 * leave space for cascading interrupts underneath.
131 */
132 openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
133
134 return;
135}
136
137#ifdef CONFIG_PCI
138/*
139 * interrupt routing
140 */
141
142int
143mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
144{
145 static char pci_irq_table[][4] =
146 /*
147 * This is little evil, but works around the fact
148 * that revA boards have IDSEL starting at 18
149 * and others boards (older) start at 12
150 *
151 * PCI IDSEL/INTPIN->INTLINE
152 * A B C D
153 */
154 {
155 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 2 */
156 {PIRQD, PIRQA, PIRQB, PIRQC},
157 {PIRQC, PIRQD, PIRQA, PIRQB},
158 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 5 */
159 {0, 0, 0, 0}, /* -- */
160 {0, 0, 0, 0}, /* -- */
161 {0, 0, 0, 0}, /* -- */
162 {0, 0, 0, 0}, /* -- */
163 {0, 0, 0, 0}, /* -- */
164 {0, 0, 0, 0}, /* -- */
165 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 12 */
166 {PIRQD, PIRQA, PIRQB, PIRQC},
167 {PIRQC, PIRQD, PIRQA, PIRQB},
168 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 15 */
169 {0, 0, 0, 0}, /* -- */
170 {0, 0, 0, 0}, /* -- */
171 {PIRQA, PIRQB, PIRQC, PIRQD}, /* IDSEL 18 */
172 {PIRQD, PIRQA, PIRQB, PIRQC},
173 {PIRQC, PIRQD, PIRQA, PIRQB},
174 {PIRQB, PIRQC, PIRQD, PIRQA}, /* IDSEL 21 */
175 };
176
177 const long min_idsel = 2, max_idsel = 21, irqs_per_slot = 4;
178 return PCI_IRQ_TABLE_LOOKUP;
179}
180
181int
182mpc85xx_exclude_device(u_char bus, u_char devfn)
183{
184 if (bus == 0 && PCI_SLOT(devfn) == 0)
185 return PCIBIOS_DEVICE_NOT_FOUND;
186 else
187 return PCIBIOS_SUCCESSFUL;
188}
189
190#endif /* CONFIG_PCI */
191
192#ifdef CONFIG_RAPIDIO
193void platform_rio_init(void)
194{
195 /* 512MB RIO LAW at 0xc0000000 */
196 mpc85xx_rio_setup(0xc0000000, 0x20000000);
197}
198#endif /* CONFIG_RAPIDIO */
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
deleted file mode 100644
index c8c322fe3680..000000000000
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * MPC85XX ADS common board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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_MPC85XX_ADS_H__
16#define __MACH_MPC85XX_ADS_H__
17
18#include <linux/init.h>
19#include <asm/ppcboot.h>
20
21#define BOARD_CCSRBAR ((uint)0xe0000000)
22#define BCSR_ADDR ((uint)0xf8000000)
23#define BCSR_SIZE ((uint)(32 * 1024))
24
25struct seq_file;
26
27extern int mpc85xx_ads_show_cpuinfo(struct seq_file *m);
28extern void mpc85xx_ads_init_IRQ(void) __init;
29extern void mpc85xx_ads_map_io(void) __init;
30
31/* PCI interrupt controller */
32#define PIRQA MPC85xx_IRQ_EXT1
33#define PIRQB MPC85xx_IRQ_EXT2
34#define PIRQC MPC85xx_IRQ_EXT3
35#define PIRQD MPC85xx_IRQ_EXT4
36
37#define MPC85XX_PCI1_LOWER_IO 0x00000000
38#define MPC85XX_PCI1_UPPER_IO 0x00ffffff
39
40#define MPC85XX_PCI1_LOWER_MEM 0x80000000
41#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
42
43#define MPC85XX_PCI1_IO_BASE 0xe2000000
44#define MPC85XX_PCI1_MEM_OFFSET 0x00000000
45
46#define MPC85XX_PCI1_IO_SIZE 0x01000000
47
48/* FCC1 Clock Source Configuration. These can be
49 * redefined in the board specific file.
50 * Can only choose from CLK9-12 */
51#define F1_RXCLK 12
52#define F1_TXCLK 11
53
54/* FCC2 Clock Source Configuration. These can be
55 * redefined in the board specific file.
56 * Can only choose from CLK13-16 */
57#define F2_RXCLK 13
58#define F2_TXCLK 14
59
60/* FCC3 Clock Source Configuration. These can be
61 * redefined in the board specific file.
62 * Can only choose from CLK13-16 */
63#define F3_RXCLK 15
64#define F3_TXCLK 16
65
66
67#endif /* __MACH_MPC85XX_ADS_H__ */
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
deleted file mode 100644
index 2d59eb776c95..000000000000
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ /dev/null
@@ -1,601 +0,0 @@
1/*
2 * MPC85xx CDS board specific routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor, Inc
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/serial.h>
26#include <linux/module.h>
27#include <linux/root_dev.h>
28#include <linux/initrd.h>
29#include <linux/tty.h>
30#include <linux/serial_core.h>
31#include <linux/fsl_devices.h>
32
33#include <asm/system.h>
34#include <asm/pgtable.h>
35#include <asm/page.h>
36#include <asm/atomic.h>
37#include <asm/time.h>
38#include <asm/todc.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/open_pic.h>
42#include <asm/i8259.h>
43#include <asm/bootinfo.h>
44#include <asm/pci-bridge.h>
45#include <asm/mpc85xx.h>
46#include <asm/irq.h>
47#include <asm/immap_85xx.h>
48#include <asm/cpm2.h>
49#include <asm/ppc_sys.h>
50#include <asm/kgdb.h>
51
52#include <mm/mmu_decl.h>
53#include <syslib/cpm2_pic.h>
54#include <syslib/ppc85xx_common.h>
55#include <syslib/ppc85xx_setup.h>
56
57
58#ifndef CONFIG_PCI
59unsigned long isa_io_base = 0;
60unsigned long isa_mem_base = 0;
61#endif
62
63extern unsigned long total_memory; /* in mm/init */
64
65unsigned char __res[sizeof (bd_t)];
66
67static int cds_pci_slot = 2;
68static volatile u8 * cadmus;
69
70/* Internal interrupts are all Level Sensitive, and Positive Polarity */
71static u_char mpc85xx_cds_openpic_initsenses[] __initdata = {
72 MPC85XX_INTERNAL_IRQ_SENSES,
73#if defined(CONFIG_PCI)
74 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 0: PCI1 slot */
75 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI1 slot */
76 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI1 slot */
77 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI1 slot */
78#else
79 0x0, /* External 0: */
80 0x0, /* External 1: */
81 0x0, /* External 2: */
82 0x0, /* External 3: */
83#endif
84 0x0, /* External 4: */
85 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */
86 0x0, /* External 6: */
87 0x0, /* External 7: */
88 0x0, /* External 8: */
89 0x0, /* External 9: */
90 0x0, /* External 10: */
91#if defined(CONFIG_85xx_PCI2) && defined(CONFIG_PCI)
92 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 11: PCI2 slot 0 */
93#else
94 0x0, /* External 11: */
95#endif
96};
97
98/* ************************************************************************ */
99int
100mpc85xx_cds_show_cpuinfo(struct seq_file *m)
101{
102 uint pvid, svid, phid1;
103 uint memsize = total_memory;
104 bd_t *binfo = (bd_t *) __res;
105 unsigned int freq;
106
107 /* get the core frequency */
108 freq = binfo->bi_intfreq;
109
110 pvid = mfspr(SPRN_PVR);
111 svid = mfspr(SPRN_SVR);
112
113 seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
114 seq_printf(m, "Machine\t\t: CDS - MPC%s (%x)\n", cur_ppc_sys_spec->ppc_sys_name, cadmus[CM_VER]);
115 seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
116 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
117 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
118
119 /* Display cpu Pll setting */
120 phid1 = mfspr(SPRN_HID1);
121 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
122
123 /* Display the amount of memory */
124 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
125
126 return 0;
127}
128
129#ifdef CONFIG_CPM2
130static irqreturn_t cpm2_cascade(int irq, void *dev_id)
131{
132 while((irq = cpm2_get_irq()) >= 0)
133 __do_IRQ(irq);
134 return IRQ_HANDLED;
135}
136
137static struct irqaction cpm2_irqaction = {
138 .handler = cpm2_cascade,
139 .flags = IRQF_DISABLED,
140 .mask = CPU_MASK_NONE,
141 .name = "cpm2_cascade",
142};
143#endif /* CONFIG_CPM2 */
144
145void __init
146mpc85xx_cds_init_IRQ(void)
147{
148 bd_t *binfo = (bd_t *) __res;
149 int i;
150
151 /* Determine the Physical Address of the OpenPIC regs */
152 phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
153 OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
154 OpenPIC_InitSenses = mpc85xx_cds_openpic_initsenses;
155 OpenPIC_NumInitSenses = sizeof (mpc85xx_cds_openpic_initsenses);
156
157 /* Skip reserved space and internal sources */
158#ifdef CONFIG_MPC8548
159 openpic_set_sources(0, 48, OpenPIC_Addr + 0x10200);
160#else
161 openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
162#endif
163 /* Map PIC IRQs 0-11 */
164 openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000);
165
166 /* we let openpic interrupts starting from an offset, to
167 * leave space for cascading interrupts underneath.
168 */
169 openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
170
171#ifdef CONFIG_PCI
172 openpic_hookup_cascade(PIRQ0A, "82c59 cascade", i8259_irq);
173
174 i8259_init(0, 0);
175#endif
176
177#ifdef CONFIG_CPM2
178 /* Setup CPM2 PIC */
179 cpm2_init_IRQ();
180
181 setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
182#endif
183
184 return;
185}
186
187#ifdef CONFIG_PCI
188/*
189 * interrupt routing
190 */
191int
192mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
193{
194 struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
195
196 if (!hose->index)
197 {
198 /* Handle PCI1 interrupts */
199 char pci_irq_table[][4] =
200 /*
201 * PCI IDSEL/INTPIN->INTLINE
202 * A B C D
203 */
204
205 /* Note IRQ assignment for slots is based on which slot the elysium is
206 * in -- in this setup elysium is in slot #2 (this PIRQA as first
207 * interrupt on slot */
208 {
209 { 0, 1, 2, 3 }, /* 16 - PMC */
210 { 0, 1, 2, 3 }, /* 17 P2P (Tsi320) */
211 { 0, 1, 2, 3 }, /* 18 - Slot 1 */
212 { 1, 2, 3, 0 }, /* 19 - Slot 2 */
213 { 2, 3, 0, 1 }, /* 20 - Slot 3 */
214 { 3, 0, 1, 2 }, /* 21 - Slot 4 */
215 };
216
217 const long min_idsel = 16, max_idsel = 21, irqs_per_slot = 4;
218 int i, j;
219
220 for (i = 0; i < 6; i++)
221 for (j = 0; j < 4; j++)
222 pci_irq_table[i][j] =
223 ((pci_irq_table[i][j] + 5 -
224 cds_pci_slot) & 0x3) + PIRQ0A;
225
226 return PCI_IRQ_TABLE_LOOKUP;
227 } else {
228 /* Handle PCI2 interrupts (if we have one) */
229 char pci_irq_table[][4] =
230 {
231 /*
232 * We only have one slot and one interrupt
233 * going to PIRQA - PIRQD */
234 { PIRQ1A, PIRQ1A, PIRQ1A, PIRQ1A }, /* 21 - slot 0 */
235 };
236
237 const long min_idsel = 21, max_idsel = 21, irqs_per_slot = 4;
238
239 return PCI_IRQ_TABLE_LOOKUP;
240 }
241}
242
243#define ARCADIA_HOST_BRIDGE_IDSEL 17
244#define ARCADIA_2ND_BRIDGE_IDSEL 3
245
246extern int mpc85xx_pci1_last_busno;
247
248int
249mpc85xx_exclude_device(u_char bus, u_char devfn)
250{
251 if (bus == 0 && PCI_SLOT(devfn) == 0)
252 return PCIBIOS_DEVICE_NOT_FOUND;
253#ifdef CONFIG_85xx_PCI2
254 if (mpc85xx_pci1_last_busno)
255 if (bus == (mpc85xx_pci1_last_busno + 1) && PCI_SLOT(devfn) == 0)
256 return PCIBIOS_DEVICE_NOT_FOUND;
257#endif
258 /* We explicitly do not go past the Tundra 320 Bridge */
259 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
260 return PCIBIOS_DEVICE_NOT_FOUND;
261 if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
262 return PCIBIOS_DEVICE_NOT_FOUND;
263 else
264 return PCIBIOS_SUCCESSFUL;
265}
266
267void __init
268mpc85xx_cds_enable_via(struct pci_controller *hose)
269{
270 u32 pci_class;
271 u16 vid, did;
272
273 early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class);
274 if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI)
275 return;
276
277 /* Configure P2P so that we can reach bus 1 */
278 early_write_config_byte(hose, 0, 0x88, PCI_PRIMARY_BUS, 0);
279 early_write_config_byte(hose, 0, 0x88, PCI_SECONDARY_BUS, 1);
280 early_write_config_byte(hose, 0, 0x88, PCI_SUBORDINATE_BUS, 0xff);
281
282 early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid);
283 early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did);
284
285 if ((vid != PCI_VENDOR_ID_VIA) ||
286 (did != PCI_DEVICE_ID_VIA_82C686))
287 return;
288
289 /* Enable USB and IDE functions */
290 early_write_config_byte(hose, 1, 0x10, 0x48, 0x08);
291}
292
293void __init
294mpc85xx_cds_fixup_via(struct pci_controller *hose)
295{
296 u32 pci_class;
297 u16 vid, did;
298
299 early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class);
300 if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI)
301 return;
302
303 /*
304 * Force the backplane P2P bridge to have a window
305 * open from 0x00000000-0x00001fff in PCI I/O space.
306 * This allows legacy I/O (i8259, etc) on the VIA
307 * southbridge to be accessed.
308 */
309 early_write_config_byte(hose, 0, 0x88, PCI_IO_BASE, 0x00);
310 early_write_config_word(hose, 0, 0x88, PCI_IO_BASE_UPPER16, 0x0000);
311 early_write_config_byte(hose, 0, 0x88, PCI_IO_LIMIT, 0x10);
312 early_write_config_word(hose, 0, 0x88, PCI_IO_LIMIT_UPPER16, 0x0000);
313
314 early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid);
315 early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did);
316 if ((vid != PCI_VENDOR_ID_VIA) ||
317 (did != PCI_DEVICE_ID_VIA_82C686))
318 return;
319
320 /*
321 * Since the P2P window was forced to cover the fixed
322 * legacy I/O addresses, it is necessary to manually
323 * place the base addresses for the IDE and USB functions
324 * within this window.
325 */
326 /* Function 1, IDE */
327 early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_0, 0x1ff8);
328 early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_1, 0x1ff4);
329 early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_2, 0x1fe8);
330 early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_3, 0x1fe4);
331 early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_4, 0x1fd0);
332
333 /* Function 2, USB ports 0-1 */
334 early_write_config_dword(hose, 1, 0x12, PCI_BASE_ADDRESS_4, 0x1fa0);
335
336 /* Function 3, USB ports 2-3 */
337 early_write_config_dword(hose, 1, 0x13, PCI_BASE_ADDRESS_4, 0x1f80);
338
339 /* Function 5, Power Management */
340 early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_0, 0x1e00);
341 early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_1, 0x1dfc);
342 early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_2, 0x1df8);
343
344 /* Function 6, AC97 Interface */
345 early_write_config_dword(hose, 1, 0x16, PCI_BASE_ADDRESS_0, 0x1c00);
346}
347
348void __init
349mpc85xx_cds_pcibios_fixup(void)
350{
351 struct pci_dev *dev;
352 u_char c;
353
354 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
355 PCI_DEVICE_ID_VIA_82C586_1, NULL))) {
356 /*
357 * U-Boot does not set the enable bits
358 * for the IDE device. Force them on here.
359 */
360 pci_read_config_byte(dev, 0x40, &c);
361 c |= 0x03; /* IDE: Chip Enable Bits */
362 pci_write_config_byte(dev, 0x40, c);
363
364 /*
365 * Since only primary interface works, force the
366 * IDE function to standard primary IDE interrupt
367 * w/ 8259 offset
368 */
369 dev->irq = 14;
370 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
371 pci_dev_put(dev);
372 }
373
374 /*
375 * Force legacy USB interrupt routing
376 */
377 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
378 PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
379 dev->irq = 10;
380 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
381
382 if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
383 PCI_DEVICE_ID_VIA_82C586_2, dev))) {
384 dev->irq = 11;
385 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
386 }
387 pci_dev_put(dev);
388 }
389}
390#endif /* CONFIG_PCI */
391
392TODC_ALLOC();
393
394/* ************************************************************************
395 *
396 * Setup the architecture
397 *
398 */
399static void __init
400mpc85xx_cds_setup_arch(void)
401{
402 bd_t *binfo = (bd_t *) __res;
403 unsigned int freq;
404 struct gianfar_platform_data *pdata;
405 struct gianfar_mdio_data *mdata;
406
407 /* get the core frequency */
408 freq = binfo->bi_intfreq;
409
410 printk("mpc85xx_cds_setup_arch\n");
411
412#ifdef CONFIG_CPM2
413 cpm2_reset();
414#endif
415
416 cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE);
417 cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1;
418 printk("CDS Version = %x in PCI slot %d\n", cadmus[CM_VER], cds_pci_slot);
419
420 /* Setup TODC access */
421 TODC_INIT(TODC_TYPE_DS1743,
422 0,
423 0,
424 ioremap(CDS_RTC_ADDR, CDS_RTC_SIZE),
425 8);
426
427 /* Set loops_per_jiffy to a half-way reasonable value,
428 for use until calibrate_delay gets called. */
429 loops_per_jiffy = freq / HZ;
430
431#ifdef CONFIG_PCI
432 /* VIA IDE configuration */
433 ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
434
435 /* setup PCI host bridges */
436 mpc85xx_setup_hose();
437#endif
438
439#ifdef CONFIG_SERIAL_8250
440 mpc85xx_early_serial_map();
441#endif
442
443#ifdef CONFIG_SERIAL_TEXT_DEBUG
444 /* Invalidate the entry we stole earlier the serial ports
445 * should be properly mapped */
446 invalidate_tlbcam_entry(num_tlbcam_entries - 1);
447#endif
448
449 /* setup the board related info for the MDIO bus */
450 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
451
452 mdata->irq[0] = MPC85xx_IRQ_EXT5;
453 mdata->irq[1] = MPC85xx_IRQ_EXT5;
454 mdata->irq[2] = PHY_POLL;
455 mdata->irq[3] = PHY_POLL;
456 mdata->irq[31] = PHY_POLL;
457
458 /* setup the board related information for the enet controllers */
459 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
460 if (pdata) {
461 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
462 pdata->bus_id = 0;
463 pdata->phy_id = 0;
464 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
465 }
466
467 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
468 if (pdata) {
469 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
470 pdata->bus_id = 0;
471 pdata->phy_id = 1;
472 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
473 }
474
475 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC1);
476 if (pdata) {
477 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
478 pdata->bus_id = 0;
479 pdata->phy_id = 0;
480 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
481 }
482
483 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC2);
484 if (pdata) {
485 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
486 pdata->bus_id = 0;
487 pdata->phy_id = 1;
488 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
489 }
490
491 ppc_sys_device_remove(MPC85xx_eTSEC3);
492 ppc_sys_device_remove(MPC85xx_eTSEC4);
493
494#ifdef CONFIG_BLK_DEV_INITRD
495 if (initrd_start)
496 ROOT_DEV = Root_RAM0;
497 else
498#endif
499#ifdef CONFIG_ROOT_NFS
500 ROOT_DEV = Root_NFS;
501#else
502 ROOT_DEV = Root_HDA1;
503#endif
504}
505
506/* ************************************************************************ */
507void __init
508platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
509 unsigned long r6, unsigned long r7)
510{
511 /* parse_bootinfo must always be called first */
512 parse_bootinfo(find_bootinfo());
513
514 /*
515 * If we were passed in a board information, copy it into the
516 * residual data area.
517 */
518 if (r3) {
519 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
520 sizeof (bd_t));
521
522 }
523#ifdef CONFIG_SERIAL_TEXT_DEBUG
524 {
525 bd_t *binfo = (bd_t *) __res;
526 struct uart_port p;
527
528 /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
529 settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base,
530 binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
531
532 memset(&p, 0, sizeof (p));
533 p.iotype = UPIO_MEM;
534 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
535 p.uartclk = binfo->bi_busfreq;
536
537 gen550_init(0, &p);
538
539 memset(&p, 0, sizeof (p));
540 p.iotype = UPIO_MEM;
541 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
542 p.uartclk = binfo->bi_busfreq;
543
544 gen550_init(1, &p);
545 }
546#endif
547
548#if defined(CONFIG_BLK_DEV_INITRD)
549 /*
550 * If the init RAM disk has been configured in, and there's a valid
551 * starting address for it, set it up.
552 */
553 if (r4) {
554 initrd_start = r4 + KERNELBASE;
555 initrd_end = r5 + KERNELBASE;
556 }
557#endif /* CONFIG_BLK_DEV_INITRD */
558
559 /* Copy the kernel command line arguments to a safe place. */
560
561 if (r6) {
562 *(char *) (r7 + KERNELBASE) = 0;
563 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
564 }
565
566 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
567
568 /* setup the PowerPC module struct */
569 ppc_md.setup_arch = mpc85xx_cds_setup_arch;
570 ppc_md.show_cpuinfo = mpc85xx_cds_show_cpuinfo;
571
572 ppc_md.init_IRQ = mpc85xx_cds_init_IRQ;
573 ppc_md.get_irq = openpic_get_irq;
574
575 ppc_md.restart = mpc85xx_restart;
576 ppc_md.power_off = mpc85xx_power_off;
577 ppc_md.halt = mpc85xx_halt;
578
579 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
580
581 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
582
583 ppc_md.time_init = todc_time_init;
584 ppc_md.set_rtc_time = todc_set_rtc_time;
585 ppc_md.get_rtc_time = todc_get_rtc_time;
586
587 ppc_md.nvram_read_val = todc_direct_read_val;
588 ppc_md.nvram_write_val = todc_direct_write_val;
589
590#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
591 ppc_md.progress = gen550_progress;
592#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
593#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
594 ppc_md.early_serial_map = mpc85xx_early_serial_map;
595#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
596
597 if (ppc_md.progress)
598 ppc_md.progress("mpc85xx_cds_init(): exit", 0);
599
600 return;
601}
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
deleted file mode 100644
index 32c5455c8b82..000000000000
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * MPC85xx CDS board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor, Inc
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_MPC85XX_CDS_H__
16#define __MACH_MPC85XX_CDS_H__
17
18#include <linux/serial.h>
19#include <asm/ppcboot.h>
20#include <linux/initrd.h>
21#include <syslib/ppc85xx_setup.h>
22
23#define BOARD_CCSRBAR ((uint)0xe0000000)
24#define CCSRBAR_SIZE ((uint)1024*1024)
25
26/* CADMUS info */
27#define CADMUS_BASE (0xf8004000)
28#define CADMUS_SIZE (256)
29#define CM_VER (0)
30#define CM_CSR (1)
31#define CM_RST (2)
32
33/* CDS NVRAM/RTC */
34#define CDS_RTC_ADDR (0xf8000000)
35#define CDS_RTC_SIZE (8 * 1024)
36
37/* PCI config */
38#define PCI1_CFG_ADDR_OFFSET (0x8000)
39#define PCI1_CFG_DATA_OFFSET (0x8004)
40
41#define PCI2_CFG_ADDR_OFFSET (0x9000)
42#define PCI2_CFG_DATA_OFFSET (0x9004)
43
44/* PCI interrupt controller */
45#define PIRQ0A MPC85xx_IRQ_EXT0
46#define PIRQ0B MPC85xx_IRQ_EXT1
47#define PIRQ0C MPC85xx_IRQ_EXT2
48#define PIRQ0D MPC85xx_IRQ_EXT3
49#define PIRQ1A MPC85xx_IRQ_EXT11
50
51/* PCI 1 memory map */
52#define MPC85XX_PCI1_LOWER_IO 0x00000000
53#define MPC85XX_PCI1_UPPER_IO 0x00ffffff
54
55#define MPC85XX_PCI1_LOWER_MEM 0x80000000
56#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
57
58#define MPC85XX_PCI1_IO_BASE 0xe2000000
59#define MPC85XX_PCI1_MEM_OFFSET 0x00000000
60
61#define MPC85XX_PCI1_IO_SIZE 0x01000000
62
63/* PCI 2 memory map */
64/* Note: the standard PPC fixups will cause IO space to get bumped by
65 * hose->io_base_virt - isa_io_base => MPC85XX_PCI1_IO_SIZE */
66#define MPC85XX_PCI2_LOWER_IO 0x00000000
67#define MPC85XX_PCI2_UPPER_IO 0x00ffffff
68
69#define MPC85XX_PCI2_LOWER_MEM 0xa0000000
70#define MPC85XX_PCI2_UPPER_MEM 0xbfffffff
71
72#define MPC85XX_PCI2_IO_BASE 0xe3000000
73#define MPC85XX_PCI2_MEM_OFFSET 0x00000000
74
75#define MPC85XX_PCI2_IO_SIZE 0x01000000
76
77#define NR_8259_INTS 16
78#define CPM_IRQ_OFFSET NR_8259_INTS
79
80#endif /* __MACH_MPC85XX_CDS_H__ */
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
deleted file mode 100644
index 3d7addbdecfd..000000000000
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ /dev/null
@@ -1,234 +0,0 @@
1/*
2 * Wind River SBC8560 board specific routines
3 *
4 * Maintainer: Kumar Gala
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/stddef.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/errno.h>
18#include <linux/reboot.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/major.h>
22#include <linux/console.h>
23#include <linux/delay.h>
24#include <linux/seq_file.h>
25#include <linux/root_dev.h>
26#include <linux/serial.h>
27#include <linux/tty.h> /* for linux/serial_core.h */
28#include <linux/serial_core.h>
29#include <linux/serial_8250.h>
30#include <linux/initrd.h>
31#include <linux/module.h>
32#include <linux/fsl_devices.h>
33
34#include <asm/system.h>
35#include <asm/pgtable.h>
36#include <asm/page.h>
37#include <asm/atomic.h>
38#include <asm/time.h>
39#include <asm/io.h>
40#include <asm/machdep.h>
41#include <asm/open_pic.h>
42#include <asm/bootinfo.h>
43#include <asm/pci-bridge.h>
44#include <asm/mpc85xx.h>
45#include <asm/irq.h>
46#include <asm/immap_85xx.h>
47#include <asm/kgdb.h>
48#include <asm/ppc_sys.h>
49#include <mm/mmu_decl.h>
50
51#include <syslib/ppc85xx_common.h>
52#include <syslib/ppc85xx_setup.h>
53
54#ifdef CONFIG_SERIAL_8250
55static void __init
56sbc8560_early_serial_map(void)
57{
58 struct uart_port uart_req;
59
60 /* Setup serial port access */
61 memset(&uart_req, 0, sizeof (uart_req));
62 uart_req.irq = MPC85xx_IRQ_EXT9;
63 uart_req.flags = STD_COM_FLAGS;
64 uart_req.uartclk = BASE_BAUD * 16;
65 uart_req.iotype = UPIO_MEM;
66 uart_req.mapbase = UARTA_ADDR;
67 uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE);
68 uart_req.type = PORT_16650;
69
70#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
71 gen550_init(0, &uart_req);
72#endif
73
74 if (early_serial_setup(&uart_req) != 0)
75 printk("Early serial init of port 0 failed\n");
76
77 /* Assume early_serial_setup() doesn't modify uart_req */
78 uart_req.line = 1;
79 uart_req.mapbase = UARTB_ADDR;
80 uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART1_SIZE);
81 uart_req.irq = MPC85xx_IRQ_EXT10;
82
83#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
84 gen550_init(1, &uart_req);
85#endif
86
87 if (early_serial_setup(&uart_req) != 0)
88 printk("Early serial init of port 1 failed\n");
89}
90#endif
91
92/* ************************************************************************
93 *
94 * Setup the architecture
95 *
96 */
97static void __init
98sbc8560_setup_arch(void)
99{
100 bd_t *binfo = (bd_t *) __res;
101 unsigned int freq;
102 struct gianfar_platform_data *pdata;
103 struct gianfar_mdio_data *mdata;
104
105 /* get the core frequency */
106 freq = binfo->bi_intfreq;
107
108 if (ppc_md.progress)
109 ppc_md.progress("sbc8560_setup_arch()", 0);
110
111 /* Set loops_per_jiffy to a half-way reasonable value,
112 for use until calibrate_delay gets called. */
113 loops_per_jiffy = freq / HZ;
114
115#ifdef CONFIG_PCI
116 /* setup PCI host bridges */
117 mpc85xx_setup_hose();
118#endif
119#ifdef CONFIG_SERIAL_8250
120 sbc8560_early_serial_map();
121#endif
122#ifdef CONFIG_SERIAL_TEXT_DEBUG
123 /* Invalidate the entry we stole earlier the serial ports
124 * should be properly mapped */
125 invalidate_tlbcam_entry(num_tlbcam_entries - 1);
126#endif
127
128 /* setup the board related info for the MDIO bus */
129 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
130
131 mdata->irq[25] = MPC85xx_IRQ_EXT6;
132 mdata->irq[26] = MPC85xx_IRQ_EXT7;
133 mdata->irq[31] = PHY_POLL;
134
135 /* setup the board related information for the enet controllers */
136 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
137 if (pdata) {
138 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
139 pdata->bus_id = 0;
140 pdata->phy_id = 25;
141 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
142 }
143
144 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
145 if (pdata) {
146 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
147 pdata->bus_id = 0;
148 pdata->phy_id = 26;
149 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
150 }
151
152#ifdef CONFIG_BLK_DEV_INITRD
153 if (initrd_start)
154 ROOT_DEV = Root_RAM0;
155 else
156#endif
157#ifdef CONFIG_ROOT_NFS
158 ROOT_DEV = Root_NFS;
159#else
160 ROOT_DEV = Root_HDA1;
161#endif
162}
163
164/* ************************************************************************ */
165void __init
166platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
167 unsigned long r6, unsigned long r7)
168{
169 /* parse_bootinfo must always be called first */
170 parse_bootinfo(find_bootinfo());
171
172 /*
173 * If we were passed in a board information, copy it into the
174 * residual data area.
175 */
176 if (r3) {
177 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
178 sizeof (bd_t));
179 }
180
181#ifdef CONFIG_SERIAL_TEXT_DEBUG
182 /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
183 settlbcam(num_tlbcam_entries - 1, UARTA_ADDR,
184 UARTA_ADDR, 0x1000, _PAGE_IO, 0);
185#endif
186
187#if defined(CONFIG_BLK_DEV_INITRD)
188 /*
189 * If the init RAM disk has been configured in, and there's a valid
190 * starting address for it, set it up.
191 */
192 if (r4) {
193 initrd_start = r4 + KERNELBASE;
194 initrd_end = r5 + KERNELBASE;
195 }
196#endif /* CONFIG_BLK_DEV_INITRD */
197
198 /* Copy the kernel command line arguments to a safe place. */
199
200 if (r6) {
201 *(char *) (r7 + KERNELBASE) = 0;
202 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
203 }
204
205 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
206
207 /* setup the PowerPC module struct */
208 ppc_md.setup_arch = sbc8560_setup_arch;
209 ppc_md.show_cpuinfo = sbc8560_show_cpuinfo;
210
211 ppc_md.init_IRQ = sbc8560_init_IRQ;
212 ppc_md.get_irq = openpic_get_irq;
213
214 ppc_md.restart = mpc85xx_restart;
215 ppc_md.power_off = mpc85xx_power_off;
216 ppc_md.halt = mpc85xx_halt;
217
218 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
219
220 ppc_md.time_init = NULL;
221 ppc_md.set_rtc_time = NULL;
222 ppc_md.get_rtc_time = NULL;
223 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
224
225#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
226 ppc_md.progress = gen550_progress;
227#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
228#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
229 ppc_md.early_serial_map = sbc8560_early_serial_map;
230#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
231
232 if (ppc_md.progress)
233 ppc_md.progress("sbc8560_init(): exit", 0);
234}
diff --git a/arch/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h
deleted file mode 100644
index e5e156f60100..000000000000
--- a/arch/ppc/platforms/85xx/sbc8560.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Wind River SBC8560 board definitions
3 *
4 * Copyright 2003 Motorola 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#ifndef __MACH_SBC8560_H__
14#define __MACH_SBC8560_H__
15
16#include <platforms/85xx/sbc85xx.h>
17#include <asm/irq.h>
18
19#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
20
21#ifdef CONFIG_SERIAL_MANY_PORTS
22#define RS_TABLE_SIZE 64
23#else
24#define RS_TABLE_SIZE 2
25#endif
26
27/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
28#define BASE_BAUD ( 1843200 / 16 )
29
30#ifdef CONFIG_SERIAL_DETECT_IRQ
31#define STD_COM_FLAGS (ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
32#else
33#define STD_COM_FLAGS (ASYNC_SKIP_TEST)
34#endif
35
36#define STD_SERIAL_PORT_DFNS \
37 { 0, BASE_BAUD, UARTA_ADDR, MPC85xx_IRQ_EXT9, STD_COM_FLAGS, /* ttyS0 */ \
38 iomem_base: (u8 *)UARTA_ADDR, \
39 io_type: SERIAL_IO_MEM }, \
40 { 0, BASE_BAUD, UARTB_ADDR, MPC85xx_IRQ_EXT10, STD_COM_FLAGS, /* ttyS1 */ \
41 iomem_base: (u8 *)UARTB_ADDR, \
42 io_type: SERIAL_IO_MEM },
43
44#define SERIAL_PORT_DFNS \
45 STD_SERIAL_PORT_DFNS
46
47#endif /* __MACH_SBC8560_H__ */
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c
deleted file mode 100644
index 2c587ca97bce..000000000000
--- a/arch/ppc/platforms/85xx/sbc85xx.c
+++ /dev/null
@@ -1,166 +0,0 @@
1/*
2 * WindRiver PowerQUICC III SBC85xx board common routines
3 *
4 * Copyright 2002, 2003 Motorola Inc.
5 * Copyright 2004 Red Hat, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#include <linux/stddef.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/errno.h>
17#include <linux/reboot.h>
18#include <linux/pci.h>
19#include <linux/kdev_t.h>
20#include <linux/major.h>
21#include <linux/console.h>
22#include <linux/delay.h>
23#include <linux/seq_file.h>
24#include <linux/serial.h>
25#include <linux/module.h>
26
27#include <asm/system.h>
28#include <asm/pgtable.h>
29#include <asm/page.h>
30#include <asm/atomic.h>
31#include <asm/time.h>
32#include <asm/io.h>
33#include <asm/machdep.h>
34#include <asm/open_pic.h>
35#include <asm/bootinfo.h>
36#include <asm/pci-bridge.h>
37#include <asm/mpc85xx.h>
38#include <asm/irq.h>
39#include <asm/immap_85xx.h>
40#include <asm/ppc_sys.h>
41
42#include <mm/mmu_decl.h>
43
44#include <platforms/85xx/sbc85xx.h>
45
46unsigned char __res[sizeof (bd_t)];
47
48#ifndef CONFIG_PCI
49unsigned long isa_io_base = 0;
50unsigned long isa_mem_base = 0;
51unsigned long pci_dram_offset = 0;
52#endif
53
54extern unsigned long total_memory; /* in mm/init */
55
56/* Internal interrupts are all Level Sensitive, and Positive Polarity */
57static u_char sbc8560_openpic_initsenses[] __initdata = {
58 MPC85XX_INTERNAL_IRQ_SENSES,
59 0x0, /* External 0: */
60 0x0, /* External 1: */
61#if defined(CONFIG_PCI)
62 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI slot 0 */
63 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI slot 1 */
64 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 4: PCI slot 2 */
65 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PCI slot 3 */
66#else
67 0x0, /* External 2: */
68 0x0, /* External 3: */
69 0x0, /* External 4: */
70 0x0, /* External 5: */
71#endif
72 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 6: PHY */
73 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 7: PHY */
74 0x0, /* External 8: */
75 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* External 9: PHY */
76 (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* External 10: PHY */
77 0x0, /* External 11: */
78};
79
80/* ************************************************************************ */
81int
82sbc8560_show_cpuinfo(struct seq_file *m)
83{
84 uint pvid, svid, phid1;
85 uint memsize = total_memory;
86 bd_t *binfo = (bd_t *) __res;
87 unsigned int freq;
88
89 /* get the core frequency */
90 freq = binfo->bi_intfreq;
91
92 pvid = mfspr(SPRN_PVR);
93 svid = mfspr(SPRN_SVR);
94
95 seq_printf(m, "Vendor\t\t: Wind River\n");
96 seq_printf(m, "Machine\t\t: SBC%s\n", cur_ppc_sys_spec->ppc_sys_name);
97 seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
98 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
99 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
100
101 /* Display cpu Pll setting */
102 phid1 = mfspr(SPRN_HID1);
103 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
104
105 /* Display the amount of memory */
106 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
107
108 return 0;
109}
110
111void __init
112sbc8560_init_IRQ(void)
113{
114 bd_t *binfo = (bd_t *) __res;
115 /* Determine the Physical Address of the OpenPIC regs */
116 phys_addr_t OpenPIC_PAddr =
117 binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
118 OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
119 OpenPIC_InitSenses = sbc8560_openpic_initsenses;
120 OpenPIC_NumInitSenses = sizeof (sbc8560_openpic_initsenses);
121
122 /* Skip reserved space and internal sources */
123 openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
124 /* Map PIC IRQs 0-11 */
125 openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000);
126
127 /* we let openpic interrupts starting from an offset, to
128 * leave space for cascading interrupts underneath.
129 */
130 openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
131
132 return;
133}
134
135/*
136 * interrupt routing
137 */
138
139#ifdef CONFIG_PCI
140int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel,
141 unsigned char pin)
142{
143 static char pci_irq_table[][4] =
144 /*
145 * PCI IDSEL/INTPIN->INTLINE
146 * A B C D
147 */
148 {
149 {PIRQA, PIRQB, PIRQC, PIRQD},
150 {PIRQD, PIRQA, PIRQB, PIRQC},
151 {PIRQC, PIRQD, PIRQA, PIRQB},
152 {PIRQB, PIRQC, PIRQD, PIRQA},
153 };
154
155 const long min_idsel = 12, max_idsel = 15, irqs_per_slot = 4;
156 return PCI_IRQ_TABLE_LOOKUP;
157}
158
159int mpc85xx_exclude_device(u_char bus, u_char devfn)
160{
161 if (bus == 0 && PCI_SLOT(devfn) == 0)
162 return PCIBIOS_DEVICE_NOT_FOUND;
163 else
164 return PCIBIOS_SUCCESSFUL;
165}
166#endif /* CONFIG_PCI */
diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h
deleted file mode 100644
index 51df4dc04e22..000000000000
--- a/arch/ppc/platforms/85xx/sbc85xx.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * WindRiver PowerQUICC III SBC85xx common board definitions
3 *
4 * Copyright 2003 Motorola Inc.
5 * Copyright 2004 Red Hat, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 */
13
14#ifndef __PLATFORMS_85XX_SBC85XX_H__
15#define __PLATFORMS_85XX_SBC85XX_H__
16
17#include <linux/init.h>
18#include <linux/seq_file.h>
19#include <asm/ppcboot.h>
20
21#define BOARD_CCSRBAR ((uint)0xff700000)
22#define CCSRBAR_SIZE ((uint)1024*1024)
23
24#define BCSR_ADDR ((uint)0xfc000000)
25#define BCSR_SIZE ((uint)(16 * 1024 * 1024))
26
27#define UARTA_ADDR (BCSR_ADDR + 0x00700000)
28#define UARTB_ADDR (BCSR_ADDR + 0x00800000)
29#define RTC_DEVICE_ADDR (BCSR_ADDR + 0x00900000)
30#define EEPROM_ADDR (BCSR_ADDR + 0x00b00000)
31
32extern int sbc8560_show_cpuinfo(struct seq_file *m);
33extern void sbc8560_init_IRQ(void) __init;
34
35/* PCI interrupt controller */
36#define PIRQA MPC85xx_IRQ_EXT1
37#define PIRQB MPC85xx_IRQ_EXT2
38#define PIRQC MPC85xx_IRQ_EXT3
39#define PIRQD MPC85xx_IRQ_EXT4
40
41#define MPC85XX_PCI1_LOWER_IO 0x00000000
42#define MPC85XX_PCI1_UPPER_IO 0x00ffffff
43
44#define MPC85XX_PCI1_LOWER_MEM 0x80000000
45#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
46
47#define MPC85XX_PCI1_IO_BASE 0xe2000000
48#define MPC85XX_PCI1_MEM_OFFSET 0x00000000
49
50#define MPC85XX_PCI1_IO_SIZE 0x01000000
51
52/* FCC1 Clock Source Configuration. These can be
53 * redefined in the board specific file.
54 * Can only choose from CLK9-12 */
55#define F1_RXCLK 12
56#define F1_TXCLK 11
57
58/* FCC2 Clock Source Configuration. These can be
59 * redefined in the board specific file.
60 * Can only choose from CLK13-16 */
61#define F2_RXCLK 13
62#define F2_TXCLK 14
63
64/* FCC3 Clock Source Configuration. These can be
65 * redefined in the board specific file.
66 * Can only choose from CLK13-16 */
67#define F3_RXCLK 15
68#define F3_TXCLK 16
69
70#endif /* __PLATFORMS_85XX_SBC85XX_H__ */
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
deleted file mode 100644
index b1f5b737c70d..000000000000
--- a/arch/ppc/platforms/85xx/stx_gp3.c
+++ /dev/null
@@ -1,340 +0,0 @@
1/*
2 * STx GP3 board specific routines
3 *
4 * Dan Malek <dan@embeddededge.com>
5 * Copyright 2004 Embedded Edge, LLC
6 *
7 * Copied from mpc8560_ads.c
8 * Copyright 2002, 2003 Motorola Inc.
9 *
10 * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
11 * Copyright 2004-2005 MontaVista Software, Inc.
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/blkdev.h>
28#include <linux/console.h>
29#include <linux/delay.h>
30#include <linux/root_dev.h>
31#include <linux/seq_file.h>
32#include <linux/serial.h>
33#include <linux/initrd.h>
34#include <linux/module.h>
35#include <linux/fsl_devices.h>
36#include <linux/interrupt.h>
37#include <linux/rio.h>
38
39#include <asm/system.h>
40#include <asm/pgtable.h>
41#include <asm/page.h>
42#include <asm/atomic.h>
43#include <asm/time.h>
44#include <asm/io.h>
45#include <asm/machdep.h>
46#include <asm/open_pic.h>
47#include <asm/bootinfo.h>
48#include <asm/pci-bridge.h>
49#include <asm/mpc85xx.h>
50#include <asm/irq.h>
51#include <asm/immap_85xx.h>
52#include <asm/cpm2.h>
53#include <asm/mpc85xx.h>
54#include <asm/ppc_sys.h>
55
56#include <syslib/cpm2_pic.h>
57#include <syslib/ppc85xx_common.h>
58#include <syslib/ppc85xx_rio.h>
59
60
61unsigned char __res[sizeof(bd_t)];
62
63#ifndef CONFIG_PCI
64unsigned long isa_io_base = 0;
65unsigned long isa_mem_base = 0;
66unsigned long pci_dram_offset = 0;
67#endif
68
69/* Internal interrupts are all Level Sensitive, and Positive Polarity */
70static u8 gp3_openpic_initsenses[] __initdata = {
71 MPC85XX_INTERNAL_IRQ_SENSES,
72 0x0, /* External 0: */
73#if defined(CONFIG_PCI)
74 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 1: PCI slot 0 */
75 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI slot 1 */
76 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI slot 2 */
77 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 4: PCI slot 3 */
78#else
79 0x0, /* External 1: */
80 0x0, /* External 2: */
81 0x0, /* External 3: */
82 0x0, /* External 4: */
83#endif
84 0x0, /* External 5: */
85 0x0, /* External 6: */
86 0x0, /* External 7: */
87 0x0, /* External 8: */
88 0x0, /* External 9: */
89 0x0, /* External 10: */
90 0x0, /* External 11: */
91};
92
93/*
94 * Setup the architecture
95 */
96static void __init
97gp3_setup_arch(void)
98{
99 bd_t *binfo = (bd_t *) __res;
100 unsigned int freq;
101 struct gianfar_platform_data *pdata;
102 struct gianfar_mdio_data *mdata;
103
104 cpm2_reset();
105
106 /* get the core frequency */
107 freq = binfo->bi_intfreq;
108
109 if (ppc_md.progress)
110 ppc_md.progress("gp3_setup_arch()", 0);
111
112 /* Set loops_per_jiffy to a half-way reasonable value,
113 for use until calibrate_delay gets called. */
114 loops_per_jiffy = freq / HZ;
115
116#ifdef CONFIG_PCI
117 /* setup PCI host bridges */
118 mpc85xx_setup_hose();
119#endif
120
121 /* setup the board related info for the MDIO bus */
122 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
123
124 mdata->irq[2] = MPC85xx_IRQ_EXT5;
125 mdata->irq[4] = MPC85xx_IRQ_EXT5;
126 mdata->irq[31] = PHY_POLL;
127
128 /* setup the board related information for the enet controllers */
129 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
130 if (pdata) {
131 /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
132 pdata->bus_id = 0;
133 pdata->phy_id = 2;
134 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
135 }
136
137 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
138 if (pdata) {
139 /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */
140 pdata->bus_id = 0;
141 pdata->phy_id = 4;
142 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
143 }
144
145#ifdef CONFIG_BLK_DEV_INITRD
146 if (initrd_start)
147 ROOT_DEV = Root_RAM0;
148 else
149#endif
150#ifdef CONFIG_ROOT_NFS
151 ROOT_DEV = Root_NFS;
152#else
153 ROOT_DEV = Root_HDA1;
154#endif
155
156 printk ("bi_immr_base = %8.8lx\n", binfo->bi_immr_base);
157}
158
159static irqreturn_t cpm2_cascade(int irq, void *dev_id)
160{
161 while ((irq = cpm2_get_irq()) >= 0)
162 __do_IRQ(irq);
163
164 return IRQ_HANDLED;
165}
166
167static struct irqaction cpm2_irqaction = {
168 .handler = cpm2_cascade,
169 .flags = IRQF_DISABLED,
170 .mask = CPU_MASK_NONE,
171 .name = "cpm2_cascade",
172};
173
174static void __init
175gp3_init_IRQ(void)
176{
177 bd_t *binfo = (bd_t *) __res;
178
179 /*
180 * Setup OpenPIC
181 */
182
183 /* Determine the Physical Address of the OpenPIC regs */
184 phys_addr_t OpenPIC_PAddr =
185 binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
186 OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
187 OpenPIC_InitSenses = gp3_openpic_initsenses;
188 OpenPIC_NumInitSenses = sizeof (gp3_openpic_initsenses);
189
190 /* Skip reserved space and internal sources */
191 openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
192
193 /* Map PIC IRQs 0-11 */
194 openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000);
195
196 /*
197 * Let openpic interrupts starting from an offset, to
198 * leave space for cascading interrupts underneath.
199 */
200 openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
201
202 /* Setup CPM2 PIC */
203 cpm2_init_IRQ();
204
205 setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
206
207 return;
208}
209
210static int
211gp3_show_cpuinfo(struct seq_file *m)
212{
213 uint pvid, svid, phid1;
214 bd_t *binfo = (bd_t *) __res;
215 uint memsize;
216 unsigned int freq;
217 extern unsigned long total_memory; /* in mm/init */
218
219 /* get the core frequency */
220 freq = binfo->bi_intfreq;
221
222 pvid = mfspr(SPRN_PVR);
223 svid = mfspr(SPRN_SVR);
224
225 memsize = total_memory;
226
227 seq_printf(m, "Vendor\t\t: RPC Electronics STx \n");
228 seq_printf(m, "Machine\t\t: GP3 - MPC%s\n", cur_ppc_sys_spec->ppc_sys_name);
229 seq_printf(m, "bus freq\t: %u.%.6u MHz\n", freq / 1000000,
230 freq % 1000000);
231 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
232 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
233
234 /* Display cpu Pll setting */
235 phid1 = mfspr(SPRN_HID1);
236 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
237
238 /* Display the amount of memory */
239 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
240
241 return 0;
242}
243
244#ifdef CONFIG_PCI
245int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel,
246 unsigned char pin)
247{
248 static char pci_irq_table[][4] =
249 /*
250 * PCI IDSEL/INTPIN->INTLINE
251 * A B C D
252 */
253 {
254 {PIRQA, PIRQB, PIRQC, PIRQD},
255 {PIRQD, PIRQA, PIRQB, PIRQC},
256 {PIRQC, PIRQD, PIRQA, PIRQB},
257 {PIRQB, PIRQC, PIRQD, PIRQA},
258 };
259
260 const long min_idsel = 12, max_idsel = 15, irqs_per_slot = 4;
261 return PCI_IRQ_TABLE_LOOKUP;
262}
263
264int mpc85xx_exclude_device(u_char bus, u_char devfn)
265{
266 if (bus == 0 && PCI_SLOT(devfn) == 0)
267 return PCIBIOS_DEVICE_NOT_FOUND;
268 else
269 return PCIBIOS_SUCCESSFUL;
270}
271#endif /* CONFIG_PCI */
272
273#ifdef CONFIG_RAPIDIO
274void
275platform_rio_init(void)
276{
277 /*
278 * The STx firmware configures the RapidIO Local Access Window
279 * at 0xc0000000 with a size of 512MB.
280 */
281 mpc85xx_rio_setup(0xc0000000, 0x20000000);
282}
283#endif /* CONFIG_RAPIDIO */
284
285void __init
286platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
287 unsigned long r6, unsigned long r7)
288{
289 /* parse_bootinfo must always be called first */
290 parse_bootinfo(find_bootinfo());
291
292 /*
293 * If we were passed in a board information, copy it into the
294 * residual data area.
295 */
296 if (r3) {
297 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
298 sizeof (bd_t));
299
300 }
301#if defined(CONFIG_BLK_DEV_INITRD)
302 /*
303 * If the init RAM disk has been configured in, and there's a valid
304 * starting address for it, set it up.
305 */
306 if (r4) {
307 initrd_start = r4 + KERNELBASE;
308 initrd_end = r5 + KERNELBASE;
309 }
310#endif /* CONFIG_BLK_DEV_INITRD */
311
312 /* Copy the kernel command line arguments to a safe place. */
313
314 if (r6) {
315 *(char *) (r7 + KERNELBASE) = 0;
316 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
317 }
318
319 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
320
321 /* setup the PowerPC module struct */
322 ppc_md.setup_arch = gp3_setup_arch;
323 ppc_md.show_cpuinfo = gp3_show_cpuinfo;
324
325 ppc_md.init_IRQ = gp3_init_IRQ;
326 ppc_md.get_irq = openpic_get_irq;
327
328 ppc_md.restart = mpc85xx_restart;
329 ppc_md.power_off = mpc85xx_power_off;
330 ppc_md.halt = mpc85xx_halt;
331
332 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
333
334 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
335
336 if (ppc_md.progress)
337 ppc_md.progress("platform_init(): exit", 0);
338
339 return;
340}
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h
deleted file mode 100644
index c6e34c09e979..000000000000
--- a/arch/ppc/platforms/85xx/stx_gp3.h
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * STx GP3 board definitions
3 *
4 * Dan Malek (dan@embeddededge.com)
5 * Copyright 2004 Embedded Edge, LLC
6 *
7 * Ported to 2.6, Matt Porter <mporter@kernel.crashing.org>
8 * Copyright 2004-2005 MontaVista Software, Inc.
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
17#ifndef __MACH_STX_GP3_H
18#define __MACH_STX_GP3_H
19
20#include <linux/init.h>
21#include <asm/ppcboot.h>
22
23#define BOARD_CCSRBAR ((uint)0xe0000000)
24#define CCSRBAR_SIZE ((uint)1024*1024)
25
26#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
27
28#define BCSR_ADDR ((uint)0xfc000000)
29#define BCSR_SIZE ((uint)(16 * 1024))
30
31#define BCSR_TSEC1_RESET 0x00000080
32#define BCSR_TSEC2_RESET 0x00000040
33#define BCSR_LED1 0x00000008
34#define BCSR_LED2 0x00000004
35#define BCSR_LED3 0x00000002
36#define BCSR_LED4 0x00000001
37
38extern void mpc85xx_setup_hose(void) __init;
39extern void mpc85xx_restart(char *cmd);
40extern void mpc85xx_power_off(void);
41extern void mpc85xx_halt(void);
42extern void mpc85xx_init_IRQ(void) __init;
43extern unsigned long mpc85xx_find_end_of_memory(void) __init;
44extern void mpc85xx_calibrate_decr(void) __init;
45
46#define PCI_CFG_ADDR_OFFSET (0x8000)
47#define PCI_CFG_DATA_OFFSET (0x8004)
48
49/* PCI interrupt controller */
50#define PIRQA MPC85xx_IRQ_EXT1
51#define PIRQB MPC85xx_IRQ_EXT2
52#define PIRQC MPC85xx_IRQ_EXT3
53#define PIRQD MPC85xx_IRQ_EXT4
54#define PCI_MIN_IDSEL 16
55#define PCI_MAX_IDSEL 19
56#define PCI_IRQ_SLOT 4
57
58#define MPC85XX_PCI1_LOWER_IO 0x00000000
59#define MPC85XX_PCI1_UPPER_IO 0x00ffffff
60
61#define MPC85XX_PCI1_LOWER_MEM 0x80000000
62#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
63
64#define MPC85XX_PCI1_IO_BASE 0xe2000000
65#define MPC85XX_PCI1_MEM_OFFSET 0x00000000
66
67#define MPC85XX_PCI1_IO_SIZE 0x01000000
68
69#endif /* __MACH_STX_GP3_H */
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c
deleted file mode 100644
index 27ce389c1224..000000000000
--- a/arch/ppc/platforms/85xx/tqm85xx.c
+++ /dev/null
@@ -1,391 +0,0 @@
1/*
2 * TQM85xx (40/41/55/60) board specific routines
3 *
4 * Copyright (c) 2005 DENX Software Engineering
5 * Stefan Roese <sr@denx.de>
6 *
7 * Based on original work by
8 * Kumar Gala <galak@kernel.crashing.org>
9 * Copyright 2004 Freescale Semiconductor Inc.
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17#include <linux/stddef.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/errno.h>
21#include <linux/reboot.h>
22#include <linux/pci.h>
23#include <linux/kdev_t.h>
24#include <linux/major.h>
25#include <linux/console.h>
26#include <linux/delay.h>
27#include <linux/seq_file.h>
28#include <linux/root_dev.h>
29#include <linux/serial.h>
30#include <linux/tty.h> /* for linux/serial_core.h */
31#include <linux/serial_core.h>
32#include <linux/initrd.h>
33#include <linux/module.h>
34#include <linux/fsl_devices.h>
35
36#include <asm/system.h>
37#include <asm/pgtable.h>
38#include <asm/page.h>
39#include <asm/atomic.h>
40#include <asm/time.h>
41#include <asm/io.h>
42#include <asm/machdep.h>
43#include <asm/open_pic.h>
44#include <asm/bootinfo.h>
45#include <asm/pci-bridge.h>
46#include <asm/mpc85xx.h>
47#include <asm/irq.h>
48#include <asm/immap_85xx.h>
49#include <asm/kgdb.h>
50#include <asm/ppc_sys.h>
51#include <asm/cpm2.h>
52#include <mm/mmu_decl.h>
53
54#include <syslib/ppc85xx_setup.h>
55#include <syslib/cpm2_pic.h>
56#include <syslib/ppc85xx_common.h>
57#include <syslib/ppc85xx_rio.h>
58
59#ifndef CONFIG_PCI
60unsigned long isa_io_base = 0;
61unsigned long isa_mem_base = 0;
62#endif
63
64
65extern unsigned long total_memory; /* in mm/init */
66
67unsigned char __res[sizeof (bd_t)];
68
69/* Internal interrupts are all Level Sensitive, and Positive Polarity */
70static u_char tqm85xx_openpic_initsenses[] __initdata = {
71 MPC85XX_INTERNAL_IRQ_SENSES,
72 0x0, /* External 0: */
73 0x0, /* External 1: */
74#if defined(CONFIG_PCI)
75 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 2: PCI INTA */
76 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 3: PCI INTB */
77#else
78 0x0, /* External 2: */
79 0x0, /* External 3: */
80#endif
81 0x0, /* External 4: */
82 0x0, /* External 5: */
83 0x0, /* External 6: */
84 0x0, /* External 7: */
85 (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 8: PHY */
86 0x0, /* External 9: */
87 0x0, /* External 10: */
88 0x0, /* External 11: */
89};
90
91/* ************************************************************************
92 *
93 * Setup the architecture
94 *
95 */
96static void __init
97tqm85xx_setup_arch(void)
98{
99 bd_t *binfo = (bd_t *) __res;
100 unsigned int freq;
101 struct gianfar_platform_data *pdata;
102 struct gianfar_mdio_data *mdata;
103
104#ifdef CONFIG_MPC8560
105 cpm2_reset();
106#endif
107
108 /* get the core frequency */
109 freq = binfo->bi_intfreq;
110
111 if (ppc_md.progress)
112 ppc_md.progress("tqm85xx_setup_arch()", 0);
113
114 /* Set loops_per_jiffy to a half-way reasonable value,
115 for use until calibrate_delay gets called. */
116 loops_per_jiffy = freq / HZ;
117
118#ifdef CONFIG_PCI
119 /* setup PCI host bridges */
120 mpc85xx_setup_hose();
121#endif
122
123#ifndef CONFIG_MPC8560
124#if defined(CONFIG_SERIAL_8250)
125 mpc85xx_early_serial_map();
126#endif
127
128#ifdef CONFIG_SERIAL_TEXT_DEBUG
129 /* Invalidate the entry we stole earlier the serial ports
130 * should be properly mapped */
131 invalidate_tlbcam_entry(num_tlbcam_entries - 1);
132#endif
133#endif /* CONFIG_MPC8560 */
134
135 /* setup the board related info for the MDIO bus */
136 mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO);
137
138 mdata->irq[0] = MPC85xx_IRQ_EXT8;
139 mdata->irq[1] = MPC85xx_IRQ_EXT8;
140 mdata->irq[2] = PHY_POLL;
141 mdata->irq[3] = MPC85xx_IRQ_EXT8;
142 mdata->irq[31] = PHY_POLL;
143
144 /* setup the board related information for the enet controllers */
145 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1);
146 if (pdata) {
147 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
148 pdata->bus_id = 0;
149 pdata->phy_id = 2;
150 memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6);
151 }
152
153 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2);
154 if (pdata) {
155 pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR;
156 pdata->bus_id = 0;
157 pdata->phy_id = 1;
158 memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6);
159 }
160
161#ifdef CONFIG_MPC8540
162 pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC);
163 if (pdata) {
164 pdata->board_flags = 0;
165 pdata->bus_id = 0;
166 pdata->phy_id = 3;
167 memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6);
168 }
169#endif
170
171#ifdef CONFIG_BLK_DEV_INITRD
172 if (initrd_start)
173 ROOT_DEV = Root_RAM0;
174 else
175#endif
176#ifdef CONFIG_ROOT_NFS
177 ROOT_DEV = Root_NFS;
178#else
179 ROOT_DEV = Root_HDA1;
180#endif
181}
182
183#ifdef CONFIG_MPC8560
184static irqreturn_t cpm2_cascade(int irq, void *dev_id)
185{
186 while ((irq = cpm2_get_irq()) >= 0)
187 __do_IRQ(irq);
188 return IRQ_HANDLED;
189}
190
191static struct irqaction cpm2_irqaction = {
192 .handler = cpm2_cascade,
193 .flags = IRQF_DISABLED,
194 .mask = CPU_MASK_NONE,
195 .name = "cpm2_cascade",
196};
197#endif /* CONFIG_MPC8560 */
198
199void __init
200tqm85xx_init_IRQ(void)
201{
202 bd_t *binfo = (bd_t *) __res;
203
204 /* Determine the Physical Address of the OpenPIC regs */
205 phys_addr_t OpenPIC_PAddr =
206 binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET;
207 OpenPIC_Addr = ioremap(OpenPIC_PAddr, MPC85xx_OPENPIC_SIZE);
208 OpenPIC_InitSenses = tqm85xx_openpic_initsenses;
209 OpenPIC_NumInitSenses = sizeof (tqm85xx_openpic_initsenses);
210
211 /* Skip reserved space and internal sources */
212 openpic_set_sources(0, 32, OpenPIC_Addr + 0x10200);
213
214 /* Map PIC IRQs 0-11 */
215 openpic_set_sources(48, 12, OpenPIC_Addr + 0x10000);
216
217 /* we let openpic interrupts starting from an offset, to
218 * leave space for cascading interrupts underneath.
219 */
220 openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET);
221
222#ifdef CONFIG_MPC8560
223 /* Setup CPM2 PIC */
224 cpm2_init_IRQ();
225
226 setup_irq(MPC85xx_IRQ_CPM, &cpm2_irqaction);
227#endif /* CONFIG_MPC8560 */
228
229 return;
230}
231
232int tqm85xx_show_cpuinfo(struct seq_file *m)
233{
234 uint pvid, svid, phid1;
235 uint memsize = total_memory;
236 bd_t *binfo = (bd_t *) __res;
237 unsigned int freq;
238
239 /* get the core frequency */
240 freq = binfo->bi_intfreq;
241
242 pvid = mfspr(SPRN_PVR);
243 svid = mfspr(SPRN_SVR);
244
245 seq_printf(m, "Vendor\t\t: TQ Components\n");
246 seq_printf(m, "Machine\t\t: TQM%s\n", cur_ppc_sys_spec->ppc_sys_name);
247 seq_printf(m, "clock\t\t: %dMHz\n", freq / 1000000);
248 seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
249 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
250
251 /* Display cpu Pll setting */
252 phid1 = mfspr(SPRN_HID1);
253 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
254
255 /* Display the amount of memory */
256 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
257
258 return 0;
259}
260
261#ifdef CONFIG_PCI
262/*
263 * interrupt routing
264 */
265int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
266{
267 static char pci_irq_table[][4] =
268 /*
269 * PCI IDSEL/INTPIN->INTLINE
270 * A B C D
271 */
272 {
273 {PIRQA, PIRQB, 0, 0},
274 };
275
276 const long min_idsel = 0x1c, max_idsel = 0x1c, irqs_per_slot = 4;
277 return PCI_IRQ_TABLE_LOOKUP;
278}
279
280int mpc85xx_exclude_device(u_char bus, u_char devfn)
281{
282 if (bus == 0 && PCI_SLOT(devfn) == 0)
283 return PCIBIOS_DEVICE_NOT_FOUND;
284 else
285 return PCIBIOS_SUCCESSFUL;
286}
287
288#endif /* CONFIG_PCI */
289
290#ifdef CONFIG_RAPIDIO
291void platform_rio_init(void)
292{
293 /* 512MB RIO LAW at 0xc0000000 */
294 mpc85xx_rio_setup(0xc0000000, 0x20000000);
295}
296#endif /* CONFIG_RAPIDIO */
297
298/* ************************************************************************ */
299void __init
300platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
301 unsigned long r6, unsigned long r7)
302{
303 /* parse_bootinfo must always be called first */
304 parse_bootinfo(find_bootinfo());
305
306 /*
307 * If we were passed in a board information, copy it into the
308 * residual data area.
309 */
310 if (r3) {
311 memcpy((void *) __res, (void *) (r3 + KERNELBASE),
312 sizeof (bd_t));
313 }
314
315#if defined(CONFIG_SERIAL_TEXT_DEBUG) && !defined(CONFIG_MPC8560)
316 {
317 bd_t *binfo = (bd_t *) __res;
318 struct uart_port p;
319
320 /* Use the last TLB entry to map CCSRBAR to allow access to DUART regs */
321 settlbcam(num_tlbcam_entries - 1, binfo->bi_immr_base,
322 binfo->bi_immr_base, MPC85xx_CCSRBAR_SIZE, _PAGE_IO, 0);
323
324 memset(&p, 0, sizeof (p));
325 p.iotype = UPIO_MEM;
326 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART0_OFFSET;
327 p.uartclk = binfo->bi_busfreq;
328
329 gen550_init(0, &p);
330
331 memset(&p, 0, sizeof (p));
332 p.iotype = UPIO_MEM;
333 p.membase = (void *) binfo->bi_immr_base + MPC85xx_UART1_OFFSET;
334 p.uartclk = binfo->bi_busfreq;
335
336 gen550_init(1, &p);
337 }
338#endif
339
340#if defined(CONFIG_BLK_DEV_INITRD)
341 /*
342 * If the init RAM disk has been configured in, and there's a valid
343 * starting address for it, set it up.
344 */
345 if (r4) {
346 initrd_start = r4 + KERNELBASE;
347 initrd_end = r5 + KERNELBASE;
348 }
349#endif /* CONFIG_BLK_DEV_INITRD */
350
351 /* Copy the kernel command line arguments to a safe place. */
352
353 if (r6) {
354 *(char *) (r7 + KERNELBASE) = 0;
355 strcpy(cmd_line, (char *) (r6 + KERNELBASE));
356 }
357
358 identify_ppc_sys_by_id(mfspr(SPRN_SVR));
359
360 /* setup the PowerPC module struct */
361 ppc_md.setup_arch = tqm85xx_setup_arch;
362 ppc_md.show_cpuinfo = tqm85xx_show_cpuinfo;
363
364 ppc_md.init_IRQ = tqm85xx_init_IRQ;
365 ppc_md.get_irq = openpic_get_irq;
366
367 ppc_md.restart = mpc85xx_restart;
368 ppc_md.power_off = mpc85xx_power_off;
369 ppc_md.halt = mpc85xx_halt;
370
371 ppc_md.find_end_of_memory = mpc85xx_find_end_of_memory;
372
373 ppc_md.time_init = NULL;
374 ppc_md.set_rtc_time = NULL;
375 ppc_md.get_rtc_time = NULL;
376 ppc_md.calibrate_decr = mpc85xx_calibrate_decr;
377
378#ifndef CONFIG_MPC8560
379#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG)
380 ppc_md.progress = gen550_progress;
381#endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */
382#if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB)
383 ppc_md.early_serial_map = mpc85xx_early_serial_map;
384#endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */
385#endif /* CONFIG_MPC8560 */
386
387 if (ppc_md.progress)
388 ppc_md.progress("tqm85xx_init(): exit", 0);
389
390 return;
391}
diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h
deleted file mode 100644
index 57284e68f676..000000000000
--- a/arch/ppc/platforms/85xx/tqm85xx.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * TQM85xx (40/41/55/60) board definitions
3 *
4 * Copyright (c) 2005 DENX Software Engineering
5 * Stefan Roese <sr@denx.de>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 *
12 */
13
14#ifndef __MACH_TQM85XX_H
15#define __MACH_TQM85XX_H
16
17#include <linux/init.h>
18#include <asm/ppcboot.h>
19
20#define BOARD_CCSRBAR ((uint)0xe0000000)
21#define CCSRBAR_SIZE ((uint)1024*1024)
22
23#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
24
25#define PCI_CFG_ADDR_OFFSET (0x8000)
26#define PCI_CFG_DATA_OFFSET (0x8004)
27
28/* PCI interrupt controller */
29#define PIRQA MPC85xx_IRQ_EXT2
30#define PIRQB MPC85xx_IRQ_EXT3
31
32#define MPC85XX_PCI1_LOWER_IO 0x00000000
33#define MPC85XX_PCI1_UPPER_IO 0x00ffffff
34
35#define MPC85XX_PCI1_LOWER_MEM 0x80000000
36#define MPC85XX_PCI1_UPPER_MEM 0x9fffffff
37
38#define MPC85XX_PCI1_IO_BASE 0xe2000000
39#define MPC85XX_PCI1_MEM_OFFSET 0x00000000
40
41#define MPC85XX_PCI1_IO_SIZE 0x01000000
42
43#define BASE_BAUD 115200
44
45extern void mpc85xx_setup_hose(void) __init;
46extern void mpc85xx_restart(char *cmd);
47extern void mpc85xx_power_off(void);
48extern void mpc85xx_halt(void);
49extern void mpc85xx_init_IRQ(void) __init;
50extern unsigned long mpc85xx_find_end_of_memory(void) __init;
51extern void mpc85xx_calibrate_decr(void) __init;
52
53#endif /* __MACH_TQM85XX_H */
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index 976270d537c1..c1f77e1d368e 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -336,7 +336,7 @@ ev64260_early_serial_map(void)
336#endif 336#endif
337 337
338 if (early_serial_setup(&port) != 0) 338 if (early_serial_setup(&port) != 0)
339 printk(KERN_WARNING "Early serial init of port 0" 339 printk(KERN_WARNING "Early serial init of port 0 "
340 "failed\n"); 340 "failed\n");
341 341
342 first_time = 0; 342 first_time = 0;
@@ -388,7 +388,7 @@ ev64260_setup_arch(void)
388 ev64260_early_serial_map(); 388 ev64260_early_serial_map();
389#endif 389#endif
390 390
391 printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc." 391 printk(KERN_INFO "%s %s port (C) 2001 MontaVista Software, Inc. "
392 "(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE); 392 "(source@mvista.com)\n", BOARD_VENDOR, BOARD_MACHINE);
393 393
394 if (ppc_md.progress) 394 if (ppc_md.progress)
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c
index bf72204125c5..62370f4a5a0f 100644
--- a/arch/ppc/platforms/mpc866ads_setup.c
+++ b/arch/ppc/platforms/mpc866ads_setup.c
@@ -32,7 +32,7 @@
32#include <asm/time.h> 32#include <asm/time.h>
33#include <asm/ppcboot.h> 33#include <asm/ppcboot.h>
34#include <asm/8xx_immap.h> 34#include <asm/8xx_immap.h>
35#include <asm/commproc.h> 35#include <asm/cpm1.h>
36#include <asm/ppc_sys.h> 36#include <asm/ppc_sys.h>
37#include <asm/mpc8xx.h> 37#include <asm/mpc8xx.h>
38 38
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c
index 87deaefd6c5b..ba06cc08cdab 100644
--- a/arch/ppc/platforms/mpc885ads_setup.c
+++ b/arch/ppc/platforms/mpc885ads_setup.c
@@ -31,7 +31,7 @@
31#include <asm/time.h> 31#include <asm/time.h>
32#include <asm/ppcboot.h> 32#include <asm/ppcboot.h>
33#include <asm/8xx_immap.h> 33#include <asm/8xx_immap.h>
34#include <asm/commproc.h> 34#include <asm/cpm1.h>
35#include <asm/ppc_sys.h> 35#include <asm/ppc_sys.h>
36 36
37extern unsigned char __res[]; 37extern unsigned char __res[];
diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
index 1df3150f016e..8ed433e2a5c7 100644
--- a/arch/ppc/platforms/prep_pci.c
+++ b/arch/ppc/platforms/prep_pci.c
@@ -1099,7 +1099,6 @@ prep_pib_init(void)
1099 pci_write_config_byte(dev, 0x43, reg); 1099 pci_write_config_byte(dev, 0x43, reg);
1100 } 1100 }
1101 } 1101 }
1102 pci_dev_put(dev);
1103 } 1102 }
1104 1103
1105 if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND, 1104 if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND,
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 543795be58c8..52ddebe6c6d1 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -87,20 +87,6 @@ endif
87obj-$(CONFIG_BOOTX_TEXT) += btext.o 87obj-$(CONFIG_BOOTX_TEXT) += btext.o
88obj-$(CONFIG_MPC10X_BRIDGE) += mpc10x_common.o ppc_sys.o 88obj-$(CONFIG_MPC10X_BRIDGE) += mpc10x_common.o ppc_sys.o
89obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o 89obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o
90obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \
91 ppc_sys.o mpc85xx_sys.o \
92 mpc85xx_devices.o
93ifeq ($(CONFIG_85xx),y)
94obj-$(CONFIG_PCI) += pci_auto.o
95endif
96obj-$(CONFIG_RAPIDIO) += ppc85xx_rio.o
97obj-$(CONFIG_83xx) += ppc83xx_setup.o ppc_sys.o \
98 mpc83xx_sys.o mpc83xx_devices.o ipic.o
99ifeq ($(CONFIG_83xx),y)
100obj-$(CONFIG_PCI) += pci_auto.o
101endif
102obj-$(CONFIG_MPC8548_CDS) += todc_time.o
103obj-$(CONFIG_MPC8555_CDS) += todc_time.o
104obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o \ 90obj-$(CONFIG_PPC_MPC52xx) += mpc52xx_setup.o mpc52xx_pic.o \
105 mpc52xx_sys.o mpc52xx_devices.o ppc_sys.o 91 mpc52xx_sys.o mpc52xx_devices.o ppc_sys.o
106ifeq ($(CONFIG_PPC_MPC52xx),y) 92ifeq ($(CONFIG_PPC_MPC52xx),y)
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c
index e84d432c0657..3b4fcca5d1e1 100644
--- a/arch/ppc/syslib/gt64260_pic.c
+++ b/arch/ppc/syslib/gt64260_pic.c
@@ -35,7 +35,6 @@
35#include <linux/interrupt.h> 35#include <linux/interrupt.h>
36#include <linux/sched.h> 36#include <linux/sched.h>
37#include <linux/signal.h> 37#include <linux/signal.h>
38#include <linux/stddef.h>
39#include <linux/delay.h> 38#include <linux/delay.h>
40#include <linux/irq.h> 39#include <linux/irq.h>
41 40
diff --git a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c
deleted file mode 100644
index 4f163e20939e..000000000000
--- a/arch/ppc/syslib/ipic.c
+++ /dev/null
@@ -1,646 +0,0 @@
1/*
2 * arch/ppc/syslib/ipic.c
3 *
4 * IPIC routines implementations.
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc.
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#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/reboot.h>
17#include <linux/slab.h>
18#include <linux/stddef.h>
19#include <linux/sched.h>
20#include <linux/signal.h>
21#include <linux/sysdev.h>
22#include <asm/irq.h>
23#include <asm/io.h>
24#include <asm/ipic.h>
25#include <asm/mpc83xx.h>
26
27#include "ipic.h"
28
29static struct ipic p_ipic;
30static struct ipic * primary_ipic;
31
32static struct ipic_info ipic_info[] = {
33 [9] = {
34 .pend = IPIC_SIPNR_H,
35 .mask = IPIC_SIMSR_H,
36 .prio = IPIC_SIPRR_D,
37 .force = IPIC_SIFCR_H,
38 .bit = 24,
39 .prio_mask = 0,
40 },
41 [10] = {
42 .pend = IPIC_SIPNR_H,
43 .mask = IPIC_SIMSR_H,
44 .prio = IPIC_SIPRR_D,
45 .force = IPIC_SIFCR_H,
46 .bit = 25,
47 .prio_mask = 1,
48 },
49 [11] = {
50 .pend = IPIC_SIPNR_H,
51 .mask = IPIC_SIMSR_H,
52 .prio = IPIC_SIPRR_D,
53 .force = IPIC_SIFCR_H,
54 .bit = 26,
55 .prio_mask = 2,
56 },
57 [14] = {
58 .pend = IPIC_SIPNR_H,
59 .mask = IPIC_SIMSR_H,
60 .prio = IPIC_SIPRR_D,
61 .force = IPIC_SIFCR_H,
62 .bit = 29,
63 .prio_mask = 5,
64 },
65 [15] = {
66 .pend = IPIC_SIPNR_H,
67 .mask = IPIC_SIMSR_H,
68 .prio = IPIC_SIPRR_D,
69 .force = IPIC_SIFCR_H,
70 .bit = 30,
71 .prio_mask = 6,
72 },
73 [16] = {
74 .pend = IPIC_SIPNR_H,
75 .mask = IPIC_SIMSR_H,
76 .prio = IPIC_SIPRR_D,
77 .force = IPIC_SIFCR_H,
78 .bit = 31,
79 .prio_mask = 7,
80 },
81 [17] = {
82 .pend = IPIC_SEPNR,
83 .mask = IPIC_SEMSR,
84 .prio = IPIC_SMPRR_A,
85 .force = IPIC_SEFCR,
86 .bit = 1,
87 .prio_mask = 5,
88 },
89 [18] = {
90 .pend = IPIC_SEPNR,
91 .mask = IPIC_SEMSR,
92 .prio = IPIC_SMPRR_A,
93 .force = IPIC_SEFCR,
94 .bit = 2,
95 .prio_mask = 6,
96 },
97 [19] = {
98 .pend = IPIC_SEPNR,
99 .mask = IPIC_SEMSR,
100 .prio = IPIC_SMPRR_A,
101 .force = IPIC_SEFCR,
102 .bit = 3,
103 .prio_mask = 7,
104 },
105 [20] = {
106 .pend = IPIC_SEPNR,
107 .mask = IPIC_SEMSR,
108 .prio = IPIC_SMPRR_B,
109 .force = IPIC_SEFCR,
110 .bit = 4,
111 .prio_mask = 4,
112 },
113 [21] = {
114 .pend = IPIC_SEPNR,
115 .mask = IPIC_SEMSR,
116 .prio = IPIC_SMPRR_B,
117 .force = IPIC_SEFCR,
118 .bit = 5,
119 .prio_mask = 5,
120 },
121 [22] = {
122 .pend = IPIC_SEPNR,
123 .mask = IPIC_SEMSR,
124 .prio = IPIC_SMPRR_B,
125 .force = IPIC_SEFCR,
126 .bit = 6,
127 .prio_mask = 6,
128 },
129 [23] = {
130 .pend = IPIC_SEPNR,
131 .mask = IPIC_SEMSR,
132 .prio = IPIC_SMPRR_B,
133 .force = IPIC_SEFCR,
134 .bit = 7,
135 .prio_mask = 7,
136 },
137 [32] = {
138 .pend = IPIC_SIPNR_H,
139 .mask = IPIC_SIMSR_H,
140 .prio = IPIC_SIPRR_A,
141 .force = IPIC_SIFCR_H,
142 .bit = 0,
143 .prio_mask = 0,
144 },
145 [33] = {
146 .pend = IPIC_SIPNR_H,
147 .mask = IPIC_SIMSR_H,
148 .prio = IPIC_SIPRR_A,
149 .force = IPIC_SIFCR_H,
150 .bit = 1,
151 .prio_mask = 1,
152 },
153 [34] = {
154 .pend = IPIC_SIPNR_H,
155 .mask = IPIC_SIMSR_H,
156 .prio = IPIC_SIPRR_A,
157 .force = IPIC_SIFCR_H,
158 .bit = 2,
159 .prio_mask = 2,
160 },
161 [35] = {
162 .pend = IPIC_SIPNR_H,
163 .mask = IPIC_SIMSR_H,
164 .prio = IPIC_SIPRR_A,
165 .force = IPIC_SIFCR_H,
166 .bit = 3,
167 .prio_mask = 3,
168 },
169 [36] = {
170 .pend = IPIC_SIPNR_H,
171 .mask = IPIC_SIMSR_H,
172 .prio = IPIC_SIPRR_A,
173 .force = IPIC_SIFCR_H,
174 .bit = 4,
175 .prio_mask = 4,
176 },
177 [37] = {
178 .pend = IPIC_SIPNR_H,
179 .mask = IPIC_SIMSR_H,
180 .prio = IPIC_SIPRR_A,
181 .force = IPIC_SIFCR_H,
182 .bit = 5,
183 .prio_mask = 5,
184 },
185 [38] = {
186 .pend = IPIC_SIPNR_H,
187 .mask = IPIC_SIMSR_H,
188 .prio = IPIC_SIPRR_A,
189 .force = IPIC_SIFCR_H,
190 .bit = 6,
191 .prio_mask = 6,
192 },
193 [39] = {
194 .pend = IPIC_SIPNR_H,
195 .mask = IPIC_SIMSR_H,
196 .prio = IPIC_SIPRR_A,
197 .force = IPIC_SIFCR_H,
198 .bit = 7,
199 .prio_mask = 7,
200 },
201 [48] = {
202 .pend = IPIC_SEPNR,
203 .mask = IPIC_SEMSR,
204 .prio = IPIC_SMPRR_A,
205 .force = IPIC_SEFCR,
206 .bit = 0,
207 .prio_mask = 4,
208 },
209 [64] = {
210 .pend = IPIC_SIPNR_H,
211 .mask = IPIC_SIMSR_L,
212 .prio = IPIC_SMPRR_A,
213 .force = IPIC_SIFCR_L,
214 .bit = 0,
215 .prio_mask = 0,
216 },
217 [65] = {
218 .pend = IPIC_SIPNR_H,
219 .mask = IPIC_SIMSR_L,
220 .prio = IPIC_SMPRR_A,
221 .force = IPIC_SIFCR_L,
222 .bit = 1,
223 .prio_mask = 1,
224 },
225 [66] = {
226 .pend = IPIC_SIPNR_H,
227 .mask = IPIC_SIMSR_L,
228 .prio = IPIC_SMPRR_A,
229 .force = IPIC_SIFCR_L,
230 .bit = 2,
231 .prio_mask = 2,
232 },
233 [67] = {
234 .pend = IPIC_SIPNR_H,
235 .mask = IPIC_SIMSR_L,
236 .prio = IPIC_SMPRR_A,
237 .force = IPIC_SIFCR_L,
238 .bit = 3,
239 .prio_mask = 3,
240 },
241 [68] = {
242 .pend = IPIC_SIPNR_H,
243 .mask = IPIC_SIMSR_L,
244 .prio = IPIC_SMPRR_B,
245 .force = IPIC_SIFCR_L,
246 .bit = 4,
247 .prio_mask = 0,
248 },
249 [69] = {
250 .pend = IPIC_SIPNR_H,
251 .mask = IPIC_SIMSR_L,
252 .prio = IPIC_SMPRR_B,
253 .force = IPIC_SIFCR_L,
254 .bit = 5,
255 .prio_mask = 1,
256 },
257 [70] = {
258 .pend = IPIC_SIPNR_H,
259 .mask = IPIC_SIMSR_L,
260 .prio = IPIC_SMPRR_B,
261 .force = IPIC_SIFCR_L,
262 .bit = 6,
263 .prio_mask = 2,
264 },
265 [71] = {
266 .pend = IPIC_SIPNR_H,
267 .mask = IPIC_SIMSR_L,
268 .prio = IPIC_SMPRR_B,
269 .force = IPIC_SIFCR_L,
270 .bit = 7,
271 .prio_mask = 3,
272 },
273 [72] = {
274 .pend = IPIC_SIPNR_H,
275 .mask = IPIC_SIMSR_L,
276 .prio = 0,
277 .force = IPIC_SIFCR_L,
278 .bit = 8,
279 },
280 [73] = {
281 .pend = IPIC_SIPNR_H,
282 .mask = IPIC_SIMSR_L,
283 .prio = 0,
284 .force = IPIC_SIFCR_L,
285 .bit = 9,
286 },
287 [74] = {
288 .pend = IPIC_SIPNR_H,
289 .mask = IPIC_SIMSR_L,
290 .prio = 0,
291 .force = IPIC_SIFCR_L,
292 .bit = 10,
293 },
294 [75] = {
295 .pend = IPIC_SIPNR_H,
296 .mask = IPIC_SIMSR_L,
297 .prio = 0,
298 .force = IPIC_SIFCR_L,
299 .bit = 11,
300 },
301 [76] = {
302 .pend = IPIC_SIPNR_H,
303 .mask = IPIC_SIMSR_L,
304 .prio = 0,
305 .force = IPIC_SIFCR_L,
306 .bit = 12,
307 },
308 [77] = {
309 .pend = IPIC_SIPNR_H,
310 .mask = IPIC_SIMSR_L,
311 .prio = 0,
312 .force = IPIC_SIFCR_L,
313 .bit = 13,
314 },
315 [78] = {
316 .pend = IPIC_SIPNR_H,
317 .mask = IPIC_SIMSR_L,
318 .prio = 0,
319 .force = IPIC_SIFCR_L,
320 .bit = 14,
321 },
322 [79] = {
323 .pend = IPIC_SIPNR_H,
324 .mask = IPIC_SIMSR_L,
325 .prio = 0,
326 .force = IPIC_SIFCR_L,
327 .bit = 15,
328 },
329 [80] = {
330 .pend = IPIC_SIPNR_H,
331 .mask = IPIC_SIMSR_L,
332 .prio = 0,
333 .force = IPIC_SIFCR_L,
334 .bit = 16,
335 },
336 [84] = {
337 .pend = IPIC_SIPNR_H,
338 .mask = IPIC_SIMSR_L,
339 .prio = 0,
340 .force = IPIC_SIFCR_L,
341 .bit = 20,
342 },
343 [85] = {
344 .pend = IPIC_SIPNR_H,
345 .mask = IPIC_SIMSR_L,
346 .prio = 0,
347 .force = IPIC_SIFCR_L,
348 .bit = 21,
349 },
350 [90] = {
351 .pend = IPIC_SIPNR_H,
352 .mask = IPIC_SIMSR_L,
353 .prio = 0,
354 .force = IPIC_SIFCR_L,
355 .bit = 26,
356 },
357 [91] = {
358 .pend = IPIC_SIPNR_H,
359 .mask = IPIC_SIMSR_L,
360 .prio = 0,
361 .force = IPIC_SIFCR_L,
362 .bit = 27,
363 },
364};
365
366static inline u32 ipic_read(volatile u32 __iomem *base, unsigned int reg)
367{
368 return in_be32(base + (reg >> 2));
369}
370
371static inline void ipic_write(volatile u32 __iomem *base, unsigned int reg, u32 value)
372{
373 out_be32(base + (reg >> 2), value);
374}
375
376static inline struct ipic * ipic_from_irq(unsigned int irq)
377{
378 return primary_ipic;
379}
380
381static void ipic_enable_irq(unsigned int irq)
382{
383 struct ipic *ipic = ipic_from_irq(irq);
384 unsigned int src = irq - ipic->irq_offset;
385 u32 temp;
386
387 temp = ipic_read(ipic->regs, ipic_info[src].mask);
388 temp |= (1 << (31 - ipic_info[src].bit));
389 ipic_write(ipic->regs, ipic_info[src].mask, temp);
390}
391
392static void ipic_disable_irq(unsigned int irq)
393{
394 struct ipic *ipic = ipic_from_irq(irq);
395 unsigned int src = irq - ipic->irq_offset;
396 u32 temp;
397
398 temp = ipic_read(ipic->regs, ipic_info[src].mask);
399 temp &= ~(1 << (31 - ipic_info[src].bit));
400 ipic_write(ipic->regs, ipic_info[src].mask, temp);
401}
402
403static void ipic_disable_irq_and_ack(unsigned int irq)
404{
405 struct ipic *ipic = ipic_from_irq(irq);
406 unsigned int src = irq - ipic->irq_offset;
407 u32 temp;
408
409 ipic_disable_irq(irq);
410
411 temp = ipic_read(ipic->regs, ipic_info[src].pend);
412 temp |= (1 << (31 - ipic_info[src].bit));
413 ipic_write(ipic->regs, ipic_info[src].pend, temp);
414}
415
416static void ipic_end_irq(unsigned int irq)
417{
418 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
419 ipic_enable_irq(irq);
420}
421
422struct hw_interrupt_type ipic = {
423 .typename = " IPIC ",
424 .enable = ipic_enable_irq,
425 .disable = ipic_disable_irq,
426 .ack = ipic_disable_irq_and_ack,
427 .end = ipic_end_irq,
428};
429
430void __init ipic_init(phys_addr_t phys_addr,
431 unsigned int flags,
432 unsigned int irq_offset,
433 unsigned char *senses,
434 unsigned int senses_count)
435{
436 u32 i, temp = 0;
437
438 primary_ipic = &p_ipic;
439 primary_ipic->regs = ioremap(phys_addr, MPC83xx_IPIC_SIZE);
440
441 primary_ipic->irq_offset = irq_offset;
442
443 ipic_write(primary_ipic->regs, IPIC_SICNR, 0x0);
444
445 /* default priority scheme is grouped. If spread mode is required
446 * configure SICFR accordingly */
447 if (flags & IPIC_SPREADMODE_GRP_A)
448 temp |= SICFR_IPSA;
449 if (flags & IPIC_SPREADMODE_GRP_D)
450 temp |= SICFR_IPSD;
451 if (flags & IPIC_SPREADMODE_MIX_A)
452 temp |= SICFR_MPSA;
453 if (flags & IPIC_SPREADMODE_MIX_B)
454 temp |= SICFR_MPSB;
455
456 ipic_write(primary_ipic->regs, IPIC_SICNR, temp);
457
458 /* handle MCP route */
459 temp = 0;
460 if (flags & IPIC_DISABLE_MCP_OUT)
461 temp = SERCR_MCPR;
462 ipic_write(primary_ipic->regs, IPIC_SERCR, temp);
463
464 /* handle routing of IRQ0 to MCP */
465 temp = ipic_read(primary_ipic->regs, IPIC_SEMSR);
466
467 if (flags & IPIC_IRQ0_MCP)
468 temp |= SEMSR_SIRQ0;
469 else
470 temp &= ~SEMSR_SIRQ0;
471
472 ipic_write(primary_ipic->regs, IPIC_SEMSR, temp);
473
474 for (i = 0 ; i < NR_IPIC_INTS ; i++) {
475 irq_desc[i+irq_offset].chip = &ipic;
476 irq_desc[i+irq_offset].status = IRQ_LEVEL;
477 }
478
479 temp = 0;
480 for (i = 0 ; i < senses_count ; i++) {
481 if ((senses[i] & IRQ_SENSE_MASK) == IRQ_SENSE_EDGE) {
482 temp |= 1 << (15 - i);
483 if (i != 0)
484 irq_desc[i + irq_offset + MPC83xx_IRQ_EXT1 - 1].status = 0;
485 else
486 irq_desc[irq_offset + MPC83xx_IRQ_EXT0].status = 0;
487 }
488 }
489 ipic_write(primary_ipic->regs, IPIC_SECNR, temp);
490
491 printk ("IPIC (%d IRQ sources, %d External IRQs) at %p\n", NR_IPIC_INTS,
492 senses_count, primary_ipic->regs);
493}
494
495int ipic_set_priority(unsigned int irq, unsigned int priority)
496{
497 struct ipic *ipic = ipic_from_irq(irq);
498 unsigned int src = irq - ipic->irq_offset;
499 u32 temp;
500
501 if (priority > 7)
502 return -EINVAL;
503 if (src > 127)
504 return -EINVAL;
505 if (ipic_info[src].prio == 0)
506 return -EINVAL;
507
508 temp = ipic_read(ipic->regs, ipic_info[src].prio);
509
510 if (priority < 4) {
511 temp &= ~(0x7 << (20 + (3 - priority) * 3));
512 temp |= ipic_info[src].prio_mask << (20 + (3 - priority) * 3);
513 } else {
514 temp &= ~(0x7 << (4 + (7 - priority) * 3));
515 temp |= ipic_info[src].prio_mask << (4 + (7 - priority) * 3);
516 }
517
518 ipic_write(ipic->regs, ipic_info[src].prio, temp);
519
520 return 0;
521}
522
523void ipic_set_highest_priority(unsigned int irq)
524{
525 struct ipic *ipic = ipic_from_irq(irq);
526 unsigned int src = irq - ipic->irq_offset;
527 u32 temp;
528
529 temp = ipic_read(ipic->regs, IPIC_SICFR);
530
531 /* clear and set HPI */
532 temp &= 0x7f000000;
533 temp |= (src & 0x7f) << 24;
534
535 ipic_write(ipic->regs, IPIC_SICFR, temp);
536}
537
538void ipic_set_default_priority(void)
539{
540 ipic_set_priority(MPC83xx_IRQ_TSEC1_TX, 0);
541 ipic_set_priority(MPC83xx_IRQ_TSEC1_RX, 1);
542 ipic_set_priority(MPC83xx_IRQ_TSEC1_ERROR, 2);
543 ipic_set_priority(MPC83xx_IRQ_TSEC2_TX, 3);
544 ipic_set_priority(MPC83xx_IRQ_TSEC2_RX, 4);
545 ipic_set_priority(MPC83xx_IRQ_TSEC2_ERROR, 5);
546 ipic_set_priority(MPC83xx_IRQ_USB2_DR, 6);
547 ipic_set_priority(MPC83xx_IRQ_USB2_MPH, 7);
548
549 ipic_set_priority(MPC83xx_IRQ_UART1, 0);
550 ipic_set_priority(MPC83xx_IRQ_UART2, 1);
551 ipic_set_priority(MPC83xx_IRQ_SEC2, 2);
552 ipic_set_priority(MPC83xx_IRQ_IIC1, 5);
553 ipic_set_priority(MPC83xx_IRQ_IIC2, 6);
554 ipic_set_priority(MPC83xx_IRQ_SPI, 7);
555 ipic_set_priority(MPC83xx_IRQ_RTC_SEC, 0);
556 ipic_set_priority(MPC83xx_IRQ_PIT, 1);
557 ipic_set_priority(MPC83xx_IRQ_PCI1, 2);
558 ipic_set_priority(MPC83xx_IRQ_PCI2, 3);
559 ipic_set_priority(MPC83xx_IRQ_EXT0, 4);
560 ipic_set_priority(MPC83xx_IRQ_EXT1, 5);
561 ipic_set_priority(MPC83xx_IRQ_EXT2, 6);
562 ipic_set_priority(MPC83xx_IRQ_EXT3, 7);
563 ipic_set_priority(MPC83xx_IRQ_RTC_ALR, 0);
564 ipic_set_priority(MPC83xx_IRQ_MU, 1);
565 ipic_set_priority(MPC83xx_IRQ_SBA, 2);
566 ipic_set_priority(MPC83xx_IRQ_DMA, 3);
567 ipic_set_priority(MPC83xx_IRQ_EXT4, 4);
568 ipic_set_priority(MPC83xx_IRQ_EXT5, 5);
569 ipic_set_priority(MPC83xx_IRQ_EXT6, 6);
570 ipic_set_priority(MPC83xx_IRQ_EXT7, 7);
571}
572
573void ipic_enable_mcp(enum ipic_mcp_irq mcp_irq)
574{
575 struct ipic *ipic = primary_ipic;
576 u32 temp;
577
578 temp = ipic_read(ipic->regs, IPIC_SERMR);
579 temp |= (1 << (31 - mcp_irq));
580 ipic_write(ipic->regs, IPIC_SERMR, temp);
581}
582
583void ipic_disable_mcp(enum ipic_mcp_irq mcp_irq)
584{
585 struct ipic *ipic = primary_ipic;
586 u32 temp;
587
588 temp = ipic_read(ipic->regs, IPIC_SERMR);
589 temp &= (1 << (31 - mcp_irq));
590 ipic_write(ipic->regs, IPIC_SERMR, temp);
591}
592
593u32 ipic_get_mcp_status(void)
594{
595 return ipic_read(primary_ipic->regs, IPIC_SERMR);
596}
597
598void ipic_clear_mcp_status(u32 mask)
599{
600 ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
601}
602
603/* Return an interrupt vector or -1 if no interrupt is pending. */
604int ipic_get_irq(void)
605{
606 int irq;
607
608 irq = ipic_read(primary_ipic->regs, IPIC_SIVCR) & 0x7f;
609
610 if (irq == 0) /* 0 --> no irq is pending */
611 irq = -1;
612
613 return irq;
614}
615
616static struct sysdev_class ipic_sysclass = {
617 .name = "ipic",
618};
619
620static struct sys_device device_ipic = {
621 .id = 0,
622 .cls = &ipic_sysclass,
623};
624
625static int __init init_ipic_sysfs(void)
626{
627 int rc;
628
629 if (!primary_ipic->regs)
630 return -ENODEV;
631 printk(KERN_DEBUG "Registering ipic with sysfs...\n");
632
633 rc = sysdev_class_register(&ipic_sysclass);
634 if (rc) {
635 printk(KERN_ERR "Failed registering ipic sys class\n");
636 return -ENODEV;
637 }
638 rc = sysdev_register(&device_ipic);
639 if (rc) {
640 printk(KERN_ERR "Failed registering ipic sys device\n");
641 return -ENODEV;
642 }
643 return 0;
644}
645
646subsys_initcall(init_ipic_sysfs);
diff --git a/arch/ppc/syslib/ipic.h b/arch/ppc/syslib/ipic.h
deleted file mode 100644
index a60c9d18bb7f..000000000000
--- a/arch/ppc/syslib/ipic.h
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * IPIC private definitions and structure.
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor, Inc
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#ifndef __IPIC_H__
14#define __IPIC_H__
15
16#include <asm/ipic.h>
17
18#define MPC83xx_IPIC_SIZE (0x00100)
19
20/* System Global Interrupt Configuration Register */
21#define SICFR_IPSA 0x00010000
22#define SICFR_IPSD 0x00080000
23#define SICFR_MPSA 0x00200000
24#define SICFR_MPSB 0x00400000
25
26/* System External Interrupt Mask Register */
27#define SEMSR_SIRQ0 0x00008000
28
29/* System Error Control Register */
30#define SERCR_MCPR 0x00000001
31
32struct ipic {
33 volatile u32 __iomem *regs;
34 unsigned int irq_offset;
35};
36
37struct ipic_info {
38 u8 pend; /* pending register offset from base */
39 u8 mask; /* mask register offset from base */
40 u8 prio; /* priority register offset from base */
41 u8 force; /* force register offset from base */
42 u8 bit; /* register bit position (as per doc)
43 bit mask = 1 << (31 - bit) */
44 u8 prio_mask; /* priority mask value */
45};
46
47#endif /* __IPIC_H__ */
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c
index af35a316544a..f58149c03b0f 100644
--- a/arch/ppc/syslib/mpc52xx_pic.c
+++ b/arch/ppc/syslib/mpc52xx_pic.c
@@ -20,7 +20,6 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/signal.h> 22#include <linux/signal.h>
23#include <linux/stddef.h>
24#include <linux/delay.h> 23#include <linux/delay.h>
25#include <linux/irq.h> 24#include <linux/irq.h>
26 25
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
index ecfa2c0f8ba3..9f504fc7693e 100644
--- a/arch/ppc/syslib/mpc52xx_setup.c
+++ b/arch/ppc/syslib/mpc52xx_setup.c
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18 18
19#include <linux/spinlock.h>
19#include <asm/io.h> 20#include <asm/io.h>
20#include <asm/time.h> 21#include <asm/time.h>
21#include <asm/mpc52xx.h> 22#include <asm/mpc52xx.h>
@@ -275,3 +276,38 @@ int mpc52xx_match_psc_function(int psc_idx, const char *func)
275 276
276 return 0; 277 return 0;
277} 278}
279
280int mpc52xx_set_psc_clkdiv(int psc_id, int clkdiv)
281{
282 static spinlock_t lock = SPIN_LOCK_UNLOCKED;
283 struct mpc52xx_cdm __iomem *cdm;
284 unsigned long flags;
285 u16 mclken_div;
286 u16 __iomem *reg;
287 u32 mask;
288
289 cdm = ioremap(MPC52xx_PA(MPC52xx_CDM_OFFSET), MPC52xx_CDM_SIZE);
290 if (!cdm) {
291 printk(KERN_ERR __FILE__ ": Error mapping CDM\n");
292 return -ENODEV;
293 }
294
295 mclken_div = 0x8000 | (clkdiv & 0x1FF);
296 switch (psc_id) {
297 case 1: reg = &cdm->mclken_div_psc1; mask = 0x20; break;
298 case 2: reg = &cdm->mclken_div_psc2; mask = 0x40; break;
299 case 3: reg = &cdm->mclken_div_psc3; mask = 0x80; break;
300 case 6: reg = &cdm->mclken_div_psc6; mask = 0x10; break;
301 default:
302 return -ENODEV;
303 }
304
305 /* Set the rate and enable the clock */
306 spin_lock_irqsave(&lock, flags);
307 out_be16(reg, mclken_div);
308 out_be32(&cdm->clk_enables, in_be32(&cdm->clk_enables) | mask);
309 spin_unlock_irqrestore(&lock, flags);
310
311 iounmap(cdm);
312 return 0;
313}
diff --git a/arch/ppc/syslib/mpc83xx_devices.c b/arch/ppc/syslib/mpc83xx_devices.c
deleted file mode 100644
index 5c4932ca8e9b..000000000000
--- a/arch/ppc/syslib/mpc83xx_devices.c
+++ /dev/null
@@ -1,251 +0,0 @@
1/*
2 * MPC83xx Device descriptions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/device.h>
17#include <linux/serial_8250.h>
18#include <linux/fsl_devices.h>
19#include <asm/mpc83xx.h>
20#include <asm/irq.h>
21#include <asm/ppc_sys.h>
22#include <asm/machdep.h>
23
24/* We use offsets for IORESOURCE_MEM since we do not know at compile time
25 * what IMMRBAR is, will get fixed up by mach_mpc83xx_fixup
26 */
27
28struct gianfar_mdio_data mpc83xx_mdio_pdata = {
29};
30
31static struct gianfar_platform_data mpc83xx_tsec1_pdata = {
32 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
33 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
34 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
35};
36
37static struct gianfar_platform_data mpc83xx_tsec2_pdata = {
38 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
39 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
40 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
41};
42
43static struct fsl_i2c_platform_data mpc83xx_fsl_i2c1_pdata = {
44 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
45};
46
47static struct fsl_i2c_platform_data mpc83xx_fsl_i2c2_pdata = {
48 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
49};
50
51static struct plat_serial8250_port serial_platform_data[] = {
52 [0] = {
53 .mapbase = 0x4500,
54 .irq = MPC83xx_IRQ_UART1,
55 .iotype = UPIO_MEM,
56 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
57 },
58 [1] = {
59 .mapbase = 0x4600,
60 .irq = MPC83xx_IRQ_UART2,
61 .iotype = UPIO_MEM,
62 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
63 },
64 { },
65};
66
67struct platform_device ppc_sys_platform_devices[] = {
68 [MPC83xx_TSEC1] = {
69 .name = "fsl-gianfar",
70 .id = 1,
71 .dev.platform_data = &mpc83xx_tsec1_pdata,
72 .num_resources = 4,
73 .resource = (struct resource[]) {
74 {
75 .start = 0x24000,
76 .end = 0x24fff,
77 .flags = IORESOURCE_MEM,
78 },
79 {
80 .name = "tx",
81 .start = MPC83xx_IRQ_TSEC1_TX,
82 .end = MPC83xx_IRQ_TSEC1_TX,
83 .flags = IORESOURCE_IRQ,
84 },
85 {
86 .name = "rx",
87 .start = MPC83xx_IRQ_TSEC1_RX,
88 .end = MPC83xx_IRQ_TSEC1_RX,
89 .flags = IORESOURCE_IRQ,
90 },
91 {
92 .name = "error",
93 .start = MPC83xx_IRQ_TSEC1_ERROR,
94 .end = MPC83xx_IRQ_TSEC1_ERROR,
95 .flags = IORESOURCE_IRQ,
96 },
97 },
98 },
99 [MPC83xx_TSEC2] = {
100 .name = "fsl-gianfar",
101 .id = 2,
102 .dev.platform_data = &mpc83xx_tsec2_pdata,
103 .num_resources = 4,
104 .resource = (struct resource[]) {
105 {
106 .start = 0x25000,
107 .end = 0x25fff,
108 .flags = IORESOURCE_MEM,
109 },
110 {
111 .name = "tx",
112 .start = MPC83xx_IRQ_TSEC2_TX,
113 .end = MPC83xx_IRQ_TSEC2_TX,
114 .flags = IORESOURCE_IRQ,
115 },
116 {
117 .name = "rx",
118 .start = MPC83xx_IRQ_TSEC2_RX,
119 .end = MPC83xx_IRQ_TSEC2_RX,
120 .flags = IORESOURCE_IRQ,
121 },
122 {
123 .name = "error",
124 .start = MPC83xx_IRQ_TSEC2_ERROR,
125 .end = MPC83xx_IRQ_TSEC2_ERROR,
126 .flags = IORESOURCE_IRQ,
127 },
128 },
129 },
130 [MPC83xx_IIC1] = {
131 .name = "fsl-i2c",
132 .id = 1,
133 .dev.platform_data = &mpc83xx_fsl_i2c1_pdata,
134 .num_resources = 2,
135 .resource = (struct resource[]) {
136 {
137 .start = 0x3000,
138 .end = 0x30ff,
139 .flags = IORESOURCE_MEM,
140 },
141 {
142 .start = MPC83xx_IRQ_IIC1,
143 .end = MPC83xx_IRQ_IIC1,
144 .flags = IORESOURCE_IRQ,
145 },
146 },
147 },
148 [MPC83xx_IIC2] = {
149 .name = "fsl-i2c",
150 .id = 2,
151 .dev.platform_data = &mpc83xx_fsl_i2c2_pdata,
152 .num_resources = 2,
153 .resource = (struct resource[]) {
154 {
155 .start = 0x3100,
156 .end = 0x31ff,
157 .flags = IORESOURCE_MEM,
158 },
159 {
160 .start = MPC83xx_IRQ_IIC2,
161 .end = MPC83xx_IRQ_IIC2,
162 .flags = IORESOURCE_IRQ,
163 },
164 },
165 },
166 [MPC83xx_DUART] = {
167 .name = "serial8250",
168 .id = PLAT8250_DEV_PLATFORM,
169 .dev.platform_data = serial_platform_data,
170 },
171 [MPC83xx_SEC2] = {
172 .name = "fsl-sec2",
173 .id = 1,
174 .num_resources = 2,
175 .resource = (struct resource[]) {
176 {
177 .start = 0x30000,
178 .end = 0x3ffff,
179 .flags = IORESOURCE_MEM,
180 },
181 {
182 .start = MPC83xx_IRQ_SEC2,
183 .end = MPC83xx_IRQ_SEC2,
184 .flags = IORESOURCE_IRQ,
185 },
186 },
187 },
188 [MPC83xx_USB2_DR] = {
189 .name = "fsl-ehci",
190 .id = 1,
191 .num_resources = 2,
192 .resource = (struct resource[]) {
193 {
194 .start = 0x23000,
195 .end = 0x23fff,
196 .flags = IORESOURCE_MEM,
197 },
198 {
199 .start = MPC83xx_IRQ_USB2_DR,
200 .end = MPC83xx_IRQ_USB2_DR,
201 .flags = IORESOURCE_IRQ,
202 },
203 },
204 },
205 [MPC83xx_USB2_MPH] = {
206 .name = "fsl-ehci",
207 .id = 2,
208 .num_resources = 2,
209 .resource = (struct resource[]) {
210 {
211 .start = 0x22000,
212 .end = 0x22fff,
213 .flags = IORESOURCE_MEM,
214 },
215 {
216 .start = MPC83xx_IRQ_USB2_MPH,
217 .end = MPC83xx_IRQ_USB2_MPH,
218 .flags = IORESOURCE_IRQ,
219 },
220 },
221 },
222 [MPC83xx_MDIO] = {
223 .name = "fsl-gianfar_mdio",
224 .id = 0,
225 .dev.platform_data = &mpc83xx_mdio_pdata,
226 .num_resources = 1,
227 .resource = (struct resource[]) {
228 {
229 .start = 0x24520,
230 .end = 0x2453f,
231 .flags = IORESOURCE_MEM,
232 },
233 },
234 },
235};
236
237static int __init mach_mpc83xx_fixup(struct platform_device *pdev)
238{
239 ppc_sys_fixup_mem_resource(pdev, immrbar);
240 return 0;
241}
242
243static int __init mach_mpc83xx_init(void)
244{
245 if (ppc_md.progress)
246 ppc_md.progress("mach_mpc83xx_init:enter", 0);
247 ppc_sys_device_fixup = mach_mpc83xx_fixup;
248 return 0;
249}
250
251postcore_initcall(mach_mpc83xx_init);
diff --git a/arch/ppc/syslib/mpc83xx_sys.c b/arch/ppc/syslib/mpc83xx_sys.c
deleted file mode 100644
index 0498ae7e01e3..000000000000
--- a/arch/ppc/syslib/mpc83xx_sys.c
+++ /dev/null
@@ -1,122 +0,0 @@
1/*
2 * MPC83xx System descriptions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/device.h>
17#include <asm/ppc_sys.h>
18
19struct ppc_sys_spec *cur_ppc_sys_spec;
20struct ppc_sys_spec ppc_sys_specs[] = {
21 {
22 .ppc_sys_name = "8349E",
23 .mask = 0xFFFF0000,
24 .value = 0x80500000,
25 .num_devices = 9,
26 .device_list = (enum ppc_sys_devices[])
27 {
28 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
29 MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
30 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
31 },
32 },
33 {
34 .ppc_sys_name = "8349",
35 .mask = 0xFFFF0000,
36 .value = 0x80510000,
37 .num_devices = 8,
38 .device_list = (enum ppc_sys_devices[])
39 {
40 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
41 MPC83xx_IIC2, MPC83xx_DUART,
42 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
43 },
44 },
45 {
46 .ppc_sys_name = "8347E",
47 .mask = 0xFFFF0000,
48 .value = 0x80520000,
49 .num_devices = 9,
50 .device_list = (enum ppc_sys_devices[])
51 {
52 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
53 MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
54 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
55 },
56 },
57 {
58 .ppc_sys_name = "8347",
59 .mask = 0xFFFF0000,
60 .value = 0x80530000,
61 .num_devices = 8,
62 .device_list = (enum ppc_sys_devices[])
63 {
64 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
65 MPC83xx_IIC2, MPC83xx_DUART,
66 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
67 },
68 },
69 {
70 .ppc_sys_name = "8347E",
71 .mask = 0xFFFF0000,
72 .value = 0x80540000,
73 .num_devices = 9,
74 .device_list = (enum ppc_sys_devices[])
75 {
76 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
77 MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
78 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
79 },
80 },
81 {
82 .ppc_sys_name = "8347",
83 .mask = 0xFFFF0000,
84 .value = 0x80550000,
85 .num_devices = 8,
86 .device_list = (enum ppc_sys_devices[])
87 {
88 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
89 MPC83xx_IIC2, MPC83xx_DUART,
90 MPC83xx_USB2_DR, MPC83xx_USB2_MPH, MPC83xx_MDIO
91 },
92 },
93 {
94 .ppc_sys_name = "8343E",
95 .mask = 0xFFFF0000,
96 .value = 0x80560000,
97 .num_devices = 8,
98 .device_list = (enum ppc_sys_devices[])
99 {
100 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
101 MPC83xx_IIC2, MPC83xx_DUART, MPC83xx_SEC2,
102 MPC83xx_USB2_DR, MPC83xx_MDIO
103 },
104 },
105 {
106 .ppc_sys_name = "8343",
107 .mask = 0xFFFF0000,
108 .value = 0x80570000,
109 .num_devices = 7,
110 .device_list = (enum ppc_sys_devices[])
111 {
112 MPC83xx_TSEC1, MPC83xx_TSEC2, MPC83xx_IIC1,
113 MPC83xx_IIC2, MPC83xx_DUART,
114 MPC83xx_USB2_DR, MPC83xx_MDIO
115 },
116 },
117 { /* default match */
118 .ppc_sys_name = "",
119 .mask = 0x00000000,
120 .value = 0x00000000,
121 },
122};
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c
deleted file mode 100644
index 325136e5aee0..000000000000
--- a/arch/ppc/syslib/mpc85xx_devices.c
+++ /dev/null
@@ -1,826 +0,0 @@
1/*
2 * MPC85xx Device descriptions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/device.h>
17#include <linux/serial_8250.h>
18#include <linux/fsl_devices.h>
19#include <linux/fs_enet_pd.h>
20#include <asm/mpc85xx.h>
21#include <asm/irq.h>
22#include <asm/ppc_sys.h>
23#include <asm/cpm2.h>
24
25/* We use offsets for IORESOURCE_MEM since we do not know at compile time
26 * what CCSRBAR is, will get fixed up by mach_mpc85xx_fixup
27 */
28struct gianfar_mdio_data mpc85xx_mdio_pdata = {
29};
30
31static struct gianfar_platform_data mpc85xx_tsec1_pdata = {
32 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
33 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
34 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
35};
36
37static struct gianfar_platform_data mpc85xx_tsec2_pdata = {
38 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
39 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
40 FSL_GIANFAR_DEV_HAS_MULTI_INTR,
41};
42
43static struct gianfar_platform_data mpc85xx_etsec1_pdata = {
44 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
45 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
46 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
47 FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
48 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
49};
50
51static struct gianfar_platform_data mpc85xx_etsec2_pdata = {
52 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
53 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
54 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
55 FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
56 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
57};
58
59static struct gianfar_platform_data mpc85xx_etsec3_pdata = {
60 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
61 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
62 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
63 FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
64 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
65};
66
67static struct gianfar_platform_data mpc85xx_etsec4_pdata = {
68 .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
69 FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON |
70 FSL_GIANFAR_DEV_HAS_MULTI_INTR |
71 FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN |
72 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH,
73};
74
75static struct gianfar_platform_data mpc85xx_fec_pdata = {
76 .device_flags = 0,
77};
78
79static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = {
80 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
81};
82
83static struct fsl_i2c_platform_data mpc85xx_fsl_i2c2_pdata = {
84 .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR,
85};
86
87static struct fs_platform_info mpc85xx_fcc1_pdata = {
88 .fs_no = fsid_fcc1,
89 .cp_page = CPM_CR_FCC1_PAGE,
90 .cp_block = CPM_CR_FCC1_SBLOCK,
91
92 .rx_ring = 32,
93 .tx_ring = 32,
94 .rx_copybreak = 240,
95 .use_napi = 0,
96 .napi_weight = 17,
97
98 .clk_mask = CMX1_CLK_MASK,
99 .clk_route = CMX1_CLK_ROUTE,
100 .clk_trx = (PC_F1RXCLK | PC_F1TXCLK),
101
102 .mem_offset = FCC1_MEM_OFFSET,
103};
104
105static struct fs_platform_info mpc85xx_fcc2_pdata = {
106 .fs_no = fsid_fcc2,
107 .cp_page = CPM_CR_FCC2_PAGE,
108 .cp_block = CPM_CR_FCC2_SBLOCK,
109
110 .rx_ring = 32,
111 .tx_ring = 32,
112 .rx_copybreak = 240,
113 .use_napi = 0,
114 .napi_weight = 17,
115
116 .clk_mask = CMX2_CLK_MASK,
117 .clk_route = CMX2_CLK_ROUTE,
118 .clk_trx = (PC_F2RXCLK | PC_F2TXCLK),
119
120 .mem_offset = FCC2_MEM_OFFSET,
121};
122
123static struct fs_platform_info mpc85xx_fcc3_pdata = {
124 .fs_no = fsid_fcc3,
125 .cp_page = CPM_CR_FCC3_PAGE,
126 .cp_block = CPM_CR_FCC3_SBLOCK,
127
128 .rx_ring = 32,
129 .tx_ring = 32,
130 .rx_copybreak = 240,
131 .use_napi = 0,
132 .napi_weight = 17,
133
134 .clk_mask = CMX3_CLK_MASK,
135 .clk_route = CMX3_CLK_ROUTE,
136 .clk_trx = (PC_F3RXCLK | PC_F3TXCLK),
137
138 .mem_offset = FCC3_MEM_OFFSET,
139};
140
141static struct plat_serial8250_port serial_platform_data[] = {
142 [0] = {
143 .mapbase = 0x4500,
144 .irq = MPC85xx_IRQ_DUART,
145 .iotype = UPIO_MEM,
146 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ,
147 },
148 [1] = {
149 .mapbase = 0x4600,
150 .irq = MPC85xx_IRQ_DUART,
151 .iotype = UPIO_MEM,
152 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ,
153 },
154 { },
155};
156
157struct platform_device ppc_sys_platform_devices[] = {
158 [MPC85xx_TSEC1] = {
159 .name = "fsl-gianfar",
160 .id = 1,
161 .dev.platform_data = &mpc85xx_tsec1_pdata,
162 .num_resources = 4,
163 .resource = (struct resource[]) {
164 {
165 .start = MPC85xx_ENET1_OFFSET,
166 .end = MPC85xx_ENET1_OFFSET +
167 MPC85xx_ENET1_SIZE - 1,
168 .flags = IORESOURCE_MEM,
169 },
170 {
171 .name = "tx",
172 .start = MPC85xx_IRQ_TSEC1_TX,
173 .end = MPC85xx_IRQ_TSEC1_TX,
174 .flags = IORESOURCE_IRQ,
175 },
176 {
177 .name = "rx",
178 .start = MPC85xx_IRQ_TSEC1_RX,
179 .end = MPC85xx_IRQ_TSEC1_RX,
180 .flags = IORESOURCE_IRQ,
181 },
182 {
183 .name = "error",
184 .start = MPC85xx_IRQ_TSEC1_ERROR,
185 .end = MPC85xx_IRQ_TSEC1_ERROR,
186 .flags = IORESOURCE_IRQ,
187 },
188 },
189 },
190 [MPC85xx_TSEC2] = {
191 .name = "fsl-gianfar",
192 .id = 2,
193 .dev.platform_data = &mpc85xx_tsec2_pdata,
194 .num_resources = 4,
195 .resource = (struct resource[]) {
196 {
197 .start = MPC85xx_ENET2_OFFSET,
198 .end = MPC85xx_ENET2_OFFSET +
199 MPC85xx_ENET2_SIZE - 1,
200 .flags = IORESOURCE_MEM,
201 },
202 {
203 .name = "tx",
204 .start = MPC85xx_IRQ_TSEC2_TX,
205 .end = MPC85xx_IRQ_TSEC2_TX,
206 .flags = IORESOURCE_IRQ,
207 },
208 {
209 .name = "rx",
210 .start = MPC85xx_IRQ_TSEC2_RX,
211 .end = MPC85xx_IRQ_TSEC2_RX,
212 .flags = IORESOURCE_IRQ,
213 },
214 {
215 .name = "error",
216 .start = MPC85xx_IRQ_TSEC2_ERROR,
217 .end = MPC85xx_IRQ_TSEC2_ERROR,
218 .flags = IORESOURCE_IRQ,
219 },
220 },
221 },
222 [MPC85xx_FEC] = {
223 .name = "fsl-gianfar",
224 .id = 3,
225 .dev.platform_data = &mpc85xx_fec_pdata,
226 .num_resources = 2,
227 .resource = (struct resource[]) {
228 {
229 .start = MPC85xx_ENET3_OFFSET,
230 .end = MPC85xx_ENET3_OFFSET +
231 MPC85xx_ENET3_SIZE - 1,
232 .flags = IORESOURCE_MEM,
233
234 },
235 {
236 .start = MPC85xx_IRQ_FEC,
237 .end = MPC85xx_IRQ_FEC,
238 .flags = IORESOURCE_IRQ,
239 },
240 },
241 },
242 [MPC85xx_IIC1] = {
243 .name = "fsl-i2c",
244 .id = 1,
245 .dev.platform_data = &mpc85xx_fsl_i2c_pdata,
246 .num_resources = 2,
247 .resource = (struct resource[]) {
248 {
249 .start = MPC85xx_IIC1_OFFSET,
250 .end = MPC85xx_IIC1_OFFSET +
251 MPC85xx_IIC1_SIZE - 1,
252 .flags = IORESOURCE_MEM,
253 },
254 {
255 .start = MPC85xx_IRQ_IIC1,
256 .end = MPC85xx_IRQ_IIC1,
257 .flags = IORESOURCE_IRQ,
258 },
259 },
260 },
261 [MPC85xx_DMA0] = {
262 .name = "fsl-dma",
263 .id = 0,
264 .num_resources = 2,
265 .resource = (struct resource[]) {
266 {
267 .start = MPC85xx_DMA0_OFFSET,
268 .end = MPC85xx_DMA0_OFFSET +
269 MPC85xx_DMA0_SIZE - 1,
270 .flags = IORESOURCE_MEM,
271 },
272 {
273 .start = MPC85xx_IRQ_DMA0,
274 .end = MPC85xx_IRQ_DMA0,
275 .flags = IORESOURCE_IRQ,
276 },
277 },
278 },
279 [MPC85xx_DMA1] = {
280 .name = "fsl-dma",
281 .id = 1,
282 .num_resources = 2,
283 .resource = (struct resource[]) {
284 {
285 .start = MPC85xx_DMA1_OFFSET,
286 .end = MPC85xx_DMA1_OFFSET +
287 MPC85xx_DMA1_SIZE - 1,
288 .flags = IORESOURCE_MEM,
289 },
290 {
291 .start = MPC85xx_IRQ_DMA1,
292 .end = MPC85xx_IRQ_DMA1,
293 .flags = IORESOURCE_IRQ,
294 },
295 },
296 },
297 [MPC85xx_DMA2] = {
298 .name = "fsl-dma",
299 .id = 2,
300 .num_resources = 2,
301 .resource = (struct resource[]) {
302 {
303 .start = MPC85xx_DMA2_OFFSET,
304 .end = MPC85xx_DMA2_OFFSET +
305 MPC85xx_DMA2_SIZE - 1,
306 .flags = IORESOURCE_MEM,
307 },
308 {
309 .start = MPC85xx_IRQ_DMA2,
310 .end = MPC85xx_IRQ_DMA2,
311 .flags = IORESOURCE_IRQ,
312 },
313 },
314 },
315 [MPC85xx_DMA3] = {
316 .name = "fsl-dma",
317 .id = 3,
318 .num_resources = 2,
319 .resource = (struct resource[]) {
320 {
321 .start = MPC85xx_DMA3_OFFSET,
322 .end = MPC85xx_DMA3_OFFSET +
323 MPC85xx_DMA3_SIZE - 1,
324 .flags = IORESOURCE_MEM,
325 },
326 {
327 .start = MPC85xx_IRQ_DMA3,
328 .end = MPC85xx_IRQ_DMA3,
329 .flags = IORESOURCE_IRQ,
330 },
331 },
332 },
333 [MPC85xx_DUART] = {
334 .name = "serial8250",
335 .id = PLAT8250_DEV_PLATFORM,
336 .dev.platform_data = serial_platform_data,
337 },
338 [MPC85xx_PERFMON] = {
339 .name = "fsl-perfmon",
340 .id = 1,
341 .num_resources = 2,
342 .resource = (struct resource[]) {
343 {
344 .start = MPC85xx_PERFMON_OFFSET,
345 .end = MPC85xx_PERFMON_OFFSET +
346 MPC85xx_PERFMON_SIZE - 1,
347 .flags = IORESOURCE_MEM,
348 },
349 {
350 .start = MPC85xx_IRQ_PERFMON,
351 .end = MPC85xx_IRQ_PERFMON,
352 .flags = IORESOURCE_IRQ,
353 },
354 },
355 },
356 [MPC85xx_SEC2] = {
357 .name = "fsl-sec2",
358 .id = 1,
359 .num_resources = 2,
360 .resource = (struct resource[]) {
361 {
362 .start = MPC85xx_SEC2_OFFSET,
363 .end = MPC85xx_SEC2_OFFSET +
364 MPC85xx_SEC2_SIZE - 1,
365 .flags = IORESOURCE_MEM,
366 },
367 {
368 .start = MPC85xx_IRQ_SEC2,
369 .end = MPC85xx_IRQ_SEC2,
370 .flags = IORESOURCE_IRQ,
371 },
372 },
373 },
374 [MPC85xx_CPM_FCC1] = {
375 .name = "fsl-cpm-fcc",
376 .id = 1,
377 .num_resources = 4,
378 .dev.platform_data = &mpc85xx_fcc1_pdata,
379 .resource = (struct resource[]) {
380 {
381 .name = "fcc_regs",
382 .start = 0x91300,
383 .end = 0x9131F,
384 .flags = IORESOURCE_MEM,
385 },
386 {
387 .name = "fcc_regs_c",
388 .start = 0x91380,
389 .end = 0x9139F,
390 .flags = IORESOURCE_MEM,
391 },
392 {
393 .name = "fcc_pram",
394 .start = 0x88400,
395 .end = 0x884ff,
396 .flags = IORESOURCE_MEM,
397 },
398 {
399 .start = SIU_INT_FCC1,
400 .end = SIU_INT_FCC1,
401 .flags = IORESOURCE_IRQ,
402 },
403 },
404 },
405 [MPC85xx_CPM_FCC2] = {
406 .name = "fsl-cpm-fcc",
407 .id = 2,
408 .num_resources = 4,
409 .dev.platform_data = &mpc85xx_fcc2_pdata,
410 .resource = (struct resource[]) {
411 {
412 .name = "fcc_regs",
413 .start = 0x91320,
414 .end = 0x9133F,
415 .flags = IORESOURCE_MEM,
416 },
417 {
418 .name = "fcc_regs_c",
419 .start = 0x913A0,
420 .end = 0x913CF,
421 .flags = IORESOURCE_MEM,
422 },
423 {
424 .name = "fcc_pram",
425 .start = 0x88500,
426 .end = 0x885ff,
427 .flags = IORESOURCE_MEM,
428 },
429 {
430 .start = SIU_INT_FCC2,
431 .end = SIU_INT_FCC2,
432 .flags = IORESOURCE_IRQ,
433 },
434 },
435 },
436 [MPC85xx_CPM_FCC3] = {
437 .name = "fsl-cpm-fcc",
438 .id = 3,
439 .num_resources = 4,
440 .dev.platform_data = &mpc85xx_fcc3_pdata,
441 .resource = (struct resource[]) {
442 {
443 .name = "fcc_regs",
444 .start = 0x91340,
445 .end = 0x9135F,
446 .flags = IORESOURCE_MEM,
447 },
448 {
449 .name = "fcc_regs_c",
450 .start = 0x913D0,
451 .end = 0x913FF,
452 .flags = IORESOURCE_MEM,
453 },
454 {
455 .name = "fcc_pram",
456 .start = 0x88600,
457 .end = 0x886ff,
458 .flags = IORESOURCE_MEM,
459 },
460 {
461 .start = SIU_INT_FCC3,
462 .end = SIU_INT_FCC3,
463 .flags = IORESOURCE_IRQ,
464 },
465 },
466 },
467 [MPC85xx_CPM_I2C] = {
468 .name = "fsl-cpm-i2c",
469 .id = 1,
470 .num_resources = 2,
471 .resource = (struct resource[]) {
472 {
473 .start = 0x91860,
474 .end = 0x918BF,
475 .flags = IORESOURCE_MEM,
476 },
477 {
478 .start = SIU_INT_I2C,
479 .end = SIU_INT_I2C,
480 .flags = IORESOURCE_IRQ,
481 },
482 },
483 },
484 [MPC85xx_CPM_SCC1] = {
485 .name = "fsl-cpm-scc",
486 .id = 1,
487 .num_resources = 2,
488 .resource = (struct resource[]) {
489 {
490 .start = 0x91A00,
491 .end = 0x91A1F,
492 .flags = IORESOURCE_MEM,
493 },
494 {
495 .start = SIU_INT_SCC1,
496 .end = SIU_INT_SCC1,
497 .flags = IORESOURCE_IRQ,
498 },
499 },
500 },
501 [MPC85xx_CPM_SCC2] = {
502 .name = "fsl-cpm-scc",
503 .id = 2,
504 .num_resources = 2,
505 .resource = (struct resource[]) {
506 {
507 .start = 0x91A20,
508 .end = 0x91A3F,
509 .flags = IORESOURCE_MEM,
510 },
511 {
512 .start = SIU_INT_SCC2,
513 .end = SIU_INT_SCC2,
514 .flags = IORESOURCE_IRQ,
515 },
516 },
517 },
518 [MPC85xx_CPM_SCC3] = {
519 .name = "fsl-cpm-scc",
520 .id = 3,
521 .num_resources = 2,
522 .resource = (struct resource[]) {
523 {
524 .start = 0x91A40,
525 .end = 0x91A5F,
526 .flags = IORESOURCE_MEM,
527 },
528 {
529 .start = SIU_INT_SCC3,
530 .end = SIU_INT_SCC3,
531 .flags = IORESOURCE_IRQ,
532 },
533 },
534 },
535 [MPC85xx_CPM_SCC4] = {
536 .name = "fsl-cpm-scc",
537 .id = 4,
538 .num_resources = 2,
539 .resource = (struct resource[]) {
540 {
541 .start = 0x91A60,
542 .end = 0x91A7F,
543 .flags = IORESOURCE_MEM,
544 },
545 {
546 .start = SIU_INT_SCC4,
547 .end = SIU_INT_SCC4,
548 .flags = IORESOURCE_IRQ,
549 },
550 },
551 },
552 [MPC85xx_CPM_SPI] = {
553 .name = "fsl-cpm-spi",
554 .id = 1,
555 .num_resources = 2,
556 .resource = (struct resource[]) {
557 {
558 .start = 0x91AA0,
559 .end = 0x91AFF,
560 .flags = IORESOURCE_MEM,
561 },
562 {
563 .start = SIU_INT_SPI,
564 .end = SIU_INT_SPI,
565 .flags = IORESOURCE_IRQ,
566 },
567 },
568 },
569 [MPC85xx_CPM_MCC1] = {
570 .name = "fsl-cpm-mcc",
571 .id = 1,
572 .num_resources = 2,
573 .resource = (struct resource[]) {
574 {
575 .start = 0x91B30,
576 .end = 0x91B3F,
577 .flags = IORESOURCE_MEM,
578 },
579 {
580 .start = SIU_INT_MCC1,
581 .end = SIU_INT_MCC1,
582 .flags = IORESOURCE_IRQ,
583 },
584 },
585 },
586 [MPC85xx_CPM_MCC2] = {
587 .name = "fsl-cpm-mcc",
588 .id = 2,
589 .num_resources = 2,
590 .resource = (struct resource[]) {
591 {
592 .start = 0x91B50,
593 .end = 0x91B5F,
594 .flags = IORESOURCE_MEM,
595 },
596 {
597 .start = SIU_INT_MCC2,
598 .end = SIU_INT_MCC2,
599 .flags = IORESOURCE_IRQ,
600 },
601 },
602 },
603 [MPC85xx_CPM_SMC1] = {
604 .name = "fsl-cpm-smc",
605 .id = 1,
606 .num_resources = 2,
607 .resource = (struct resource[]) {
608 {
609 .start = 0x91A80,
610 .end = 0x91A8F,
611 .flags = IORESOURCE_MEM,
612 },
613 {
614 .start = SIU_INT_SMC1,
615 .end = SIU_INT_SMC1,
616 .flags = IORESOURCE_IRQ,
617 },
618 },
619 },
620 [MPC85xx_CPM_SMC2] = {
621 .name = "fsl-cpm-smc",
622 .id = 2,
623 .num_resources = 2,
624 .resource = (struct resource[]) {
625 {
626 .start = 0x91A90,
627 .end = 0x91A9F,
628 .flags = IORESOURCE_MEM,
629 },
630 {
631 .start = SIU_INT_SMC2,
632 .end = SIU_INT_SMC2,
633 .flags = IORESOURCE_IRQ,
634 },
635 },
636 },
637 [MPC85xx_CPM_USB] = {
638 .name = "fsl-cpm-usb",
639 .id = 2,
640 .num_resources = 2,
641 .resource = (struct resource[]) {
642 {
643 .start = 0x91B60,
644 .end = 0x91B7F,
645 .flags = IORESOURCE_MEM,
646 },
647 {
648 .start = SIU_INT_USB,
649 .end = SIU_INT_USB,
650 .flags = IORESOURCE_IRQ,
651 },
652 },
653 },
654 [MPC85xx_eTSEC1] = {
655 .name = "fsl-gianfar",
656 .id = 1,
657 .dev.platform_data = &mpc85xx_etsec1_pdata,
658 .num_resources = 4,
659 .resource = (struct resource[]) {
660 {
661 .start = MPC85xx_ENET1_OFFSET,
662 .end = MPC85xx_ENET1_OFFSET +
663 MPC85xx_ENET1_SIZE - 1,
664 .flags = IORESOURCE_MEM,
665 },
666 {
667 .name = "tx",
668 .start = MPC85xx_IRQ_TSEC1_TX,
669 .end = MPC85xx_IRQ_TSEC1_TX,
670 .flags = IORESOURCE_IRQ,
671 },
672 {
673 .name = "rx",
674 .start = MPC85xx_IRQ_TSEC1_RX,
675 .end = MPC85xx_IRQ_TSEC1_RX,
676 .flags = IORESOURCE_IRQ,
677 },
678 {
679 .name = "error",
680 .start = MPC85xx_IRQ_TSEC1_ERROR,
681 .end = MPC85xx_IRQ_TSEC1_ERROR,
682 .flags = IORESOURCE_IRQ,
683 },
684 },
685 },
686 [MPC85xx_eTSEC2] = {
687 .name = "fsl-gianfar",
688 .id = 2,
689 .dev.platform_data = &mpc85xx_etsec2_pdata,
690 .num_resources = 4,
691 .resource = (struct resource[]) {
692 {
693 .start = MPC85xx_ENET2_OFFSET,
694 .end = MPC85xx_ENET2_OFFSET +
695 MPC85xx_ENET2_SIZE - 1,
696 .flags = IORESOURCE_MEM,
697 },
698 {
699 .name = "tx",
700 .start = MPC85xx_IRQ_TSEC2_TX,
701 .end = MPC85xx_IRQ_TSEC2_TX,
702 .flags = IORESOURCE_IRQ,
703 },
704 {
705 .name = "rx",
706 .start = MPC85xx_IRQ_TSEC2_RX,
707 .end = MPC85xx_IRQ_TSEC2_RX,
708 .flags = IORESOURCE_IRQ,
709 },
710 {
711 .name = "error",
712 .start = MPC85xx_IRQ_TSEC2_ERROR,
713 .end = MPC85xx_IRQ_TSEC2_ERROR,
714 .flags = IORESOURCE_IRQ,
715 },
716 },
717 },
718 [MPC85xx_eTSEC3] = {
719 .name = "fsl-gianfar",
720 .id = 3,
721 .dev.platform_data = &mpc85xx_etsec3_pdata,
722 .num_resources = 4,
723 .resource = (struct resource[]) {
724 {
725 .start = MPC85xx_ENET3_OFFSET,
726 .end = MPC85xx_ENET3_OFFSET +
727 MPC85xx_ENET3_SIZE - 1,
728 .flags = IORESOURCE_MEM,
729 },
730 {
731 .name = "tx",
732 .start = MPC85xx_IRQ_TSEC3_TX,
733 .end = MPC85xx_IRQ_TSEC3_TX,
734 .flags = IORESOURCE_IRQ,
735 },
736 {
737 .name = "rx",
738 .start = MPC85xx_IRQ_TSEC3_RX,
739 .end = MPC85xx_IRQ_TSEC3_RX,
740 .flags = IORESOURCE_IRQ,
741 },
742 {
743 .name = "error",
744 .start = MPC85xx_IRQ_TSEC3_ERROR,
745 .end = MPC85xx_IRQ_TSEC3_ERROR,
746 .flags = IORESOURCE_IRQ,
747 },
748 },
749 },
750 [MPC85xx_eTSEC4] = {
751 .name = "fsl-gianfar",
752 .id = 4,
753 .dev.platform_data = &mpc85xx_etsec4_pdata,
754 .num_resources = 4,
755 .resource = (struct resource[]) {
756 {
757 .start = 0x27000,
758 .end = 0x27fff,
759 .flags = IORESOURCE_MEM,
760 },
761 {
762 .name = "tx",
763 .start = MPC85xx_IRQ_TSEC4_TX,
764 .end = MPC85xx_IRQ_TSEC4_TX,
765 .flags = IORESOURCE_IRQ,
766 },
767 {
768 .name = "rx",
769 .start = MPC85xx_IRQ_TSEC4_RX,
770 .end = MPC85xx_IRQ_TSEC4_RX,
771 .flags = IORESOURCE_IRQ,
772 },
773 {
774 .name = "error",
775 .start = MPC85xx_IRQ_TSEC4_ERROR,
776 .end = MPC85xx_IRQ_TSEC4_ERROR,
777 .flags = IORESOURCE_IRQ,
778 },
779 },
780 },
781 [MPC85xx_IIC2] = {
782 .name = "fsl-i2c",
783 .id = 2,
784 .dev.platform_data = &mpc85xx_fsl_i2c2_pdata,
785 .num_resources = 2,
786 .resource = (struct resource[]) {
787 {
788 .start = 0x03100,
789 .end = 0x031ff,
790 .flags = IORESOURCE_MEM,
791 },
792 {
793 .start = MPC85xx_IRQ_IIC1,
794 .end = MPC85xx_IRQ_IIC1,
795 .flags = IORESOURCE_IRQ,
796 },
797 },
798 },
799 [MPC85xx_MDIO] = {
800 .name = "fsl-gianfar_mdio",
801 .id = 0,
802 .dev.platform_data = &mpc85xx_mdio_pdata,
803 .num_resources = 1,
804 .resource = (struct resource[]) {
805 {
806 .start = 0x24520,
807 .end = 0x2453f,
808 .flags = IORESOURCE_MEM,
809 },
810 },
811 },
812};
813
814static int __init mach_mpc85xx_fixup(struct platform_device *pdev)
815{
816 ppc_sys_fixup_mem_resource(pdev, CCSRBAR);
817 return 0;
818}
819
820static int __init mach_mpc85xx_init(void)
821{
822 ppc_sys_device_fixup = mach_mpc85xx_fixup;
823 return 0;
824}
825
826postcore_initcall(mach_mpc85xx_init);
diff --git a/arch/ppc/syslib/mpc85xx_sys.c b/arch/ppc/syslib/mpc85xx_sys.c
deleted file mode 100644
index d96a93dbcb5a..000000000000
--- a/arch/ppc/syslib/mpc85xx_sys.c
+++ /dev/null
@@ -1,233 +0,0 @@
1/*
2 * MPC85xx System descriptions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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#include <linux/init.h>
15#include <linux/module.h>
16#include <linux/device.h>
17#include <asm/ppc_sys.h>
18
19struct ppc_sys_spec *cur_ppc_sys_spec;
20struct ppc_sys_spec ppc_sys_specs[] = {
21 {
22 .ppc_sys_name = "8540",
23 .mask = 0xFFFF0000,
24 .value = 0x80300000,
25 .num_devices = 11,
26 .device_list = (enum ppc_sys_devices[])
27 {
28 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_FEC, MPC85xx_IIC1,
29 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
30 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_MDIO,
31 },
32 },
33 {
34 .ppc_sys_name = "8560",
35 .mask = 0xFFFF0000,
36 .value = 0x80700000,
37 .num_devices = 20,
38 .device_list = (enum ppc_sys_devices[])
39 {
40 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
41 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
42 MPC85xx_PERFMON,
43 MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
44 MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3, MPC85xx_CPM_SCC4,
45 MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2, MPC85xx_CPM_FCC3,
46 MPC85xx_CPM_MCC1, MPC85xx_CPM_MCC2, MPC85xx_MDIO,
47 },
48 },
49 {
50 .ppc_sys_name = "8541",
51 .mask = 0xFFFF0000,
52 .value = 0x80720000,
53 .num_devices = 14,
54 .device_list = (enum ppc_sys_devices[])
55 {
56 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
57 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
58 MPC85xx_PERFMON, MPC85xx_DUART,
59 MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
60 MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
61 MPC85xx_MDIO,
62 },
63 },
64 {
65 .ppc_sys_name = "8541E",
66 .mask = 0xFFFF0000,
67 .value = 0x807A0000,
68 .num_devices = 15,
69 .device_list = (enum ppc_sys_devices[])
70 {
71 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
72 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
73 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
74 MPC85xx_CPM_SPI, MPC85xx_CPM_I2C,
75 MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
76 MPC85xx_MDIO,
77 },
78 },
79 {
80 .ppc_sys_name = "8555",
81 .mask = 0xFFFF0000,
82 .value = 0x80710000,
83 .num_devices = 20,
84 .device_list = (enum ppc_sys_devices[])
85 {
86 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
87 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
88 MPC85xx_PERFMON, MPC85xx_DUART,
89 MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
90 MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
91 MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
92 MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
93 MPC85xx_CPM_USB,
94 MPC85xx_MDIO,
95 },
96 },
97 {
98 .ppc_sys_name = "8555E",
99 .mask = 0xFFFF0000,
100 .value = 0x80790000,
101 .num_devices = 21,
102 .device_list = (enum ppc_sys_devices[])
103 {
104 MPC85xx_TSEC1, MPC85xx_TSEC2, MPC85xx_IIC1,
105 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
106 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
107 MPC85xx_CPM_SPI, MPC85xx_CPM_I2C, MPC85xx_CPM_SCC1,
108 MPC85xx_CPM_SCC2, MPC85xx_CPM_SCC3,
109 MPC85xx_CPM_FCC1, MPC85xx_CPM_FCC2,
110 MPC85xx_CPM_SMC1, MPC85xx_CPM_SMC2,
111 MPC85xx_CPM_USB,
112 MPC85xx_MDIO,
113 },
114 },
115 /* SVRs on 8548 rev1.0 matches for 8548/8547/8545 */
116 {
117 .ppc_sys_name = "8548E",
118 .mask = 0xFFFF00F0,
119 .value = 0x80390010,
120 .num_devices = 14,
121 .device_list = (enum ppc_sys_devices[])
122 {
123 MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
124 MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
125 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
126 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
127 MPC85xx_MDIO,
128 },
129 },
130 {
131 .ppc_sys_name = "8548",
132 .mask = 0xFFFF00F0,
133 .value = 0x80310010,
134 .num_devices = 13,
135 .device_list = (enum ppc_sys_devices[])
136 {
137 MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
138 MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
139 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
140 MPC85xx_PERFMON, MPC85xx_DUART,
141 MPC85xx_MDIO,
142 },
143 },
144 {
145 .ppc_sys_name = "8547E",
146 .mask = 0xFFFF00F0,
147 .value = 0x80390010,
148 .num_devices = 14,
149 .device_list = (enum ppc_sys_devices[])
150 {
151 MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
152 MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
153 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
154 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
155 MPC85xx_MDIO,
156 },
157 },
158 {
159 .ppc_sys_name = "8547",
160 .mask = 0xFFFF00F0,
161 .value = 0x80310010,
162 .num_devices = 13,
163 .device_list = (enum ppc_sys_devices[])
164 {
165 MPC85xx_eTSEC1, MPC85xx_eTSEC2, MPC85xx_eTSEC3,
166 MPC85xx_eTSEC4, MPC85xx_IIC1, MPC85xx_IIC2,
167 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
168 MPC85xx_PERFMON, MPC85xx_DUART,
169 MPC85xx_MDIO,
170 },
171 },
172 {
173 .ppc_sys_name = "8545E",
174 .mask = 0xFFFF00F0,
175 .value = 0x80390010,
176 .num_devices = 12,
177 .device_list = (enum ppc_sys_devices[])
178 {
179 MPC85xx_eTSEC1, MPC85xx_eTSEC2,
180 MPC85xx_IIC1, MPC85xx_IIC2,
181 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
182 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
183 MPC85xx_MDIO,
184 },
185 },
186 {
187 .ppc_sys_name = "8545",
188 .mask = 0xFFFF00F0,
189 .value = 0x80310010,
190 .num_devices = 11,
191 .device_list = (enum ppc_sys_devices[])
192 {
193 MPC85xx_eTSEC1, MPC85xx_eTSEC2,
194 MPC85xx_IIC1, MPC85xx_IIC2,
195 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
196 MPC85xx_PERFMON, MPC85xx_DUART,
197 MPC85xx_MDIO,
198 },
199 },
200 {
201 .ppc_sys_name = "8543E",
202 .mask = 0xFFFF00F0,
203 .value = 0x803A0010,
204 .num_devices = 12,
205 .device_list = (enum ppc_sys_devices[])
206 {
207 MPC85xx_eTSEC1, MPC85xx_eTSEC2,
208 MPC85xx_IIC1, MPC85xx_IIC2,
209 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
210 MPC85xx_PERFMON, MPC85xx_DUART, MPC85xx_SEC2,
211 MPC85xx_MDIO,
212 },
213 },
214 {
215 .ppc_sys_name = "8543",
216 .mask = 0xFFFF00F0,
217 .value = 0x80320010,
218 .num_devices = 11,
219 .device_list = (enum ppc_sys_devices[])
220 {
221 MPC85xx_eTSEC1, MPC85xx_eTSEC2,
222 MPC85xx_IIC1, MPC85xx_IIC2,
223 MPC85xx_DMA0, MPC85xx_DMA1, MPC85xx_DMA2, MPC85xx_DMA3,
224 MPC85xx_PERFMON, MPC85xx_DUART,
225 MPC85xx_MDIO,
226 },
227 },
228 { /* default match */
229 .ppc_sys_name = "",
230 .mask = 0x00000000,
231 .value = 0x00000000,
232 },
233};
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c
index c05ac87ece4c..80804eee5795 100644
--- a/arch/ppc/syslib/mpc8xx_devices.c
+++ b/arch/ppc/syslib/mpc8xx_devices.c
@@ -16,7 +16,7 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/serial_8250.h> 17#include <linux/serial_8250.h>
18#include <linux/mii.h> 18#include <linux/mii.h>
19#include <asm/commproc.h> 19#include <asm/cpm1.h>
20#include <asm/mpc8xx.h> 20#include <asm/mpc8xx.h>
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/ppc_sys.h> 22#include <asm/ppc_sys.h>
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
index 4b7a3338e122..2dd2dc5cd404 100644
--- a/arch/ppc/syslib/mv64360_pic.c
+++ b/arch/ppc/syslib/mv64360_pic.c
@@ -36,7 +36,6 @@
36#include <linux/init.h> 36#include <linux/init.h>
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <linux/signal.h> 38#include <linux/signal.h>
39#include <linux/stddef.h>
40#include <linux/delay.h> 39#include <linux/delay.h>
41#include <linux/irq.h> 40#include <linux/irq.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c
index 3f5be2c5ce99..ac80370ed2f7 100644
--- a/arch/ppc/syslib/ocp.c
+++ b/arch/ppc/syslib/ocp.c
@@ -20,7 +20,7 @@
20 * of peripherals are found on embedded SoC (System On a Chip) 20 * of peripherals are found on embedded SoC (System On a Chip)
21 * processors or highly integrated system controllers that have 21 * processors or highly integrated system controllers that have
22 * a host bridge and many peripherals. Common examples where 22 * a host bridge and many peripherals. Common examples where
23 * this is already used include the PPC4xx, PPC85xx, MPC52xx, 23 * this is already used include the PPC4xx, MPC52xx,
24 * and MV64xxx parts. 24 * and MV64xxx parts.
25 * 25 *
26 * This subsystem creates a standard OCP bus type within the 26 * This subsystem creates a standard OCP bus type within the
@@ -376,7 +376,7 @@ ocp_remove_one_device(unsigned int vendor, unsigned int function, int index)
376 376
377 down_write(&ocp_devices_sem); 377 down_write(&ocp_devices_sem);
378 dev = __ocp_find_device(vendor, function, index); 378 dev = __ocp_find_device(vendor, function, index);
379 list_del((struct list_head *)dev); 379 list_del(&dev->link);
380 up_write(&ocp_devices_sem); 380 up_write(&ocp_devices_sem);
381 381
382 DBG(("ocp: ocp_remove_one_device(vendor: %x, function: %x, index: %d)... done.\n", vendor, function, index)); 382 DBG(("ocp: ocp_remove_one_device(vendor: %x, function: %x, index: %d)... done.\n", vendor, function, index));
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index da36522d327a..67dffe27b5c3 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -24,7 +24,7 @@
24 24
25#include "open_pic_defs.h" 25#include "open_pic_defs.h"
26 26
27#if defined(CONFIG_PRPMC800) || defined(CONFIG_85xx) 27#if defined(CONFIG_PRPMC800)
28#define OPENPIC_BIG_ENDIAN 28#define OPENPIC_BIG_ENDIAN
29#endif 29#endif
30 30
diff --git a/arch/ppc/syslib/ppc83xx_pci.h b/arch/ppc/syslib/ppc83xx_pci.h
deleted file mode 100644
index ec691640f6be..000000000000
--- a/arch/ppc/syslib/ppc83xx_pci.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/* Created by Tony Li <tony.li@freescale.com>
2 * Copyright (c) 2005 freescale semiconductor
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18
19#ifndef __PPC_SYSLIB_PPC83XX_PCI_H
20#define __PPC_SYSLIB_PPC83XX_PCI_H
21
22typedef struct immr_clk {
23 u32 spmr; /* system PLL mode Register */
24 u32 occr; /* output clock control Register */
25 u32 sccr; /* system clock control Register */
26 u8 res0[0xF4];
27} immr_clk_t;
28
29/*
30 * Sequencer
31 */
32typedef struct immr_ios {
33 u32 potar0;
34 u8 res0[4];
35 u32 pobar0;
36 u8 res1[4];
37 u32 pocmr0;
38 u8 res2[4];
39 u32 potar1;
40 u8 res3[4];
41 u32 pobar1;
42 u8 res4[4];
43 u32 pocmr1;
44 u8 res5[4];
45 u32 potar2;
46 u8 res6[4];
47 u32 pobar2;
48 u8 res7[4];
49 u32 pocmr2;
50 u8 res8[4];
51 u32 potar3;
52 u8 res9[4];
53 u32 pobar3;
54 u8 res10[4];
55 u32 pocmr3;
56 u8 res11[4];
57 u32 potar4;
58 u8 res12[4];
59 u32 pobar4;
60 u8 res13[4];
61 u32 pocmr4;
62 u8 res14[4];
63 u32 potar5;
64 u8 res15[4];
65 u32 pobar5;
66 u8 res16[4];
67 u32 pocmr5;
68 u8 res17[4];
69 u8 res18[0x60];
70 u32 pmcr;
71 u8 res19[4];
72 u32 dtcr;
73 u8 res20[4];
74} immr_ios_t;
75#define POTAR_TA_MASK 0x000fffff
76#define POBAR_BA_MASK 0x000fffff
77#define POCMR_EN 0x80000000
78#define POCMR_IO 0x40000000 /* 0--memory space 1--I/O space */
79#define POCMR_SE 0x20000000 /* streaming enable */
80#define POCMR_DST 0x10000000 /* 0--PCI1 1--PCI2 */
81#define POCMR_CM_MASK 0x000fffff
82
83/*
84 * PCI Controller Control and Status Registers
85 */
86typedef struct immr_pcictrl {
87 u32 esr;
88 u32 ecdr;
89 u32 eer;
90 u32 eatcr;
91 u32 eacr;
92 u32 eeacr;
93 u32 edlcr;
94 u32 edhcr;
95 u32 gcr;
96 u32 ecr;
97 u32 gsr;
98 u8 res0[12];
99 u32 pitar2;
100 u8 res1[4];
101 u32 pibar2;
102 u32 piebar2;
103 u32 piwar2;
104 u8 res2[4];
105 u32 pitar1;
106 u8 res3[4];
107 u32 pibar1;
108 u32 piebar1;
109 u32 piwar1;
110 u8 res4[4];
111 u32 pitar0;
112 u8 res5[4];
113 u32 pibar0;
114 u8 res6[4];
115 u32 piwar0;
116 u8 res7[132];
117} immr_pcictrl_t;
118#define PITAR_TA_MASK 0x000fffff
119#define PIBAR_MASK 0xffffffff
120#define PIEBAR_EBA_MASK 0x000fffff
121#define PIWAR_EN 0x80000000
122#define PIWAR_PF 0x20000000
123#define PIWAR_RTT_MASK 0x000f0000
124#define PIWAR_RTT_NO_SNOOP 0x00040000
125#define PIWAR_RTT_SNOOP 0x00050000
126#define PIWAR_WTT_MASK 0x0000f000
127#define PIWAR_WTT_NO_SNOOP 0x00004000
128#define PIWAR_WTT_SNOOP 0x00005000
129#define PIWAR_IWS_MASK 0x0000003F
130#define PIWAR_IWS_4K 0x0000000B
131#define PIWAR_IWS_8K 0x0000000C
132#define PIWAR_IWS_16K 0x0000000D
133#define PIWAR_IWS_32K 0x0000000E
134#define PIWAR_IWS_64K 0x0000000F
135#define PIWAR_IWS_128K 0x00000010
136#define PIWAR_IWS_256K 0x00000011
137#define PIWAR_IWS_512K 0x00000012
138#define PIWAR_IWS_1M 0x00000013
139#define PIWAR_IWS_2M 0x00000014
140#define PIWAR_IWS_4M 0x00000015
141#define PIWAR_IWS_8M 0x00000016
142#define PIWAR_IWS_16M 0x00000017
143#define PIWAR_IWS_32M 0x00000018
144#define PIWAR_IWS_64M 0x00000019
145#define PIWAR_IWS_128M 0x0000001A
146#define PIWAR_IWS_256M 0x0000001B
147#define PIWAR_IWS_512M 0x0000001C
148#define PIWAR_IWS_1G 0x0000001D
149#define PIWAR_IWS_2G 0x0000001E
150
151#endif /* __PPC_SYSLIB_PPC83XX_PCI_H */
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c
deleted file mode 100644
index ec466db52114..000000000000
--- a/arch/ppc/syslib/ppc83xx_setup.c
+++ /dev/null
@@ -1,411 +0,0 @@
1/*
2 * MPC83XX common board code
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * 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 * 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * Added PCI support -- Tony Li <tony.li@freescale.com>
23 */
24
25#include <linux/types.h>
26#include <linux/module.h>
27#include <linux/init.h>
28#include <linux/pci.h>
29#include <linux/serial.h>
30#include <linux/tty.h> /* for linux/serial_core.h */
31#include <linux/serial_core.h>
32#include <linux/serial_8250.h>
33
34#include <asm/time.h>
35#include <asm/mpc83xx.h>
36#include <asm/mmu.h>
37#include <asm/ppc_sys.h>
38#include <asm/kgdb.h>
39#include <asm/delay.h>
40#include <asm/machdep.h>
41
42#include <syslib/ppc83xx_setup.h>
43#if defined(CONFIG_PCI)
44#include <asm/delay.h>
45#include <syslib/ppc83xx_pci.h>
46#endif
47
48phys_addr_t immrbar;
49
50/* Return the amount of memory */
51unsigned long __init
52mpc83xx_find_end_of_memory(void)
53{
54 bd_t *binfo;
55
56 binfo = (bd_t *) __res;
57
58 return binfo->bi_memsize;
59}
60
61long __init
62mpc83xx_time_init(void)
63{
64#define SPCR_OFFS 0x00000110
65#define SPCR_TBEN 0x00400000
66
67 bd_t *binfo = (bd_t *)__res;
68 u32 *spcr = ioremap(binfo->bi_immr_base + SPCR_OFFS, 4);
69
70 *spcr |= SPCR_TBEN;
71
72 iounmap(spcr);
73
74 return 0;
75}
76
77/* The decrementer counts at the system (internal) clock freq divided by 4 */
78void __init
79mpc83xx_calibrate_decr(void)
80{
81 bd_t *binfo = (bd_t *) __res;
82 unsigned int freq, divisor;
83
84 freq = binfo->bi_busfreq;
85 divisor = 4;
86 tb_ticks_per_jiffy = freq / HZ / divisor;
87 tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
88}
89
90#ifdef CONFIG_SERIAL_8250
91void __init
92mpc83xx_early_serial_map(void)
93{
94#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
95 struct uart_port serial_req;
96#endif
97 struct plat_serial8250_port *pdata;
98 bd_t *binfo = (bd_t *) __res;
99 pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC83xx_DUART);
100
101 /* Setup serial port access */
102 pdata[0].uartclk = binfo->bi_busfreq;
103 pdata[0].mapbase += binfo->bi_immr_base;
104 pdata[0].membase = ioremap(pdata[0].mapbase, 0x100);
105
106#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
107 memset(&serial_req, 0, sizeof (serial_req));
108 serial_req.iotype = UPIO_MEM;
109 serial_req.mapbase = pdata[0].mapbase;
110 serial_req.membase = pdata[0].membase;
111 serial_req.regshift = 0;
112
113 gen550_init(0, &serial_req);
114#endif
115
116 pdata[1].uartclk = binfo->bi_busfreq;
117 pdata[1].mapbase += binfo->bi_immr_base;
118 pdata[1].membase = ioremap(pdata[1].mapbase, 0x100);
119
120#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
121 /* Assume gen550_init() doesn't modify serial_req */
122 serial_req.mapbase = pdata[1].mapbase;
123 serial_req.membase = pdata[1].membase;
124
125 gen550_init(1, &serial_req);
126#endif
127}
128#endif
129
130void
131mpc83xx_restart(char *cmd)
132{
133 volatile unsigned char __iomem *reg;
134 unsigned char tmp;
135
136 reg = ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);
137
138 local_irq_disable();
139
140 /*
141 * Unlock the BCSR bits so a PRST will update the contents.
142 * Otherwise the reset asserts but doesn't clear.
143 */
144 tmp = in_8(reg + BCSR_MISC_REG3_OFF);
145 tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high false */
146 out_8(reg + BCSR_MISC_REG3_OFF, tmp);
147
148 /*
149 * Trigger a reset via a low->high transition of the
150 * PORESET bit.
151 */
152 tmp = in_8(reg + BCSR_MISC_REG2_OFF);
153 tmp &= ~BCSR_MISC_REG2_PORESET;
154 out_8(reg + BCSR_MISC_REG2_OFF, tmp);
155
156 udelay(1);
157
158 tmp |= BCSR_MISC_REG2_PORESET;
159 out_8(reg + BCSR_MISC_REG2_OFF, tmp);
160
161 for(;;);
162}
163
164void
165mpc83xx_power_off(void)
166{
167 local_irq_disable();
168 for(;;);
169}
170
171void
172mpc83xx_halt(void)
173{
174 local_irq_disable();
175 for(;;);
176}
177
178#if defined(CONFIG_PCI)
179void __init
180mpc83xx_setup_pci1(struct pci_controller *hose)
181{
182 u16 reg16;
183 volatile immr_pcictrl_t * pci_ctrl;
184 volatile immr_ios_t * ios;
185 bd_t *binfo = (bd_t *) __res;
186
187 pci_ctrl = ioremap(binfo->bi_immr_base + 0x8500, sizeof(immr_pcictrl_t));
188 ios = ioremap(binfo->bi_immr_base + 0x8400, sizeof(immr_ios_t));
189
190 /*
191 * Configure PCI Outbound Translation Windows
192 */
193 ios->potar0 = (MPC83xx_PCI1_LOWER_MEM >> 12) & POTAR_TA_MASK;
194 ios->pobar0 = (MPC83xx_PCI1_LOWER_MEM >> 12) & POBAR_BA_MASK;
195 ios->pocmr0 = POCMR_EN |
196 (((0xffffffff - (MPC83xx_PCI1_UPPER_MEM -
197 MPC83xx_PCI1_LOWER_MEM)) >> 12) & POCMR_CM_MASK);
198
199 /* mapped to PCI1 IO space */
200 ios->potar1 = (MPC83xx_PCI1_LOWER_IO >> 12) & POTAR_TA_MASK;
201 ios->pobar1 = (MPC83xx_PCI1_IO_BASE >> 12) & POBAR_BA_MASK;
202 ios->pocmr1 = POCMR_EN | POCMR_IO |
203 (((0xffffffff - (MPC83xx_PCI1_UPPER_IO -
204 MPC83xx_PCI1_LOWER_IO)) >> 12) & POCMR_CM_MASK);
205
206 /*
207 * Configure PCI Inbound Translation Windows
208 */
209 pci_ctrl->pitar1 = 0x0;
210 pci_ctrl->pibar1 = 0x0;
211 pci_ctrl->piebar1 = 0x0;
212 pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP | PIWAR_IWS_2G;
213
214 /*
215 * Release PCI RST signal
216 */
217 pci_ctrl->gcr = 0;
218 udelay(2000);
219 pci_ctrl->gcr = 1;
220 udelay(2000);
221
222 reg16 = 0xff;
223 early_read_config_word(hose, hose->first_busno, 0, PCI_COMMAND, &reg16);
224 reg16 |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
225 early_write_config_word(hose, hose->first_busno, 0, PCI_COMMAND, reg16);
226
227 /*
228 * Clear non-reserved bits in status register.
229 */
230 early_write_config_word(hose, hose->first_busno, 0, PCI_STATUS, 0xffff);
231 early_write_config_byte(hose, hose->first_busno, 0, PCI_LATENCY_TIMER, 0x80);
232
233 iounmap(pci_ctrl);
234 iounmap(ios);
235}
236
237void __init
238mpc83xx_setup_pci2(struct pci_controller *hose)
239{
240 u16 reg16;
241 volatile immr_pcictrl_t * pci_ctrl;
242 volatile immr_ios_t * ios;
243 bd_t *binfo = (bd_t *) __res;
244
245 pci_ctrl = ioremap(binfo->bi_immr_base + 0x8600, sizeof(immr_pcictrl_t));
246 ios = ioremap(binfo->bi_immr_base + 0x8400, sizeof(immr_ios_t));
247
248 /*
249 * Configure PCI Outbound Translation Windows
250 */
251 ios->potar3 = (MPC83xx_PCI2_LOWER_MEM >> 12) & POTAR_TA_MASK;
252 ios->pobar3 = (MPC83xx_PCI2_LOWER_MEM >> 12) & POBAR_BA_MASK;
253 ios->pocmr3 = POCMR_EN | POCMR_DST |
254 (((0xffffffff - (MPC83xx_PCI2_UPPER_MEM -
255 MPC83xx_PCI2_LOWER_MEM)) >> 12) & POCMR_CM_MASK);
256
257 /* mapped to PCI2 IO space */
258 ios->potar4 = (MPC83xx_PCI2_LOWER_IO >> 12) & POTAR_TA_MASK;
259 ios->pobar4 = (MPC83xx_PCI2_IO_BASE >> 12) & POBAR_BA_MASK;
260 ios->pocmr4 = POCMR_EN | POCMR_DST | POCMR_IO |
261 (((0xffffffff - (MPC83xx_PCI2_UPPER_IO -
262 MPC83xx_PCI2_LOWER_IO)) >> 12) & POCMR_CM_MASK);
263
264 /*
265 * Configure PCI Inbound Translation Windows
266 */
267 pci_ctrl->pitar1 = 0x0;
268 pci_ctrl->pibar1 = 0x0;
269 pci_ctrl->piebar1 = 0x0;
270 pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP | PIWAR_IWS_2G;
271
272 /*
273 * Release PCI RST signal
274 */
275 pci_ctrl->gcr = 0;
276 udelay(2000);
277 pci_ctrl->gcr = 1;
278 udelay(2000);
279
280 reg16 = 0xff;
281 early_read_config_word(hose, hose->first_busno, 0, PCI_COMMAND, &reg16);
282 reg16 |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
283 early_write_config_word(hose, hose->first_busno, 0, PCI_COMMAND, reg16);
284
285 /*
286 * Clear non-reserved bits in status register.
287 */
288 early_write_config_word(hose, hose->first_busno, 0, PCI_STATUS, 0xffff);
289 early_write_config_byte(hose, hose->first_busno, 0, PCI_LATENCY_TIMER, 0x80);
290
291 iounmap(pci_ctrl);
292 iounmap(ios);
293}
294
295/*
296 * PCI buses can be enabled only if SYS board combinates with PIB
297 * (Platform IO Board) board which provide 3 PCI slots. There is 2 PCI buses
298 * and 3 PCI slots, so people must configure the routes between them before
299 * enable PCI bus. This routes are under the control of PCA9555PW device which
300 * can be accessed via I2C bus 2 and are configured by firmware. Refer to
301 * Freescale to get more information about firmware configuration.
302 */
303
304extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
305extern int mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel,
306 unsigned char pin);
307void __init
308mpc83xx_setup_hose(void)
309{
310 u32 val32;
311 volatile immr_clk_t * clk;
312 struct pci_controller * hose1;
313#ifdef CONFIG_MPC83xx_PCI2
314 struct pci_controller * hose2;
315#endif
316 bd_t * binfo = (bd_t *)__res;
317
318 clk = ioremap(binfo->bi_immr_base + 0xA00,
319 sizeof(immr_clk_t));
320
321 /*
322 * Configure PCI controller and PCI_CLK_OUTPUT both in 66M mode
323 */
324 val32 = clk->occr;
325 udelay(2000);
326 clk->occr = 0xff000000;
327 udelay(2000);
328
329 iounmap(clk);
330
331 hose1 = pcibios_alloc_controller();
332 if(!hose1)
333 return;
334
335 ppc_md.pci_swizzle = common_swizzle;
336 ppc_md.pci_map_irq = mpc83xx_map_irq;
337
338 hose1->bus_offset = 0;
339 hose1->first_busno = 0;
340 hose1->last_busno = 0xff;
341
342 setup_indirect_pci(hose1, binfo->bi_immr_base + PCI1_CFG_ADDR_OFFSET,
343 binfo->bi_immr_base + PCI1_CFG_DATA_OFFSET);
344 hose1->set_cfg_type = 1;
345
346 mpc83xx_setup_pci1(hose1);
347
348 hose1->pci_mem_offset = MPC83xx_PCI1_MEM_OFFSET;
349 hose1->mem_space.start = MPC83xx_PCI1_LOWER_MEM;
350 hose1->mem_space.end = MPC83xx_PCI1_UPPER_MEM;
351
352 hose1->io_base_phys = MPC83xx_PCI1_IO_BASE;
353 hose1->io_space.start = MPC83xx_PCI1_LOWER_IO;
354 hose1->io_space.end = MPC83xx_PCI1_UPPER_IO;
355#ifdef CONFIG_MPC83xx_PCI2
356 isa_io_base = (unsigned long)ioremap(MPC83xx_PCI1_IO_BASE,
357 MPC83xx_PCI1_IO_SIZE + MPC83xx_PCI2_IO_SIZE);
358#else
359 isa_io_base = (unsigned long)ioremap(MPC83xx_PCI1_IO_BASE,
360 MPC83xx_PCI1_IO_SIZE);
361#endif /* CONFIG_MPC83xx_PCI2 */
362 hose1->io_base_virt = (void *)isa_io_base;
363 /* setup resources */
364 pci_init_resource(&hose1->io_resource,
365 MPC83xx_PCI1_LOWER_IO,
366 MPC83xx_PCI1_UPPER_IO,
367 IORESOURCE_IO, "PCI host bridge 1");
368 pci_init_resource(&hose1->mem_resources[0],
369 MPC83xx_PCI1_LOWER_MEM,
370 MPC83xx_PCI1_UPPER_MEM,
371 IORESOURCE_MEM, "PCI host bridge 1");
372
373 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
374 hose1->last_busno = pciauto_bus_scan(hose1, hose1->first_busno);
375
376#ifdef CONFIG_MPC83xx_PCI2
377 hose2 = pcibios_alloc_controller();
378 if(!hose2)
379 return;
380
381 hose2->bus_offset = hose1->last_busno + 1;
382 hose2->first_busno = hose1->last_busno + 1;
383 hose2->last_busno = 0xff;
384 setup_indirect_pci(hose2, binfo->bi_immr_base + PCI2_CFG_ADDR_OFFSET,
385 binfo->bi_immr_base + PCI2_CFG_DATA_OFFSET);
386 hose2->set_cfg_type = 1;
387
388 mpc83xx_setup_pci2(hose2);
389
390 hose2->pci_mem_offset = MPC83xx_PCI2_MEM_OFFSET;
391 hose2->mem_space.start = MPC83xx_PCI2_LOWER_MEM;
392 hose2->mem_space.end = MPC83xx_PCI2_UPPER_MEM;
393
394 hose2->io_base_phys = MPC83xx_PCI2_IO_BASE;
395 hose2->io_space.start = MPC83xx_PCI2_LOWER_IO;
396 hose2->io_space.end = MPC83xx_PCI2_UPPER_IO;
397 hose2->io_base_virt = (void *)(isa_io_base + MPC83xx_PCI1_IO_SIZE);
398 /* setup resources */
399 pci_init_resource(&hose2->io_resource,
400 MPC83xx_PCI2_LOWER_IO,
401 MPC83xx_PCI2_UPPER_IO,
402 IORESOURCE_IO, "PCI host bridge 2");
403 pci_init_resource(&hose2->mem_resources[0],
404 MPC83xx_PCI2_LOWER_MEM,
405 MPC83xx_PCI2_UPPER_MEM,
406 IORESOURCE_MEM, "PCI host bridge 2");
407
408 hose2->last_busno = pciauto_bus_scan(hose2, hose2->first_busno);
409#endif /* CONFIG_MPC83xx_PCI2 */
410}
411#endif /*CONFIG_PCI*/
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h
deleted file mode 100644
index b918a2d245ea..000000000000
--- a/arch/ppc/syslib/ppc83xx_setup.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/*
2 * MPC83XX common board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2005 Freescale Semiconductor Inc.
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 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * 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 * 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H
24#define __PPC_SYSLIB_PPC83XX_SETUP_H
25
26#include <linux/init.h>
27
28extern unsigned long mpc83xx_find_end_of_memory(void) __init;
29extern long mpc83xx_time_init(void) __init;
30extern void mpc83xx_calibrate_decr(void) __init;
31extern void mpc83xx_early_serial_map(void) __init;
32extern void mpc83xx_restart(char *cmd);
33extern void mpc83xx_power_off(void);
34extern void mpc83xx_halt(void);
35extern void mpc83xx_setup_hose(void) __init;
36
37/* PCI config */
38#define PCI1_CFG_ADDR_OFFSET (0x8300)
39#define PCI1_CFG_DATA_OFFSET (0x8304)
40
41#define PCI2_CFG_ADDR_OFFSET (0x8380)
42#define PCI2_CFG_DATA_OFFSET (0x8384)
43
44/* Serial Config */
45#ifdef CONFIG_SERIAL_MANY_PORTS
46#define RS_TABLE_SIZE 64
47#else
48#define RS_TABLE_SIZE 2
49#endif
50
51#ifndef BASE_BAUD
52#define BASE_BAUD 115200
53#endif
54
55#endif /* __PPC_SYSLIB_PPC83XX_SETUP_H */
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c
deleted file mode 100644
index e5ac699e7316..000000000000
--- a/arch/ppc/syslib/ppc85xx_common.c
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * MPC85xx support routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/types.h>
15#include <linux/module.h>
16#include <linux/init.h>
17
18#include <asm/mpc85xx.h>
19#include <asm/mmu.h>
20
21/* ************************************************************************ */
22/* Return the value of CCSRBAR for the current board */
23
24phys_addr_t
25get_ccsrbar(void)
26{
27 return BOARD_CCSRBAR;
28}
29
30EXPORT_SYMBOL(get_ccsrbar);
31
32/* For now this is a pass through */
33phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size)
34{
35 return addr;
36};
37EXPORT_SYMBOL(fixup_bigphys_addr);
38
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h
deleted file mode 100644
index 4fc405425113..000000000000
--- a/arch/ppc/syslib/ppc85xx_common.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * MPC85xx support routines
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#ifndef __PPC_SYSLIB_PPC85XX_COMMON_H
15#define __PPC_SYSLIB_PPC85XX_COMMON_H
16
17#include <linux/init.h>
18
19/* Provide access to ccsrbar for any modules, etc */
20phys_addr_t get_ccsrbar(void);
21
22#endif /* __PPC_SYSLIB_PPC85XX_COMMON_H */
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c
deleted file mode 100644
index 2475ec6600fe..000000000000
--- a/arch/ppc/syslib/ppc85xx_setup.c
+++ /dev/null
@@ -1,367 +0,0 @@
1/*
2 * MPC85XX common board code
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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#include <linux/types.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/pci.h>
18#include <linux/serial.h>
19#include <linux/tty.h> /* for linux/serial_core.h */
20#include <linux/serial_core.h>
21#include <linux/serial_8250.h>
22
23#include <asm/time.h>
24#include <asm/mpc85xx.h>
25#include <asm/immap_85xx.h>
26#include <asm/mmu.h>
27#include <asm/ppc_sys.h>
28#include <asm/kgdb.h>
29#include <asm/machdep.h>
30
31#include <syslib/ppc85xx_setup.h>
32
33extern void abort(void);
34
35/* Return the amount of memory */
36unsigned long __init
37mpc85xx_find_end_of_memory(void)
38{
39 bd_t *binfo;
40
41 binfo = (bd_t *) __res;
42
43 return binfo->bi_memsize;
44}
45
46/* The decrementer counts at the system (internal) clock freq divided by 8 */
47void __init
48mpc85xx_calibrate_decr(void)
49{
50 bd_t *binfo = (bd_t *) __res;
51 unsigned int freq, divisor;
52
53 /* get the core frequency */
54 freq = binfo->bi_busfreq;
55
56 /* The timebase is updated every 8 bus clocks, HID0[SEL_TBCLK] = 0 */
57 divisor = 8;
58 tb_ticks_per_jiffy = freq / divisor / HZ;
59 tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000);
60
61 /* Set the time base to zero */
62 mtspr(SPRN_TBWL, 0);
63 mtspr(SPRN_TBWU, 0);
64
65 /* Clear any pending timer interrupts */
66 mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS);
67
68 /* Enable decrementer interrupt */
69 mtspr(SPRN_TCR, TCR_DIE);
70}
71
72#ifdef CONFIG_SERIAL_8250
73void __init
74mpc85xx_early_serial_map(void)
75{
76#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
77 struct uart_port serial_req;
78#endif
79 struct plat_serial8250_port *pdata;
80 bd_t *binfo = (bd_t *) __res;
81 pdata = (struct plat_serial8250_port *) ppc_sys_get_pdata(MPC85xx_DUART);
82
83 /* Setup serial port access */
84 pdata[0].uartclk = binfo->bi_busfreq;
85 pdata[0].mapbase += binfo->bi_immr_base;
86 pdata[0].membase = ioremap(pdata[0].mapbase, MPC85xx_UART0_SIZE);
87
88#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
89 memset(&serial_req, 0, sizeof (serial_req));
90 serial_req.iotype = UPIO_MEM;
91 serial_req.mapbase = pdata[0].mapbase;
92 serial_req.membase = pdata[0].membase;
93 serial_req.regshift = 0;
94
95 gen550_init(0, &serial_req);
96#endif
97
98 pdata[1].uartclk = binfo->bi_busfreq;
99 pdata[1].mapbase += binfo->bi_immr_base;
100 pdata[1].membase = ioremap(pdata[1].mapbase, MPC85xx_UART0_SIZE);
101
102#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)
103 /* Assume gen550_init() doesn't modify serial_req */
104 serial_req.mapbase = pdata[1].mapbase;
105 serial_req.membase = pdata[1].membase;
106
107 gen550_init(1, &serial_req);
108#endif
109}
110#endif
111
112void
113mpc85xx_restart(char *cmd)
114{
115 local_irq_disable();
116 abort();
117}
118
119void
120mpc85xx_power_off(void)
121{
122 local_irq_disable();
123 for(;;);
124}
125
126void
127mpc85xx_halt(void)
128{
129 local_irq_disable();
130 for(;;);
131}
132
133#ifdef CONFIG_PCI
134
135#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
136extern void mpc85xx_cds_enable_via(struct pci_controller *hose);
137extern void mpc85xx_cds_fixup_via(struct pci_controller *hose);
138#endif
139
140static void __init
141mpc85xx_setup_pci1(struct pci_controller *hose)
142{
143 volatile struct ccsr_pci *pci;
144 volatile struct ccsr_guts *guts;
145 unsigned short temps;
146 bd_t *binfo = (bd_t *) __res;
147
148 pci = ioremap(binfo->bi_immr_base + MPC85xx_PCI1_OFFSET,
149 MPC85xx_PCI1_SIZE);
150
151 guts = ioremap(binfo->bi_immr_base + MPC85xx_GUTS_OFFSET,
152 MPC85xx_GUTS_SIZE);
153
154 early_read_config_word(hose, 0, 0, PCI_COMMAND, &temps);
155 temps |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
156 early_write_config_word(hose, 0, 0, PCI_COMMAND, temps);
157
158#define PORDEVSR_PCI (0x00800000) /* PCI Mode */
159 if (guts->pordevsr & PORDEVSR_PCI) {
160 early_write_config_byte(hose, 0, 0, PCI_LATENCY_TIMER, 0x80);
161 } else {
162 /* PCI-X init */
163 temps = PCI_X_CMD_MAX_SPLIT | PCI_X_CMD_MAX_READ
164 | PCI_X_CMD_ERO | PCI_X_CMD_DPERR_E;
165 early_write_config_word(hose, 0, 0, PCIX_COMMAND, temps);
166 }
167
168 /* Disable all windows (except powar0 since its ignored) */
169 pci->powar1 = 0;
170 pci->powar2 = 0;
171 pci->powar3 = 0;
172 pci->powar4 = 0;
173 pci->piwar1 = 0;
174 pci->piwar2 = 0;
175 pci->piwar3 = 0;
176
177 /* Setup Phys:PCI 1:1 outbound mem window @ MPC85XX_PCI1_LOWER_MEM */
178 pci->potar1 = (MPC85XX_PCI1_LOWER_MEM >> 12) & 0x000fffff;
179 pci->potear1 = 0x00000000;
180 pci->powbar1 = (MPC85XX_PCI1_LOWER_MEM >> 12) & 0x000fffff;
181 /* Enable, Mem R/W */
182 pci->powar1 = 0x80044000 |
183 (__ilog2(MPC85XX_PCI1_UPPER_MEM - MPC85XX_PCI1_LOWER_MEM + 1) - 1);
184
185 /* Setup outbound IO windows @ MPC85XX_PCI1_IO_BASE */
186 pci->potar2 = (MPC85XX_PCI1_LOWER_IO >> 12) & 0x000fffff;
187 pci->potear2 = 0x00000000;
188 pci->powbar2 = (MPC85XX_PCI1_IO_BASE >> 12) & 0x000fffff;
189 /* Enable, IO R/W */
190 pci->powar2 = 0x80088000 | (__ilog2(MPC85XX_PCI1_IO_SIZE) - 1);
191
192 /* Setup 2G inbound Memory Window @ 0 */
193 pci->pitar1 = 0x00000000;
194 pci->piwbar1 = 0x00000000;
195 pci->piwar1 = 0xa0f5501e; /* Enable, Prefetch, Local
196 Mem, Snoop R/W, 2G */
197}
198
199
200extern int mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin);
201extern int mpc85xx_exclude_device(u_char bus, u_char devfn);
202
203#ifdef CONFIG_85xx_PCI2
204static void __init
205mpc85xx_setup_pci2(struct pci_controller *hose)
206{
207 volatile struct ccsr_pci *pci;
208 unsigned short temps;
209 bd_t *binfo = (bd_t *) __res;
210
211 pci = ioremap(binfo->bi_immr_base + MPC85xx_PCI2_OFFSET,
212 MPC85xx_PCI2_SIZE);
213
214 early_read_config_word(hose, hose->bus_offset, 0, PCI_COMMAND, &temps);
215 temps |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
216 early_write_config_word(hose, hose->bus_offset, 0, PCI_COMMAND, temps);
217 early_write_config_byte(hose, hose->bus_offset, 0, PCI_LATENCY_TIMER, 0x80);
218
219 /* Disable all windows (except powar0 since its ignored) */
220 pci->powar1 = 0;
221 pci->powar2 = 0;
222 pci->powar3 = 0;
223 pci->powar4 = 0;
224 pci->piwar1 = 0;
225 pci->piwar2 = 0;
226 pci->piwar3 = 0;
227
228 /* Setup Phys:PCI 1:1 outbound mem window @ MPC85XX_PCI2_LOWER_MEM */
229 pci->potar1 = (MPC85XX_PCI2_LOWER_MEM >> 12) & 0x000fffff;
230 pci->potear1 = 0x00000000;
231 pci->powbar1 = (MPC85XX_PCI2_LOWER_MEM >> 12) & 0x000fffff;
232 /* Enable, Mem R/W */
233 pci->powar1 = 0x80044000 |
234 (__ilog2(MPC85XX_PCI2_UPPER_MEM - MPC85XX_PCI2_LOWER_MEM + 1) - 1);
235
236 /* Setup outbound IO windows @ MPC85XX_PCI2_IO_BASE */
237 pci->potar2 = (MPC85XX_PCI2_LOWER_IO >> 12) & 0x000fffff;
238 pci->potear2 = 0x00000000;
239 pci->powbar2 = (MPC85XX_PCI2_IO_BASE >> 12) & 0x000fffff;
240 /* Enable, IO R/W */
241 pci->powar2 = 0x80088000 | (__ilog2(MPC85XX_PCI2_IO_SIZE) - 1);
242
243 /* Setup 2G inbound Memory Window @ 0 */
244 pci->pitar1 = 0x00000000;
245 pci->piwbar1 = 0x00000000;
246 pci->piwar1 = 0xa0f5501e; /* Enable, Prefetch, Local
247 Mem, Snoop R/W, 2G */
248}
249#endif /* CONFIG_85xx_PCI2 */
250
251int mpc85xx_pci1_last_busno = 0;
252
253void __init
254mpc85xx_setup_hose(void)
255{
256 struct pci_controller *hose_a;
257#ifdef CONFIG_85xx_PCI2
258 struct pci_controller *hose_b;
259#endif
260 bd_t *binfo = (bd_t *) __res;
261
262 hose_a = pcibios_alloc_controller();
263
264 if (!hose_a)
265 return;
266
267 ppc_md.pci_swizzle = common_swizzle;
268 ppc_md.pci_map_irq = mpc85xx_map_irq;
269
270 hose_a->first_busno = 0;
271 hose_a->bus_offset = 0;
272 hose_a->last_busno = 0xff;
273
274 setup_indirect_pci(hose_a, binfo->bi_immr_base + PCI1_CFG_ADDR_OFFSET,
275 binfo->bi_immr_base + PCI1_CFG_DATA_OFFSET);
276 hose_a->set_cfg_type = 1;
277
278 mpc85xx_setup_pci1(hose_a);
279
280 hose_a->pci_mem_offset = MPC85XX_PCI1_MEM_OFFSET;
281 hose_a->mem_space.start = MPC85XX_PCI1_LOWER_MEM;
282 hose_a->mem_space.end = MPC85XX_PCI1_UPPER_MEM;
283
284 hose_a->io_space.start = MPC85XX_PCI1_LOWER_IO;
285 hose_a->io_space.end = MPC85XX_PCI1_UPPER_IO;
286 hose_a->io_base_phys = MPC85XX_PCI1_IO_BASE;
287#ifdef CONFIG_85xx_PCI2
288 hose_a->io_base_virt = ioremap(MPC85XX_PCI1_IO_BASE,
289 MPC85XX_PCI1_IO_SIZE +
290 MPC85XX_PCI2_IO_SIZE);
291#else
292 hose_a->io_base_virt = ioremap(MPC85XX_PCI1_IO_BASE,
293 MPC85XX_PCI1_IO_SIZE);
294#endif
295 isa_io_base = (unsigned long)hose_a->io_base_virt;
296
297 /* setup resources */
298 pci_init_resource(&hose_a->mem_resources[0],
299 MPC85XX_PCI1_LOWER_MEM,
300 MPC85XX_PCI1_UPPER_MEM,
301 IORESOURCE_MEM, "PCI1 host bridge");
302
303 pci_init_resource(&hose_a->io_resource,
304 MPC85XX_PCI1_LOWER_IO,
305 MPC85XX_PCI1_UPPER_IO,
306 IORESOURCE_IO, "PCI1 host bridge");
307
308 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
309
310#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
311 /* Pre pciauto_bus_scan VIA init */
312 mpc85xx_cds_enable_via(hose_a);
313#endif
314
315 hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno);
316
317#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
318 /* Post pciauto_bus_scan VIA fixup */
319 mpc85xx_cds_fixup_via(hose_a);
320#endif
321
322#ifdef CONFIG_85xx_PCI2
323 hose_b = pcibios_alloc_controller();
324
325 if (!hose_b)
326 return;
327
328 hose_b->bus_offset = hose_a->last_busno + 1;
329 hose_b->first_busno = hose_a->last_busno + 1;
330 hose_b->last_busno = 0xff;
331
332 setup_indirect_pci(hose_b, binfo->bi_immr_base + PCI2_CFG_ADDR_OFFSET,
333 binfo->bi_immr_base + PCI2_CFG_DATA_OFFSET);
334 hose_b->set_cfg_type = 1;
335
336 mpc85xx_setup_pci2(hose_b);
337
338 hose_b->pci_mem_offset = MPC85XX_PCI2_MEM_OFFSET;
339 hose_b->mem_space.start = MPC85XX_PCI2_LOWER_MEM;
340 hose_b->mem_space.end = MPC85XX_PCI2_UPPER_MEM;
341
342 hose_b->io_space.start = MPC85XX_PCI2_LOWER_IO;
343 hose_b->io_space.end = MPC85XX_PCI2_UPPER_IO;
344 hose_b->io_base_phys = MPC85XX_PCI2_IO_BASE;
345 hose_b->io_base_virt = hose_a->io_base_virt + MPC85XX_PCI1_IO_SIZE;
346
347 /* setup resources */
348 pci_init_resource(&hose_b->mem_resources[0],
349 MPC85XX_PCI2_LOWER_MEM,
350 MPC85XX_PCI2_UPPER_MEM,
351 IORESOURCE_MEM, "PCI2 host bridge");
352
353 pci_init_resource(&hose_b->io_resource,
354 MPC85XX_PCI2_LOWER_IO,
355 MPC85XX_PCI2_UPPER_IO,
356 IORESOURCE_IO, "PCI2 host bridge");
357
358 hose_b->last_busno = pciauto_bus_scan(hose_b, hose_b->first_busno);
359
360 /* let board code know what the last bus number was on PCI1 */
361 mpc85xx_pci1_last_busno = hose_a->last_busno;
362#endif
363 return;
364}
365#endif /* CONFIG_PCI */
366
367
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h
deleted file mode 100644
index 6ff79995210b..000000000000
--- a/arch/ppc/syslib/ppc85xx_setup.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * MPC85XX common board definitions
3 *
4 * Maintainer: Kumar Gala <galak@kernel.crashing.org>
5 *
6 * Copyright 2004 Freescale Semiconductor Inc.
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 __PPC_SYSLIB_PPC85XX_SETUP_H
16#define __PPC_SYSLIB_PPC85XX_SETUP_H
17
18#include <linux/init.h>
19#include <asm/ppcboot.h>
20
21extern unsigned long mpc85xx_find_end_of_memory(void) __init;
22extern void mpc85xx_calibrate_decr(void) __init;
23extern void mpc85xx_early_serial_map(void) __init;
24extern void mpc85xx_restart(char *cmd);
25extern void mpc85xx_power_off(void);
26extern void mpc85xx_halt(void);
27extern void mpc85xx_setup_hose(void) __init;
28
29/* PCI config */
30#define PCI1_CFG_ADDR_OFFSET (0x8000)
31#define PCI1_CFG_DATA_OFFSET (0x8004)
32
33#define PCI2_CFG_ADDR_OFFSET (0x9000)
34#define PCI2_CFG_DATA_OFFSET (0x9004)
35
36/* Additional register for PCI-X configuration */
37#define PCIX_NEXT_CAP 0x60
38#define PCIX_CAP_ID 0x61
39#define PCIX_COMMAND 0x62
40#define PCIX_STATUS 0x64
41
42/* Serial Config */
43#ifdef CONFIG_SERIAL_MANY_PORTS
44#define RS_TABLE_SIZE 64
45#else
46#define RS_TABLE_SIZE 2
47#endif
48
49#ifndef BASE_BAUD
50#define BASE_BAUD 115200
51#endif
52
53/* Offset of CPM register space */
54#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
55
56#endif /* __PPC_SYSLIB_PPC85XX_SETUP_H */
diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c
index e8619c750732..bce9a75c80e3 100644
--- a/arch/ppc/syslib/ppc8xx_pic.c
+++ b/arch/ppc/syslib/ppc8xx_pic.c
@@ -16,7 +16,7 @@ extern int cpm_get_irq(void);
16 * the only interrupt controller. Some boards, like the MBX and 16 * the only interrupt controller. Some boards, like the MBX and
17 * Sandpoint have the 8259 as a secondary controller. Depending 17 * Sandpoint have the 8259 as a secondary controller. Depending
18 * upon the processor type, the internal controller can have as 18 * upon the processor type, the internal controller can have as
19 * few as 16 interrups or as many as 64. We could use the 19 * few as 16 interrupts or as many as 64. We could use the
20 * "clear_bit()" and "set_bit()" functions like other platforms, 20 * "clear_bit()" and "set_bit()" functions like other platforms,
21 * but they are overkill for us. 21 * but they are overkill for us.
22 */ 22 */
diff --git a/arch/ppc/syslib/ppc8xx_pic.h b/arch/ppc/syslib/ppc8xx_pic.h
index d7d9f651a91b..53bcd97ef7f5 100644
--- a/arch/ppc/syslib/ppc8xx_pic.h
+++ b/arch/ppc/syslib/ppc8xx_pic.h
@@ -6,7 +6,6 @@
6 6
7extern struct hw_interrupt_type ppc8xx_pic; 7extern struct hw_interrupt_type ppc8xx_pic;
8 8
9void m8xx_pic_init(void);
10void m8xx_do_IRQ(struct pt_regs *regs, 9void m8xx_do_IRQ(struct pt_regs *regs,
11 int cpu); 10 int cpu);
12int m8xx_get_irq(struct pt_regs *regs); 11int m8xx_get_irq(struct pt_regs *regs);
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c
index 2d48018b71d9..837183c24dfc 100644
--- a/arch/ppc/syslib/ppc_sys.c
+++ b/arch/ppc/syslib/ppc_sys.c
@@ -185,7 +185,7 @@ void platform_notify_map(const struct platform_notify_dev_map *map,
185 */ 185 */
186 186
187/* 187/*
188 Here we'll replace .name pointers with fixed-lenght strings 188 Here we'll replace .name pointers with fixed-length strings
189 Hereby, this should be called *before* any func stuff triggeded. 189 Hereby, this should be called *before* any func stuff triggeded.
190 */ 190 */
191void ppc_sys_device_initfunc(void) 191void ppc_sys_device_initfunc(void)
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index 8f0b953179fa..9056fe58aaa1 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -10,7 +10,6 @@
10#include <linux/sysrq.h> 10#include <linux/sysrq.h>
11#include <linux/bitops.h> 11#include <linux/bitops.h>
12#include <asm/xmon.h> 12#include <asm/xmon.h>
13#include <asm/machdep.h>
14#include <asm/errno.h> 13#include <asm/errno.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16#include <asm/delay.h> 15#include <asm/delay.h>
diff --git a/arch/ppc/xmon/start_8xx.c b/arch/ppc/xmon/start_8xx.c
index a48bd594cf61..30974068c223 100644
--- a/arch/ppc/xmon/start_8xx.c
+++ b/arch/ppc/xmon/start_8xx.c
@@ -14,7 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <asm/8xx_immap.h> 15#include <asm/8xx_immap.h>
16#include <asm/mpc8xx.h> 16#include <asm/mpc8xx.h>
17#include <asm/commproc.h> 17#include <asm/cpm1.h>
18 18
19extern void xmon_printf(const char *fmt, ...); 19extern void xmon_printf(const char *fmt, ...);
20extern int xmon_8xx_write(char *str, int nb); 20extern int xmon_8xx_write(char *str, int nb);