aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-25 07:08:16 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-25 07:08:16 -0400
commit10a010f6953b5a14ba2f0be40a4fce1bea220875 (patch)
tree19aadf718c796bc7fae0a1a1c970d84d67c541d4 /arch
parent510b37258dfd61693ca6c039865c78bd996e3718 (diff)
parentfb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 (diff)
Merge branch 'linus' into x86/x2apic
Conflicts: drivers/pci/dmar.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig10
-rw-r--r--arch/alpha/Kconfig5
-rw-r--r--arch/alpha/mm/numa.c10
-rw-r--r--arch/arm/Kconfig14
-rw-r--r--arch/arm/common/dmabounce.c22
-rw-r--r--arch/arm/common/locomo.c2
-rw-r--r--arch/arm/common/sa1111.c12
-rw-r--r--arch/arm/common/scoop.c2
-rw-r--r--arch/arm/configs/ezx_defconfig1614
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--arch/arm/kernel/ecard.c5
-rw-r--r--arch/arm/kernel/kgdb.c201
-rw-r--r--arch/arm/kernel/module.c1
-rw-r--r--arch/arm/kernel/process.c2
-rw-r--r--arch/arm/kernel/setup.c2
-rw-r--r--arch/arm/kernel/time.c4
-rw-r--r--arch/arm/kernel/traps.c5
-rw-r--r--arch/arm/mach-integrator/impd1.c7
-rw-r--r--arch/arm/mach-integrator/lm.c6
-rw-r--r--arch/arm/mach-iop32x/n2100.c52
-rw-r--r--arch/arm/mach-ns9xxx/clock.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig219
-rw-r--r--arch/arm/mach-pxa/Makefile15
-rw-r--r--arch/arm/mach-pxa/clock.c30
-rw-r--r--arch/arm/mach-pxa/clock.h33
-rw-r--r--arch/arm/mach-pxa/cm-x270-pci.c27
-rw-r--r--arch/arm/mach-pxa/cm-x270-pci.h14
-rw-r--r--arch/arm/mach-pxa/cm-x270.c403
-rw-r--r--arch/arm/mach-pxa/corgi.c1
-rw-r--r--arch/arm/mach-pxa/devices.c61
-rw-r--r--arch/arm/mach-pxa/devices.h2
-rw-r--r--arch/arm/mach-pxa/e400_lcd.c56
-rw-r--r--arch/arm/mach-pxa/e740_lcd.c123
-rw-r--r--arch/arm/mach-pxa/e750_lcd.c109
-rw-r--r--arch/arm/mach-pxa/e800_lcd.c159
-rw-r--r--arch/arm/mach-pxa/em-x270.c371
-rw-r--r--arch/arm/mach-pxa/eseries.c15
-rw-r--r--arch/arm/mach-pxa/eseries_udc.c57
-rw-r--r--arch/arm/mach-pxa/ezx.c220
-rw-r--r--arch/arm/mach-pxa/littleton.c70
-rw-r--r--arch/arm/mach-pxa/lubbock.c19
-rw-r--r--arch/arm/mach-pxa/magician.c49
-rw-r--r--arch/arm/mach-pxa/mainstone.c18
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c71
-rw-r--r--arch/arm/mach-pxa/palmtx.c416
-rw-r--r--arch/arm/mach-pxa/pcm027.c31
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c74
-rw-r--r--arch/arm/mach-pxa/poodle.c1
-rw-r--r--arch/arm/mach-pxa/pxa25x.c59
-rw-r--r--arch/arm/mach-pxa/pxa300.c19
-rw-r--r--arch/arm/mach-pxa/pxa320.c21
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c25
-rw-r--r--arch/arm/mach-pxa/pxa930.c190
-rw-r--r--arch/arm/mach-pxa/reset.c96
-rw-r--r--arch/arm/mach-pxa/saar.c84
-rw-r--r--arch/arm/mach-pxa/spitz.c10
-rw-r--r--arch/arm/mach-pxa/ssp.c13
-rw-r--r--arch/arm/mach-pxa/tavorevb.c84
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c150
-rw-r--r--arch/arm/mach-pxa/tosa.c382
-rw-r--r--arch/arm/mach-pxa/trizeps4.c1
-rw-r--r--arch/arm/mach-pxa/zylonite.c103
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa300.c46
-rw-r--r--arch/arm/mach-pxa/zylonite_pxa320.c6
-rw-r--r--arch/arm/mach-sa1100/clock.c2
-rw-r--r--arch/arm/mm/Makefile2
-rw-r--r--arch/arm/mm/discontig.c34
-rw-r--r--arch/arm/mm/init.c2
-rw-r--r--arch/arm/plat-omap/fb.c5
-rw-r--r--arch/arm/plat-omap/mailbox.c2
-rw-r--r--arch/arm/tools/mach-types10
-rw-r--r--arch/avr32/Kconfig1
-rw-r--r--arch/avr32/kernel/cpu.c38
-rw-r--r--arch/avr32/kernel/process.c2
-rw-r--r--arch/avr32/kernel/stacktrace.c1
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c27
-rw-r--r--arch/avr32/mm/init.c5
-rw-r--r--arch/avr32/mm/ioremap.c1
-rw-r--r--arch/blackfin/Kconfig4
-rw-r--r--arch/blackfin/kernel/process.c2
-rw-r--r--arch/cris/arch-v10/mm/init.c2
-rw-r--r--arch/cris/arch-v32/mm/init.c2
-rw-r--r--arch/cris/kernel/profile.c17
-rw-r--r--arch/frv/kernel/pm.c1
-rw-r--r--arch/h8300/kernel/setup.c1
-rw-r--r--arch/ia64/ia32/sys_ia32.c2
-rw-r--r--arch/ia64/kernel/err_inject.c22
-rw-r--r--arch/ia64/kernel/sys_ia64.c2
-rw-r--r--arch/ia64/mm/discontig.c30
-rw-r--r--arch/ia64/mm/hugetlbpage.c15
-rw-r--r--arch/m32r/mm/discontig.c10
-rw-r--r--arch/m32r/mm/init.c6
-rw-r--r--arch/m68k/amiga/chipram.c1
-rw-r--r--arch/m68k/mm/init.c4
-rw-r--r--arch/m68k/mm/motorola.c2
-rw-r--r--arch/m68k/mm/sun3mmu.c2
-rw-r--r--arch/m68knommu/Kconfig15
-rw-r--r--arch/m68knommu/Makefile11
-rw-r--r--arch/m68knommu/configs/m5208evb_defconfig610
-rw-r--r--arch/m68knommu/configs/m5249evb_defconfig497
-rw-r--r--arch/m68knommu/configs/m5275evb_defconfig627
-rw-r--r--arch/m68knommu/configs/m5307c3_defconfig580
-rw-r--r--arch/m68knommu/configs/m5407c3_defconfig641
-rw-r--r--arch/m68knommu/kernel/setup.c1
-rw-r--r--arch/m68knommu/kernel/time.c40
-rw-r--r--arch/m68knommu/kernel/traps.c38
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S1
-rw-r--r--arch/m68knommu/platform/coldfire/Makefile2
-rw-r--r--arch/m68knommu/platform/coldfire/dma_timer.c84
-rw-r--r--arch/m68knommu/platform/coldfire/head.S3
-rw-r--r--arch/m68knommu/platform/coldfire/pit.c91
-rw-r--r--arch/mips/au1000/common/power.c1
-rw-r--r--arch/mips/kernel/module.c1
-rw-r--r--arch/mips/kernel/process.c2
-rw-r--r--arch/mips/kernel/rtlx.c4
-rw-r--r--arch/mips/kernel/stacktrace.c1
-rw-r--r--arch/mips/kernel/syscall.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-klnuma.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c4
-rw-r--r--arch/mips/sibyte/common/sb_tbprof.c3
-rw-r--r--arch/mn10300/mm/init.c6
-rw-r--r--arch/parisc/hpux/sys_hpux.c2
-rw-r--r--arch/parisc/mm/init.c5
-rw-r--r--arch/powerpc/Kconfig17
-rw-r--r--arch/powerpc/Kconfig.debug50
-rw-r--r--arch/powerpc/boot/Makefile4
-rw-r--r--arch/powerpc/boot/dts/mpc7448hpc2.dts24
-rw-r--r--arch/powerpc/boot/dts/mpc8313erdb.dts241
-rw-r--r--arch/powerpc/boot/dts/mpc8610_hpcd.dts14
-rw-r--r--arch/powerpc/configs/85xx/mpc8544_ds_defconfig8
-rw-r--r--arch/powerpc/configs/85xx/mpc8572_ds_defconfig8
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig8
-rw-r--r--arch/powerpc/configs/mpc8610_hpcd_defconfig121
-rw-r--r--arch/powerpc/configs/mpc8641_hpcn_defconfig8
-rw-r--r--arch/powerpc/configs/ppc6xx_defconfig3304
-rw-r--r--arch/powerpc/configs/ps3_defconfig196
-rw-r--r--arch/powerpc/kernel/Makefile1
-rw-r--r--arch/powerpc/kernel/cputable.c20
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S187
-rw-r--r--arch/powerpc/kernel/idle.c2
-rw-r--r--arch/powerpc/kernel/iommu.c13
-rw-r--r--arch/powerpc/kernel/kgdb.c410
-rw-r--r--arch/powerpc/kernel/pci-common.c1
-rw-r--r--arch/powerpc/kernel/prom_parse.c44
-rw-r--r--arch/powerpc/kernel/setup_32.c16
-rw-r--r--arch/powerpc/kernel/stacktrace.c2
-rw-r--r--arch/powerpc/kernel/suspend.c1
-rw-r--r--arch/powerpc/kernel/sysfs.c15
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S31
-rw-r--r--arch/powerpc/lib/code-patching.c1
-rw-r--r--arch/powerpc/lib/feature-fixups.c2
-rw-r--r--arch/powerpc/lib/string.S18
-rw-r--r--arch/powerpc/mm/hash_utils_64.c51
-rw-r--r--arch/powerpc/mm/hugetlbpage.c341
-rw-r--r--arch/powerpc/mm/init_64.c8
-rw-r--r--arch/powerpc/mm/numa.c3
-rw-r--r--arch/powerpc/mm/pgtable_32.c22
-rw-r--r--arch/powerpc/mm/pgtable_64.c16
-rw-r--r--arch/powerpc/mm/tlb_64.c2
-rw-r--r--arch/powerpc/platforms/52xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/82xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c4
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/83xx/Makefile2
-rw-r--r--arch/powerpc/platforms/83xx/mpc831x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_itx.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc836x_rdk.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_mds.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc837x_rdb.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc83xx.h5
-rw-r--r--arch/powerpc/platforms/83xx/pci.c91
-rw-r--r--arch/powerpc/platforms/83xx/sbc834x.c1
-rw-r--r--arch/powerpc/platforms/83xx/suspend-asm.S533
-rw-r--r--arch/powerpc/platforms/83xx/suspend.c388
-rw-r--r--arch/powerpc/platforms/83xx/usb.c24
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c2
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c87
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c2
-rw-r--r--arch/powerpc/platforms/Kconfig6
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype5
-rw-r--r--arch/powerpc/platforms/cell/Kconfig25
-rw-r--r--arch/powerpc/platforms/cell/Makefile3
-rw-r--r--arch/powerpc/platforms/cell/cbe_powerbutton.c117
-rw-r--r--arch/powerpc/platforms/cell/cbe_thermal.c45
-rw-r--r--arch/powerpc/platforms/cell/cpufreq_spudemand.c184
-rw-r--r--arch/powerpc/platforms/cell/iommu.c118
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c27
-rw-r--r--arch/powerpc/platforms/cell/pervasive.h9
-rw-r--r--arch/powerpc/platforms/cell/ras.c46
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c3
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c23
-rw-r--r--arch/powerpc/platforms/chrp/pci.c2
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c117
-rw-r--r--arch/powerpc/platforms/iseries/Kconfig1
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c3
-rw-r--r--arch/powerpc/platforms/iseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pasemi/iommu.c3
-rw-r--r--arch/powerpc/platforms/powermac/setup.c6
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig1
-rw-r--r--arch/powerpc/platforms/ps3/device-init.c1
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c21
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig1
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c26
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c14
-rw-r--r--arch/powerpc/sysdev/axonram.c28
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c3
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c61
-rw-r--r--arch/powerpc/sysdev/fsl_pci.h1
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c90
-rw-r--r--arch/powerpc/sysdev/fsl_soc.h1
-rw-r--r--arch/powerpc/sysdev/ipic.c71
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c6
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc.c6
-rw-r--r--arch/powerpc/sysdev/qe_lib/ucc_fast.c16
-rw-r--r--arch/s390/kernel/process.c2
-rw-r--r--arch/s390/kernel/smp.c36
-rw-r--r--arch/s390/kernel/time.c35
-rw-r--r--arch/s390/mm/hugetlbpage.c8
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/boards/renesas/migor/setup.c3
-rw-r--r--arch/sh/drivers/dma/dma-sysfs.c15
-rw-r--r--arch/sh/kernel/process_32.c2
-rw-r--r--arch/sh/kernel/stacktrace.c1
-rw-r--r--arch/sh/kernel/sys_sh32.c2
-rw-r--r--arch/sh/mm/hugetlbpage.c8
-rw-r--r--arch/sh/mm/init.c2
-rw-r--r--arch/sh/mm/numa.c5
-rw-r--r--arch/sparc/Makefile1
-rw-r--r--arch/sparc/kernel/sys_sparc.c2
-rw-r--r--arch/sparc/mm/srmmu.c3
-rw-r--r--arch/sparc/mm/sun4c.c3
-rw-r--r--arch/sparc64/kernel/ebus.c4
-rw-r--r--arch/sparc64/kernel/iommu_common.h2
-rw-r--r--arch/sparc64/kernel/irq.c10
-rw-r--r--arch/sparc64/kernel/ldc.c38
-rw-r--r--arch/sparc64/kernel/of_device.c4
-rw-r--r--arch/sparc64/kernel/pci.c2
-rw-r--r--arch/sparc64/kernel/process.c8
-rw-r--r--arch/sparc64/kernel/sys_sparc.c2
-rw-r--r--arch/sparc64/kernel/sysfs.c16
-rw-r--r--arch/sparc64/kernel/time.c15
-rw-r--r--arch/sparc64/kernel/traps.c3
-rw-r--r--arch/sparc64/kernel/vio.c18
-rw-r--r--arch/sparc64/mm/hugetlbpage.c10
-rw-r--r--arch/sparc64/mm/init.c3
-rw-r--r--arch/um/include/init.h8
-rw-r--r--arch/um/include/irq_kern.h2
-rw-r--r--arch/um/include/irq_user.h2
-rw-r--r--arch/um/include/skas/skas.h1
-rw-r--r--arch/um/include/um_uaccess.h1
-rw-r--r--arch/um/kernel/irq.c35
-rw-r--r--arch/um/kernel/ksyms.c1
-rw-r--r--arch/um/kernel/mem.c33
-rw-r--r--arch/um/kernel/physmem.c2
-rw-r--r--arch/um/kernel/process.c2
-rw-r--r--arch/um/kernel/ptrace.c2
-rw-r--r--arch/um/kernel/time.c8
-rw-r--r--arch/um/kernel/uaccess.c2
-rw-r--r--arch/um/os-Linux/sigio.c2
-rw-r--r--arch/um/os-Linux/signal.c2
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/umid.c2
-rw-r--r--arch/um/sys-i386/bugs.c2
-rw-r--r--arch/um/sys-i386/checksum.S5
-rw-r--r--arch/um/sys-i386/ldt.c4
-rw-r--r--arch/v850/Kconfig353
-rw-r--r--arch/v850/Kconfig.debug10
-rw-r--r--arch/v850/Makefile54
-rw-r--r--arch/v850/README44
-rw-r--r--arch/v850/configs/rte-ma1-cb_defconfig617
-rw-r--r--arch/v850/configs/rte-me2-cb_defconfig462
-rw-r--r--arch/v850/configs/sim_defconfig451
-rw-r--r--arch/v850/kernel/Makefile40
-rw-r--r--arch/v850/kernel/anna-rom.ld16
-rw-r--r--arch/v850/kernel/anna.c202
-rw-r--r--arch/v850/kernel/anna.ld20
-rw-r--r--arch/v850/kernel/as85ep1-rom.ld21
-rw-r--r--arch/v850/kernel/as85ep1.c234
-rw-r--r--arch/v850/kernel/as85ep1.ld49
-rw-r--r--arch/v850/kernel/asm-offsets.c58
-rw-r--r--arch/v850/kernel/bug.c142
-rw-r--r--arch/v850/kernel/entry.S1121
-rw-r--r--arch/v850/kernel/fpga85e2c.c167
-rw-r--r--arch/v850/kernel/fpga85e2c.ld62
-rw-r--r--arch/v850/kernel/gbus_int.c271
-rw-r--r--arch/v850/kernel/head.S128
-rw-r--r--arch/v850/kernel/highres_timer.c132
-rw-r--r--arch/v850/kernel/init_task.c48
-rw-r--r--arch/v850/kernel/intv.S87
-rw-r--r--arch/v850/kernel/irq.c123
-rw-r--r--arch/v850/kernel/ma.c69
-rw-r--r--arch/v850/kernel/mach.c17
-rw-r--r--arch/v850/kernel/mach.h56
-rw-r--r--arch/v850/kernel/me2.c73
-rw-r--r--arch/v850/kernel/memcons.c135
-rw-r--r--arch/v850/kernel/module.c237
-rw-r--r--arch/v850/kernel/process.c217
-rw-r--r--arch/v850/kernel/procfs.c67
-rw-r--r--arch/v850/kernel/ptrace.c235
-rw-r--r--arch/v850/kernel/rte_cb.c193
-rw-r--r--arch/v850/kernel/rte_cb_leds.c137
-rw-r--r--arch/v850/kernel/rte_cb_multi.c121
-rw-r--r--arch/v850/kernel/rte_ma1_cb-rom.ld14
-rw-r--r--arch/v850/kernel/rte_ma1_cb.c107
-rw-r--r--arch/v850/kernel/rte_ma1_cb.ld57
-rw-r--r--arch/v850/kernel/rte_mb_a_pci.c819
-rw-r--r--arch/v850/kernel/rte_me2_cb.c298
-rw-r--r--arch/v850/kernel/rte_me2_cb.ld30
-rw-r--r--arch/v850/kernel/rte_nb85e_cb-multi.ld57
-rw-r--r--arch/v850/kernel/rte_nb85e_cb.c81
-rw-r--r--arch/v850/kernel/rte_nb85e_cb.ld22
-rw-r--r--arch/v850/kernel/setup.c330
-rw-r--r--arch/v850/kernel/signal.c523
-rw-r--r--arch/v850/kernel/sim.c172
-rw-r--r--arch/v850/kernel/sim.ld13
-rw-r--r--arch/v850/kernel/sim85e2.c195
-rw-r--r--arch/v850/kernel/sim85e2.ld36
-rw-r--r--arch/v850/kernel/simcons.c161
-rw-r--r--arch/v850/kernel/syscalls.c196
-rw-r--r--arch/v850/kernel/teg.c62
-rw-r--r--arch/v850/kernel/time.c106
-rw-r--r--arch/v850/kernel/v850_ksyms.c51
-rw-r--r--arch/v850/kernel/v850e2_cache.c127
-rw-r--r--arch/v850/kernel/v850e_cache.c174
-rw-r--r--arch/v850/kernel/v850e_intc.c104
-rw-r--r--arch/v850/kernel/v850e_timer_d.c54
-rw-r--r--arch/v850/kernel/v850e_utils.c62
-rw-r--r--arch/v850/kernel/vmlinux.lds.S306
-rw-r--r--arch/v850/lib/Makefile6
-rw-r--r--arch/v850/lib/ashldi3.c62
-rw-r--r--arch/v850/lib/ashrdi3.c63
-rw-r--r--arch/v850/lib/checksum.c155
-rw-r--r--arch/v850/lib/lshrdi3.c62
-rw-r--r--arch/v850/lib/memcpy.c92
-rw-r--r--arch/v850/lib/memset.c68
-rw-r--r--arch/v850/lib/muldi3.c61
-rw-r--r--arch/v850/lib/negdi2.c25
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/x86/Kconfig.cpu2
-rw-r--r--arch/x86/ia32/ia32entry.S97
-rw-r--r--arch/x86/ia32/sys_ia32.c2
-rw-r--r--arch/x86/kernel/acpi/cstate.c3
-rw-r--r--arch/x86/kernel/acpi/sleep.c4
-rw-r--r--arch/x86/kernel/apm_32.c1
-rw-r--r--arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c16
-rw-r--r--arch/x86/kernel/cpu/cpufreq/p4-clockmod.c6
-rw-r--r--arch/x86/kernel/cpu/cpufreq/powernow-k8.c23
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c157
-rw-r--r--arch/x86/kernel/cpu/cpufreq/speedstep-ich.c7
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c5
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c20
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_amd_64.c4
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c1
-rw-r--r--arch/x86/kernel/cpu/proc.c2
-rw-r--r--arch/x86/kernel/cpuid.c4
-rw-r--r--arch/x86/kernel/entry_32.S55
-rw-r--r--arch/x86/kernel/entry_64.S55
-rw-r--r--arch/x86/kernel/genapic_flat_64.c2
-rw-r--r--arch/x86/kernel/genx2apic_uv_x.c4
-rw-r--r--arch/x86/kernel/hpet.c10
-rw-r--r--arch/x86/kernel/io_apic_64.c12
-rw-r--r--arch/x86/kernel/irqinit_64.c5
-rw-r--r--arch/x86/kernel/ldt.c6
-rw-r--r--arch/x86/kernel/microcode.c23
-rw-r--r--arch/x86/kernel/module_64.c1
-rw-r--r--arch/x86/kernel/msr.c4
-rw-r--r--arch/x86/kernel/paravirt.c2
-rw-r--r--arch/x86/kernel/pci-dma.c6
-rw-r--r--arch/x86/kernel/pci-gart_64.c4
-rw-r--r--arch/x86/kernel/process_32.c2
-rw-r--r--arch/x86/kernel/process_64.c2
-rw-r--r--arch/x86/kernel/reboot.c14
-rw-r--r--arch/x86/kernel/setup.c7
-rw-r--r--arch/x86/kernel/signal_32.c3
-rw-r--r--arch/x86/kernel/signal_64.c56
-rw-r--r--arch/x86/kernel/smpboot.c8
-rw-r--r--arch/x86/kernel/syscall_table_32.S6
-rw-r--r--arch/x86/mach-es7000/es7000plat.c8
-rw-r--r--arch/x86/mm/discontig_32.c3
-rw-r--r--arch/x86/mm/dump_pagetables.c10
-rw-r--r--arch/x86/mm/hugetlbpage.c78
-rw-r--r--arch/x86/mm/ioremap.c8
-rw-r--r--arch/x86/mm/numa_64.c4
-rw-r--r--arch/x86/oprofile/nmi_int.c36
-rw-r--r--arch/x86/pci/i386.c1
-rw-r--r--arch/x86/xen/enlighten.c2
-rw-r--r--arch/x86/xen/mmu.c8
-rw-r--r--arch/x86/xen/smp.c4
-rw-r--r--arch/x86/xen/xen-asm_64.S2
-rw-r--r--arch/xtensa/Kconfig4
-rw-r--r--arch/xtensa/kernel/setup.c1
-rw-r--r--arch/xtensa/kernel/syscall.c2
398 files changed, 16070 insertions, 13270 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index ad89a33d8c6e..6093c0be58b0 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -31,6 +31,9 @@ config KRETPROBES
31 def_bool y 31 def_bool y
32 depends on KPROBES && HAVE_KRETPROBES 32 depends on KPROBES && HAVE_KRETPROBES
33 33
34config HAVE_IOREMAP_PROT
35 def_bool n
36
34config HAVE_KPROBES 37config HAVE_KPROBES
35 def_bool n 38 def_bool n
36 39
@@ -42,3 +45,10 @@ config HAVE_DMA_ATTRS
42 45
43config USE_GENERIC_SMP_HELPERS 46config USE_GENERIC_SMP_HELPERS
44 def_bool n 47 def_bool n
48
49config HAVE_CLK
50 def_bool n
51 help
52 The <linux/clk.h> calls support software clock gating and
53 thus are a key power management tool on many systems.
54
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index dbe8c280fea9..1bec55d63ef6 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -333,11 +333,6 @@ config PCI_SYSCALL
333config IOMMU_HELPER 333config IOMMU_HELPER
334 def_bool PCI 334 def_bool PCI
335 335
336config ALPHA_CORE_AGP
337 bool
338 depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL
339 default y
340
341config ALPHA_NONAME 336config ALPHA_NONAME
342 bool 337 bool
343 depends on ALPHA_BOOK1 || ALPHA_NONAME_CH 338 depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 10ab7833e83c..d8c4ceaf00b9 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -19,7 +19,6 @@
19#include <asm/pgalloc.h> 19#include <asm/pgalloc.h>
20 20
21pg_data_t node_data[MAX_NUMNODES]; 21pg_data_t node_data[MAX_NUMNODES];
22bootmem_data_t node_bdata[MAX_NUMNODES];
23EXPORT_SYMBOL(node_data); 22EXPORT_SYMBOL(node_data);
24 23
25#undef DEBUG_DISCONTIG 24#undef DEBUG_DISCONTIG
@@ -141,7 +140,7 @@ setup_memory_node(int nid, void *kernel_end)
141 printk(" not enough mem to reserve NODE_DATA"); 140 printk(" not enough mem to reserve NODE_DATA");
142 return; 141 return;
143 } 142 }
144 NODE_DATA(nid)->bdata = &node_bdata[nid]; 143 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
145 144
146 printk(" Detected node memory: start %8lu, end %8lu\n", 145 printk(" Detected node memory: start %8lu, end %8lu\n",
147 node_min_pfn, node_max_pfn); 146 node_min_pfn, node_max_pfn);
@@ -304,8 +303,9 @@ void __init paging_init(void)
304 dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; 303 dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
305 304
306 for_each_online_node(nid) { 305 for_each_online_node(nid) {
307 unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT; 306 bootmem_data_t *bdata = &bootmem_node_data[nid];
308 unsigned long end_pfn = node_bdata[nid].node_low_pfn; 307 unsigned long start_pfn = bdata->node_min_pfn;
308 unsigned long end_pfn = bdata->node_low_pfn;
309 309
310 if (dma_local_pfn >= end_pfn - start_pfn) 310 if (dma_local_pfn >= end_pfn - start_pfn)
311 zones_size[ZONE_DMA] = end_pfn - start_pfn; 311 zones_size[ZONE_DMA] = end_pfn - start_pfn;
@@ -313,7 +313,7 @@ void __init paging_init(void)
313 zones_size[ZONE_DMA] = dma_local_pfn; 313 zones_size[ZONE_DMA] = dma_local_pfn;
314 zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn; 314 zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn;
315 } 315 }
316 free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn, NULL); 316 free_area_init_node(nid, zones_size, start_pfn, NULL);
317 } 317 }
318 318
319 /* Initialize the kernel's ZERO_PGE. */ 319 /* Initialize the kernel's ZERO_PGE. */
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c7ad324ddf2c..6fb4f03369f2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -12,6 +12,7 @@ config ARM
12 select RTC_LIB 12 select RTC_LIB
13 select SYS_SUPPORTS_APM_EMULATION 13 select SYS_SUPPORTS_APM_EMULATION
14 select HAVE_OPROFILE 14 select HAVE_OPROFILE
15 select HAVE_ARCH_KGDB
15 select HAVE_KPROBES if (!XIP_KERNEL) 16 select HAVE_KPROBES if (!XIP_KERNEL)
16 select HAVE_KRETPROBES if (HAVE_KPROBES) 17 select HAVE_KRETPROBES if (HAVE_KPROBES)
17 select HAVE_FTRACE if (!XIP_KERNEL) 18 select HAVE_FTRACE if (!XIP_KERNEL)
@@ -197,12 +198,14 @@ choice
197config ARCH_AAEC2000 198config ARCH_AAEC2000
198 bool "Agilent AAEC-2000 based" 199 bool "Agilent AAEC-2000 based"
199 select ARM_AMBA 200 select ARM_AMBA
201 select HAVE_CLK
200 help 202 help
201 This enables support for systems based on the Agilent AAEC-2000 203 This enables support for systems based on the Agilent AAEC-2000
202 204
203config ARCH_INTEGRATOR 205config ARCH_INTEGRATOR
204 bool "ARM Ltd. Integrator family" 206 bool "ARM Ltd. Integrator family"
205 select ARM_AMBA 207 select ARM_AMBA
208 select HAVE_CLK
206 select ICST525 209 select ICST525
207 help 210 help
208 Support for ARM's Integrator platform. 211 Support for ARM's Integrator platform.
@@ -210,6 +213,7 @@ config ARCH_INTEGRATOR
210config ARCH_REALVIEW 213config ARCH_REALVIEW
211 bool "ARM Ltd. RealView family" 214 bool "ARM Ltd. RealView family"
212 select ARM_AMBA 215 select ARM_AMBA
216 select HAVE_CLK
213 select ICST307 217 select ICST307
214 select GENERIC_TIME 218 select GENERIC_TIME
215 select GENERIC_CLOCKEVENTS 219 select GENERIC_CLOCKEVENTS
@@ -220,6 +224,7 @@ config ARCH_VERSATILE
220 bool "ARM Ltd. Versatile family" 224 bool "ARM Ltd. Versatile family"
221 select ARM_AMBA 225 select ARM_AMBA
222 select ARM_VIC 226 select ARM_VIC
227 select HAVE_CLK
223 select ICST307 228 select ICST307
224 select GENERIC_TIME 229 select GENERIC_TIME
225 select GENERIC_CLOCKEVENTS 230 select GENERIC_CLOCKEVENTS
@@ -261,6 +266,8 @@ config ARCH_EP93XX
261 select ARM_AMBA 266 select ARM_AMBA
262 select ARM_VIC 267 select ARM_VIC
263 select GENERIC_GPIO 268 select GENERIC_GPIO
269 select HAVE_CLK
270 select HAVE_CLK
264 select HAVE_GPIO_LIB 271 select HAVE_GPIO_LIB
265 help 272 help
266 This enables support for the Cirrus EP93xx series of CPUs. 273 This enables support for the Cirrus EP93xx series of CPUs.
@@ -380,6 +387,7 @@ config ARCH_NS9XXX
380 select GENERIC_GPIO 387 select GENERIC_GPIO
381 select GENERIC_TIME 388 select GENERIC_TIME
382 select GENERIC_CLOCKEVENTS 389 select GENERIC_CLOCKEVENTS
390 select HAVE_CLK
383 help 391 help
384 Say Y here if you intend to run this kernel on a NetSilicon NS9xxx 392 Say Y here if you intend to run this kernel on a NetSilicon NS9xxx
385 System. 393 System.
@@ -429,6 +437,7 @@ config ARCH_ORION5X
429 437
430config ARCH_PNX4008 438config ARCH_PNX4008
431 bool "Philips Nexperia PNX4008 Mobile" 439 bool "Philips Nexperia PNX4008 Mobile"
440 select HAVE_CLK
432 help 441 help
433 This enables support for Philips PNX4008 mobile platform. 442 This enables support for Philips PNX4008 mobile platform.
434 443
@@ -437,6 +446,7 @@ config ARCH_PXA
437 depends on MMU 446 depends on MMU
438 select ARCH_MTD_XIP 447 select ARCH_MTD_XIP
439 select GENERIC_GPIO 448 select GENERIC_GPIO
449 select HAVE_CLK
440 select HAVE_GPIO_LIB 450 select HAVE_GPIO_LIB
441 select GENERIC_TIME 451 select GENERIC_TIME
442 select GENERIC_CLOCKEVENTS 452 select GENERIC_CLOCKEVENTS
@@ -467,6 +477,7 @@ config ARCH_SA1100
467 select GENERIC_GPIO 477 select GENERIC_GPIO
468 select GENERIC_TIME 478 select GENERIC_TIME
469 select GENERIC_CLOCKEVENTS 479 select GENERIC_CLOCKEVENTS
480 select HAVE_CLK
470 select TICK_ONESHOT 481 select TICK_ONESHOT
471 select HAVE_GPIO_LIB 482 select HAVE_GPIO_LIB
472 help 483 help
@@ -475,6 +486,7 @@ config ARCH_SA1100
475config ARCH_S3C2410 486config ARCH_S3C2410
476 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443" 487 bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
477 select GENERIC_GPIO 488 select GENERIC_GPIO
489 select HAVE_CLK
478 help 490 help
479 Samsung S3C2410X CPU based systems, such as the Simtec Electronics 491 Samsung S3C2410X CPU based systems, such as the Simtec Electronics
480 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or 492 BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -502,12 +514,14 @@ config ARCH_DAVINCI
502 select GENERIC_TIME 514 select GENERIC_TIME
503 select GENERIC_CLOCKEVENTS 515 select GENERIC_CLOCKEVENTS
504 select GENERIC_GPIO 516 select GENERIC_GPIO
517 select HAVE_CLK
505 help 518 help
506 Support for TI's DaVinci platform. 519 Support for TI's DaVinci platform.
507 520
508config ARCH_OMAP 521config ARCH_OMAP
509 bool "TI OMAP" 522 bool "TI OMAP"
510 select GENERIC_GPIO 523 select GENERIC_GPIO
524 select HAVE_CLK
511 select HAVE_GPIO_LIB 525 select HAVE_GPIO_LIB
512 select GENERIC_TIME 526 select GENERIC_TIME
513 select GENERIC_CLOCKEVENTS 527 select GENERIC_CLOCKEVENTS
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 2744673314b4..dd2947342604 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -554,9 +554,8 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
554 554
555 device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); 555 device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC);
556 if (!device_info) { 556 if (!device_info) {
557 printk(KERN_ERR 557 dev_err(dev,
558 "Could not allocated dmabounce_device_info for %s", 558 "Could not allocated dmabounce_device_info\n");
559 dev->bus_id);
560 return -ENOMEM; 559 return -ENOMEM;
561 } 560 }
562 561
@@ -594,8 +593,7 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
594 593
595 dev->archdata.dmabounce = device_info; 594 dev->archdata.dmabounce = device_info;
596 595
597 printk(KERN_INFO "dmabounce: registered device %s on %s bus\n", 596 dev_info(dev, "dmabounce: registered device\n");
598 dev->bus_id, dev->bus->name);
599 597
600 return 0; 598 return 0;
601 599
@@ -614,16 +612,15 @@ dmabounce_unregister_dev(struct device *dev)
614 dev->archdata.dmabounce = NULL; 612 dev->archdata.dmabounce = NULL;
615 613
616 if (!device_info) { 614 if (!device_info) {
617 printk(KERN_WARNING 615 dev_warn(dev,
618 "%s: Never registered with dmabounce but attempting" \ 616 "Never registered with dmabounce but attempting"
619 "to unregister!\n", dev->bus_id); 617 "to unregister!\n");
620 return; 618 return;
621 } 619 }
622 620
623 if (!list_empty(&device_info->safe_buffers)) { 621 if (!list_empty(&device_info->safe_buffers)) {
624 printk(KERN_ERR 622 dev_err(dev,
625 "%s: Removing from dmabounce with pending buffers!\n", 623 "Removing from dmabounce with pending buffers!\n");
626 dev->bus_id);
627 BUG(); 624 BUG();
628 } 625 }
629 626
@@ -639,8 +636,7 @@ dmabounce_unregister_dev(struct device *dev)
639 636
640 kfree(device_info); 637 kfree(device_info);
641 638
642 printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n", 639 dev_info(dev, "dmabounce: device unregistered\n");
643 dev->bus_id, dev->bus->name);
644} 640}
645 641
646 642
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index d973c986f721..c3c3a3339049 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -543,7 +543,6 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
543 goto out; 543 goto out;
544 } 544 }
545 545
546 strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id));
547 /* 546 /*
548 * If the parent device has a DMA mask associated with it, 547 * If the parent device has a DMA mask associated with it,
549 * propagate it down to the children. 548 * propagate it down to the children.
@@ -553,6 +552,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
553 dev->dev.dma_mask = &dev->dma_mask; 552 dev->dev.dma_mask = &dev->dma_mask;
554 } 553 }
555 554
555 dev_set_name(&dev->dev, "%s", info->name);
556 dev->devid = info->devid; 556 dev->devid = info->devid;
557 dev->dev.parent = lchip->dev; 557 dev->dev.parent = lchip->dev;
558 dev->dev.bus = &locomo_bus_type; 558 dev->dev.bus = &locomo_bus_type;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index eb06d0b2cb74..0a8e1ff2af8a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -550,9 +550,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
550 goto out; 550 goto out;
551 } 551 }
552 552
553 snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), 553 dev_set_name(&dev->dev, "%4.4lx", info->offset);
554 "%4.4lx", info->offset);
555
556 dev->devid = info->devid; 554 dev->devid = info->devid;
557 dev->dev.parent = sachip->dev; 555 dev->dev.parent = sachip->dev;
558 dev->dev.bus = &sa1111_bus_type; 556 dev->dev.bus = &sa1111_bus_type;
@@ -560,7 +558,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
560 dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; 558 dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask;
561 dev->res.start = sachip->phys + info->offset; 559 dev->res.start = sachip->phys + info->offset;
562 dev->res.end = dev->res.start + 511; 560 dev->res.end = dev->res.start + 511;
563 dev->res.name = dev->dev.bus_id; 561 dev->res.name = dev_name(&dev->dev);
564 dev->res.flags = IORESOURCE_MEM; 562 dev->res.flags = IORESOURCE_MEM;
565 dev->mapbase = sachip->base + info->offset; 563 dev->mapbase = sachip->base + info->offset;
566 dev->skpcr_mask = info->skpcr_mask; 564 dev->skpcr_mask = info->skpcr_mask;
@@ -570,6 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
570 if (ret) { 568 if (ret) {
571 printk("SA1111: failed to allocate resource for %s\n", 569 printk("SA1111: failed to allocate resource for %s\n",
572 dev->res.name); 570 dev->res.name);
571 dev_set_name(&dev->dev, NULL);
573 kfree(dev); 572 kfree(dev);
574 goto out; 573 goto out;
575 } 574 }
@@ -593,7 +592,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
593 if (dev->dma_mask != 0xffffffffUL) { 592 if (dev->dma_mask != 0xffffffffUL) {
594 ret = dmabounce_register_dev(&dev->dev, 1024, 4096); 593 ret = dmabounce_register_dev(&dev->dev, 1024, 4096);
595 if (ret) { 594 if (ret) {
596 printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); 595 dev_err(&dev->dev, "SA1111: Failed to register"
596 " with dmabounce\n");
597 device_unregister(&dev->dev); 597 device_unregister(&dev->dev);
598 } 598 }
599 } 599 }
@@ -627,7 +627,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
627 if (!sachip) 627 if (!sachip)
628 return -ENOMEM; 628 return -ENOMEM;
629 629
630 sachip->clk = clk_get(me, "GPIO27_CLK"); 630 sachip->clk = clk_get(me, "SA1111_CLK");
631 if (!sachip->clk) { 631 if (!sachip->clk) {
632 ret = PTR_ERR(sachip->clk); 632 ret = PTR_ERR(sachip->clk);
633 goto err_free; 633 goto err_free;
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index bc299b07a6fa..ae39553589dd 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -247,7 +247,7 @@ static int __devinit scoop_probe(struct platform_device *pdev)
247 devptr->gpio.base = -1; 247 devptr->gpio.base = -1;
248 248
249 if (inf->gpio_base != 0) { 249 if (inf->gpio_base != 0) {
250 devptr->gpio.label = pdev->dev.bus_id; 250 devptr->gpio.label = dev_name(&pdev->dev);
251 devptr->gpio.base = inf->gpio_base; 251 devptr->gpio.base = inf->gpio_base;
252 devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ 252 devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */
253 devptr->gpio.set = scoop_gpio_set; 253 devptr->gpio.set = scoop_gpio_set;
diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig
new file mode 100644
index 000000000000..2a84d557adc2
--- /dev/null
+++ b/arch/arm/configs/ezx_defconfig
@@ -0,0 +1,1614 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc3
4# Mon Jul 7 17:52:21 2008
5#
6CONFIG_ARM=y
7CONFIG_HAVE_PWM=y
8CONFIG_SYS_SUPPORTS_APM_EMULATION=y
9CONFIG_GENERIC_GPIO=y
10CONFIG_GENERIC_TIME=y
11CONFIG_GENERIC_CLOCKEVENTS=y
12CONFIG_MMU=y
13# CONFIG_NO_IOPORT is not set
14CONFIG_GENERIC_HARDIRQS=y
15CONFIG_STACKTRACE_SUPPORT=y
16CONFIG_LOCKDEP_SUPPORT=y
17CONFIG_TRACE_IRQFLAGS_SUPPORT=y
18CONFIG_HARDIRQS_SW_RESEND=y
19CONFIG_GENERIC_IRQ_PROBE=y
20CONFIG_RWSEM_GENERIC_SPINLOCK=y
21# CONFIG_ARCH_HAS_ILOG2_U32 is not set
22# CONFIG_ARCH_HAS_ILOG2_U64 is not set
23CONFIG_GENERIC_HWEIGHT=y
24CONFIG_GENERIC_CALIBRATE_DELAY=y
25CONFIG_ARCH_SUPPORTS_AOUT=y
26CONFIG_ZONE_DMA=y
27CONFIG_ARCH_MTD_XIP=y
28CONFIG_VECTORS_BASE=0xffff0000
29CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
30
31#
32# General setup
33#
34CONFIG_EXPERIMENTAL=y
35CONFIG_BROKEN_ON_SMP=y
36CONFIG_LOCK_KERNEL=y
37CONFIG_INIT_ENV_ARG_LIMIT=32
38CONFIG_LOCALVERSION="-ezxdev"
39# CONFIG_LOCALVERSION_AUTO is not set
40CONFIG_SWAP=y
41CONFIG_SYSVIPC=y
42CONFIG_SYSVIPC_SYSCTL=y
43# CONFIG_POSIX_MQUEUE is not set
44# CONFIG_BSD_PROCESS_ACCT is not set
45# CONFIG_TASKSTATS is not set
46# CONFIG_AUDIT is not set
47CONFIG_IKCONFIG=y
48CONFIG_IKCONFIG_PROC=y
49CONFIG_LOG_BUF_SHIFT=14
50# CONFIG_CGROUPS is not set
51CONFIG_GROUP_SCHED=y
52CONFIG_FAIR_GROUP_SCHED=y
53# CONFIG_RT_GROUP_SCHED is not set
54CONFIG_USER_SCHED=y
55# CONFIG_CGROUP_SCHED is not set
56CONFIG_SYSFS_DEPRECATED=y
57CONFIG_SYSFS_DEPRECATED_V2=y
58# CONFIG_RELAY is not set
59# CONFIG_NAMESPACES is not set
60# CONFIG_BLK_DEV_INITRD is not set
61CONFIG_CC_OPTIMIZE_FOR_SIZE=y
62CONFIG_SYSCTL=y
63CONFIG_EMBEDDED=y
64CONFIG_UID16=y
65CONFIG_SYSCTL_SYSCALL=y
66CONFIG_SYSCTL_SYSCALL_CHECK=y
67CONFIG_KALLSYMS=y
68# CONFIG_KALLSYMS_EXTRA_PASS is not set
69CONFIG_HOTPLUG=y
70CONFIG_PRINTK=y
71CONFIG_BUG=y
72CONFIG_ELF_CORE=y
73# CONFIG_COMPAT_BRK is not set
74CONFIG_BASE_FULL=y
75CONFIG_FUTEX=y
76CONFIG_ANON_INODES=y
77CONFIG_EPOLL=y
78CONFIG_SIGNALFD=y
79CONFIG_TIMERFD=y
80CONFIG_EVENTFD=y
81CONFIG_SHMEM=y
82CONFIG_VM_EVENT_COUNTERS=y
83CONFIG_SLAB=y
84# CONFIG_SLUB is not set
85# CONFIG_SLOB is not set
86# CONFIG_PROFILING is not set
87# CONFIG_MARKERS is not set
88CONFIG_HAVE_OPROFILE=y
89# CONFIG_KPROBES is not set
90CONFIG_HAVE_KPROBES=y
91CONFIG_HAVE_KRETPROBES=y
92# CONFIG_HAVE_DMA_ATTRS is not set
93CONFIG_PROC_PAGE_MONITOR=y
94CONFIG_SLABINFO=y
95CONFIG_RT_MUTEXES=y
96# CONFIG_TINY_SHMEM is not set
97CONFIG_BASE_SMALL=0
98CONFIG_MODULES=y
99# CONFIG_MODULE_FORCE_LOAD is not set
100CONFIG_MODULE_UNLOAD=y
101CONFIG_MODULE_FORCE_UNLOAD=y
102CONFIG_MODVERSIONS=y
103# CONFIG_MODULE_SRCVERSION_ALL is not set
104CONFIG_KMOD=y
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"
123CONFIG_CLASSIC_RCU=y
124
125#
126# System Type
127#
128# CONFIG_ARCH_AAEC2000 is not set
129# CONFIG_ARCH_INTEGRATOR is not set
130# CONFIG_ARCH_REALVIEW is not set
131# CONFIG_ARCH_VERSATILE is not set
132# CONFIG_ARCH_AT91 is not set
133# CONFIG_ARCH_CLPS7500 is not set
134# CONFIG_ARCH_CLPS711X is not set
135# CONFIG_ARCH_CO285 is not set
136# CONFIG_ARCH_EBSA110 is not set
137# CONFIG_ARCH_EP93XX is not set
138# CONFIG_ARCH_FOOTBRIDGE is not set
139# CONFIG_ARCH_NETX is not set
140# CONFIG_ARCH_H720X is not set
141# CONFIG_ARCH_IMX is not set
142# CONFIG_ARCH_IOP13XX is not set
143# CONFIG_ARCH_IOP32X is not set
144# CONFIG_ARCH_IOP33X is not set
145# CONFIG_ARCH_IXP23XX is not set
146# CONFIG_ARCH_IXP2000 is not set
147# CONFIG_ARCH_IXP4XX is not set
148# CONFIG_ARCH_L7200 is not set
149# CONFIG_ARCH_KS8695 is not set
150# CONFIG_ARCH_NS9XXX is not set
151# CONFIG_ARCH_MXC is not set
152# CONFIG_ARCH_ORION5X is not set
153# CONFIG_ARCH_PNX4008 is not set
154CONFIG_ARCH_PXA=y
155# CONFIG_ARCH_RPC is not set
156# CONFIG_ARCH_SA1100 is not set
157# CONFIG_ARCH_S3C2410 is not set
158# CONFIG_ARCH_SHARK is not set
159# CONFIG_ARCH_LH7A40X is not set
160# CONFIG_ARCH_DAVINCI is not set
161# CONFIG_ARCH_OMAP is not set
162# CONFIG_ARCH_MSM7X00A is not set
163
164#
165# Intel PXA2xx/PXA3xx Implementations
166#
167# CONFIG_ARCH_GUMSTIX is not set
168# CONFIG_ARCH_LUBBOCK is not set
169# CONFIG_MACH_LOGICPD_PXA270 is not set
170# CONFIG_MACH_MAINSTONE is not set
171# CONFIG_ARCH_PXA_IDP is not set
172# CONFIG_PXA_SHARPSL is not set
173# CONFIG_ARCH_PXA_ESERIES is not set
174# CONFIG_MACH_TRIZEPS4 is not set
175# CONFIG_MACH_EM_X270 is not set
176# CONFIG_MACH_COLIBRI is not set
177# CONFIG_MACH_ZYLONITE is not set
178# CONFIG_MACH_LITTLETON is not set
179# CONFIG_MACH_ARMCORE is not set
180# CONFIG_MACH_MAGICIAN is not set
181# CONFIG_MACH_PCM027 is not set
182CONFIG_PXA_EZX=y
183CONFIG_MACH_EZX_A780=y
184CONFIG_MACH_EZX_E680=y
185CONFIG_MACH_EZX_A1200=y
186CONFIG_MACH_EZX_A910=y
187CONFIG_MACH_EZX_E6=y
188CONFIG_MACH_EZX_E2=y
189CONFIG_PXA27x=y
190CONFIG_PXA_SSP=y
191CONFIG_PXA_PWM=y
192
193#
194# Boot options
195#
196
197#
198# Power management
199#
200
201#
202# Processor Type
203#
204CONFIG_CPU_32=y
205CONFIG_CPU_XSCALE=y
206CONFIG_CPU_32v5=y
207CONFIG_CPU_ABRT_EV5T=y
208CONFIG_CPU_PABRT_NOIFAR=y
209CONFIG_CPU_CACHE_VIVT=y
210CONFIG_CPU_TLB_V4WBI=y
211CONFIG_CPU_CP15=y
212CONFIG_CPU_CP15_MMU=y
213
214#
215# Processor Features
216#
217CONFIG_ARM_THUMB=y
218# CONFIG_CPU_DCACHE_DISABLE is not set
219# CONFIG_OUTER_CACHE is not set
220CONFIG_IWMMXT=y
221CONFIG_XSCALE_PMU=y
222
223#
224# Bus support
225#
226# CONFIG_PCI_SYSCALL is not set
227# CONFIG_ARCH_SUPPORTS_MSI is not set
228# CONFIG_PCCARD is not set
229
230#
231# Kernel Features
232#
233CONFIG_TICK_ONESHOT=y
234# CONFIG_NO_HZ is not set
235CONFIG_HIGH_RES_TIMERS=y
236CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
237CONFIG_PREEMPT=y
238CONFIG_HZ=100
239CONFIG_AEABI=y
240CONFIG_OABI_COMPAT=y
241# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
242CONFIG_SELECT_MEMORY_MODEL=y
243CONFIG_FLATMEM_MANUAL=y
244# CONFIG_DISCONTIGMEM_MANUAL is not set
245# CONFIG_SPARSEMEM_MANUAL is not set
246CONFIG_FLATMEM=y
247CONFIG_FLAT_NODE_MEM_MAP=y
248# CONFIG_SPARSEMEM_STATIC is not set
249# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
250CONFIG_PAGEFLAGS_EXTENDED=y
251CONFIG_SPLIT_PTLOCK_CPUS=4096
252# CONFIG_RESOURCES_64BIT is not set
253CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y
255CONFIG_VIRT_TO_BUS=y
256CONFIG_ALIGNMENT_TRAP=y
257
258#
259# Boot options
260#
261CONFIG_ZBOOT_ROM_TEXT=0x0
262CONFIG_ZBOOT_ROM_BSS=0x0
263CONFIG_CMDLINE="console=tty1 root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=1 ip=192.168.0.202:192.168.0.200:192.168.0.200:255.255.255.0 debug"
264# CONFIG_XIP_KERNEL is not set
265CONFIG_KEXEC=y
266CONFIG_ATAGS_PROC=y
267
268#
269# CPU Frequency scaling
270#
271# CONFIG_CPU_FREQ is not set
272
273#
274# Floating point emulation
275#
276
277#
278# At least one emulation must be selected
279#
280CONFIG_FPE_NWFPE=y
281# CONFIG_FPE_NWFPE_XP is not set
282# CONFIG_FPE_FASTFPE is not set
283
284#
285# Userspace binary formats
286#
287CONFIG_BINFMT_ELF=y
288CONFIG_BINFMT_AOUT=m
289CONFIG_BINFMT_MISC=m
290
291#
292# Power management options
293#
294CONFIG_PM=y
295# CONFIG_PM_DEBUG is not set
296CONFIG_PM_SLEEP=y
297CONFIG_SUSPEND=y
298CONFIG_SUSPEND_FREEZER=y
299CONFIG_APM_EMULATION=y
300CONFIG_ARCH_SUSPEND_POSSIBLE=y
301
302#
303# Networking
304#
305CONFIG_NET=y
306
307#
308# Networking options
309#
310CONFIG_PACKET=y
311CONFIG_PACKET_MMAP=y
312CONFIG_UNIX=y
313CONFIG_XFRM=y
314# CONFIG_XFRM_USER is not set
315# CONFIG_XFRM_SUB_POLICY is not set
316# CONFIG_XFRM_MIGRATE is not set
317# CONFIG_XFRM_STATISTICS is not set
318# CONFIG_NET_KEY is not set
319CONFIG_INET=y
320# CONFIG_IP_MULTICAST is not set
321# CONFIG_IP_ADVANCED_ROUTER is not set
322CONFIG_IP_FIB_HASH=y
323CONFIG_IP_PNP=y
324CONFIG_IP_PNP_DHCP=y
325CONFIG_IP_PNP_BOOTP=y
326CONFIG_IP_PNP_RARP=y
327# CONFIG_NET_IPIP is not set
328# CONFIG_NET_IPGRE is not set
329# CONFIG_ARPD is not set
330CONFIG_SYN_COOKIES=y
331# CONFIG_INET_AH is not set
332# CONFIG_INET_ESP is not set
333# CONFIG_INET_IPCOMP is not set
334# CONFIG_INET_XFRM_TUNNEL is not set
335CONFIG_INET_TUNNEL=m
336# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
337# CONFIG_INET_XFRM_MODE_TUNNEL is not set
338# CONFIG_INET_XFRM_MODE_BEET is not set
339# CONFIG_INET_LRO is not set
340# CONFIG_INET_DIAG is not set
341# CONFIG_TCP_CONG_ADVANCED is not set
342CONFIG_TCP_CONG_CUBIC=y
343CONFIG_DEFAULT_TCP_CONG="cubic"
344# CONFIG_TCP_MD5SIG is not set
345# CONFIG_IP_VS is not set
346CONFIG_IPV6=m
347# CONFIG_IPV6_PRIVACY is not set
348# CONFIG_IPV6_ROUTER_PREF is not set
349# CONFIG_IPV6_OPTIMISTIC_DAD is not set
350CONFIG_INET6_AH=m
351CONFIG_INET6_ESP=m
352CONFIG_INET6_IPCOMP=m
353CONFIG_IPV6_MIP6=m
354CONFIG_INET6_XFRM_TUNNEL=m
355CONFIG_INET6_TUNNEL=m
356CONFIG_INET6_XFRM_MODE_TRANSPORT=m
357CONFIG_INET6_XFRM_MODE_TUNNEL=m
358CONFIG_INET6_XFRM_MODE_BEET=m
359# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
360CONFIG_IPV6_SIT=m
361CONFIG_IPV6_NDISC_NODETYPE=y
362CONFIG_IPV6_TUNNEL=m
363CONFIG_IPV6_MULTIPLE_TABLES=y
364CONFIG_IPV6_SUBTREES=y
365# CONFIG_IPV6_MROUTE is not set
366# CONFIG_NETWORK_SECMARK is not set
367CONFIG_NETFILTER=y
368# CONFIG_NETFILTER_DEBUG is not set
369CONFIG_NETFILTER_ADVANCED=y
370CONFIG_BRIDGE_NETFILTER=y
371
372#
373# Core Netfilter Configuration
374#
375CONFIG_NETFILTER_NETLINK=m
376CONFIG_NETFILTER_NETLINK_QUEUE=m
377CONFIG_NETFILTER_NETLINK_LOG=m
378CONFIG_NF_CONNTRACK=m
379CONFIG_NF_CT_ACCT=y
380CONFIG_NF_CONNTRACK_MARK=y
381CONFIG_NF_CONNTRACK_EVENTS=y
382# CONFIG_NF_CT_PROTO_DCCP is not set
383CONFIG_NF_CT_PROTO_GRE=m
384CONFIG_NF_CT_PROTO_SCTP=m
385CONFIG_NF_CT_PROTO_UDPLITE=m
386CONFIG_NF_CONNTRACK_AMANDA=m
387CONFIG_NF_CONNTRACK_FTP=m
388CONFIG_NF_CONNTRACK_H323=m
389CONFIG_NF_CONNTRACK_IRC=m
390CONFIG_NF_CONNTRACK_NETBIOS_NS=m
391CONFIG_NF_CONNTRACK_PPTP=m
392CONFIG_NF_CONNTRACK_SANE=m
393CONFIG_NF_CONNTRACK_SIP=m
394CONFIG_NF_CONNTRACK_TFTP=m
395CONFIG_NF_CT_NETLINK=m
396CONFIG_NETFILTER_XTABLES=m
397CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
398# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
399# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
400CONFIG_NETFILTER_XT_TARGET_MARK=m
401CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
402CONFIG_NETFILTER_XT_TARGET_NFLOG=m
403# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
404# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
405# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
406CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
407# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
408CONFIG_NETFILTER_XT_MATCH_COMMENT=m
409CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
410CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
411CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
412CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
413CONFIG_NETFILTER_XT_MATCH_DCCP=m
414CONFIG_NETFILTER_XT_MATCH_DSCP=m
415CONFIG_NETFILTER_XT_MATCH_ESP=m
416CONFIG_NETFILTER_XT_MATCH_HELPER=m
417# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
418CONFIG_NETFILTER_XT_MATCH_LENGTH=m
419CONFIG_NETFILTER_XT_MATCH_LIMIT=m
420CONFIG_NETFILTER_XT_MATCH_MAC=m
421CONFIG_NETFILTER_XT_MATCH_MARK=m
422# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
423CONFIG_NETFILTER_XT_MATCH_POLICY=m
424CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
425# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
426CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
427CONFIG_NETFILTER_XT_MATCH_QUOTA=m
428# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
429CONFIG_NETFILTER_XT_MATCH_REALM=m
430CONFIG_NETFILTER_XT_MATCH_SCTP=m
431CONFIG_NETFILTER_XT_MATCH_STATE=m
432CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
433CONFIG_NETFILTER_XT_MATCH_STRING=m
434CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
435CONFIG_NETFILTER_XT_MATCH_TIME=m
436CONFIG_NETFILTER_XT_MATCH_U32=m
437CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
438
439#
440# IP: Netfilter Configuration
441#
442CONFIG_NF_CONNTRACK_IPV4=m
443CONFIG_NF_CONNTRACK_PROC_COMPAT=y
444CONFIG_IP_NF_QUEUE=m
445CONFIG_IP_NF_IPTABLES=m
446CONFIG_IP_NF_MATCH_RECENT=m
447CONFIG_IP_NF_MATCH_ECN=m
448CONFIG_IP_NF_MATCH_AH=m
449CONFIG_IP_NF_MATCH_TTL=m
450CONFIG_IP_NF_MATCH_ADDRTYPE=m
451CONFIG_IP_NF_FILTER=m
452CONFIG_IP_NF_TARGET_REJECT=m
453CONFIG_IP_NF_TARGET_LOG=m
454CONFIG_IP_NF_TARGET_ULOG=m
455CONFIG_NF_NAT=m
456CONFIG_NF_NAT_NEEDED=y
457CONFIG_IP_NF_TARGET_MASQUERADE=m
458CONFIG_IP_NF_TARGET_REDIRECT=m
459CONFIG_IP_NF_TARGET_NETMAP=m
460CONFIG_NF_NAT_SNMP_BASIC=m
461CONFIG_NF_NAT_PROTO_GRE=m
462CONFIG_NF_NAT_PROTO_UDPLITE=m
463CONFIG_NF_NAT_PROTO_SCTP=m
464CONFIG_NF_NAT_FTP=m
465CONFIG_NF_NAT_IRC=m
466CONFIG_NF_NAT_TFTP=m
467CONFIG_NF_NAT_AMANDA=m
468CONFIG_NF_NAT_PPTP=m
469CONFIG_NF_NAT_H323=m
470CONFIG_NF_NAT_SIP=m
471CONFIG_IP_NF_MANGLE=m
472CONFIG_IP_NF_TARGET_ECN=m
473CONFIG_IP_NF_TARGET_TTL=m
474CONFIG_IP_NF_TARGET_CLUSTERIP=m
475CONFIG_IP_NF_RAW=m
476CONFIG_IP_NF_ARPTABLES=m
477CONFIG_IP_NF_ARPFILTER=m
478CONFIG_IP_NF_ARP_MANGLE=m
479
480#
481# IPv6: Netfilter Configuration
482#
483CONFIG_NF_CONNTRACK_IPV6=m
484CONFIG_IP6_NF_QUEUE=m
485CONFIG_IP6_NF_IPTABLES=m
486CONFIG_IP6_NF_MATCH_RT=m
487CONFIG_IP6_NF_MATCH_OPTS=m
488CONFIG_IP6_NF_MATCH_FRAG=m
489CONFIG_IP6_NF_MATCH_HL=m
490CONFIG_IP6_NF_MATCH_IPV6HEADER=m
491CONFIG_IP6_NF_MATCH_AH=m
492CONFIG_IP6_NF_MATCH_MH=m
493CONFIG_IP6_NF_MATCH_EUI64=m
494CONFIG_IP6_NF_FILTER=m
495CONFIG_IP6_NF_TARGET_LOG=m
496CONFIG_IP6_NF_TARGET_REJECT=m
497CONFIG_IP6_NF_MANGLE=m
498CONFIG_IP6_NF_TARGET_HL=m
499CONFIG_IP6_NF_RAW=m
500
501#
502# Bridge: Netfilter Configuration
503#
504# CONFIG_BRIDGE_NF_EBTABLES is not set
505# CONFIG_IP_DCCP is not set
506# CONFIG_IP_SCTP is not set
507# CONFIG_TIPC is not set
508# CONFIG_ATM is not set
509CONFIG_BRIDGE=m
510# CONFIG_VLAN_8021Q is not set
511# CONFIG_DECNET is not set
512CONFIG_LLC=m
513# CONFIG_LLC2 is not set
514# CONFIG_IPX is not set
515# CONFIG_ATALK is not set
516# CONFIG_X25 is not set
517# CONFIG_LAPB is not set
518# CONFIG_ECONET is not set
519# CONFIG_WAN_ROUTER is not set
520# CONFIG_NET_SCHED is not set
521CONFIG_NET_CLS_ROUTE=y
522CONFIG_NET_SCH_FIFO=y
523
524#
525# Network testing
526#
527# CONFIG_NET_PKTGEN is not set
528# CONFIG_HAMRADIO is not set
529# CONFIG_CAN is not set
530# CONFIG_IRDA is not set
531CONFIG_BT=y
532CONFIG_BT_L2CAP=m
533CONFIG_BT_SCO=y
534CONFIG_BT_RFCOMM=m
535CONFIG_BT_RFCOMM_TTY=y
536CONFIG_BT_BNEP=m
537CONFIG_BT_BNEP_MC_FILTER=y
538CONFIG_BT_BNEP_PROTO_FILTER=y
539CONFIG_BT_HIDP=m
540
541#
542# Bluetooth device drivers
543#
544# CONFIG_BT_HCIUSB is not set
545# CONFIG_BT_HCIBTUSB is not set
546# CONFIG_BT_HCIBTSDIO is not set
547CONFIG_BT_HCIUART=y
548CONFIG_BT_HCIUART_H4=y
549# CONFIG_BT_HCIUART_BCSP is not set
550# CONFIG_BT_HCIUART_LL is not set
551# CONFIG_BT_HCIBCM203X is not set
552# CONFIG_BT_HCIBPA10X is not set
553# CONFIG_BT_HCIBFUSB is not set
554# CONFIG_BT_HCIVHCI is not set
555# CONFIG_AF_RXRPC is not set
556CONFIG_FIB_RULES=y
557
558#
559# Wireless
560#
561CONFIG_CFG80211=m
562CONFIG_NL80211=y
563CONFIG_WIRELESS_EXT=y
564CONFIG_MAC80211=m
565
566#
567# Rate control algorithm selection
568#
569CONFIG_MAC80211_RC_DEFAULT_PID=y
570# CONFIG_MAC80211_RC_DEFAULT_NONE is not set
571
572#
573# Selecting 'y' for an algorithm will
574#
575
576#
577# build the algorithm into mac80211.
578#
579CONFIG_MAC80211_RC_DEFAULT="pid"
580CONFIG_MAC80211_RC_PID=y
581# CONFIG_MAC80211_MESH is not set
582CONFIG_MAC80211_LEDS=y
583# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set
584# CONFIG_MAC80211_DEBUG is not set
585CONFIG_IEEE80211=m
586# CONFIG_IEEE80211_DEBUG is not set
587CONFIG_IEEE80211_CRYPT_WEP=m
588CONFIG_IEEE80211_CRYPT_CCMP=m
589CONFIG_IEEE80211_CRYPT_TKIP=m
590# CONFIG_RFKILL is not set
591# CONFIG_NET_9P is not set
592
593#
594# Device Drivers
595#
596
597#
598# Generic Driver Options
599#
600CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
601CONFIG_STANDALONE=y
602CONFIG_PREVENT_FIRMWARE_BUILD=y
603CONFIG_FW_LOADER=m
604# CONFIG_SYS_HYPERVISOR is not set
605CONFIG_CONNECTOR=m
606CONFIG_MTD=y
607# CONFIG_MTD_DEBUG is not set
608# CONFIG_MTD_CONCAT is not set
609CONFIG_MTD_PARTITIONS=y
610# CONFIG_MTD_REDBOOT_PARTS is not set
611# CONFIG_MTD_CMDLINE_PARTS is not set
612# CONFIG_MTD_AFS_PARTS is not set
613# CONFIG_MTD_AR7_PARTS is not set
614
615#
616# User Modules And Translation Layers
617#
618CONFIG_MTD_CHAR=y
619# CONFIG_MTD_BLKDEVS is not set
620# CONFIG_MTD_BLOCK is not set
621# CONFIG_MTD_BLOCK_RO is not set
622# CONFIG_FTL is not set
623# CONFIG_NFTL is not set
624# CONFIG_INFTL is not set
625# CONFIG_RFD_FTL is not set
626# CONFIG_SSFDC is not set
627# CONFIG_MTD_OOPS is not set
628
629#
630# RAM/ROM/Flash chip drivers
631#
632CONFIG_MTD_CFI=y
633# CONFIG_MTD_JEDECPROBE is not set
634CONFIG_MTD_GEN_PROBE=y
635CONFIG_MTD_CFI_ADV_OPTIONS=y
636CONFIG_MTD_CFI_NOSWAP=y
637# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
638# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
639CONFIG_MTD_CFI_GEOMETRY=y
640# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
641CONFIG_MTD_MAP_BANK_WIDTH_2=y
642# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
643# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
644# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
645# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
646CONFIG_MTD_CFI_I1=y
647# CONFIG_MTD_CFI_I2 is not set
648# CONFIG_MTD_CFI_I4 is not set
649# CONFIG_MTD_CFI_I8 is not set
650# CONFIG_MTD_OTP is not set
651CONFIG_MTD_CFI_INTELEXT=y
652# CONFIG_MTD_CFI_AMDSTD is not set
653# CONFIG_MTD_CFI_STAA is not set
654CONFIG_MTD_CFI_UTIL=y
655# CONFIG_MTD_RAM is not set
656# CONFIG_MTD_ROM is not set
657# CONFIG_MTD_ABSENT is not set
658CONFIG_MTD_XIP=y
659
660#
661# Mapping drivers for chip access
662#
663# CONFIG_MTD_COMPLEX_MAPPINGS is not set
664CONFIG_MTD_PHYSMAP=y
665CONFIG_MTD_PHYSMAP_START=0x0
666CONFIG_MTD_PHYSMAP_LEN=0x0
667CONFIG_MTD_PHYSMAP_BANKWIDTH=2
668# CONFIG_MTD_PXA2XX is not set
669# CONFIG_MTD_ARM_INTEGRATOR is not set
670# CONFIG_MTD_SHARP_SL is not set
671# CONFIG_MTD_PLATRAM is not set
672
673#
674# Self-contained MTD device drivers
675#
676# CONFIG_MTD_DATAFLASH is not set
677# CONFIG_MTD_M25P80 is not set
678# CONFIG_MTD_SLRAM is not set
679# CONFIG_MTD_PHRAM is not set
680# CONFIG_MTD_MTDRAM is not set
681# CONFIG_MTD_BLOCK2MTD is not set
682
683#
684# Disk-On-Chip Device Drivers
685#
686# CONFIG_MTD_DOC2000 is not set
687# CONFIG_MTD_DOC2001 is not set
688# CONFIG_MTD_DOC2001PLUS is not set
689# CONFIG_MTD_NAND is not set
690# CONFIG_MTD_ONENAND is not set
691
692#
693# UBI - Unsorted block images
694#
695# CONFIG_MTD_UBI is not set
696# CONFIG_PARPORT is not set
697CONFIG_BLK_DEV=y
698# CONFIG_BLK_DEV_COW_COMMON is not set
699CONFIG_BLK_DEV_LOOP=m
700CONFIG_BLK_DEV_CRYPTOLOOP=m
701CONFIG_BLK_DEV_NBD=m
702# CONFIG_BLK_DEV_UB is not set
703CONFIG_BLK_DEV_RAM=m
704CONFIG_BLK_DEV_RAM_COUNT=16
705CONFIG_BLK_DEV_RAM_SIZE=4096
706# CONFIG_BLK_DEV_XIP is not set
707# CONFIG_CDROM_PKTCDVD is not set
708# CONFIG_ATA_OVER_ETH is not set
709CONFIG_MISC_DEVICES=y
710# CONFIG_EEPROM_93CX6 is not set
711# CONFIG_ENCLOSURE_SERVICES is not set
712CONFIG_HAVE_IDE=y
713# CONFIG_IDE is not set
714
715#
716# SCSI device support
717#
718# CONFIG_RAID_ATTRS is not set
719# CONFIG_SCSI is not set
720# CONFIG_SCSI_DMA is not set
721# CONFIG_SCSI_NETLINK is not set
722# CONFIG_ATA is not set
723# CONFIG_MD is not set
724CONFIG_NETDEVICES=y
725# CONFIG_NETDEVICES_MULTIQUEUE is not set
726CONFIG_DUMMY=y
727# CONFIG_BONDING is not set
728# CONFIG_MACVLAN is not set
729# CONFIG_EQUALIZER is not set
730# CONFIG_TUN is not set
731# CONFIG_VETH is not set
732# CONFIG_NET_ETHERNET is not set
733# CONFIG_NETDEV_1000 is not set
734# CONFIG_NETDEV_10000 is not set
735
736#
737# Wireless LAN
738#
739# CONFIG_WLAN_PRE80211 is not set
740# CONFIG_WLAN_80211 is not set
741# CONFIG_IWLWIFI_LEDS is not set
742
743#
744# USB Network Adapters
745#
746# CONFIG_USB_CATC is not set
747# CONFIG_USB_KAWETH is not set
748# CONFIG_USB_PEGASUS is not set
749# CONFIG_USB_RTL8150 is not set
750# CONFIG_USB_USBNET is not set
751# CONFIG_WAN is not set
752CONFIG_PPP=m
753CONFIG_PPP_MULTILINK=y
754CONFIG_PPP_FILTER=y
755CONFIG_PPP_ASYNC=m
756CONFIG_PPP_SYNC_TTY=m
757CONFIG_PPP_DEFLATE=m
758CONFIG_PPP_BSDCOMP=m
759# CONFIG_PPP_MPPE is not set
760# CONFIG_PPPOE is not set
761# CONFIG_PPPOL2TP is not set
762# CONFIG_SLIP is not set
763CONFIG_SLHC=m
764# CONFIG_NETCONSOLE is not set
765# CONFIG_NETPOLL is not set
766# CONFIG_NET_POLL_CONTROLLER is not set
767# CONFIG_ISDN is not set
768
769#
770# Input device support
771#
772CONFIG_INPUT=y
773# CONFIG_INPUT_FF_MEMLESS is not set
774# CONFIG_INPUT_POLLDEV is not set
775
776#
777# Userland interfaces
778#
779# CONFIG_INPUT_MOUSEDEV is not set
780# CONFIG_INPUT_JOYDEV is not set
781CONFIG_INPUT_EVDEV=y
782# CONFIG_INPUT_EVBUG is not set
783# CONFIG_INPUT_APMPOWER is not set
784
785#
786# Input Device Drivers
787#
788CONFIG_INPUT_KEYBOARD=y
789# CONFIG_KEYBOARD_ATKBD is not set
790# CONFIG_KEYBOARD_SUNKBD is not set
791# CONFIG_KEYBOARD_LKKBD is not set
792# CONFIG_KEYBOARD_XTKBD is not set
793# CONFIG_KEYBOARD_NEWTON is not set
794# CONFIG_KEYBOARD_STOWAWAY is not set
795CONFIG_KEYBOARD_PXA27x=y
796CONFIG_KEYBOARD_GPIO=y
797# CONFIG_INPUT_MOUSE is not set
798# CONFIG_INPUT_JOYSTICK is not set
799# CONFIG_INPUT_TABLET is not set
800CONFIG_INPUT_TOUCHSCREEN=y
801# CONFIG_TOUCHSCREEN_ADS7846 is not set
802# CONFIG_TOUCHSCREEN_FUJITSU is not set
803# CONFIG_TOUCHSCREEN_GUNZE is not set
804# CONFIG_TOUCHSCREEN_ELO is not set
805# CONFIG_TOUCHSCREEN_MTOUCH is not set
806# CONFIG_TOUCHSCREEN_MK712 is not set
807# CONFIG_TOUCHSCREEN_PENMOUNT is not set
808# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
809# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
810# CONFIG_TOUCHSCREEN_UCB1400 is not set
811# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
812CONFIG_TOUCHSCREEN_PCAP=y
813CONFIG_INPUT_MISC=y
814# CONFIG_INPUT_ATI_REMOTE is not set
815# CONFIG_INPUT_ATI_REMOTE2 is not set
816# CONFIG_INPUT_KEYSPAN_REMOTE is not set
817# CONFIG_INPUT_POWERMATE is not set
818# CONFIG_INPUT_YEALINK is not set
819CONFIG_INPUT_UINPUT=y
820
821#
822# Hardware I/O ports
823#
824# CONFIG_SERIO is not set
825# CONFIG_GAMEPORT is not set
826
827#
828# Character devices
829#
830CONFIG_VT=y
831CONFIG_VT_CONSOLE=y
832CONFIG_HW_CONSOLE=y
833# CONFIG_VT_HW_CONSOLE_BINDING is not set
834CONFIG_DEVKMEM=y
835# CONFIG_SERIAL_NONSTANDARD is not set
836
837#
838# Serial drivers
839#
840# CONFIG_SERIAL_8250 is not set
841
842#
843# Non-8250 serial port support
844#
845CONFIG_SERIAL_PXA=y
846CONFIG_SERIAL_PXA_CONSOLE=y
847CONFIG_SERIAL_CORE=y
848CONFIG_SERIAL_CORE_CONSOLE=y
849CONFIG_UNIX98_PTYS=y
850CONFIG_LEGACY_PTYS=y
851CONFIG_LEGACY_PTY_COUNT=8
852# CONFIG_IPMI_HANDLER is not set
853CONFIG_HW_RANDOM=y
854# CONFIG_NVRAM is not set
855# CONFIG_R3964 is not set
856# CONFIG_RAW_DRIVER is not set
857# CONFIG_TCG_TPM is not set
858CONFIG_I2C=y
859CONFIG_I2C_BOARDINFO=y
860CONFIG_I2C_CHARDEV=y
861
862#
863# I2C Hardware Bus support
864#
865# CONFIG_I2C_GPIO is not set
866CONFIG_I2C_PXA=y
867# CONFIG_I2C_PXA_SLAVE is not set
868# CONFIG_I2C_OCORES is not set
869# CONFIG_I2C_PARPORT_LIGHT is not set
870# CONFIG_I2C_SIMTEC is not set
871# CONFIG_I2C_TAOS_EVM is not set
872# CONFIG_I2C_STUB is not set
873# CONFIG_I2C_TINY_USB is not set
874# CONFIG_I2C_PCA_PLATFORM is not set
875
876#
877# Miscellaneous I2C Chip support
878#
879# CONFIG_DS1682 is not set
880# CONFIG_SENSORS_EEPROM is not set
881# CONFIG_SENSORS_PCF8574 is not set
882# CONFIG_PCF8575 is not set
883# CONFIG_SENSORS_PCF8591 is not set
884# CONFIG_TPS65010 is not set
885# CONFIG_SENSORS_MAX6875 is not set
886# CONFIG_SENSORS_TSL2550 is not set
887# CONFIG_I2C_DEBUG_CORE is not set
888# CONFIG_I2C_DEBUG_ALGO is not set
889# CONFIG_I2C_DEBUG_BUS is not set
890# CONFIG_I2C_DEBUG_CHIP is not set
891CONFIG_SPI=y
892CONFIG_SPI_MASTER=y
893
894#
895# SPI Master Controller Drivers
896#
897# CONFIG_SPI_BITBANG is not set
898CONFIG_SPI_PXA2XX=m
899
900#
901# SPI Protocol Masters
902#
903# CONFIG_SPI_AT25 is not set
904# CONFIG_SPI_SPIDEV is not set
905# CONFIG_SPI_TLE62X0 is not set
906CONFIG_HAVE_GPIO_LIB=y
907
908#
909# GPIO Support
910#
911
912#
913# I2C GPIO expanders:
914#
915# CONFIG_GPIO_PCA953X is not set
916# CONFIG_GPIO_PCF857X is not set
917
918#
919# SPI GPIO expanders:
920#
921# CONFIG_GPIO_MCP23S08 is not set
922# CONFIG_W1 is not set
923# CONFIG_POWER_SUPPLY is not set
924# CONFIG_HWMON is not set
925# CONFIG_WATCHDOG is not set
926
927#
928# Sonics Silicon Backplane
929#
930CONFIG_SSB_POSSIBLE=y
931# CONFIG_SSB is not set
932
933#
934# Multifunction device drivers
935#
936# CONFIG_MFD_CORE is not set
937# CONFIG_MFD_SM501 is not set
938# CONFIG_MFD_ASIC3 is not set
939# CONFIG_HTC_EGPIO is not set
940# CONFIG_HTC_PASIC3 is not set
941# CONFIG_MFD_TC6393XB is not set
942CONFIG_EZX_PCAP=y
943
944#
945# Multimedia devices
946#
947
948#
949# Multimedia core support
950#
951CONFIG_VIDEO_DEV=m
952CONFIG_VIDEO_V4L2_COMMON=m
953CONFIG_VIDEO_ALLOW_V4L1=y
954CONFIG_VIDEO_V4L1_COMPAT=y
955# CONFIG_DVB_CORE is not set
956CONFIG_VIDEO_MEDIA=m
957
958#
959# Multimedia drivers
960#
961# CONFIG_MEDIA_ATTACH is not set
962CONFIG_MEDIA_TUNER=m
963# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
964CONFIG_MEDIA_TUNER_SIMPLE=m
965CONFIG_MEDIA_TUNER_TDA8290=m
966CONFIG_MEDIA_TUNER_TDA9887=m
967CONFIG_MEDIA_TUNER_TEA5761=m
968CONFIG_MEDIA_TUNER_TEA5767=m
969CONFIG_MEDIA_TUNER_MT20XX=m
970CONFIG_MEDIA_TUNER_XC2028=m
971CONFIG_MEDIA_TUNER_XC5000=m
972CONFIG_VIDEO_V4L2=m
973CONFIG_VIDEO_V4L1=m
974CONFIG_VIDEO_CAPTURE_DRIVERS=y
975# CONFIG_VIDEO_ADV_DEBUG is not set
976CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
977# CONFIG_VIDEO_VIVI is not set
978# CONFIG_VIDEO_CPIA is not set
979# CONFIG_VIDEO_CPIA2 is not set
980# CONFIG_VIDEO_SAA5246A is not set
981# CONFIG_VIDEO_SAA5249 is not set
982# CONFIG_TUNER_3036 is not set
983# CONFIG_V4L_USB_DRIVERS is not set
984# CONFIG_SOC_CAMERA is not set
985# CONFIG_VIDEO_PXA27x is not set
986CONFIG_RADIO_ADAPTERS=y
987# CONFIG_USB_DSBR is not set
988# CONFIG_USB_SI470X is not set
989# CONFIG_DAB is not set
990
991#
992# Graphics support
993#
994# CONFIG_VGASTATE is not set
995# CONFIG_VIDEO_OUTPUT_CONTROL is not set
996CONFIG_FB=y
997# CONFIG_FIRMWARE_EDID is not set
998# CONFIG_FB_DDC is not set
999CONFIG_FB_CFB_FILLRECT=y
1000CONFIG_FB_CFB_COPYAREA=y
1001CONFIG_FB_CFB_IMAGEBLIT=y
1002# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1003# CONFIG_FB_SYS_FILLRECT is not set
1004# CONFIG_FB_SYS_COPYAREA is not set
1005# CONFIG_FB_SYS_IMAGEBLIT is not set
1006# CONFIG_FB_FOREIGN_ENDIAN is not set
1007# CONFIG_FB_SYS_FOPS is not set
1008# CONFIG_FB_SVGALIB is not set
1009# CONFIG_FB_MACMODES is not set
1010# CONFIG_FB_BACKLIGHT is not set
1011# CONFIG_FB_MODE_HELPERS is not set
1012# CONFIG_FB_TILEBLITTING is not set
1013
1014#
1015# Frame buffer hardware drivers
1016#
1017# CONFIG_FB_UVESA is not set
1018# CONFIG_FB_S1D13XXX is not set
1019CONFIG_FB_PXA=y
1020# CONFIG_FB_PXA_SMARTPANEL is not set
1021CONFIG_FB_PXA_PARAMETERS=y
1022# CONFIG_FB_MBX is not set
1023# CONFIG_FB_AM200EPD is not set
1024# CONFIG_FB_VIRTUAL is not set
1025CONFIG_BACKLIGHT_LCD_SUPPORT=y
1026# CONFIG_LCD_CLASS_DEVICE is not set
1027CONFIG_BACKLIGHT_CLASS_DEVICE=y
1028# CONFIG_BACKLIGHT_CORGI is not set
1029CONFIG_BACKLIGHT_PWM=y
1030
1031#
1032# Display device support
1033#
1034# CONFIG_DISPLAY_SUPPORT is not set
1035
1036#
1037# Console display driver support
1038#
1039# CONFIG_VGA_CONSOLE is not set
1040CONFIG_DUMMY_CONSOLE=y
1041CONFIG_FRAMEBUFFER_CONSOLE=y
1042# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
1043# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
1044CONFIG_FONTS=y
1045# CONFIG_FONT_8x8 is not set
1046# CONFIG_FONT_8x16 is not set
1047# CONFIG_FONT_6x11 is not set
1048# CONFIG_FONT_7x14 is not set
1049# CONFIG_FONT_PEARL_8x8 is not set
1050# CONFIG_FONT_ACORN_8x8 is not set
1051CONFIG_FONT_MINI_4x6=y
1052# CONFIG_FONT_SUN8x16 is not set
1053# CONFIG_FONT_SUN12x22 is not set
1054# CONFIG_FONT_10x18 is not set
1055# CONFIG_LOGO is not set
1056
1057#
1058# Sound
1059#
1060CONFIG_SOUND=y
1061
1062#
1063# Advanced Linux Sound Architecture
1064#
1065CONFIG_SND=y
1066CONFIG_SND_TIMER=y
1067CONFIG_SND_PCM=y
1068# CONFIG_SND_SEQUENCER is not set
1069CONFIG_SND_OSSEMUL=y
1070CONFIG_SND_MIXER_OSS=y
1071CONFIG_SND_PCM_OSS=y
1072CONFIG_SND_PCM_OSS_PLUGINS=y
1073# CONFIG_SND_DYNAMIC_MINORS is not set
1074CONFIG_SND_SUPPORT_OLD_API=y
1075CONFIG_SND_VERBOSE_PROCFS=y
1076# CONFIG_SND_VERBOSE_PRINTK is not set
1077# CONFIG_SND_DEBUG is not set
1078
1079#
1080# Generic devices
1081#
1082# CONFIG_SND_DUMMY is not set
1083# CONFIG_SND_MTPAV is not set
1084# CONFIG_SND_SERIAL_U16550 is not set
1085# CONFIG_SND_MPU401 is not set
1086
1087#
1088# ALSA ARM devices
1089#
1090# CONFIG_SND_PXA2XX_AC97 is not set
1091
1092#
1093# SPI devices
1094#
1095
1096#
1097# USB devices
1098#
1099# CONFIG_SND_USB_AUDIO is not set
1100# CONFIG_SND_USB_CAIAQ is not set
1101
1102#
1103# System on Chip audio support
1104#
1105CONFIG_SND_SOC=y
1106CONFIG_SND_PXA2XX_SOC=y
1107
1108#
1109# ALSA SoC audio for Freescale SOCs
1110#
1111
1112#
1113# SoC Audio for the Texas Instruments OMAP
1114#
1115
1116#
1117# Open Sound System
1118#
1119# CONFIG_SOUND_PRIME is not set
1120CONFIG_HID_SUPPORT=y
1121CONFIG_HID=y
1122# CONFIG_HID_DEBUG is not set
1123# CONFIG_HIDRAW is not set
1124
1125#
1126# USB Input Devices
1127#
1128# CONFIG_USB_HID is not set
1129
1130#
1131# USB HID Boot Protocol drivers
1132#
1133# CONFIG_USB_KBD is not set
1134# CONFIG_USB_MOUSE is not set
1135CONFIG_USB_SUPPORT=y
1136CONFIG_USB_ARCH_HAS_HCD=y
1137CONFIG_USB_ARCH_HAS_OHCI=y
1138# CONFIG_USB_ARCH_HAS_EHCI is not set
1139CONFIG_USB=y
1140# CONFIG_USB_DEBUG is not set
1141# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
1142
1143#
1144# Miscellaneous USB options
1145#
1146# CONFIG_USB_DEVICEFS is not set
1147# CONFIG_USB_DEVICE_CLASS is not set
1148# CONFIG_USB_DYNAMIC_MINORS is not set
1149# CONFIG_USB_SUSPEND is not set
1150# CONFIG_USB_OTG is not set
1151# CONFIG_USB_OTG_WHITELIST is not set
1152# CONFIG_USB_OTG_BLACKLIST_HUB is not set
1153
1154#
1155# USB Host Controller Drivers
1156#
1157# CONFIG_USB_C67X00_HCD is not set
1158# CONFIG_USB_ISP116X_HCD is not set
1159# CONFIG_USB_ISP1760_HCD is not set
1160CONFIG_USB_OHCI_HCD=y
1161# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1162# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
1163CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1164# CONFIG_USB_SL811_HCD is not set
1165# CONFIG_USB_R8A66597_HCD is not set
1166
1167#
1168# USB Device Class drivers
1169#
1170# CONFIG_USB_ACM is not set
1171# CONFIG_USB_PRINTER is not set
1172
1173#
1174# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1175#
1176
1177#
1178# may also be needed; see USB_STORAGE Help for more information
1179#
1180# CONFIG_USB_LIBUSUAL is not set
1181
1182#
1183# USB Imaging devices
1184#
1185# CONFIG_USB_MDC800 is not set
1186# CONFIG_USB_MON is not set
1187
1188#
1189# USB port drivers
1190#
1191# CONFIG_USB_SERIAL is not set
1192
1193#
1194# USB Miscellaneous drivers
1195#
1196# CONFIG_USB_EMI62 is not set
1197# CONFIG_USB_EMI26 is not set
1198# CONFIG_USB_ADUTUX is not set
1199# CONFIG_USB_AUERSWALD is not set
1200# CONFIG_USB_RIO500 is not set
1201# CONFIG_USB_LEGOTOWER is not set
1202# CONFIG_USB_LCD is not set
1203# CONFIG_USB_BERRY_CHARGE is not set
1204# CONFIG_USB_LED is not set
1205# CONFIG_USB_CYPRESS_CY7C63 is not set
1206# CONFIG_USB_CYTHERM is not set
1207# CONFIG_USB_PHIDGET is not set
1208# CONFIG_USB_IDMOUSE is not set
1209# CONFIG_USB_FTDI_ELAN is not set
1210# CONFIG_USB_APPLEDISPLAY is not set
1211# CONFIG_USB_LD is not set
1212# CONFIG_USB_TRANCEVIBRATOR is not set
1213# CONFIG_USB_IOWARRIOR is not set
1214CONFIG_USB_GADGET=y
1215# CONFIG_USB_GADGET_DEBUG_FILES is not set
1216CONFIG_USB_GADGET_SELECTED=y
1217# CONFIG_USB_GADGET_AMD5536UDC is not set
1218# CONFIG_USB_GADGET_ATMEL_USBA is not set
1219# CONFIG_USB_GADGET_FSL_USB2 is not set
1220# CONFIG_USB_GADGET_NET2280 is not set
1221# CONFIG_USB_GADGET_PXA25X is not set
1222# CONFIG_USB_GADGET_M66592 is not set
1223CONFIG_USB_GADGET_PXA27X=y
1224CONFIG_USB_PXA27X=y
1225# CONFIG_USB_GADGET_GOKU is not set
1226# CONFIG_USB_GADGET_LH7A40X is not set
1227# CONFIG_USB_GADGET_OMAP is not set
1228# CONFIG_USB_GADGET_S3C2410 is not set
1229# CONFIG_USB_GADGET_AT91 is not set
1230# CONFIG_USB_GADGET_DUMMY_HCD is not set
1231# CONFIG_USB_GADGET_DUALSPEED is not set
1232# CONFIG_USB_ZERO is not set
1233CONFIG_USB_ETH=y
1234# CONFIG_USB_ETH_RNDIS is not set
1235# CONFIG_USB_GADGETFS is not set
1236# CONFIG_USB_FILE_STORAGE is not set
1237# CONFIG_USB_G_SERIAL is not set
1238# CONFIG_USB_MIDI_GADGET is not set
1239# CONFIG_USB_G_PRINTER is not set
1240CONFIG_MMC=y
1241# CONFIG_MMC_DEBUG is not set
1242CONFIG_MMC_UNSAFE_RESUME=y
1243
1244#
1245# MMC/SD Card Drivers
1246#
1247CONFIG_MMC_BLOCK=y
1248CONFIG_MMC_BLOCK_BOUNCE=y
1249CONFIG_SDIO_UART=y
1250
1251#
1252# MMC/SD Host Controller Drivers
1253#
1254CONFIG_MMC_PXA=y
1255# CONFIG_MMC_SPI is not set
1256CONFIG_NEW_LEDS=y
1257CONFIG_LEDS_CLASS=y
1258
1259#
1260# LED drivers
1261#
1262# CONFIG_LEDS_GPIO is not set
1263
1264#
1265# LED Triggers
1266#
1267CONFIG_LEDS_TRIGGERS=y
1268CONFIG_LEDS_TRIGGER_TIMER=y
1269CONFIG_LEDS_TRIGGER_HEARTBEAT=y
1270# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
1271CONFIG_RTC_LIB=y
1272CONFIG_RTC_CLASS=y
1273CONFIG_RTC_HCTOSYS=y
1274CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1275# CONFIG_RTC_DEBUG is not set
1276
1277#
1278# RTC interfaces
1279#
1280CONFIG_RTC_INTF_SYSFS=y
1281CONFIG_RTC_INTF_PROC=y
1282CONFIG_RTC_INTF_DEV=y
1283# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1284# CONFIG_RTC_DRV_TEST is not set
1285
1286#
1287# I2C RTC drivers
1288#
1289# CONFIG_RTC_DRV_DS1307 is not set
1290# CONFIG_RTC_DRV_DS1374 is not set
1291# CONFIG_RTC_DRV_DS1672 is not set
1292# CONFIG_RTC_DRV_MAX6900 is not set
1293# CONFIG_RTC_DRV_RS5C372 is not set
1294# CONFIG_RTC_DRV_ISL1208 is not set
1295# CONFIG_RTC_DRV_X1205 is not set
1296# CONFIG_RTC_DRV_PCF8563 is not set
1297# CONFIG_RTC_DRV_PCF8583 is not set
1298# CONFIG_RTC_DRV_M41T80 is not set
1299# CONFIG_RTC_DRV_S35390A is not set
1300
1301#
1302# SPI RTC drivers
1303#
1304# CONFIG_RTC_DRV_MAX6902 is not set
1305# CONFIG_RTC_DRV_R9701 is not set
1306# CONFIG_RTC_DRV_RS5C348 is not set
1307
1308#
1309# Platform RTC drivers
1310#
1311# CONFIG_RTC_DRV_CMOS is not set
1312# CONFIG_RTC_DRV_DS1511 is not set
1313# CONFIG_RTC_DRV_DS1553 is not set
1314# CONFIG_RTC_DRV_DS1742 is not set
1315# CONFIG_RTC_DRV_STK17TA8 is not set
1316# CONFIG_RTC_DRV_M48T86 is not set
1317# CONFIG_RTC_DRV_M48T59 is not set
1318# CONFIG_RTC_DRV_V3020 is not set
1319
1320#
1321# on-CPU RTC drivers
1322#
1323CONFIG_RTC_DRV_SA1100=m
1324# CONFIG_UIO is not set
1325
1326#
1327# File systems
1328#
1329CONFIG_EXT2_FS=y
1330# CONFIG_EXT2_FS_XATTR is not set
1331# CONFIG_EXT2_FS_XIP is not set
1332CONFIG_EXT3_FS=m
1333CONFIG_EXT3_FS_XATTR=y
1334# CONFIG_EXT3_FS_POSIX_ACL is not set
1335# CONFIG_EXT3_FS_SECURITY is not set
1336# CONFIG_EXT4DEV_FS is not set
1337CONFIG_JBD=m
1338CONFIG_FS_MBCACHE=y
1339CONFIG_REISERFS_FS=m
1340# CONFIG_REISERFS_CHECK is not set
1341# CONFIG_REISERFS_PROC_INFO is not set
1342CONFIG_REISERFS_FS_XATTR=y
1343CONFIG_REISERFS_FS_POSIX_ACL=y
1344CONFIG_REISERFS_FS_SECURITY=y
1345# CONFIG_JFS_FS is not set
1346CONFIG_FS_POSIX_ACL=y
1347CONFIG_XFS_FS=m
1348# CONFIG_XFS_QUOTA is not set
1349# CONFIG_XFS_POSIX_ACL is not set
1350# CONFIG_XFS_RT is not set
1351# CONFIG_XFS_DEBUG is not set
1352# CONFIG_OCFS2_FS is not set
1353CONFIG_DNOTIFY=y
1354CONFIG_INOTIFY=y
1355CONFIG_INOTIFY_USER=y
1356# CONFIG_QUOTA is not set
1357CONFIG_AUTOFS_FS=y
1358CONFIG_AUTOFS4_FS=y
1359CONFIG_FUSE_FS=m
1360
1361#
1362# CD-ROM/DVD Filesystems
1363#
1364CONFIG_ISO9660_FS=m
1365CONFIG_JOLIET=y
1366CONFIG_ZISOFS=y
1367# CONFIG_UDF_FS is not set
1368
1369#
1370# DOS/FAT/NT Filesystems
1371#
1372CONFIG_FAT_FS=m
1373CONFIG_MSDOS_FS=m
1374CONFIG_VFAT_FS=m
1375CONFIG_FAT_DEFAULT_CODEPAGE=437
1376CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1377# CONFIG_NTFS_FS is not set
1378
1379#
1380# Pseudo filesystems
1381#
1382CONFIG_PROC_FS=y
1383CONFIG_PROC_SYSCTL=y
1384CONFIG_SYSFS=y
1385CONFIG_TMPFS=y
1386# CONFIG_TMPFS_POSIX_ACL is not set
1387# CONFIG_HUGETLB_PAGE is not set
1388# CONFIG_CONFIGFS_FS is not set
1389
1390#
1391# Miscellaneous filesystems
1392#
1393# CONFIG_ADFS_FS is not set
1394# CONFIG_AFFS_FS is not set
1395# CONFIG_HFS_FS is not set
1396# CONFIG_HFSPLUS_FS is not set
1397# CONFIG_BEFS_FS is not set
1398# CONFIG_BFS_FS is not set
1399# CONFIG_EFS_FS is not set
1400# CONFIG_JFFS2_FS is not set
1401CONFIG_CRAMFS=m
1402# CONFIG_VXFS_FS is not set
1403# CONFIG_MINIX_FS is not set
1404# CONFIG_HPFS_FS is not set
1405# CONFIG_QNX4FS_FS is not set
1406# CONFIG_ROMFS_FS is not set
1407# CONFIG_SYSV_FS is not set
1408# CONFIG_UFS_FS is not set
1409CONFIG_NETWORK_FILESYSTEMS=y
1410CONFIG_NFS_FS=y
1411CONFIG_NFS_V3=y
1412CONFIG_NFS_V3_ACL=y
1413# CONFIG_NFS_V4 is not set
1414CONFIG_NFSD=m
1415CONFIG_NFSD_V2_ACL=y
1416CONFIG_NFSD_V3=y
1417CONFIG_NFSD_V3_ACL=y
1418# CONFIG_NFSD_V4 is not set
1419# CONFIG_ROOT_NFS is not set
1420CONFIG_LOCKD=y
1421CONFIG_LOCKD_V4=y
1422CONFIG_EXPORTFS=m
1423CONFIG_NFS_ACL_SUPPORT=y
1424CONFIG_NFS_COMMON=y
1425CONFIG_SUNRPC=y
1426# CONFIG_SUNRPC_BIND34 is not set
1427# CONFIG_RPCSEC_GSS_KRB5 is not set
1428# CONFIG_RPCSEC_GSS_SPKM3 is not set
1429CONFIG_SMB_FS=m
1430# CONFIG_SMB_NLS_DEFAULT is not set
1431CONFIG_CIFS=m
1432CONFIG_CIFS_STATS=y
1433# CONFIG_CIFS_STATS2 is not set
1434CONFIG_CIFS_WEAK_PW_HASH=y
1435CONFIG_CIFS_XATTR=y
1436CONFIG_CIFS_POSIX=y
1437# CONFIG_CIFS_DEBUG2 is not set
1438# CONFIG_CIFS_EXPERIMENTAL is not set
1439# CONFIG_NCP_FS is not set
1440# CONFIG_CODA_FS is not set
1441# CONFIG_AFS_FS is not set
1442
1443#
1444# Partition Types
1445#
1446# CONFIG_PARTITION_ADVANCED is not set
1447CONFIG_MSDOS_PARTITION=y
1448CONFIG_NLS=y
1449CONFIG_NLS_DEFAULT="iso8859-1"
1450CONFIG_NLS_CODEPAGE_437=m
1451CONFIG_NLS_CODEPAGE_737=m
1452CONFIG_NLS_CODEPAGE_775=m
1453CONFIG_NLS_CODEPAGE_850=m
1454CONFIG_NLS_CODEPAGE_852=m
1455CONFIG_NLS_CODEPAGE_855=m
1456CONFIG_NLS_CODEPAGE_857=m
1457CONFIG_NLS_CODEPAGE_860=m
1458CONFIG_NLS_CODEPAGE_861=m
1459CONFIG_NLS_CODEPAGE_862=m
1460CONFIG_NLS_CODEPAGE_863=m
1461CONFIG_NLS_CODEPAGE_864=m
1462CONFIG_NLS_CODEPAGE_865=m
1463CONFIG_NLS_CODEPAGE_866=m
1464CONFIG_NLS_CODEPAGE_869=m
1465CONFIG_NLS_CODEPAGE_936=m
1466CONFIG_NLS_CODEPAGE_950=m
1467CONFIG_NLS_CODEPAGE_932=m
1468CONFIG_NLS_CODEPAGE_949=m
1469CONFIG_NLS_CODEPAGE_874=m
1470CONFIG_NLS_ISO8859_8=m
1471CONFIG_NLS_CODEPAGE_1250=m
1472CONFIG_NLS_CODEPAGE_1251=m
1473CONFIG_NLS_ASCII=m
1474CONFIG_NLS_ISO8859_1=m
1475CONFIG_NLS_ISO8859_2=m
1476CONFIG_NLS_ISO8859_3=m
1477CONFIG_NLS_ISO8859_4=m
1478CONFIG_NLS_ISO8859_5=m
1479CONFIG_NLS_ISO8859_6=m
1480CONFIG_NLS_ISO8859_7=m
1481CONFIG_NLS_ISO8859_9=m
1482CONFIG_NLS_ISO8859_13=m
1483CONFIG_NLS_ISO8859_14=m
1484CONFIG_NLS_ISO8859_15=m
1485CONFIG_NLS_KOI8_R=m
1486CONFIG_NLS_KOI8_U=m
1487CONFIG_NLS_UTF8=m
1488# CONFIG_DLM is not set
1489
1490#
1491# Kernel hacking
1492#
1493# CONFIG_PRINTK_TIME is not set
1494CONFIG_ENABLE_WARN_DEPRECATED=y
1495# CONFIG_ENABLE_MUST_CHECK is not set
1496CONFIG_FRAME_WARN=1024
1497# CONFIG_MAGIC_SYSRQ is not set
1498# CONFIG_UNUSED_SYMBOLS is not set
1499# CONFIG_DEBUG_FS is not set
1500# CONFIG_HEADERS_CHECK is not set
1501# CONFIG_DEBUG_KERNEL is not set
1502# CONFIG_DEBUG_BUGVERBOSE is not set
1503CONFIG_FRAME_POINTER=y
1504# CONFIG_SAMPLES is not set
1505# CONFIG_DEBUG_USER is not set
1506
1507#
1508# Security options
1509#
1510# CONFIG_KEYS is not set
1511# CONFIG_SECURITY is not set
1512# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1513CONFIG_CRYPTO=y
1514
1515#
1516# Crypto core or helper
1517#
1518CONFIG_CRYPTO_ALGAPI=m
1519CONFIG_CRYPTO_AEAD=m
1520CONFIG_CRYPTO_BLKCIPHER=m
1521CONFIG_CRYPTO_HASH=m
1522CONFIG_CRYPTO_MANAGER=m
1523CONFIG_CRYPTO_GF128MUL=m
1524CONFIG_CRYPTO_NULL=m
1525CONFIG_CRYPTO_CRYPTD=m
1526CONFIG_CRYPTO_AUTHENC=m
1527CONFIG_CRYPTO_TEST=m
1528
1529#
1530# Authenticated Encryption with Associated Data
1531#
1532# CONFIG_CRYPTO_CCM is not set
1533# CONFIG_CRYPTO_GCM is not set
1534# CONFIG_CRYPTO_SEQIV is not set
1535
1536#
1537# Block modes
1538#
1539CONFIG_CRYPTO_CBC=m
1540# CONFIG_CRYPTO_CTR is not set
1541# CONFIG_CRYPTO_CTS is not set
1542CONFIG_CRYPTO_ECB=m
1543CONFIG_CRYPTO_LRW=m
1544CONFIG_CRYPTO_PCBC=m
1545CONFIG_CRYPTO_XTS=m
1546
1547#
1548# Hash modes
1549#
1550CONFIG_CRYPTO_HMAC=m
1551CONFIG_CRYPTO_XCBC=m
1552
1553#
1554# Digest
1555#
1556CONFIG_CRYPTO_CRC32C=m
1557CONFIG_CRYPTO_MD4=m
1558CONFIG_CRYPTO_MD5=m
1559CONFIG_CRYPTO_MICHAEL_MIC=m
1560CONFIG_CRYPTO_SHA1=m
1561CONFIG_CRYPTO_SHA256=m
1562CONFIG_CRYPTO_SHA512=m
1563CONFIG_CRYPTO_TGR192=m
1564# CONFIG_CRYPTO_WP512 is not set
1565
1566#
1567# Ciphers
1568#
1569CONFIG_CRYPTO_AES=m
1570# CONFIG_CRYPTO_ANUBIS is not set
1571CONFIG_CRYPTO_ARC4=m
1572CONFIG_CRYPTO_BLOWFISH=m
1573# CONFIG_CRYPTO_CAMELLIA is not set
1574CONFIG_CRYPTO_CAST5=m
1575CONFIG_CRYPTO_CAST6=m
1576CONFIG_CRYPTO_DES=m
1577CONFIG_CRYPTO_FCRYPT=m
1578CONFIG_CRYPTO_KHAZAD=m
1579# CONFIG_CRYPTO_SALSA20 is not set
1580CONFIG_CRYPTO_SEED=m
1581CONFIG_CRYPTO_SERPENT=m
1582CONFIG_CRYPTO_TEA=m
1583CONFIG_CRYPTO_TWOFISH=m
1584CONFIG_CRYPTO_TWOFISH_COMMON=m
1585
1586#
1587# Compression
1588#
1589CONFIG_CRYPTO_DEFLATE=m
1590# CONFIG_CRYPTO_LZO is not set
1591CONFIG_CRYPTO_HW=y
1592
1593#
1594# Library routines
1595#
1596CONFIG_BITREVERSE=y
1597# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1598# CONFIG_GENERIC_FIND_NEXT_BIT is not set
1599CONFIG_CRC_CCITT=m
1600CONFIG_CRC16=m
1601# CONFIG_CRC_ITU_T is not set
1602CONFIG_CRC32=y
1603# CONFIG_CRC7 is not set
1604CONFIG_LIBCRC32C=m
1605CONFIG_ZLIB_INFLATE=m
1606CONFIG_ZLIB_DEFLATE=m
1607CONFIG_TEXTSEARCH=y
1608CONFIG_TEXTSEARCH_KMP=m
1609CONFIG_TEXTSEARCH_BM=m
1610CONFIG_TEXTSEARCH_FSM=m
1611CONFIG_PLIST=y
1612CONFIG_HAS_IOMEM=y
1613CONFIG_HAS_IOPORT=y
1614CONFIG_HAS_DMA=y
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index eb9092ca8008..1d296fc8494e 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o
28obj-$(CONFIG_ATAGS_PROC) += atags.o 28obj-$(CONFIG_ATAGS_PROC) += atags.o
29obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o 29obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
30obj-$(CONFIG_ARM_THUMBEE) += thumbee.o 30obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
31obj-$(CONFIG_KGDB) += kgdb.o
31 32
32obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 33obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
33AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 34AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 8bfd299bfe77..f5cfdabcb87d 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -783,7 +783,7 @@ static void ecard_proc_init(void)
783 783
784#define ec_set_resource(ec,nr,st,sz) \ 784#define ec_set_resource(ec,nr,st,sz) \
785 do { \ 785 do { \
786 (ec)->resource[nr].name = ec->dev.bus_id; \ 786 (ec)->resource[nr].name = dev_name(&ec->dev); \
787 (ec)->resource[nr].start = st; \ 787 (ec)->resource[nr].start = st; \
788 (ec)->resource[nr].end = (st) + (sz) - 1; \ 788 (ec)->resource[nr].end = (st) + (sz) - 1; \
789 (ec)->resource[nr].flags = IORESOURCE_MEM; \ 789 (ec)->resource[nr].flags = IORESOURCE_MEM; \
@@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
853 for (i = 0; i < ECARD_NUM_RESOURCES; i++) { 853 for (i = 0; i < ECARD_NUM_RESOURCES; i++) {
854 if (ec->resource[i].flags && 854 if (ec->resource[i].flags &&
855 request_resource(&iomem_resource, &ec->resource[i])) { 855 request_resource(&iomem_resource, &ec->resource[i])) {
856 printk(KERN_ERR "%s: resource(s) not available\n", 856 dev_err(&ec->dev, "resource(s) not available\n");
857 ec->dev.bus_id);
858 ec->resource[i].end -= ec->resource[i].start; 857 ec->resource[i].end -= ec->resource[i].start;
859 ec->resource[i].start = 0; 858 ec->resource[i].start = 0;
860 ec->resource[i].flags = 0; 859 ec->resource[i].flags = 0;
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c
new file mode 100644
index 000000000000..aaffaecffcd1
--- /dev/null
+++ b/arch/arm/kernel/kgdb.c
@@ -0,0 +1,201 @@
1/*
2 * arch/arm/kernel/kgdb.c
3 *
4 * ARM KGDB support
5 *
6 * Copyright (c) 2002-2004 MontaVista Software, Inc
7 * Copyright (c) 2008 Wind River Systems, Inc.
8 *
9 * Authors: George Davis <davis_g@mvista.com>
10 * Deepak Saxena <dsaxena@plexity.net>
11 */
12#include <linux/kgdb.h>
13#include <asm/traps.h>
14
15/* Make a local copy of the registers passed into the handler (bletch) */
16void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
17{
18 int regno;
19
20 /* Initialize all to zero. */
21 for (regno = 0; regno < GDB_MAX_REGS; regno++)
22 gdb_regs[regno] = 0;
23
24 gdb_regs[_R0] = kernel_regs->ARM_r0;
25 gdb_regs[_R1] = kernel_regs->ARM_r1;
26 gdb_regs[_R2] = kernel_regs->ARM_r2;
27 gdb_regs[_R3] = kernel_regs->ARM_r3;
28 gdb_regs[_R4] = kernel_regs->ARM_r4;
29 gdb_regs[_R5] = kernel_regs->ARM_r5;
30 gdb_regs[_R6] = kernel_regs->ARM_r6;
31 gdb_regs[_R7] = kernel_regs->ARM_r7;
32 gdb_regs[_R8] = kernel_regs->ARM_r8;
33 gdb_regs[_R9] = kernel_regs->ARM_r9;
34 gdb_regs[_R10] = kernel_regs->ARM_r10;
35 gdb_regs[_FP] = kernel_regs->ARM_fp;
36 gdb_regs[_IP] = kernel_regs->ARM_ip;
37 gdb_regs[_SPT] = kernel_regs->ARM_sp;
38 gdb_regs[_LR] = kernel_regs->ARM_lr;
39 gdb_regs[_PC] = kernel_regs->ARM_pc;
40 gdb_regs[_CPSR] = kernel_regs->ARM_cpsr;
41}
42
43/* Copy local gdb registers back to kgdb regs, for later copy to kernel */
44void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *kernel_regs)
45{
46 kernel_regs->ARM_r0 = gdb_regs[_R0];
47 kernel_regs->ARM_r1 = gdb_regs[_R1];
48 kernel_regs->ARM_r2 = gdb_regs[_R2];
49 kernel_regs->ARM_r3 = gdb_regs[_R3];
50 kernel_regs->ARM_r4 = gdb_regs[_R4];
51 kernel_regs->ARM_r5 = gdb_regs[_R5];
52 kernel_regs->ARM_r6 = gdb_regs[_R6];
53 kernel_regs->ARM_r7 = gdb_regs[_R7];
54 kernel_regs->ARM_r8 = gdb_regs[_R8];
55 kernel_regs->ARM_r9 = gdb_regs[_R9];
56 kernel_regs->ARM_r10 = gdb_regs[_R10];
57 kernel_regs->ARM_fp = gdb_regs[_FP];
58 kernel_regs->ARM_ip = gdb_regs[_IP];
59 kernel_regs->ARM_sp = gdb_regs[_SPT];
60 kernel_regs->ARM_lr = gdb_regs[_LR];
61 kernel_regs->ARM_pc = gdb_regs[_PC];
62 kernel_regs->ARM_cpsr = gdb_regs[_CPSR];
63}
64
65void
66sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
67{
68 struct pt_regs *thread_regs;
69 int regno;
70
71 /* Just making sure... */
72 if (task == NULL)
73 return;
74
75 /* Initialize to zero */
76 for (regno = 0; regno < GDB_MAX_REGS; regno++)
77 gdb_regs[regno] = 0;
78
79 /* Otherwise, we have only some registers from switch_to() */
80 thread_regs = task_pt_regs(task);
81 gdb_regs[_R0] = thread_regs->ARM_r0;
82 gdb_regs[_R1] = thread_regs->ARM_r1;
83 gdb_regs[_R2] = thread_regs->ARM_r2;
84 gdb_regs[_R3] = thread_regs->ARM_r3;
85 gdb_regs[_R4] = thread_regs->ARM_r4;
86 gdb_regs[_R5] = thread_regs->ARM_r5;
87 gdb_regs[_R6] = thread_regs->ARM_r6;
88 gdb_regs[_R7] = thread_regs->ARM_r7;
89 gdb_regs[_R8] = thread_regs->ARM_r8;
90 gdb_regs[_R9] = thread_regs->ARM_r9;
91 gdb_regs[_R10] = thread_regs->ARM_r10;
92 gdb_regs[_FP] = thread_regs->ARM_fp;
93 gdb_regs[_IP] = thread_regs->ARM_ip;
94 gdb_regs[_SPT] = thread_regs->ARM_sp;
95 gdb_regs[_LR] = thread_regs->ARM_lr;
96 gdb_regs[_PC] = thread_regs->ARM_pc;
97 gdb_regs[_CPSR] = thread_regs->ARM_cpsr;
98}
99
100static int compiled_break;
101
102int kgdb_arch_handle_exception(int exception_vector, int signo,
103 int err_code, char *remcom_in_buffer,
104 char *remcom_out_buffer,
105 struct pt_regs *linux_regs)
106{
107 unsigned long addr;
108 char *ptr;
109
110 switch (remcom_in_buffer[0]) {
111 case 'D':
112 case 'k':
113 case 'c':
114 kgdb_contthread = NULL;
115
116 /*
117 * Try to read optional parameter, pc unchanged if no parm.
118 * If this was a compiled breakpoint, we need to move
119 * to the next instruction or we will just breakpoint
120 * over and over again.
121 */
122 ptr = &remcom_in_buffer[1];
123 if (kgdb_hex2long(&ptr, &addr))
124 linux_regs->ARM_pc = addr;
125 else if (compiled_break == 1)
126 linux_regs->ARM_pc += 4;
127
128 compiled_break = 0;
129
130 return 0;
131 }
132
133 return -1;
134}
135
136static int kgdb_brk_fn(struct pt_regs *regs, unsigned int instr)
137{
138 kgdb_handle_exception(1, SIGTRAP, 0, regs);
139
140 return 0;
141}
142
143static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int instr)
144{
145 compiled_break = 1;
146 kgdb_handle_exception(1, SIGTRAP, 0, regs);
147
148 return 0;
149}
150
151static struct undef_hook kgdb_brkpt_hook = {
152 .instr_mask = 0xffffffff,
153 .instr_val = KGDB_BREAKINST,
154 .fn = kgdb_brk_fn
155};
156
157static struct undef_hook kgdb_compiled_brkpt_hook = {
158 .instr_mask = 0xffffffff,
159 .instr_val = KGDB_COMPILED_BREAK,
160 .fn = kgdb_compiled_brk_fn
161};
162
163/**
164 * kgdb_arch_init - Perform any architecture specific initalization.
165 *
166 * This function will handle the initalization of any architecture
167 * specific callbacks.
168 */
169int kgdb_arch_init(void)
170{
171 register_undef_hook(&kgdb_brkpt_hook);
172 register_undef_hook(&kgdb_compiled_brkpt_hook);
173
174 return 0;
175}
176
177/**
178 * kgdb_arch_exit - Perform any architecture specific uninitalization.
179 *
180 * This function will handle the uninitalization of any architecture
181 * specific callbacks, for dynamic registration and unregistration.
182 */
183void kgdb_arch_exit(void)
184{
185 unregister_undef_hook(&kgdb_brkpt_hook);
186 unregister_undef_hook(&kgdb_compiled_brkpt_hook);
187}
188
189/*
190 * Register our undef instruction hooks with ARM undef core.
191 * We regsiter a hook specifically looking for the KGB break inst
192 * and we handle the normal undef case within the do_undefinstr
193 * handler.
194 */
195struct kgdb_arch arch_kgdb_ops = {
196#ifndef __ARMEB__
197 .gdb_bpt_instr = {0xfe, 0xde, 0xff, 0xe7}
198#else /* ! __ARMEB__ */
199 .gdb_bpt_instr = {0xe7, 0xff, 0xde, 0xfe}
200#endif
201};
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 79b7e5cf5416..a68259a0cccd 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -13,6 +13,7 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/moduleloader.h> 14#include <linux/moduleloader.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/mm.h>
16#include <linux/elf.h> 17#include <linux/elf.h>
17#include <linux/vmalloc.h> 18#include <linux/vmalloc.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 199b3680118b..89bfded70a1f 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -162,7 +162,7 @@ void cpu_idle(void)
162 if (!idle) 162 if (!idle)
163 idle = default_idle; 163 idle = default_idle;
164 leds_event(led_idle_start); 164 leds_event(led_idle_start);
165 tick_nohz_stop_sched_tick(); 165 tick_nohz_stop_sched_tick(1);
166 while (!need_resched()) 166 while (!need_resched())
167 idle(); 167 idle();
168 leds_event(led_idle_end); 168 leds_event(led_idle_end);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index b7b0720bc1bb..38f0e7940a13 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -36,6 +36,7 @@
36#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
37#include <asm/mach/irq.h> 37#include <asm/mach/irq.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39#include <asm/traps.h>
39 40
40#include "compat.h" 41#include "compat.h"
41#include "atags.h" 42#include "atags.h"
@@ -853,6 +854,7 @@ void __init setup_arch(char **cmdline_p)
853 conswitchp = &dummy_con; 854 conswitchp = &dummy_con;
854#endif 855#endif
855#endif 856#endif
857 early_trap_init();
856} 858}
857 859
858 860
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index cc5145b28e7f..368d171754cf 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -130,7 +130,9 @@ static const struct leds_evt_name evt_names[] = {
130 { "red", led_red_on, led_red_off }, 130 { "red", led_red_on, led_red_off },
131}; 131};
132 132
133static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size) 133static ssize_t leds_store(struct sys_device *dev,
134 struct sysdev_attribute *attr,
135 const char *buf, size_t size)
134{ 136{
135 int ret = -EINVAL, len = strcspn(buf, " "); 137 int ret = -EINVAL, len = strcspn(buf, " ");
136 138
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 5595fdd75e82..7277aef83098 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -708,6 +708,11 @@ EXPORT_SYMBOL(abort);
708 708
709void __init trap_init(void) 709void __init trap_init(void)
710{ 710{
711 return;
712}
713
714void __init early_trap_init(void)
715{
711 unsigned long vectors = CONFIG_VECTORS_BASE; 716 unsigned long vectors = CONFIG_VECTORS_BASE;
712 extern char __stubs_start[], __stubs_end[]; 717 extern char __stubs_start[], __stubs_end[];
713 extern char __vectors_start[], __vectors_end[]; 718 extern char __vectors_start[], __vectors_end[];
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 62e653a3ea1a..5a1588cf8242 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -393,9 +393,7 @@ static int impd1_probe(struct lm_device *dev)
393 if (!d) 393 if (!d)
394 continue; 394 continue;
395 395
396 snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), 396 dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
397 "lm%x:%5.5lx", dev->id, idev->offset >> 12);
398
399 d->dev.parent = &dev->dev; 397 d->dev.parent = &dev->dev;
400 d->res.start = dev->resource.start + idev->offset; 398 d->res.start = dev->resource.start + idev->offset;
401 d->res.end = d->res.start + SZ_4K - 1; 399 d->res.end = d->res.start + SZ_4K - 1;
@@ -407,8 +405,7 @@ static int impd1_probe(struct lm_device *dev)
407 405
408 ret = amba_device_register(d, &dev->resource); 406 ret = amba_device_register(d, &dev->resource);
409 if (ret) { 407 if (ret) {
410 printk("unable to register device %s: %d\n", 408 dev_err(&d->dev, "unable to register device: %d\n");
411 d->dev.bus_id, ret);
412 kfree(d); 409 kfree(d);
413 } 410 }
414 } 411 }
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c
index 622cdc4212dd..f939c5091405 100644
--- a/arch/arm/mach-integrator/lm.c
+++ b/arch/arm/mach-integrator/lm.c
@@ -81,8 +81,10 @@ int lm_device_register(struct lm_device *dev)
81 dev->dev.release = lm_device_release; 81 dev->dev.release = lm_device_release;
82 dev->dev.bus = &lm_bustype; 82 dev->dev.bus = &lm_bustype;
83 83
84 snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "lm%d", dev->id); 84 ret = dev_set_name(&dev->dev, "lm%d", dev->id);
85 dev->resource.name = dev->dev.bus_id; 85 if (ret)
86 return ret;
87 dev->resource.name = dev_name(&dev->dev);
86 88
87 ret = request_resource(&iomem_resource, &dev->resource); 89 ret = request_resource(&iomem_resource, &dev->resource);
88 if (ret == 0) { 90 if (ret == 0) {
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 2741063bf361..28f164ea4726 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -17,6 +17,7 @@
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/f75375s.h> 19#include <linux/f75375s.h>
20#include <linux/leds-pca9532.h>
20#include <linux/delay.h> 21#include <linux/delay.h>
21#include <linux/kernel.h> 22#include <linux/kernel.h>
22#include <linux/pci.h> 23#include <linux/pci.h>
@@ -206,6 +207,53 @@ static struct f75375s_platform_data n2100_f75375s = {
206 .pwm_enable = { 0, 0 }, 207 .pwm_enable = { 0, 0 },
207}; 208};
208 209
210static struct pca9532_platform_data n2100_leds = {
211 .leds = {
212 { .name = "n2100:red:satafail0",
213 .state = PCA9532_OFF,
214 .type = PCA9532_TYPE_LED,
215 },
216 { .name = "n2100:red:satafail1",
217 .state = PCA9532_OFF,
218 .type = PCA9532_TYPE_LED,
219 },
220 { .name = "n2100:blue:usb",
221 .state = PCA9532_OFF,
222 .type = PCA9532_TYPE_LED,
223 },
224 { .type = PCA9532_TYPE_NONE },
225
226 { .type = PCA9532_TYPE_NONE },
227 { .type = PCA9532_TYPE_NONE },
228 { .type = PCA9532_TYPE_NONE },
229 { .name = "n2100:red:usb",
230 .state = PCA9532_OFF,
231 .type = PCA9532_TYPE_LED,
232 },
233
234 { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */
235 { .type = PCA9532_TYPE_NONE }, /* reset gpio */
236 { .type = PCA9532_TYPE_NONE },
237 { .type = PCA9532_TYPE_NONE },
238
239 { .type = PCA9532_TYPE_NONE },
240 { .name = "n2100:orange:system",
241 .state = PCA9532_OFF,
242 .type = PCA9532_TYPE_LED,
243 },
244 { .name = "n2100:red:system",
245 .state = PCA9532_OFF,
246 .type = PCA9532_TYPE_LED,
247 },
248 { .name = "N2100 beeper" ,
249 .state = PCA9532_OFF,
250 .type = PCA9532_TYPE_N2100_BEEP,
251 },
252 },
253 .psc = { 0, 0 },
254 .pwm = { 0, 0 },
255};
256
209static struct i2c_board_info __initdata n2100_i2c_devices[] = { 257static struct i2c_board_info __initdata n2100_i2c_devices[] = {
210 { 258 {
211 I2C_BOARD_INFO("rs5c372b", 0x32), 259 I2C_BOARD_INFO("rs5c372b", 0x32),
@@ -214,6 +262,10 @@ static struct i2c_board_info __initdata n2100_i2c_devices[] = {
214 I2C_BOARD_INFO("f75375", 0x2e), 262 I2C_BOARD_INFO("f75375", 0x2e),
215 .platform_data = &n2100_f75375s, 263 .platform_data = &n2100_f75375s,
216 }, 264 },
265 {
266 I2C_BOARD_INFO("pca9532", 0x60),
267 .platform_data = &n2100_leds,
268 },
217}; 269};
218 270
219/* 271/*
diff --git a/arch/arm/mach-ns9xxx/clock.c b/arch/arm/mach-ns9xxx/clock.c
index f8639161068f..44ed20d4a388 100644
--- a/arch/arm/mach-ns9xxx/clock.c
+++ b/arch/arm/mach-ns9xxx/clock.c
@@ -14,8 +14,8 @@
14#include <linux/clk.h> 14#include <linux/clk.h>
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/semaphore.h>
17 18
18#include <asm/semaphore.h>
19#include "clock.h" 19#include "clock.h"
20 20
21static LIST_HEAD(clocks); 21static LIST_HEAD(clocks);
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 914bb33dab92..e8ee7ec9ff6d 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -16,18 +16,24 @@ config CPU_PXA310
16config CPU_PXA320 16config CPU_PXA320
17 bool "PXA320 (codename Monahans-P)" 17 bool "PXA320 (codename Monahans-P)"
18 18
19config CPU_PXA930
20 bool "PXA930 (codename Tavor-P)"
21
19endmenu 22endmenu
20 23
21endif 24endif
22 25
23menu "Select target boards"
24
25config ARCH_GUMSTIX 26config ARCH_GUMSTIX
26 bool "Gumstix XScale boards" 27 bool "Gumstix XScale boards"
27 help 28 help
28 Say Y here if you intend to run this kernel on a 29 Say Y here if you intend to run this kernel on a
29 Gumstix Full Function Minature Computer. 30 Gumstix Full Function Minature Computer.
30 31
32config MACH_GUMSTIX_F
33 bool "Basix, Connex, ws-200ax, ws-400ax systems"
34 depends on ARCH_GUMSTIX
35 select PXA25x
36
31config ARCH_LUBBOCK 37config ARCH_LUBBOCK
32 bool "Intel DBPXA250 Development Platform" 38 bool "Intel DBPXA250 Development Platform"
33 select PXA25x 39 select PXA25x
@@ -58,6 +64,57 @@ config PXA_SHARPSL
58 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) 64 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
59 handheld computer. 65 handheld computer.
60 66
67config MACH_POODLE
68 bool "Enable Sharp SL-5600 (Poodle) Support"
69 depends on PXA_SHARPSL
70 select PXA25x
71 select SHARP_LOCOMO
72 select PXA_SSP
73
74config MACH_CORGI
75 bool "Enable Sharp SL-C700 (Corgi) Support"
76 depends on PXA_SHARPSL
77 select PXA25x
78 select PXA_SHARP_C7xx
79
80config MACH_SHEPHERD
81 bool "Enable Sharp SL-C750 (Shepherd) Support"
82 depends on PXA_SHARPSL
83 select PXA25x
84 select PXA_SHARP_C7xx
85
86config MACH_HUSKY
87 bool "Enable Sharp SL-C760 (Husky) Support"
88 depends on PXA_SHARPSL
89 select PXA25x
90 select PXA_SHARP_C7xx
91
92config MACH_AKITA
93 bool "Enable Sharp SL-1000 (Akita) Support"
94 depends on PXA_SHARPSL
95 select PXA27x
96 select PXA_SHARP_Cxx00
97 select MACH_SPITZ
98 select I2C
99 select I2C_PXA
100
101config MACH_SPITZ
102 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
103 depends on PXA_SHARPSL
104 select PXA27x
105 select PXA_SHARP_Cxx00
106
107config MACH_BORZOI
108 bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support"
109 depends on PXA_SHARPSL
110 select PXA27x
111 select PXA_SHARP_Cxx00
112
113config MACH_TOSA
114 bool "Enable Sharp SL-6000x (Tosa) Support"
115 depends on PXA_SHARPSL
116 select PXA25x
117
61config ARCH_PXA_ESERIES 118config ARCH_PXA_ESERIES
62 bool "PXA based Toshiba e-series PDAs" 119 bool "PXA based Toshiba e-series PDAs"
63 select PXA25x 120 select PXA25x
@@ -70,10 +127,19 @@ config MACH_E330
70 Say Y here if you intend to run this kernel on a Toshiba 127 Say Y here if you intend to run this kernel on a Toshiba
71 e330 family PDA. 128 e330 family PDA.
72 129
130config MACH_E350
131 bool "Toshiba e350"
132 default y
133 depends on ARCH_PXA_ESERIES
134 help
135 Say Y here if you intend to run this kernel on a Toshiba
136 e350 family PDA.
137
73config MACH_E740 138config MACH_E740
74 bool "Toshiba e740" 139 bool "Toshiba e740"
75 default y 140 default y
76 depends on ARCH_PXA_ESERIES 141 depends on ARCH_PXA_ESERIES
142 select FB_W100
77 help 143 help
78 Say Y here if you intend to run this kernel on a Toshiba 144 Say Y here if you intend to run this kernel on a Toshiba
79 e740 family PDA. 145 e740 family PDA.
@@ -82,6 +148,7 @@ config MACH_E750
82 bool "Toshiba e750" 148 bool "Toshiba e750"
83 default y 149 default y
84 depends on ARCH_PXA_ESERIES 150 depends on ARCH_PXA_ESERIES
151 select FB_W100
85 help 152 help
86 Say Y here if you intend to run this kernel on a Toshiba 153 Say Y here if you intend to run this kernel on a Toshiba
87 e750 family PDA. 154 e750 family PDA.
@@ -98,6 +165,7 @@ config MACH_E800
98 bool "Toshiba e800" 165 bool "Toshiba e800"
99 default y 166 default y
100 depends on ARCH_PXA_ESERIES 167 depends on ARCH_PXA_ESERIES
168 select FB_W100
101 help 169 help
102 Say Y here if you intend to run this kernel on a Toshiba 170 Say Y here if you intend to run this kernel on a Toshiba
103 e800 family PDA. 171 e800 family PDA.
@@ -106,6 +174,10 @@ config MACH_TRIZEPS4
106 bool "Keith und Koep Trizeps4 DIMM-Module" 174 bool "Keith und Koep Trizeps4 DIMM-Module"
107 select PXA27x 175 select PXA27x
108 176
177config MACH_TRIZEPS4_CONXS
178 bool "ConXS Eval Board"
179 depends on MACH_TRIZEPS4
180
109config MACH_EM_X270 181config MACH_EM_X270
110 bool "CompuLab EM-x270 platform" 182 bool "CompuLab EM-x270 platform"
111 select PXA27x 183 select PXA27x
@@ -115,7 +187,7 @@ config MACH_COLIBRI
115 select PXA27x 187 select PXA27x
116 188
117config MACH_ZYLONITE 189config MACH_ZYLONITE
118 bool "PXA3xx Development Platform" 190 bool "PXA3xx Development Platform (aka Zylonite)"
119 select PXA3xx 191 select PXA3xx
120 select HAVE_PWM 192 select HAVE_PWM
121 193
@@ -124,6 +196,16 @@ config MACH_LITTLETON
124 select PXA3xx 196 select PXA3xx
125 select PXA_SSP 197 select PXA_SSP
126 198
199config MACH_TAVOREVB
200 bool "PXA930 Evaluation Board (aka TavorEVB)"
201 select PXA3xx
202 select PXA930
203
204config MACH_SAAR
205 bool "PXA930 Handheld Platform (aka SAAR)"
206 select PXA3xx
207 select PXA930
208
127config MACH_ARMCORE 209config MACH_ARMCORE
128 bool "CompuLab CM-X270 modules" 210 bool "CompuLab CM-X270 modules"
129 select PXA27x 211 select PXA27x
@@ -131,7 +213,6 @@ config MACH_ARMCORE
131 213
132config MACH_MAGICIAN 214config MACH_MAGICIAN
133 bool "Enable HTC Magician Support" 215 bool "Enable HTC Magician Support"
134 depends on ARCH_PXA
135 select PXA27x 216 select PXA27x
136 select IWMMXT 217 select IWMMXT
137 218
@@ -139,18 +220,26 @@ config MACH_PCM027
139 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)" 220 bool "Phytec phyCORE-PXA270 CPU module (PCM-027)"
140 select PXA27x 221 select PXA27x
141 select IWMMXT 222 select IWMMXT
223 select PXA_SSP
142 224
143endmenu 225config ARCH_PXA_PALM
226 bool "PXA based Palm PDAs"
227 select HAVE_PWM
144 228
145choice 229config MACH_PALMTX
146 prompt "Used baseboard" 230 bool "Palm T|X"
147 depends on MACH_PCM027 231 default y
232 depends on ARCH_PXA_PALM
233 select PXA27x
234 select IWMMXT
235 help
236 Say Y here if you intend to run this kernel on a Palm T|X
237 handheld computer.
148 238
149config MACH_PCM990_BASEBOARD 239config MACH_PCM990_BASEBOARD
150 bool "PHYTEC PCM-990 development board" 240 bool "PHYTEC PCM-990 development board"
151 select HAVE_PWM 241 select HAVE_PWM
152 242 depends on MACH_PCM027
153endchoice
154 243
155choice 244choice
156 prompt "display on pcm990" 245 prompt "display on pcm990"
@@ -167,88 +256,45 @@ config PCM990_DISPLAY_NONE
167 256
168endchoice 257endchoice
169 258
170if ARCH_GUMSTIX
171
172choice
173 prompt "Select target Gumstix board"
174
175config MACH_GUMSTIX_F
176 bool "Basix, Connex, ws-200ax, ws-400ax systems"
177 select PXA25x
178
179endchoice
180
181endif
182 259
260config PXA_EZX
261 bool "Motorola EZX Platform"
262 select PXA27x
263 select IWMMXT
264 select HAVE_PWM
183 265
184if MACH_TRIZEPS4 266config MACH_EZX_A780
267 bool "Motorola EZX A780"
268 default y
269 depends on PXA_EZX
185 270
186choice 271config MACH_EZX_E680
187 prompt "Select base board for Trizeps 4 module" 272 bool "Motorola EZX E680"
273 default y
274 depends on PXA_EZX
188 275
189config MACH_TRIZEPS4_CONXS 276config MACH_EZX_A1200
190 bool "ConXS Eval Board" 277 bool "Motorola EZX A1200"
278 default y
279 depends on PXA_EZX
191 280
192config MACH_TRIZEPS4_ANY 281config MACH_EZX_A910
193 bool "another Board" 282 bool "Motorola EZX A910"
283 default y
284 depends on PXA_EZX
194 285
195endchoice 286config MACH_EZX_E6
287 bool "Motorola EZX E6"
288 default y
289 depends on PXA_EZX
196 290
197endif 291config MACH_EZX_E2
292 bool "Motorola EZX E2"
293 default y
294 depends on PXA_EZX
198 295
199endmenu 296endmenu
200 297
201config MACH_POODLE
202 bool "Enable Sharp SL-5600 (Poodle) Support"
203 depends on PXA_SHARPSL
204 select PXA25x
205 select SHARP_LOCOMO
206 select PXA_SSP
207
208config MACH_CORGI
209 bool "Enable Sharp SL-C700 (Corgi) Support"
210 depends on PXA_SHARPSL
211 select PXA25x
212 select PXA_SHARP_C7xx
213
214config MACH_SHEPHERD
215 bool "Enable Sharp SL-C750 (Shepherd) Support"
216 depends on PXA_SHARPSL
217 select PXA25x
218 select PXA_SHARP_C7xx
219
220config MACH_HUSKY
221 bool "Enable Sharp SL-C760 (Husky) Support"
222 depends on PXA_SHARPSL
223 select PXA25x
224 select PXA_SHARP_C7xx
225
226config MACH_AKITA
227 bool "Enable Sharp SL-1000 (Akita) Support"
228 depends on PXA_SHARPSL
229 select PXA27x
230 select PXA_SHARP_Cxx00
231 select MACH_SPITZ
232 select I2C
233 select I2C_PXA
234
235config MACH_SPITZ
236 bool "Enable Sharp Zaurus SL-3000 (Spitz) Support"
237 depends on PXA_SHARPSL
238 select PXA27x
239 select PXA_SHARP_Cxx00
240
241config MACH_BORZOI
242 bool "Enable Sharp Zaurus SL-3100 (Borzoi) Support"
243 depends on PXA_SHARPSL
244 select PXA27x
245 select PXA_SHARP_Cxx00
246
247config MACH_TOSA
248 bool "Enable Sharp SL-6000x (Tosa) Support"
249 depends on PXA_SHARPSL
250 select PXA25x
251
252config PXA25x 298config PXA25x
253 bool 299 bool
254 help 300 help
@@ -288,4 +334,13 @@ config PXA_PWM
288 default BACKLIGHT_PWM 334 default BACKLIGHT_PWM
289 help 335 help
290 Enable support for PXA2xx/PXA3xx PWM controllers 336 Enable support for PXA2xx/PXA3xx PWM controllers
337
338config TOSA_BT
339 tristate "Control the state of built-in bluetooth chip on Sharp SL-6000"
340 depends on MACH_TOSA
341 select RFKILL
342 help
343 This is a simple driver that is able to control
344 the state of built in bluetooth chip on tosa.
345
291endif 346endif
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index c4dfbe87fc4e..99ecbe7f8506 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -4,7 +4,7 @@
4 4
5# Common support (must be linked before board specific support) 5# Common support (must be linked before board specific support)
6obj-y += clock.o devices.o generic.o irq.o dma.o \ 6obj-y += clock.o devices.o generic.o irq.o dma.o \
7 time.o gpio.o 7 time.o gpio.o reset.o
8obj-$(CONFIG_PM) += pm.o sleep.o standby.o 8obj-$(CONFIG_PM) += pm.o sleep.o standby.o
9obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o 9obj-$(CONFIG_CPU_FREQ) += cpu-pxa.o
10 10
@@ -18,6 +18,7 @@ obj-$(CONFIG_PXA27x) += mfp-pxa2xx.o pxa2xx.o pxa27x.o
18obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o 18obj-$(CONFIG_PXA3xx) += mfp-pxa3xx.o pxa3xx.o smemc.o
19obj-$(CONFIG_CPU_PXA300) += pxa300.o 19obj-$(CONFIG_CPU_PXA300) += pxa300.o
20obj-$(CONFIG_CPU_PXA320) += pxa320.o 20obj-$(CONFIG_CPU_PXA320) += pxa320.o
21obj-$(CONFIG_CPU_PXA930) += pxa930.o
21 22
22# Specific board support 23# Specific board support
23obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o 24obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o
@@ -36,7 +37,12 @@ obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o
36obj-$(CONFIG_MACH_TOSA) += tosa.o 37obj-$(CONFIG_MACH_TOSA) += tosa.o
37obj-$(CONFIG_MACH_EM_X270) += em-x270.o 38obj-$(CONFIG_MACH_EM_X270) += em-x270.o
38obj-$(CONFIG_MACH_MAGICIAN) += magician.o 39obj-$(CONFIG_MACH_MAGICIAN) += magician.o
39obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o 40obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o eseries_udc.o
41obj-$(CONFIG_MACH_E740) += e740_lcd.o
42obj-$(CONFIG_MACH_E750) += e750_lcd.o
43obj-$(CONFIG_MACH_E400) += e400_lcd.o
44obj-$(CONFIG_MACH_E800) += e800_lcd.o
45obj-$(CONFIG_MACH_PALMTX) += palmtx.o
40 46
41ifeq ($(CONFIG_MACH_ZYLONITE),y) 47ifeq ($(CONFIG_MACH_ZYLONITE),y)
42 obj-y += zylonite.o 48 obj-y += zylonite.o
@@ -44,8 +50,11 @@ ifeq ($(CONFIG_MACH_ZYLONITE),y)
44 obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o 50 obj-$(CONFIG_CPU_PXA320) += zylonite_pxa320.o
45endif 51endif
46obj-$(CONFIG_MACH_LITTLETON) += littleton.o 52obj-$(CONFIG_MACH_LITTLETON) += littleton.o
53obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o
54obj-$(CONFIG_MACH_SAAR) += saar.o
47 55
48obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o 56obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o
57obj-$(CONFIG_PXA_EZX) += ezx.o
49 58
50# Support for blinky lights 59# Support for blinky lights
51led-y := leds.o 60led-y := leds.o
@@ -59,3 +68,5 @@ obj-$(CONFIG_LEDS) += $(led-y)
59ifeq ($(CONFIG_PCI),y) 68ifeq ($(CONFIG_PCI),y)
60obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o 69obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o
61endif 70endif
71
72obj-$(CONFIG_TOSA_BT) += tosa-bt.o
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
index b4d04955dcb0..630063ffa6fc 100644
--- a/arch/arm/mach-pxa/clock.c
+++ b/arch/arm/mach-pxa/clock.c
@@ -101,21 +101,6 @@ unsigned long clk_get_rate(struct clk *clk)
101EXPORT_SYMBOL(clk_get_rate); 101EXPORT_SYMBOL(clk_get_rate);
102 102
103 103
104static void clk_gpio27_enable(struct clk *clk)
105{
106 pxa_gpio_mode(GPIO11_3_6MHz_MD);
107}
108
109static void clk_gpio27_disable(struct clk *clk)
110{
111}
112
113static const struct clkops clk_gpio27_ops = {
114 .enable = clk_gpio27_enable,
115 .disable = clk_gpio27_disable,
116};
117
118
119void clk_cken_enable(struct clk *clk) 104void clk_cken_enable(struct clk *clk)
120{ 105{
121 CKEN |= 1 << clk->cken; 106 CKEN |= 1 << clk->cken;
@@ -131,14 +116,6 @@ const struct clkops clk_cken_ops = {
131 .disable = clk_cken_disable, 116 .disable = clk_cken_disable,
132}; 117};
133 118
134static struct clk common_clks[] = {
135 {
136 .name = "GPIO27_CLK",
137 .ops = &clk_gpio27_ops,
138 .rate = 3686400,
139 },
140};
141
142void clks_register(struct clk *clks, size_t num) 119void clks_register(struct clk *clks, size_t num)
143{ 120{
144 int i; 121 int i;
@@ -148,10 +125,3 @@ void clks_register(struct clk *clks, size_t num)
148 list_add(&clks[i].node, &clocks); 125 list_add(&clks[i].node, &clocks);
149 mutex_unlock(&clocks_mutex); 126 mutex_unlock(&clocks_mutex);
150} 127}
151
152static int __init clk_init(void)
153{
154 clks_register(common_clks, ARRAY_SIZE(common_clks));
155 return 0;
156}
157arch_initcall(clk_init);
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h
index 83cbfaba485d..1ec8f9178aaf 100644
--- a/arch/arm/mach-pxa/clock.h
+++ b/arch/arm/mach-pxa/clock.h
@@ -47,9 +47,42 @@ struct clk {
47 .other = _other, \ 47 .other = _other, \
48 } 48 }
49 49
50#define INIT_CLK(_name, _ops, _rate, _delay, _dev) \
51 { \
52 .name = _name, \
53 .dev = _dev, \
54 .ops = _ops, \
55 .rate = _rate, \
56 .delay = _delay, \
57 }
58
50extern const struct clkops clk_cken_ops; 59extern const struct clkops clk_cken_ops;
51 60
52void clk_cken_enable(struct clk *clk); 61void clk_cken_enable(struct clk *clk);
53void clk_cken_disable(struct clk *clk); 62void clk_cken_disable(struct clk *clk);
54 63
64#ifdef CONFIG_PXA3xx
65#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
66 { \
67 .name = _name, \
68 .dev = _dev, \
69 .ops = &clk_pxa3xx_cken_ops, \
70 .rate = _rate, \
71 .cken = CKEN_##_cken, \
72 .delay = _delay, \
73 }
74
75#define PXA3xx_CK(_name, _cken, _ops, _dev) \
76 { \
77 .name = _name, \
78 .dev = _dev, \
79 .ops = _ops, \
80 .cken = CKEN_##_cken, \
81 }
82
83extern const struct clkops clk_pxa3xx_cken_ops;
84extern void clk_pxa3xx_cken_enable(struct clk *);
85extern void clk_pxa3xx_cken_disable(struct clk *);
86#endif
87
55void clks_register(struct clk *clks, size_t num); 88void clks_register(struct clk *clks, size_t num);
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c
index 319c9ff3ab9a..bcf0cde6ccc9 100644
--- a/arch/arm/mach-pxa/cm-x270-pci.c
+++ b/arch/arm/mach-pxa/cm-x270-pci.c
@@ -5,7 +5,7 @@
5 * 5 *
6 * Bits taken from various places. 6 * Bits taken from various places.
7 * 7 *
8 * Copyright (C) 2007 Compulab, Ltd. 8 * Copyright (C) 2007, 2008 Compulab, Ltd.
9 * Mike Rapoport <mike@compulab.co.il> 9 * Mike Rapoport <mike@compulab.co.il>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
@@ -19,16 +19,16 @@
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/irq.h> 21#include <linux/irq.h>
22#include <linux/gpio.h>
22 23
23#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
24#include <asm/arch/cm-x270.h>
25#include <asm/arch/pxa-regs.h> 25#include <asm/arch/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h>
27#include <asm/mach-types.h> 26#include <asm/mach-types.h>
28 27
29#include <asm/hardware/it8152.h> 28#include <asm/hardware/it8152.h>
30 29
31unsigned long it8152_base_address = CMX270_IT8152_VIRT; 30unsigned long it8152_base_address;
31static int cmx270_it8152_irq_gpio;
32 32
33/* 33/*
34 * Only first 64MB of memory can be accessed via PCI. 34 * Only first 64MB of memory can be accessed via PCI.
@@ -42,7 +42,7 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
42 unsigned int sz = SZ_64M >> PAGE_SHIFT; 42 unsigned int sz = SZ_64M >> PAGE_SHIFT;
43 43
44 if (machine_is_armcore()) { 44 if (machine_is_armcore()) {
45 pr_info("Adjusting zones for CM-x270\n"); 45 pr_info("Adjusting zones for CM-X270\n");
46 46
47 /* 47 /*
48 * Only adjust if > 64M on current system 48 * Only adjust if > 64M on current system
@@ -60,19 +60,20 @@ void __init cmx270_pci_adjust_zones(int node, unsigned long *zone_size,
60static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) 60static void cmx270_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
61{ 61{
62 /* clear our parent irq */ 62 /* clear our parent irq */
63 GEDR(GPIO_IT8152_IRQ) = GPIO_bit(GPIO_IT8152_IRQ); 63 GEDR(cmx270_it8152_irq_gpio) = GPIO_bit(cmx270_it8152_irq_gpio);
64 64
65 it8152_irq_demux(irq, desc); 65 it8152_irq_demux(irq, desc);
66} 66}
67 67
68void __cmx270_pci_init_irq(void) 68void __cmx270_pci_init_irq(int irq_gpio)
69{ 69{
70 it8152_init_irq(); 70 it8152_init_irq();
71 pxa_gpio_mode(IRQ_TO_GPIO(GPIO_IT8152_IRQ));
72 set_irq_type(IRQ_GPIO(GPIO_IT8152_IRQ), IRQT_RISING);
73 71
74 set_irq_chained_handler(IRQ_GPIO(GPIO_IT8152_IRQ), 72 cmx270_it8152_irq_gpio = irq_gpio;
75 cmx270_it8152_irq_demux); 73
74 set_irq_type(gpio_to_irq(irq_gpio), IRQT_RISING);
75
76 set_irq_chained_handler(gpio_to_irq(irq_gpio), cmx270_it8152_irq_demux);
76} 77}
77 78
78#ifdef CONFIG_PM 79#ifdef CONFIG_PM
@@ -115,8 +116,8 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
115 116
116 /* 117 /*
117 Here comes the ugly part. The routing is baseboard specific, 118 Here comes the ugly part. The routing is baseboard specific,
118 but defining a platform for each possible base of CM-x270 is 119 but defining a platform for each possible base of CM-X270 is
119 unrealistic. Here we keep mapping for ATXBase and SB-x270. 120 unrealistic. Here we keep mapping for ATXBase and SB-X270.
120 */ 121 */
121 /* ATXBASE PCI slot */ 122 /* ATXBASE PCI slot */
122 if (slot == 7) 123 if (slot == 7)
diff --git a/arch/arm/mach-pxa/cm-x270-pci.h b/arch/arm/mach-pxa/cm-x270-pci.h
index ffe37b66f9a0..48f532f4cb51 100644
--- a/arch/arm/mach-pxa/cm-x270-pci.h
+++ b/arch/arm/mach-pxa/cm-x270-pci.h
@@ -1,13 +1,13 @@
1extern void __cmx270_pci_init_irq(void); 1extern void __cmx270_pci_init_irq(int irq_gpio);
2extern void __cmx270_pci_suspend(void); 2extern void __cmx270_pci_suspend(void);
3extern void __cmx270_pci_resume(void); 3extern void __cmx270_pci_resume(void);
4 4
5#ifdef CONFIG_PCI 5#ifdef CONFIG_PCI
6#define cmx270_pci_init_irq __cmx270_pci_init_irq 6#define cmx270_pci_init_irq(x) __cmx270_pci_init_irq(x)
7#define cmx270_pci_suspend __cmx270_pci_suspend 7#define cmx270_pci_suspend(x) __cmx270_pci_suspend(x)
8#define cmx270_pci_resume __cmx270_pci_resume 8#define cmx270_pci_resume(x) __cmx270_pci_resume(x)
9#else 9#else
10#define cmx270_pci_init_irq() do {} while (0) 10#define cmx270_pci_init_irq(x) do {} while (0)
11#define cmx270_pci_suspend() do {} while (0) 11#define cmx270_pci_suspend(x) do {} while (0)
12#define cmx270_pci_resume() do {} while (0) 12#define cmx270_pci_resume(x) do {} while (0)
13#endif 13#endif
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
index 01b9964acec1..402e807eae54 100644
--- a/arch/arm/mach-pxa/cm-x270.c
+++ b/arch/arm/mach-pxa/cm-x270.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/mach-pxa/cm-x270.c 2 * linux/arch/arm/mach-pxa/cm-x270.c
3 * 3 *
4 * Copyright (C) 2007 CompuLab, Ltd. 4 * Copyright (C) 2007, 2008 CompuLab, Ltd.
5 * Mike Rapoport <mike@compulab.co.il> 5 * Mike Rapoport <mike@compulab.co.il>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -9,44 +9,156 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/types.h>
13#include <linux/pm.h>
14#include <linux/fb.h>
15#include <linux/platform_device.h> 12#include <linux/platform_device.h>
16#include <linux/irq.h>
17#include <linux/sysdev.h> 13#include <linux/sysdev.h>
18#include <linux/io.h> 14#include <linux/irq.h>
19#include <linux/delay.h> 15#include <linux/gpio.h>
20 16
21#include <linux/dm9000.h> 17#include <linux/dm9000.h>
22#include <linux/rtc-v3020.h> 18#include <linux/rtc-v3020.h>
23#include <linux/serial_8250.h>
24
25#include <video/mbxfb.h> 19#include <video/mbxfb.h>
20#include <linux/leds.h>
26 21
27#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
28#include <asm/mach-types.h> 23#include <asm/mach-types.h>
29#include <asm/mach/map.h> 24#include <asm/mach/map.h>
30 25
31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/pxa2xx-regs.h> 26#include <asm/arch/pxa2xx-regs.h>
33#include <asm/arch/pxa2xx-gpio.h> 27#include <asm/arch/mfp-pxa27x.h>
28#include <asm/arch/pxa-regs.h>
34#include <asm/arch/audio.h> 29#include <asm/arch/audio.h>
35#include <asm/arch/pxafb.h> 30#include <asm/arch/pxafb.h>
36#include <asm/arch/ohci.h> 31#include <asm/arch/ohci.h>
37#include <asm/arch/mmc.h> 32#include <asm/arch/mmc.h>
38#include <asm/arch/bitfield.h> 33#include <asm/arch/bitfield.h>
39#include <asm/arch/cm-x270.h>
40 34
41#include <asm/hardware/it8152.h> 35#include <asm/hardware/it8152.h>
42 36
43#include "generic.h" 37#include "generic.h"
44#include "cm-x270-pci.h" 38#include "cm-x270-pci.h"
45 39
40/* virtual addresses for statically mapped regions */
41#define CMX270_VIRT_BASE (0xe8000000)
42#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
43
46#define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22)) 44#define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22))
47#define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22)) 45#define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22))
48 46
49static struct resource cmx270_dm9k_resource[] = { 47/* GPIO IRQ usage */
48#define GPIO10_ETHIRQ (10)
49#define GPIO22_IT8152_IRQ (22)
50#define GPIO83_MMC_IRQ (83)
51#define GPIO95_GFXIRQ (95)
52
53#define CMX270_ETHIRQ IRQ_GPIO(GPIO10_ETHIRQ)
54#define CMX270_IT8152_IRQ IRQ_GPIO(GPIO22_IT8152_IRQ)
55#define CMX270_MMC_IRQ IRQ_GPIO(GPIO83_MMC_IRQ)
56#define CMX270_GFXIRQ IRQ_GPIO(GPIO95_GFXIRQ)
57
58/* MMC power enable */
59#define GPIO105_MMC_POWER (105)
60
61static unsigned long cmx270_pin_config[] = {
62 /* AC'97 */
63 GPIO28_AC97_BITCLK,
64 GPIO29_AC97_SDATA_IN_0,
65 GPIO30_AC97_SDATA_OUT,
66 GPIO31_AC97_SYNC,
67 GPIO98_AC97_SYSCLK,
68 GPIO113_AC97_nRESET,
69
70 /* BTUART */
71 GPIO42_BTUART_RXD,
72 GPIO43_BTUART_TXD,
73 GPIO44_BTUART_CTS,
74 GPIO45_BTUART_RTS,
75
76 /* STUART */
77 GPIO46_STUART_RXD,
78 GPIO47_STUART_TXD,
79
80 /* MCI controller */
81 GPIO32_MMC_CLK,
82 GPIO112_MMC_CMD,
83 GPIO92_MMC_DAT_0,
84 GPIO109_MMC_DAT_1,
85 GPIO110_MMC_DAT_2,
86 GPIO111_MMC_DAT_3,
87
88 /* LCD */
89 GPIO58_LCD_LDD_0,
90 GPIO59_LCD_LDD_1,
91 GPIO60_LCD_LDD_2,
92 GPIO61_LCD_LDD_3,
93 GPIO62_LCD_LDD_4,
94 GPIO63_LCD_LDD_5,
95 GPIO64_LCD_LDD_6,
96 GPIO65_LCD_LDD_7,
97 GPIO66_LCD_LDD_8,
98 GPIO67_LCD_LDD_9,
99 GPIO68_LCD_LDD_10,
100 GPIO69_LCD_LDD_11,
101 GPIO70_LCD_LDD_12,
102 GPIO71_LCD_LDD_13,
103 GPIO72_LCD_LDD_14,
104 GPIO73_LCD_LDD_15,
105 GPIO74_LCD_FCLK,
106 GPIO75_LCD_LCLK,
107 GPIO76_LCD_PCLK,
108 GPIO77_LCD_BIAS,
109
110 /* I2C */
111 GPIO117_I2C_SCL,
112 GPIO118_I2C_SDA,
113
114 /* SSP1 */
115 GPIO23_SSP1_SCLK,
116 GPIO24_SSP1_SFRM,
117 GPIO25_SSP1_TXD,
118 GPIO26_SSP1_RXD,
119
120 /* SSP2 */
121 GPIO19_SSP2_SCLK,
122 GPIO14_SSP2_SFRM,
123 GPIO87_SSP2_TXD,
124 GPIO88_SSP2_RXD,
125
126 /* PC Card */
127 GPIO48_nPOE,
128 GPIO49_nPWE,
129 GPIO50_nPIOR,
130 GPIO51_nPIOW,
131 GPIO85_nPCE_1,
132 GPIO54_nPCE_2,
133 GPIO55_nPREG,
134 GPIO56_nPWAIT,
135 GPIO57_nIOIS16,
136
137 /* SDRAM and local bus */
138 GPIO15_nCS_1,
139 GPIO78_nCS_2,
140 GPIO79_nCS_3,
141 GPIO80_nCS_4,
142 GPIO33_nCS_5,
143 GPIO49_nPWE,
144 GPIO18_RDY,
145
146 /* GPIO */
147 GPIO0_GPIO | WAKEUP_ON_EDGE_BOTH,
148 GPIO105_GPIO | MFP_LPM_DRIVE_HIGH, /* MMC/SD power */
149 GPIO53_GPIO, /* PC card reset */
150
151 /* NAND controls */
152 GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
153 GPIO89_GPIO, /* NAND Ready/Busy */
154
155 /* interrupts */
156 GPIO10_GPIO, /* DM9000 interrupt */
157 GPIO83_GPIO, /* MMC card detect */
158};
159
160#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
161static struct resource cmx270_dm9000_resource[] = {
50 [0] = { 162 [0] = {
51 .start = DM9000_PHYS_BASE, 163 .start = DM9000_PHYS_BASE,
52 .end = DM9000_PHYS_BASE + 4, 164 .end = DM9000_PHYS_BASE + 4,
@@ -64,31 +176,45 @@ static struct resource cmx270_dm9k_resource[] = {
64 } 176 }
65}; 177};
66 178
67/* for the moment we limit ourselves to 32bit IO until some 179static struct dm9000_plat_data cmx270_dm9000_platdata = {
68 * better IO routines can be written and tested
69 */
70static struct dm9000_plat_data cmx270_dm9k_platdata = {
71 .flags = DM9000_PLATF_32BITONLY, 180 .flags = DM9000_PLATF_32BITONLY,
72}; 181};
73 182
74/* Ethernet device */ 183static struct platform_device cmx270_dm9000_device = {
75static struct platform_device cmx270_device_dm9k = {
76 .name = "dm9000", 184 .name = "dm9000",
77 .id = 0, 185 .id = 0,
78 .num_resources = ARRAY_SIZE(cmx270_dm9k_resource), 186 .num_resources = ARRAY_SIZE(cmx270_dm9000_resource),
79 .resource = cmx270_dm9k_resource, 187 .resource = cmx270_dm9000_resource,
80 .dev = { 188 .dev = {
81 .platform_data = &cmx270_dm9k_platdata, 189 .platform_data = &cmx270_dm9000_platdata,
82 } 190 }
83}; 191};
84 192
85/* touchscreen controller */ 193static void __init cmx270_init_dm9000(void)
194{
195 platform_device_register(&cmx270_dm9000_device);
196}
197#else
198static inline void cmx270_init_dm9000(void) {}
199#endif
200
201/* UCB1400 touchscreen controller */
202#if defined(CONFIG_TOUCHSCREEN_UCB1400) || defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE)
86static struct platform_device cmx270_ts_device = { 203static struct platform_device cmx270_ts_device = {
87 .name = "ucb1400_ts", 204 .name = "ucb1400_ts",
88 .id = -1, 205 .id = -1,
89}; 206};
90 207
91/* RTC */ 208static void __init cmx270_init_touchscreen(void)
209{
210 platform_device_register(&cmx270_ts_device);
211}
212#else
213static inline void cmx270_init_touchscreen(void) {}
214#endif
215
216/* V3020 RTC */
217#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
92static struct resource cmx270_v3020_resource[] = { 218static struct resource cmx270_v3020_resource[] = {
93 [0] = { 219 [0] = {
94 .start = RTC_PHYS_BASE, 220 .start = RTC_PHYS_BASE,
@@ -111,28 +237,67 @@ static struct platform_device cmx270_rtc_device = {
111 } 237 }
112}; 238};
113 239
114/* 240static void __init cmx270_init_rtc(void)
115 * CM-X270 LEDs 241{
116 */ 242 platform_device_register(&cmx270_rtc_device);
243}
244#else
245static inline void cmx270_init_rtc(void) {}
246#endif
247
248/* CM-X270 LEDs */
249#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
250static struct gpio_led cmx270_leds[] = {
251 [0] = {
252 .name = "cm-x270:red",
253 .default_trigger = "nand-disk",
254 .gpio = 93,
255 .active_low = 1,
256 },
257 [1] = {
258 .name = "cm-x270:green",
259 .default_trigger = "heartbeat",
260 .gpio = 94,
261 .active_low = 1,
262 },
263};
264
265static struct gpio_led_platform_data cmx270_gpio_led_pdata = {
266 .num_leds = ARRAY_SIZE(cmx270_leds),
267 .leds = cmx270_leds,
268};
269
117static struct platform_device cmx270_led_device = { 270static struct platform_device cmx270_led_device = {
118 .name = "cm-x270-led", 271 .name = "leds-gpio",
119 .id = -1, 272 .id = -1,
273 .dev = {
274 .platform_data = &cmx270_gpio_led_pdata,
275 },
120}; 276};
121 277
278static void __init cmx270_init_leds(void)
279{
280 platform_device_register(&cmx270_led_device);
281}
282#else
283static inline void cmx270_init_leds(void) {}
284#endif
285
122/* 2700G graphics */ 286/* 2700G graphics */
287#if defined(CONFIG_FB_MBX) || defined(CONFIG_FB_MBX_MODULE)
123static u64 fb_dma_mask = ~(u64)0; 288static u64 fb_dma_mask = ~(u64)0;
124 289
125static struct resource cmx270_2700G_resource[] = { 290static struct resource cmx270_2700G_resource[] = {
126 /* frame buffer memory including ODFB and External SDRAM */ 291 /* frame buffer memory including ODFB and External SDRAM */
127 [0] = { 292 [0] = {
128 .start = MARATHON_PHYS, 293 .start = PXA_CS2_PHYS,
129 .end = MARATHON_PHYS + 0x02000000, 294 .end = PXA_CS2_PHYS + 0x01ffffff,
130 .flags = IORESOURCE_MEM, 295 .flags = IORESOURCE_MEM,
131 }, 296 },
132 /* Marathon registers */ 297 /* Marathon registers */
133 [1] = { 298 [1] = {
134 .start = MARATHON_PHYS + 0x03fe0000, 299 .start = PXA_CS2_PHYS + 0x03fe0000,
135 .end = MARATHON_PHYS + 0x03ffffff, 300 .end = PXA_CS2_PHYS + 0x03ffffff,
136 .flags = IORESOURCE_MEM, 301 .flags = IORESOURCE_MEM,
137 }, 302 },
138}; 303};
@@ -200,43 +365,15 @@ static struct platform_device cmx270_2700G = {
200 .id = -1, 365 .id = -1,
201}; 366};
202 367
203static u64 ata_dma_mask = ~(u64)0; 368static void __init cmx270_init_2700G(void)
204 369{
205static struct platform_device cmx270_ata = { 370 platform_device_register(&cmx270_2700G);
206 .name = "pata_cm_x270", 371}
207 .id = -1, 372#else
208 .dev = { 373static inline void cmx270_init_2700G(void) {}
209 .dma_mask = &ata_dma_mask, 374#endif
210 .coherent_dma_mask = 0xffffffff,
211 },
212};
213
214/* platform devices */
215static struct platform_device *platform_devices[] __initdata = {
216 &cmx270_device_dm9k,
217 &cmx270_rtc_device,
218 &cmx270_2700G,
219 &cmx270_led_device,
220 &cmx270_ts_device,
221 &cmx270_ata,
222};
223
224/* Map PCI companion and IDE/General Purpose CS statically */
225static struct map_desc cmx270_io_desc[] __initdata = {
226 [0] = { /* IDE/general purpose space */
227 .virtual = CMX270_IDE104_VIRT,
228 .pfn = __phys_to_pfn(CMX270_IDE104_PHYS),
229 .length = SZ_64M - SZ_8M,
230 .type = MT_DEVICE
231 },
232 [1] = { /* PCI bridge */
233 .virtual = CMX270_IT8152_VIRT,
234 .pfn = __phys_to_pfn(CMX270_IT8152_PHYS),
235 .length = SZ_64M,
236 .type = MT_DEVICE
237 },
238};
239 375
376#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
240/* 377/*
241 Display definitions 378 Display definitions
242 keep these for backwards compatibility, although symbolic names (as 379 keep these for backwards compatibility, although symbolic names (as
@@ -446,7 +583,16 @@ static int __init cmx270_set_display(char *str)
446*/ 583*/
447__setup("monitor=", cmx270_set_display); 584__setup("monitor=", cmx270_set_display);
448 585
586static void __init cmx270_init_display(void)
587{
588 set_pxa_fb_info(cmx270_display);
589}
590#else
591static inline void cmx270_init_display(void) {}
592#endif
593
449/* PXA27x OHCI controller setup */ 594/* PXA27x OHCI controller setup */
595#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
450static int cmx270_ohci_init(struct device *dev) 596static int cmx270_ohci_init(struct device *dev)
451{ 597{
452 /* Set the Power Control Polarity Low */ 598 /* Set the Power Control Polarity Low */
@@ -461,35 +607,37 @@ static struct pxaohci_platform_data cmx270_ohci_platform_data = {
461 .init = cmx270_ohci_init, 607 .init = cmx270_ohci_init,
462}; 608};
463 609
610static void __init cmx270_init_ohci(void)
611{
612 pxa_set_ohci_info(&cmx270_ohci_platform_data);
613}
614#else
615static inline void cmx270_init_ohci(void) {}
616#endif
464 617
618#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
465static int cmx270_mci_init(struct device *dev, 619static int cmx270_mci_init(struct device *dev,
466 irq_handler_t cmx270_detect_int, 620 irq_handler_t cmx270_detect_int,
467 void *data) 621 void *data)
468{ 622{
469 int err; 623 int err;
470 624
471 /* 625 err = gpio_request(GPIO105_MMC_POWER, "MMC/SD power");
472 * setup GPIO for PXA27x MMC controller 626 if (err) {
473 */ 627 dev_warn(dev, "power gpio unavailable\n");
474 pxa_gpio_mode(GPIO32_MMCCLK_MD); 628 return err;
475 pxa_gpio_mode(GPIO112_MMCCMD_MD); 629 }
476 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
477 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
478 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
479 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
480
481 /* SB-X270 uses GPIO105 as SD power enable */
482 pxa_gpio_mode(105 | GPIO_OUT);
483 630
484 /* card detect IRQ on GPIO 83 */ 631 gpio_direction_output(GPIO105_MMC_POWER, 0);
485 pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
486 632
487 err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int, 633 err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int,
488 IRQF_DISABLED | IRQF_TRIGGER_FALLING, 634 IRQF_DISABLED | IRQF_TRIGGER_FALLING,
489 "MMC card detect", data); 635 "MMC card detect", data);
490 if (err) 636 if (err) {
491 printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't" 637 gpio_free(GPIO105_MMC_POWER);
492 " request MMC card detect IRQ\n"); 638 dev_err(dev, "cmx270_mci_init: MMC/SD: can't"
639 " request MMC card detect IRQ\n");
640 }
493 641
494 return err; 642 return err;
495} 643}
@@ -499,17 +647,18 @@ static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
499 struct pxamci_platform_data *p_d = dev->platform_data; 647 struct pxamci_platform_data *p_d = dev->platform_data;
500 648
501 if ((1 << vdd) & p_d->ocr_mask) { 649 if ((1 << vdd) & p_d->ocr_mask) {
502 printk(KERN_DEBUG "%s: on\n", __func__); 650 dev_dbg(dev, "power on\n");
503 GPCR(105) = GPIO_bit(105); 651 gpio_set_value(GPIO105_MMC_POWER, 0);
504 } else { 652 } else {
505 GPSR(105) = GPIO_bit(105); 653 gpio_set_value(GPIO105_MMC_POWER, 1);
506 printk(KERN_DEBUG "%s: off\n", __func__); 654 dev_dbg(dev, "power off\n");
507 } 655 }
508} 656}
509 657
510static void cmx270_mci_exit(struct device *dev, void *data) 658static void cmx270_mci_exit(struct device *dev, void *data)
511{ 659{
512 free_irq(CMX270_MMC_IRQ, data); 660 free_irq(CMX270_MMC_IRQ, data);
661 gpio_free(GPIO105_MMC_POWER);
513} 662}
514 663
515static struct pxamci_platform_data cmx270_mci_platform_data = { 664static struct pxamci_platform_data cmx270_mci_platform_data = {
@@ -519,6 +668,14 @@ static struct pxamci_platform_data cmx270_mci_platform_data = {
519 .exit = cmx270_mci_exit, 668 .exit = cmx270_mci_exit,
520}; 669};
521 670
671static void __init cmx270_init_mmc(void)
672{
673 pxa_set_mci_info(&cmx270_mci_platform_data);
674}
675#else
676static inline void cmx270_init_mmc(void) {}
677#endif
678
522#ifdef CONFIG_PM 679#ifdef CONFIG_PM
523static unsigned long sleep_save_msc[10]; 680static unsigned long sleep_save_msc[10];
524 681
@@ -580,53 +737,63 @@ static int __init cmx270_pm_init(void)
580static int __init cmx270_pm_init(void) { return 0; } 737static int __init cmx270_pm_init(void) { return 0; }
581#endif 738#endif
582 739
583static void __init cmx270_init(void) 740#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
741static void __init cmx270_init_ac97(void)
584{ 742{
585 cmx270_pm_init();
586
587 set_pxa_fb_info(cmx270_display);
588
589 /* register CM-X270 platform devices */
590 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
591 pxa_set_ac97_info(NULL); 743 pxa_set_ac97_info(NULL);
744}
745#else
746static inline void cmx270_init_ac97(void) {}
747#endif
592 748
593 /* set MCI and OHCI platform parameters */ 749static void __init cmx270_init(void)
594 pxa_set_mci_info(&cmx270_mci_platform_data); 750{
595 pxa_set_ohci_info(&cmx270_ohci_platform_data); 751 cmx270_pm_init();
596
597 /* This enables the STUART */
598 pxa_gpio_mode(GPIO46_STRXD_MD);
599 pxa_gpio_mode(GPIO47_STTXD_MD);
600 752
601 /* This enables the BTUART */ 753 pxa2xx_mfp_config(ARRAY_AND_SIZE(cmx270_pin_config));
602 pxa_gpio_mode(GPIO42_BTRXD_MD); 754
603 pxa_gpio_mode(GPIO43_BTTXD_MD); 755 cmx270_init_dm9000();
604 pxa_gpio_mode(GPIO44_BTCTS_MD); 756 cmx270_init_rtc();
605 pxa_gpio_mode(GPIO45_BTRTS_MD); 757 cmx270_init_display();
758 cmx270_init_mmc();
759 cmx270_init_ohci();
760 cmx270_init_ac97();
761 cmx270_init_touchscreen();
762 cmx270_init_leds();
763 cmx270_init_2700G();
606} 764}
607 765
608static void __init cmx270_init_irq(void) 766static void __init cmx270_init_irq(void)
609{ 767{
610 pxa27x_init_irq(); 768 pxa27x_init_irq();
611 769
770 cmx270_pci_init_irq(GPIO22_IT8152_IRQ);
771}
612 772
613 cmx270_pci_init_irq(); 773#ifdef CONFIG_PCI
774/* Map PCI companion statically */
775static struct map_desc cmx270_io_desc[] __initdata = {
776 [0] = { /* PCI bridge */
777 .virtual = CMX270_IT8152_VIRT,
778 .pfn = __phys_to_pfn(PXA_CS4_PHYS),
779 .length = SZ_64M,
780 .type = MT_DEVICE
781 },
782};
614 783
615 /* Setup interrupt for dm9000 */ 784static void __init cmx270_map_io(void)
616 pxa_gpio_mode(IRQ_TO_GPIO(CMX270_ETHIRQ)); 785{
617 set_irq_type(CMX270_ETHIRQ, IRQT_RISING); 786 pxa_map_io();
787 iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc));
618 788
619 /* Setup interrupt for 2700G */ 789 it8152_base_address = CMX270_IT8152_VIRT;
620 pxa_gpio_mode(IRQ_TO_GPIO(CMX270_GFXIRQ));
621 set_irq_type(CMX270_GFXIRQ, IRQT_FALLING);
622} 790}
623 791#else
624static void __init cmx270_map_io(void) 792static void __init cmx270_map_io(void)
625{ 793{
626 pxa_map_io(); 794 pxa_map_io();
627 iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc));
628} 795}
629 796#endif
630 797
631MACHINE_START(ARMCORE, "Compulab CM-x270") 798MACHINE_START(ARMCORE, "Compulab CM-x270")
632 .boot_params = 0xa0000100, 799 .boot_params = 0xa0000100,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index b37671b71886..e58504edb140 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -465,6 +465,7 @@ static void corgi_irda_transceiver_mode(struct device *dev, int mode)
465 GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); 465 GPSR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
466 else 466 else
467 GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON); 467 GPCR(CORGI_GPIO_IR_ON) = GPIO_bit(CORGI_GPIO_IR_ON);
468 pxa2xx_transceiver_mode(dev, mode);
468} 469}
469 470
470static struct pxaficp_platform_data corgi_ficp_platform_data = { 471static struct pxaficp_platform_data corgi_ficp_platform_data = {
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index a6f2390ce662..84489dc51d81 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -13,8 +13,10 @@
13#include <asm/arch/mfp-pxa27x.h> 13#include <asm/arch/mfp-pxa27x.h>
14#include <asm/arch/ohci.h> 14#include <asm/arch/ohci.h>
15#include <asm/arch/pxa27x_keypad.h> 15#include <asm/arch/pxa27x_keypad.h>
16#include <asm/arch/pxa2xx_spi.h>
16#include <asm/arch/camera.h> 17#include <asm/arch/camera.h>
17#include <asm/arch/audio.h> 18#include <asm/arch/audio.h>
19#include <asm/arch/pxa3xx_nand.h>
18 20
19#include "devices.h" 21#include "devices.h"
20#include "generic.h" 22#include "generic.h"
@@ -830,4 +832,63 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
830 pxa_register_device(&pxa3xx_device_mci3, info); 832 pxa_register_device(&pxa3xx_device_mci3, info);
831} 833}
832 834
835static struct resource pxa3xx_resources_nand[] = {
836 [0] = {
837 .start = 0x43100000,
838 .end = 0x43100053,
839 .flags = IORESOURCE_MEM,
840 },
841 [1] = {
842 .start = IRQ_NAND,
843 .end = IRQ_NAND,
844 .flags = IORESOURCE_IRQ,
845 },
846 [2] = {
847 /* DRCMR for Data DMA */
848 .start = 97,
849 .end = 97,
850 .flags = IORESOURCE_DMA,
851 },
852 [3] = {
853 /* DRCMR for Command DMA */
854 .start = 99,
855 .end = 99,
856 .flags = IORESOURCE_DMA,
857 },
858};
859
860static u64 pxa3xx_nand_dma_mask = DMA_BIT_MASK(32);
861
862struct platform_device pxa3xx_device_nand = {
863 .name = "pxa3xx-nand",
864 .id = -1,
865 .dev = {
866 .dma_mask = &pxa3xx_nand_dma_mask,
867 .coherent_dma_mask = DMA_BIT_MASK(32),
868 },
869 .num_resources = ARRAY_SIZE(pxa3xx_resources_nand),
870 .resource = pxa3xx_resources_nand,
871};
872
873void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
874{
875 pxa_register_device(&pxa3xx_device_nand, info);
876}
833#endif /* CONFIG_PXA3xx */ 877#endif /* CONFIG_PXA3xx */
878
879/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
880 * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */
881void __init pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info)
882{
883 struct platform_device *pd;
884
885 pd = platform_device_alloc("pxa2xx-spi", id);
886 if (pd == NULL) {
887 printk(KERN_ERR "pxa2xx-spi: failed to allocate device id %d\n",
888 id);
889 return;
890 }
891
892 pd->dev.platform_data = info;
893 platform_device_add(pd);
894}
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index b852eb18daa5..887c738f5911 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -31,4 +31,6 @@ extern struct platform_device pxa25x_device_pwm1;
31extern struct platform_device pxa27x_device_pwm0; 31extern struct platform_device pxa27x_device_pwm0;
32extern struct platform_device pxa27x_device_pwm1; 32extern struct platform_device pxa27x_device_pwm1;
33 33
34extern struct platform_device pxa3xx_device_nand;
35
34void __init pxa_register_device(struct platform_device *dev, void *data); 36void __init pxa_register_device(struct platform_device *dev, void *data);
diff --git a/arch/arm/mach-pxa/e400_lcd.c b/arch/arm/mach-pxa/e400_lcd.c
new file mode 100644
index 000000000000..16c023630626
--- /dev/null
+++ b/arch/arm/mach-pxa/e400_lcd.c
@@ -0,0 +1,56 @@
1/*
2 * e400_lcd.c
3 *
4 * (c) 2005 Ian Molton <spyro@f2s.com>
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 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/module.h>
15
16#include <asm/mach-types.h>
17#include <asm/arch/pxa-regs.h>
18#include <asm/arch/pxafb.h>
19
20static struct pxafb_mode_info e400_pxafb_mode_info = {
21 .pixclock = 140703,
22 .xres = 240,
23 .yres = 320,
24 .bpp = 16,
25 .hsync_len = 4,
26 .left_margin = 28,
27 .right_margin = 8,
28 .vsync_len = 3,
29 .upper_margin = 5,
30 .lower_margin = 6,
31 .sync = 0,
32};
33
34static struct pxafb_mach_info e400_pxafb_mach_info = {
35 .modes = &e400_pxafb_mode_info,
36 .num_modes = 1,
37 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act,
38 .lccr3 = 0,
39 .pxafb_backlight_power = NULL,
40};
41
42static int __init e400_lcd_init(void)
43{
44 if (!machine_is_e400())
45 return -ENODEV;
46
47 set_pxa_fb_info(&e400_pxafb_mach_info);
48 return 0;
49}
50
51module_init(e400_lcd_init);
52
53MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
54MODULE_DESCRIPTION("e400 lcd driver");
55MODULE_LICENSE("GPLv2");
56
diff --git a/arch/arm/mach-pxa/e740_lcd.c b/arch/arm/mach-pxa/e740_lcd.c
new file mode 100644
index 000000000000..26bd599af178
--- /dev/null
+++ b/arch/arm/mach-pxa/e740_lcd.c
@@ -0,0 +1,123 @@
1/* e740_lcd.c
2 *
3 * This file contains the definitions for the LCD timings and functions
4 * to control the LCD power / frontlighting via the w100fb driver.
5 *
6 * (c) 2005 Ian Molton <spyro@f2s.com>
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/module.h>
15#include <linux/device.h>
16#include <linux/fb.h>
17#include <linux/err.h>
18#include <linux/platform_device.h>
19
20#include <asm/mach-types.h>
21
22#include <video/w100fb.h>
23
24/*
25**potential** shutdown routine - to be investigated
26devmem2 0x0c010528 w 0xff3fff00
27devmem2 0x0c010190 w 0x7FFF8000
28devmem2 0x0c0101b0 w 0x00FF0000
29devmem2 0x0c01008c w 0x00000000
30devmem2 0x0c010080 w 0x000000bf
31devmem2 0x0c010098 w 0x00000015
32devmem2 0x0c010088 w 0x4b000204
33devmem2 0x0c010098 w 0x0000001d
34*/
35
36static struct w100_gen_regs e740_lcd_regs = {
37 .lcd_format = 0x00008023,
38 .lcdd_cntl1 = 0x0f000000,
39 .lcdd_cntl2 = 0x0003ffff,
40 .genlcd_cntl1 = 0x00ffff03,
41 .genlcd_cntl2 = 0x003c0f03,
42 .genlcd_cntl3 = 0x000143aa,
43};
44
45static struct w100_mode e740_lcd_mode = {
46 .xres = 240,
47 .yres = 320,
48 .left_margin = 20,
49 .right_margin = 28,
50 .upper_margin = 9,
51 .lower_margin = 8,
52 .crtc_ss = 0x80140013,
53 .crtc_ls = 0x81150110,
54 .crtc_gs = 0x80050005,
55 .crtc_vpos_gs = 0x000a0009,
56 .crtc_rev = 0x0040010a,
57 .crtc_dclk = 0xa906000a,
58 .crtc_gclk = 0x80050108,
59 .crtc_goe = 0x80050108,
60 .pll_freq = 57,
61 .pixclk_divider = 4,
62 .pixclk_divider_rotated = 4,
63 .pixclk_src = CLK_SRC_XTAL,
64 .sysclk_divider = 1,
65 .sysclk_src = CLK_SRC_PLL,
66 .crtc_ps1_active = 0x41060010,
67};
68
69
70static struct w100_gpio_regs e740_w100_gpio_info = {
71 .init_data1 = 0x21002103,
72 .gpio_dir1 = 0xffffdeff,
73 .gpio_oe1 = 0x03c00643,
74 .init_data2 = 0x003f003f,
75 .gpio_dir2 = 0xffffffff,
76 .gpio_oe2 = 0x000000ff,
77};
78
79static struct w100fb_mach_info e740_fb_info = {
80 .modelist = &e740_lcd_mode,
81 .num_modes = 1,
82 .regs = &e740_lcd_regs,
83 .gpio = &e740_w100_gpio_info,
84 .xtal_freq = 14318000,
85 .xtal_dbl = 1,
86};
87
88static struct resource e740_fb_resources[] = {
89 [0] = {
90 .start = 0x0c000000,
91 .end = 0x0cffffff,
92 .flags = IORESOURCE_MEM,
93 },
94};
95
96/* ----------------------- device declarations -------------------------- */
97
98
99static struct platform_device e740_fb_device = {
100 .name = "w100fb",
101 .id = -1,
102 .dev = {
103 .platform_data = &e740_fb_info,
104 },
105 .num_resources = ARRAY_SIZE(e740_fb_resources),
106 .resource = e740_fb_resources,
107};
108
109static int e740_lcd_init(void)
110{
111 int ret;
112
113 if (!machine_is_e740())
114 return -ENODEV;
115
116 return platform_device_register(&e740_fb_device);
117}
118
119module_init(e740_lcd_init);
120
121MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
122MODULE_DESCRIPTION("e740 lcd driver");
123MODULE_LICENSE("GPLv2");
diff --git a/arch/arm/mach-pxa/e750_lcd.c b/arch/arm/mach-pxa/e750_lcd.c
new file mode 100644
index 000000000000..75edc3b5390f
--- /dev/null
+++ b/arch/arm/mach-pxa/e750_lcd.c
@@ -0,0 +1,109 @@
1/* e750_lcd.c
2 *
3 * This file contains the definitions for the LCD timings and functions
4 * to control the LCD power / frontlighting via the w100fb driver.
5 *
6 * (c) 2005 Ian Molton <spyro@f2s.com>
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/module.h>
15#include <linux/device.h>
16#include <linux/fb.h>
17#include <linux/err.h>
18#include <linux/platform_device.h>
19
20#include <asm/mach-types.h>
21
22#include <video/w100fb.h>
23
24static struct w100_gen_regs e750_lcd_regs = {
25 .lcd_format = 0x00008003,
26 .lcdd_cntl1 = 0x00000000,
27 .lcdd_cntl2 = 0x0003ffff,
28 .genlcd_cntl1 = 0x00fff003,
29 .genlcd_cntl2 = 0x003c0f03,
30 .genlcd_cntl3 = 0x000143aa,
31};
32
33static struct w100_mode e750_lcd_mode = {
34 .xres = 240,
35 .yres = 320,
36 .left_margin = 21,
37 .right_margin = 22,
38 .upper_margin = 5,
39 .lower_margin = 4,
40 .crtc_ss = 0x80150014,
41 .crtc_ls = 0x8014000d,
42 .crtc_gs = 0xc1000005,
43 .crtc_vpos_gs = 0x00020147,
44 .crtc_rev = 0x0040010a,
45 .crtc_dclk = 0xa1700030,
46 .crtc_gclk = 0x80cc0015,
47 .crtc_goe = 0x80cc0015,
48 .crtc_ps1_active = 0x61060017,
49 .pll_freq = 57,
50 .pixclk_divider = 4,
51 .pixclk_divider_rotated = 4,
52 .pixclk_src = CLK_SRC_XTAL,
53 .sysclk_divider = 1,
54 .sysclk_src = CLK_SRC_PLL,
55};
56
57
58static struct w100_gpio_regs e750_w100_gpio_info = {
59 .init_data1 = 0x01192f1b,
60 .gpio_dir1 = 0xd5ffdeff,
61 .gpio_oe1 = 0x000020bf,
62 .init_data2 = 0x010f010f,
63 .gpio_dir2 = 0xffffffff,
64 .gpio_oe2 = 0x000001cf,
65};
66
67static struct w100fb_mach_info e750_fb_info = {
68 .modelist = &e750_lcd_mode,
69 .num_modes = 1,
70 .regs = &e750_lcd_regs,
71 .gpio = &e750_w100_gpio_info,
72 .xtal_freq = 14318000,
73 .xtal_dbl = 1,
74};
75
76static struct resource e750_fb_resources[] = {
77 [0] = {
78 .start = 0x0c000000,
79 .end = 0x0cffffff,
80 .flags = IORESOURCE_MEM,
81 },
82};
83
84/* ----------------------- device declarations -------------------------- */
85
86
87static struct platform_device e750_fb_device = {
88 .name = "w100fb",
89 .id = -1,
90 .dev = {
91 .platform_data = &e750_fb_info,
92 },
93 .num_resources = ARRAY_SIZE(e750_fb_resources),
94 .resource = e750_fb_resources,
95};
96
97static int e750_lcd_init(void)
98{
99 if (!machine_is_e750())
100 return -ENODEV;
101
102 return platform_device_register(&e750_fb_device);
103}
104
105module_init(e750_lcd_init);
106
107MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
108MODULE_DESCRIPTION("e750 lcd driver");
109MODULE_LICENSE("GPLv2");
diff --git a/arch/arm/mach-pxa/e800_lcd.c b/arch/arm/mach-pxa/e800_lcd.c
new file mode 100644
index 000000000000..e6aeab0ebc22
--- /dev/null
+++ b/arch/arm/mach-pxa/e800_lcd.c
@@ -0,0 +1,159 @@
1/* e800_lcd.c
2 *
3 * This file contains the definitions for the LCD timings and functions
4 * to control the LCD power / frontlighting via the w100fb driver.
5 *
6 * (c) 2005 Ian Molton <spyro@f2s.com>
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/module.h>
15#include <linux/device.h>
16#include <linux/fb.h>
17#include <linux/err.h>
18#include <linux/platform_device.h>
19
20#include <asm/mach-types.h>
21
22#include <video/w100fb.h>
23
24static struct w100_gen_regs e800_lcd_regs = {
25 .lcd_format = 0x00008003,
26 .lcdd_cntl1 = 0x02a00000,
27 .lcdd_cntl2 = 0x0003ffff,
28 .genlcd_cntl1 = 0x000ff2a3,
29 .genlcd_cntl2 = 0x000002a3,
30 .genlcd_cntl3 = 0x000102aa,
31};
32
33static struct w100_mode e800_lcd_mode[2] = {
34 [0] = {
35 .xres = 480,
36 .yres = 640,
37 .left_margin = 52,
38 .right_margin = 148,
39 .upper_margin = 2,
40 .lower_margin = 6,
41 .crtc_ss = 0x80350034,
42 .crtc_ls = 0x802b0026,
43 .crtc_gs = 0x80160016,
44 .crtc_vpos_gs = 0x00020003,
45 .crtc_rev = 0x0040001d,
46 .crtc_dclk = 0xe0000000,
47 .crtc_gclk = 0x82a50049,
48 .crtc_goe = 0x80ee001c,
49 .crtc_ps1_active = 0x00000000,
50 .pll_freq = 128,
51 .pixclk_divider = 4,
52 .pixclk_divider_rotated = 6,
53 .pixclk_src = CLK_SRC_PLL,
54 .sysclk_divider = 0,
55 .sysclk_src = CLK_SRC_PLL,
56 },
57 [1] = {
58 .xres = 240,
59 .yres = 320,
60 .left_margin = 15,
61 .right_margin = 88,
62 .upper_margin = 0,
63 .lower_margin = 7,
64 .crtc_ss = 0xd010000f,
65 .crtc_ls = 0x80070003,
66 .crtc_gs = 0x80000000,
67 .crtc_vpos_gs = 0x01460147,
68 .crtc_rev = 0x00400003,
69 .crtc_dclk = 0xa1700030,
70 .crtc_gclk = 0x814b0008,
71 .crtc_goe = 0x80cc0015,
72 .crtc_ps1_active = 0x00000000,
73 .pll_freq = 100,
74 .pixclk_divider = 6, /* Wince uses 14 which gives a 7MHz pclk. */
75 .pixclk_divider_rotated = 6, /* we want a 14MHz one (much nicer to look at) */
76 .pixclk_src = CLK_SRC_PLL,
77 .sysclk_divider = 0,
78 .sysclk_src = CLK_SRC_PLL,
79 }
80};
81
82
83static struct w100_gpio_regs e800_w100_gpio_info = {
84 .init_data1 = 0xc13fc019,
85 .gpio_dir1 = 0x3e40df7f,
86 .gpio_oe1 = 0x003c3000,
87 .init_data2 = 0x00000000,
88 .gpio_dir2 = 0x00000000,
89 .gpio_oe2 = 0x00000000,
90};
91
92static struct w100_mem_info e800_w100_mem_info = {
93 .ext_cntl = 0x09640011,
94 .sdram_mode_reg = 0x00600021,
95 .ext_timing_cntl = 0x10001545,
96 .io_cntl = 0x7ddd7333,
97 .size = 0x1fffff,
98};
99
100static void e800_tg_change(struct w100fb_par *par)
101{
102 unsigned long tmp;
103
104 tmp = w100fb_gpio_read(W100_GPIO_PORT_A);
105 if (par->mode->xres == 480)
106 tmp |= 0x100;
107 else
108 tmp &= ~0x100;
109 w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
110}
111
112static struct w100_tg_info e800_tg_info = {
113 .change = e800_tg_change,
114};
115
116static struct w100fb_mach_info e800_fb_info = {
117 .modelist = e800_lcd_mode,
118 .num_modes = 2,
119 .regs = &e800_lcd_regs,
120 .gpio = &e800_w100_gpio_info,
121 .mem = &e800_w100_mem_info,
122 .tg = &e800_tg_info,
123 .xtal_freq = 16000000,
124};
125
126static struct resource e800_fb_resources[] = {
127 [0] = {
128 .start = 0x0c000000,
129 .end = 0x0cffffff,
130 .flags = IORESOURCE_MEM,
131 },
132};
133
134/* ----------------------- device declarations -------------------------- */
135
136
137static struct platform_device e800_fb_device = {
138 .name = "w100fb",
139 .id = -1,
140 .dev = {
141 .platform_data = &e800_fb_info,
142 },
143 .num_resources = ARRAY_SIZE(e800_fb_resources),
144 .resource = e800_fb_resources,
145};
146
147static int e800_lcd_init(void)
148{
149 if (!machine_is_e800())
150 return -ENODEV;
151
152 return platform_device_register(&e800_fb_device);
153}
154
155module_init(e800_lcd_init);
156
157MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
158MODULE_DESCRIPTION("e800 lcd driver");
159MODULE_LICENSE("GPLv2");
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 1bf680749928..e5cc6ca63c75 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Support for CompuLab EM-x270 platform 2 * Support for CompuLab EM-X270 platform
3 * 3 *
4 * Copyright (C) 2007 CompuLab, Ltd. 4 * Copyright (C) 2007, 2008 CompuLab, Ltd.
5 * Author: Mike Rapoport <mike@compulab.co.il> 5 * Author: Mike Rapoport <mike@compulab.co.il>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -14,31 +14,159 @@
14 14
15#include <linux/dm9000.h> 15#include <linux/dm9000.h>
16#include <linux/rtc-v3020.h> 16#include <linux/rtc-v3020.h>
17
18#include <linux/mtd/nand.h> 17#include <linux/mtd/nand.h>
19#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <linux/input.h>
20#include <linux/gpio_keys.h>
21#include <linux/gpio.h>
20 22
21#include <asm/mach-types.h> 23#include <asm/mach-types.h>
22
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
24 25
26#include <asm/arch/mfp-pxa27x.h>
25#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
26#include <asm/arch/pxa2xx-gpio.h>
27#include <asm/arch/pxa27x-udc.h> 28#include <asm/arch/pxa27x-udc.h>
28#include <asm/arch/audio.h> 29#include <asm/arch/audio.h>
29#include <asm/arch/pxafb.h> 30#include <asm/arch/pxafb.h>
30#include <asm/arch/ohci.h> 31#include <asm/arch/ohci.h>
31#include <asm/arch/mmc.h> 32#include <asm/arch/mmc.h>
32#include <asm/arch/bitfield.h> 33#include <asm/arch/pxa27x_keypad.h>
33 34
34#include "generic.h" 35#include "generic.h"
35 36
36/* GPIO IRQ usage */ 37/* GPIO IRQ usage */
37#define EM_X270_MMC_PD (105) 38#define GPIO41_ETHIRQ (41)
38#define EM_X270_ETHIRQ IRQ_GPIO(41) 39#define GPIO13_MMC_CD (13)
39#define EM_X270_MMC_IRQ IRQ_GPIO(13) 40#define EM_X270_ETHIRQ IRQ_GPIO(GPIO41_ETHIRQ)
41#define EM_X270_MMC_CD IRQ_GPIO(GPIO13_MMC_CD)
42
43/* NAND control GPIOs */
44#define GPIO11_NAND_CS (11)
45#define GPIO56_NAND_RB (56)
46
47static unsigned long em_x270_pin_config[] = {
48 /* AC'97 */
49 GPIO28_AC97_BITCLK,
50 GPIO29_AC97_SDATA_IN_0,
51 GPIO30_AC97_SDATA_OUT,
52 GPIO31_AC97_SYNC,
53 GPIO98_AC97_SYSCLK,
54 GPIO113_AC97_nRESET,
55
56 /* BTUART */
57 GPIO42_BTUART_RXD,
58 GPIO43_BTUART_TXD,
59 GPIO44_BTUART_CTS,
60 GPIO45_BTUART_RTS,
61
62 /* STUART */
63 GPIO46_STUART_RXD,
64 GPIO47_STUART_TXD,
65
66 /* MCI controller */
67 GPIO32_MMC_CLK,
68 GPIO112_MMC_CMD,
69 GPIO92_MMC_DAT_0,
70 GPIO109_MMC_DAT_1,
71 GPIO110_MMC_DAT_2,
72 GPIO111_MMC_DAT_3,
73
74 /* LCD */
75 GPIO58_LCD_LDD_0,
76 GPIO59_LCD_LDD_1,
77 GPIO60_LCD_LDD_2,
78 GPIO61_LCD_LDD_3,
79 GPIO62_LCD_LDD_4,
80 GPIO63_LCD_LDD_5,
81 GPIO64_LCD_LDD_6,
82 GPIO65_LCD_LDD_7,
83 GPIO66_LCD_LDD_8,
84 GPIO67_LCD_LDD_9,
85 GPIO68_LCD_LDD_10,
86 GPIO69_LCD_LDD_11,
87 GPIO70_LCD_LDD_12,
88 GPIO71_LCD_LDD_13,
89 GPIO72_LCD_LDD_14,
90 GPIO73_LCD_LDD_15,
91 GPIO74_LCD_FCLK,
92 GPIO75_LCD_LCLK,
93 GPIO76_LCD_PCLK,
94 GPIO77_LCD_BIAS,
95
96 /* QCI */
97 GPIO84_CIF_FV,
98 GPIO25_CIF_LV,
99 GPIO53_CIF_MCLK,
100 GPIO54_CIF_PCLK,
101 GPIO81_CIF_DD_0,
102 GPIO55_CIF_DD_1,
103 GPIO51_CIF_DD_2,
104 GPIO50_CIF_DD_3,
105 GPIO52_CIF_DD_4,
106 GPIO48_CIF_DD_5,
107 GPIO17_CIF_DD_6,
108 GPIO12_CIF_DD_7,
109
110 /* I2C */
111 GPIO117_I2C_SCL,
112 GPIO118_I2C_SDA,
113
114 /* Keypad */
115 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
116 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
117 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
118 GPIO34_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH,
119 GPIO39_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH,
120 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
121 GPIO91_KP_MKIN_6 | WAKEUP_ON_LEVEL_HIGH,
122 GPIO36_KP_MKIN_7 | WAKEUP_ON_LEVEL_HIGH,
123 GPIO103_KP_MKOUT_0,
124 GPIO104_KP_MKOUT_1,
125 GPIO105_KP_MKOUT_2,
126 GPIO106_KP_MKOUT_3,
127 GPIO107_KP_MKOUT_4,
128 GPIO108_KP_MKOUT_5,
129 GPIO96_KP_MKOUT_6,
130 GPIO22_KP_MKOUT_7,
131
132 /* SSP1 */
133 GPIO26_SSP1_RXD,
134 GPIO23_SSP1_SCLK,
135 GPIO24_SSP1_SFRM,
136 GPIO57_SSP1_TXD,
137
138 /* SSP2 */
139 GPIO19_SSP2_SCLK,
140 GPIO14_SSP2_SFRM,
141 GPIO89_SSP2_TXD,
142 GPIO88_SSP2_RXD,
143
144 /* SDRAM and local bus */
145 GPIO15_nCS_1,
146 GPIO78_nCS_2,
147 GPIO79_nCS_3,
148 GPIO80_nCS_4,
149 GPIO49_nPWE,
150 GPIO18_RDY,
151
152 /* GPIO */
153 GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH,
154
155 /* power controls */
156 GPIO20_GPIO | MFP_LPM_DRIVE_LOW, /* GPRS_PWEN */
157 GPIO115_GPIO | MFP_LPM_DRIVE_LOW, /* WLAN_PWEN */
158
159 /* NAND controls */
160 GPIO11_GPIO | MFP_LPM_DRIVE_HIGH, /* NAND CE# */
161 GPIO56_GPIO, /* NAND Ready/Busy */
162
163 /* interrupts */
164 GPIO13_GPIO, /* MMC card detect */
165 GPIO41_GPIO, /* DM9000 interrupt */
166};
40 167
41static struct resource em_x270_dm9k_resource[] = { 168#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
169static struct resource em_x270_dm9000_resource[] = {
42 [0] = { 170 [0] = {
43 .start = PXA_CS2_PHYS, 171 .start = PXA_CS2_PHYS,
44 .end = PXA_CS2_PHYS + 3, 172 .end = PXA_CS2_PHYS + 3,
@@ -56,32 +184,30 @@ static struct resource em_x270_dm9k_resource[] = {
56 } 184 }
57}; 185};
58 186
59/* for the moment we limit ourselves to 32bit IO until some 187static struct dm9000_plat_data em_x270_dm9000_platdata = {
60 * better IO routines can be written and tested
61 */
62static struct dm9000_plat_data em_x270_dm9k_platdata = {
63 .flags = DM9000_PLATF_32BITONLY, 188 .flags = DM9000_PLATF_32BITONLY,
64}; 189};
65 190
66/* Ethernet device */ 191static struct platform_device em_x270_dm9000 = {
67static struct platform_device em_x270_dm9k = {
68 .name = "dm9000", 192 .name = "dm9000",
69 .id = 0, 193 .id = 0,
70 .num_resources = ARRAY_SIZE(em_x270_dm9k_resource), 194 .num_resources = ARRAY_SIZE(em_x270_dm9000_resource),
71 .resource = em_x270_dm9k_resource, 195 .resource = em_x270_dm9000_resource,
72 .dev = { 196 .dev = {
73 .platform_data = &em_x270_dm9k_platdata, 197 .platform_data = &em_x270_dm9000_platdata,
74 } 198 }
75}; 199};
76 200
77/* WM9712 touchscreen controller. Hopefully the driver will make it to 201static void __init em_x270_init_dm9000(void)
78 * the mainstream sometime */ 202{
79static struct platform_device em_x270_ts = { 203 platform_device_register(&em_x270_dm9000);
80 .name = "wm97xx-ts", 204}
81 .id = -1, 205#else
82}; 206static inline void em_x270_init_dm9000(void) {}
207#endif
83 208
84/* RTC */ 209/* V3020 RTC */
210#if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
85static struct resource em_x270_v3020_resource[] = { 211static struct resource em_x270_v3020_resource[] = {
86 [0] = { 212 [0] = {
87 .start = PXA_CS4_PHYS, 213 .start = PXA_CS4_PHYS,
@@ -104,20 +230,26 @@ static struct platform_device em_x270_rtc = {
104 } 230 }
105}; 231};
106 232
107/* NAND flash */ 233static void __init em_x270_init_rtc(void)
108#define GPIO_NAND_CS (11) 234{
109#define GPIO_NAND_RB (56) 235 platform_device_register(&em_x270_rtc);
236}
237#else
238static inline void em_x270_init_rtc(void) {}
239#endif
110 240
241/* NAND flash */
242#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
111static inline void nand_cs_on(void) 243static inline void nand_cs_on(void)
112{ 244{
113 GPCR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); 245 gpio_set_value(GPIO11_NAND_CS, 0);
114} 246}
115 247
116static void nand_cs_off(void) 248static void nand_cs_off(void)
117{ 249{
118 dsb(); 250 dsb();
119 251
120 GPSR(GPIO_NAND_CS) = GPIO_bit(GPIO_NAND_CS); 252 gpio_set_value(GPIO11_NAND_CS, 1);
121} 253}
122 254
123/* hardware specific access to control-lines */ 255/* hardware specific access to control-lines */
@@ -157,7 +289,7 @@ static int em_x270_nand_device_ready(struct mtd_info *mtd)
157{ 289{
158 dsb(); 290 dsb();
159 291
160 return GPLR(GPIO_NAND_RB) & GPIO_bit(GPIO_NAND_RB); 292 return gpio_get_value(GPIO56_NAND_RB);
161} 293}
162 294
163static struct mtd_partition em_x270_partition_info[] = { 295static struct mtd_partition em_x270_partition_info[] = {
@@ -210,16 +342,35 @@ static struct platform_device em_x270_nand = {
210 } 342 }
211}; 343};
212 344
213/* platform devices */ 345static void __init em_x270_init_nand(void)
214static struct platform_device *platform_devices[] __initdata = { 346{
215 &em_x270_dm9k, 347 int err;
216 &em_x270_ts,
217 &em_x270_rtc,
218 &em_x270_nand,
219};
220 348
349 err = gpio_request(GPIO11_NAND_CS, "NAND CS");
350 if (err) {
351 pr_warning("EM-X270: failed to request NAND CS gpio\n");
352 return;
353 }
354
355 gpio_direction_output(GPIO11_NAND_CS, 1);
356
357 err = gpio_request(GPIO56_NAND_RB, "NAND R/B");
358 if (err) {
359 pr_warning("EM-X270: failed to request NAND R/B gpio\n");
360 gpio_free(GPIO11_NAND_CS);
361 return;
362 }
363
364 gpio_direction_input(GPIO56_NAND_RB);
365
366 platform_device_register(&em_x270_nand);
367}
368#else
369static inline void em_x270_init_nand(void) {}
370#endif
221 371
222/* PXA27x OHCI controller setup */ 372/* PXA27x OHCI controller setup */
373#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
223static int em_x270_ohci_init(struct device *dev) 374static int em_x270_ohci_init(struct device *dev)
224{ 375{
225 /* Set the Power Control Polarity Low */ 376 /* Set the Power Control Polarity Low */
@@ -237,27 +388,23 @@ static struct pxaohci_platform_data em_x270_ohci_platform_data = {
237 .init = em_x270_ohci_init, 388 .init = em_x270_ohci_init,
238}; 389};
239 390
391static void __init em_x270_init_ohci(void)
392{
393 pxa_set_ohci_info(&em_x270_ohci_platform_data);
394}
395#else
396static inline void em_x270_init_ohci(void) {}
397#endif
240 398
399/* MCI controller setup */
400#if defined(CONFIG_MMC) || defined(CONFIG_MMC_MODULE)
241static int em_x270_mci_init(struct device *dev, 401static int em_x270_mci_init(struct device *dev,
242 irq_handler_t em_x270_detect_int, 402 irq_handler_t em_x270_detect_int,
243 void *data) 403 void *data)
244{ 404{
245 int err; 405 int err = request_irq(EM_X270_MMC_CD, em_x270_detect_int,
246 406 IRQF_DISABLED | IRQF_TRIGGER_FALLING,
247 /* setup GPIO for PXA27x MMC controller */ 407 "MMC card detect", data);
248 pxa_gpio_mode(GPIO32_MMCCLK_MD);
249 pxa_gpio_mode(GPIO112_MMCCMD_MD);
250 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
251 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
252 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
253 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
254
255 /* EM-X270 uses GPIO13 as SD power enable */
256 pxa_gpio_mode(EM_X270_MMC_PD | GPIO_OUT);
257
258 err = request_irq(EM_X270_MMC_IRQ, em_x270_detect_int,
259 IRQF_DISABLED | IRQF_TRIGGER_FALLING,
260 "MMC card detect", data);
261 if (err) { 408 if (err) {
262 printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", 409 printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n",
263 __func__, err); 410 __func__, err);
@@ -279,7 +426,8 @@ static void em_x270_mci_setpower(struct device *dev, unsigned int vdd)
279 426
280static void em_x270_mci_exit(struct device *dev, void *data) 427static void em_x270_mci_exit(struct device *dev, void *data)
281{ 428{
282 free_irq(EM_X270_MMC_IRQ, data); 429 int irq = gpio_to_irq(GPIO13_MMC_CD);
430 free_irq(irq, data);
283} 431}
284 432
285static struct pxamci_platform_data em_x270_mci_platform_data = { 433static struct pxamci_platform_data em_x270_mci_platform_data = {
@@ -289,7 +437,16 @@ static struct pxamci_platform_data em_x270_mci_platform_data = {
289 .exit = em_x270_mci_exit, 437 .exit = em_x270_mci_exit,
290}; 438};
291 439
440static void __init em_x270_init_mmc(void)
441{
442 pxa_set_mci_info(&em_x270_mci_platform_data);
443}
444#else
445static inline void em_x270_init_mmc(void) {}
446#endif
447
292/* LCD 480x640 */ 448/* LCD 480x640 */
449#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
293static struct pxafb_mode_info em_x270_lcd_mode = { 450static struct pxafb_mode_info em_x270_lcd_mode = {
294 .pixclock = 50000, 451 .pixclock = 50000,
295 .bpp = 16, 452 .bpp = 16,
@@ -307,40 +464,96 @@ static struct pxafb_mode_info em_x270_lcd_mode = {
307static struct pxafb_mach_info em_x270_lcd = { 464static struct pxafb_mach_info em_x270_lcd = {
308 .modes = &em_x270_lcd_mode, 465 .modes = &em_x270_lcd_mode,
309 .num_modes = 1, 466 .num_modes = 1,
310 .cmap_inverse = 0, 467 .lcd_conn = LCD_COLOR_TFT_16BPP,
311 .cmap_static = 0,
312 .lccr0 = LCCR0_PAS,
313 .lccr3 = LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff),
314}; 468};
315 469static void __init em_x270_init_lcd(void)
316static void __init em_x270_init(void)
317{ 470{
318 /* setup LCD */
319 set_pxa_fb_info(&em_x270_lcd); 471 set_pxa_fb_info(&em_x270_lcd);
472}
473#else
474static inline void em_x270_init_lcd(void) {}
475#endif
320 476
321 /* register EM-X270 platform devices */ 477#if defined(CONFIG_SND_PXA2XX_AC97) || defined(CONFIG_SND_PXA2XX_AC97_MODULE)
322 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 478static void __init em_x270_init_ac97(void)
479{
323 pxa_set_ac97_info(NULL); 480 pxa_set_ac97_info(NULL);
481}
482#else
483static inline void em_x270_init_ac97(void) {}
484#endif
485
486#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
487static unsigned int em_x270_matrix_keys[] = {
488 KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B),
489 KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT),
490 KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D),
491};
324 492
325 /* set MCI and OHCI platform parameters */ 493struct pxa27x_keypad_platform_data em_x270_keypad_info = {
326 pxa_set_mci_info(&em_x270_mci_platform_data); 494 /* code map for the matrix keys */
327 pxa_set_ohci_info(&em_x270_ohci_platform_data); 495 .matrix_key_rows = 3,
496 .matrix_key_cols = 3,
497 .matrix_key_map = em_x270_matrix_keys,
498 .matrix_key_map_size = ARRAY_SIZE(em_x270_matrix_keys),
499};
500
501static void __init em_x270_init_keypad(void)
502{
503 pxa_set_keypad_info(&em_x270_keypad_info);
504}
505#else
506static inline void em_x270_init_keypad(void) {}
507#endif
328 508
329 /* setup STUART GPIOs */ 509#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
330 pxa_gpio_mode(GPIO46_STRXD_MD); 510static struct gpio_keys_button gpio_keys_button[] = {
331 pxa_gpio_mode(GPIO47_STTXD_MD); 511 [0] = {
512 .desc = "sleep/wakeup",
513 .code = KEY_SUSPEND,
514 .type = EV_PWR,
515 .gpio = 1,
516 .wakeup = 1,
517 },
518};
332 519
333 /* setup BTUART GPIOs */ 520static struct gpio_keys_platform_data em_x270_gpio_keys_data = {
334 pxa_gpio_mode(GPIO42_BTRXD_MD); 521 .buttons = gpio_keys_button,
335 pxa_gpio_mode(GPIO43_BTTXD_MD); 522 .nbuttons = 1,
336 pxa_gpio_mode(GPIO44_BTCTS_MD); 523};
337 pxa_gpio_mode(GPIO45_BTRTS_MD);
338 524
339 /* Setup interrupt for dm9000 */ 525static struct platform_device em_x270_gpio_keys = {
340 set_irq_type(EM_X270_ETHIRQ, IRQT_RISING); 526 .name = "gpio-keys",
527 .id = -1,
528 .dev = {
529 .platform_data = &em_x270_gpio_keys_data,
530 },
531};
532
533static void __init em_x270_init_gpio_keys(void)
534{
535 platform_device_register(&em_x270_gpio_keys);
536}
537#else
538static inline void em_x270_init_gpio_keys(void) {}
539#endif
540
541static void __init em_x270_init(void)
542{
543 pxa2xx_mfp_config(ARRAY_AND_SIZE(em_x270_pin_config));
544
545 em_x270_init_dm9000();
546 em_x270_init_rtc();
547 em_x270_init_nand();
548 em_x270_init_lcd();
549 em_x270_init_mmc();
550 em_x270_init_ohci();
551 em_x270_init_keypad();
552 em_x270_init_gpio_keys();
553 em_x270_init_ac97();
341} 554}
342 555
343MACHINE_START(EM_X270, "Compulab EM-x270") 556MACHINE_START(EM_X270, "Compulab EM-X270")
344 .boot_params = 0xa0000100, 557 .boot_params = 0xa0000100,
345 .phys_io = 0x40000000, 558 .phys_io = 0x40000000,
346 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 559 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index ee0ae93c876a..c29b7b21c11b 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -17,7 +17,7 @@
17#include <asm/arch/hardware.h> 17#include <asm/arch/hardware.h>
18#include <asm/mach-types.h> 18#include <asm/mach-types.h>
19 19
20#include <generic.h> 20#include "generic.h"
21 21
22/* Only e800 has 128MB RAM */ 22/* Only e800 has 128MB RAM */
23static void __init eseries_fixup(struct machine_desc *desc, 23static void __init eseries_fixup(struct machine_desc *desc,
@@ -47,6 +47,19 @@ MACHINE_START(E330, "Toshiba e330")
47MACHINE_END 47MACHINE_END
48#endif 48#endif
49 49
50#ifdef CONFIG_MACH_E350
51MACHINE_START(E350, "Toshiba e350")
52 /* Maintainer: Ian Molton (spyro@f2s.com) */
53 .phys_io = 0x40000000,
54 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
55 .boot_params = 0xa0000100,
56 .map_io = pxa_map_io,
57 .init_irq = pxa25x_init_irq,
58 .fixup = eseries_fixup,
59 .timer = &pxa_timer,
60MACHINE_END
61#endif
62
50#ifdef CONFIG_MACH_E740 63#ifdef CONFIG_MACH_E740
51MACHINE_START(E740, "Toshiba e740") 64MACHINE_START(E740, "Toshiba e740")
52 /* Maintainer: Ian Molton (spyro@f2s.com) */ 65 /* Maintainer: Ian Molton (spyro@f2s.com) */
diff --git a/arch/arm/mach-pxa/eseries_udc.c b/arch/arm/mach-pxa/eseries_udc.c
new file mode 100644
index 000000000000..362847a10998
--- /dev/null
+++ b/arch/arm/mach-pxa/eseries_udc.c
@@ -0,0 +1,57 @@
1/*
2 * UDC functions for the Toshiba e-series PDAs
3 *
4 * Copyright (c) Ian Molton 2003
5 *
6 * This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 *
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/device.h>
16
17#include <asm/arch/udc.h>
18#include <asm/arch/eseries-gpio.h>
19#include <asm/arch/hardware.h>
20#include <asm/arch/pxa-regs.h>
21#include <asm/mach/arch.h>
22#include <asm/mach-types.h>
23#include <asm/mach/map.h>
24#include <asm/domain.h>
25
26/* local PXA generic code */
27#include "generic.h"
28
29static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
30 .gpio_vbus = GPIO_E7XX_USB_DISC,
31 .gpio_pullup = GPIO_E7XX_USB_PULLUP,
32 .gpio_pullup_inverted = 1
33};
34
35static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
36 .gpio_vbus = GPIO_E800_USB_DISC,
37 .gpio_pullup = GPIO_E800_USB_PULLUP,
38 .gpio_pullup_inverted = 1
39};
40
41static int __init eseries_udc_init(void)
42{
43 if (machine_is_e330() || machine_is_e350() ||
44 machine_is_e740() || machine_is_e750() ||
45 machine_is_e400())
46 pxa_set_udc_info(&e7xx_udc_mach_info);
47 else if (machine_is_e800())
48 pxa_set_udc_info(&e800_udc_mach_info);
49
50 return 0;
51}
52
53module_init(eseries_udc_init);
54
55MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
56MODULE_DESCRIPTION("eseries UDC support");
57MODULE_LICENSE("GPLv2");
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
new file mode 100644
index 000000000000..0143eed65398
--- /dev/null
+++ b/arch/arm/mach-pxa/ezx.c
@@ -0,0 +1,220 @@
1/*
2 * ezx.c - Common code for the EZX platform.
3 *
4 * Copyright (C) 2005-2006 Harald Welte <laforge@openezx.org>,
5 * 2007-2008 Daniel Ribeiro <drwyrm@gmail.com>,
6 * 2007-2008 Stefan Schmidt <stefan@datenfreihafen.org>
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 version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/delay.h>
18#include <linux/pwm_backlight.h>
19
20#include <asm/setup.h>
21#include <asm/arch/pxafb.h>
22#include <asm/arch/ohci.h>
23#include <asm/arch/i2c.h>
24
25#include <asm/arch/mfp-pxa27x.h>
26#include <asm/arch/pxa-regs.h>
27#include <asm/arch/pxa2xx-regs.h>
28#include <asm/mach-types.h>
29#include <asm/mach/arch.h>
30
31#include "devices.h"
32#include "generic.h"
33
34static struct platform_pwm_backlight_data ezx_backlight_data = {
35 .pwm_id = 0,
36 .max_brightness = 1023,
37 .dft_brightness = 1023,
38 .pwm_period_ns = 78770,
39};
40
41static struct platform_device ezx_backlight_device = {
42 .name = "pwm-backlight",
43 .dev = {
44 .parent = &pxa27x_device_pwm0.dev,
45 .platform_data = &ezx_backlight_data,
46 },
47};
48
49static struct pxafb_mode_info mode_ezx_old = {
50 .pixclock = 150000,
51 .xres = 240,
52 .yres = 320,
53 .bpp = 16,
54 .hsync_len = 10,
55 .left_margin = 20,
56 .right_margin = 10,
57 .vsync_len = 2,
58 .upper_margin = 3,
59 .lower_margin = 2,
60 .sync = 0,
61};
62
63static struct pxafb_mach_info ezx_fb_info_1 = {
64 .modes = &mode_ezx_old,
65 .num_modes = 1,
66 .lcd_conn = LCD_COLOR_TFT_16BPP,
67};
68
69static struct pxafb_mode_info mode_72r89803y01 = {
70 .pixclock = 192308,
71 .xres = 240,
72 .yres = 320,
73 .bpp = 32,
74 .depth = 18,
75 .hsync_len = 10,
76 .left_margin = 20,
77 .right_margin = 10,
78 .vsync_len = 2,
79 .upper_margin = 3,
80 .lower_margin = 2,
81 .sync = 0,
82};
83
84static struct pxafb_mach_info ezx_fb_info_2 = {
85 .modes = &mode_72r89803y01,
86 .num_modes = 1,
87 .lcd_conn = LCD_COLOR_TFT_18BPP,
88};
89
90static struct platform_device *devices[] __initdata = {
91 &ezx_backlight_device,
92};
93
94static unsigned long ezx_pin_config[] __initdata = {
95 /* PWM backlight */
96 GPIO16_PWM0_OUT,
97
98 /* BTUART */
99 GPIO42_BTUART_RXD,
100 GPIO43_BTUART_TXD,
101 GPIO44_BTUART_CTS,
102 GPIO45_BTUART_RTS,
103
104 /* STUART */
105 GPIO46_STUART_RXD,
106 GPIO47_STUART_TXD,
107
108 /* For A780 support (connected with Neptune GSM chip) */
109 GPIO30_USB_P3_2, /* ICL_TXENB */
110 GPIO31_USB_P3_6, /* ICL_VPOUT */
111 GPIO90_USB_P3_5, /* ICL_VPIN */
112 GPIO91_USB_P3_1, /* ICL_XRXD */
113 GPIO56_USB_P3_4, /* ICL_VMOUT */
114 GPIO113_USB_P3_3, /* /ICL_VMIN */
115};
116
117static void __init ezx_init(void)
118{
119 pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config));
120 pxa_set_i2c_info(NULL);
121 if (machine_is_ezx_a780() || machine_is_ezx_e680())
122 set_pxa_fb_info(&ezx_fb_info_1);
123 else
124 set_pxa_fb_info(&ezx_fb_info_2);
125
126 platform_add_devices(devices, ARRAY_SIZE(devices));
127}
128
129static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags,
130 char **cmdline, struct meminfo *mi)
131{
132 /* We have two ram chips. First one with 32MB at 0xA0000000 and a second
133 * 16MB one at 0xAC000000
134 */
135 mi->nr_banks = 2;
136 mi->bank[0].start = 0xa0000000;
137 mi->bank[0].node = 0;
138 mi->bank[0].size = (32*1024*1024);
139 mi->bank[1].start = 0xac000000;
140 mi->bank[1].node = 1;
141 mi->bank[1].size = (16*1024*1024);
142}
143
144#ifdef CONFIG_MACH_EZX_A780
145MACHINE_START(EZX_A780, "Motorola EZX A780")
146 .phys_io = 0x40000000,
147 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
148 .fixup = ezx_fixup,
149 .boot_params = 0xa0000100,
150 .map_io = pxa_map_io,
151 .init_irq = pxa27x_init_irq,
152 .timer = &pxa_timer,
153 .init_machine = &ezx_init,
154MACHINE_END
155#endif
156
157#ifdef CONFIG_MACH_EZX_E680
158MACHINE_START(EZX_E680, "Motorola EZX E680")
159 .phys_io = 0x40000000,
160 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
161 .fixup = ezx_fixup,
162 .boot_params = 0xa0000100,
163 .map_io = pxa_map_io,
164 .init_irq = pxa27x_init_irq,
165 .timer = &pxa_timer,
166 .init_machine = &ezx_init,
167MACHINE_END
168#endif
169
170#ifdef CONFIG_MACH_EZX_A1200
171MACHINE_START(EZX_A1200, "Motorola EZX A1200")
172 .phys_io = 0x40000000,
173 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
174 .fixup = ezx_fixup,
175 .boot_params = 0xa0000100,
176 .map_io = pxa_map_io,
177 .init_irq = pxa27x_init_irq,
178 .timer = &pxa_timer,
179 .init_machine = &ezx_init,
180MACHINE_END
181#endif
182
183#ifdef CONFIG_MACH_EZX_A910
184MACHINE_START(EZX_A910, "Motorola EZX A910")
185 .phys_io = 0x40000000,
186 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
187 .fixup = ezx_fixup,
188 .boot_params = 0xa0000100,
189 .map_io = pxa_map_io,
190 .init_irq = pxa27x_init_irq,
191 .timer = &pxa_timer,
192 .init_machine = &ezx_init,
193MACHINE_END
194#endif
195
196#ifdef CONFIG_MACH_EZX_E6
197MACHINE_START(EZX_E6, "Motorola EZX E6")
198 .phys_io = 0x40000000,
199 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
200 .fixup = ezx_fixup,
201 .boot_params = 0xa0000100,
202 .map_io = pxa_map_io,
203 .init_irq = pxa27x_init_irq,
204 .timer = &pxa_timer,
205 .init_machine = &ezx_init,
206MACHINE_END
207#endif
208
209#ifdef CONFIG_MACH_EZX_E2
210MACHINE_START(EZX_E2, "Motorola EZX E2")
211 .phys_io = 0x40000000,
212 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
213 .fixup = ezx_fixup,
214 .boot_params = 0xa0000100,
215 .map_io = pxa_map_io,
216 .init_irq = pxa27x_init_irq,
217 .timer = &pxa_timer,
218 .init_machine = &ezx_init,
219MACHINE_END
220#endif
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 530654474bb2..dd759d03a9fd 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -20,6 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/smc91x.h>
23 24
24#include <asm/types.h> 25#include <asm/types.h>
25#include <asm/setup.h> 26#include <asm/setup.h>
@@ -38,6 +39,7 @@
38#include <asm/arch/pxafb.h> 39#include <asm/arch/pxafb.h>
39#include <asm/arch/ssp.h> 40#include <asm/arch/ssp.h>
40#include <asm/arch/pxa27x_keypad.h> 41#include <asm/arch/pxa27x_keypad.h>
42#include <asm/arch/pxa3xx_nand.h>
41#include <asm/arch/littleton.h> 43#include <asm/arch/littleton.h>
42 44
43#include "generic.h" 45#include "generic.h"
@@ -101,18 +103,26 @@ static struct resource smc91x_resources[] = {
101 [1] = { 103 [1] = {
102 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), 104 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
103 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), 105 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
104 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, 106 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
105 } 107 }
106}; 108};
107 109
110static struct smc91x_platdata littleton_smc91x_info = {
111 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT |
112 SMC91X_NOWAIT | SMC91X_USE_DMA,
113};
114
108static struct platform_device smc91x_device = { 115static struct platform_device smc91x_device = {
109 .name = "smc91x", 116 .name = "smc91x",
110 .id = 0, 117 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources), 118 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources, 119 .resource = smc91x_resources,
120 .dev = {
121 .platform_data = &littleton_smc91x_info,
122 },
113}; 123};
114 124
115#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULES) 125#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
116/* use bit 30, 31 as the indicator of command parameter number */ 126/* use bit 30, 31 as the indicator of command parameter number */
117#define CMD0(x) ((0x00000000) | ((x) << 9)) 127#define CMD0(x) ((0x00000000) | ((x) << 9))
118#define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) 128#define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1))
@@ -311,9 +321,9 @@ static void littleton_init_lcd(void)
311} 321}
312#else 322#else
313static inline void littleton_init_lcd(void) {}; 323static inline void littleton_init_lcd(void) {};
314#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */ 324#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
315 325
316#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) 326#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
317static unsigned int littleton_matrix_key_map[] = { 327static unsigned int littleton_matrix_key_map[] = {
318 /* KEY(row, col, key_code) */ 328 /* KEY(row, col, key_code) */
319 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), 329 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
@@ -361,6 +371,57 @@ static void __init littleton_init_keypad(void)
361static inline void littleton_init_keypad(void) {} 371static inline void littleton_init_keypad(void) {}
362#endif 372#endif
363 373
374#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
375static struct mtd_partition littleton_nand_partitions[] = {
376 [0] = {
377 .name = "Bootloader",
378 .offset = 0,
379 .size = 0x060000,
380 .mask_flags = MTD_WRITEABLE, /* force read-only */
381 },
382 [1] = {
383 .name = "Kernel",
384 .offset = 0x060000,
385 .size = 0x200000,
386 .mask_flags = MTD_WRITEABLE, /* force read-only */
387 },
388 [2] = {
389 .name = "Filesystem",
390 .offset = 0x0260000,
391 .size = 0x3000000, /* 48M - rootfs */
392 },
393 [3] = {
394 .name = "MassStorage",
395 .offset = 0x3260000,
396 .size = 0x3d40000,
397 },
398 [4] = {
399 .name = "BBT",
400 .offset = 0x6FA0000,
401 .size = 0x80000,
402 .mask_flags = MTD_WRITEABLE, /* force read-only */
403 },
404 /* NOTE: we reserve some blocks at the end of the NAND flash for
405 * bad block management, and the max number of relocation blocks
406 * differs on different platforms. Please take care with it when
407 * defining the partition table.
408 */
409};
410
411static struct pxa3xx_nand_platform_data littleton_nand_info = {
412 .enable_arbiter = 1,
413 .parts = littleton_nand_partitions,
414 .nr_parts = ARRAY_SIZE(littleton_nand_partitions),
415};
416
417static void __init littleton_init_nand(void)
418{
419 pxa3xx_set_nand_info(&littleton_nand_info);
420}
421#else
422static inline void littleton_init_nand(void) {}
423#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
424
364static void __init littleton_init(void) 425static void __init littleton_init(void)
365{ 426{
366 /* initialize MFP configurations */ 427 /* initialize MFP configurations */
@@ -374,6 +435,7 @@ static void __init littleton_init(void)
374 435
375 littleton_init_lcd(); 436 littleton_init_lcd();
376 littleton_init_keypad(); 437 littleton_init_keypad();
438 littleton_init_nand();
377} 439}
378 440
379MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") 441MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)")
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index a3fae4139203..ac26423cd20c 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -21,6 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mtd/mtd.h> 22#include <linux/mtd/mtd.h>
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/smc91x.h>
24 25
25#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
26#include <linux/spi/ads7846.h> 27#include <linux/spi/ads7846.h>
@@ -226,14 +227,6 @@ static struct pxa2xx_spi_master pxa_ssp_master_info = {
226 .num_chipselect = 0, 227 .num_chipselect = 0,
227}; 228};
228 229
229static struct platform_device pxa_ssp = {
230 .name = "pxa2xx-spi",
231 .id = 1,
232 .dev = {
233 .platform_data = &pxa_ssp_master_info,
234 },
235};
236
237static int lubbock_ads7846_pendown_state(void) 230static int lubbock_ads7846_pendown_state(void)
238{ 231{
239 /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */ 232 /* TS_BUSY is bit 8 in LUB_MISC_RD, but pendown is irq-only */
@@ -292,11 +285,18 @@ static struct resource smc91x_resources[] = {
292 }, 285 },
293}; 286};
294 287
288static struct smc91x_platdata lubbock_smc91x_info = {
289 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_IO_SHIFT_2,
290};
291
295static struct platform_device smc91x_device = { 292static struct platform_device smc91x_device = {
296 .name = "smc91x", 293 .name = "smc91x",
297 .id = -1, 294 .id = -1,
298 .num_resources = ARRAY_SIZE(smc91x_resources), 295 .num_resources = ARRAY_SIZE(smc91x_resources),
299 .resource = smc91x_resources, 296 .resource = smc91x_resources,
297 .dev = {
298 .platform_data = &lubbock_smc91x_info,
299 },
300}; 300};
301 301
302static struct resource flash_resources[] = { 302static struct resource flash_resources[] = {
@@ -367,7 +367,6 @@ static struct platform_device *devices[] __initdata = {
367 &smc91x_device, 367 &smc91x_device,
368 &lubbock_flash_device[0], 368 &lubbock_flash_device[0],
369 &lubbock_flash_device[1], 369 &lubbock_flash_device[1],
370 &pxa_ssp,
371}; 370};
372 371
373static struct pxafb_mode_info sharp_lm8v31_mode = { 372static struct pxafb_mode_info sharp_lm8v31_mode = {
@@ -471,6 +470,7 @@ static void lubbock_irda_transceiver_mode(struct device *dev, int mode)
471 } else if (mode & IR_FIRMODE) { 470 } else if (mode & IR_FIRMODE) {
472 LUB_MISC_WR |= 1 << 4; 471 LUB_MISC_WR |= 1 << 4;
473 } 472 }
473 pxa2xx_transceiver_mode(dev, mode);
474 local_irq_restore(flags); 474 local_irq_restore(flags);
475} 475}
476 476
@@ -501,6 +501,7 @@ static void __init lubbock_init(void)
501 lubbock_flash_data[flashboot].name = "boot-rom"; 501 lubbock_flash_data[flashboot].name = "boot-rom";
502 (void) platform_add_devices(devices, ARRAY_SIZE(devices)); 502 (void) platform_add_devices(devices, ARRAY_SIZE(devices));
503 503
504 pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
504 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); 505 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
505} 506}
506 507
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 01b2fa790217..c9d274f0048f 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -17,17 +17,15 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/gpio.h>
20#include <linux/gpio_keys.h> 21#include <linux/gpio_keys.h>
21#include <linux/input.h> 22#include <linux/input.h>
22#include <linux/mfd/htc-egpio.h> 23#include <linux/mfd/htc-egpio.h>
23#include <linux/mfd/htc-pasic3.h> 24#include <linux/mfd/htc-pasic3.h>
24#include <linux/mtd/mtd.h>
25#include <linux/mtd/map.h>
26#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
27#include <linux/pda_power.h> 26#include <linux/pda_power.h>
28#include <linux/pwm_backlight.h> 27#include <linux/pwm_backlight.h>
29 28
30#include <asm/gpio.h>
31#include <asm/hardware.h> 29#include <asm/hardware.h>
32#include <asm/mach-types.h> 30#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -44,7 +42,7 @@
44#include "devices.h" 42#include "devices.h"
45#include "generic.h" 43#include "generic.h"
46 44
47static unsigned long magician_pin_config[] = { 45static unsigned long magician_pin_config[] __initdata = {
48 46
49 /* SDRAM and Static Memory I/O Signals */ 47 /* SDRAM and Static Memory I/O Signals */
50 GPIO20_nSDCS_2, 48 GPIO20_nSDCS_2,
@@ -134,6 +132,7 @@ static unsigned long magician_pin_config[] = {
134static void magician_irda_transceiver_mode(struct device *dev, int mode) 132static void magician_irda_transceiver_mode(struct device *dev, int mode)
135{ 133{
136 gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF); 134 gpio_set_value(GPIO83_MAGICIAN_nIR_EN, mode & IR_OFF);
135 pxa2xx_transceiver_mode(dev, mode);
137} 136}
138 137
139static struct pxaficp_platform_data magician_ficp_info = { 138static struct pxaficp_platform_data magician_ficp_info = {
@@ -399,6 +398,7 @@ static struct platform_pwm_backlight_data backlight_data = {
399 398
400static struct platform_device backlight = { 399static struct platform_device backlight = {
401 .name = "pwm-backlight", 400 .name = "pwm-backlight",
401 .id = -1,
402 .dev = { 402 .dev = {
403 .parent = &pxa27x_device_pwm0.dev, 403 .parent = &pxa27x_device_pwm0.dev,
404 .platform_data = &backlight_data, 404 .platform_data = &backlight_data,
@@ -511,6 +511,37 @@ static struct platform_device pasic3 = {
511 * External power 511 * External power
512 */ 512 */
513 513
514static int power_supply_init(struct device *dev)
515{
516 int ret;
517
518 ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_AC, "CABLE_STATE_AC");
519 if (ret)
520 goto err_cs_ac;
521 ret = gpio_request(EGPIO_MAGICIAN_CABLE_STATE_USB, "CABLE_STATE_USB");
522 if (ret)
523 goto err_cs_usb;
524 ret = gpio_request(EGPIO_MAGICIAN_CHARGE_EN, "CHARGE_EN");
525 if (ret)
526 goto err_chg_en;
527 ret = gpio_request(GPIO30_MAGICIAN_nCHARGE_EN, "nCHARGE_EN");
528 if (!ret)
529 ret = gpio_direction_output(GPIO30_MAGICIAN_nCHARGE_EN, 0);
530 if (ret)
531 goto err_nchg_en;
532
533 return 0;
534
535err_nchg_en:
536 gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
537err_chg_en:
538 gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
539err_cs_usb:
540 gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
541err_cs_ac:
542 return ret;
543}
544
514static int magician_is_ac_online(void) 545static int magician_is_ac_online(void)
515{ 546{
516 return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC); 547 return gpio_get_value(EGPIO_MAGICIAN_CABLE_STATE_AC);
@@ -527,14 +558,24 @@ static void magician_set_charge(int flags)
527 gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags); 558 gpio_set_value(EGPIO_MAGICIAN_CHARGE_EN, flags);
528} 559}
529 560
561static void power_supply_exit(struct device *dev)
562{
563 gpio_free(GPIO30_MAGICIAN_nCHARGE_EN);
564 gpio_free(EGPIO_MAGICIAN_CHARGE_EN);
565 gpio_free(EGPIO_MAGICIAN_CABLE_STATE_USB);
566 gpio_free(EGPIO_MAGICIAN_CABLE_STATE_AC);
567}
568
530static char *magician_supplicants[] = { 569static char *magician_supplicants[] = {
531 "ds2760-battery.0", "backup-battery" 570 "ds2760-battery.0", "backup-battery"
532}; 571};
533 572
534static struct pda_power_pdata power_supply_info = { 573static struct pda_power_pdata power_supply_info = {
574 .init = power_supply_init,
535 .is_ac_online = magician_is_ac_online, 575 .is_ac_online = magician_is_ac_online,
536 .is_usb_online = magician_is_usb_online, 576 .is_usb_online = magician_is_usb_online,
537 .set_charge = magician_set_charge, 577 .set_charge = magician_set_charge,
578 .exit = power_supply_exit,
538 .supplied_to = magician_supplicants, 579 .supplied_to = magician_supplicants,
539 .num_supplicants = ARRAY_SIZE(magician_supplicants), 580 .num_supplicants = ARRAY_SIZE(magician_supplicants),
540}; 581};
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index f2e9e7c4da8e..851ec2d9b699 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -26,6 +26,7 @@
26#include <linux/input.h> 26#include <linux/input.h>
27#include <linux/gpio_keys.h> 27#include <linux/gpio_keys.h>
28#include <linux/pwm_backlight.h> 28#include <linux/pwm_backlight.h>
29#include <linux/smc91x.h>
29 30
30#include <asm/types.h> 31#include <asm/types.h>
31#include <asm/setup.h> 32#include <asm/setup.h>
@@ -110,9 +111,9 @@ static unsigned long mainstone_pin_config[] = {
110 GPIO45_AC97_SYSCLK, 111 GPIO45_AC97_SYSCLK,
111 112
112 /* Keypad */ 113 /* Keypad */
113 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, 114 GPIO93_KP_DKIN_0,
114 GPIO94_KP_DKIN_1 | WAKEUP_ON_LEVEL_HIGH, 115 GPIO94_KP_DKIN_1,
115 GPIO95_KP_DKIN_2 | WAKEUP_ON_LEVEL_HIGH, 116 GPIO95_KP_DKIN_2,
116 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 117 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
117 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, 118 GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH,
118 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, 119 GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH,
@@ -240,11 +241,19 @@ static struct resource smc91x_resources[] = {
240 } 241 }
241}; 242};
242 243
244static struct smc91x_platdata mainstone_smc91x_info = {
245 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
246 SMC91X_NOWAIT | SMC91X_USE_DMA,
247};
248
243static struct platform_device smc91x_device = { 249static struct platform_device smc91x_device = {
244 .name = "smc91x", 250 .name = "smc91x",
245 .id = 0, 251 .id = 0,
246 .num_resources = ARRAY_SIZE(smc91x_resources), 252 .num_resources = ARRAY_SIZE(smc91x_resources),
247 .resource = smc91x_resources, 253 .resource = smc91x_resources,
254 .dev = {
255 .platform_data = &mainstone_smc91x_info,
256 },
248}; 257};
249 258
250static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) 259static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv)
@@ -455,6 +464,7 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode)
455 } else if (mode & IR_FIRMODE) { 464 } else if (mode & IR_FIRMODE) {
456 MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; 465 MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR;
457 } 466 }
467 pxa2xx_transceiver_mode(dev, mode);
458 if (mode & IR_OFF) { 468 if (mode & IR_OFF) {
459 MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; 469 MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF;
460 } else { 470 } else {
@@ -513,7 +523,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
513 .init = mainstone_ohci_init, 523 .init = mainstone_ohci_init,
514}; 524};
515 525
516#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) 526#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
517static unsigned int mainstone_matrix_keys[] = { 527static unsigned int mainstone_matrix_keys[] = {
518 KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), 528 KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
519 KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), 529 KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index d1cdb4ecb0b8..fd4545eab803 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -39,6 +39,28 @@ struct gpio_desc {
39 39
40static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; 40static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1];
41 41
42static int __mfp_config_lpm(unsigned gpio, unsigned long lpm)
43{
44 unsigned mask = GPIO_bit(gpio);
45
46 /* low power state */
47 switch (lpm) {
48 case MFP_LPM_DRIVE_HIGH:
49 PGSR(gpio) |= mask;
50 break;
51 case MFP_LPM_DRIVE_LOW:
52 PGSR(gpio) &= ~mask;
53 break;
54 case MFP_LPM_INPUT:
55 break;
56 default:
57 pr_warning("%s: invalid low power state for GPIO%d\n",
58 __func__, gpio);
59 return -EINVAL;
60 }
61 return 0;
62}
63
42static int __mfp_config_gpio(unsigned gpio, unsigned long c) 64static int __mfp_config_gpio(unsigned gpio, unsigned long c)
43{ 65{
44 unsigned long gafr, mask = GPIO_bit(gpio); 66 unsigned long gafr, mask = GPIO_bit(gpio);
@@ -57,21 +79,8 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
57 else 79 else
58 GPDR(gpio) &= ~mask; 80 GPDR(gpio) &= ~mask;
59 81
60 /* low power state */ 82 if (__mfp_config_lpm(gpio, c & MFP_LPM_STATE_MASK))
61 switch (c & MFP_LPM_STATE_MASK) {
62 case MFP_LPM_DRIVE_HIGH:
63 PGSR(gpio) |= mask;
64 break;
65 case MFP_LPM_DRIVE_LOW:
66 PGSR(gpio) &= ~mask;
67 break;
68 case MFP_LPM_INPUT:
69 break;
70 default:
71 pr_warning("%s: invalid low power state for GPIO%d\n",
72 __func__, gpio);
73 return -EINVAL; 83 return -EINVAL;
74 }
75 84
76 /* give early warning if MFP_LPM_CAN_WAKEUP is set on the 85 /* give early warning if MFP_LPM_CAN_WAKEUP is set on the
77 * configurations of those pins not able to wakeup 86 * configurations of those pins not able to wakeup
@@ -91,6 +100,18 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c)
91 return 0; 100 return 0;
92} 101}
93 102
103static inline int __mfp_validate(int mfp)
104{
105 int gpio = mfp_to_gpio(mfp);
106
107 if ((mfp > MFP_PIN_GPIO127) || !gpio_desc[gpio].valid) {
108 pr_warning("%s: GPIO%d is invalid pin\n", __func__, gpio);
109 return -1;
110 }
111
112 return gpio;
113}
114
94void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num) 115void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
95{ 116{
96 unsigned long flags; 117 unsigned long flags;
@@ -99,13 +120,9 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
99 120
100 for (i = 0, c = mfp_cfgs; i < num; i++, c++) { 121 for (i = 0, c = mfp_cfgs; i < num; i++, c++) {
101 122
102 gpio = mfp_to_gpio(MFP_PIN(*c)); 123 gpio = __mfp_validate(MFP_PIN(*c));
103 124 if (gpio < 0)
104 if (!gpio_desc[gpio].valid) {
105 pr_warning("%s: GPIO%d is invalid pin\n",
106 __func__, gpio);
107 continue; 125 continue;
108 }
109 126
110 local_irq_save(flags); 127 local_irq_save(flags);
111 128
@@ -116,6 +133,20 @@ void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num)
116 } 133 }
117} 134}
118 135
136void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm)
137{
138 unsigned long flags;
139 int gpio;
140
141 gpio = __mfp_validate(mfp);
142 if (gpio < 0)
143 return;
144
145 local_irq_save(flags);
146 __mfp_config_lpm(gpio, lpm);
147 local_irq_restore(flags);
148}
149
119int gpio_set_wake(unsigned int gpio, unsigned int on) 150int gpio_set_wake(unsigned int gpio, unsigned int on)
120{ 151{
121 struct gpio_desc *d; 152 struct gpio_desc *d;
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
new file mode 100644
index 000000000000..408657a24f8c
--- /dev/null
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -0,0 +1,416 @@
1/*
2 * Hardware definitions for PalmTX
3 *
4 * Author: Marek Vasut <marek.vasut@gmail.com>
5 *
6 * Based on work of:
7 * Alex Osborne <ato@meshy.org>
8 * Cristiano P. <cristianop@users.sourceforge.net>
9 * Jan Herman <2hp@seznam.cz>
10 * Michal Hrusecky
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 *
16 * (find more info at www.hackndev.com)
17 *
18 */
19
20#include <linux/platform_device.h>
21#include <linux/delay.h>
22#include <linux/irq.h>
23#include <linux/gpio_keys.h>
24#include <linux/input.h>
25#include <linux/pda_power.h>
26#include <linux/pwm_backlight.h>
27#include <linux/gpio.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/mach/map.h>
32
33#include <asm/arch/audio.h>
34#include <asm/arch/palmtx.h>
35#include <asm/arch/mmc.h>
36#include <asm/arch/pxafb.h>
37#include <asm/arch/pxa-regs.h>
38#include <asm/arch/mfp-pxa27x.h>
39#include <asm/arch/irda.h>
40#include <asm/arch/pxa27x_keypad.h>
41#include <asm/arch/udc.h>
42
43#include "generic.h"
44#include "devices.h"
45
46/******************************************************************************
47 * Pin configuration
48 ******************************************************************************/
49static unsigned long palmtx_pin_config[] __initdata = {
50 /* MMC */
51 GPIO32_MMC_CLK,
52 GPIO92_MMC_DAT_0,
53 GPIO109_MMC_DAT_1,
54 GPIO110_MMC_DAT_2,
55 GPIO111_MMC_DAT_3,
56 GPIO112_MMC_CMD,
57
58 /* AC97 */
59 GPIO28_AC97_BITCLK,
60 GPIO29_AC97_SDATA_IN_0,
61 GPIO30_AC97_SDATA_OUT,
62 GPIO31_AC97_SYNC,
63
64 /* IrDA */
65 GPIO46_FICP_RXD,
66 GPIO47_FICP_TXD,
67
68 /* PWM */
69 GPIO16_PWM0_OUT,
70
71 /* USB */
72 GPIO13_GPIO,
73
74 /* PCMCIA */
75 GPIO48_nPOE,
76 GPIO49_nPWE,
77 GPIO50_nPIOR,
78 GPIO51_nPIOW,
79 GPIO85_nPCE_1,
80 GPIO54_nPCE_2,
81 GPIO79_PSKTSEL,
82 GPIO55_nPREG,
83 GPIO56_nPWAIT,
84 GPIO57_nIOIS16,
85};
86
87/******************************************************************************
88 * SD/MMC card controller
89 ******************************************************************************/
90static int palmtx_mci_init(struct device *dev, irq_handler_t palmtx_detect_int,
91 void *data)
92{
93 int err = 0;
94
95 /* Setup an interrupt for detecting card insert/remove events */
96 err = request_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, palmtx_detect_int,
97 IRQF_DISABLED | IRQF_SAMPLE_RANDOM |
98 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
99 "SD/MMC card detect", data);
100 if (err) {
101 printk(KERN_ERR "%s: cannot request SD/MMC card detect IRQ\n",
102 __func__);
103 return err;
104 }
105
106 err = gpio_request(GPIO_NR_PALMTX_SD_POWER, "SD_POWER");
107 if (err)
108 goto pwr_err;
109
110 err = gpio_request(GPIO_NR_PALMTX_SD_READONLY, "SD_READONLY");
111 if (err)
112 goto ro_err;
113
114 printk(KERN_DEBUG "%s: irq registered\n", __func__);
115
116 return 0;
117
118ro_err:
119 gpio_free(GPIO_NR_PALMTX_SD_POWER);
120pwr_err:
121 free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
122 return err;
123}
124
125static void palmtx_mci_exit(struct device *dev, void *data)
126{
127 gpio_free(GPIO_NR_PALMTX_SD_READONLY);
128 gpio_free(GPIO_NR_PALMTX_SD_POWER);
129 free_irq(IRQ_GPIO_PALMTX_SD_DETECT_N, data);
130}
131
132static void palmtx_mci_power(struct device *dev, unsigned int vdd)
133{
134 struct pxamci_platform_data *p_d = dev->platform_data;
135 gpio_set_value(GPIO_NR_PALMTX_SD_POWER, p_d->ocr_mask & (1 << vdd));
136}
137
138static int palmtx_mci_get_ro(struct device *dev)
139{
140 return gpio_get_value(GPIO_NR_PALMTX_SD_READONLY);
141}
142
143static struct pxamci_platform_data palmtx_mci_platform_data = {
144 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
145 .setpower = palmtx_mci_power,
146 .get_ro = palmtx_mci_get_ro,
147 .init = palmtx_mci_init,
148 .exit = palmtx_mci_exit,
149};
150
151/******************************************************************************
152 * GPIO keyboard
153 ******************************************************************************/
154static unsigned int palmtx_matrix_keys[] = {
155 KEY(0, 0, KEY_POWER),
156 KEY(0, 1, KEY_F1),
157 KEY(0, 2, KEY_ENTER),
158
159 KEY(1, 0, KEY_F2),
160 KEY(1, 1, KEY_F3),
161 KEY(1, 2, KEY_F4),
162
163 KEY(2, 0, KEY_UP),
164 KEY(2, 2, KEY_DOWN),
165
166 KEY(3, 0, KEY_RIGHT),
167 KEY(3, 2, KEY_LEFT),
168
169};
170
171static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = {
172 .matrix_key_rows = 4,
173 .matrix_key_cols = 3,
174 .matrix_key_map = palmtx_matrix_keys,
175 .matrix_key_map_size = ARRAY_SIZE(palmtx_matrix_keys),
176
177 .debounce_interval = 30,
178};
179
180/******************************************************************************
181 * GPIO keys
182 ******************************************************************************/
183static struct gpio_keys_button palmtx_pxa_buttons[] = {
184 {KEY_F8, GPIO_NR_PALMTX_HOTSYNC_BUTTON_N, 1, "HotSync Button" },
185};
186
187static struct gpio_keys_platform_data palmtx_pxa_keys_data = {
188 .buttons = palmtx_pxa_buttons,
189 .nbuttons = ARRAY_SIZE(palmtx_pxa_buttons),
190};
191
192static struct platform_device palmtx_pxa_keys = {
193 .name = "gpio-keys",
194 .id = -1,
195 .dev = {
196 .platform_data = &palmtx_pxa_keys_data,
197 },
198};
199
200/******************************************************************************
201 * Backlight
202 ******************************************************************************/
203static int palmtx_backlight_init(struct device *dev)
204{
205 int ret;
206
207 ret = gpio_request(GPIO_NR_PALMTX_BL_POWER, "BL POWER");
208 if (ret)
209 goto err;
210 ret = gpio_request(GPIO_NR_PALMTX_LCD_POWER, "LCD POWER");
211 if (ret)
212 goto err2;
213
214 return 0;
215err2:
216 gpio_free(GPIO_NR_PALMTX_BL_POWER);
217err:
218 return ret;
219}
220
221static int palmtx_backlight_notify(int brightness)
222{
223 gpio_set_value(GPIO_NR_PALMTX_BL_POWER, brightness);
224 gpio_set_value(GPIO_NR_PALMTX_LCD_POWER, brightness);
225 return brightness;
226}
227
228static void palmtx_backlight_exit(struct device *dev)
229{
230 gpio_free(GPIO_NR_PALMTX_BL_POWER);
231 gpio_free(GPIO_NR_PALMTX_LCD_POWER);
232}
233
234static struct platform_pwm_backlight_data palmtx_backlight_data = {
235 .pwm_id = 0,
236 .max_brightness = PALMTX_MAX_INTENSITY,
237 .dft_brightness = PALMTX_MAX_INTENSITY,
238 .pwm_period_ns = PALMTX_PERIOD_NS,
239 .init = palmtx_backlight_init,
240 .notify = palmtx_backlight_notify,
241 .exit = palmtx_backlight_exit,
242};
243
244static struct platform_device palmtx_backlight = {
245 .name = "pwm-backlight",
246 .dev = {
247 .parent = &pxa27x_device_pwm0.dev,
248 .platform_data = &palmtx_backlight_data,
249 },
250};
251
252/******************************************************************************
253 * IrDA
254 ******************************************************************************/
255static void palmtx_irda_transceiver_mode(struct device *dev, int mode)
256{
257 gpio_set_value(GPIO_NR_PALMTX_IR_DISABLE, mode & IR_OFF);
258 pxa2xx_transceiver_mode(dev, mode);
259}
260
261static struct pxaficp_platform_data palmtx_ficp_platform_data = {
262 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
263 .transceiver_mode = palmtx_irda_transceiver_mode,
264};
265
266/******************************************************************************
267 * UDC
268 ******************************************************************************/
269static void palmtx_udc_command(int cmd)
270{
271 gpio_set_value(GPIO_NR_PALMTX_USB_POWER, !cmd);
272 udelay(50);
273 gpio_set_value(GPIO_NR_PALMTX_USB_PULLUP, !cmd);
274}
275
276static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = {
277 .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N,
278 .gpio_vbus_inverted = 1,
279 .udc_command = palmtx_udc_command,
280};
281
282/******************************************************************************
283 * Power supply
284 ******************************************************************************/
285static int power_supply_init(struct device *dev)
286{
287 int ret;
288
289 ret = gpio_request(GPIO_NR_PALMTX_POWER_DETECT, "CABLE_STATE_AC");
290 if (ret)
291 goto err_cs_ac;
292
293 ret = gpio_request(GPIO_NR_PALMTX_USB_DETECT_N, "CABLE_STATE_USB");
294 if (ret)
295 goto err_cs_usb;
296
297 return 0;
298
299err_cs_usb:
300 gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
301err_cs_ac:
302 return ret;
303}
304
305static int palmtx_is_ac_online(void)
306{
307 return gpio_get_value(GPIO_NR_PALMTX_POWER_DETECT);
308}
309
310static int palmtx_is_usb_online(void)
311{
312 return !gpio_get_value(GPIO_NR_PALMTX_USB_DETECT_N);
313}
314
315static void power_supply_exit(struct device *dev)
316{
317 gpio_free(GPIO_NR_PALMTX_USB_DETECT_N);
318 gpio_free(GPIO_NR_PALMTX_POWER_DETECT);
319}
320
321static char *palmtx_supplicants[] = {
322 "main-battery",
323};
324
325static struct pda_power_pdata power_supply_info = {
326 .init = power_supply_init,
327 .is_ac_online = palmtx_is_ac_online,
328 .is_usb_online = palmtx_is_usb_online,
329 .exit = power_supply_exit,
330 .supplied_to = palmtx_supplicants,
331 .num_supplicants = ARRAY_SIZE(palmtx_supplicants),
332};
333
334static struct platform_device power_supply = {
335 .name = "pda-power",
336 .id = -1,
337 .dev = {
338 .platform_data = &power_supply_info,
339 },
340};
341
342/******************************************************************************
343 * Framebuffer
344 ******************************************************************************/
345static struct pxafb_mode_info palmtx_lcd_modes[] = {
346{
347 .pixclock = 57692,
348 .xres = 320,
349 .yres = 480,
350 .bpp = 16,
351
352 .left_margin = 32,
353 .right_margin = 1,
354 .upper_margin = 7,
355 .lower_margin = 1,
356
357 .hsync_len = 4,
358 .vsync_len = 1,
359},
360};
361
362static struct pxafb_mach_info palmtx_lcd_screen = {
363 .modes = palmtx_lcd_modes,
364 .num_modes = ARRAY_SIZE(palmtx_lcd_modes),
365 .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL,
366};
367
368/******************************************************************************
369 * Machine init
370 ******************************************************************************/
371static struct platform_device *devices[] __initdata = {
372#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
373 &palmtx_pxa_keys,
374#endif
375 &palmtx_backlight,
376 &power_supply,
377};
378
379static struct map_desc palmtx_io_desc[] __initdata = {
380{
381 .virtual = PALMTX_PCMCIA_VIRT,
382 .pfn = __phys_to_pfn(PALMTX_PCMCIA_PHYS),
383 .length = PALMTX_PCMCIA_SIZE,
384 .type = MT_DEVICE
385},
386};
387
388static void __init palmtx_map_io(void)
389{
390 pxa_map_io();
391 iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc));
392}
393
394static void __init palmtx_init(void)
395{
396 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
397
398 set_pxa_fb_info(&palmtx_lcd_screen);
399 pxa_set_mci_info(&palmtx_mci_platform_data);
400 pxa_set_udc_info(&palmtx_udc_info);
401 pxa_set_ac97_info(NULL);
402 pxa_set_ficp_info(&palmtx_ficp_platform_data);
403 pxa_set_keypad_info(&palmtx_keypad_platform_data);
404
405 platform_add_devices(devices, ARRAY_SIZE(devices));
406}
407
408MACHINE_START(PALMTX, "Palm T|X")
409 .phys_io = PALMTX_PHYS_IO_START,
410 .io_pg_offst = io_p2v(0x40000000),
411 .boot_params = 0xa0000100,
412 .map_io = palmtx_map_io,
413 .init_irq = pxa27x_init_irq,
414 .timer = &pxa_timer,
415 .init_machine = palmtx_init
416MACHINE_END
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index 3b945eb0aee3..377f3be8ce57 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -24,7 +24,9 @@
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/mtd/physmap.h> 25#include <linux/mtd/physmap.h>
26#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
27#include <linux/spi/max7301.h>
27#include <linux/leds.h> 28#include <linux/leds.h>
29
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
30#include <asm/arch/hardware.h> 32#include <asm/arch/hardware.h>
@@ -108,6 +110,32 @@ static struct platform_device smc91x_device = {
108 .resource = smc91x_resources, 110 .resource = smc91x_resources,
109}; 111};
110 112
113/*
114 * SPI host and devices
115 */
116static struct pxa2xx_spi_master pxa_ssp_master_info = {
117 .num_chipselect = 1,
118};
119
120static struct max7301_platform_data max7301_info = {
121 .base = -1,
122};
123
124/* bus_num must match id in pxa2xx_set_spi_info() call */
125static struct spi_board_info spi_board_info[] __initdata = {
126 {
127 .modalias = "max7301",
128 .platform_data = &max7301_info,
129 .max_speed_hz = 13000000,
130 .bus_num = 1,
131 .chip_select = 0,
132 .mode = SPI_MODE_0,
133 },
134};
135
136/*
137 * NOR flash
138 */
111static struct physmap_flash_data pcm027_flash_data = { 139static struct physmap_flash_data pcm027_flash_data = {
112 .width = 4, 140 .width = 4,
113}; 141};
@@ -190,6 +218,9 @@ static void __init pcm027_init(void)
190#ifdef CONFIG_MACH_PCM990_BASEBOARD 218#ifdef CONFIG_MACH_PCM990_BASEBOARD
191 pcm990_baseboard_init(); 219 pcm990_baseboard_init();
192#endif 220#endif
221
222 pxa2xx_set_spi_info(1, &pxa_ssp_master_info);
223 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
193} 224}
194 225
195static void __init pcm027_map_io(void) 226static void __init pcm027_map_io(void)
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index 5d87c7c866e4..30023b00e476 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -33,14 +33,30 @@
33#include <asm/arch/camera.h> 33#include <asm/arch/camera.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/arch/pxa-regs.h> 35#include <asm/arch/pxa-regs.h>
36#include <asm/arch/pxa2xx-gpio.h>
37#include <asm/arch/audio.h> 36#include <asm/arch/audio.h>
38#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
39#include <asm/arch/ohci.h> 38#include <asm/arch/ohci.h>
40#include <asm/arch/pcm990_baseboard.h> 39#include <asm/arch/pcm990_baseboard.h>
41#include <asm/arch/pxafb.h> 40#include <asm/arch/pxafb.h>
41#include <asm/arch/mfp-pxa27x.h>
42 42
43#include "devices.h" 43#include "devices.h"
44#include "generic.h"
45
46static unsigned long pcm990_pin_config[] __initdata = {
47 /* MMC */
48 GPIO32_MMC_CLK,
49 GPIO112_MMC_CMD,
50 GPIO92_MMC_DAT_0,
51 GPIO109_MMC_DAT_1,
52 GPIO110_MMC_DAT_2,
53 GPIO111_MMC_DAT_3,
54 /* USB */
55 GPIO88_USBH1_PWR,
56 GPIO89_USBH1_PEN,
57 /* PWM0 */
58 GPIO16_PWM0_OUT,
59};
44 60
45/* 61/*
46 * pcm990_lcd_power - control power supply to the LCD 62 * pcm990_lcd_power - control power supply to the LCD
@@ -277,16 +293,6 @@ static int pcm990_mci_init(struct device *dev, irq_handler_t mci_detect_int,
277{ 293{
278 int err; 294 int err;
279 295
280 /*
281 * enable GPIO for PXA27x MMC controller
282 */
283 pxa_gpio_mode(GPIO32_MMCCLK_MD);
284 pxa_gpio_mode(GPIO112_MMCCMD_MD);
285 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
286 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
287 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
288 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
289
290 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED, 296 err = request_irq(PCM027_MMCDET_IRQ, mci_detect_int, IRQF_DISABLED,
291 "MMC card detect", data); 297 "MMC card detect", data);
292 if (err) 298 if (err)
@@ -333,8 +339,6 @@ static struct pxamci_platform_data pcm990_mci_platform_data = {
333 */ 339 */
334static int pcm990_ohci_init(struct device *dev) 340static int pcm990_ohci_init(struct device *dev)
335{ 341{
336 pxa_gpio_mode(PCM990_USB_OVERCURRENT);
337 pxa_gpio_mode(PCM990_USB_PWR_EN);
338 /* 342 /*
339 * disable USB port 2 and 3 343 * disable USB port 2 and 3
340 * power sense is active low 344 * power sense is active low
@@ -361,23 +365,27 @@ static struct pxaohci_platform_data pcm990_ohci_platform_data = {
361 * PXA27x Camera specific stuff 365 * PXA27x Camera specific stuff
362 */ 366 */
363#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 367#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
368static unsigned long pcm990_camera_pin_config[] = {
369 /* CIF */
370 GPIO98_CIF_DD_0,
371 GPIO105_CIF_DD_1,
372 GPIO104_CIF_DD_2,
373 GPIO103_CIF_DD_3,
374 GPIO95_CIF_DD_4,
375 GPIO94_CIF_DD_5,
376 GPIO93_CIF_DD_6,
377 GPIO108_CIF_DD_7,
378 GPIO107_CIF_DD_8,
379 GPIO106_CIF_DD_9,
380 GPIO42_CIF_MCLK,
381 GPIO45_CIF_PCLK,
382 GPIO43_CIF_FV,
383 GPIO44_CIF_LV,
384};
385
364static int pcm990_pxacamera_init(struct device *dev) 386static int pcm990_pxacamera_init(struct device *dev)
365{ 387{
366 pxa_gpio_mode(GPIO98_CIF_DD_0_MD); 388 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_camera_pin_config));
367 pxa_gpio_mode(GPIO105_CIF_DD_1_MD);
368 pxa_gpio_mode(GPIO104_CIF_DD_2_MD);
369 pxa_gpio_mode(GPIO103_CIF_DD_3_MD);
370 pxa_gpio_mode(GPIO95_CIF_DD_4_MD);
371 pxa_gpio_mode(GPIO94_CIF_DD_5_MD);
372 pxa_gpio_mode(GPIO93_CIF_DD_6_MD);
373 pxa_gpio_mode(GPIO108_CIF_DD_7_MD);
374 pxa_gpio_mode(GPIO107_CIF_DD_8_MD);
375 pxa_gpio_mode(GPIO106_CIF_DD_9_MD);
376 pxa_gpio_mode(GPIO42_CIF_MCLK_MD);
377 pxa_gpio_mode(GPIO45_CIF_PCLK_MD);
378 pxa_gpio_mode(GPIO43_CIF_FV_MD);
379 pxa_gpio_mode(GPIO44_CIF_LV_MD);
380
381 return 0; 389 return 0;
382} 390}
383 391
@@ -449,8 +457,10 @@ static struct map_desc pcm990_io_desc[] __initdata = {
449 */ 457 */
450void __init pcm990_baseboard_init(void) 458void __init pcm990_baseboard_init(void)
451{ 459{
460 pxa2xx_mfp_config(ARRAY_AND_SIZE(pcm990_pin_config));
461
452 /* register CPLD access */ 462 /* register CPLD access */
453 iotable_init(pcm990_io_desc, ARRAY_SIZE(pcm990_io_desc)); 463 iotable_init(ARRAY_AND_SIZE(pcm990_io_desc));
454 464
455 /* register CPLD's IRQ controller */ 465 /* register CPLD's IRQ controller */
456 pcm990_init_irq(); 466 pcm990_init_irq();
@@ -458,7 +468,6 @@ void __init pcm990_baseboard_init(void)
458#ifndef CONFIG_PCM990_DISPLAY_NONE 468#ifndef CONFIG_PCM990_DISPLAY_NONE
459 set_pxa_fb_info(&pcm990_fbinfo); 469 set_pxa_fb_info(&pcm990_fbinfo);
460#endif 470#endif
461 pxa_gpio_mode(GPIO16_PWM0_MD);
462 platform_device_register(&pcm990_backlight_device); 471 platform_device_register(&pcm990_backlight_device);
463 472
464 /* MMC */ 473 /* MMC */
@@ -473,9 +482,8 @@ void __init pcm990_baseboard_init(void)
473#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE) 482#if defined(CONFIG_VIDEO_PXA27x) || defined(CONFIG_VIDEO_PXA27x_MODULE)
474 pxa_set_camera_info(&pcm990_pxacamera_platform_data); 483 pxa_set_camera_info(&pcm990_pxacamera_platform_data);
475 484
476 i2c_register_board_info(0, pcm990_i2c_devices, 485 i2c_register_board_info(0, ARRAY_AND_SIZE(pcm990_i2c_devices));
477 ARRAY_SIZE(pcm990_i2c_devices));
478#endif 486#endif
479 487
480 printk(KERN_INFO"PCM-990 Evaluation baseboard initialized\n"); 488 printk(KERN_INFO "PCM-990 Evaluation baseboard initialized\n");
481} 489}
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index f81c10cafd48..39612cfa0b4d 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -267,6 +267,7 @@ static void poodle_irda_transceiver_mode(struct device *dev, int mode)
267 } else { 267 } else {
268 GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); 268 GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON);
269 } 269 }
270 pxa2xx_transceiver_mode(dev, mode);
270} 271}
271 272
272static struct pxaficp_platform_data poodle_ficp_platform_data = { 273static struct pxaficp_platform_data poodle_ficp_platform_data = {
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 4cd50e3005e9..c5b845b935bb 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -109,6 +109,52 @@ static const struct clkops clk_pxa25x_lcd_ops = {
109 .getrate = clk_pxa25x_lcd_getrate, 109 .getrate = clk_pxa25x_lcd_getrate,
110}; 110};
111 111
112static unsigned long gpio12_config_32k[] = {
113 GPIO12_32KHz,
114};
115
116static unsigned long gpio12_config_gpio[] = {
117 GPIO12_GPIO,
118};
119
120static void clk_gpio12_enable(struct clk *clk)
121{
122 pxa2xx_mfp_config(gpio12_config_32k, 1);
123}
124
125static void clk_gpio12_disable(struct clk *clk)
126{
127 pxa2xx_mfp_config(gpio12_config_gpio, 1);
128}
129
130static const struct clkops clk_pxa25x_gpio12_ops = {
131 .enable = clk_gpio12_enable,
132 .disable = clk_gpio12_disable,
133};
134
135static unsigned long gpio11_config_3m6[] = {
136 GPIO11_3_6MHz,
137};
138
139static unsigned long gpio11_config_gpio[] = {
140 GPIO11_GPIO,
141};
142
143static void clk_gpio11_enable(struct clk *clk)
144{
145 pxa2xx_mfp_config(gpio11_config_3m6, 1);
146}
147
148static void clk_gpio11_disable(struct clk *clk)
149{
150 pxa2xx_mfp_config(gpio11_config_gpio, 1);
151}
152
153static const struct clkops clk_pxa25x_gpio11_ops = {
154 .enable = clk_gpio11_enable,
155 .disable = clk_gpio11_disable,
156};
157
112/* 158/*
113 * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz) 159 * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz)
114 * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz 160 * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
@@ -128,6 +174,8 @@ static struct clk pxa25x_clks[] = {
128 INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), 174 INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
129 INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), 175 INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
130 INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), 176 INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev),
177 INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL),
178 INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL),
131 INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), 179 INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
132 INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), 180 INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
133 181
@@ -145,7 +193,10 @@ static struct clk pxa25x_clks[] = {
145 INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), 193 INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
146}; 194};
147 195
148static struct clk gpio7_clk = INIT_CKOTHER("GPIO7_CK", &pxa25x_clks[4], NULL); 196static struct clk pxa2xx_clk_aliases[] = {
197 INIT_CKOTHER("GPIO7_CLK", &pxa25x_clks[4], NULL),
198 INIT_CKOTHER("SA1111_CLK", &pxa25x_clks[5], NULL),
199};
149 200
150#ifdef CONFIG_PM 201#ifdef CONFIG_PM
151 202
@@ -293,7 +344,7 @@ static int __init pxa25x_init(void)
293 int i, ret = 0; 344 int i, ret = 0;
294 345
295 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ 346 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
296 if (cpu_is_pxa25x()) 347 if (cpu_is_pxa255())
297 clks_register(&pxa25x_hwuart_clk, 1); 348 clks_register(&pxa25x_hwuart_clk, 1);
298 349
299 if (cpu_is_pxa21x() || cpu_is_pxa25x()) { 350 if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
@@ -317,10 +368,10 @@ static int __init pxa25x_init(void)
317 } 368 }
318 369
319 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ 370 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
320 if (cpu_is_pxa25x()) 371 if (cpu_is_pxa255())
321 ret = platform_device_register(&pxa_device_hwuart); 372 ret = platform_device_register(&pxa_device_hwuart);
322 373
323 clks_register(&gpio7_clk, 1); 374 clks_register(pxa2xx_clk_aliases, ARRAY_SIZE(pxa2xx_clk_aliases));
324 375
325 return ret; 376 return ret;
326} 377}
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c
index 0a0d3877f212..da92e9733886 100644
--- a/arch/arm/mach-pxa/pxa300.c
+++ b/arch/arm/mach-pxa/pxa300.c
@@ -15,10 +15,16 @@
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/platform_device.h>
18 19
19#include <asm/hardware.h> 20#include <asm/hardware.h>
21#include <asm/arch/pxa3xx-regs.h>
20#include <asm/arch/mfp-pxa300.h> 22#include <asm/arch/mfp-pxa300.h>
21 23
24#include "generic.h"
25#include "devices.h"
26#include "clock.h"
27
22static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = { 28static struct pxa3xx_mfp_addr_map pxa300_mfp_addr_map[] __initdata = {
23 29
24 MFP_ADDR_X(GPIO0, GPIO2, 0x00b4), 30 MFP_ADDR_X(GPIO0, GPIO2, 0x00b4),
@@ -79,15 +85,26 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = {
79 MFP_ADDR_END, 85 MFP_ADDR_END,
80}; 86};
81 87
88static struct clk common_clks[] = {
89 PXA3xx_CKEN("NANDCLK", NAND, 156000000, 0, &pxa3xx_device_nand.dev),
90};
91
92static struct clk pxa310_clks[] = {
93 PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
94};
95
82static int __init pxa300_init(void) 96static int __init pxa300_init(void)
83{ 97{
84 if (cpu_is_pxa300() || cpu_is_pxa310()) { 98 if (cpu_is_pxa300() || cpu_is_pxa310()) {
85 pxa3xx_init_mfp(); 99 pxa3xx_init_mfp();
86 pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); 100 pxa3xx_mfp_init_addr(pxa300_mfp_addr_map);
101 clks_register(ARRAY_AND_SIZE(common_clks));
87 } 102 }
88 103
89 if (cpu_is_pxa310()) 104 if (cpu_is_pxa310()) {
90 pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); 105 pxa3xx_mfp_init_addr(pxa310_mfp_addr_map);
106 clks_register(ARRAY_AND_SIZE(pxa310_clks));
107 }
91 108
92 return 0; 109 return 0;
93} 110}
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c
index 74128eb8f8d0..c557c23a1efe 100644
--- a/arch/arm/mach-pxa/pxa320.c
+++ b/arch/arm/mach-pxa/pxa320.c
@@ -15,11 +15,17 @@
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/platform_device.h>
18 19
19#include <asm/hardware.h> 20#include <asm/hardware.h>
20#include <asm/arch/mfp.h> 21#include <asm/arch/mfp.h>
22#include <asm/arch/pxa3xx-regs.h>
21#include <asm/arch/mfp-pxa320.h> 23#include <asm/arch/mfp-pxa320.h>
22 24
25#include "generic.h"
26#include "devices.h"
27#include "clock.h"
28
23static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { 29static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
24 30
25 MFP_ADDR_X(GPIO0, GPIO4, 0x0124), 31 MFP_ADDR_X(GPIO0, GPIO4, 0x0124),
@@ -74,16 +80,17 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = {
74 MFP_ADDR_END, 80 MFP_ADDR_END,
75}; 81};
76 82
77static void __init pxa320_init_mfp(void) 83static struct clk pxa320_clks[] = {
78{ 84 PXA3xx_CKEN("NANDCLK", NAND, 104000000, 0, &pxa3xx_device_nand.dev),
79 pxa3xx_init_mfp(); 85};
80 pxa3xx_mfp_init_addr(pxa320_mfp_addr_map);
81}
82 86
83static int __init pxa320_init(void) 87static int __init pxa320_init(void)
84{ 88{
85 if (cpu_is_pxa320()) 89 if (cpu_is_pxa320()) {
86 pxa320_init_mfp(); 90 pxa3xx_init_mfp();
91 pxa3xx_mfp_init_addr(pxa320_mfp_addr_map);
92 clks_register(ARRAY_AND_SIZE(pxa320_clks));
93 }
87 94
88 return 0; 95 return 0;
89} 96}
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 15685d2b8f8c..f491025a0c82 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -144,7 +144,7 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk)
144 return hsio_clk; 144 return hsio_clk;
145} 145}
146 146
147static void clk_pxa3xx_cken_enable(struct clk *clk) 147void clk_pxa3xx_cken_enable(struct clk *clk)
148{ 148{
149 unsigned long mask = 1ul << (clk->cken & 0x1f); 149 unsigned long mask = 1ul << (clk->cken & 0x1f);
150 150
@@ -154,7 +154,7 @@ static void clk_pxa3xx_cken_enable(struct clk *clk)
154 CKENB |= mask; 154 CKENB |= mask;
155} 155}
156 156
157static void clk_pxa3xx_cken_disable(struct clk *clk) 157void clk_pxa3xx_cken_disable(struct clk *clk)
158{ 158{
159 unsigned long mask = 1ul << (clk->cken & 0x1f); 159 unsigned long mask = 1ul << (clk->cken & 0x1f);
160 160
@@ -164,7 +164,7 @@ static void clk_pxa3xx_cken_disable(struct clk *clk)
164 CKENB &= ~mask; 164 CKENB &= ~mask;
165} 165}
166 166
167static const struct clkops clk_pxa3xx_cken_ops = { 167const struct clkops clk_pxa3xx_cken_ops = {
168 .enable = clk_pxa3xx_cken_enable, 168 .enable = clk_pxa3xx_cken_enable,
169 .disable = clk_pxa3xx_cken_disable, 169 .disable = clk_pxa3xx_cken_disable,
170}; 170};
@@ -196,24 +196,6 @@ static const struct clkops clk_pout_ops = {
196 .disable = clk_pout_disable, 196 .disable = clk_pout_disable,
197}; 197};
198 198
199#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
200 { \
201 .name = _name, \
202 .dev = _dev, \
203 .ops = &clk_pxa3xx_cken_ops, \
204 .rate = _rate, \
205 .cken = CKEN_##_cken, \
206 .delay = _delay, \
207 }
208
209#define PXA3xx_CK(_name, _cken, _ops, _dev) \
210 { \
211 .name = _name, \
212 .dev = _dev, \
213 .ops = _ops, \
214 .cken = CKEN_##_cken, \
215 }
216
217static struct clk pxa3xx_clks[] = { 199static struct clk pxa3xx_clks[] = {
218 { 200 {
219 .name = "CLK_POUT", 201 .name = "CLK_POUT",
@@ -244,7 +226,6 @@ static struct clk pxa3xx_clks[] = {
244 226
245 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), 227 PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
246 PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), 228 PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
247 PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
248}; 229};
249 230
250#ifdef CONFIG_PM 231#ifdef CONFIG_PM
diff --git a/arch/arm/mach-pxa/pxa930.c b/arch/arm/mach-pxa/pxa930.c
new file mode 100644
index 000000000000..9503897d049c
--- /dev/null
+++ b/arch/arm/mach-pxa/pxa930.c
@@ -0,0 +1,190 @@
1/*
2 * linux/arch/arm/mach-pxa/pxa930.c
3 *
4 * Code specific to PXA930
5 *
6 * Copyright (C) 2007-2008 Marvell Internation Ltd.
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 version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/platform_device.h>
16#include <linux/irq.h>
17#include <linux/dma-mapping.h>
18
19#include <asm/hardware.h>
20#include <asm/arch/mfp-pxa930.h>
21
22static struct pxa3xx_mfp_addr_map pxa930_mfp_addr_map[] __initdata = {
23
24 MFP_ADDR(GPIO0, 0x02e0),
25 MFP_ADDR(GPIO1, 0x02dc),
26 MFP_ADDR(GPIO2, 0x02e8),
27 MFP_ADDR(GPIO3, 0x02d8),
28 MFP_ADDR(GPIO4, 0x02e4),
29 MFP_ADDR(GPIO5, 0x02ec),
30 MFP_ADDR(GPIO6, 0x02f8),
31 MFP_ADDR(GPIO7, 0x02fc),
32 MFP_ADDR(GPIO8, 0x0300),
33 MFP_ADDR(GPIO9, 0x02d4),
34 MFP_ADDR(GPIO10, 0x02f4),
35 MFP_ADDR(GPIO11, 0x02f0),
36 MFP_ADDR(GPIO12, 0x0304),
37 MFP_ADDR(GPIO13, 0x0310),
38 MFP_ADDR(GPIO14, 0x0308),
39 MFP_ADDR(GPIO15, 0x030c),
40 MFP_ADDR(GPIO16, 0x04e8),
41 MFP_ADDR(GPIO17, 0x04f4),
42 MFP_ADDR(GPIO18, 0x04f8),
43 MFP_ADDR(GPIO19, 0x04fc),
44 MFP_ADDR(GPIO20, 0x0518),
45 MFP_ADDR(GPIO21, 0x051c),
46 MFP_ADDR(GPIO22, 0x04ec),
47 MFP_ADDR(GPIO23, 0x0500),
48 MFP_ADDR(GPIO24, 0x04f0),
49 MFP_ADDR(GPIO25, 0x0504),
50 MFP_ADDR(GPIO26, 0x0510),
51 MFP_ADDR(GPIO27, 0x0514),
52 MFP_ADDR(GPIO28, 0x0520),
53 MFP_ADDR(GPIO29, 0x0600),
54 MFP_ADDR(GPIO30, 0x0618),
55 MFP_ADDR(GPIO31, 0x0610),
56 MFP_ADDR(GPIO32, 0x060c),
57 MFP_ADDR(GPIO33, 0x061c),
58 MFP_ADDR(GPIO34, 0x0620),
59 MFP_ADDR(GPIO35, 0x0628),
60 MFP_ADDR(GPIO36, 0x062c),
61 MFP_ADDR(GPIO37, 0x0630),
62 MFP_ADDR(GPIO38, 0x0634),
63 MFP_ADDR(GPIO39, 0x0638),
64 MFP_ADDR(GPIO40, 0x063c),
65 MFP_ADDR(GPIO41, 0x0614),
66 MFP_ADDR(GPIO42, 0x0624),
67 MFP_ADDR(GPIO43, 0x0608),
68 MFP_ADDR(GPIO44, 0x0604),
69 MFP_ADDR(GPIO45, 0x050c),
70 MFP_ADDR(GPIO46, 0x0508),
71 MFP_ADDR(GPIO47, 0x02bc),
72 MFP_ADDR(GPIO48, 0x02b4),
73 MFP_ADDR(GPIO49, 0x02b8),
74 MFP_ADDR(GPIO50, 0x02c8),
75 MFP_ADDR(GPIO51, 0x02c0),
76 MFP_ADDR(GPIO52, 0x02c4),
77 MFP_ADDR(GPIO53, 0x02d0),
78 MFP_ADDR(GPIO54, 0x02cc),
79 MFP_ADDR(GPIO55, 0x029c),
80 MFP_ADDR(GPIO56, 0x02a0),
81 MFP_ADDR(GPIO57, 0x0294),
82 MFP_ADDR(GPIO58, 0x0298),
83 MFP_ADDR(GPIO59, 0x02a4),
84 MFP_ADDR(GPIO60, 0x02a8),
85 MFP_ADDR(GPIO61, 0x02b0),
86 MFP_ADDR(GPIO62, 0x02ac),
87 MFP_ADDR(GPIO63, 0x0640),
88 MFP_ADDR(GPIO64, 0x065c),
89 MFP_ADDR(GPIO65, 0x0648),
90 MFP_ADDR(GPIO66, 0x0644),
91 MFP_ADDR(GPIO67, 0x0674),
92 MFP_ADDR(GPIO68, 0x0658),
93 MFP_ADDR(GPIO69, 0x0654),
94 MFP_ADDR(GPIO70, 0x0660),
95 MFP_ADDR(GPIO71, 0x0668),
96 MFP_ADDR(GPIO72, 0x0664),
97 MFP_ADDR(GPIO73, 0x0650),
98 MFP_ADDR(GPIO74, 0x066c),
99 MFP_ADDR(GPIO75, 0x064c),
100 MFP_ADDR(GPIO76, 0x0670),
101 MFP_ADDR(GPIO77, 0x0678),
102 MFP_ADDR(GPIO78, 0x067c),
103 MFP_ADDR(GPIO79, 0x0694),
104 MFP_ADDR(GPIO80, 0x069c),
105 MFP_ADDR(GPIO81, 0x06a0),
106 MFP_ADDR(GPIO82, 0x06a4),
107 MFP_ADDR(GPIO83, 0x0698),
108 MFP_ADDR(GPIO84, 0x06bc),
109 MFP_ADDR(GPIO85, 0x06b4),
110 MFP_ADDR(GPIO86, 0x06b0),
111 MFP_ADDR(GPIO87, 0x06c0),
112 MFP_ADDR(GPIO88, 0x06c4),
113 MFP_ADDR(GPIO89, 0x06ac),
114 MFP_ADDR(GPIO90, 0x0680),
115 MFP_ADDR(GPIO91, 0x0684),
116 MFP_ADDR(GPIO92, 0x0688),
117 MFP_ADDR(GPIO93, 0x0690),
118 MFP_ADDR(GPIO94, 0x068c),
119 MFP_ADDR(GPIO95, 0x06a8),
120 MFP_ADDR(GPIO96, 0x06b8),
121 MFP_ADDR(GPIO97, 0x0410),
122 MFP_ADDR(GPIO98, 0x0418),
123 MFP_ADDR(GPIO99, 0x041c),
124 MFP_ADDR(GPIO100, 0x0414),
125 MFP_ADDR(GPIO101, 0x0408),
126 MFP_ADDR(GPIO102, 0x0324),
127 MFP_ADDR(GPIO103, 0x040c),
128 MFP_ADDR(GPIO104, 0x0400),
129 MFP_ADDR(GPIO105, 0x0328),
130 MFP_ADDR(GPIO106, 0x0404),
131
132 MFP_ADDR(nXCVREN, 0x0204),
133 MFP_ADDR(DF_CLE_nOE, 0x020c),
134 MFP_ADDR(DF_nADV1_ALE, 0x0218),
135 MFP_ADDR(DF_SCLK_E, 0x0214),
136 MFP_ADDR(DF_SCLK_S, 0x0210),
137 MFP_ADDR(nBE0, 0x021c),
138 MFP_ADDR(nBE1, 0x0220),
139 MFP_ADDR(DF_nADV2_ALE, 0x0224),
140 MFP_ADDR(DF_INT_RnB, 0x0228),
141 MFP_ADDR(DF_nCS0, 0x022c),
142 MFP_ADDR(DF_nCS1, 0x0230),
143 MFP_ADDR(nLUA, 0x0254),
144 MFP_ADDR(nLLA, 0x0258),
145 MFP_ADDR(DF_nWE, 0x0234),
146 MFP_ADDR(DF_nRE_nOE, 0x0238),
147 MFP_ADDR(DF_ADDR0, 0x024c),
148 MFP_ADDR(DF_ADDR1, 0x0250),
149 MFP_ADDR(DF_ADDR2, 0x025c),
150 MFP_ADDR(DF_ADDR3, 0x0260),
151 MFP_ADDR(DF_IO0, 0x023c),
152 MFP_ADDR(DF_IO1, 0x0240),
153 MFP_ADDR(DF_IO2, 0x0244),
154 MFP_ADDR(DF_IO3, 0x0248),
155 MFP_ADDR(DF_IO4, 0x0264),
156 MFP_ADDR(DF_IO5, 0x0268),
157 MFP_ADDR(DF_IO6, 0x026c),
158 MFP_ADDR(DF_IO7, 0x0270),
159 MFP_ADDR(DF_IO8, 0x0274),
160 MFP_ADDR(DF_IO9, 0x0278),
161 MFP_ADDR(DF_IO10, 0x027c),
162 MFP_ADDR(DF_IO11, 0x0280),
163 MFP_ADDR(DF_IO12, 0x0284),
164 MFP_ADDR(DF_IO13, 0x0288),
165 MFP_ADDR(DF_IO14, 0x028c),
166 MFP_ADDR(DF_IO15, 0x0290),
167
168 MFP_ADDR(GSIM_UIO, 0x0314),
169 MFP_ADDR(GSIM_UCLK, 0x0318),
170 MFP_ADDR(GSIM_UDET, 0x031c),
171 MFP_ADDR(GSIM_nURST, 0x0320),
172
173 MFP_ADDR(PMIC_INT, 0x06c8),
174
175 MFP_ADDR(RDY, 0x0200),
176
177 MFP_ADDR_END,
178};
179
180static int __init pxa930_init(void)
181{
182 if (cpu_is_pxa930()) {
183 pxa3xx_init_mfp();
184 pxa3xx_mfp_init_addr(pxa930_mfp_addr_map);
185 }
186
187 return 0;
188}
189
190core_initcall(pxa930_init);
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
new file mode 100644
index 000000000000..9d39dea57ce2
--- /dev/null
+++ b/arch/arm/mach-pxa/reset.c
@@ -0,0 +1,96 @@
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 version 2 as
4 * published by the Free Software Foundation.
5 */
6#include <linux/kernel.h>
7#include <linux/module.h>
8#include <linux/delay.h>
9#include <linux/gpio.h>
10#include <asm/io.h>
11#include <asm/proc-fns.h>
12
13#include <asm/arch/pxa-regs.h>
14#include <asm/arch/pxa2xx-regs.h>
15
16static void do_hw_reset(void);
17
18static int reset_gpio = -1;
19
20int init_gpio_reset(int gpio)
21{
22 int rc;
23
24 rc = gpio_request(gpio, "reset generator");
25 if (rc) {
26 printk(KERN_ERR "Can't request reset_gpio\n");
27 goto out;
28 }
29
30 rc = gpio_direction_input(gpio);
31 if (rc) {
32 printk(KERN_ERR "Can't configure reset_gpio for input\n");
33 gpio_free(gpio);
34 goto out;
35 }
36
37out:
38 if (!rc)
39 reset_gpio = gpio;
40
41 return rc;
42}
43
44/*
45 * Trigger GPIO reset.
46 * This covers various types of logic connecting gpio pin
47 * to RESET pins (nRESET or GPIO_RESET):
48 */
49static void do_gpio_reset(void)
50{
51 BUG_ON(reset_gpio == -1);
52
53 /* drive it low */
54 gpio_direction_output(reset_gpio, 0);
55 mdelay(2);
56 /* rising edge or drive high */
57 gpio_set_value(reset_gpio, 1);
58 mdelay(2);
59 /* falling edge */
60 gpio_set_value(reset_gpio, 0);
61
62 /* give it some time */
63 mdelay(10);
64
65 WARN_ON(1);
66 /* fallback */
67 do_hw_reset();
68}
69
70static void do_hw_reset(void)
71{
72 /* Initialize the watchdog and let it fire */
73 OWER = OWER_WME;
74 OSSR = OSSR_M3;
75 OSMR3 = OSCR + 368640; /* ... in 100 ms */
76}
77
78void arch_reset(char mode)
79{
80 if (cpu_is_pxa2xx())
81 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
82
83 switch (mode) {
84 case 's':
85 /* Jump into ROM at address 0 */
86 cpu_reset(0);
87 break;
88 case 'h':
89 do_hw_reset();
90 break;
91 case 'g':
92 do_gpio_reset();
93 break;
94 }
95}
96
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
new file mode 100644
index 000000000000..d02bc6f8bb93
--- /dev/null
+++ b/arch/arm/mach-pxa/saar.c
@@ -0,0 +1,84 @@
1/*
2 * linux/arch/arm/mach-pxa/saar.c
3 *
4 * Support for the Marvell PXA930 Handheld Platform (aka SAAR)
5 *
6 * Copyright (C) 2007-2008 Marvell International Ltd.
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 version 2 as
10 * publishhed by the Free Software Foundation.
11 */
12
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/interrupt.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/clk.h>
19#include <linux/gpio.h>
20#include <linux/smc91x.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24#include <asm/hardware.h>
25#include <asm/arch/pxa3xx-regs.h>
26#include <asm/arch/mfp-pxa930.h>
27
28#include "devices.h"
29#include "generic.h"
30
31/* SAAR MFP configurations */
32static mfp_cfg_t saar_mfp_cfg[] __initdata = {
33 /* Ethernet */
34 DF_nCS1_nCS3,
35 GPIO97_GPIO,
36};
37
38#define SAAR_ETH_PHYS (0x14000000)
39
40static struct resource smc91x_resources[] = {
41 [0] = {
42 .start = (SAAR_ETH_PHYS + 0x300),
43 .end = (SAAR_ETH_PHYS + 0xfffff),
44 .flags = IORESOURCE_MEM,
45 },
46 [1] = {
47 .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)),
48 .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO97)),
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
50 }
51};
52
53static struct smc91x_platdata saar_smc91x_info = {
54 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_USE_DMA,
55};
56
57static struct platform_device smc91x_device = {
58 .name = "smc91x",
59 .id = 0,
60 .num_resources = ARRAY_SIZE(smc91x_resources),
61 .resource = smc91x_resources,
62 .dev = {
63 .platform_data = &saar_smc91x_info,
64 },
65};
66
67static void __init saar_init(void)
68{
69 /* initialize MFP configurations */
70 pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg));
71
72 platform_device_register(&smc91x_device);
73}
74
75MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
76 /* Maintainer: Eric Miao <eric.miao@marvell.com> */
77 .phys_io = 0x40000000,
78 .boot_params = 0xa0000100,
79 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
80 .map_io = pxa_map_io,
81 .init_irq = pxa3xx_init_irq,
82 .timer = &pxa_timer,
83 .init_machine = saar_init,
84MACHINE_END
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index e7d0fcd9b43f..762249c03ded 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -38,6 +38,7 @@
38#include <asm/arch/pxa-regs.h> 38#include <asm/arch/pxa-regs.h>
39#include <asm/arch/pxa2xx-regs.h> 39#include <asm/arch/pxa2xx-regs.h>
40#include <asm/arch/pxa2xx-gpio.h> 40#include <asm/arch/pxa2xx-gpio.h>
41#include <asm/arch/pxa27x-udc.h>
41#include <asm/arch/irda.h> 42#include <asm/arch/irda.h>
42#include <asm/arch/mmc.h> 43#include <asm/arch/mmc.h>
43#include <asm/arch/ohci.h> 44#include <asm/arch/ohci.h>
@@ -450,6 +451,7 @@ static void spitz_irda_transceiver_mode(struct device *dev, int mode)
450 set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); 451 set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
451 else 452 else
452 reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON); 453 reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_IR_ON);
454 pxa2xx_transceiver_mode(dev, mode);
453} 455}
454 456
455#ifdef CONFIG_MACH_AKITA 457#ifdef CONFIG_MACH_AKITA
@@ -459,6 +461,7 @@ static void akita_irda_transceiver_mode(struct device *dev, int mode)
459 akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); 461 akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
460 else 462 else
461 akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON); 463 akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_IR_ON);
464 pxa2xx_transceiver_mode(dev, mode);
462} 465}
463#endif 466#endif
464 467
@@ -529,11 +532,7 @@ static struct platform_device *devices[] __initdata = {
529 532
530static void spitz_poweroff(void) 533static void spitz_poweroff(void)
531{ 534{
532 pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT); 535 arm_machine_restart('g');
533 GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET);
534
535 mdelay(1000);
536 arm_machine_restart('h');
537} 536}
538 537
539static void spitz_restart(char mode) 538static void spitz_restart(char mode)
@@ -547,6 +546,7 @@ static void spitz_restart(char mode)
547 546
548static void __init common_init(void) 547static void __init common_init(void)
549{ 548{
549 init_gpio_reset(SPITZ_GPIO_ON_RESET);
550 pm_power_off = spitz_poweroff; 550 pm_power_off = spitz_poweroff;
551 arm_pm_restart = spitz_restart; 551 arm_pm_restart = spitz_restart;
552 552
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 0bb31982fb6f..89f38683787e 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -14,13 +14,6 @@
14 * IO-based SSP applications and allows easy port setup for DMA access. 14 * IO-based SSP applications and allows easy port setup for DMA access.
15 * 15 *
16 * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com> 16 * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
17 *
18 * Revision history:
19 * 22nd Aug 2003 Initial version.
20 * 20th Dec 2004 Added ssp_config for changing port config without
21 * closing the port.
22 * 4th Aug 2005 Added option to disable irq handler registration and
23 * cleaned up irq and clock detection.
24 */ 17 */
25 18
26#include <linux/module.h> 19#include <linux/module.h>
@@ -285,7 +278,7 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags)
285 goto out_region; 278 goto out_region;
286 dev->irq = ssp->irq; 279 dev->irq = ssp->irq;
287 } else 280 } else
288 dev->irq = 0; 281 dev->irq = NO_IRQ;
289 282
290 /* turn on SSP port clock */ 283 /* turn on SSP port clock */
291 clk_enable(ssp->clk); 284 clk_enable(ssp->clk);
@@ -306,7 +299,8 @@ void ssp_exit(struct ssp_dev *dev)
306 struct ssp_device *ssp = dev->ssp; 299 struct ssp_device *ssp = dev->ssp;
307 300
308 ssp_disable(dev); 301 ssp_disable(dev);
309 free_irq(dev->irq, dev); 302 if (dev->irq != NO_IRQ)
303 free_irq(dev->irq, dev);
310 clk_disable(ssp->clk); 304 clk_disable(ssp->clk);
311 ssp_free(ssp); 305 ssp_free(ssp);
312} 306}
@@ -360,6 +354,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type)
360 dev_err(&pdev->dev, "failed to allocate memory"); 354 dev_err(&pdev->dev, "failed to allocate memory");
361 return -ENOMEM; 355 return -ENOMEM;
362 } 356 }
357 ssp->pdev = pdev;
363 358
364 ssp->clk = clk_get(&pdev->dev, "SSPCLK"); 359 ssp->clk = clk_get(&pdev->dev, "SSPCLK");
365 if (IS_ERR(ssp->clk)) { 360 if (IS_ERR(ssp->clk)) {
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
new file mode 100644
index 000000000000..ac283507e423
--- /dev/null
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -0,0 +1,84 @@
1/*
2 * linux/arch/arm/mach-pxa/tavorevb.c
3 *
4 * Support for the Marvell PXA930 Evaluation Board
5 *
6 * Copyright (C) 2007-2008 Marvell International Ltd.
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 version 2 as
10 * publishhed by the Free Software Foundation.
11 */
12
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/interrupt.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/clk.h>
19#include <linux/gpio.h>
20#include <linux/smc91x.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24#include <asm/hardware.h>
25#include <asm/arch/pxa3xx-regs.h>
26#include <asm/arch/mfp-pxa930.h>
27
28#include "devices.h"
29#include "generic.h"
30
31/* Tavor EVB MFP configurations */
32static mfp_cfg_t tavorevb_mfp_cfg[] __initdata = {
33 /* Ethernet */
34 DF_nCS1_nCS3,
35 GPIO47_GPIO,
36};
37
38#define TAVOREVB_ETH_PHYS (0x14000000)
39
40static struct resource smc91x_resources[] = {
41 [0] = {
42 .start = (TAVOREVB_ETH_PHYS + 0x300),
43 .end = (TAVOREVB_ETH_PHYS + 0xfffff),
44 .flags = IORESOURCE_MEM,
45 },
46 [1] = {
47 .start = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)),
48 .end = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO47)),
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE,
50 }
51};
52
53static struct smc91x_platdata tavorevb_smc91x_info = {
54 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT | SMC91X_USE_DMA,
55};
56
57static struct platform_device smc91x_device = {
58 .name = "smc91x",
59 .id = 0,
60 .num_resources = ARRAY_SIZE(smc91x_resources),
61 .resource = smc91x_resources,
62 .dev = {
63 .platform_data = &tavorevb_smc91x_info,
64 },
65};
66
67static void __init tavorevb_init(void)
68{
69 /* initialize MFP configurations */
70 pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg));
71
72 platform_device_register(&smc91x_device);
73}
74
75MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
76 /* Maintainer: Eric Miao <eric.miao@marvell.com> */
77 .phys_io = 0x40000000,
78 .boot_params = 0xa0000100,
79 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
80 .map_io = pxa_map_io,
81 .init_irq = pxa3xx_init_irq,
82 .timer = &pxa_timer,
83 .init_machine = tavorevb_init,
84MACHINE_END
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
new file mode 100644
index 000000000000..7d8505466e54
--- /dev/null
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -0,0 +1,150 @@
1/*
2 * Bluetooth built-in chip control
3 *
4 * Copyright (c) 2008 Dmitry Baryshkov
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 */
11
12#include <linux/kernel.h>
13#include <linux/module.h>
14#include <linux/platform_device.h>
15#include <linux/gpio.h>
16#include <linux/delay.h>
17#include <linux/rfkill.h>
18
19#include <asm/arch/tosa_bt.h>
20
21static void tosa_bt_on(struct tosa_bt_data *data)
22{
23 gpio_set_value(data->gpio_reset, 0);
24 gpio_set_value(data->gpio_pwr, 1);
25 gpio_set_value(data->gpio_reset, 1);
26 mdelay(20);
27 gpio_set_value(data->gpio_reset, 0);
28}
29
30static void tosa_bt_off(struct tosa_bt_data *data)
31{
32 gpio_set_value(data->gpio_reset, 1);
33 mdelay(10);
34 gpio_set_value(data->gpio_pwr, 0);
35 gpio_set_value(data->gpio_reset, 0);
36}
37
38static int tosa_bt_toggle_radio(void *data, enum rfkill_state state)
39{
40 pr_info("BT_RADIO going: %s\n",
41 state == RFKILL_STATE_ON ? "on" : "off");
42
43 if (state == RFKILL_STATE_ON) {
44 pr_info("TOSA_BT: going ON\n");
45 tosa_bt_on(data);
46 } else {
47 pr_info("TOSA_BT: going OFF\n");
48 tosa_bt_off(data);
49 }
50 return 0;
51}
52
53static int tosa_bt_probe(struct platform_device *dev)
54{
55 int rc;
56 struct rfkill *rfk;
57
58 struct tosa_bt_data *data = dev->dev.platform_data;
59
60 rc = gpio_request(data->gpio_reset, "Bluetooth reset");
61 if (rc)
62 goto err_reset;
63 rc = gpio_direction_output(data->gpio_reset, 0);
64 if (rc)
65 goto err_reset_dir;
66 rc = gpio_request(data->gpio_pwr, "Bluetooth power");
67 if (rc)
68 goto err_pwr;
69 rc = gpio_direction_output(data->gpio_pwr, 0);
70 if (rc)
71 goto err_pwr_dir;
72
73 rfk = rfkill_allocate(&dev->dev, RFKILL_TYPE_BLUETOOTH);
74 if (!rfk) {
75 rc = -ENOMEM;
76 goto err_rfk_alloc;
77 }
78
79 rfk->name = "tosa-bt";
80 rfk->toggle_radio = tosa_bt_toggle_radio;
81 rfk->data = data;
82#ifdef CONFIG_RFKILL_LEDS
83 rfk->led_trigger.name = "tosa-bt";
84#endif
85
86 rc = rfkill_register(rfk);
87 if (rc)
88 goto err_rfkill;
89
90 platform_set_drvdata(dev, rfk);
91
92 return 0;
93
94err_rfkill:
95 if (rfk)
96 rfkill_free(rfk);
97 rfk = NULL;
98err_rfk_alloc:
99 tosa_bt_off(data);
100err_pwr_dir:
101 gpio_free(data->gpio_pwr);
102err_pwr:
103err_reset_dir:
104 gpio_free(data->gpio_reset);
105err_reset:
106 return rc;
107}
108
109static int __devexit tosa_bt_remove(struct platform_device *dev)
110{
111 struct tosa_bt_data *data = dev->dev.platform_data;
112 struct rfkill *rfk = platform_get_drvdata(dev);
113
114 platform_set_drvdata(dev, NULL);
115
116 if (rfk)
117 rfkill_unregister(rfk);
118 rfk = NULL;
119
120 tosa_bt_off(data);
121
122 gpio_free(data->gpio_pwr);
123 gpio_free(data->gpio_reset);
124
125 return 0;
126}
127
128static struct platform_driver tosa_bt_driver = {
129 .probe = tosa_bt_probe,
130 .remove = __devexit_p(tosa_bt_remove),
131
132 .driver = {
133 .name = "tosa-bt",
134 .owner = THIS_MODULE,
135 },
136};
137
138
139static int __init tosa_bt_init(void)
140{
141 return platform_driver_register(&tosa_bt_driver);
142}
143
144static void __exit tosa_bt_exit(void)
145{
146 platform_driver_unregister(&tosa_bt_driver);
147}
148
149module_init(tosa_bt_init);
150module_exit(tosa_bt_exit);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index ab4a9f579913..fea17ce6b55f 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -18,30 +18,31 @@
18#include <linux/major.h> 18#include <linux/major.h>
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/delay.h>
22#include <linux/fb.h>
21#include <linux/mmc/host.h> 23#include <linux/mmc/host.h>
24#include <linux/mfd/tc6393xb.h>
25#include <linux/mfd/tmio.h>
26#include <linux/mtd/nand.h>
27#include <linux/mtd/partitions.h>
22#include <linux/pm.h> 28#include <linux/pm.h>
23#include <linux/delay.h>
24#include <linux/gpio_keys.h> 29#include <linux/gpio_keys.h>
25#include <linux/input.h> 30#include <linux/input.h>
26#include <linux/gpio.h> 31#include <linux/gpio.h>
32#include <linux/pda_power.h>
33#include <linux/rfkill.h>
27 34
28#include <asm/setup.h> 35#include <asm/setup.h>
29#include <asm/memory.h>
30#include <asm/mach-types.h> 36#include <asm/mach-types.h>
31#include <asm/hardware.h>
32#include <asm/irq.h>
33#include <asm/system.h>
34#include <asm/arch/pxa-regs.h>
35#include <asm/arch/pxa2xx-regs.h> 37#include <asm/arch/pxa2xx-regs.h>
36#include <asm/arch/mfp-pxa25x.h> 38#include <asm/arch/mfp-pxa25x.h>
37#include <asm/arch/irda.h> 39#include <asm/arch/irda.h>
38#include <asm/arch/i2c.h> 40#include <asm/arch/i2c.h>
39#include <asm/arch/mmc.h> 41#include <asm/arch/mmc.h>
40#include <asm/arch/udc.h> 42#include <asm/arch/udc.h>
43#include <asm/arch/tosa_bt.h>
41 44
42#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
43#include <asm/mach/map.h>
44#include <asm/mach/irq.h>
45#include <asm/arch/tosa.h> 46#include <asm/arch/tosa.h>
46 47
47#include <asm/hardware/scoop.h> 48#include <asm/hardware/scoop.h>
@@ -86,7 +87,7 @@ static unsigned long tosa_pin_config[] = {
86 GPIO6_MMC_CLK, 87 GPIO6_MMC_CLK,
87 GPIO8_MMC_CS0, 88 GPIO8_MMC_CS0,
88 GPIO9_GPIO, /* Detect */ 89 GPIO9_GPIO, /* Detect */
89 // GPIO10 nSD_INT 90 GPIO10_GPIO, /* nSD_INT */
90 91
91 /* CF */ 92 /* CF */
92 GPIO13_GPIO, /* CD_IRQ */ 93 GPIO13_GPIO, /* CD_IRQ */
@@ -124,34 +125,34 @@ static unsigned long tosa_pin_config[] = {
124 GPIO44_BTUART_CTS, 125 GPIO44_BTUART_CTS,
125 GPIO45_BTUART_RTS, 126 GPIO45_BTUART_RTS,
126 127
127 /* IrDA */
128 GPIO46_STUART_RXD,
129 GPIO47_STUART_TXD,
130
131 /* Keybd */ 128 /* Keybd */
132 GPIO58_GPIO, 129 GPIO58_GPIO | MFP_LPM_DRIVE_LOW,
133 GPIO59_GPIO, 130 GPIO59_GPIO | MFP_LPM_DRIVE_LOW,
134 GPIO60_GPIO, 131 GPIO60_GPIO | MFP_LPM_DRIVE_LOW,
135 GPIO61_GPIO, 132 GPIO61_GPIO | MFP_LPM_DRIVE_LOW,
136 GPIO62_GPIO, 133 GPIO62_GPIO | MFP_LPM_DRIVE_LOW,
137 GPIO63_GPIO, 134 GPIO63_GPIO | MFP_LPM_DRIVE_LOW,
138 GPIO64_GPIO, 135 GPIO64_GPIO | MFP_LPM_DRIVE_LOW,
139 GPIO65_GPIO, 136 GPIO65_GPIO | MFP_LPM_DRIVE_LOW,
140 GPIO66_GPIO, 137 GPIO66_GPIO | MFP_LPM_DRIVE_LOW,
141 GPIO67_GPIO, 138 GPIO67_GPIO | MFP_LPM_DRIVE_LOW,
142 GPIO68_GPIO, 139 GPIO68_GPIO | MFP_LPM_DRIVE_LOW,
143 GPIO69_GPIO, 140 GPIO69_GPIO | MFP_LPM_DRIVE_LOW,
144 GPIO70_GPIO, 141 GPIO70_GPIO | MFP_LPM_DRIVE_LOW,
145 GPIO71_GPIO, 142 GPIO71_GPIO | MFP_LPM_DRIVE_LOW,
146 GPIO72_GPIO, 143 GPIO72_GPIO | MFP_LPM_DRIVE_LOW,
147 GPIO73_GPIO, 144 GPIO73_GPIO | MFP_LPM_DRIVE_LOW,
148 GPIO74_GPIO, 145 GPIO74_GPIO | MFP_LPM_DRIVE_LOW,
149 GPIO75_GPIO, 146 GPIO75_GPIO | MFP_LPM_DRIVE_LOW,
150 147
151 /* SPI */ 148 /* SPI */
152 GPIO81_SSP2_CLK_OUT, 149 GPIO81_SSP2_CLK_OUT,
153 GPIO82_SSP2_FRM_OUT, 150 GPIO82_SSP2_FRM_OUT,
154 GPIO83_SSP2_TXD, 151 GPIO83_SSP2_TXD,
152
153 /* IrDA is managed in other way */
154 GPIO46_GPIO,
155 GPIO47_GPIO,
155}; 156};
156 157
157/* 158/*
@@ -249,6 +250,15 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
249 250
250 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); 251 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
251 252
253 err = gpio_request(TOSA_GPIO_nSD_DETECT, "MMC/SD card detect");
254 if (err) {
255 printk(KERN_ERR "tosa_mci_init: can't request nSD_DETECT gpio\n");
256 goto err_gpio_detect;
257 }
258 err = gpio_direction_input(TOSA_GPIO_nSD_DETECT);
259 if (err)
260 goto err_gpio_detect_dir;
261
252 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, 262 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int,
253 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 263 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
254 "MMC/SD card detect", data); 264 "MMC/SD card detect", data);
@@ -257,7 +267,7 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
257 goto err_irq; 267 goto err_irq;
258 } 268 }
259 269
260 err = gpio_request(TOSA_GPIO_SD_WP, "sd_wp"); 270 err = gpio_request(TOSA_GPIO_SD_WP, "SD Write Protect");
261 if (err) { 271 if (err) {
262 printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n"); 272 printk(KERN_ERR "tosa_mci_init: can't request SD_WP gpio\n");
263 goto err_gpio_wp; 273 goto err_gpio_wp;
@@ -266,7 +276,7 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
266 if (err) 276 if (err)
267 goto err_gpio_wp_dir; 277 goto err_gpio_wp_dir;
268 278
269 err = gpio_request(TOSA_GPIO_PWR_ON, "sd_pwr"); 279 err = gpio_request(TOSA_GPIO_PWR_ON, "SD Power");
270 if (err) { 280 if (err) {
271 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n"); 281 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
272 goto err_gpio_pwr; 282 goto err_gpio_pwr;
@@ -275,8 +285,20 @@ static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void
275 if (err) 285 if (err)
276 goto err_gpio_pwr_dir; 286 goto err_gpio_pwr_dir;
277 287
288 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int");
289 if (err) {
290 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
291 goto err_gpio_int;
292 }
293 err = gpio_direction_input(TOSA_GPIO_nSD_INT);
294 if (err)
295 goto err_gpio_int_dir;
296
278 return 0; 297 return 0;
279 298
299err_gpio_int_dir:
300 gpio_free(TOSA_GPIO_nSD_INT);
301err_gpio_int:
280err_gpio_pwr_dir: 302err_gpio_pwr_dir:
281 gpio_free(TOSA_GPIO_PWR_ON); 303 gpio_free(TOSA_GPIO_PWR_ON);
282err_gpio_pwr: 304err_gpio_pwr:
@@ -285,6 +307,9 @@ err_gpio_wp_dir:
285err_gpio_wp: 307err_gpio_wp:
286 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); 308 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
287err_irq: 309err_irq:
310err_gpio_detect_dir:
311 gpio_free(TOSA_GPIO_nSD_DETECT);
312err_gpio_detect:
288 return err; 313 return err;
289} 314}
290 315
@@ -306,9 +331,11 @@ static int tosa_mci_get_ro(struct device *dev)
306 331
307static void tosa_mci_exit(struct device *dev, void *data) 332static void tosa_mci_exit(struct device *dev, void *data)
308{ 333{
334 gpio_free(TOSA_GPIO_nSD_INT);
309 gpio_free(TOSA_GPIO_PWR_ON); 335 gpio_free(TOSA_GPIO_PWR_ON);
310 gpio_free(TOSA_GPIO_SD_WP); 336 gpio_free(TOSA_GPIO_SD_WP);
311 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data); 337 free_irq(TOSA_IRQ_GPIO_nSD_DETECT, data);
338 gpio_free(TOSA_GPIO_nSD_DETECT);
312} 339}
313 340
314static struct pxamci_platform_data tosa_mci_platform_data = { 341static struct pxamci_platform_data tosa_mci_platform_data = {
@@ -322,29 +349,55 @@ static struct pxamci_platform_data tosa_mci_platform_data = {
322/* 349/*
323 * Irda 350 * Irda
324 */ 351 */
352static void tosa_irda_transceiver_mode(struct device *dev, int mode)
353{
354 if (mode & IR_OFF) {
355 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0);
356 pxa2xx_transceiver_mode(dev, mode);
357 gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
358 } else {
359 pxa2xx_transceiver_mode(dev, mode);
360 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1);
361 }
362}
363
325static int tosa_irda_startup(struct device *dev) 364static int tosa_irda_startup(struct device *dev)
326{ 365{
327 int ret; 366 int ret;
328 367
368 ret = gpio_request(TOSA_GPIO_IRDA_TX, "IrDA TX");
369 if (ret)
370 goto err_tx;
371 ret = gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
372 if (ret)
373 goto err_tx_dir;
374
329 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown"); 375 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown");
330 if (ret) 376 if (ret)
331 return ret; 377 goto err_pwr;
332 378
333 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0); 379 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0);
334 if (ret) 380 if (ret)
335 gpio_free(TOSA_GPIO_IR_POWERDWN); 381 goto err_pwr_dir;
336 382
337 return ret; 383 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
338 }
339 384
340static void tosa_irda_shutdown(struct device *dev) 385 return 0;
341{ 386
387err_pwr_dir:
342 gpio_free(TOSA_GPIO_IR_POWERDWN); 388 gpio_free(TOSA_GPIO_IR_POWERDWN);
389err_pwr:
390err_tx_dir:
391 gpio_free(TOSA_GPIO_IRDA_TX);
392err_tx:
393 return ret;
343} 394}
344 395
345static void tosa_irda_transceiver_mode(struct device *dev, int mode) 396static void tosa_irda_shutdown(struct device *dev)
346{ 397{
347 gpio_set_value(TOSA_GPIO_IR_POWERDWN, !(mode & IR_OFF)); 398 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
399 gpio_free(TOSA_GPIO_IR_POWERDWN);
400 gpio_free(TOSA_GPIO_IRDA_TX);
348} 401}
349 402
350static struct pxaficp_platform_data tosa_ficp_platform_data = { 403static struct pxaficp_platform_data tosa_ficp_platform_data = {
@@ -355,6 +408,70 @@ static struct pxaficp_platform_data tosa_ficp_platform_data = {
355}; 408};
356 409
357/* 410/*
411 * Tosa AC IN
412 */
413static int tosa_power_init(struct device *dev)
414{
415 int ret = gpio_request(TOSA_GPIO_AC_IN, "ac in");
416 if (ret)
417 goto err_gpio_req;
418
419 ret = gpio_direction_input(TOSA_GPIO_AC_IN);
420 if (ret)
421 goto err_gpio_in;
422
423 return 0;
424
425err_gpio_in:
426 gpio_free(TOSA_GPIO_AC_IN);
427err_gpio_req:
428 return ret;
429}
430
431static void tosa_power_exit(struct device *dev)
432{
433 gpio_free(TOSA_GPIO_AC_IN);
434}
435
436static int tosa_power_ac_online(void)
437{
438 return gpio_get_value(TOSA_GPIO_AC_IN) == 0;
439}
440
441static char *tosa_ac_supplied_to[] = {
442 "main-battery",
443 "backup-battery",
444 "jacket-battery",
445};
446
447static struct pda_power_pdata tosa_power_data = {
448 .init = tosa_power_init,
449 .is_ac_online = tosa_power_ac_online,
450 .exit = tosa_power_exit,
451 .supplied_to = tosa_ac_supplied_to,
452 .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
453};
454
455static struct resource tosa_power_resource[] = {
456 {
457 .name = "ac",
458 .start = gpio_to_irq(TOSA_GPIO_AC_IN),
459 .end = gpio_to_irq(TOSA_GPIO_AC_IN),
460 .flags = IORESOURCE_IRQ |
461 IORESOURCE_IRQ_HIGHEDGE |
462 IORESOURCE_IRQ_LOWEDGE,
463 },
464};
465
466static struct platform_device tosa_power_device = {
467 .name = "pda-power",
468 .id = -1,
469 .dev.platform_data = &tosa_power_data,
470 .resource = tosa_power_resource,
471 .num_resources = ARRAY_SIZE(tosa_power_resource),
472};
473
474/*
358 * Tosa Keyboard 475 * Tosa Keyboard
359 */ 476 */
360static struct platform_device tosakbd_device = { 477static struct platform_device tosakbd_device = {
@@ -439,7 +556,7 @@ static struct gpio_led tosa_gpio_leds[] = {
439 }, 556 },
440 { 557 {
441 .name = "tosa:blue:bluetooth", 558 .name = "tosa:blue:bluetooth",
442 .default_trigger = "none", 559 .default_trigger = "tosa-bt",
443 .gpio = TOSA_GPIO_BT_LED, 560 .gpio = TOSA_GPIO_BT_LED,
444 }, 561 },
445}; 562};
@@ -457,21 +574,184 @@ static struct platform_device tosaled_device = {
457 }, 574 },
458}; 575};
459 576
577/*
578 * Toshiba Mobile IO Controller
579 */
580static struct resource tc6393xb_resources[] = {
581 [0] = {
582 .start = TOSA_LCDC_PHYS,
583 .end = TOSA_LCDC_PHYS + 0x3ffffff,
584 .flags = IORESOURCE_MEM,
585 },
586
587 [1] = {
588 .start = TOSA_IRQ_GPIO_TC6393XB_INT,
589 .end = TOSA_IRQ_GPIO_TC6393XB_INT,
590 .flags = IORESOURCE_IRQ,
591 },
592};
593
594
595static int tosa_tc6393xb_enable(struct platform_device *dev)
596{
597 int rc;
598
599 rc = gpio_request(TOSA_GPIO_TC6393XB_REST_IN, "tc6393xb #pclr");
600 if (rc)
601 goto err_req_pclr;
602 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
603 if (rc)
604 goto err_req_suspend;
605 rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "l3v");
606 if (rc)
607 goto err_req_l3v;
608 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
609 if (rc)
610 goto err_dir_l3v;
611 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_SUSPEND, 0);
612 if (rc)
613 goto err_dir_suspend;
614 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_REST_IN, 0);
615 if (rc)
616 goto err_dir_pclr;
617
618 mdelay(1);
619
620 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
621
622 mdelay(10);
623
624 gpio_set_value(TOSA_GPIO_TC6393XB_REST_IN, 1);
625 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
626
627 return 0;
628err_dir_pclr:
629err_dir_suspend:
630err_dir_l3v:
631 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
632err_req_l3v:
633 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
634err_req_suspend:
635 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
636err_req_pclr:
637 return rc;
638}
639
640static int tosa_tc6393xb_disable(struct platform_device *dev)
641{
642 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
643 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
644 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
645
646 return 0;
647}
648
649static int tosa_tc6393xb_resume(struct platform_device *dev)
650{
651 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
652 mdelay(10);
653 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
654 mdelay(10);
655
656 return 0;
657}
658
659static int tosa_tc6393xb_suspend(struct platform_device *dev)
660{
661 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 0);
662 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 0);
663 return 0;
664}
665
666static struct mtd_partition tosa_nand_partition[] = {
667 {
668 .name = "smf",
669 .offset = 0,
670 .size = 7 * 1024 * 1024,
671 },
672 {
673 .name = "root",
674 .offset = MTDPART_OFS_APPEND,
675 .size = 28 * 1024 * 1024,
676 },
677 {
678 .name = "home",
679 .offset = MTDPART_OFS_APPEND,
680 .size = MTDPART_SIZ_FULL,
681 },
682};
683
684static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
685
686static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
687 .options = 0,
688 .offs = 4,
689 .len = 2,
690 .pattern = scan_ff_pattern
691};
692
693static struct tmio_nand_data tosa_tc6393xb_nand_config = {
694 .num_partitions = ARRAY_SIZE(tosa_nand_partition),
695 .partition = tosa_nand_partition,
696 .badblock_pattern = &tosa_tc6393xb_nand_bbt,
697};
698
699static struct tc6393xb_platform_data tosa_tc6393xb_setup = {
700 .scr_pll2cr = 0x0cc1,
701 .scr_gper = 0x3300,
702 .scr_gpo_dsr =
703 TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON),
704 .scr_gpo_doecr =
705 TOSA_TC6393XB_GPIO_BIT(TOSA_GPIO_CARD_VCC_ON),
706
707 .irq_base = IRQ_BOARD_START,
708 .gpio_base = TOSA_TC6393XB_GPIO_BASE,
709
710 .enable = tosa_tc6393xb_enable,
711 .disable = tosa_tc6393xb_disable,
712 .suspend = tosa_tc6393xb_suspend,
713 .resume = tosa_tc6393xb_resume,
714
715 .nand_data = &tosa_tc6393xb_nand_config,
716};
717
718
719static struct platform_device tc6393xb_device = {
720 .name = "tc6393xb",
721 .id = -1,
722 .dev = {
723 .platform_data = &tosa_tc6393xb_setup,
724 },
725 .num_resources = ARRAY_SIZE(tc6393xb_resources),
726 .resource = tc6393xb_resources,
727};
728
729static struct tosa_bt_data tosa_bt_data = {
730 .gpio_pwr = TOSA_GPIO_BT_PWR_EN,
731 .gpio_reset = TOSA_GPIO_BT_RESET,
732};
733
734static struct platform_device tosa_bt_device = {
735 .name = "tosa-bt",
736 .id = -1,
737 .dev.platform_data = &tosa_bt_data,
738};
739
740
460static struct platform_device *devices[] __initdata = { 741static struct platform_device *devices[] __initdata = {
461 &tosascoop_device, 742 &tosascoop_device,
462 &tosascoop_jc_device, 743 &tosascoop_jc_device,
744 &tc6393xb_device,
745 &tosa_power_device,
463 &tosakbd_device, 746 &tosakbd_device,
464 &tosa_gpio_keys_device, 747 &tosa_gpio_keys_device,
465 &tosaled_device, 748 &tosaled_device,
749 &tosa_bt_device,
466}; 750};
467 751
468static void tosa_poweroff(void) 752static void tosa_poweroff(void)
469{ 753{
470 gpio_direction_output(TOSA_GPIO_ON_RESET, 0); 754 arm_machine_restart('g');
471 gpio_set_value(TOSA_GPIO_ON_RESET, 1);
472
473 mdelay(1000);
474 arm_machine_restart('h');
475} 755}
476 756
477static void tosa_restart(char mode) 757static void tosa_restart(char mode)
@@ -485,10 +765,14 @@ static void tosa_restart(char mode)
485 765
486static void __init tosa_init(void) 766static void __init tosa_init(void)
487{ 767{
768 int dummy;
769
488 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); 770 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
489 gpio_set_wake(MFP_PIN_GPIO1, 1); 771 gpio_set_wake(MFP_PIN_GPIO1, 1);
490 /* We can't pass to gpio-keys since it will drop the Reset altfunc */ 772 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
491 773
774 init_gpio_reset(TOSA_GPIO_ON_RESET);
775
492 pm_power_off = tosa_poweroff; 776 pm_power_off = tosa_poweroff;
493 arm_pm_restart = tosa_restart; 777 arm_pm_restart = tosa_restart;
494 778
@@ -497,6 +781,10 @@ static void __init tosa_init(void)
497 /* enable batt_fault */ 781 /* enable batt_fault */
498 PMCR = 0x01; 782 PMCR = 0x01;
499 783
784 dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12);
785 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
786 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);
787
500 pxa_set_mci_info(&tosa_mci_platform_data); 788 pxa_set_mci_info(&tosa_mci_platform_data);
501 pxa_set_udc_info(&udc_info); 789 pxa_set_udc_info(&udc_info);
502 pxa_set_ficp_info(&tosa_ficp_platform_data); 790 pxa_set_ficp_info(&tosa_ficp_platform_data);
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 61e244023089..dee7bf36f013 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -254,6 +254,7 @@ static void board_irda_mode(struct device *dev, int mode)
254 /* Fast mode */ 254 /* Fast mode */
255 trizeps_conxs_ircr |= ConXS_IRCR_MODE; 255 trizeps_conxs_ircr |= ConXS_IRCR_MODE;
256 } 256 }
257 pxa2xx_transceiver_mode(dev, mode);
257 if (mode & IR_OFF) { 258 if (mode & IR_OFF) {
258 trizeps_conxs_ircr |= ConXS_IRCR_SD; 259 trizeps_conxs_ircr |= ConXS_IRCR_SD;
259 } else { 260 } else {
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 66b446ca273d..8fca6d890b7d 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -19,6 +19,7 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/pwm_backlight.h> 21#include <linux/pwm_backlight.h>
22#include <linux/smc91x.h>
22 23
23#include <asm/mach-types.h> 24#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -29,6 +30,7 @@
29#include <asm/arch/zylonite.h> 30#include <asm/arch/zylonite.h>
30#include <asm/arch/mmc.h> 31#include <asm/arch/mmc.h>
31#include <asm/arch/pxa27x_keypad.h> 32#include <asm/arch/pxa27x_keypad.h>
33#include <asm/arch/pxa3xx_nand.h>
32 34
33#include "devices.h" 35#include "devices.h"
34#include "generic.h" 36#include "generic.h"
@@ -37,6 +39,8 @@
37struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; 39struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
38 40
39int gpio_eth_irq; 41int gpio_eth_irq;
42int gpio_debug_led1;
43int gpio_debug_led2;
40 44
41int wm9713_irq; 45int wm9713_irq;
42 46
@@ -56,13 +60,57 @@ static struct resource smc91x_resources[] = {
56 } 60 }
57}; 61};
58 62
63static struct smc91x_platdata zylonite_smc91x_info = {
64 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT |
65 SMC91X_NOWAIT | SMC91X_USE_DMA,
66};
67
59static struct platform_device smc91x_device = { 68static struct platform_device smc91x_device = {
60 .name = "smc91x", 69 .name = "smc91x",
61 .id = 0, 70 .id = 0,
62 .num_resources = ARRAY_SIZE(smc91x_resources), 71 .num_resources = ARRAY_SIZE(smc91x_resources),
63 .resource = smc91x_resources, 72 .resource = smc91x_resources,
73 .dev = {
74 .platform_data = &zylonite_smc91x_info,
75 },
76};
77
78#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
79static struct gpio_led zylonite_debug_leds[] = {
80 [0] = {
81 .name = "zylonite:yellow:1",
82 .default_trigger = "heartbeat",
83 },
84 [1] = {
85 .name = "zylonite:yellow:2",
86 .default_trigger = "default-on",
87 },
64}; 88};
65 89
90static struct gpio_led_platform_data zylonite_debug_leds_info = {
91 .leds = zylonite_debug_leds,
92 .num_leds = ARRAY_SIZE(zylonite_debug_leds),
93};
94
95static struct platform_device zylonite_device_leds = {
96 .name = "leds-gpio",
97 .id = -1,
98 .dev = {
99 .platform_data = &zylonite_debug_leds_info,
100 }
101};
102
103static void __init zylonite_init_leds(void)
104{
105 zylonite_debug_leds[0].gpio = gpio_debug_led1;
106 zylonite_debug_leds[1].gpio = gpio_debug_led2;
107
108 platform_device_register(&zylonite_device_leds);
109}
110#else
111static inline void zylonite_init_leds(void) {}
112#endif
113
66#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 114#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
67static struct platform_pwm_backlight_data zylonite_backlight_data = { 115static struct platform_pwm_backlight_data zylonite_backlight_data = {
68 .pwm_id = 3, 116 .pwm_id = 3,
@@ -259,7 +307,7 @@ static void __init zylonite_init_mmc(void)
259static inline void zylonite_init_mmc(void) {} 307static inline void zylonite_init_mmc(void) {}
260#endif 308#endif
261 309
262#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) 310#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
263static unsigned int zylonite_matrix_key_map[] = { 311static unsigned int zylonite_matrix_key_map[] = {
264 /* KEY(row, col, key_code) */ 312 /* KEY(row, col, key_code) */
265 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D), 313 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_C), KEY(0, 5, KEY_D),
@@ -324,6 +372,57 @@ static void __init zylonite_init_keypad(void)
324static inline void zylonite_init_keypad(void) {} 372static inline void zylonite_init_keypad(void) {}
325#endif 373#endif
326 374
375#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
376static struct mtd_partition zylonite_nand_partitions[] = {
377 [0] = {
378 .name = "Bootloader",
379 .offset = 0,
380 .size = 0x060000,
381 .mask_flags = MTD_WRITEABLE, /* force read-only */
382 },
383 [1] = {
384 .name = "Kernel",
385 .offset = 0x060000,
386 .size = 0x200000,
387 .mask_flags = MTD_WRITEABLE, /* force read-only */
388 },
389 [2] = {
390 .name = "Filesystem",
391 .offset = 0x0260000,
392 .size = 0x3000000, /* 48M - rootfs */
393 },
394 [3] = {
395 .name = "MassStorage",
396 .offset = 0x3260000,
397 .size = 0x3d40000,
398 },
399 [4] = {
400 .name = "BBT",
401 .offset = 0x6FA0000,
402 .size = 0x80000,
403 .mask_flags = MTD_WRITEABLE, /* force read-only */
404 },
405 /* NOTE: we reserve some blocks at the end of the NAND flash for
406 * bad block management, and the max number of relocation blocks
407 * differs on different platforms. Please take care with it when
408 * defining the partition table.
409 */
410};
411
412static struct pxa3xx_nand_platform_data zylonite_nand_info = {
413 .enable_arbiter = 1,
414 .parts = zylonite_nand_partitions,
415 .nr_parts = ARRAY_SIZE(zylonite_nand_partitions),
416};
417
418static void __init zylonite_init_nand(void)
419{
420 pxa3xx_set_nand_info(&zylonite_nand_info);
421}
422#else
423static inline void zylonite_init_nand(void) {}
424#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
425
327static void __init zylonite_init(void) 426static void __init zylonite_init(void)
328{ 427{
329 /* board-processor specific initialization */ 428 /* board-processor specific initialization */
@@ -342,6 +441,8 @@ static void __init zylonite_init(void)
342 zylonite_init_lcd(); 441 zylonite_init_lcd();
343 zylonite_init_mmc(); 442 zylonite_init_mmc();
344 zylonite_init_keypad(); 443 zylonite_init_keypad();
444 zylonite_init_nand();
445 zylonite_init_leds();
345} 446}
346 447
347MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 448MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c
index 6f7ae972b8db..b28d46e081d3 100644
--- a/arch/arm/mach-pxa/zylonite_pxa300.c
+++ b/arch/arm/mach-pxa/zylonite_pxa300.c
@@ -16,9 +16,12 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/i2c.h>
20#include <linux/i2c/pca953x.h>
19 21
20#include <asm/gpio.h> 22#include <asm/gpio.h>
21#include <asm/arch/mfp-pxa300.h> 23#include <asm/arch/mfp-pxa300.h>
24#include <asm/arch/i2c.h>
22#include <asm/arch/zylonite.h> 25#include <asm/arch/zylonite.h>
23 26
24#include "generic.h" 27#include "generic.h"
@@ -109,6 +112,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
109 GPIO12_MMC2_DAT3, 112 GPIO12_MMC2_DAT3,
110 GPIO13_MMC2_CLK, 113 GPIO13_MMC2_CLK,
111 GPIO14_MMC2_CMD, 114 GPIO14_MMC2_CMD,
115
116 /* Standard I2C */
117 GPIO21_I2C_SCL,
118 GPIO22_I2C_SDA,
112}; 119};
113 120
114static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { 121static mfp_cfg_t pxa300_mfp_cfg[] __initdata = {
@@ -192,6 +199,39 @@ static void __init zylonite_detect_lcd_panel(void)
192 pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]); 199 pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]);
193} 200}
194 201
202#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
203static struct pca953x_platform_data gpio_exp[] = {
204 [0] = {
205 .gpio_base = 128,
206 },
207 [1] = {
208 .gpio_base = 144,
209 },
210};
211
212struct i2c_board_info zylonite_i2c_board_info[] = {
213 {
214 .type = "pca9539",
215 .addr = 0x74,
216 .platform_data = &gpio_exp[0],
217 .irq = IRQ_GPIO(18),
218 }, {
219 .type = "pca9539",
220 .addr = 0x75,
221 .platform_data = &gpio_exp[1],
222 .irq = IRQ_GPIO(19),
223 },
224};
225
226static void __init zylonite_init_i2c(void)
227{
228 pxa_set_i2c_info(NULL);
229 i2c_register_board_info(0, ARRAY_AND_SIZE(zylonite_i2c_board_info));
230}
231#else
232static inline void zylonite_init_i2c(void) {}
233#endif
234
195void __init zylonite_pxa300_init(void) 235void __init zylonite_pxa300_init(void)
196{ 236{
197 if (cpu_is_pxa300() || cpu_is_pxa310()) { 237 if (cpu_is_pxa300() || cpu_is_pxa310()) {
@@ -207,6 +247,8 @@ void __init zylonite_pxa300_init(void)
207 247
208 /* WM9713 IRQ */ 248 /* WM9713 IRQ */
209 wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26); 249 wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26);
250
251 zylonite_init_i2c();
210 } 252 }
211 253
212 if (cpu_is_pxa300()) { 254 if (cpu_is_pxa300()) {
@@ -222,4 +264,8 @@ void __init zylonite_pxa300_init(void)
222 zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30); 264 zylonite_mmc_slot[2].gpio_cd = EXT_GPIO(30);
223 zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31); 265 zylonite_mmc_slot[2].gpio_wp = EXT_GPIO(31);
224 } 266 }
267
268 /* GPIOs for Debug LEDs */
269 gpio_debug_led1 = EXT_GPIO(25);
270 gpio_debug_led2 = EXT_GPIO(26);
225} 271}
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c
index 2b4fc34919ac..2b7fba7a2921 100644
--- a/arch/arm/mach-pxa/zylonite_pxa320.c
+++ b/arch/arm/mach-pxa/zylonite_pxa320.c
@@ -116,6 +116,10 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
116 GPIO27_MMC2_DAT3, 116 GPIO27_MMC2_DAT3,
117 GPIO28_MMC2_CLK, 117 GPIO28_MMC2_CLK,
118 GPIO29_MMC2_CMD, 118 GPIO29_MMC2_CMD,
119
120 /* Debug LEDs */
121 GPIO1_2_GPIO | MFP_LPM_DRIVE_HIGH,
122 GPIO4_2_GPIO | MFP_LPM_DRIVE_HIGH,
119}; 123};
120 124
121#define NUM_LCD_DETECT_PINS 7 125#define NUM_LCD_DETECT_PINS 7
@@ -189,6 +193,8 @@ void __init zylonite_pxa320_init(void)
189 193
190 /* GPIO pin assignment */ 194 /* GPIO pin assignment */
191 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9); 195 gpio_eth_irq = mfp_to_gpio(MFP_PIN_GPIO9);
196 gpio_debug_led1 = mfp_to_gpio(MFP_PIN_GPIO1_2);
197 gpio_debug_led2 = mfp_to_gpio(MFP_PIN_GPIO4_2);
192 198
193 /* MMC card detect & write protect for controller 0 */ 199 /* MMC card detect & write protect for controller 0 */
194 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1); 200 zylonite_mmc_slot[0].gpio_cd = mfp_to_gpio(MFP_PIN_GPIO1);
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index fc97fe57ee6f..b5809c51d13f 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -103,7 +103,7 @@ static void clk_gpio27_disable(void)
103} 103}
104 104
105static struct clk clk_gpio27 = { 105static struct clk clk_gpio27 = {
106 .name = "GPIO27_CLK", 106 .name = "SA1111_CLK",
107 .rate = 3686400, 107 .rate = 3686400,
108 .enable = clk_gpio27_enable, 108 .enable = clk_gpio27_enable,
109 .disable = clk_gpio27_disable, 109 .disable = clk_gpio27_disable,
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index f64b92557b11..2e27a8c8372b 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -76,3 +76,5 @@ obj-$(CONFIG_CPU_V7) += proc-v7.o
76 76
77obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o 77obj-$(CONFIG_CACHE_FEROCEON_L2) += cache-feroceon-l2.o
78obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 78obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
79obj-$(CONFIG_CACHE_XSC3L2) += cache-xsc3l2.o
80
diff --git a/arch/arm/mm/discontig.c b/arch/arm/mm/discontig.c
index 1e5602189507..c8c0c4b0f0a3 100644
--- a/arch/arm/mm/discontig.c
+++ b/arch/arm/mm/discontig.c
@@ -21,26 +21,24 @@
21 * Our node_data structure for discontiguous memory. 21 * Our node_data structure for discontiguous memory.
22 */ 22 */
23 23
24static bootmem_data_t node_bootmem_data[MAX_NUMNODES];
25
26pg_data_t discontig_node_data[MAX_NUMNODES] = { 24pg_data_t discontig_node_data[MAX_NUMNODES] = {
27 { .bdata = &node_bootmem_data[0] }, 25 { .bdata = &bootmem_node_data[0] },
28 { .bdata = &node_bootmem_data[1] }, 26 { .bdata = &bootmem_node_data[1] },
29 { .bdata = &node_bootmem_data[2] }, 27 { .bdata = &bootmem_node_data[2] },
30 { .bdata = &node_bootmem_data[3] }, 28 { .bdata = &bootmem_node_data[3] },
31#if MAX_NUMNODES == 16 29#if MAX_NUMNODES == 16
32 { .bdata = &node_bootmem_data[4] }, 30 { .bdata = &bootmem_node_data[4] },
33 { .bdata = &node_bootmem_data[5] }, 31 { .bdata = &bootmem_node_data[5] },
34 { .bdata = &node_bootmem_data[6] }, 32 { .bdata = &bootmem_node_data[6] },
35 { .bdata = &node_bootmem_data[7] }, 33 { .bdata = &bootmem_node_data[7] },
36 { .bdata = &node_bootmem_data[8] }, 34 { .bdata = &bootmem_node_data[8] },
37 { .bdata = &node_bootmem_data[9] }, 35 { .bdata = &bootmem_node_data[9] },
38 { .bdata = &node_bootmem_data[10] }, 36 { .bdata = &bootmem_node_data[10] },
39 { .bdata = &node_bootmem_data[11] }, 37 { .bdata = &bootmem_node_data[11] },
40 { .bdata = &node_bootmem_data[12] }, 38 { .bdata = &bootmem_node_data[12] },
41 { .bdata = &node_bootmem_data[13] }, 39 { .bdata = &bootmem_node_data[13] },
42 { .bdata = &node_bootmem_data[14] }, 40 { .bdata = &bootmem_node_data[14] },
43 { .bdata = &node_bootmem_data[15] }, 41 { .bdata = &bootmem_node_data[15] },
44#endif 42#endif
45}; 43};
46 44
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b657f1719af0..e6352946dde0 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -284,7 +284,7 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
284 */ 284 */
285 arch_adjust_zones(node, zone_size, zhole_size); 285 arch_adjust_zones(node, zone_size, zhole_size);
286 286
287 free_area_init_node(node, pgdat, zone_size, start_pfn, zhole_size); 287 free_area_init_node(node, zone_size, start_pfn, zhole_size);
288 288
289 return end_pfn; 289 return end_pfn;
290} 290}
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 7854f19b77cf..5d107520e6b9 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/mm.h>
26#include <linux/init.h> 27#include <linux/init.h>
27#include <linux/platform_device.h> 28#include <linux/platform_device.h>
28#include <linux/bootmem.h> 29#include <linux/bootmem.h>
@@ -182,7 +183,7 @@ void __init omapfb_reserve_sdram(void)
182 return; 183 return;
183 184
184 bdata = NODE_DATA(0)->bdata; 185 bdata = NODE_DATA(0)->bdata;
185 sdram_start = bdata->node_boot_start; 186 sdram_start = bdata->node_min_pfn << PAGE_SHIFT;
186 sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start; 187 sdram_size = (bdata->node_low_pfn << PAGE_SHIFT) - sdram_start;
187 reserved = 0; 188 reserved = 0;
188 for (i = 0; ; i++) { 189 for (i = 0; ; i++) {
@@ -340,5 +341,3 @@ unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
340 341
341 342
342#endif 343#endif
343
344
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 6f33f58bca45..ff1413eae0b8 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -334,7 +334,7 @@ static int omap_mbox_init(struct omap_mbox *mbox)
334 } 334 }
335 335
336 mbox->dev.class = &omap_mbox_class; 336 mbox->dev.class = &omap_mbox_class;
337 strlcpy(mbox->dev.bus_id, mbox->name, KOBJ_NAME_LEN); 337 dev_set_name(&mbox->dev, "%s", mbox->name);
338 dev_set_drvdata(&mbox->dev, mbox); 338 dev_set_drvdata(&mbox->dev, mbox);
339 339
340 ret = device_register(&mbox->dev); 340 ret = device_register(&mbox->dev);
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 0be5630ff568..8b8f564c3aa2 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Mon Jul 7 16:25:39 2008 15# Last update: Sun Jul 13 12:04:05 2008
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1812,3 +1812,11 @@ jade MACH_JADE JADE 1821
1812ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822 1812ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822
1813gprisc4 MACH_GPRISC4 GPRISC4 1823 1813gprisc4 MACH_GPRISC4 GPRISC4 1823
1814stamp9260 MACH_STAMP9260 STAMP9260 1824 1814stamp9260 MACH_STAMP9260 STAMP9260 1824
1815smdk6430 MACH_SMDK6430 SMDK6430 1825
1816smdkc100 MACH_SMDKC100 SMDKC100 1826
1817tavorevb MACH_TAVOREVB TAVOREVB 1827
1818saar MACH_SAAR SAAR 1828
1819deister_eyecam MACH_DEISTER_EYECAM DEISTER_EYECAM 1829
1820at91sam9m10ek MACH_AT91SAM9M10EK AT91SAM9M10EK 1830
1821linkstation_produo MACH_LINKSTATION_PRODUO LINKSTATION_PRODUO 1831
1822hit_b0 MACH_HIT_B0 HIT_B0 1832
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 45d63c986015..df4adefedb42 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -10,6 +10,7 @@ config AVR32
10 # With EMBEDDED=n, we get lots of stuff automatically selected 10 # With EMBEDDED=n, we get lots of stuff automatically selected
11 # that we usually don't need on AVR32. 11 # that we usually don't need on AVR32.
12 select EMBEDDED 12 select EMBEDDED
13 select HAVE_CLK
13 select HAVE_OPROFILE 14 select HAVE_OPROFILE
14 select HAVE_KPROBES 15 select HAVE_KPROBES
15 help 16 help
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c
index b8409caeb23d..e84faffbbeca 100644
--- a/arch/avr32/kernel/cpu.c
+++ b/arch/avr32/kernel/cpu.c
@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
26 * XXX: If/when a SMP-capable implementation of AVR32 will ever be 26 * XXX: If/when a SMP-capable implementation of AVR32 will ever be
27 * made, we must make sure that the code executes on the correct CPU. 27 * made, we must make sure that the code executes on the correct CPU.
28 */ 28 */
29static ssize_t show_pc0event(struct sys_device *dev, char *buf) 29static ssize_t show_pc0event(struct sys_device *dev,
30 struct sysdev_attribute *attr, char *buf)
30{ 31{
31 unsigned long pccr; 32 unsigned long pccr;
32 33
33 pccr = sysreg_read(PCCR); 34 pccr = sysreg_read(PCCR);
34 return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); 35 return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f);
35} 36}
36static ssize_t store_pc0event(struct sys_device *dev, const char *buf, 37static ssize_t store_pc0event(struct sys_device *dev,
38 struct sysdev_attribute *attr, const char *buf,
37 size_t count) 39 size_t count)
38{ 40{
39 unsigned long val; 41 unsigned long val;
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf,
46 sysreg_write(PCCR, val); 48 sysreg_write(PCCR, val);
47 return count; 49 return count;
48} 50}
49static ssize_t show_pc0count(struct sys_device *dev, char *buf) 51static ssize_t show_pc0count(struct sys_device *dev,
52 struct sysdev_attribute *attr, char *buf)
50{ 53{
51 unsigned long pcnt0; 54 unsigned long pcnt0;
52 55
53 pcnt0 = sysreg_read(PCNT0); 56 pcnt0 = sysreg_read(PCNT0);
54 return sprintf(buf, "%lu\n", pcnt0); 57 return sprintf(buf, "%lu\n", pcnt0);
55} 58}
56static ssize_t store_pc0count(struct sys_device *dev, const char *buf, 59static ssize_t store_pc0count(struct sys_device *dev,
57 size_t count) 60 struct sysdev_attribute *attr,
61 const char *buf, size_t count)
58{ 62{
59 unsigned long val; 63 unsigned long val;
60 char *endp; 64 char *endp;
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf,
67 return count; 71 return count;
68} 72}
69 73
70static ssize_t show_pc1event(struct sys_device *dev, char *buf) 74static ssize_t show_pc1event(struct sys_device *dev,
75 struct sysdev_attribute *attr, char *buf)
71{ 76{
72 unsigned long pccr; 77 unsigned long pccr;
73 78
74 pccr = sysreg_read(PCCR); 79 pccr = sysreg_read(PCCR);
75 return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); 80 return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f);
76} 81}
77static ssize_t store_pc1event(struct sys_device *dev, const char *buf, 82static ssize_t store_pc1event(struct sys_device *dev,
83 struct sysdev_attribute *attr, const char *buf,
78 size_t count) 84 size_t count)
79{ 85{
80 unsigned long val; 86 unsigned long val;
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf,
87 sysreg_write(PCCR, val); 93 sysreg_write(PCCR, val);
88 return count; 94 return count;
89} 95}
90static ssize_t show_pc1count(struct sys_device *dev, char *buf) 96static ssize_t show_pc1count(struct sys_device *dev,
97 struct sysdev_attribute *attr, char *buf)
91{ 98{
92 unsigned long pcnt1; 99 unsigned long pcnt1;
93 100
94 pcnt1 = sysreg_read(PCNT1); 101 pcnt1 = sysreg_read(PCNT1);
95 return sprintf(buf, "%lu\n", pcnt1); 102 return sprintf(buf, "%lu\n", pcnt1);
96} 103}
97static ssize_t store_pc1count(struct sys_device *dev, const char *buf, 104static ssize_t store_pc1count(struct sys_device *dev,
105 struct sysdev_attribute *attr, const char *buf,
98 size_t count) 106 size_t count)
99{ 107{
100 unsigned long val; 108 unsigned long val;
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf,
108 return count; 116 return count;
109} 117}
110 118
111static ssize_t show_pccycles(struct sys_device *dev, char *buf) 119static ssize_t show_pccycles(struct sys_device *dev,
120 struct sysdev_attribute *attr, char *buf)
112{ 121{
113 unsigned long pccnt; 122 unsigned long pccnt;
114 123
115 pccnt = sysreg_read(PCCNT); 124 pccnt = sysreg_read(PCCNT);
116 return sprintf(buf, "%lu\n", pccnt); 125 return sprintf(buf, "%lu\n", pccnt);
117} 126}
118static ssize_t store_pccycles(struct sys_device *dev, const char *buf, 127static ssize_t store_pccycles(struct sys_device *dev,
128 struct sysdev_attribute *attr, const char *buf,
119 size_t count) 129 size_t count)
120{ 130{
121 unsigned long val; 131 unsigned long val;
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf,
129 return count; 139 return count;
130} 140}
131 141
132static ssize_t show_pcenable(struct sys_device *dev, char *buf) 142static ssize_t show_pcenable(struct sys_device *dev,
143 struct sysdev_attribute *attr, char *buf)
133{ 144{
134 unsigned long pccr; 145 unsigned long pccr;
135 146
136 pccr = sysreg_read(PCCR); 147 pccr = sysreg_read(PCCR);
137 return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); 148 return sprintf(buf, "%c\n", (pccr & 1)?'1':'0');
138} 149}
139static ssize_t store_pcenable(struct sys_device *dev, const char *buf, 150static ssize_t store_pcenable(struct sys_device *dev,
151 struct sysdev_attribute *attr, const char *buf,
140 size_t count) 152 size_t count)
141{ 153{
142 unsigned long pccr, val; 154 unsigned long pccr, val;
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index 6cf9df176274..ff820a9e743a 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -31,7 +31,7 @@ void cpu_idle(void)
31{ 31{
32 /* endless idle loop with no priority at all */ 32 /* endless idle loop with no priority at all */
33 while (1) { 33 while (1) {
34 tick_nohz_stop_sched_tick(); 34 tick_nohz_stop_sched_tick(1);
35 while (!need_resched()) 35 while (!need_resched())
36 cpu_idle_sleep(); 36 cpu_idle_sleep();
37 tick_nohz_restart_sched_tick(); 37 tick_nohz_restart_sched_tick();
diff --git a/arch/avr32/kernel/stacktrace.c b/arch/avr32/kernel/stacktrace.c
index f4bdb448049c..c09f0d8dd679 100644
--- a/arch/avr32/kernel/stacktrace.c
+++ b/arch/avr32/kernel/stacktrace.c
@@ -10,6 +10,7 @@
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/stacktrace.h> 11#include <linux/stacktrace.h>
12#include <linux/thread_info.h> 12#include <linux/thread_info.h>
13#include <linux/module.h>
13 14
14register unsigned long current_frame_pointer asm("r7"); 15register unsigned long current_frame_pointer asm("r7");
15 16
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 021d51217184..604f44f5dd16 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -7,6 +7,7 @@
7 */ 7 */
8#include <linux/clk.h> 8#include <linux/clk.h>
9#include <linux/delay.h> 9#include <linux/delay.h>
10#include <linux/dw_dmac.h>
10#include <linux/fb.h> 11#include <linux/fb.h>
11#include <linux/init.h> 12#include <linux/init.h>
12#include <linux/platform_device.h> 13#include <linux/platform_device.h>
@@ -594,6 +595,17 @@ static void __init genclk_init_parent(struct clk *clk)
594 clk->parent = parent; 595 clk->parent = parent;
595} 596}
596 597
598static struct dw_dma_platform_data dw_dmac0_data = {
599 .nr_channels = 3,
600};
601
602static struct resource dw_dmac0_resource[] = {
603 PBMEM(0xff200000),
604 IRQ(2),
605};
606DEFINE_DEV_DATA(dw_dmac, 0);
607DEV_CLK(hclk, dw_dmac0, hsb, 10);
608
597/* -------------------------------------------------------------------- 609/* --------------------------------------------------------------------
598 * System peripherals 610 * System peripherals
599 * -------------------------------------------------------------------- */ 611 * -------------------------------------------------------------------- */
@@ -708,17 +720,6 @@ static struct clk pico_clk = {
708 .users = 1, 720 .users = 1,
709}; 721};
710 722
711static struct resource dmaca0_resource[] = {
712 {
713 .start = 0xff200000,
714 .end = 0xff20ffff,
715 .flags = IORESOURCE_MEM,
716 },
717 IRQ(2),
718};
719DEFINE_DEV(dmaca, 0);
720DEV_CLK(hclk, dmaca0, hsb, 10);
721
722/* -------------------------------------------------------------------- 723/* --------------------------------------------------------------------
723 * HMATRIX 724 * HMATRIX
724 * -------------------------------------------------------------------- */ 725 * -------------------------------------------------------------------- */
@@ -831,7 +832,7 @@ void __init at32_add_system_devices(void)
831 platform_device_register(&at32_eic0_device); 832 platform_device_register(&at32_eic0_device);
832 platform_device_register(&smc0_device); 833 platform_device_register(&smc0_device);
833 platform_device_register(&pdc_device); 834 platform_device_register(&pdc_device);
834 platform_device_register(&dmaca0_device); 835 platform_device_register(&dw_dmac0_device);
835 836
836 platform_device_register(&at32_tcb0_device); 837 platform_device_register(&at32_tcb0_device);
837 platform_device_register(&at32_tcb1_device); 838 platform_device_register(&at32_tcb1_device);
@@ -2032,7 +2033,7 @@ struct clk *at32_clock_list[] = {
2032 &smc0_mck, 2033 &smc0_mck,
2033 &pdc_hclk, 2034 &pdc_hclk,
2034 &pdc_pclk, 2035 &pdc_pclk,
2035 &dmaca0_hclk, 2036 &dw_dmac0_hclk,
2036 &pico_clk, 2037 &pico_clk,
2037 &pio0_mck, 2038 &pio0_mck,
2038 &pio1_mck, 2039 &pio1_mck,
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 3f90a87527bb..3c85fdaa9487 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -119,8 +119,7 @@ void __init paging_init(void)
119 unsigned long zones_size[MAX_NR_ZONES]; 119 unsigned long zones_size[MAX_NR_ZONES];
120 unsigned long low, start_pfn; 120 unsigned long low, start_pfn;
121 121
122 start_pfn = pgdat->bdata->node_boot_start; 122 start_pfn = pgdat->bdata->node_min_pfn;
123 start_pfn >>= PAGE_SHIFT;
124 low = pgdat->bdata->node_low_pfn; 123 low = pgdat->bdata->node_low_pfn;
125 124
126 memset(zones_size, 0, sizeof(zones_size)); 125 memset(zones_size, 0, sizeof(zones_size));
@@ -129,7 +128,7 @@ void __init paging_init(void)
129 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n", 128 printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n",
130 nid, start_pfn, low); 129 nid, start_pfn, low);
131 130
132 free_area_init_node(nid, pgdat, zones_size, start_pfn, NULL); 131 free_area_init_node(nid, zones_size, start_pfn, NULL);
133 132
134 printk("Node %u: mem_map starts at %p\n", 133 printk("Node %u: mem_map starts at %p\n",
135 pgdat->node_id, pgdat->node_mem_map); 134 pgdat->node_id, pgdat->node_mem_map);
diff --git a/arch/avr32/mm/ioremap.c b/arch/avr32/mm/ioremap.c
index 3437c82434ac..f03b79f0e0ab 100644
--- a/arch/avr32/mm/ioremap.c
+++ b/arch/avr32/mm/ioremap.c
@@ -6,6 +6,7 @@
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8#include <linux/vmalloc.h> 8#include <linux/vmalloc.h>
9#include <linux/mm.h>
9#include <linux/module.h> 10#include <linux/module.h>
10#include <linux/io.h> 11#include <linux/io.h>
11 12
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index b87634e75f20..b83b8ef84e91 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -873,8 +873,8 @@ config HOTPLUG
873 plugged into slots found on all modern laptop computers. Another 873 plugged into slots found on all modern laptop computers. Another
874 example, used on modern desktops as well as laptops, is USB. 874 example, used on modern desktops as well as laptops, is USB.
875 875
876 Enable HOTPLUG and KMOD, and build a modular kernel. Get agent 876 Enable HOTPLUG and build a modular kernel. Get agent software
877 software (at <http://linux-hotplug.sourceforge.net/>) and install it. 877 (from <http://linux-hotplug.sourceforge.net/>) and install it.
878 Then your kernel will automatically call out to a user mode "policy 878 Then your kernel will automatically call out to a user mode "policy
879 agent" (/sbin/hotplug) to load modules and set up software needed 879 agent" (/sbin/hotplug) to load modules and set up software needed
880 to use devices as you hotplug them. 880 to use devices as you hotplug them.
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 53c2cd255441..77800dd83e57 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -105,7 +105,7 @@ void cpu_idle(void)
105#endif 105#endif
106 if (!idle) 106 if (!idle)
107 idle = default_idle; 107 idle = default_idle;
108 tick_nohz_stop_sched_tick(); 108 tick_nohz_stop_sched_tick(1);
109 while (!need_resched()) 109 while (!need_resched())
110 idle(); 110 idle();
111 tick_nohz_restart_sched_tick(); 111 tick_nohz_restart_sched_tick();
diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c
index e0fcd1a9bfd5..742fd1974c2e 100644
--- a/arch/cris/arch-v10/mm/init.c
+++ b/arch/cris/arch-v10/mm/init.c
@@ -182,7 +182,7 @@ paging_init(void)
182 * mem_map page array. 182 * mem_map page array.
183 */ 183 */
184 184
185 free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); 185 free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
186} 186}
187 187
188/* Initialize remaps of some I/O-ports. It is important that this 188/* Initialize remaps of some I/O-ports. It is important that this
diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c
index 5a9ac5834647..8a34b8b74293 100644
--- a/arch/cris/arch-v32/mm/init.c
+++ b/arch/cris/arch-v32/mm/init.c
@@ -162,7 +162,7 @@ paging_init(void)
162 * substantially higher than 0, like us (we start at PAGE_OFFSET). This 162 * substantially higher than 0, like us (we start at PAGE_OFFSET). This
163 * saves space in the mem_map page array. 163 * saves space in the mem_map page array.
164 */ 164 */
165 free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0); 165 free_area_init_node(0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
166 166
167 mem_map = contig_page_data.node_mem_map; 167 mem_map = contig_page_data.node_mem_map;
168} 168}
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index 44f7b4f79476..9aa571169bcc 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -35,19 +35,16 @@ read_cris_profile(struct file *file, char __user *buf,
35 size_t count, loff_t *ppos) 35 size_t count, loff_t *ppos)
36{ 36{
37 unsigned long p = *ppos; 37 unsigned long p = *ppos;
38 ssize_t ret;
38 39
39 if (p > SAMPLE_BUFFER_SIZE) 40 ret = simple_read_from_buffer(buf, count, ppos, sample_buffer,
40 return 0; 41 SAMPLE_BUFFER_SIZE);
42 if (ret < 0)
43 return ret;
41 44
42 if (p + count > SAMPLE_BUFFER_SIZE) 45 memset(sample_buffer + p, 0, ret);
43 count = SAMPLE_BUFFER_SIZE - p;
44 if (copy_to_user(buf, sample_buffer + p,count))
45 return -EFAULT;
46 46
47 memset(sample_buffer + p, 0, count); 47 return ret;
48 *ppos += count;
49
50 return count;
51} 48}
52 49
53static ssize_t 50static ssize_t
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 73f3aeefd203..d1113c5031f5 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -14,7 +14,6 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/pm.h> 16#include <linux/pm.h>
17#include <linux/pm_legacy.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/sysctl.h> 19#include <linux/sysctl.h>
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index b1f25c20a5db..7fda657110eb 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -20,6 +20,7 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/mm.h>
23#include <linux/fs.h> 24#include <linux/fs.h>
24#include <linux/fb.h> 25#include <linux/fb.h>
25#include <linux/console.h> 26#include <linux/console.h>
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 7e028ceb93ba..465116aecb85 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -1139,7 +1139,7 @@ sys32_pipe (int __user *fd)
1139 int retval; 1139 int retval;
1140 int fds[2]; 1140 int fds[2];
1141 1141
1142 retval = do_pipe(fds); 1142 retval = do_pipe_flags(fds, 0);
1143 if (retval) 1143 if (retval)
1144 goto out; 1144 goto out;
1145 if (copy_to_user(fd, fds, sizeof(fds))) 1145 if (copy_to_user(fd, fds, sizeof(fds)))
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
index b642648cc2ac..c539c689493b 100644
--- a/arch/ia64/kernel/err_inject.c
+++ b/arch/ia64/kernel/err_inject.c
@@ -55,7 +55,8 @@ static u64 resources[NR_CPUS];
55 55
56#define show(name) \ 56#define show(name) \
57static ssize_t \ 57static ssize_t \
58show_##name(struct sys_device *dev, char *buf) \ 58show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
59 char *buf) \
59{ \ 60{ \
60 u32 cpu=dev->id; \ 61 u32 cpu=dev->id; \
61 return sprintf(buf, "%lx\n", name[cpu]); \ 62 return sprintf(buf, "%lx\n", name[cpu]); \
@@ -63,7 +64,8 @@ show_##name(struct sys_device *dev, char *buf) \
63 64
64#define store(name) \ 65#define store(name) \
65static ssize_t \ 66static ssize_t \
66store_##name(struct sys_device *dev, const char *buf, size_t size) \ 67store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
68 const char *buf, size_t size) \
67{ \ 69{ \
68 unsigned int cpu=dev->id; \ 70 unsigned int cpu=dev->id; \
69 name[cpu] = simple_strtoull(buf, NULL, 16); \ 71 name[cpu] = simple_strtoull(buf, NULL, 16); \
@@ -76,7 +78,8 @@ show(call_start)
76 * processor. The cpu number in driver is only used for storing data. 78 * processor. The cpu number in driver is only used for storing data.
77 */ 79 */
78static ssize_t 80static ssize_t
79store_call_start(struct sys_device *dev, const char *buf, size_t size) 81store_call_start(struct sys_device *dev, struct sysdev_attribute *attr,
82 const char *buf, size_t size)
80{ 83{
81 unsigned int cpu=dev->id; 84 unsigned int cpu=dev->id;
82 unsigned long call_start = simple_strtoull(buf, NULL, 16); 85 unsigned long call_start = simple_strtoull(buf, NULL, 16);
@@ -124,14 +127,16 @@ show(err_type_info)
124store(err_type_info) 127store(err_type_info)
125 128
126static ssize_t 129static ssize_t
127show_virtual_to_phys(struct sys_device *dev, char *buf) 130show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
131 char *buf)
128{ 132{
129 unsigned int cpu=dev->id; 133 unsigned int cpu=dev->id;
130 return sprintf(buf, "%lx\n", phys_addr[cpu]); 134 return sprintf(buf, "%lx\n", phys_addr[cpu]);
131} 135}
132 136
133static ssize_t 137static ssize_t
134store_virtual_to_phys(struct sys_device *dev, const char *buf, size_t size) 138store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
139 const char *buf, size_t size)
135{ 140{
136 unsigned int cpu=dev->id; 141 unsigned int cpu=dev->id;
137 u64 virt_addr=simple_strtoull(buf, NULL, 16); 142 u64 virt_addr=simple_strtoull(buf, NULL, 16);
@@ -154,7 +159,8 @@ show(err_struct_info)
154store(err_struct_info) 159store(err_struct_info)
155 160
156static ssize_t 161static ssize_t
157show_err_data_buffer(struct sys_device *dev, char *buf) 162show_err_data_buffer(struct sys_device *dev,
163 struct sysdev_attribute *attr, char *buf)
158{ 164{
159 unsigned int cpu=dev->id; 165 unsigned int cpu=dev->id;
160 166
@@ -165,7 +171,9 @@ show_err_data_buffer(struct sys_device *dev, char *buf)
165} 171}
166 172
167static ssize_t 173static ssize_t
168store_err_data_buffer(struct sys_device *dev, const char *buf, size_t size) 174store_err_data_buffer(struct sys_device *dev,
175 struct sysdev_attribute *attr,
176 const char *buf, size_t size)
169{ 177{
170 unsigned int cpu=dev->id; 178 unsigned int cpu=dev->id;
171 int ret; 179 int ret;
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index 1eda194b9559..bcbb6d8792d3 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -160,7 +160,7 @@ sys_pipe (void)
160 int fd[2]; 160 int fd[2];
161 int retval; 161 int retval;
162 162
163 retval = do_pipe(fd); 163 retval = do_pipe_flags(fd, 0);
164 if (retval) 164 if (retval)
165 goto out; 165 goto out;
166 retval = fd[0]; 166 retval = fd[0];
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 544dc420c65e..d83125e1ed27 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -36,7 +36,6 @@ struct early_node_data {
36 struct ia64_node_data *node_data; 36 struct ia64_node_data *node_data;
37 unsigned long pernode_addr; 37 unsigned long pernode_addr;
38 unsigned long pernode_size; 38 unsigned long pernode_size;
39 struct bootmem_data bootmem_data;
40 unsigned long num_physpages; 39 unsigned long num_physpages;
41#ifdef CONFIG_ZONE_DMA 40#ifdef CONFIG_ZONE_DMA
42 unsigned long num_dma_physpages; 41 unsigned long num_dma_physpages;
@@ -75,17 +74,17 @@ pg_data_t *pgdat_list[MAX_NUMNODES];
75static int __init build_node_maps(unsigned long start, unsigned long len, 74static int __init build_node_maps(unsigned long start, unsigned long len,
76 int node) 75 int node)
77{ 76{
78 unsigned long cstart, epfn, end = start + len; 77 unsigned long spfn, epfn, end = start + len;
79 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 78 struct bootmem_data *bdp = &bootmem_node_data[node];
80 79
81 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT; 80 epfn = GRANULEROUNDUP(end) >> PAGE_SHIFT;
82 cstart = GRANULEROUNDDOWN(start); 81 spfn = GRANULEROUNDDOWN(start) >> PAGE_SHIFT;
83 82
84 if (!bdp->node_low_pfn) { 83 if (!bdp->node_low_pfn) {
85 bdp->node_boot_start = cstart; 84 bdp->node_min_pfn = spfn;
86 bdp->node_low_pfn = epfn; 85 bdp->node_low_pfn = epfn;
87 } else { 86 } else {
88 bdp->node_boot_start = min(cstart, bdp->node_boot_start); 87 bdp->node_min_pfn = min(spfn, bdp->node_min_pfn);
89 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); 88 bdp->node_low_pfn = max(epfn, bdp->node_low_pfn);
90 } 89 }
91 90
@@ -167,7 +166,7 @@ static void __init fill_pernode(int node, unsigned long pernode,
167{ 166{
168 void *cpu_data; 167 void *cpu_data;
169 int cpus = early_nr_cpus_node(node); 168 int cpus = early_nr_cpus_node(node);
170 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 169 struct bootmem_data *bdp = &bootmem_node_data[node];
171 170
172 mem_data[node].pernode_addr = pernode; 171 mem_data[node].pernode_addr = pernode;
173 mem_data[node].pernode_size = pernodesize; 172 mem_data[node].pernode_size = pernodesize;
@@ -222,20 +221,21 @@ static void __init fill_pernode(int node, unsigned long pernode,
222static int __init find_pernode_space(unsigned long start, unsigned long len, 221static int __init find_pernode_space(unsigned long start, unsigned long len,
223 int node) 222 int node)
224{ 223{
225 unsigned long epfn; 224 unsigned long spfn, epfn;
226 unsigned long pernodesize = 0, pernode, pages, mapsize; 225 unsigned long pernodesize = 0, pernode, pages, mapsize;
227 struct bootmem_data *bdp = &mem_data[node].bootmem_data; 226 struct bootmem_data *bdp = &bootmem_node_data[node];
228 227
228 spfn = start >> PAGE_SHIFT;
229 epfn = (start + len) >> PAGE_SHIFT; 229 epfn = (start + len) >> PAGE_SHIFT;
230 230
231 pages = bdp->node_low_pfn - (bdp->node_boot_start >> PAGE_SHIFT); 231 pages = bdp->node_low_pfn - bdp->node_min_pfn;
232 mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT; 232 mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
233 233
234 /* 234 /*
235 * Make sure this memory falls within this node's usable memory 235 * Make sure this memory falls within this node's usable memory
236 * since we may have thrown some away in build_maps(). 236 * since we may have thrown some away in build_maps().
237 */ 237 */
238 if (start < bdp->node_boot_start || epfn > bdp->node_low_pfn) 238 if (spfn < bdp->node_min_pfn || epfn > bdp->node_low_pfn)
239 return 0; 239 return 0;
240 240
241 /* Don't setup this node's local space twice... */ 241 /* Don't setup this node's local space twice... */
@@ -297,7 +297,7 @@ static void __init reserve_pernode_space(void)
297 bdp = pdp->bdata; 297 bdp = pdp->bdata;
298 298
299 /* First the bootmem_map itself */ 299 /* First the bootmem_map itself */
300 pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT); 300 pages = bdp->node_low_pfn - bdp->node_min_pfn;
301 size = bootmem_bootmap_pages(pages) << PAGE_SHIFT; 301 size = bootmem_bootmap_pages(pages) << PAGE_SHIFT;
302 base = __pa(bdp->node_bootmem_map); 302 base = __pa(bdp->node_bootmem_map);
303 reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT); 303 reserve_bootmem_node(pdp, base, size, BOOTMEM_DEFAULT);
@@ -440,7 +440,7 @@ void __init find_memory(void)
440 efi_memmap_walk(find_max_min_low_pfn, NULL); 440 efi_memmap_walk(find_max_min_low_pfn, NULL);
441 441
442 for_each_online_node(node) 442 for_each_online_node(node)
443 if (mem_data[node].bootmem_data.node_low_pfn) { 443 if (bootmem_node_data[node].node_low_pfn) {
444 node_clear(node, memory_less_mask); 444 node_clear(node, memory_less_mask);
445 mem_data[node].min_pfn = ~0UL; 445 mem_data[node].min_pfn = ~0UL;
446 } 446 }
@@ -460,14 +460,14 @@ void __init find_memory(void)
460 else if (node_isset(node, memory_less_mask)) 460 else if (node_isset(node, memory_less_mask))
461 continue; 461 continue;
462 462
463 bdp = &mem_data[node].bootmem_data; 463 bdp = &bootmem_node_data[node];
464 pernode = mem_data[node].pernode_addr; 464 pernode = mem_data[node].pernode_addr;
465 pernodesize = mem_data[node].pernode_size; 465 pernodesize = mem_data[node].pernode_size;
466 map = pernode + pernodesize; 466 map = pernode + pernodesize;
467 467
468 init_bootmem_node(pgdat_list[node], 468 init_bootmem_node(pgdat_list[node],
469 map>>PAGE_SHIFT, 469 map>>PAGE_SHIFT,
470 bdp->node_boot_start>>PAGE_SHIFT, 470 bdp->node_min_pfn,
471 bdp->node_low_pfn); 471 bdp->node_low_pfn);
472 } 472 }
473 473
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index d3ce8f3bcaa6..c45fc7f5a979 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -24,7 +24,7 @@
24unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT; 24unsigned int hpage_shift=HPAGE_SHIFT_DEFAULT;
25 25
26pte_t * 26pte_t *
27huge_pte_alloc (struct mm_struct *mm, unsigned long addr) 27huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz)
28{ 28{
29 unsigned long taddr = htlbpage_to_page(addr); 29 unsigned long taddr = htlbpage_to_page(addr);
30 pgd_t *pgd; 30 pgd_t *pgd;
@@ -75,7 +75,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
75 * Don't actually need to do any preparation, but need to make sure 75 * Don't actually need to do any preparation, but need to make sure
76 * the address is in the right region. 76 * the address is in the right region.
77 */ 77 */
78int prepare_hugepage_range(unsigned long addr, unsigned long len) 78int prepare_hugepage_range(struct file *file,
79 unsigned long addr, unsigned long len)
79{ 80{
80 if (len & ~HPAGE_MASK) 81 if (len & ~HPAGE_MASK)
81 return -EINVAL; 82 return -EINVAL;
@@ -106,13 +107,19 @@ int pmd_huge(pmd_t pmd)
106{ 107{
107 return 0; 108 return 0;
108} 109}
110
111int pud_huge(pud_t pud)
112{
113 return 0;
114}
115
109struct page * 116struct page *
110follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write) 117follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write)
111{ 118{
112 return NULL; 119 return NULL;
113} 120}
114 121
115void hugetlb_free_pgd_range(struct mmu_gather **tlb, 122void hugetlb_free_pgd_range(struct mmu_gather *tlb,
116 unsigned long addr, unsigned long end, 123 unsigned long addr, unsigned long end,
117 unsigned long floor, unsigned long ceiling) 124 unsigned long floor, unsigned long ceiling)
118{ 125{
@@ -149,7 +156,7 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
149 156
150 /* Handle MAP_FIXED */ 157 /* Handle MAP_FIXED */
151 if (flags & MAP_FIXED) { 158 if (flags & MAP_FIXED) {
152 if (prepare_hugepage_range(addr, len)) 159 if (prepare_hugepage_range(file, addr, len))
153 return -EINVAL; 160 return -EINVAL;
154 return addr; 161 return addr;
155 } 162 }
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c
index 07c1af7dc0e2..cbc3c4c54566 100644
--- a/arch/m32r/mm/discontig.c
+++ b/arch/m32r/mm/discontig.c
@@ -20,7 +20,6 @@ extern char _end[];
20 20
21struct pglist_data *node_data[MAX_NUMNODES]; 21struct pglist_data *node_data[MAX_NUMNODES];
22EXPORT_SYMBOL(node_data); 22EXPORT_SYMBOL(node_data);
23static bootmem_data_t node_bdata[MAX_NUMNODES] __initdata;
24 23
25pg_data_t m32r_node_data[MAX_NUMNODES]; 24pg_data_t m32r_node_data[MAX_NUMNODES];
26 25
@@ -81,7 +80,7 @@ unsigned long __init setup_memory(void)
81 for_each_online_node(nid) { 80 for_each_online_node(nid) {
82 mp = &mem_prof[nid]; 81 mp = &mem_prof[nid];
83 NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid]; 82 NODE_DATA(nid)=(pg_data_t *)&m32r_node_data[nid];
84 NODE_DATA(nid)->bdata = &node_bdata[nid]; 83 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
85 min_pfn = mp->start_pfn; 84 min_pfn = mp->start_pfn;
86 max_pfn = mp->start_pfn + mp->pages; 85 max_pfn = mp->start_pfn + mp->pages;
87 bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn, 86 bootmap_size = init_bootmem_node(NODE_DATA(nid), mp->free_pfn,
@@ -124,8 +123,7 @@ unsigned long __init setup_memory(void)
124 return max_low_pfn; 123 return max_low_pfn;
125} 124}
126 125
127#define START_PFN(nid) \ 126#define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn)
128 (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT)
129#define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) 127#define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn)
130 128
131unsigned long __init zone_sizes_init(void) 129unsigned long __init zone_sizes_init(void)
@@ -148,8 +146,7 @@ unsigned long __init zone_sizes_init(void)
148 zholes_size[ZONE_DMA] = mp->holes; 146 zholes_size[ZONE_DMA] = mp->holes;
149 holes += zholes_size[ZONE_DMA]; 147 holes += zholes_size[ZONE_DMA];
150 148
151 free_area_init_node(nid, NODE_DATA(nid), zones_size, 149 free_area_init_node(nid, zones_size, start_pfn, zholes_size);
152 start_pfn, zholes_size);
153 } 150 }
154 151
155 /* 152 /*
@@ -163,4 +160,3 @@ unsigned long __init zone_sizes_init(void)
163 160
164 return holes; 161 return holes;
165} 162}
166
diff --git a/arch/m32r/mm/init.c b/arch/m32r/mm/init.c
index bbd97c85bc5d..2554eb59cfef 100644
--- a/arch/m32r/mm/init.c
+++ b/arch/m32r/mm/init.c
@@ -93,8 +93,7 @@ void free_initrd_mem(unsigned long, unsigned long);
93#endif 93#endif
94 94
95/* It'd be good if these lines were in the standard header file. */ 95/* It'd be good if these lines were in the standard header file. */
96#define START_PFN(nid) \ 96#define START_PFN(nid) (NODE_DATA(nid)->bdata->node_min_pfn)
97 (NODE_DATA(nid)->bdata->node_boot_start >> PAGE_SHIFT)
98#define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn) 97#define MAX_LOW_PFN(nid) (NODE_DATA(nid)->bdata->node_low_pfn)
99 98
100#ifndef CONFIG_DISCONTIGMEM 99#ifndef CONFIG_DISCONTIGMEM
@@ -123,7 +122,7 @@ unsigned long __init zone_sizes_init(void)
123 start_pfn = __MEMORY_START >> PAGE_SHIFT; 122 start_pfn = __MEMORY_START >> PAGE_SHIFT;
124#endif /* CONFIG_MMU */ 123#endif /* CONFIG_MMU */
125 124
126 free_area_init_node(0, NODE_DATA(0), zones_size, start_pfn, 0); 125 free_area_init_node(0, zones_size, start_pfn, 0);
127 126
128 return 0; 127 return 0;
129} 128}
@@ -252,4 +251,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
252 printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 251 printk (KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
253} 252}
254#endif 253#endif
255
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index cbe36538af47..61df1d33c050 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -9,6 +9,7 @@
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/mm.h>
12#include <linux/init.h> 13#include <linux/init.h>
13#include <linux/ioport.h> 14#include <linux/ioport.h>
14#include <linux/slab.h> 15#include <linux/slab.h>
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index d8fb9c5303cc..79f5f94d4800 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -32,8 +32,6 @@
32 32
33DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 33DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
34 34
35static bootmem_data_t __initdata bootmem_data[MAX_NUMNODES];
36
37pg_data_t pg_data_map[MAX_NUMNODES]; 35pg_data_t pg_data_map[MAX_NUMNODES];
38EXPORT_SYMBOL(pg_data_map); 36EXPORT_SYMBOL(pg_data_map);
39 37
@@ -58,7 +56,7 @@ void __init m68k_setup_node(int node)
58 pg_data_table[i] = pg_data_map + node; 56 pg_data_table[i] = pg_data_map + node;
59 } 57 }
60#endif 58#endif
61 pg_data_map[node].bdata = bootmem_data + node; 59 pg_data_map[node].bdata = bootmem_node_data + node;
62 node_set_online(node); 60 node_set_online(node);
63} 61}
64 62
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index 226795bdf355..c5dbb9bdb322 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -296,7 +296,7 @@ void __init paging_init(void)
296#endif 296#endif
297 for (i = 0; i < m68k_num_memory; i++) { 297 for (i = 0; i < m68k_num_memory; i++) {
298 zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT; 298 zones_size[ZONE_DMA] = m68k_memory[i].size >> PAGE_SHIFT;
299 free_area_init_node(i, pg_data_map + i, zones_size, 299 free_area_init_node(i, zones_size,
300 m68k_memory[i].addr >> PAGE_SHIFT, NULL); 300 m68k_memory[i].addr >> PAGE_SHIFT, NULL);
301 } 301 }
302} 302}
diff --git a/arch/m68k/mm/sun3mmu.c b/arch/m68k/mm/sun3mmu.c
index edceefc18870..1b902dbd4376 100644
--- a/arch/m68k/mm/sun3mmu.c
+++ b/arch/m68k/mm/sun3mmu.c
@@ -94,7 +94,7 @@ void __init paging_init(void)
94 94
95 /* I really wish I knew why the following change made things better... -- Sam */ 95 /* I really wish I knew why the following change made things better... -- Sam */
96/* free_area_init(zones_size); */ 96/* free_area_init(zones_size); */
97 free_area_init_node(0, NODE_DATA(0), zones_size, 97 free_area_init_node(0, zones_size,
98 (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL); 98 (__pa(PAGE_OFFSET) >> PAGE_SHIFT) + 1, NULL);
99 99
100 100
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index 8e8441587c22..2e7515e8db98 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -58,10 +58,18 @@ config GENERIC_TIME
58 bool 58 bool
59 default y 59 default y
60 60
61config GENERIC_CMOS_UPDATE
62 bool
63 default y
64
61config TIME_LOW_RES 65config TIME_LOW_RES
62 bool 66 bool
63 default y 67 default y
64 68
69config GENERIC_CLOCKEVENTS
70 bool
71 default n
72
65config NO_IOPORT 73config NO_IOPORT
66 def_bool y 74 def_bool y
67 75
@@ -108,11 +116,13 @@ config M5206e
108 116
109config M520x 117config M520x
110 bool "MCF520x" 118 bool "MCF520x"
119 select GENERIC_CLOCKEVENTS
111 help 120 help
112 Freescale Coldfire 5207/5208 processor support. 121 Freescale Coldfire 5207/5208 processor support.
113 122
114config M523x 123config M523x
115 bool "MCF523x" 124 bool "MCF523x"
125 select GENERIC_CLOCKEVENTS
116 help 126 help
117 Freescale Coldfire 5230/1/2/4/5 processor support 127 Freescale Coldfire 5230/1/2/4/5 processor support
118 128
@@ -138,6 +148,7 @@ config M5275
138 148
139config M528x 149config M528x
140 bool "MCF528x" 150 bool "MCF528x"
151 select GENERIC_CLOCKEVENTS
141 help 152 help
142 Motorola ColdFire 5280/5282 processor support. 153 Motorola ColdFire 5280/5282 processor support.
143 154
@@ -161,6 +172,7 @@ endchoice
161config M527x 172config M527x
162 bool 173 bool
163 depends on (M5271 || M5275) 174 depends on (M5271 || M5275)
175 select GENERIC_CLOCKEVENTS
164 default y 176 default y
165 177
166config COLDFIRE 178config COLDFIRE
@@ -674,6 +686,9 @@ endchoice
674if COLDFIRE 686if COLDFIRE
675source "kernel/Kconfig.preempt" 687source "kernel/Kconfig.preempt"
676endif 688endif
689
690source "kernel/time/Kconfig"
691
677source "mm/Kconfig" 692source "mm/Kconfig"
678 693
679endmenu 694endmenu
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index e0b5f62e395c..b63bbcf874ff 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -8,6 +8,8 @@
8# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com> 8# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com>
9# 9#
10 10
11KBUILD_DEFCONFIG := m5208evb_defconfig
12
11platform-$(CONFIG_M68328) := 68328 13platform-$(CONFIG_M68328) := 68328
12platform-$(CONFIG_M68EZ328) := 68EZ328 14platform-$(CONFIG_M68EZ328) := 68EZ328
13platform-$(CONFIG_M68VZ328) := 68VZ328 15platform-$(CONFIG_M68VZ328) := 68VZ328
@@ -90,13 +92,14 @@ export PLATFORM BOARD MODEL CPUCLASS
90cflags-$(CONFIG_M5206) := -m5200 92cflags-$(CONFIG_M5206) := -m5200
91cflags-$(CONFIG_M5206e) := -m5200 93cflags-$(CONFIG_M5206e) := -m5200
92cflags-$(CONFIG_M520x) := -m5307 94cflags-$(CONFIG_M520x) := -m5307
93cflags-$(CONFIG_M523x) := -m5307 95cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307)
94cflags-$(CONFIG_M5249) := -m5200 96cflags-$(CONFIG_M5249) := -m5200
95cflags-$(CONFIG_M527x) := -m5307 97cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307)
96cflags-$(CONFIG_M5272) := -m5307 98cflags-$(CONFIG_M5272) := -m5307
97cflags-$(CONFIG_M528x) := -m5307 99cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307)
100cflags-$(CONFIG_M528x) := $(call cc-option,-m528x,-m5307)
98cflags-$(CONFIG_M5307) := -m5307 101cflags-$(CONFIG_M5307) := -m5307
99cflags-$(CONFIG_M532x) := -m5307 102cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307)
100cflags-$(CONFIG_M5407) := -m5200 103cflags-$(CONFIG_M5407) := -m5200
101cflags-$(CONFIG_M68328) := -m68000 104cflags-$(CONFIG_M68328) := -m68000
102cflags-$(CONFIG_M68EZ328) := -m68000 105cflags-$(CONFIG_M68EZ328) := -m68000
diff --git a/arch/m68knommu/configs/m5208evb_defconfig b/arch/m68knommu/configs/m5208evb_defconfig
new file mode 100644
index 000000000000..6fae33a05e2a
--- /dev/null
+++ b/arch/m68knommu/configs/m5208evb_defconfig
@@ -0,0 +1,610 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc1
4#
5CONFIG_M68K=y
6# CONFIG_MMU is not set
7# CONFIG_FPU is not set
8CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
11# CONFIG_ARCH_HAS_ILOG2_U32 is not set
12# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_TIME=y
18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_ARCH_SUPPORTS_AOUT=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22
23#
24# General setup
25#
26CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29CONFIG_LOCALVERSION=""
30CONFIG_LOCALVERSION_AUTO=y
31# CONFIG_SYSVIPC is not set
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set
35# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set
40# CONFIG_RELAY is not set
41# CONFIG_NAMESPACES is not set
42# CONFIG_BLK_DEV_INITRD is not set
43# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
44CONFIG_SYSCTL=y
45CONFIG_EMBEDDED=y
46# CONFIG_UID16 is not set
47# CONFIG_SYSCTL_SYSCALL is not set
48# CONFIG_KALLSYMS is not set
49# CONFIG_HOTPLUG is not set
50CONFIG_PRINTK=y
51CONFIG_BUG=y
52CONFIG_ELF_CORE=y
53# CONFIG_COMPAT_BRK is not set
54CONFIG_BASE_FULL=y
55# CONFIG_FUTEX is not set
56# CONFIG_EPOLL is not set
57# CONFIG_SIGNALFD is not set
58# CONFIG_TIMERFD is not set
59# CONFIG_EVENTFD is not set
60# CONFIG_VM_EVENT_COUNTERS is not set
61CONFIG_SLAB=y
62# CONFIG_SLUB is not set
63# CONFIG_SLOB is not set
64# CONFIG_PROFILING is not set
65# CONFIG_MARKERS is not set
66# CONFIG_HAVE_OPROFILE is not set
67# CONFIG_HAVE_KPROBES is not set
68# CONFIG_HAVE_KRETPROBES is not set
69# CONFIG_HAVE_DMA_ATTRS is not set
70CONFIG_SLABINFO=y
71CONFIG_TINY_SHMEM=y
72CONFIG_BASE_SMALL=0
73CONFIG_MODULES=y
74CONFIG_MODULE_UNLOAD=y
75# CONFIG_MODULE_FORCE_UNLOAD is not set
76# CONFIG_MODVERSIONS is not set
77# CONFIG_MODULE_SRCVERSION_ALL is not set
78# CONFIG_KMOD is not set
79CONFIG_BLOCK=y
80# CONFIG_LBD is not set
81# CONFIG_LSF is not set
82# CONFIG_BLK_DEV_BSG is not set
83
84#
85# IO Schedulers
86#
87CONFIG_IOSCHED_NOOP=y
88# CONFIG_IOSCHED_AS is not set
89# CONFIG_IOSCHED_DEADLINE is not set
90# CONFIG_IOSCHED_CFQ is not set
91# CONFIG_DEFAULT_AS is not set
92# CONFIG_DEFAULT_DEADLINE is not set
93# CONFIG_DEFAULT_CFQ is not set
94CONFIG_DEFAULT_NOOP=y
95CONFIG_DEFAULT_IOSCHED="noop"
96CONFIG_CLASSIC_RCU=y
97
98#
99# Processor type and features
100#
101# CONFIG_M68328 is not set
102# CONFIG_M68EZ328 is not set
103# CONFIG_M68VZ328 is not set
104# CONFIG_M68360 is not set
105# CONFIG_M5206 is not set
106# CONFIG_M5206e is not set
107CONFIG_M520x=y
108# CONFIG_M523x is not set
109# CONFIG_M5249 is not set
110# CONFIG_M5271 is not set
111# CONFIG_M5272 is not set
112# CONFIG_M5275 is not set
113# CONFIG_M528x is not set
114# CONFIG_M5307 is not set
115# CONFIG_M532x is not set
116# CONFIG_M5407 is not set
117CONFIG_COLDFIRE=y
118CONFIG_CLOCK_SET=y
119CONFIG_CLOCK_FREQ=166666666
120CONFIG_CLOCK_DIV=2
121
122#
123# Platform
124#
125CONFIG_M5208EVB=y
126CONFIG_FREESCALE=y
127# CONFIG_4KSTACKS is not set
128CONFIG_HZ=100
129
130#
131# RAM configuration
132#
133CONFIG_RAMBASE=0x40000000
134CONFIG_RAMSIZE=0x2000000
135CONFIG_VECTORBASE=0x40000000
136CONFIG_KERNELBASE=0x40020000
137# CONFIG_RAMAUTOBIT is not set
138# CONFIG_RAM8BIT is not set
139CONFIG_RAM16BIT=y
140# CONFIG_RAM32BIT is not set
141
142#
143# ROM configuration
144#
145# CONFIG_ROM is not set
146CONFIG_RAMKERNEL=y
147# CONFIG_ROMKERNEL is not set
148CONFIG_SELECT_MEMORY_MODEL=y
149CONFIG_FLATMEM_MANUAL=y
150# CONFIG_DISCONTIGMEM_MANUAL is not set
151# CONFIG_SPARSEMEM_MANUAL is not set
152CONFIG_FLATMEM=y
153CONFIG_FLAT_NODE_MEM_MAP=y
154# CONFIG_SPARSEMEM_STATIC is not set
155# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
156CONFIG_PAGEFLAGS_EXTENDED=y
157CONFIG_SPLIT_PTLOCK_CPUS=4
158# CONFIG_RESOURCES_64BIT is not set
159CONFIG_ZONE_DMA_FLAG=1
160CONFIG_VIRT_TO_BUS=y
161CONFIG_ISA_DMA_API=y
162
163#
164# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
165#
166# CONFIG_PCI is not set
167# CONFIG_ARCH_SUPPORTS_MSI is not set
168
169#
170# Executable file formats
171#
172CONFIG_BINFMT_FLAT=y
173# CONFIG_BINFMT_ZFLAT is not set
174# CONFIG_BINFMT_SHARED_FLAT is not set
175# CONFIG_BINFMT_AOUT is not set
176# CONFIG_BINFMT_MISC is not set
177
178#
179# Power management options
180#
181# CONFIG_PM is not set
182
183#
184# Networking
185#
186CONFIG_NET=y
187
188#
189# Networking options
190#
191CONFIG_PACKET=y
192# CONFIG_PACKET_MMAP is not set
193CONFIG_UNIX=y
194# CONFIG_NET_KEY is not set
195CONFIG_INET=y
196# CONFIG_IP_MULTICAST is not set
197# CONFIG_IP_ADVANCED_ROUTER is not set
198CONFIG_IP_FIB_HASH=y
199# CONFIG_IP_PNP is not set
200# CONFIG_NET_IPIP is not set
201# CONFIG_NET_IPGRE is not set
202# CONFIG_ARPD is not set
203# CONFIG_SYN_COOKIES is not set
204# CONFIG_INET_AH is not set
205# CONFIG_INET_ESP is not set
206# CONFIG_INET_IPCOMP is not set
207# CONFIG_INET_XFRM_TUNNEL is not set
208# CONFIG_INET_TUNNEL is not set
209# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
210# CONFIG_INET_XFRM_MODE_TUNNEL is not set
211# CONFIG_INET_XFRM_MODE_BEET is not set
212# CONFIG_INET_LRO is not set
213# CONFIG_INET_DIAG is not set
214# CONFIG_TCP_CONG_ADVANCED is not set
215CONFIG_TCP_CONG_CUBIC=y
216CONFIG_DEFAULT_TCP_CONG="cubic"
217# CONFIG_TCP_MD5SIG is not set
218# CONFIG_IPV6 is not set
219# CONFIG_NETWORK_SECMARK is not set
220# CONFIG_NETFILTER is not set
221# CONFIG_IP_DCCP is not set
222# CONFIG_IP_SCTP is not set
223# CONFIG_TIPC is not set
224# CONFIG_ATM is not set
225# CONFIG_BRIDGE is not set
226# CONFIG_VLAN_8021Q is not set
227# CONFIG_DECNET is not set
228# CONFIG_LLC2 is not set
229# CONFIG_IPX is not set
230# CONFIG_ATALK is not set
231# CONFIG_X25 is not set
232# CONFIG_LAPB is not set
233# CONFIG_ECONET is not set
234# CONFIG_WAN_ROUTER is not set
235# CONFIG_NET_SCHED is not set
236
237#
238# Network testing
239#
240# CONFIG_NET_PKTGEN is not set
241# CONFIG_HAMRADIO is not set
242# CONFIG_CAN is not set
243# CONFIG_IRDA is not set
244# CONFIG_BT is not set
245# CONFIG_AF_RXRPC is not set
246
247#
248# Wireless
249#
250# CONFIG_CFG80211 is not set
251# CONFIG_WIRELESS_EXT is not set
252# CONFIG_MAC80211 is not set
253# CONFIG_IEEE80211 is not set
254# CONFIG_RFKILL is not set
255# CONFIG_NET_9P is not set
256
257#
258# Device Drivers
259#
260
261#
262# Generic Driver Options
263#
264CONFIG_STANDALONE=y
265CONFIG_PREVENT_FIRMWARE_BUILD=y
266# CONFIG_SYS_HYPERVISOR is not set
267# CONFIG_CONNECTOR is not set
268CONFIG_MTD=y
269# CONFIG_MTD_DEBUG is not set
270# CONFIG_MTD_CONCAT is not set
271CONFIG_MTD_PARTITIONS=y
272# CONFIG_MTD_REDBOOT_PARTS is not set
273# CONFIG_MTD_CMDLINE_PARTS is not set
274# CONFIG_MTD_AR7_PARTS is not set
275
276#
277# User Modules And Translation Layers
278#
279CONFIG_MTD_CHAR=y
280CONFIG_MTD_BLKDEVS=y
281CONFIG_MTD_BLOCK=y
282# CONFIG_FTL is not set
283# CONFIG_NFTL is not set
284# CONFIG_INFTL is not set
285# CONFIG_RFD_FTL is not set
286# CONFIG_SSFDC is not set
287# CONFIG_MTD_OOPS is not set
288
289#
290# RAM/ROM/Flash chip drivers
291#
292CONFIG_MTD_CFI=y
293# CONFIG_MTD_JEDECPROBE is not set
294CONFIG_MTD_GEN_PROBE=y
295# CONFIG_MTD_CFI_ADV_OPTIONS is not set
296CONFIG_MTD_MAP_BANK_WIDTH_1=y
297CONFIG_MTD_MAP_BANK_WIDTH_2=y
298CONFIG_MTD_MAP_BANK_WIDTH_4=y
299# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
300# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
301# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
302CONFIG_MTD_CFI_I1=y
303CONFIG_MTD_CFI_I2=y
304# CONFIG_MTD_CFI_I4 is not set
305# CONFIG_MTD_CFI_I8 is not set
306# CONFIG_MTD_CFI_INTELEXT is not set
307CONFIG_MTD_CFI_AMDSTD=y
308# CONFIG_MTD_CFI_STAA is not set
309CONFIG_MTD_CFI_UTIL=y
310CONFIG_MTD_RAM=y
311# CONFIG_MTD_ROM is not set
312# CONFIG_MTD_ABSENT is not set
313
314#
315# Mapping drivers for chip access
316#
317# CONFIG_MTD_COMPLEX_MAPPINGS is not set
318# CONFIG_MTD_PHYSMAP is not set
319CONFIG_MTD_UCLINUX=y
320# CONFIG_MTD_PLATRAM is not set
321
322#
323# Self-contained MTD device drivers
324#
325# CONFIG_MTD_SLRAM is not set
326# CONFIG_MTD_PHRAM is not set
327# CONFIG_MTD_MTDRAM is not set
328# CONFIG_MTD_BLOCK2MTD is not set
329
330#
331# Disk-On-Chip Device Drivers
332#
333# CONFIG_MTD_DOC2000 is not set
334# CONFIG_MTD_DOC2001 is not set
335# CONFIG_MTD_DOC2001PLUS is not set
336# CONFIG_MTD_NAND is not set
337# CONFIG_MTD_ONENAND is not set
338
339#
340# UBI - Unsorted block images
341#
342# CONFIG_MTD_UBI is not set
343# CONFIG_PARPORT is not set
344CONFIG_BLK_DEV=y
345# CONFIG_BLK_DEV_COW_COMMON is not set
346# CONFIG_BLK_DEV_LOOP is not set
347# CONFIG_BLK_DEV_NBD is not set
348CONFIG_BLK_DEV_RAM=y
349CONFIG_BLK_DEV_RAM_COUNT=16
350CONFIG_BLK_DEV_RAM_SIZE=4096
351# CONFIG_BLK_DEV_XIP is not set
352# CONFIG_CDROM_PKTCDVD is not set
353# CONFIG_ATA_OVER_ETH is not set
354# CONFIG_MISC_DEVICES is not set
355CONFIG_HAVE_IDE=y
356# CONFIG_IDE is not set
357
358#
359# SCSI device support
360#
361# CONFIG_RAID_ATTRS is not set
362# CONFIG_SCSI is not set
363# CONFIG_SCSI_DMA is not set
364# CONFIG_SCSI_NETLINK is not set
365# CONFIG_MD is not set
366CONFIG_NETDEVICES=y
367# CONFIG_NETDEVICES_MULTIQUEUE is not set
368# CONFIG_DUMMY is not set
369# CONFIG_BONDING is not set
370# CONFIG_MACVLAN is not set
371# CONFIG_EQUALIZER is not set
372# CONFIG_TUN is not set
373# CONFIG_VETH is not set
374# CONFIG_PHYLIB is not set
375CONFIG_NET_ETHERNET=y
376# CONFIG_MII is not set
377# CONFIG_IBM_NEW_EMAC_ZMII is not set
378# CONFIG_IBM_NEW_EMAC_RGMII is not set
379# CONFIG_IBM_NEW_EMAC_TAH is not set
380# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
381# CONFIG_B44 is not set
382CONFIG_FEC=y
383# CONFIG_FEC2 is not set
384# CONFIG_NETDEV_1000 is not set
385# CONFIG_NETDEV_10000 is not set
386
387#
388# Wireless LAN
389#
390# CONFIG_WLAN_PRE80211 is not set
391# CONFIG_WLAN_80211 is not set
392# CONFIG_IWLWIFI is not set
393# CONFIG_IWLWIFI_LEDS is not set
394# CONFIG_WAN is not set
395# CONFIG_PPP is not set
396# CONFIG_SLIP is not set
397# CONFIG_NETCONSOLE is not set
398# CONFIG_NETPOLL is not set
399# CONFIG_NET_POLL_CONTROLLER is not set
400# CONFIG_ISDN is not set
401# CONFIG_PHONE is not set
402
403#
404# Input device support
405#
406# CONFIG_INPUT is not set
407
408#
409# Hardware I/O ports
410#
411# CONFIG_SERIO is not set
412# CONFIG_GAMEPORT is not set
413
414#
415# Character devices
416#
417# CONFIG_VT is not set
418# CONFIG_DEVKMEM is not set
419# CONFIG_SERIAL_NONSTANDARD is not set
420
421#
422# Serial drivers
423#
424# CONFIG_SERIAL_8250 is not set
425
426#
427# Non-8250 serial port support
428#
429CONFIG_SERIAL_CORE=y
430CONFIG_SERIAL_CORE_CONSOLE=y
431# CONFIG_SERIAL_COLDFIRE is not set
432CONFIG_SERIAL_MCF=y
433CONFIG_SERIAL_MCF_BAUDRATE=115200
434CONFIG_SERIAL_MCF_CONSOLE=y
435# CONFIG_UNIX98_PTYS is not set
436CONFIG_LEGACY_PTYS=y
437CONFIG_LEGACY_PTY_COUNT=256
438# CONFIG_IPMI_HANDLER is not set
439# CONFIG_HW_RANDOM is not set
440# CONFIG_GEN_RTC is not set
441# CONFIG_R3964 is not set
442# CONFIG_RAW_DRIVER is not set
443# CONFIG_TCG_TPM is not set
444# CONFIG_I2C is not set
445# CONFIG_SPI is not set
446# CONFIG_W1 is not set
447# CONFIG_POWER_SUPPLY is not set
448# CONFIG_HWMON is not set
449# CONFIG_THERMAL is not set
450# CONFIG_WATCHDOG is not set
451
452#
453# Sonics Silicon Backplane
454#
455CONFIG_SSB_POSSIBLE=y
456# CONFIG_SSB is not set
457
458#
459# Multifunction device drivers
460#
461# CONFIG_MFD_SM501 is not set
462# CONFIG_HTC_PASIC3 is not set
463
464#
465# Multimedia devices
466#
467
468#
469# Multimedia core support
470#
471# CONFIG_VIDEO_DEV is not set
472# CONFIG_DVB_CORE is not set
473
474#
475# Multimedia drivers
476#
477# CONFIG_DAB is not set
478
479#
480# Graphics support
481#
482# CONFIG_VGASTATE is not set
483# CONFIG_VIDEO_OUTPUT_CONTROL is not set
484# CONFIG_FB is not set
485# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
486
487#
488# Display device support
489#
490# CONFIG_DISPLAY_SUPPORT is not set
491
492#
493# Sound
494#
495# CONFIG_SOUND is not set
496# CONFIG_USB_SUPPORT is not set
497# CONFIG_MMC is not set
498# CONFIG_MEMSTICK is not set
499# CONFIG_NEW_LEDS is not set
500# CONFIG_ACCESSIBILITY is not set
501# CONFIG_RTC_CLASS is not set
502# CONFIG_UIO is not set
503
504#
505# File systems
506#
507CONFIG_EXT2_FS=y
508# CONFIG_EXT2_FS_XATTR is not set
509# CONFIG_EXT3_FS is not set
510# CONFIG_EXT4DEV_FS is not set
511# CONFIG_REISERFS_FS is not set
512# CONFIG_JFS_FS is not set
513# CONFIG_FS_POSIX_ACL is not set
514# CONFIG_XFS_FS is not set
515# CONFIG_DNOTIFY is not set
516# CONFIG_INOTIFY is not set
517# CONFIG_QUOTA is not set
518# CONFIG_AUTOFS_FS is not set
519# CONFIG_AUTOFS4_FS is not set
520# CONFIG_FUSE_FS is not set
521
522#
523# CD-ROM/DVD Filesystems
524#
525# CONFIG_ISO9660_FS is not set
526# CONFIG_UDF_FS is not set
527
528#
529# DOS/FAT/NT Filesystems
530#
531# CONFIG_MSDOS_FS is not set
532# CONFIG_VFAT_FS is not set
533# CONFIG_NTFS_FS is not set
534
535#
536# Pseudo filesystems
537#
538CONFIG_PROC_FS=y
539CONFIG_PROC_SYSCTL=y
540# CONFIG_SYSFS is not set
541# CONFIG_TMPFS is not set
542# CONFIG_HUGETLB_PAGE is not set
543
544#
545# Miscellaneous filesystems
546#
547# CONFIG_ADFS_FS is not set
548# CONFIG_AFFS_FS is not set
549# CONFIG_HFS_FS is not set
550# CONFIG_HFSPLUS_FS is not set
551# CONFIG_BEFS_FS is not set
552# CONFIG_BFS_FS is not set
553# CONFIG_EFS_FS is not set
554# CONFIG_JFFS2_FS is not set
555# CONFIG_CRAMFS is not set
556# CONFIG_VXFS_FS is not set
557# CONFIG_MINIX_FS is not set
558# CONFIG_HPFS_FS is not set
559# CONFIG_QNX4FS_FS is not set
560CONFIG_ROMFS_FS=y
561# CONFIG_SYSV_FS is not set
562# CONFIG_UFS_FS is not set
563# CONFIG_NETWORK_FILESYSTEMS is not set
564
565#
566# Partition Types
567#
568# CONFIG_PARTITION_ADVANCED is not set
569CONFIG_MSDOS_PARTITION=y
570# CONFIG_NLS is not set
571
572#
573# Kernel hacking
574#
575# CONFIG_PRINTK_TIME is not set
576CONFIG_ENABLE_WARN_DEPRECATED=y
577CONFIG_ENABLE_MUST_CHECK=y
578CONFIG_FRAME_WARN=1024
579# CONFIG_MAGIC_SYSRQ is not set
580# CONFIG_UNUSED_SYMBOLS is not set
581# CONFIG_HEADERS_CHECK is not set
582# CONFIG_DEBUG_KERNEL is not set
583# CONFIG_DEBUG_BUGVERBOSE is not set
584# CONFIG_SAMPLES is not set
585CONFIG_FULLDEBUG=y
586# CONFIG_HIGHPROFILE is not set
587# CONFIG_BOOTPARAM is not set
588# CONFIG_NO_KERNEL_MSG is not set
589# CONFIG_BDM_DISABLE is not set
590
591#
592# Security options
593#
594# CONFIG_KEYS is not set
595# CONFIG_SECURITY_FILE_CAPABILITIES is not set
596# CONFIG_CRYPTO is not set
597
598#
599# Library routines
600#
601CONFIG_BITREVERSE=y
602# CONFIG_GENERIC_FIND_FIRST_BIT is not set
603# CONFIG_CRC_CCITT is not set
604# CONFIG_CRC16 is not set
605# CONFIG_CRC_ITU_T is not set
606CONFIG_CRC32=y
607# CONFIG_CRC7 is not set
608# CONFIG_LIBCRC32C is not set
609CONFIG_HAS_IOMEM=y
610CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/configs/m5249evb_defconfig b/arch/m68knommu/configs/m5249evb_defconfig
new file mode 100644
index 000000000000..cc6458333d67
--- /dev/null
+++ b/arch/m68knommu/configs/m5249evb_defconfig
@@ -0,0 +1,497 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc1
4#
5CONFIG_M68K=y
6# CONFIG_MMU is not set
7# CONFIG_FPU is not set
8CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
11# CONFIG_ARCH_HAS_ILOG2_U32 is not set
12# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_TIME=y
18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_ARCH_SUPPORTS_AOUT=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22
23#
24# General setup
25#
26CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29CONFIG_LOCALVERSION=""
30CONFIG_LOCALVERSION_AUTO=y
31# CONFIG_SYSVIPC is not set
32# CONFIG_BSD_PROCESS_ACCT is not set
33# CONFIG_IKCONFIG is not set
34CONFIG_LOG_BUF_SHIFT=14
35# CONFIG_CGROUPS is not set
36# CONFIG_GROUP_SCHED is not set
37# CONFIG_SYSFS_DEPRECATED_V2 is not set
38# CONFIG_RELAY is not set
39# CONFIG_NAMESPACES is not set
40# CONFIG_BLK_DEV_INITRD is not set
41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SYSCTL=y
43CONFIG_EMBEDDED=y
44# CONFIG_UID16 is not set
45# CONFIG_SYSCTL_SYSCALL is not set
46# CONFIG_KALLSYMS is not set
47# CONFIG_HOTPLUG is not set
48CONFIG_PRINTK=y
49CONFIG_BUG=y
50CONFIG_ELF_CORE=y
51# CONFIG_COMPAT_BRK is not set
52CONFIG_BASE_FULL=y
53# CONFIG_FUTEX is not set
54# CONFIG_EPOLL is not set
55# CONFIG_SIGNALFD is not set
56# CONFIG_TIMERFD is not set
57# CONFIG_EVENTFD is not set
58# CONFIG_VM_EVENT_COUNTERS is not set
59CONFIG_SLAB=y
60# CONFIG_SLUB is not set
61# CONFIG_SLOB is not set
62# CONFIG_PROFILING is not set
63# CONFIG_MARKERS is not set
64# CONFIG_HAVE_OPROFILE is not set
65# CONFIG_HAVE_KPROBES is not set
66# CONFIG_HAVE_KRETPROBES is not set
67# CONFIG_HAVE_DMA_ATTRS is not set
68CONFIG_SLABINFO=y
69CONFIG_TINY_SHMEM=y
70CONFIG_BASE_SMALL=0
71CONFIG_MODULES=y
72CONFIG_MODULE_UNLOAD=y
73# CONFIG_MODULE_FORCE_UNLOAD is not set
74# CONFIG_MODVERSIONS is not set
75# CONFIG_MODULE_SRCVERSION_ALL is not set
76# CONFIG_KMOD is not set
77CONFIG_BLOCK=y
78# CONFIG_LBD is not set
79# CONFIG_BLK_DEV_IO_TRACE is not set
80# CONFIG_LSF is not set
81# CONFIG_BLK_DEV_BSG is not set
82
83#
84# IO Schedulers
85#
86CONFIG_IOSCHED_NOOP=y
87# CONFIG_IOSCHED_AS is not set
88# CONFIG_IOSCHED_DEADLINE is not set
89# CONFIG_IOSCHED_CFQ is not set
90# CONFIG_DEFAULT_AS is not set
91# CONFIG_DEFAULT_DEADLINE is not set
92# CONFIG_DEFAULT_CFQ is not set
93CONFIG_DEFAULT_NOOP=y
94CONFIG_DEFAULT_IOSCHED="noop"
95CONFIG_CLASSIC_RCU=y
96
97#
98# Processor type and features
99#
100# CONFIG_M68328 is not set
101# CONFIG_M68EZ328 is not set
102# CONFIG_M68VZ328 is not set
103# CONFIG_M68360 is not set
104# CONFIG_M5206 is not set
105# CONFIG_M5206e is not set
106# CONFIG_M520x is not set
107# CONFIG_M523x is not set
108CONFIG_M5249=y
109# CONFIG_M5271 is not set
110# CONFIG_M5272 is not set
111# CONFIG_M5275 is not set
112# CONFIG_M528x is not set
113# CONFIG_M5307 is not set
114# CONFIG_M532x is not set
115# CONFIG_M5407 is not set
116CONFIG_COLDFIRE=y
117CONFIG_CLOCK_SET=y
118CONFIG_CLOCK_FREQ=140000000
119CONFIG_CLOCK_DIV=2
120
121#
122# Platform
123#
124CONFIG_M5249C3=y
125CONFIG_FREESCALE=y
126CONFIG_4KSTACKS=y
127CONFIG_HZ=100
128
129#
130# RAM configuration
131#
132CONFIG_RAMBASE=0x00000000
133CONFIG_RAMSIZE=0x00800000
134CONFIG_VECTORBASE=0x00000000
135CONFIG_KERNELBASE=0x00020000
136CONFIG_RAMAUTOBIT=y
137# CONFIG_RAM8BIT is not set
138# CONFIG_RAM16BIT is not set
139# CONFIG_RAM32BIT is not set
140
141#
142# ROM configuration
143#
144# CONFIG_ROM is not set
145CONFIG_RAMKERNEL=y
146# CONFIG_ROMKERNEL is not set
147CONFIG_SELECT_MEMORY_MODEL=y
148CONFIG_FLATMEM_MANUAL=y
149# CONFIG_DISCONTIGMEM_MANUAL is not set
150# CONFIG_SPARSEMEM_MANUAL is not set
151CONFIG_FLATMEM=y
152CONFIG_FLAT_NODE_MEM_MAP=y
153# CONFIG_SPARSEMEM_STATIC is not set
154# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
155CONFIG_PAGEFLAGS_EXTENDED=y
156CONFIG_SPLIT_PTLOCK_CPUS=4
157# CONFIG_RESOURCES_64BIT is not set
158CONFIG_ZONE_DMA_FLAG=1
159CONFIG_VIRT_TO_BUS=y
160CONFIG_ISA_DMA_API=y
161
162#
163# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
164#
165# CONFIG_PCI is not set
166# CONFIG_ARCH_SUPPORTS_MSI is not set
167
168#
169# Executable file formats
170#
171CONFIG_BINFMT_FLAT=y
172# CONFIG_BINFMT_ZFLAT is not set
173# CONFIG_BINFMT_SHARED_FLAT is not set
174# CONFIG_BINFMT_AOUT is not set
175# CONFIG_BINFMT_MISC is not set
176
177#
178# Power management options
179#
180# CONFIG_PM is not set
181
182#
183# Networking
184#
185# CONFIG_NET is not set
186
187#
188# Device Drivers
189#
190
191#
192# Generic Driver Options
193#
194CONFIG_STANDALONE=y
195CONFIG_PREVENT_FIRMWARE_BUILD=y
196# CONFIG_SYS_HYPERVISOR is not set
197CONFIG_MTD=y
198# CONFIG_MTD_DEBUG is not set
199# CONFIG_MTD_CONCAT is not set
200CONFIG_MTD_PARTITIONS=y
201# CONFIG_MTD_REDBOOT_PARTS is not set
202# CONFIG_MTD_CMDLINE_PARTS is not set
203# CONFIG_MTD_AR7_PARTS is not set
204
205#
206# User Modules And Translation Layers
207#
208CONFIG_MTD_CHAR=y
209CONFIG_MTD_BLKDEVS=y
210CONFIG_MTD_BLOCK=y
211# CONFIG_FTL is not set
212# CONFIG_NFTL is not set
213# CONFIG_INFTL is not set
214# CONFIG_RFD_FTL is not set
215# CONFIG_SSFDC is not set
216# CONFIG_MTD_OOPS is not set
217
218#
219# RAM/ROM/Flash chip drivers
220#
221# CONFIG_MTD_CFI is not set
222# CONFIG_MTD_JEDECPROBE is not set
223CONFIG_MTD_MAP_BANK_WIDTH_1=y
224CONFIG_MTD_MAP_BANK_WIDTH_2=y
225CONFIG_MTD_MAP_BANK_WIDTH_4=y
226# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
227# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
228# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
229CONFIG_MTD_CFI_I1=y
230CONFIG_MTD_CFI_I2=y
231# CONFIG_MTD_CFI_I4 is not set
232# CONFIG_MTD_CFI_I8 is not set
233CONFIG_MTD_RAM=y
234# CONFIG_MTD_ROM is not set
235# CONFIG_MTD_ABSENT is not set
236
237#
238# Mapping drivers for chip access
239#
240# CONFIG_MTD_COMPLEX_MAPPINGS is not set
241CONFIG_MTD_UCLINUX=y
242# CONFIG_MTD_PLATRAM is not set
243
244#
245# Self-contained MTD device drivers
246#
247# CONFIG_MTD_SLRAM is not set
248# CONFIG_MTD_PHRAM is not set
249# CONFIG_MTD_MTDRAM is not set
250# CONFIG_MTD_BLOCK2MTD is not set
251
252#
253# Disk-On-Chip Device Drivers
254#
255# CONFIG_MTD_DOC2000 is not set
256# CONFIG_MTD_DOC2001 is not set
257# CONFIG_MTD_DOC2001PLUS is not set
258# CONFIG_MTD_NAND is not set
259# CONFIG_MTD_ONENAND is not set
260
261#
262# UBI - Unsorted block images
263#
264# CONFIG_MTD_UBI is not set
265# CONFIG_PARPORT is not set
266CONFIG_BLK_DEV=y
267# CONFIG_BLK_DEV_COW_COMMON is not set
268# CONFIG_BLK_DEV_LOOP is not set
269CONFIG_BLK_DEV_RAM=y
270CONFIG_BLK_DEV_RAM_COUNT=16
271CONFIG_BLK_DEV_RAM_SIZE=4096
272# CONFIG_BLK_DEV_XIP is not set
273# CONFIG_CDROM_PKTCDVD is not set
274CONFIG_MISC_DEVICES=y
275# CONFIG_EEPROM_93CX6 is not set
276# CONFIG_ENCLOSURE_SERVICES is not set
277CONFIG_HAVE_IDE=y
278# CONFIG_IDE is not set
279
280#
281# SCSI device support
282#
283# CONFIG_RAID_ATTRS is not set
284# CONFIG_SCSI is not set
285# CONFIG_SCSI_DMA is not set
286# CONFIG_SCSI_NETLINK is not set
287# CONFIG_MD is not set
288# CONFIG_PHONE is not set
289
290#
291# Input device support
292#
293# CONFIG_INPUT is not set
294
295#
296# Hardware I/O ports
297#
298# CONFIG_SERIO is not set
299# CONFIG_GAMEPORT is not set
300
301#
302# Character devices
303#
304# CONFIG_VT is not set
305# CONFIG_DEVKMEM is not set
306# CONFIG_SERIAL_NONSTANDARD is not set
307
308#
309# Serial drivers
310#
311# CONFIG_SERIAL_8250 is not set
312
313#
314# Non-8250 serial port support
315#
316CONFIG_SERIAL_CORE=y
317CONFIG_SERIAL_CORE_CONSOLE=y
318# CONFIG_SERIAL_COLDFIRE is not set
319CONFIG_SERIAL_MCF=y
320CONFIG_SERIAL_MCF_BAUDRATE=19200
321CONFIG_SERIAL_MCF_CONSOLE=y
322# CONFIG_UNIX98_PTYS is not set
323CONFIG_LEGACY_PTYS=y
324CONFIG_LEGACY_PTY_COUNT=256
325# CONFIG_IPMI_HANDLER is not set
326# CONFIG_HW_RANDOM is not set
327# CONFIG_GEN_RTC is not set
328# CONFIG_R3964 is not set
329# CONFIG_RAW_DRIVER is not set
330# CONFIG_TCG_TPM is not set
331# CONFIG_I2C is not set
332# CONFIG_SPI is not set
333# CONFIG_W1 is not set
334# CONFIG_POWER_SUPPLY is not set
335# CONFIG_HWMON is not set
336# CONFIG_THERMAL is not set
337# CONFIG_WATCHDOG is not set
338
339#
340# Sonics Silicon Backplane
341#
342CONFIG_SSB_POSSIBLE=y
343# CONFIG_SSB is not set
344
345#
346# Multifunction device drivers
347#
348# CONFIG_MFD_SM501 is not set
349# CONFIG_HTC_PASIC3 is not set
350
351#
352# Multimedia devices
353#
354
355#
356# Multimedia core support
357#
358# CONFIG_VIDEO_DEV is not set
359
360#
361# Multimedia drivers
362#
363# CONFIG_DAB is not set
364
365#
366# Graphics support
367#
368# CONFIG_VGASTATE is not set
369# CONFIG_VIDEO_OUTPUT_CONTROL is not set
370# CONFIG_FB is not set
371# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
372
373#
374# Display device support
375#
376# CONFIG_DISPLAY_SUPPORT is not set
377
378#
379# Sound
380#
381# CONFIG_SOUND is not set
382# CONFIG_USB_SUPPORT is not set
383# CONFIG_MMC is not set
384# CONFIG_MEMSTICK is not set
385# CONFIG_NEW_LEDS is not set
386# CONFIG_ACCESSIBILITY is not set
387# CONFIG_RTC_CLASS is not set
388# CONFIG_UIO is not set
389
390#
391# File systems
392#
393CONFIG_EXT2_FS=y
394# CONFIG_EXT2_FS_XATTR is not set
395# CONFIG_EXT3_FS is not set
396# CONFIG_EXT4DEV_FS is not set
397# CONFIG_REISERFS_FS is not set
398# CONFIG_JFS_FS is not set
399# CONFIG_FS_POSIX_ACL is not set
400# CONFIG_XFS_FS is not set
401# CONFIG_DNOTIFY is not set
402# CONFIG_INOTIFY is not set
403# CONFIG_QUOTA is not set
404# CONFIG_AUTOFS_FS is not set
405# CONFIG_AUTOFS4_FS is not set
406# CONFIG_FUSE_FS is not set
407
408#
409# CD-ROM/DVD Filesystems
410#
411# CONFIG_ISO9660_FS is not set
412# CONFIG_UDF_FS is not set
413
414#
415# DOS/FAT/NT Filesystems
416#
417# CONFIG_MSDOS_FS is not set
418# CONFIG_VFAT_FS is not set
419# CONFIG_NTFS_FS is not set
420
421#
422# Pseudo filesystems
423#
424CONFIG_PROC_FS=y
425CONFIG_PROC_SYSCTL=y
426CONFIG_SYSFS=y
427# CONFIG_TMPFS is not set
428# CONFIG_HUGETLB_PAGE is not set
429# CONFIG_CONFIGFS_FS is not set
430
431#
432# Miscellaneous filesystems
433#
434# CONFIG_ADFS_FS is not set
435# CONFIG_AFFS_FS is not set
436# CONFIG_HFS_FS is not set
437# CONFIG_HFSPLUS_FS is not set
438# CONFIG_BEFS_FS is not set
439# CONFIG_BFS_FS is not set
440# CONFIG_EFS_FS is not set
441# CONFIG_JFFS2_FS is not set
442# CONFIG_CRAMFS is not set
443# CONFIG_VXFS_FS is not set
444# CONFIG_MINIX_FS is not set
445# CONFIG_HPFS_FS is not set
446# CONFIG_QNX4FS_FS is not set
447CONFIG_ROMFS_FS=y
448# CONFIG_SYSV_FS is not set
449# CONFIG_UFS_FS is not set
450
451#
452# Partition Types
453#
454# CONFIG_PARTITION_ADVANCED is not set
455CONFIG_MSDOS_PARTITION=y
456# CONFIG_NLS is not set
457
458#
459# Kernel hacking
460#
461# CONFIG_PRINTK_TIME is not set
462CONFIG_ENABLE_WARN_DEPRECATED=y
463CONFIG_ENABLE_MUST_CHECK=y
464CONFIG_FRAME_WARN=1024
465# CONFIG_MAGIC_SYSRQ is not set
466# CONFIG_UNUSED_SYMBOLS is not set
467# CONFIG_DEBUG_FS is not set
468# CONFIG_HEADERS_CHECK is not set
469# CONFIG_DEBUG_KERNEL is not set
470# CONFIG_DEBUG_BUGVERBOSE is not set
471# CONFIG_SAMPLES is not set
472# CONFIG_FULLDEBUG is not set
473# CONFIG_HIGHPROFILE is not set
474# CONFIG_BOOTPARAM is not set
475# CONFIG_NO_KERNEL_MSG is not set
476# CONFIG_BDM_DISABLE is not set
477
478#
479# Security options
480#
481# CONFIG_KEYS is not set
482# CONFIG_SECURITY is not set
483# CONFIG_SECURITY_FILE_CAPABILITIES is not set
484# CONFIG_CRYPTO is not set
485
486#
487# Library routines
488#
489# CONFIG_GENERIC_FIND_FIRST_BIT is not set
490# CONFIG_CRC_CCITT is not set
491# CONFIG_CRC16 is not set
492# CONFIG_CRC_ITU_T is not set
493# CONFIG_CRC32 is not set
494# CONFIG_CRC7 is not set
495# CONFIG_LIBCRC32C is not set
496CONFIG_HAS_IOMEM=y
497CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/configs/m5275evb_defconfig b/arch/m68knommu/configs/m5275evb_defconfig
new file mode 100644
index 000000000000..0d1256f5addb
--- /dev/null
+++ b/arch/m68knommu/configs/m5275evb_defconfig
@@ -0,0 +1,627 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc1
4#
5CONFIG_M68K=y
6# CONFIG_MMU is not set
7# CONFIG_FPU is not set
8CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
11# CONFIG_ARCH_HAS_ILOG2_U32 is not set
12# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_TIME=y
18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_ARCH_SUPPORTS_AOUT=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22
23#
24# General setup
25#
26CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29CONFIG_LOCALVERSION=""
30CONFIG_LOCALVERSION_AUTO=y
31# CONFIG_SYSVIPC is not set
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set
35# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set
40# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set
43# CONFIG_BLK_DEV_INITRD is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y
46CONFIG_EMBEDDED=y
47# CONFIG_UID16 is not set
48# CONFIG_SYSCTL_SYSCALL is not set
49# CONFIG_KALLSYMS is not set
50# CONFIG_HOTPLUG is not set
51CONFIG_PRINTK=y
52CONFIG_BUG=y
53CONFIG_ELF_CORE=y
54# CONFIG_COMPAT_BRK is not set
55CONFIG_BASE_FULL=y
56# CONFIG_FUTEX is not set
57# CONFIG_EPOLL is not set
58# CONFIG_SIGNALFD is not set
59# CONFIG_TIMERFD is not set
60# CONFIG_EVENTFD is not set
61# CONFIG_VM_EVENT_COUNTERS is not set
62CONFIG_SLAB=y
63# CONFIG_SLUB is not set
64# CONFIG_SLOB is not set
65# CONFIG_PROFILING is not set
66# CONFIG_MARKERS is not set
67# CONFIG_HAVE_OPROFILE is not set
68# CONFIG_HAVE_KPROBES is not set
69# CONFIG_HAVE_KRETPROBES is not set
70# CONFIG_HAVE_DMA_ATTRS is not set
71CONFIG_SLABINFO=y
72CONFIG_TINY_SHMEM=y
73CONFIG_BASE_SMALL=0
74CONFIG_MODULES=y
75CONFIG_MODULE_UNLOAD=y
76# CONFIG_MODULE_FORCE_UNLOAD is not set
77# CONFIG_MODVERSIONS is not set
78# CONFIG_MODULE_SRCVERSION_ALL is not set
79# CONFIG_KMOD is not set
80CONFIG_BLOCK=y
81# CONFIG_LBD is not set
82# CONFIG_BLK_DEV_IO_TRACE is not set
83# CONFIG_LSF is not set
84# CONFIG_BLK_DEV_BSG is not set
85
86#
87# IO Schedulers
88#
89CONFIG_IOSCHED_NOOP=y
90# CONFIG_IOSCHED_AS is not set
91# CONFIG_IOSCHED_DEADLINE is not set
92# CONFIG_IOSCHED_CFQ is not set
93# CONFIG_DEFAULT_AS is not set
94# CONFIG_DEFAULT_DEADLINE is not set
95# CONFIG_DEFAULT_CFQ is not set
96CONFIG_DEFAULT_NOOP=y
97CONFIG_DEFAULT_IOSCHED="noop"
98CONFIG_CLASSIC_RCU=y
99
100#
101# Processor type and features
102#
103# CONFIG_M68328 is not set
104# CONFIG_M68EZ328 is not set
105# CONFIG_M68VZ328 is not set
106# CONFIG_M68360 is not set
107# CONFIG_M5206 is not set
108# CONFIG_M5206e is not set
109# CONFIG_M520x is not set
110# CONFIG_M523x is not set
111# CONFIG_M5249 is not set
112# CONFIG_M5271 is not set
113# CONFIG_M5272 is not set
114CONFIG_M5275=y
115# CONFIG_M528x is not set
116# CONFIG_M5307 is not set
117# CONFIG_M532x is not set
118# CONFIG_M5407 is not set
119CONFIG_M527x=y
120CONFIG_COLDFIRE=y
121CONFIG_CLOCK_SET=y
122CONFIG_CLOCK_FREQ=150000000
123CONFIG_CLOCK_DIV=2
124
125#
126# Platform
127#
128CONFIG_M5275EVB=y
129CONFIG_FREESCALE=y
130# CONFIG_4KSTACKS is not set
131CONFIG_HZ=100
132
133#
134# RAM configuration
135#
136CONFIG_RAMBASE=0x00000000
137CONFIG_RAMSIZE=0x00000000
138CONFIG_VECTORBASE=0x00000000
139CONFIG_KERNELBASE=0x00020000
140CONFIG_RAMAUTOBIT=y
141# CONFIG_RAM8BIT is not set
142# CONFIG_RAM16BIT is not set
143# CONFIG_RAM32BIT is not set
144
145#
146# ROM configuration
147#
148# CONFIG_ROM is not set
149CONFIG_RAMKERNEL=y
150# CONFIG_ROMKERNEL is not set
151CONFIG_SELECT_MEMORY_MODEL=y
152CONFIG_FLATMEM_MANUAL=y
153# CONFIG_DISCONTIGMEM_MANUAL is not set
154# CONFIG_SPARSEMEM_MANUAL is not set
155CONFIG_FLATMEM=y
156CONFIG_FLAT_NODE_MEM_MAP=y
157# CONFIG_SPARSEMEM_STATIC is not set
158# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
159CONFIG_PAGEFLAGS_EXTENDED=y
160CONFIG_SPLIT_PTLOCK_CPUS=4
161# CONFIG_RESOURCES_64BIT is not set
162CONFIG_ZONE_DMA_FLAG=1
163CONFIG_VIRT_TO_BUS=y
164CONFIG_ISA_DMA_API=y
165
166#
167# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
168#
169# CONFIG_PCI is not set
170# CONFIG_ARCH_SUPPORTS_MSI is not set
171
172#
173# Executable file formats
174#
175CONFIG_BINFMT_FLAT=y
176# CONFIG_BINFMT_ZFLAT is not set
177# CONFIG_BINFMT_SHARED_FLAT is not set
178# CONFIG_BINFMT_AOUT is not set
179# CONFIG_BINFMT_MISC is not set
180
181#
182# Power management options
183#
184# CONFIG_PM is not set
185
186#
187# Networking
188#
189CONFIG_NET=y
190
191#
192# Networking options
193#
194CONFIG_PACKET=y
195# CONFIG_PACKET_MMAP is not set
196CONFIG_UNIX=y
197# CONFIG_NET_KEY is not set
198CONFIG_INET=y
199# CONFIG_IP_MULTICAST is not set
200# CONFIG_IP_ADVANCED_ROUTER is not set
201CONFIG_IP_FIB_HASH=y
202# CONFIG_IP_PNP is not set
203# CONFIG_NET_IPIP is not set
204# CONFIG_NET_IPGRE is not set
205# CONFIG_ARPD is not set
206# CONFIG_SYN_COOKIES is not set
207# CONFIG_INET_AH is not set
208# CONFIG_INET_ESP is not set
209# CONFIG_INET_IPCOMP is not set
210# CONFIG_INET_XFRM_TUNNEL is not set
211# CONFIG_INET_TUNNEL is not set
212# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
213# CONFIG_INET_XFRM_MODE_TUNNEL is not set
214# CONFIG_INET_XFRM_MODE_BEET is not set
215# CONFIG_INET_LRO is not set
216# CONFIG_INET_DIAG is not set
217# CONFIG_TCP_CONG_ADVANCED is not set
218CONFIG_TCP_CONG_CUBIC=y
219CONFIG_DEFAULT_TCP_CONG="cubic"
220# CONFIG_TCP_MD5SIG is not set
221# CONFIG_IPV6 is not set
222# CONFIG_NETWORK_SECMARK is not set
223# CONFIG_NETFILTER is not set
224# CONFIG_IP_DCCP is not set
225# CONFIG_IP_SCTP is not set
226# CONFIG_TIPC is not set
227# CONFIG_ATM is not set
228# CONFIG_BRIDGE is not set
229# CONFIG_VLAN_8021Q is not set
230# CONFIG_DECNET is not set
231# CONFIG_LLC2 is not set
232# CONFIG_IPX is not set
233# CONFIG_ATALK is not set
234# CONFIG_X25 is not set
235# CONFIG_LAPB is not set
236# CONFIG_ECONET is not set
237# CONFIG_WAN_ROUTER is not set
238# CONFIG_NET_SCHED is not set
239
240#
241# Network testing
242#
243# CONFIG_NET_PKTGEN is not set
244# CONFIG_HAMRADIO is not set
245# CONFIG_CAN is not set
246# CONFIG_IRDA is not set
247# CONFIG_BT is not set
248# CONFIG_AF_RXRPC is not set
249
250#
251# Wireless
252#
253# CONFIG_CFG80211 is not set
254# CONFIG_WIRELESS_EXT is not set
255# CONFIG_MAC80211 is not set
256# CONFIG_IEEE80211 is not set
257# CONFIG_RFKILL is not set
258# CONFIG_NET_9P is not set
259
260#
261# Device Drivers
262#
263
264#
265# Generic Driver Options
266#
267CONFIG_STANDALONE=y
268CONFIG_PREVENT_FIRMWARE_BUILD=y
269# CONFIG_SYS_HYPERVISOR is not set
270# CONFIG_CONNECTOR is not set
271CONFIG_MTD=y
272# CONFIG_MTD_DEBUG is not set
273# CONFIG_MTD_CONCAT is not set
274CONFIG_MTD_PARTITIONS=y
275# CONFIG_MTD_REDBOOT_PARTS is not set
276# CONFIG_MTD_CMDLINE_PARTS is not set
277# CONFIG_MTD_AR7_PARTS is not set
278
279#
280# User Modules And Translation Layers
281#
282CONFIG_MTD_CHAR=y
283CONFIG_MTD_BLKDEVS=y
284CONFIG_MTD_BLOCK=y
285# CONFIG_FTL is not set
286# CONFIG_NFTL is not set
287# CONFIG_INFTL is not set
288# CONFIG_RFD_FTL is not set
289# CONFIG_SSFDC is not set
290# CONFIG_MTD_OOPS is not set
291
292#
293# RAM/ROM/Flash chip drivers
294#
295# CONFIG_MTD_CFI is not set
296# CONFIG_MTD_JEDECPROBE is not set
297CONFIG_MTD_MAP_BANK_WIDTH_1=y
298CONFIG_MTD_MAP_BANK_WIDTH_2=y
299CONFIG_MTD_MAP_BANK_WIDTH_4=y
300# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
301# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
302# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
303CONFIG_MTD_CFI_I1=y
304CONFIG_MTD_CFI_I2=y
305# CONFIG_MTD_CFI_I4 is not set
306# CONFIG_MTD_CFI_I8 is not set
307CONFIG_MTD_RAM=y
308# CONFIG_MTD_ROM is not set
309# CONFIG_MTD_ABSENT is not set
310
311#
312# Mapping drivers for chip access
313#
314# CONFIG_MTD_COMPLEX_MAPPINGS is not set
315CONFIG_MTD_UCLINUX=y
316# CONFIG_MTD_PLATRAM is not set
317
318#
319# Self-contained MTD device drivers
320#
321# CONFIG_MTD_SLRAM is not set
322# CONFIG_MTD_PHRAM is not set
323# CONFIG_MTD_MTDRAM is not set
324# CONFIG_MTD_BLOCK2MTD is not set
325
326#
327# Disk-On-Chip Device Drivers
328#
329# CONFIG_MTD_DOC2000 is not set
330# CONFIG_MTD_DOC2001 is not set
331# CONFIG_MTD_DOC2001PLUS is not set
332# CONFIG_MTD_NAND is not set
333# CONFIG_MTD_ONENAND is not set
334
335#
336# UBI - Unsorted block images
337#
338# CONFIG_MTD_UBI is not set
339# CONFIG_PARPORT is not set
340CONFIG_BLK_DEV=y
341# CONFIG_BLK_DEV_COW_COMMON is not set
342# CONFIG_BLK_DEV_LOOP is not set
343# CONFIG_BLK_DEV_NBD is not set
344CONFIG_BLK_DEV_RAM=y
345CONFIG_BLK_DEV_RAM_COUNT=16
346CONFIG_BLK_DEV_RAM_SIZE=4096
347# CONFIG_BLK_DEV_XIP is not set
348# CONFIG_CDROM_PKTCDVD is not set
349# CONFIG_ATA_OVER_ETH is not set
350# CONFIG_MISC_DEVICES is not set
351CONFIG_HAVE_IDE=y
352# CONFIG_IDE is not set
353
354#
355# SCSI device support
356#
357# CONFIG_RAID_ATTRS is not set
358# CONFIG_SCSI is not set
359# CONFIG_SCSI_DMA is not set
360# CONFIG_SCSI_NETLINK is not set
361# CONFIG_MD 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
370# CONFIG_PHYLIB is not set
371CONFIG_NET_ETHERNET=y
372# CONFIG_MII is not set
373# CONFIG_IBM_NEW_EMAC_ZMII is not set
374# CONFIG_IBM_NEW_EMAC_RGMII is not set
375# CONFIG_IBM_NEW_EMAC_TAH is not set
376# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
377# CONFIG_B44 is not set
378CONFIG_FEC=y
379CONFIG_FEC2=y
380# CONFIG_NETDEV_1000 is not set
381# CONFIG_NETDEV_10000 is not set
382
383#
384# Wireless LAN
385#
386# CONFIG_WLAN_PRE80211 is not set
387# CONFIG_WLAN_80211 is not set
388# CONFIG_IWLWIFI is not set
389# CONFIG_IWLWIFI_LEDS is not set
390# CONFIG_WAN is not set
391CONFIG_PPP=y
392# CONFIG_PPP_MULTILINK is not set
393# CONFIG_PPP_FILTER is not set
394# CONFIG_PPP_ASYNC is not set
395# CONFIG_PPP_SYNC_TTY is not set
396# CONFIG_PPP_DEFLATE is not set
397# CONFIG_PPP_BSDCOMP is not set
398# CONFIG_PPP_MPPE is not set
399# CONFIG_PPPOE is not set
400# CONFIG_PPPOL2TP is not set
401# CONFIG_SLIP is not set
402CONFIG_SLHC=y
403# CONFIG_NETCONSOLE is not set
404# CONFIG_NETPOLL is not set
405# CONFIG_NET_POLL_CONTROLLER is not set
406# CONFIG_ISDN is not set
407# CONFIG_PHONE is not set
408
409#
410# Input device support
411#
412# CONFIG_INPUT is not set
413
414#
415# Hardware I/O ports
416#
417# CONFIG_SERIO is not set
418# CONFIG_GAMEPORT is not set
419
420#
421# Character devices
422#
423# CONFIG_VT is not set
424# CONFIG_DEVKMEM is not set
425# CONFIG_SERIAL_NONSTANDARD is not set
426
427#
428# Serial drivers
429#
430# CONFIG_SERIAL_8250 is not set
431
432#
433# Non-8250 serial port support
434#
435CONFIG_SERIAL_CORE=y
436CONFIG_SERIAL_CORE_CONSOLE=y
437# CONFIG_SERIAL_COLDFIRE is not set
438CONFIG_SERIAL_MCF=y
439CONFIG_SERIAL_MCF_BAUDRATE=19200
440CONFIG_SERIAL_MCF_CONSOLE=y
441# CONFIG_UNIX98_PTYS is not set
442CONFIG_LEGACY_PTYS=y
443CONFIG_LEGACY_PTY_COUNT=256
444# CONFIG_IPMI_HANDLER is not set
445# CONFIG_HW_RANDOM is not set
446# CONFIG_GEN_RTC is not set
447# CONFIG_R3964 is not set
448# CONFIG_RAW_DRIVER is not set
449# CONFIG_TCG_TPM is not set
450# CONFIG_I2C is not set
451# CONFIG_SPI is not set
452# CONFIG_W1 is not set
453# CONFIG_POWER_SUPPLY is not set
454# CONFIG_HWMON is not set
455# CONFIG_THERMAL is not set
456# CONFIG_WATCHDOG is not set
457
458#
459# Sonics Silicon Backplane
460#
461CONFIG_SSB_POSSIBLE=y
462# CONFIG_SSB is not set
463
464#
465# Multifunction device drivers
466#
467# CONFIG_MFD_SM501 is not set
468# CONFIG_HTC_PASIC3 is not set
469
470#
471# Multimedia devices
472#
473
474#
475# Multimedia core support
476#
477# CONFIG_VIDEO_DEV is not set
478# CONFIG_DVB_CORE is not set
479
480#
481# Multimedia drivers
482#
483CONFIG_DAB=y
484
485#
486# Graphics support
487#
488# CONFIG_VGASTATE is not set
489# CONFIG_VIDEO_OUTPUT_CONTROL is not set
490# CONFIG_FB is not set
491# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
492
493#
494# Display device support
495#
496# CONFIG_DISPLAY_SUPPORT is not set
497
498#
499# Sound
500#
501# CONFIG_SOUND is not set
502# CONFIG_USB_SUPPORT is not set
503# CONFIG_MMC is not set
504# CONFIG_MEMSTICK is not set
505# CONFIG_NEW_LEDS is not set
506# CONFIG_ACCESSIBILITY is not set
507# CONFIG_RTC_CLASS is not set
508# CONFIG_UIO is not set
509
510#
511# File systems
512#
513CONFIG_EXT2_FS=y
514# CONFIG_EXT2_FS_XATTR is not set
515# CONFIG_EXT3_FS is not set
516# CONFIG_EXT4DEV_FS is not set
517# CONFIG_REISERFS_FS is not set
518# CONFIG_JFS_FS is not set
519# CONFIG_FS_POSIX_ACL is not set
520# CONFIG_XFS_FS is not set
521# CONFIG_OCFS2_FS is not set
522# CONFIG_DNOTIFY is not set
523# CONFIG_INOTIFY is not set
524# CONFIG_QUOTA is not set
525# CONFIG_AUTOFS_FS is not set
526# CONFIG_AUTOFS4_FS is not set
527# CONFIG_FUSE_FS is not set
528
529#
530# CD-ROM/DVD Filesystems
531#
532# CONFIG_ISO9660_FS is not set
533# CONFIG_UDF_FS is not set
534
535#
536# DOS/FAT/NT Filesystems
537#
538# CONFIG_MSDOS_FS is not set
539# CONFIG_VFAT_FS is not set
540# CONFIG_NTFS_FS is not set
541
542#
543# Pseudo filesystems
544#
545CONFIG_PROC_FS=y
546CONFIG_PROC_SYSCTL=y
547CONFIG_SYSFS=y
548# CONFIG_TMPFS is not set
549# CONFIG_HUGETLB_PAGE is not set
550# CONFIG_CONFIGFS_FS is not set
551
552#
553# Miscellaneous filesystems
554#
555# CONFIG_ADFS_FS is not set
556# CONFIG_AFFS_FS is not set
557# CONFIG_HFS_FS is not set
558# CONFIG_HFSPLUS_FS is not set
559# CONFIG_BEFS_FS is not set
560# CONFIG_BFS_FS is not set
561# CONFIG_EFS_FS is not set
562# CONFIG_JFFS2_FS is not set
563# CONFIG_CRAMFS is not set
564# CONFIG_VXFS_FS is not set
565# CONFIG_MINIX_FS is not set
566# CONFIG_HPFS_FS is not set
567# CONFIG_QNX4FS_FS is not set
568CONFIG_ROMFS_FS=y
569# CONFIG_SYSV_FS is not set
570# CONFIG_UFS_FS is not set
571CONFIG_NETWORK_FILESYSTEMS=y
572# CONFIG_NFS_FS is not set
573# CONFIG_NFSD is not set
574# CONFIG_SMB_FS is not set
575# CONFIG_CIFS is not set
576# CONFIG_NCP_FS is not set
577# CONFIG_CODA_FS is not set
578# CONFIG_AFS_FS is not set
579
580#
581# Partition Types
582#
583# CONFIG_PARTITION_ADVANCED is not set
584CONFIG_MSDOS_PARTITION=y
585# CONFIG_NLS is not set
586# CONFIG_DLM is not set
587
588#
589# Kernel hacking
590#
591# CONFIG_PRINTK_TIME is not set
592CONFIG_ENABLE_WARN_DEPRECATED=y
593CONFIG_ENABLE_MUST_CHECK=y
594CONFIG_FRAME_WARN=1024
595# CONFIG_MAGIC_SYSRQ is not set
596# CONFIG_UNUSED_SYMBOLS is not set
597# CONFIG_DEBUG_FS is not set
598# CONFIG_HEADERS_CHECK is not set
599# CONFIG_DEBUG_KERNEL is not set
600# CONFIG_DEBUG_BUGVERBOSE is not set
601# CONFIG_SAMPLES is not set
602# CONFIG_FULLDEBUG is not set
603# CONFIG_HIGHPROFILE is not set
604# CONFIG_BOOTPARAM is not set
605# CONFIG_NO_KERNEL_MSG is not set
606# CONFIG_BDM_DISABLE is not set
607
608#
609# Security options
610#
611# CONFIG_KEYS is not set
612# CONFIG_SECURITY is not set
613# CONFIG_SECURITY_FILE_CAPABILITIES is not set
614# CONFIG_CRYPTO is not set
615
616#
617# Library routines
618#
619# CONFIG_GENERIC_FIND_FIRST_BIT is not set
620# CONFIG_CRC_CCITT is not set
621# CONFIG_CRC16 is not set
622# CONFIG_CRC_ITU_T is not set
623# CONFIG_CRC32 is not set
624# CONFIG_CRC7 is not set
625# CONFIG_LIBCRC32C is not set
626CONFIG_HAS_IOMEM=y
627CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/configs/m5307c3_defconfig b/arch/m68knommu/configs/m5307c3_defconfig
new file mode 100644
index 000000000000..fe2acdfa4d76
--- /dev/null
+++ b/arch/m68knommu/configs/m5307c3_defconfig
@@ -0,0 +1,580 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc1
4#
5CONFIG_M68K=y
6# CONFIG_MMU is not set
7# CONFIG_FPU is not set
8CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
11# CONFIG_ARCH_HAS_ILOG2_U32 is not set
12# CONFIG_ARCH_HAS_ILOG2_U64 is not set
13CONFIG_GENERIC_FIND_NEXT_BIT=y
14CONFIG_GENERIC_HWEIGHT=y
15CONFIG_GENERIC_HARDIRQS=y
16CONFIG_GENERIC_CALIBRATE_DELAY=y
17CONFIG_GENERIC_TIME=y
18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_ARCH_SUPPORTS_AOUT=y
21CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
22
23#
24# General setup
25#
26CONFIG_EXPERIMENTAL=y
27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
29CONFIG_LOCALVERSION=""
30CONFIG_LOCALVERSION_AUTO=y
31# CONFIG_SYSVIPC is not set
32# CONFIG_POSIX_MQUEUE is not set
33# CONFIG_BSD_PROCESS_ACCT is not set
34# CONFIG_TASKSTATS is not set
35# CONFIG_AUDIT is not set
36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_CGROUPS is not set
39# CONFIG_GROUP_SCHED is not set
40# CONFIG_SYSFS_DEPRECATED_V2 is not set
41# CONFIG_RELAY is not set
42# CONFIG_NAMESPACES is not set
43# CONFIG_BLK_DEV_INITRD is not set
44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
45CONFIG_SYSCTL=y
46CONFIG_EMBEDDED=y
47# CONFIG_UID16 is not set
48# CONFIG_SYSCTL_SYSCALL is not set
49# CONFIG_KALLSYMS is not set
50# CONFIG_HOTPLUG is not set
51CONFIG_PRINTK=y
52CONFIG_BUG=y
53CONFIG_ELF_CORE=y
54# CONFIG_COMPAT_BRK is not set
55CONFIG_BASE_FULL=y
56# CONFIG_FUTEX is not set
57# CONFIG_EPOLL is not set
58# CONFIG_SIGNALFD is not set
59# CONFIG_TIMERFD is not set
60# CONFIG_EVENTFD is not set
61# CONFIG_VM_EVENT_COUNTERS is not set
62CONFIG_SLAB=y
63# CONFIG_SLUB is not set
64# CONFIG_SLOB is not set
65# CONFIG_PROFILING is not set
66# CONFIG_MARKERS is not set
67# CONFIG_HAVE_OPROFILE is not set
68# CONFIG_HAVE_KPROBES is not set
69# CONFIG_HAVE_KRETPROBES is not set
70# CONFIG_HAVE_DMA_ATTRS is not set
71CONFIG_SLABINFO=y
72CONFIG_TINY_SHMEM=y
73CONFIG_BASE_SMALL=0
74CONFIG_MODULES=y
75CONFIG_MODULE_UNLOAD=y
76# CONFIG_MODULE_FORCE_UNLOAD is not set
77# CONFIG_MODVERSIONS is not set
78# CONFIG_MODULE_SRCVERSION_ALL is not set
79# CONFIG_KMOD is not set
80CONFIG_BLOCK=y
81# CONFIG_LBD is not set
82# CONFIG_BLK_DEV_IO_TRACE is not set
83# CONFIG_LSF is not set
84# CONFIG_BLK_DEV_BSG is not set
85
86#
87# IO Schedulers
88#
89CONFIG_IOSCHED_NOOP=y
90# CONFIG_IOSCHED_AS is not set
91# CONFIG_IOSCHED_DEADLINE is not set
92# CONFIG_IOSCHED_CFQ is not set
93# CONFIG_DEFAULT_AS is not set
94# CONFIG_DEFAULT_DEADLINE is not set
95# CONFIG_DEFAULT_CFQ is not set
96CONFIG_DEFAULT_NOOP=y
97CONFIG_DEFAULT_IOSCHED="noop"
98CONFIG_CLASSIC_RCU=y
99
100#
101# Processor type and features
102#
103# CONFIG_M68328 is not set
104# CONFIG_M68EZ328 is not set
105# CONFIG_M68VZ328 is not set
106# CONFIG_M68360 is not set
107# CONFIG_M5206 is not set
108# CONFIG_M5206e is not set
109# CONFIG_M520x is not set
110# CONFIG_M523x is not set
111# CONFIG_M5249 is not set
112# CONFIG_M5271 is not set
113# CONFIG_M5272 is not set
114# CONFIG_M5275 is not set
115# CONFIG_M528x is not set
116CONFIG_M5307=y
117# CONFIG_M532x is not set
118# CONFIG_M5407 is not set
119CONFIG_COLDFIRE=y
120CONFIG_CLOCK_SET=y
121CONFIG_CLOCK_FREQ=90000000
122CONFIG_CLOCK_DIV=2
123# CONFIG_OLDMASK is not set
124
125#
126# Platform
127#
128# CONFIG_ARN5307 is not set
129CONFIG_M5307C3=y
130# CONFIG_eLIA is not set
131# CONFIG_SECUREEDGEMP3 is not set
132# CONFIG_CLEOPATRA is not set
133# CONFIG_NETtel is not set
134CONFIG_FREESCALE=y
135# CONFIG_4KSTACKS is not set
136CONFIG_HZ=100
137
138#
139# RAM configuration
140#
141CONFIG_RAMBASE=0x00000000
142CONFIG_RAMSIZE=0x00800000
143CONFIG_VECTORBASE=0x00000000
144CONFIG_KERNELBASE=0x00020000
145CONFIG_RAMAUTOBIT=y
146# CONFIG_RAM8BIT is not set
147# CONFIG_RAM16BIT is not set
148# CONFIG_RAM32BIT is not set
149
150#
151# ROM configuration
152#
153# CONFIG_ROM is not set
154CONFIG_RAMKERNEL=y
155# CONFIG_ROMKERNEL is not set
156CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set
159# CONFIG_SPARSEMEM_MANUAL is not set
160CONFIG_FLATMEM=y
161CONFIG_FLAT_NODE_MEM_MAP=y
162# CONFIG_SPARSEMEM_STATIC is not set
163# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
164CONFIG_PAGEFLAGS_EXTENDED=y
165CONFIG_SPLIT_PTLOCK_CPUS=4
166# CONFIG_RESOURCES_64BIT is not set
167CONFIG_ZONE_DMA_FLAG=1
168CONFIG_VIRT_TO_BUS=y
169CONFIG_ISA_DMA_API=y
170
171#
172# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
173#
174# CONFIG_PCI is not set
175# CONFIG_COMEMPCI is not set
176# CONFIG_ARCH_SUPPORTS_MSI is not set
177
178#
179# Executable file formats
180#
181CONFIG_BINFMT_FLAT=y
182# CONFIG_BINFMT_ZFLAT is not set
183# CONFIG_BINFMT_SHARED_FLAT is not set
184# CONFIG_BINFMT_AOUT is not set
185# CONFIG_BINFMT_MISC is not set
186
187#
188# Power management options
189#
190# CONFIG_PM is not set
191
192#
193# Networking
194#
195CONFIG_NET=y
196
197#
198# Networking options
199#
200CONFIG_PACKET=y
201# CONFIG_PACKET_MMAP is not set
202CONFIG_UNIX=y
203# CONFIG_NET_KEY is not set
204CONFIG_INET=y
205# CONFIG_IP_MULTICAST is not set
206# CONFIG_IP_ADVANCED_ROUTER is not set
207CONFIG_IP_FIB_HASH=y
208# CONFIG_IP_PNP is not set
209# CONFIG_NET_IPIP is not set
210# CONFIG_NET_IPGRE is not set
211# CONFIG_ARPD is not set
212# CONFIG_SYN_COOKIES is not set
213# CONFIG_INET_AH is not set
214# CONFIG_INET_ESP is not set
215# CONFIG_INET_IPCOMP is not set
216# CONFIG_INET_XFRM_TUNNEL is not set
217# CONFIG_INET_TUNNEL is not set
218# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
219# CONFIG_INET_XFRM_MODE_TUNNEL is not set
220# CONFIG_INET_XFRM_MODE_BEET is not set
221# CONFIG_INET_LRO is not set
222# CONFIG_INET_DIAG is not set
223# CONFIG_TCP_CONG_ADVANCED is not set
224CONFIG_TCP_CONG_CUBIC=y
225CONFIG_DEFAULT_TCP_CONG="cubic"
226# CONFIG_TCP_MD5SIG is not set
227# CONFIG_IPV6 is not set
228# CONFIG_NETWORK_SECMARK is not set
229# CONFIG_NETFILTER is not set
230# CONFIG_IP_DCCP is not set
231# CONFIG_IP_SCTP is not set
232# CONFIG_TIPC is not set
233# CONFIG_ATM is not set
234# CONFIG_BRIDGE is not set
235# CONFIG_VLAN_8021Q is not set
236# CONFIG_DECNET is not set
237# CONFIG_LLC2 is not set
238# CONFIG_IPX is not set
239# CONFIG_ATALK is not set
240# CONFIG_X25 is not set
241# CONFIG_LAPB is not set
242# CONFIG_ECONET is not set
243# CONFIG_WAN_ROUTER is not set
244# CONFIG_NET_SCHED is not set
245
246#
247# Network testing
248#
249# CONFIG_NET_PKTGEN is not set
250# CONFIG_HAMRADIO is not set
251# CONFIG_CAN is not set
252# CONFIG_IRDA is not set
253# CONFIG_BT is not set
254# CONFIG_AF_RXRPC is not set
255
256#
257# Wireless
258#
259# CONFIG_CFG80211 is not set
260# CONFIG_WIRELESS_EXT is not set
261# CONFIG_MAC80211 is not set
262# CONFIG_IEEE80211 is not set
263# CONFIG_RFKILL is not set
264# CONFIG_NET_9P is not set
265
266#
267# Device Drivers
268#
269
270#
271# Generic Driver Options
272#
273CONFIG_STANDALONE=y
274CONFIG_PREVENT_FIRMWARE_BUILD=y
275# CONFIG_SYS_HYPERVISOR is not set
276# CONFIG_CONNECTOR is not set
277# CONFIG_MTD is not set
278# CONFIG_PARPORT is not set
279CONFIG_BLK_DEV=y
280# CONFIG_BLK_DEV_COW_COMMON is not set
281# CONFIG_BLK_DEV_LOOP is not set
282# CONFIG_BLK_DEV_NBD is not set
283CONFIG_BLK_DEV_RAM=y
284CONFIG_BLK_DEV_RAM_COUNT=16
285CONFIG_BLK_DEV_RAM_SIZE=4096
286# CONFIG_BLK_DEV_XIP is not set
287# CONFIG_CDROM_PKTCDVD is not set
288# CONFIG_ATA_OVER_ETH is not set
289# CONFIG_MISC_DEVICES is not set
290CONFIG_HAVE_IDE=y
291# CONFIG_IDE is not set
292
293#
294# SCSI device support
295#
296# CONFIG_RAID_ATTRS is not set
297# CONFIG_SCSI is not set
298# CONFIG_SCSI_DMA is not set
299# CONFIG_SCSI_NETLINK is not set
300# CONFIG_MD is not set
301CONFIG_NETDEVICES=y
302# CONFIG_NETDEVICES_MULTIQUEUE is not set
303# CONFIG_DUMMY is not set
304# CONFIG_BONDING is not set
305# CONFIG_MACVLAN is not set
306# CONFIG_EQUALIZER is not set
307# CONFIG_TUN is not set
308# CONFIG_VETH is not set
309# CONFIG_PHYLIB is not set
310CONFIG_NET_ETHERNET=y
311# CONFIG_MII is not set
312# CONFIG_IBM_NEW_EMAC_ZMII is not set
313# CONFIG_IBM_NEW_EMAC_RGMII is not set
314# CONFIG_IBM_NEW_EMAC_TAH is not set
315# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
316# CONFIG_B44 is not set
317# CONFIG_NETDEV_1000 is not set
318# CONFIG_NETDEV_10000 is not set
319
320#
321# Wireless LAN
322#
323# CONFIG_WLAN_PRE80211 is not set
324# CONFIG_WLAN_80211 is not set
325# CONFIG_IWLWIFI is not set
326# CONFIG_IWLWIFI_LEDS is not set
327# CONFIG_WAN is not set
328CONFIG_PPP=y
329# CONFIG_PPP_MULTILINK is not set
330# CONFIG_PPP_FILTER is not set
331# CONFIG_PPP_ASYNC is not set
332# CONFIG_PPP_SYNC_TTY is not set
333# CONFIG_PPP_DEFLATE is not set
334# CONFIG_PPP_BSDCOMP is not set
335# CONFIG_PPP_MPPE is not set
336# CONFIG_PPPOE is not set
337# CONFIG_PPPOL2TP is not set
338CONFIG_SLIP=y
339CONFIG_SLIP_COMPRESSED=y
340CONFIG_SLHC=y
341# CONFIG_SLIP_SMART is not set
342# CONFIG_SLIP_MODE_SLIP6 is not set
343# CONFIG_NETCONSOLE is not set
344# CONFIG_NETPOLL is not set
345# CONFIG_NET_POLL_CONTROLLER is not set
346# CONFIG_ISDN is not set
347# CONFIG_PHONE is not set
348
349#
350# Input device support
351#
352CONFIG_INPUT=y
353# CONFIG_INPUT_FF_MEMLESS is not set
354# CONFIG_INPUT_POLLDEV is not set
355
356#
357# Userland interfaces
358#
359# CONFIG_INPUT_MOUSEDEV is not set
360# CONFIG_INPUT_JOYDEV is not set
361# CONFIG_INPUT_EVDEV is not set
362# CONFIG_INPUT_EVBUG is not set
363
364#
365# Input Device Drivers
366#
367# CONFIG_INPUT_KEYBOARD is not set
368# CONFIG_INPUT_MOUSE is not set
369# CONFIG_INPUT_JOYSTICK is not set
370# CONFIG_INPUT_TABLET is not set
371# CONFIG_INPUT_TOUCHSCREEN is not set
372# CONFIG_INPUT_MISC is not set
373
374#
375# Hardware I/O ports
376#
377# CONFIG_SERIO is not set
378# CONFIG_GAMEPORT is not set
379
380#
381# Character devices
382#
383# CONFIG_VT is not set
384# CONFIG_DEVKMEM is not set
385# CONFIG_SERIAL_NONSTANDARD is not set
386
387#
388# Serial drivers
389#
390# CONFIG_SERIAL_8250 is not set
391
392#
393# Non-8250 serial port support
394#
395CONFIG_SERIAL_CORE=y
396CONFIG_SERIAL_CORE_CONSOLE=y
397# CONFIG_SERIAL_COLDFIRE is not set
398CONFIG_SERIAL_MCF=y
399CONFIG_SERIAL_MCF_BAUDRATE=19200
400CONFIG_SERIAL_MCF_CONSOLE=y
401CONFIG_UNIX98_PTYS=y
402CONFIG_LEGACY_PTYS=y
403CONFIG_LEGACY_PTY_COUNT=256
404# CONFIG_IPMI_HANDLER is not set
405# CONFIG_HW_RANDOM is not set
406# CONFIG_GEN_RTC is not set
407# CONFIG_R3964 is not set
408# CONFIG_RAW_DRIVER is not set
409# CONFIG_TCG_TPM is not set
410# CONFIG_I2C is not set
411# CONFIG_SPI is not set
412# CONFIG_W1 is not set
413# CONFIG_POWER_SUPPLY is not set
414# CONFIG_HWMON is not set
415# CONFIG_THERMAL is not set
416# CONFIG_WATCHDOG is not set
417
418#
419# Sonics Silicon Backplane
420#
421CONFIG_SSB_POSSIBLE=y
422# CONFIG_SSB is not set
423
424#
425# Multifunction device drivers
426#
427# CONFIG_MFD_SM501 is not set
428# CONFIG_HTC_PASIC3 is not set
429
430#
431# Multimedia devices
432#
433
434#
435# Multimedia core support
436#
437# CONFIG_VIDEO_DEV is not set
438# CONFIG_DVB_CORE is not set
439
440#
441# Multimedia drivers
442#
443CONFIG_DAB=y
444
445#
446# Graphics support
447#
448# CONFIG_VGASTATE is not set
449# CONFIG_VIDEO_OUTPUT_CONTROL is not set
450# CONFIG_FB is not set
451# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
452
453#
454# Display device support
455#
456# CONFIG_DISPLAY_SUPPORT is not set
457
458#
459# Sound
460#
461# CONFIG_SOUND is not set
462# CONFIG_HID_SUPPORT is not set
463# CONFIG_USB_SUPPORT is not set
464# CONFIG_MMC is not set
465# CONFIG_MEMSTICK is not set
466# CONFIG_NEW_LEDS is not set
467# CONFIG_ACCESSIBILITY is not set
468# CONFIG_RTC_CLASS is not set
469# CONFIG_UIO is not set
470
471#
472# File systems
473#
474CONFIG_EXT2_FS=y
475# CONFIG_EXT2_FS_XATTR is not set
476# CONFIG_EXT3_FS is not set
477# CONFIG_EXT4DEV_FS is not set
478# CONFIG_REISERFS_FS is not set
479# CONFIG_JFS_FS is not set
480# CONFIG_FS_POSIX_ACL is not set
481# CONFIG_XFS_FS is not set
482# CONFIG_OCFS2_FS is not set
483# CONFIG_DNOTIFY is not set
484# CONFIG_INOTIFY is not set
485# CONFIG_QUOTA is not set
486# CONFIG_AUTOFS_FS is not set
487# CONFIG_AUTOFS4_FS is not set
488# CONFIG_FUSE_FS is not set
489
490#
491# CD-ROM/DVD Filesystems
492#
493# CONFIG_ISO9660_FS is not set
494# CONFIG_UDF_FS is not set
495
496#
497# DOS/FAT/NT Filesystems
498#
499# CONFIG_MSDOS_FS is not set
500# CONFIG_VFAT_FS is not set
501# CONFIG_NTFS_FS is not set
502
503#
504# Pseudo filesystems
505#
506CONFIG_PROC_FS=y
507CONFIG_PROC_SYSCTL=y
508CONFIG_SYSFS=y
509# CONFIG_TMPFS is not set
510# CONFIG_HUGETLB_PAGE is not set
511# CONFIG_CONFIGFS_FS is not set
512
513#
514# Miscellaneous filesystems
515#
516# CONFIG_ADFS_FS is not set
517# CONFIG_AFFS_FS is not set
518# CONFIG_HFS_FS is not set
519# CONFIG_HFSPLUS_FS is not set
520# CONFIG_BEFS_FS is not set
521# CONFIG_BFS_FS is not set
522# CONFIG_EFS_FS is not set
523# CONFIG_CRAMFS is not set
524# CONFIG_VXFS_FS is not set
525# CONFIG_MINIX_FS is not set
526# CONFIG_HPFS_FS is not set
527# CONFIG_QNX4FS_FS is not set
528CONFIG_ROMFS_FS=y
529# CONFIG_SYSV_FS is not set
530# CONFIG_UFS_FS is not set
531# CONFIG_NETWORK_FILESYSTEMS is not set
532
533#
534# Partition Types
535#
536# CONFIG_PARTITION_ADVANCED is not set
537CONFIG_MSDOS_PARTITION=y
538# CONFIG_NLS is not set
539# CONFIG_DLM is not set
540
541#
542# Kernel hacking
543#
544# CONFIG_PRINTK_TIME is not set
545CONFIG_ENABLE_WARN_DEPRECATED=y
546CONFIG_ENABLE_MUST_CHECK=y
547CONFIG_FRAME_WARN=1024
548# CONFIG_MAGIC_SYSRQ is not set
549# CONFIG_UNUSED_SYMBOLS is not set
550# CONFIG_DEBUG_FS is not set
551# CONFIG_HEADERS_CHECK is not set
552# CONFIG_DEBUG_KERNEL is not set
553# CONFIG_DEBUG_BUGVERBOSE is not set
554# CONFIG_SAMPLES is not set
555CONFIG_FULLDEBUG=y
556# CONFIG_HIGHPROFILE is not set
557# CONFIG_BOOTPARAM is not set
558# CONFIG_NO_KERNEL_MSG is not set
559# CONFIG_BDM_DISABLE is not set
560
561#
562# Security options
563#
564# CONFIG_KEYS is not set
565# CONFIG_SECURITY is not set
566# CONFIG_SECURITY_FILE_CAPABILITIES is not set
567# CONFIG_CRYPTO is not set
568
569#
570# Library routines
571#
572# CONFIG_GENERIC_FIND_FIRST_BIT is not set
573# CONFIG_CRC_CCITT is not set
574# CONFIG_CRC16 is not set
575# CONFIG_CRC_ITU_T is not set
576# CONFIG_CRC32 is not set
577# CONFIG_CRC7 is not set
578# CONFIG_LIBCRC32C is not set
579CONFIG_HAS_IOMEM=y
580CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/configs/m5407c3_defconfig b/arch/m68knommu/configs/m5407c3_defconfig
new file mode 100644
index 000000000000..1118936d20e3
--- /dev/null
+++ b/arch/m68knommu/configs/m5407c3_defconfig
@@ -0,0 +1,641 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.26-rc1
4# Wed May 7 10:25:16 2008
5#
6CONFIG_M68K=y
7# CONFIG_MMU is not set
8# CONFIG_FPU is not set
9CONFIG_ZONE_DMA=y
10CONFIG_RWSEM_GENERIC_SPINLOCK=y
11# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
12# CONFIG_ARCH_HAS_ILOG2_U32 is not set
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set
14CONFIG_GENERIC_FIND_NEXT_BIT=y
15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_HARDIRQS=y
17CONFIG_GENERIC_CALIBRATE_DELAY=y
18CONFIG_GENERIC_TIME=y
19CONFIG_TIME_LOW_RES=y
20CONFIG_NO_IOPORT=y
21CONFIG_ARCH_SUPPORTS_AOUT=y
22CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
23
24#
25# General setup
26#
27CONFIG_EXPERIMENTAL=y
28CONFIG_BROKEN_ON_SMP=y
29CONFIG_INIT_ENV_ARG_LIMIT=32
30CONFIG_LOCALVERSION=""
31CONFIG_LOCALVERSION_AUTO=y
32# CONFIG_SYSVIPC is not set
33# CONFIG_POSIX_MQUEUE is not set
34# CONFIG_BSD_PROCESS_ACCT is not set
35# CONFIG_TASKSTATS is not set
36# CONFIG_AUDIT is not set
37# CONFIG_IKCONFIG is not set
38CONFIG_LOG_BUF_SHIFT=14
39# CONFIG_CGROUPS is not set
40# CONFIG_GROUP_SCHED is not set
41# CONFIG_SYSFS_DEPRECATED_V2 is not set
42# CONFIG_RELAY is not set
43# CONFIG_NAMESPACES is not set
44# CONFIG_BLK_DEV_INITRD is not set
45# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
46CONFIG_SYSCTL=y
47CONFIG_EMBEDDED=y
48# CONFIG_UID16 is not set
49# CONFIG_SYSCTL_SYSCALL is not set
50# CONFIG_KALLSYMS is not set
51# CONFIG_HOTPLUG is not set
52CONFIG_PRINTK=y
53CONFIG_BUG=y
54CONFIG_ELF_CORE=y
55# CONFIG_COMPAT_BRK is not set
56CONFIG_BASE_FULL=y
57# CONFIG_FUTEX is not set
58# CONFIG_EPOLL is not set
59# CONFIG_SIGNALFD is not set
60# CONFIG_TIMERFD is not set
61# CONFIG_EVENTFD is not set
62# CONFIG_VM_EVENT_COUNTERS is not set
63CONFIG_SLAB=y
64# CONFIG_SLUB is not set
65# CONFIG_SLOB is not set
66# CONFIG_PROFILING is not set
67# CONFIG_MARKERS is not set
68# CONFIG_HAVE_OPROFILE is not set
69# CONFIG_HAVE_KPROBES is not set
70# CONFIG_HAVE_KRETPROBES is not set
71# CONFIG_HAVE_DMA_ATTRS is not set
72CONFIG_SLABINFO=y
73CONFIG_TINY_SHMEM=y
74CONFIG_BASE_SMALL=0
75CONFIG_MODULES=y
76CONFIG_MODULE_UNLOAD=y
77# CONFIG_MODULE_FORCE_UNLOAD is not set
78# CONFIG_MODVERSIONS is not set
79# CONFIG_MODULE_SRCVERSION_ALL is not set
80# CONFIG_KMOD is not set
81CONFIG_BLOCK=y
82# CONFIG_LBD is not set
83# CONFIG_BLK_DEV_IO_TRACE is not set
84# CONFIG_LSF is not set
85# CONFIG_BLK_DEV_BSG is not set
86
87#
88# IO Schedulers
89#
90CONFIG_IOSCHED_NOOP=y
91# CONFIG_IOSCHED_AS is not set
92# CONFIG_IOSCHED_DEADLINE is not set
93# CONFIG_IOSCHED_CFQ is not set
94# CONFIG_DEFAULT_AS is not set
95# CONFIG_DEFAULT_DEADLINE is not set
96# CONFIG_DEFAULT_CFQ is not set
97CONFIG_DEFAULT_NOOP=y
98CONFIG_DEFAULT_IOSCHED="noop"
99CONFIG_CLASSIC_RCU=y
100
101#
102# Processor type and features
103#
104# CONFIG_M68328 is not set
105# CONFIG_M68EZ328 is not set
106# CONFIG_M68VZ328 is not set
107# CONFIG_M68360 is not set
108# CONFIG_M5206 is not set
109# CONFIG_M5206e is not set
110# CONFIG_M520x is not set
111# CONFIG_M523x is not set
112# CONFIG_M5249 is not set
113# CONFIG_M5271 is not set
114# CONFIG_M5272 is not set
115# CONFIG_M5275 is not set
116# CONFIG_M528x is not set
117# CONFIG_M5307 is not set
118# CONFIG_M532x is not set
119CONFIG_M5407=y
120CONFIG_COLDFIRE=y
121CONFIG_CLOCK_SET=y
122CONFIG_CLOCK_FREQ=50000000
123CONFIG_CLOCK_DIV=1
124
125#
126# Platform
127#
128CONFIG_M5407C3=y
129# CONFIG_CLEOPATRA is not set
130CONFIG_FREESCALE=y
131CONFIG_4KSTACKS=y
132CONFIG_HZ=100
133
134#
135# RAM configuration
136#
137CONFIG_RAMBASE=0x00000000
138CONFIG_RAMSIZE=0x00000000
139CONFIG_VECTORBASE=0x00000000
140CONFIG_KERNELBASE=0x00020000
141CONFIG_RAMAUTOBIT=y
142# CONFIG_RAM8BIT is not set
143# CONFIG_RAM16BIT is not set
144# CONFIG_RAM32BIT is not set
145
146#
147# ROM configuration
148#
149# CONFIG_ROM is not set
150CONFIG_RAMKERNEL=y
151# CONFIG_ROMKERNEL is not set
152CONFIG_SELECT_MEMORY_MODEL=y
153CONFIG_FLATMEM_MANUAL=y
154# CONFIG_DISCONTIGMEM_MANUAL is not set
155# CONFIG_SPARSEMEM_MANUAL is not set
156CONFIG_FLATMEM=y
157CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set
159# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
160CONFIG_PAGEFLAGS_EXTENDED=y
161CONFIG_SPLIT_PTLOCK_CPUS=4
162# CONFIG_RESOURCES_64BIT is not set
163CONFIG_ZONE_DMA_FLAG=1
164CONFIG_VIRT_TO_BUS=y
165CONFIG_ISA_DMA_API=y
166
167#
168# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
169#
170# CONFIG_PCI is not set
171# CONFIG_COMEMPCI is not set
172# CONFIG_ARCH_SUPPORTS_MSI is not set
173
174#
175# Executable file formats
176#
177CONFIG_BINFMT_FLAT=y
178# CONFIG_BINFMT_ZFLAT is not set
179# CONFIG_BINFMT_SHARED_FLAT is not set
180# CONFIG_BINFMT_AOUT is not set
181# CONFIG_BINFMT_MISC is not set
182
183#
184# Power management options
185#
186# CONFIG_PM is not set
187
188#
189# Networking
190#
191CONFIG_NET=y
192
193#
194# Networking options
195#
196CONFIG_PACKET=y
197# CONFIG_PACKET_MMAP is not set
198CONFIG_UNIX=y
199# CONFIG_NET_KEY is not set
200CONFIG_INET=y
201# CONFIG_IP_MULTICAST is not set
202# CONFIG_IP_ADVANCED_ROUTER is not set
203CONFIG_IP_FIB_HASH=y
204# CONFIG_IP_PNP is not set
205# CONFIG_NET_IPIP is not set
206# CONFIG_NET_IPGRE is not set
207# CONFIG_ARPD is not set
208# CONFIG_SYN_COOKIES is not set
209# CONFIG_INET_AH is not set
210# CONFIG_INET_ESP is not set
211# CONFIG_INET_IPCOMP is not set
212# CONFIG_INET_XFRM_TUNNEL is not set
213# CONFIG_INET_TUNNEL is not set
214# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
215# CONFIG_INET_XFRM_MODE_TUNNEL is not set
216# CONFIG_INET_XFRM_MODE_BEET is not set
217# CONFIG_INET_LRO is not set
218# CONFIG_INET_DIAG is not set
219# CONFIG_TCP_CONG_ADVANCED is not set
220CONFIG_TCP_CONG_CUBIC=y
221CONFIG_DEFAULT_TCP_CONG="cubic"
222# CONFIG_TCP_MD5SIG is not set
223# CONFIG_IPV6 is not set
224# CONFIG_NETWORK_SECMARK is not set
225# CONFIG_NETFILTER is not set
226# CONFIG_IP_DCCP is not set
227# CONFIG_IP_SCTP is not set
228# CONFIG_TIPC is not set
229# CONFIG_ATM is not set
230# CONFIG_BRIDGE is not set
231# CONFIG_VLAN_8021Q is not set
232# CONFIG_DECNET is not set
233# CONFIG_LLC2 is not set
234# CONFIG_IPX is not set
235# CONFIG_ATALK is not set
236# CONFIG_X25 is not set
237# CONFIG_LAPB is not set
238# CONFIG_ECONET is not set
239# CONFIG_WAN_ROUTER is not set
240# CONFIG_NET_SCHED is not set
241
242#
243# Network testing
244#
245# CONFIG_NET_PKTGEN is not set
246# CONFIG_HAMRADIO is not set
247# CONFIG_CAN is not set
248# CONFIG_IRDA is not set
249# CONFIG_BT is not set
250# CONFIG_AF_RXRPC is not set
251
252#
253# Wireless
254#
255# CONFIG_CFG80211 is not set
256# CONFIG_WIRELESS_EXT is not set
257# CONFIG_MAC80211 is not set
258# CONFIG_IEEE80211 is not set
259# CONFIG_RFKILL is not set
260# CONFIG_NET_9P is not set
261
262#
263# Device Drivers
264#
265
266#
267# Generic Driver Options
268#
269CONFIG_STANDALONE=y
270CONFIG_PREVENT_FIRMWARE_BUILD=y
271# CONFIG_SYS_HYPERVISOR is not set
272# CONFIG_CONNECTOR is not set
273CONFIG_MTD=y
274# CONFIG_MTD_DEBUG is not set
275# CONFIG_MTD_CONCAT is not set
276CONFIG_MTD_PARTITIONS=y
277# CONFIG_MTD_REDBOOT_PARTS is not set
278# CONFIG_MTD_CMDLINE_PARTS is not set
279# CONFIG_MTD_AR7_PARTS is not set
280
281#
282# User Modules And Translation Layers
283#
284CONFIG_MTD_CHAR=y
285CONFIG_MTD_BLKDEVS=y
286CONFIG_MTD_BLOCK=y
287# CONFIG_FTL is not set
288# CONFIG_NFTL is not set
289# CONFIG_INFTL is not set
290# CONFIG_RFD_FTL is not set
291# CONFIG_SSFDC is not set
292# CONFIG_MTD_OOPS is not set
293
294#
295# RAM/ROM/Flash chip drivers
296#
297# CONFIG_MTD_CFI is not set
298# CONFIG_MTD_JEDECPROBE is not set
299CONFIG_MTD_MAP_BANK_WIDTH_1=y
300CONFIG_MTD_MAP_BANK_WIDTH_2=y
301CONFIG_MTD_MAP_BANK_WIDTH_4=y
302# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
303# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
304# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
305CONFIG_MTD_CFI_I1=y
306CONFIG_MTD_CFI_I2=y
307# CONFIG_MTD_CFI_I4 is not set
308# CONFIG_MTD_CFI_I8 is not set
309CONFIG_MTD_RAM=y
310# CONFIG_MTD_ROM is not set
311# CONFIG_MTD_ABSENT is not set
312
313#
314# Mapping drivers for chip access
315#
316# CONFIG_MTD_COMPLEX_MAPPINGS is not set
317CONFIG_MTD_UCLINUX=y
318# CONFIG_MTD_PLATRAM is not set
319
320#
321# Self-contained MTD device drivers
322#
323# CONFIG_MTD_SLRAM is not set
324# CONFIG_MTD_PHRAM is not set
325# CONFIG_MTD_MTDRAM is not set
326# CONFIG_MTD_BLOCK2MTD is not set
327
328#
329# Disk-On-Chip Device Drivers
330#
331# CONFIG_MTD_DOC2000 is not set
332# CONFIG_MTD_DOC2001 is not set
333# CONFIG_MTD_DOC2001PLUS is not set
334# CONFIG_MTD_NAND is not set
335# CONFIG_MTD_ONENAND is not set
336
337#
338# UBI - Unsorted block images
339#
340# CONFIG_MTD_UBI is not set
341# CONFIG_PARPORT is not set
342CONFIG_BLK_DEV=y
343# CONFIG_BLK_DEV_COW_COMMON is not set
344# CONFIG_BLK_DEV_LOOP is not set
345# CONFIG_BLK_DEV_NBD is not set
346CONFIG_BLK_DEV_RAM=y
347CONFIG_BLK_DEV_RAM_COUNT=16
348CONFIG_BLK_DEV_RAM_SIZE=4096
349# CONFIG_BLK_DEV_XIP is not set
350# CONFIG_CDROM_PKTCDVD is not set
351# CONFIG_ATA_OVER_ETH is not set
352# CONFIG_MISC_DEVICES is not set
353CONFIG_HAVE_IDE=y
354# CONFIG_IDE is not set
355
356#
357# SCSI device support
358#
359# CONFIG_RAID_ATTRS is not set
360# CONFIG_SCSI is not set
361# CONFIG_SCSI_DMA is not set
362# CONFIG_SCSI_NETLINK is not set
363# CONFIG_MD is not set
364CONFIG_NETDEVICES=y
365# CONFIG_NETDEVICES_MULTIQUEUE is not set
366# CONFIG_DUMMY is not set
367# CONFIG_BONDING is not set
368# CONFIG_MACVLAN is not set
369# CONFIG_EQUALIZER is not set
370# CONFIG_TUN is not set
371# CONFIG_VETH is not set
372# CONFIG_PHYLIB is not set
373CONFIG_NET_ETHERNET=y
374# CONFIG_MII is not set
375# CONFIG_IBM_NEW_EMAC_ZMII is not set
376# CONFIG_IBM_NEW_EMAC_RGMII is not set
377# CONFIG_IBM_NEW_EMAC_TAH is not set
378# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
379# CONFIG_B44 is not set
380# CONFIG_NETDEV_1000 is not set
381# CONFIG_NETDEV_10000 is not set
382
383#
384# Wireless LAN
385#
386# CONFIG_WLAN_PRE80211 is not set
387# CONFIG_WLAN_80211 is not set
388# CONFIG_IWLWIFI is not set
389# CONFIG_IWLWIFI_LEDS is not set
390# CONFIG_WAN is not set
391CONFIG_PPP=y
392# CONFIG_PPP_MULTILINK is not set
393# CONFIG_PPP_FILTER is not set
394# CONFIG_PPP_ASYNC is not set
395# CONFIG_PPP_SYNC_TTY is not set
396# CONFIG_PPP_DEFLATE is not set
397# CONFIG_PPP_BSDCOMP is not set
398# CONFIG_PPP_MPPE is not set
399# CONFIG_PPPOE is not set
400# CONFIG_PPPOL2TP is not set
401# CONFIG_SLIP is not set
402CONFIG_SLHC=y
403# CONFIG_NETCONSOLE is not set
404# CONFIG_NETPOLL is not set
405# CONFIG_NET_POLL_CONTROLLER is not set
406# CONFIG_ISDN is not set
407# CONFIG_PHONE is not set
408
409#
410# Input device support
411#
412CONFIG_INPUT=y
413# CONFIG_INPUT_FF_MEMLESS is not set
414# CONFIG_INPUT_POLLDEV is not set
415
416#
417# Userland interfaces
418#
419# CONFIG_INPUT_MOUSEDEV is not set
420# CONFIG_INPUT_JOYDEV is not set
421# CONFIG_INPUT_EVDEV is not set
422# CONFIG_INPUT_EVBUG is not set
423
424#
425# Input Device Drivers
426#
427# CONFIG_INPUT_KEYBOARD is not set
428# CONFIG_INPUT_MOUSE is not set
429# CONFIG_INPUT_JOYSTICK is not set
430# CONFIG_INPUT_TABLET is not set
431# CONFIG_INPUT_TOUCHSCREEN is not set
432# CONFIG_INPUT_MISC is not set
433
434#
435# Hardware I/O ports
436#
437# CONFIG_SERIO is not set
438# CONFIG_GAMEPORT is not set
439
440#
441# Character devices
442#
443# CONFIG_VT is not set
444# CONFIG_DEVKMEM is not set
445# CONFIG_SERIAL_NONSTANDARD is not set
446
447#
448# Serial drivers
449#
450# CONFIG_SERIAL_8250 is not set
451
452#
453# Non-8250 serial port support
454#
455CONFIG_SERIAL_CORE=y
456CONFIG_SERIAL_CORE_CONSOLE=y
457# CONFIG_SERIAL_COLDFIRE is not set
458CONFIG_SERIAL_MCF=y
459CONFIG_SERIAL_MCF_BAUDRATE=19200
460CONFIG_SERIAL_MCF_CONSOLE=y
461# CONFIG_UNIX98_PTYS is not set
462CONFIG_LEGACY_PTYS=y
463CONFIG_LEGACY_PTY_COUNT=256
464# CONFIG_IPMI_HANDLER is not set
465# CONFIG_HW_RANDOM 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# CONFIG_SPI is not set
472# CONFIG_W1 is not set
473# CONFIG_POWER_SUPPLY is not set
474# CONFIG_HWMON is not set
475# CONFIG_THERMAL is not set
476# CONFIG_WATCHDOG is not set
477
478#
479# Sonics Silicon Backplane
480#
481CONFIG_SSB_POSSIBLE=y
482# CONFIG_SSB is not set
483
484#
485# Multifunction device drivers
486#
487# CONFIG_MFD_SM501 is not set
488# CONFIG_HTC_PASIC3 is not set
489
490#
491# Multimedia devices
492#
493
494#
495# Multimedia core support
496#
497# CONFIG_VIDEO_DEV is not set
498# CONFIG_DVB_CORE is not set
499
500#
501# Multimedia drivers
502#
503CONFIG_DAB=y
504
505#
506# Graphics support
507#
508# CONFIG_VGASTATE is not set
509# CONFIG_VIDEO_OUTPUT_CONTROL is not set
510# CONFIG_FB is not set
511# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
512
513#
514# Display device support
515#
516# CONFIG_DISPLAY_SUPPORT is not set
517
518#
519# Sound
520#
521# CONFIG_SOUND is not set
522# CONFIG_HID_SUPPORT is not set
523# CONFIG_USB_SUPPORT is not set
524# CONFIG_MMC is not set
525# CONFIG_MEMSTICK is not set
526# CONFIG_NEW_LEDS is not set
527# CONFIG_ACCESSIBILITY is not set
528# CONFIG_RTC_CLASS is not set
529# CONFIG_UIO is not set
530
531#
532# File systems
533#
534CONFIG_EXT2_FS=y
535# CONFIG_EXT2_FS_XATTR is not set
536# CONFIG_EXT3_FS is not set
537# CONFIG_EXT4DEV_FS is not set
538# CONFIG_REISERFS_FS is not set
539# CONFIG_JFS_FS is not set
540# CONFIG_FS_POSIX_ACL is not set
541# CONFIG_XFS_FS is not set
542# CONFIG_OCFS2_FS is not set
543# CONFIG_DNOTIFY is not set
544# CONFIG_INOTIFY is not set
545# CONFIG_QUOTA is not set
546# CONFIG_AUTOFS_FS is not set
547# CONFIG_AUTOFS4_FS is not set
548# CONFIG_FUSE_FS is not set
549
550#
551# CD-ROM/DVD Filesystems
552#
553# CONFIG_ISO9660_FS is not set
554# CONFIG_UDF_FS is not set
555
556#
557# DOS/FAT/NT Filesystems
558#
559# CONFIG_MSDOS_FS is not set
560# CONFIG_VFAT_FS is not set
561# CONFIG_NTFS_FS is not set
562
563#
564# Pseudo filesystems
565#
566CONFIG_PROC_FS=y
567CONFIG_PROC_SYSCTL=y
568CONFIG_SYSFS=y
569# CONFIG_TMPFS is not set
570# CONFIG_HUGETLB_PAGE is not set
571# CONFIG_CONFIGFS_FS is not set
572
573#
574# Miscellaneous filesystems
575#
576# CONFIG_ADFS_FS is not set
577# CONFIG_AFFS_FS is not set
578# CONFIG_HFS_FS is not set
579# CONFIG_HFSPLUS_FS is not set
580# CONFIG_BEFS_FS is not set
581# CONFIG_BFS_FS is not set
582# CONFIG_EFS_FS is not set
583# CONFIG_JFFS2_FS is not set
584# CONFIG_CRAMFS is not set
585# CONFIG_VXFS_FS is not set
586# CONFIG_MINIX_FS is not set
587# CONFIG_HPFS_FS is not set
588# CONFIG_QNX4FS_FS is not set
589CONFIG_ROMFS_FS=y
590# CONFIG_SYSV_FS is not set
591# CONFIG_UFS_FS is not set
592# CONFIG_NETWORK_FILESYSTEMS is not set
593
594#
595# Partition Types
596#
597# CONFIG_PARTITION_ADVANCED is not set
598CONFIG_MSDOS_PARTITION=y
599# CONFIG_NLS is not set
600# CONFIG_DLM is not set
601
602#
603# Kernel hacking
604#
605# CONFIG_PRINTK_TIME is not set
606CONFIG_ENABLE_WARN_DEPRECATED=y
607CONFIG_ENABLE_MUST_CHECK=y
608CONFIG_FRAME_WARN=1024
609# CONFIG_MAGIC_SYSRQ is not set
610# CONFIG_UNUSED_SYMBOLS is not set
611# CONFIG_DEBUG_FS is not set
612# CONFIG_HEADERS_CHECK is not set
613# CONFIG_DEBUG_KERNEL is not set
614# CONFIG_DEBUG_BUGVERBOSE is not set
615# CONFIG_SAMPLES is not set
616# CONFIG_FULLDEBUG is not set
617# CONFIG_HIGHPROFILE is not set
618# CONFIG_BOOTPARAM is not set
619# CONFIG_NO_KERNEL_MSG is not set
620# CONFIG_BDM_DISABLE is not set
621
622#
623# Security options
624#
625# CONFIG_KEYS is not set
626# CONFIG_SECURITY is not set
627# CONFIG_SECURITY_FILE_CAPABILITIES is not set
628# CONFIG_CRYPTO is not set
629
630#
631# Library routines
632#
633# CONFIG_GENERIC_FIND_FIRST_BIT is not set
634# CONFIG_CRC_CCITT is not set
635# CONFIG_CRC16 is not set
636# CONFIG_CRC_ITU_T is not set
637# CONFIG_CRC32 is not set
638# CONFIG_CRC7 is not set
639# CONFIG_LIBCRC32C is not set
640CONFIG_HAS_IOMEM=y
641CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 03f4fe6a2fc0..5985f1989021 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -22,6 +22,7 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/fb.h> 23#include <linux/fb.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/mm.h>
25#include <linux/console.h> 26#include <linux/console.h>
26#include <linux/errno.h> 27#include <linux/errno.h>
27#include <linux/string.h> 28#include <linux/string.h>
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index 0ccfb2ad6380..d182b2f72211 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -33,14 +33,13 @@ static inline int set_rtc_mmss(unsigned long nowtime)
33 return -1; 33 return -1;
34} 34}
35 35
36#ifndef CONFIG_GENERIC_CLOCKEVENTS
36/* 37/*
37 * timer_interrupt() needs to keep up the real-time clock, 38 * timer_interrupt() needs to keep up the real-time clock,
38 * as well as call the "do_timer()" routine every clocktick 39 * as well as call the "do_timer()" routine every clocktick
39 */ 40 */
40irqreturn_t arch_timer_interrupt(int irq, void *dummy) 41irqreturn_t arch_timer_interrupt(int irq, void *dummy)
41{ 42{
42 /* last time the cmos clock got updated */
43 static long last_rtc_update=0;
44 43
45 if (current->pid) 44 if (current->pid)
46 profile_tick(CPU_PROFILING); 45 profile_tick(CPU_PROFILING);
@@ -49,21 +48,6 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy)
49 48
50 do_timer(1); 49 do_timer(1);
51 50
52 /*
53 * If we have an externally synchronized Linux clock, then update
54 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
55 * called as close as possible to 500 ms before the new second starts.
56 */
57 if (ntp_synced() &&
58 xtime.tv_sec > last_rtc_update + 660 &&
59 (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
60 (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
61 if (set_rtc_mmss(xtime.tv_sec) == 0)
62 last_rtc_update = xtime.tv_sec;
63 else
64 last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
65 }
66
67 write_sequnlock(&xtime_lock); 51 write_sequnlock(&xtime_lock);
68 52
69#ifndef CONFIG_SMP 53#ifndef CONFIG_SMP
@@ -71,8 +55,9 @@ irqreturn_t arch_timer_interrupt(int irq, void *dummy)
71#endif 55#endif
72 return(IRQ_HANDLED); 56 return(IRQ_HANDLED);
73} 57}
58#endif
74 59
75void time_init(void) 60static unsigned long read_rtc_mmss(void)
76{ 61{
77 unsigned int year, mon, day, hour, min, sec; 62 unsigned int year, mon, day, hour, min, sec;
78 63
@@ -83,10 +68,21 @@ void time_init(void)
83 68
84 if ((year += 1900) < 1970) 69 if ((year += 1900) < 1970)
85 year += 100; 70 year += 100;
86 xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
87 xtime.tv_nsec = 0;
88 wall_to_monotonic.tv_sec = -xtime.tv_sec;
89 71
90 hw_timer_init(); 72 return mktime(year, mon, day, hour, min, sec);;
73}
74
75unsigned long read_persistent_clock(void)
76{
77 return read_rtc_mmss();
91} 78}
92 79
80int update_persistent_clock(struct timespec now)
81{
82 return set_rtc_mmss(now.tv_sec);
83}
84
85void time_init(void)
86{
87 hw_timer_init();
88}
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index ec9aea652e79..46f8f9d0c408 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -103,12 +103,28 @@ asmlinkage void buserr_c(struct frame *fp)
103 force_sig(SIGSEGV, current); 103 force_sig(SIGSEGV, current);
104} 104}
105 105
106static void print_this_address(unsigned long addr, int i)
107{
108#ifdef CONFIG_KALLSYMS
109 printk(KERN_EMERG " [%08lx] ", addr);
110 print_symbol(KERN_CONT "%s\n", addr);
111#else
112 if (i % 5)
113 printk(KERN_CONT " [%08lx] ", addr);
114 else
115 printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr);
116 i++;
117#endif
118}
119
106int kstack_depth_to_print = 48; 120int kstack_depth_to_print = 48;
107 121
108static void __show_stack(struct task_struct *task, unsigned long *stack) 122static void __show_stack(struct task_struct *task, unsigned long *stack)
109{ 123{
110 unsigned long *endstack, addr; 124 unsigned long *endstack, addr;
125#ifdef CONFIG_FRAME_POINTER
111 unsigned long *last_stack; 126 unsigned long *last_stack;
127#endif
112 int i; 128 int i;
113 129
114 if (!stack) 130 if (!stack)
@@ -126,6 +142,7 @@ static void __show_stack(struct task_struct *task, unsigned long *stack)
126 printk(" %08lx", *(stack + i)); 142 printk(" %08lx", *(stack + i));
127 } 143 }
128 printk("\n"); 144 printk("\n");
145 i = 0;
129 146
130#ifdef CONFIG_FRAME_POINTER 147#ifdef CONFIG_FRAME_POINTER
131 printk(KERN_EMERG "Call Trace:\n"); 148 printk(KERN_EMERG "Call Trace:\n");
@@ -134,15 +151,30 @@ static void __show_stack(struct task_struct *task, unsigned long *stack)
134 while (stack <= endstack && stack > last_stack) { 151 while (stack <= endstack && stack > last_stack) {
135 152
136 addr = *(stack + 1); 153 addr = *(stack + 1);
137 printk(KERN_EMERG " [%08lx] ", addr); 154 print_this_address(addr, i);
138 print_symbol(KERN_CONT "%s\n", addr); 155 i++;
139 156
140 last_stack = stack; 157 last_stack = stack;
141 stack = (unsigned long *)*stack; 158 stack = (unsigned long *)*stack;
142 } 159 }
143 printk("\n"); 160 printk("\n");
144#else 161#else
145 printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n"); 162 printk(KERN_EMERG "Call Trace with CONFIG_FRAME_POINTER disabled:\n");
163 while (stack <= endstack) {
164 addr = *stack++;
165 /*
166 * If the address is either in the text segment of the kernel,
167 * or in a region which is occupied by a module then it *may*
168 * be the address of a calling routine; if so, print it so that
169 * someone tracing down the cause of the crash will be able to
170 * figure out the call path that was taken.
171 */
172 if (__kernel_text_address(addr)) {
173 print_this_address(addr, i);
174 i++;
175 }
176 }
177 printk(KERN_CONT "\n");
146#endif 178#endif
147} 179}
148 180
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 93e69236ed6f..69ba9b10767a 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -62,6 +62,7 @@ SECTIONS {
62 .text : { 62 .text : {
63 _text = .; 63 _text = .;
64 _stext = . ; 64 _stext = . ;
65 HEAD_TEXT
65 TEXT_TEXT 66 TEXT_TEXT
66 SCHED_TEXT 67 SCHED_TEXT
67 LOCK_TEXT 68 LOCK_TEXT
diff --git a/arch/m68knommu/platform/coldfire/Makefile b/arch/m68knommu/platform/coldfire/Makefile
index 40cf20be1b90..4f416a91a829 100644
--- a/arch/m68knommu/platform/coldfire/Makefile
+++ b/arch/m68knommu/platform/coldfire/Makefile
@@ -18,7 +18,7 @@ obj-$(CONFIG_COLDFIRE) += dma.o entry.o vectors.o
18obj-$(CONFIG_M5206) += timers.o 18obj-$(CONFIG_M5206) += timers.o
19obj-$(CONFIG_M5206e) += timers.o 19obj-$(CONFIG_M5206e) += timers.o
20obj-$(CONFIG_M520x) += pit.o 20obj-$(CONFIG_M520x) += pit.o
21obj-$(CONFIG_M523x) += pit.o 21obj-$(CONFIG_M523x) += pit.o dma_timer.o
22obj-$(CONFIG_M5249) += timers.o 22obj-$(CONFIG_M5249) += timers.o
23obj-$(CONFIG_M527x) += pit.o 23obj-$(CONFIG_M527x) += pit.o
24obj-$(CONFIG_M5272) += timers.o 24obj-$(CONFIG_M5272) += timers.o
diff --git a/arch/m68knommu/platform/coldfire/dma_timer.c b/arch/m68knommu/platform/coldfire/dma_timer.c
new file mode 100644
index 000000000000..772578b1084f
--- /dev/null
+++ b/arch/m68knommu/platform/coldfire/dma_timer.c
@@ -0,0 +1,84 @@
1/*
2 * dma_timer.c -- Freescale ColdFire DMA Timer.
3 *
4 * Copyright (C) 2007, Benedikt Spranger <b.spranger@linutronix.de>
5 * Copyright (C) 2008. Sebastian Siewior, Linutronix
6 *
7 */
8
9#include <linux/clocksource.h>
10#include <linux/io.h>
11
12#include <asm/machdep.h>
13#include <asm/coldfire.h>
14#include <asm/mcfpit.h>
15#include <asm/mcfsim.h>
16
17#define DMA_TIMER_0 (0x00)
18#define DMA_TIMER_1 (0x40)
19#define DMA_TIMER_2 (0x80)
20#define DMA_TIMER_3 (0xc0)
21
22#define DTMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x400)
23#define DTXMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x402)
24#define DTER0 (MCF_IPSBAR + DMA_TIMER_0 + 0x403)
25#define DTRR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x404)
26#define DTCR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x408)
27#define DTCN0 (MCF_IPSBAR + DMA_TIMER_0 + 0x40c)
28
29#define DMA_FREQ ((MCF_CLK / 2) / 16)
30
31/* DTMR */
32#define DMA_DTMR_RESTART (1 << 3)
33#define DMA_DTMR_CLK_DIV_1 (1 << 1)
34#define DMA_DTMR_CLK_DIV_16 (2 << 1)
35#define DMA_DTMR_ENABLE (1 << 0)
36
37static cycle_t cf_dt_get_cycles(void)
38{
39 return __raw_readl(DTCN0);
40}
41
42static struct clocksource clocksource_cf_dt = {
43 .name = "coldfire_dma_timer",
44 .rating = 200,
45 .read = cf_dt_get_cycles,
46 .mask = CLOCKSOURCE_MASK(32),
47 .shift = 20,
48 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
49};
50
51static int __init init_cf_dt_clocksource(void)
52{
53 /*
54 * We setup DMA timer 0 in free run mode. This incrementing counter is
55 * used as a highly precious clock source. With MCF_CLOCK = 150 MHz we
56 * get a ~213 ns resolution and the 32bit register will overflow almost
57 * every 15 minutes.
58 */
59 __raw_writeb(0x00, DTXMR0);
60 __raw_writeb(0x00, DTER0);
61 __raw_writel(0x00000000, DTRR0);
62 __raw_writew(DMA_DTMR_CLK_DIV_16 | DMA_DTMR_ENABLE, DTMR0);
63 clocksource_cf_dt.mult = clocksource_hz2mult(DMA_FREQ,
64 clocksource_cf_dt.shift);
65 return clocksource_register(&clocksource_cf_dt);
66}
67
68arch_initcall(init_cf_dt_clocksource);
69
70#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
71#define CYC2NS_SCALE ((1000000 << CYC2NS_SCALE_FACTOR) / (DMA_FREQ / 1000))
72
73static unsigned long long cycles2ns(unsigned long cycl)
74{
75 return (unsigned long long) ((unsigned long long)cycl *
76 CYC2NS_SCALE) >> CYC2NS_SCALE_FACTOR;
77}
78
79unsigned long long sched_clock(void)
80{
81 unsigned long cycl = __raw_readl(DTCN0);
82
83 return cycles2ns(cycl);
84}
diff --git a/arch/m68knommu/platform/coldfire/head.S b/arch/m68knommu/platform/coldfire/head.S
index b9aa0ca29bfb..2b0d73c0cc32 100644
--- a/arch/m68knommu/platform/coldfire/head.S
+++ b/arch/m68knommu/platform/coldfire/head.S
@@ -10,6 +10,7 @@
10 10
11#include <linux/sys.h> 11#include <linux/sys.h>
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <linux/init.h>
13#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
14#include <asm/coldfire.h> 15#include <asm/coldfire.h>
15#include <asm/mcfcache.h> 16#include <asm/mcfcache.h>
@@ -126,7 +127,7 @@ _ramend:
126 127
127/*****************************************************************************/ 128/*****************************************************************************/
128 129
129.text 130__HEAD
130 131
131/* 132/*
132 * This is the codes first entry point. This is where it all 133 * This is the codes first entry point. This is where it all
diff --git a/arch/m68knommu/platform/coldfire/pit.c b/arch/m68knommu/platform/coldfire/pit.c
index 4290638012e0..c5b916700b22 100644
--- a/arch/m68knommu/platform/coldfire/pit.c
+++ b/arch/m68knommu/platform/coldfire/pit.c
@@ -18,7 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/clocksource.h> 21#include <linux/clockchips.h>
22#include <asm/machdep.h> 22#include <asm/machdep.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/coldfire.h> 24#include <asm/coldfire.h>
@@ -33,22 +33,86 @@
33#define FREQ ((MCF_CLK / 2) / 64) 33#define FREQ ((MCF_CLK / 2) / 64)
34#define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a)) 34#define TA(a) (MCF_IPSBAR + MCFPIT_BASE1 + (a))
35#define INTC0 (MCF_IPSBAR + MCFICM_INTC0) 35#define INTC0 (MCF_IPSBAR + MCFICM_INTC0)
36#define PIT_CYCLES_PER_JIFFY (FREQ / HZ)
36 37
37static u32 pit_cycles_per_jiffy;
38static u32 pit_cnt; 38static u32 pit_cnt;
39 39
40/*
41 * Initialize the PIT timer.
42 *
43 * This is also called after resume to bring the PIT into operation again.
44 */
45
46static void init_cf_pit_timer(enum clock_event_mode mode,
47 struct clock_event_device *evt)
48{
49 switch (mode) {
50 case CLOCK_EVT_MODE_PERIODIC:
51
52 __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR));
53 __raw_writew(PIT_CYCLES_PER_JIFFY, TA(MCFPIT_PMR));
54 __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \
55 MCFPIT_PCSR_OVW | MCFPIT_PCSR_RLD | \
56 MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR));
57 break;
58
59 case CLOCK_EVT_MODE_SHUTDOWN:
60 case CLOCK_EVT_MODE_UNUSED:
61
62 __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR));
63 break;
64
65 case CLOCK_EVT_MODE_ONESHOT:
66
67 __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR));
68 __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | \
69 MCFPIT_PCSR_OVW | MCFPIT_PCSR_CLK64, \
70 TA(MCFPIT_PCSR));
71 break;
72
73 case CLOCK_EVT_MODE_RESUME:
74 /* Nothing to do here */
75 break;
76 }
77}
78
79/*
80 * Program the next event in oneshot mode
81 *
82 * Delta is given in PIT ticks
83 */
84static int cf_pit_next_event(unsigned long delta,
85 struct clock_event_device *evt)
86{
87 __raw_writew(delta, TA(MCFPIT_PMR));
88 return 0;
89}
90
91struct clock_event_device cf_pit_clockevent = {
92 .name = "pit",
93 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
94 .set_mode = init_cf_pit_timer,
95 .set_next_event = cf_pit_next_event,
96 .shift = 32,
97 .irq = MCFINT_VECBASE + MCFINT_PIT1,
98};
99
100
101
40/***************************************************************************/ 102/***************************************************************************/
41 103
42static irqreturn_t pit_tick(int irq, void *dummy) 104static irqreturn_t pit_tick(int irq, void *dummy)
43{ 105{
106 struct clock_event_device *evt = &cf_pit_clockevent;
44 u16 pcsr; 107 u16 pcsr;
45 108
46 /* Reset the ColdFire timer */ 109 /* Reset the ColdFire timer */
47 pcsr = __raw_readw(TA(MCFPIT_PCSR)); 110 pcsr = __raw_readw(TA(MCFPIT_PCSR));
48 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); 111 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR));
49 112
50 pit_cnt += pit_cycles_per_jiffy; 113 pit_cnt += PIT_CYCLES_PER_JIFFY;
51 return arch_timer_interrupt(irq, dummy); 114 evt->event_handler(evt);
115 return IRQ_HANDLED;
52} 116}
53 117
54/***************************************************************************/ 118/***************************************************************************/
@@ -72,14 +136,14 @@ static cycle_t pit_read_clk(void)
72 cycles = pit_cnt; 136 cycles = pit_cnt;
73 local_irq_restore(flags); 137 local_irq_restore(flags);
74 138
75 return cycles + pit_cycles_per_jiffy - pcntr; 139 return cycles + PIT_CYCLES_PER_JIFFY - pcntr;
76} 140}
77 141
78/***************************************************************************/ 142/***************************************************************************/
79 143
80static struct clocksource pit_clk = { 144static struct clocksource pit_clk = {
81 .name = "pit", 145 .name = "pit",
82 .rating = 250, 146 .rating = 100,
83 .read = pit_read_clk, 147 .read = pit_read_clk,
84 .shift = 20, 148 .shift = 20,
85 .mask = CLOCKSOURCE_MASK(32), 149 .mask = CLOCKSOURCE_MASK(32),
@@ -92,6 +156,14 @@ void hw_timer_init(void)
92{ 156{
93 u32 imr; 157 u32 imr;
94 158
159 cf_pit_clockevent.cpumask = cpumask_of_cpu(smp_processor_id());
160 cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32);
161 cf_pit_clockevent.max_delta_ns =
162 clockevent_delta2ns(0xFFFF, &cf_pit_clockevent);
163 cf_pit_clockevent.min_delta_ns =
164 clockevent_delta2ns(0x3f, &cf_pit_clockevent);
165 clockevents_register_device(&cf_pit_clockevent);
166
95 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); 167 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq);
96 168
97 __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1); 169 __raw_writeb(ICR_INTRCONF, INTC0 + MCFINTC_ICR0 + MCFINT_PIT1);
@@ -99,13 +171,6 @@ void hw_timer_init(void)
99 imr &= ~MCFPIT_IMR_IBIT; 171 imr &= ~MCFPIT_IMR_IBIT;
100 __raw_writel(imr, INTC0 + MCFPIT_IMR); 172 __raw_writel(imr, INTC0 + MCFPIT_IMR);
101 173
102 /* Set up PIT timer 1 as poll clock */
103 pit_cycles_per_jiffy = FREQ / HZ;
104 __raw_writew(MCFPIT_PCSR_DISABLE, TA(MCFPIT_PCSR));
105 __raw_writew(pit_cycles_per_jiffy, TA(MCFPIT_PMR));
106 __raw_writew(MCFPIT_PCSR_EN | MCFPIT_PCSR_PIE | MCFPIT_PCSR_OVW |
107 MCFPIT_PCSR_RLD | MCFPIT_PCSR_CLK64, TA(MCFPIT_PCSR));
108
109 pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); 174 pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift);
110 clocksource_register(&pit_clk); 175 clocksource_register(&pit_clk);
111} 176}
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index 2166b9e1e80c..bd854a6d1d89 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -31,7 +31,6 @@
31 31
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/pm.h> 33#include <linux/pm.h>
34#include <linux/pm_legacy.h>
35#include <linux/sysctl.h> 34#include <linux/sysctl.h>
36#include <linux/jiffies.h> 35#include <linux/jiffies.h>
37 36
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index e7ed0ac48537..1f60e27523d9 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/moduleloader.h> 23#include <linux/moduleloader.h>
24#include <linux/elf.h> 24#include <linux/elf.h>
25#include <linux/mm.h>
25#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
26#include <linux/slab.h> 27#include <linux/slab.h>
27#include <linux/fs.h> 28#include <linux/fs.h>
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index c06f5b5d764c..b16facd9ea8e 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -53,7 +53,7 @@ void __noreturn cpu_idle(void)
53{ 53{
54 /* endless idle loop with no priority at all */ 54 /* endless idle loop with no priority at all */
55 while (1) { 55 while (1) {
56 tick_nohz_stop_sched_tick(); 56 tick_nohz_stop_sched_tick(1);
57 while (!need_resched()) { 57 while (!need_resched()) {
58#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG 58#ifdef CONFIG_SMTC_IDLE_HOOK_DEBUG
59 extern void smtc_idle_loop_hook(void); 59 extern void smtc_idle_loop_hook(void);
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index b55641961232..dfd868b68364 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -522,8 +522,8 @@ static int __init rtlx_module_init(void)
522 atomic_set(&channel_wqs[i].in_open, 0); 522 atomic_set(&channel_wqs[i].in_open, 0);
523 mutex_init(&channel_wqs[i].mutex); 523 mutex_init(&channel_wqs[i].mutex);
524 524
525 dev = device_create(mt_class, NULL, MKDEV(major, i), 525 dev = device_create_drvdata(mt_class, NULL, MKDEV(major, i),
526 "%s%d", module_name, i); 526 NULL, "%s%d", module_name, i);
527 if (IS_ERR(dev)) { 527 if (IS_ERR(dev)) {
528 err = PTR_ERR(dev); 528 err = PTR_ERR(dev);
529 goto out_chrdev; 529 goto out_chrdev;
diff --git a/arch/mips/kernel/stacktrace.c b/arch/mips/kernel/stacktrace.c
index 5eb4681a73d2..0632e2a849c0 100644
--- a/arch/mips/kernel/stacktrace.c
+++ b/arch/mips/kernel/stacktrace.c
@@ -7,6 +7,7 @@
7 */ 7 */
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <linux/stacktrace.h> 9#include <linux/stacktrace.h>
10#include <linux/module.h>
10#include <asm/stacktrace.h> 11#include <asm/stacktrace.h>
11 12
12/* 13/*
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 3523c8d12eda..343015a2f418 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -52,7 +52,7 @@ asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs)
52 int fd[2]; 52 int fd[2];
53 int error, res; 53 int error, res;
54 54
55 error = do_pipe(fd); 55 error = do_pipe_flags(fd, 0);
56 if (error) { 56 if (error) {
57 res = error; 57 res = error;
58 goto out; 58 goto out;
diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c
index 48932ce1d730..d9c79d8be81d 100644
--- a/arch/mips/sgi-ip27/ip27-klnuma.c
+++ b/arch/mips/sgi-ip27/ip27-klnuma.c
@@ -4,6 +4,7 @@
4 * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com) 4 * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com)
5 */ 5 */
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/mm.h>
7#include <linux/mmzone.h> 8#include <linux/mmzone.h>
8#include <linux/kernel.h> 9#include <linux/kernel.h>
9#include <linux/nodemask.h> 10#include <linux/nodemask.h>
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 42cd10956306..060d853d7b35 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -33,8 +33,6 @@
33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) 33#define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT)
34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) 34#define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT)
35 35
36static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES];
37
38struct node_data *__node_data[MAX_COMPACT_NODES]; 36struct node_data *__node_data[MAX_COMPACT_NODES];
39 37
40EXPORT_SYMBOL(__node_data); 38EXPORT_SYMBOL(__node_data);
@@ -403,7 +401,7 @@ static void __init node_mem_init(cnodeid_t node)
403 */ 401 */
404 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT); 402 __node_data[node] = __va(slot_freepfn << PAGE_SHIFT);
405 403
406 NODE_DATA(node)->bdata = &plat_node_bdata[node]; 404 NODE_DATA(node)->bdata = &bootmem_node_data[node];
407 NODE_DATA(node)->node_start_pfn = start_pfn; 405 NODE_DATA(node)->node_start_pfn = start_pfn;
408 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn; 406 NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
409 407
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c
index 28b012ab8dcb..66e3e3fb311f 100644
--- a/arch/mips/sibyte/common/sb_tbprof.c
+++ b/arch/mips/sibyte/common/sb_tbprof.c
@@ -576,7 +576,8 @@ static int __init sbprof_tb_init(void)
576 576
577 tb_class = tbc; 577 tb_class = tbc;
578 578
579 dev = device_create(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), "tb"); 579 dev = device_create_drvdata(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0),
580 NULL, "tb");
580 if (IS_ERR(dev)) { 581 if (IS_ERR(dev)) {
581 err = PTR_ERR(dev); 582 err = PTR_ERR(dev);
582 goto out_class; 583 goto out_class;
diff --git a/arch/mn10300/mm/init.c b/arch/mn10300/mm/init.c
index 8c5d88c7b90a..8cee387a24fd 100644
--- a/arch/mn10300/mm/init.c
+++ b/arch/mn10300/mm/init.c
@@ -67,8 +67,8 @@ void __init paging_init(void)
67 67
68 /* declare the sizes of the RAM zones (only use the normal zone) */ 68 /* declare the sizes of the RAM zones (only use the normal zone) */
69 zones_size[ZONE_NORMAL] = 69 zones_size[ZONE_NORMAL] =
70 (contig_page_data.bdata->node_low_pfn) - 70 contig_page_data.bdata->node_low_pfn -
71 (contig_page_data.bdata->node_boot_start >> PAGE_SHIFT); 71 contig_page_data.bdata->node_min_pfn;
72 72
73 /* pass the memory from the bootmem allocator to the main allocator */ 73 /* pass the memory from the bootmem allocator to the main allocator */
74 free_area_init(zones_size); 74 free_area_init(zones_size);
@@ -87,7 +87,7 @@ void __init mem_init(void)
87 if (!mem_map) 87 if (!mem_map)
88 BUG(); 88 BUG();
89 89
90#define START_PFN (contig_page_data.bdata->node_boot_start >> PAGE_SHIFT) 90#define START_PFN (contig_page_data.bdata->node_min_pfn)
91#define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn) 91#define MAX_LOW_PFN (contig_page_data.bdata->node_low_pfn)
92 92
93 max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN; 93 max_mapnr = num_physpages = MAX_LOW_PFN - START_PFN;
diff --git a/arch/parisc/hpux/sys_hpux.c b/arch/parisc/hpux/sys_hpux.c
index 0c5b9dabb475..be255ebb609c 100644
--- a/arch/parisc/hpux/sys_hpux.c
+++ b/arch/parisc/hpux/sys_hpux.c
@@ -448,7 +448,7 @@ int hpux_pipe(int *kstack_fildes)
448 int error; 448 int error;
449 449
450 lock_kernel(); 450 lock_kernel();
451 error = do_pipe(kstack_fildes); 451 error = do_pipe_flags(kstack_fildes, 0);
452 unlock_kernel(); 452 unlock_kernel();
453 return error; 453 return error;
454} 454}
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index b4d6c8777ed0..7c155c254e72 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -36,7 +36,6 @@ extern int data_start;
36 36
37#ifdef CONFIG_DISCONTIGMEM 37#ifdef CONFIG_DISCONTIGMEM
38struct node_map_data node_data[MAX_NUMNODES] __read_mostly; 38struct node_map_data node_data[MAX_NUMNODES] __read_mostly;
39bootmem_data_t bmem_data[MAX_NUMNODES] __read_mostly;
40unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly; 39unsigned char pfnnid_map[PFNNID_MAP_MAX] __read_mostly;
41#endif 40#endif
42 41
@@ -262,7 +261,7 @@ static void __init setup_bootmem(void)
262#ifdef CONFIG_DISCONTIGMEM 261#ifdef CONFIG_DISCONTIGMEM
263 for (i = 0; i < MAX_PHYSMEM_RANGES; i++) { 262 for (i = 0; i < MAX_PHYSMEM_RANGES; i++) {
264 memset(NODE_DATA(i), 0, sizeof(pg_data_t)); 263 memset(NODE_DATA(i), 0, sizeof(pg_data_t));
265 NODE_DATA(i)->bdata = &bmem_data[i]; 264 NODE_DATA(i)->bdata = &bootmem_node_data[i];
266 } 265 }
267 memset(pfnnid_map, 0xff, sizeof(pfnnid_map)); 266 memset(pfnnid_map, 0xff, sizeof(pfnnid_map));
268 267
@@ -888,7 +887,7 @@ void __init paging_init(void)
888 } 887 }
889#endif 888#endif
890 889
891 free_area_init_node(i, NODE_DATA(i), zones_size, 890 free_area_init_node(i, zones_size,
892 pmem_ranges[i].start_pfn, NULL); 891 pmem_ranges[i].start_pfn, NULL);
893 } 892 }
894} 893}
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index de88972c5896..a487671c282f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -111,7 +111,9 @@ config PPC
111 select HAVE_DYNAMIC_FTRACE 111 select HAVE_DYNAMIC_FTRACE
112 select HAVE_FTRACE 112 select HAVE_FTRACE
113 select HAVE_IDE 113 select HAVE_IDE
114 select HAVE_IOREMAP_PROT
114 select HAVE_KPROBES 115 select HAVE_KPROBES
116 select HAVE_ARCH_KGDB
115 select HAVE_KRETPROBES 117 select HAVE_KRETPROBES
116 select HAVE_LMB 118 select HAVE_LMB
117 select HAVE_DMA_ATTRS if PPC64 119 select HAVE_DMA_ATTRS if PPC64
@@ -199,7 +201,7 @@ config ARCH_HIBERNATION_POSSIBLE
199 201
200config ARCH_SUSPEND_POSSIBLE 202config ARCH_SUSPEND_POSSIBLE
201 def_bool y 203 def_bool y
202 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 204 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx
203 205
204config PPC_DCR_NATIVE 206config PPC_DCR_NATIVE
205 bool 207 bool
@@ -568,11 +570,15 @@ config FSL_GTM
568config MCA 570config MCA
569 bool 571 bool
570 572
573# Platforms that what PCI turned unconditionally just do select PCI
574# in their config node. Platforms that want to choose at config
575# time should select PPC_PCI_CHOICE
576config PPC_PCI_CHOICE
577 bool
578
571config PCI 579config PCI
572 bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ 580 bool "PCI support" if PPC_PCI_CHOICE
573 || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ 581 default y if !40x && !CPM2 && !8xx && !PPC_83xx \
574 || PPC_PS3 || 44x
575 default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \
576 && !PPC_85xx && !PPC_86xx 582 && !PPC_85xx && !PPC_86xx
577 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx 583 default PCI_PERMEDIA if !4xx && !CPM2 && !8xx
578 default PCI_QSPAN if !4xx && !CPM2 && 8xx 584 default PCI_QSPAN if !4xx && !CPM2 && 8xx
@@ -838,6 +844,7 @@ source "crypto/Kconfig"
838config PPC_CLOCK 844config PPC_CLOCK
839 bool 845 bool
840 default n 846 default n
847 select HAVE_CLK
841 848
842config PPC_LIB_RHEAP 849config PPC_LIB_RHEAP
843 bool 850 bool
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index 2840ab69ef4e..8c8aadbe9563 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -41,22 +41,6 @@ config HCALL_STATS
41 This option will add a small amount of overhead to all hypervisor 41 This option will add a small amount of overhead to all hypervisor
42 calls. 42 calls.
43 43
44config DEBUGGER
45 bool "Enable debugger hooks"
46 depends on DEBUG_KERNEL
47 help
48 Include in-kernel hooks for kernel debuggers. Unless you are
49 intending to debug the kernel, say N here.
50
51config KGDB
52 bool "Include kgdb kernel debugger"
53 depends on DEBUGGER && (BROKEN || PPC_GEN550 || 4xx)
54 select DEBUG_INFO
55 help
56 Include in-kernel hooks for kgdb, the Linux kernel source level
57 debugger. See <http://kgdb.sourceforge.net/> for more information.
58 Unless you are intending to debug the kernel, say N here.
59
60config CODE_PATCHING_SELFTEST 44config CODE_PATCHING_SELFTEST
61 bool "Run self-tests of the code-patching code." 45 bool "Run self-tests of the code-patching code."
62 depends on DEBUG_KERNEL 46 depends on DEBUG_KERNEL
@@ -67,36 +51,9 @@ config FTR_FIXUP_SELFTEST
67 depends on DEBUG_KERNEL 51 depends on DEBUG_KERNEL
68 default n 52 default n
69 53
70choice
71 prompt "Serial Port"
72 depends on KGDB
73 default KGDB_TTYS1
74
75config KGDB_TTYS0
76 bool "ttyS0"
77
78config KGDB_TTYS1
79 bool "ttyS1"
80
81config KGDB_TTYS2
82 bool "ttyS2"
83
84config KGDB_TTYS3
85 bool "ttyS3"
86
87endchoice
88
89config KGDB_CONSOLE
90 bool "Enable serial console thru kgdb port"
91 depends on KGDB && 8xx || CPM2
92 help
93 If you enable this, all serial console messages will be sent
94 over the gdb stub.
95 If unsure, say N.
96
97config XMON 54config XMON
98 bool "Include xmon kernel debugger" 55 bool "Include xmon kernel debugger"
99 depends on DEBUGGER 56 depends on DEBUG_KERNEL
100 help 57 help
101 Include in-kernel hooks for the xmon kernel monitor/debugger. 58 Include in-kernel hooks for the xmon kernel monitor/debugger.
102 Unless you are intending to debug the kernel, say N here. 59 Unless you are intending to debug the kernel, say N here.
@@ -126,6 +83,11 @@ config XMON_DISASSEMBLY
126 to say Y here, unless you're building for a memory-constrained 83 to say Y here, unless you're building for a memory-constrained
127 system. 84 system.
128 85
86config DEBUGGER
87 bool
88 depends on KGDB || XMON
89 default y
90
129config IRQSTACKS 91config IRQSTACKS
130 bool "Use separate kernel stacks when processing interrupts" 92 bool "Use separate kernel stacks when processing interrupts"
131 help 93 help
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 19f83c8f219d..14174aa24074 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -163,12 +163,12 @@ quiet_cmd_flex = FLEX $@
163 cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped 163 cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
164 164
165$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE 165$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
166 $(call if_changed,bison) 166 $(call if_changed,bison)
167 167
168$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c 168$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
169 169
170$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE 170$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
171 $(call if_changed,flex) 171 $(call if_changed,flex)
172endif 172endif
173 173
174############# 174#############
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index 705c23c14f32..2544f3ecd6e9 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -18,6 +18,16 @@
18 #address-cells = <1>; 18 #address-cells = <1>;
19 #size-cells = <1>; 19 #size-cells = <1>;
20 20
21 aliases {
22 ethernet0 = &enet0;
23 ethernet1 = &enet1;
24
25 serial0 = &serial0;
26 serial1 = &serial1;
27
28 pci0 = &pci0;
29 };
30
21 cpus { 31 cpus {
22 #address-cells = <1>; 32 #address-cells = <1>;
23 #size-cells =<0>; 33 #size-cells =<0>;
@@ -78,7 +88,7 @@
78 88
79 }; 89 };
80 90
81 ethernet@6200 { 91 enet0: ethernet@6200 {
82 linux,network-index = <0>; 92 linux,network-index = <0>;
83 #size-cells = <0>; 93 #size-cells = <0>;
84 device_type = "network"; 94 device_type = "network";
@@ -91,7 +101,7 @@
91 phy-handle = <&phy8>; 101 phy-handle = <&phy8>;
92 }; 102 };
93 103
94 ethernet@6600 { 104 enet1: ethernet@6600 {
95 linux,network-index = <1>; 105 linux,network-index = <1>;
96 #address-cells = <1>; 106 #address-cells = <1>;
97 #size-cells = <0>; 107 #size-cells = <0>;
@@ -105,7 +115,7 @@
105 phy-handle = <&phy9>; 115 phy-handle = <&phy9>;
106 }; 116 };
107 117
108 serial@7808 { 118 serial0: serial@7808 {
109 device_type = "serial"; 119 device_type = "serial";
110 compatible = "ns16550"; 120 compatible = "ns16550";
111 reg = <0x7808 0x200>; 121 reg = <0x7808 0x200>;
@@ -114,7 +124,7 @@
114 interrupt-parent = <&mpic>; 124 interrupt-parent = <&mpic>;
115 }; 125 };
116 126
117 serial@7c08 { 127 serial1: serial@7c08 {
118 device_type = "serial"; 128 device_type = "serial";
119 compatible = "ns16550"; 129 compatible = "ns16550";
120 reg = <0x7c08 0x200>; 130 reg = <0x7c08 0x200>;
@@ -131,7 +141,7 @@
131 compatible = "chrp,open-pic"; 141 compatible = "chrp,open-pic";
132 device_type = "open-pic"; 142 device_type = "open-pic";
133 }; 143 };
134 pci@1000 { 144 pci0: pci@1000 {
135 compatible = "tsi108-pci"; 145 compatible = "tsi108-pci";
136 device_type = "pci"; 146 device_type = "pci";
137 #interrupt-cells = <1>; 147 #interrupt-cells = <1>;
@@ -184,8 +194,4 @@
184 }; 194 };
185 }; 195 };
186 }; 196 };
187 chosen {
188 linux,stdout-path = "/tsi108@c0000000/serial@7808";
189 };
190
191}; 197};
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts
index 3664fb584026..2a94ae0dc8b8 100644
--- a/arch/powerpc/boot/dts/mpc8313erdb.dts
+++ b/arch/powerpc/boot/dts/mpc8313erdb.dts
@@ -109,18 +109,38 @@
109 reg = <0x200 0x100>; 109 reg = <0x200 0x100>;
110 }; 110 };
111 111
112 i2c@3000 { 112 sleep-nexus {
113 #address-cells = <1>; 113 #address-cells = <1>;
114 #size-cells = <0>; 114 #size-cells = <1>;
115 cell-index = <0>; 115 compatible = "simple-bus";
116 compatible = "fsl-i2c"; 116 sleep = <&pmc 0x03000000>;
117 reg = <0x3000 0x100>; 117 ranges;
118 interrupts = <14 0x8>; 118
119 interrupt-parent = <&ipic>; 119 i2c@3000 {
120 dfsrr; 120 #address-cells = <1>;
121 rtc@68 { 121 #size-cells = <0>;
122 compatible = "dallas,ds1339"; 122 cell-index = <0>;
123 reg = <0x68>; 123 compatible = "fsl-i2c";
124 reg = <0x3000 0x100>;
125 interrupts = <14 0x8>;
126 interrupt-parent = <&ipic>;
127 dfsrr;
128 rtc@68 {
129 compatible = "dallas,ds1339";
130 reg = <0x68>;
131 };
132 };
133
134 crypto@30000 {
135 compatible = "fsl,sec2.2", "fsl,sec2.1",
136 "fsl,sec2.0";
137 reg = <0x30000 0x10000>;
138 interrupts = <11 0x8>;
139 interrupt-parent = <&ipic>;
140 fsl,num-channels = <1>;
141 fsl,channel-fifo-len = <24>;
142 fsl,exec-units-mask = <0x4c>;
143 fsl,descriptor-types-mask = <0x0122003f>;
124 }; 144 };
125 }; 145 };
126 146
@@ -188,37 +208,44 @@
188 interrupt-parent = <&ipic>; 208 interrupt-parent = <&ipic>;
189 interrupts = <38 0x8>; 209 interrupts = <38 0x8>;
190 phy_type = "utmi_wide"; 210 phy_type = "utmi_wide";
211 sleep = <&pmc 0x00300000>;
191 }; 212 };
192 213
193 mdio@24520 { 214 enet0: ethernet@24000 {
194 #address-cells = <1>; 215 #address-cells = <1>;
195 #size-cells = <0>; 216 #size-cells = <1>;
196 compatible = "fsl,gianfar-mdio"; 217 sleep = <&pmc 0x20000000>;
197 reg = <0x24520 0x20>; 218 ranges;
198 phy1: ethernet-phy@1 {
199 interrupt-parent = <&ipic>;
200 interrupts = <19 0x8>;
201 reg = <0x1>;
202 device_type = "ethernet-phy";
203 };
204 phy4: ethernet-phy@4 {
205 interrupt-parent = <&ipic>;
206 interrupts = <20 0x8>;
207 reg = <0x4>;
208 device_type = "ethernet-phy";
209 };
210 };
211 219
212 enet0: ethernet@24000 {
213 cell-index = <0>; 220 cell-index = <0>;
214 device_type = "network"; 221 device_type = "network";
215 model = "eTSEC"; 222 model = "eTSEC";
216 compatible = "gianfar"; 223 compatible = "gianfar", "simple-bus";
217 reg = <0x24000 0x1000>; 224 reg = <0x24000 0x1000>;
218 local-mac-address = [ 00 00 00 00 00 00 ]; 225 local-mac-address = [ 00 00 00 00 00 00 ];
219 interrupts = <37 0x8 36 0x8 35 0x8>; 226 interrupts = <37 0x8 36 0x8 35 0x8>;
220 interrupt-parent = <&ipic>; 227 interrupt-parent = <&ipic>;
221 phy-handle = < &phy1 >; 228 phy-handle = < &phy1 >;
229 fsl,magic-packet;
230
231 mdio@24520 {
232 #address-cells = <1>;
233 #size-cells = <0>;
234 compatible = "fsl,gianfar-mdio";
235 reg = <0x24520 0x20>;
236 phy1: ethernet-phy@1 {
237 interrupt-parent = <&ipic>;
238 interrupts = <19 0x8>;
239 reg = <0x1>;
240 device_type = "ethernet-phy";
241 };
242 phy4: ethernet-phy@4 {
243 interrupt-parent = <&ipic>;
244 interrupts = <20 0x8>;
245 reg = <0x4>;
246 device_type = "ethernet-phy";
247 };
248 };
222 }; 249 };
223 250
224 enet1: ethernet@25000 { 251 enet1: ethernet@25000 {
@@ -231,6 +258,8 @@
231 interrupts = <34 0x8 33 0x8 32 0x8>; 258 interrupts = <34 0x8 33 0x8 32 0x8>;
232 interrupt-parent = <&ipic>; 259 interrupt-parent = <&ipic>;
233 phy-handle = < &phy4 >; 260 phy-handle = < &phy4 >;
261 sleep = <&pmc 0x10000000>;
262 fsl,magic-packet;
234 }; 263 };
235 264
236 serial0: serial@4500 { 265 serial0: serial@4500 {
@@ -253,17 +282,6 @@
253 interrupt-parent = <&ipic>; 282 interrupt-parent = <&ipic>;
254 }; 283 };
255 284
256 crypto@30000 {
257 compatible = "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0";
258 reg = <0x30000 0x10000>;
259 interrupts = <11 0x8>;
260 interrupt-parent = <&ipic>;
261 fsl,num-channels = <1>;
262 fsl,channel-fifo-len = <24>;
263 fsl,exec-units-mask = <0x4c>;
264 fsl,descriptor-types-mask = <0x0122003f>;
265 };
266
267 /* IPIC 285 /* IPIC
268 * interrupts cell = <intr #, sense> 286 * interrupts cell = <intr #, sense>
269 * sense values match linux IORESOURCE_IRQ_* defines: 287 * sense values match linux IORESOURCE_IRQ_* defines:
@@ -277,36 +295,119 @@
277 reg = <0x700 0x100>; 295 reg = <0x700 0x100>;
278 device_type = "ipic"; 296 device_type = "ipic";
279 }; 297 };
298
299 pmc: power@b00 {
300 compatible = "fsl,mpc8313-pmc", "fsl,mpc8349-pmc";
301 reg = <0xb00 0x100 0xa00 0x100>;
302 interrupts = <80 8>;
303 interrupt-parent = <&ipic>;
304 fsl,mpc8313-wakeup-timer = <&gtm1>;
305
306 /* Remove this (or change to "okay") if you have
307 * a REVA3 or later board, if you apply one of the
308 * workarounds listed in section 8.5 of the board
309 * manual, or if you are adapting this device tree
310 * to a different board.
311 */
312 status = "fail";
313 };
314
315 gtm1: timer@500 {
316 compatible = "fsl,mpc8313-gtm", "fsl,gtm";
317 reg = <0x500 0x100>;
318 interrupts = <90 8 78 8 84 8 72 8>;
319 interrupt-parent = <&ipic>;
320 };
321
322 timer@600 {
323 compatible = "fsl,mpc8313-gtm", "fsl,gtm";
324 reg = <0x600 0x100>;
325 interrupts = <91 8 79 8 85 8 73 8>;
326 interrupt-parent = <&ipic>;
327 };
280 }; 328 };
281 329
282 pci0: pci@e0008500 { 330 sleep-nexus {
283 cell-index = <1>; 331 #address-cells = <1>;
284 interrupt-map-mask = <0xf800 0x0 0x0 0x7>; 332 #size-cells = <1>;
285 interrupt-map = < 333 compatible = "simple-bus";
286 334 sleep = <&pmc 0x00010000>;
287 /* IDSEL 0x0E -mini PCI */ 335 ranges;
288 0x7000 0x0 0x0 0x1 &ipic 18 0x8 336
289 0x7000 0x0 0x0 0x2 &ipic 18 0x8 337 pci0: pci@e0008500 {
290 0x7000 0x0 0x0 0x3 &ipic 18 0x8 338 cell-index = <1>;
291 0x7000 0x0 0x0 0x4 &ipic 18 0x8 339 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
292 340 interrupt-map = <
293 /* IDSEL 0x0F - PCI slot */ 341 /* IDSEL 0x0E -mini PCI */
294 0x7800 0x0 0x0 0x1 &ipic 17 0x8 342 0x7000 0x0 0x0 0x1 &ipic 18 0x8
295 0x7800 0x0 0x0 0x2 &ipic 18 0x8 343 0x7000 0x0 0x0 0x2 &ipic 18 0x8
296 0x7800 0x0 0x0 0x3 &ipic 17 0x8 344 0x7000 0x0 0x0 0x3 &ipic 18 0x8
297 0x7800 0x0 0x0 0x4 &ipic 18 0x8>; 345 0x7000 0x0 0x0 0x4 &ipic 18 0x8
298 interrupt-parent = <&ipic>; 346
299 interrupts = <66 0x8>; 347 /* IDSEL 0x0F - PCI slot */
300 bus-range = <0x0 0x0>; 348 0x7800 0x0 0x0 0x1 &ipic 17 0x8
301 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 349 0x7800 0x0 0x0 0x2 &ipic 18 0x8
302 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 350 0x7800 0x0 0x0 0x3 &ipic 17 0x8
303 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; 351 0x7800 0x0 0x0 0x4 &ipic 18 0x8>;
304 clock-frequency = <66666666>; 352 interrupt-parent = <&ipic>;
305 #interrupt-cells = <1>; 353 interrupts = <66 0x8>;
306 #size-cells = <2>; 354 bus-range = <0x0 0x0>;
307 #address-cells = <3>; 355 ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000
308 reg = <0xe0008500 0x100>; 356 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000
309 compatible = "fsl,mpc8349-pci"; 357 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>;
310 device_type = "pci"; 358 clock-frequency = <66666666>;
359 #interrupt-cells = <1>;
360 #size-cells = <2>;
361 #address-cells = <3>;
362 reg = <0xe0008500 0x100>;
363 compatible = "fsl,mpc8349-pci";
364 device_type = "pci";
365 };
366
367 dma@82a8 {
368 #address-cells = <1>;
369 #size-cells = <1>;
370 compatible = "fsl,mpc8313-dma", "fsl,elo-dma";
371 reg = <0xe00082a8 4>;
372 ranges = <0 0xe0008100 0x1a8>;
373 interrupt-parent = <&ipic>;
374 interrupts = <71 8>;
375
376 dma-channel@0 {
377 compatible = "fsl,mpc8313-dma-channel",
378 "fsl,elo-dma-channel";
379 reg = <0 0x28>;
380 interrupt-parent = <&ipic>;
381 interrupts = <71 8>;
382 cell-index = <0>;
383 };
384
385 dma-channel@80 {
386 compatible = "fsl,mpc8313-dma-channel",
387 "fsl,elo-dma-channel";
388 reg = <0x80 0x28>;
389 interrupt-parent = <&ipic>;
390 interrupts = <71 8>;
391 cell-index = <1>;
392 };
393
394 dma-channel@100 {
395 compatible = "fsl,mpc8313-dma-channel",
396 "fsl,elo-dma-channel";
397 reg = <0x100 0x28>;
398 interrupt-parent = <&ipic>;
399 interrupts = <71 8>;
400 cell-index = <2>;
401 };
402
403 dma-channel@180 {
404 compatible = "fsl,mpc8313-dma-channel",
405 "fsl,elo-dma-channel";
406 reg = <0x180 0x28>;
407 interrupt-parent = <&ipic>;
408 interrupts = <71 8>;
409 cell-index = <3>;
410 };
411 };
311 }; 412 };
312}; 413};
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 981941e5d7a5..666185f59459 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -388,6 +388,20 @@
388 0x01000000 0x0 0x00000000 388 0x01000000 0x0 0x00000000
389 0x01000000 0x0 0x00000000 389 0x01000000 0x0 0x00000000
390 0x0 0x00100000>; 390 0x0 0x00100000>;
391
392 isa@1e {
393 device_type = "isa";
394 #size-cells = <1>;
395 #address-cells = <2>;
396 reg = <0xf000 0 0 0 0>;
397 ranges = <1 0 0x01000000 0 0
398 0x00001000>;
399
400 rtc@70 {
401 compatible = "pnpPNP,b00";
402 reg = <1 0x70 2>;
403 };
404 };
391 }; 405 };
392 }; 406 };
393 }; 407 };
diff --git a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
index 042a85ea7b72..a0583e5119f5 100644
--- a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig
@@ -997,10 +997,12 @@ CONFIG_SND=y
997CONFIG_SND_TIMER=y 997CONFIG_SND_TIMER=y
998CONFIG_SND_PCM=y 998CONFIG_SND_PCM=y
999# CONFIG_SND_SEQUENCER is not set 999# CONFIG_SND_SEQUENCER is not set
1000# CONFIG_SND_MIXER_OSS is not set 1000CONFIG_SND_OSSEMUL=y
1001# CONFIG_SND_PCM_OSS is not set 1001CONFIG_SND_MIXER_OSS=y
1002CONFIG_SND_PCM_OSS=y
1003CONFIG_SND_PCM_OSS_PLUGINS=y
1002# CONFIG_SND_DYNAMIC_MINORS is not set 1004# CONFIG_SND_DYNAMIC_MINORS is not set
1003CONFIG_SND_SUPPORT_OLD_API=y 1005# CONFIG_SND_SUPPORT_OLD_API is not set
1004CONFIG_SND_VERBOSE_PROCFS=y 1006CONFIG_SND_VERBOSE_PROCFS=y
1005# CONFIG_SND_VERBOSE_PRINTK is not set 1007# CONFIG_SND_VERBOSE_PRINTK is not set
1006# CONFIG_SND_DEBUG is not set 1008# CONFIG_SND_DEBUG is not set
diff --git a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
index 03627cfebcb4..164fd9606ee6 100644
--- a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
+++ b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig
@@ -997,10 +997,12 @@ CONFIG_SND=y
997CONFIG_SND_TIMER=y 997CONFIG_SND_TIMER=y
998CONFIG_SND_PCM=y 998CONFIG_SND_PCM=y
999# CONFIG_SND_SEQUENCER is not set 999# CONFIG_SND_SEQUENCER is not set
1000# CONFIG_SND_MIXER_OSS is not set 1000CONFIG_SND_OSSEMUL=y
1001# CONFIG_SND_PCM_OSS is not set 1001CONFIG_SND_MIXER_OSS=y
1002CONFIG_SND_PCM_OSS=y
1003CONFIG_SND_PCM_OSS_PLUGINS=y
1002# CONFIG_SND_DYNAMIC_MINORS is not set 1004# CONFIG_SND_DYNAMIC_MINORS is not set
1003CONFIG_SND_SUPPORT_OLD_API=y 1005# CONFIG_SND_SUPPORT_OLD_API is not set
1004CONFIG_SND_VERBOSE_PROCFS=y 1006CONFIG_SND_VERBOSE_PROCFS=y
1005# CONFIG_SND_VERBOSE_PRINTK is not set 1007# CONFIG_SND_VERBOSE_PRINTK is not set
1006# CONFIG_SND_DEBUG is not set 1008# CONFIG_SND_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index 3efab71a603b..fa0170504b88 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -1005,10 +1005,12 @@ CONFIG_SND=y
1005CONFIG_SND_TIMER=y 1005CONFIG_SND_TIMER=y
1006CONFIG_SND_PCM=y 1006CONFIG_SND_PCM=y
1007# CONFIG_SND_SEQUENCER is not set 1007# CONFIG_SND_SEQUENCER is not set
1008# CONFIG_SND_MIXER_OSS is not set 1008CONFIG_SND_OSSEMUL=y
1009# CONFIG_SND_PCM_OSS is not set 1009CONFIG_SND_MIXER_OSS=y
1010CONFIG_SND_PCM_OSS=y
1011CONFIG_SND_PCM_OSS_PLUGINS=y
1010# CONFIG_SND_DYNAMIC_MINORS is not set 1012# CONFIG_SND_DYNAMIC_MINORS is not set
1011CONFIG_SND_SUPPORT_OLD_API=y 1013# CONFIG_SND_SUPPORT_OLD_API is not set
1012CONFIG_SND_VERBOSE_PROCFS=y 1014CONFIG_SND_VERBOSE_PROCFS=y
1013# CONFIG_SND_VERBOSE_PRINTK is not set 1015# CONFIG_SND_VERBOSE_PRINTK is not set
1014# CONFIG_SND_DEBUG is not set 1016# CONFIG_SND_DEBUG is not set
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig
index 5612d40d0463..cdf98ae3682b 100644
--- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/mpc8610_hpcd_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.26-rc5 3# Linux kernel version: 2.6.26
4# Mon Jun 9 08:50:24 2008 4# Tue Jul 15 08:31:01 2008
5# 5#
6# CONFIG_PPC64 is not set 6# CONFIG_PPC64 is not set
7 7
@@ -51,6 +51,8 @@ CONFIG_PPC_UDBG_16550=y
51CONFIG_AUDIT_ARCH=y 51CONFIG_AUDIT_ARCH=y
52CONFIG_GENERIC_BUG=y 52CONFIG_GENERIC_BUG=y
53CONFIG_DEFAULT_UIMAGE=y 53CONFIG_DEFAULT_UIMAGE=y
54CONFIG_HIBERNATE_32=y
55CONFIG_ARCH_HIBERNATION_POSSIBLE=y
54# CONFIG_PPC_DCR_NATIVE is not set 56# CONFIG_PPC_DCR_NATIVE is not set
55# CONFIG_PPC_DCR_MMIO is not set 57# CONFIG_PPC_DCR_MMIO is not set
56CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 58CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -97,6 +99,7 @@ CONFIG_HOTPLUG=y
97CONFIG_PRINTK=y 99CONFIG_PRINTK=y
98CONFIG_BUG=y 100CONFIG_BUG=y
99# CONFIG_ELF_CORE is not set 101# CONFIG_ELF_CORE is not set
102CONFIG_PCSPKR_PLATFORM=y
100CONFIG_COMPAT_BRK=y 103CONFIG_COMPAT_BRK=y
101CONFIG_BASE_FULL=y 104CONFIG_BASE_FULL=y
102CONFIG_FUTEX=y 105CONFIG_FUTEX=y
@@ -117,7 +120,7 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
120# CONFIG_HAVE_DMA_ATTRS is not set 123CONFIG_HAVE_DMA_ATTRS=y
121CONFIG_PROC_PAGE_MONITOR=y 124CONFIG_PROC_PAGE_MONITOR=y
122CONFIG_SLABINFO=y 125CONFIG_SLABINFO=y
123CONFIG_RT_MUTEXES=y 126CONFIG_RT_MUTEXES=y
@@ -153,31 +156,43 @@ CONFIG_CLASSIC_RCU=y
153# 156#
154# Platform support 157# Platform support
155# 158#
156# CONFIG_PPC_MULTIPLATFORM is not set 159CONFIG_PPC_MULTIPLATFORM=y
157# CONFIG_PPC_82xx is not set 160CONFIG_CLASSIC32=y
158# CONFIG_PPC_83xx is not set 161CONFIG_PPC_CHRP=y
159CONFIG_PPC_86xx=y
160# CONFIG_PPC_MPC512x is not set 162# CONFIG_PPC_MPC512x is not set
161# CONFIG_PPC_MPC5121 is not set 163# CONFIG_PPC_MPC5121 is not set
164# CONFIG_MPC5121_ADS is not set
165# CONFIG_PPC_MPC52xx is not set
166CONFIG_PPC_PMAC=y
162# CONFIG_PPC_CELL is not set 167# CONFIG_PPC_CELL is not set
163# CONFIG_PPC_CELL_NATIVE is not set 168# CONFIG_PPC_CELL_NATIVE is not set
169# CONFIG_PPC_82xx is not set
164# CONFIG_PQ2ADS is not set 170# CONFIG_PQ2ADS is not set
171# CONFIG_PPC_83xx is not set
172CONFIG_PPC_86xx=y
165# CONFIG_MPC8641_HPCN is not set 173# CONFIG_MPC8641_HPCN is not set
166# CONFIG_SBC8641D is not set 174# CONFIG_SBC8641D is not set
167CONFIG_MPC8610_HPCD=y 175CONFIG_MPC8610_HPCD=y
168CONFIG_MPC8610=y 176CONFIG_MPC8610=y
177# CONFIG_EMBEDDED6xx is not set
178CONFIG_PPC_NATIVE=y
179# CONFIG_UDBG_RTAS_CONSOLE is not set
169# CONFIG_IPIC is not set 180# CONFIG_IPIC is not set
170CONFIG_MPIC=y 181CONFIG_MPIC=y
171# CONFIG_MPIC_WEIRD is not set 182# CONFIG_MPIC_WEIRD is not set
172# CONFIG_PPC_I8259 is not set 183CONFIG_PPC_I8259=y
173# CONFIG_PPC_RTAS is not set 184CONFIG_PPC_RTAS=y
185# CONFIG_RTAS_ERROR_LOGGING is not set
186CONFIG_RTAS_PROC=y
174# CONFIG_MMIO_NVRAM is not set 187# CONFIG_MMIO_NVRAM is not set
175# CONFIG_PPC_MPC106 is not set 188CONFIG_PPC_MPC106=y
176# CONFIG_PPC_970_NAP is not set 189# CONFIG_PPC_970_NAP is not set
177# CONFIG_PPC_INDIRECT_IO is not set 190# CONFIG_PPC_INDIRECT_IO is not set
178# CONFIG_GENERIC_IOMAP is not set 191# CONFIG_GENERIC_IOMAP is not set
179# CONFIG_CPU_FREQ is not set 192# CONFIG_CPU_FREQ is not set
180# CONFIG_FSL_ULI1575 is not set 193# CONFIG_PPC601_SYNC_FIX is not set
194# CONFIG_TAU is not set
195CONFIG_FSL_ULI1575=y
181 196
182# 197#
183# Kernel options 198# Kernel options
@@ -202,6 +217,7 @@ CONFIG_BINFMT_ELF=y
202CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 217CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
203CONFIG_ARCH_HAS_WALK_MEMORY=y 218CONFIG_ARCH_HAS_WALK_MEMORY=y
204CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y 219CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
220# CONFIG_KEXEC is not set
205CONFIG_ARCH_FLATMEM_ENABLE=y 221CONFIG_ARCH_FLATMEM_ENABLE=y
206CONFIG_ARCH_POPULATES_NODE_MAP=y 222CONFIG_ARCH_POPULATES_NODE_MAP=y
207CONFIG_SELECT_MEMORY_MODEL=y 223CONFIG_SELECT_MEMORY_MODEL=y
@@ -228,11 +244,13 @@ CONFIG_ISA_DMA_API=y
228# 244#
229# Bus options 245# Bus options
230# 246#
247# CONFIG_ISA is not set
231CONFIG_ZONE_DMA=y 248CONFIG_ZONE_DMA=y
232CONFIG_GENERIC_ISA_DMA=y 249CONFIG_GENERIC_ISA_DMA=y
233CONFIG_PPC_INDIRECT_PCI=y 250CONFIG_PPC_INDIRECT_PCI=y
234CONFIG_FSL_SOC=y 251CONFIG_FSL_SOC=y
235CONFIG_FSL_PCI=y 252CONFIG_FSL_PCI=y
253CONFIG_PPC_PCI_CHOICE=y
236CONFIG_PCI=y 254CONFIG_PCI=y
237CONFIG_PCI_DOMAINS=y 255CONFIG_PCI_DOMAINS=y
238CONFIG_PCI_SYSCALL=y 256CONFIG_PCI_SYSCALL=y
@@ -469,6 +487,7 @@ CONFIG_OF_I2C=y
469# CONFIG_PARPORT is not set 487# CONFIG_PARPORT is not set
470CONFIG_BLK_DEV=y 488CONFIG_BLK_DEV=y
471# CONFIG_BLK_DEV_FD is not set 489# CONFIG_BLK_DEV_FD is not set
490# CONFIG_MAC_FLOPPY is not set
472# CONFIG_BLK_CPQ_DA is not set 491# CONFIG_BLK_CPQ_DA is not set
473# CONFIG_BLK_CPQ_CISS_DA is not set 492# CONFIG_BLK_CPQ_CISS_DA is not set
474# CONFIG_BLK_DEV_DAC960 is not set 493# CONFIG_BLK_DEV_DAC960 is not set
@@ -571,6 +590,8 @@ CONFIG_SCSI_LOWLEVEL=y
571# CONFIG_SCSI_DC390T is not set 590# CONFIG_SCSI_DC390T is not set
572# CONFIG_SCSI_NSP32 is not set 591# CONFIG_SCSI_NSP32 is not set
573# CONFIG_SCSI_DEBUG is not set 592# CONFIG_SCSI_DEBUG is not set
593# CONFIG_SCSI_MESH is not set
594# CONFIG_SCSI_MAC53C94 is not set
574# CONFIG_SCSI_SRP is not set 595# CONFIG_SCSI_SRP is not set
575CONFIG_ATA=y 596CONFIG_ATA=y
576# CONFIG_ATA_NONSTANDARD is not set 597# CONFIG_ATA_NONSTANDARD is not set
@@ -639,6 +660,10 @@ CONFIG_PATA_ALI=y
639# 660#
640# IEEE 1394 (FireWire) support 661# IEEE 1394 (FireWire) support
641# 662#
663
664#
665# Enable only one of the two stacks, unless you know what you are doing
666#
642# CONFIG_FIREWIRE is not set 667# CONFIG_FIREWIRE is not set
643# CONFIG_IEEE1394 is not set 668# CONFIG_IEEE1394 is not set
644# CONFIG_I2O is not set 669# CONFIG_I2O is not set
@@ -655,6 +680,8 @@ CONFIG_DUMMY=y
655# CONFIG_PHYLIB is not set 680# CONFIG_PHYLIB is not set
656CONFIG_NET_ETHERNET=y 681CONFIG_NET_ETHERNET=y
657# CONFIG_MII is not set 682# CONFIG_MII is not set
683# CONFIG_MACE is not set
684# CONFIG_BMAC is not set
658# CONFIG_HAPPYMEAL is not set 685# CONFIG_HAPPYMEAL is not set
659# CONFIG_SUNGEM is not set 686# CONFIG_SUNGEM is not set
660# CONFIG_CASSINI is not set 687# CONFIG_CASSINI is not set
@@ -762,14 +789,16 @@ CONFIG_SERIAL_8250_RSA=y
762# CONFIG_SERIAL_UARTLITE is not set 789# CONFIG_SERIAL_UARTLITE is not set
763CONFIG_SERIAL_CORE=y 790CONFIG_SERIAL_CORE=y
764CONFIG_SERIAL_CORE_CONSOLE=y 791CONFIG_SERIAL_CORE_CONSOLE=y
792# CONFIG_SERIAL_PMACZILOG is not set
765# CONFIG_SERIAL_JSM is not set 793# CONFIG_SERIAL_JSM is not set
766# CONFIG_SERIAL_OF_PLATFORM is not set 794# CONFIG_SERIAL_OF_PLATFORM is not set
767CONFIG_UNIX98_PTYS=y 795CONFIG_UNIX98_PTYS=y
768# CONFIG_LEGACY_PTYS is not set 796# CONFIG_LEGACY_PTYS is not set
797# CONFIG_BRIQ_PANEL is not set
798# CONFIG_HVC_RTAS is not set
769# CONFIG_IPMI_HANDLER is not set 799# CONFIG_IPMI_HANDLER is not set
770# CONFIG_HW_RANDOM is not set 800# CONFIG_HW_RANDOM is not set
771# CONFIG_NVRAM is not set 801# CONFIG_NVRAM is not set
772# CONFIG_GEN_RTC is not set
773# CONFIG_R3964 is not set 802# CONFIG_R3964 is not set
774# CONFIG_APPLICOM is not set 803# CONFIG_APPLICOM is not set
775# CONFIG_RAW_DRIVER is not set 804# CONFIG_RAW_DRIVER is not set
@@ -787,9 +816,11 @@ CONFIG_I2C_BOARDINFO=y
787# CONFIG_I2C_ALI15X3 is not set 816# CONFIG_I2C_ALI15X3 is not set
788# CONFIG_I2C_AMD756 is not set 817# CONFIG_I2C_AMD756 is not set
789# CONFIG_I2C_AMD8111 is not set 818# CONFIG_I2C_AMD8111 is not set
819# CONFIG_I2C_HYDRA is not set
790# CONFIG_I2C_I801 is not set 820# CONFIG_I2C_I801 is not set
791# CONFIG_I2C_I810 is not set 821# CONFIG_I2C_I810 is not set
792# CONFIG_I2C_PIIX4 is not set 822# CONFIG_I2C_PIIX4 is not set
823CONFIG_I2C_POWERMAC=y
793CONFIG_I2C_MPC=y 824CONFIG_I2C_MPC=y
794# CONFIG_I2C_NFORCE2 is not set 825# CONFIG_I2C_NFORCE2 is not set
795# CONFIG_I2C_OCORES is not set 826# CONFIG_I2C_OCORES is not set
@@ -826,6 +857,7 @@ CONFIG_I2C_MPC=y
826# CONFIG_POWER_SUPPLY is not set 857# CONFIG_POWER_SUPPLY is not set
827# CONFIG_HWMON is not set 858# CONFIG_HWMON is not set
828# CONFIG_THERMAL is not set 859# CONFIG_THERMAL is not set
860# CONFIG_THERMAL_HWMON is not set
829# CONFIG_WATCHDOG is not set 861# CONFIG_WATCHDOG is not set
830 862
831# 863#
@@ -888,6 +920,9 @@ CONFIG_FB_CFB_IMAGEBLIT=y
888# CONFIG_FB_PM2 is not set 920# CONFIG_FB_PM2 is not set
889# CONFIG_FB_CYBER2000 is not set 921# CONFIG_FB_CYBER2000 is not set
890# CONFIG_FB_OF is not set 922# CONFIG_FB_OF is not set
923# CONFIG_FB_CONTROL is not set
924# CONFIG_FB_PLATINUM is not set
925# CONFIG_FB_VALKYRIE is not set
891# CONFIG_FB_CT65550 is not set 926# CONFIG_FB_CT65550 is not set
892# CONFIG_FB_ASILIANT is not set 927# CONFIG_FB_ASILIANT is not set
893# CONFIG_FB_IMSTT is not set 928# CONFIG_FB_IMSTT is not set
@@ -1027,12 +1062,19 @@ CONFIG_SND_VERBOSE_PROCFS=y
1027# 1062#
1028# ALSA PowerMac devices 1063# ALSA PowerMac devices
1029# 1064#
1065# CONFIG_SND_POWERMAC is not set
1030 1066
1031# 1067#
1032# ALSA PowerPC devices 1068# ALSA PowerPC devices
1033# 1069#
1034 1070
1035# 1071#
1072# Apple Onboard Audio driver
1073#
1074# CONFIG_SND_AOA is not set
1075# CONFIG_SND_AOA_SOUNDBUS is not set
1076
1077#
1036# System on Chip audio support 1078# System on Chip audio support
1037# 1079#
1038CONFIG_SND_SOC=y 1080CONFIG_SND_SOC=y
@@ -1075,7 +1117,57 @@ CONFIG_USB_ARCH_HAS_EHCI=y
1075# CONFIG_ACCESSIBILITY is not set 1117# CONFIG_ACCESSIBILITY is not set
1076# CONFIG_INFINIBAND is not set 1118# CONFIG_INFINIBAND is not set
1077# CONFIG_EDAC is not set 1119# CONFIG_EDAC is not set
1078# CONFIG_RTC_CLASS is not set 1120CONFIG_RTC_LIB=y
1121CONFIG_RTC_CLASS=y
1122CONFIG_RTC_HCTOSYS=y
1123CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1124# CONFIG_RTC_DEBUG is not set
1125
1126#
1127# RTC interfaces
1128#
1129CONFIG_RTC_INTF_SYSFS=y
1130CONFIG_RTC_INTF_PROC=y
1131CONFIG_RTC_INTF_DEV=y
1132# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1133# CONFIG_RTC_DRV_TEST is not set
1134
1135#
1136# I2C RTC drivers
1137#
1138# CONFIG_RTC_DRV_DS1307 is not set
1139# CONFIG_RTC_DRV_DS1374 is not set
1140# CONFIG_RTC_DRV_DS1672 is not set
1141# CONFIG_RTC_DRV_MAX6900 is not set
1142# CONFIG_RTC_DRV_RS5C372 is not set
1143# CONFIG_RTC_DRV_ISL1208 is not set
1144# CONFIG_RTC_DRV_X1205 is not set
1145# CONFIG_RTC_DRV_PCF8563 is not set
1146# CONFIG_RTC_DRV_PCF8583 is not set
1147# CONFIG_RTC_DRV_M41T80 is not set
1148# CONFIG_RTC_DRV_S35390A is not set
1149# CONFIG_RTC_DRV_FM3130 is not set
1150
1151#
1152# SPI RTC drivers
1153#
1154
1155#
1156# Platform RTC drivers
1157#
1158CONFIG_RTC_DRV_CMOS=y
1159# CONFIG_RTC_DRV_DS1511 is not set
1160# CONFIG_RTC_DRV_DS1553 is not set
1161# CONFIG_RTC_DRV_DS1742 is not set
1162# CONFIG_RTC_DRV_STK17TA8 is not set
1163# CONFIG_RTC_DRV_M48T86 is not set
1164# CONFIG_RTC_DRV_M48T59 is not set
1165# CONFIG_RTC_DRV_V3020 is not set
1166
1167#
1168# on-CPU RTC drivers
1169#
1170# CONFIG_RTC_DRV_PPC is not set
1079# CONFIG_DMADEVICES is not set 1171# CONFIG_DMADEVICES is not set
1080# CONFIG_UIO is not set 1172# CONFIG_UIO is not set
1081 1173
@@ -1295,8 +1387,11 @@ CONFIG_DEBUG_INFO=y
1295# CONFIG_DEBUG_STACK_USAGE is not set 1387# CONFIG_DEBUG_STACK_USAGE is not set
1296# CONFIG_DEBUG_PAGEALLOC is not set 1388# CONFIG_DEBUG_PAGEALLOC is not set
1297# CONFIG_DEBUGGER is not set 1389# CONFIG_DEBUGGER is not set
1390# CONFIG_CODE_PATCHING_SELFTEST is not set
1391# CONFIG_FTR_FIXUP_SELFTEST is not set
1298# CONFIG_IRQSTACKS is not set 1392# CONFIG_IRQSTACKS is not set
1299# CONFIG_BDI_SWITCH is not set 1393# CONFIG_BDI_SWITCH is not set
1394# CONFIG_BOOTX_TEXT is not set
1300# CONFIG_PPC_EARLY_DEBUG is not set 1395# CONFIG_PPC_EARLY_DEBUG is not set
1301 1396
1302# 1397#
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig
index 4a8171507391..867b8c0215f3 100644
--- a/arch/powerpc/configs/mpc8641_hpcn_defconfig
+++ b/arch/powerpc/configs/mpc8641_hpcn_defconfig
@@ -991,10 +991,12 @@ CONFIG_SND=y
991CONFIG_SND_TIMER=y 991CONFIG_SND_TIMER=y
992CONFIG_SND_PCM=y 992CONFIG_SND_PCM=y
993# CONFIG_SND_SEQUENCER is not set 993# CONFIG_SND_SEQUENCER is not set
994# CONFIG_SND_MIXER_OSS is not set 994CONFIG_SND_OSSEMUL=y
995# CONFIG_SND_PCM_OSS is not set 995CONFIG_SND_MIXER_OSS=y
996CONFIG_SND_PCM_OSS=y
997CONFIG_SND_PCM_OSS_PLUGINS=y
996# CONFIG_SND_DYNAMIC_MINORS is not set 998# CONFIG_SND_DYNAMIC_MINORS is not set
997CONFIG_SND_SUPPORT_OLD_API=y 999# CONFIG_SND_SUPPORT_OLD_API is not set
998CONFIG_SND_VERBOSE_PROCFS=y 1000CONFIG_SND_VERBOSE_PROCFS=y
999# CONFIG_SND_VERBOSE_PRINTK is not set 1001# CONFIG_SND_VERBOSE_PRINTK is not set
1000# CONFIG_SND_DEBUG is not set 1002# CONFIG_SND_DEBUG is not set
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
new file mode 100644
index 000000000000..e6e91c85da31
--- /dev/null
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -0,0 +1,3304 @@
1# powerpc
2#
3# Automatically generated make config: don't edit
4# Linux kernel version: 2.6.26-git2
5# Tue Jul 15 23:54:18 2008
6#
7# CONFIG_PPC64 is not set
8
9#
10# Processor support
11#
12CONFIG_6xx=y
13# CONFIG_PPC_85xx is not set
14# CONFIG_PPC_8xx is not set
15# CONFIG_40x is not set
16# CONFIG_44x is not set
17# CONFIG_E200 is not set
18CONFIG_PPC_FPU=y
19CONFIG_FSL_EMB_PERFMON=y
20CONFIG_ALTIVEC=y
21CONFIG_PPC_STD_MMU=y
22CONFIG_PPC_STD_MMU_32=y
23# CONFIG_PPC_MM_SLICES is not set
24# CONFIG_SMP is not set
25CONFIG_PPC32=y
26CONFIG_WORD_SIZE=32
27CONFIG_PPC_MERGE=y
28CONFIG_MMU=y
29CONFIG_GENERIC_CMOS_UPDATE=y
30CONFIG_GENERIC_TIME=y
31CONFIG_GENERIC_TIME_VSYSCALL=y
32CONFIG_GENERIC_CLOCKEVENTS=y
33CONFIG_GENERIC_HARDIRQS=y
34# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
35CONFIG_IRQ_PER_CPU=y
36CONFIG_STACKTRACE_SUPPORT=y
37CONFIG_HAVE_LATENCYTOP_SUPPORT=y
38CONFIG_LOCKDEP_SUPPORT=y
39CONFIG_RWSEM_XCHGADD_ALGORITHM=y
40CONFIG_ARCH_HAS_ILOG2_U32=y
41CONFIG_GENERIC_HWEIGHT=y
42CONFIG_GENERIC_CALIBRATE_DELAY=y
43CONFIG_GENERIC_FIND_NEXT_BIT=y
44CONFIG_GENERIC_GPIO=y
45# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
46CONFIG_PPC=y
47CONFIG_EARLY_PRINTK=y
48CONFIG_GENERIC_NVRAM=y
49CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
50CONFIG_ARCH_MAY_HAVE_PC_FDC=y
51CONFIG_PPC_OF=y
52CONFIG_OF=y
53CONFIG_PPC_UDBG_16550=y
54# CONFIG_GENERIC_TBSYNC is not set
55CONFIG_AUDIT_ARCH=y
56CONFIG_GENERIC_BUG=y
57CONFIG_SYS_SUPPORTS_APM_EMULATION=y
58CONFIG_DEFAULT_UIMAGE=y
59CONFIG_REDBOOT=y
60CONFIG_HIBERNATE_32=y
61CONFIG_ARCH_HIBERNATION_POSSIBLE=y
62CONFIG_ARCH_SUSPEND_POSSIBLE=y
63# CONFIG_PPC_DCR_NATIVE is not set
64# CONFIG_PPC_DCR_MMIO is not set
65CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
66
67#
68# General setup
69#
70CONFIG_EXPERIMENTAL=y
71CONFIG_BROKEN_ON_SMP=y
72CONFIG_INIT_ENV_ARG_LIMIT=32
73CONFIG_LOCALVERSION=""
74# CONFIG_LOCALVERSION_AUTO is not set
75CONFIG_SWAP=y
76CONFIG_SYSVIPC=y
77CONFIG_SYSVIPC_SYSCTL=y
78CONFIG_POSIX_MQUEUE=y
79CONFIG_BSD_PROCESS_ACCT=y
80# CONFIG_BSD_PROCESS_ACCT_V3 is not set
81CONFIG_TASKSTATS=y
82CONFIG_TASK_DELAY_ACCT=y
83CONFIG_TASK_XACCT=y
84CONFIG_TASK_IO_ACCOUNTING=y
85CONFIG_AUDIT=y
86CONFIG_AUDITSYSCALL=y
87CONFIG_AUDIT_TREE=y
88# CONFIG_IKCONFIG is not set
89CONFIG_LOG_BUF_SHIFT=17
90CONFIG_CGROUPS=y
91# CONFIG_CGROUP_DEBUG is not set
92CONFIG_CGROUP_NS=y
93CONFIG_CGROUP_DEVICE=y
94CONFIG_GROUP_SCHED=y
95CONFIG_FAIR_GROUP_SCHED=y
96CONFIG_RT_GROUP_SCHED=y
97# CONFIG_USER_SCHED is not set
98CONFIG_CGROUP_SCHED=y
99CONFIG_CGROUP_CPUACCT=y
100CONFIG_RESOURCE_COUNTERS=y
101# CONFIG_CGROUP_MEM_RES_CTLR is not set
102# CONFIG_SYSFS_DEPRECATED_V2 is not set
103CONFIG_RELAY=y
104CONFIG_NAMESPACES=y
105CONFIG_UTS_NS=y
106CONFIG_IPC_NS=y
107CONFIG_USER_NS=y
108CONFIG_PID_NS=y
109CONFIG_BLK_DEV_INITRD=y
110CONFIG_INITRAMFS_SOURCE=""
111CONFIG_CC_OPTIMIZE_FOR_SIZE=y
112CONFIG_SYSCTL=y
113# CONFIG_EMBEDDED is not set
114CONFIG_SYSCTL_SYSCALL=y
115CONFIG_SYSCTL_SYSCALL_CHECK=y
116CONFIG_KALLSYMS=y
117CONFIG_KALLSYMS_ALL=y
118CONFIG_KALLSYMS_EXTRA_PASS=y
119CONFIG_HOTPLUG=y
120CONFIG_PRINTK=y
121CONFIG_BUG=y
122CONFIG_ELF_CORE=y
123CONFIG_PCSPKR_PLATFORM=y
124# CONFIG_COMPAT_BRK is not set
125CONFIG_BASE_FULL=y
126CONFIG_FUTEX=y
127CONFIG_ANON_INODES=y
128CONFIG_EPOLL=y
129CONFIG_SIGNALFD=y
130CONFIG_TIMERFD=y
131CONFIG_EVENTFD=y
132CONFIG_SHMEM=y
133CONFIG_VM_EVENT_COUNTERS=y
134CONFIG_SLUB_DEBUG=y
135# CONFIG_SLAB is not set
136CONFIG_SLUB=y
137# CONFIG_SLOB is not set
138CONFIG_PROFILING=y
139CONFIG_MARKERS=y
140CONFIG_OPROFILE=m
141CONFIG_HAVE_OPROFILE=y
142CONFIG_KPROBES=y
143CONFIG_KRETPROBES=y
144CONFIG_HAVE_KPROBES=y
145CONFIG_HAVE_KRETPROBES=y
146# CONFIG_HAVE_DMA_ATTRS is not set
147# CONFIG_USE_GENERIC_SMP_HELPERS is not set
148CONFIG_PROC_PAGE_MONITOR=y
149CONFIG_SLABINFO=y
150CONFIG_RT_MUTEXES=y
151# CONFIG_TINY_SHMEM is not set
152CONFIG_BASE_SMALL=0
153CONFIG_MODULES=y
154# CONFIG_MODULE_FORCE_LOAD is not set
155CONFIG_MODULE_UNLOAD=y
156# CONFIG_MODULE_FORCE_UNLOAD is not set
157# CONFIG_MODVERSIONS is not set
158CONFIG_MODULE_SRCVERSION_ALL=y
159CONFIG_KMOD=y
160CONFIG_BLOCK=y
161CONFIG_LBD=y
162CONFIG_BLK_DEV_IO_TRACE=y
163CONFIG_LSF=y
164CONFIG_BLK_DEV_BSG=y
165CONFIG_BLK_DEV_INTEGRITY=y
166
167#
168# IO Schedulers
169#
170CONFIG_IOSCHED_NOOP=y
171CONFIG_IOSCHED_AS=y
172CONFIG_IOSCHED_DEADLINE=y
173CONFIG_IOSCHED_CFQ=y
174# CONFIG_DEFAULT_AS is not set
175# CONFIG_DEFAULT_DEADLINE is not set
176CONFIG_DEFAULT_CFQ=y
177# CONFIG_DEFAULT_NOOP is not set
178CONFIG_DEFAULT_IOSCHED="cfq"
179CONFIG_CLASSIC_RCU=y
180
181#
182# Platform support
183#
184CONFIG_PPC_MULTIPLATFORM=y
185CONFIG_CLASSIC32=y
186CONFIG_PPC_CHRP=y
187# CONFIG_MPC5121_ADS is not set
188# CONFIG_MPC5121_GENERIC is not set
189CONFIG_PPC_MPC52xx=y
190# CONFIG_PPC_MPC5200_SIMPLE is not set
191CONFIG_PPC_EFIKA=y
192# CONFIG_PPC_LITE5200 is not set
193CONFIG_PPC_MPC5200_BUGFIX=y
194CONFIG_PPC_MPC5200_GPIO=y
195CONFIG_PPC_PMAC=y
196# CONFIG_PPC_CELL is not set
197# CONFIG_PPC_CELL_NATIVE is not set
198CONFIG_PPC_82xx=y
199CONFIG_MPC8272_ADS=y
200CONFIG_PQ2FADS=y
201CONFIG_EP8248E=y
202CONFIG_PQ2ADS=y
203CONFIG_8260=y
204CONFIG_8272=y
205CONFIG_PQ2_ADS_PCI_PIC=y
206CONFIG_PPC_83xx=y
207CONFIG_MPC831x_RDB=y
208CONFIG_MPC832x_MDS=y
209CONFIG_MPC832x_RDB=y
210CONFIG_MPC834x_MDS=y
211CONFIG_MPC834x_ITX=y
212CONFIG_MPC836x_MDS=y
213CONFIG_MPC836x_RDK=y
214CONFIG_MPC837x_MDS=y
215CONFIG_MPC837x_RDB=y
216CONFIG_SBC834x=y
217CONFIG_ASP834x=y
218CONFIG_PPC_MPC831x=y
219CONFIG_PPC_MPC832x=y
220CONFIG_PPC_MPC834x=y
221CONFIG_PPC_MPC837x=y
222CONFIG_PPC_86xx=y
223CONFIG_MPC8641_HPCN=y
224CONFIG_SBC8641D=y
225CONFIG_MPC8610_HPCD=y
226CONFIG_MPC8641=y
227CONFIG_MPC8610=y
228# CONFIG_EMBEDDED6xx is not set
229CONFIG_PPC_NATIVE=y
230# CONFIG_UDBG_RTAS_CONSOLE is not set
231CONFIG_IPIC=y
232CONFIG_MPIC=y
233# CONFIG_MPIC_WEIRD is not set
234CONFIG_PPC_I8259=y
235CONFIG_PPC_RTAS=y
236# CONFIG_RTAS_ERROR_LOGGING is not set
237CONFIG_RTAS_PROC=y
238# CONFIG_MMIO_NVRAM is not set
239CONFIG_PPC_MPC106=y
240# CONFIG_PPC_970_NAP is not set
241# CONFIG_PPC_INDIRECT_IO is not set
242# CONFIG_GENERIC_IOMAP is not set
243CONFIG_CPU_FREQ=y
244CONFIG_CPU_FREQ_TABLE=y
245CONFIG_CPU_FREQ_DEBUG=y
246CONFIG_CPU_FREQ_STAT=m
247CONFIG_CPU_FREQ_STAT_DETAILS=y
248# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
249# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
250CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
251# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
252# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
253CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
254CONFIG_CPU_FREQ_GOV_POWERSAVE=m
255CONFIG_CPU_FREQ_GOV_USERSPACE=y
256CONFIG_CPU_FREQ_GOV_ONDEMAND=m
257CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
258
259#
260# CPU Frequency drivers
261#
262CONFIG_CPU_FREQ_PMAC=y
263# CONFIG_PPC601_SYNC_FIX is not set
264CONFIG_TAU=y
265# CONFIG_TAU_INT is not set
266CONFIG_TAU_AVERAGE=y
267CONFIG_QUICC_ENGINE=y
268CONFIG_CPM2=y
269CONFIG_PPC_CPM_NEW_BINDING=y
270CONFIG_FSL_ULI1575=y
271CONFIG_CPM=y
272CONFIG_PPC_BESTCOMM=y
273CONFIG_PPC_BESTCOMM_ATA=m
274CONFIG_PPC_BESTCOMM_FEC=m
275CONFIG_PPC_BESTCOMM_GEN_BD=m
276
277#
278# Kernel options
279#
280CONFIG_HIGHMEM=y
281CONFIG_TICK_ONESHOT=y
282CONFIG_NO_HZ=y
283CONFIG_HIGH_RES_TIMERS=y
284CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
285# CONFIG_HZ_100 is not set
286# CONFIG_HZ_250 is not set
287# CONFIG_HZ_300 is not set
288CONFIG_HZ_1000=y
289CONFIG_HZ=1000
290# CONFIG_SCHED_HRTICK is not set
291# CONFIG_PREEMPT_NONE is not set
292CONFIG_PREEMPT_VOLUNTARY=y
293# CONFIG_PREEMPT is not set
294CONFIG_BINFMT_ELF=y
295CONFIG_BINFMT_MISC=y
296# CONFIG_MATH_EMULATION is not set
297# CONFIG_IOMMU_HELPER is not set
298CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
299CONFIG_ARCH_HAS_WALK_MEMORY=y
300CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
301# CONFIG_KEXEC is not set
302CONFIG_ARCH_FLATMEM_ENABLE=y
303CONFIG_ARCH_POPULATES_NODE_MAP=y
304CONFIG_SELECT_MEMORY_MODEL=y
305CONFIG_FLATMEM_MANUAL=y
306# CONFIG_DISCONTIGMEM_MANUAL is not set
307# CONFIG_SPARSEMEM_MANUAL is not set
308CONFIG_FLATMEM=y
309CONFIG_FLAT_NODE_MEM_MAP=y
310# CONFIG_SPARSEMEM_STATIC is not set
311# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
312CONFIG_PAGEFLAGS_EXTENDED=y
313CONFIG_SPLIT_PTLOCK_CPUS=4
314CONFIG_RESOURCES_64BIT=y
315CONFIG_ZONE_DMA_FLAG=1
316CONFIG_BOUNCE=y
317CONFIG_VIRT_TO_BUS=y
318CONFIG_FORCE_MAX_ZONEORDER=11
319CONFIG_PROC_DEVICETREE=y
320# CONFIG_CMDLINE_BOOL is not set
321CONFIG_EXTRA_TARGETS=""
322CONFIG_ARCH_WANTS_FREEZER_CONTROL=y
323CONFIG_PM=y
324CONFIG_PM_DEBUG=y
325# CONFIG_PM_VERBOSE is not set
326CONFIG_CAN_PM_TRACE=y
327CONFIG_PM_SLEEP=y
328CONFIG_SUSPEND=y
329CONFIG_SUSPEND_FREEZER=y
330CONFIG_HIBERNATION=y
331CONFIG_PM_STD_PARTITION=""
332CONFIG_APM_EMULATION=y
333CONFIG_SECCOMP=y
334CONFIG_ISA_DMA_API=y
335
336#
337# Bus options
338#
339CONFIG_ISA=y
340CONFIG_ZONE_DMA=y
341CONFIG_GENERIC_ISA_DMA=y
342CONFIG_PPC_INDIRECT_PCI=y
343CONFIG_FSL_SOC=y
344CONFIG_FSL_PCI=y
345CONFIG_FSL_LBC=y
346CONFIG_FSL_GTM=y
347CONFIG_PCI=y
348CONFIG_PCI_DOMAINS=y
349CONFIG_PCI_SYSCALL=y
350CONFIG_PCI_8260=y
351CONFIG_PCIEPORTBUS=y
352CONFIG_PCIEAER=y
353CONFIG_PCIEASPM=y
354# CONFIG_PCIEASPM_DEBUG is not set
355CONFIG_ARCH_SUPPORTS_MSI=y
356CONFIG_PCI_MSI=y
357CONFIG_PCI_LEGACY=y
358# CONFIG_PCI_DEBUG is not set
359CONFIG_PCCARD=y
360# CONFIG_PCMCIA_DEBUG is not set
361CONFIG_PCMCIA=y
362CONFIG_PCMCIA_LOAD_CIS=y
363CONFIG_PCMCIA_IOCTL=y
364CONFIG_CARDBUS=y
365
366#
367# PC-card bridges
368#
369CONFIG_YENTA=y
370CONFIG_YENTA_O2=y
371CONFIG_YENTA_RICOH=y
372CONFIG_YENTA_TI=y
373CONFIG_YENTA_ENE_TUNE=y
374CONFIG_YENTA_TOSHIBA=y
375CONFIG_PD6729=m
376CONFIG_I82092=m
377CONFIG_I82365=m
378# CONFIG_TCIC is not set
379CONFIG_PCMCIA_PROBE=y
380CONFIG_PCCARD_NONSTATIC=y
381# CONFIG_HOTPLUG_PCI is not set
382CONFIG_HAS_RAPIDIO=y
383# CONFIG_RAPIDIO is not set
384
385#
386# Advanced setup
387#
388CONFIG_ADVANCED_OPTIONS=y
389# CONFIG_LOWMEM_SIZE_BOOL is not set
390CONFIG_LOWMEM_SIZE=0x30000000
391# CONFIG_PAGE_OFFSET_BOOL is not set
392CONFIG_PAGE_OFFSET=0xc0000000
393# CONFIG_KERNEL_START_BOOL is not set
394CONFIG_KERNEL_START=0xc0000000
395CONFIG_PHYSICAL_START=0x00000000
396# CONFIG_TASK_SIZE_BOOL is not set
397CONFIG_TASK_SIZE=0xc0000000
398
399#
400# Networking
401#
402CONFIG_NET=y
403
404#
405# Networking options
406#
407CONFIG_PACKET=y
408CONFIG_PACKET_MMAP=y
409CONFIG_UNIX=y
410CONFIG_XFRM=y
411CONFIG_XFRM_USER=y
412CONFIG_XFRM_SUB_POLICY=y
413CONFIG_XFRM_MIGRATE=y
414CONFIG_XFRM_STATISTICS=y
415CONFIG_NET_KEY=m
416CONFIG_NET_KEY_MIGRATE=y
417CONFIG_INET=y
418CONFIG_IP_MULTICAST=y
419CONFIG_IP_ADVANCED_ROUTER=y
420CONFIG_ASK_IP_FIB_HASH=y
421# CONFIG_IP_FIB_TRIE is not set
422CONFIG_IP_FIB_HASH=y
423CONFIG_IP_MULTIPLE_TABLES=y
424CONFIG_IP_ROUTE_MULTIPATH=y
425CONFIG_IP_ROUTE_VERBOSE=y
426# CONFIG_IP_PNP is not set
427CONFIG_NET_IPIP=m
428CONFIG_NET_IPGRE=m
429CONFIG_NET_IPGRE_BROADCAST=y
430CONFIG_IP_MROUTE=y
431CONFIG_IP_PIMSM_V1=y
432CONFIG_IP_PIMSM_V2=y
433# CONFIG_ARPD is not set
434CONFIG_SYN_COOKIES=y
435CONFIG_INET_AH=m
436CONFIG_INET_ESP=m
437CONFIG_INET_IPCOMP=m
438CONFIG_INET_XFRM_TUNNEL=m
439CONFIG_INET_TUNNEL=m
440CONFIG_INET_XFRM_MODE_TRANSPORT=m
441CONFIG_INET_XFRM_MODE_TUNNEL=m
442CONFIG_INET_XFRM_MODE_BEET=m
443CONFIG_INET_LRO=y
444CONFIG_INET_DIAG=m
445CONFIG_INET_TCP_DIAG=m
446CONFIG_TCP_CONG_ADVANCED=y
447CONFIG_TCP_CONG_BIC=m
448CONFIG_TCP_CONG_CUBIC=y
449CONFIG_TCP_CONG_WESTWOOD=m
450CONFIG_TCP_CONG_HTCP=m
451CONFIG_TCP_CONG_HSTCP=m
452CONFIG_TCP_CONG_HYBLA=m
453CONFIG_TCP_CONG_VEGAS=m
454CONFIG_TCP_CONG_SCALABLE=m
455CONFIG_TCP_CONG_LP=m
456CONFIG_TCP_CONG_VENO=m
457CONFIG_TCP_CONG_YEAH=m
458CONFIG_TCP_CONG_ILLINOIS=m
459# CONFIG_DEFAULT_BIC is not set
460CONFIG_DEFAULT_CUBIC=y
461# CONFIG_DEFAULT_HTCP is not set
462# CONFIG_DEFAULT_VEGAS is not set
463# CONFIG_DEFAULT_WESTWOOD is not set
464# CONFIG_DEFAULT_RENO is not set
465CONFIG_DEFAULT_TCP_CONG="cubic"
466CONFIG_TCP_MD5SIG=y
467# CONFIG_IP_VS is not set
468CONFIG_IPV6=m
469CONFIG_IPV6_PRIVACY=y
470CONFIG_IPV6_ROUTER_PREF=y
471CONFIG_IPV6_ROUTE_INFO=y
472CONFIG_IPV6_OPTIMISTIC_DAD=y
473CONFIG_INET6_AH=m
474CONFIG_INET6_ESP=m
475CONFIG_INET6_IPCOMP=m
476CONFIG_IPV6_MIP6=m
477CONFIG_INET6_XFRM_TUNNEL=m
478CONFIG_INET6_TUNNEL=m
479CONFIG_INET6_XFRM_MODE_TRANSPORT=m
480CONFIG_INET6_XFRM_MODE_TUNNEL=m
481CONFIG_INET6_XFRM_MODE_BEET=m
482CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
483CONFIG_IPV6_SIT=m
484CONFIG_IPV6_NDISC_NODETYPE=y
485CONFIG_IPV6_TUNNEL=m
486CONFIG_IPV6_MULTIPLE_TABLES=y
487CONFIG_IPV6_SUBTREES=y
488CONFIG_IPV6_MROUTE=y
489CONFIG_IPV6_PIMSM_V2=y
490CONFIG_NETLABEL=y
491CONFIG_NETWORK_SECMARK=y
492CONFIG_NETFILTER=y
493# CONFIG_NETFILTER_DEBUG is not set
494CONFIG_NETFILTER_ADVANCED=y
495CONFIG_BRIDGE_NETFILTER=y
496
497#
498# Core Netfilter Configuration
499#
500CONFIG_NETFILTER_NETLINK=m
501CONFIG_NETFILTER_NETLINK_QUEUE=m
502CONFIG_NETFILTER_NETLINK_LOG=m
503CONFIG_NF_CONNTRACK=m
504CONFIG_NF_CT_ACCT=y
505CONFIG_NF_CONNTRACK_MARK=y
506CONFIG_NF_CONNTRACK_SECMARK=y
507CONFIG_NF_CONNTRACK_EVENTS=y
508CONFIG_NF_CT_PROTO_DCCP=m
509CONFIG_NF_CT_PROTO_GRE=m
510CONFIG_NF_CT_PROTO_SCTP=m
511CONFIG_NF_CT_PROTO_UDPLITE=m
512CONFIG_NF_CONNTRACK_AMANDA=m
513CONFIG_NF_CONNTRACK_FTP=m
514CONFIG_NF_CONNTRACK_H323=m
515CONFIG_NF_CONNTRACK_IRC=m
516CONFIG_NF_CONNTRACK_NETBIOS_NS=m
517CONFIG_NF_CONNTRACK_PPTP=m
518CONFIG_NF_CONNTRACK_SANE=m
519CONFIG_NF_CONNTRACK_SIP=m
520CONFIG_NF_CONNTRACK_TFTP=m
521CONFIG_NF_CT_NETLINK=m
522CONFIG_NETFILTER_XTABLES=m
523CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
524CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
525CONFIG_NETFILTER_XT_TARGET_DSCP=m
526CONFIG_NETFILTER_XT_TARGET_MARK=m
527CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
528CONFIG_NETFILTER_XT_TARGET_NFLOG=m
529CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
530CONFIG_NETFILTER_XT_TARGET_RATEEST=m
531CONFIG_NETFILTER_XT_TARGET_TRACE=m
532CONFIG_NETFILTER_XT_TARGET_SECMARK=m
533CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
534CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
535CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
536CONFIG_NETFILTER_XT_MATCH_COMMENT=m
537CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
538CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
539CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
540CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
541CONFIG_NETFILTER_XT_MATCH_DCCP=m
542CONFIG_NETFILTER_XT_MATCH_DSCP=m
543CONFIG_NETFILTER_XT_MATCH_ESP=m
544CONFIG_NETFILTER_XT_MATCH_HELPER=m
545CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
546CONFIG_NETFILTER_XT_MATCH_LENGTH=m
547CONFIG_NETFILTER_XT_MATCH_LIMIT=m
548CONFIG_NETFILTER_XT_MATCH_MAC=m
549CONFIG_NETFILTER_XT_MATCH_MARK=m
550CONFIG_NETFILTER_XT_MATCH_OWNER=m
551CONFIG_NETFILTER_XT_MATCH_POLICY=m
552CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
553CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
554CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
555CONFIG_NETFILTER_XT_MATCH_QUOTA=m
556CONFIG_NETFILTER_XT_MATCH_RATEEST=m
557CONFIG_NETFILTER_XT_MATCH_REALM=m
558CONFIG_NETFILTER_XT_MATCH_SCTP=m
559CONFIG_NETFILTER_XT_MATCH_STATE=m
560CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
561CONFIG_NETFILTER_XT_MATCH_STRING=m
562CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
563CONFIG_NETFILTER_XT_MATCH_TIME=m
564CONFIG_NETFILTER_XT_MATCH_U32=m
565CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
566
567#
568# IP: Netfilter Configuration
569#
570CONFIG_NF_CONNTRACK_IPV4=m
571# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
572CONFIG_IP_NF_QUEUE=m
573CONFIG_IP_NF_IPTABLES=m
574CONFIG_IP_NF_MATCH_RECENT=m
575CONFIG_IP_NF_MATCH_ECN=m
576CONFIG_IP_NF_MATCH_AH=m
577CONFIG_IP_NF_MATCH_TTL=m
578CONFIG_IP_NF_MATCH_ADDRTYPE=m
579CONFIG_IP_NF_FILTER=m
580CONFIG_IP_NF_TARGET_REJECT=m
581CONFIG_IP_NF_TARGET_LOG=m
582CONFIG_IP_NF_TARGET_ULOG=m
583CONFIG_NF_NAT=m
584CONFIG_NF_NAT_NEEDED=y
585CONFIG_IP_NF_TARGET_MASQUERADE=m
586CONFIG_IP_NF_TARGET_REDIRECT=m
587CONFIG_IP_NF_TARGET_NETMAP=m
588CONFIG_NF_NAT_SNMP_BASIC=m
589CONFIG_NF_NAT_PROTO_DCCP=m
590CONFIG_NF_NAT_PROTO_GRE=m
591CONFIG_NF_NAT_PROTO_UDPLITE=m
592CONFIG_NF_NAT_PROTO_SCTP=m
593CONFIG_NF_NAT_FTP=m
594CONFIG_NF_NAT_IRC=m
595CONFIG_NF_NAT_TFTP=m
596CONFIG_NF_NAT_AMANDA=m
597CONFIG_NF_NAT_PPTP=m
598CONFIG_NF_NAT_H323=m
599CONFIG_NF_NAT_SIP=m
600CONFIG_IP_NF_MANGLE=m
601CONFIG_IP_NF_TARGET_ECN=m
602CONFIG_IP_NF_TARGET_TTL=m
603CONFIG_IP_NF_TARGET_CLUSTERIP=m
604CONFIG_IP_NF_RAW=m
605CONFIG_IP_NF_ARPTABLES=m
606CONFIG_IP_NF_ARPFILTER=m
607CONFIG_IP_NF_ARP_MANGLE=m
608
609#
610# IPv6: Netfilter Configuration
611#
612CONFIG_NF_CONNTRACK_IPV6=m
613CONFIG_IP6_NF_QUEUE=m
614CONFIG_IP6_NF_IPTABLES=m
615CONFIG_IP6_NF_MATCH_RT=m
616CONFIG_IP6_NF_MATCH_OPTS=m
617CONFIG_IP6_NF_MATCH_FRAG=m
618CONFIG_IP6_NF_MATCH_HL=m
619CONFIG_IP6_NF_MATCH_IPV6HEADER=m
620CONFIG_IP6_NF_MATCH_AH=m
621CONFIG_IP6_NF_MATCH_MH=m
622CONFIG_IP6_NF_MATCH_EUI64=m
623CONFIG_IP6_NF_FILTER=m
624CONFIG_IP6_NF_TARGET_LOG=m
625CONFIG_IP6_NF_TARGET_REJECT=m
626CONFIG_IP6_NF_MANGLE=m
627CONFIG_IP6_NF_TARGET_HL=m
628CONFIG_IP6_NF_RAW=m
629
630#
631# DECnet: Netfilter Configuration
632#
633# CONFIG_DECNET_NF_GRABULATOR is not set
634
635#
636# Bridge: Netfilter Configuration
637#
638CONFIG_BRIDGE_NF_EBTABLES=m
639CONFIG_BRIDGE_EBT_BROUTE=m
640CONFIG_BRIDGE_EBT_T_FILTER=m
641CONFIG_BRIDGE_EBT_T_NAT=m
642CONFIG_BRIDGE_EBT_802_3=m
643CONFIG_BRIDGE_EBT_AMONG=m
644CONFIG_BRIDGE_EBT_ARP=m
645CONFIG_BRIDGE_EBT_IP=m
646CONFIG_BRIDGE_EBT_LIMIT=m
647CONFIG_BRIDGE_EBT_MARK=m
648CONFIG_BRIDGE_EBT_PKTTYPE=m
649CONFIG_BRIDGE_EBT_STP=m
650CONFIG_BRIDGE_EBT_VLAN=m
651CONFIG_BRIDGE_EBT_ARPREPLY=m
652CONFIG_BRIDGE_EBT_DNAT=m
653CONFIG_BRIDGE_EBT_MARK_T=m
654CONFIG_BRIDGE_EBT_REDIRECT=m
655CONFIG_BRIDGE_EBT_SNAT=m
656CONFIG_BRIDGE_EBT_LOG=m
657CONFIG_BRIDGE_EBT_ULOG=m
658CONFIG_BRIDGE_EBT_NFLOG=m
659CONFIG_IP_DCCP=m
660CONFIG_INET_DCCP_DIAG=m
661CONFIG_IP_DCCP_ACKVEC=y
662
663#
664# DCCP CCIDs Configuration (EXPERIMENTAL)
665#
666CONFIG_IP_DCCP_CCID2=m
667# CONFIG_IP_DCCP_CCID2_DEBUG is not set
668CONFIG_IP_DCCP_CCID3=m
669# CONFIG_IP_DCCP_CCID3_DEBUG is not set
670CONFIG_IP_DCCP_CCID3_RTO=100
671CONFIG_IP_DCCP_TFRC_LIB=m
672
673#
674# DCCP Kernel Hacking
675#
676# CONFIG_IP_DCCP_DEBUG is not set
677CONFIG_NET_DCCPPROBE=m
678CONFIG_IP_SCTP=m
679# CONFIG_SCTP_DBG_MSG is not set
680# CONFIG_SCTP_DBG_OBJCNT is not set
681# CONFIG_SCTP_HMAC_NONE is not set
682# CONFIG_SCTP_HMAC_SHA1 is not set
683CONFIG_SCTP_HMAC_MD5=y
684CONFIG_TIPC=m
685# CONFIG_TIPC_ADVANCED is not set
686# CONFIG_TIPC_DEBUG is not set
687CONFIG_ATM=m
688CONFIG_ATM_CLIP=m
689# CONFIG_ATM_CLIP_NO_ICMP is not set
690CONFIG_ATM_LANE=m
691# CONFIG_ATM_MPOA is not set
692CONFIG_ATM_BR2684=m
693# CONFIG_ATM_BR2684_IPFILTER is not set
694CONFIG_BRIDGE=m
695CONFIG_VLAN_8021Q=m
696CONFIG_DECNET=m
697CONFIG_DECNET_ROUTER=y
698CONFIG_LLC=m
699# CONFIG_LLC2 is not set
700CONFIG_IPX=m
701# CONFIG_IPX_INTERN is not set
702CONFIG_ATALK=m
703CONFIG_DEV_APPLETALK=m
704# CONFIG_LTPC is not set
705# CONFIG_COPS is not set
706CONFIG_IPDDP=m
707CONFIG_IPDDP_ENCAP=y
708CONFIG_IPDDP_DECAP=y
709# CONFIG_X25 is not set
710# CONFIG_LAPB is not set
711# CONFIG_ECONET is not set
712CONFIG_WAN_ROUTER=m
713CONFIG_NET_SCHED=y
714
715#
716# Queueing/Scheduling
717#
718CONFIG_NET_SCH_CBQ=m
719CONFIG_NET_SCH_HTB=m
720CONFIG_NET_SCH_HFSC=m
721CONFIG_NET_SCH_ATM=m
722CONFIG_NET_SCH_PRIO=m
723CONFIG_NET_SCH_RED=m
724CONFIG_NET_SCH_SFQ=m
725CONFIG_NET_SCH_TEQL=m
726CONFIG_NET_SCH_TBF=m
727CONFIG_NET_SCH_GRED=m
728CONFIG_NET_SCH_DSMARK=m
729CONFIG_NET_SCH_NETEM=m
730CONFIG_NET_SCH_INGRESS=m
731
732#
733# Classification
734#
735CONFIG_NET_CLS=y
736CONFIG_NET_CLS_BASIC=m
737CONFIG_NET_CLS_TCINDEX=m
738CONFIG_NET_CLS_ROUTE4=m
739CONFIG_NET_CLS_ROUTE=y
740CONFIG_NET_CLS_FW=m
741CONFIG_NET_CLS_U32=m
742CONFIG_CLS_U32_PERF=y
743CONFIG_CLS_U32_MARK=y
744CONFIG_NET_CLS_RSVP=m
745CONFIG_NET_CLS_RSVP6=m
746CONFIG_NET_CLS_FLOW=m
747CONFIG_NET_EMATCH=y
748CONFIG_NET_EMATCH_STACK=32
749CONFIG_NET_EMATCH_CMP=m
750CONFIG_NET_EMATCH_NBYTE=m
751CONFIG_NET_EMATCH_U32=m
752CONFIG_NET_EMATCH_META=m
753CONFIG_NET_EMATCH_TEXT=m
754CONFIG_NET_CLS_ACT=y
755CONFIG_NET_ACT_POLICE=m
756CONFIG_NET_ACT_GACT=m
757CONFIG_GACT_PROB=y
758CONFIG_NET_ACT_MIRRED=m
759CONFIG_NET_ACT_IPT=m
760CONFIG_NET_ACT_NAT=m
761CONFIG_NET_ACT_PEDIT=m
762CONFIG_NET_ACT_SIMP=m
763CONFIG_NET_CLS_IND=y
764CONFIG_NET_SCH_FIFO=y
765
766#
767# Network testing
768#
769# CONFIG_NET_PKTGEN is not set
770# CONFIG_NET_TCPPROBE is not set
771# CONFIG_HAMRADIO is not set
772# CONFIG_CAN is not set
773CONFIG_IRDA=m
774
775#
776# IrDA protocols
777#
778CONFIG_IRLAN=m
779CONFIG_IRNET=m
780CONFIG_IRCOMM=m
781# CONFIG_IRDA_ULTRA is not set
782
783#
784# IrDA options
785#
786CONFIG_IRDA_CACHE_LAST_LSAP=y
787CONFIG_IRDA_FAST_RR=y
788# CONFIG_IRDA_DEBUG is not set
789
790#
791# Infrared-port device drivers
792#
793
794#
795# SIR device drivers
796#
797CONFIG_IRTTY_SIR=m
798
799#
800# Dongle support
801#
802# CONFIG_DONGLE is not set
803CONFIG_KINGSUN_DONGLE=m
804CONFIG_KSDAZZLE_DONGLE=m
805CONFIG_KS959_DONGLE=m
806
807#
808# FIR device drivers
809#
810CONFIG_USB_IRDA=m
811CONFIG_SIGMATEL_FIR=m
812CONFIG_NSC_FIR=m
813CONFIG_WINBOND_FIR=m
814CONFIG_TOSHIBA_FIR=m
815CONFIG_SMC_IRCC_FIR=m
816CONFIG_ALI_FIR=m
817CONFIG_VLSI_FIR=m
818CONFIG_VIA_FIR=m
819CONFIG_MCS_FIR=m
820CONFIG_BT=m
821CONFIG_BT_L2CAP=m
822CONFIG_BT_SCO=m
823CONFIG_BT_RFCOMM=m
824CONFIG_BT_RFCOMM_TTY=y
825CONFIG_BT_BNEP=m
826CONFIG_BT_BNEP_MC_FILTER=y
827CONFIG_BT_BNEP_PROTO_FILTER=y
828CONFIG_BT_HIDP=m
829
830#
831# Bluetooth device drivers
832#
833CONFIG_BT_HCIUSB=m
834CONFIG_BT_HCIUSB_SCO=y
835CONFIG_BT_HCIUART=m
836CONFIG_BT_HCIUART_H4=y
837CONFIG_BT_HCIUART_BCSP=y
838CONFIG_BT_HCIUART_LL=y
839CONFIG_BT_HCIBCM203X=m
840CONFIG_BT_HCIBPA10X=m
841CONFIG_BT_HCIBFUSB=m
842CONFIG_BT_HCIDTL1=m
843CONFIG_BT_HCIBT3C=m
844CONFIG_BT_HCIBLUECARD=m
845CONFIG_BT_HCIBTUART=m
846CONFIG_BT_HCIVHCI=m
847# CONFIG_AF_RXRPC is not set
848CONFIG_FIB_RULES=y
849
850#
851# Wireless
852#
853CONFIG_CFG80211=m
854CONFIG_NL80211=y
855CONFIG_WIRELESS_EXT=y
856CONFIG_WIRELESS_EXT_SYSFS=y
857CONFIG_MAC80211=m
858CONFIG_MAC80211_QOS=y
859
860#
861# Rate control algorithm selection
862#
863CONFIG_MAC80211_RC_PID=y
864CONFIG_MAC80211_RC_DEFAULT_PID=y
865CONFIG_MAC80211_RC_DEFAULT="pid"
866CONFIG_MAC80211_MESH=y
867CONFIG_MAC80211_LEDS=y
868CONFIG_MAC80211_DEBUGFS=y
869# CONFIG_MAC80211_DEBUG_MENU is not set
870CONFIG_IEEE80211=m
871CONFIG_IEEE80211_DEBUG=y
872CONFIG_IEEE80211_CRYPT_WEP=m
873CONFIG_IEEE80211_CRYPT_CCMP=m
874CONFIG_IEEE80211_CRYPT_TKIP=m
875# CONFIG_RFKILL is not set
876CONFIG_NET_9P=m
877CONFIG_NET_9P_VIRTIO=m
878# CONFIG_NET_9P_DEBUG is not set
879
880#
881# Device Drivers
882#
883
884#
885# Generic Driver Options
886#
887CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
888CONFIG_STANDALONE=y
889CONFIG_PREVENT_FIRMWARE_BUILD=y
890CONFIG_FW_LOADER=y
891# CONFIG_FIRMWARE_IN_KERNEL is not set
892CONFIG_EXTRA_FIRMWARE=""
893# CONFIG_DEBUG_DRIVER is not set
894CONFIG_DEBUG_DEVRES=y
895# CONFIG_SYS_HYPERVISOR is not set
896CONFIG_CONNECTOR=y
897CONFIG_PROC_EVENTS=y
898# CONFIG_MTD is not set
899CONFIG_OF_DEVICE=y
900CONFIG_OF_GPIO=y
901CONFIG_OF_I2C=y
902CONFIG_PARPORT=m
903CONFIG_PARPORT_PC=m
904CONFIG_PARPORT_SERIAL=m
905# CONFIG_PARPORT_PC_FIFO is not set
906# CONFIG_PARPORT_PC_SUPERIO is not set
907# CONFIG_PARPORT_PC_PCMCIA is not set
908# CONFIG_PARPORT_GSC is not set
909# CONFIG_PARPORT_AX88796 is not set
910CONFIG_PARPORT_1284=y
911CONFIG_PARPORT_NOT_PC=y
912CONFIG_PNP=y
913# CONFIG_PNP_DEBUG is not set
914
915#
916# Protocols
917#
918CONFIG_ISAPNP=y
919# CONFIG_PNPACPI is not set
920CONFIG_BLK_DEV=y
921# CONFIG_BLK_DEV_FD is not set
922CONFIG_MAC_FLOPPY=m
923# CONFIG_BLK_DEV_XD is not set
924# CONFIG_PARIDE is not set
925# CONFIG_BLK_CPQ_DA is not set
926# CONFIG_BLK_CPQ_CISS_DA is not set
927# CONFIG_BLK_DEV_DAC960 is not set
928# CONFIG_BLK_DEV_UMEM is not set
929# CONFIG_BLK_DEV_COW_COMMON is not set
930CONFIG_BLK_DEV_LOOP=m
931CONFIG_BLK_DEV_CRYPTOLOOP=m
932CONFIG_BLK_DEV_NBD=m
933# CONFIG_BLK_DEV_SX8 is not set
934# CONFIG_BLK_DEV_UB is not set
935CONFIG_BLK_DEV_RAM=y
936CONFIG_BLK_DEV_RAM_COUNT=16
937CONFIG_BLK_DEV_RAM_SIZE=16384
938# CONFIG_BLK_DEV_XIP is not set
939CONFIG_CDROM_PKTCDVD=m
940CONFIG_CDROM_PKTCDVD_BUFFERS=8
941# CONFIG_CDROM_PKTCDVD_WCACHE is not set
942# CONFIG_ATA_OVER_ETH is not set
943CONFIG_VIRTIO_BLK=m
944CONFIG_MISC_DEVICES=y
945# CONFIG_PHANTOM is not set
946CONFIG_EEPROM_93CX6=m
947# CONFIG_SGI_IOC4 is not set
948# CONFIG_TIFM_CORE is not set
949CONFIG_ENCLOSURE_SERVICES=m
950CONFIG_HAVE_IDE=y
951CONFIG_IDE=y
952CONFIG_BLK_DEV_IDE=y
953
954#
955# Please see Documentation/ide/ide.txt for help/info on IDE drives
956#
957CONFIG_IDE_ATAPI=y
958# CONFIG_BLK_DEV_IDE_SATA is not set
959CONFIG_BLK_DEV_IDEDISK=y
960CONFIG_IDEDISK_MULTI_MODE=y
961# CONFIG_BLK_DEV_IDECS is not set
962# CONFIG_BLK_DEV_DELKIN is not set
963CONFIG_BLK_DEV_IDECD=m
964CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
965# CONFIG_BLK_DEV_IDETAPE is not set
966CONFIG_BLK_DEV_IDEFLOPPY=m
967# CONFIG_BLK_DEV_IDESCSI is not set
968CONFIG_IDE_TASK_IOCTL=y
969CONFIG_IDE_PROC_FS=y
970
971#
972# IDE chipset support/bugfixes
973#
974# CONFIG_IDE_GENERIC is not set
975# CONFIG_BLK_DEV_PLATFORM is not set
976# CONFIG_BLK_DEV_IDEPNP is not set
977CONFIG_BLK_DEV_IDEDMA_SFF=y
978
979#
980# PCI IDE chipsets support
981#
982CONFIG_BLK_DEV_IDEPCI=y
983# CONFIG_IDEPCI_PCIBUS_ORDER is not set
984# CONFIG_BLK_DEV_OFFBOARD is not set
985CONFIG_BLK_DEV_GENERIC=y
986# CONFIG_BLK_DEV_OPTI621 is not set
987CONFIG_BLK_DEV_IDEDMA_PCI=y
988# CONFIG_BLK_DEV_AEC62XX is not set
989# CONFIG_BLK_DEV_ALI15X3 is not set
990# CONFIG_BLK_DEV_AMD74XX is not set
991# CONFIG_BLK_DEV_CMD64X is not set
992# CONFIG_BLK_DEV_TRIFLEX is not set
993# CONFIG_BLK_DEV_CY82C693 is not set
994# CONFIG_BLK_DEV_CS5520 is not set
995# CONFIG_BLK_DEV_CS5530 is not set
996# CONFIG_BLK_DEV_HPT34X is not set
997# CONFIG_BLK_DEV_HPT366 is not set
998# CONFIG_BLK_DEV_JMICRON is not set
999# CONFIG_BLK_DEV_SC1200 is not set
1000# CONFIG_BLK_DEV_PIIX is not set
1001# CONFIG_BLK_DEV_IT8213 is not set
1002# CONFIG_BLK_DEV_IT821X is not set
1003# CONFIG_BLK_DEV_NS87415 is not set
1004# CONFIG_BLK_DEV_PDC202XX_OLD is not set
1005# CONFIG_BLK_DEV_PDC202XX_NEW is not set
1006# CONFIG_BLK_DEV_SVWKS is not set
1007# CONFIG_BLK_DEV_SIIMAGE is not set
1008# CONFIG_BLK_DEV_SL82C105 is not set
1009# CONFIG_BLK_DEV_SLC90E66 is not set
1010# CONFIG_BLK_DEV_TRM290 is not set
1011# CONFIG_BLK_DEV_VIA82CXXX is not set
1012# CONFIG_BLK_DEV_TC86C001 is not set
1013CONFIG_BLK_DEV_IDE_PMAC=y
1014CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
1015CONFIG_BLK_DEV_IDEDMA_PMAC=y
1016CONFIG_BLK_DEV_IDEDMA=y
1017CONFIG_BLK_DEV_HD_ONLY=y
1018CONFIG_BLK_DEV_HD=y
1019
1020#
1021# SCSI device support
1022#
1023CONFIG_RAID_ATTRS=m
1024CONFIG_SCSI=y
1025CONFIG_SCSI_DMA=y
1026CONFIG_SCSI_TGT=m
1027# CONFIG_SCSI_NETLINK is not set
1028CONFIG_SCSI_PROC_FS=y
1029
1030#
1031# SCSI support type (disk, tape, CD-ROM)
1032#
1033CONFIG_BLK_DEV_SD=y
1034CONFIG_CHR_DEV_ST=m
1035CONFIG_CHR_DEV_OSST=m
1036CONFIG_BLK_DEV_SR=m
1037CONFIG_BLK_DEV_SR_VENDOR=y
1038CONFIG_CHR_DEV_SG=y
1039CONFIG_CHR_DEV_SCH=m
1040CONFIG_SCSI_ENCLOSURE=m
1041
1042#
1043# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
1044#
1045CONFIG_SCSI_MULTI_LUN=y
1046CONFIG_SCSI_CONSTANTS=y
1047CONFIG_SCSI_LOGGING=y
1048CONFIG_SCSI_SCAN_ASYNC=y
1049CONFIG_SCSI_WAIT_SCAN=m
1050
1051#
1052# SCSI Transports
1053#
1054CONFIG_SCSI_SPI_ATTRS=m
1055# CONFIG_SCSI_FC_ATTRS is not set
1056# CONFIG_SCSI_ISCSI_ATTRS is not set
1057# CONFIG_SCSI_SAS_ATTRS is not set
1058# CONFIG_SCSI_SAS_LIBSAS is not set
1059CONFIG_SCSI_SRP_ATTRS=m
1060CONFIG_SCSI_SRP_TGT_ATTRS=y
1061CONFIG_SCSI_LOWLEVEL=y
1062# CONFIG_ISCSI_TCP is not set
1063# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
1064# CONFIG_SCSI_3W_9XXX is not set
1065# CONFIG_SCSI_7000FASST is not set
1066# CONFIG_SCSI_ACARD is not set
1067# CONFIG_SCSI_AHA152X is not set
1068# CONFIG_SCSI_AHA1542 is not set
1069# CONFIG_SCSI_AACRAID is not set
1070# CONFIG_SCSI_AIC7XXX is not set
1071# CONFIG_SCSI_AIC7XXX_OLD is not set
1072# CONFIG_SCSI_AIC79XX is not set
1073# CONFIG_SCSI_AIC94XX is not set
1074# CONFIG_SCSI_DPT_I2O is not set
1075# CONFIG_SCSI_ADVANSYS is not set
1076# CONFIG_SCSI_IN2000 is not set
1077# CONFIG_SCSI_ARCMSR is not set
1078# CONFIG_MEGARAID_NEWGEN is not set
1079# CONFIG_MEGARAID_LEGACY is not set
1080# CONFIG_MEGARAID_SAS is not set
1081# CONFIG_SCSI_HPTIOP is not set
1082# CONFIG_SCSI_BUSLOGIC is not set
1083# CONFIG_SCSI_DMX3191D is not set
1084# CONFIG_SCSI_DTC3280 is not set
1085# CONFIG_SCSI_EATA is not set
1086# CONFIG_SCSI_FUTURE_DOMAIN is not set
1087# CONFIG_SCSI_GDTH is not set
1088# CONFIG_SCSI_GENERIC_NCR5380 is not set
1089# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
1090# CONFIG_SCSI_IPS is not set
1091# CONFIG_SCSI_INITIO is not set
1092# CONFIG_SCSI_INIA100 is not set
1093# CONFIG_SCSI_PPA is not set
1094# CONFIG_SCSI_IMM is not set
1095# CONFIG_SCSI_MVSAS is not set
1096# CONFIG_SCSI_NCR53C406A is not set
1097# CONFIG_SCSI_STEX is not set
1098# CONFIG_SCSI_SYM53C8XX_2 is not set
1099# CONFIG_SCSI_IPR is not set
1100# CONFIG_SCSI_PAS16 is not set
1101# CONFIG_SCSI_QLOGIC_FAS is not set
1102# CONFIG_SCSI_QLOGIC_1280 is not set
1103# CONFIG_SCSI_QLA_FC is not set
1104# CONFIG_SCSI_QLA_ISCSI is not set
1105# CONFIG_SCSI_LPFC is not set
1106# CONFIG_SCSI_SYM53C416 is not set
1107# CONFIG_SCSI_DC395x is not set
1108# CONFIG_SCSI_DC390T is not set
1109# CONFIG_SCSI_T128 is not set
1110# CONFIG_SCSI_U14_34F is not set
1111# CONFIG_SCSI_NSP32 is not set
1112# CONFIG_SCSI_DEBUG is not set
1113CONFIG_SCSI_MESH=m
1114CONFIG_SCSI_MESH_SYNC_RATE=5
1115CONFIG_SCSI_MESH_RESET_DELAY_MS=4000
1116CONFIG_SCSI_MAC53C94=m
1117CONFIG_SCSI_SRP=m
1118CONFIG_SCSI_LOWLEVEL_PCMCIA=y
1119# CONFIG_PCMCIA_AHA152X is not set
1120# CONFIG_PCMCIA_FDOMAIN is not set
1121# CONFIG_PCMCIA_NINJA_SCSI is not set
1122# CONFIG_PCMCIA_QLOGIC is not set
1123# CONFIG_PCMCIA_SYM53C500 is not set
1124CONFIG_SCSI_DH=y
1125CONFIG_SCSI_DH_RDAC=m
1126CONFIG_SCSI_DH_HP_SW=m
1127CONFIG_SCSI_DH_EMC=m
1128CONFIG_ATA=y
1129# CONFIG_ATA_NONSTANDARD is not set
1130# CONFIG_SATA_PMP is not set
1131# CONFIG_SATA_AHCI is not set
1132# CONFIG_SATA_SIL24 is not set
1133CONFIG_SATA_FSL=m
1134CONFIG_ATA_SFF=y
1135# CONFIG_SATA_SVW is not set
1136CONFIG_ATA_PIIX=m
1137# CONFIG_SATA_MV is not set
1138# CONFIG_SATA_NV is not set
1139CONFIG_PDC_ADMA=m
1140# CONFIG_SATA_QSTOR is not set
1141# CONFIG_SATA_PROMISE is not set
1142# CONFIG_SATA_SX4 is not set
1143# CONFIG_SATA_SIL is not set
1144# CONFIG_SATA_SIS is not set
1145# CONFIG_SATA_ULI is not set
1146# CONFIG_SATA_VIA is not set
1147# CONFIG_SATA_VITESSE is not set
1148# CONFIG_SATA_INIC162X is not set
1149# CONFIG_PATA_ALI is not set
1150# CONFIG_PATA_AMD is not set
1151# CONFIG_PATA_ARTOP is not set
1152# CONFIG_PATA_ATIIXP is not set
1153# CONFIG_PATA_CMD640_PCI is not set
1154# CONFIG_PATA_CMD64X is not set
1155# CONFIG_PATA_CS5520 is not set
1156# CONFIG_PATA_CS5530 is not set
1157# CONFIG_PATA_CYPRESS is not set
1158# CONFIG_PATA_EFAR is not set
1159CONFIG_ATA_GENERIC=m
1160# CONFIG_PATA_HPT366 is not set
1161# CONFIG_PATA_HPT37X is not set
1162# CONFIG_PATA_HPT3X2N is not set
1163# CONFIG_PATA_HPT3X3 is not set
1164# CONFIG_PATA_ISAPNP is not set
1165# CONFIG_PATA_IT821X is not set
1166# CONFIG_PATA_IT8213 is not set
1167# CONFIG_PATA_JMICRON is not set
1168# CONFIG_PATA_LEGACY is not set
1169# CONFIG_PATA_TRIFLEX is not set
1170# CONFIG_PATA_MARVELL is not set
1171CONFIG_PATA_MPC52xx=m
1172# CONFIG_PATA_MPIIX is not set
1173# CONFIG_PATA_OLDPIIX is not set
1174# CONFIG_PATA_NETCELL is not set
1175# CONFIG_PATA_NINJA32 is not set
1176# CONFIG_PATA_NS87410 is not set
1177# CONFIG_PATA_NS87415 is not set
1178# CONFIG_PATA_OPTI is not set
1179CONFIG_PATA_OPTIDMA=m
1180# CONFIG_PATA_PCMCIA is not set
1181# CONFIG_PATA_PDC_OLD is not set
1182# CONFIG_PATA_QDI is not set
1183# CONFIG_PATA_RADISYS is not set
1184# CONFIG_PATA_RZ1000 is not set
1185# CONFIG_PATA_SC1200 is not set
1186# CONFIG_PATA_SERVERWORKS is not set
1187# CONFIG_PATA_PDC2027X is not set
1188# CONFIG_PATA_SIL680 is not set
1189# CONFIG_PATA_SIS is not set
1190CONFIG_PATA_VIA=m
1191# CONFIG_PATA_WINBOND is not set
1192# CONFIG_PATA_WINBOND_VLB is not set
1193CONFIG_PATA_PLATFORM=m
1194CONFIG_PATA_OF_PLATFORM=m
1195CONFIG_PATA_SCH=m
1196CONFIG_MD=y
1197CONFIG_BLK_DEV_MD=y
1198CONFIG_MD_LINEAR=m
1199CONFIG_MD_RAID0=m
1200CONFIG_MD_RAID1=m
1201CONFIG_MD_RAID10=m
1202CONFIG_MD_RAID456=m
1203CONFIG_MD_RAID5_RESHAPE=y
1204CONFIG_MD_MULTIPATH=m
1205CONFIG_MD_FAULTY=m
1206CONFIG_BLK_DEV_DM=m
1207CONFIG_DM_DEBUG=y
1208CONFIG_DM_CRYPT=m
1209CONFIG_DM_SNAPSHOT=m
1210CONFIG_DM_MIRROR=m
1211CONFIG_DM_ZERO=m
1212CONFIG_DM_MULTIPATH=m
1213# CONFIG_DM_DELAY is not set
1214CONFIG_DM_UEVENT=y
1215# CONFIG_FUSION is not set
1216
1217#
1218# IEEE 1394 (FireWire) support
1219#
1220
1221#
1222# Enable only one of the two stacks, unless you know what you are doing
1223#
1224CONFIG_FIREWIRE=m
1225CONFIG_FIREWIRE_OHCI=m
1226CONFIG_FIREWIRE_OHCI_DEBUG=y
1227CONFIG_FIREWIRE_SBP2=m
1228# CONFIG_IEEE1394 is not set
1229# CONFIG_I2O is not set
1230CONFIG_MACINTOSH_DRIVERS=y
1231CONFIG_ADB=y
1232CONFIG_ADB_CUDA=y
1233CONFIG_ADB_PMU=y
1234CONFIG_ADB_PMU_LED=y
1235CONFIG_ADB_PMU_LED_IDE=y
1236CONFIG_PMAC_APM_EMU=y
1237CONFIG_PMAC_MEDIABAY=y
1238CONFIG_PMAC_BACKLIGHT=y
1239# CONFIG_PMAC_BACKLIGHT_LEGACY is not set
1240CONFIG_ADB_MACIO=y
1241CONFIG_INPUT_ADBHID=y
1242CONFIG_MAC_EMUMOUSEBTN=y
1243CONFIG_THERM_WINDTUNNEL=m
1244CONFIG_THERM_ADT746X=m
1245CONFIG_WINDFARM=y
1246# CONFIG_ANSLCD is not set
1247CONFIG_PMAC_RACKMETER=m
1248CONFIG_NETDEVICES=y
1249CONFIG_NETDEVICES_MULTIQUEUE=y
1250CONFIG_IFB=m
1251CONFIG_DUMMY=m
1252CONFIG_BONDING=m
1253CONFIG_MACVLAN=m
1254CONFIG_EQUALIZER=m
1255CONFIG_TUN=m
1256CONFIG_VETH=m
1257CONFIG_NET_SB1000=m
1258# CONFIG_ARCNET is not set
1259CONFIG_PHYLIB=m
1260
1261#
1262# MII PHY device drivers
1263#
1264CONFIG_MARVELL_PHY=m
1265CONFIG_DAVICOM_PHY=m
1266CONFIG_QSEMI_PHY=m
1267CONFIG_LXT_PHY=m
1268CONFIG_CICADA_PHY=m
1269CONFIG_VITESSE_PHY=m
1270CONFIG_SMSC_PHY=m
1271CONFIG_BROADCOM_PHY=m
1272CONFIG_ICPLUS_PHY=m
1273CONFIG_REALTEK_PHY=m
1274CONFIG_MDIO_BITBANG=y
1275CONFIG_NET_ETHERNET=y
1276CONFIG_MII=m
1277CONFIG_MACE=m
1278# CONFIG_MACE_AAUI_PORT is not set
1279CONFIG_BMAC=m
1280CONFIG_HAPPYMEAL=m
1281CONFIG_SUNGEM=m
1282CONFIG_CASSINI=m
1283CONFIG_NET_VENDOR_3COM=y
1284# CONFIG_EL1 is not set
1285# CONFIG_EL2 is not set
1286# CONFIG_ELPLUS is not set
1287# CONFIG_EL16 is not set
1288CONFIG_EL3=m
1289# CONFIG_3C515 is not set
1290CONFIG_VORTEX=m
1291CONFIG_TYPHOON=m
1292# CONFIG_LANCE is not set
1293CONFIG_NET_VENDOR_SMC=y
1294# CONFIG_WD80x3 is not set
1295CONFIG_ULTRA=m
1296# CONFIG_SMC9194 is not set
1297# CONFIG_NET_VENDOR_RACAL is not set
1298CONFIG_NET_TULIP=y
1299CONFIG_DE2104X=m
1300CONFIG_TULIP=m
1301# CONFIG_TULIP_MWI is not set
1302CONFIG_TULIP_MMIO=y
1303# CONFIG_TULIP_NAPI is not set
1304CONFIG_DE4X5=m
1305CONFIG_WINBOND_840=m
1306CONFIG_DM9102=m
1307CONFIG_ULI526X=m
1308CONFIG_PCMCIA_XIRCOM=m
1309# CONFIG_AT1700 is not set
1310# CONFIG_DEPCA is not set
1311# CONFIG_HP100 is not set
1312CONFIG_NET_ISA=y
1313# CONFIG_E2100 is not set
1314CONFIG_EWRK3=m
1315# CONFIG_EEXPRESS is not set
1316# CONFIG_EEXPRESS_PRO is not set
1317# CONFIG_HPLAN_PLUS is not set
1318# CONFIG_HPLAN is not set
1319# CONFIG_LP486E is not set
1320# CONFIG_ETH16I is not set
1321CONFIG_NE2000=m
1322# CONFIG_ZNET is not set
1323# CONFIG_SEEQ8005 is not set
1324# CONFIG_IBM_NEW_EMAC_ZMII is not set
1325# CONFIG_IBM_NEW_EMAC_RGMII is not set
1326# CONFIG_IBM_NEW_EMAC_TAH is not set
1327# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
1328CONFIG_NET_PCI=y
1329CONFIG_PCNET32=m
1330CONFIG_AMD8111_ETH=m
1331CONFIG_AMD8111E_NAPI=y
1332CONFIG_ADAPTEC_STARFIRE=m
1333CONFIG_ADAPTEC_STARFIRE_NAPI=y
1334# CONFIG_AC3200 is not set
1335# CONFIG_APRICOT is not set
1336CONFIG_B44=m
1337CONFIG_B44_PCI_AUTOSELECT=y
1338CONFIG_B44_PCICORE_AUTOSELECT=y
1339CONFIG_B44_PCI=y
1340CONFIG_FORCEDETH=m
1341CONFIG_FORCEDETH_NAPI=y
1342# CONFIG_CS89x0 is not set
1343# CONFIG_EEPRO100 is not set
1344CONFIG_E100=m
1345CONFIG_FEALNX=m
1346CONFIG_NATSEMI=m
1347CONFIG_NE2K_PCI=m
1348CONFIG_8139CP=m
1349CONFIG_8139TOO=m
1350# CONFIG_8139TOO_PIO is not set
1351# CONFIG_8139TOO_TUNE_TWISTER is not set
1352CONFIG_8139TOO_8129=y
1353# CONFIG_8139_OLD_RX_RESET is not set
1354CONFIG_R6040=m
1355CONFIG_SIS900=m
1356CONFIG_EPIC100=m
1357CONFIG_SUNDANCE=m
1358# CONFIG_SUNDANCE_MMIO is not set
1359CONFIG_TLAN=m
1360CONFIG_VIA_RHINE=m
1361CONFIG_VIA_RHINE_MMIO=y
1362CONFIG_VIA_RHINE_NAPI=y
1363CONFIG_SC92031=m
1364CONFIG_NET_POCKET=y
1365CONFIG_DE600=m
1366CONFIG_DE620=m
1367CONFIG_FEC_MPC52xx=m
1368CONFIG_FEC_MPC52xx_MDIO=y
1369# CONFIG_FS_ENET is not set
1370CONFIG_NETDEV_1000=y
1371CONFIG_ACENIC=m
1372# CONFIG_ACENIC_OMIT_TIGON_I is not set
1373CONFIG_DL2K=m
1374CONFIG_E1000=m
1375CONFIG_E1000_NAPI=y
1376# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
1377CONFIG_E1000E=m
1378CONFIG_E1000E_ENABLED=y
1379CONFIG_IP1000=m
1380CONFIG_IGB=m
1381CONFIG_NS83820=m
1382CONFIG_HAMACHI=m
1383CONFIG_YELLOWFIN=m
1384CONFIG_R8169=m
1385CONFIG_R8169_NAPI=y
1386CONFIG_R8169_VLAN=y
1387CONFIG_SIS190=m
1388CONFIG_SKGE=m
1389# CONFIG_SKGE_DEBUG is not set
1390CONFIG_SKY2=m
1391# CONFIG_SKY2_DEBUG is not set
1392CONFIG_VIA_VELOCITY=m
1393CONFIG_TIGON3=m
1394CONFIG_BNX2=m
1395CONFIG_GIANFAR=m
1396CONFIG_GFAR_NAPI=y
1397# CONFIG_UCC_GETH is not set
1398CONFIG_MV643XX_ETH=m
1399CONFIG_QLA3XXX=m
1400CONFIG_ATL1=m
1401CONFIG_NETDEV_10000=y
1402CONFIG_CHELSIO_T1=m
1403CONFIG_CHELSIO_T1_1G=y
1404CONFIG_CHELSIO_T1_NAPI=y
1405CONFIG_CHELSIO_T3=m
1406CONFIG_IXGBE=m
1407CONFIG_IXGB=m
1408CONFIG_IXGB_NAPI=y
1409CONFIG_S2IO=m
1410CONFIG_S2IO_NAPI=y
1411CONFIG_MYRI10GE=m
1412CONFIG_NETXEN_NIC=m
1413CONFIG_NIU=m
1414# CONFIG_MLX4_CORE is not set
1415CONFIG_TEHUTI=m
1416CONFIG_BNX2X=m
1417CONFIG_SFC=m
1418# CONFIG_TR is not set
1419
1420#
1421# Wireless LAN
1422#
1423# CONFIG_WLAN_PRE80211 is not set
1424# CONFIG_WLAN_80211 is not set
1425# CONFIG_IWLWIFI_LEDS is not set
1426
1427#
1428# USB Network Adapters
1429#
1430CONFIG_USB_CATC=m
1431CONFIG_USB_KAWETH=m
1432CONFIG_USB_PEGASUS=m
1433CONFIG_USB_RTL8150=m
1434CONFIG_USB_USBNET=m
1435CONFIG_USB_NET_AX8817X=m
1436CONFIG_USB_NET_CDCETHER=m
1437CONFIG_USB_NET_DM9601=m
1438CONFIG_USB_NET_GL620A=m
1439CONFIG_USB_NET_NET1080=m
1440CONFIG_USB_NET_PLUSB=m
1441CONFIG_USB_NET_MCS7830=m
1442CONFIG_USB_NET_RNDIS_HOST=m
1443CONFIG_USB_NET_CDC_SUBSET=m
1444CONFIG_USB_ALI_M5632=y
1445CONFIG_USB_AN2720=y
1446CONFIG_USB_BELKIN=y
1447CONFIG_USB_ARMLINUX=y
1448CONFIG_USB_EPSON2888=y
1449CONFIG_USB_KC2190=y
1450CONFIG_USB_NET_ZAURUS=m
1451CONFIG_NET_PCMCIA=y
1452CONFIG_PCMCIA_3C589=m
1453CONFIG_PCMCIA_3C574=m
1454CONFIG_PCMCIA_FMVJ18X=m
1455CONFIG_PCMCIA_PCNET=m
1456CONFIG_PCMCIA_NMCLAN=m
1457CONFIG_PCMCIA_SMC91C92=m
1458CONFIG_PCMCIA_XIRC2PS=m
1459CONFIG_PCMCIA_AXNET=m
1460# CONFIG_WAN is not set
1461CONFIG_ATM_DRIVERS=y
1462# CONFIG_ATM_DUMMY is not set
1463CONFIG_ATM_TCP=m
1464CONFIG_ATM_LANAI=m
1465CONFIG_ATM_ENI=m
1466# CONFIG_ATM_ENI_DEBUG is not set
1467# CONFIG_ATM_ENI_TUNE_BURST is not set
1468# CONFIG_ATM_FIRESTREAM is not set
1469# CONFIG_ATM_ZATM is not set
1470CONFIG_ATM_NICSTAR=m
1471# CONFIG_ATM_NICSTAR_USE_SUNI is not set
1472# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
1473CONFIG_ATM_IDT77252=m
1474# CONFIG_ATM_IDT77252_DEBUG is not set
1475# CONFIG_ATM_IDT77252_RCV_ALL is not set
1476CONFIG_ATM_IDT77252_USE_SUNI=y
1477# CONFIG_ATM_AMBASSADOR is not set
1478# CONFIG_ATM_HORIZON is not set
1479# CONFIG_ATM_IA is not set
1480CONFIG_ATM_FORE200E_MAYBE=m
1481# CONFIG_ATM_FORE200E_PCA is not set
1482CONFIG_ATM_HE=m
1483# CONFIG_ATM_HE_USE_SUNI is not set
1484CONFIG_FDDI=y
1485# CONFIG_DEFXX is not set
1486CONFIG_SKFP=m
1487# CONFIG_HIPPI is not set
1488CONFIG_PLIP=m
1489CONFIG_PPP=m
1490CONFIG_PPP_MULTILINK=y
1491CONFIG_PPP_FILTER=y
1492CONFIG_PPP_ASYNC=m
1493CONFIG_PPP_SYNC_TTY=m
1494CONFIG_PPP_DEFLATE=m
1495# CONFIG_PPP_BSDCOMP is not set
1496CONFIG_PPP_MPPE=m
1497CONFIG_PPPOE=m
1498CONFIG_PPPOATM=m
1499CONFIG_PPPOL2TP=m
1500CONFIG_SLIP=m
1501CONFIG_SLIP_COMPRESSED=y
1502CONFIG_SLHC=m
1503CONFIG_SLIP_SMART=y
1504# CONFIG_SLIP_MODE_SLIP6 is not set
1505CONFIG_NET_FC=y
1506CONFIG_NETCONSOLE=m
1507CONFIG_NETCONSOLE_DYNAMIC=y
1508CONFIG_NETPOLL=y
1509CONFIG_NETPOLL_TRAP=y
1510CONFIG_NET_POLL_CONTROLLER=y
1511CONFIG_VIRTIO_NET=m
1512# CONFIG_ISDN is not set
1513# CONFIG_PHONE is not set
1514
1515#
1516# Input device support
1517#
1518CONFIG_INPUT=y
1519CONFIG_INPUT_FF_MEMLESS=y
1520CONFIG_INPUT_POLLDEV=m
1521
1522#
1523# Userland interfaces
1524#
1525CONFIG_INPUT_MOUSEDEV=y
1526# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
1527CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
1528CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
1529CONFIG_INPUT_JOYDEV=m
1530CONFIG_INPUT_EVDEV=y
1531# CONFIG_INPUT_EVBUG is not set
1532
1533#
1534# Input Device Drivers
1535#
1536CONFIG_INPUT_KEYBOARD=y
1537CONFIG_KEYBOARD_ATKBD=y
1538# CONFIG_KEYBOARD_SUNKBD is not set
1539# CONFIG_KEYBOARD_LKKBD is not set
1540# CONFIG_KEYBOARD_XTKBD is not set
1541# CONFIG_KEYBOARD_NEWTON is not set
1542# CONFIG_KEYBOARD_STOWAWAY is not set
1543# CONFIG_KEYBOARD_GPIO is not set
1544CONFIG_INPUT_MOUSE=y
1545CONFIG_MOUSE_PS2=y
1546CONFIG_MOUSE_PS2_ALPS=y
1547CONFIG_MOUSE_PS2_LOGIPS2PP=y
1548CONFIG_MOUSE_PS2_SYNAPTICS=y
1549CONFIG_MOUSE_PS2_LIFEBOOK=y
1550CONFIG_MOUSE_PS2_TRACKPOINT=y
1551# CONFIG_MOUSE_PS2_TOUCHKIT is not set
1552CONFIG_MOUSE_SERIAL=m
1553CONFIG_MOUSE_APPLETOUCH=m
1554# CONFIG_MOUSE_INPORT is not set
1555# CONFIG_MOUSE_LOGIBM is not set
1556# CONFIG_MOUSE_PC110PAD is not set
1557CONFIG_MOUSE_VSXXXAA=m
1558# CONFIG_MOUSE_GPIO is not set
1559CONFIG_INPUT_JOYSTICK=y
1560CONFIG_JOYSTICK_ANALOG=m
1561CONFIG_JOYSTICK_A3D=m
1562CONFIG_JOYSTICK_ADI=m
1563CONFIG_JOYSTICK_COBRA=m
1564CONFIG_JOYSTICK_GF2K=m
1565CONFIG_JOYSTICK_GRIP=m
1566CONFIG_JOYSTICK_GRIP_MP=m
1567CONFIG_JOYSTICK_GUILLEMOT=m
1568CONFIG_JOYSTICK_INTERACT=m
1569CONFIG_JOYSTICK_SIDEWINDER=m
1570CONFIG_JOYSTICK_TMDC=m
1571CONFIG_JOYSTICK_IFORCE=m
1572CONFIG_JOYSTICK_IFORCE_USB=y
1573CONFIG_JOYSTICK_IFORCE_232=y
1574CONFIG_JOYSTICK_WARRIOR=m
1575CONFIG_JOYSTICK_MAGELLAN=m
1576CONFIG_JOYSTICK_SPACEORB=m
1577CONFIG_JOYSTICK_SPACEBALL=m
1578CONFIG_JOYSTICK_STINGER=m
1579CONFIG_JOYSTICK_TWIDJOY=m
1580CONFIG_JOYSTICK_ZHENHUA=m
1581CONFIG_JOYSTICK_DB9=m
1582CONFIG_JOYSTICK_GAMECON=m
1583CONFIG_JOYSTICK_TURBOGRAFX=m
1584CONFIG_JOYSTICK_JOYDUMP=m
1585CONFIG_JOYSTICK_XPAD=m
1586CONFIG_JOYSTICK_XPAD_FF=y
1587CONFIG_JOYSTICK_XPAD_LEDS=y
1588CONFIG_INPUT_TABLET=y
1589CONFIG_TABLET_USB_ACECAD=m
1590CONFIG_TABLET_USB_AIPTEK=m
1591CONFIG_TABLET_USB_GTCO=m
1592CONFIG_TABLET_USB_KBTAB=m
1593CONFIG_TABLET_USB_WACOM=m
1594# CONFIG_INPUT_TOUCHSCREEN is not set
1595CONFIG_INPUT_MISC=y
1596CONFIG_INPUT_PCSPKR=m
1597CONFIG_INPUT_ATI_REMOTE=m
1598CONFIG_INPUT_ATI_REMOTE2=m
1599CONFIG_INPUT_KEYSPAN_REMOTE=m
1600CONFIG_INPUT_POWERMATE=m
1601CONFIG_INPUT_YEALINK=m
1602CONFIG_INPUT_UINPUT=m
1603
1604#
1605# Hardware I/O ports
1606#
1607CONFIG_SERIO=y
1608CONFIG_SERIO_I8042=y
1609CONFIG_SERIO_SERPORT=y
1610# CONFIG_SERIO_PARKBD is not set
1611# CONFIG_SERIO_PCIPS2 is not set
1612CONFIG_SERIO_LIBPS2=y
1613CONFIG_SERIO_RAW=m
1614CONFIG_GAMEPORT=m
1615CONFIG_GAMEPORT_NS558=m
1616CONFIG_GAMEPORT_L4=m
1617CONFIG_GAMEPORT_EMU10K1=m
1618CONFIG_GAMEPORT_FM801=m
1619CONFIG_INPUT_LIRC=y
1620CONFIG_LIRC_DEV=m
1621CONFIG_LIRC_ATIUSB=m
1622CONFIG_LIRC_BT829=m
1623CONFIG_LIRC_CMDIR=m
1624CONFIG_LIRC_I2C=m
1625CONFIG_LIRC_IGORPLUGUSB=m
1626CONFIG_LIRC_IMON=m
1627CONFIG_LIRC_IT87=m
1628CONFIG_LIRC_MCEUSB=m
1629CONFIG_LIRC_MCEUSB2=m
1630CONFIG_LIRC_PVR150=m
1631CONFIG_LIRC_PARALLEL=m
1632CONFIG_LIRC_SERIAL=m
1633CONFIG_LIRC_SIR=m
1634CONFIG_LIRC_STREAMZAP=m
1635CONFIG_LIRC_TTUSBIR=m
1636
1637#
1638# Character devices
1639#
1640CONFIG_VT=y
1641CONFIG_VT_CONSOLE=y
1642CONFIG_HW_CONSOLE=y
1643CONFIG_VT_HW_CONSOLE_BINDING=y
1644# CONFIG_DEVKMEM is not set
1645CONFIG_SERIAL_NONSTANDARD=y
1646# CONFIG_COMPUTONE is not set
1647CONFIG_ROCKETPORT=m
1648CONFIG_CYCLADES=m
1649# CONFIG_CYZ_INTR is not set
1650# CONFIG_DIGIEPCA is not set
1651# CONFIG_ESPSERIAL is not set
1652# CONFIG_MOXA_INTELLIO is not set
1653# CONFIG_MOXA_SMARTIO is not set
1654# CONFIG_ISI is not set
1655CONFIG_SYNCLINK=m
1656CONFIG_SYNCLINKMP=m
1657CONFIG_SYNCLINK_GT=m
1658CONFIG_N_HDLC=m
1659# CONFIG_RISCOM8 is not set
1660# CONFIG_SPECIALIX is not set
1661# CONFIG_SX is not set
1662# CONFIG_RIO is not set
1663# CONFIG_STALDRV is not set
1664CONFIG_NOZOMI=m
1665
1666#
1667# Serial drivers
1668#
1669CONFIG_SERIAL_8250=y
1670CONFIG_SERIAL_8250_CONSOLE=y
1671CONFIG_SERIAL_8250_PCI=y
1672CONFIG_SERIAL_8250_PNP=y
1673CONFIG_SERIAL_8250_CS=m
1674CONFIG_SERIAL_8250_NR_UARTS=32
1675CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1676CONFIG_SERIAL_8250_EXTENDED=y
1677CONFIG_SERIAL_8250_MANY_PORTS=y
1678# CONFIG_SERIAL_8250_FOURPORT is not set
1679# CONFIG_SERIAL_8250_ACCENT is not set
1680# CONFIG_SERIAL_8250_BOCA is not set
1681# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
1682# CONFIG_SERIAL_8250_HUB6 is not set
1683CONFIG_SERIAL_8250_SHARE_IRQ=y
1684CONFIG_SERIAL_8250_DETECT_IRQ=y
1685CONFIG_SERIAL_8250_RSA=y
1686
1687#
1688# Non-8250 serial port support
1689#
1690CONFIG_SERIAL_UARTLITE=m
1691CONFIG_SERIAL_CORE=y
1692CONFIG_SERIAL_CORE_CONSOLE=y
1693CONFIG_SERIAL_PMACZILOG=m
1694# CONFIG_SERIAL_PMACZILOG_TTYS is not set
1695# CONFIG_SERIAL_CPM is not set
1696CONFIG_SERIAL_MPC52xx=y
1697CONFIG_SERIAL_MPC52xx_CONSOLE=y
1698CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200
1699CONFIG_SERIAL_JSM=m
1700CONFIG_SERIAL_OF_PLATFORM=y
1701# CONFIG_SERIAL_QE is not set
1702CONFIG_UNIX98_PTYS=y
1703# CONFIG_LEGACY_PTYS is not set
1704# CONFIG_CRASH is not set
1705CONFIG_BRIQ_PANEL=m
1706CONFIG_PRINTER=m
1707CONFIG_LP_CONSOLE=y
1708CONFIG_PPDEV=m
1709# CONFIG_HVC_RTAS is not set
1710# CONFIG_IPMI_HANDLER is not set
1711CONFIG_HW_RANDOM=y
1712CONFIG_HW_RANDOM_VIRTIO=m
1713CONFIG_NVRAM=y
1714CONFIG_DTLK=m
1715CONFIG_R3964=m
1716# CONFIG_APPLICOM is not set
1717
1718#
1719# PCMCIA character devices
1720#
1721# CONFIG_SYNCLINK_CS is not set
1722CONFIG_CARDMAN_4000=m
1723CONFIG_CARDMAN_4040=m
1724CONFIG_IPWIRELESS=m
1725# CONFIG_RAW_DRIVER is not set
1726# CONFIG_TCG_TPM is not set
1727CONFIG_DEVPORT=y
1728CONFIG_I2C=y
1729CONFIG_I2C_BOARDINFO=y
1730CONFIG_I2C_CHARDEV=m
1731CONFIG_I2C_ALGOBIT=y
1732CONFIG_I2C_ALGOPCA=m
1733
1734#
1735# I2C Hardware Bus support
1736#
1737
1738#
1739# PC SMBus host controller drivers
1740#
1741# CONFIG_I2C_ALI1535 is not set
1742# CONFIG_I2C_ALI1563 is not set
1743# CONFIG_I2C_ALI15X3 is not set
1744# CONFIG_I2C_AMD756 is not set
1745# CONFIG_I2C_AMD8111 is not set
1746# CONFIG_I2C_I801 is not set
1747# CONFIG_I2C_ISCH is not set
1748# CONFIG_I2C_PIIX4 is not set
1749# CONFIG_I2C_NFORCE2 is not set
1750# CONFIG_I2C_SIS5595 is not set
1751# CONFIG_I2C_SIS630 is not set
1752# CONFIG_I2C_SIS96X is not set
1753# CONFIG_I2C_VIA is not set
1754# CONFIG_I2C_VIAPRO is not set
1755
1756#
1757# Mac SMBus host controller drivers
1758#
1759CONFIG_I2C_HYDRA=m
1760CONFIG_I2C_POWERMAC=y
1761
1762#
1763# I2C system bus drivers (mostly embedded / system-on-chip)
1764#
1765# CONFIG_I2C_CPM is not set
1766# CONFIG_I2C_GPIO is not set
1767CONFIG_I2C_MPC=m
1768# CONFIG_I2C_OCORES is not set
1769CONFIG_I2C_SIMTEC=m
1770
1771#
1772# External I2C/SMBus adapter drivers
1773#
1774CONFIG_I2C_PARPORT=m
1775CONFIG_I2C_PARPORT_LIGHT=m
1776# CONFIG_I2C_TAOS_EVM is not set
1777CONFIG_I2C_TINY_USB=m
1778
1779#
1780# Graphics adapter I2C/DDC channel drivers
1781#
1782CONFIG_I2C_VOODOO3=m
1783
1784#
1785# Other I2C/SMBus bus drivers
1786#
1787# CONFIG_I2C_ELEKTOR is not set
1788CONFIG_I2C_PCA_ISA=m
1789CONFIG_I2C_PCA_PLATFORM=m
1790CONFIG_I2C_STUB=m
1791
1792#
1793# Miscellaneous I2C Chip support
1794#
1795# CONFIG_DS1682 is not set
1796CONFIG_AT24=m
1797CONFIG_SENSORS_EEPROM=m
1798CONFIG_SENSORS_PCF8574=m
1799CONFIG_PCF8575=m
1800CONFIG_SENSORS_PCA9539=m
1801CONFIG_SENSORS_PCF8591=m
1802# CONFIG_TPS65010 is not set
1803CONFIG_SENSORS_MAX6875=m
1804CONFIG_SENSORS_TSL2550=m
1805# CONFIG_I2C_DEBUG_CORE is not set
1806# CONFIG_I2C_DEBUG_ALGO is not set
1807# CONFIG_I2C_DEBUG_BUS is not set
1808# CONFIG_I2C_DEBUG_CHIP is not set
1809# CONFIG_SPI is not set
1810CONFIG_HAVE_GPIO_LIB=y
1811
1812#
1813# GPIO Support
1814#
1815# CONFIG_DEBUG_GPIO is not set
1816
1817#
1818# I2C GPIO expanders:
1819#
1820# CONFIG_GPIO_PCA953X is not set
1821# CONFIG_GPIO_PCF857X is not set
1822
1823#
1824# SPI GPIO expanders:
1825#
1826CONFIG_W1=m
1827CONFIG_W1_CON=y
1828
1829#
1830# 1-wire Bus Masters
1831#
1832# CONFIG_W1_MASTER_MATROX is not set
1833CONFIG_W1_MASTER_DS2490=m
1834CONFIG_W1_MASTER_DS2482=m
1835# CONFIG_W1_MASTER_GPIO is not set
1836
1837#
1838# 1-wire Slaves
1839#
1840CONFIG_W1_SLAVE_THERM=m
1841CONFIG_W1_SLAVE_SMEM=m
1842CONFIG_W1_SLAVE_DS2433=m
1843CONFIG_W1_SLAVE_DS2433_CRC=y
1844CONFIG_W1_SLAVE_DS2760=m
1845CONFIG_POWER_SUPPLY=m
1846# CONFIG_POWER_SUPPLY_DEBUG is not set
1847# CONFIG_PDA_POWER is not set
1848CONFIG_APM_POWER=m
1849# CONFIG_BATTERY_DS2760 is not set
1850CONFIG_BATTERY_PMU=m
1851CONFIG_HWMON=m
1852CONFIG_HWMON_VID=m
1853CONFIG_SENSORS_AD7418=m
1854CONFIG_SENSORS_ADM1021=m
1855CONFIG_SENSORS_ADM1025=m
1856CONFIG_SENSORS_ADM1026=m
1857CONFIG_SENSORS_ADM1029=m
1858CONFIG_SENSORS_ADM1031=m
1859CONFIG_SENSORS_ADM9240=m
1860CONFIG_SENSORS_ADT7470=m
1861CONFIG_SENSORS_ADT7473=m
1862CONFIG_SENSORS_AMS=m
1863CONFIG_SENSORS_AMS_PMU=y
1864CONFIG_SENSORS_AMS_I2C=y
1865CONFIG_SENSORS_ATXP1=m
1866CONFIG_SENSORS_DS1621=m
1867# CONFIG_SENSORS_I5K_AMB is not set
1868CONFIG_SENSORS_F71805F=m
1869CONFIG_SENSORS_F71882FG=m
1870CONFIG_SENSORS_F75375S=m
1871CONFIG_SENSORS_GL518SM=m
1872CONFIG_SENSORS_GL520SM=m
1873CONFIG_SENSORS_IT87=m
1874CONFIG_SENSORS_LM63=m
1875CONFIG_SENSORS_LM75=m
1876CONFIG_SENSORS_LM77=m
1877CONFIG_SENSORS_LM78=m
1878CONFIG_SENSORS_LM80=m
1879CONFIG_SENSORS_LM83=m
1880CONFIG_SENSORS_LM85=m
1881CONFIG_SENSORS_LM87=m
1882CONFIG_SENSORS_LM90=m
1883CONFIG_SENSORS_LM92=m
1884CONFIG_SENSORS_LM93=m
1885CONFIG_SENSORS_MAX1619=m
1886CONFIG_SENSORS_MAX6650=m
1887CONFIG_SENSORS_PC87360=m
1888CONFIG_SENSORS_PC87427=m
1889CONFIG_SENSORS_SIS5595=m
1890CONFIG_SENSORS_DME1737=m
1891CONFIG_SENSORS_SMSC47M1=m
1892CONFIG_SENSORS_SMSC47M192=m
1893CONFIG_SENSORS_SMSC47B397=m
1894CONFIG_SENSORS_ADS7828=m
1895CONFIG_SENSORS_THMC50=m
1896CONFIG_SENSORS_VIA686A=m
1897CONFIG_SENSORS_VT1211=m
1898CONFIG_SENSORS_VT8231=m
1899CONFIG_SENSORS_W83781D=m
1900CONFIG_SENSORS_W83791D=m
1901CONFIG_SENSORS_W83792D=m
1902CONFIG_SENSORS_W83793=m
1903CONFIG_SENSORS_W83L785TS=m
1904CONFIG_SENSORS_W83L786NG=m
1905CONFIG_SENSORS_W83627HF=m
1906CONFIG_SENSORS_W83627EHF=m
1907# CONFIG_HWMON_DEBUG_CHIP is not set
1908CONFIG_THERMAL=y
1909CONFIG_WATCHDOG=y
1910# CONFIG_WATCHDOG_NOWAYOUT is not set
1911
1912#
1913# Watchdog Device Drivers
1914#
1915CONFIG_SOFT_WATCHDOG=m
1916# CONFIG_MPC5200_WDT is not set
1917CONFIG_83xx_WDT=m
1918CONFIG_WATCHDOG_RTAS=m
1919
1920#
1921# ISA-based Watchdog Cards
1922#
1923# CONFIG_PCWATCHDOG is not set
1924# CONFIG_MIXCOMWD is not set
1925# CONFIG_WDT is not set
1926
1927#
1928# PCI-based Watchdog Cards
1929#
1930# CONFIG_PCIPCWATCHDOG is not set
1931# CONFIG_WDTPCI is not set
1932
1933#
1934# USB-based Watchdog Cards
1935#
1936CONFIG_USBPCWATCHDOG=m
1937
1938#
1939# Sonics Silicon Backplane
1940#
1941CONFIG_SSB_POSSIBLE=y
1942CONFIG_SSB=m
1943CONFIG_SSB_SPROM=y
1944CONFIG_SSB_PCIHOST_POSSIBLE=y
1945CONFIG_SSB_PCIHOST=y
1946# CONFIG_SSB_B43_PCI_BRIDGE is not set
1947CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
1948CONFIG_SSB_PCMCIAHOST=y
1949# CONFIG_SSB_DEBUG is not set
1950CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
1951CONFIG_SSB_DRIVER_PCICORE=y
1952
1953#
1954# Multifunction device drivers
1955#
1956CONFIG_MFD_SM501=m
1957# CONFIG_HTC_PASIC3 is not set
1958
1959#
1960# Multimedia devices
1961#
1962
1963#
1964# Multimedia core support
1965#
1966CONFIG_VIDEO_DEV=m
1967CONFIG_VIDEO_V4L2_COMMON=m
1968CONFIG_VIDEO_ALLOW_V4L1=y
1969CONFIG_VIDEO_V4L1_COMPAT=y
1970CONFIG_DVB_CORE=m
1971CONFIG_VIDEO_MEDIA=m
1972
1973#
1974# Multimedia drivers
1975#
1976CONFIG_VIDEO_SAA7146=m
1977CONFIG_VIDEO_SAA7146_VV=m
1978CONFIG_MEDIA_ATTACH=y
1979CONFIG_MEDIA_TUNER=m
1980# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set
1981CONFIG_MEDIA_TUNER_SIMPLE=m
1982CONFIG_MEDIA_TUNER_TDA8290=m
1983CONFIG_MEDIA_TUNER_TDA827X=m
1984CONFIG_MEDIA_TUNER_TDA18271=m
1985CONFIG_MEDIA_TUNER_TDA9887=m
1986CONFIG_MEDIA_TUNER_TEA5761=m
1987CONFIG_MEDIA_TUNER_TEA5767=m
1988CONFIG_MEDIA_TUNER_MT20XX=m
1989CONFIG_MEDIA_TUNER_MT2060=m
1990CONFIG_MEDIA_TUNER_MT2266=m
1991CONFIG_MEDIA_TUNER_MT2131=m
1992CONFIG_MEDIA_TUNER_QT1010=m
1993CONFIG_MEDIA_TUNER_XC2028=m
1994CONFIG_MEDIA_TUNER_XC5000=m
1995CONFIG_MEDIA_TUNER_MXL5005S=m
1996CONFIG_VIDEO_V4L2=m
1997CONFIG_VIDEO_V4L1=m
1998CONFIG_VIDEOBUF_GEN=m
1999CONFIG_VIDEOBUF_DMA_SG=m
2000CONFIG_VIDEOBUF_VMALLOC=m
2001CONFIG_VIDEOBUF_DVB=m
2002CONFIG_VIDEO_BTCX=m
2003CONFIG_VIDEO_IR_I2C=m
2004CONFIG_VIDEO_IR=m
2005CONFIG_VIDEO_TVEEPROM=m
2006CONFIG_VIDEO_TUNER=m
2007CONFIG_VIDEO_CAPTURE_DRIVERS=y
2008# CONFIG_VIDEO_ADV_DEBUG is not set
2009# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
2010
2011#
2012# Encoders/decoders and other helper chips
2013#
2014
2015#
2016# Audio decoders
2017#
2018CONFIG_VIDEO_TVAUDIO=m
2019CONFIG_VIDEO_TDA7432=m
2020CONFIG_VIDEO_TDA9840=m
2021CONFIG_VIDEO_TDA9875=m
2022CONFIG_VIDEO_TEA6415C=m
2023CONFIG_VIDEO_TEA6420=m
2024CONFIG_VIDEO_MSP3400=m
2025CONFIG_VIDEO_CS5345=m
2026CONFIG_VIDEO_CS53L32A=m
2027CONFIG_VIDEO_M52790=m
2028CONFIG_VIDEO_TLV320AIC23B=m
2029CONFIG_VIDEO_WM8775=m
2030CONFIG_VIDEO_WM8739=m
2031CONFIG_VIDEO_VP27SMPX=m
2032
2033#
2034# Video decoders
2035#
2036CONFIG_VIDEO_BT819=m
2037CONFIG_VIDEO_BT856=m
2038CONFIG_VIDEO_BT866=m
2039CONFIG_VIDEO_KS0127=m
2040CONFIG_VIDEO_OV7670=m
2041CONFIG_VIDEO_TCM825X=m
2042CONFIG_VIDEO_SAA7110=m
2043CONFIG_VIDEO_SAA7111=m
2044CONFIG_VIDEO_SAA7114=m
2045CONFIG_VIDEO_SAA711X=m
2046CONFIG_VIDEO_SAA717X=m
2047CONFIG_VIDEO_SAA7191=m
2048CONFIG_VIDEO_TVP5150=m
2049CONFIG_VIDEO_VPX3220=m
2050
2051#
2052# Video and audio decoders
2053#
2054CONFIG_VIDEO_CX25840=m
2055
2056#
2057# MPEG video encoders
2058#
2059CONFIG_VIDEO_CX2341X=m
2060
2061#
2062# Video encoders
2063#
2064CONFIG_VIDEO_SAA7127=m
2065CONFIG_VIDEO_SAA7185=m
2066CONFIG_VIDEO_ADV7170=m
2067CONFIG_VIDEO_ADV7175=m
2068
2069#
2070# Video improvement chips
2071#
2072CONFIG_VIDEO_UPD64031A=m
2073CONFIG_VIDEO_UPD64083=m
2074# CONFIG_VIDEO_VIVI is not set
2075CONFIG_VIDEO_BT848=m
2076CONFIG_VIDEO_BT848_DVB=y
2077CONFIG_VIDEO_SAA6588=m
2078# CONFIG_VIDEO_PMS is not set
2079CONFIG_VIDEO_BWQCAM=m
2080CONFIG_VIDEO_CQCAM=m
2081CONFIG_VIDEO_W9966=m
2082CONFIG_VIDEO_CPIA=m
2083CONFIG_VIDEO_CPIA_PP=m
2084CONFIG_VIDEO_CPIA_USB=m
2085CONFIG_VIDEO_CPIA2=m
2086CONFIG_VIDEO_SAA5246A=m
2087CONFIG_VIDEO_SAA5249=m
2088CONFIG_TUNER_3036=m
2089# CONFIG_VIDEO_STRADIS is not set
2090# CONFIG_VIDEO_ZORAN is not set
2091CONFIG_VIDEO_SAA7134=m
2092CONFIG_VIDEO_SAA7134_ALSA=m
2093CONFIG_VIDEO_SAA7134_DVB=m
2094CONFIG_VIDEO_MXB=m
2095CONFIG_VIDEO_DPC=m
2096CONFIG_VIDEO_HEXIUM_ORION=m
2097CONFIG_VIDEO_HEXIUM_GEMINI=m
2098CONFIG_VIDEO_CX88=m
2099CONFIG_VIDEO_CX88_ALSA=m
2100CONFIG_VIDEO_CX88_BLACKBIRD=m
2101CONFIG_VIDEO_CX88_DVB=m
2102CONFIG_VIDEO_CX88_VP3054=m
2103CONFIG_VIDEO_CX23885=m
2104CONFIG_VIDEO_AU0828=m
2105CONFIG_VIDEO_IVTV=m
2106CONFIG_VIDEO_FB_IVTV=m
2107CONFIG_VIDEO_CX18=m
2108# CONFIG_VIDEO_CAFE_CCIC is not set
2109CONFIG_V4L_USB_DRIVERS=y
2110CONFIG_USB_VIDEO_CLASS=m
2111CONFIG_VIDEO_PVRUSB2=m
2112CONFIG_VIDEO_PVRUSB2_SYSFS=y
2113CONFIG_VIDEO_PVRUSB2_DVB=y
2114# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
2115CONFIG_VIDEO_EM28XX=m
2116CONFIG_VIDEO_EM28XX_ALSA=m
2117CONFIG_VIDEO_EM28XX_DVB=m
2118CONFIG_VIDEO_USBVISION=m
2119CONFIG_VIDEO_USBVIDEO=m
2120CONFIG_USB_VICAM=m
2121CONFIG_USB_IBMCAM=m
2122CONFIG_USB_KONICAWC=m
2123CONFIG_USB_QUICKCAM_MESSENGER=m
2124CONFIG_USB_ET61X251=m
2125CONFIG_VIDEO_OVCAMCHIP=m
2126CONFIG_USB_W9968CF=m
2127CONFIG_USB_OV511=m
2128CONFIG_USB_SE401=m
2129CONFIG_USB_SN9C102=m
2130CONFIG_USB_STV680=m
2131CONFIG_USB_ZC0301=m
2132CONFIG_USB_PWC=m
2133# CONFIG_USB_PWC_DEBUG is not set
2134CONFIG_USB_ZR364XX=m
2135CONFIG_USB_STKWEBCAM=m
2136CONFIG_SOC_CAMERA=m
2137CONFIG_SOC_CAMERA_MT9M001=m
2138# CONFIG_MT9M001_PCA9536_SWITCH is not set
2139CONFIG_SOC_CAMERA_MT9V022=m
2140# CONFIG_MT9V022_PCA9536_SWITCH is not set
2141CONFIG_RADIO_ADAPTERS=y
2142# CONFIG_RADIO_CADET is not set
2143# CONFIG_RADIO_RTRACK is not set
2144# CONFIG_RADIO_RTRACK2 is not set
2145# CONFIG_RADIO_AZTECH is not set
2146# CONFIG_RADIO_GEMTEK is not set
2147CONFIG_RADIO_GEMTEK_PCI=m
2148CONFIG_RADIO_MAXIRADIO=m
2149CONFIG_RADIO_MAESTRO=m
2150# CONFIG_RADIO_SF16FMI is not set
2151# CONFIG_RADIO_SF16FMR2 is not set
2152# CONFIG_RADIO_TERRATEC is not set
2153# CONFIG_RADIO_TRUST is not set
2154# CONFIG_RADIO_TYPHOON is not set
2155# CONFIG_RADIO_ZOLTRIX is not set
2156CONFIG_USB_DSBR=m
2157CONFIG_USB_SI470X=m
2158CONFIG_DVB_CAPTURE_DRIVERS=y
2159
2160#
2161# Supported SAA7146 based PCI Adapters
2162#
2163CONFIG_TTPCI_EEPROM=m
2164CONFIG_DVB_AV7110=m
2165CONFIG_DVB_AV7110_OSD=y
2166CONFIG_DVB_BUDGET_CORE=m
2167CONFIG_DVB_BUDGET=m
2168CONFIG_DVB_BUDGET_CI=m
2169CONFIG_DVB_BUDGET_AV=m
2170CONFIG_DVB_BUDGET_PATCH=m
2171
2172#
2173# Supported USB Adapters
2174#
2175CONFIG_DVB_USB=m
2176# CONFIG_DVB_USB_DEBUG is not set
2177CONFIG_DVB_USB_A800=m
2178CONFIG_DVB_USB_DIBUSB_MB=m
2179# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
2180CONFIG_DVB_USB_DIBUSB_MC=m
2181CONFIG_DVB_USB_DIB0700=m
2182CONFIG_DVB_USB_UMT_010=m
2183CONFIG_DVB_USB_CXUSB=m
2184CONFIG_DVB_USB_M920X=m
2185CONFIG_DVB_USB_GL861=m
2186CONFIG_DVB_USB_AU6610=m
2187CONFIG_DVB_USB_DIGITV=m
2188CONFIG_DVB_USB_VP7045=m
2189CONFIG_DVB_USB_VP702X=m
2190CONFIG_DVB_USB_GP8PSK=m
2191CONFIG_DVB_USB_NOVA_T_USB2=m
2192CONFIG_DVB_USB_TTUSB2=m
2193CONFIG_DVB_USB_DTT200U=m
2194CONFIG_DVB_USB_OPERA1=m
2195CONFIG_DVB_USB_AF9005=m
2196CONFIG_DVB_USB_AF9005_REMOTE=m
2197CONFIG_DVB_TTUSB_BUDGET=m
2198CONFIG_DVB_TTUSB_DEC=m
2199CONFIG_DVB_CINERGYT2=m
2200CONFIG_DVB_CINERGYT2_TUNING=y
2201CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32
2202CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512
2203CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250
2204CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y
2205CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100
2206
2207#
2208# Supported FlexCopII (B2C2) Adapters
2209#
2210CONFIG_DVB_B2C2_FLEXCOP=m
2211CONFIG_DVB_B2C2_FLEXCOP_PCI=m
2212CONFIG_DVB_B2C2_FLEXCOP_USB=m
2213# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
2214
2215#
2216# Supported BT878 Adapters
2217#
2218CONFIG_DVB_BT8XX=m
2219
2220#
2221# Supported Pluto2 Adapters
2222#
2223CONFIG_DVB_PLUTO2=m
2224
2225#
2226# Supported DVB Frontends
2227#
2228
2229#
2230# Customise DVB Frontends
2231#
2232# CONFIG_DVB_FE_CUSTOMISE is not set
2233
2234#
2235# DVB-S (satellite) frontends
2236#
2237CONFIG_DVB_CX24110=m
2238CONFIG_DVB_CX24123=m
2239CONFIG_DVB_MT312=m
2240CONFIG_DVB_S5H1420=m
2241CONFIG_DVB_STV0299=m
2242CONFIG_DVB_TDA8083=m
2243CONFIG_DVB_TDA10086=m
2244CONFIG_DVB_VES1X93=m
2245CONFIG_DVB_TUNER_ITD1000=m
2246CONFIG_DVB_TDA826X=m
2247CONFIG_DVB_TUA6100=m
2248
2249#
2250# DVB-T (terrestrial) frontends
2251#
2252CONFIG_DVB_SP8870=m
2253CONFIG_DVB_SP887X=m
2254CONFIG_DVB_CX22700=m
2255CONFIG_DVB_CX22702=m
2256CONFIG_DVB_L64781=m
2257CONFIG_DVB_TDA1004X=m
2258CONFIG_DVB_NXT6000=m
2259CONFIG_DVB_MT352=m
2260CONFIG_DVB_ZL10353=m
2261CONFIG_DVB_DIB3000MB=m
2262CONFIG_DVB_DIB3000MC=m
2263CONFIG_DVB_DIB7000M=m
2264CONFIG_DVB_DIB7000P=m
2265CONFIG_DVB_TDA10048=m
2266
2267#
2268# DVB-C (cable) frontends
2269#
2270CONFIG_DVB_VES1820=m
2271CONFIG_DVB_TDA10021=m
2272CONFIG_DVB_TDA10023=m
2273CONFIG_DVB_STV0297=m
2274
2275#
2276# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
2277#
2278CONFIG_DVB_NXT200X=m
2279CONFIG_DVB_OR51211=m
2280CONFIG_DVB_OR51132=m
2281CONFIG_DVB_BCM3510=m
2282CONFIG_DVB_LGDT330X=m
2283CONFIG_DVB_S5H1409=m
2284CONFIG_DVB_AU8522=m
2285CONFIG_DVB_S5H1411=m
2286
2287#
2288# Digital terrestrial only tuners/PLL
2289#
2290CONFIG_DVB_PLL=m
2291CONFIG_DVB_TUNER_DIB0070=m
2292
2293#
2294# SEC control devices for DVB-S
2295#
2296CONFIG_DVB_LNBP21=m
2297CONFIG_DVB_ISL6405=m
2298CONFIG_DVB_ISL6421=m
2299CONFIG_DAB=y
2300CONFIG_USB_DABUSB=m
2301
2302#
2303# Graphics support
2304#
2305CONFIG_AGP=y
2306CONFIG_AGP_UNINORTH=y
2307CONFIG_DRM=m
2308CONFIG_DRM_TDFX=m
2309CONFIG_DRM_R128=m
2310CONFIG_DRM_RADEON=m
2311CONFIG_DRM_MGA=m
2312CONFIG_DRM_SIS=m
2313CONFIG_DRM_VIA=m
2314CONFIG_DRM_SAVAGE=m
2315CONFIG_VGASTATE=y
2316CONFIG_VIDEO_OUTPUT_CONTROL=m
2317CONFIG_FB=y
2318# CONFIG_FIRMWARE_EDID is not set
2319CONFIG_FB_DDC=y
2320CONFIG_FB_CFB_FILLRECT=y
2321CONFIG_FB_CFB_COPYAREA=y
2322CONFIG_FB_CFB_IMAGEBLIT=y
2323# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
2324# CONFIG_FB_SYS_FILLRECT is not set
2325# CONFIG_FB_SYS_COPYAREA is not set
2326# CONFIG_FB_SYS_IMAGEBLIT is not set
2327# CONFIG_FB_FOREIGN_ENDIAN is not set
2328# CONFIG_FB_SYS_FOPS is not set
2329CONFIG_FB_SVGALIB=m
2330CONFIG_FB_MACMODES=y
2331CONFIG_FB_BACKLIGHT=y
2332CONFIG_FB_MODE_HELPERS=y
2333CONFIG_FB_TILEBLITTING=y
2334
2335#
2336# Frame buffer hardware drivers
2337#
2338CONFIG_FB_CIRRUS=m
2339# CONFIG_FB_PM2 is not set
2340# CONFIG_FB_CYBER2000 is not set
2341CONFIG_FB_OF=y
2342# CONFIG_FB_CONTROL is not set
2343CONFIG_FB_PLATINUM=y
2344CONFIG_FB_VALKYRIE=y
2345CONFIG_FB_CT65550=y
2346# CONFIG_FB_ASILIANT is not set
2347# CONFIG_FB_IMSTT is not set
2348# CONFIG_FB_VGA16 is not set
2349# CONFIG_FB_UVESA is not set
2350# CONFIG_FB_S1D13XXX is not set
2351CONFIG_FB_NVIDIA=y
2352CONFIG_FB_NVIDIA_I2C=y
2353# CONFIG_FB_NVIDIA_DEBUG is not set
2354CONFIG_FB_NVIDIA_BACKLIGHT=y
2355CONFIG_FB_RIVA=m
2356# CONFIG_FB_RIVA_I2C is not set
2357# CONFIG_FB_RIVA_DEBUG is not set
2358CONFIG_FB_RIVA_BACKLIGHT=y
2359CONFIG_FB_MATROX=y
2360CONFIG_FB_MATROX_MILLENIUM=y
2361CONFIG_FB_MATROX_MYSTIQUE=y
2362CONFIG_FB_MATROX_G=y
2363CONFIG_FB_MATROX_I2C=m
2364CONFIG_FB_MATROX_MAVEN=m
2365CONFIG_FB_MATROX_MULTIHEAD=y
2366CONFIG_FB_RADEON=y
2367CONFIG_FB_RADEON_I2C=y
2368CONFIG_FB_RADEON_BACKLIGHT=y
2369# CONFIG_FB_RADEON_DEBUG is not set
2370CONFIG_FB_ATY128=y
2371CONFIG_FB_ATY128_BACKLIGHT=y
2372CONFIG_FB_ATY=y
2373CONFIG_FB_ATY_CT=y
2374CONFIG_FB_ATY_GENERIC_LCD=y
2375CONFIG_FB_ATY_GX=y
2376CONFIG_FB_ATY_BACKLIGHT=y
2377CONFIG_FB_S3=m
2378CONFIG_FB_SAVAGE=m
2379CONFIG_FB_SAVAGE_I2C=y
2380CONFIG_FB_SAVAGE_ACCEL=y
2381# CONFIG_FB_SIS is not set
2382CONFIG_FB_NEOMAGIC=m
2383CONFIG_FB_KYRO=m
2384CONFIG_FB_3DFX=m
2385CONFIG_FB_3DFX_ACCEL=y
2386CONFIG_FB_VOODOO1=m
2387# CONFIG_FB_VT8623 is not set
2388CONFIG_FB_TRIDENT=m
2389CONFIG_FB_TRIDENT_ACCEL=y
2390# CONFIG_FB_ARK is not set
2391# CONFIG_FB_PM3 is not set
2392# CONFIG_FB_FSL_DIU is not set
2393CONFIG_FB_SM501=m
2394CONFIG_FB_IBM_GXT4500=y
2395# CONFIG_FB_VIRTUAL is not set
2396CONFIG_BACKLIGHT_LCD_SUPPORT=y
2397CONFIG_LCD_CLASS_DEVICE=m
2398CONFIG_BACKLIGHT_CLASS_DEVICE=y
2399# CONFIG_BACKLIGHT_CORGI is not set
2400
2401#
2402# Display device support
2403#
2404CONFIG_DISPLAY_SUPPORT=m
2405
2406#
2407# Display hardware drivers
2408#
2409
2410#
2411# Console display driver support
2412#
2413CONFIG_VGA_CONSOLE=y
2414CONFIG_VGACON_SOFT_SCROLLBACK=y
2415CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
2416# CONFIG_MDA_CONSOLE is not set
2417CONFIG_DUMMY_CONSOLE=y
2418CONFIG_FRAMEBUFFER_CONSOLE=y
2419CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
2420CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
2421# CONFIG_FONTS is not set
2422CONFIG_FONT_8x8=y
2423CONFIG_FONT_8x16=y
2424CONFIG_LOGO=y
2425# CONFIG_LOGO_LINUX_MONO is not set
2426# CONFIG_LOGO_LINUX_VGA16 is not set
2427CONFIG_LOGO_LINUX_CLUT224=y
2428CONFIG_SOUND=m
2429CONFIG_SND=m
2430CONFIG_SND_TIMER=m
2431CONFIG_SND_PCM=m
2432CONFIG_SND_HWDEP=m
2433CONFIG_SND_RAWMIDI=m
2434CONFIG_SND_SEQUENCER=m
2435CONFIG_SND_SEQ_DUMMY=m
2436CONFIG_SND_OSSEMUL=y
2437CONFIG_SND_MIXER_OSS=m
2438CONFIG_SND_PCM_OSS=m
2439CONFIG_SND_PCM_OSS_PLUGINS=y
2440CONFIG_SND_SEQUENCER_OSS=y
2441CONFIG_SND_DYNAMIC_MINORS=y
2442# CONFIG_SND_SUPPORT_OLD_API is not set
2443CONFIG_SND_VERBOSE_PROCFS=y
2444CONFIG_SND_VERBOSE_PRINTK=y
2445CONFIG_SND_DEBUG=y
2446CONFIG_SND_DEBUG_VERBOSE=y
2447CONFIG_SND_PCM_XRUN_DEBUG=y
2448CONFIG_SND_VMASTER=y
2449CONFIG_SND_MPU401_UART=m
2450CONFIG_SND_OPL3_LIB=m
2451CONFIG_SND_VX_LIB=m
2452CONFIG_SND_AC97_CODEC=m
2453CONFIG_SND_DRIVERS=y
2454CONFIG_SND_DUMMY=m
2455CONFIG_SND_VIRMIDI=m
2456CONFIG_SND_MTPAV=m
2457CONFIG_SND_MTS64=m
2458CONFIG_SND_SERIAL_U16550=m
2459CONFIG_SND_MPU401=m
2460CONFIG_SND_PORTMAN2X4=m
2461CONFIG_SND_AC97_POWER_SAVE=y
2462CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5
2463CONFIG_SND_SB_COMMON=m
2464CONFIG_SND_SB16_DSP=m
2465CONFIG_SND_ISA=y
2466# CONFIG_SND_ADLIB is not set
2467# CONFIG_SND_AD1816A is not set
2468# CONFIG_SND_AD1848 is not set
2469# CONFIG_SND_ALS100 is not set
2470# CONFIG_SND_AZT2320 is not set
2471# CONFIG_SND_CMI8330 is not set
2472# CONFIG_SND_CS4231 is not set
2473# CONFIG_SND_CS4232 is not set
2474# CONFIG_SND_CS4236 is not set
2475# CONFIG_SND_DT019X is not set
2476# CONFIG_SND_ES968 is not set
2477# CONFIG_SND_ES1688 is not set
2478# CONFIG_SND_ES18XX is not set
2479# CONFIG_SND_SC6000 is not set
2480# CONFIG_SND_GUSCLASSIC is not set
2481# CONFIG_SND_GUSEXTREME is not set
2482# CONFIG_SND_GUSMAX is not set
2483# CONFIG_SND_INTERWAVE is not set
2484# CONFIG_SND_INTERWAVE_STB is not set
2485# CONFIG_SND_OPL3SA2 is not set
2486# CONFIG_SND_OPTI92X_AD1848 is not set
2487# CONFIG_SND_OPTI92X_CS4231 is not set
2488# CONFIG_SND_OPTI93X is not set
2489# CONFIG_SND_MIRO is not set
2490# CONFIG_SND_SB8 is not set
2491# CONFIG_SND_SB16 is not set
2492# CONFIG_SND_SBAWE is not set
2493# CONFIG_SND_SGALAXY is not set
2494# CONFIG_SND_SSCAPE is not set
2495# CONFIG_SND_WAVEFRONT is not set
2496CONFIG_SND_PCI=y
2497CONFIG_SND_AD1889=m
2498CONFIG_SND_ALS300=m
2499CONFIG_SND_ALS4000=m
2500CONFIG_SND_ALI5451=m
2501CONFIG_SND_ATIIXP=m
2502CONFIG_SND_ATIIXP_MODEM=m
2503CONFIG_SND_AU8810=m
2504CONFIG_SND_AU8820=m
2505CONFIG_SND_AU8830=m
2506CONFIG_SND_AW2=m
2507CONFIG_SND_AZT3328=m
2508CONFIG_SND_BT87X=m
2509# CONFIG_SND_BT87X_OVERCLOCK is not set
2510CONFIG_SND_CA0106=m
2511CONFIG_SND_CMIPCI=m
2512CONFIG_SND_OXYGEN_LIB=m
2513CONFIG_SND_OXYGEN=m
2514CONFIG_SND_CS4281=m
2515CONFIG_SND_CS46XX=m
2516CONFIG_SND_CS46XX_NEW_DSP=y
2517CONFIG_SND_CS5530=m
2518CONFIG_SND_DARLA20=m
2519CONFIG_SND_GINA20=m
2520CONFIG_SND_LAYLA20=m
2521CONFIG_SND_DARLA24=m
2522CONFIG_SND_GINA24=m
2523CONFIG_SND_LAYLA24=m
2524CONFIG_SND_MONA=m
2525CONFIG_SND_MIA=m
2526CONFIG_SND_ECHO3G=m
2527CONFIG_SND_INDIGO=m
2528CONFIG_SND_INDIGOIO=m
2529CONFIG_SND_INDIGODJ=m
2530CONFIG_SND_EMU10K1=m
2531CONFIG_SND_EMU10K1X=m
2532CONFIG_SND_ENS1370=m
2533CONFIG_SND_ENS1371=m
2534CONFIG_SND_ES1938=m
2535CONFIG_SND_ES1968=m
2536CONFIG_SND_FM801=m
2537CONFIG_SND_FM801_TEA575X_BOOL=y
2538CONFIG_SND_FM801_TEA575X=m
2539# CONFIG_SND_HDA_INTEL is not set
2540CONFIG_SND_HDSP=m
2541CONFIG_SND_HDSPM=m
2542CONFIG_SND_HIFIER=m
2543CONFIG_SND_ICE1712=m
2544CONFIG_SND_ICE1724=m
2545# CONFIG_SND_INTEL8X0 is not set
2546# CONFIG_SND_INTEL8X0M is not set
2547CONFIG_SND_KORG1212=m
2548CONFIG_SND_MAESTRO3=m
2549CONFIG_SND_MIXART=m
2550CONFIG_SND_NM256=m
2551CONFIG_SND_PCXHR=m
2552CONFIG_SND_RIPTIDE=m
2553CONFIG_SND_RME32=m
2554CONFIG_SND_RME96=m
2555CONFIG_SND_RME9652=m
2556CONFIG_SND_SONICVIBES=m
2557CONFIG_SND_TRIDENT=m
2558CONFIG_SND_VIA82XX=m
2559CONFIG_SND_VIA82XX_MODEM=m
2560CONFIG_SND_VIRTUOSO=m
2561CONFIG_SND_VX222=m
2562# CONFIG_SND_YMFPCI is not set
2563CONFIG_SND_PPC=y
2564CONFIG_SND_POWERMAC=m
2565CONFIG_SND_POWERMAC_AUTO_DRC=y
2566CONFIG_SND_AOA=m
2567CONFIG_SND_AOA_FABRIC_LAYOUT=m
2568CONFIG_SND_AOA_ONYX=m
2569CONFIG_SND_AOA_TAS=m
2570CONFIG_SND_AOA_TOONIE=m
2571CONFIG_SND_AOA_SOUNDBUS=m
2572CONFIG_SND_AOA_SOUNDBUS_I2S=m
2573CONFIG_SND_USB=y
2574CONFIG_SND_USB_AUDIO=m
2575CONFIG_SND_USB_USX2Y=m
2576CONFIG_SND_USB_CAIAQ=m
2577CONFIG_SND_USB_CAIAQ_INPUT=y
2578# CONFIG_SND_PCMCIA is not set
2579# CONFIG_SND_SOC is not set
2580# CONFIG_SOUND_PRIME is not set
2581CONFIG_AC97_BUS=m
2582CONFIG_HID_SUPPORT=y
2583CONFIG_HID=y
2584CONFIG_HID_DEBUG=y
2585CONFIG_HIDRAW=y
2586
2587#
2588# USB Input Devices
2589#
2590CONFIG_USB_HID=y
2591CONFIG_USB_HIDINPUT_POWERBOOK=y
2592CONFIG_HID_FF=y
2593CONFIG_HID_PID=y
2594CONFIG_LOGITECH_FF=y
2595CONFIG_LOGIRUMBLEPAD2_FF=y
2596CONFIG_PANTHERLORD_FF=y
2597CONFIG_THRUSTMASTER_FF=y
2598CONFIG_ZEROPLUS_FF=y
2599CONFIG_USB_HIDDEV=y
2600CONFIG_USB_SUPPORT=y
2601CONFIG_USB_ARCH_HAS_HCD=y
2602CONFIG_USB_ARCH_HAS_OHCI=y
2603CONFIG_USB_ARCH_HAS_EHCI=y
2604CONFIG_USB=y
2605CONFIG_USB_DEBUG=y
2606CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
2607
2608#
2609# Miscellaneous USB options
2610#
2611CONFIG_USB_DEVICEFS=y
2612# CONFIG_USB_DEVICE_CLASS is not set
2613# CONFIG_USB_DYNAMIC_MINORS is not set
2614CONFIG_USB_SUSPEND=y
2615# CONFIG_USB_OTG is not set
2616
2617#
2618# USB Host Controller Drivers
2619#
2620# CONFIG_USB_C67X00_HCD is not set
2621CONFIG_USB_EHCI_HCD=m
2622CONFIG_USB_EHCI_ROOT_HUB_TT=y
2623CONFIG_USB_EHCI_TT_NEWSCHED=y
2624CONFIG_USB_EHCI_FSL=y
2625CONFIG_USB_EHCI_HCD_PPC_OF=y
2626# CONFIG_USB_ISP116X_HCD is not set
2627# CONFIG_USB_ISP1760_HCD is not set
2628CONFIG_USB_OHCI_HCD=m
2629CONFIG_USB_OHCI_HCD_PPC_SOC=y
2630CONFIG_USB_OHCI_HCD_PPC_OF=y
2631CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
2632CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
2633CONFIG_USB_OHCI_HCD_PCI=y
2634# CONFIG_USB_OHCI_HCD_SSB is not set
2635CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
2636CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
2637CONFIG_USB_OHCI_LITTLE_ENDIAN=y
2638CONFIG_USB_UHCI_HCD=m
2639CONFIG_USB_U132_HCD=m
2640CONFIG_USB_SL811_HCD=m
2641# CONFIG_USB_SL811_CS is not set
2642# CONFIG_USB_R8A66597_HCD is not set
2643
2644#
2645# USB Device Class drivers
2646#
2647CONFIG_USB_ACM=m
2648CONFIG_USB_PRINTER=m
2649CONFIG_USB_WDM=m
2650
2651#
2652# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
2653#
2654
2655#
2656# may also be needed; see USB_STORAGE Help for more information
2657#
2658CONFIG_USB_STORAGE=m
2659# CONFIG_USB_STORAGE_DEBUG is not set
2660CONFIG_USB_STORAGE_DATAFAB=y
2661CONFIG_USB_STORAGE_FREECOM=y
2662# CONFIG_USB_STORAGE_ISD200 is not set
2663CONFIG_USB_STORAGE_DPCM=y
2664CONFIG_USB_STORAGE_USBAT=y
2665CONFIG_USB_STORAGE_SDDR09=y
2666CONFIG_USB_STORAGE_SDDR55=y
2667CONFIG_USB_STORAGE_JUMPSHOT=y
2668CONFIG_USB_STORAGE_ALAUDA=y
2669CONFIG_USB_STORAGE_ONETOUCH=y
2670CONFIG_USB_STORAGE_KARMA=y
2671CONFIG_USB_STORAGE_CYPRESS_ATACB=y
2672# CONFIG_USB_LIBUSUAL is not set
2673
2674#
2675# USB Imaging devices
2676#
2677CONFIG_USB_MDC800=m
2678CONFIG_USB_MICROTEK=m
2679CONFIG_USB_MON=y
2680
2681#
2682# USB port drivers
2683#
2684CONFIG_USB_USS720=m
2685CONFIG_USB_SERIAL=m
2686CONFIG_USB_EZUSB=y
2687CONFIG_USB_SERIAL_GENERIC=y
2688CONFIG_USB_SERIAL_AIRCABLE=m
2689CONFIG_USB_SERIAL_AIRPRIME=m
2690CONFIG_USB_SERIAL_ARK3116=m
2691CONFIG_USB_SERIAL_BELKIN=m
2692CONFIG_USB_SERIAL_CH341=m
2693CONFIG_USB_SERIAL_WHITEHEAT=m
2694CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
2695CONFIG_USB_SERIAL_CP2101=m
2696CONFIG_USB_SERIAL_CYPRESS_M8=m
2697CONFIG_USB_SERIAL_EMPEG=m
2698CONFIG_USB_SERIAL_FTDI_SIO=m
2699CONFIG_USB_SERIAL_FUNSOFT=m
2700CONFIG_USB_SERIAL_VISOR=m
2701CONFIG_USB_SERIAL_IPAQ=m
2702CONFIG_USB_SERIAL_IR=m
2703CONFIG_USB_SERIAL_EDGEPORT=m
2704CONFIG_USB_SERIAL_EDGEPORT_TI=m
2705# CONFIG_USB_SERIAL_GARMIN is not set
2706CONFIG_USB_SERIAL_IPW=m
2707CONFIG_USB_SERIAL_IUU=m
2708CONFIG_USB_SERIAL_KEYSPAN_PDA=m
2709CONFIG_USB_SERIAL_KEYSPAN=m
2710CONFIG_USB_SERIAL_KLSI=m
2711CONFIG_USB_SERIAL_KOBIL_SCT=m
2712CONFIG_USB_SERIAL_MCT_U232=m
2713CONFIG_USB_SERIAL_MOS7720=m
2714CONFIG_USB_SERIAL_MOS7840=m
2715CONFIG_USB_SERIAL_MOTOROLA=m
2716CONFIG_USB_SERIAL_NAVMAN=m
2717CONFIG_USB_SERIAL_PL2303=m
2718CONFIG_USB_SERIAL_OTI6858=m
2719CONFIG_USB_SERIAL_SPCP8X5=m
2720CONFIG_USB_SERIAL_HP4X=m
2721CONFIG_USB_SERIAL_SAFE=m
2722CONFIG_USB_SERIAL_SAFE_PADDED=y
2723CONFIG_USB_SERIAL_SIERRAWIRELESS=m
2724CONFIG_USB_SERIAL_TI=m
2725CONFIG_USB_SERIAL_CYBERJACK=m
2726CONFIG_USB_SERIAL_XIRCOM=m
2727CONFIG_USB_SERIAL_OPTION=m
2728CONFIG_USB_SERIAL_OMNINET=m
2729CONFIG_USB_SERIAL_DEBUG=m
2730
2731#
2732# USB Miscellaneous drivers
2733#
2734CONFIG_USB_EMI62=m
2735CONFIG_USB_EMI26=m
2736CONFIG_USB_ADUTUX=m
2737CONFIG_USB_AUERSWALD=m
2738# CONFIG_USB_RIO500 is not set
2739CONFIG_USB_LEGOTOWER=m
2740CONFIG_USB_LCD=m
2741CONFIG_USB_BERRY_CHARGE=m
2742CONFIG_USB_LED=m
2743# CONFIG_USB_CYPRESS_CY7C63 is not set
2744# CONFIG_USB_CYTHERM is not set
2745CONFIG_USB_PHIDGET=m
2746CONFIG_USB_PHIDGETKIT=m
2747CONFIG_USB_PHIDGETMOTORCONTROL=m
2748CONFIG_USB_PHIDGETSERVO=m
2749CONFIG_USB_IDMOUSE=m
2750CONFIG_USB_FTDI_ELAN=m
2751CONFIG_USB_APPLEDISPLAY=m
2752CONFIG_USB_SISUSBVGA=m
2753CONFIG_USB_SISUSBVGA_CON=y
2754CONFIG_USB_LD=m
2755CONFIG_USB_TRANCEVIBRATOR=m
2756CONFIG_USB_IOWARRIOR=m
2757# CONFIG_USB_TEST is not set
2758CONFIG_USB_ISIGHTFW=m
2759CONFIG_USB_ATM=m
2760CONFIG_USB_SPEEDTOUCH=m
2761CONFIG_USB_CXACRU=m
2762CONFIG_USB_UEAGLEATM=m
2763CONFIG_USB_XUSBATM=m
2764# CONFIG_USB_GADGET is not set
2765# CONFIG_MMC is not set
2766# CONFIG_MEMSTICK is not set
2767CONFIG_NEW_LEDS=y
2768CONFIG_LEDS_CLASS=y
2769
2770#
2771# LED drivers
2772#
2773# CONFIG_LEDS_GPIO is not set
2774
2775#
2776# LED Triggers
2777#
2778CONFIG_LEDS_TRIGGERS=y
2779CONFIG_LEDS_TRIGGER_TIMER=m
2780CONFIG_LEDS_TRIGGER_IDE_DISK=y
2781CONFIG_LEDS_TRIGGER_HEARTBEAT=m
2782CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
2783CONFIG_ACCESSIBILITY=y
2784CONFIG_A11Y_BRAILLE_CONSOLE=y
2785# CONFIG_INFINIBAND is not set
2786CONFIG_EDAC=y
2787
2788#
2789# Reporting subsystems
2790#
2791# CONFIG_EDAC_DEBUG is not set
2792CONFIG_EDAC_MM_EDAC=m
2793CONFIG_RTC_LIB=y
2794CONFIG_RTC_CLASS=y
2795# CONFIG_RTC_HCTOSYS is not set
2796# CONFIG_RTC_DEBUG is not set
2797
2798#
2799# RTC interfaces
2800#
2801CONFIG_RTC_INTF_SYSFS=y
2802CONFIG_RTC_INTF_PROC=y
2803CONFIG_RTC_INTF_DEV=y
2804# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
2805# CONFIG_RTC_DRV_TEST is not set
2806
2807#
2808# I2C RTC drivers
2809#
2810CONFIG_RTC_DRV_DS1307=m
2811CONFIG_RTC_DRV_DS1374=m
2812CONFIG_RTC_DRV_DS1672=m
2813CONFIG_RTC_DRV_MAX6900=m
2814CONFIG_RTC_DRV_RS5C372=m
2815CONFIG_RTC_DRV_ISL1208=m
2816CONFIG_RTC_DRV_X1205=m
2817CONFIG_RTC_DRV_PCF8563=m
2818CONFIG_RTC_DRV_PCF8583=m
2819CONFIG_RTC_DRV_M41T80=m
2820CONFIG_RTC_DRV_M41T80_WDT=y
2821# CONFIG_RTC_DRV_S35390A is not set
2822CONFIG_RTC_DRV_FM3130=m
2823
2824#
2825# SPI RTC drivers
2826#
2827
2828#
2829# Platform RTC drivers
2830#
2831CONFIG_RTC_DRV_CMOS=y
2832CONFIG_RTC_DRV_DS1511=m
2833CONFIG_RTC_DRV_DS1553=m
2834CONFIG_RTC_DRV_DS1742=m
2835CONFIG_RTC_DRV_STK17TA8=m
2836# CONFIG_RTC_DRV_M48T86 is not set
2837CONFIG_RTC_DRV_M48T59=m
2838CONFIG_RTC_DRV_V3020=m
2839
2840#
2841# on-CPU RTC drivers
2842#
2843CONFIG_RTC_DRV_PPC=y
2844CONFIG_DMADEVICES=y
2845
2846#
2847# DMA Devices
2848#
2849# CONFIG_FSL_DMA is not set
2850CONFIG_AUXDISPLAY=y
2851CONFIG_KS0108=m
2852CONFIG_KS0108_PORT=0x378
2853CONFIG_KS0108_DELAY=2
2854CONFIG_UIO=m
2855CONFIG_UIO_CIF=m
2856CONFIG_UIO_SMX=m
2857
2858#
2859# File systems
2860#
2861CONFIG_EXT2_FS=m
2862CONFIG_EXT2_FS_XATTR=y
2863CONFIG_EXT2_FS_POSIX_ACL=y
2864CONFIG_EXT2_FS_SECURITY=y
2865CONFIG_EXT2_FS_XIP=y
2866CONFIG_FS_XIP=y
2867CONFIG_EXT3_FS=m
2868CONFIG_EXT3_FS_XATTR=y
2869CONFIG_EXT3_FS_POSIX_ACL=y
2870CONFIG_EXT3_FS_SECURITY=y
2871CONFIG_EXT4DEV_FS=m
2872CONFIG_EXT4DEV_FS_XATTR=y
2873CONFIG_EXT4DEV_FS_POSIX_ACL=y
2874CONFIG_EXT4DEV_FS_SECURITY=y
2875CONFIG_JBD=m
2876# CONFIG_JBD_DEBUG is not set
2877CONFIG_JBD2=m
2878CONFIG_JBD2_DEBUG=y
2879CONFIG_FS_MBCACHE=m
2880CONFIG_REISERFS_FS=m
2881# CONFIG_REISERFS_CHECK is not set
2882CONFIG_REISERFS_PROC_INFO=y
2883CONFIG_REISERFS_FS_XATTR=y
2884CONFIG_REISERFS_FS_POSIX_ACL=y
2885CONFIG_REISERFS_FS_SECURITY=y
2886CONFIG_JFS_FS=m
2887CONFIG_JFS_POSIX_ACL=y
2888CONFIG_JFS_SECURITY=y
2889# CONFIG_JFS_DEBUG is not set
2890# CONFIG_JFS_STATISTICS is not set
2891CONFIG_FS_POSIX_ACL=y
2892CONFIG_XFS_FS=m
2893CONFIG_XFS_QUOTA=y
2894CONFIG_XFS_POSIX_ACL=y
2895# CONFIG_XFS_RT is not set
2896# CONFIG_XFS_DEBUG is not set
2897CONFIG_GFS2_FS=m
2898CONFIG_GFS2_FS_LOCKING_DLM=m
2899CONFIG_OCFS2_FS=m
2900CONFIG_OCFS2_FS_O2CB=m
2901CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
2902# CONFIG_OCFS2_DEBUG_MASKLOG is not set
2903# CONFIG_OCFS2_DEBUG_FS is not set
2904CONFIG_DNOTIFY=y
2905CONFIG_INOTIFY=y
2906CONFIG_INOTIFY_USER=y
2907CONFIG_QUOTA=y
2908CONFIG_QUOTA_NETLINK_INTERFACE=y
2909# CONFIG_PRINT_QUOTA_WARNING is not set
2910# CONFIG_QFMT_V1 is not set
2911CONFIG_QFMT_V2=y
2912CONFIG_QUOTACTL=y
2913CONFIG_AUTOFS_FS=m
2914CONFIG_AUTOFS4_FS=m
2915CONFIG_FUSE_FS=m
2916CONFIG_GENERIC_ACL=y
2917
2918#
2919# CD-ROM/DVD Filesystems
2920#
2921CONFIG_ISO9660_FS=y
2922CONFIG_JOLIET=y
2923CONFIG_ZISOFS=y
2924CONFIG_UDF_FS=m
2925CONFIG_UDF_NLS=y
2926
2927#
2928# DOS/FAT/NT Filesystems
2929#
2930CONFIG_FAT_FS=m
2931CONFIG_MSDOS_FS=m
2932CONFIG_VFAT_FS=m
2933CONFIG_FAT_DEFAULT_CODEPAGE=437
2934CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
2935# CONFIG_NTFS_FS is not set
2936
2937#
2938# Pseudo filesystems
2939#
2940CONFIG_PROC_FS=y
2941CONFIG_PROC_KCORE=y
2942CONFIG_PROC_SYSCTL=y
2943CONFIG_SYSFS=y
2944CONFIG_TMPFS=y
2945CONFIG_TMPFS_POSIX_ACL=y
2946# CONFIG_HUGETLB_PAGE is not set
2947CONFIG_CONFIGFS_FS=m
2948
2949#
2950# Miscellaneous filesystems
2951#
2952# CONFIG_ADFS_FS is not set
2953CONFIG_AFFS_FS=m
2954CONFIG_ECRYPT_FS=m
2955CONFIG_HFS_FS=m
2956CONFIG_HFSPLUS_FS=m
2957CONFIG_BEFS_FS=m
2958# CONFIG_BEFS_DEBUG is not set
2959CONFIG_BFS_FS=m
2960CONFIG_EFS_FS=m
2961CONFIG_CRAMFS=m
2962CONFIG_SQUASHFS=m
2963# CONFIG_SQUASHFS_EMBEDDED is not set
2964CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
2965CONFIG_VXFS_FS=m
2966CONFIG_MINIX_FS=m
2967# CONFIG_HPFS_FS is not set
2968CONFIG_QNX4FS_FS=m
2969CONFIG_ROMFS_FS=m
2970CONFIG_SYSV_FS=m
2971CONFIG_UFS_FS=m
2972# CONFIG_UFS_FS_WRITE is not set
2973# CONFIG_UFS_DEBUG is not set
2974CONFIG_NETWORK_FILESYSTEMS=y
2975CONFIG_NFS_FS=m
2976CONFIG_NFS_V3=y
2977CONFIG_NFS_V3_ACL=y
2978CONFIG_NFS_V4=y
2979CONFIG_NFSD=m
2980CONFIG_NFSD_V2_ACL=y
2981CONFIG_NFSD_V3=y
2982CONFIG_NFSD_V3_ACL=y
2983CONFIG_NFSD_V4=y
2984CONFIG_LOCKD=m
2985CONFIG_LOCKD_V4=y
2986CONFIG_EXPORTFS=m
2987CONFIG_NFS_ACL_SUPPORT=m
2988CONFIG_NFS_COMMON=y
2989CONFIG_SUNRPC=m
2990CONFIG_SUNRPC_GSS=m
2991CONFIG_SUNRPC_BIND34=y
2992CONFIG_RPCSEC_GSS_KRB5=m
2993CONFIG_RPCSEC_GSS_SPKM3=m
2994# CONFIG_SMB_FS is not set
2995CONFIG_CIFS=m
2996# CONFIG_CIFS_STATS is not set
2997CONFIG_CIFS_WEAK_PW_HASH=y
2998CONFIG_CIFS_XATTR=y
2999CONFIG_CIFS_POSIX=y
3000# CONFIG_CIFS_DEBUG2 is not set
3001CONFIG_CIFS_EXPERIMENTAL=y
3002CONFIG_CIFS_UPCALL=y
3003CONFIG_CIFS_DFS_UPCALL=y
3004CONFIG_NCP_FS=m
3005CONFIG_NCPFS_PACKET_SIGNING=y
3006CONFIG_NCPFS_IOCTL_LOCKING=y
3007CONFIG_NCPFS_STRONG=y
3008CONFIG_NCPFS_NFS_NS=y
3009CONFIG_NCPFS_OS2_NS=y
3010CONFIG_NCPFS_SMALLDOS=y
3011CONFIG_NCPFS_NLS=y
3012CONFIG_NCPFS_EXTRAS=y
3013CONFIG_CODA_FS=m
3014# CONFIG_CODA_FS_OLD_API is not set
3015# CONFIG_AFS_FS is not set
3016CONFIG_9P_FS=m
3017
3018#
3019# Partition Types
3020#
3021CONFIG_PARTITION_ADVANCED=y
3022# CONFIG_ACORN_PARTITION is not set
3023CONFIG_OSF_PARTITION=y
3024CONFIG_AMIGA_PARTITION=y
3025# CONFIG_ATARI_PARTITION is not set
3026CONFIG_MAC_PARTITION=y
3027CONFIG_MSDOS_PARTITION=y
3028CONFIG_BSD_DISKLABEL=y
3029CONFIG_MINIX_SUBPARTITION=y
3030CONFIG_SOLARIS_X86_PARTITION=y
3031CONFIG_UNIXWARE_DISKLABEL=y
3032# CONFIG_LDM_PARTITION is not set
3033CONFIG_SGI_PARTITION=y
3034# CONFIG_ULTRIX_PARTITION is not set
3035CONFIG_SUN_PARTITION=y
3036CONFIG_KARMA_PARTITION=y
3037CONFIG_EFI_PARTITION=y
3038# CONFIG_SYSV68_PARTITION is not set
3039CONFIG_NLS=y
3040CONFIG_NLS_DEFAULT="utf8"
3041CONFIG_NLS_CODEPAGE_437=y
3042CONFIG_NLS_CODEPAGE_737=m
3043CONFIG_NLS_CODEPAGE_775=m
3044CONFIG_NLS_CODEPAGE_850=m
3045CONFIG_NLS_CODEPAGE_852=m
3046CONFIG_NLS_CODEPAGE_855=m
3047CONFIG_NLS_CODEPAGE_857=m
3048CONFIG_NLS_CODEPAGE_860=m
3049CONFIG_NLS_CODEPAGE_861=m
3050CONFIG_NLS_CODEPAGE_862=m
3051CONFIG_NLS_CODEPAGE_863=m
3052CONFIG_NLS_CODEPAGE_864=m
3053CONFIG_NLS_CODEPAGE_865=m
3054CONFIG_NLS_CODEPAGE_866=m
3055CONFIG_NLS_CODEPAGE_869=m
3056CONFIG_NLS_CODEPAGE_936=m
3057CONFIG_NLS_CODEPAGE_950=m
3058CONFIG_NLS_CODEPAGE_932=m
3059CONFIG_NLS_CODEPAGE_949=m
3060CONFIG_NLS_CODEPAGE_874=m
3061CONFIG_NLS_ISO8859_8=m
3062CONFIG_NLS_CODEPAGE_1250=m
3063CONFIG_NLS_CODEPAGE_1251=m
3064CONFIG_NLS_ASCII=y
3065CONFIG_NLS_ISO8859_1=m
3066CONFIG_NLS_ISO8859_2=m
3067CONFIG_NLS_ISO8859_3=m
3068CONFIG_NLS_ISO8859_4=m
3069CONFIG_NLS_ISO8859_5=m
3070CONFIG_NLS_ISO8859_6=m
3071CONFIG_NLS_ISO8859_7=m
3072CONFIG_NLS_ISO8859_9=m
3073CONFIG_NLS_ISO8859_13=m
3074CONFIG_NLS_ISO8859_14=m
3075CONFIG_NLS_ISO8859_15=m
3076CONFIG_NLS_KOI8_R=m
3077CONFIG_NLS_KOI8_U=m
3078CONFIG_NLS_UTF8=m
3079CONFIG_DLM=m
3080CONFIG_DLM_DEBUG=y
3081CONFIG_QE_GPIO=y
3082
3083#
3084# Library routines
3085#
3086CONFIG_BITREVERSE=y
3087# CONFIG_GENERIC_FIND_FIRST_BIT is not set
3088CONFIG_CRC_CCITT=m
3089CONFIG_CRC16=m
3090CONFIG_CRC_T10DIF=m
3091CONFIG_CRC_ITU_T=m
3092CONFIG_CRC32=y
3093# CONFIG_CRC7 is not set
3094CONFIG_LIBCRC32C=m
3095CONFIG_ZLIB_INFLATE=y
3096CONFIG_ZLIB_DEFLATE=m
3097CONFIG_LZO_COMPRESS=m
3098CONFIG_LZO_DECOMPRESS=m
3099CONFIG_TEXTSEARCH=y
3100CONFIG_TEXTSEARCH_KMP=m
3101CONFIG_TEXTSEARCH_BM=m
3102CONFIG_TEXTSEARCH_FSM=m
3103CONFIG_PLIST=y
3104CONFIG_HAS_IOMEM=y
3105CONFIG_HAS_IOPORT=y
3106CONFIG_HAS_DMA=y
3107CONFIG_HAVE_LMB=y
3108
3109#
3110# Kernel hacking
3111#
3112# CONFIG_PRINTK_TIME is not set
3113# CONFIG_ENABLE_WARN_DEPRECATED is not set
3114CONFIG_ENABLE_MUST_CHECK=y
3115CONFIG_FRAME_WARN=1024
3116CONFIG_MAGIC_SYSRQ=y
3117CONFIG_UNUSED_SYMBOLS=y
3118CONFIG_DEBUG_FS=y
3119CONFIG_HEADERS_CHECK=y
3120CONFIG_DEBUG_KERNEL=y
3121CONFIG_DEBUG_SHIRQ=y
3122CONFIG_DETECT_SOFTLOCKUP=y
3123CONFIG_SCHED_DEBUG=y
3124CONFIG_SCHEDSTATS=y
3125CONFIG_TIMER_STATS=y
3126CONFIG_DEBUG_OBJECTS=y
3127# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
3128CONFIG_DEBUG_OBJECTS_FREE=y
3129CONFIG_DEBUG_OBJECTS_TIMERS=y
3130CONFIG_SLUB_DEBUG_ON=y
3131# CONFIG_SLUB_STATS is not set
3132CONFIG_DEBUG_RT_MUTEXES=y
3133CONFIG_DEBUG_PI_LIST=y
3134# CONFIG_RT_MUTEX_TESTER is not set
3135CONFIG_DEBUG_SPINLOCK=y
3136CONFIG_DEBUG_MUTEXES=y
3137CONFIG_DEBUG_SPINLOCK_SLEEP=y
3138# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
3139CONFIG_STACKTRACE=y
3140# CONFIG_DEBUG_KOBJECT is not set
3141CONFIG_DEBUG_HIGHMEM=y
3142CONFIG_DEBUG_BUGVERBOSE=y
3143CONFIG_DEBUG_INFO=y
3144CONFIG_DEBUG_VM=y
3145CONFIG_DEBUG_WRITECOUNT=y
3146CONFIG_DEBUG_LIST=y
3147CONFIG_DEBUG_SG=y
3148CONFIG_FRAME_POINTER=y
3149CONFIG_BOOT_PRINTK_DELAY=y
3150# CONFIG_RCU_TORTURE_TEST is not set
3151# CONFIG_KPROBES_SANITY_TEST is not set
3152# CONFIG_BACKTRACE_SELF_TEST is not set
3153# CONFIG_LKDTM is not set
3154CONFIG_FAULT_INJECTION=y
3155CONFIG_FAILSLAB=y
3156CONFIG_FAIL_PAGE_ALLOC=y
3157CONFIG_FAIL_MAKE_REQUEST=y
3158CONFIG_FAULT_INJECTION_DEBUG_FS=y
3159CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
3160CONFIG_LATENCYTOP=y
3161CONFIG_HAVE_FTRACE=y
3162CONFIG_HAVE_DYNAMIC_FTRACE=y
3163CONFIG_TRACER_MAX_TRACE=y
3164CONFIG_TRACING=y
3165CONFIG_FTRACE=y
3166CONFIG_SCHED_TRACER=y
3167CONFIG_CONTEXT_SWITCH_TRACER=y
3168CONFIG_DYNAMIC_FTRACE=y
3169# CONFIG_FTRACE_STARTUP_TEST is not set
3170# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
3171# CONFIG_SAMPLES is not set
3172CONFIG_DEBUG_STACKOVERFLOW=y
3173CONFIG_DEBUG_STACK_USAGE=y
3174CONFIG_DEBUGGER=y
3175# CONFIG_CODE_PATCHING_SELFTEST is not set
3176# CONFIG_FTR_FIXUP_SELFTEST is not set
3177# CONFIG_KGDB_CONSOLE is not set
3178CONFIG_XMON=y
3179# CONFIG_XMON_DEFAULT is not set
3180CONFIG_XMON_DISASSEMBLY=y
3181CONFIG_IRQSTACKS=y
3182# CONFIG_VIRQ_DEBUG is not set
3183# CONFIG_BDI_SWITCH is not set
3184CONFIG_BOOTX_TEXT=y
3185# CONFIG_PPC_EARLY_DEBUG is not set
3186
3187#
3188# Security options
3189#
3190CONFIG_KEYS=y
3191CONFIG_KEYS_DEBUG_PROC_KEYS=y
3192CONFIG_SECURITY=y
3193CONFIG_SECURITY_NETWORK=y
3194CONFIG_SECURITY_NETWORK_XFRM=y
3195CONFIG_SECURITY_FILE_CAPABILITIES=y
3196# CONFIG_SECURITY_ROOTPLUG is not set
3197CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536
3198CONFIG_SECURITY_SELINUX=y
3199CONFIG_SECURITY_SELINUX_BOOTPARAM=y
3200CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
3201CONFIG_SECURITY_SELINUX_DISABLE=y
3202CONFIG_SECURITY_SELINUX_DEVELOP=y
3203CONFIG_SECURITY_SELINUX_AVC_STATS=y
3204CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
3205CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
3206# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
3207# CONFIG_SECURITY_SMACK is not set
3208CONFIG_XOR_BLOCKS=m
3209CONFIG_ASYNC_CORE=m
3210CONFIG_ASYNC_MEMCPY=m
3211CONFIG_ASYNC_XOR=m
3212CONFIG_CRYPTO=y
3213
3214#
3215# Crypto core or helper
3216#
3217CONFIG_CRYPTO_ALGAPI=y
3218CONFIG_CRYPTO_AEAD=m
3219CONFIG_CRYPTO_BLKCIPHER=m
3220CONFIG_CRYPTO_HASH=y
3221CONFIG_CRYPTO_MANAGER=y
3222CONFIG_CRYPTO_GF128MUL=m
3223CONFIG_CRYPTO_NULL=m
3224# CONFIG_CRYPTO_CRYPTD is not set
3225CONFIG_CRYPTO_AUTHENC=m
3226CONFIG_CRYPTO_TEST=m
3227
3228#
3229# Authenticated Encryption with Associated Data
3230#
3231CONFIG_CRYPTO_CCM=m
3232CONFIG_CRYPTO_GCM=m
3233CONFIG_CRYPTO_SEQIV=m
3234
3235#
3236# Block modes
3237#
3238CONFIG_CRYPTO_CBC=m
3239CONFIG_CRYPTO_CTR=m
3240CONFIG_CRYPTO_CTS=m
3241CONFIG_CRYPTO_ECB=m
3242CONFIG_CRYPTO_LRW=m
3243CONFIG_CRYPTO_PCBC=m
3244CONFIG_CRYPTO_XTS=m
3245
3246#
3247# Hash modes
3248#
3249CONFIG_CRYPTO_HMAC=y
3250CONFIG_CRYPTO_XCBC=m
3251
3252#
3253# Digest
3254#
3255CONFIG_CRYPTO_CRC32C=m
3256CONFIG_CRYPTO_MD4=m
3257CONFIG_CRYPTO_MD5=y
3258CONFIG_CRYPTO_MICHAEL_MIC=m
3259CONFIG_CRYPTO_RMD128=m
3260CONFIG_CRYPTO_RMD160=m
3261CONFIG_CRYPTO_RMD256=m
3262CONFIG_CRYPTO_RMD320=m
3263CONFIG_CRYPTO_SHA1=y
3264CONFIG_CRYPTO_SHA256=m
3265CONFIG_CRYPTO_SHA512=m
3266CONFIG_CRYPTO_TGR192=m
3267CONFIG_CRYPTO_WP512=m
3268
3269#
3270# Ciphers
3271#
3272CONFIG_CRYPTO_AES=m
3273CONFIG_CRYPTO_ANUBIS=m
3274CONFIG_CRYPTO_ARC4=m
3275CONFIG_CRYPTO_BLOWFISH=m
3276CONFIG_CRYPTO_CAMELLIA=m
3277CONFIG_CRYPTO_CAST5=m
3278CONFIG_CRYPTO_CAST6=m
3279CONFIG_CRYPTO_DES=m
3280CONFIG_CRYPTO_FCRYPT=m
3281CONFIG_CRYPTO_KHAZAD=m
3282CONFIG_CRYPTO_SALSA20=m
3283CONFIG_CRYPTO_SEED=m
3284CONFIG_CRYPTO_SERPENT=m
3285CONFIG_CRYPTO_TEA=m
3286CONFIG_CRYPTO_TWOFISH=m
3287CONFIG_CRYPTO_TWOFISH_COMMON=m
3288
3289#
3290# Compression
3291#
3292CONFIG_CRYPTO_DEFLATE=m
3293CONFIG_CRYPTO_LZO=m
3294CONFIG_CRYPTO_HW=y
3295CONFIG_CRYPTO_DEV_HIFN_795X=m
3296CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
3297CONFIG_CRYPTO_DEV_TALITOS=m
3298CONFIG_PPC_CLOCK=y
3299CONFIG_PPC_LIB_RHEAP=y
3300CONFIG_VIRTUALIZATION=y
3301CONFIG_VIRTIO=m
3302CONFIG_VIRTIO_RING=m
3303CONFIG_VIRTIO_PCI=m
3304CONFIG_VIRTIO_BALLOON=m
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 71d79e428d20..f9a3d3b394cf 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.25 3# Linux kernel version: 2.6.26
4# Mon Apr 28 12:39:10 2008 4# Wed Jul 16 13:59:24 2008
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -14,8 +14,9 @@ CONFIG_POWER4=y
14CONFIG_TUNE_CELL=y 14CONFIG_TUNE_CELL=y
15CONFIG_PPC_FPU=y 15CONFIG_PPC_FPU=y
16CONFIG_ALTIVEC=y 16CONFIG_ALTIVEC=y
17# CONFIG_VSX is not set
17CONFIG_PPC_STD_MMU=y 18CONFIG_PPC_STD_MMU=y
18# CONFIG_PPC_MM_SLICES is not set 19CONFIG_PPC_MM_SLICES=y
19CONFIG_VIRT_CPU_ACCOUNTING=y 20CONFIG_VIRT_CPU_ACCOUNTING=y
20CONFIG_SMP=y 21CONFIG_SMP=y
21CONFIG_NR_CPUS=2 22CONFIG_NR_CPUS=2
@@ -31,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y
31CONFIG_HAVE_SETUP_PER_CPU_AREA=y 32CONFIG_HAVE_SETUP_PER_CPU_AREA=y
32CONFIG_IRQ_PER_CPU=y 33CONFIG_IRQ_PER_CPU=y
33CONFIG_STACKTRACE_SUPPORT=y 34CONFIG_STACKTRACE_SUPPORT=y
35CONFIG_HAVE_LATENCYTOP_SUPPORT=y
34CONFIG_TRACE_IRQFLAGS_SUPPORT=y 36CONFIG_TRACE_IRQFLAGS_SUPPORT=y
35CONFIG_LOCKDEP_SUPPORT=y 37CONFIG_LOCKDEP_SUPPORT=y
36CONFIG_RWSEM_XCHGADD_ALGORITHM=y 38CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -90,6 +92,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y
90CONFIG_SYSCTL=y 92CONFIG_SYSCTL=y
91# CONFIG_EMBEDDED is not set 93# CONFIG_EMBEDDED is not set
92CONFIG_SYSCTL_SYSCALL=y 94CONFIG_SYSCTL_SYSCALL=y
95CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_KALLSYMS=y 96CONFIG_KALLSYMS=y
94CONFIG_KALLSYMS_ALL=y 97CONFIG_KALLSYMS_ALL=y
95CONFIG_KALLSYMS_EXTRA_PASS=y 98CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -117,12 +120,15 @@ CONFIG_HAVE_OPROFILE=y
117# CONFIG_KPROBES is not set 120# CONFIG_KPROBES is not set
118CONFIG_HAVE_KPROBES=y 121CONFIG_HAVE_KPROBES=y
119CONFIG_HAVE_KRETPROBES=y 122CONFIG_HAVE_KRETPROBES=y
123CONFIG_HAVE_DMA_ATTRS=y
124CONFIG_USE_GENERIC_SMP_HELPERS=y
120CONFIG_PROC_PAGE_MONITOR=y 125CONFIG_PROC_PAGE_MONITOR=y
121CONFIG_SLABINFO=y 126CONFIG_SLABINFO=y
122CONFIG_RT_MUTEXES=y 127CONFIG_RT_MUTEXES=y
123# CONFIG_TINY_SHMEM is not set 128# CONFIG_TINY_SHMEM is not set
124CONFIG_BASE_SMALL=0 129CONFIG_BASE_SMALL=0
125CONFIG_MODULES=y 130CONFIG_MODULES=y
131# CONFIG_MODULE_FORCE_LOAD is not set
126CONFIG_MODULE_UNLOAD=y 132CONFIG_MODULE_UNLOAD=y
127# CONFIG_MODULE_FORCE_UNLOAD is not set 133# CONFIG_MODULE_FORCE_UNLOAD is not set
128# CONFIG_MODVERSIONS is not set 134# CONFIG_MODVERSIONS is not set
@@ -132,6 +138,7 @@ CONFIG_STOP_MACHINE=y
132CONFIG_BLOCK=y 138CONFIG_BLOCK=y
133# CONFIG_BLK_DEV_IO_TRACE is not set 139# CONFIG_BLK_DEV_IO_TRACE is not set
134CONFIG_BLK_DEV_BSG=y 140CONFIG_BLK_DEV_BSG=y
141# CONFIG_BLK_DEV_INTEGRITY is not set
135CONFIG_BLOCK_COMPAT=y 142CONFIG_BLOCK_COMPAT=y
136 143
137# 144#
@@ -152,13 +159,8 @@ CONFIG_CLASSIC_RCU=y
152# Platform support 159# Platform support
153# 160#
154CONFIG_PPC_MULTIPLATFORM=y 161CONFIG_PPC_MULTIPLATFORM=y
155# CONFIG_PPC_82xx is not set
156# CONFIG_PPC_83xx is not set
157# CONFIG_PPC_86xx is not set
158# CONFIG_PPC_PSERIES is not set 162# CONFIG_PPC_PSERIES is not set
159# CONFIG_PPC_ISERIES is not set 163# CONFIG_PPC_ISERIES is not set
160# CONFIG_PPC_MPC512x is not set
161# CONFIG_PPC_MPC5121 is not set
162# CONFIG_PPC_PMAC is not set 164# CONFIG_PPC_PMAC is not set
163# CONFIG_PPC_MAPLE is not set 165# CONFIG_PPC_MAPLE is not set
164# CONFIG_PPC_PASEMI is not set 166# CONFIG_PPC_PASEMI is not set
@@ -187,6 +189,7 @@ CONFIG_PPC_CELL=y
187# Cell Broadband Engine options 189# Cell Broadband Engine options
188# 190#
189CONFIG_SPU_FS=y 191CONFIG_SPU_FS=y
192CONFIG_SPU_FS_64K_LS=y
190CONFIG_SPU_BASE=y 193CONFIG_SPU_BASE=y
191# CONFIG_PQ2ADS is not set 194# CONFIG_PQ2ADS is not set
192# CONFIG_IPIC is not set 195# CONFIG_IPIC is not set
@@ -222,6 +225,7 @@ CONFIG_PREEMPT_NONE=y
222CONFIG_BINFMT_ELF=y 225CONFIG_BINFMT_ELF=y
223CONFIG_COMPAT_BINFMT_ELF=y 226CONFIG_COMPAT_BINFMT_ELF=y
224CONFIG_BINFMT_MISC=y 227CONFIG_BINFMT_MISC=y
228CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
225# CONFIG_IOMMU_VMERGE is not set 229# CONFIG_IOMMU_VMERGE is not set
226CONFIG_IOMMU_HELPER=y 230CONFIG_IOMMU_HELPER=y
227CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 231CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -248,18 +252,22 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
248# CONFIG_SPARSEMEM_VMEMMAP is not set 252# CONFIG_SPARSEMEM_VMEMMAP is not set
249CONFIG_MEMORY_HOTPLUG=y 253CONFIG_MEMORY_HOTPLUG=y
250CONFIG_MEMORY_HOTPLUG_SPARSE=y 254CONFIG_MEMORY_HOTPLUG_SPARSE=y
255CONFIG_PAGEFLAGS_EXTENDED=y
251CONFIG_SPLIT_PTLOCK_CPUS=4 256CONFIG_SPLIT_PTLOCK_CPUS=4
252CONFIG_RESOURCES_64BIT=y 257CONFIG_RESOURCES_64BIT=y
253CONFIG_ZONE_DMA_FLAG=1 258CONFIG_ZONE_DMA_FLAG=1
254CONFIG_BOUNCE=y 259CONFIG_BOUNCE=y
255CONFIG_ARCH_MEMORY_PROBE=y 260CONFIG_ARCH_MEMORY_PROBE=y
256# CONFIG_PPC_HAS_HASH_64K is not set 261CONFIG_PPC_HAS_HASH_64K=y
257# CONFIG_PPC_64K_PAGES is not set 262# CONFIG_PPC_64K_PAGES is not set
258CONFIG_FORCE_MAX_ZONEORDER=13 263CONFIG_FORCE_MAX_ZONEORDER=13
259# CONFIG_SCHED_SMT is not set 264CONFIG_SCHED_SMT=y
260CONFIG_PROC_DEVICETREE=y 265CONFIG_PROC_DEVICETREE=y
261# CONFIG_CMDLINE_BOOL is not set 266# CONFIG_CMDLINE_BOOL is not set
262# CONFIG_PM is not set 267CONFIG_EXTRA_TARGETS=""
268CONFIG_PM=y
269CONFIG_PM_DEBUG=y
270# CONFIG_PM_VERBOSE is not set
263# CONFIG_SECCOMP is not set 271# CONFIG_SECCOMP is not set
264CONFIG_ISA_DMA_API=y 272CONFIG_ISA_DMA_API=y
265 273
@@ -273,6 +281,7 @@ CONFIG_GENERIC_ISA_DMA=y
273# CONFIG_PCI_SYSCALL is not set 281# CONFIG_PCI_SYSCALL is not set
274# CONFIG_ARCH_SUPPORTS_MSI is not set 282# CONFIG_ARCH_SUPPORTS_MSI is not set
275# CONFIG_PCCARD is not set 283# CONFIG_PCCARD is not set
284# CONFIG_HAS_RAPIDIO is not set
276CONFIG_PAGE_OFFSET=0xc000000000000000 285CONFIG_PAGE_OFFSET=0xc000000000000000
277CONFIG_KERNEL_START=0xc000000000000000 286CONFIG_KERNEL_START=0xc000000000000000
278CONFIG_PHYSICAL_START=0x00000000 287CONFIG_PHYSICAL_START=0x00000000
@@ -412,6 +421,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
412CONFIG_STANDALONE=y 421CONFIG_STANDALONE=y
413CONFIG_PREVENT_FIRMWARE_BUILD=y 422CONFIG_PREVENT_FIRMWARE_BUILD=y
414CONFIG_FW_LOADER=m 423CONFIG_FW_LOADER=m
424# CONFIG_FIRMWARE_IN_KERNEL is not set
425CONFIG_EXTRA_FIRMWARE=""
415# CONFIG_DEBUG_DRIVER is not set 426# CONFIG_DEBUG_DRIVER is not set
416# CONFIG_DEBUG_DEVRES is not set 427# CONFIG_DEBUG_DEVRES is not set
417# CONFIG_SYS_HYPERVISOR is not set 428# CONFIG_SYS_HYPERVISOR is not set
@@ -478,6 +489,7 @@ CONFIG_SCSI_WAIT_SCAN=m
478# CONFIG_SCSI_SAS_LIBSAS is not set 489# CONFIG_SCSI_SAS_LIBSAS is not set
479# CONFIG_SCSI_SRP_ATTRS is not set 490# CONFIG_SCSI_SRP_ATTRS is not set
480# CONFIG_SCSI_LOWLEVEL is not set 491# CONFIG_SCSI_LOWLEVEL is not set
492# CONFIG_SCSI_DH is not set
481# CONFIG_ATA is not set 493# CONFIG_ATA is not set
482# CONFIG_MD is not set 494# CONFIG_MD is not set
483# CONFIG_MACINTOSH_DRIVERS is not set 495# CONFIG_MACINTOSH_DRIVERS is not set
@@ -533,8 +545,18 @@ CONFIG_USB_NET_MCS7830=m
533# CONFIG_USB_NET_CDC_SUBSET is not set 545# CONFIG_USB_NET_CDC_SUBSET is not set
534# CONFIG_USB_NET_ZAURUS is not set 546# CONFIG_USB_NET_ZAURUS is not set
535# CONFIG_WAN is not set 547# CONFIG_WAN is not set
536# CONFIG_PPP is not set 548CONFIG_PPP=m
549CONFIG_PPP_MULTILINK=y
550# CONFIG_PPP_FILTER is not set
551CONFIG_PPP_ASYNC=m
552# CONFIG_PPP_SYNC_TTY is not set
553CONFIG_PPP_DEFLATE=m
554# CONFIG_PPP_BSDCOMP is not set
555# CONFIG_PPP_MPPE is not set
556CONFIG_PPPOE=m
557# CONFIG_PPPOL2TP is not set
537# CONFIG_SLIP is not set 558# CONFIG_SLIP is not set
559CONFIG_SLHC=m
538# CONFIG_NETCONSOLE is not set 560# CONFIG_NETCONSOLE is not set
539# CONFIG_NETPOLL is not set 561# CONFIG_NETPOLL is not set
540# CONFIG_NET_POLL_CONTROLLER is not set 562# CONFIG_NET_POLL_CONTROLLER is not set
@@ -603,6 +625,7 @@ CONFIG_VT=y
603CONFIG_VT_CONSOLE=y 625CONFIG_VT_CONSOLE=y
604CONFIG_HW_CONSOLE=y 626CONFIG_HW_CONSOLE=y
605CONFIG_VT_HW_CONSOLE_BINDING=y 627CONFIG_VT_HW_CONSOLE_BINDING=y
628CONFIG_DEVKMEM=y
606# CONFIG_SERIAL_NONSTANDARD is not set 629# CONFIG_SERIAL_NONSTANDARD is not set
607 630
608# 631#
@@ -618,23 +641,17 @@ CONFIG_LEGACY_PTYS=y
618CONFIG_LEGACY_PTY_COUNT=16 641CONFIG_LEGACY_PTY_COUNT=16
619# CONFIG_IPMI_HANDLER is not set 642# CONFIG_IPMI_HANDLER is not set
620# CONFIG_HW_RANDOM is not set 643# CONFIG_HW_RANDOM is not set
621CONFIG_GEN_RTC=y
622# CONFIG_GEN_RTC_X is not set
623# CONFIG_R3964 is not set 644# CONFIG_R3964 is not set
624# CONFIG_RAW_DRIVER is not set 645# CONFIG_RAW_DRIVER is not set
625# CONFIG_HANGCHECK_TIMER is not set 646# CONFIG_HANGCHECK_TIMER is not set
626# CONFIG_TCG_TPM is not set 647# CONFIG_TCG_TPM is not set
627# CONFIG_I2C is not set 648# CONFIG_I2C is not set
628
629#
630# SPI support
631#
632# CONFIG_SPI is not set 649# CONFIG_SPI is not set
633# CONFIG_SPI_MASTER is not set
634# CONFIG_W1 is not set 650# CONFIG_W1 is not set
635# CONFIG_POWER_SUPPLY is not set 651# CONFIG_POWER_SUPPLY is not set
636# CONFIG_HWMON is not set 652# CONFIG_HWMON is not set
637# CONFIG_THERMAL is not set 653# CONFIG_THERMAL is not set
654# CONFIG_THERMAL_HWMON is not set
638# CONFIG_WATCHDOG is not set 655# CONFIG_WATCHDOG is not set
639 656
640# 657#
@@ -652,8 +669,17 @@ CONFIG_SSB_POSSIBLE=y
652# 669#
653# Multimedia devices 670# Multimedia devices
654# 671#
672
673#
674# Multimedia core support
675#
655# CONFIG_VIDEO_DEV is not set 676# CONFIG_VIDEO_DEV is not set
656# CONFIG_DVB_CORE is not set 677# CONFIG_DVB_CORE is not set
678# CONFIG_VIDEO_MEDIA is not set
679
680#
681# Multimedia drivers
682#
657# CONFIG_DAB is not set 683# CONFIG_DAB is not set
658 684
659# 685#
@@ -671,8 +697,8 @@ CONFIG_FB=y
671CONFIG_FB_SYS_FILLRECT=y 697CONFIG_FB_SYS_FILLRECT=y
672CONFIG_FB_SYS_COPYAREA=y 698CONFIG_FB_SYS_COPYAREA=y
673CONFIG_FB_SYS_IMAGEBLIT=y 699CONFIG_FB_SYS_IMAGEBLIT=y
700# CONFIG_FB_FOREIGN_ENDIAN is not set
674CONFIG_FB_SYS_FOPS=y 701CONFIG_FB_SYS_FOPS=y
675CONFIG_FB_DEFERRED_IO=y
676# CONFIG_FB_SVGALIB is not set 702# CONFIG_FB_SVGALIB is not set
677# CONFIG_FB_MACMODES is not set 703# CONFIG_FB_MACMODES is not set
678# CONFIG_FB_BACKLIGHT is not set 704# CONFIG_FB_BACKLIGHT is not set
@@ -712,18 +738,12 @@ CONFIG_FB_LOGO_EXTRA=y
712# CONFIG_LOGO_LINUX_MONO is not set 738# CONFIG_LOGO_LINUX_MONO is not set
713# CONFIG_LOGO_LINUX_VGA16 is not set 739# CONFIG_LOGO_LINUX_VGA16 is not set
714CONFIG_LOGO_LINUX_CLUT224=y 740CONFIG_LOGO_LINUX_CLUT224=y
715
716#
717# Sound
718#
719CONFIG_SOUND=m 741CONFIG_SOUND=m
720
721#
722# Advanced Linux Sound Architecture
723#
724CONFIG_SND=m 742CONFIG_SND=m
725CONFIG_SND_TIMER=m 743CONFIG_SND_TIMER=m
726CONFIG_SND_PCM=m 744CONFIG_SND_PCM=m
745CONFIG_SND_HWDEP=m
746CONFIG_SND_RAWMIDI=m
727# CONFIG_SND_SEQUENCER is not set 747# CONFIG_SND_SEQUENCER is not set
728# CONFIG_SND_MIXER_OSS is not set 748# CONFIG_SND_MIXER_OSS is not set
729# CONFIG_SND_PCM_OSS is not set 749# CONFIG_SND_PCM_OSS is not set
@@ -732,53 +752,20 @@ CONFIG_SND_SUPPORT_OLD_API=y
732CONFIG_SND_VERBOSE_PROCFS=y 752CONFIG_SND_VERBOSE_PROCFS=y
733# CONFIG_SND_VERBOSE_PRINTK is not set 753# CONFIG_SND_VERBOSE_PRINTK is not set
734# CONFIG_SND_DEBUG is not set 754# CONFIG_SND_DEBUG is not set
735 755# CONFIG_SND_DRIVERS is not set
736# 756CONFIG_SND_PPC=y
737# Generic devices
738#
739# CONFIG_SND_DUMMY is not set
740# CONFIG_SND_MTPAV is not set
741# CONFIG_SND_SERIAL_U16550 is not set
742# CONFIG_SND_MPU401 is not set
743
744#
745# ALSA PowerMac devices
746#
747
748#
749# ALSA PowerMac requires I2C
750#
751
752#
753# ALSA PowerPC devices
754#
755CONFIG_SND_PS3=m 757CONFIG_SND_PS3=m
756CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 758CONFIG_SND_PS3_DEFAULT_START_DELAY=2000
757 759CONFIG_SND_USB=y
758# 760CONFIG_SND_USB_AUDIO=m
759# USB devices
760#
761# CONFIG_SND_USB_AUDIO is not set
762# CONFIG_SND_USB_USX2Y is not set 761# CONFIG_SND_USB_USX2Y is not set
763# CONFIG_SND_USB_CAIAQ is not set 762# CONFIG_SND_USB_CAIAQ is not set
764
765#
766# System on Chip audio support
767#
768# CONFIG_SND_SOC is not set 763# CONFIG_SND_SOC is not set
769
770#
771# ALSA SoC audio for Freescale SOCs
772#
773
774#
775# Open Sound System
776#
777# CONFIG_SOUND_PRIME is not set 764# CONFIG_SOUND_PRIME is not set
778CONFIG_HID_SUPPORT=y 765CONFIG_HID_SUPPORT=y
779CONFIG_HID=y 766CONFIG_HID=y
780# CONFIG_HID_DEBUG is not set 767# CONFIG_HID_DEBUG is not set
781# CONFIG_HIDRAW is not set 768CONFIG_HIDRAW=y
782 769
783# 770#
784# USB Input Devices 771# USB Input Devices
@@ -807,17 +794,20 @@ CONFIG_USB=m
807CONFIG_USB_DEVICEFS=y 794CONFIG_USB_DEVICEFS=y
808# CONFIG_USB_DEVICE_CLASS is not set 795# CONFIG_USB_DEVICE_CLASS is not set
809# CONFIG_USB_DYNAMIC_MINORS is not set 796# CONFIG_USB_DYNAMIC_MINORS is not set
797CONFIG_USB_SUSPEND=y
810# CONFIG_USB_OTG is not set 798# CONFIG_USB_OTG is not set
811 799
812# 800#
813# USB Host Controller Drivers 801# USB Host Controller Drivers
814# 802#
803# CONFIG_USB_C67X00_HCD is not set
815CONFIG_USB_EHCI_HCD=m 804CONFIG_USB_EHCI_HCD=m
816# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 805# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
817# CONFIG_USB_EHCI_TT_NEWSCHED is not set 806# CONFIG_USB_EHCI_TT_NEWSCHED is not set
818CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y 807CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
819# CONFIG_USB_EHCI_HCD_PPC_OF is not set 808# CONFIG_USB_EHCI_HCD_PPC_OF is not set
820# CONFIG_USB_ISP116X_HCD is not set 809# CONFIG_USB_ISP116X_HCD is not set
810# CONFIG_USB_ISP1760_HCD is not set
821CONFIG_USB_OHCI_HCD=m 811CONFIG_USB_OHCI_HCD=m
822# CONFIG_USB_OHCI_HCD_PPC_OF is not set 812# CONFIG_USB_OHCI_HCD_PPC_OF is not set
823# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 813# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
@@ -831,6 +821,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
831# 821#
832# CONFIG_USB_ACM is not set 822# CONFIG_USB_ACM is not set
833# CONFIG_USB_PRINTER is not set 823# CONFIG_USB_PRINTER is not set
824# CONFIG_USB_WDM is not set
834 825
835# 826#
836# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 827# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -890,12 +881,45 @@ CONFIG_USB_MON=y
890# CONFIG_USB_TRANCEVIBRATOR is not set 881# CONFIG_USB_TRANCEVIBRATOR is not set
891# CONFIG_USB_IOWARRIOR is not set 882# CONFIG_USB_IOWARRIOR is not set
892# CONFIG_USB_TEST is not set 883# CONFIG_USB_TEST is not set
884# CONFIG_USB_ISIGHTFW is not set
893# CONFIG_USB_GADGET is not set 885# CONFIG_USB_GADGET is not set
894# CONFIG_MMC is not set 886# CONFIG_MMC is not set
895# CONFIG_MEMSTICK is not set 887# CONFIG_MEMSTICK is not set
896# CONFIG_NEW_LEDS is not set 888# CONFIG_NEW_LEDS is not set
889# CONFIG_ACCESSIBILITY is not set
897# CONFIG_EDAC is not set 890# CONFIG_EDAC is not set
898# CONFIG_RTC_CLASS is not set 891CONFIG_RTC_LIB=m
892CONFIG_RTC_CLASS=m
893
894#
895# RTC interfaces
896#
897CONFIG_RTC_INTF_SYSFS=y
898CONFIG_RTC_INTF_PROC=y
899CONFIG_RTC_INTF_DEV=y
900# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
901# CONFIG_RTC_DRV_TEST is not set
902
903#
904# SPI RTC drivers
905#
906
907#
908# Platform RTC drivers
909#
910# CONFIG_RTC_DRV_CMOS is not set
911# CONFIG_RTC_DRV_DS1511 is not set
912# CONFIG_RTC_DRV_DS1553 is not set
913# CONFIG_RTC_DRV_DS1742 is not set
914# CONFIG_RTC_DRV_STK17TA8 is not set
915# CONFIG_RTC_DRV_M48T86 is not set
916# CONFIG_RTC_DRV_M48T59 is not set
917# CONFIG_RTC_DRV_V3020 is not set
918
919#
920# on-CPU RTC drivers
921#
922CONFIG_RTC_DRV_PPC=m
899# CONFIG_DMADEVICES is not set 923# CONFIG_DMADEVICES is not set
900# CONFIG_UIO is not set 924# CONFIG_UIO is not set
901 925
@@ -911,6 +935,7 @@ CONFIG_EXT3_FS_XATTR=y
911# CONFIG_EXT3_FS_SECURITY is not set 935# CONFIG_EXT3_FS_SECURITY is not set
912# CONFIG_EXT4DEV_FS is not set 936# CONFIG_EXT4DEV_FS is not set
913CONFIG_JBD=y 937CONFIG_JBD=y
938# CONFIG_JBD_DEBUG is not set
914CONFIG_FS_MBCACHE=y 939CONFIG_FS_MBCACHE=y
915# CONFIG_REISERFS_FS is not set 940# CONFIG_REISERFS_FS is not set
916# CONFIG_JFS_FS is not set 941# CONFIG_JFS_FS is not set
@@ -959,8 +984,8 @@ CONFIG_PROC_SYSCTL=y
959CONFIG_SYSFS=y 984CONFIG_SYSFS=y
960CONFIG_TMPFS=y 985CONFIG_TMPFS=y
961# CONFIG_TMPFS_POSIX_ACL is not set 986# CONFIG_TMPFS_POSIX_ACL is not set
962# CONFIG_HUGETLBFS is not set 987CONFIG_HUGETLBFS=y
963# CONFIG_HUGETLB_PAGE is not set 988CONFIG_HUGETLB_PAGE=y
964# CONFIG_CONFIGFS_FS is not set 989# CONFIG_CONFIGFS_FS is not set
965 990
966# 991#
@@ -1059,12 +1084,15 @@ CONFIG_NLS_ISO8859_1=y
1059# 1084#
1060CONFIG_BITREVERSE=y 1085CONFIG_BITREVERSE=y
1061# CONFIG_GENERIC_FIND_FIRST_BIT is not set 1086# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1062# CONFIG_CRC_CCITT is not set 1087CONFIG_CRC_CCITT=m
1063# CONFIG_CRC16 is not set 1088# CONFIG_CRC16 is not set
1089# CONFIG_CRC_T10DIF is not set
1064CONFIG_CRC_ITU_T=m 1090CONFIG_CRC_ITU_T=m
1065CONFIG_CRC32=y 1091CONFIG_CRC32=y
1066# CONFIG_CRC7 is not set 1092# CONFIG_CRC7 is not set
1067# CONFIG_LIBCRC32C is not set 1093# CONFIG_LIBCRC32C is not set
1094CONFIG_ZLIB_INFLATE=m
1095CONFIG_ZLIB_DEFLATE=m
1068CONFIG_LZO_COMPRESS=m 1096CONFIG_LZO_COMPRESS=m
1069CONFIG_LZO_DECOMPRESS=m 1097CONFIG_LZO_DECOMPRESS=m
1070CONFIG_PLIST=y 1098CONFIG_PLIST=y
@@ -1082,7 +1110,7 @@ CONFIG_ENABLE_MUST_CHECK=y
1082CONFIG_FRAME_WARN=2048 1110CONFIG_FRAME_WARN=2048
1083CONFIG_MAGIC_SYSRQ=y 1111CONFIG_MAGIC_SYSRQ=y
1084# CONFIG_UNUSED_SYMBOLS is not set 1112# CONFIG_UNUSED_SYMBOLS is not set
1085# CONFIG_DEBUG_FS is not set 1113CONFIG_DEBUG_FS=y
1086# CONFIG_HEADERS_CHECK is not set 1114# CONFIG_HEADERS_CHECK is not set
1087CONFIG_DEBUG_KERNEL=y 1115CONFIG_DEBUG_KERNEL=y
1088# CONFIG_DEBUG_SHIRQ is not set 1116# CONFIG_DEBUG_SHIRQ is not set
@@ -1090,33 +1118,49 @@ CONFIG_DETECT_SOFTLOCKUP=y
1090CONFIG_SCHED_DEBUG=y 1118CONFIG_SCHED_DEBUG=y
1091# CONFIG_SCHEDSTATS is not set 1119# CONFIG_SCHEDSTATS is not set
1092# CONFIG_TIMER_STATS is not set 1120# CONFIG_TIMER_STATS is not set
1121# CONFIG_DEBUG_OBJECTS is not set
1093# CONFIG_DEBUG_SLAB is not set 1122# CONFIG_DEBUG_SLAB is not set
1094# CONFIG_DEBUG_RT_MUTEXES is not set 1123# CONFIG_DEBUG_RT_MUTEXES is not set
1095# CONFIG_RT_MUTEX_TESTER is not set 1124# CONFIG_RT_MUTEX_TESTER is not set
1096CONFIG_DEBUG_SPINLOCK=y 1125CONFIG_DEBUG_SPINLOCK=y
1097CONFIG_DEBUG_MUTEXES=y 1126CONFIG_DEBUG_MUTEXES=y
1098# CONFIG_DEBUG_LOCK_ALLOC is not set 1127CONFIG_DEBUG_LOCK_ALLOC=y
1099# CONFIG_PROVE_LOCKING is not set 1128CONFIG_PROVE_LOCKING=y
1129CONFIG_LOCKDEP=y
1100# CONFIG_LOCK_STAT is not set 1130# CONFIG_LOCK_STAT is not set
1131CONFIG_DEBUG_LOCKDEP=y
1132CONFIG_TRACE_IRQFLAGS=y
1101CONFIG_DEBUG_SPINLOCK_SLEEP=y 1133CONFIG_DEBUG_SPINLOCK_SLEEP=y
1102# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 1134# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
1135CONFIG_STACKTRACE=y
1103# CONFIG_DEBUG_KOBJECT is not set 1136# CONFIG_DEBUG_KOBJECT is not set
1104CONFIG_DEBUG_BUGVERBOSE=y 1137CONFIG_DEBUG_BUGVERBOSE=y
1105CONFIG_DEBUG_INFO=y 1138CONFIG_DEBUG_INFO=y
1106# CONFIG_DEBUG_VM is not set 1139# CONFIG_DEBUG_VM is not set
1107# CONFIG_DEBUG_WRITECOUNT is not set 1140CONFIG_DEBUG_WRITECOUNT=y
1108CONFIG_DEBUG_LIST=y 1141CONFIG_DEBUG_LIST=y
1109# CONFIG_DEBUG_SG is not set 1142# CONFIG_DEBUG_SG is not set
1143CONFIG_FRAME_POINTER=y
1110# CONFIG_BOOT_PRINTK_DELAY is not set 1144# CONFIG_BOOT_PRINTK_DELAY is not set
1111# CONFIG_RCU_TORTURE_TEST is not set 1145# CONFIG_RCU_TORTURE_TEST is not set
1112# CONFIG_BACKTRACE_SELF_TEST is not set 1146# CONFIG_BACKTRACE_SELF_TEST is not set
1113# CONFIG_FAULT_INJECTION is not set 1147# CONFIG_FAULT_INJECTION is not set
1148# CONFIG_LATENCYTOP is not set
1149CONFIG_HAVE_FTRACE=y
1150CONFIG_HAVE_DYNAMIC_FTRACE=y
1151# CONFIG_FTRACE is not set
1152# CONFIG_IRQSOFF_TRACER is not set
1153# CONFIG_SCHED_TRACER is not set
1154# CONFIG_CONTEXT_SWITCH_TRACER is not set
1114# CONFIG_SAMPLES is not set 1155# CONFIG_SAMPLES is not set
1115CONFIG_DEBUG_STACKOVERFLOW=y 1156CONFIG_DEBUG_STACKOVERFLOW=y
1116# CONFIG_DEBUG_STACK_USAGE is not set 1157# CONFIG_DEBUG_STACK_USAGE is not set
1117# CONFIG_DEBUG_PAGEALLOC is not set 1158# CONFIG_DEBUG_PAGEALLOC is not set
1118# CONFIG_DEBUGGER is not set 1159# CONFIG_DEBUGGER is not set
1160# CONFIG_CODE_PATCHING_SELFTEST is not set
1161# CONFIG_FTR_FIXUP_SELFTEST is not set
1119CONFIG_IRQSTACKS=y 1162CONFIG_IRQSTACKS=y
1163# CONFIG_VIRQ_DEBUG is not set
1120# CONFIG_BOOTX_TEXT is not set 1164# CONFIG_BOOTX_TEXT is not set
1121# CONFIG_PPC_EARLY_DEBUG is not set 1165# CONFIG_PPC_EARLY_DEBUG is not set
1122 1166
@@ -1172,6 +1216,10 @@ CONFIG_CRYPTO_PCBC=m
1172# CONFIG_CRYPTO_MD4 is not set 1216# CONFIG_CRYPTO_MD4 is not set
1173CONFIG_CRYPTO_MD5=y 1217CONFIG_CRYPTO_MD5=y
1174CONFIG_CRYPTO_MICHAEL_MIC=m 1218CONFIG_CRYPTO_MICHAEL_MIC=m
1219# CONFIG_CRYPTO_RMD128 is not set
1220# CONFIG_CRYPTO_RMD160 is not set
1221# CONFIG_CRYPTO_RMD256 is not set
1222# CONFIG_CRYPTO_RMD320 is not set
1175# CONFIG_CRYPTO_SHA1 is not set 1223# CONFIG_CRYPTO_SHA1 is not set
1176# CONFIG_CRYPTO_SHA256 is not set 1224# CONFIG_CRYPTO_SHA256 is not set
1177# CONFIG_CRYPTO_SHA512 is not set 1225# CONFIG_CRYPTO_SHA512 is not set
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index bf0b1fd0ec34..1a4094704b1f 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -74,6 +74,7 @@ obj-y += time.o prom.o traps.o setup-common.o \
74 misc_$(CONFIG_WORD_SIZE).o 74 misc_$(CONFIG_WORD_SIZE).o
75obj-$(CONFIG_PPC32) += entry_32.o setup_32.o 75obj-$(CONFIG_PPC32) += entry_32.o setup_32.o
76obj-$(CONFIG_PPC64) += dma_64.o iommu.o 76obj-$(CONFIG_PPC64) += dma_64.o iommu.o
77obj-$(CONFIG_KGDB) += kgdb.o
77obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o 78obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
78obj-$(CONFIG_MODULES) += ppc_ksyms.o 79obj-$(CONFIG_MODULES) += ppc_ksyms.o
79obj-$(CONFIG_BOOTX_TEXT) += btext.o 80obj-$(CONFIG_BOOTX_TEXT) += btext.o
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index f7f3c215d06f..b936a1dd0a50 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -355,6 +355,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
355 .icache_bsize = 128, 355 .icache_bsize = 128,
356 .dcache_bsize = 128, 356 .dcache_bsize = 128,
357 .machine_check = machine_check_generic, 357 .machine_check = machine_check_generic,
358 .oprofile_cpu_type = "ppc64/compat-power5+",
358 .platform = "power5+", 359 .platform = "power5+",
359 }, 360 },
360 { /* Power6 */ 361 { /* Power6 */
@@ -386,6 +387,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
386 .icache_bsize = 128, 387 .icache_bsize = 128,
387 .dcache_bsize = 128, 388 .dcache_bsize = 128,
388 .machine_check = machine_check_generic, 389 .machine_check = machine_check_generic,
390 .oprofile_cpu_type = "ppc64/compat-power6",
389 .platform = "power6", 391 .platform = "power6",
390 }, 392 },
391 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */ 393 { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
@@ -397,6 +399,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
397 .icache_bsize = 128, 399 .icache_bsize = 128,
398 .dcache_bsize = 128, 400 .dcache_bsize = 128,
399 .machine_check = machine_check_generic, 401 .machine_check = machine_check_generic,
402 .oprofile_cpu_type = "ppc64/compat-power7",
400 .platform = "power7", 403 .platform = "power7",
401 }, 404 },
402 { /* Power7 */ 405 { /* Power7 */
@@ -1629,6 +1632,23 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
1629 t->cpu_setup = s->cpu_setup; 1632 t->cpu_setup = s->cpu_setup;
1630 t->cpu_restore = s->cpu_restore; 1633 t->cpu_restore = s->cpu_restore;
1631 t->platform = s->platform; 1634 t->platform = s->platform;
1635 /*
1636 * If we have passed through this logic once
1637 * before and have pulled the default case
1638 * because the real PVR was not found inside
1639 * cpu_specs[], then we are possibly running in
1640 * compatibility mode. In that case, let the
1641 * oprofiler know which set of compatibility
1642 * counters to pull from by making sure the
1643 * oprofile_cpu_type string is set to that of
1644 * compatibility mode. If the oprofile_cpu_type
1645 * already has a value, then we are possibly
1646 * overriding a real PVR with a logical one, and,
1647 * in that case, keep the current value for
1648 * oprofile_cpu_type.
1649 */
1650 if (t->oprofile_cpu_type == NULL)
1651 t->oprofile_cpu_type = s->oprofile_cpu_type;
1632 } else 1652 } else
1633 *t = *s; 1653 *t = *s;
1634 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; 1654 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index c4268500e856..3cb52fa0eda3 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -151,16 +151,11 @@ skpinv: addi r6,r6,1 /* Increment */
151 /* Invalidate TLB0 */ 151 /* Invalidate TLB0 */
152 li r6,0x04 152 li r6,0x04
153 tlbivax 0,r6 153 tlbivax 0,r6
154#ifdef CONFIG_SMP 154 TLBSYNC
155 tlbsync
156#endif
157 /* Invalidate TLB1 */ 155 /* Invalidate TLB1 */
158 li r6,0x0c 156 li r6,0x0c
159 tlbivax 0,r6 157 tlbivax 0,r6
160#ifdef CONFIG_SMP 158 TLBSYNC
161 tlbsync
162#endif
163 msync
164 159
165/* 3. Setup a temp mapping and jump to it */ 160/* 3. Setup a temp mapping and jump to it */
166 andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */ 161 andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */
@@ -238,10 +233,7 @@ skpinv: addi r6,r6,1 /* Increment */
238 /* Invalidate TLB1 */ 233 /* Invalidate TLB1 */
239 li r9,0x0c 234 li r9,0x0c
240 tlbivax 0,r9 235 tlbivax 0,r9
241#ifdef CONFIG_SMP 236 TLBSYNC
242 tlbsync
243#endif
244 msync
245 237
246/* 6. Setup KERNELBASE mapping in TLB1[0] */ 238/* 6. Setup KERNELBASE mapping in TLB1[0] */
247 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */ 239 lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */
@@ -283,10 +275,7 @@ skpinv: addi r6,r6,1 /* Increment */
283 /* Invalidate TLB1 */ 275 /* Invalidate TLB1 */
284 li r9,0x0c 276 li r9,0x0c
285 tlbivax 0,r9 277 tlbivax 0,r9
286#ifdef CONFIG_SMP 278 TLBSYNC
287 tlbsync
288#endif
289 msync
290 279
291 /* Establish the interrupt vector offsets */ 280 /* Establish the interrupt vector offsets */
292 SET_IVOR(0, CriticalInput); 281 SET_IVOR(0, CriticalInput);
@@ -483,90 +472,16 @@ interrupt_base:
483 472
484 /* Data Storage Interrupt */ 473 /* Data Storage Interrupt */
485 START_EXCEPTION(DataStorage) 474 START_EXCEPTION(DataStorage)
486 mtspr SPRN_SPRG0, r10 /* Save some working registers */ 475 NORMAL_EXCEPTION_PROLOG
487 mtspr SPRN_SPRG1, r11 476 mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */
488 mtspr SPRN_SPRG4W, r12 477 stw r5,_ESR(r11)
489 mtspr SPRN_SPRG5W, r13 478 mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */
490 mfcr r11 479 andis. r10,r5,(ESR_ILK|ESR_DLK)@h
491 mtspr SPRN_SPRG7W, r11 480 bne 1f
492 481 EXC_XFER_EE_LITE(0x0300, handle_page_fault)
493 /* 4821:
494 * Check if it was a store fault, if not then bail 483 addi r3,r1,STACK_FRAME_OVERHEAD
495 * because a user tried to access a kernel or 484 EXC_XFER_EE_LITE(0x0300, CacheLockingException)
496 * read-protected page. Otherwise, get the
497 * offending address and handle it.
498 */
499 mfspr r10, SPRN_ESR
500 andis. r10, r10, ESR_ST@h
501 beq 2f
502
503 mfspr r10, SPRN_DEAR /* Get faulting address */
504
505 /* If we are faulting a kernel address, we have to use the
506 * kernel page tables.
507 */
508 lis r11, PAGE_OFFSET@h
509 cmplw 0, r10, r11
510 bge 2f
511
512 /* Get the PGD for the current thread */
5133:
514 mfspr r11,SPRN_SPRG3
515 lwz r11,PGDIR(r11)
5164:
517 FIND_PTE
518
519 /* Are _PAGE_USER & _PAGE_RW set & _PAGE_HWWRITE not? */
520 andi. r13, r11, _PAGE_RW|_PAGE_USER|_PAGE_HWWRITE
521 cmpwi 0, r13, _PAGE_RW|_PAGE_USER
522 bne 2f /* Bail if not */
523
524 /* Update 'changed'. */
525 ori r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE
526 stw r11, PTE_FLAGS_OFFSET(r12) /* Update Linux page table */
527
528 /* MAS2 not updated as the entry does exist in the tlb, this
529 fault taken to detect state transition (eg: COW -> DIRTY)
530 */
531 andi. r11, r11, _PAGE_HWEXEC
532 rlwimi r11, r11, 31, 27, 27 /* SX <- _PAGE_HWEXEC */
533 ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */
534
535 /* update search PID in MAS6, AS = 0 */
536 mfspr r12, SPRN_PID0
537 slwi r12, r12, 16
538 mtspr SPRN_MAS6, r12
539
540 /* find the TLB index that caused the fault. It has to be here. */
541 tlbsx 0, r10
542
543 /* only update the perm bits, assume the RPN is fine */
544 mfspr r12, SPRN_MAS3
545 rlwimi r12, r11, 0, 20, 31
546 mtspr SPRN_MAS3,r12
547 tlbwe
548
549 /* Done...restore registers and get out of here. */
550 mfspr r11, SPRN_SPRG7R
551 mtcr r11
552 mfspr r13, SPRN_SPRG5R
553 mfspr r12, SPRN_SPRG4R
554 mfspr r11, SPRN_SPRG1
555 mfspr r10, SPRN_SPRG0
556 rfi /* Force context change */
557
5582:
559 /*
560 * The bailout. Restore registers to pre-exception conditions
561 * and call the heavyweights to help us out.
562 */
563 mfspr r11, SPRN_SPRG7R
564 mtcr r11
565 mfspr r13, SPRN_SPRG5R
566 mfspr r12, SPRN_SPRG4R
567 mfspr r11, SPRN_SPRG1
568 mfspr r10, SPRN_SPRG0
569 b data_access
570 485
571 /* Instruction Storage Interrupt */ 486 /* Instruction Storage Interrupt */
572 INSTRUCTION_STORAGE_EXCEPTION 487 INSTRUCTION_STORAGE_EXCEPTION
@@ -645,15 +560,30 @@ interrupt_base:
645 lwz r11,PGDIR(r11) 560 lwz r11,PGDIR(r11)
646 561
6474: 5624:
563 /* Mask of required permission bits. Note that while we
564 * do copy ESR:ST to _PAGE_RW position as trying to write
565 * to an RO page is pretty common, we don't do it with
566 * _PAGE_DIRTY. We could do it, but it's a fairly rare
567 * event so I'd rather take the overhead when it happens
568 * rather than adding an instruction here. We should measure
569 * whether the whole thing is worth it in the first place
570 * as we could avoid loading SPRN_ESR completely in the first
571 * place...
572 *
573 * TODO: Is it worth doing that mfspr & rlwimi in the first
574 * place or can we save a couple of instructions here ?
575 */
576 mfspr r12,SPRN_ESR
577 li r13,_PAGE_PRESENT|_PAGE_ACCESSED
578 rlwimi r13,r12,11,29,29
579
648 FIND_PTE 580 FIND_PTE
649 andi. r13, r11, _PAGE_PRESENT /* Is the page present? */ 581 andc. r13,r13,r11 /* Check permission */
650 beq 2f /* Bail if not present */ 582 bne 2f /* Bail if permission mismach */
651 583
652#ifdef CONFIG_PTE_64BIT 584#ifdef CONFIG_PTE_64BIT
653 lwz r13, 0(r12) 585 lwz r13, 0(r12)
654#endif 586#endif
655 ori r11, r11, _PAGE_ACCESSED
656 stw r11, PTE_FLAGS_OFFSET(r12)
657 587
658 /* Jump to common tlb load */ 588 /* Jump to common tlb load */
659 b finish_tlb_load 589 b finish_tlb_load
@@ -667,7 +597,7 @@ interrupt_base:
667 mfspr r12, SPRN_SPRG4R 597 mfspr r12, SPRN_SPRG4R
668 mfspr r11, SPRN_SPRG1 598 mfspr r11, SPRN_SPRG1
669 mfspr r10, SPRN_SPRG0 599 mfspr r10, SPRN_SPRG0
670 b data_access 600 b DataStorage
671 601
672 /* Instruction TLB Error Interrupt */ 602 /* Instruction TLB Error Interrupt */
673 /* 603 /*
@@ -705,15 +635,16 @@ interrupt_base:
705 lwz r11,PGDIR(r11) 635 lwz r11,PGDIR(r11)
706 636
7074: 6374:
638 /* Make up the required permissions */
639 li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_HWEXEC
640
708 FIND_PTE 641 FIND_PTE
709 andi. r13, r11, _PAGE_PRESENT /* Is the page present? */ 642 andc. r13,r13,r11 /* Check permission */
710 beq 2f /* Bail if not present */ 643 bne 2f /* Bail if permission mismach */
711 644
712#ifdef CONFIG_PTE_64BIT 645#ifdef CONFIG_PTE_64BIT
713 lwz r13, 0(r12) 646 lwz r13, 0(r12)
714#endif 647#endif
715 ori r11, r11, _PAGE_ACCESSED
716 stw r11, PTE_FLAGS_OFFSET(r12)
717 648
718 /* Jump to common TLB load point */ 649 /* Jump to common TLB load point */
719 b finish_tlb_load 650 b finish_tlb_load
@@ -768,29 +699,13 @@ interrupt_base:
768 * Local functions 699 * Local functions
769 */ 700 */
770 701
771 /*
772 * Data TLB exceptions will bail out to this point
773 * if they can't resolve the lightweight TLB fault.
774 */
775data_access:
776 NORMAL_EXCEPTION_PROLOG
777 mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */
778 stw r5,_ESR(r11)
779 mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */
780 andis. r10,r5,(ESR_ILK|ESR_DLK)@h
781 bne 1f
782 EXC_XFER_EE_LITE(0x0300, handle_page_fault)
7831:
784 addi r3,r1,STACK_FRAME_OVERHEAD
785 EXC_XFER_EE_LITE(0x0300, CacheLockingException)
786
787/* 702/*
788
789 * Both the instruction and data TLB miss get to this 703 * Both the instruction and data TLB miss get to this
790 * point to load the TLB. 704 * point to load the TLB.
791 * r10 - EA of fault 705 * r10 - EA of fault
792 * r11 - TLB (info from Linux PTE) 706 * r11 - TLB (info from Linux PTE)
793 * r12, r13 - available to use 707 * r12 - available to use
708 * r13 - upper bits of PTE (if PTE_64BIT) or available to use
794 * CR5 - results of addr >= PAGE_OFFSET 709 * CR5 - results of addr >= PAGE_OFFSET
795 * MAS0, MAS1 - loaded with proper value when we get here 710 * MAS0, MAS1 - loaded with proper value when we get here
796 * MAS2, MAS3 - will need additional info from Linux PTE 711 * MAS2, MAS3 - will need additional info from Linux PTE
@@ -812,20 +727,14 @@ finish_tlb_load:
812#endif 727#endif
813 mtspr SPRN_MAS2, r12 728 mtspr SPRN_MAS2, r12
814 729
815 bge 5, 1f 730 li r10, (_PAGE_HWEXEC | _PAGE_PRESENT)
816 731 rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */
817 /* is user addr */ 732 and r12, r11, r10
818 andi. r12, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC)
819 andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ 733 andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */
820 srwi r10, r12, 1 734 slwi r10, r12, 1
821 or r12, r12, r10 /* Copy user perms into supervisor */ 735 or r10, r10, r12
822 iseleq r12, 0, r12 736 iseleq r12, r12, r10
823 b 2f 737
824
825 /* is kernel addr */
8261: rlwinm r12, r11, 31, 29, 29 /* Extract _PAGE_HWWRITE into SW */
827 ori r12, r12, (MAS3_SX | MAS3_SR)
828
829#ifdef CONFIG_PTE_64BIT 738#ifdef CONFIG_PTE_64BIT
8302: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */ 7392: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */
831 rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */ 740 rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index c3cf0e8f3ac1..d308a9f70f1b 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -60,7 +60,7 @@ void cpu_idle(void)
60 60
61 set_thread_flag(TIF_POLLING_NRFLAG); 61 set_thread_flag(TIF_POLLING_NRFLAG);
62 while (1) { 62 while (1) {
63 tick_nohz_stop_sched_tick(); 63 tick_nohz_stop_sched_tick(1);
64 while (!need_resched() && !cpu_should_die()) { 64 while (!need_resched() && !cpu_should_die()) {
65 ppc64_runlatch_off(); 65 ppc64_runlatch_off();
66 66
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 8c68ee9e5d1c..2385f68c1751 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -186,7 +186,8 @@ static unsigned long iommu_range_alloc(struct device *dev,
186static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, 186static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl,
187 void *page, unsigned int npages, 187 void *page, unsigned int npages,
188 enum dma_data_direction direction, 188 enum dma_data_direction direction,
189 unsigned long mask, unsigned int align_order) 189 unsigned long mask, unsigned int align_order,
190 struct dma_attrs *attrs)
190{ 191{
191 unsigned long entry, flags; 192 unsigned long entry, flags;
192 dma_addr_t ret = DMA_ERROR_CODE; 193 dma_addr_t ret = DMA_ERROR_CODE;
@@ -205,7 +206,7 @@ static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl,
205 206
206 /* Put the TCEs in the HW table */ 207 /* Put the TCEs in the HW table */
207 ppc_md.tce_build(tbl, entry, npages, (unsigned long)page & IOMMU_PAGE_MASK, 208 ppc_md.tce_build(tbl, entry, npages, (unsigned long)page & IOMMU_PAGE_MASK,
208 direction); 209 direction, attrs);
209 210
210 211
211 /* Flush/invalidate TLB caches if necessary */ 212 /* Flush/invalidate TLB caches if necessary */
@@ -336,7 +337,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
336 npages, entry, dma_addr); 337 npages, entry, dma_addr);
337 338
338 /* Insert into HW table */ 339 /* Insert into HW table */
339 ppc_md.tce_build(tbl, entry, npages, vaddr & IOMMU_PAGE_MASK, direction); 340 ppc_md.tce_build(tbl, entry, npages, vaddr & IOMMU_PAGE_MASK,
341 direction, attrs);
340 342
341 /* If we are in an open segment, try merging */ 343 /* If we are in an open segment, try merging */
342 if (segstart != s) { 344 if (segstart != s) {
@@ -573,7 +575,8 @@ dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl,
573 align = PAGE_SHIFT - IOMMU_PAGE_SHIFT; 575 align = PAGE_SHIFT - IOMMU_PAGE_SHIFT;
574 576
575 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, 577 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction,
576 mask >> IOMMU_PAGE_SHIFT, align); 578 mask >> IOMMU_PAGE_SHIFT, align,
579 attrs);
577 if (dma_handle == DMA_ERROR_CODE) { 580 if (dma_handle == DMA_ERROR_CODE) {
578 if (printk_ratelimit()) { 581 if (printk_ratelimit()) {
579 printk(KERN_INFO "iommu_alloc failed, " 582 printk(KERN_INFO "iommu_alloc failed, "
@@ -642,7 +645,7 @@ void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
642 nio_pages = size >> IOMMU_PAGE_SHIFT; 645 nio_pages = size >> IOMMU_PAGE_SHIFT;
643 io_order = get_iommu_order(size); 646 io_order = get_iommu_order(size);
644 mapping = iommu_alloc(dev, tbl, ret, nio_pages, DMA_BIDIRECTIONAL, 647 mapping = iommu_alloc(dev, tbl, ret, nio_pages, DMA_BIDIRECTIONAL,
645 mask >> IOMMU_PAGE_SHIFT, io_order); 648 mask >> IOMMU_PAGE_SHIFT, io_order, NULL);
646 if (mapping == DMA_ERROR_CODE) { 649 if (mapping == DMA_ERROR_CODE) {
647 free_pages((unsigned long)ret, order); 650 free_pages((unsigned long)ret, order);
648 return NULL; 651 return NULL;
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
new file mode 100644
index 000000000000..b4fdf2f2743c
--- /dev/null
+++ b/arch/powerpc/kernel/kgdb.c
@@ -0,0 +1,410 @@
1/*
2 * PowerPC backend to the KGDB stub.
3 *
4 * 1998 (c) Michael AK Tesch (tesch@cs.wisc.edu)
5 * Copyright (C) 2003 Timesys Corporation.
6 * Copyright (C) 2004-2006 MontaVista Software, Inc.
7 * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com)
8 * PPC32 support restored by Vitaly Wool <vwool@ru.mvista.com> and
9 * Sergei Shtylyov <sshtylyov@ru.mvista.com>
10 * Copyright (C) 2007-2008 Wind River Systems, Inc.
11 *
12 * This file is licensed under the terms of the GNU General Public License
13 * version 2. This program as licensed "as is" without any warranty of any
14 * kind, whether express or implied.
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/kgdb.h>
20#include <linux/smp.h>
21#include <linux/signal.h>
22#include <linux/ptrace.h>
23#include <asm/current.h>
24#include <asm/processor.h>
25#include <asm/machdep.h>
26
27/*
28 * This table contains the mapping between PowerPC hardware trap types, and
29 * signals, which are primarily what GDB understands. GDB and the kernel
30 * don't always agree on values, so we use constants taken from gdb-6.2.
31 */
32static struct hard_trap_info
33{
34 unsigned int tt; /* Trap type code for powerpc */
35 unsigned char signo; /* Signal that we map this trap into */
36} hard_trap_info[] = {
37 { 0x0100, 0x02 /* SIGINT */ }, /* system reset */
38 { 0x0200, 0x0b /* SIGSEGV */ }, /* machine check */
39 { 0x0300, 0x0b /* SIGSEGV */ }, /* data access */
40 { 0x0400, 0x0b /* SIGSEGV */ }, /* instruction access */
41 { 0x0500, 0x02 /* SIGINT */ }, /* external interrupt */
42 { 0x0600, 0x0a /* SIGBUS */ }, /* alignment */
43 { 0x0700, 0x05 /* SIGTRAP */ }, /* program check */
44 { 0x0800, 0x08 /* SIGFPE */ }, /* fp unavailable */
45 { 0x0900, 0x0e /* SIGALRM */ }, /* decrementer */
46 { 0x0c00, 0x14 /* SIGCHLD */ }, /* system call */
47#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
48 { 0x2002, 0x05 /* SIGTRAP */ }, /* debug */
49#if defined(CONFIG_FSL_BOOKE)
50 { 0x2010, 0x08 /* SIGFPE */ }, /* spe unavailable */
51 { 0x2020, 0x08 /* SIGFPE */ }, /* spe unavailable */
52 { 0x2030, 0x08 /* SIGFPE */ }, /* spe fp data */
53 { 0x2040, 0x08 /* SIGFPE */ }, /* spe fp data */
54 { 0x2050, 0x08 /* SIGFPE */ }, /* spe fp round */
55 { 0x2060, 0x0e /* SIGILL */ }, /* performace monitor */
56 { 0x2900, 0x08 /* SIGFPE */ }, /* apu unavailable */
57 { 0x3100, 0x0e /* SIGALRM */ }, /* fixed interval timer */
58 { 0x3200, 0x02 /* SIGINT */ }, /* watchdog */
59#else /* ! CONFIG_FSL_BOOKE */
60 { 0x1000, 0x0e /* SIGALRM */ }, /* prog interval timer */
61 { 0x1010, 0x0e /* SIGALRM */ }, /* fixed interval timer */
62 { 0x1020, 0x02 /* SIGINT */ }, /* watchdog */
63 { 0x2010, 0x08 /* SIGFPE */ }, /* fp unavailable */
64 { 0x2020, 0x08 /* SIGFPE */ }, /* ap unavailable */
65#endif
66#else /* ! (defined(CONFIG_40x) || defined(CONFIG_BOOKE)) */
67 { 0x0d00, 0x05 /* SIGTRAP */ }, /* single-step */
68#if defined(CONFIG_8xx)
69 { 0x1000, 0x04 /* SIGILL */ }, /* software emulation */
70#else /* ! CONFIG_8xx */
71 { 0x0f00, 0x04 /* SIGILL */ }, /* performance monitor */
72 { 0x0f20, 0x08 /* SIGFPE */ }, /* altivec unavailable */
73 { 0x1300, 0x05 /* SIGTRAP */ }, /* instruction address break */
74#if defined(CONFIG_PPC64)
75 { 0x1200, 0x05 /* SIGILL */ }, /* system error */
76 { 0x1500, 0x04 /* SIGILL */ }, /* soft patch */
77 { 0x1600, 0x04 /* SIGILL */ }, /* maintenance */
78 { 0x1700, 0x08 /* SIGFPE */ }, /* altivec assist */
79 { 0x1800, 0x04 /* SIGILL */ }, /* thermal */
80#else /* ! CONFIG_PPC64 */
81 { 0x1400, 0x02 /* SIGINT */ }, /* SMI */
82 { 0x1600, 0x08 /* SIGFPE */ }, /* altivec assist */
83 { 0x1700, 0x04 /* SIGILL */ }, /* TAU */
84 { 0x2000, 0x05 /* SIGTRAP */ }, /* run mode */
85#endif
86#endif
87#endif
88 { 0x0000, 0x00 } /* Must be last */
89};
90
91static int computeSignal(unsigned int tt)
92{
93 struct hard_trap_info *ht;
94
95 for (ht = hard_trap_info; ht->tt && ht->signo; ht++)
96 if (ht->tt == tt)
97 return ht->signo;
98
99 return SIGHUP; /* default for things we don't know about */
100}
101
102static int kgdb_call_nmi_hook(struct pt_regs *regs)
103{
104 kgdb_nmicallback(raw_smp_processor_id(), regs);
105 return 0;
106}
107
108#ifdef CONFIG_SMP
109void kgdb_roundup_cpus(unsigned long flags)
110{
111 smp_send_debugger_break(MSG_ALL_BUT_SELF);
112}
113#endif
114
115/* KGDB functions to use existing PowerPC64 hooks. */
116static int kgdb_debugger(struct pt_regs *regs)
117{
118 return kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs);
119}
120
121static int kgdb_handle_breakpoint(struct pt_regs *regs)
122{
123 if (user_mode(regs))
124 return 0;
125
126 if (kgdb_handle_exception(0, SIGTRAP, 0, regs) != 0)
127 return 0;
128
129 if (*(u32 *) (regs->nip) == *(u32 *) (&arch_kgdb_ops.gdb_bpt_instr))
130 regs->nip += 4;
131
132 return 1;
133}
134
135static int kgdb_singlestep(struct pt_regs *regs)
136{
137 struct thread_info *thread_info, *exception_thread_info;
138
139 if (user_mode(regs))
140 return 0;
141
142 /*
143 * On Book E and perhaps other processsors, singlestep is handled on
144 * the critical exception stack. This causes current_thread_info()
145 * to fail, since it it locates the thread_info by masking off
146 * the low bits of the current stack pointer. We work around
147 * this issue by copying the thread_info from the kernel stack
148 * before calling kgdb_handle_exception, and copying it back
149 * afterwards. On most processors the copy is avoided since
150 * exception_thread_info == thread_info.
151 */
152 thread_info = (struct thread_info *)(regs->gpr[1] & ~(THREAD_SIZE-1));
153 exception_thread_info = current_thread_info();
154
155 if (thread_info != exception_thread_info)
156 memcpy(exception_thread_info, thread_info, sizeof *thread_info);
157
158 kgdb_handle_exception(0, SIGTRAP, 0, regs);
159
160 if (thread_info != exception_thread_info)
161 memcpy(thread_info, exception_thread_info, sizeof *thread_info);
162
163 return 1;
164}
165
166static int kgdb_iabr_match(struct pt_regs *regs)
167{
168 if (user_mode(regs))
169 return 0;
170
171 if (kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs) != 0)
172 return 0;
173 return 1;
174}
175
176static int kgdb_dabr_match(struct pt_regs *regs)
177{
178 if (user_mode(regs))
179 return 0;
180
181 if (kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs) != 0)
182 return 0;
183 return 1;
184}
185
186#define PACK64(ptr, src) do { *(ptr++) = (src); } while (0)
187
188#define PACK32(ptr, src) do { \
189 u32 *ptr32; \
190 ptr32 = (u32 *)ptr; \
191 *(ptr32++) = (src); \
192 ptr = (unsigned long *)ptr32; \
193 } while (0)
194
195
196void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs)
197{
198 unsigned long *ptr = gdb_regs;
199 int reg;
200
201 memset(gdb_regs, 0, NUMREGBYTES);
202
203 for (reg = 0; reg < 32; reg++)
204 PACK64(ptr, regs->gpr[reg]);
205
206#ifdef CONFIG_FSL_BOOKE
207#ifdef CONFIG_SPE
208 for (reg = 0; reg < 32; reg++)
209 PACK64(ptr, current->thread.evr[reg]);
210#else
211 ptr += 32;
212#endif
213#else
214 /* fp registers not used by kernel, leave zero */
215 ptr += 32 * 8 / sizeof(long);
216#endif
217
218 PACK64(ptr, regs->nip);
219 PACK64(ptr, regs->msr);
220 PACK32(ptr, regs->ccr);
221 PACK64(ptr, regs->link);
222 PACK64(ptr, regs->ctr);
223 PACK32(ptr, regs->xer);
224
225 BUG_ON((unsigned long)ptr >
226 (unsigned long)(((void *)gdb_regs) + NUMREGBYTES));
227}
228
229void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
230{
231 struct pt_regs *regs = (struct pt_regs *)(p->thread.ksp +
232 STACK_FRAME_OVERHEAD);
233 unsigned long *ptr = gdb_regs;
234 int reg;
235
236 memset(gdb_regs, 0, NUMREGBYTES);
237
238 /* Regs GPR0-2 */
239 for (reg = 0; reg < 3; reg++)
240 PACK64(ptr, regs->gpr[reg]);
241
242 /* Regs GPR3-13 are caller saved, not in regs->gpr[] */
243 ptr += 11;
244
245 /* Regs GPR14-31 */
246 for (reg = 14; reg < 32; reg++)
247 PACK64(ptr, regs->gpr[reg]);
248
249#ifdef CONFIG_FSL_BOOKE
250#ifdef CONFIG_SPE
251 for (reg = 0; reg < 32; reg++)
252 PACK64(ptr, p->thread.evr[reg]);
253#else
254 ptr += 32;
255#endif
256#else
257 /* fp registers not used by kernel, leave zero */
258 ptr += 32 * 8 / sizeof(long);
259#endif
260
261 PACK64(ptr, regs->nip);
262 PACK64(ptr, regs->msr);
263 PACK32(ptr, regs->ccr);
264 PACK64(ptr, regs->link);
265 PACK64(ptr, regs->ctr);
266 PACK32(ptr, regs->xer);
267
268 BUG_ON((unsigned long)ptr >
269 (unsigned long)(((void *)gdb_regs) + NUMREGBYTES));
270}
271
272#define UNPACK64(dest, ptr) do { dest = *(ptr++); } while (0)
273
274#define UNPACK32(dest, ptr) do { \
275 u32 *ptr32; \
276 ptr32 = (u32 *)ptr; \
277 dest = *(ptr32++); \
278 ptr = (unsigned long *)ptr32; \
279 } while (0)
280
281void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs)
282{
283 unsigned long *ptr = gdb_regs;
284 int reg;
285#ifdef CONFIG_SPE
286 union {
287 u32 v32[2];
288 u64 v64;
289 } acc;
290#endif
291
292 for (reg = 0; reg < 32; reg++)
293 UNPACK64(regs->gpr[reg], ptr);
294
295#ifdef CONFIG_FSL_BOOKE
296#ifdef CONFIG_SPE
297 for (reg = 0; reg < 32; reg++)
298 UNPACK64(current->thread.evr[reg], ptr);
299#else
300 ptr += 32;
301#endif
302#else
303 /* fp registers not used by kernel, leave zero */
304 ptr += 32 * 8 / sizeof(int);
305#endif
306
307 UNPACK64(regs->nip, ptr);
308 UNPACK64(regs->msr, ptr);
309 UNPACK32(regs->ccr, ptr);
310 UNPACK64(regs->link, ptr);
311 UNPACK64(regs->ctr, ptr);
312 UNPACK32(regs->xer, ptr);
313
314 BUG_ON((unsigned long)ptr >
315 (unsigned long)(((void *)gdb_regs) + NUMREGBYTES));
316}
317
318/*
319 * This function does PowerPC specific procesing for interfacing to gdb.
320 */
321int kgdb_arch_handle_exception(int vector, int signo, int err_code,
322 char *remcom_in_buffer, char *remcom_out_buffer,
323 struct pt_regs *linux_regs)
324{
325 char *ptr = &remcom_in_buffer[1];
326 unsigned long addr;
327
328 switch (remcom_in_buffer[0]) {
329 /*
330 * sAA..AA Step one instruction from AA..AA
331 * This will return an error to gdb ..
332 */
333 case 's':
334 case 'c':
335 /* handle the optional parameter */
336 if (kgdb_hex2long(&ptr, &addr))
337 linux_regs->nip = addr;
338
339 atomic_set(&kgdb_cpu_doing_single_step, -1);
340 /* set the trace bit if we're stepping */
341 if (remcom_in_buffer[0] == 's') {
342#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
343 mtspr(SPRN_DBCR0,
344 mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
345 linux_regs->msr |= MSR_DE;
346#else
347 linux_regs->msr |= MSR_SE;
348#endif
349 kgdb_single_step = 1;
350 if (kgdb_contthread)
351 atomic_set(&kgdb_cpu_doing_single_step,
352 raw_smp_processor_id());
353 }
354 return 0;
355 }
356
357 return -1;
358}
359
360/*
361 * Global data
362 */
363struct kgdb_arch arch_kgdb_ops = {
364 .gdb_bpt_instr = {0x7d, 0x82, 0x10, 0x08},
365};
366
367static int kgdb_not_implemented(struct pt_regs *regs)
368{
369 return 0;
370}
371
372static void *old__debugger_ipi;
373static void *old__debugger;
374static void *old__debugger_bpt;
375static void *old__debugger_sstep;
376static void *old__debugger_iabr_match;
377static void *old__debugger_dabr_match;
378static void *old__debugger_fault_handler;
379
380int kgdb_arch_init(void)
381{
382 old__debugger_ipi = __debugger_ipi;
383 old__debugger = __debugger;
384 old__debugger_bpt = __debugger_bpt;
385 old__debugger_sstep = __debugger_sstep;
386 old__debugger_iabr_match = __debugger_iabr_match;
387 old__debugger_dabr_match = __debugger_dabr_match;
388 old__debugger_fault_handler = __debugger_fault_handler;
389
390 __debugger_ipi = kgdb_call_nmi_hook;
391 __debugger = kgdb_debugger;
392 __debugger_bpt = kgdb_handle_breakpoint;
393 __debugger_sstep = kgdb_singlestep;
394 __debugger_iabr_match = kgdb_iabr_match;
395 __debugger_dabr_match = kgdb_dabr_match;
396 __debugger_fault_handler = kgdb_not_implemented;
397
398 return 0;
399}
400
401void kgdb_arch_exit(void)
402{
403 __debugger_ipi = old__debugger_ipi;
404 __debugger = old__debugger;
405 __debugger_bpt = old__debugger_bpt;
406 __debugger_sstep = old__debugger_sstep;
407 __debugger_iabr_match = old__debugger_iabr_match;
408 __debugger_dabr_match = old__debugger_dabr_match;
409 __debugger_fault_handler = old__debugger_fault_handler;
410}
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 063cdd413049..224e9a11765c 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -598,6 +598,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
598 res->start = pci_addr; 598 res->start = pci_addr;
599 break; 599 break;
600 case 2: /* PCI Memory space */ 600 case 2: /* PCI Memory space */
601 case 3: /* PCI 64 bits Memory space */
601 printk(KERN_INFO 602 printk(KERN_INFO
602 " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", 603 " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
603 cpu_addr, cpu_addr + size - 1, pci_addr, 604 cpu_addr, cpu_addr + size - 1, pci_addr,
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 90eb3a3e383e..bc1fb27368af 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -128,12 +128,35 @@ static void of_bus_pci_count_cells(struct device_node *np,
128 *sizec = 2; 128 *sizec = 2;
129} 129}
130 130
131static unsigned int of_bus_pci_get_flags(const u32 *addr)
132{
133 unsigned int flags = 0;
134 u32 w = addr[0];
135
136 switch((w >> 24) & 0x03) {
137 case 0x01:
138 flags |= IORESOURCE_IO;
139 break;
140 case 0x02: /* 32 bits */
141 case 0x03: /* 64 bits */
142 flags |= IORESOURCE_MEM;
143 break;
144 }
145 if (w & 0x40000000)
146 flags |= IORESOURCE_PREFETCH;
147 return flags;
148}
149
131static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna) 150static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna)
132{ 151{
133 u64 cp, s, da; 152 u64 cp, s, da;
153 unsigned int af, rf;
154
155 af = of_bus_pci_get_flags(addr);
156 rf = of_bus_pci_get_flags(range);
134 157
135 /* Check address type match */ 158 /* Check address type match */
136 if ((addr[0] ^ range[0]) & 0x03000000) 159 if ((af ^ rf) & (IORESOURCE_MEM | IORESOURCE_IO))
137 return OF_BAD_ADDR; 160 return OF_BAD_ADDR;
138 161
139 /* Read address values, skipping high cell */ 162 /* Read address values, skipping high cell */
@@ -153,25 +176,6 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na)
153 return of_bus_default_translate(addr + 1, offset, na - 1); 176 return of_bus_default_translate(addr + 1, offset, na - 1);
154} 177}
155 178
156static unsigned int of_bus_pci_get_flags(const u32 *addr)
157{
158 unsigned int flags = 0;
159 u32 w = addr[0];
160
161 switch((w >> 24) & 0x03) {
162 case 0x01:
163 flags |= IORESOURCE_IO;
164 break;
165 case 0x02: /* 32 bits */
166 case 0x03: /* 64 bits */
167 flags |= IORESOURCE_MEM;
168 break;
169 }
170 if (w & 0x40000000)
171 flags |= IORESOURCE_PREFETCH;
172 return flags;
173}
174
175const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, 179const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
176 unsigned int *flags) 180 unsigned int *flags)
177{ 181{
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 4efebe88e64a..066e65c59b58 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -43,10 +43,6 @@
43 43
44#define DBG(fmt...) 44#define DBG(fmt...)
45 45
46#if defined CONFIG_KGDB
47#include <asm/kgdb.h>
48#endif
49
50extern void bootx_init(unsigned long r4, unsigned long phys); 46extern void bootx_init(unsigned long r4, unsigned long phys);
51 47
52int boot_cpuid; 48int boot_cpuid;
@@ -302,18 +298,6 @@ void __init setup_arch(char **cmdline_p)
302 298
303 xmon_setup(); 299 xmon_setup();
304 300
305#if defined(CONFIG_KGDB)
306 if (ppc_md.kgdb_map_scc)
307 ppc_md.kgdb_map_scc();
308 set_debug_traps();
309 if (strstr(cmd_line, "gdb")) {
310 if (ppc_md.progress)
311 ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000);
312 printk("kgdb breakpoint activated\n");
313 breakpoint();
314 }
315#endif
316
317 /* 301 /*
318 * Set cache line size based on type of cpu as a default. 302 * Set cache line size based on type of cpu as a default.
319 * Systems with OF can look in the properties on the cpu node(s) 303 * Systems with OF can look in the properties on the cpu node(s)
diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c
index 071bee3ec749..f2589645870a 100644
--- a/arch/powerpc/kernel/stacktrace.c
+++ b/arch/powerpc/kernel/stacktrace.c
@@ -59,6 +59,6 @@ EXPORT_SYMBOL_GPL(save_stack_trace);
59 59
60void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) 60void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
61{ 61{
62 save_context_stack(trace, tsk->thread.regs->gpr[1], tsk, 0); 62 save_context_stack(trace, tsk->thread.ksp, tsk, 0);
63} 63}
64EXPORT_SYMBOL_GPL(save_stack_trace_tsk); 64EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c
index 8cee57107541..6fc6328dc626 100644
--- a/arch/powerpc/kernel/suspend.c
+++ b/arch/powerpc/kernel/suspend.c
@@ -7,6 +7,7 @@
7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> 7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org>
8 */ 8 */
9 9
10#include <linux/mm.h>
10#include <asm/page.h> 11#include <asm/page.h>
11 12
12/* References to section boundaries */ 13/* References to section boundaries */
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index c8127f832df0..aba0ba95f062 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -28,7 +28,9 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
28/* Time in microseconds we delay before sleeping in the idle loop */ 28/* Time in microseconds we delay before sleeping in the idle loop */
29DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; 29DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 };
30 30
31static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, 31static ssize_t store_smt_snooze_delay(struct sys_device *dev,
32 struct sysdev_attribute *attr,
33 const char *buf,
32 size_t count) 34 size_t count)
33{ 35{
34 struct cpu *cpu = container_of(dev, struct cpu, sysdev); 36 struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -44,7 +46,9 @@ static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf,
44 return count; 46 return count;
45} 47}
46 48
47static ssize_t show_smt_snooze_delay(struct sys_device *dev, char *buf) 49static ssize_t show_smt_snooze_delay(struct sys_device *dev,
50 struct sysdev_attribute *attr,
51 char *buf)
48{ 52{
49 struct cpu *cpu = container_of(dev, struct cpu, sysdev); 53 struct cpu *cpu = container_of(dev, struct cpu, sysdev);
50 54
@@ -152,14 +156,17 @@ static unsigned long write_##NAME(unsigned long val) \
152 mtspr(ADDRESS, val); \ 156 mtspr(ADDRESS, val); \
153 return 0; \ 157 return 0; \
154} \ 158} \
155static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 159static ssize_t show_##NAME(struct sys_device *dev, \
160 struct sysdev_attribute *attr, \
161 char *buf) \
156{ \ 162{ \
157 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ 163 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
158 unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ 164 unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \
159 return sprintf(buf, "%lx\n", val); \ 165 return sprintf(buf, "%lx\n", val); \
160} \ 166} \
161static ssize_t __used \ 167static ssize_t __used \
162 store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ 168 store_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, \
169 const char *buf, size_t count) \
163{ \ 170{ \
164 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ 171 struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
165 unsigned long val; \ 172 unsigned long val; \
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 87a72c66ce27..a914411bced5 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -9,6 +9,25 @@
9 9
10ENTRY(_stext) 10ENTRY(_stext)
11 11
12PHDRS {
13 kernel PT_LOAD FLAGS(7); /* RWX */
14 notes PT_NOTE FLAGS(0);
15 dummy PT_NOTE FLAGS(0);
16
17 /* binutils < 2.18 has a bug that makes it misbehave when taking an
18 ELF file with all segments at load address 0 as input. This
19 happens when running "strip" on vmlinux, because of the AT() magic
20 in this linker script. People using GCC >= 4.2 won't run into
21 this problem, because the "build-id" support will put some data
22 into the "notes" segment (at a non-zero load address).
23
24 To work around this, we force some data into both the "dummy"
25 segment and the kernel segment, so the dummy segment will get a
26 non-zero load address. It's not enough to always create the
27 "notes" segment, since if nothing gets assigned to it, its load
28 address will be zero. */
29}
30
12#ifdef CONFIG_PPC64 31#ifdef CONFIG_PPC64
13OUTPUT_ARCH(powerpc:common64) 32OUTPUT_ARCH(powerpc:common64)
14jiffies = jiffies_64; 33jiffies = jiffies_64;
@@ -50,7 +69,7 @@ SECTIONS
50 . = ALIGN(PAGE_SIZE); 69 . = ALIGN(PAGE_SIZE);
51 _etext = .; 70 _etext = .;
52 PROVIDE32 (etext = .); 71 PROVIDE32 (etext = .);
53 } 72 } :kernel
54 73
55 /* Read-only data */ 74 /* Read-only data */
56 RODATA 75 RODATA
@@ -62,7 +81,13 @@ SECTIONS
62 __stop___ex_table = .; 81 __stop___ex_table = .;
63 } 82 }
64 83
65 NOTES 84 NOTES :kernel :notes
85
86 /* The dummy segment contents for the bug workaround mentioned above
87 near PHDRS. */
88 .dummy : {
89 LONG(0xf177)
90 } :kernel :dummy
66 91
67/* 92/*
68 * Init sections discarded at runtime 93 * Init sections discarded at runtime
@@ -74,7 +99,7 @@ SECTIONS
74 _sinittext = .; 99 _sinittext = .;
75 INIT_TEXT 100 INIT_TEXT
76 _einittext = .; 101 _einittext = .;
77 } 102 } :kernel
78 103
79 /* .exit.text is discarded at runtime, not link time, 104 /* .exit.text is discarded at runtime, not link time,
80 * to deal with references from __bug_table 105 * to deal with references from __bug_table
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index 0559fe086eb4..7c975d43e3f3 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -10,6 +10,7 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/vmalloc.h> 11#include <linux/vmalloc.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/mm.h>
13#include <asm/page.h> 14#include <asm/page.h>
14#include <asm/code-patching.h> 15#include <asm/code-patching.h>
15 16
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c
index 4e43702b9813..8c5a03be31e0 100644
--- a/arch/powerpc/lib/feature-fixups.c
+++ b/arch/powerpc/lib/feature-fixups.c
@@ -99,7 +99,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end)
99 99
100 for (; fcur < fend; fcur++) { 100 for (; fcur < fend; fcur++) {
101 if (patch_feature_section(value, fcur)) { 101 if (patch_feature_section(value, fcur)) {
102 __WARN(); 102 WARN_ON(1);
103 printk("Unable to patch feature section at %p - %p" \ 103 printk("Unable to patch feature section at %p - %p" \
104 " with %p - %p\n", 104 " with %p - %p\n",
105 calc_addr(fcur, fcur->start_off), 105 calc_addr(fcur, fcur->start_off),
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
index 49eb1f1a2bb4..64e2e499e32a 100644
--- a/arch/powerpc/lib/string.S
+++ b/arch/powerpc/lib/string.S
@@ -13,13 +13,7 @@
13#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
14 14
15 .section __ex_table,"a" 15 .section __ex_table,"a"
16#ifdef CONFIG_PPC64 16 PPC_LONG_ALIGN
17 .align 3
18#define EXTBL .llong
19#else
20 .align 2
21#define EXTBL .long
22#endif
23 .text 17 .text
24 18
25_GLOBAL(strcpy) 19_GLOBAL(strcpy)
@@ -160,9 +154,9 @@ _GLOBAL(__clear_user)
160 blr 154 blr
161 155
162 .section __ex_table,"a" 156 .section __ex_table,"a"
163 EXTBL 11b,90b 157 PPC_LONG 11b,90b
164 EXTBL 1b,91b 158 PPC_LONG 1b,91b
165 EXTBL 8b,92b 159 PPC_LONG 8b,92b
166 .text 160 .text
167 161
168_GLOBAL(__strncpy_from_user) 162_GLOBAL(__strncpy_from_user)
@@ -183,7 +177,7 @@ _GLOBAL(__strncpy_from_user)
183 blr 177 blr
184 178
185 .section __ex_table,"a" 179 .section __ex_table,"a"
186 EXTBL 1b,99b 180 PPC_LONG 1b,99b
187 .text 181 .text
188 182
189/* r3 = str, r4 = len (> 0), r5 = top (highest addr) */ 183/* r3 = str, r4 = len (> 0), r5 = top (highest addr) */
@@ -208,4 +202,4 @@ _GLOBAL(__strnlen_user)
208 blr 202 blr
209 203
210 .section __ex_table,"a" 204 .section __ex_table,"a"
211 EXTBL 1b,99b 205 PPC_LONG 1b,99b
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 8d3b58ebd38e..5ce5a4dcd008 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -68,6 +68,7 @@
68 68
69#define KB (1024) 69#define KB (1024)
70#define MB (1024*KB) 70#define MB (1024*KB)
71#define GB (1024L*MB)
71 72
72/* 73/*
73 * Note: pte --> Linux PTE 74 * Note: pte --> Linux PTE
@@ -102,7 +103,6 @@ int mmu_kernel_ssize = MMU_SEGSIZE_256M;
102int mmu_highuser_ssize = MMU_SEGSIZE_256M; 103int mmu_highuser_ssize = MMU_SEGSIZE_256M;
103u16 mmu_slb_size = 64; 104u16 mmu_slb_size = 64;
104#ifdef CONFIG_HUGETLB_PAGE 105#ifdef CONFIG_HUGETLB_PAGE
105int mmu_huge_psize = MMU_PAGE_16M;
106unsigned int HPAGE_SHIFT; 106unsigned int HPAGE_SHIFT;
107#endif 107#endif
108#ifdef CONFIG_PPC_64K_PAGES 108#ifdef CONFIG_PPC_64K_PAGES
@@ -329,6 +329,44 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,
329 return 0; 329 return 0;
330} 330}
331 331
332/* Scan for 16G memory blocks that have been set aside for huge pages
333 * and reserve those blocks for 16G huge pages.
334 */
335static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
336 const char *uname, int depth,
337 void *data) {
338 char *type = of_get_flat_dt_prop(node, "device_type", NULL);
339 unsigned long *addr_prop;
340 u32 *page_count_prop;
341 unsigned int expected_pages;
342 long unsigned int phys_addr;
343 long unsigned int block_size;
344
345 /* We are scanning "memory" nodes only */
346 if (type == NULL || strcmp(type, "memory") != 0)
347 return 0;
348
349 /* This property is the log base 2 of the number of virtual pages that
350 * will represent this memory block. */
351 page_count_prop = of_get_flat_dt_prop(node, "ibm,expected#pages", NULL);
352 if (page_count_prop == NULL)
353 return 0;
354 expected_pages = (1 << page_count_prop[0]);
355 addr_prop = of_get_flat_dt_prop(node, "reg", NULL);
356 if (addr_prop == NULL)
357 return 0;
358 phys_addr = addr_prop[0];
359 block_size = addr_prop[1];
360 if (block_size != (16 * GB))
361 return 0;
362 printk(KERN_INFO "Huge page(16GB) memory: "
363 "addr = 0x%lX size = 0x%lX pages = %d\n",
364 phys_addr, block_size, expected_pages);
365 lmb_reserve(phys_addr, block_size * expected_pages);
366 add_gpage(phys_addr, block_size, expected_pages);
367 return 0;
368}
369
332static void __init htab_init_page_sizes(void) 370static void __init htab_init_page_sizes(void)
333{ 371{
334 int rc; 372 int rc;
@@ -418,15 +456,18 @@ static void __init htab_init_page_sizes(void)
418 ); 456 );
419 457
420#ifdef CONFIG_HUGETLB_PAGE 458#ifdef CONFIG_HUGETLB_PAGE
421 /* Init large page size. Currently, we pick 16M or 1M depending 459 /* Reserve 16G huge page memory sections for huge pages */
460 of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);
461
462/* Set default large page size. Currently, we pick 16M or 1M depending
422 * on what is available 463 * on what is available
423 */ 464 */
424 if (mmu_psize_defs[MMU_PAGE_16M].shift) 465 if (mmu_psize_defs[MMU_PAGE_16M].shift)
425 set_huge_psize(MMU_PAGE_16M); 466 HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_16M].shift;
426 /* With 4k/4level pagetables, we can't (for now) cope with a 467 /* With 4k/4level pagetables, we can't (for now) cope with a
427 * huge page size < PMD_SIZE */ 468 * huge page size < PMD_SIZE */
428 else if (mmu_psize_defs[MMU_PAGE_1M].shift) 469 else if (mmu_psize_defs[MMU_PAGE_1M].shift)
429 set_huge_psize(MMU_PAGE_1M); 470 HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_1M].shift;
430#endif /* CONFIG_HUGETLB_PAGE */ 471#endif /* CONFIG_HUGETLB_PAGE */
431} 472}
432 473
@@ -847,7 +888,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
847 888
848#ifdef CONFIG_HUGETLB_PAGE 889#ifdef CONFIG_HUGETLB_PAGE
849 /* Handle hugepage regions */ 890 /* Handle hugepage regions */
850 if (HPAGE_SHIFT && psize == mmu_huge_psize) { 891 if (HPAGE_SHIFT && mmu_huge_psizes[psize]) {
851 DBG_LOW(" -> huge page !\n"); 892 DBG_LOW(" -> huge page !\n");
852 return hash_huge_page(mm, access, ea, vsid, local, trap); 893 return hash_huge_page(mm, access, ea, vsid, local, trap);
853 } 894 }
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 0d12fba31bc5..fb42c4dd3217 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,21 +24,43 @@
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 27#define PAGE_SHIFT_64K 16
28#define HPAGE_SHIFT_16M 24 28#define PAGE_SHIFT_16M 24
29#define PAGE_SHIFT_16G 34
29 30
30#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) 31#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
31#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) 32#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
33#define MAX_NUMBER_GPAGES 1024
32 34
33unsigned int hugepte_shift; 35/* Tracks the 16G pages after the device tree is scanned and before the
34#define PTRS_PER_HUGEPTE (1 << hugepte_shift) 36 * huge_boot_pages list is ready. */
35#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift) 37static unsigned long gpage_freearray[MAX_NUMBER_GPAGES];
38static unsigned nr_gpages;
36 39
37#define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift) 40/* Array of valid huge page sizes - non-zero value(hugepte_shift) is
38#define HUGEPD_SIZE (1UL << HUGEPD_SHIFT) 41 * stored for the huge page sizes that are valid.
39#define HUGEPD_MASK (~(HUGEPD_SIZE-1)) 42 */
43unsigned int mmu_huge_psizes[MMU_PAGE_COUNT] = { }; /* initialize all to 0 */
44
45#define hugepte_shift mmu_huge_psizes
46#define PTRS_PER_HUGEPTE(psize) (1 << hugepte_shift[psize])
47#define HUGEPTE_TABLE_SIZE(psize) (sizeof(pte_t) << hugepte_shift[psize])
48
49#define HUGEPD_SHIFT(psize) (mmu_psize_to_shift(psize) \
50 + hugepte_shift[psize])
51#define HUGEPD_SIZE(psize) (1UL << HUGEPD_SHIFT(psize))
52#define HUGEPD_MASK(psize) (~(HUGEPD_SIZE(psize)-1))
53
54/* Subtract one from array size because we don't need a cache for 4K since
55 * is not a huge page size */
56#define huge_pgtable_cache(psize) (pgtable_cache[HUGEPTE_CACHE_NUM \
57 + psize-1])
58#define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize])
40 59
41#define huge_pgtable_cache (pgtable_cache[HUGEPTE_CACHE_NUM]) 60static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = {
61 "unused_4K", "hugepte_cache_64K", "unused_64K_AP",
62 "hugepte_cache_1M", "hugepte_cache_16M", "hugepte_cache_16G"
63};
42 64
43/* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad() 65/* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad()
44 * will choke on pointers to hugepte tables, which is handy for 66 * will choke on pointers to hugepte tables, which is handy for
@@ -49,24 +71,49 @@ typedef struct { unsigned long pd; } hugepd_t;
49 71
50#define hugepd_none(hpd) ((hpd).pd == 0) 72#define hugepd_none(hpd) ((hpd).pd == 0)
51 73
74static inline int shift_to_mmu_psize(unsigned int shift)
75{
76 switch (shift) {
77#ifndef CONFIG_PPC_64K_PAGES
78 case PAGE_SHIFT_64K:
79 return MMU_PAGE_64K;
80#endif
81 case PAGE_SHIFT_16M:
82 return MMU_PAGE_16M;
83 case PAGE_SHIFT_16G:
84 return MMU_PAGE_16G;
85 }
86 return -1;
87}
88
89static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize)
90{
91 if (mmu_psize_defs[mmu_psize].shift)
92 return mmu_psize_defs[mmu_psize].shift;
93 BUG();
94}
95
52static inline pte_t *hugepd_page(hugepd_t hpd) 96static inline pte_t *hugepd_page(hugepd_t hpd)
53{ 97{
54 BUG_ON(!(hpd.pd & HUGEPD_OK)); 98 BUG_ON(!(hpd.pd & HUGEPD_OK));
55 return (pte_t *)(hpd.pd & ~HUGEPD_OK); 99 return (pte_t *)(hpd.pd & ~HUGEPD_OK);
56} 100}
57 101
58static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr) 102static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
103 struct hstate *hstate)
59{ 104{
60 unsigned long idx = ((addr >> HPAGE_SHIFT) & (PTRS_PER_HUGEPTE-1)); 105 unsigned int shift = huge_page_shift(hstate);
106 int psize = shift_to_mmu_psize(shift);
107 unsigned long idx = ((addr >> shift) & (PTRS_PER_HUGEPTE(psize)-1));
61 pte_t *dir = hugepd_page(*hpdp); 108 pte_t *dir = hugepd_page(*hpdp);
62 109
63 return dir + idx; 110 return dir + idx;
64} 111}
65 112
66static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, 113static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
67 unsigned long address) 114 unsigned long address, unsigned int psize)
68{ 115{
69 pte_t *new = kmem_cache_alloc(huge_pgtable_cache, 116 pte_t *new = kmem_cache_alloc(huge_pgtable_cache(psize),
70 GFP_KERNEL|__GFP_REPEAT); 117 GFP_KERNEL|__GFP_REPEAT);
71 118
72 if (! new) 119 if (! new)
@@ -74,7 +121,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
74 121
75 spin_lock(&mm->page_table_lock); 122 spin_lock(&mm->page_table_lock);
76 if (!hugepd_none(*hpdp)) 123 if (!hugepd_none(*hpdp))
77 kmem_cache_free(huge_pgtable_cache, new); 124 kmem_cache_free(huge_pgtable_cache(psize), new);
78 else 125 else
79 hpdp->pd = (unsigned long)new | HUGEPD_OK; 126 hpdp->pd = (unsigned long)new | HUGEPD_OK;
80 spin_unlock(&mm->page_table_lock); 127 spin_unlock(&mm->page_table_lock);
@@ -83,27 +130,60 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
83 130
84/* Base page size affects how we walk hugetlb page tables */ 131/* Base page size affects how we walk hugetlb page tables */
85#ifdef CONFIG_PPC_64K_PAGES 132#ifdef CONFIG_PPC_64K_PAGES
86#define hpmd_offset(pud, addr) pmd_offset(pud, addr) 133#define hpmd_offset(pud, addr, h) pmd_offset(pud, addr)
87#define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr) 134#define hpmd_alloc(mm, pud, addr, h) pmd_alloc(mm, pud, addr)
88#else 135#else
89static inline 136static inline
90pmd_t *hpmd_offset(pud_t *pud, unsigned long addr) 137pmd_t *hpmd_offset(pud_t *pud, unsigned long addr, struct hstate *hstate)
91{ 138{
92 if (HPAGE_SHIFT == HPAGE_SHIFT_64K) 139 if (huge_page_shift(hstate) == PAGE_SHIFT_64K)
93 return pmd_offset(pud, addr); 140 return pmd_offset(pud, addr);
94 else 141 else
95 return (pmd_t *) pud; 142 return (pmd_t *) pud;
96} 143}
97static inline 144static inline
98pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr) 145pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr,
146 struct hstate *hstate)
99{ 147{
100 if (HPAGE_SHIFT == HPAGE_SHIFT_64K) 148 if (huge_page_shift(hstate) == PAGE_SHIFT_64K)
101 return pmd_alloc(mm, pud, addr); 149 return pmd_alloc(mm, pud, addr);
102 else 150 else
103 return (pmd_t *) pud; 151 return (pmd_t *) pud;
104} 152}
105#endif 153#endif
106 154
155/* Build list of addresses of gigantic pages. This function is used in early
156 * boot before the buddy or bootmem allocator is setup.
157 */
158void add_gpage(unsigned long addr, unsigned long page_size,
159 unsigned long number_of_pages)
160{
161 if (!addr)
162 return;
163 while (number_of_pages > 0) {
164 gpage_freearray[nr_gpages] = addr;
165 nr_gpages++;
166 number_of_pages--;
167 addr += page_size;
168 }
169}
170
171/* Moves the gigantic page addresses from the temporary list to the
172 * huge_boot_pages list.
173 */
174int alloc_bootmem_huge_page(struct hstate *hstate)
175{
176 struct huge_bootmem_page *m;
177 if (nr_gpages == 0)
178 return 0;
179 m = phys_to_virt(gpage_freearray[--nr_gpages]);
180 gpage_freearray[nr_gpages] = 0;
181 list_add(&m->list, &huge_boot_pages);
182 m->hstate = hstate;
183 return 1;
184}
185
186
107/* Modelled after find_linux_pte() */ 187/* Modelled after find_linux_pte() */
108pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) 188pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
109{ 189{
@@ -111,39 +191,52 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
111 pud_t *pu; 191 pud_t *pu;
112 pmd_t *pm; 192 pmd_t *pm;
113 193
114 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); 194 unsigned int psize;
195 unsigned int shift;
196 unsigned long sz;
197 struct hstate *hstate;
198 psize = get_slice_psize(mm, addr);
199 shift = mmu_psize_to_shift(psize);
200 sz = ((1UL) << shift);
201 hstate = size_to_hstate(sz);
115 202
116 addr &= HPAGE_MASK; 203 addr &= hstate->mask;
117 204
118 pg = pgd_offset(mm, addr); 205 pg = pgd_offset(mm, addr);
119 if (!pgd_none(*pg)) { 206 if (!pgd_none(*pg)) {
120 pu = pud_offset(pg, addr); 207 pu = pud_offset(pg, addr);
121 if (!pud_none(*pu)) { 208 if (!pud_none(*pu)) {
122 pm = hpmd_offset(pu, addr); 209 pm = hpmd_offset(pu, addr, hstate);
123 if (!pmd_none(*pm)) 210 if (!pmd_none(*pm))
124 return hugepte_offset((hugepd_t *)pm, addr); 211 return hugepte_offset((hugepd_t *)pm, addr,
212 hstate);
125 } 213 }
126 } 214 }
127 215
128 return NULL; 216 return NULL;
129} 217}
130 218
131pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 219pte_t *huge_pte_alloc(struct mm_struct *mm,
220 unsigned long addr, unsigned long sz)
132{ 221{
133 pgd_t *pg; 222 pgd_t *pg;
134 pud_t *pu; 223 pud_t *pu;
135 pmd_t *pm; 224 pmd_t *pm;
136 hugepd_t *hpdp = NULL; 225 hugepd_t *hpdp = NULL;
226 struct hstate *hstate;
227 unsigned int psize;
228 hstate = size_to_hstate(sz);
137 229
138 BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize); 230 psize = get_slice_psize(mm, addr);
231 BUG_ON(!mmu_huge_psizes[psize]);
139 232
140 addr &= HPAGE_MASK; 233 addr &= hstate->mask;
141 234
142 pg = pgd_offset(mm, addr); 235 pg = pgd_offset(mm, addr);
143 pu = pud_alloc(mm, pg, addr); 236 pu = pud_alloc(mm, pg, addr);
144 237
145 if (pu) { 238 if (pu) {
146 pm = hpmd_alloc(mm, pu, addr); 239 pm = hpmd_alloc(mm, pu, addr, hstate);
147 if (pm) 240 if (pm)
148 hpdp = (hugepd_t *)pm; 241 hpdp = (hugepd_t *)pm;
149 } 242 }
@@ -151,10 +244,10 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
151 if (! hpdp) 244 if (! hpdp)
152 return NULL; 245 return NULL;
153 246
154 if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr)) 247 if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr, psize))
155 return NULL; 248 return NULL;
156 249
157 return hugepte_offset(hpdp, addr); 250 return hugepte_offset(hpdp, addr, hstate);
158} 251}
159 252
160int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) 253int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
@@ -162,19 +255,22 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
162 return 0; 255 return 0;
163} 256}
164 257
165static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) 258static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp,
259 unsigned int psize)
166{ 260{
167 pte_t *hugepte = hugepd_page(*hpdp); 261 pte_t *hugepte = hugepd_page(*hpdp);
168 262
169 hpdp->pd = 0; 263 hpdp->pd = 0;
170 tlb->need_flush = 1; 264 tlb->need_flush = 1;
171 pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, HUGEPTE_CACHE_NUM, 265 pgtable_free_tlb(tlb, pgtable_free_cache(hugepte,
266 HUGEPTE_CACHE_NUM+psize-1,
172 PGF_CACHENUM_MASK)); 267 PGF_CACHENUM_MASK));
173} 268}
174 269
175static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud, 270static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
176 unsigned long addr, unsigned long end, 271 unsigned long addr, unsigned long end,
177 unsigned long floor, unsigned long ceiling) 272 unsigned long floor, unsigned long ceiling,
273 unsigned int psize)
178{ 274{
179 pmd_t *pmd; 275 pmd_t *pmd;
180 unsigned long next; 276 unsigned long next;
@@ -186,7 +282,7 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
186 next = pmd_addr_end(addr, end); 282 next = pmd_addr_end(addr, end);
187 if (pmd_none(*pmd)) 283 if (pmd_none(*pmd))
188 continue; 284 continue;
189 free_hugepte_range(tlb, (hugepd_t *)pmd); 285 free_hugepte_range(tlb, (hugepd_t *)pmd, psize);
190 } while (pmd++, addr = next, addr != end); 286 } while (pmd++, addr = next, addr != end);
191 287
192 start &= PUD_MASK; 288 start &= PUD_MASK;
@@ -212,6 +308,9 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
212 pud_t *pud; 308 pud_t *pud;
213 unsigned long next; 309 unsigned long next;
214 unsigned long start; 310 unsigned long start;
311 unsigned int shift;
312 unsigned int psize = get_slice_psize(tlb->mm, addr);
313 shift = mmu_psize_to_shift(psize);
215 314
216 start = addr; 315 start = addr;
217 pud = pud_offset(pgd, addr); 316 pud = pud_offset(pgd, addr);
@@ -220,16 +319,18 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
220#ifdef CONFIG_PPC_64K_PAGES 319#ifdef CONFIG_PPC_64K_PAGES
221 if (pud_none_or_clear_bad(pud)) 320 if (pud_none_or_clear_bad(pud))
222 continue; 321 continue;
223 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling); 322 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling,
323 psize);
224#else 324#else
225 if (HPAGE_SHIFT == HPAGE_SHIFT_64K) { 325 if (shift == PAGE_SHIFT_64K) {
226 if (pud_none_or_clear_bad(pud)) 326 if (pud_none_or_clear_bad(pud))
227 continue; 327 continue;
228 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling); 328 hugetlb_free_pmd_range(tlb, pud, addr, next, floor,
329 ceiling, psize);
229 } else { 330 } else {
230 if (pud_none(*pud)) 331 if (pud_none(*pud))
231 continue; 332 continue;
232 free_hugepte_range(tlb, (hugepd_t *)pud); 333 free_hugepte_range(tlb, (hugepd_t *)pud, psize);
233 } 334 }
234#endif 335#endif
235 } while (pud++, addr = next, addr != end); 336 } while (pud++, addr = next, addr != end);
@@ -255,7 +356,7 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
255 * 356 *
256 * Must be called with pagetable lock held. 357 * Must be called with pagetable lock held.
257 */ 358 */
258void hugetlb_free_pgd_range(struct mmu_gather **tlb, 359void hugetlb_free_pgd_range(struct mmu_gather *tlb,
259 unsigned long addr, unsigned long end, 360 unsigned long addr, unsigned long end,
260 unsigned long floor, unsigned long ceiling) 361 unsigned long floor, unsigned long ceiling)
261{ 362{
@@ -297,31 +398,33 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
297 * now has no other vmas using it, so can be freed, we don't 398 * now has no other vmas using it, so can be freed, we don't
298 * bother to round floor or end up - the tests don't need that. 399 * bother to round floor or end up - the tests don't need that.
299 */ 400 */
401 unsigned int psize = get_slice_psize(tlb->mm, addr);
300 402
301 addr &= HUGEPD_MASK; 403 addr &= HUGEPD_MASK(psize);
302 if (addr < floor) { 404 if (addr < floor) {
303 addr += HUGEPD_SIZE; 405 addr += HUGEPD_SIZE(psize);
304 if (!addr) 406 if (!addr)
305 return; 407 return;
306 } 408 }
307 if (ceiling) { 409 if (ceiling) {
308 ceiling &= HUGEPD_MASK; 410 ceiling &= HUGEPD_MASK(psize);
309 if (!ceiling) 411 if (!ceiling)
310 return; 412 return;
311 } 413 }
312 if (end - 1 > ceiling - 1) 414 if (end - 1 > ceiling - 1)
313 end -= HUGEPD_SIZE; 415 end -= HUGEPD_SIZE(psize);
314 if (addr > end - 1) 416 if (addr > end - 1)
315 return; 417 return;
316 418
317 start = addr; 419 start = addr;
318 pgd = pgd_offset((*tlb)->mm, addr); 420 pgd = pgd_offset(tlb->mm, addr);
319 do { 421 do {
320 BUG_ON(get_slice_psize((*tlb)->mm, addr) != mmu_huge_psize); 422 psize = get_slice_psize(tlb->mm, addr);
423 BUG_ON(!mmu_huge_psizes[psize]);
321 next = pgd_addr_end(addr, end); 424 next = pgd_addr_end(addr, end);
322 if (pgd_none_or_clear_bad(pgd)) 425 if (pgd_none_or_clear_bad(pgd))
323 continue; 426 continue;
324 hugetlb_free_pud_range(*tlb, pgd, addr, next, floor, ceiling); 427 hugetlb_free_pud_range(tlb, pgd, addr, next, floor, ceiling);
325 } while (pgd++, addr = next, addr != end); 428 } while (pgd++, addr = next, addr != end);
326} 429}
327 430
@@ -334,7 +437,11 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
334 * necessary anymore if we make hpte_need_flush() get the 437 * necessary anymore if we make hpte_need_flush() get the
335 * page size from the slices 438 * page size from the slices
336 */ 439 */
337 pte_update(mm, addr & HPAGE_MASK, ptep, ~0UL, 1); 440 unsigned int psize = get_slice_psize(mm, addr);
441 unsigned int shift = mmu_psize_to_shift(psize);
442 unsigned long sz = ((1UL) << shift);
443 struct hstate *hstate = size_to_hstate(sz);
444 pte_update(mm, addr & hstate->mask, ptep, ~0UL, 1);
338 } 445 }
339 *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); 446 *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS);
340} 447}
@@ -351,14 +458,19 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
351{ 458{
352 pte_t *ptep; 459 pte_t *ptep;
353 struct page *page; 460 struct page *page;
461 unsigned int mmu_psize = get_slice_psize(mm, address);
354 462
355 if (get_slice_psize(mm, address) != mmu_huge_psize) 463 /* Verify it is a huge page else bail. */
464 if (!mmu_huge_psizes[mmu_psize])
356 return ERR_PTR(-EINVAL); 465 return ERR_PTR(-EINVAL);
357 466
358 ptep = huge_pte_offset(mm, address); 467 ptep = huge_pte_offset(mm, address);
359 page = pte_page(*ptep); 468 page = pte_page(*ptep);
360 if (page) 469 if (page) {
361 page += (address % HPAGE_SIZE) / PAGE_SIZE; 470 unsigned int shift = mmu_psize_to_shift(mmu_psize);
471 unsigned long sz = ((1UL) << shift);
472 page += (address % sz) / PAGE_SIZE;
473 }
362 474
363 return page; 475 return page;
364} 476}
@@ -368,6 +480,11 @@ int pmd_huge(pmd_t pmd)
368 return 0; 480 return 0;
369} 481}
370 482
483int pud_huge(pud_t pud)
484{
485 return 0;
486}
487
371struct page * 488struct page *
372follow_huge_pmd(struct mm_struct *mm, unsigned long address, 489follow_huge_pmd(struct mm_struct *mm, unsigned long address,
373 pmd_t *pmd, int write) 490 pmd_t *pmd, int write)
@@ -381,15 +498,16 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
381 unsigned long len, unsigned long pgoff, 498 unsigned long len, unsigned long pgoff,
382 unsigned long flags) 499 unsigned long flags)
383{ 500{
384 return slice_get_unmapped_area(addr, len, flags, 501 struct hstate *hstate = hstate_file(file);
385 mmu_huge_psize, 1, 0); 502 int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
503 return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
386} 504}
387 505
388/* 506/*
389 * Called by asm hashtable.S for doing lazy icache flush 507 * Called by asm hashtable.S for doing lazy icache flush
390 */ 508 */
391static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags, 509static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
392 pte_t pte, int trap) 510 pte_t pte, int trap, unsigned long sz)
393{ 511{
394 struct page *page; 512 struct page *page;
395 int i; 513 int i;
@@ -402,7 +520,7 @@ static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
402 /* page is dirty */ 520 /* page is dirty */
403 if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) { 521 if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
404 if (trap == 0x400) { 522 if (trap == 0x400) {
405 for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) 523 for (i = 0; i < (sz / PAGE_SIZE); i++)
406 __flush_dcache_icache(page_address(page+i)); 524 __flush_dcache_icache(page_address(page+i));
407 set_bit(PG_arch_1, &page->flags); 525 set_bit(PG_arch_1, &page->flags);
408 } else { 526 } else {
@@ -418,11 +536,16 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
418{ 536{
419 pte_t *ptep; 537 pte_t *ptep;
420 unsigned long old_pte, new_pte; 538 unsigned long old_pte, new_pte;
421 unsigned long va, rflags, pa; 539 unsigned long va, rflags, pa, sz;
422 long slot; 540 long slot;
423 int err = 1; 541 int err = 1;
424 int ssize = user_segment_size(ea); 542 int ssize = user_segment_size(ea);
543 unsigned int mmu_psize;
544 int shift;
545 mmu_psize = get_slice_psize(mm, ea);
425 546
547 if (!mmu_huge_psizes[mmu_psize])
548 goto out;
426 ptep = huge_pte_offset(mm, ea); 549 ptep = huge_pte_offset(mm, ea);
427 550
428 /* Search the Linux page table for a match with va */ 551 /* Search the Linux page table for a match with va */
@@ -465,30 +588,32 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
465 rflags = 0x2 | (!(new_pte & _PAGE_RW)); 588 rflags = 0x2 | (!(new_pte & _PAGE_RW));
466 /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */ 589 /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
467 rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N); 590 rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
591 shift = mmu_psize_to_shift(mmu_psize);
592 sz = ((1UL) << shift);
468 if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) 593 if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
469 /* No CPU has hugepages but lacks no execute, so we 594 /* No CPU has hugepages but lacks no execute, so we
470 * don't need to worry about that case */ 595 * don't need to worry about that case */
471 rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte), 596 rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),
472 trap); 597 trap, sz);
473 598
474 /* Check if pte already has an hpte (case 2) */ 599 /* Check if pte already has an hpte (case 2) */
475 if (unlikely(old_pte & _PAGE_HASHPTE)) { 600 if (unlikely(old_pte & _PAGE_HASHPTE)) {
476 /* There MIGHT be an HPTE for this pte */ 601 /* There MIGHT be an HPTE for this pte */
477 unsigned long hash, slot; 602 unsigned long hash, slot;
478 603
479 hash = hpt_hash(va, HPAGE_SHIFT, ssize); 604 hash = hpt_hash(va, shift, ssize);
480 if (old_pte & _PAGE_F_SECOND) 605 if (old_pte & _PAGE_F_SECOND)
481 hash = ~hash; 606 hash = ~hash;
482 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP; 607 slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
483 slot += (old_pte & _PAGE_F_GIX) >> 12; 608 slot += (old_pte & _PAGE_F_GIX) >> 12;
484 609
485 if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize, 610 if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_psize,
486 ssize, local) == -1) 611 ssize, local) == -1)
487 old_pte &= ~_PAGE_HPTEFLAGS; 612 old_pte &= ~_PAGE_HPTEFLAGS;
488 } 613 }
489 614
490 if (likely(!(old_pte & _PAGE_HASHPTE))) { 615 if (likely(!(old_pte & _PAGE_HASHPTE))) {
491 unsigned long hash = hpt_hash(va, HPAGE_SHIFT, ssize); 616 unsigned long hash = hpt_hash(va, shift, ssize);
492 unsigned long hpte_group; 617 unsigned long hpte_group;
493 618
494 pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT; 619 pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT;
@@ -509,7 +634,7 @@ repeat:
509 634
510 /* Insert into the hash table, primary slot */ 635 /* Insert into the hash table, primary slot */
511 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0, 636 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0,
512 mmu_huge_psize, ssize); 637 mmu_psize, ssize);
513 638
514 /* Primary is full, try the secondary */ 639 /* Primary is full, try the secondary */
515 if (unlikely(slot == -1)) { 640 if (unlikely(slot == -1)) {
@@ -517,7 +642,7 @@ repeat:
517 HPTES_PER_GROUP) & ~0x7UL; 642 HPTES_PER_GROUP) & ~0x7UL;
518 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 643 slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags,
519 HPTE_V_SECONDARY, 644 HPTE_V_SECONDARY,
520 mmu_huge_psize, ssize); 645 mmu_psize, ssize);
521 if (slot == -1) { 646 if (slot == -1) {
522 if (mftb() & 0x1) 647 if (mftb() & 0x1)
523 hpte_group = ((hash & htab_hash_mask) * 648 hpte_group = ((hash & htab_hash_mask) *
@@ -549,45 +674,54 @@ void set_huge_psize(int psize)
549{ 674{
550 /* Check that it is a page size supported by the hardware and 675 /* Check that it is a page size supported by the hardware and
551 * that it fits within pagetable limits. */ 676 * that it fits within pagetable limits. */
552 if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT && 677 if (mmu_psize_defs[psize].shift &&
678 mmu_psize_defs[psize].shift < SID_SHIFT_1T &&
553 (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT || 679 (mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
554 mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) { 680 mmu_psize_defs[psize].shift == PAGE_SHIFT_64K ||
555 HPAGE_SHIFT = mmu_psize_defs[psize].shift; 681 mmu_psize_defs[psize].shift == PAGE_SHIFT_16G)) {
556 mmu_huge_psize = psize; 682 /* Return if huge page size has already been setup or is the
557#ifdef CONFIG_PPC_64K_PAGES 683 * same as the base page size. */
558 hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT); 684 if (mmu_huge_psizes[psize] ||
559#else 685 mmu_psize_defs[psize].shift == PAGE_SHIFT)
560 if (HPAGE_SHIFT == HPAGE_SHIFT_64K) 686 return;
561 hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT); 687 hugetlb_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT);
562 else 688
563 hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT); 689 switch (mmu_psize_defs[psize].shift) {
564#endif 690 case PAGE_SHIFT_64K:
565 691 /* We only allow 64k hpages with 4k base page,
692 * which was checked above, and always put them
693 * at the PMD */
694 hugepte_shift[psize] = PMD_SHIFT;
695 break;
696 case PAGE_SHIFT_16M:
697 /* 16M pages can be at two different levels
698 * of pagestables based on base page size */
699 if (PAGE_SHIFT == PAGE_SHIFT_64K)
700 hugepte_shift[psize] = PMD_SHIFT;
701 else /* 4k base page */
702 hugepte_shift[psize] = PUD_SHIFT;
703 break;
704 case PAGE_SHIFT_16G:
705 /* 16G pages are always at PGD level */
706 hugepte_shift[psize] = PGDIR_SHIFT;
707 break;
708 }
709 hugepte_shift[psize] -= mmu_psize_defs[psize].shift;
566 } else 710 } else
567 HPAGE_SHIFT = 0; 711 hugepte_shift[psize] = 0;
568} 712}
569 713
570static int __init hugepage_setup_sz(char *str) 714static int __init hugepage_setup_sz(char *str)
571{ 715{
572 unsigned long long size; 716 unsigned long long size;
573 int mmu_psize = -1; 717 int mmu_psize;
574 int shift; 718 int shift;
575 719
576 size = memparse(str, &str); 720 size = memparse(str, &str);
577 721
578 shift = __ffs(size); 722 shift = __ffs(size);
579 switch (shift) { 723 mmu_psize = shift_to_mmu_psize(shift);
580#ifndef CONFIG_PPC_64K_PAGES 724 if (mmu_psize >= 0 && mmu_psize_defs[mmu_psize].shift)
581 case HPAGE_SHIFT_64K:
582 mmu_psize = MMU_PAGE_64K;
583 break;
584#endif
585 case HPAGE_SHIFT_16M:
586 mmu_psize = MMU_PAGE_16M;
587 break;
588 }
589
590 if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
591 set_huge_psize(mmu_psize); 725 set_huge_psize(mmu_psize);
592 else 726 else
593 printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size); 727 printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
@@ -603,16 +737,31 @@ static void zero_ctor(struct kmem_cache *cache, void *addr)
603 737
604static int __init hugetlbpage_init(void) 738static int __init hugetlbpage_init(void)
605{ 739{
740 unsigned int psize;
741
606 if (!cpu_has_feature(CPU_FTR_16M_PAGE)) 742 if (!cpu_has_feature(CPU_FTR_16M_PAGE))
607 return -ENODEV; 743 return -ENODEV;
608 744 /* Add supported huge page sizes. Need to change HUGE_MAX_HSTATE
609 huge_pgtable_cache = kmem_cache_create("hugepte_cache", 745 * and adjust PTE_NONCACHE_NUM if the number of supported huge page
610 HUGEPTE_TABLE_SIZE, 746 * sizes changes.
611 HUGEPTE_TABLE_SIZE, 747 */
612 0, 748 set_huge_psize(MMU_PAGE_16M);
613 zero_ctor); 749 set_huge_psize(MMU_PAGE_64K);
614 if (! huge_pgtable_cache) 750 set_huge_psize(MMU_PAGE_16G);
615 panic("hugetlbpage_init(): could not create hugepte cache\n"); 751
752 for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) {
753 if (mmu_huge_psizes[psize]) {
754 huge_pgtable_cache(psize) = kmem_cache_create(
755 HUGEPTE_CACHE_NAME(psize),
756 HUGEPTE_TABLE_SIZE(psize),
757 HUGEPTE_TABLE_SIZE(psize),
758 0,
759 zero_ctor);
760 if (!huge_pgtable_cache(psize))
761 panic("hugetlbpage_init(): could not create %s"\
762 "\n", HUGEPTE_CACHE_NAME(psize));
763 }
764 }
616 765
617 return 0; 766 return 0;
618} 767}
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 6ef63caca682..a41bc5aa2043 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -153,10 +153,10 @@ static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
153}; 153};
154 154
155#ifdef CONFIG_HUGETLB_PAGE 155#ifdef CONFIG_HUGETLB_PAGE
156/* Hugepages need one extra cache, initialized in hugetlbpage.c. We 156/* Hugepages need an extra cache per hugepagesize, initialized in
157 * can't put into the tables above, because HPAGE_SHIFT is not compile 157 * hugetlbpage.c. We can't put into the tables above, because HPAGE_SHIFT
158 * time constant. */ 158 * is not compile time constant. */
159struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1]; 159struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+MMU_PAGE_COUNT];
160#else 160#else
161struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; 161struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)];
162#endif 162#endif
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index cf4bffba6f7c..d9a181351332 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(numa_cpu_lookup_table);
39EXPORT_SYMBOL(numa_cpumask_lookup_table); 39EXPORT_SYMBOL(numa_cpumask_lookup_table);
40EXPORT_SYMBOL(node_data); 40EXPORT_SYMBOL(node_data);
41 41
42static bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES];
43static int min_common_depth; 42static int min_common_depth;
44static int n_mem_addr_cells, n_mem_size_cells; 43static int n_mem_addr_cells, n_mem_size_cells;
45 44
@@ -816,7 +815,7 @@ void __init do_init_bootmem(void)
816 dbg("node %d\n", nid); 815 dbg("node %d\n", nid);
817 dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); 816 dbg("NODE_DATA() = %p\n", NODE_DATA(nid));
818 817
819 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 818 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
820 NODE_DATA(nid)->node_start_pfn = start_pfn; 819 NODE_DATA(nid)->node_start_pfn = start_pfn;
821 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 820 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
822 821
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index c7584072dfcc..2001abdb1912 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -145,13 +145,20 @@ void pte_free(struct mm_struct *mm, pgtable_t ptepage)
145void __iomem * 145void __iomem *
146ioremap(phys_addr_t addr, unsigned long size) 146ioremap(phys_addr_t addr, unsigned long size)
147{ 147{
148 return __ioremap(addr, size, _PAGE_NO_CACHE); 148 return __ioremap(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED);
149} 149}
150EXPORT_SYMBOL(ioremap); 150EXPORT_SYMBOL(ioremap);
151 151
152void __iomem * 152void __iomem *
153ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) 153ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags)
154{ 154{
155 /* writeable implies dirty for kernel addresses */
156 if (flags & _PAGE_RW)
157 flags |= _PAGE_DIRTY | _PAGE_HWWRITE;
158
159 /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */
160 flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC);
161
155 return __ioremap(addr, size, flags); 162 return __ioremap(addr, size, flags);
156} 163}
157EXPORT_SYMBOL(ioremap_flags); 164EXPORT_SYMBOL(ioremap_flags);
@@ -163,6 +170,14 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
163 phys_addr_t p; 170 phys_addr_t p;
164 int err; 171 int err;
165 172
173 /* Make sure we have the base flags */
174 if ((flags & _PAGE_PRESENT) == 0)
175 flags |= _PAGE_KERNEL;
176
177 /* Non-cacheable page cannot be coherent */
178 if (flags & _PAGE_NO_CACHE)
179 flags &= ~_PAGE_COHERENT;
180
166 /* 181 /*
167 * Choose an address to map it to. 182 * Choose an address to map it to.
168 * Once the vmalloc system is running, we use it. 183 * Once the vmalloc system is running, we use it.
@@ -219,11 +234,6 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
219 v = (ioremap_bot -= size); 234 v = (ioremap_bot -= size);
220 } 235 }
221 236
222 if ((flags & _PAGE_PRESENT) == 0)
223 flags |= _PAGE_KERNEL;
224 if (flags & _PAGE_NO_CACHE)
225 flags |= _PAGE_GUARDED;
226
227 /* 237 /*
228 * Should check if it is a candidate for a BAT mapping 238 * Should check if it is a candidate for a BAT mapping
229 */ 239 */
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 3ef0ad2f9ca0..365e61ae5dbc 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -107,9 +107,18 @@ void __iomem * __ioremap_at(phys_addr_t pa, void *ea, unsigned long size,
107{ 107{
108 unsigned long i; 108 unsigned long i;
109 109
110 /* Make sure we have the base flags */
110 if ((flags & _PAGE_PRESENT) == 0) 111 if ((flags & _PAGE_PRESENT) == 0)
111 flags |= pgprot_val(PAGE_KERNEL); 112 flags |= pgprot_val(PAGE_KERNEL);
112 113
114 /* Non-cacheable page cannot be coherent */
115 if (flags & _PAGE_NO_CACHE)
116 flags &= ~_PAGE_COHERENT;
117
118 /* We don't support the 4K PFN hack with ioremap */
119 if (flags & _PAGE_4K_PFN)
120 return NULL;
121
113 WARN_ON(pa & ~PAGE_MASK); 122 WARN_ON(pa & ~PAGE_MASK);
114 WARN_ON(((unsigned long)ea) & ~PAGE_MASK); 123 WARN_ON(((unsigned long)ea) & ~PAGE_MASK);
115 WARN_ON(size & ~PAGE_MASK); 124 WARN_ON(size & ~PAGE_MASK);
@@ -190,6 +199,13 @@ void __iomem * ioremap(phys_addr_t addr, unsigned long size)
190void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size, 199void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
191 unsigned long flags) 200 unsigned long flags)
192{ 201{
202 /* writeable implies dirty for kernel addresses */
203 if (flags & _PAGE_RW)
204 flags |= _PAGE_DIRTY;
205
206 /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */
207 flags &= ~(_PAGE_USER | _PAGE_EXEC);
208
193 if (ppc_md.ioremap) 209 if (ppc_md.ioremap)
194 return ppc_md.ioremap(addr, size, flags); 210 return ppc_md.ioremap(addr, size, flags);
195 return __ioremap(addr, size, flags); 211 return __ioremap(addr, size, flags);
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index a01b5c608ff9..409fcc7b63ce 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -147,7 +147,7 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
147 */ 147 */
148 if (huge) { 148 if (huge) {
149#ifdef CONFIG_HUGETLB_PAGE 149#ifdef CONFIG_HUGETLB_PAGE
150 psize = mmu_huge_psize; 150 psize = get_slice_psize(mm, addr);;
151#else 151#else
152 BUG(); 152 BUG();
153 psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */ 153 psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index acd2fc8cf492..d664b1bce381 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -3,6 +3,7 @@ config PPC_MPC52xx
3 depends on PPC_MULTIPLATFORM && PPC32 3 depends on PPC_MULTIPLATFORM && PPC32
4 select FSL_SOC 4 select FSL_SOC
5 select PPC_CLOCK 5 select PPC_CLOCK
6 select PPC_PCI_CHOICE
6 7
7config PPC_MPC5200_SIMPLE 8config PPC_MPC5200_SIMPLE
8 bool "Generic support for simple MPC5200 based boards" 9 bool "Generic support for simple MPC5200 based boards"
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig
index 1c8034bfa796..75eb1ede5497 100644
--- a/arch/powerpc/platforms/82xx/Kconfig
+++ b/arch/powerpc/platforms/82xx/Kconfig
@@ -30,6 +30,7 @@ config EP8248E
30 select 8272 30 select 8272
31 select 8260 31 select 8260
32 select FSL_SOC 32 select FSL_SOC
33 select PHYLIB
33 select MDIO_BITBANG 34 select MDIO_BITBANG
34 help 35 help
35 This enables support for the Embedded Planet EP8248E board. 36 This enables support for the Embedded Planet EP8248E board.
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 373e993a5ed5..d5770fdf7f09 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -59,7 +59,6 @@ static void __init ep8248e_pic_init(void)
59 of_node_put(np); 59 of_node_put(np);
60} 60}
61 61
62#ifdef CONFIG_FS_ENET_MDIO_FCC
63static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level) 62static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level)
64{ 63{
65 if (level) 64 if (level)
@@ -165,7 +164,6 @@ static struct of_platform_driver ep8248e_mdio_driver = {
165 .probe = ep8248e_mdio_probe, 164 .probe = ep8248e_mdio_probe,
166 .remove = ep8248e_mdio_remove, 165 .remove = ep8248e_mdio_remove,
167}; 166};
168#endif
169 167
170struct cpm_pin { 168struct cpm_pin {
171 int port, pin, flags; 169 int port, pin, flags;
@@ -298,9 +296,7 @@ static __initdata struct of_device_id of_bus_ids[] = {
298static int __init declare_of_platform_devices(void) 296static int __init declare_of_platform_devices(void)
299{ 297{
300 of_platform_bus_probe(NULL, of_bus_ids, NULL); 298 of_platform_bus_probe(NULL, of_bus_ids, NULL);
301#ifdef CONFIG_FS_ENET_MDIO_FCC
302 of_register_platform_driver(&ep8248e_mdio_driver); 299 of_register_platform_driver(&ep8248e_mdio_driver);
303#endif
304 300
305 return 0; 301 return 0;
306} 302}
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 27d9bf86de01..6159c5d4e5f1 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -2,7 +2,8 @@ menuconfig PPC_83xx
2 bool "83xx-based boards" 2 bool "83xx-based boards"
3 depends on 6xx && PPC_MULTIPLATFORM 3 depends on 6xx && PPC_MULTIPLATFORM
4 select PPC_UDBG_16550 4 select PPC_UDBG_16550
5 select PPC_INDIRECT_PCI 5 select PPC_PCI_CHOICE
6 select FSL_PCI if PCI
6 select FSL_SOC 7 select FSL_SOC
7 select IPIC 8 select IPIC
8 9
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index f331fd7dd836..ba5028e29890 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -2,7 +2,7 @@
2# Makefile for the PowerPC 83xx linux kernel. 2# Makefile for the PowerPC 83xx linux kernel.
3# 3#
4obj-y := misc.o usb.o 4obj-y := misc.o usb.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_SUSPEND) += suspend.o suspend-asm.o
6obj-$(CONFIG_MPC831x_RDB) += mpc831x_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
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
index c4db5172b27a..a428f8d1ac80 100644
--- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c
@@ -19,6 +19,7 @@
19#include <asm/time.h> 19#include <asm/time.h>
20#include <asm/ipic.h> 20#include <asm/ipic.h>
21#include <asm/udbg.h> 21#include <asm/udbg.h>
22#include <sysdev/fsl_pci.h>
22 23
23#include "mpc83xx.h" 24#include "mpc83xx.h"
24 25
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
index 6dbc6eabcb02..dd4be4aee314 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
@@ -36,6 +36,7 @@
36#include <asm/prom.h> 36#include <asm/prom.h>
37#include <asm/udbg.h> 37#include <asm/udbg.h>
38#include <sysdev/fsl_soc.h> 38#include <sysdev/fsl_soc.h>
39#include <sysdev/fsl_pci.h>
39#include <asm/qe.h> 40#include <asm/qe.h>
40#include <asm/qe_ic.h> 41#include <asm/qe_ic.h>
41 42
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index e7f706b624fe..f049d692d4c8 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -27,6 +27,7 @@
27#include <asm/qe.h> 27#include <asm/qe.h>
28#include <asm/qe_ic.h> 28#include <asm/qe_ic.h>
29#include <sysdev/fsl_soc.h> 29#include <sysdev/fsl_soc.h>
30#include <sysdev/fsl_pci.h>
30 31
31#include "mpc83xx.h" 32#include "mpc83xx.h"
32 33
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index 50e8f632061c..7301d77a08ee 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -35,6 +35,7 @@
35#include <asm/prom.h> 35#include <asm/prom.h>
36#include <asm/udbg.h> 36#include <asm/udbg.h>
37#include <sysdev/fsl_soc.h> 37#include <sysdev/fsl_soc.h>
38#include <sysdev/fsl_pci.h>
38 39
39#include "mpc83xx.h" 40#include "mpc83xx.h"
40 41
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c
index 2b8a0a3f8557..30d509aa9f08 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c
@@ -35,6 +35,7 @@
35#include <asm/prom.h> 35#include <asm/prom.h>
36#include <asm/udbg.h> 36#include <asm/udbg.h>
37#include <sysdev/fsl_soc.h> 37#include <sysdev/fsl_soc.h>
38#include <sysdev/fsl_pci.h>
38 39
39#include "mpc83xx.h" 40#include "mpc83xx.h"
40 41
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c
index c2e5de60c055..75b80e836576 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c
@@ -42,6 +42,7 @@
42#include <asm/prom.h> 42#include <asm/prom.h>
43#include <asm/udbg.h> 43#include <asm/udbg.h>
44#include <sysdev/fsl_soc.h> 44#include <sysdev/fsl_soc.h>
45#include <sysdev/fsl_pci.h>
45#include <asm/qe.h> 46#include <asm/qe.h>
46#include <asm/qe_ic.h> 47#include <asm/qe_ic.h>
47 48
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
index c10dec4bf178..a5273bb28e1b 100644
--- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c
+++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c
@@ -23,6 +23,7 @@
23#include <asm/qe.h> 23#include <asm/qe.h>
24#include <asm/qe_ic.h> 24#include <asm/qe_ic.h>
25#include <sysdev/fsl_soc.h> 25#include <sysdev/fsl_soc.h>
26#include <sysdev/fsl_pci.h>
26 27
27#include "mpc83xx.h" 28#include "mpc83xx.h"
28 29
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c
index 64d17b0d6455..be62de23bead 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_mds.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c
@@ -19,6 +19,7 @@
19#include <asm/ipic.h> 19#include <asm/ipic.h>
20#include <asm/udbg.h> 20#include <asm/udbg.h>
21#include <asm/prom.h> 21#include <asm/prom.h>
22#include <sysdev/fsl_pci.h>
22 23
23#include "mpc83xx.h" 24#include "mpc83xx.h"
24 25
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
index c00356bdb1dd..da030afa2e2c 100644
--- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c
@@ -17,6 +17,7 @@
17#include <asm/time.h> 17#include <asm/time.h>
18#include <asm/ipic.h> 18#include <asm/ipic.h>
19#include <asm/udbg.h> 19#include <asm/udbg.h>
20#include <sysdev/fsl_pci.h>
20 21
21#include "mpc83xx.h" 22#include "mpc83xx.h"
22 23
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h
index 88a3b5cabb18..2a7cbabb410a 100644
--- a/arch/powerpc/platforms/83xx/mpc83xx.h
+++ b/arch/powerpc/platforms/83xx/mpc83xx.h
@@ -26,6 +26,8 @@
26#define MPC834X_SICRL_USB1 0x20000000 26#define MPC834X_SICRL_USB1 0x20000000
27#define MPC831X_SICRL_USB_MASK 0x00000c00 27#define MPC831X_SICRL_USB_MASK 0x00000c00
28#define MPC831X_SICRL_USB_ULPI 0x00000800 28#define MPC831X_SICRL_USB_ULPI 0x00000800
29#define MPC8315_SICRL_USB_MASK 0x000000fc
30#define MPC8315_SICRL_USB_ULPI 0x00000054
29#define MPC837X_SICRL_USB_MASK 0xf0000000 31#define MPC837X_SICRL_USB_MASK 0xf0000000
30#define MPC837X_SICRL_USB_ULPI 0x50000000 32#define MPC837X_SICRL_USB_ULPI 0x50000000
31 33
@@ -34,6 +36,8 @@
34#define MPC834X_SICRH_USB_UTMI 0x00020000 36#define MPC834X_SICRH_USB_UTMI 0x00020000
35#define MPC831X_SICRH_USB_MASK 0x000000e0 37#define MPC831X_SICRH_USB_MASK 0x000000e0
36#define MPC831X_SICRH_USB_ULPI 0x000000a0 38#define MPC831X_SICRH_USB_ULPI 0x000000a0
39#define MPC8315_SICRH_USB_MASK 0x0000ff00
40#define MPC8315_SICRH_USB_ULPI 0x00000000
37 41
38/* USB Control Register */ 42/* USB Control Register */
39#define FSL_USB2_CONTROL_OFFS 0x500 43#define FSL_USB2_CONTROL_OFFS 0x500
@@ -55,7 +59,6 @@
55 * mpc83xx_* files. Mostly for use by mpc83xx_setup 59 * mpc83xx_* files. Mostly for use by mpc83xx_setup
56 */ 60 */
57 61
58extern int mpc83xx_add_bridge(struct device_node *dev);
59extern void mpc83xx_restart(char *cmd); 62extern void mpc83xx_restart(char *cmd);
60extern long mpc83xx_time_init(void); 63extern long mpc83xx_time_init(void);
61extern int mpc834x_usb_cfg(void); 64extern int mpc834x_usb_cfg(void);
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
deleted file mode 100644
index 14f1080c6c9d..000000000000
--- a/arch/powerpc/platforms/83xx/pci.c
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * FSL SoC setup code
3 *
4 * Maintained by Kumar Gala (see MAINTAINERS for contact information)
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#include <linux/stddef.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/errno.h>
16#include <linux/pci.h>
17#include <linux/delay.h>
18#include <linux/irq.h>
19#include <linux/module.h>
20
21#include <asm/system.h>
22#include <asm/atomic.h>
23#include <asm/io.h>
24#include <asm/pci-bridge.h>
25#include <asm/prom.h>
26#include <sysdev/fsl_soc.h>
27
28#undef DEBUG
29
30#ifdef DEBUG
31#define DBG(x...) printk(x)
32#else
33#define DBG(x...)
34#endif
35
36int __init mpc83xx_add_bridge(struct device_node *dev)
37{
38 int len;
39 struct pci_controller *hose;
40 struct resource rsrc;
41 const int *bus_range;
42 int primary = 1, has_address = 0;
43 phys_addr_t immr = get_immrbase();
44
45 DBG("Adding PCI host bridge %s\n", dev->full_name);
46
47 /* Fetch host bridge registers address */
48 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
49
50 /* Get bus range if any */
51 bus_range = of_get_property(dev, "bus-range", &len);
52 if (bus_range == NULL || len < 2 * sizeof(int)) {
53 printk(KERN_WARNING "Can't get bus-range for %s, assume"
54 " bus 0\n", dev->full_name);
55 }
56
57 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
58 hose = pcibios_alloc_controller(dev);
59 if (!hose)
60 return -ENOMEM;
61
62 hose->first_busno = bus_range ? bus_range[0] : 0;
63 hose->last_busno = bus_range ? bus_range[1] : 0xff;
64
65 /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar
66 * the other at 0x8600, we consider the 0x8500 the primary controller
67 */
68 /* PCI 1 */
69 if ((rsrc.start & 0xfffff) == 0x8500) {
70 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0);
71 }
72 /* PCI 2 */
73 if ((rsrc.start & 0xfffff) == 0x8600) {
74 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0);
75 primary = 0;
76 }
77
78 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
79 "Firmware bus number: %d->%d\n",
80 (unsigned long long)rsrc.start, hose->first_busno,
81 hose->last_busno);
82
83 DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
84 hose, hose->cfg_addr, hose->cfg_data);
85
86 /* Interpret the "ranges" property */
87 /* This also maps the I/O region and sets isa_io/mem_base */
88 pci_process_bridge_OF_ranges(hose, dev, primary);
89
90 return 0;
91}
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
index cf382474a83d..fc21f5c15bab 100644
--- a/arch/powerpc/platforms/83xx/sbc834x.c
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -37,6 +37,7 @@
37#include <asm/prom.h> 37#include <asm/prom.h>
38#include <asm/udbg.h> 38#include <asm/udbg.h>
39#include <sysdev/fsl_soc.h> 39#include <sysdev/fsl_soc.h>
40#include <sysdev/fsl_pci.h>
40 41
41#include "mpc83xx.h" 42#include "mpc83xx.h"
42 43
diff --git a/arch/powerpc/platforms/83xx/suspend-asm.S b/arch/powerpc/platforms/83xx/suspend-asm.S
new file mode 100644
index 000000000000..1930543c98d3
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/suspend-asm.S
@@ -0,0 +1,533 @@
1/*
2 * Enter and leave deep sleep state on MPC83xx
3 *
4 * Copyright (c) 2006-2008 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 version 2 as published
9 * by the Free Software Foundation.
10 */
11
12#include <asm/page.h>
13#include <asm/ppc_asm.h>
14#include <asm/reg.h>
15#include <asm/asm-offsets.h>
16
17#define SS_MEMSAVE 0x00 /* First 8 bytes of RAM */
18#define SS_HID 0x08 /* 3 HIDs */
19#define SS_IABR 0x14 /* 2 IABRs */
20#define SS_IBCR 0x1c
21#define SS_DABR 0x20 /* 2 DABRs */
22#define SS_DBCR 0x28
23#define SS_SP 0x2c
24#define SS_SR 0x30 /* 16 segment registers */
25#define SS_R2 0x70
26#define SS_MSR 0x74
27#define SS_SDR1 0x78
28#define SS_LR 0x7c
29#define SS_SPRG 0x80 /* 4 SPRGs */
30#define SS_DBAT 0x90 /* 8 DBATs */
31#define SS_IBAT 0xd0 /* 8 IBATs */
32#define SS_TB 0x110
33#define SS_CR 0x118
34#define SS_GPREG 0x11c /* r12-r31 */
35#define STATE_SAVE_SIZE 0x16c
36
37 .section .data
38 .align 5
39
40mpc83xx_sleep_save_area:
41 .space STATE_SAVE_SIZE
42immrbase:
43 .long 0
44
45 .section .text
46 .align 5
47
48 /* r3 = physical address of IMMR */
49_GLOBAL(mpc83xx_enter_deep_sleep)
50 lis r4, immrbase@ha
51 stw r3, immrbase@l(r4)
52
53 /* The first 2 words of memory are used to communicate with the
54 * bootloader, to tell it how to resume.
55 *
56 * The first word is the magic number 0xf5153ae5, and the second
57 * is the pointer to mpc83xx_deep_resume.
58 *
59 * The original content of these two words is saved in SS_MEMSAVE.
60 */
61
62 lis r3, mpc83xx_sleep_save_area@h
63 ori r3, r3, mpc83xx_sleep_save_area@l
64
65 lis r4, KERNELBASE@h
66 lwz r5, 0(r4)
67 lwz r6, 4(r4)
68
69 stw r5, SS_MEMSAVE+0(r3)
70 stw r6, SS_MEMSAVE+4(r3)
71
72 mfspr r5, SPRN_HID0
73 mfspr r6, SPRN_HID1
74 mfspr r7, SPRN_HID2
75
76 stw r5, SS_HID+0(r3)
77 stw r6, SS_HID+4(r3)
78 stw r7, SS_HID+8(r3)
79
80 mfspr r4, SPRN_IABR
81 mfspr r5, SPRN_IABR2
82 mfspr r6, SPRN_IBCR
83 mfspr r7, SPRN_DABR
84 mfspr r8, SPRN_DABR2
85 mfspr r9, SPRN_DBCR
86
87 stw r4, SS_IABR+0(r3)
88 stw r5, SS_IABR+4(r3)
89 stw r6, SS_IBCR(r3)
90 stw r7, SS_DABR+0(r3)
91 stw r8, SS_DABR+4(r3)
92 stw r9, SS_DBCR(r3)
93
94 mfspr r4, SPRN_SPRG0
95 mfspr r5, SPRN_SPRG1
96 mfspr r6, SPRN_SPRG2
97 mfspr r7, SPRN_SPRG3
98 mfsdr1 r8
99
100 stw r4, SS_SPRG+0(r3)
101 stw r5, SS_SPRG+4(r3)
102 stw r6, SS_SPRG+8(r3)
103 stw r7, SS_SPRG+12(r3)
104 stw r8, SS_SDR1(r3)
105
106 mfspr r4, SPRN_DBAT0U
107 mfspr r5, SPRN_DBAT0L
108 mfspr r6, SPRN_DBAT1U
109 mfspr r7, SPRN_DBAT1L
110
111 stw r4, SS_DBAT+0x00(r3)
112 stw r5, SS_DBAT+0x04(r3)
113 stw r6, SS_DBAT+0x08(r3)
114 stw r7, SS_DBAT+0x0c(r3)
115
116 mfspr r4, SPRN_DBAT2U
117 mfspr r5, SPRN_DBAT2L
118 mfspr r6, SPRN_DBAT3U
119 mfspr r7, SPRN_DBAT3L
120
121 stw r4, SS_DBAT+0x10(r3)
122 stw r5, SS_DBAT+0x14(r3)
123 stw r6, SS_DBAT+0x18(r3)
124 stw r7, SS_DBAT+0x1c(r3)
125
126 mfspr r4, SPRN_DBAT4U
127 mfspr r5, SPRN_DBAT4L
128 mfspr r6, SPRN_DBAT5U
129 mfspr r7, SPRN_DBAT5L
130
131 stw r4, SS_DBAT+0x20(r3)
132 stw r5, SS_DBAT+0x24(r3)
133 stw r6, SS_DBAT+0x28(r3)
134 stw r7, SS_DBAT+0x2c(r3)
135
136 mfspr r4, SPRN_DBAT6U
137 mfspr r5, SPRN_DBAT6L
138 mfspr r6, SPRN_DBAT7U
139 mfspr r7, SPRN_DBAT7L
140
141 stw r4, SS_DBAT+0x30(r3)
142 stw r5, SS_DBAT+0x34(r3)
143 stw r6, SS_DBAT+0x38(r3)
144 stw r7, SS_DBAT+0x3c(r3)
145
146 mfspr r4, SPRN_IBAT0U
147 mfspr r5, SPRN_IBAT0L
148 mfspr r6, SPRN_IBAT1U
149 mfspr r7, SPRN_IBAT1L
150
151 stw r4, SS_IBAT+0x00(r3)
152 stw r5, SS_IBAT+0x04(r3)
153 stw r6, SS_IBAT+0x08(r3)
154 stw r7, SS_IBAT+0x0c(r3)
155
156 mfspr r4, SPRN_IBAT2U
157 mfspr r5, SPRN_IBAT2L
158 mfspr r6, SPRN_IBAT3U
159 mfspr r7, SPRN_IBAT3L
160
161 stw r4, SS_IBAT+0x10(r3)
162 stw r5, SS_IBAT+0x14(r3)
163 stw r6, SS_IBAT+0x18(r3)
164 stw r7, SS_IBAT+0x1c(r3)
165
166 mfspr r4, SPRN_IBAT4U
167 mfspr r5, SPRN_IBAT4L
168 mfspr r6, SPRN_IBAT5U
169 mfspr r7, SPRN_IBAT5L
170
171 stw r4, SS_IBAT+0x20(r3)
172 stw r5, SS_IBAT+0x24(r3)
173 stw r6, SS_IBAT+0x28(r3)
174 stw r7, SS_IBAT+0x2c(r3)
175
176 mfspr r4, SPRN_IBAT6U
177 mfspr r5, SPRN_IBAT6L
178 mfspr r6, SPRN_IBAT7U
179 mfspr r7, SPRN_IBAT7L
180
181 stw r4, SS_IBAT+0x30(r3)
182 stw r5, SS_IBAT+0x34(r3)
183 stw r6, SS_IBAT+0x38(r3)
184 stw r7, SS_IBAT+0x3c(r3)
185
186 mfmsr r4
187 mflr r5
188 mfcr r6
189
190 stw r4, SS_MSR(r3)
191 stw r5, SS_LR(r3)
192 stw r6, SS_CR(r3)
193 stw r1, SS_SP(r3)
194 stw r2, SS_R2(r3)
195
1961: mftbu r4
197 mftb r5
198 mftbu r6
199 cmpw r4, r6
200 bne 1b
201
202 stw r4, SS_TB+0(r3)
203 stw r5, SS_TB+4(r3)
204
205 stmw r12, SS_GPREG(r3)
206
207 li r4, 0
208 addi r6, r3, SS_SR-4
2091: mfsrin r5, r4
210 stwu r5, 4(r6)
211 addis r4, r4, 0x1000
212 cmpwi r4, 0
213 bne 1b
214
215 /* Disable machine checks and critical exceptions */
216 mfmsr r4
217 rlwinm r4, r4, 0, ~MSR_CE
218 rlwinm r4, r4, 0, ~MSR_ME
219 mtmsr r4
220 isync
221
222#define TMP_VIRT_IMMR 0xf0000000
223#define DEFAULT_IMMR_VALUE 0xff400000
224#define IMMRBAR_BASE 0x0000
225
226 lis r4, immrbase@ha
227 lwz r4, immrbase@l(r4)
228
229 /* Use DBAT0 to address the current IMMR space */
230
231 ori r4, r4, 0x002a
232 mtspr SPRN_DBAT0L, r4
233 lis r8, TMP_VIRT_IMMR@h
234 ori r4, r8, 0x001e /* 1 MByte accessable from Kernel Space only */
235 mtspr SPRN_DBAT0U, r4
236 isync
237
238 /* Use DBAT1 to address the original IMMR space */
239
240 lis r4, DEFAULT_IMMR_VALUE@h
241 ori r4, r4, 0x002a
242 mtspr SPRN_DBAT1L, r4
243 lis r9, (TMP_VIRT_IMMR + 0x01000000)@h
244 ori r4, r9, 0x001e /* 1 MByte accessable from Kernel Space only */
245 mtspr SPRN_DBAT1U, r4
246 isync
247
248 /* Use DBAT2 to address the beginning of RAM. This isn't done
249 * using the normal virtual mapping, because with page debugging
250 * enabled it will be read-only.
251 */
252
253 li r4, 0x0002
254 mtspr SPRN_DBAT2L, r4
255 lis r4, KERNELBASE@h
256 ori r4, r4, 0x001e /* 1 MByte accessable from Kernel Space only */
257 mtspr SPRN_DBAT2U, r4
258 isync
259
260 /* Flush the cache with our BAT, as there will be TLB misses
261 * otherwise if page debugging is enabled, and these misses
262 * will disturb the PLRU algorithm.
263 */
264
265 bl __flush_disable_L1
266
267 /* Keep the i-cache enabled, so the hack below for low-boot
268 * flash will work.
269 */
270 mfspr r3, SPRN_HID0
271 ori r3, r3, HID0_ICE
272 mtspr SPRN_HID0, r3
273 isync
274
275 lis r6, 0xf515
276 ori r6, r6, 0x3ae5
277
278 lis r7, mpc83xx_deep_resume@h
279 ori r7, r7, mpc83xx_deep_resume@l
280 tophys(r7, r7)
281
282 lis r5, KERNELBASE@h
283 stw r6, 0(r5)
284 stw r7, 4(r5)
285
286 /* Reset BARs */
287
288 li r4, 0
289 stw r4, 0x0024(r8)
290 stw r4, 0x002c(r8)
291 stw r4, 0x0034(r8)
292 stw r4, 0x003c(r8)
293 stw r4, 0x0064(r8)
294 stw r4, 0x006c(r8)
295
296 /* Rev 1 of the 8313 has problems with wakeup events that are
297 * pending during the transition to deep sleep state (such as if
298 * the PCI host sets the state to D3 and then D0 in rapid
299 * succession). This check shrinks the race window somewhat.
300 *
301 * See erratum PCI23, though the problem is not limited
302 * to PCI.
303 */
304
305 lwz r3, 0x0b04(r8)
306 andi. r3, r3, 1
307 bne- mpc83xx_deep_resume
308
309 /* Move IMMR back to the default location, following the
310 * procedure specified in the MPC8313 manual.
311 */
312 lwz r4, IMMRBAR_BASE(r8)
313 isync
314 lis r4, DEFAULT_IMMR_VALUE@h
315 stw r4, IMMRBAR_BASE(r8)
316 lis r4, KERNELBASE@h
317 lwz r4, 0(r4)
318 isync
319 lwz r4, IMMRBAR_BASE(r9)
320 mr r8, r9
321 isync
322
323 /* Check the Reset Configuration Word to see whether flash needs
324 * to be mapped at a low address or a high address.
325 */
326
327 lwz r4, 0x0904(r8)
328 andis. r4, r4, 0x0400
329 li r4, 0
330 beq boot_low
331 lis r4, 0xff80
332boot_low:
333 stw r4, 0x0020(r8)
334 lis r7, 0x8000
335 ori r7, r7, 0x0016
336
337 mfspr r5, SPRN_HID0
338 rlwinm r5, r5, 0, ~(HID0_DOZE | HID0_NAP)
339 oris r5, r5, HID0_SLEEP@h
340 mtspr SPRN_HID0, r5
341 isync
342
343 mfmsr r5
344 oris r5, r5, MSR_POW@h
345
346 /* Enable the flash mapping at the appropriate address. This
347 * mapping will override the RAM mapping if booting low, so there's
348 * no need to disable the latter. This must be done inside the same
349 * cache line as setting MSR_POW, so that no instruction fetches
350 * from RAM happen after the flash mapping is turned on.
351 */
352
353 .align 5
354 stw r7, 0x0024(r8)
355 sync
356 isync
357 mtmsr r5
358 isync
3591: b 1b
360
361mpc83xx_deep_resume:
362 lis r4, 1f@h
363 ori r4, r4, 1f@l
364 tophys(r4, r4)
365 mtsrr0 r4
366
367 mfmsr r4
368 rlwinm r4, r4, 0, ~(MSR_IR | MSR_DR)
369 mtsrr1 r4
370
371 rfi
372
3731: tlbia
374 bl __inval_enable_L1
375
376 lis r3, mpc83xx_sleep_save_area@h
377 ori r3, r3, mpc83xx_sleep_save_area@l
378 tophys(r3, r3)
379
380 lwz r5, SS_MEMSAVE+0(r3)
381 lwz r6, SS_MEMSAVE+4(r3)
382
383 stw r5, 0(0)
384 stw r6, 4(0)
385
386 lwz r5, SS_HID+0(r3)
387 lwz r6, SS_HID+4(r3)
388 lwz r7, SS_HID+8(r3)
389
390 mtspr SPRN_HID0, r5
391 mtspr SPRN_HID1, r6
392 mtspr SPRN_HID2, r7
393
394 lwz r4, SS_IABR+0(r3)
395 lwz r5, SS_IABR+4(r3)
396 lwz r6, SS_IBCR(r3)
397 lwz r7, SS_DABR+0(r3)
398 lwz r8, SS_DABR+4(r3)
399 lwz r9, SS_DBCR(r3)
400
401 mtspr SPRN_IABR, r4
402 mtspr SPRN_IABR2, r5
403 mtspr SPRN_IBCR, r6
404 mtspr SPRN_DABR, r7
405 mtspr SPRN_DABR2, r8
406 mtspr SPRN_DBCR, r9
407
408 li r4, 0
409 addi r6, r3, SS_SR-4
4101: lwzu r5, 4(r6)
411 mtsrin r5, r4
412 addis r4, r4, 0x1000
413 cmpwi r4, 0
414 bne 1b
415
416 lwz r4, SS_DBAT+0x00(r3)
417 lwz r5, SS_DBAT+0x04(r3)
418 lwz r6, SS_DBAT+0x08(r3)
419 lwz r7, SS_DBAT+0x0c(r3)
420
421 mtspr SPRN_DBAT0U, r4
422 mtspr SPRN_DBAT0L, r5
423 mtspr SPRN_DBAT1U, r6
424 mtspr SPRN_DBAT1L, r7
425
426 lwz r4, SS_DBAT+0x10(r3)
427 lwz r5, SS_DBAT+0x14(r3)
428 lwz r6, SS_DBAT+0x18(r3)
429 lwz r7, SS_DBAT+0x1c(r3)
430
431 mtspr SPRN_DBAT2U, r4
432 mtspr SPRN_DBAT2L, r5
433 mtspr SPRN_DBAT3U, r6
434 mtspr SPRN_DBAT3L, r7
435
436 lwz r4, SS_DBAT+0x20(r3)
437 lwz r5, SS_DBAT+0x24(r3)
438 lwz r6, SS_DBAT+0x28(r3)
439 lwz r7, SS_DBAT+0x2c(r3)
440
441 mtspr SPRN_DBAT4U, r4
442 mtspr SPRN_DBAT4L, r5
443 mtspr SPRN_DBAT5U, r6
444 mtspr SPRN_DBAT5L, r7
445
446 lwz r4, SS_DBAT+0x30(r3)
447 lwz r5, SS_DBAT+0x34(r3)
448 lwz r6, SS_DBAT+0x38(r3)
449 lwz r7, SS_DBAT+0x3c(r3)
450
451 mtspr SPRN_DBAT6U, r4
452 mtspr SPRN_DBAT6L, r5
453 mtspr SPRN_DBAT7U, r6
454 mtspr SPRN_DBAT7L, r7
455
456 lwz r4, SS_IBAT+0x00(r3)
457 lwz r5, SS_IBAT+0x04(r3)
458 lwz r6, SS_IBAT+0x08(r3)
459 lwz r7, SS_IBAT+0x0c(r3)
460
461 mtspr SPRN_IBAT0U, r4
462 mtspr SPRN_IBAT0L, r5
463 mtspr SPRN_IBAT1U, r6
464 mtspr SPRN_IBAT1L, r7
465
466 lwz r4, SS_IBAT+0x10(r3)
467 lwz r5, SS_IBAT+0x14(r3)
468 lwz r6, SS_IBAT+0x18(r3)
469 lwz r7, SS_IBAT+0x1c(r3)
470
471 mtspr SPRN_IBAT2U, r4
472 mtspr SPRN_IBAT2L, r5
473 mtspr SPRN_IBAT3U, r6
474 mtspr SPRN_IBAT3L, r7
475
476 lwz r4, SS_IBAT+0x20(r3)
477 lwz r5, SS_IBAT+0x24(r3)
478 lwz r6, SS_IBAT+0x28(r3)
479 lwz r7, SS_IBAT+0x2c(r3)
480
481 mtspr SPRN_IBAT4U, r4
482 mtspr SPRN_IBAT4L, r5
483 mtspr SPRN_IBAT5U, r6
484 mtspr SPRN_IBAT5L, r7
485
486 lwz r4, SS_IBAT+0x30(r3)
487 lwz r5, SS_IBAT+0x34(r3)
488 lwz r6, SS_IBAT+0x38(r3)
489 lwz r7, SS_IBAT+0x3c(r3)
490
491 mtspr SPRN_IBAT6U, r4
492 mtspr SPRN_IBAT6L, r5
493 mtspr SPRN_IBAT7U, r6
494 mtspr SPRN_IBAT7L, r7
495
496 lwz r4, SS_SPRG+0(r3)
497 lwz r5, SS_SPRG+4(r3)
498 lwz r6, SS_SPRG+8(r3)
499 lwz r7, SS_SPRG+12(r3)
500 lwz r8, SS_SDR1(r3)
501
502 mtspr SPRN_SPRG0, r4
503 mtspr SPRN_SPRG1, r5
504 mtspr SPRN_SPRG2, r6
505 mtspr SPRN_SPRG3, r7
506 mtsdr1 r8
507
508 lwz r4, SS_MSR(r3)
509 lwz r5, SS_LR(r3)
510 lwz r6, SS_CR(r3)
511 lwz r1, SS_SP(r3)
512 lwz r2, SS_R2(r3)
513
514 mtsrr1 r4
515 mtsrr0 r5
516 mtcr r6
517
518 li r4, 0
519 mtspr SPRN_TBWL, r4
520
521 lwz r4, SS_TB+0(r3)
522 lwz r5, SS_TB+4(r3)
523
524 mtspr SPRN_TBWU, r4
525 mtspr SPRN_TBWL, r5
526
527 lmw r12, SS_GPREG(r3)
528
529 /* Kick decrementer */
530 li r0, 1
531 mtdec r0
532
533 rfi
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c
new file mode 100644
index 000000000000..08e65fc8b98c
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/suspend.c
@@ -0,0 +1,388 @@
1/*
2 * MPC83xx suspend support
3 *
4 * Author: Scott Wood <scottwood@freescale.com>
5 *
6 * Copyright (c) 2006-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 <linux/init.h>
14#include <linux/pm.h>
15#include <linux/types.h>
16#include <linux/ioport.h>
17#include <linux/interrupt.h>
18#include <linux/wait.h>
19#include <linux/kthread.h>
20#include <linux/freezer.h>
21#include <linux/suspend.h>
22#include <linux/fsl_devices.h>
23#include <linux/of_platform.h>
24
25#include <asm/reg.h>
26#include <asm/io.h>
27#include <asm/time.h>
28#include <asm/mpc6xx.h>
29
30#include <sysdev/fsl_soc.h>
31
32#define PMCCR1_NEXT_STATE 0x0C /* Next state for power management */
33#define PMCCR1_NEXT_STATE_SHIFT 2
34#define PMCCR1_CURR_STATE 0x03 /* Current state for power management*/
35#define IMMR_RCW_OFFSET 0x900
36#define RCW_PCI_HOST 0x80000000
37
38void mpc83xx_enter_deep_sleep(phys_addr_t immrbase);
39
40struct mpc83xx_pmc {
41 u32 config;
42#define PMCCR_DLPEN 2 /* DDR SDRAM low power enable */
43#define PMCCR_SLPEN 1 /* System low power enable */
44
45 u32 event;
46 u32 mask;
47/* All but PMCI are deep-sleep only */
48#define PMCER_GPIO 0x100
49#define PMCER_PCI 0x080
50#define PMCER_USB 0x040
51#define PMCER_ETSEC1 0x020
52#define PMCER_ETSEC2 0x010
53#define PMCER_TIMER 0x008
54#define PMCER_INT1 0x004
55#define PMCER_INT2 0x002
56#define PMCER_PMCI 0x001
57#define PMCER_ALL 0x1FF
58
59 /* deep-sleep only */
60 u32 config1;
61#define PMCCR1_USE_STATE 0x80000000
62#define PMCCR1_PME_EN 0x00000080
63#define PMCCR1_ASSERT_PME 0x00000040
64#define PMCCR1_POWER_OFF 0x00000020
65
66 /* deep-sleep only */
67 u32 config2;
68};
69
70struct mpc83xx_rcw {
71 u32 rcwlr;
72 u32 rcwhr;
73};
74
75struct mpc83xx_clock {
76 u32 spmr;
77 u32 occr;
78 u32 sccr;
79};
80
81struct pmc_type {
82 int has_deep_sleep;
83};
84
85static struct of_device *pmc_dev;
86static int has_deep_sleep, deep_sleeping;
87static int pmc_irq;
88static struct mpc83xx_pmc __iomem *pmc_regs;
89static struct mpc83xx_clock __iomem *clock_regs;
90static int is_pci_agent, wake_from_pci;
91static phys_addr_t immrbase;
92static int pci_pm_state;
93static DECLARE_WAIT_QUEUE_HEAD(agent_wq);
94
95int fsl_deep_sleep(void)
96{
97 return deep_sleeping;
98}
99
100static int mpc83xx_change_state(void)
101{
102 u32 curr_state;
103 u32 reg_cfg1 = in_be32(&pmc_regs->config1);
104
105 if (is_pci_agent) {
106 pci_pm_state = (reg_cfg1 & PMCCR1_NEXT_STATE) >>
107 PMCCR1_NEXT_STATE_SHIFT;
108 curr_state = reg_cfg1 & PMCCR1_CURR_STATE;
109
110 if (curr_state != pci_pm_state) {
111 reg_cfg1 &= ~PMCCR1_CURR_STATE;
112 reg_cfg1 |= pci_pm_state;
113 out_be32(&pmc_regs->config1, reg_cfg1);
114
115 wake_up(&agent_wq);
116 return 1;
117 }
118 }
119
120 return 0;
121}
122
123static irqreturn_t pmc_irq_handler(int irq, void *dev_id)
124{
125 u32 event = in_be32(&pmc_regs->event);
126 int ret = IRQ_NONE;
127
128 if (mpc83xx_change_state())
129 ret = IRQ_HANDLED;
130
131 if (event) {
132 out_be32(&pmc_regs->event, event);
133 ret = IRQ_HANDLED;
134 }
135
136 return ret;
137}
138
139static int mpc83xx_suspend_enter(suspend_state_t state)
140{
141 int ret = -EAGAIN;
142
143 /* Don't go to sleep if there's a race where pci_pm_state changes
144 * between the agent thread checking it and the PM code disabling
145 * interrupts.
146 */
147 if (wake_from_pci) {
148 if (pci_pm_state != (deep_sleeping ? 3 : 2))
149 goto out;
150
151 out_be32(&pmc_regs->config1,
152 in_be32(&pmc_regs->config1) | PMCCR1_PME_EN);
153 }
154
155 /* Put the system into low-power mode and the RAM
156 * into self-refresh mode once the core goes to
157 * sleep.
158 */
159
160 out_be32(&pmc_regs->config, PMCCR_SLPEN | PMCCR_DLPEN);
161
162 /* If it has deep sleep (i.e. it's an 831x or compatible),
163 * disable power to the core upon entering sleep mode. This will
164 * require going through the boot firmware upon a wakeup event.
165 */
166
167 if (deep_sleeping) {
168 out_be32(&pmc_regs->mask, PMCER_ALL);
169
170 out_be32(&pmc_regs->config1,
171 in_be32(&pmc_regs->config1) | PMCCR1_POWER_OFF);
172
173 enable_kernel_fp();
174
175 mpc83xx_enter_deep_sleep(immrbase);
176
177 out_be32(&pmc_regs->config1,
178 in_be32(&pmc_regs->config1) & ~PMCCR1_POWER_OFF);
179
180 out_be32(&pmc_regs->mask, PMCER_PMCI);
181 } else {
182 out_be32(&pmc_regs->mask, PMCER_PMCI);
183
184 mpc6xx_enter_standby();
185 }
186
187 ret = 0;
188
189out:
190 out_be32(&pmc_regs->config1,
191 in_be32(&pmc_regs->config1) & ~PMCCR1_PME_EN);
192
193 return ret;
194}
195
196static void mpc83xx_suspend_finish(void)
197{
198 deep_sleeping = 0;
199}
200
201static int mpc83xx_suspend_valid(suspend_state_t state)
202{
203 return state == PM_SUSPEND_STANDBY || state == PM_SUSPEND_MEM;
204}
205
206static int mpc83xx_suspend_begin(suspend_state_t state)
207{
208 switch (state) {
209 case PM_SUSPEND_STANDBY:
210 deep_sleeping = 0;
211 return 0;
212
213 case PM_SUSPEND_MEM:
214 if (has_deep_sleep)
215 deep_sleeping = 1;
216
217 return 0;
218
219 default:
220 return -EINVAL;
221 }
222}
223
224static int agent_thread_fn(void *data)
225{
226 while (1) {
227 wait_event_interruptible(agent_wq, pci_pm_state >= 2);
228 try_to_freeze();
229
230 if (signal_pending(current) || pci_pm_state < 2)
231 continue;
232
233 /* With a preemptible kernel (or SMP), this could race with
234 * a userspace-driven suspend request. It's probably best
235 * to avoid mixing the two with such a configuration (or
236 * else fix it by adding a mutex to state_store that we can
237 * synchronize with).
238 */
239
240 wake_from_pci = 1;
241
242 pm_suspend(pci_pm_state == 3 ? PM_SUSPEND_MEM :
243 PM_SUSPEND_STANDBY);
244
245 wake_from_pci = 0;
246 }
247
248 return 0;
249}
250
251static void mpc83xx_set_agent(void)
252{
253 out_be32(&pmc_regs->config1, PMCCR1_USE_STATE);
254 out_be32(&pmc_regs->mask, PMCER_PMCI);
255
256 kthread_run(agent_thread_fn, NULL, "PCI power mgt");
257}
258
259static int mpc83xx_is_pci_agent(void)
260{
261 struct mpc83xx_rcw __iomem *rcw_regs;
262 int ret;
263
264 rcw_regs = ioremap(get_immrbase() + IMMR_RCW_OFFSET,
265 sizeof(struct mpc83xx_rcw));
266
267 if (!rcw_regs)
268 return -ENOMEM;
269
270 ret = !(in_be32(&rcw_regs->rcwhr) & RCW_PCI_HOST);
271
272 iounmap(rcw_regs);
273 return ret;
274}
275
276static struct platform_suspend_ops mpc83xx_suspend_ops = {
277 .valid = mpc83xx_suspend_valid,
278 .begin = mpc83xx_suspend_begin,
279 .enter = mpc83xx_suspend_enter,
280 .finish = mpc83xx_suspend_finish,
281};
282
283static int pmc_probe(struct of_device *ofdev,
284 const struct of_device_id *match)
285{
286 struct device_node *np = ofdev->node;
287 struct resource res;
288 struct pmc_type *type = match->data;
289 int ret = 0;
290
291 if (!of_device_is_available(np))
292 return -ENODEV;
293
294 has_deep_sleep = type->has_deep_sleep;
295 immrbase = get_immrbase();
296 pmc_dev = ofdev;
297
298 is_pci_agent = mpc83xx_is_pci_agent();
299 if (is_pci_agent < 0)
300 return is_pci_agent;
301
302 ret = of_address_to_resource(np, 0, &res);
303 if (ret)
304 return -ENODEV;
305
306 pmc_irq = irq_of_parse_and_map(np, 0);
307 if (pmc_irq != NO_IRQ) {
308 ret = request_irq(pmc_irq, pmc_irq_handler, IRQF_SHARED,
309 "pmc", ofdev);
310
311 if (ret)
312 return -EBUSY;
313 }
314
315 pmc_regs = ioremap(res.start, sizeof(struct mpc83xx_pmc));
316
317 if (!pmc_regs) {
318 ret = -ENOMEM;
319 goto out;
320 }
321
322 ret = of_address_to_resource(np, 1, &res);
323 if (ret) {
324 ret = -ENODEV;
325 goto out_pmc;
326 }
327
328 clock_regs = ioremap(res.start, sizeof(struct mpc83xx_pmc));
329
330 if (!clock_regs) {
331 ret = -ENOMEM;
332 goto out_pmc;
333 }
334
335 if (is_pci_agent)
336 mpc83xx_set_agent();
337
338 suspend_set_ops(&mpc83xx_suspend_ops);
339 return 0;
340
341out_pmc:
342 iounmap(pmc_regs);
343out:
344 if (pmc_irq != NO_IRQ)
345 free_irq(pmc_irq, ofdev);
346
347 return ret;
348}
349
350static int pmc_remove(struct of_device *ofdev)
351{
352 return -EPERM;
353};
354
355static struct pmc_type pmc_types[] = {
356 {
357 .has_deep_sleep = 1,
358 },
359 {
360 .has_deep_sleep = 0,
361 }
362};
363
364static struct of_device_id pmc_match[] = {
365 {
366 .compatible = "fsl,mpc8313-pmc",
367 .data = &pmc_types[0],
368 },
369 {
370 .compatible = "fsl,mpc8349-pmc",
371 .data = &pmc_types[1],
372 },
373 {}
374};
375
376static struct of_platform_driver pmc_driver = {
377 .name = "mpc83xx-pmc",
378 .match_table = pmc_match,
379 .probe = pmc_probe,
380 .remove = pmc_remove
381};
382
383static int pmc_init(void)
384{
385 return of_register_platform_driver(&pmc_driver);
386}
387
388module_init(pmc_init);
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 64bcf0a33c71..cc99c280aad9 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -137,15 +137,21 @@ int mpc831x_usb_cfg(void)
137 137
138 /* Configure pin mux for ULPI. There is no pin mux for UTMI */ 138 /* Configure pin mux for ULPI. There is no pin mux for UTMI */
139 if (prop && !strcmp(prop, "ulpi")) { 139 if (prop && !strcmp(prop, "ulpi")) {
140 temp = in_be32(immap + MPC83XX_SICRL_OFFS); 140 if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) {
141 temp &= ~MPC831X_SICRL_USB_MASK; 141 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
142 temp |= MPC831X_SICRL_USB_ULPI; 142 MPC8315_SICRL_USB_MASK,
143 out_be32(immap + MPC83XX_SICRL_OFFS, temp); 143 MPC8315_SICRL_USB_ULPI);
144 144 clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
145 temp = in_be32(immap + MPC83XX_SICRH_OFFS); 145 MPC8315_SICRH_USB_MASK,
146 temp &= ~MPC831X_SICRH_USB_MASK; 146 MPC8315_SICRH_USB_ULPI);
147 temp |= MPC831X_SICRH_USB_ULPI; 147 } else {
148 out_be32(immap + MPC83XX_SICRH_OFFS, temp); 148 clrsetbits_be32(immap + MPC83XX_SICRL_OFFS,
149 MPC831X_SICRL_USB_MASK,
150 MPC831X_SICRL_USB_ULPI);
151 clrsetbits_be32(immap + MPC83XX_SICRH_OFFS,
152 MPC831X_SICRH_USB_MASK,
153 MPC831X_SICRH_USB_ULPI);
154 }
149 } 155 }
150 156
151 iounmap(immap); 157 iounmap(immap);
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index cebea5cadbc1..291675b0097a 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -2,8 +2,8 @@ menuconfig MPC85xx
2 bool "Machine Type" 2 bool "Machine Type"
3 depends on PPC_85xx 3 depends on PPC_85xx
4 select PPC_UDBG_16550 4 select PPC_UDBG_16550
5 select PPC_INDIRECT_PCI if PCI
6 select MPIC 5 select MPIC
6 select PPC_PCI_CHOICE
7 select FSL_PCI if PCI 7 select FSL_PCI if PCI
8 select SERIAL_8250_SHARE_IRQ if SERIAL_8250 8 select SERIAL_8250_SHARE_IRQ if SERIAL_8250
9 default y 9 default y
@@ -86,7 +86,6 @@ config TQM8548
86 help 86 help
87 This option enables support for the TQ Components TQM8548 board. 87 This option enables support for the TQ Components TQM8548 board.
88 select DEFAULT_UIMAGE 88 select DEFAULT_UIMAGE
89 select PPC_CPM_NEW_BINDING
90 select TQM85xx 89 select TQM85xx
91 90
92config TQM8555 91config TQM8555
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index 25f41cd2d33a..00c535806647 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -115,7 +115,6 @@ void __init mpc85xx_ds_pic_init(void)
115 115
116#ifdef CONFIG_PCI 116#ifdef CONFIG_PCI
117static int primary_phb_addr; 117static int primary_phb_addr;
118extern int uses_fsl_uli_m1575;
119extern int uli_exclude_device(struct pci_controller *hose, 118extern int uli_exclude_device(struct pci_controller *hose,
120 u_char bus, u_char devfn); 119 u_char bus, u_char devfn);
121 120
@@ -161,7 +160,6 @@ static void __init mpc85xx_ds_setup_arch(void)
161 } 160 }
162 } 161 }
163 162
164 uses_fsl_uli_m1575 = 1;
165 ppc_md.pci_exclude_device = mpc85xx_exclude_device; 163 ppc_md.pci_exclude_device = mpc85xx_exclude_device;
166#endif 164#endif
167 165
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 80a81e02bb55..9355a5269431 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -27,6 +27,7 @@ config SBC8641D
27config MPC8610_HPCD 27config MPC8610_HPCD
28 bool "Freescale MPC8610 HPCD" 28 bool "Freescale MPC8610 HPCD"
29 select DEFAULT_UIMAGE 29 select DEFAULT_UIMAGE
30 select FSL_ULI1575
30 help 31 help
31 This option enables support for the MPC8610 HPCD board. 32 This option enables support for the MPC8610 HPCD board.
32 33
@@ -34,6 +35,7 @@ endif
34 35
35config MPC8641 36config MPC8641
36 bool 37 bool
38 select PPC_PCI_CHOICE
37 select FSL_PCI if PCI 39 select FSL_PCI if PCI
38 select PPC_UDBG_16550 40 select PPC_UDBG_16550
39 select MPIC 41 select MPIC
@@ -41,6 +43,7 @@ config MPC8641
41 43
42config MPC8610 44config MPC8610
43 bool 45 bool
46 select PPC_PCI_CHOICE
44 select FSL_PCI if PCI 47 select FSL_PCI if PCI
45 select PPC_UDBG_16550 48 select PPC_UDBG_16550
46 select MPIC 49 select MPIC
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 30725302884a..5eedb710896e 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -58,93 +58,6 @@ static int __init mpc8610_declare_of_platform_devices(void)
58} 58}
59machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); 59machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
60 60
61#ifdef CONFIG_PCI
62static void __devinit quirk_uli1575(struct pci_dev *dev)
63{
64 u32 temp32;
65
66 /* Disable INTx */
67 pci_read_config_dword(dev, 0x48, &temp32);
68 pci_write_config_dword(dev, 0x48, (temp32 | 1<<26));
69
70 /* Enable sideband interrupt */
71 pci_read_config_dword(dev, 0x90, &temp32);
72 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22));
73}
74
75static void __devinit quirk_uli5288(struct pci_dev *dev)
76{
77 unsigned char c;
78 unsigned short temp;
79
80 /* Interrupt Disable, Needed when SATA disabled */
81 pci_read_config_word(dev, PCI_COMMAND, &temp);
82 temp |= 1<<10;
83 pci_write_config_word(dev, PCI_COMMAND, temp);
84
85 pci_read_config_byte(dev, 0x83, &c);
86 c |= 0x80;
87 pci_write_config_byte(dev, 0x83, c);
88
89 pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01);
90 pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06);
91
92 pci_read_config_byte(dev, 0x83, &c);
93 c &= 0x7f;
94 pci_write_config_byte(dev, 0x83, c);
95}
96
97/*
98 * Since 8259PIC was disabled on the board, the IDE device can not
99 * use the legacy IRQ, we need to let the IDE device work under
100 * native mode and use the interrupt line like other PCI devices.
101 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this
102 * as the interrupt for IDE device.
103 */
104static void __devinit quirk_uli5229(struct pci_dev *dev)
105{
106 unsigned char c;
107
108 pci_read_config_byte(dev, 0x4b, &c);
109 c |= 0x10;
110 pci_write_config_byte(dev, 0x4b, c);
111}
112
113/*
114 * SATA interrupt pin bug fix
115 * There's a chip bug for 5288, The interrupt pin should be 2,
116 * not the read only value 1, So it use INTB#, not INTA# which
117 * actually used by the IDE device 5229.
118 * As of this bug, during the PCI initialization, 5288 read the
119 * irq of IDE device from the device tree, this function fix this
120 * bug by re-assigning a correct irq to 5288.
121 *
122 */
123static void __devinit final_uli5288(struct pci_dev *dev)
124{
125 struct pci_controller *hose = pci_bus_to_host(dev->bus);
126 struct device_node *hosenode = hose ? hose->dn : NULL;
127 struct of_irq oirq;
128 int virq, pin = 2;
129 u32 laddr[3];
130
131 if (!hosenode)
132 return;
133
134 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
135 laddr[1] = laddr[2] = 0;
136 of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
137 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
138 oirq.size);
139 dev->irq = virq;
140}
141
142DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575);
143DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288);
144DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
145DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, final_uli5288);
146#endif /* CONFIG_PCI */
147
148#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) 61#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
149 62
150static u32 get_busfreq(void) 63static u32 get_busfreq(void)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 7916599c9126..f712d9c0991b 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -45,7 +45,6 @@
45#endif 45#endif
46 46
47#ifdef CONFIG_PCI 47#ifdef CONFIG_PCI
48extern int uses_fsl_uli_m1575;
49extern int uli_exclude_device(struct pci_controller *hose, 48extern int uli_exclude_device(struct pci_controller *hose,
50 u_char bus, u_char devfn); 49 u_char bus, u_char devfn);
51 50
@@ -87,7 +86,6 @@ mpc86xx_hpcn_setup_arch(void)
87 fsl_add_bridge(np, 0); 86 fsl_add_bridge(np, 0);
88 } 87 }
89 88
90 uses_fsl_uli_m1575 = 1;
91 ppc_md.pci_exclude_device = mpc86xx_exclude_device; 89 ppc_md.pci_exclude_device = mpc86xx_exclude_device;
92 90
93#endif 91#endif
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 690c1f46e698..1d0968775c0a 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -253,17 +253,13 @@ config CPM2
253 depends on MPC85xx || 8260 253 depends on MPC85xx || 8260
254 select CPM 254 select CPM
255 select PPC_LIB_RHEAP 255 select PPC_LIB_RHEAP
256 select PPC_PCI_CHOICE
256 help 257 help
257 The CPM2 (Communications Processor Module) is a coprocessor on 258 The CPM2 (Communications Processor Module) is a coprocessor on
258 embedded CPUs made by Freescale. Selecting this option means that 259 embedded CPUs made by Freescale. Selecting this option means that
259 you wish to build a kernel for a machine with a CPM2 coprocessor 260 you wish to build a kernel for a machine with a CPM2 coprocessor
260 on it (826x, 827x, 8560). 261 on it (826x, 827x, 8560).
261 262
262config PPC_CPM_NEW_BINDING
263 bool
264 depends on CPM1 || CPM2
265 default y
266
267config AXON_RAM 263config AXON_RAM
268 tristate "Axon DDR2 memory device driver" 264 tristate "Axon DDR2 memory device driver"
269 depends on PPC_IBM_CELL_BLADE 265 depends on PPC_IBM_CELL_BLADE
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 5bc4b611ff88..7f6512733862 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -42,12 +42,14 @@ config 40x
42 select PPC_DCR_NATIVE 42 select PPC_DCR_NATIVE
43 select PPC_UDBG_16550 43 select PPC_UDBG_16550
44 select 4xx_SOC 44 select 4xx_SOC
45 select PPC_PCI_CHOICE
45 46
46config 44x 47config 44x
47 bool "AMCC 44x" 48 bool "AMCC 44x"
48 select PPC_DCR_NATIVE 49 select PPC_DCR_NATIVE
49 select PPC_UDBG_16550 50 select PPC_UDBG_16550
50 select 4xx_SOC 51 select 4xx_SOC
52 select PPC_PCI_CHOICE
51 53
52config E200 54config E200
53 bool "Freescale e200" 55 bool "Freescale e200"
@@ -84,9 +86,6 @@ config TUNE_CELL
84 machines. When building a kernel that is supposed to run only 86 machines. When building a kernel that is supposed to run only
85 on Cell, you should also select the POWER4_ONLY option. 87 on Cell, you should also select the POWER4_ONLY option.
86 88
87config 6xx
88 bool
89
90# this is temp to handle compat with arch=ppc 89# this is temp to handle compat with arch=ppc
91config 8xx 90config 8xx
92 bool 91 bool
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index 3959fcfe731c..c14d7d8d96c8 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -83,6 +83,22 @@ config CBE_RAS
83 depends on PPC_CELL_NATIVE 83 depends on PPC_CELL_NATIVE
84 default y 84 default y
85 85
86config PPC_IBM_CELL_RESETBUTTON
87 bool "IBM Cell Blade Pinhole reset button"
88 depends on CBE_RAS && PPC_IBM_CELL_BLADE
89 default y
90 help
91 Support Pinhole Resetbutton on IBM Cell blades.
92 This adds a method to trigger system reset via front panel pinhole button.
93
94config PPC_IBM_CELL_POWERBUTTON
95 tristate "IBM Cell Blade power button"
96 depends on PPC_IBM_CELL_BLADE && PPC_PMI && INPUT_EVDEV
97 default y
98 help
99 Support Powerbutton on IBM Cell blades.
100 This will enable the powerbutton as an input device.
101
86config CBE_THERM 102config CBE_THERM
87 tristate "CBE thermal support" 103 tristate "CBE thermal support"
88 default m 104 default m
@@ -107,6 +123,15 @@ config CBE_CPUFREQ_PMI
107 processor will not only be able to run at lower speed, 123 processor will not only be able to run at lower speed,
108 but also at lower core voltage. 124 but also at lower core voltage.
109 125
126config CBE_CPUFREQ_SPU_GOVERNOR
127 tristate "CBE frequency scaling based on SPU usage"
128 depends on SPU_FS && CPU_FREQ
129 default m
130 help
131 This governor checks for spu usage to adjust the cpu frequency.
132 If no spu is running on a given cpu, that cpu will be throttled to
133 the minimal possible frequency.
134
110endmenu 135endmenu
111 136
112config OPROFILE_CELL 137config OPROFILE_CELL
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile
index c2a7e4e5ddf9..7fd830872c43 100644
--- a/arch/powerpc/platforms/cell/Makefile
+++ b/arch/powerpc/platforms/cell/Makefile
@@ -8,6 +8,9 @@ obj-$(CONFIG_CBE_THERM) += cbe_thermal.o
8obj-$(CONFIG_CBE_CPUFREQ_PMI) += cbe_cpufreq_pmi.o 8obj-$(CONFIG_CBE_CPUFREQ_PMI) += cbe_cpufreq_pmi.o
9obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufreq.o 9obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufreq.o
10cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o 10cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o
11obj-$(CONFIG_CBE_CPUFREQ_SPU_GOVERNOR) += cpufreq_spudemand.o
12
13obj-$(CONFIG_PPC_IBM_CELL_POWERBUTTON) += cbe_powerbutton.o
11 14
12ifeq ($(CONFIG_SMP),y) 15ifeq ($(CONFIG_SMP),y)
13obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o 16obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o
diff --git a/arch/powerpc/platforms/cell/cbe_powerbutton.c b/arch/powerpc/platforms/cell/cbe_powerbutton.c
new file mode 100644
index 000000000000..dcddaa5fcb66
--- /dev/null
+++ b/arch/powerpc/platforms/cell/cbe_powerbutton.c
@@ -0,0 +1,117 @@
1/*
2 * driver for powerbutton on IBM cell blades
3 *
4 * (C) Copyright IBM Corp. 2005-2008
5 *
6 * Author: Christian Krafft <krafft@de.ibm.com>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/input.h>
24#include <linux/platform_device.h>
25#include <asm/pmi.h>
26#include <asm/prom.h>
27
28static struct input_dev *button_dev;
29static struct platform_device *button_pdev;
30
31static void cbe_powerbutton_handle_pmi(pmi_message_t pmi_msg)
32{
33 BUG_ON(pmi_msg.type != PMI_TYPE_POWER_BUTTON);
34
35 input_report_key(button_dev, KEY_POWER, 1);
36 input_sync(button_dev);
37 input_report_key(button_dev, KEY_POWER, 0);
38 input_sync(button_dev);
39}
40
41static struct pmi_handler cbe_pmi_handler = {
42 .type = PMI_TYPE_POWER_BUTTON,
43 .handle_pmi_message = cbe_powerbutton_handle_pmi,
44};
45
46static int __init cbe_powerbutton_init(void)
47{
48 int ret = 0;
49 struct input_dev *dev;
50
51 if (!machine_is_compatible("IBM,CBPLUS-1.0")) {
52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
53 ret = -ENODEV;
54 goto out;
55 }
56
57 dev = input_allocate_device();
58 if (!dev) {
59 ret = -ENOMEM;
60 printk(KERN_ERR "%s: Not enough memory.\n", __func__);
61 goto out;
62 }
63
64 set_bit(EV_KEY, dev->evbit);
65 set_bit(KEY_POWER, dev->keybit);
66
67 dev->name = "Power Button";
68 dev->id.bustype = BUS_HOST;
69
70 /* this makes the button look like an acpi power button
71 * no clue whether anyone relies on that though */
72 dev->id.product = 0x02;
73 dev->phys = "LNXPWRBN/button/input0";
74
75 button_pdev = platform_device_register_simple("power_button", 0, NULL, 0);
76 if (IS_ERR(button_pdev)) {
77 ret = PTR_ERR(button_pdev);
78 goto out_free_input;
79 }
80
81 dev->dev.parent = &button_pdev->dev;
82 ret = input_register_device(dev);
83 if (ret) {
84 printk(KERN_ERR "%s: Failed to register device\n", __func__);
85 goto out_free_pdev;
86 }
87
88 button_dev = dev;
89
90 ret = pmi_register_handler(&cbe_pmi_handler);
91 if (ret) {
92 printk(KERN_ERR "%s: Failed to register with pmi.\n", __func__);
93 goto out_free_pdev;
94 }
95
96 goto out;
97
98out_free_pdev:
99 platform_device_unregister(button_pdev);
100out_free_input:
101 input_free_device(dev);
102out:
103 return ret;
104}
105
106static void __exit cbe_powerbutton_exit(void)
107{
108 pmi_unregister_handler(&cbe_pmi_handler);
109 platform_device_unregister(button_pdev);
110 input_free_device(button_dev);
111}
112
113module_init(cbe_powerbutton_init);
114module_exit(cbe_powerbutton_exit);
115
116MODULE_LICENSE("GPL");
117MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c
index 4852bf312d83..4d4c8c169124 100644
--- a/arch/powerpc/platforms/cell/cbe_thermal.c
+++ b/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -97,7 +97,8 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom
97 return value.spe[spu->spe_id]; 97 return value.spe[spu->spe_id];
98} 98}
99 99
100static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) 100static ssize_t spu_show_temp(struct sys_device *sysdev, struct sysdev_attribute *attr,
101 char *buf)
101{ 102{
102 u8 value; 103 u8 value;
103 struct cbe_pmd_regs __iomem *pmd_regs; 104 struct cbe_pmd_regs __iomem *pmd_regs;
@@ -146,32 +147,38 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem *pmd_regs, const char
146 return size; 147 return size;
147} 148}
148 149
149static ssize_t spu_show_throttle_end(struct sys_device *sysdev, char *buf) 150static ssize_t spu_show_throttle_end(struct sys_device *sysdev,
151 struct sysdev_attribute *attr, char *buf)
150{ 152{
151 return show_throttle(get_pmd_regs(sysdev), buf, 0); 153 return show_throttle(get_pmd_regs(sysdev), buf, 0);
152} 154}
153 155
154static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, char *buf) 156static ssize_t spu_show_throttle_begin(struct sys_device *sysdev,
157 struct sysdev_attribute *attr, char *buf)
155{ 158{
156 return show_throttle(get_pmd_regs(sysdev), buf, 8); 159 return show_throttle(get_pmd_regs(sysdev), buf, 8);
157} 160}
158 161
159static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, char *buf) 162static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev,
163 struct sysdev_attribute *attr, char *buf)
160{ 164{
161 return show_throttle(get_pmd_regs(sysdev), buf, 16); 165 return show_throttle(get_pmd_regs(sysdev), buf, 16);
162} 166}
163 167
164static ssize_t spu_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) 168static ssize_t spu_store_throttle_end(struct sys_device *sysdev,
169 struct sysdev_attribute *attr, const char *buf, size_t size)
165{ 170{
166 return store_throttle(get_pmd_regs(sysdev), buf, size, 0); 171 return store_throttle(get_pmd_regs(sysdev), buf, size, 0);
167} 172}
168 173
169static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) 174static ssize_t spu_store_throttle_begin(struct sys_device *sysdev,
175 struct sysdev_attribute *attr, const char *buf, size_t size)
170{ 176{
171 return store_throttle(get_pmd_regs(sysdev), buf, size, 8); 177 return store_throttle(get_pmd_regs(sysdev), buf, size, 8);
172} 178}
173 179
174static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) 180static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev,
181 struct sysdev_attribute *attr, const char *buf, size_t size)
175{ 182{
176 return store_throttle(get_pmd_regs(sysdev), buf, size, 16); 183 return store_throttle(get_pmd_regs(sysdev), buf, size, 16);
177} 184}
@@ -192,43 +199,51 @@ static ssize_t ppe_show_temp(struct sys_device *sysdev, char *buf, int pos)
192 199
193/* shows the temperature of the DTS on the PPE, 200/* shows the temperature of the DTS on the PPE,
194 * located near the linear thermal sensor */ 201 * located near the linear thermal sensor */
195static ssize_t ppe_show_temp0(struct sys_device *sysdev, char *buf) 202static ssize_t ppe_show_temp0(struct sys_device *sysdev,
203 struct sysdev_attribute *attr, char *buf)
196{ 204{
197 return ppe_show_temp(sysdev, buf, 32); 205 return ppe_show_temp(sysdev, buf, 32);
198} 206}
199 207
200/* shows the temperature of the second DTS on the PPE */ 208/* shows the temperature of the second DTS on the PPE */
201static ssize_t ppe_show_temp1(struct sys_device *sysdev, char *buf) 209static ssize_t ppe_show_temp1(struct sys_device *sysdev,
210 struct sysdev_attribute *attr, char *buf)
202{ 211{
203 return ppe_show_temp(sysdev, buf, 0); 212 return ppe_show_temp(sysdev, buf, 0);
204} 213}
205 214
206static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, char *buf) 215static ssize_t ppe_show_throttle_end(struct sys_device *sysdev,
216 struct sysdev_attribute *attr, char *buf)
207{ 217{
208 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); 218 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32);
209} 219}
210 220
211static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, char *buf) 221static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev,
222 struct sysdev_attribute *attr, char *buf)
212{ 223{
213 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); 224 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40);
214} 225}
215 226
216static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, char *buf) 227static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev,
228 struct sysdev_attribute *attr, char *buf)
217{ 229{
218 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); 230 return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48);
219} 231}
220 232
221static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) 233static ssize_t ppe_store_throttle_end(struct sys_device *sysdev,
234 struct sysdev_attribute *attr, const char *buf, size_t size)
222{ 235{
223 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); 236 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32);
224} 237}
225 238
226static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) 239static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev,
240 struct sysdev_attribute *attr, const char *buf, size_t size)
227{ 241{
228 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); 242 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40);
229} 243}
230 244
231static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) 245static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev,
246 struct sysdev_attribute *attr, const char *buf, size_t size)
232{ 247{
233 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); 248 return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48);
234} 249}
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
new file mode 100644
index 000000000000..a3c6c01bd6db
--- /dev/null
+++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
@@ -0,0 +1,184 @@
1/*
2 * spu aware cpufreq governor for the cell processor
3 *
4 * © Copyright IBM Corporation 2006-2008
5 *
6 * Author: Christian Krafft <krafft@de.ibm.com>
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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/cpufreq.h>
24#include <linux/sched.h>
25#include <linux/timer.h>
26#include <linux/workqueue.h>
27#include <asm/atomic.h>
28#include <asm/machdep.h>
29#include <asm/spu.h>
30
31#define POLL_TIME 100000 /* in µs */
32#define EXP 753 /* exp(-1) in fixed-point */
33
34struct spu_gov_info_struct {
35 unsigned long busy_spus; /* fixed-point */
36 struct cpufreq_policy *policy;
37 struct delayed_work work;
38 unsigned int poll_int; /* µs */
39};
40static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info);
41
42static struct workqueue_struct *kspugov_wq;
43
44static int calc_freq(struct spu_gov_info_struct *info)
45{
46 int cpu;
47 int busy_spus;
48
49 cpu = info->policy->cpu;
50 busy_spus = atomic_read(&cbe_spu_info[cpu_to_node(cpu)].busy_spus);
51
52 CALC_LOAD(info->busy_spus, EXP, busy_spus * FIXED_1);
53 pr_debug("cpu %d: busy_spus=%d, info->busy_spus=%ld\n",
54 cpu, busy_spus, info->busy_spus);
55
56 return info->policy->max * info->busy_spus / FIXED_1;
57}
58
59static void spu_gov_work(struct work_struct *work)
60{
61 struct spu_gov_info_struct *info;
62 int delay;
63 unsigned long target_freq;
64
65 info = container_of(work, struct spu_gov_info_struct, work.work);
66
67 /* after cancel_delayed_work_sync we unset info->policy */
68 BUG_ON(info->policy == NULL);
69
70 target_freq = calc_freq(info);
71 __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H);
72
73 delay = usecs_to_jiffies(info->poll_int);
74 queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay);
75}
76
77static void spu_gov_init_work(struct spu_gov_info_struct *info)
78{
79 int delay = usecs_to_jiffies(info->poll_int);
80 INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work);
81 queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay);
82}
83
84static void spu_gov_cancel_work(struct spu_gov_info_struct *info)
85{
86 cancel_delayed_work_sync(&info->work);
87}
88
89static int spu_gov_govern(struct cpufreq_policy *policy, unsigned int event)
90{
91 unsigned int cpu = policy->cpu;
92 struct spu_gov_info_struct *info, *affected_info;
93 int i;
94 int ret = 0;
95
96 info = &per_cpu(spu_gov_info, cpu);
97
98 switch (event) {
99 case CPUFREQ_GOV_START:
100 if (!cpu_online(cpu)) {
101 printk(KERN_ERR "cpu %d is not online\n", cpu);
102 ret = -EINVAL;
103 break;
104 }
105
106 if (!policy->cur) {
107 printk(KERN_ERR "no cpu specified in policy\n");
108 ret = -EINVAL;
109 break;
110 }
111
112 /* initialize spu_gov_info for all affected cpus */
113 for_each_cpu_mask(i, policy->cpus) {
114 affected_info = &per_cpu(spu_gov_info, i);
115 affected_info->policy = policy;
116 }
117
118 info->poll_int = POLL_TIME;
119
120 /* setup timer */
121 spu_gov_init_work(info);
122
123 break;
124
125 case CPUFREQ_GOV_STOP:
126 /* cancel timer */
127 spu_gov_cancel_work(info);
128
129 /* clean spu_gov_info for all affected cpus */
130 for_each_cpu_mask (i, policy->cpus) {
131 info = &per_cpu(spu_gov_info, i);
132 info->policy = NULL;
133 }
134
135 break;
136 }
137
138 return ret;
139}
140
141static struct cpufreq_governor spu_governor = {
142 .name = "spudemand",
143 .governor = spu_gov_govern,
144 .owner = THIS_MODULE,
145};
146
147/*
148 * module init and destoy
149 */
150
151static int __init spu_gov_init(void)
152{
153 int ret;
154
155 kspugov_wq = create_workqueue("kspugov");
156 if (!kspugov_wq) {
157 printk(KERN_ERR "creation of kspugov failed\n");
158 ret = -EFAULT;
159 goto out;
160 }
161
162 ret = cpufreq_register_governor(&spu_governor);
163 if (ret) {
164 printk(KERN_ERR "registration of governor failed\n");
165 destroy_workqueue(kspugov_wq);
166 goto out;
167 }
168out:
169 return ret;
170}
171
172static void __exit spu_gov_exit(void)
173{
174 cpufreq_unregister_governor(&spu_governor);
175 destroy_workqueue(kspugov_wq);
176}
177
178
179module_init(spu_gov_init);
180module_exit(spu_gov_exit);
181
182MODULE_LICENSE("GPL");
183MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>");
184
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index eeacb3a52ca1..208005ca262c 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -173,7 +173,8 @@ static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte,
173} 173}
174 174
175static void tce_build_cell(struct iommu_table *tbl, long index, long npages, 175static void tce_build_cell(struct iommu_table *tbl, long index, long npages,
176 unsigned long uaddr, enum dma_data_direction direction) 176 unsigned long uaddr, enum dma_data_direction direction,
177 struct dma_attrs *attrs)
177{ 178{
178 int i; 179 int i;
179 unsigned long *io_pte, base_pte; 180 unsigned long *io_pte, base_pte;
@@ -198,6 +199,8 @@ static void tce_build_cell(struct iommu_table *tbl, long index, long npages,
198 base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | 199 base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW |
199 (window->ioid & IOPTE_IOID_Mask); 200 (window->ioid & IOPTE_IOID_Mask);
200#endif 201#endif
202 if (unlikely(dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)))
203 base_pte &= ~IOPTE_SO_RW;
201 204
202 io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset); 205 io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset);
203 206
@@ -519,7 +522,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np,
519 522
520 __set_bit(0, window->table.it_map); 523 __set_bit(0, window->table.it_map);
521 tce_build_cell(&window->table, window->table.it_offset, 1, 524 tce_build_cell(&window->table, window->table.it_offset, 1,
522 (unsigned long)iommu->pad_page, DMA_TO_DEVICE); 525 (unsigned long)iommu->pad_page, DMA_TO_DEVICE, NULL);
523 window->table.it_hint = window->table.it_blocksize; 526 window->table.it_hint = window->table.it_blocksize;
524 527
525 return window; 528 return window;
@@ -538,7 +541,9 @@ static struct cbe_iommu *cell_iommu_for_node(int nid)
538static unsigned long cell_dma_direct_offset; 541static unsigned long cell_dma_direct_offset;
539 542
540static unsigned long dma_iommu_fixed_base; 543static unsigned long dma_iommu_fixed_base;
541struct dma_mapping_ops dma_iommu_fixed_ops; 544
545/* iommu_fixed_is_weak is set if booted with iommu_fixed=weak */
546static int iommu_fixed_is_weak;
542 547
543static struct iommu_table *cell_get_iommu_table(struct device *dev) 548static struct iommu_table *cell_get_iommu_table(struct device *dev)
544{ 549{
@@ -562,6 +567,98 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
562 return &window->table; 567 return &window->table;
563} 568}
564 569
570/* A coherent allocation implies strong ordering */
571
572static void *dma_fixed_alloc_coherent(struct device *dev, size_t size,
573 dma_addr_t *dma_handle, gfp_t flag)
574{
575 if (iommu_fixed_is_weak)
576 return iommu_alloc_coherent(dev, cell_get_iommu_table(dev),
577 size, dma_handle,
578 device_to_mask(dev), flag,
579 dev->archdata.numa_node);
580 else
581 return dma_direct_ops.alloc_coherent(dev, size, dma_handle,
582 flag);
583}
584
585static void dma_fixed_free_coherent(struct device *dev, size_t size,
586 void *vaddr, dma_addr_t dma_handle)
587{
588 if (iommu_fixed_is_weak)
589 iommu_free_coherent(cell_get_iommu_table(dev), size, vaddr,
590 dma_handle);
591 else
592 dma_direct_ops.free_coherent(dev, size, vaddr, dma_handle);
593}
594
595static dma_addr_t dma_fixed_map_single(struct device *dev, void *ptr,
596 size_t size,
597 enum dma_data_direction direction,
598 struct dma_attrs *attrs)
599{
600 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
601 return dma_direct_ops.map_single(dev, ptr, size, direction,
602 attrs);
603 else
604 return iommu_map_single(dev, cell_get_iommu_table(dev), ptr,
605 size, device_to_mask(dev), direction,
606 attrs);
607}
608
609static void dma_fixed_unmap_single(struct device *dev, dma_addr_t dma_addr,
610 size_t size,
611 enum dma_data_direction direction,
612 struct dma_attrs *attrs)
613{
614 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
615 dma_direct_ops.unmap_single(dev, dma_addr, size, direction,
616 attrs);
617 else
618 iommu_unmap_single(cell_get_iommu_table(dev), dma_addr, size,
619 direction, attrs);
620}
621
622static int dma_fixed_map_sg(struct device *dev, struct scatterlist *sg,
623 int nents, enum dma_data_direction direction,
624 struct dma_attrs *attrs)
625{
626 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
627 return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs);
628 else
629 return iommu_map_sg(dev, cell_get_iommu_table(dev), sg, nents,
630 device_to_mask(dev), direction, attrs);
631}
632
633static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
634 int nents, enum dma_data_direction direction,
635 struct dma_attrs *attrs)
636{
637 if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))
638 dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs);
639 else
640 iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents, direction,
641 attrs);
642}
643
644static int dma_fixed_dma_supported(struct device *dev, u64 mask)
645{
646 return mask == DMA_64BIT_MASK;
647}
648
649static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
650
651struct dma_mapping_ops dma_iommu_fixed_ops = {
652 .alloc_coherent = dma_fixed_alloc_coherent,
653 .free_coherent = dma_fixed_free_coherent,
654 .map_single = dma_fixed_map_single,
655 .unmap_single = dma_fixed_unmap_single,
656 .map_sg = dma_fixed_map_sg,
657 .unmap_sg = dma_fixed_unmap_sg,
658 .dma_supported = dma_fixed_dma_supported,
659 .set_dma_mask = dma_set_mask_and_switch,
660};
661
565static void cell_dma_dev_setup_fixed(struct device *dev); 662static void cell_dma_dev_setup_fixed(struct device *dev);
566 663
567static void cell_dma_dev_setup(struct device *dev) 664static void cell_dma_dev_setup(struct device *dev)
@@ -918,9 +1015,16 @@ static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu,
918 1015
919 pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase); 1016 pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase);
920 1017
921 base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW 1018 base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M
922 | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask); 1019 | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask);
923 1020
1021 if (iommu_fixed_is_weak)
1022 pr_info("IOMMU: Using weak ordering for fixed mapping\n");
1023 else {
1024 pr_info("IOMMU: Using strong ordering for fixed mapping\n");
1025 base_pte |= IOPTE_SO_RW;
1026 }
1027
924 for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) { 1028 for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) {
925 /* Don't touch the dynamic region */ 1029 /* Don't touch the dynamic region */
926 ioaddr = uaddr + fbase; 1030 ioaddr = uaddr + fbase;
@@ -1036,9 +1140,6 @@ static int __init cell_iommu_fixed_mapping_init(void)
1036 cell_iommu_setup_window(iommu, np, dbase, dsize, 0); 1140 cell_iommu_setup_window(iommu, np, dbase, dsize, 0);
1037 } 1141 }
1038 1142
1039 dma_iommu_fixed_ops = dma_direct_ops;
1040 dma_iommu_fixed_ops.set_dma_mask = dma_set_mask_and_switch;
1041
1042 dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch; 1143 dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch;
1043 set_pci_dma_ops(&dma_iommu_ops); 1144 set_pci_dma_ops(&dma_iommu_ops);
1044 1145
@@ -1052,6 +1153,9 @@ static int __init setup_iommu_fixed(char *str)
1052 if (strcmp(str, "off") == 0) 1153 if (strcmp(str, "off") == 0)
1053 iommu_fixed_disabled = 1; 1154 iommu_fixed_disabled = 1;
1054 1155
1156 else if (strcmp(str, "weak") == 0)
1157 iommu_fixed_is_weak = 1;
1158
1055 return 1; 1159 return 1;
1056} 1160}
1057__setup("iommu_fixed=", setup_iommu_fixed); 1161__setup("iommu_fixed=", setup_iommu_fixed);
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index 8a3631ce912b..efdacc829576 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -38,8 +38,6 @@
38 38
39#include "pervasive.h" 39#include "pervasive.h"
40 40
41static int sysreset_hack;
42
43static void cbe_power_save(void) 41static void cbe_power_save(void)
44{ 42{
45 unsigned long ctrl, thread_switch_control; 43 unsigned long ctrl, thread_switch_control;
@@ -87,9 +85,6 @@ static void cbe_power_save(void)
87 85
88static int cbe_system_reset_exception(struct pt_regs *regs) 86static int cbe_system_reset_exception(struct pt_regs *regs)
89{ 87{
90 int cpu;
91 struct cbe_pmd_regs __iomem *pmd;
92
93 switch (regs->msr & SRR1_WAKEMASK) { 88 switch (regs->msr & SRR1_WAKEMASK) {
94 case SRR1_WAKEEE: 89 case SRR1_WAKEEE:
95 do_IRQ(regs); 90 do_IRQ(regs);
@@ -98,19 +93,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs)
98 timer_interrupt(regs); 93 timer_interrupt(regs);
99 break; 94 break;
100 case SRR1_WAKEMT: 95 case SRR1_WAKEMT:
101 /* 96 return cbe_sysreset_hack();
102 * The BMC can inject user triggered system reset exceptions,
103 * but cannot set the system reset reason in srr1,
104 * so check an extra register here.
105 */
106 if (sysreset_hack && (cpu = smp_processor_id()) == 0) {
107 pmd = cbe_get_cpu_pmd_regs(cpu);
108 if (in_be64(&pmd->ras_esc_0) & 0xffff) {
109 out_be64(&pmd->ras_esc_0, 0);
110 return 0;
111 }
112 }
113 break;
114#ifdef CONFIG_CBE_RAS 97#ifdef CONFIG_CBE_RAS
115 case SRR1_WAKESYSERR: 98 case SRR1_WAKESYSERR:
116 cbe_system_error_exception(regs); 99 cbe_system_error_exception(regs);
@@ -134,8 +117,6 @@ void __init cbe_pervasive_init(void)
134 if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO)) 117 if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO))
135 return; 118 return;
136 119
137 sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
138
139 for_each_possible_cpu(cpu) { 120 for_each_possible_cpu(cpu) {
140 struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu); 121 struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu);
141 if (!regs) 122 if (!regs)
@@ -144,12 +125,6 @@ void __init cbe_pervasive_init(void)
144 /* Enable Pause(0) control bit */ 125 /* Enable Pause(0) control bit */
145 out_be64(&regs->pmcr, in_be64(&regs->pmcr) | 126 out_be64(&regs->pmcr, in_be64(&regs->pmcr) |
146 CBE_PMD_PAUSE_ZERO_CONTROL); 127 CBE_PMD_PAUSE_ZERO_CONTROL);
147
148 /* Enable JTAG system-reset hack */
149 if (sysreset_hack)
150 out_be32(&regs->fir_mode_reg,
151 in_be32(&regs->fir_mode_reg) |
152 CBE_PMD_FIR_MODE_M8);
153 } 128 }
154 129
155 ppc_md.power_save = cbe_power_save; 130 ppc_md.power_save = cbe_power_save;
diff --git a/arch/powerpc/platforms/cell/pervasive.h b/arch/powerpc/platforms/cell/pervasive.h
index 7b50947f8044..fd4d7b7092b4 100644
--- a/arch/powerpc/platforms/cell/pervasive.h
+++ b/arch/powerpc/platforms/cell/pervasive.h
@@ -30,4 +30,13 @@ extern void cbe_system_error_exception(struct pt_regs *regs);
30extern void cbe_maintenance_exception(struct pt_regs *regs); 30extern void cbe_maintenance_exception(struct pt_regs *regs);
31extern void cbe_thermal_exception(struct pt_regs *regs); 31extern void cbe_thermal_exception(struct pt_regs *regs);
32 32
33#ifdef CONFIG_PPC_IBM_CELL_RESETBUTTON
34extern int cbe_sysreset_hack(void);
35#else
36static inline int cbe_sysreset_hack(void)
37{
38 return 1;
39}
40#endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */
41
33#endif 42#endif
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 505f9b9bdf0c..2a14b052abcd 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -236,6 +236,52 @@ static struct notifier_block cbe_ptcal_reboot_notifier = {
236 .notifier_call = cbe_ptcal_notify_reboot 236 .notifier_call = cbe_ptcal_notify_reboot
237}; 237};
238 238
239#ifdef CONFIG_PPC_IBM_CELL_RESETBUTTON
240static int sysreset_hack;
241
242static int __init cbe_sysreset_init(void)
243{
244 struct cbe_pmd_regs __iomem *regs;
245
246 sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
247 if (!sysreset_hack)
248 return 0;
249
250 regs = cbe_get_cpu_pmd_regs(0);
251 if (!regs)
252 return 0;
253
254 /* Enable JTAG system-reset hack */
255 out_be32(&regs->fir_mode_reg,
256 in_be32(&regs->fir_mode_reg) |
257 CBE_PMD_FIR_MODE_M8);
258
259 return 0;
260}
261device_initcall(cbe_sysreset_init);
262
263int cbe_sysreset_hack(void)
264{
265 struct cbe_pmd_regs __iomem *regs;
266
267 /*
268 * The BMC can inject user triggered system reset exceptions,
269 * but cannot set the system reset reason in srr1,
270 * so check an extra register here.
271 */
272 if (sysreset_hack && (smp_processor_id() == 0)) {
273 regs = cbe_get_cpu_pmd_regs(0);
274 if (!regs)
275 return 0;
276 if (in_be64(&regs->ras_esc_0) & 0x0000ffff) {
277 out_be64(&regs->ras_esc_0, 0);
278 return 0;
279 }
280 }
281 return 1;
282}
283#endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */
284
239int __init cbe_ptcal_init(void) 285int __init cbe_ptcal_init(void)
240{ 286{
241 int ret; 287 int ret;
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 78f905bc6a42..a5bdb89a17c3 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -703,7 +703,8 @@ static unsigned long long spu_acct_time(struct spu *spu,
703} 703}
704 704
705 705
706static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf) 706static ssize_t spu_stat_show(struct sys_device *sysdev,
707 struct sysdev_attribute *attr, char *buf)
707{ 708{
708 struct spu *spu = container_of(sysdev, struct spu, sysdev); 709 struct spu *spu = container_of(sysdev, struct spu, sysdev);
709 710
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index 99c73066b82f..010a51f59796 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -288,9 +288,32 @@ spufs_mem_mmap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
288 return VM_FAULT_NOPAGE; 288 return VM_FAULT_NOPAGE;
289} 289}
290 290
291static int spufs_mem_mmap_access(struct vm_area_struct *vma,
292 unsigned long address,
293 void *buf, int len, int write)
294{
295 struct spu_context *ctx = vma->vm_file->private_data;
296 unsigned long offset = address - vma->vm_start;
297 char *local_store;
298
299 if (write && !(vma->vm_flags & VM_WRITE))
300 return -EACCES;
301 if (spu_acquire(ctx))
302 return -EINTR;
303 if ((offset + len) > vma->vm_end)
304 len = vma->vm_end - offset;
305 local_store = ctx->ops->get_ls(ctx);
306 if (write)
307 memcpy_toio(local_store + offset, buf, len);
308 else
309 memcpy_fromio(buf, local_store + offset, len);
310 spu_release(ctx);
311 return len;
312}
291 313
292static struct vm_operations_struct spufs_mem_mmap_vmops = { 314static struct vm_operations_struct spufs_mem_mmap_vmops = {
293 .fault = spufs_mem_mmap_fault, 315 .fault = spufs_mem_mmap_fault,
316 .access = spufs_mem_mmap_access,
294}; 317};
295 318
296static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma) 319static int spufs_mem_mmap(struct file *file, struct vm_area_struct *vma)
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 609c46db4a1b..768c262b9368 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -367,7 +367,7 @@ static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide)
367 viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); 367 viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL);
368 if (!viaisa) 368 if (!viaisa)
369 return; 369 return;
370 printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id); 370 dev_info(&viaide->dev, "Fixing VIA IDE, force legacy mode on\n");
371 371
372 pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); 372 pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif);
373 pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); 373 pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5);
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index afc9141be63e..ef74a0763ec1 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -51,15 +51,13 @@ u8 uli_pirq_to_irq[8] = {
51 ULI_8259_NONE, /* PIRQH */ 51 ULI_8259_NONE, /* PIRQH */
52}; 52};
53 53
54/* set in board code if you want this quirks to do something */
55int uses_fsl_uli_m1575;
56
57/* Bridge */ 54/* Bridge */
58static void __devinit early_uli5249(struct pci_dev *dev) 55static void __devinit early_uli5249(struct pci_dev *dev)
59{ 56{
60 unsigned char temp; 57 unsigned char temp;
61 58
62 if (!uses_fsl_uli_m1575) 59 if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) &&
60 !machine_is(mpc8572_ds))
63 return; 61 return;
64 62
65 pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO | 63 pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO |
@@ -82,7 +80,8 @@ static void __devinit quirk_uli1575(struct pci_dev *dev)
82{ 80{
83 int i; 81 int i;
84 82
85 if (!uses_fsl_uli_m1575) 83 if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) &&
84 !machine_is(mpc8572_ds))
86 return; 85 return;
87 86
88 /* 87 /*
@@ -150,7 +149,8 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev)
150 * IRQ 14: Edge 149 * IRQ 14: Edge
151 * IRQ 15: Edge 150 * IRQ 15: Edge
152 */ 151 */
153 if (!uses_fsl_uli_m1575) 152 if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) &&
153 !machine_is(mpc8572_ds))
154 return; 154 return;
155 155
156 outb(0xfa, 0x4d0); 156 outb(0xfa, 0x4d0);
@@ -176,7 +176,8 @@ static void __devinit quirk_uli5288(struct pci_dev *dev)
176 unsigned char c; 176 unsigned char c;
177 unsigned int d; 177 unsigned int d;
178 178
179 if (!uses_fsl_uli_m1575) 179 if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) &&
180 !machine_is(mpc8572_ds))
180 return; 181 return;
181 182
182 /* read/write lock */ 183 /* read/write lock */
@@ -200,7 +201,8 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
200{ 201{
201 unsigned short temp; 202 unsigned short temp;
202 203
203 if (!uses_fsl_uli_m1575) 204 if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) &&
205 !machine_is(mpc8572_ds))
204 return; 206 return;
205 207
206 pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE | 208 pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE |
@@ -221,7 +223,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev)
221 for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { 223 for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
222 if ((bus->resource[i]) && 224 if ((bus->resource[i]) &&
223 (bus->resource[i]->flags & IORESOURCE_MEM)) { 225 (bus->resource[i]->flags & IORESOURCE_MEM)) {
224 dummy = ioremap(bus->resource[i]->start, 0x4); 226 dummy = ioremap(bus->resource[i]->end - 3, 0x4);
225 if (dummy) { 227 if (dummy) {
226 in_8(dummy); 228 in_8(dummy);
227 iounmap(dummy); 229 iounmap(dummy);
@@ -238,6 +240,103 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
238DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249); 240DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249);
239DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); 241DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575);
240 242
243static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev)
244{
245 u32 temp32;
246
247 if (!machine_is(mpc86xx_hpcd))
248 return;
249
250 /* Disable INTx */
251 pci_read_config_dword(dev, 0x48, &temp32);
252 pci_write_config_dword(dev, 0x48, (temp32 | 1<<26));
253
254 /* Enable sideband interrupt */
255 pci_read_config_dword(dev, 0x90, &temp32);
256 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22));
257}
258
259static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev)
260{
261 unsigned char c;
262 unsigned short temp;
263
264 if (!machine_is(mpc86xx_hpcd))
265 return;
266
267 /* Interrupt Disable, Needed when SATA disabled */
268 pci_read_config_word(dev, PCI_COMMAND, &temp);
269 temp |= 1<<10;
270 pci_write_config_word(dev, PCI_COMMAND, temp);
271
272 pci_read_config_byte(dev, 0x83, &c);
273 c |= 0x80;
274 pci_write_config_byte(dev, 0x83, c);
275
276 pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01);
277 pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06);
278
279 pci_read_config_byte(dev, 0x83, &c);
280 c &= 0x7f;
281 pci_write_config_byte(dev, 0x83, c);
282}
283
284/*
285 * Since 8259PIC was disabled on the board, the IDE device can not
286 * use the legacy IRQ, we need to let the IDE device work under
287 * native mode and use the interrupt line like other PCI devices.
288 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this
289 * as the interrupt for IDE device.
290 */
291static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev)
292{
293 unsigned char c;
294
295 if (!machine_is(mpc86xx_hpcd))
296 return;
297
298 pci_read_config_byte(dev, 0x4b, &c);
299 c |= 0x10;
300 pci_write_config_byte(dev, 0x4b, c);
301}
302
303/*
304 * SATA interrupt pin bug fix
305 * There's a chip bug for 5288, The interrupt pin should be 2,
306 * not the read only value 1, So it use INTB#, not INTA# which
307 * actually used by the IDE device 5229.
308 * As of this bug, during the PCI initialization, 5288 read the
309 * irq of IDE device from the device tree, this function fix this
310 * bug by re-assigning a correct irq to 5288.
311 *
312 */
313static void __devinit hpcd_final_uli5288(struct pci_dev *dev)
314{
315 struct pci_controller *hose = pci_bus_to_host(dev->bus);
316 struct device_node *hosenode = hose ? hose->dn : NULL;
317 struct of_irq oirq;
318 int virq, pin = 2;
319 u32 laddr[3];
320
321 if (!machine_is(mpc86xx_hpcd))
322 return;
323
324 if (!hosenode)
325 return;
326
327 laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8);
328 laddr[1] = laddr[2] = 0;
329 of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq);
330 virq = irq_create_of_mapping(oirq.controller, oirq.specifier,
331 oirq.size);
332 dev->irq = virq;
333}
334
335DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575);
336DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd_quirk_uli5288);
337DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229);
338DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288);
339
241int uli_exclude_device(struct pci_controller *hose, 340int uli_exclude_device(struct pci_controller *hose,
242 u_char bus, u_char devfn) 341 u_char bus, u_char devfn)
243{ 342{
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig
index 761d9e971fc4..ea3e541ac74f 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -2,6 +2,7 @@ config PPC_ISERIES
2 bool "IBM Legacy iSeries" 2 bool "IBM Legacy iSeries"
3 depends on PPC_MULTIPLATFORM && PPC64 3 depends on PPC_MULTIPLATFORM && PPC64
4 select PPC_INDIRECT_IO 4 select PPC_INDIRECT_IO
5 select PPC_PCI_CHOICE if EMBEDDED
5 6
6menu "iSeries device drivers" 7menu "iSeries device drivers"
7 depends on PPC_ISERIES 8 depends on PPC_ISERIES
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index ab5d8687c3cf..bc818e4e2033 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -42,7 +42,8 @@
42#include <asm/iseries/iommu.h> 42#include <asm/iseries/iommu.h>
43 43
44static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, 44static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages,
45 unsigned long uaddr, enum dma_data_direction direction) 45 unsigned long uaddr, enum dma_data_direction direction,
46 struct dma_attrs *attrs)
46{ 47{
47 u64 rc; 48 u64 rc;
48 u64 tce, rpn; 49 u64 tce, rpn;
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index b72120751bbe..70b688c1aefb 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -561,7 +561,7 @@ static void yield_shared_processor(void)
561static void iseries_shared_idle(void) 561static void iseries_shared_idle(void)
562{ 562{
563 while (1) { 563 while (1) {
564 tick_nohz_stop_sched_tick(); 564 tick_nohz_stop_sched_tick(1);
565 while (!need_resched() && !hvlpevent_is_pending()) { 565 while (!need_resched() && !hvlpevent_is_pending()) {
566 local_irq_disable(); 566 local_irq_disable();
567 ppc64_runlatch_off(); 567 ppc64_runlatch_off();
@@ -591,7 +591,7 @@ static void iseries_dedicated_idle(void)
591 set_thread_flag(TIF_POLLING_NRFLAG); 591 set_thread_flag(TIF_POLLING_NRFLAG);
592 592
593 while (1) { 593 while (1) {
594 tick_nohz_stop_sched_tick(); 594 tick_nohz_stop_sched_tick(1);
595 if (!need_resched()) { 595 if (!need_resched()) {
596 while (!need_resched()) { 596 while (!need_resched()) {
597 ppc64_runlatch_off(); 597 ppc64_runlatch_off();
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 86967bdd8774..70541b7a5013 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -85,7 +85,8 @@ static int iommu_table_iobmap_inited;
85 85
86static void iobmap_build(struct iommu_table *tbl, long index, 86static void iobmap_build(struct iommu_table *tbl, long index,
87 long npages, unsigned long uaddr, 87 long npages, unsigned long uaddr,
88 enum dma_data_direction direction) 88 enum dma_data_direction direction,
89 struct dma_attrs *attrs)
89{ 90{
90 u32 *ip; 91 u32 *ip;
91 u32 rpn; 92 u32 rpn;
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 00bd0166d07f..31635446901a 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -97,8 +97,6 @@ extern struct machdep_calls pmac_md;
97int sccdbg; 97int sccdbg;
98#endif 98#endif
99 99
100extern void zs_kgdb_hook(int tty_num);
101
102sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN; 100sys_ctrler_t sys_ctrler = SYS_CTRLER_UNKNOWN;
103EXPORT_SYMBOL(sys_ctrler); 101EXPORT_SYMBOL(sys_ctrler);
104 102
@@ -329,10 +327,6 @@ static void __init pmac_setup_arch(void)
329 l2cr_init(); 327 l2cr_init();
330#endif /* CONFIG_PPC32 */ 328#endif /* CONFIG_PPC32 */
331 329
332#ifdef CONFIG_KGDB
333 zs_kgdb_hook(0);
334#endif
335
336 find_via_cuda(); 330 find_via_cuda();
337 find_via_pmu(); 331 find_via_pmu();
338 smu_init(); 332 smu_init();
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index a5f4e95dfc3d..920cf7a454b1 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -8,6 +8,7 @@ config PPC_PS3
8 select USB_ARCH_HAS_EHCI 8 select USB_ARCH_HAS_EHCI
9 select USB_EHCI_BIG_ENDIAN_MMIO 9 select USB_EHCI_BIG_ENDIAN_MMIO
10 select MEMORY_HOTPLUG 10 select MEMORY_HOTPLUG
11 select PPC_PCI_CHOICE
11 help 12 help
12 This option enables support for the Sony PS3 game console 13 This option enables support for the Sony PS3 game console
13 and other platforms using the PS3 hypervisor. Enabling this 14 and other platforms using the PS3 hypervisor. Enabling this
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index 3866debfa3c4..ffdd8e963fbd 100644
--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -486,6 +486,7 @@ static int __init ps3_register_graphics_devices(void)
486 return -ENOMEM; 486 return -ENOMEM;
487 487
488 p->dev.match_id = PS3_MATCH_ID_GRAPHICS; 488 p->dev.match_id = PS3_MATCH_ID_GRAPHICS;
489 p->dev.match_sub_id = PS3_MATCH_SUB_ID_FB;
489 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; 490 p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
490 491
491 result = ps3_system_bus_device_register(&p->dev); 492 result = ps3_system_bus_device_register(&p->dev);
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index d66c3628a112..280ee88cb0b0 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -347,16 +347,23 @@ static int ps3_system_bus_match(struct device *_dev,
347 struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv); 347 struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv);
348 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); 348 struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
349 349
350 result = dev->match_id == drv->match_id; 350 if (!dev->match_sub_id)
351 result = dev->match_id == drv->match_id;
352 else
353 result = dev->match_sub_id == drv->match_sub_id &&
354 dev->match_id == drv->match_id;
351 355
352 if (result) 356 if (result)
353 pr_info("%s:%d: dev=%u(%s), drv=%u(%s): match\n", __func__, 357 pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n",
354 __LINE__, dev->match_id, dev->core.bus_id, 358 __func__, __LINE__,
355 drv->match_id, drv->core.name); 359 dev->match_id, dev->match_sub_id, dev->core.bus_id,
360 drv->match_id, drv->match_sub_id, drv->core.name);
356 else 361 else
357 pr_debug("%s:%d: dev=%u(%s), drv=%u(%s): miss\n", __func__, 362 pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n",
358 __LINE__, dev->match_id, dev->core.bus_id, 363 __func__, __LINE__,
359 drv->match_id, drv->core.name); 364 dev->match_id, dev->match_sub_id, dev->core.bus_id,
365 drv->match_id, drv->match_sub_id, drv->core.name);
366
360 return result; 367 return result;
361} 368}
362 369
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 07fe5b69b9e2..757c0296e0b8 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -7,6 +7,7 @@ config PPC_PSERIES
7 select RTAS_ERROR_LOGGING 7 select RTAS_ERROR_LOGGING
8 select PPC_UDBG_16550 8 select PPC_UDBG_16550
9 select PPC_NATIVE 9 select PPC_NATIVE
10 select PPC_PCI_CHOICE if EMBEDDED
10 default y 11 default y
11 12
12config PPC_SPLPAR 13config PPC_SPLPAR
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index c027f0a70a04..54816d75b578 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -75,9 +75,9 @@
75 */ 75 */
76 76
77/* If a device driver keeps reading an MMIO register in an interrupt 77/* If a device driver keeps reading an MMIO register in an interrupt
78 * handler after a slot isolation event has occurred, we assume it 78 * handler after a slot isolation event, it might be broken.
79 * is broken and panic. This sets the threshold for how many read 79 * This sets the threshold for how many read attempts we allow
80 * attempts we allow before panicking. 80 * before printing an error message.
81 */ 81 */
82#define EEH_MAX_FAILS 2100000 82#define EEH_MAX_FAILS 2100000
83 83
@@ -470,6 +470,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
470 unsigned long flags; 470 unsigned long flags;
471 struct pci_dn *pdn; 471 struct pci_dn *pdn;
472 int rc = 0; 472 int rc = 0;
473 const char *location;
473 474
474 total_mmio_ffs++; 475 total_mmio_ffs++;
475 476
@@ -509,18 +510,15 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
509 rc = 1; 510 rc = 1;
510 if (pdn->eeh_mode & EEH_MODE_ISOLATED) { 511 if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
511 pdn->eeh_check_count ++; 512 pdn->eeh_check_count ++;
512 if (pdn->eeh_check_count >= EEH_MAX_FAILS) { 513 if (pdn->eeh_check_count % EEH_MAX_FAILS == 0) {
513 printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", 514 location = of_get_property(dn, "ibm,loc-code", NULL);
514 pdn->eeh_check_count); 515 printk (KERN_ERR "EEH: %d reads ignored for recovering device at "
516 "location=%s driver=%s pci addr=%s\n",
517 pdn->eeh_check_count, location,
518 dev->driver->name, pci_name(dev));
519 printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n",
520 dev->driver->name);
515 dump_stack(); 521 dump_stack();
516 msleep(5000);
517
518 /* re-read the slot reset state */
519 if (read_slot_reset_state(pdn, rets) != 0)
520 rets[0] = -1; /* reset state unknown */
521
522 /* If we are here, then we hit an infinite loop. Stop. */
523 panic("EEH: MMIO halt (%d) on device:%s\n", rets[0], pci_name(dev));
524 } 522 }
525 goto dn_unlock; 523 goto dn_unlock;
526 } 524 }
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 9a12908510fb..5377dd4b849a 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -50,7 +50,8 @@
50 50
51static void tce_build_pSeries(struct iommu_table *tbl, long index, 51static void tce_build_pSeries(struct iommu_table *tbl, long index,
52 long npages, unsigned long uaddr, 52 long npages, unsigned long uaddr,
53 enum dma_data_direction direction) 53 enum dma_data_direction direction,
54 struct dma_attrs *attrs)
54{ 55{
55 u64 proto_tce; 56 u64 proto_tce;
56 u64 *tcep; 57 u64 *tcep;
@@ -95,7 +96,8 @@ static unsigned long tce_get_pseries(struct iommu_table *tbl, long index)
95 96
96static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, 97static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
97 long npages, unsigned long uaddr, 98 long npages, unsigned long uaddr,
98 enum dma_data_direction direction) 99 enum dma_data_direction direction,
100 struct dma_attrs *attrs)
99{ 101{
100 u64 rc; 102 u64 rc;
101 u64 proto_tce, tce; 103 u64 proto_tce, tce;
@@ -127,7 +129,8 @@ static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
127 129
128static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, 130static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
129 long npages, unsigned long uaddr, 131 long npages, unsigned long uaddr,
130 enum dma_data_direction direction) 132 enum dma_data_direction direction,
133 struct dma_attrs *attrs)
131{ 134{
132 u64 rc; 135 u64 rc;
133 u64 proto_tce; 136 u64 proto_tce;
@@ -136,7 +139,8 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
136 long l, limit; 139 long l, limit;
137 140
138 if (npages == 1) { 141 if (npages == 1) {
139 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction); 142 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
143 direction, attrs);
140 return; 144 return;
141 } 145 }
142 146
@@ -150,7 +154,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
150 /* If allocation fails, fall back to the loop implementation */ 154 /* If allocation fails, fall back to the loop implementation */
151 if (!tcep) { 155 if (!tcep) {
152 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, 156 tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
153 direction); 157 direction, attrs);
154 return; 158 return;
155 } 159 }
156 __get_cpu_var(tce_page) = tcep; 160 __get_cpu_var(tce_page) = tcep;
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c
index 7f59188cd9a1..9e105cbc5e5f 100644
--- a/arch/powerpc/sysdev/axonram.c
+++ b/arch/powerpc/sysdev/axonram.c
@@ -57,6 +57,8 @@
57#define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT 57#define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT
58#define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING 58#define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING
59 59
60static int azfs_major, azfs_minor;
61
60struct axon_ram_bank { 62struct axon_ram_bank {
61 struct of_device *device; 63 struct of_device *device;
62 struct gendisk *disk; 64 struct gendisk *disk;
@@ -148,7 +150,10 @@ axon_ram_direct_access(struct block_device *device, sector_t sector,
148 struct axon_ram_bank *bank = device->bd_disk->private_data; 150 struct axon_ram_bank *bank = device->bd_disk->private_data;
149 loff_t offset; 151 loff_t offset;
150 152
151 offset = sector << AXON_RAM_SECTOR_SHIFT; 153 offset = sector;
154 if (device->bd_part != NULL)
155 offset += device->bd_part->start_sect;
156 offset <<= AXON_RAM_SECTOR_SHIFT;
152 if (offset >= bank->size) { 157 if (offset >= bank->size) {
153 dev_err(&bank->device->dev, "Access outside of address space\n"); 158 dev_err(&bank->device->dev, "Access outside of address space\n");
154 return -ERANGE; 159 return -ERANGE;
@@ -227,19 +232,14 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
227 goto failed; 232 goto failed;
228 } 233 }
229 234
230 bank->disk->first_minor = 0; 235 bank->disk->major = azfs_major;
236 bank->disk->first_minor = azfs_minor;
231 bank->disk->fops = &axon_ram_devops; 237 bank->disk->fops = &axon_ram_devops;
232 bank->disk->private_data = bank; 238 bank->disk->private_data = bank;
233 bank->disk->driverfs_dev = &device->dev; 239 bank->disk->driverfs_dev = &device->dev;
234 240
235 sprintf(bank->disk->disk_name, "%s%d", 241 sprintf(bank->disk->disk_name, "%s%d",
236 AXON_RAM_DEVICE_NAME, axon_ram_bank_id); 242 AXON_RAM_DEVICE_NAME, axon_ram_bank_id);
237 bank->disk->major = register_blkdev(0, bank->disk->disk_name);
238 if (bank->disk->major < 0) {
239 dev_err(&device->dev, "Cannot register block device\n");
240 rc = -EFAULT;
241 goto failed;
242 }
243 243
244 bank->disk->queue = blk_alloc_queue(GFP_KERNEL); 244 bank->disk->queue = blk_alloc_queue(GFP_KERNEL);
245 if (bank->disk->queue == NULL) { 245 if (bank->disk->queue == NULL) {
@@ -276,6 +276,8 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
276 goto failed; 276 goto failed;
277 } 277 }
278 278
279 azfs_minor += bank->disk->minors;
280
279 return 0; 281 return 0;
280 282
281failed: 283failed:
@@ -310,7 +312,6 @@ axon_ram_remove(struct of_device *device)
310 312
311 device_remove_file(&device->dev, &dev_attr_ecc); 313 device_remove_file(&device->dev, &dev_attr_ecc);
312 free_irq(bank->irq_id, device); 314 free_irq(bank->irq_id, device);
313 unregister_blkdev(bank->disk->major, bank->disk->disk_name);
314 del_gendisk(bank->disk); 315 del_gendisk(bank->disk);
315 iounmap((void __iomem *) bank->io_addr); 316 iounmap((void __iomem *) bank->io_addr);
316 kfree(bank); 317 kfree(bank);
@@ -341,6 +342,14 @@ static struct of_platform_driver axon_ram_driver = {
341static int __init 342static int __init
342axon_ram_init(void) 343axon_ram_init(void)
343{ 344{
345 azfs_major = register_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
346 if (azfs_major < 0) {
347 printk(KERN_ERR "%s cannot become block device major number\n",
348 AXON_RAM_MODULE_NAME);
349 return -EFAULT;
350 }
351 azfs_minor = 0;
352
344 return of_register_platform_driver(&axon_ram_driver); 353 return of_register_platform_driver(&axon_ram_driver);
345} 354}
346 355
@@ -351,6 +360,7 @@ static void __exit
351axon_ram_exit(void) 360axon_ram_exit(void)
352{ 361{
353 of_unregister_platform_driver(&axon_ram_driver); 362 of_unregister_platform_driver(&axon_ram_driver);
363 unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME);
354} 364}
355 365
356module_init(axon_ram_init); 366module_init(axon_ram_init);
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 005c2ecf976f..de8c8b542cfa 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -149,7 +149,8 @@ static void dart_flush(struct iommu_table *tbl)
149 149
150static void dart_build(struct iommu_table *tbl, long index, 150static void dart_build(struct iommu_table *tbl, long index,
151 long npages, unsigned long uaddr, 151 long npages, unsigned long uaddr,
152 enum dma_data_direction direction) 152 enum dma_data_direction direction,
153 struct dma_attrs *attrs)
153{ 154{
154 unsigned int *dp; 155 unsigned int *dp;
155 unsigned int rpn; 156 unsigned int rpn;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 87b0aa13ab48..61e6d77efa4f 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -27,6 +27,7 @@
27#include <sysdev/fsl_soc.h> 27#include <sysdev/fsl_soc.h>
28#include <sysdev/fsl_pci.h> 28#include <sysdev/fsl_pci.h>
29 29
30#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx)
30/* atmu setup for fsl pci/pcie controller */ 31/* atmu setup for fsl pci/pcie controller */
31void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc) 32void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc)
32{ 33{
@@ -248,3 +249,63 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8536, quirk_fsl_pcie_header);
248DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header); 249DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header);
249DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header); 250DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
250DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); 251DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
252#endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
253
254#if defined(CONFIG_PPC_83xx)
255int __init mpc83xx_add_bridge(struct device_node *dev)
256{
257 int len;
258 struct pci_controller *hose;
259 struct resource rsrc;
260 const int *bus_range;
261 int primary = 1, has_address = 0;
262 phys_addr_t immr = get_immrbase();
263
264 pr_debug("Adding PCI host bridge %s\n", dev->full_name);
265
266 /* Fetch host bridge registers address */
267 has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
268
269 /* Get bus range if any */
270 bus_range = of_get_property(dev, "bus-range", &len);
271 if (bus_range == NULL || len < 2 * sizeof(int)) {
272 printk(KERN_WARNING "Can't get bus-range for %s, assume"
273 " bus 0\n", dev->full_name);
274 }
275
276 ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS;
277 hose = pcibios_alloc_controller(dev);
278 if (!hose)
279 return -ENOMEM;
280
281 hose->first_busno = bus_range ? bus_range[0] : 0;
282 hose->last_busno = bus_range ? bus_range[1] : 0xff;
283
284 /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar
285 * the other at 0x8600, we consider the 0x8500 the primary controller
286 */
287 /* PCI 1 */
288 if ((rsrc.start & 0xfffff) == 0x8500) {
289 setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0);
290 }
291 /* PCI 2 */
292 if ((rsrc.start & 0xfffff) == 0x8600) {
293 setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0);
294 primary = 0;
295 }
296
297 printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
298 "Firmware bus number: %d->%d\n",
299 (unsigned long long)rsrc.start, hose->first_busno,
300 hose->last_busno);
301
302 pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
303 hose, hose->cfg_addr, hose->cfg_data);
304
305 /* Interpret the "ranges" property */
306 /* This also maps the I/O region and sets isa_io/mem_base */
307 pci_process_bridge_OF_ranges(hose, dev, primary);
308
309 return 0;
310}
311#endif /* CONFIG_PPC_83xx */
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index 37b04ad26571..13f30c2a61e7 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -83,6 +83,7 @@ struct ccsr_pci {
83 83
84extern int fsl_add_bridge(struct device_node *dev, int is_primary); 84extern int fsl_add_bridge(struct device_node *dev, int is_primary);
85extern void fsl_pcibios_fixup_bus(struct pci_bus *bus); 85extern void fsl_pcibios_fixup_bus(struct pci_bus *bus);
86extern int mpc83xx_add_bridge(struct device_node *dev);
86 87
87#endif /* __POWERPC_FSL_PCI_H */ 88#endif /* __POWERPC_FSL_PCI_H */
88#endif /* __KERNEL__ */ 89#endif /* __KERNEL__ */
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index ebcec7362f95..214388e11807 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -207,66 +207,58 @@ static int __init of_add_fixed_phys(void)
207arch_initcall(of_add_fixed_phys); 207arch_initcall(of_add_fixed_phys);
208#endif /* CONFIG_FIXED_PHY */ 208#endif /* CONFIG_FIXED_PHY */
209 209
210static int __init gfar_mdio_of_init(void) 210static int gfar_mdio_of_init_one(struct device_node *np)
211{ 211{
212 struct device_node *np = NULL; 212 int k;
213 struct device_node *child = NULL;
214 struct gianfar_mdio_data mdio_data;
213 struct platform_device *mdio_dev; 215 struct platform_device *mdio_dev;
214 struct resource res; 216 struct resource res;
215 int ret; 217 int ret;
216 218
217 np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio"); 219 memset(&res, 0, sizeof(res));
220 memset(&mdio_data, 0, sizeof(mdio_data));
218 221
219 /* try the deprecated version */ 222 ret = of_address_to_resource(np, 0, &res);
220 if (!np) 223 if (ret)
221 np = of_find_compatible_node(np, "mdio", "gianfar"); 224 return ret;
222 225
223 if (np) { 226 mdio_dev = platform_device_register_simple("fsl-gianfar_mdio",
224 int k; 227 res.start&0xfffff, &res, 1);
225 struct device_node *child = NULL; 228 if (IS_ERR(mdio_dev))
226 struct gianfar_mdio_data mdio_data; 229 return PTR_ERR(mdio_dev);
227 230
228 memset(&res, 0, sizeof(res)); 231 for (k = 0; k < 32; k++)
229 memset(&mdio_data, 0, sizeof(mdio_data)); 232 mdio_data.irq[k] = PHY_POLL;
230 233
231 ret = of_address_to_resource(np, 0, &res); 234 while ((child = of_get_next_child(np, child)) != NULL) {
232 if (ret) 235 int irq = irq_of_parse_and_map(child, 0);
233 goto err; 236 if (irq != NO_IRQ) {
234 237 const u32 *id = of_get_property(child, "reg", NULL);
235 mdio_dev = 238 mdio_data.irq[*id] = irq;
236 platform_device_register_simple("fsl-gianfar_mdio",
237 res.start, &res, 1);
238 if (IS_ERR(mdio_dev)) {
239 ret = PTR_ERR(mdio_dev);
240 goto err;
241 } 239 }
240 }
242 241
243 for (k = 0; k < 32; k++) 242 ret = platform_device_add_data(mdio_dev, &mdio_data,
244 mdio_data.irq[k] = PHY_POLL; 243 sizeof(struct gianfar_mdio_data));
244 if (ret)
245 platform_device_unregister(mdio_dev);
245 246
246 while ((child = of_get_next_child(np, child)) != NULL) { 247 return ret;
247 int irq = irq_of_parse_and_map(child, 0); 248}
248 if (irq != NO_IRQ) {
249 const u32 *id = of_get_property(child,
250 "reg", NULL);
251 mdio_data.irq[*id] = irq;
252 }
253 }
254 249
255 ret = 250static int __init gfar_mdio_of_init(void)
256 platform_device_add_data(mdio_dev, &mdio_data, 251{
257 sizeof(struct gianfar_mdio_data)); 252 struct device_node *np = NULL;
258 if (ret)
259 goto unreg;
260 }
261 253
262 of_node_put(np); 254 for_each_compatible_node(np, NULL, "fsl,gianfar-mdio")
263 return 0; 255 gfar_mdio_of_init_one(np);
264 256
265unreg: 257 /* try the deprecated version */
266 platform_device_unregister(mdio_dev); 258 for_each_compatible_node(np, "mdio", "gianfar");
267err: 259 gfar_mdio_of_init_one(np);
268 of_node_put(np); 260
269 return ret; 261 return 0;
270} 262}
271 263
272arch_initcall(gfar_mdio_of_init); 264arch_initcall(gfar_mdio_of_init);
@@ -296,6 +288,9 @@ static int __init gfar_of_init(void)
296 const phandle *ph; 288 const phandle *ph;
297 int n_res = 2; 289 int n_res = 2;
298 290
291 if (!of_device_is_available(np))
292 continue;
293
299 memset(r, 0, sizeof(r)); 294 memset(r, 0, sizeof(r));
300 memset(&gfar_data, 0, sizeof(gfar_data)); 295 memset(&gfar_data, 0, sizeof(gfar_data));
301 296
@@ -357,6 +352,9 @@ static int __init gfar_of_init(void)
357 else 352 else
358 gfar_data.interface = PHY_INTERFACE_MODE_MII; 353 gfar_data.interface = PHY_INTERFACE_MODE_MII;
359 354
355 if (of_get_property(np, "fsl,magic-packet", NULL))
356 gfar_data.device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;
357
360 ph = of_get_property(np, "phy-handle", NULL); 358 ph = of_get_property(np, "phy-handle", NULL);
361 if (ph == NULL) { 359 if (ph == NULL) {
362 u32 *fixed_link; 360 u32 *fixed_link;
@@ -390,7 +388,7 @@ static int __init gfar_of_init(void)
390 388
391 gfar_data.phy_id = *id; 389 gfar_data.phy_id = *id;
392 snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%llx", 390 snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%llx",
393 (unsigned long long)res.start); 391 (unsigned long long)res.start&0xfffff);
394 392
395 of_node_put(phy); 393 of_node_put(phy);
396 of_node_put(mdio); 394 of_node_put(mdio);
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index 52c831fa1886..024299887352 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -10,6 +10,7 @@ extern u32 get_baudrate(void);
10extern u32 fsl_get_sys_freq(void); 10extern u32 fsl_get_sys_freq(void);
11 11
12struct spi_board_info; 12struct spi_board_info;
13struct device_node;
13 14
14extern int fsl_spi_init(struct spi_board_info *board_infos, 15extern int fsl_spi_init(struct spi_board_info *board_infos,
15 unsigned int num_board_infos, 16 unsigned int num_board_infos,
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index caba1c0be5a7..88a983ece5c9 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -22,6 +22,7 @@
22#include <linux/device.h> 22#include <linux/device.h>
23#include <linux/bootmem.h> 23#include <linux/bootmem.h>
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/fsl_devices.h>
25#include <asm/irq.h> 26#include <asm/irq.h>
26#include <asm/io.h> 27#include <asm/io.h>
27#include <asm/prom.h> 28#include <asm/prom.h>
@@ -889,8 +890,78 @@ unsigned int ipic_get_irq(void)
889 return irq_linear_revmap(primary_ipic->irqhost, irq); 890 return irq_linear_revmap(primary_ipic->irqhost, irq);
890} 891}
891 892
893#ifdef CONFIG_PM
894static struct {
895 u32 sicfr;
896 u32 siprr[2];
897 u32 simsr[2];
898 u32 sicnr;
899 u32 smprr[2];
900 u32 semsr;
901 u32 secnr;
902 u32 sermr;
903 u32 sercr;
904} ipic_saved_state;
905
906static int ipic_suspend(struct sys_device *sdev, pm_message_t state)
907{
908 struct ipic *ipic = primary_ipic;
909
910 ipic_saved_state.sicfr = ipic_read(ipic->regs, IPIC_SICFR);
911 ipic_saved_state.siprr[0] = ipic_read(ipic->regs, IPIC_SIPRR_A);
912 ipic_saved_state.siprr[1] = ipic_read(ipic->regs, IPIC_SIPRR_D);
913 ipic_saved_state.simsr[0] = ipic_read(ipic->regs, IPIC_SIMSR_H);
914 ipic_saved_state.simsr[1] = ipic_read(ipic->regs, IPIC_SIMSR_L);
915 ipic_saved_state.sicnr = ipic_read(ipic->regs, IPIC_SICNR);
916 ipic_saved_state.smprr[0] = ipic_read(ipic->regs, IPIC_SMPRR_A);
917 ipic_saved_state.smprr[1] = ipic_read(ipic->regs, IPIC_SMPRR_B);
918 ipic_saved_state.semsr = ipic_read(ipic->regs, IPIC_SEMSR);
919 ipic_saved_state.secnr = ipic_read(ipic->regs, IPIC_SECNR);
920 ipic_saved_state.sermr = ipic_read(ipic->regs, IPIC_SERMR);
921 ipic_saved_state.sercr = ipic_read(ipic->regs, IPIC_SERCR);
922
923 if (fsl_deep_sleep()) {
924 /* In deep sleep, make sure there can be no
925 * pending interrupts, as this can cause
926 * problems on 831x.
927 */
928 ipic_write(ipic->regs, IPIC_SIMSR_H, 0);
929 ipic_write(ipic->regs, IPIC_SIMSR_L, 0);
930 ipic_write(ipic->regs, IPIC_SEMSR, 0);
931 ipic_write(ipic->regs, IPIC_SERMR, 0);
932 }
933
934 return 0;
935}
936
937static int ipic_resume(struct sys_device *sdev)
938{
939 struct ipic *ipic = primary_ipic;
940
941 ipic_write(ipic->regs, IPIC_SICFR, ipic_saved_state.sicfr);
942 ipic_write(ipic->regs, IPIC_SIPRR_A, ipic_saved_state.siprr[0]);
943 ipic_write(ipic->regs, IPIC_SIPRR_D, ipic_saved_state.siprr[1]);
944 ipic_write(ipic->regs, IPIC_SIMSR_H, ipic_saved_state.simsr[0]);
945 ipic_write(ipic->regs, IPIC_SIMSR_L, ipic_saved_state.simsr[1]);
946 ipic_write(ipic->regs, IPIC_SICNR, ipic_saved_state.sicnr);
947 ipic_write(ipic->regs, IPIC_SMPRR_A, ipic_saved_state.smprr[0]);
948 ipic_write(ipic->regs, IPIC_SMPRR_B, ipic_saved_state.smprr[1]);
949 ipic_write(ipic->regs, IPIC_SEMSR, ipic_saved_state.semsr);
950 ipic_write(ipic->regs, IPIC_SECNR, ipic_saved_state.secnr);
951 ipic_write(ipic->regs, IPIC_SERMR, ipic_saved_state.sermr);
952 ipic_write(ipic->regs, IPIC_SERCR, ipic_saved_state.sercr);
953
954 return 0;
955}
956#else
957#define ipic_suspend NULL
958#define ipic_resume NULL
959#endif
960
892static struct sysdev_class ipic_sysclass = { 961static struct sysdev_class ipic_sysclass = {
893 .name = "ipic", 962 .name = "ipic",
963 .suspend = ipic_suspend,
964 .resume = ipic_resume,
894}; 965};
895 966
896static struct sys_device device_ipic = { 967static struct sys_device device_ipic = {
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 9e82d7e725a5..b3b73ae57d6d 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -64,7 +64,7 @@ static phys_addr_t qebase = -1;
64phys_addr_t get_qe_base(void) 64phys_addr_t get_qe_base(void)
65{ 65{
66 struct device_node *qe; 66 struct device_node *qe;
67 unsigned int size; 67 int size;
68 const u32 *prop; 68 const u32 *prop;
69 69
70 if (qebase != -1) 70 if (qebase != -1)
@@ -158,7 +158,7 @@ static unsigned int brg_clk = 0;
158unsigned int qe_get_brg_clk(void) 158unsigned int qe_get_brg_clk(void)
159{ 159{
160 struct device_node *qe; 160 struct device_node *qe;
161 unsigned int size; 161 int size;
162 const u32 *prop; 162 const u32 *prop;
163 163
164 if (brg_clk) 164 if (brg_clk)
@@ -305,7 +305,7 @@ EXPORT_SYMBOL(qe_put_snum);
305 305
306static int qe_sdma_init(void) 306static int qe_sdma_init(void)
307{ 307{
308 struct sdma *sdma = &qe_immr->sdma; 308 struct sdma __iomem *sdma = &qe_immr->sdma;
309 unsigned long sdma_buf_offset; 309 unsigned long sdma_buf_offset;
310 310
311 if (!sdma) 311 if (!sdma)
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c
index d3c7f5af9bc8..1d78071aad7d 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc.c
@@ -88,7 +88,7 @@ int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed)
88 return 0; 88 return 0;
89} 89}
90 90
91static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr, 91static void get_cmxucr_reg(unsigned int ucc_num, __be32 __iomem **cmxucr,
92 unsigned int *reg_num, unsigned int *shift) 92 unsigned int *reg_num, unsigned int *shift)
93{ 93{
94 unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3); 94 unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3);
@@ -100,7 +100,7 @@ static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr,
100 100
101int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) 101int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask)
102{ 102{
103 __be32 *cmxucr; 103 __be32 __iomem *cmxucr;
104 unsigned int reg_num; 104 unsigned int reg_num;
105 unsigned int shift; 105 unsigned int shift;
106 106
@@ -121,7 +121,7 @@ int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask)
121int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, 121int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock,
122 enum comm_dir mode) 122 enum comm_dir mode)
123{ 123{
124 __be32 *cmxucr; 124 __be32 __iomem *cmxucr;
125 unsigned int reg_num; 125 unsigned int reg_num;
126 unsigned int shift; 126 unsigned int shift;
127 u32 clock_bits = 0; 127 u32 clock_bits = 0;
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
index bcf88e6ce962..1aecb075a72e 100644
--- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c
+++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c
@@ -46,7 +46,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
46 printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n", 46 printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n",
47 &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); 47 &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm));
48 printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n", 48 printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n",
49 &uccf->uf_regs->uccs, uccf->uf_regs->uccs); 49 &uccf->uf_regs->uccs, in_8(&uccf->uf_regs->uccs));
50 printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n", 50 printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n",
51 &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); 51 &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb));
52 printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n", 52 printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n",
@@ -68,7 +68,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf)
68 printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n", 68 printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n",
69 &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); 69 &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry));
70 printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n", 70 printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n",
71 &uccf->uf_regs->guemr, uccf->uf_regs->guemr); 71 &uccf->uf_regs->guemr, in_8(&uccf->uf_regs->guemr));
72} 72}
73EXPORT_SYMBOL(ucc_fast_dump_regs); 73EXPORT_SYMBOL(ucc_fast_dump_regs);
74 74
@@ -96,7 +96,7 @@ EXPORT_SYMBOL(ucc_fast_transmit_on_demand);
96 96
97void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) 97void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode)
98{ 98{
99 struct ucc_fast *uf_regs; 99 struct ucc_fast __iomem *uf_regs;
100 u32 gumr; 100 u32 gumr;
101 101
102 uf_regs = uccf->uf_regs; 102 uf_regs = uccf->uf_regs;
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(ucc_fast_enable);
117 117
118void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) 118void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode)
119{ 119{
120 struct ucc_fast *uf_regs; 120 struct ucc_fast __iomem *uf_regs;
121 u32 gumr; 121 u32 gumr;
122 122
123 uf_regs = uccf->uf_regs; 123 uf_regs = uccf->uf_regs;
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(ucc_fast_disable);
139int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) 139int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret)
140{ 140{
141 struct ucc_fast_private *uccf; 141 struct ucc_fast_private *uccf;
142 struct ucc_fast *uf_regs; 142 struct ucc_fast __iomem *uf_regs;
143 u32 gumr; 143 u32 gumr;
144 int ret; 144 int ret;
145 145
@@ -216,10 +216,10 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc
216 uccf->stopped_tx = 0; 216 uccf->stopped_tx = 0;
217 uccf->stopped_rx = 0; 217 uccf->stopped_rx = 0;
218 uf_regs = uccf->uf_regs; 218 uf_regs = uccf->uf_regs;
219 uccf->p_ucce = (u32 *) & (uf_regs->ucce); 219 uccf->p_ucce = &uf_regs->ucce;
220 uccf->p_uccm = (u32 *) & (uf_regs->uccm); 220 uccf->p_uccm = &uf_regs->uccm;
221#ifdef CONFIG_UGETH_TX_ON_DEMAND 221#ifdef CONFIG_UGETH_TX_ON_DEMAND
222 uccf->p_utodr = (u16 *) & (uf_regs->utodr); 222 uccf->p_utodr = &uf_regs->utodr;
223#endif 223#endif
224#ifdef STATISTICS 224#ifdef STATISTICS
225 uccf->tx_frames = 0; 225 uccf->tx_frames = 0;
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 85defd01d293..9839767d0842 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -142,7 +142,7 @@ static void default_idle(void)
142void cpu_idle(void) 142void cpu_idle(void)
143{ 143{
144 for (;;) { 144 for (;;) {
145 tick_nohz_stop_sched_tick(); 145 tick_nohz_stop_sched_tick(1);
146 while (!need_resched()) 146 while (!need_resched())
147 default_idle(); 147 default_idle();
148 tick_nohz_restart_sched_tick(); 148 tick_nohz_restart_sched_tick();
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index b6781030cfbd..b795b3e24afd 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -864,7 +864,8 @@ int setup_profiling_timer(unsigned int multiplier)
864} 864}
865 865
866#ifdef CONFIG_HOTPLUG_CPU 866#ifdef CONFIG_HOTPLUG_CPU
867static ssize_t cpu_configure_show(struct sys_device *dev, char *buf) 867static ssize_t cpu_configure_show(struct sys_device *dev,
868 struct sysdev_attribute *attr, char *buf)
868{ 869{
869 ssize_t count; 870 ssize_t count;
870 871
@@ -874,8 +875,9 @@ static ssize_t cpu_configure_show(struct sys_device *dev, char *buf)
874 return count; 875 return count;
875} 876}
876 877
877static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, 878static ssize_t cpu_configure_store(struct sys_device *dev,
878 size_t count) 879 struct sysdev_attribute *attr,
880 const char *buf, size_t count)
879{ 881{
880 int cpu = dev->id; 882 int cpu = dev->id;
881 int val, rc; 883 int val, rc;
@@ -922,7 +924,8 @@ out:
922static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); 924static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store);
923#endif /* CONFIG_HOTPLUG_CPU */ 925#endif /* CONFIG_HOTPLUG_CPU */
924 926
925static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf) 927static ssize_t cpu_polarization_show(struct sys_device *dev,
928 struct sysdev_attribute *attr, char *buf)
926{ 929{
927 int cpu = dev->id; 930 int cpu = dev->id;
928 ssize_t count; 931 ssize_t count;
@@ -950,7 +953,8 @@ static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf)
950} 953}
951static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); 954static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL);
952 955
953static ssize_t show_cpu_address(struct sys_device *dev, char *buf) 956static ssize_t show_cpu_address(struct sys_device *dev,
957 struct sysdev_attribute *attr, char *buf)
954{ 958{
955 return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); 959 return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]);
956} 960}
@@ -970,7 +974,8 @@ static struct attribute_group cpu_common_attr_group = {
970 .attrs = cpu_common_attrs, 974 .attrs = cpu_common_attrs,
971}; 975};
972 976
973static ssize_t show_capability(struct sys_device *dev, char *buf) 977static ssize_t show_capability(struct sys_device *dev,
978 struct sysdev_attribute *attr, char *buf)
974{ 979{
975 unsigned int capability; 980 unsigned int capability;
976 int rc; 981 int rc;
@@ -982,7 +987,8 @@ static ssize_t show_capability(struct sys_device *dev, char *buf)
982} 987}
983static SYSDEV_ATTR(capability, 0444, show_capability, NULL); 988static SYSDEV_ATTR(capability, 0444, show_capability, NULL);
984 989
985static ssize_t show_idle_count(struct sys_device *dev, char *buf) 990static ssize_t show_idle_count(struct sys_device *dev,
991 struct sysdev_attribute *attr, char *buf)
986{ 992{
987 struct s390_idle_data *idle; 993 struct s390_idle_data *idle;
988 unsigned long long idle_count; 994 unsigned long long idle_count;
@@ -995,7 +1001,8 @@ static ssize_t show_idle_count(struct sys_device *dev, char *buf)
995} 1001}
996static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); 1002static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL);
997 1003
998static ssize_t show_idle_time(struct sys_device *dev, char *buf) 1004static ssize_t show_idle_time(struct sys_device *dev,
1005 struct sysdev_attribute *attr, char *buf)
999{ 1006{
1000 struct s390_idle_data *idle; 1007 struct s390_idle_data *idle;
1001 unsigned long long new_time; 1008 unsigned long long new_time;
@@ -1112,7 +1119,9 @@ out:
1112 return rc; 1119 return rc;
1113} 1120}
1114 1121
1115static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, 1122static ssize_t __ref rescan_store(struct sys_device *dev,
1123 struct sysdev_attribute *attr,
1124 const char *buf,
1116 size_t count) 1125 size_t count)
1117{ 1126{
1118 int rc; 1127 int rc;
@@ -1123,7 +1132,9 @@ static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf,
1123static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); 1132static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store);
1124#endif /* CONFIG_HOTPLUG_CPU */ 1133#endif /* CONFIG_HOTPLUG_CPU */
1125 1134
1126static ssize_t dispatching_show(struct sys_device *dev, char *buf) 1135static ssize_t dispatching_show(struct sys_device *dev,
1136 struct sysdev_attribute *attr,
1137 char *buf)
1127{ 1138{
1128 ssize_t count; 1139 ssize_t count;
1129 1140
@@ -1133,8 +1144,9 @@ static ssize_t dispatching_show(struct sys_device *dev, char *buf)
1133 return count; 1144 return count;
1134} 1145}
1135 1146
1136static ssize_t dispatching_store(struct sys_device *dev, const char *buf, 1147static ssize_t dispatching_store(struct sys_device *dev,
1137 size_t count) 1148 struct sysdev_attribute *attr,
1149 const char *buf, size_t count)
1138{ 1150{
1139 int val, rc; 1151 int val, rc;
1140 char delim; 1152 char delim;
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index f2cede3947b2..ab70d9bd9261 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -1100,7 +1100,9 @@ static inline struct etr_aib *etr_aib_from_dev(struct sys_device *dev)
1100 return etr_port1_online ? &etr_port1 : NULL; 1100 return etr_port1_online ? &etr_port1 : NULL;
1101} 1101}
1102 1102
1103static ssize_t etr_online_show(struct sys_device *dev, char *buf) 1103static ssize_t etr_online_show(struct sys_device *dev,
1104 struct sysdev_attribute *attr,
1105 char *buf)
1104{ 1106{
1105 unsigned int online; 1107 unsigned int online;
1106 1108
@@ -1109,7 +1111,8 @@ static ssize_t etr_online_show(struct sys_device *dev, char *buf)
1109} 1111}
1110 1112
1111static ssize_t etr_online_store(struct sys_device *dev, 1113static ssize_t etr_online_store(struct sys_device *dev,
1112 const char *buf, size_t count) 1114 struct sysdev_attribute *attr,
1115 const char *buf, size_t count)
1113{ 1116{
1114 unsigned int value; 1117 unsigned int value;
1115 1118
@@ -1136,7 +1139,9 @@ static ssize_t etr_online_store(struct sys_device *dev,
1136 1139
1137static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store); 1140static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store);
1138 1141
1139static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf) 1142static ssize_t etr_stepping_control_show(struct sys_device *dev,
1143 struct sysdev_attribute *attr,
1144 char *buf)
1140{ 1145{
1141 return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ? 1146 return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ?
1142 etr_eacr.e0 : etr_eacr.e1); 1147 etr_eacr.e0 : etr_eacr.e1);
@@ -1144,7 +1149,8 @@ static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf)
1144 1149
1145static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL); 1150static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL);
1146 1151
1147static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf) 1152static ssize_t etr_mode_code_show(struct sys_device *dev,
1153 struct sysdev_attribute *attr, char *buf)
1148{ 1154{
1149 if (!etr_port0_online && !etr_port1_online) 1155 if (!etr_port0_online && !etr_port1_online)
1150 /* Status word is not uptodate if both ports are offline. */ 1156 /* Status word is not uptodate if both ports are offline. */
@@ -1155,7 +1161,8 @@ static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf)
1155 1161
1156static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL); 1162static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL);
1157 1163
1158static ssize_t etr_untuned_show(struct sys_device *dev, char *buf) 1164static ssize_t etr_untuned_show(struct sys_device *dev,
1165 struct sysdev_attribute *attr, char *buf)
1159{ 1166{
1160 struct etr_aib *aib = etr_aib_from_dev(dev); 1167 struct etr_aib *aib = etr_aib_from_dev(dev);
1161 1168
@@ -1166,7 +1173,8 @@ static ssize_t etr_untuned_show(struct sys_device *dev, char *buf)
1166 1173
1167static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL); 1174static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL);
1168 1175
1169static ssize_t etr_network_id_show(struct sys_device *dev, char *buf) 1176static ssize_t etr_network_id_show(struct sys_device *dev,
1177 struct sysdev_attribute *attr, char *buf)
1170{ 1178{
1171 struct etr_aib *aib = etr_aib_from_dev(dev); 1179 struct etr_aib *aib = etr_aib_from_dev(dev);
1172 1180
@@ -1177,7 +1185,8 @@ static ssize_t etr_network_id_show(struct sys_device *dev, char *buf)
1177 1185
1178static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL); 1186static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL);
1179 1187
1180static ssize_t etr_id_show(struct sys_device *dev, char *buf) 1188static ssize_t etr_id_show(struct sys_device *dev,
1189 struct sysdev_attribute *attr, char *buf)
1181{ 1190{
1182 struct etr_aib *aib = etr_aib_from_dev(dev); 1191 struct etr_aib *aib = etr_aib_from_dev(dev);
1183 1192
@@ -1188,7 +1197,8 @@ static ssize_t etr_id_show(struct sys_device *dev, char *buf)
1188 1197
1189static SYSDEV_ATTR(id, 0400, etr_id_show, NULL); 1198static SYSDEV_ATTR(id, 0400, etr_id_show, NULL);
1190 1199
1191static ssize_t etr_port_number_show(struct sys_device *dev, char *buf) 1200static ssize_t etr_port_number_show(struct sys_device *dev,
1201 struct sysdev_attribute *attr, char *buf)
1192{ 1202{
1193 struct etr_aib *aib = etr_aib_from_dev(dev); 1203 struct etr_aib *aib = etr_aib_from_dev(dev);
1194 1204
@@ -1199,7 +1209,8 @@ static ssize_t etr_port_number_show(struct sys_device *dev, char *buf)
1199 1209
1200static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL); 1210static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL);
1201 1211
1202static ssize_t etr_coupled_show(struct sys_device *dev, char *buf) 1212static ssize_t etr_coupled_show(struct sys_device *dev,
1213 struct sysdev_attribute *attr, char *buf)
1203{ 1214{
1204 struct etr_aib *aib = etr_aib_from_dev(dev); 1215 struct etr_aib *aib = etr_aib_from_dev(dev);
1205 1216
@@ -1210,7 +1221,8 @@ static ssize_t etr_coupled_show(struct sys_device *dev, char *buf)
1210 1221
1211static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL); 1222static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL);
1212 1223
1213static ssize_t etr_local_time_show(struct sys_device *dev, char *buf) 1224static ssize_t etr_local_time_show(struct sys_device *dev,
1225 struct sysdev_attribute *attr, char *buf)
1214{ 1226{
1215 struct etr_aib *aib = etr_aib_from_dev(dev); 1227 struct etr_aib *aib = etr_aib_from_dev(dev);
1216 1228
@@ -1221,7 +1233,8 @@ static ssize_t etr_local_time_show(struct sys_device *dev, char *buf)
1221 1233
1222static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL); 1234static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL);
1223 1235
1224static ssize_t etr_utc_offset_show(struct sys_device *dev, char *buf) 1236static ssize_t etr_utc_offset_show(struct sys_device *dev,
1237 struct sysdev_attribute *attr, char *buf)
1225{ 1238{
1226 struct etr_aib *aib = etr_aib_from_dev(dev); 1239 struct etr_aib *aib = etr_aib_from_dev(dev);
1227 1240
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c
index f4b6124fdb75..f28c43d2f61d 100644
--- a/arch/s390/mm/hugetlbpage.c
+++ b/arch/s390/mm/hugetlbpage.c
@@ -72,7 +72,8 @@ void arch_release_hugepage(struct page *page)
72 page[1].index = 0; 72 page[1].index = 0;
73} 73}
74 74
75pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 75pte_t *huge_pte_alloc(struct mm_struct *mm,
76 unsigned long addr, unsigned long sz)
76{ 77{
77 pgd_t *pgdp; 78 pgd_t *pgdp;
78 pud_t *pudp; 79 pud_t *pudp;
@@ -119,6 +120,11 @@ int pmd_huge(pmd_t pmd)
119 return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE); 120 return !!(pmd_val(pmd) & _SEGMENT_ENTRY_LARGE);
120} 121}
121 122
123int pud_huge(pud_t pud)
124{
125 return 0;
126}
127
122struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, 128struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
123 pmd_t *pmdp, int write) 129 pmd_t *pmdp, int write)
124{ 130{
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 3e7384f4619c..8879938f3356 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -8,6 +8,7 @@ mainmenu "Linux/SuperH Kernel Configuration"
8config SUPERH 8config SUPERH
9 def_bool y 9 def_bool y
10 select EMBEDDED 10 select EMBEDDED
11 select HAVE_CLK
11 select HAVE_IDE 12 select HAVE_IDE
12 select HAVE_OPROFILE 13 select HAVE_OPROFILE
13 help 14 help
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c
index 01af44245b57..963c99322095 100644
--- a/arch/sh/boards/renesas/migor/setup.c
+++ b/arch/sh/boards/renesas/migor/setup.c
@@ -30,7 +30,6 @@
30 30
31static struct smc91x_platdata smc91x_info = { 31static struct smc91x_platdata smc91x_info = {
32 .flags = SMC91X_USE_16BIT, 32 .flags = SMC91X_USE_16BIT,
33 .irq_flags = IRQF_TRIGGER_HIGH,
34}; 33};
35 34
36static struct resource smc91x_eth_resources[] = { 35static struct resource smc91x_eth_resources[] = {
@@ -42,7 +41,7 @@ static struct resource smc91x_eth_resources[] = {
42 }, 41 },
43 [1] = { 42 [1] = {
44 .start = 32, /* IRQ0 */ 43 .start = 32, /* IRQ0 */
45 .flags = IORESOURCE_IRQ, 44 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
46 }, 45 },
47}; 46};
48 47
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c
index 51b57c0d1a3c..347ee11351ec 100644
--- a/arch/sh/drivers/dma/dma-sysfs.c
+++ b/arch/sh/drivers/dma/dma-sysfs.c
@@ -23,7 +23,8 @@ static struct sysdev_class dma_sysclass = {
23}; 23};
24EXPORT_SYMBOL(dma_sysclass); 24EXPORT_SYMBOL(dma_sysclass);
25 25
26static ssize_t dma_show_devices(struct sys_device *dev, char *buf) 26static ssize_t dma_show_devices(struct sys_device *dev,
27 struct sysdev_attribute *attr, char *buf)
27{ 28{
28 ssize_t len = 0; 29 ssize_t len = 0;
29 int i; 30 int i;
@@ -57,13 +58,15 @@ static int __init dma_sysclass_init(void)
57} 58}
58postcore_initcall(dma_sysclass_init); 59postcore_initcall(dma_sysclass_init);
59 60
60static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf) 61static ssize_t dma_show_dev_id(struct sys_device *dev,
62 struct sysdev_attribute *attr, char *buf)
61{ 63{
62 struct dma_channel *channel = to_dma_channel(dev); 64 struct dma_channel *channel = to_dma_channel(dev);
63 return sprintf(buf, "%s\n", channel->dev_id); 65 return sprintf(buf, "%s\n", channel->dev_id);
64} 66}
65 67
66static ssize_t dma_store_dev_id(struct sys_device *dev, 68static ssize_t dma_store_dev_id(struct sys_device *dev,
69 struct sysdev_attribute *attr,
67 const char *buf, size_t count) 70 const char *buf, size_t count)
68{ 71{
69 struct dma_channel *channel = to_dma_channel(dev); 72 struct dma_channel *channel = to_dma_channel(dev);
@@ -74,6 +77,7 @@ static ssize_t dma_store_dev_id(struct sys_device *dev,
74static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id); 77static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id);
75 78
76static ssize_t dma_store_config(struct sys_device *dev, 79static ssize_t dma_store_config(struct sys_device *dev,
80 struct sysdev_attribute *attr,
77 const char *buf, size_t count) 81 const char *buf, size_t count)
78{ 82{
79 struct dma_channel *channel = to_dma_channel(dev); 83 struct dma_channel *channel = to_dma_channel(dev);
@@ -87,13 +91,15 @@ static ssize_t dma_store_config(struct sys_device *dev,
87 91
88static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config); 92static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config);
89 93
90static ssize_t dma_show_mode(struct sys_device *dev, char *buf) 94static ssize_t dma_show_mode(struct sys_device *dev,
95 struct sysdev_attribute *attr, char *buf)
91{ 96{
92 struct dma_channel *channel = to_dma_channel(dev); 97 struct dma_channel *channel = to_dma_channel(dev);
93 return sprintf(buf, "0x%08x\n", channel->mode); 98 return sprintf(buf, "0x%08x\n", channel->mode);
94} 99}
95 100
96static ssize_t dma_store_mode(struct sys_device *dev, 101static ssize_t dma_store_mode(struct sys_device *dev,
102 struct sysdev_attribute *attr,
97 const char *buf, size_t count) 103 const char *buf, size_t count)
98{ 104{
99 struct dma_channel *channel = to_dma_channel(dev); 105 struct dma_channel *channel = to_dma_channel(dev);
@@ -104,7 +110,8 @@ static ssize_t dma_store_mode(struct sys_device *dev,
104static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode); 110static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode);
105 111
106#define dma_ro_attr(field, fmt) \ 112#define dma_ro_attr(field, fmt) \
107static ssize_t dma_show_##field(struct sys_device *dev, char *buf) \ 113static ssize_t dma_show_##field(struct sys_device *dev, \
114 struct sysdev_attribute *attr, char *buf)\
108{ \ 115{ \
109 struct dma_channel *channel = to_dma_channel(dev); \ 116 struct dma_channel *channel = to_dma_channel(dev); \
110 return sprintf(buf, fmt, channel->field); \ 117 return sprintf(buf, fmt, channel->field); \
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index b98e37a1f54c..921892c351da 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -86,7 +86,7 @@ void cpu_idle(void)
86 if (!idle) 86 if (!idle)
87 idle = default_idle; 87 idle = default_idle;
88 88
89 tick_nohz_stop_sched_tick(); 89 tick_nohz_stop_sched_tick(1);
90 while (!need_resched()) 90 while (!need_resched())
91 idle(); 91 idle();
92 tick_nohz_restart_sched_tick(); 92 tick_nohz_restart_sched_tick();
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 1b2ae35c4a76..54d1f61aa007 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -12,6 +12,7 @@
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/stacktrace.h> 13#include <linux/stacktrace.h>
14#include <linux/thread_info.h> 14#include <linux/thread_info.h>
15#include <linux/module.h>
15#include <asm/ptrace.h> 16#include <asm/ptrace.h>
16 17
17/* 18/*
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c
index 125e493ead82..f0aa5c398656 100644
--- a/arch/sh/kernel/sys_sh32.c
+++ b/arch/sh/kernel/sys_sh32.c
@@ -29,7 +29,7 @@ asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
29 int fd[2]; 29 int fd[2];
30 int error; 30 int error;
31 31
32 error = do_pipe(fd); 32 error = do_pipe_flags(fd, 0);
33 if (!error) { 33 if (!error) {
34 regs->regs[1] = fd[1]; 34 regs->regs[1] = fd[1];
35 return fd[0]; 35 return fd[0];
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c
index ae8c321d6e2a..9304117039c4 100644
--- a/arch/sh/mm/hugetlbpage.c
+++ b/arch/sh/mm/hugetlbpage.c
@@ -22,7 +22,8 @@
22#include <asm/tlbflush.h> 22#include <asm/tlbflush.h>
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24 24
25pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 25pte_t *huge_pte_alloc(struct mm_struct *mm,
26 unsigned long addr, unsigned long sz)
26{ 27{
27 pgd_t *pgd; 28 pgd_t *pgd;
28 pud_t *pud; 29 pud_t *pud;
@@ -78,6 +79,11 @@ int pmd_huge(pmd_t pmd)
78 return 0; 79 return 0;
79} 80}
80 81
82int pud_huge(pud_t pud)
83{
84 return 0;
85}
86
81struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, 87struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
82 pmd_t *pmd, int write) 88 pmd_t *pmd, int write)
83{ 89{
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index d7df26bd1e54..d652d375eb1e 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -191,7 +191,7 @@ void __init paging_init(void)
191 pg_data_t *pgdat = NODE_DATA(nid); 191 pg_data_t *pgdat = NODE_DATA(nid);
192 unsigned long low, start_pfn; 192 unsigned long low, start_pfn;
193 193
194 start_pfn = pgdat->bdata->node_boot_start >> PAGE_SHIFT; 194 start_pfn = pgdat->bdata->node_min_pfn;
195 low = pgdat->bdata->node_low_pfn; 195 low = pgdat->bdata->node_low_pfn;
196 196
197 if (max_zone_pfns[ZONE_NORMAL] < low) 197 if (max_zone_pfns[ZONE_NORMAL] < low)
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
index 1663199ce888..095d93bec7cd 100644
--- a/arch/sh/mm/numa.c
+++ b/arch/sh/mm/numa.c
@@ -14,7 +14,6 @@
14#include <linux/pfn.h> 14#include <linux/pfn.h>
15#include <asm/sections.h> 15#include <asm/sections.h>
16 16
17static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
18struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 17struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
19EXPORT_SYMBOL_GPL(node_data); 18EXPORT_SYMBOL_GPL(node_data);
20 19
@@ -35,7 +34,7 @@ void __init setup_memory(void)
35 NODE_DATA(0) = pfn_to_kaddr(free_pfn); 34 NODE_DATA(0) = pfn_to_kaddr(free_pfn);
36 memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); 35 memset(NODE_DATA(0), 0, sizeof(struct pglist_data));
37 free_pfn += PFN_UP(sizeof(struct pglist_data)); 36 free_pfn += PFN_UP(sizeof(struct pglist_data));
38 NODE_DATA(0)->bdata = &plat_node_bdata[0]; 37 NODE_DATA(0)->bdata = &bootmem_node_data[0];
39 38
40 /* Set up node 0 */ 39 /* Set up node 0 */
41 setup_bootmem_allocator(free_pfn); 40 setup_bootmem_allocator(free_pfn);
@@ -66,7 +65,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
66 free_pfn += PFN_UP(sizeof(struct pglist_data)); 65 free_pfn += PFN_UP(sizeof(struct pglist_data));
67 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 66 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
68 67
69 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 68 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
70 NODE_DATA(nid)->node_start_pfn = start_pfn; 69 NODE_DATA(nid)->node_start_pfn = start_pfn;
71 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn; 70 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
72 71
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index fef28e267a52..6668e6037af6 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -18,6 +18,7 @@ CHECKFLAGS += -D__sparc__
18#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 18#KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
19KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 19KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
20KBUILD_AFLAGS += -m32 20KBUILD_AFLAGS += -m32
21CPPFLAGS_vmlinux.lds += -m32
21 22
22#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 23#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
23# Since 2.5.40, the first stage is left not btfix-ed. 24# Since 2.5.40, the first stage is left not btfix-ed.
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index 3c6b49a53ae8..4d73421559c3 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -97,7 +97,7 @@ asmlinkage int sparc_pipe(struct pt_regs *regs)
97 int fd[2]; 97 int fd[2];
98 int error; 98 int error;
99 99
100 error = do_pipe(fd); 100 error = do_pipe_flags(fd, 0);
101 if (error) 101 if (error)
102 goto out; 102 goto out;
103 regs->u_regs[UREG_I1] = fd[1]; 103 regs->u_regs[UREG_I1] = fd[1];
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index c624e04ff03e..ee30462598fc 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -1352,8 +1352,7 @@ void __init srmmu_paging_init(void)
1352 zones_size[ZONE_HIGHMEM] = npages; 1352 zones_size[ZONE_HIGHMEM] = npages;
1353 zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); 1353 zholes_size[ZONE_HIGHMEM] = npages - calc_highpages();
1354 1354
1355 free_area_init_node(0, &contig_page_data, zones_size, 1355 free_area_init_node(0, zones_size, pfn_base, zholes_size);
1356 pfn_base, zholes_size);
1357 } 1356 }
1358} 1357}
1359 1358
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 2375fe9dc312..d1782f6368be 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -2123,8 +2123,7 @@ void __init sun4c_paging_init(void)
2123 zones_size[ZONE_HIGHMEM] = npages; 2123 zones_size[ZONE_HIGHMEM] = npages;
2124 zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); 2124 zholes_size[ZONE_HIGHMEM] = npages - calc_highpages();
2125 2125
2126 free_area_init_node(0, &contig_page_data, zones_size, 2126 free_area_init_node(0, zones_size, pfn_base, zholes_size);
2127 pfn_base, zholes_size);
2128 } 2127 }
2129 2128
2130 cnt = 0; 2129 cnt = 0;
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index c49d0388b793..4d58d7ce708d 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -401,7 +401,7 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de
401 dev->ofdev.node = dp; 401 dev->ofdev.node = dp;
402 dev->ofdev.dev.parent = &dev->bus->ofdev.dev; 402 dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
403 dev->ofdev.dev.bus = &ebus_bus_type; 403 dev->ofdev.dev.bus = &ebus_bus_type;
404 sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); 404 dev_set_name(&dev->ofdev.dev, "ebus[%08x]", dp->node);
405 405
406 /* Register with core */ 406 /* Register with core */
407 if (of_device_register(&dev->ofdev) != 0) 407 if (of_device_register(&dev->ofdev) != 0)
@@ -501,7 +501,7 @@ void __init ebus_init(void)
501 ebus->ofdev.node = dp; 501 ebus->ofdev.node = dp;
502 ebus->ofdev.dev.parent = &pdev->dev; 502 ebus->ofdev.dev.parent = &pdev->dev;
503 ebus->ofdev.dev.bus = &ebus_bus_type; 503 ebus->ofdev.dev.bus = &ebus_bus_type;
504 sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); 504 dev_set_name(&ebus->ofdev.dev, "ebus%d", num_ebus);
505 505
506 /* Register with core */ 506 /* Register with core */
507 if (of_device_register(&ebus->ofdev) != 0) 507 if (of_device_register(&ebus->ofdev) != 0)
diff --git a/arch/sparc64/kernel/iommu_common.h b/arch/sparc64/kernel/iommu_common.h
index f3575a614fa2..53b19c8231a9 100644
--- a/arch/sparc64/kernel/iommu_common.h
+++ b/arch/sparc64/kernel/iommu_common.h
@@ -23,7 +23,7 @@
23#define IO_PAGE_SHIFT 13 23#define IO_PAGE_SHIFT 13
24#define IO_PAGE_SIZE (1UL << IO_PAGE_SHIFT) 24#define IO_PAGE_SIZE (1UL << IO_PAGE_SHIFT)
25#define IO_PAGE_MASK (~(IO_PAGE_SIZE-1)) 25#define IO_PAGE_MASK (~(IO_PAGE_SIZE-1))
26#define IO_PAGE_ALIGN(addr) (((addr)+IO_PAGE_SIZE-1)&IO_PAGE_MASK) 26#define IO_PAGE_ALIGN(addr) ALIGN(addr, IO_PAGE_SIZE)
27 27
28#define IO_TSB_ENTRIES (128*1024) 28#define IO_TSB_ENTRIES (128*1024)
29#define IO_TSB_SIZE (IO_TSB_ENTRIES * 8) 29#define IO_TSB_SIZE (IO_TSB_ENTRIES * 8)
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index b441a26b73b0..c481673d249c 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -621,8 +621,9 @@ unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino)
621unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) 621unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
622{ 622{
623 struct irq_handler_data *data; 623 struct irq_handler_data *data;
624 struct ino_bucket *bucket;
625 unsigned long hv_err, cookie; 624 unsigned long hv_err, cookie;
625 struct ino_bucket *bucket;
626 struct irq_desc *desc;
626 unsigned int virt_irq; 627 unsigned int virt_irq;
627 628
628 bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); 629 bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC);
@@ -643,6 +644,13 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino)
643 if (unlikely(!data)) 644 if (unlikely(!data))
644 return 0; 645 return 0;
645 646
647 /* In order to make the LDC channel startup sequence easier,
648 * especially wrt. locking, we do not let request_irq() enable
649 * the interrupt.
650 */
651 desc = irq_desc + virt_irq;
652 desc->status |= IRQ_NOAUTOEN;
653
646 set_irq_chip_data(virt_irq, data); 654 set_irq_chip_data(virt_irq, data);
647 655
648 /* Catch accidental accesses to these things. IMAP/ICLR handling 656 /* Catch accidental accesses to these things. IMAP/ICLR handling
diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c
index 63969f610284..d68982330f66 100644
--- a/arch/sparc64/kernel/ldc.c
+++ b/arch/sparc64/kernel/ldc.c
@@ -1,6 +1,6 @@
1/* ldc.c: Logical Domain Channel link-layer protocol driver. 1/* ldc.c: Logical Domain Channel link-layer protocol driver.
2 * 2 *
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/kernel.h> 6#include <linux/kernel.h>
@@ -23,8 +23,8 @@
23 23
24#define DRV_MODULE_NAME "ldc" 24#define DRV_MODULE_NAME "ldc"
25#define PFX DRV_MODULE_NAME ": " 25#define PFX DRV_MODULE_NAME ": "
26#define DRV_MODULE_VERSION "1.0" 26#define DRV_MODULE_VERSION "1.1"
27#define DRV_MODULE_RELDATE "June 25, 2007" 27#define DRV_MODULE_RELDATE "July 22, 2008"
28 28
29static char version[] __devinitdata = 29static char version[] __devinitdata =
30 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 30 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
@@ -1235,13 +1235,9 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
1235 unsigned long hv_err, flags; 1235 unsigned long hv_err, flags;
1236 int err = -EINVAL; 1236 int err = -EINVAL;
1237 1237
1238 spin_lock_irqsave(&lp->lock, flags); 1238 if (!name ||
1239 1239 (lp->state != LDC_STATE_INIT))
1240 if (!name) 1240 return -EINVAL;
1241 goto out_err;
1242
1243 if (lp->state != LDC_STATE_INIT)
1244 goto out_err;
1245 1241
1246 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name); 1242 snprintf(lp->rx_irq_name, LDC_IRQ_NAME_MAX, "%s RX", name);
1247 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name); 1243 snprintf(lp->tx_irq_name, LDC_IRQ_NAME_MAX, "%s TX", name);
@@ -1250,25 +1246,32 @@ int ldc_bind(struct ldc_channel *lp, const char *name)
1250 IRQF_SAMPLE_RANDOM | IRQF_SHARED, 1246 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1251 lp->rx_irq_name, lp); 1247 lp->rx_irq_name, lp);
1252 if (err) 1248 if (err)
1253 goto out_err; 1249 return err;
1254 1250
1255 err = request_irq(lp->cfg.tx_irq, ldc_tx, 1251 err = request_irq(lp->cfg.tx_irq, ldc_tx,
1256 IRQF_SAMPLE_RANDOM | IRQF_SHARED, 1252 IRQF_SAMPLE_RANDOM | IRQF_SHARED,
1257 lp->tx_irq_name, lp); 1253 lp->tx_irq_name, lp);
1258 if (err) 1254 if (err) {
1259 goto out_free_rx_irq; 1255 free_irq(lp->cfg.rx_irq, lp);
1256 return err;
1257 }
1258
1260 1259
1260 spin_lock_irqsave(&lp->lock, flags);
1261
1262 enable_irq(lp->cfg.rx_irq);
1263 enable_irq(lp->cfg.tx_irq);
1261 1264
1262 lp->flags |= LDC_FLAG_REGISTERED_IRQS; 1265 lp->flags |= LDC_FLAG_REGISTERED_IRQS;
1263 1266
1264 err = -ENODEV; 1267 err = -ENODEV;
1265 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0); 1268 hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0);
1266 if (hv_err) 1269 if (hv_err)
1267 goto out_free_tx_irq; 1270 goto out_free_irqs;
1268 1271
1269 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries); 1272 hv_err = sun4v_ldc_tx_qconf(lp->id, lp->tx_ra, lp->tx_num_entries);
1270 if (hv_err) 1273 if (hv_err)
1271 goto out_free_tx_irq; 1274 goto out_free_irqs;
1272 1275
1273 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0); 1276 hv_err = sun4v_ldc_rx_qconf(lp->id, 0, 0);
1274 if (hv_err) 1277 if (hv_err)
@@ -1304,14 +1307,11 @@ out_unmap_rx:
1304out_unmap_tx: 1307out_unmap_tx:
1305 sun4v_ldc_tx_qconf(lp->id, 0, 0); 1308 sun4v_ldc_tx_qconf(lp->id, 0, 0);
1306 1309
1307out_free_tx_irq: 1310out_free_irqs:
1308 lp->flags &= ~LDC_FLAG_REGISTERED_IRQS; 1311 lp->flags &= ~LDC_FLAG_REGISTERED_IRQS;
1309 free_irq(lp->cfg.tx_irq, lp); 1312 free_irq(lp->cfg.tx_irq, lp);
1310
1311out_free_rx_irq:
1312 free_irq(lp->cfg.rx_irq, lp); 1313 free_irq(lp->cfg.rx_irq, lp);
1313 1314
1314out_err:
1315 spin_unlock_irqrestore(&lp->lock, flags); 1315 spin_unlock_irqrestore(&lp->lock, flags);
1316 1316
1317 return err; 1317 return err;
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index d569f60c24b8..4fd48ab7dda4 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -797,9 +797,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
797 op->dev.parent = parent; 797 op->dev.parent = parent;
798 op->dev.bus = &of_platform_bus_type; 798 op->dev.bus = &of_platform_bus_type;
799 if (!parent) 799 if (!parent)
800 strcpy(op->dev.bus_id, "root"); 800 dev_set_name(&op->dev, "root");
801 else 801 else
802 sprintf(op->dev.bus_id, "%08x", dp->node); 802 dev_set_name(&op->dev, "%08x", dp->node);
803 803
804 if (of_device_register(op)) { 804 if (of_device_register(op)) {
805 printk("%s: Could not register of device.\n", 805 printk("%s: Could not register of device.\n",
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index d00a3656c287..55096195458f 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
408 dev->class = class >> 8; 408 dev->class = class >> 8;
409 dev->revision = class & 0xff; 409 dev->revision = class & 0xff;
410 410
411 sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus), 411 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus),
412 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); 412 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn));
413 413
414 if (ofpci_verbose) 414 if (ofpci_verbose)
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index c1f1ff29e979..8a9cd3e165b9 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -96,7 +96,7 @@ void cpu_idle(void)
96 set_thread_flag(TIF_POLLING_NRFLAG); 96 set_thread_flag(TIF_POLLING_NRFLAG);
97 97
98 while(1) { 98 while(1) {
99 tick_nohz_stop_sched_tick(); 99 tick_nohz_stop_sched_tick(1);
100 100
101 while (!need_resched() && !cpu_is_offline(cpu)) 101 while (!need_resched() && !cpu_is_offline(cpu))
102 sparc64_yield(cpu); 102 sparc64_yield(cpu);
@@ -683,9 +683,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
683 ((unsigned long) child_sf) - STACK_BIAS; 683 ((unsigned long) child_sf) - STACK_BIAS;
684 684
685 /* Special case, if we are spawning a kernel thread from 685 /* Special case, if we are spawning a kernel thread from
686 * a userspace task (via KMOD, NFS, or similar) we must 686 * a userspace task (usermode helper, NFS or similar), we
687 * disable performance counters in the child because the 687 * must disable performance counters in the child because
688 * address space and protection realm are changing. 688 * the address space and protection realm are changing.
689 */ 689 */
690 if (t->flags & _TIF_PERFCTR) { 690 if (t->flags & _TIF_PERFCTR) {
691 t->user_cntd0 = t->user_cntd1 = NULL; 691 t->user_cntd0 = t->user_cntd1 = NULL;
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index e1f4eba2e576..39749e32dc7e 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -418,7 +418,7 @@ asmlinkage long sparc_pipe(struct pt_regs *regs)
418 int fd[2]; 418 int fd[2];
419 int error; 419 int error;
420 420
421 error = do_pipe(fd); 421 error = do_pipe_flags(fd, 0);
422 if (error) 422 if (error)
423 goto out; 423 goto out;
424 regs->u_regs[UREG_I1] = fd[1]; 424 regs->u_regs[UREG_I1] = fd[1];
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c
index e885034a6b73..84e5ce146713 100644
--- a/arch/sparc64/kernel/sysfs.c
+++ b/arch/sparc64/kernel/sysfs.c
@@ -14,7 +14,8 @@
14static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); 14static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64)));
15 15
16#define SHOW_MMUSTAT_ULONG(NAME) \ 16#define SHOW_MMUSTAT_ULONG(NAME) \
17static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 17static ssize_t show_##NAME(struct sys_device *dev, \
18 struct sysdev_attribute *attr, char *buf) \
18{ \ 19{ \
19 struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ 20 struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \
20 return sprintf(buf, "%lu\n", p->NAME); \ 21 return sprintf(buf, "%lu\n", p->NAME); \
@@ -135,13 +136,16 @@ static unsigned long write_mmustat_enable(unsigned long val)
135 return sun4v_mmustat_conf(ra, &orig_ra); 136 return sun4v_mmustat_conf(ra, &orig_ra);
136} 137}
137 138
138static ssize_t show_mmustat_enable(struct sys_device *s, char *buf) 139static ssize_t show_mmustat_enable(struct sys_device *s,
140 struct sysdev_attribute *attr, char *buf)
139{ 141{
140 unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); 142 unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0);
141 return sprintf(buf, "%lx\n", val); 143 return sprintf(buf, "%lx\n", val);
142} 144}
143 145
144static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count) 146static ssize_t store_mmustat_enable(struct sys_device *s,
147 struct sysdev_attribute *attr, const char *buf,
148 size_t count)
145{ 149{
146 unsigned long val, err; 150 unsigned long val, err;
147 int ret = sscanf(buf, "%ld", &val); 151 int ret = sscanf(buf, "%ld", &val);
@@ -179,14 +183,16 @@ static void unregister_mmu_stats(struct sys_device *s)
179#endif 183#endif
180 184
181#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ 185#define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \
182static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 186static ssize_t show_##NAME(struct sys_device *dev, \
187 struct sysdev_attribute *attr, char *buf) \
183{ \ 188{ \
184 cpuinfo_sparc *c = &cpu_data(dev->id); \ 189 cpuinfo_sparc *c = &cpu_data(dev->id); \
185 return sprintf(buf, "%lu\n", c->MEMBER); \ 190 return sprintf(buf, "%lu\n", c->MEMBER); \
186} 191}
187 192
188#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ 193#define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \
189static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ 194static ssize_t show_##NAME(struct sys_device *dev, \
195 struct sysdev_attribute *attr, char *buf) \
190{ \ 196{ \
191 cpuinfo_sparc *c = &cpu_data(dev->id); \ 197 cpuinfo_sparc *c = &cpu_data(dev->id); \
192 return sprintf(buf, "%u\n", c->MEMBER); \ 198 return sprintf(buf, "%u\n", c->MEMBER); \
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index bedc4c159b1c..a0c6a97eec6e 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -884,6 +884,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = {
884 .notifier_call = sparc64_cpufreq_notifier 884 .notifier_call = sparc64_cpufreq_notifier
885}; 885};
886 886
887static int __init register_sparc64_cpufreq_notifier(void)
888{
889
890 cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
891 CPUFREQ_TRANSITION_NOTIFIER);
892 return 0;
893}
894
895core_initcall(register_sparc64_cpufreq_notifier);
896
887#endif /* CONFIG_CPU_FREQ */ 897#endif /* CONFIG_CPU_FREQ */
888 898
889static int sparc64_next_event(unsigned long delta, 899static int sparc64_next_event(unsigned long delta,
@@ -1050,11 +1060,6 @@ void __init time_init(void)
1050 sparc64_clockevent.mult, sparc64_clockevent.shift); 1060 sparc64_clockevent.mult, sparc64_clockevent.shift);
1051 1061
1052 setup_sparc64_timer(); 1062 setup_sparc64_timer();
1053
1054#ifdef CONFIG_CPU_FREQ
1055 cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
1056 CPUFREQ_TRANSITION_NOTIFIER);
1057#endif
1058} 1063}
1059 1064
1060unsigned long long sched_clock(void) 1065unsigned long long sched_clock(void)
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 0aa819c29dbc..bd30ecba5630 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -36,9 +36,6 @@
36#include <asm/processor.h> 36#include <asm/processor.h>
37#include <asm/timer.h> 37#include <asm/timer.h>
38#include <asm/head.h> 38#include <asm/head.h>
39#ifdef CONFIG_KMOD
40#include <linux/kmod.h>
41#endif
42#include <asm/prom.h> 39#include <asm/prom.h>
43 40
44#include "entry.h" 41#include "entry.h"
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index e78b3517940b..a490077891a4 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -224,7 +224,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
224 if (!strcmp(type, "domain-services-port")) 224 if (!strcmp(type, "domain-services-port"))
225 bus_id_name = "ds"; 225 bus_id_name = "ds";
226 226
227 if (strlen(bus_id_name) >= KOBJ_NAME_LEN - 4) { 227 if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) {
228 printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", 228 printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n",
229 bus_id_name); 229 bus_id_name);
230 return NULL; 230 return NULL;
@@ -260,16 +260,14 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
260 vio_fill_channel_info(hp, mp, vdev); 260 vio_fill_channel_info(hp, mp, vdev);
261 261
262 if (!id) { 262 if (!id) {
263 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s", 263 dev_set_name(&vdev->dev, "%s", bus_id_name);
264 bus_id_name);
265 vdev->dev_no = ~(u64)0; 264 vdev->dev_no = ~(u64)0;
266 } else if (!cfg_handle) { 265 } else if (!cfg_handle) {
267 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu", 266 dev_set_name(&vdev->dev, "%s-%lu", bus_id_name, *id);
268 bus_id_name, *id);
269 vdev->dev_no = *id; 267 vdev->dev_no = *id;
270 } else { 268 } else {
271 snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu-%lu", 269 dev_set_name(&vdev->dev, "%s-%lu-%lu", bus_id_name,
272 bus_id_name, *cfg_handle, *id); 270 *cfg_handle, *id);
273 vdev->dev_no = *cfg_handle; 271 vdev->dev_no = *cfg_handle;
274 } 272 }
275 273
@@ -292,12 +290,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp,
292 } 290 }
293 vdev->dp = dp; 291 vdev->dp = dp;
294 292
295 printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id); 293 printk(KERN_INFO "VIO: Adding device %s\n", dev_name(&vdev->dev));
296 294
297 err = device_register(&vdev->dev); 295 err = device_register(&vdev->dev);
298 if (err) { 296 if (err) {
299 printk(KERN_ERR "VIO: Could not register device %s, err=%d\n", 297 printk(KERN_ERR "VIO: Could not register device %s, err=%d\n",
300 vdev->dev.bus_id, err); 298 dev_name(&vdev->dev), err);
301 kfree(vdev); 299 kfree(vdev);
302 return NULL; 300 return NULL;
303 } 301 }
@@ -330,7 +328,7 @@ static void vio_remove(struct mdesc_handle *hp, u64 node)
330 dev = device_find_child(&root_vdev->dev, (void *) node, 328 dev = device_find_child(&root_vdev->dev, (void *) node,
331 vio_md_node_match); 329 vio_md_node_match);
332 if (dev) { 330 if (dev) {
333 printk(KERN_INFO "VIO: Removing device %s\n", dev->bus_id); 331 printk(KERN_INFO "VIO: Removing device %s\n", dev_name(dev));
334 332
335 device_unregister(dev); 333 device_unregister(dev);
336 } 334 }
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index ebefd2a14375..f27d10369e0c 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -175,7 +175,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
175 return -ENOMEM; 175 return -ENOMEM;
176 176
177 if (flags & MAP_FIXED) { 177 if (flags & MAP_FIXED) {
178 if (prepare_hugepage_range(addr, len)) 178 if (prepare_hugepage_range(file, addr, len))
179 return -EINVAL; 179 return -EINVAL;
180 return addr; 180 return addr;
181 } 181 }
@@ -195,7 +195,8 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
195 pgoff, flags); 195 pgoff, flags);
196} 196}
197 197
198pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 198pte_t *huge_pte_alloc(struct mm_struct *mm,
199 unsigned long addr, unsigned long sz)
199{ 200{
200 pgd_t *pgd; 201 pgd_t *pgd;
201 pud_t *pud; 202 pud_t *pud;
@@ -294,6 +295,11 @@ int pmd_huge(pmd_t pmd)
294 return 0; 295 return 0;
295} 296}
296 297
298int pud_huge(pud_t pud)
299{
300 return 0;
301}
302
297struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, 303struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
298 pmd_t *pmd, int write) 304 pmd_t *pmd, int write)
299{ 305{
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 84898c44dd4d..713297473951 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -788,7 +788,6 @@ int numa_cpu_lookup_table[NR_CPUS];
788cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; 788cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES];
789 789
790#ifdef CONFIG_NEED_MULTIPLE_NODES 790#ifdef CONFIG_NEED_MULTIPLE_NODES
791static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
792 791
793struct mdesc_mblock { 792struct mdesc_mblock {
794 u64 base; 793 u64 base;
@@ -871,7 +870,7 @@ static void __init allocate_node_data(int nid)
871 NODE_DATA(nid) = __va(paddr); 870 NODE_DATA(nid) = __va(paddr);
872 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 871 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
873 872
874 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 873 NODE_DATA(nid)->bdata = &bootmem_node_data[nid];
875#endif 874#endif
876 875
877 p = NODE_DATA(nid); 876 p = NODE_DATA(nid);
diff --git a/arch/um/include/init.h b/arch/um/include/init.h
index b00a95741d41..37dd097c16c0 100644
--- a/arch/um/include/init.h
+++ b/arch/um/include/init.h
@@ -45,6 +45,8 @@ typedef void (*exitcall_t)(void);
45# define __section(S) __attribute__ ((__section__(#S))) 45# define __section(S) __attribute__ ((__section__(#S)))
46#endif 46#endif
47 47
48#if __GNUC__ == 3
49
48#if __GNUC_MINOR__ >= 3 50#if __GNUC_MINOR__ >= 3
49# define __used __attribute__((__used__)) 51# define __used __attribute__((__used__))
50#else 52#else
@@ -52,6 +54,12 @@ typedef void (*exitcall_t)(void);
52#endif 54#endif
53 55
54#else 56#else
57#if __GNUC__ == 4
58# define __used __attribute__((__used__))
59#endif
60#endif
61
62#else
55#include <linux/compiler.h> 63#include <linux/compiler.h>
56#endif 64#endif
57/* These are for everybody (although not all archs will actually 65/* These are for everybody (although not all archs will actually
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h
index 4f775597fd5f..fba3895274f9 100644
--- a/arch/um/include/irq_kern.h
+++ b/arch/um/include/irq_kern.h
@@ -13,8 +13,6 @@ extern int um_request_irq(unsigned int irq, int fd, int type,
13 irq_handler_t handler, 13 irq_handler_t handler,
14 unsigned long irqflags, const char * devname, 14 unsigned long irqflags, const char * devname,
15 void *dev_id); 15 void *dev_id);
16extern int init_aio_irq(int irq, char *name,
17 irq_handler_t handler);
18 16
19#endif 17#endif
20 18
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h
index e60b31873de1..c6c784df2673 100644
--- a/arch/um/include/irq_user.h
+++ b/arch/um/include/irq_user.h
@@ -21,8 +21,6 @@ struct irq_fd {
21enum { IRQ_READ, IRQ_WRITE }; 21enum { IRQ_READ, IRQ_WRITE };
22 22
23extern void sigio_handler(int sig, struct uml_pt_regs *regs); 23extern void sigio_handler(int sig, struct uml_pt_regs *regs);
24extern int activate_fd(int irq, int fd, int type, void *dev_id);
25extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id);
26extern void free_irq_by_fd(int fd); 24extern void free_irq_by_fd(int fd);
27extern void reactivate_fd(int fd, int irqnum); 25extern void reactivate_fd(int fd, int irqnum);
28extern void deactivate_fd(int fd, int irqnum); 26extern void deactivate_fd(int fd, int irqnum);
diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h
index b073f8a86bd3..64d2c7443306 100644
--- a/arch/um/include/skas/skas.h
+++ b/arch/um/include/skas/skas.h
@@ -16,7 +16,6 @@ extern int user_thread(unsigned long stack, int flags);
16extern void new_thread_handler(void); 16extern void new_thread_handler(void);
17extern void handle_syscall(struct uml_pt_regs *regs); 17extern void handle_syscall(struct uml_pt_regs *regs);
18extern int new_mm(unsigned long stack); 18extern int new_mm(unsigned long stack);
19extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
20extern long execute_syscall_skas(void *r); 19extern long execute_syscall_skas(void *r);
21extern unsigned long current_stub_stack(void); 20extern unsigned long current_stub_stack(void);
22 21
diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h
index 2b6fc8e0f071..45c04999d670 100644
--- a/arch/um/include/um_uaccess.h
+++ b/arch/um/include/um_uaccess.h
@@ -34,7 +34,6 @@ extern int copy_to_user(void __user *to, const void *from, int n);
34 34
35extern int __do_copy_to_user(void *to, const void *from, int n, 35extern int __do_copy_to_user(void *to, const void *from, int n,
36 void **fault_addr, jmp_buf **fault_catcher); 36 void **fault_addr, jmp_buf **fault_catcher);
37extern void __do_copy(void *to, const void *from, int n);
38 37
39/* 38/*
40 * strncpy_from_user: - Copy a NUL terminated string from userspace. 39 * strncpy_from_user: - Copy a NUL terminated string from userspace.
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 91587f8db340..3d7aad09b171 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -102,7 +102,7 @@ void sigio_handler(int sig, struct uml_pt_regs *regs)
102 102
103static DEFINE_SPINLOCK(irq_lock); 103static DEFINE_SPINLOCK(irq_lock);
104 104
105int activate_fd(int irq, int fd, int type, void *dev_id) 105static int activate_fd(int irq, int fd, int type, void *dev_id)
106{ 106{
107 struct pollfd *tmp_pfd; 107 struct pollfd *tmp_pfd;
108 struct irq_fd *new_fd, *irq_fd; 108 struct irq_fd *new_fd, *irq_fd;
@@ -216,7 +216,7 @@ static int same_irq_and_dev(struct irq_fd *irq, void *d)
216 return ((irq->irq == data->irq) && (irq->id == data->dev)); 216 return ((irq->irq == data->irq) && (irq->id == data->dev));
217} 217}
218 218
219void free_irq_by_irq_and_dev(unsigned int irq, void *dev) 219static void free_irq_by_irq_and_dev(unsigned int irq, void *dev)
220{ 220{
221 struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, 221 struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq,
222 .dev = dev }); 222 .dev = dev });
@@ -403,37 +403,6 @@ void __init init_IRQ(void)
403 } 403 }
404} 404}
405 405
406int init_aio_irq(int irq, char *name, irq_handler_t handler)
407{
408 int fds[2], err;
409
410 err = os_pipe(fds, 1, 1);
411 if (err) {
412 printk(KERN_ERR "init_aio_irq - os_pipe failed, err = %d\n",
413 -err);
414 goto out;
415 }
416
417 err = um_request_irq(irq, fds[0], IRQ_READ, handler,
418 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name,
419 (void *) (long) fds[0]);
420 if (err) {
421 printk(KERN_ERR "init_aio_irq - : um_request_irq failed, "
422 "err = %d\n",
423 err);
424 goto out_close;
425 }
426
427 err = fds[1];
428 goto out;
429
430 out_close:
431 os_close_file(fds[0]);
432 os_close_file(fds[1]);
433 out:
434 return err;
435}
436
437/* 406/*
438 * IRQ stack entry and exit: 407 * IRQ stack entry and exit:
439 * 408 *
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
index ccc02a616c22..836fc9b94707 100644
--- a/arch/um/kernel/ksyms.c
+++ b/arch/um/kernel/ksyms.c
@@ -18,7 +18,6 @@ EXPORT_SYMBOL(get_signals);
18EXPORT_SYMBOL(kernel_thread); 18EXPORT_SYMBOL(kernel_thread);
19EXPORT_SYMBOL(sys_waitpid); 19EXPORT_SYMBOL(sys_waitpid);
20EXPORT_SYMBOL(flush_tlb_range); 20EXPORT_SYMBOL(flush_tlb_range);
21EXPORT_SYMBOL(arch_validate);
22 21
23EXPORT_SYMBOL(high_physmem); 22EXPORT_SYMBOL(high_physmem);
24EXPORT_SYMBOL(empty_zero_page); 23EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index b0ee64622ff7..e2274ef3155d 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -21,7 +21,7 @@
21/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ 21/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
22unsigned long *empty_zero_page = NULL; 22unsigned long *empty_zero_page = NULL;
23/* allocated in paging_init and unchanged thereafter */ 23/* allocated in paging_init and unchanged thereafter */
24unsigned long *empty_bad_page = NULL; 24static unsigned long *empty_bad_page = NULL;
25 25
26/* 26/*
27 * Initialized during boot, and readonly for initializing page tables 27 * Initialized during boot, and readonly for initializing page tables
@@ -240,37 +240,6 @@ void __init paging_init(void)
240#endif 240#endif
241} 241}
242 242
243struct page *arch_validate(struct page *page, gfp_t mask, int order)
244{
245 unsigned long addr, zero = 0;
246 int i;
247
248 again:
249 if (page == NULL)
250 return page;
251 if (PageHighMem(page))
252 return page;
253
254 addr = (unsigned long) page_address(page);
255 for (i = 0; i < (1 << order); i++) {
256 current->thread.fault_addr = (void *) addr;
257 if (__do_copy_to_user((void __user *) addr, &zero,
258 sizeof(zero),
259 &current->thread.fault_addr,
260 &current->thread.fault_catcher)) {
261 if (!(mask & __GFP_WAIT))
262 return NULL;
263 else break;
264 }
265 addr += PAGE_SIZE;
266 }
267
268 if (i == (1 << order))
269 return page;
270 page = alloc_pages(mask, order);
271 goto again;
272}
273
274/* 243/*
275 * This can't do anything because nothing in the kernel image can be freed 244 * This can't do anything because nothing in the kernel image can be freed
276 * since it's not in kernel physical memory. 245 * since it's not in kernel physical memory.
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index 9757085a0220..a1a9090254c2 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -185,7 +185,7 @@ unsigned long find_iomem(char *driver, unsigned long *len_out)
185 return 0; 185 return 0;
186} 186}
187 187
188int setup_iomem(void) 188static int setup_iomem(void)
189{ 189{
190 struct iomem_region *region = iomem_regions; 190 struct iomem_region *region = iomem_regions;
191 unsigned long iomem_start = high_physmem + PAGE_SIZE; 191 unsigned long iomem_start = high_physmem + PAGE_SIZE;
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 83603cfbde81..a1c6d07cac3e 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -243,7 +243,7 @@ void default_idle(void)
243 if (need_resched()) 243 if (need_resched())
244 schedule(); 244 schedule();
245 245
246 tick_nohz_stop_sched_tick(); 246 tick_nohz_stop_sched_tick(1);
247 nsecs = disable_timer(); 247 nsecs = disable_timer();
248 idle_sleep(nsecs); 248 idle_sleep(nsecs);
249 tick_nohz_restart_sched_tick(); 249 tick_nohz_restart_sched_tick();
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 47b57b497d55..15e8b7c4de13 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -225,7 +225,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
225 return ret; 225 return ret;
226} 226}
227 227
228void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, 228static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
229 int error_code) 229 int error_code)
230{ 230{
231 struct siginfo info; 231 struct siginfo info;
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index c3e2f369c33c..47f04f4a3464 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -13,14 +13,6 @@
13#include "kern_util.h" 13#include "kern_util.h"
14#include "os.h" 14#include "os.h"
15 15
16/*
17 * Scheduler clock - returns current time in nanosec units.
18 */
19unsigned long long sched_clock(void)
20{
21 return (unsigned long long)jiffies_64 * (NSEC_PER_SEC / HZ);
22}
23
24void timer_handler(int sig, struct uml_pt_regs *regs) 16void timer_handler(int sig, struct uml_pt_regs *regs)
25{ 17{
26 unsigned long flags; 18 unsigned long flags;
diff --git a/arch/um/kernel/uaccess.c b/arch/um/kernel/uaccess.c
index f0f4b040d7c5..dd33f040c526 100644
--- a/arch/um/kernel/uaccess.c
+++ b/arch/um/kernel/uaccess.c
@@ -12,7 +12,7 @@
12#include <linux/string.h> 12#include <linux/string.h>
13#include "os.h" 13#include "os.h"
14 14
15void __do_copy(void *to, const void *from, int n) 15static void __do_copy(void *to, const void *from, int n)
16{ 16{
17 memcpy(to, from, n); 17 memcpy(to, from, n);
18} 18}
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index eb8f2e4be192..63d299df152b 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -530,7 +530,7 @@ static void tty_close(int master, int slave)
530 printk(UM_KERN_CONT "No, enabling workaround\n"); 530 printk(UM_KERN_CONT "No, enabling workaround\n");
531} 531}
532 532
533void __init check_sigio(void) 533static void __init check_sigio(void)
534{ 534{
535 if ((access("/dev/ptmx", R_OK) < 0) && 535 if ((access("/dev/ptmx", R_OK) < 0) &&
536 (access("/dev/ptyp0", R_OK) < 0)) { 536 (access("/dev/ptyp0", R_OK) < 0)) {
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 5aade6027e40..6ae180703a63 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -126,7 +126,7 @@ void set_sigstack(void *sig_stack, int size)
126 panic("enabling signal stack failed, errno = %d\n", errno); 126 panic("enabling signal stack failed, errno = %d\n", errno);
127} 127}
128 128
129void (*handlers[_NSIG])(int sig, struct sigcontext *sc); 129static void (*handlers[_NSIG])(int sig, struct sigcontext *sc);
130 130
131void handle_signal(int sig, struct sigcontext *sc) 131void handle_signal(int sig, struct sigcontext *sc)
132{ 132{
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 172ad8f72e12..d6e0a2234b86 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -96,7 +96,7 @@ bad_wait:
96 96
97extern unsigned long current_stub_stack(void); 97extern unsigned long current_stub_stack(void);
98 98
99void get_skas_faultinfo(int pid, struct faultinfo * fi) 99static void get_skas_faultinfo(int pid, struct faultinfo *fi)
100{ 100{
101 int err; 101 int err;
102 102
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index 106fa8641553..a27defb81884 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -245,7 +245,7 @@ int __init set_umid(char *name)
245/* Changed in make_umid, which is called during early boot */ 245/* Changed in make_umid, which is called during early boot */
246static int umid_setup = 0; 246static int umid_setup = 0;
247 247
248int __init make_umid(void) 248static int __init make_umid(void)
249{ 249{
250 int fd, err; 250 int fd, err;
251 char tmp[256]; 251 char tmp[256];
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c
index a74442d13762..2c6d0d731c12 100644
--- a/arch/um/sys-i386/bugs.c
+++ b/arch/um/sys-i386/bugs.c
@@ -12,7 +12,7 @@
12#include "sysdep/ptrace.h" 12#include "sysdep/ptrace.h"
13 13
14/* Set during early boot */ 14/* Set during early boot */
15int host_has_cmov = 1; 15static int host_has_cmov = 1;
16static jmp_buf cmov_test_return; 16static jmp_buf cmov_test_return;
17 17
18static void cmov_sigill_test_handler(int sig) 18static void cmov_sigill_test_handler(int sig)
diff --git a/arch/um/sys-i386/checksum.S b/arch/um/sys-i386/checksum.S
index 62c7e564f22e..f058d2f82e18 100644
--- a/arch/um/sys-i386/checksum.S
+++ b/arch/um/sys-i386/checksum.S
@@ -243,13 +243,12 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst,
243 .previous 243 .previous
244 244
245.align 4 245.align 4
246.globl csum_partial_copy_generic_i386 246
247
248#ifndef CONFIG_X86_USE_PPRO_CHECKSUM 247#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
249 248
250#define ARGBASE 16 249#define ARGBASE 16
251#define FP 12 250#define FP 12
252 251
253csum_partial_copy_generic_i386: 252csum_partial_copy_generic_i386:
254 subl $4,%esp 253 subl $4,%esp
255 pushl %edi 254 pushl %edi
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c
index a34263e6b08d..a4846a84a7be 100644
--- a/arch/um/sys-i386/ldt.c
+++ b/arch/um/sys-i386/ldt.c
@@ -14,8 +14,8 @@
14 14
15extern int modify_ldt(int func, void *ptr, unsigned long bytecount); 15extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
16 16
17long write_ldt_entry(struct mm_id * mm_idp, int func, struct user_desc * desc, 17static long write_ldt_entry(struct mm_id *mm_idp, int func,
18 void **addr, int done) 18 struct user_desc *desc, void **addr, int done)
19{ 19{
20 long res; 20 long res;
21 21
diff --git a/arch/v850/Kconfig b/arch/v850/Kconfig
deleted file mode 100644
index 4379f43505ef..000000000000
--- a/arch/v850/Kconfig
+++ /dev/null
@@ -1,353 +0,0 @@
1#############################################################################
2#
3# For a description of the syntax of this configuration file,
4# see Documentation/kbuild/kconfig-language.txt.
5#
6#############################################################################
7
8mainmenu "uClinux/v850 (w/o MMU) Kernel Configuration"
9
10config MMU
11 bool
12 default n
13config ZONE_DMA
14 bool
15 default y
16config RWSEM_GENERIC_SPINLOCK
17 bool
18 default y
19config RWSEM_XCHGADD_ALGORITHM
20 bool
21 default n
22config GENERIC_FIND_NEXT_BIT
23 bool
24 default y
25config GENERIC_HWEIGHT
26 bool
27 default y
28config GENERIC_CALIBRATE_DELAY
29 bool
30 default y
31
32config GENERIC_HARDIRQS
33 bool
34 default y
35
36config GENERIC_IRQ_PROBE
37 bool
38 default y
39
40config GENERIC_TIME
41 bool
42 default y
43
44config TIME_LOW_RES
45 bool
46 default y
47
48config ARCH_HAS_ILOG2_U32
49 bool
50 default n
51
52config ARCH_HAS_ILOG2_U64
53 bool
54 default n
55
56config ARCH_SUPPORTS_AOUT
57 def_bool y
58
59# Turn off some random 386 crap that can affect device config
60config ISA
61 bool
62 default n
63config ISAPNP
64 bool
65 default n
66config EISA
67 bool
68 default n
69config MCA
70 bool
71 default n
72
73
74#############################################################################
75#### v850-specific config
76
77# Define the architecture
78config V850
79 bool
80 default y
81 select HAVE_IDE
82
83menu "Processor type and features"
84
85 choice
86 prompt "Platform"
87 default GDB
88 config V850E_SIM
89 bool "GDB"
90 config RTE_CB_MA1
91 bool "RTE-V850E/MA1-CB"
92 config RTE_CB_NB85E
93 bool "RTE-V850E/NB85E-CB"
94 config RTE_CB_ME2
95 bool "RTE-V850E/ME2-CB"
96 config V850E_AS85EP1
97 bool "AS85EP1"
98 config V850E2_SIM85E2C
99 bool "sim85e2c"
100 config V850E2_SIM85E2S
101 bool "sim85e2s"
102 config V850E2_FPGA85E2C
103 bool "NA85E2C-FPGA"
104 config V850E2_ANNA
105 bool "Anna"
106 endchoice
107
108 #### V850E processor-specific config
109
110 # All CPUs currently supported use the v850e architecture
111 config V850E
112 bool
113 default y
114
115 # The RTE-V850E/MA1-CB is the only type of V850E/MA1 platform we
116 # currently support
117 config V850E_MA1
118 bool
119 depends on RTE_CB_MA1
120 default y
121 # Similarly for the RTE-V850E/NB85E-CB - V850E/TEG
122 config V850E_TEG
123 bool
124 depends on RTE_CB_NB85E
125 default y
126 # ... and the RTE-V850E/ME2-CB - V850E/ME2
127 config V850E_ME2
128 bool
129 depends on RTE_CB_ME2
130 default y
131
132
133 #### sim85e2-specific config
134
135 config V850E2_SIM85E2
136 bool
137 depends on V850E2_SIM85E2C || V850E2_SIM85E2S
138 default y
139
140
141 #### V850E2 processor-specific config
142
143 # V850E2 processors
144 config V850E2
145 bool
146 depends on V850E2_SIM85E2 || V850E2_FPGA85E2C || V850E2_ANNA
147 default y
148
149
150 #### RTE-CB platform-specific config
151
152 # Boards in the RTE-x-CB series
153 config RTE_CB
154 bool
155 depends on RTE_CB_MA1 || RTE_CB_NB85E || RTE_CB_ME2
156 default y
157
158 config RTE_CB_MULTI
159 bool
160 # RTE_CB_NB85E can either have multi ROM support or not, but
161 # other platforms (currently only RTE_CB_MA1) require it.
162 prompt "Multi monitor ROM support" if RTE_CB_NB85E
163 depends on RTE_CB_MA1 || RTE_CB_NB85E
164 default y
165
166 config RTE_CB_MULTI_DBTRAP
167 bool "Pass illegal insn trap / dbtrap to kernel"
168 depends on RTE_CB_MULTI
169 default n
170
171 config RTE_CB_MA1_KSRAM
172 bool "Kernel in SRAM (limits size of kernel)"
173 depends on RTE_CB_MA1 && RTE_CB_MULTI
174 default n
175
176 config RTE_MB_A_PCI
177 bool "Mother-A PCI support"
178 depends on RTE_CB
179 default y
180
181 # The GBUS is used to talk to the RTE-MOTHER-A board
182 config RTE_GBUS_INT
183 bool
184 depends on RTE_MB_A_PCI
185 default y
186
187 # The only PCI bus we support is on the RTE-MOTHER-A board
188 config PCI
189 bool
190 default RTE_MB_A_PCI
191
192 #### Some feature-specific configs
193
194 # Everything except for the GDB simulator uses the same interrupt controller
195 config V850E_INTC
196 bool
197 default !V850E_SIM
198
199 # Everything except for the various simulators uses the "Timer D" unit
200 config V850E_TIMER_D
201 bool
202 default !V850E_SIM && !V850E2_SIM85E2
203
204 # Cache control used on some v850e1 processors
205 config V850E_CACHE
206 bool
207 default V850E_TEG || V850E_ME2
208
209 # Cache control used on v850e2 processors; I think this should
210 # actually apply to more, but currently only the SIM85E2S uses it
211 config V850E2_CACHE
212 bool
213 default V850E2_SIM85E2S
214
215 config NO_CACHE
216 bool
217 default !V850E_CACHE && !V850E2_CACHE
218
219 # HZ depends on the platform
220 config HZ
221 int
222 default 24 if V850E_SIM || V850E2_SIM85E2
223 default 122 if V850E2_FPGA85E2C
224 default 100
225
226 #### Misc config
227
228 config ROM_KERNEL
229 bool "Kernel in ROM"
230 depends on V850E2_ANNA || V850E_AS85EP1 || RTE_CB_ME2
231
232 # Some platforms pre-zero memory, in which case the kernel doesn't need to
233 config ZERO_BSS
234 bool
235 depends on !V850E2_SIM85E2C
236 default y
237
238 # The crappy-ass zone allocator requires that the start of allocatable
239 # memory be aligned to the largest possible allocation.
240 config FORCE_MAX_ZONEORDER
241 int
242 default 8 if V850E2_SIM85E2C || V850E2_FPGA85E2C
243
244 config V850E_HIGHRES_TIMER
245 bool "High resolution timer support"
246 depends on V850E_TIMER_D
247 config TIME_BOOTUP
248 bool "Time bootup"
249 depends on V850E_HIGHRES_TIMER
250
251 config RESET_GUARD
252 bool "Reset Guard"
253
254source "mm/Kconfig"
255
256endmenu
257
258
259#############################################################################
260
261source init/Kconfig
262
263#############################################################################
264
265menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
266
267# config PCI
268# bool "PCI support"
269# help
270# Support for PCI bus.
271
272source "drivers/pci/Kconfig"
273
274source "drivers/pcmcia/Kconfig"
275
276source "drivers/pci/hotplug/Kconfig"
277
278endmenu
279
280menu "Executable file formats"
281
282source "fs/Kconfig.binfmt"
283
284endmenu
285
286source "net/Kconfig"
287
288#############################################################################
289
290source "drivers/base/Kconfig"
291
292source drivers/mtd/Kconfig
293
294source drivers/parport/Kconfig
295
296#source drivers/pnp/Kconfig
297
298source drivers/block/Kconfig
299
300#############################################################################
301
302menu "Disk device support"
303
304source "drivers/ide/Kconfig"
305
306source "drivers/scsi/Kconfig"
307
308endmenu
309
310#############################################################################
311
312
313source "drivers/md/Kconfig"
314
315source "drivers/message/fusion/Kconfig"
316
317source "drivers/ieee1394/Kconfig"
318
319source "drivers/message/i2o/Kconfig"
320
321source "drivers/net/Kconfig"
322
323source "drivers/isdn/Kconfig"
324
325#source "drivers/telephony/Kconfig"
326
327#
328# input before char - char/joystick depends on it. As does USB.
329#
330source "drivers/input/Kconfig"
331
332source "drivers/char/Kconfig"
333
334#source drivers/misc/Config.in
335source "drivers/media/Kconfig"
336
337source "fs/Kconfig"
338
339source "drivers/video/Kconfig"
340
341source "sound/Kconfig"
342
343source "drivers/usb/Kconfig"
344
345source "arch/v850/Kconfig.debug"
346
347source "security/Kconfig"
348
349source "crypto/Kconfig"
350
351source "lib/Kconfig"
352
353#############################################################################
diff --git a/arch/v850/Kconfig.debug b/arch/v850/Kconfig.debug
deleted file mode 100644
index 4acfb9cca1ca..000000000000
--- a/arch/v850/Kconfig.debug
+++ /dev/null
@@ -1,10 +0,0 @@
1menu "Kernel hacking"
2
3source "lib/Kconfig.debug"
4
5config NO_KERNEL_MSG
6 bool "Suppress Kernel BUG Messages"
7 help
8 Do not output any debug BUG messages within the kernel.
9
10endmenu
diff --git a/arch/v850/Makefile b/arch/v850/Makefile
deleted file mode 100644
index 8b629df0029a..000000000000
--- a/arch/v850/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
1#
2# arch/v850/Makefile
3#
4# Copyright (C) 2001,02,03,05 NEC Corporation
5# Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org>
6#
7# This file is included by the global makefile so that you can add your own
8# architecture-specific flags and dependencies. Remember to do have actions
9# for "archclean" and "archdep" for cleaning up and making dependencies for
10# this architecture
11#
12# This file is subject to the terms and conditions of the GNU General Public
13# License. See the file "COPYING" in the main directory of this archive
14# for more details.
15#
16
17arch_dir = arch/v850
18
19KBUILD_CFLAGS += -mv850e
20# r16 is a fixed pointer to the current task
21KBUILD_CFLAGS += -ffixed-r16 -mno-prolog-function
22KBUILD_CFLAGS += -fno-builtin
23KBUILD_CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
24
25# By default, build a kernel that runs on the gdb v850 simulator.
26KBUILD_DEFCONFIG := sim_defconfig
27
28# This prevents the linker from consolidating the .gnu.linkonce.this_module
29# section into .text (which the v850 default linker script for -r does for
30# some reason)
31LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module
32
33OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e
34
35
36head-y := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o
37core-y += $(arch_dir)/kernel/
38libs-y += $(arch_dir)/lib/
39
40
41# Deal with the initial contents of the root device
42ifdef ROOT_FS_IMAGE
43core-y += root_fs_image.o
44
45# Because the kernel build-system erases all explicit .o build rules, we
46# have to use an intermediate target to fool it into building for us.
47# This results in it being built anew each time, but that's alright.
48root_fs_image.o: root_fs_image_force
49
50root_fs_image_force: $(ROOT_FS_IMAGE)
51 $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o
52endif
53
54CLEAN_FILES += root_fs_image.o
diff --git a/arch/v850/README b/arch/v850/README
deleted file mode 100644
index 12f7f7a665e0..000000000000
--- a/arch/v850/README
+++ /dev/null
@@ -1,44 +0,0 @@
1This port to the NEC V850E processor supports the following platforms:
2
3 "sim"
4 The gdb v850e simulator (CONFIG_V850E_SIM).
5
6 "rte-ma1-cb"
7 The Midas labs RTE-V850E/MA1-CB and RTE-V850E/NB85E-CB evaluation
8 boards (CONFIG_RTE_CB_MA1 and CONFIG_RTE_CB_NB85E). This support
9 has only been tested when running with the Multi-debugger monitor
10 ROM (for the Green Hills Multi debugger). The optional NEC
11 Solution Gear RTE-MOTHER-A motherboard is also supported, which
12 allows PCI boards to be used (CONFIG_RTE_MB_A_PCI).
13
14 "rte-me2-cb"
15 The Midas labs RTE-V850E/ME2-CB evaluation board (CONFIG_RTE_CB_ME2).
16 This has only been tested using a kernel downloaded via an ICE
17 connection using the Multi debugger. Support for the RTE-MOTHER-A is
18 present, but hasn't been tested (unlike the other Midas labs cpu
19 boards, the RTE-V850E/ME2-CB includes an ethernet adaptor).
20
21 "as85ep1"
22 The NEC AS85EP1 V850E evaluation chip/board (CONFIG_V850E_AS85EP1).
23
24 "anna"
25 The NEC `Anna' (board/chip) implementation of the V850E2 processor
26 (CONFIG_V850E2_ANNA).
27
28 "sim85e2c", "sim85e2s"
29 The sim85e2c and sim85e2s simulators, which are verilog simulations
30 of the V850E2 NA85E2C/NA85E2S cpu cores (CONFIG_V850E2_SIM85E2C and
31 CONFIG_V850E2_SIM85E2S).
32
33 "fpga85e2c"
34 A FPGA implementation of the V850E2 NA85E2C cpu core
35 (CONFIG_V850E2_FPGA85E2C).
36
37To get a default kernel configuration for a particular platform, you can
38use a <platform>_defconfig make target (e.g., "make rte-me2-cb_defconfig");
39to see which default configurations are possible, look in the directory
40"arch/v850/configs".
41
42Porting to anything with a V850E/MA1 or MA2 processor should be simple.
43See the file <asm-v850/machdep.h> and the files it includes for an example of
44how to add platform/chip-specific support.
diff --git a/arch/v850/configs/rte-ma1-cb_defconfig b/arch/v850/configs/rte-ma1-cb_defconfig
deleted file mode 100644
index 1a5beda36e29..000000000000
--- a/arch/v850/configs/rte-ma1-cb_defconfig
+++ /dev/null
@@ -1,617 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-uc0
4# Fri Sep 2 13:54:27 2005
5#
6# CONFIG_MMU is not set
7# CONFIG_UID16 is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11# CONFIG_ISA is not set
12# CONFIG_ISAPNP is not set
13# CONFIG_EISA is not set
14# CONFIG_MCA is not set
15CONFIG_V850=y
16
17#
18# Processor type and features
19#
20# CONFIG_V850E_SIM is not set
21CONFIG_RTE_CB_MA1=y
22# CONFIG_RTE_CB_NB85E is not set
23# CONFIG_RTE_CB_ME2 is not set
24# CONFIG_V850E_AS85EP1 is not set
25# CONFIG_V850E2_SIM85E2C is not set
26# CONFIG_V850E2_SIM85E2S is not set
27# CONFIG_V850E2_FPGA85E2C is not set
28# CONFIG_V850E2_ANNA is not set
29CONFIG_V850E=y
30CONFIG_V850E_MA1=y
31CONFIG_RTE_CB=y
32CONFIG_RTE_CB_MULTI=y
33CONFIG_RTE_CB_MULTI_DBTRAP=y
34# CONFIG_RTE_CB_MA1_KSRAM is not set
35CONFIG_RTE_MB_A_PCI=y
36CONFIG_RTE_GBUS_INT=y
37CONFIG_PCI=y
38CONFIG_V850E_INTC=y
39CONFIG_V850E_TIMER_D=y
40# CONFIG_V850E_CACHE is not set
41# CONFIG_V850E2_CACHE is not set
42CONFIG_NO_CACHE=y
43CONFIG_ZERO_BSS=y
44# CONFIG_V850E_HIGHRES_TIMER is not set
45# CONFIG_RESET_GUARD is not set
46CONFIG_LARGE_ALLOCS=y
47CONFIG_FLATMEM=y
48CONFIG_FLAT_NODE_MEM_MAP=y
49
50#
51# Code maturity level options
52#
53# CONFIG_EXPERIMENTAL is not set
54CONFIG_CLEAN_COMPILE=y
55CONFIG_BROKEN_ON_SMP=y
56CONFIG_INIT_ENV_ARG_LIMIT=32
57
58#
59# General setup
60#
61CONFIG_LOCALVERSION=""
62# CONFIG_BSD_PROCESS_ACCT is not set
63# CONFIG_SYSCTL is not set
64# CONFIG_AUDIT is not set
65# CONFIG_HOTPLUG is not set
66CONFIG_KOBJECT_UEVENT=y
67# CONFIG_IKCONFIG is not set
68CONFIG_EMBEDDED=y
69# CONFIG_KALLSYMS is not set
70CONFIG_PRINTK=y
71CONFIG_BUG=y
72# CONFIG_BASE_FULL is not set
73# CONFIG_FUTEX is not set
74# CONFIG_EPOLL is not set
75CONFIG_CC_OPTIMIZE_FOR_SIZE=y
76CONFIG_CC_ALIGN_FUNCTIONS=0
77CONFIG_CC_ALIGN_LABELS=0
78CONFIG_CC_ALIGN_LOOPS=0
79CONFIG_CC_ALIGN_JUMPS=0
80CONFIG_BASE_SMALL=1
81
82#
83# Loadable module support
84#
85CONFIG_MODULES=y
86CONFIG_MODULE_UNLOAD=y
87CONFIG_OBSOLETE_MODPARM=y
88# CONFIG_MODULE_SRCVERSION_ALL is not set
89CONFIG_KMOD=y
90
91#
92# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
93#
94# CONFIG_PCI_LEGACY_PROC is not set
95# CONFIG_PCI_NAMES is not set
96# CONFIG_PCI_DEBUG is not set
97
98#
99# PCCARD (PCMCIA/CardBus) support
100#
101# CONFIG_PCCARD is not set
102
103#
104# PCI Hotplug Support
105#
106
107#
108# Executable file formats
109#
110CONFIG_BINFMT_FLAT=y
111# CONFIG_BINFMT_ZFLAT is not set
112# CONFIG_BINFMT_SHARED_FLAT is not set
113# CONFIG_BINFMT_MISC is not set
114
115#
116# Networking
117#
118CONFIG_NET=y
119
120#
121# Networking options
122#
123# CONFIG_PACKET is not set
124# CONFIG_UNIX is not set
125# CONFIG_NET_KEY is not set
126CONFIG_INET=y
127# CONFIG_IP_MULTICAST is not set
128# CONFIG_IP_ADVANCED_ROUTER is not set
129CONFIG_IP_FIB_HASH=y
130# CONFIG_IP_PNP is not set
131# CONFIG_NET_IPIP is not set
132# CONFIG_NET_IPGRE is not set
133# CONFIG_SYN_COOKIES is not set
134# CONFIG_INET_AH is not set
135# CONFIG_INET_ESP is not set
136# CONFIG_INET_IPCOMP is not set
137# CONFIG_INET_TUNNEL is not set
138# CONFIG_IP_TCPDIAG is not set
139# CONFIG_IP_TCPDIAG_IPV6 is not set
140# CONFIG_TCP_CONG_ADVANCED is not set
141CONFIG_TCP_CONG_BIC=y
142# CONFIG_IPV6 is not set
143# CONFIG_NETFILTER is not set
144# CONFIG_BRIDGE is not set
145# CONFIG_VLAN_8021Q is not set
146# CONFIG_DECNET is not set
147# CONFIG_LLC2 is not set
148# CONFIG_IPX is not set
149# CONFIG_ATALK is not set
150# CONFIG_NET_SCHED is not set
151# CONFIG_NET_CLS_ROUTE is not set
152
153#
154# Network testing
155#
156# CONFIG_NET_PKTGEN is not set
157# CONFIG_HAMRADIO is not set
158# CONFIG_IRDA is not set
159# CONFIG_BT is not set
160
161#
162# Generic Driver Options
163#
164CONFIG_STANDALONE=y
165CONFIG_PREVENT_FIRMWARE_BUILD=y
166# CONFIG_FW_LOADER is not set
167# CONFIG_DEBUG_DRIVER is not set
168
169#
170# Memory Technology Devices (MTD)
171#
172CONFIG_MTD=y
173# CONFIG_MTD_DEBUG is not set
174# CONFIG_MTD_CONCAT is not set
175# CONFIG_MTD_PARTITIONS is not set
176
177#
178# User Modules And Translation Layers
179#
180# CONFIG_MTD_CHAR is not set
181CONFIG_MTD_BLOCK=y
182# CONFIG_FTL is not set
183# CONFIG_NFTL is not set
184# CONFIG_INFTL is not set
185
186#
187# RAM/ROM/Flash chip drivers
188#
189# CONFIG_MTD_CFI is not set
190# CONFIG_MTD_JEDECPROBE is not set
191CONFIG_MTD_MAP_BANK_WIDTH_1=y
192CONFIG_MTD_MAP_BANK_WIDTH_2=y
193CONFIG_MTD_MAP_BANK_WIDTH_4=y
194# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
195# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
196# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
197CONFIG_MTD_CFI_I1=y
198CONFIG_MTD_CFI_I2=y
199# CONFIG_MTD_CFI_I4 is not set
200# CONFIG_MTD_CFI_I8 is not set
201# CONFIG_MTD_RAM is not set
202# CONFIG_MTD_ROM is not set
203# CONFIG_MTD_ABSENT is not set
204
205#
206# Mapping drivers for chip access
207#
208# CONFIG_MTD_COMPLEX_MAPPINGS is not set
209# CONFIG_MTD_PLATRAM is not set
210
211#
212# Self-contained MTD device drivers
213#
214# CONFIG_MTD_PMC551 is not set
215CONFIG_MTD_SLRAM=y
216# CONFIG_MTD_PHRAM is not set
217# CONFIG_MTD_MTDRAM is not set
218# CONFIG_MTD_BLKMTD is not set
219
220#
221# Disk-On-Chip Device Drivers
222#
223# CONFIG_MTD_DOC2000 is not set
224# CONFIG_MTD_DOC2001 is not set
225# CONFIG_MTD_DOC2001PLUS is not set
226
227#
228# NAND Flash Device Drivers
229#
230# CONFIG_MTD_NAND is not set
231
232#
233# Parallel port support
234#
235# CONFIG_PARPORT is not set
236
237#
238# Block devices
239#
240# CONFIG_BLK_DEV_FD is not set
241# CONFIG_BLK_CPQ_DA is not set
242# CONFIG_BLK_CPQ_CISS_DA is not set
243# CONFIG_BLK_DEV_DAC960 is not set
244# CONFIG_BLK_DEV_COW_COMMON is not set
245# CONFIG_BLK_DEV_LOOP is not set
246# CONFIG_BLK_DEV_NBD is not set
247# CONFIG_BLK_DEV_SX8 is not set
248# CONFIG_BLK_DEV_RAM is not set
249CONFIG_BLK_DEV_RAM_COUNT=16
250CONFIG_INITRAMFS_SOURCE=""
251# CONFIG_CDROM_PKTCDVD is not set
252
253#
254# IO Schedulers
255#
256CONFIG_IOSCHED_NOOP=y
257# CONFIG_IOSCHED_AS is not set
258# CONFIG_IOSCHED_DEADLINE is not set
259# CONFIG_IOSCHED_CFQ is not set
260# CONFIG_ATA_OVER_ETH is not set
261
262#
263# Disk device support
264#
265
266#
267# ATA/ATAPI/MFM/RLL support
268#
269# CONFIG_IDE is not set
270
271#
272# SCSI device support
273#
274# CONFIG_SCSI is not set
275
276#
277# Multi-device support (RAID and LVM)
278#
279# CONFIG_MD is not set
280
281#
282# Fusion MPT device support
283#
284# CONFIG_FUSION is not set
285
286#
287# IEEE 1394 (FireWire) support
288#
289# CONFIG_IEEE1394 is not set
290
291#
292# I2O device support
293#
294# CONFIG_I2O is not set
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# CONFIG_NET_VENDOR_SMC is not set
319
320#
321# Tulip family network device support
322#
323# CONFIG_NET_TULIP is not set
324# CONFIG_HP100 is not set
325# CONFIG_NE2000 is not set
326CONFIG_NET_PCI=y
327# CONFIG_PCNET32 is not set
328# CONFIG_AMD8111_ETH is not set
329# CONFIG_ADAPTEC_STARFIRE is not set
330# CONFIG_DGRS is not set
331CONFIG_EEPRO100=y
332# CONFIG_E100 is not set
333# CONFIG_FEALNX is not set
334# CONFIG_NATSEMI is not set
335# CONFIG_NE2K_PCI is not set
336# CONFIG_8139TOO is not set
337# CONFIG_SIS900 is not set
338# CONFIG_EPIC100 is not set
339# CONFIG_SUNDANCE is not set
340# CONFIG_TLAN is not set
341# CONFIG_VIA_RHINE is not set
342
343#
344# Ethernet (1000 Mbit)
345#
346# CONFIG_ACENIC is not set
347# CONFIG_DL2K is not set
348# CONFIG_E1000 is not set
349# CONFIG_NS83820 is not set
350# CONFIG_HAMACHI is not set
351# CONFIG_R8169 is not set
352# CONFIG_SK98LIN is not set
353# CONFIG_VIA_VELOCITY is not set
354# CONFIG_TIGON3 is not set
355# CONFIG_BNX2 is not set
356
357#
358# Ethernet (10000 Mbit)
359#
360# CONFIG_IXGB is not set
361# CONFIG_S2IO is not set
362
363#
364# Token Ring devices
365#
366# CONFIG_TR is not set
367
368#
369# Wireless LAN (non-hamradio)
370#
371# CONFIG_NET_RADIO is not set
372
373#
374# Wan interfaces
375#
376# CONFIG_WAN is not set
377# CONFIG_FDDI is not set
378# CONFIG_PPP is not set
379# CONFIG_SLIP is not set
380# CONFIG_NETPOLL is not set
381# CONFIG_NET_POLL_CONTROLLER is not set
382
383#
384# ISDN subsystem
385#
386# CONFIG_ISDN is not set
387
388#
389# Input device support
390#
391CONFIG_INPUT=y
392
393#
394# Userland interfaces
395#
396# CONFIG_INPUT_MOUSEDEV is not set
397# CONFIG_INPUT_JOYDEV is not set
398# CONFIG_INPUT_TSDEV is not set
399# CONFIG_INPUT_EVDEV is not set
400# CONFIG_INPUT_EVBUG is not set
401
402#
403# Input Device Drivers
404#
405# CONFIG_INPUT_KEYBOARD is not set
406# CONFIG_INPUT_MOUSE is not set
407# CONFIG_INPUT_JOYSTICK is not set
408# CONFIG_INPUT_TOUCHSCREEN is not set
409# CONFIG_INPUT_MISC is not set
410
411#
412# Hardware I/O ports
413#
414# CONFIG_SERIO is not set
415# CONFIG_GAMEPORT is not set
416
417#
418# Character devices
419#
420# CONFIG_VT is not set
421# CONFIG_SERIAL_NONSTANDARD is not set
422
423#
424# Serial drivers
425#
426# CONFIG_SERIAL_8250 is not set
427
428#
429# Non-8250 serial port support
430#
431CONFIG_V850E_UART=y
432CONFIG_V850E_UART_CONSOLE=y
433CONFIG_SERIAL_CORE=y
434CONFIG_SERIAL_CORE_CONSOLE=y
435# CONFIG_SERIAL_JSM is not set
436# CONFIG_UNIX98_PTYS is not set
437# CONFIG_LEGACY_PTYS is not set
438
439#
440# IPMI
441#
442# CONFIG_IPMI_HANDLER is not set
443
444#
445# Watchdog Cards
446#
447# CONFIG_WATCHDOG is not set
448# CONFIG_RTC is not set
449# CONFIG_GEN_RTC is not set
450# CONFIG_DTLK is not set
451# CONFIG_R3964 is not set
452# CONFIG_APPLICOM is not set
453
454#
455# Ftape, the floppy tape device driver
456#
457# CONFIG_DRM is not set
458# CONFIG_RAW_DRIVER is not set
459
460#
461# TPM devices
462#
463
464#
465# Multimedia devices
466#
467# CONFIG_VIDEO_DEV is not set
468
469#
470# Digital Video Broadcasting Devices
471#
472# CONFIG_DVB is not set
473
474#
475# File systems
476#
477# CONFIG_EXT2_FS is not set
478# CONFIG_EXT3_FS is not set
479# CONFIG_JBD is not set
480# CONFIG_REISERFS_FS is not set
481# CONFIG_JFS_FS is not set
482# CONFIG_FS_POSIX_ACL is not set
483
484#
485# XFS support
486#
487# CONFIG_XFS_FS is not set
488# CONFIG_MINIX_FS is not set
489CONFIG_ROMFS_FS=y
490# CONFIG_MAGIC_ROM_PTR is not set
491CONFIG_INOTIFY=y
492# CONFIG_QUOTA is not set
493CONFIG_DNOTIFY=y
494# CONFIG_AUTOFS_FS is not set
495# CONFIG_AUTOFS4_FS is not set
496
497#
498# CD-ROM/DVD Filesystems
499#
500# CONFIG_ISO9660_FS is not set
501# CONFIG_UDF_FS is not set
502
503#
504# DOS/FAT/NT Filesystems
505#
506# CONFIG_MSDOS_FS is not set
507# CONFIG_VFAT_FS is not set
508# CONFIG_NTFS_FS is not set
509
510#
511# Pseudo filesystems
512#
513CONFIG_PROC_FS=y
514CONFIG_SYSFS=y
515# CONFIG_TMPFS is not set
516# CONFIG_HUGETLB_PAGE is not set
517CONFIG_RAMFS=y
518
519#
520# Miscellaneous filesystems
521#
522# CONFIG_HFSPLUS_FS is not set
523# CONFIG_JFFS_FS is not set
524# CONFIG_JFFS2_FS is not set
525# CONFIG_CRAMFS is not set
526# CONFIG_VXFS_FS is not set
527# CONFIG_HPFS_FS is not set
528# CONFIG_QNX4FS_FS is not set
529# CONFIG_SYSV_FS is not set
530# CONFIG_UFS_FS is not set
531
532#
533# Network File Systems
534#
535CONFIG_NFS_FS=y
536CONFIG_NFS_V3=y
537# CONFIG_NFS_V3_ACL is not set
538# CONFIG_NFSD is not set
539CONFIG_LOCKD=y
540CONFIG_LOCKD_V4=y
541CONFIG_NFS_COMMON=y
542CONFIG_SUNRPC=y
543# CONFIG_SMB_FS is not set
544# CONFIG_CIFS is not set
545# CONFIG_NCP_FS is not set
546# CONFIG_CODA_FS is not set
547
548#
549# Partition Types
550#
551# CONFIG_PARTITION_ADVANCED is not set
552CONFIG_MSDOS_PARTITION=y
553
554#
555# Native Language Support
556#
557# CONFIG_NLS is not set
558
559#
560# Graphics support
561#
562# CONFIG_FB is not set
563
564#
565# Sound
566#
567# CONFIG_SOUND is not set
568
569#
570# USB support
571#
572CONFIG_USB_ARCH_HAS_HCD=y
573CONFIG_USB_ARCH_HAS_OHCI=y
574# CONFIG_USB is not set
575
576#
577# USB Gadget Support
578#
579# CONFIG_USB_GADGET is not set
580
581#
582# Kernel hacking
583#
584# CONFIG_PRINTK_TIME is not set
585CONFIG_DEBUG_KERNEL=y
586# CONFIG_MAGIC_SYSRQ is not set
587CONFIG_LOG_BUF_SHIFT=14
588# CONFIG_SCHEDSTATS is not set
589# CONFIG_DEBUG_SLAB is not set
590# CONFIG_DEBUG_SPINLOCK is not set
591# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
592# CONFIG_DEBUG_KOBJECT is not set
593CONFIG_DEBUG_INFO=y
594# CONFIG_DEBUG_FS is not set
595# CONFIG_NO_KERNEL_MSG is not set
596
597#
598# Security options
599#
600# CONFIG_KEYS is not set
601# CONFIG_SECURITY is not set
602
603#
604# Cryptographic options
605#
606# CONFIG_CRYPTO is not set
607
608#
609# Hardware crypto devices
610#
611
612#
613# Library routines
614#
615# CONFIG_CRC_CCITT is not set
616# CONFIG_CRC32 is not set
617# CONFIG_LIBCRC32C is not set
diff --git a/arch/v850/configs/rte-me2-cb_defconfig b/arch/v850/configs/rte-me2-cb_defconfig
deleted file mode 100644
index 15e666478061..000000000000
--- a/arch/v850/configs/rte-me2-cb_defconfig
+++ /dev/null
@@ -1,462 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-uc0
4# Fri Sep 2 13:47:50 2005
5#
6# CONFIG_MMU is not set
7# CONFIG_UID16 is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11# CONFIG_ISA is not set
12# CONFIG_ISAPNP is not set
13# CONFIG_EISA is not set
14# CONFIG_MCA is not set
15CONFIG_V850=y
16
17#
18# Processor type and features
19#
20# CONFIG_V850E_SIM is not set
21# CONFIG_RTE_CB_MA1 is not set
22# CONFIG_RTE_CB_NB85E is not set
23CONFIG_RTE_CB_ME2=y
24# CONFIG_V850E_AS85EP1 is not set
25# CONFIG_V850E2_SIM85E2C is not set
26# CONFIG_V850E2_SIM85E2S is not set
27# CONFIG_V850E2_FPGA85E2C is not set
28# CONFIG_V850E2_ANNA is not set
29CONFIG_V850E=y
30CONFIG_V850E_ME2=y
31CONFIG_RTE_CB=y
32# CONFIG_RTE_MB_A_PCI is not set
33# CONFIG_PCI is not set
34CONFIG_V850E_INTC=y
35CONFIG_V850E_TIMER_D=y
36CONFIG_V850E_CACHE=y
37# CONFIG_V850E2_CACHE is not set
38# CONFIG_NO_CACHE is not set
39# CONFIG_ROM_KERNEL is not set
40CONFIG_ZERO_BSS=y
41# CONFIG_V850E_HIGHRES_TIMER is not set
42# CONFIG_RESET_GUARD is not set
43CONFIG_LARGE_ALLOCS=y
44CONFIG_FLATMEM=y
45CONFIG_FLAT_NODE_MEM_MAP=y
46
47#
48# Code maturity level options
49#
50# CONFIG_EXPERIMENTAL is not set
51CONFIG_CLEAN_COMPILE=y
52CONFIG_BROKEN_ON_SMP=y
53CONFIG_INIT_ENV_ARG_LIMIT=32
54
55#
56# General setup
57#
58CONFIG_LOCALVERSION=""
59# CONFIG_BSD_PROCESS_ACCT is not set
60# CONFIG_SYSCTL is not set
61# CONFIG_HOTPLUG is not set
62# CONFIG_IKCONFIG is not set
63CONFIG_EMBEDDED=y
64# CONFIG_KALLSYMS is not set
65CONFIG_PRINTK=y
66CONFIG_BUG=y
67# CONFIG_BASE_FULL is not set
68# CONFIG_FUTEX is not set
69# CONFIG_EPOLL is not set
70CONFIG_CC_OPTIMIZE_FOR_SIZE=y
71CONFIG_CC_ALIGN_FUNCTIONS=0
72CONFIG_CC_ALIGN_LABELS=0
73CONFIG_CC_ALIGN_LOOPS=0
74CONFIG_CC_ALIGN_JUMPS=0
75CONFIG_BASE_SMALL=1
76
77#
78# Loadable module support
79#
80CONFIG_MODULES=y
81CONFIG_MODULE_UNLOAD=y
82CONFIG_OBSOLETE_MODPARM=y
83# CONFIG_MODULE_SRCVERSION_ALL is not set
84CONFIG_KMOD=y
85
86#
87# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
88#
89
90#
91# PCCARD (PCMCIA/CardBus) support
92#
93# CONFIG_PCCARD is not set
94
95#
96# PCI Hotplug Support
97#
98
99#
100# Executable file formats
101#
102CONFIG_BINFMT_FLAT=y
103# CONFIG_BINFMT_ZFLAT is not set
104# CONFIG_BINFMT_SHARED_FLAT is not set
105# CONFIG_BINFMT_MISC is not set
106
107#
108# Networking
109#
110# CONFIG_NET is not set
111
112#
113# Generic Driver Options
114#
115CONFIG_STANDALONE=y
116CONFIG_PREVENT_FIRMWARE_BUILD=y
117# CONFIG_FW_LOADER is not set
118# CONFIG_DEBUG_DRIVER is not set
119
120#
121# Memory Technology Devices (MTD)
122#
123CONFIG_MTD=y
124# CONFIG_MTD_DEBUG is not set
125# CONFIG_MTD_CONCAT is not set
126# CONFIG_MTD_PARTITIONS is not set
127
128#
129# User Modules And Translation Layers
130#
131# CONFIG_MTD_CHAR is not set
132CONFIG_MTD_BLOCK=y
133# CONFIG_FTL is not set
134# CONFIG_NFTL is not set
135# CONFIG_INFTL is not set
136
137#
138# RAM/ROM/Flash chip drivers
139#
140# CONFIG_MTD_CFI is not set
141# CONFIG_MTD_JEDECPROBE is not set
142CONFIG_MTD_MAP_BANK_WIDTH_1=y
143CONFIG_MTD_MAP_BANK_WIDTH_2=y
144CONFIG_MTD_MAP_BANK_WIDTH_4=y
145# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
146# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
147# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
148CONFIG_MTD_CFI_I1=y
149CONFIG_MTD_CFI_I2=y
150# CONFIG_MTD_CFI_I4 is not set
151# CONFIG_MTD_CFI_I8 is not set
152# CONFIG_MTD_RAM is not set
153# CONFIG_MTD_ROM is not set
154# CONFIG_MTD_ABSENT is not set
155
156#
157# Mapping drivers for chip access
158#
159# CONFIG_MTD_COMPLEX_MAPPINGS is not set
160# CONFIG_MTD_PLATRAM is not set
161
162#
163# Self-contained MTD device drivers
164#
165CONFIG_MTD_SLRAM=y
166# CONFIG_MTD_PHRAM is not set
167# CONFIG_MTD_MTDRAM is not set
168# CONFIG_MTD_BLKMTD is not set
169
170#
171# Disk-On-Chip Device Drivers
172#
173# CONFIG_MTD_DOC2000 is not set
174# CONFIG_MTD_DOC2001 is not set
175# CONFIG_MTD_DOC2001PLUS is not set
176
177#
178# NAND Flash Device Drivers
179#
180# CONFIG_MTD_NAND is not set
181
182#
183# Parallel port support
184#
185# CONFIG_PARPORT is not set
186
187#
188# Block devices
189#
190# CONFIG_BLK_DEV_FD is not set
191# CONFIG_BLK_DEV_COW_COMMON is not set
192# CONFIG_BLK_DEV_LOOP is not set
193# CONFIG_BLK_DEV_RAM is not set
194CONFIG_BLK_DEV_RAM_COUNT=16
195CONFIG_INITRAMFS_SOURCE=""
196# CONFIG_CDROM_PKTCDVD is not set
197
198#
199# IO Schedulers
200#
201CONFIG_IOSCHED_NOOP=y
202# CONFIG_IOSCHED_AS is not set
203# CONFIG_IOSCHED_DEADLINE is not set
204# CONFIG_IOSCHED_CFQ is not set
205
206#
207# Disk device support
208#
209
210#
211# ATA/ATAPI/MFM/RLL support
212#
213# CONFIG_IDE is not set
214
215#
216# SCSI device support
217#
218# CONFIG_SCSI is not set
219
220#
221# Multi-device support (RAID and LVM)
222#
223# CONFIG_MD is not set
224
225#
226# Fusion MPT device support
227#
228# CONFIG_FUSION is not set
229
230#
231# IEEE 1394 (FireWire) support
232#
233
234#
235# I2O device support
236#
237
238#
239# Network device support
240#
241# CONFIG_NETPOLL is not set
242# CONFIG_NET_POLL_CONTROLLER is not set
243
244#
245# ISDN subsystem
246#
247
248#
249# Input device support
250#
251CONFIG_INPUT=y
252
253#
254# Userland interfaces
255#
256# CONFIG_INPUT_MOUSEDEV is not set
257# CONFIG_INPUT_JOYDEV is not set
258# CONFIG_INPUT_TSDEV is not set
259# CONFIG_INPUT_EVDEV is not set
260# CONFIG_INPUT_EVBUG is not set
261
262#
263# Input Device Drivers
264#
265# CONFIG_INPUT_KEYBOARD is not set
266# CONFIG_INPUT_MOUSE is not set
267# CONFIG_INPUT_JOYSTICK is not set
268# CONFIG_INPUT_TOUCHSCREEN is not set
269# CONFIG_INPUT_MISC is not set
270
271#
272# Hardware I/O ports
273#
274CONFIG_SERIO=y
275# CONFIG_SERIO_I8042 is not set
276# CONFIG_SERIO_SERPORT is not set
277# CONFIG_SERIO_LIBPS2 is not set
278# CONFIG_SERIO_RAW is not set
279# CONFIG_GAMEPORT is not set
280
281#
282# Character devices
283#
284# CONFIG_VT is not set
285# CONFIG_SERIAL_NONSTANDARD is not set
286
287#
288# Serial drivers
289#
290CONFIG_SERIAL_8250=y
291CONFIG_SERIAL_8250_CONSOLE=y
292CONFIG_SERIAL_8250_NR_UARTS=1
293# CONFIG_SERIAL_8250_EXTENDED is not set
294
295#
296# Non-8250 serial port support
297#
298# CONFIG_V850E_UART is not set
299CONFIG_SERIAL_CORE=y
300CONFIG_SERIAL_CORE_CONSOLE=y
301# CONFIG_UNIX98_PTYS is not set
302# CONFIG_LEGACY_PTYS is not set
303
304#
305# IPMI
306#
307# CONFIG_IPMI_HANDLER is not set
308
309#
310# Watchdog Cards
311#
312# CONFIG_WATCHDOG is not set
313# CONFIG_RTC is not set
314# CONFIG_GEN_RTC is not set
315# CONFIG_DTLK is not set
316# CONFIG_R3964 is not set
317
318#
319# Ftape, the floppy tape device driver
320#
321# CONFIG_RAW_DRIVER is not set
322
323#
324# TPM devices
325#
326
327#
328# Multimedia devices
329#
330# CONFIG_VIDEO_DEV is not set
331
332#
333# Digital Video Broadcasting Devices
334#
335
336#
337# File systems
338#
339# CONFIG_EXT2_FS is not set
340# CONFIG_EXT3_FS is not set
341# CONFIG_JBD is not set
342# CONFIG_REISERFS_FS is not set
343# CONFIG_JFS_FS is not set
344# CONFIG_FS_POSIX_ACL is not set
345
346#
347# XFS support
348#
349# CONFIG_XFS_FS is not set
350# CONFIG_MINIX_FS is not set
351CONFIG_ROMFS_FS=y
352# CONFIG_MAGIC_ROM_PTR is not set
353CONFIG_INOTIFY=y
354# CONFIG_QUOTA is not set
355CONFIG_DNOTIFY=y
356# CONFIG_AUTOFS_FS is not set
357# CONFIG_AUTOFS4_FS is not set
358
359#
360# CD-ROM/DVD Filesystems
361#
362# CONFIG_ISO9660_FS is not set
363# CONFIG_UDF_FS is not set
364
365#
366# DOS/FAT/NT Filesystems
367#
368# CONFIG_MSDOS_FS is not set
369# CONFIG_VFAT_FS is not set
370# CONFIG_NTFS_FS is not set
371
372#
373# Pseudo filesystems
374#
375CONFIG_PROC_FS=y
376CONFIG_SYSFS=y
377# CONFIG_TMPFS is not set
378# CONFIG_HUGETLB_PAGE is not set
379CONFIG_RAMFS=y
380
381#
382# Miscellaneous filesystems
383#
384# CONFIG_HFSPLUS_FS is not set
385# CONFIG_JFFS_FS is not set
386# CONFIG_JFFS2_FS is not set
387# CONFIG_CRAMFS is not set
388# CONFIG_VXFS_FS is not set
389# CONFIG_HPFS_FS is not set
390# CONFIG_QNX4FS_FS is not set
391# CONFIG_SYSV_FS is not set
392# CONFIG_UFS_FS is not set
393
394#
395# Partition Types
396#
397# CONFIG_PARTITION_ADVANCED is not set
398CONFIG_MSDOS_PARTITION=y
399
400#
401# Native Language Support
402#
403# CONFIG_NLS is not set
404
405#
406# Graphics support
407#
408# CONFIG_FB is not set
409
410#
411# Sound
412#
413# CONFIG_SOUND is not set
414
415#
416# USB support
417#
418# CONFIG_USB_ARCH_HAS_HCD is not set
419# CONFIG_USB_ARCH_HAS_OHCI is not set
420
421#
422# USB Gadget Support
423#
424# CONFIG_USB_GADGET is not set
425
426#
427# Kernel hacking
428#
429# CONFIG_PRINTK_TIME is not set
430CONFIG_DEBUG_KERNEL=y
431# CONFIG_MAGIC_SYSRQ is not set
432CONFIG_LOG_BUF_SHIFT=14
433# CONFIG_SCHEDSTATS is not set
434# CONFIG_DEBUG_SLAB is not set
435# CONFIG_DEBUG_SPINLOCK is not set
436# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
437# CONFIG_DEBUG_KOBJECT is not set
438CONFIG_DEBUG_INFO=y
439# CONFIG_DEBUG_FS is not set
440# CONFIG_NO_KERNEL_MSG is not set
441
442#
443# Security options
444#
445# CONFIG_KEYS is not set
446# CONFIG_SECURITY is not set
447
448#
449# Cryptographic options
450#
451# CONFIG_CRYPTO is not set
452
453#
454# Hardware crypto devices
455#
456
457#
458# Library routines
459#
460# CONFIG_CRC_CCITT is not set
461# CONFIG_CRC32 is not set
462# CONFIG_LIBCRC32C is not set
diff --git a/arch/v850/configs/sim_defconfig b/arch/v850/configs/sim_defconfig
deleted file mode 100644
index f31ba7398ad0..000000000000
--- a/arch/v850/configs/sim_defconfig
+++ /dev/null
@@ -1,451 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-uc0
4# Fri Sep 2 13:36:43 2005
5#
6# CONFIG_MMU is not set
7# CONFIG_UID16 is not set
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11# CONFIG_ISA is not set
12# CONFIG_ISAPNP is not set
13# CONFIG_EISA is not set
14# CONFIG_MCA is not set
15CONFIG_V850=y
16
17#
18# Processor type and features
19#
20CONFIG_V850E_SIM=y
21# CONFIG_RTE_CB_MA1 is not set
22# CONFIG_RTE_CB_NB85E is not set
23# CONFIG_RTE_CB_ME2 is not set
24# CONFIG_V850E_AS85EP1 is not set
25# CONFIG_V850E2_SIM85E2C is not set
26# CONFIG_V850E2_SIM85E2S is not set
27# CONFIG_V850E2_FPGA85E2C is not set
28# CONFIG_V850E2_ANNA is not set
29CONFIG_V850E=y
30# CONFIG_PCI is not set
31# CONFIG_V850E_INTC is not set
32# CONFIG_V850E_TIMER_D is not set
33# CONFIG_V850E_CACHE is not set
34# CONFIG_V850E2_CACHE is not set
35CONFIG_NO_CACHE=y
36CONFIG_ZERO_BSS=y
37# CONFIG_RESET_GUARD is not set
38CONFIG_LARGE_ALLOCS=y
39CONFIG_FLATMEM=y
40CONFIG_FLAT_NODE_MEM_MAP=y
41
42#
43# Code maturity level options
44#
45# CONFIG_EXPERIMENTAL is not set
46CONFIG_CLEAN_COMPILE=y
47CONFIG_BROKEN_ON_SMP=y
48CONFIG_INIT_ENV_ARG_LIMIT=32
49
50#
51# General setup
52#
53CONFIG_LOCALVERSION=""
54# CONFIG_BSD_PROCESS_ACCT is not set
55# CONFIG_SYSCTL is not set
56# CONFIG_HOTPLUG is not set
57# CONFIG_IKCONFIG is not set
58CONFIG_EMBEDDED=y
59# CONFIG_KALLSYMS is not set
60CONFIG_PRINTK=y
61CONFIG_BUG=y
62# CONFIG_BASE_FULL is not set
63# CONFIG_FUTEX is not set
64# CONFIG_EPOLL is not set
65CONFIG_CC_OPTIMIZE_FOR_SIZE=y
66CONFIG_CC_ALIGN_FUNCTIONS=0
67CONFIG_CC_ALIGN_LABELS=0
68CONFIG_CC_ALIGN_LOOPS=0
69CONFIG_CC_ALIGN_JUMPS=0
70CONFIG_BASE_SMALL=1
71
72#
73# Loadable module support
74#
75CONFIG_MODULES=y
76CONFIG_MODULE_UNLOAD=y
77CONFIG_OBSOLETE_MODPARM=y
78# CONFIG_MODULE_SRCVERSION_ALL is not set
79CONFIG_KMOD=y
80
81#
82# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
83#
84
85#
86# PCCARD (PCMCIA/CardBus) support
87#
88# CONFIG_PCCARD is not set
89
90#
91# PCI Hotplug Support
92#
93
94#
95# Executable file formats
96#
97CONFIG_BINFMT_FLAT=y
98# CONFIG_BINFMT_ZFLAT is not set
99# CONFIG_BINFMT_SHARED_FLAT is not set
100# CONFIG_BINFMT_MISC is not set
101
102#
103# Networking
104#
105# CONFIG_NET is not set
106
107#
108# Generic Driver Options
109#
110CONFIG_STANDALONE=y
111CONFIG_PREVENT_FIRMWARE_BUILD=y
112# CONFIG_FW_LOADER is not set
113# CONFIG_DEBUG_DRIVER is not set
114
115#
116# Memory Technology Devices (MTD)
117#
118CONFIG_MTD=y
119# CONFIG_MTD_DEBUG is not set
120# CONFIG_MTD_CONCAT is not set
121# CONFIG_MTD_PARTITIONS is not set
122
123#
124# User Modules And Translation Layers
125#
126# CONFIG_MTD_CHAR is not set
127CONFIG_MTD_BLOCK=y
128# CONFIG_FTL is not set
129# CONFIG_NFTL is not set
130# CONFIG_INFTL is not set
131
132#
133# RAM/ROM/Flash chip drivers
134#
135# CONFIG_MTD_CFI is not set
136# CONFIG_MTD_JEDECPROBE is not set
137CONFIG_MTD_MAP_BANK_WIDTH_1=y
138CONFIG_MTD_MAP_BANK_WIDTH_2=y
139CONFIG_MTD_MAP_BANK_WIDTH_4=y
140# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
141# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
142# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
143CONFIG_MTD_CFI_I1=y
144CONFIG_MTD_CFI_I2=y
145# CONFIG_MTD_CFI_I4 is not set
146# CONFIG_MTD_CFI_I8 is not set
147# CONFIG_MTD_RAM is not set
148# CONFIG_MTD_ROM is not set
149# CONFIG_MTD_ABSENT is not set
150
151#
152# Mapping drivers for chip access
153#
154# CONFIG_MTD_COMPLEX_MAPPINGS is not set
155# CONFIG_MTD_PLATRAM is not set
156
157#
158# Self-contained MTD device drivers
159#
160CONFIG_MTD_SLRAM=y
161# CONFIG_MTD_PHRAM is not set
162# CONFIG_MTD_MTDRAM is not set
163# CONFIG_MTD_BLKMTD is not set
164
165#
166# Disk-On-Chip Device Drivers
167#
168# CONFIG_MTD_DOC2000 is not set
169# CONFIG_MTD_DOC2001 is not set
170# CONFIG_MTD_DOC2001PLUS is not set
171
172#
173# NAND Flash Device Drivers
174#
175# CONFIG_MTD_NAND is not set
176
177#
178# Parallel port support
179#
180# CONFIG_PARPORT is not set
181
182#
183# Block devices
184#
185# CONFIG_BLK_DEV_FD is not set
186# CONFIG_BLK_DEV_COW_COMMON is not set
187# CONFIG_BLK_DEV_LOOP is not set
188# CONFIG_BLK_DEV_RAM is not set
189CONFIG_BLK_DEV_RAM_COUNT=16
190CONFIG_INITRAMFS_SOURCE=""
191# CONFIG_CDROM_PKTCDVD is not set
192
193#
194# IO Schedulers
195#
196CONFIG_IOSCHED_NOOP=y
197# CONFIG_IOSCHED_AS is not set
198# CONFIG_IOSCHED_DEADLINE is not set
199# CONFIG_IOSCHED_CFQ is not set
200
201#
202# Disk device support
203#
204
205#
206# ATA/ATAPI/MFM/RLL support
207#
208# CONFIG_IDE is not set
209
210#
211# SCSI device support
212#
213# CONFIG_SCSI is not set
214
215#
216# Multi-device support (RAID and LVM)
217#
218# CONFIG_MD is not set
219
220#
221# Fusion MPT device support
222#
223# CONFIG_FUSION is not set
224
225#
226# IEEE 1394 (FireWire) support
227#
228
229#
230# I2O device support
231#
232
233#
234# Network device support
235#
236# CONFIG_NETPOLL is not set
237# CONFIG_NET_POLL_CONTROLLER is not set
238
239#
240# ISDN subsystem
241#
242
243#
244# Input device support
245#
246CONFIG_INPUT=y
247
248#
249# Userland interfaces
250#
251# CONFIG_INPUT_MOUSEDEV is not set
252# CONFIG_INPUT_JOYDEV is not set
253# CONFIG_INPUT_TSDEV is not set
254# CONFIG_INPUT_EVDEV is not set
255# CONFIG_INPUT_EVBUG is not set
256
257#
258# Input Device Drivers
259#
260# CONFIG_INPUT_KEYBOARD is not set
261# CONFIG_INPUT_MOUSE is not set
262# CONFIG_INPUT_JOYSTICK is not set
263# CONFIG_INPUT_TOUCHSCREEN is not set
264# CONFIG_INPUT_MISC is not set
265
266#
267# Hardware I/O ports
268#
269CONFIG_SERIO=y
270# CONFIG_SERIO_I8042 is not set
271# CONFIG_SERIO_SERPORT is not set
272# CONFIG_SERIO_LIBPS2 is not set
273# CONFIG_SERIO_RAW is not set
274# CONFIG_GAMEPORT is not set
275
276#
277# Character devices
278#
279# CONFIG_VT is not set
280# CONFIG_SERIAL_NONSTANDARD is not set
281
282#
283# Serial drivers
284#
285# CONFIG_SERIAL_8250 is not set
286
287#
288# Non-8250 serial port support
289#
290# CONFIG_UNIX98_PTYS is not set
291# CONFIG_LEGACY_PTYS is not set
292
293#
294# IPMI
295#
296# CONFIG_IPMI_HANDLER is not set
297
298#
299# Watchdog Cards
300#
301# CONFIG_WATCHDOG is not set
302# CONFIG_RTC is not set
303# CONFIG_GEN_RTC is not set
304# CONFIG_DTLK is not set
305# CONFIG_R3964 is not set
306
307#
308# Ftape, the floppy tape device driver
309#
310# CONFIG_RAW_DRIVER is not set
311
312#
313# TPM devices
314#
315
316#
317# Multimedia devices
318#
319# CONFIG_VIDEO_DEV is not set
320
321#
322# Digital Video Broadcasting Devices
323#
324
325#
326# File systems
327#
328# CONFIG_EXT2_FS is not set
329# CONFIG_EXT3_FS is not set
330# CONFIG_JBD is not set
331# CONFIG_REISERFS_FS is not set
332# CONFIG_JFS_FS is not set
333# CONFIG_FS_POSIX_ACL is not set
334
335#
336# XFS support
337#
338# CONFIG_XFS_FS is not set
339# CONFIG_MINIX_FS is not set
340CONFIG_ROMFS_FS=y
341# CONFIG_MAGIC_ROM_PTR is not set
342CONFIG_INOTIFY=y
343# CONFIG_QUOTA is not set
344CONFIG_DNOTIFY=y
345# CONFIG_AUTOFS_FS is not set
346# CONFIG_AUTOFS4_FS is not set
347
348#
349# CD-ROM/DVD Filesystems
350#
351# CONFIG_ISO9660_FS is not set
352# CONFIG_UDF_FS is not set
353
354#
355# DOS/FAT/NT Filesystems
356#
357# CONFIG_MSDOS_FS is not set
358# CONFIG_VFAT_FS is not set
359# CONFIG_NTFS_FS is not set
360
361#
362# Pseudo filesystems
363#
364CONFIG_PROC_FS=y
365CONFIG_SYSFS=y
366# CONFIG_TMPFS is not set
367# CONFIG_HUGETLB_PAGE is not set
368CONFIG_RAMFS=y
369
370#
371# Miscellaneous filesystems
372#
373# CONFIG_HFSPLUS_FS is not set
374# CONFIG_JFFS_FS is not set
375# CONFIG_JFFS2_FS is not set
376# CONFIG_CRAMFS is not set
377# CONFIG_VXFS_FS is not set
378# CONFIG_HPFS_FS is not set
379# CONFIG_QNX4FS_FS is not set
380# CONFIG_SYSV_FS is not set
381# CONFIG_UFS_FS is not set
382
383#
384# Partition Types
385#
386# CONFIG_PARTITION_ADVANCED is not set
387CONFIG_MSDOS_PARTITION=y
388
389#
390# Native Language Support
391#
392# CONFIG_NLS is not set
393
394#
395# Graphics support
396#
397# CONFIG_FB is not set
398
399#
400# Sound
401#
402# CONFIG_SOUND is not set
403
404#
405# USB support
406#
407# CONFIG_USB_ARCH_HAS_HCD is not set
408# CONFIG_USB_ARCH_HAS_OHCI is not set
409
410#
411# USB Gadget Support
412#
413# CONFIG_USB_GADGET is not set
414
415#
416# Kernel hacking
417#
418# CONFIG_PRINTK_TIME is not set
419CONFIG_DEBUG_KERNEL=y
420# CONFIG_MAGIC_SYSRQ is not set
421CONFIG_LOG_BUF_SHIFT=14
422# CONFIG_SCHEDSTATS is not set
423# CONFIG_DEBUG_SLAB is not set
424# CONFIG_DEBUG_SPINLOCK is not set
425# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
426# CONFIG_DEBUG_KOBJECT is not set
427CONFIG_DEBUG_INFO=y
428# CONFIG_DEBUG_FS is not set
429# CONFIG_NO_KERNEL_MSG is not set
430
431#
432# Security options
433#
434# CONFIG_KEYS is not set
435# CONFIG_SECURITY is not set
436
437#
438# Cryptographic options
439#
440# CONFIG_CRYPTO is not set
441
442#
443# Hardware crypto devices
444#
445
446#
447# Library routines
448#
449# CONFIG_CRC_CCITT is not set
450# CONFIG_CRC32 is not set
451# CONFIG_LIBCRC32C is not set
diff --git a/arch/v850/kernel/Makefile b/arch/v850/kernel/Makefile
deleted file mode 100644
index da5889c53576..000000000000
--- a/arch/v850/kernel/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
1#
2# arch/v850/kernel/Makefile
3#
4# Copyright (C) 2001,02,03 NEC Electronics Corporation
5# Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6#
7# This file is subject to the terms and conditions of the GNU General Public
8# License. See the file "COPYING" in the main directory of this archive
9# for more details.
10#
11
12extra-y := head.o init_task.o vmlinux.lds
13
14obj-y += intv.o entry.o process.o syscalls.o time.o setup.o \
15 signal.o irq.o mach.o ptrace.o bug.o
16obj-$(CONFIG_MODULES) += module.o v850_ksyms.o
17# chip-specific code
18obj-$(CONFIG_V850E_MA1) += ma.o
19obj-$(CONFIG_V850E_ME2) += me2.o
20obj-$(CONFIG_V850E_TEG) += teg.o
21obj-$(CONFIG_V850E_AS85EP1) += as85ep1.o
22obj-$(CONFIG_V850E2_ANNA) += anna.o
23# platform-specific code
24obj-$(CONFIG_V850E_SIM) += sim.o simcons.o
25obj-$(CONFIG_V850E2_SIM85E2) += sim85e2.o memcons.o
26obj-$(CONFIG_V850E2_FPGA85E2C) += fpga85e2c.o memcons.o
27obj-$(CONFIG_RTE_CB) += rte_cb.o rte_cb_leds.o
28obj-$(CONFIG_RTE_CB_MA1) += rte_ma1_cb.o
29obj-$(CONFIG_RTE_CB_ME2) += rte_me2_cb.o
30obj-$(CONFIG_RTE_CB_NB85E) += rte_nb85e_cb.o
31obj-$(CONFIG_RTE_CB_MULTI) += rte_cb_multi.o
32obj-$(CONFIG_RTE_MB_A_PCI) += rte_mb_a_pci.o
33obj-$(CONFIG_RTE_GBUS_INT) += gbus_int.o
34# feature-specific code
35obj-$(CONFIG_V850E_INTC) += v850e_intc.o
36obj-$(CONFIG_V850E_TIMER_D) += v850e_timer_d.o v850e_utils.o
37obj-$(CONFIG_V850E_CACHE) += v850e_cache.o
38obj-$(CONFIG_V850E2_CACHE) += v850e2_cache.o
39obj-$(CONFIG_V850E_HIGHRES_TIMER) += highres_timer.o
40obj-$(CONFIG_PROC_FS) += procfs.o
diff --git a/arch/v850/kernel/anna-rom.ld b/arch/v850/kernel/anna-rom.ld
deleted file mode 100644
index 7c54e7e3f1b1..000000000000
--- a/arch/v850/kernel/anna-rom.ld
+++ /dev/null
@@ -1,16 +0,0 @@
1/* Linker script for the Midas labs Anna V850E2 evaluation board
2 (CONFIG_V850E2_ANNA), with kernel in ROM (CONFIG_ROM_KERNEL). */
3
4MEMORY {
5 /* 8MB of flash ROM. */
6 ROM : ORIGIN = 0, LENGTH = 0x00800000
7
8 /* 1MB of static RAM. This memory is mirrored 64 times. */
9 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
10 /* 64MB of DRAM. */
11 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
12}
13
14SECTIONS {
15 ROMK_SECTIONS(ROM, SRAM)
16}
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c
deleted file mode 100644
index 5978a25170fb..000000000000
--- a/arch/v850/kernel/anna.c
+++ /dev/null
@@ -1,202 +0,0 @@
1/*
2 * arch/v850/kernel/anna.c -- Anna V850E2 evaluation chip/board
3 *
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/bootmem.h>
18#include <linux/major.h>
19#include <linux/irq.h>
20
21#include <asm/machdep.h>
22#include <asm/atomic.h>
23#include <asm/page.h>
24#include <asm/v850e_timer_d.h>
25#include <asm/v850e_uart.h>
26
27#include "mach.h"
28
29
30/* SRAM and SDRAM are vaguely contiguous (with a big hole in between; see
31 mach_reserve_bootmem for details); use both as one big area. */
32#define RAM_START SRAM_ADDR
33#define RAM_END (SDRAM_ADDR + SDRAM_SIZE)
34
35/* The bits of this port are connected to an 8-LED bar-graph. */
36#define LEDS_PORT 0
37
38
39static void anna_led_tick (void);
40
41
42void __init mach_early_init (void)
43{
44 ANNA_ILBEN = 0;
45
46 V850E2_CSC(0) = 0x402F;
47 V850E2_CSC(1) = 0x4000;
48 V850E2_BPC = 0;
49 V850E2_BSC = 0xAAAA;
50 V850E2_BEC = 0;
51
52#if 0
53 V850E2_BHC = 0xFFFF; /* icache all memory, dcache all */
54#else
55 V850E2_BHC = 0; /* cache no memory */
56#endif
57 V850E2_BCT(0) = 0xB088;
58 V850E2_BCT(1) = 0x0008;
59 V850E2_DWC(0) = 0x0027;
60 V850E2_DWC(1) = 0;
61 V850E2_BCC = 0x0006;
62 V850E2_ASC = 0;
63 V850E2_LBS = 0x0089;
64 V850E2_SCR(3) = 0x21A9;
65 V850E2_RFS(3) = 0x8121;
66
67 v850e_intc_disable_irqs ();
68}
69
70void __init mach_setup (char **cmdline)
71{
72 ANNA_PORT_PM (LEDS_PORT) = 0; /* Make all LED pins output pins. */
73 mach_tick = anna_led_tick;
74}
75
76void __init mach_get_physical_ram (unsigned long *ram_start,
77 unsigned long *ram_len)
78{
79 *ram_start = RAM_START;
80 *ram_len = RAM_END - RAM_START;
81}
82
83void __init mach_reserve_bootmem ()
84{
85 /* The space between SRAM and SDRAM is filled with duplicate
86 images of SRAM. Prevent the kernel from using them. */
87 reserve_bootmem (SRAM_ADDR + SRAM_SIZE,
88 SDRAM_ADDR - (SRAM_ADDR + SRAM_SIZE),
89 BOOTMEM_DEFAULT);
90}
91
92void mach_gettimeofday (struct timespec *tv)
93{
94 tv->tv_sec = 0;
95 tv->tv_nsec = 0;
96}
97
98void __init mach_sched_init (struct irqaction *timer_action)
99{
100 /* Start hardware timer. */
101 v850e_timer_d_configure (0, HZ);
102 /* Install timer interrupt handler. */
103 setup_irq (IRQ_INTCMD(0), timer_action);
104}
105
106static struct v850e_intc_irq_init irq_inits[] = {
107 { "IRQ", 0, NUM_MACH_IRQS, 1, 7 },
108 { "PIN", IRQ_INTP(0), IRQ_INTP_NUM, 1, 4 },
109 { "CCC", IRQ_INTCCC(0), IRQ_INTCCC_NUM, 1, 5 },
110 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 },
111 { "DMA", IRQ_INTDMA(0), IRQ_INTDMA_NUM, 1, 2 },
112 { "DMXER", IRQ_INTDMXER,1, 1, 2 },
113 { "SRE", IRQ_INTSRE(0), IRQ_INTSRE_NUM, 3, 3 },
114 { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 3, 4 },
115 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
116 { 0 }
117};
118#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
119
120static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
121
122void __init mach_init_irqs (void)
123{
124 v850e_intc_init_irq_types (irq_inits, hw_itypes);
125}
126
127void machine_restart (char *__unused)
128{
129#ifdef CONFIG_RESET_GUARD
130 disable_reset_guard ();
131#endif
132 asm ("jmp r0"); /* Jump to the reset vector. */
133}
134
135void machine_halt (void)
136{
137#ifdef CONFIG_RESET_GUARD
138 disable_reset_guard ();
139#endif
140 local_irq_disable (); /* Ignore all interrupts. */
141 ANNA_PORT_IO(LEDS_PORT) = 0xAA; /* Note that we halted. */
142 for (;;)
143 asm ("halt; nop; nop; nop; nop; nop");
144}
145
146void machine_power_off (void)
147{
148 machine_halt ();
149}
150
151/* Called before configuring an on-chip UART. */
152void anna_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
153{
154 /* The Anna connects some general-purpose I/O pins on the CPU to
155 the RTS/CTS lines of UART 1's serial connection. I/O pins P07
156 and P37 are RTS and CTS respectively. */
157 if (chan == 1) {
158 ANNA_PORT_PM(0) &= ~0x80; /* P07 in output mode */
159 ANNA_PORT_PM(3) |= 0x80; /* P37 in input mode */
160 }
161}
162
163/* Minimum and maximum bounds for the moving upper LED boundary in the
164 clock tick display. We can't use the last bit because it's used for
165 UART0's CTS output. */
166#define MIN_MAX_POS 0
167#define MAX_MAX_POS 6
168
169/* There are MAX_MAX_POS^2 - MIN_MAX_POS^2 cycles in the animation, so if
170 we pick 6 and 0 as above, we get 49 cycles, which is when divided into
171 the standard 100 value for HZ, gives us an almost 1s total time. */
172#define TICKS_PER_FRAME \
173 (HZ / (MAX_MAX_POS * MAX_MAX_POS - MIN_MAX_POS * MIN_MAX_POS))
174
175static void anna_led_tick ()
176{
177 static unsigned counter = 0;
178
179 if (++counter == TICKS_PER_FRAME) {
180 static int pos = 0, max_pos = MAX_MAX_POS, dir = 1;
181
182 if (dir > 0 && pos == max_pos) {
183 dir = -1;
184 if (max_pos == MIN_MAX_POS)
185 max_pos = MAX_MAX_POS;
186 else
187 max_pos--;
188 } else {
189 if (dir < 0 && pos == 0)
190 dir = 1;
191
192 if (pos + dir <= max_pos) {
193 /* Each bit of port 0 has a LED. */
194 clear_bit (pos, &ANNA_PORT_IO(LEDS_PORT));
195 pos += dir;
196 set_bit (pos, &ANNA_PORT_IO(LEDS_PORT));
197 }
198 }
199
200 counter = 0;
201 }
202}
diff --git a/arch/v850/kernel/anna.ld b/arch/v850/kernel/anna.ld
deleted file mode 100644
index df7f80f2833d..000000000000
--- a/arch/v850/kernel/anna.ld
+++ /dev/null
@@ -1,20 +0,0 @@
1/* Linker script for the Midas labs Anna V850E2 evaluation board
2 (CONFIG_V850E2_ANNA). */
3
4MEMORY {
5 /* 256KB of internal memory (followed by one mirror). */
6 iMEM0 : ORIGIN = 0, LENGTH = 0x00040000
7 /* 256KB of internal memory (followed by one mirror). */
8 iMEM1 : ORIGIN = 0x00040000, LENGTH = 0x00040000
9
10 /* 1MB of static RAM. This memory is mirrored 64 times. */
11 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
12 /* 64MB of DRAM. */
13 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
14}
15
16SECTIONS {
17 .intv : { INTV_CONTENTS } > iMEM0
18 .sram : { RAMK_KRAM_CONTENTS } > SRAM
19 .root : { ROOT_FS_CONTENTS } > SDRAM
20}
diff --git a/arch/v850/kernel/as85ep1-rom.ld b/arch/v850/kernel/as85ep1-rom.ld
deleted file mode 100644
index fe2a9a3ab525..000000000000
--- a/arch/v850/kernel/as85ep1-rom.ld
+++ /dev/null
@@ -1,21 +0,0 @@
1/* Linker script for the NEC AS85EP1 V850E evaluation board
2 (CONFIG_V850E_AS85EP1), with kernel in ROM (CONFIG_ROM_KERNEL). */
3
4MEMORY {
5 /* 4MB of flash ROM. */
6 ROM : ORIGIN = 0, LENGTH = 0x00400000
7
8 /* 1MB of static RAM. */
9 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
10
11 /* About 58MB of DRAM. This can actually be at one of two
12 positions, determined by jumper JP3; we have to use the first
13 position because the second is partially out of processor
14 instruction addressing range (though in the second position
15 there's actually 64MB available). */
16 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
17}
18
19SECTIONS {
20 ROMK_SECTIONS(ROM, SRAM)
21}
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c
deleted file mode 100644
index b525ecf3aea4..000000000000
--- a/arch/v850/kernel/as85ep1.c
+++ /dev/null
@@ -1,234 +0,0 @@
1/*
2 * arch/v850/kernel/as85ep1.c -- AS85EP1 V850E evaluation chip/board
3 *
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/bootmem.h>
18#include <linux/major.h>
19#include <linux/irq.h>
20
21#include <asm/machdep.h>
22#include <asm/atomic.h>
23#include <asm/page.h>
24#include <asm/v850e_timer_d.h>
25#include <asm/v850e_uart.h>
26
27#include "mach.h"
28
29
30/* SRAM and SDRAM are vaguely contiguous (with a big hole in between; see
31 mach_reserve_bootmem for details); use both as one big area. */
32#define RAM_START SRAM_ADDR
33#define RAM_END (SDRAM_ADDR + SDRAM_SIZE)
34
35/* The bits of this port are connected to an 8-LED bar-graph. */
36#define LEDS_PORT 4
37
38
39static void as85ep1_led_tick (void);
40
41extern char _intv_copy_src_start, _intv_copy_src_end;
42extern char _intv_copy_dst_start;
43
44
45void __init mach_early_init (void)
46{
47#ifndef CONFIG_ROM_KERNEL
48 const u32 *src;
49 register u32 *dst asm ("ep");
50#endif
51
52 AS85EP1_CSC(0) = 0x0403;
53 AS85EP1_BCT(0) = 0xB8B8;
54 AS85EP1_DWC(0) = 0x0104;
55 AS85EP1_BCC = 0x0012;
56 AS85EP1_ASC = 0;
57 AS85EP1_LBS = 0x00A9;
58
59 AS85EP1_PORT_PMC(6) = 0xFF; /* valid A0,A1,A20-A25 */
60 AS85EP1_PORT_PMC(7) = 0x0E; /* valid CS1-CS3 */
61 AS85EP1_PORT_PMC(9) = 0xFF; /* valid D16-D23 */
62 AS85EP1_PORT_PMC(10) = 0xFF; /* valid D24-D31 */
63
64 AS85EP1_RFS(1) = 0x800c;
65 AS85EP1_RFS(3) = 0x800c;
66 AS85EP1_SCR(1) = 0x20A9;
67 AS85EP1_SCR(3) = 0x20A9;
68
69#ifndef CONFIG_ROM_KERNEL
70 /* The early chip we have is buggy, and writing the interrupt
71 vectors into low RAM may screw up, so for non-ROM kernels, we
72 only rely on the reset vector being downloaded, and copy the
73 rest of the interrupt vectors into place here. The specific bug
74 is that writing address N, where (N & 0x10) == 0x10, will _also_
75 write to address (N - 0x10). We avoid this (effectively) by
76 writing in 16-byte chunks backwards from the end. */
77
78 AS85EP1_IRAMM = 0x3; /* "write-mode" for the internal instruction memory */
79
80 src = (u32 *)(((u32)&_intv_copy_src_end - 1) & ~0xF);
81 dst = (u32 *)&_intv_copy_dst_start
82 + (src - (u32 *)&_intv_copy_src_start);
83 do {
84 u32 t0 = src[0], t1 = src[1], t2 = src[2], t3 = src[3];
85 dst[0] = t0; dst[1] = t1; dst[2] = t2; dst[3] = t3;
86 dst -= 4;
87 src -= 4;
88 } while (src > (u32 *)&_intv_copy_src_start);
89
90 AS85EP1_IRAMM = 0x0; /* "read-mode" for the internal instruction memory */
91#endif /* !CONFIG_ROM_KERNEL */
92
93 v850e_intc_disable_irqs ();
94}
95
96void __init mach_setup (char **cmdline)
97{
98 AS85EP1_PORT_PMC (LEDS_PORT) = 0; /* Make the LEDs port an I/O port. */
99 AS85EP1_PORT_PM (LEDS_PORT) = 0; /* Make all the bits output pins. */
100 mach_tick = as85ep1_led_tick;
101}
102
103void __init mach_get_physical_ram (unsigned long *ram_start,
104 unsigned long *ram_len)
105{
106 *ram_start = RAM_START;
107 *ram_len = RAM_END - RAM_START;
108}
109
110/* Convenience macros. */
111#define SRAM_END (SRAM_ADDR + SRAM_SIZE)
112#define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
113
114void __init mach_reserve_bootmem ()
115{
116 if (SDRAM_ADDR < RAM_END && SDRAM_ADDR > RAM_START)
117 /* We can't use the space between SRAM and SDRAM, so
118 prevent the kernel from trying. */
119 reserve_bootmem(SRAM_END, SDRAM_ADDR - SRAM_END,
120 BOOTMEM_DEFAULT);
121}
122
123void mach_gettimeofday (struct timespec *tv)
124{
125 tv->tv_sec = 0;
126 tv->tv_nsec = 0;
127}
128
129void __init mach_sched_init (struct irqaction *timer_action)
130{
131 /* Start hardware timer. */
132 v850e_timer_d_configure (0, HZ);
133 /* Install timer interrupt handler. */
134 setup_irq (IRQ_INTCMD(0), timer_action);
135}
136
137static struct v850e_intc_irq_init irq_inits[] = {
138 { "IRQ", 0, NUM_MACH_IRQS, 1, 7 },
139 { "CCC", IRQ_INTCCC(0), IRQ_INTCCC_NUM, 1, 5 },
140 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 },
141 { "SRE", IRQ_INTSRE(0), IRQ_INTSRE_NUM, 3, 3 },
142 { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 3, 4 },
143 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
144 { 0 }
145};
146#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
147
148static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
149
150void __init mach_init_irqs (void)
151{
152 v850e_intc_init_irq_types (irq_inits, hw_itypes);
153}
154
155void machine_restart (char *__unused)
156{
157#ifdef CONFIG_RESET_GUARD
158 disable_reset_guard ();
159#endif
160 asm ("jmp r0"); /* Jump to the reset vector. */
161}
162
163void machine_halt (void)
164{
165#ifdef CONFIG_RESET_GUARD
166 disable_reset_guard ();
167#endif
168 local_irq_disable (); /* Ignore all interrupts. */
169 AS85EP1_PORT_IO (LEDS_PORT) = 0xAA; /* Note that we halted. */
170 for (;;)
171 asm ("halt; nop; nop; nop; nop; nop");
172}
173
174void machine_power_off (void)
175{
176 machine_halt ();
177}
178
179/* Called before configuring an on-chip UART. */
180void as85ep1_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
181{
182 /* Make the shared uart/port pins be uart pins. */
183 AS85EP1_PORT_PMC(3) |= (0x5 << chan);
184
185 /* The AS85EP1 connects some general-purpose I/O pins on the CPU to
186 the RTS/CTS lines of UART 1's serial connection. I/O pins P53
187 and P54 are RTS and CTS respectively. */
188 if (chan == 1) {
189 /* Put P53 & P54 in I/O port mode. */
190 AS85EP1_PORT_PMC(5) &= ~0x18;
191 /* Make P53 an output, and P54 an input. */
192 AS85EP1_PORT_PM(5) |= 0x10;
193 }
194}
195
196/* Minimum and maximum bounds for the moving upper LED boundary in the
197 clock tick display. */
198#define MIN_MAX_POS 0
199#define MAX_MAX_POS 7
200
201/* There are MAX_MAX_POS^2 - MIN_MAX_POS^2 cycles in the animation, so if
202 we pick 6 and 0 as above, we get 49 cycles, which is when divided into
203 the standard 100 value for HZ, gives us an almost 1s total time. */
204#define TICKS_PER_FRAME \
205 (HZ / (MAX_MAX_POS * MAX_MAX_POS - MIN_MAX_POS * MIN_MAX_POS))
206
207static void as85ep1_led_tick ()
208{
209 static unsigned counter = 0;
210
211 if (++counter == TICKS_PER_FRAME) {
212 static int pos = 0, max_pos = MAX_MAX_POS, dir = 1;
213
214 if (dir > 0 && pos == max_pos) {
215 dir = -1;
216 if (max_pos == MIN_MAX_POS)
217 max_pos = MAX_MAX_POS;
218 else
219 max_pos--;
220 } else {
221 if (dir < 0 && pos == 0)
222 dir = 1;
223
224 if (pos + dir <= max_pos) {
225 /* Each bit of port 0 has a LED. */
226 set_bit (pos, &AS85EP1_PORT_IO(LEDS_PORT));
227 pos += dir;
228 clear_bit (pos, &AS85EP1_PORT_IO(LEDS_PORT));
229 }
230 }
231
232 counter = 0;
233 }
234}
diff --git a/arch/v850/kernel/as85ep1.ld b/arch/v850/kernel/as85ep1.ld
deleted file mode 100644
index ef2c4399063e..000000000000
--- a/arch/v850/kernel/as85ep1.ld
+++ /dev/null
@@ -1,49 +0,0 @@
1/* Linker script for the NEC AS85EP1 V850E evaluation board
2 (CONFIG_V850E_AS85EP1). */
3
4MEMORY {
5 /* 1MB of internal instruction memory. */
6 iMEM0 : ORIGIN = 0, LENGTH = 0x00100000
7
8 /* 1MB of static RAM. */
9 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
10
11 /* About 58MB of DRAM. This can actually be at one of two
12 positions, determined by jump JP3; we have to use the first
13 position because the second is partially out of processor
14 instruction addressing range (though in the second position
15 there's actually 64MB available). */
16 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
17}
18
19SECTIONS {
20 .resetv : {
21 __intv_start = . ;
22 *(.intv.reset) /* Reset vector */
23 } > iMEM0
24
25 .sram : {
26 RAMK_KRAM_CONTENTS
27
28 /* We stick most of the interrupt vectors here; they'll be
29 copied into the proper location by the early init code (we
30 can't put them directly in the right place because of
31 hardware bugs). The vectors shouldn't need to be
32 relocated, so we don't have to use `> ... AT> ...' to
33 split the load/vm addresses (and we can't because of
34 problems with the loader). */
35 . = ALIGN (0x10) ;
36 __intv_copy_src_start = . ;
37 *(.intv.common) /* Vectors common to all v850e proc. */
38 *(.intv.mach) /* Machine-specific int. vectors. */
39 . = ALIGN (0x10) ;
40 __intv_copy_src_end = . ;
41 } > SRAM
42
43 /* Where we end up putting the vectors. */
44 __intv_copy_dst_start = 0x10 ;
45 __intv_copy_dst_end = __intv_copy_dst_start + (__intv_copy_src_end - __intv_copy_src_start) ;
46 __intv_end = __intv_copy_dst_end ;
47
48 .root : { ROOT_FS_CONTENTS } > SDRAM
49}
diff --git a/arch/v850/kernel/asm-offsets.c b/arch/v850/kernel/asm-offsets.c
deleted file mode 100644
index 581e6986a776..000000000000
--- a/arch/v850/kernel/asm-offsets.c
+++ /dev/null
@@ -1,58 +0,0 @@
1/*
2 * This program is used to generate definitions needed by
3 * assembly language modules.
4 *
5 * We use the technique used in the OSF Mach kernel code:
6 * generate asm statements containing #defines,
7 * compile this file to assembler, and then extract the
8 * #defines from the assembly-language output.
9 */
10
11#include <linux/stddef.h>
12#include <linux/sched.h>
13#include <linux/kernel_stat.h>
14#include <linux/ptrace.h>
15#include <linux/hardirq.h>
16#include <linux/kbuild.h>
17
18#include <asm/irq.h>
19#include <asm/errno.h>
20
21int main (void)
22{
23 /* offsets into the task struct */
24 DEFINE (TASK_STATE, offsetof (struct task_struct, state));
25 DEFINE (TASK_FLAGS, offsetof (struct task_struct, flags));
26 DEFINE (TASK_PTRACE, offsetof (struct task_struct, ptrace));
27 DEFINE (TASK_BLOCKED, offsetof (struct task_struct, blocked));
28 DEFINE (TASK_THREAD, offsetof (struct task_struct, thread));
29 DEFINE (TASK_THREAD_INFO, offsetof (struct task_struct, stack));
30 DEFINE (TASK_MM, offsetof (struct task_struct, mm));
31 DEFINE (TASK_ACTIVE_MM, offsetof (struct task_struct, active_mm));
32 DEFINE (TASK_PID, offsetof (struct task_struct, pid));
33
34 /* offsets into the kernel_stat struct */
35 DEFINE (STAT_IRQ, offsetof (struct kernel_stat, irqs));
36
37
38 /* signal defines */
39 DEFINE (SIGSEGV, SIGSEGV);
40 DEFINE (SEGV_MAPERR, SEGV_MAPERR);
41 DEFINE (SIGTRAP, SIGTRAP);
42 DEFINE (SIGCHLD, SIGCHLD);
43 DEFINE (SIGILL, SIGILL);
44 DEFINE (TRAP_TRACE, TRAP_TRACE);
45
46 /* ptrace flag bits */
47 DEFINE (PT_PTRACED, PT_PTRACED);
48 DEFINE (PT_DTRACE, PT_DTRACE);
49
50 /* error values */
51 DEFINE (ENOSYS, ENOSYS);
52
53 /* clone flag bits */
54 DEFINE (CLONE_VFORK, CLONE_VFORK);
55 DEFINE (CLONE_VM, CLONE_VM);
56
57 return 0;
58}
diff --git a/arch/v850/kernel/bug.c b/arch/v850/kernel/bug.c
deleted file mode 100644
index c78cf750915a..000000000000
--- a/arch/v850/kernel/bug.c
+++ /dev/null
@@ -1,142 +0,0 @@
1/*
2 * arch/v850/kernel/bug.c -- Bug reporting functions
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/reboot.h>
16#include <linux/sched.h>
17#include <linux/module.h>
18
19#include <asm/errno.h>
20#include <asm/ptrace.h>
21#include <asm/processor.h>
22#include <asm/current.h>
23
24/* We should use __builtin_return_address, but it doesn't work in gcc-2.90
25 (which is currently our standard compiler on the v850). */
26#define ret_addr() ({ register u32 lp asm ("lp"); lp; })
27#define stack_addr() ({ register u32 sp asm ("sp"); sp; })
28
29void __bug ()
30{
31 printk (KERN_CRIT "kernel BUG at PC 0x%x (SP ~0x%x)!\n",
32 ret_addr() - 4, /* - 4 for `jarl' */
33 stack_addr());
34 machine_halt ();
35}
36
37int bad_trap (int trap_num, struct pt_regs *regs)
38{
39 printk (KERN_CRIT
40 "unimplemented trap %d called at 0x%08lx, pid %d!\n",
41 trap_num, regs->pc, current->pid);
42 return -ENOSYS;
43}
44
45#ifdef CONFIG_RESET_GUARD
46void unexpected_reset (unsigned long ret_addr, unsigned long kmode,
47 struct task_struct *task, unsigned long sp)
48{
49 printk (KERN_CRIT
50 "unexpected reset in %s mode, pid %d"
51 " (ret_addr = 0x%lx, sp = 0x%lx)\n",
52 kmode ? "kernel" : "user",
53 task ? task->pid : -1,
54 ret_addr, sp);
55
56 machine_halt ();
57}
58#endif /* CONFIG_RESET_GUARD */
59
60
61
62struct spec_reg_name {
63 const char *name;
64 int gpr;
65};
66
67struct spec_reg_name spec_reg_names[] = {
68 { "sp", GPR_SP },
69 { "gp", GPR_GP },
70 { "tp", GPR_TP },
71 { "ep", GPR_EP },
72 { "lp", GPR_LP },
73 { 0, 0 }
74};
75
76void show_regs (struct pt_regs *regs)
77{
78 int gpr_base, gpr_offs;
79
80 printk (" pc 0x%08lx psw 0x%08lx kernel_mode %d\n",
81 regs->pc, regs->psw, regs->kernel_mode);
82 printk (" ctpc 0x%08lx ctpsw 0x%08lx ctbp 0x%08lx\n",
83 regs->ctpc, regs->ctpsw, regs->ctbp);
84
85 for (gpr_base = 0; gpr_base < NUM_GPRS; gpr_base += 4) {
86 for (gpr_offs = 0; gpr_offs < 4; gpr_offs++) {
87 int gpr = gpr_base + gpr_offs;
88 long val = regs->gpr[gpr];
89 struct spec_reg_name *srn;
90
91 for (srn = spec_reg_names; srn->name; srn++)
92 if (srn->gpr == gpr)
93 break;
94
95 if (srn->name)
96 printk ("%7s 0x%08lx", srn->name, val);
97 else
98 printk (" r%02d 0x%08lx", gpr, val);
99 }
100
101 printk ("\n");
102 }
103}
104
105/*
106 * TASK is a pointer to the task whose backtrace we want to see (or NULL
107 * for current task), SP is the stack pointer of the first frame that
108 * should be shown in the back trace (or NULL if the entire call-chain of
109 * the task should be shown).
110 */
111void show_stack (struct task_struct *task, unsigned long *sp)
112{
113 unsigned long addr, end;
114
115 if (sp)
116 addr = (unsigned long)sp;
117 else if (task)
118 addr = task_sp (task);
119 else
120 addr = stack_addr ();
121
122 addr = addr & ~3;
123 end = (addr + THREAD_SIZE - 1) & THREAD_MASK;
124
125 while (addr < end) {
126 printk ("%8lX: ", addr);
127 while (addr < end) {
128 printk (" %8lX", *(unsigned long *)addr);
129 addr += sizeof (unsigned long);
130 if (! (addr & 0xF))
131 break;
132 }
133 printk ("\n");
134 }
135}
136
137void dump_stack ()
138{
139 show_stack (0, 0);
140}
141
142EXPORT_SYMBOL(dump_stack);
diff --git a/arch/v850/kernel/entry.S b/arch/v850/kernel/entry.S
deleted file mode 100644
index e4327a8d6bcd..000000000000
--- a/arch/v850/kernel/entry.S
+++ /dev/null
@@ -1,1121 +0,0 @@
1/*
2 * arch/v850/kernel/entry.S -- Low-level system-call handling, trap handlers,
3 * and context-switching
4 *
5 * Copyright (C) 2001,02,03 NEC Electronics Corporation
6 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/sys.h>
16
17#include <asm/entry.h>
18#include <asm/current.h>
19#include <asm/thread_info.h>
20#include <asm/clinkage.h>
21#include <asm/processor.h>
22#include <asm/irq.h>
23#include <asm/errno.h>
24
25#include <asm/asm-offsets.h>
26
27
28/* Make a slightly more convenient alias for C_SYMBOL_NAME. */
29#define CSYM C_SYMBOL_NAME
30
31
32/* The offset of the struct pt_regs in a state-save-frame on the stack. */
33#define PTO STATE_SAVE_PT_OFFSET
34
35
36/* Save argument registers to the state-save-frame pointed to by EP. */
37#define SAVE_ARG_REGS \
38 sst.w r6, PTO+PT_GPR(6)[ep]; \
39 sst.w r7, PTO+PT_GPR(7)[ep]; \
40 sst.w r8, PTO+PT_GPR(8)[ep]; \
41 sst.w r9, PTO+PT_GPR(9)[ep]
42/* Restore argument registers from the state-save-frame pointed to by EP. */
43#define RESTORE_ARG_REGS \
44 sld.w PTO+PT_GPR(6)[ep], r6; \
45 sld.w PTO+PT_GPR(7)[ep], r7; \
46 sld.w PTO+PT_GPR(8)[ep], r8; \
47 sld.w PTO+PT_GPR(9)[ep], r9
48
49/* Save value return registers to the state-save-frame pointed to by EP. */
50#define SAVE_RVAL_REGS \
51 sst.w r10, PTO+PT_GPR(10)[ep]; \
52 sst.w r11, PTO+PT_GPR(11)[ep]
53/* Restore value return registers from the state-save-frame pointed to by EP. */
54#define RESTORE_RVAL_REGS \
55 sld.w PTO+PT_GPR(10)[ep], r10; \
56 sld.w PTO+PT_GPR(11)[ep], r11
57
58
59#define SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS \
60 sst.w r1, PTO+PT_GPR(1)[ep]; \
61 sst.w r5, PTO+PT_GPR(5)[ep]
62#define SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL \
63 sst.w r12, PTO+PT_GPR(12)[ep]; \
64 sst.w r13, PTO+PT_GPR(13)[ep]; \
65 sst.w r14, PTO+PT_GPR(14)[ep]; \
66 sst.w r15, PTO+PT_GPR(15)[ep]; \
67 sst.w r16, PTO+PT_GPR(16)[ep]; \
68 sst.w r17, PTO+PT_GPR(17)[ep]; \
69 sst.w r18, PTO+PT_GPR(18)[ep]; \
70 sst.w r19, PTO+PT_GPR(19)[ep]
71#define RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS \
72 sld.w PTO+PT_GPR(1)[ep], r1; \
73 sld.w PTO+PT_GPR(5)[ep], r5
74#define RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL \
75 sld.w PTO+PT_GPR(12)[ep], r12; \
76 sld.w PTO+PT_GPR(13)[ep], r13; \
77 sld.w PTO+PT_GPR(14)[ep], r14; \
78 sld.w PTO+PT_GPR(15)[ep], r15; \
79 sld.w PTO+PT_GPR(16)[ep], r16; \
80 sld.w PTO+PT_GPR(17)[ep], r17; \
81 sld.w PTO+PT_GPR(18)[ep], r18; \
82 sld.w PTO+PT_GPR(19)[ep], r19
83
84/* Save `call clobbered' registers to the state-save-frame pointed to by EP. */
85#define SAVE_CALL_CLOBBERED_REGS \
86 SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \
87 SAVE_ARG_REGS; \
88 SAVE_RVAL_REGS; \
89 SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL
90/* Restore `call clobbered' registers from the state-save-frame pointed to
91 by EP. */
92#define RESTORE_CALL_CLOBBERED_REGS \
93 RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \
94 RESTORE_ARG_REGS; \
95 RESTORE_RVAL_REGS; \
96 RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL
97
98/* Save `call clobbered' registers except for the return-value registers
99 to the state-save-frame pointed to by EP. */
100#define SAVE_CALL_CLOBBERED_REGS_NO_RVAL \
101 SAVE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \
102 SAVE_ARG_REGS; \
103 SAVE_CALL_CLOBBERED_REGS_AFTER_RVAL
104/* Restore `call clobbered' registers except for the return-value registers
105 from the state-save-frame pointed to by EP. */
106#define RESTORE_CALL_CLOBBERED_REGS_NO_RVAL \
107 RESTORE_CALL_CLOBBERED_REGS_BEFORE_ARGS; \
108 RESTORE_ARG_REGS; \
109 RESTORE_CALL_CLOBBERED_REGS_AFTER_RVAL
110
111/* Save `call saved' registers to the state-save-frame pointed to by EP. */
112#define SAVE_CALL_SAVED_REGS \
113 sst.w r2, PTO+PT_GPR(2)[ep]; \
114 sst.w r20, PTO+PT_GPR(20)[ep]; \
115 sst.w r21, PTO+PT_GPR(21)[ep]; \
116 sst.w r22, PTO+PT_GPR(22)[ep]; \
117 sst.w r23, PTO+PT_GPR(23)[ep]; \
118 sst.w r24, PTO+PT_GPR(24)[ep]; \
119 sst.w r25, PTO+PT_GPR(25)[ep]; \
120 sst.w r26, PTO+PT_GPR(26)[ep]; \
121 sst.w r27, PTO+PT_GPR(27)[ep]; \
122 sst.w r28, PTO+PT_GPR(28)[ep]; \
123 sst.w r29, PTO+PT_GPR(29)[ep]
124/* Restore `call saved' registers from the state-save-frame pointed to by EP. */
125#define RESTORE_CALL_SAVED_REGS \
126 sld.w PTO+PT_GPR(2)[ep], r2; \
127 sld.w PTO+PT_GPR(20)[ep], r20; \
128 sld.w PTO+PT_GPR(21)[ep], r21; \
129 sld.w PTO+PT_GPR(22)[ep], r22; \
130 sld.w PTO+PT_GPR(23)[ep], r23; \
131 sld.w PTO+PT_GPR(24)[ep], r24; \
132 sld.w PTO+PT_GPR(25)[ep], r25; \
133 sld.w PTO+PT_GPR(26)[ep], r26; \
134 sld.w PTO+PT_GPR(27)[ep], r27; \
135 sld.w PTO+PT_GPR(28)[ep], r28; \
136 sld.w PTO+PT_GPR(29)[ep], r29
137
138
139/* Save the PC stored in the special register SAVEREG to the state-save-frame
140 pointed to by EP. r19 is clobbered. */
141#define SAVE_PC(savereg) \
142 stsr SR_ ## savereg, r19; \
143 sst.w r19, PTO+PT_PC[ep]
144/* Restore the PC from the state-save-frame pointed to by EP, to the special
145 register SAVEREG. LP is clobbered (it is used as a scratch register
146 because the POP_STATE macro restores it, and this macro is usually used
147 inside POP_STATE). */
148#define RESTORE_PC(savereg) \
149 sld.w PTO+PT_PC[ep], lp; \
150 ldsr lp, SR_ ## savereg
151/* Save the PSW register stored in the special register SAVREG to the
152 state-save-frame pointed to by EP. r19 is clobbered. */
153#define SAVE_PSW(savereg) \
154 stsr SR_ ## savereg, r19; \
155 sst.w r19, PTO+PT_PSW[ep]
156/* Restore the PSW register from the state-save-frame pointed to by EP, to
157 the special register SAVEREG. LP is clobbered (it is used as a scratch
158 register because the POP_STATE macro restores it, and this macro is
159 usually used inside POP_STATE). */
160#define RESTORE_PSW(savereg) \
161 sld.w PTO+PT_PSW[ep], lp; \
162 ldsr lp, SR_ ## savereg
163
164/* Save CTPC/CTPSW/CTBP registers to the state-save-frame pointed to by REG.
165 r19 is clobbered. */
166#define SAVE_CT_REGS \
167 stsr SR_CTPC, r19; \
168 sst.w r19, PTO+PT_CTPC[ep]; \
169 stsr SR_CTPSW, r19; \
170 sst.w r19, PTO+PT_CTPSW[ep]; \
171 stsr SR_CTBP, r19; \
172 sst.w r19, PTO+PT_CTBP[ep]
173/* Restore CTPC/CTPSW/CTBP registers from the state-save-frame pointed to by EP.
174 LP is clobbered (it is used as a scratch register because the POP_STATE
175 macro restores it, and this macro is usually used inside POP_STATE). */
176#define RESTORE_CT_REGS \
177 sld.w PTO+PT_CTPC[ep], lp; \
178 ldsr lp, SR_CTPC; \
179 sld.w PTO+PT_CTPSW[ep], lp; \
180 ldsr lp, SR_CTPSW; \
181 sld.w PTO+PT_CTBP[ep], lp; \
182 ldsr lp, SR_CTBP
183
184
185/* Push register state, except for the stack pointer, on the stack in the
186 form of a state-save-frame (plus some extra padding), in preparation for
187 a system call. This macro makes sure that the EP, GP, and LP
188 registers are saved, and TYPE identifies the set of extra registers to
189 be saved as well. Also copies (the new value of) SP to EP. */
190#define PUSH_STATE(type) \
191 addi -STATE_SAVE_SIZE, sp, sp; /* Make room on the stack. */ \
192 st.w ep, PTO+PT_GPR(GPR_EP)[sp]; \
193 mov sp, ep; \
194 sst.w gp, PTO+PT_GPR(GPR_GP)[ep]; \
195 sst.w lp, PTO+PT_GPR(GPR_LP)[ep]; \
196 type ## _STATE_SAVER
197/* Pop a register state pushed by PUSH_STATE, except for the stack pointer,
198 from the stack. */
199#define POP_STATE(type) \
200 mov sp, ep; \
201 type ## _STATE_RESTORER; \
202 sld.w PTO+PT_GPR(GPR_GP)[ep], gp; \
203 sld.w PTO+PT_GPR(GPR_LP)[ep], lp; \
204 sld.w PTO+PT_GPR(GPR_EP)[ep], ep; \
205 addi STATE_SAVE_SIZE, sp, sp /* Clean up our stack space. */
206
207
208/* Switch to the kernel stack if necessary, and push register state on the
209 stack in the form of a state-save-frame. Also load the current task
210 pointer if switching from user mode. The stack-pointer (r3) should have
211 already been saved to the memory location SP_SAVE_LOC (the reason for
212 this is that the interrupt vectors may be beyond a 22-bit signed offset
213 jump from the actual interrupt handler, and this allows them to save the
214 stack-pointer and use that register to do an indirect jump). This macro
215 makes sure that `special' registers, system registers, and the stack
216 pointer are saved; TYPE identifies the set of extra registers to be
217 saved as well. SYSCALL_NUM is the register in which the system-call
218 number this state is for is stored (r0 if this isn't a system call).
219 Interrupts should already be disabled when calling this. */
220#define SAVE_STATE(type, syscall_num, sp_save_loc) \
221 tst1 0, KM; /* See if already in kernel mode. */ \
222 bz 1f; \
223 ld.w sp_save_loc, sp; /* ... yes, use saved SP. */ \
224 br 2f; \
2251: ld.w KSP, sp; /* ... no, switch to kernel stack. */ \
2262: PUSH_STATE(type); \
227 ld.b KM, r19; /* Remember old kernel-mode. */ \
228 sst.w r19, PTO+PT_KERNEL_MODE[ep]; \
229 ld.w sp_save_loc, r19; /* Remember old SP. */ \
230 sst.w r19, PTO+PT_GPR(GPR_SP)[ep]; \
231 mov 1, r19; /* Now definitely in kernel-mode. */ \
232 st.b r19, KM; \
233 GET_CURRENT_TASK(CURRENT_TASK); /* Fetch the current task pointer. */ \
234 /* Save away the syscall number. */ \
235 sst.w syscall_num, PTO+PT_CUR_SYSCALL[ep]
236
237
238/* Save register state not normally saved by PUSH_STATE for TYPE, to the
239 state-save-frame on the stack; also copies SP to EP. r19 may be trashed. */
240#define SAVE_EXTRA_STATE(type) \
241 mov sp, ep; \
242 type ## _EXTRA_STATE_SAVER
243/* Restore register state not normally restored by POP_STATE for TYPE,
244 from the state-save-frame on the stack; also copies SP to EP.
245 r19 may be trashed. */
246#define RESTORE_EXTRA_STATE(type) \
247 mov sp, ep; \
248 type ## _EXTRA_STATE_RESTORER
249
250/* Save any call-clobbered registers not normally saved by PUSH_STATE for
251 TYPE, to the state-save-frame on the stack.
252 EP may be trashed, but is not guaranteed to contain a copy of SP
253 (unlike after most SAVE_... macros). r19 may be trashed. */
254#define SAVE_EXTRA_STATE_FOR_SCHEDULE(type) \
255 type ## _SCHEDULE_EXTRA_STATE_SAVER
256/* Restore any call-clobbered registers not normally restored by
257 POP_STATE for TYPE, to the state-save-frame on the stack.
258 EP may be trashed, but is not guaranteed to contain a copy of SP
259 (unlike after most RESTORE_... macros). r19 may be trashed. */
260#define RESTORE_EXTRA_STATE_FOR_SCHEDULE(type) \
261 type ## _SCHEDULE_EXTRA_STATE_RESTORER
262
263
264/* These are extra_state_saver/restorer values for a user trap. Note
265 that we save the argument registers so that restarted syscalls will
266 function properly (otherwise it wouldn't be necessary), and we must
267 _not_ restore the return-value registers (so that traps can return a
268 value!), but call-clobbered registers are not saved at all, as the
269 caller of the syscall function should have saved them. */
270
271#define TRAP_RET reti
272/* Traps don't save call-clobbered registers (but do still save arg regs).
273 We preserve PSw to keep long-term state, namely interrupt status (for traps
274 from kernel-mode), and the single-step flag (for user traps). */
275#define TRAP_STATE_SAVER \
276 SAVE_ARG_REGS; \
277 SAVE_PC(EIPC); \
278 SAVE_PSW(EIPSW)
279/* When traps return, they just leave call-clobbered registers (except for arg
280 regs) with whatever value they have from the kernel. Traps don't preserve
281 the PSW, but we zero EIPSW to ensure it doesn't contain anything dangerous
282 (in particular, the single-step flag). */
283#define TRAP_STATE_RESTORER \
284 RESTORE_ARG_REGS; \
285 RESTORE_PC(EIPC); \
286 RESTORE_PSW(EIPSW)
287/* Save registers not normally saved by traps. We need to save r12, even
288 though it's nominally call-clobbered, because it's used when restarting
289 a system call (the signal-handling path uses SAVE_EXTRA_STATE, and
290 expects r12 to be restored when the trap returns). */
291#define TRAP_EXTRA_STATE_SAVER \
292 SAVE_RVAL_REGS; \
293 sst.w r12, PTO+PT_GPR(12)[ep]; \
294 SAVE_CALL_SAVED_REGS; \
295 SAVE_CT_REGS
296#define TRAP_EXTRA_STATE_RESTORER \
297 RESTORE_RVAL_REGS; \
298 sld.w PTO+PT_GPR(12)[ep], r12; \
299 RESTORE_CALL_SAVED_REGS; \
300 RESTORE_CT_REGS
301/* Save registers prior to calling scheduler (just before trap returns).
302 We have to save the return-value registers to preserve the trap's return
303 value. Note that ..._SCHEDULE_EXTRA_STATE_SAVER, unlike most ..._SAVER
304 macros, is required to setup EP itself if EP is needed (this is because
305 in many cases, the macro is empty). */
306#define TRAP_SCHEDULE_EXTRA_STATE_SAVER \
307 mov sp, ep; \
308 SAVE_RVAL_REGS
309/* Note that ..._SCHEDULE_EXTRA_STATE_RESTORER, unlike most ..._RESTORER
310 macros, is required to setup EP itself if EP is needed (this is because
311 in many cases, the macro is empty). */
312#define TRAP_SCHEDULE_EXTRA_STATE_RESTORER \
313 mov sp, ep; \
314 RESTORE_RVAL_REGS
315
316/* Register saving/restoring for maskable interrupts. */
317#define IRQ_RET reti
318#define IRQ_STATE_SAVER \
319 SAVE_CALL_CLOBBERED_REGS; \
320 SAVE_PC(EIPC); \
321 SAVE_PSW(EIPSW)
322#define IRQ_STATE_RESTORER \
323 RESTORE_CALL_CLOBBERED_REGS; \
324 RESTORE_PC(EIPC); \
325 RESTORE_PSW(EIPSW)
326#define IRQ_EXTRA_STATE_SAVER \
327 SAVE_CALL_SAVED_REGS; \
328 SAVE_CT_REGS
329#define IRQ_EXTRA_STATE_RESTORER \
330 RESTORE_CALL_SAVED_REGS; \
331 RESTORE_CT_REGS
332#define IRQ_SCHEDULE_EXTRA_STATE_SAVER /* nothing */
333#define IRQ_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */
334
335/* Register saving/restoring for non-maskable interrupts. */
336#define NMI_RET reti
337#define NMI_STATE_SAVER \
338 SAVE_CALL_CLOBBERED_REGS; \
339 SAVE_PC(FEPC); \
340 SAVE_PSW(FEPSW);
341#define NMI_STATE_RESTORER \
342 RESTORE_CALL_CLOBBERED_REGS; \
343 RESTORE_PC(FEPC); \
344 RESTORE_PSW(FEPSW);
345#define NMI_EXTRA_STATE_SAVER \
346 SAVE_CALL_SAVED_REGS; \
347 SAVE_CT_REGS
348#define NMI_EXTRA_STATE_RESTORER \
349 RESTORE_CALL_SAVED_REGS; \
350 RESTORE_CT_REGS
351#define NMI_SCHEDULE_EXTRA_STATE_SAVER /* nothing */
352#define NMI_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */
353
354/* Register saving/restoring for debug traps. */
355#define DBTRAP_RET .long 0x014607E0 /* `dbret', but gas doesn't support it. */
356#define DBTRAP_STATE_SAVER \
357 SAVE_CALL_CLOBBERED_REGS; \
358 SAVE_PC(DBPC); \
359 SAVE_PSW(DBPSW)
360#define DBTRAP_STATE_RESTORER \
361 RESTORE_CALL_CLOBBERED_REGS; \
362 RESTORE_PC(DBPC); \
363 RESTORE_PSW(DBPSW)
364#define DBTRAP_EXTRA_STATE_SAVER \
365 SAVE_CALL_SAVED_REGS; \
366 SAVE_CT_REGS
367#define DBTRAP_EXTRA_STATE_RESTORER \
368 RESTORE_CALL_SAVED_REGS; \
369 RESTORE_CT_REGS
370#define DBTRAP_SCHEDULE_EXTRA_STATE_SAVER /* nothing */
371#define DBTRAP_SCHEDULE_EXTRA_STATE_RESTORER /* nothing */
372
373/* Register saving/restoring for a context switch. We don't need to save
374 too many registers, because context-switching looks like a function call
375 (via the function `switch_thread'), so callers will save any
376 call-clobbered registers themselves. We do need to save the CT regs, as
377 they're normally not saved during kernel entry (the kernel doesn't use
378 them). We save PSW so that interrupt-status state will correctly follow
379 each thread (mostly NMI vs. normal-IRQ/trap), though for the most part
380 it doesn't matter since threads are always in almost exactly the same
381 processor state during a context switch. The stack pointer and return
382 value are handled by switch_thread itself. */
383#define SWITCH_STATE_SAVER \
384 SAVE_CALL_SAVED_REGS; \
385 SAVE_PSW(PSW); \
386 SAVE_CT_REGS
387#define SWITCH_STATE_RESTORER \
388 RESTORE_CALL_SAVED_REGS; \
389 RESTORE_PSW(PSW); \
390 RESTORE_CT_REGS
391
392
393/* Restore register state from the state-save-frame on the stack, switch back
394 to the user stack if necessary, and return from the trap/interrupt.
395 EXTRA_STATE_RESTORER is a sequence of assembly language statements to
396 restore anything not restored by this macro. Only registers not saved by
397 the C compiler are restored (that is, R3(sp), R4(gp), R31(lp), and
398 anything restored by EXTRA_STATE_RESTORER). */
399#define RETURN(type) \
400 ld.b PTO+PT_KERNEL_MODE[sp], r19; \
401 di; /* Disable interrupts */ \
402 cmp r19, r0; /* See if returning to kernel mode, */\
403 bne 2f; /* ... if so, skip resched &c. */ \
404 \
405 /* We're returning to user mode, so check for various conditions that \
406 trigger rescheduling. */ \
407 GET_CURRENT_THREAD(r18); \
408 ld.w TI_FLAGS[r18], r19; \
409 andi _TIF_NEED_RESCHED, r19, r0; \
410 bnz 3f; /* Call the scheduler. */ \
4115: andi _TIF_SIGPENDING, r19, r18; \
412 ld.w TASK_PTRACE[CURRENT_TASK], r19; /* ptrace flags */ \
413 or r18, r19; /* see if either is non-zero */ \
414 bnz 4f; /* if so, handle them */ \
415 \
416/* Return to user state. */ \
4171: st.b r0, KM; /* Now officially in user state. */ \
418 \
419/* Final return. The stack-pointer fiddling is not needed when returning \
420 to kernel-mode, but they don't hurt, and this way we can share the \
421 (sometimes rather lengthy) POP_STATE macro. */ \
4222: POP_STATE(type); \
423 st.w sp, KSP; /* Save the kernel stack pointer. */ \
424 ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp; /* Restore stack pointer. */ \
425 type ## _RET; /* Return from the trap/interrupt. */ \
426 \
427/* Call the scheduler before returning from a syscall/trap. */ \
4283: SAVE_EXTRA_STATE_FOR_SCHEDULE(type); /* Prepare to call scheduler. */ \
429 jarl call_scheduler, lp; /* Call scheduler */ \
430 di; /* The scheduler enables interrupts */\
431 RESTORE_EXTRA_STATE_FOR_SCHEDULE(type); \
432 GET_CURRENT_THREAD(r18); \
433 ld.w TI_FLAGS[r18], r19; \
434 br 5b; /* Continue with return path. */ \
435 \
436/* Handle a signal or ptraced process return. \
437 r18 should be non-zero if there are pending signals. */ \
4384: /* Not all registers are saved by the normal trap/interrupt entry \
439 points (for instance, call-saved registers (because the normal \
440 C-compiler calling sequence in the kernel makes sure they're \
441 preserved), and call-clobbered registers in the case of \
442 traps), but signal handlers may want to examine or change the \
443 complete register state. Here we save anything not saved by \
444 the normal entry sequence, so that it may be safely restored \
445 (in a possibly modified form) after do_signal returns. */ \
446 SAVE_EXTRA_STATE(type); /* Save state not saved by entry. */ \
447 jarl handle_signal_or_ptrace_return, lp; \
448 RESTORE_EXTRA_STATE(type); /* Restore extra regs. */ \
449 br 1b
450
451
452/* Jump to the appropriate function for the system call number in r12
453 (r12 is not preserved), or return an error if r12 is not valid. The
454 LP register should point to the location where the called function
455 should return. [note that MAKE_SYS_CALL uses label 1] */
456#define MAKE_SYS_CALL \
457 /* Figure out which function to use for this system call. */ \
458 shl 2, r12; \
459 /* See if the system call number is valid. */ \
460 addi lo(CSYM(sys_call_table) - sys_call_table_end), r12, r0; \
461 bnh 1f; \
462 mov hilo(CSYM(sys_call_table)), r19; \
463 add r19, r12; \
464 ld.w 0[r12], r12; \
465 /* Make the system call. */ \
466 jmp [r12]; \
467 /* The syscall number is invalid, return an error. */ \
4681: addi -ENOSYS, r0, r10; \
469 jmp [lp]
470
471
472 .text
473
474/*
475 * User trap.
476 *
477 * Trap 0 system calls are also handled here.
478 *
479 * The stack-pointer (r3) should have already been saved to the memory
480 * location ENTRY_SP (the reason for this is that the interrupt vectors may be
481 * beyond a 22-bit signed offset jump from the actual interrupt handler, and
482 * this allows them to save the stack-pointer and use that register to do an
483 * indirect jump).
484 *
485 * Syscall protocol:
486 * Syscall number in r12, args in r6-r9
487 * Return value in r10
488 */
489G_ENTRY(trap):
490 SAVE_STATE (TRAP, r12, ENTRY_SP) // Save registers.
491 stsr SR_ECR, r19 // Find out which trap it was.
492 ei // Enable interrupts.
493 mov hilo(ret_from_trap), lp // where the trap should return
494
495 // The following two shifts (1) clear out extraneous NMI data in the
496 // upper 16-bits, (2) convert the 0x40 - 0x5f range of trap ECR
497 // numbers into the (0-31) << 2 range we want, (3) set the flags.
498 shl 27, r19 // chop off all high bits
499 shr 25, r19 // scale back down and then << 2
500 bnz 2f // See if not trap 0.
501
502 // Trap 0 is a `short' system call, skip general trap table.
503 MAKE_SYS_CALL // Jump to the syscall function.
504
5052: // For other traps, use a table lookup.
506 mov hilo(CSYM(trap_table)), r18
507 add r19, r18
508 ld.w 0[r18], r18
509 jmp [r18] // Jump to the trap handler.
510END(trap)
511
512/* This is just like ret_from_trap, but first restores extra registers
513 saved by some wrappers. */
514L_ENTRY(restore_extra_regs_and_ret_from_trap):
515 RESTORE_EXTRA_STATE(TRAP)
516 // fall through
517END(restore_extra_regs_and_ret_from_trap)
518
519/* Entry point used to return from a syscall/trap. */
520L_ENTRY(ret_from_trap):
521 RETURN(TRAP)
522END(ret_from_trap)
523
524
525/* This the initial entry point for a new child thread, with an appropriate
526 stack in place that makes it look that the child is in the middle of an
527 syscall. This function is actually `returned to' from switch_thread
528 (copy_thread makes ret_from_fork the return address in each new thread's
529 saved context). */
530C_ENTRY(ret_from_fork):
531 mov r10, r6 // switch_thread returns the prev task.
532 jarl CSYM(schedule_tail), lp // ...which is schedule_tail's arg
533 mov r0, r10 // Child's fork call should return 0.
534 br ret_from_trap // Do normal trap return.
535C_END(ret_from_fork)
536
537
538/*
539 * Trap 1: `long' system calls
540 * `Long' syscall protocol:
541 * Syscall number in r12, args in r6-r9, r13-r14
542 * Return value in r10
543 */
544L_ENTRY(syscall_long):
545 // Push extra arguments on the stack. Note that by default, the trap
546 // handler reserves enough stack space for 6 arguments, so we don't
547 // have to make any additional room.
548 st.w r13, 16[sp] // arg 5
549 st.w r14, 20[sp] // arg 6
550
551 // Make sure r13 and r14 are preserved, in case we have to restart a
552 // system call because of a signal (ep has already been set by caller).
553 st.w r13, PTO+PT_GPR(13)[sp]
554 st.w r14, PTO+PT_GPR(13)[sp]
555 mov hilo(ret_from_long_syscall), lp
556
557 MAKE_SYS_CALL // Jump to the syscall function.
558END(syscall_long)
559
560/* Entry point used to return from a long syscall. Only needed to restore
561 r13/r14 if the general trap mechanism doesnt' do so. */
562L_ENTRY(ret_from_long_syscall):
563 ld.w PTO+PT_GPR(13)[sp], r13 // Restore the extra registers
564 ld.w PTO+PT_GPR(13)[sp], r14
565 br ret_from_trap // The rest is the same as other traps
566END(ret_from_long_syscall)
567
568
569/* These syscalls need access to the struct pt_regs on the stack, so we
570 implement them in assembly (they're basically all wrappers anyway). */
571
572L_ENTRY(sys_fork_wrapper):
573#ifdef CONFIG_MMU
574 addi SIGCHLD, r0, r6 // Arg 0: flags
575 ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's)
576 movea PTO, sp, r8 // Arg 2: parent context
577 mov r0, r9 // Arg 3/4/5: 0
578 st.w r0, 16[sp]
579 st.w r0, 20[sp]
580 mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
581 br save_extra_state_tramp // Save state and go there
582#else
583 // fork almost works, enough to trick you into looking elsewhere :-(
584 addi -EINVAL, r0, r10
585 jmp [lp]
586#endif
587END(sys_fork_wrapper)
588
589L_ENTRY(sys_vfork_wrapper):
590 addi CLONE_VFORK | CLONE_VM | SIGCHLD, r0, r6 // Arg 0: flags
591 ld.w PTO+PT_GPR(GPR_SP)[sp], r7 // Arg 1: child SP (use parent's)
592 movea PTO, sp, r8 // Arg 2: parent context
593 mov r0, r9 // Arg 3/4/5: 0
594 st.w r0, 16[sp]
595 st.w r0, 20[sp]
596 mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
597 br save_extra_state_tramp // Save state and go there
598END(sys_vfork_wrapper)
599
600L_ENTRY(sys_clone_wrapper):
601 ld.w PTO+PT_GPR(GPR_SP)[sp], r19// parent's stack pointer
602 cmp r7, r0 // See if child SP arg (arg 1) is 0.
603 cmov z, r19, r7, r7 // ... and use the parent's if so.
604 movea PTO, sp, r8 // Arg 2: parent context
605 mov r0, r9 // Arg 3/4/5: 0
606 st.w r0, 16[sp]
607 st.w r0, 20[sp]
608 mov hilo(CSYM(do_fork)), r18 // Where the real work gets done
609 br save_extra_state_tramp // Save state and go there
610END(sys_clone_wrapper)
611
612
613L_ENTRY(sys_execve_wrapper):
614 movea PTO, sp, r9 // add user context as 4th arg
615 jr CSYM(sys_execve) // Do real work (tail-call).
616END(sys_execve_wrapper)
617
618
619L_ENTRY(sys_sigsuspend_wrapper):
620 movea PTO, sp, r7 // add user context as 2nd arg
621 mov hilo(CSYM(sys_sigsuspend)), r18 // syscall function
622 jarl save_extra_state_tramp, lp // Save state and do it
623 br restore_extra_regs_and_ret_from_trap
624END(sys_sigsuspend_wrapper)
625L_ENTRY(sys_rt_sigsuspend_wrapper):
626 movea PTO, sp, r8 // add user context as 3rd arg
627 mov hilo(CSYM(sys_rt_sigsuspend)), r18 // syscall function
628 jarl save_extra_state_tramp, lp // Save state and do it
629 br restore_extra_regs_and_ret_from_trap
630END(sys_rt_sigsuspend_wrapper)
631
632L_ENTRY(sys_sigreturn_wrapper):
633 movea PTO, sp, r6 // add user context as 1st arg
634 mov hilo(CSYM(sys_sigreturn)), r18 // syscall function
635 jarl save_extra_state_tramp, lp // Save state and do it
636 br restore_extra_regs_and_ret_from_trap
637END(sys_sigreturn_wrapper)
638L_ENTRY(sys_rt_sigreturn_wrapper):
639 movea PTO, sp, r6 // add user context as 1st arg
640 mov hilo(CSYM(sys_rt_sigreturn)), r18// syscall function
641 jarl save_extra_state_tramp, lp // Save state and do it
642 br restore_extra_regs_and_ret_from_trap
643END(sys_rt_sigreturn_wrapper)
644
645
646/* Save any state not saved by SAVE_STATE(TRAP), and jump to r18.
647 It's main purpose is to share the rather lengthy code sequence that
648 SAVE_STATE expands into among the above wrapper functions. */
649L_ENTRY(save_extra_state_tramp):
650 SAVE_EXTRA_STATE(TRAP) // Save state not saved by entry.
651 jmp [r18] // Do the work the caller wants
652END(save_extra_state_tramp)
653
654
655/*
656 * Hardware maskable interrupts.
657 *
658 * The stack-pointer (r3) should have already been saved to the memory
659 * location ENTRY_SP (the reason for this is that the interrupt vectors may be
660 * beyond a 22-bit signed offset jump from the actual interrupt handler, and
661 * this allows them to save the stack-pointer and use that register to do an
662 * indirect jump).
663 */
664G_ENTRY(irq):
665 SAVE_STATE (IRQ, r0, ENTRY_SP) // Save registers.
666
667 stsr SR_ECR, r6 // Find out which interrupt it was.
668 movea PTO, sp, r7 // User regs are arg2
669
670 // All v850 implementations I know about encode their interrupts as
671 // multiples of 0x10, starting at 0x80 (after NMIs and software
672 // interrupts). Convert this number into a simple IRQ index for the
673 // rest of the kernel. We also clear the upper 16 bits, which hold
674 // NMI info, and don't appear to be cleared when a NMI returns.
675 shl 16, r6 // clear upper 16 bits
676 shr 20, r6 // shift back, and remove lower nibble
677 add -8, r6 // remove bias for irqs
678
679 // Call the high-level interrupt handling code.
680 jarl CSYM(handle_irq), lp
681
682 RETURN(IRQ)
683END(irq)
684
685
686/*
687 * Debug trap / illegal-instruction exception
688 *
689 * The stack-pointer (r3) should have already been saved to the memory
690 * location ENTRY_SP (the reason for this is that the interrupt vectors may be
691 * beyond a 22-bit signed offset jump from the actual interrupt handler, and
692 * this allows them to save the stack-pointer and use that register to do an
693 * indirect jump).
694 */
695G_ENTRY(dbtrap):
696 SAVE_STATE (DBTRAP, r0, ENTRY_SP)// Save registers.
697
698 /* First see if we came from kernel mode; if so, the dbtrap
699 instruction has a special meaning, to set the DIR (`debug
700 information register') register. This is because the DIR register
701 can _only_ be manipulated/read while in `debug mode,' and debug
702 mode is only active while we're inside the dbtrap handler. The
703 exact functionality is: { DIR = (DIR | r6) & ~r7; return DIR; }. */
704 ld.b PTO+PT_KERNEL_MODE[sp], r19
705 cmp r19, r0
706 bz 1f
707
708 stsr SR_DIR, r10
709 or r6, r10
710 not r7, r7
711 and r7, r10
712 ldsr r10, SR_DIR
713 stsr SR_DIR, r10 // Confirm the value we set
714 st.w r10, PTO+PT_GPR(10)[sp] // return it
715 br 3f
716
7171: ei // Enable interrupts.
718
719 /* The default signal type we raise. */
720 mov SIGTRAP, r6
721
722 /* See if it's a single-step trap. */
723 stsr SR_DBPSW, r19
724 andi 0x0800, r19, r19
725 bnz 2f
726
727 /* Look to see if the preceding instruction was is a dbtrap or not,
728 to decide which signal we should use. */
729 stsr SR_DBPC, r19 // PC following trapping insn
730 ld.hu -2[r19], r19
731 ori 0xf840, r0, r20 // DBTRAP insn
732 cmp r19, r20 // Was this trap caused by DBTRAP?
733 cmov ne, SIGILL, r6, r6 // Choose signal appropriately
734
735 /* Raise the desired signal. */
7362: mov CURRENT_TASK, r7 // Arg 1: task
737 jarl CSYM(send_sig), lp // tail call
738
7393: RETURN(DBTRAP)
740END(dbtrap)
741
742
743/*
744 * Hardware non-maskable interrupts.
745 *
746 * The stack-pointer (r3) should have already been saved to the memory
747 * location ENTRY_SP (the reason for this is that the interrupt vectors may be
748 * beyond a 22-bit signed offset jump from the actual interrupt handler, and
749 * this allows them to save the stack-pointer and use that register to do an
750 * indirect jump).
751 */
752G_ENTRY(nmi):
753 SAVE_STATE (NMI, r0, NMI_ENTRY_SP); /* Save registers. */
754
755 stsr SR_ECR, r6; /* Find out which nmi it was. */
756 shr 20, r6; /* Extract NMI code in bits 20-24. */
757 movea PTO, sp, r7; /* User regs are arg2. */
758
759 /* Non-maskable interrupts always lie right after maskable interrupts.
760 Call the generic IRQ handler, with two arguments, the IRQ number,
761 and a pointer to the user registers, to handle the specifics.
762 (we subtract one because the first NMI has code 1). */
763 addi FIRST_NMI - 1, r6, r6
764 jarl CSYM(handle_irq), lp
765
766 RETURN(NMI)
767END(nmi)
768
769
770/*
771 * Trap with no handler
772 */
773L_ENTRY(bad_trap_wrapper):
774 mov r19, r6 // Arg 0: trap number
775 movea PTO, sp, r7 // Arg 1: user regs
776 jr CSYM(bad_trap) // tail call handler
777END(bad_trap_wrapper)
778
779
780/*
781 * Invoke the scheduler, called from the trap/irq kernel exit path.
782 *
783 * This basically just calls `schedule', but also arranges for extra
784 * registers to be saved for ptrace'd processes, so ptrace can modify them.
785 */
786L_ENTRY(call_scheduler):
787 ld.w TASK_PTRACE[CURRENT_TASK], r19 // See if task is ptrace'd
788 cmp r19, r0
789 bnz 1f // ... yes, do special stuff
790 jr CSYM(schedule) // ... no, just tail-call scheduler
791
792 // Save extra regs for ptrace'd task. We want to save anything
793 // that would otherwise only be `implicitly' saved by the normal
794 // compiler calling-convention.
7951: mov sp, ep // Setup EP for SAVE_CALL_SAVED_REGS
796 SAVE_CALL_SAVED_REGS // Save call-saved registers to stack
797 mov lp, r20 // Save LP in a callee-saved register
798
799 jarl CSYM(schedule), lp // Call scheduler
800
801 mov r20, lp
802 mov sp, ep // We can't rely on EP after return
803 RESTORE_CALL_SAVED_REGS // Restore (possibly modified) regs
804 jmp [lp] // Return to the return path
805END(call_scheduler)
806
807
808/*
809 * This is an out-of-line handler for two special cases during the kernel
810 * trap/irq exit sequence:
811 *
812 * (1) If r18 is non-zero then a signal needs to be handled, which is
813 * done, and then the caller returned to.
814 *
815 * (2) If r18 is non-zero then we're returning to a ptraced process, which
816 * has several special cases -- single-stepping and trap tracing, both
817 * of which require using the `dbret' instruction to exit the kernel
818 * instead of the normal `reti' (this is because the CPU not correctly
819 * single-step after a reti). In this case, of course, this handler
820 * never returns to the caller.
821 *
822 * In either case, all registers should have been saved to the current
823 * state-save-frame on the stack, except for callee-saved registers.
824 *
825 * [These two different cases are combined merely to avoid bloating the
826 * macro-inlined code, not because they really make much sense together!]
827 */
828L_ENTRY(handle_signal_or_ptrace_return):
829 cmp r18, r0 // See if handling a signal
830 bz 1f // ... nope, go do ptrace return
831
832 // Handle a signal
833 mov lp, r20 // Save link-pointer
834 mov r10, r21 // Save return-values (for trap)
835 mov r11, r22
836
837 movea PTO, sp, r6 // Arg 1: struct pt_regs *regs
838 mov r0, r7 // Arg 2: sigset_t *oldset
839 jarl CSYM(do_signal), lp // Handle the signal
840 di // sig handling enables interrupts
841
842 mov r20, lp // Restore link-pointer
843 mov r21, r10 // Restore return-values (for trap)
844 mov r22, r11
845 ld.w TASK_PTRACE[CURRENT_TASK], r19 // check ptrace flags too
846 cmp r19, r0
847 bnz 1f // ... some set, so look more
8482: jmp [lp] // ... none set, so return normally
849
850 // ptrace return
8511: ld.w PTO+PT_PSW[sp], r19 // Look at user-processes's flags
852 andi 0x0800, r19, r19 // See if single-step flag is set
853 bz 2b // ... nope, return normally
854
855 // Return as if from a dbtrap insn
856 st.b r0, KM // Now officially in user state.
857 POP_STATE(DBTRAP) // Restore regs
858 st.w sp, KSP // Save the kernel stack pointer.
859 ld.w PT_GPR(GPR_SP)-PT_SIZE[sp], sp // Restore user stack pointer.
860 DBTRAP_RET // Return from the trap/interrupt.
861END(handle_signal_or_ptrace_return)
862
863
864/*
865 * This is where we switch between two threads. The arguments are:
866 * r6 -- pointer to the struct thread for the `current' process
867 * r7 -- pointer to the struct thread for the `new' process.
868 * when this function returns, it will return to the new thread.
869 */
870C_ENTRY(switch_thread):
871 // Return the previous task (r10 is not clobbered by restore below)
872 mov CURRENT_TASK, r10
873 // First, push the current processor state on the stack
874 PUSH_STATE(SWITCH)
875 // Now save the location of the kernel stack pointer for this thread;
876 // since we've pushed all other state on the stack, this is enough to
877 // restore it all later.
878 st.w sp, THREAD_KSP[r6]
879 // Now restore the stack pointer from the new process
880 ld.w THREAD_KSP[r7], sp
881 // ... and restore all state from that
882 POP_STATE(SWITCH)
883 // Update the current task pointer
884 GET_CURRENT_TASK(CURRENT_TASK)
885 // Now return into the new thread
886 jmp [lp]
887C_END(switch_thread)
888
889
890 .data
891
892 .align 4
893C_DATA(trap_table):
894 .long bad_trap_wrapper // trap 0, doesn't use trap table.
895 .long syscall_long // trap 1, `long' syscall.
896 .long bad_trap_wrapper
897 .long bad_trap_wrapper
898 .long bad_trap_wrapper
899 .long bad_trap_wrapper
900 .long bad_trap_wrapper
901 .long bad_trap_wrapper
902 .long bad_trap_wrapper
903 .long bad_trap_wrapper
904 .long bad_trap_wrapper
905 .long bad_trap_wrapper
906 .long bad_trap_wrapper
907 .long bad_trap_wrapper
908 .long bad_trap_wrapper
909 .long bad_trap_wrapper
910C_END(trap_table)
911
912
913 .section .rodata
914
915 .align 4
916C_DATA(sys_call_table):
917 .long CSYM(sys_restart_syscall) // 0
918 .long CSYM(sys_exit)
919 .long sys_fork_wrapper
920 .long CSYM(sys_read)
921 .long CSYM(sys_write)
922 .long CSYM(sys_open) // 5
923 .long CSYM(sys_close)
924 .long CSYM(sys_waitpid)
925 .long CSYM(sys_creat)
926 .long CSYM(sys_link)
927 .long CSYM(sys_unlink) // 10
928 .long sys_execve_wrapper
929 .long CSYM(sys_chdir)
930 .long CSYM(sys_time)
931 .long CSYM(sys_mknod)
932 .long CSYM(sys_chmod) // 15
933 .long CSYM(sys_chown)
934 .long CSYM(sys_ni_syscall) // was: break
935 .long CSYM(sys_ni_syscall) // was: oldstat (aka stat)
936 .long CSYM(sys_lseek)
937 .long CSYM(sys_getpid) // 20
938 .long CSYM(sys_mount)
939 .long CSYM(sys_oldumount)
940 .long CSYM(sys_setuid)
941 .long CSYM(sys_getuid)
942 .long CSYM(sys_stime) // 25
943 .long CSYM(sys_ptrace)
944 .long CSYM(sys_alarm)
945 .long CSYM(sys_ni_syscall) // was: oldfstat (aka fstat)
946 .long CSYM(sys_pause)
947 .long CSYM(sys_utime) // 30
948 .long CSYM(sys_ni_syscall) // was: stty
949 .long CSYM(sys_ni_syscall) // was: gtty
950 .long CSYM(sys_access)
951 .long CSYM(sys_nice)
952 .long CSYM(sys_ni_syscall) // 35, was: ftime
953 .long CSYM(sys_sync)
954 .long CSYM(sys_kill)
955 .long CSYM(sys_rename)
956 .long CSYM(sys_mkdir)
957 .long CSYM(sys_rmdir) // 40
958 .long CSYM(sys_dup)
959 .long CSYM(sys_pipe)
960 .long CSYM(sys_times)
961 .long CSYM(sys_ni_syscall) // was: prof
962 .long CSYM(sys_brk) // 45
963 .long CSYM(sys_setgid)
964 .long CSYM(sys_getgid)
965 .long CSYM(sys_signal)
966 .long CSYM(sys_geteuid)
967 .long CSYM(sys_getegid) // 50
968 .long CSYM(sys_acct)
969 .long CSYM(sys_umount) // recycled never used phys()
970 .long CSYM(sys_ni_syscall) // was: lock
971 .long CSYM(sys_ioctl)
972 .long CSYM(sys_fcntl) // 55
973 .long CSYM(sys_ni_syscall) // was: mpx
974 .long CSYM(sys_setpgid)
975 .long CSYM(sys_ni_syscall) // was: ulimit
976 .long CSYM(sys_ni_syscall)
977 .long CSYM(sys_umask) // 60
978 .long CSYM(sys_chroot)
979 .long CSYM(sys_ustat)
980 .long CSYM(sys_dup2)
981 .long CSYM(sys_getppid)
982 .long CSYM(sys_getpgrp) // 65
983 .long CSYM(sys_setsid)
984 .long CSYM(sys_sigaction)
985 .long CSYM(sys_sgetmask)
986 .long CSYM(sys_ssetmask)
987 .long CSYM(sys_setreuid) // 70
988 .long CSYM(sys_setregid)
989 .long sys_sigsuspend_wrapper
990 .long CSYM(sys_sigpending)
991 .long CSYM(sys_sethostname)
992 .long CSYM(sys_setrlimit) // 75
993 .long CSYM(sys_getrlimit)
994 .long CSYM(sys_getrusage)
995 .long CSYM(sys_gettimeofday)
996 .long CSYM(sys_settimeofday)
997 .long CSYM(sys_getgroups) // 80
998 .long CSYM(sys_setgroups)
999 .long CSYM(sys_select)
1000 .long CSYM(sys_symlink)
1001 .long CSYM(sys_ni_syscall) // was: oldlstat (aka lstat)
1002 .long CSYM(sys_readlink) // 85
1003 .long CSYM(sys_uselib)
1004 .long CSYM(sys_swapon)
1005 .long CSYM(sys_reboot)
1006 .long CSYM(old_readdir)
1007 .long CSYM(sys_mmap) // 90
1008 .long CSYM(sys_munmap)
1009 .long CSYM(sys_truncate)
1010 .long CSYM(sys_ftruncate)
1011 .long CSYM(sys_fchmod)
1012 .long CSYM(sys_fchown) // 95
1013 .long CSYM(sys_getpriority)
1014 .long CSYM(sys_setpriority)
1015 .long CSYM(sys_ni_syscall) // was: profil
1016 .long CSYM(sys_statfs)
1017 .long CSYM(sys_fstatfs) // 100
1018 .long CSYM(sys_ni_syscall) // i386: ioperm
1019 .long CSYM(sys_socketcall)
1020 .long CSYM(sys_syslog)
1021 .long CSYM(sys_setitimer)
1022 .long CSYM(sys_getitimer) // 105
1023 .long CSYM(sys_newstat)
1024 .long CSYM(sys_newlstat)
1025 .long CSYM(sys_newfstat)
1026 .long CSYM(sys_ni_syscall) // was: olduname (aka uname)
1027 .long CSYM(sys_ni_syscall) // 110, i386: iopl
1028 .long CSYM(sys_vhangup)
1029 .long CSYM(sys_ni_syscall) // was: idle
1030 .long CSYM(sys_ni_syscall) // i386: vm86old
1031 .long CSYM(sys_wait4)
1032 .long CSYM(sys_swapoff) // 115
1033 .long CSYM(sys_sysinfo)
1034 .long CSYM(sys_ipc)
1035 .long CSYM(sys_fsync)
1036 .long sys_sigreturn_wrapper
1037 .long sys_clone_wrapper // 120
1038 .long CSYM(sys_setdomainname)
1039 .long CSYM(sys_newuname)
1040 .long CSYM(sys_ni_syscall) // i386: modify_ldt, m68k: cacheflush
1041 .long CSYM(sys_adjtimex)
1042 .long CSYM(sys_ni_syscall) // 125 - sys_mprotect
1043 .long CSYM(sys_sigprocmask)
1044 .long CSYM(sys_ni_syscall) // sys_create_module
1045 .long CSYM(sys_init_module)
1046 .long CSYM(sys_delete_module)
1047 .long CSYM(sys_ni_syscall) // 130 - sys_get_kernel_syms
1048 .long CSYM(sys_quotactl)
1049 .long CSYM(sys_getpgid)
1050 .long CSYM(sys_fchdir)
1051 .long CSYM(sys_bdflush)
1052 .long CSYM(sys_sysfs) // 135
1053 .long CSYM(sys_personality)
1054 .long CSYM(sys_ni_syscall) // for afs_syscall
1055 .long CSYM(sys_setfsuid)
1056 .long CSYM(sys_setfsgid)
1057 .long CSYM(sys_llseek) // 140
1058 .long CSYM(sys_getdents)
1059 .long CSYM(sys_select) // for backward compat; remove someday
1060 .long CSYM(sys_flock)
1061 .long CSYM(sys_ni_syscall) // sys_msync
1062 .long CSYM(sys_readv) // 145
1063 .long CSYM(sys_writev)
1064 .long CSYM(sys_getsid)
1065 .long CSYM(sys_fdatasync)
1066 .long CSYM(sys_sysctl)
1067 .long CSYM(sys_ni_syscall) // 150 - sys_mlock
1068 .long CSYM(sys_ni_syscall) // sys_munlock
1069 .long CSYM(sys_ni_syscall) // sys_mlockall
1070 .long CSYM(sys_ni_syscall) // sys_munlockall
1071 .long CSYM(sys_sched_setparam)
1072 .long CSYM(sys_sched_getparam) // 155
1073 .long CSYM(sys_sched_setscheduler)
1074 .long CSYM(sys_sched_getscheduler)
1075 .long CSYM(sys_sched_yield)
1076 .long CSYM(sys_sched_get_priority_max)
1077 .long CSYM(sys_sched_get_priority_min) // 160
1078 .long CSYM(sys_sched_rr_get_interval)
1079 .long CSYM(sys_nanosleep)
1080 .long CSYM(sys_ni_syscall) // sys_mremap
1081 .long CSYM(sys_setresuid)
1082 .long CSYM(sys_getresuid) // 165
1083 .long CSYM(sys_ni_syscall) // for vm86
1084 .long CSYM(sys_ni_syscall) // sys_query_module
1085 .long CSYM(sys_poll)
1086 .long CSYM(sys_nfsservctl)
1087 .long CSYM(sys_setresgid) // 170
1088 .long CSYM(sys_getresgid)
1089 .long CSYM(sys_prctl)
1090 .long sys_rt_sigreturn_wrapper
1091 .long CSYM(sys_rt_sigaction)
1092 .long CSYM(sys_rt_sigprocmask) // 175
1093 .long CSYM(sys_rt_sigpending)
1094 .long CSYM(sys_rt_sigtimedwait)
1095 .long CSYM(sys_rt_sigqueueinfo)
1096 .long sys_rt_sigsuspend_wrapper
1097 .long CSYM(sys_pread64) // 180
1098 .long CSYM(sys_pwrite64)
1099 .long CSYM(sys_lchown)
1100 .long CSYM(sys_getcwd)
1101 .long CSYM(sys_capget)
1102 .long CSYM(sys_capset) // 185
1103 .long CSYM(sys_sigaltstack)
1104 .long CSYM(sys_sendfile)
1105 .long CSYM(sys_ni_syscall) // streams1
1106 .long CSYM(sys_ni_syscall) // streams2
1107 .long sys_vfork_wrapper // 190
1108 .long CSYM(sys_ni_syscall)
1109 .long CSYM(sys_mmap2)
1110 .long CSYM(sys_truncate64)
1111 .long CSYM(sys_ftruncate64)
1112 .long CSYM(sys_stat64) // 195
1113 .long CSYM(sys_lstat64)
1114 .long CSYM(sys_fstat64)
1115 .long CSYM(sys_fcntl64)
1116 .long CSYM(sys_getdents64)
1117 .long CSYM(sys_pivot_root) // 200
1118 .long CSYM(sys_gettid)
1119 .long CSYM(sys_tkill)
1120sys_call_table_end:
1121C_END(sys_call_table)
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
deleted file mode 100644
index ab9cf16a85c8..000000000000
--- a/arch/v850/kernel/fpga85e2c.c
+++ /dev/null
@@ -1,167 +0,0 @@
1/*
2 * arch/v850/kernel/fpga85e2c.h -- Machine-dependent defs for
3 * FPGA implementation of V850E2/NA85E2C
4 *
5 * Copyright (C) 2002,03 NEC Electronics Corporation
6 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/swap.h>
20#include <linux/bootmem.h>
21#include <linux/irq.h>
22#include <linux/bitops.h>
23
24#include <asm/atomic.h>
25#include <asm/page.h>
26#include <asm/machdep.h>
27
28#include "mach.h"
29
30extern void memcons_setup (void);
31
32
33#define REG_DUMP_ADDR 0x220000
34
35
36extern struct irqaction reg_snap_action; /* fwd decl */
37
38
39void __init mach_early_init (void)
40{
41 int i;
42 const u32 *src;
43 register u32 *dst asm ("ep");
44 extern u32 _intv_end, _intv_load_start;
45
46 /* Set bus sizes: CS0 32-bit, CS1 16-bit, CS7 8-bit,
47 everything else 32-bit. */
48 V850E2_BSC = 0x2AA6;
49 for (i = 2; i <= 6; i++)
50 CSDEV(i) = 0; /* 32 bit */
51
52 /* Ensure that the simulator halts on a panic, instead of going
53 into an infinite loop inside the panic function. */
54 panic_timeout = -1;
55
56 /* Move the interrupt vectors into their real location. Note that
57 any relocations there are relative to the real location, so we
58 don't have to fix anything up. We use a loop instead of calling
59 memcpy to keep this a leaf function (to avoid a function
60 prologue being generated). */
61 dst = 0x10; /* &_intv_start + 0x10. */
62 src = &_intv_load_start;
63 do {
64 u32 t0 = src[0], t1 = src[1], t2 = src[2], t3 = src[3];
65 u32 t4 = src[4], t5 = src[5], t6 = src[6], t7 = src[7];
66 dst[0] = t0; dst[1] = t1; dst[2] = t2; dst[3] = t3;
67 dst[4] = t4; dst[5] = t5; dst[6] = t6; dst[7] = t7;
68 dst += 8;
69 src += 8;
70 } while (dst < &_intv_end);
71}
72
73void __init mach_setup (char **cmdline)
74{
75 memcons_setup ();
76
77 /* Setup up NMI0 to copy the registers to a known memory location.
78 The FGPA board has a button that produces NMI0 when pressed, so
79 this allows us to push the button, and then look at memory to see
80 what's in the registers (there's no other way to easily do so).
81 We have to use `setup_irq' instead of `request_irq' because it's
82 still too early to do memory allocation. */
83 setup_irq (IRQ_NMI (0), &reg_snap_action);
84}
85
86void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len)
87{
88 *ram_start = ERAM_ADDR;
89 *ram_len = ERAM_SIZE;
90}
91
92void __init mach_sched_init (struct irqaction *timer_action)
93{
94 /* Setup up the timer interrupt. The FPGA peripheral control
95 registers _only_ work with single-bit writes (set1/clr1)! */
96 __clear_bit (RPU_GTMC_CE_BIT, &RPU_GTMC);
97 __clear_bit (RPU_GTMC_CLK_BIT, &RPU_GTMC);
98 __set_bit (RPU_GTMC_CE_BIT, &RPU_GTMC);
99
100 /* We use the first RPU interrupt, which occurs every 8.192ms. */
101 setup_irq (IRQ_RPU (0), timer_action);
102}
103
104
105void mach_gettimeofday (struct timespec *tv)
106{
107 tv->tv_sec = 0;
108 tv->tv_nsec = 0;
109}
110
111void machine_halt (void) __attribute__ ((noreturn));
112void machine_halt (void)
113{
114 for (;;) {
115 DWC(0) = 0x7777;
116 DWC(1) = 0x7777;
117 ASC = 0xffff;
118 FLGREG(0) = 1; /* Halt immediately. */
119 asm ("di; halt; nop; nop; nop; nop; nop");
120 }
121}
122
123void machine_restart (char *__unused)
124{
125 machine_halt ();
126}
127
128void machine_power_off (void)
129{
130 machine_halt ();
131}
132
133
134/* Interrupts */
135
136struct v850e_intc_irq_init irq_inits[] = {
137 { "IRQ", 0, NUM_MACH_IRQS, 1, 7 },
138 { "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 },
139 { 0 }
140};
141#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
142
143struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
144
145/* Initialize interrupts. */
146void __init mach_init_irqs (void)
147{
148 v850e_intc_init_irq_types (irq_inits, hw_itypes);
149}
150
151
152/* An interrupt handler that copies the registers to a known memory location,
153 for debugging purposes. */
154
155static void make_reg_snap (int irq, void *dummy, struct pt_regs *regs)
156{
157 (*(unsigned *)REG_DUMP_ADDR)++;
158 (*(struct pt_regs *)(REG_DUMP_ADDR + sizeof (unsigned))) = *regs;
159}
160
161static int reg_snap_dev_id;
162static struct irqaction reg_snap_action = {
163 .handler = make_reg_snap,
164 .mask = CPU_MASK_NONE,
165 .name = "reg_snap",
166 .dev_id = &reg_snap_dev_id,
167};
diff --git a/arch/v850/kernel/fpga85e2c.ld b/arch/v850/kernel/fpga85e2c.ld
deleted file mode 100644
index b5d4578ae411..000000000000
--- a/arch/v850/kernel/fpga85e2c.ld
+++ /dev/null
@@ -1,62 +0,0 @@
1/* Linker script for the FPGA implementation of the V850E2 NA85E2C cpu core
2 (CONFIG_V850E2_FPGA85E2C). */
3
4MEMORY {
5 /* Reset vector. */
6 RESET : ORIGIN = 0, LENGTH = 0x10
7 /* Interrupt vectors. */
8 INTV : ORIGIN = 0x10, LENGTH = 0x470
9 /* The `window' in RAM were we're allowed to load stuff. */
10 RAM_LOW : ORIGIN = 0x480, LENGTH = 0x0005FB80
11 /* Some more ram above the window were we can put bss &c. */
12 RAM_HIGH : ORIGIN = 0x00060000, LENGTH = 0x000A0000
13 /* This is the area visible from the outside world (we can use
14 this only for uninitialized data). */
15 VISIBLE : ORIGIN = 0x00200000, LENGTH = 0x00060000
16}
17
18SECTIONS {
19 .reset : {
20 __kram_start = . ;
21 __intv_start = . ;
22 *(.intv.reset) /* Reset vector */
23 } > RESET
24
25 .ram_low : {
26 __r0_ram = . ; /* Must be near address 0. */
27 . = . + 32 ;
28
29 TEXT_CONTENTS
30 DATA_CONTENTS
31 ROOT_FS_CONTENTS
32 RAMK_INIT_CONTENTS_NO_END
33 INITRAMFS_CONTENTS
34 } > RAM_LOW
35
36 /* Where the interrupt vectors are initially loaded. */
37 __intv_load_start = . ;
38
39 .intv : {
40 *(.intv.common) /* Vectors common to all v850e proc. */
41 *(.intv.mach) /* Machine-specific int. vectors. */
42 __intv_end = . ;
43 } > INTV AT> RAM_LOW
44
45 .ram_high : {
46 /* This is here so that when we free init memory the
47 load-time copy of the interrupt vectors and any empty
48 space at the end of the `RAM_LOW' area is freed too. */
49 . = ALIGN (4096);
50 __init_end = . ;
51
52 BSS_CONTENTS
53 __kram_end = . ;
54 BOOTMAP_CONTENTS
55 } > RAM_HIGH
56
57 .visible : {
58 _memcons_output = . ;
59 . = . + 0x8000 ;
60 _memcons_output_end = . ;
61 } > VISIBLE
62}
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c
deleted file mode 100644
index b2bcc251f65b..000000000000
--- a/arch/v850/kernel/gbus_int.c
+++ /dev/null
@@ -1,271 +0,0 @@
1/*
2 * arch/v850/kernel/gbus_int.c -- Midas labs GBUS interrupt support
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/types.h>
15#include <linux/init.h>
16#include <linux/irq.h>
17#include <linux/interrupt.h>
18#include <linux/signal.h>
19#include <linux/kernel.h>
20
21#include <asm/machdep.h>
22
23
24/* The number of shared GINT interrupts. */
25#define NUM_GINTS 4
26
27/* For each GINT interrupt, how many GBUS interrupts are using it. */
28static unsigned gint_num_active_irqs[NUM_GINTS] = { 0 };
29
30/* A table of GINTn interrupts we actually use.
31 Note that we don't use GINT0 because all the boards we support treat it
32 specially. */
33struct used_gint {
34 unsigned gint;
35 unsigned priority;
36} used_gint[] = {
37 { 1, GBUS_INT_PRIORITY_HIGH },
38 { 3, GBUS_INT_PRIORITY_LOW }
39};
40#define NUM_USED_GINTS ARRAY_SIZE(used_gint)
41
42/* A table of which GINT is used by each GBUS interrupts (they are
43 assigned based on priority). */
44static unsigned char gbus_int_gint[IRQ_GBUS_INT_NUM];
45
46
47/* Interrupt enabling/disabling. */
48
49/* Enable interrupt handling for interrupt IRQ. */
50void gbus_int_enable_irq (unsigned irq)
51{
52 unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ];
53 GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint)
54 |= GBUS_INT_IRQ_MASK (irq);
55}
56
57/* Disable interrupt handling for interrupt IRQ. Note that any
58 interrupts received while disabled will be delivered once the
59 interrupt is enabled again, unless they are explicitly cleared using
60 `gbus_int_clear_pending_irq'. */
61void gbus_int_disable_irq (unsigned irq)
62{
63 unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ];
64 GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint)
65 &= ~GBUS_INT_IRQ_MASK (irq);
66}
67
68/* Return true if interrupt handling for interrupt IRQ is enabled. */
69int gbus_int_irq_enabled (unsigned irq)
70{
71 unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ];
72 return (GBUS_INT_ENABLE (GBUS_INT_IRQ_WORD(irq), gint)
73 & GBUS_INT_IRQ_MASK(irq));
74}
75
76/* Disable all GBUS irqs. */
77void gbus_int_disable_irqs ()
78{
79 unsigned w, n;
80 for (w = 0; w < GBUS_INT_NUM_WORDS; w++)
81 for (n = 0; n < IRQ_GINT_NUM; n++)
82 GBUS_INT_ENABLE (w, n) = 0;
83}
84
85/* Clear any pending interrupts for IRQ. */
86void gbus_int_clear_pending_irq (unsigned irq)
87{
88 GBUS_INT_CLEAR (GBUS_INT_IRQ_WORD(irq)) = GBUS_INT_IRQ_MASK (irq);
89}
90
91/* Return true if interrupt IRQ is pending (but disabled). */
92int gbus_int_irq_pending (unsigned irq)
93{
94 return (GBUS_INT_STATUS (GBUS_INT_IRQ_WORD(irq))
95 & GBUS_INT_IRQ_MASK(irq));
96}
97
98
99/* Delegating interrupts. */
100
101/* Handle a shared GINT interrupt by passing to the appropriate GBUS
102 interrupt handler. */
103static irqreturn_t gbus_int_handle_irq (int irq, void *dev_id,
104 struct pt_regs *regs)
105{
106 unsigned w;
107 irqreturn_t rval = IRQ_NONE;
108 unsigned gint = irq - IRQ_GINT (0);
109
110 for (w = 0; w < GBUS_INT_NUM_WORDS; w++) {
111 unsigned status = GBUS_INT_STATUS (w);
112 unsigned enable = GBUS_INT_ENABLE (w, gint);
113
114 /* Only pay attention to enabled interrupts. */
115 status &= enable;
116 if (status) {
117 irq = IRQ_GBUS_INT (w * GBUS_INT_BITS_PER_WORD);
118 do {
119 /* There's an active interrupt in word
120 W, find out which one, and call its
121 handler. */
122
123 while (! (status & 0x1)) {
124 irq++;
125 status >>= 1;
126 }
127 status &= ~0x1;
128
129 /* Recursively call handle_irq to handle it. */
130 handle_irq (irq, regs);
131 rval = IRQ_HANDLED;
132 } while (status);
133 }
134 }
135
136 /* Toggle the `all enable' bit back and forth, which should cause
137 another edge transition if there are any other interrupts
138 still pending, and so result in another CPU interrupt. */
139 GBUS_INT_ENABLE (0, gint) &= ~0x1;
140 GBUS_INT_ENABLE (0, gint) |= 0x1;
141
142 return rval;
143}
144
145
146/* Initialize GBUS interrupt sources. */
147
148static void irq_nop (unsigned irq) { }
149
150static unsigned gbus_int_startup_irq (unsigned irq)
151{
152 unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ];
153
154 if (gint_num_active_irqs[gint] == 0) {
155 /* First enable the CPU interrupt. */
156 int rval =
157 request_irq (IRQ_GINT(gint), gbus_int_handle_irq,
158 IRQF_DISABLED,
159 "gbus_int_handler",
160 &gint_num_active_irqs[gint]);
161 if (rval != 0)
162 return rval;
163 }
164
165 gint_num_active_irqs[gint]++;
166
167 gbus_int_clear_pending_irq (irq);
168 gbus_int_enable_irq (irq);
169
170 return 0;
171}
172
173static void gbus_int_shutdown_irq (unsigned irq)
174{
175 unsigned gint = gbus_int_gint[irq - GBUS_INT_BASE_IRQ];
176
177 gbus_int_disable_irq (irq);
178
179 if (--gint_num_active_irqs[gint] == 0)
180 /* Disable the CPU interrupt. */
181 free_irq (IRQ_GINT(gint), &gint_num_active_irqs[gint]);
182}
183
184/* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array
185 INITS (which is terminated by an entry with the name field == 0). */
186void __init gbus_int_init_irq_types (struct gbus_int_irq_init *inits,
187 struct hw_interrupt_type *hw_irq_types)
188{
189 struct gbus_int_irq_init *init;
190 for (init = inits; init->name; init++) {
191 unsigned i;
192 struct hw_interrupt_type *hwit = hw_irq_types++;
193
194 hwit->typename = init->name;
195
196 hwit->startup = gbus_int_startup_irq;
197 hwit->shutdown = gbus_int_shutdown_irq;
198 hwit->enable = gbus_int_enable_irq;
199 hwit->disable = gbus_int_disable_irq;
200 hwit->ack = irq_nop;
201 hwit->end = irq_nop;
202
203 /* Initialize kernel IRQ infrastructure for this interrupt. */
204 init_irq_handlers(init->base, init->num, init->interval, hwit);
205
206 /* Set the interrupt priorities. */
207 for (i = 0; i < init->num; i++) {
208 unsigned j;
209 for (j = 0; j < NUM_USED_GINTS; j++)
210 if (used_gint[j].priority > init->priority)
211 break;
212 /* Wherever we stopped looking is one past the
213 GINT we want. */
214 gbus_int_gint[init->base + i * init->interval
215 - GBUS_INT_BASE_IRQ]
216 = used_gint[j > 0 ? j - 1 : 0].gint;
217 }
218 }
219}
220
221
222/* Initialize IRQS. */
223
224/* Chip interrupts (GINTn) shared among GBUS interrupts. */
225static struct hw_interrupt_type gint_hw_itypes[NUM_USED_GINTS];
226
227
228/* GBUS interrupts themselves. */
229
230struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
231 /* First set defaults. */
232 { "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
233 { 0 }
234};
235#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
236
237static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
238
239
240/* Initialize GBUS interrupts. */
241void __init gbus_int_init_irqs (void)
242{
243 unsigned i;
244
245 /* First initialize the shared gint interrupts. */
246 for (i = 0; i < NUM_USED_GINTS; i++) {
247 unsigned gint = used_gint[i].gint;
248 struct v850e_intc_irq_init gint_irq_init[2];
249
250 /* We initialize one GINT interrupt at a time. */
251 gint_irq_init[0].name = "GINT";
252 gint_irq_init[0].base = IRQ_GINT (gint);
253 gint_irq_init[0].num = 1;
254 gint_irq_init[0].interval = 1;
255 gint_irq_init[0].priority = used_gint[i].priority;
256
257 gint_irq_init[1].name = 0; /* Terminate the vector. */
258
259 v850e_intc_init_irq_types (gint_irq_init, gint_hw_itypes);
260 }
261
262 /* Then the GBUS interrupts. */
263 gbus_int_disable_irqs ();
264 gbus_int_init_irq_types (gbus_irq_inits, gbus_hw_itypes);
265 /* Turn on the `all enable' bits, which are ANDed with
266 individual interrupt enable bits; we only want to bother with
267 the latter. They are the first bit in the first word of each
268 interrupt-enable area. */
269 for (i = 0; i < NUM_USED_GINTS; i++)
270 GBUS_INT_ENABLE (0, used_gint[i].gint) = 0x1;
271}
diff --git a/arch/v850/kernel/head.S b/arch/v850/kernel/head.S
deleted file mode 100644
index c490b937ef14..000000000000
--- a/arch/v850/kernel/head.S
+++ /dev/null
@@ -1,128 +0,0 @@
1/*
2 * arch/v850/kernel/head.S -- Lowest-level startup code
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <asm/clinkage.h>
15#include <asm/current.h>
16#include <asm/entry.h>
17#include <asm/thread_info.h>
18#include <asm/irq.h>
19
20
21/* Make a slightly more convenient alias for C_SYMBOL_NAME. */
22#define CSYM C_SYMBOL_NAME
23
24
25 .text
26
27 // Define `mach_early_init' as a weak symbol
28 .global CSYM(mach_early_init)
29 .weak CSYM(mach_early_init)
30
31C_ENTRY(start):
32 // Make sure interrupts are turned off, just in case
33 di
34
35#ifdef CONFIG_RESET_GUARD
36 // See if we got here via an unexpected reset
37 ld.w RESET_GUARD, r19 // Check current value of reset guard
38 mov RESET_GUARD_ACTIVE, r20
39 cmp r19, r20
40 bne 1f // Guard was not active
41
42 // If we get here, the reset guard was active. Load up some
43 // interesting values as arguments, and jump to the handler.
44 st.w r0, RESET_GUARD // Allow further resets to succeed
45 mov lp, r6 // Arg 0: return address
46 ld.b KM, r7 // Arg 1: kernel mode
47 mov sp, r9 // Arg 3: stack pointer
48 ld.w KSP, r19 // maybe switch to kernel stack
49 cmp r7, r0 // see if already in kernel mode
50 cmov z, r19, sp, sp // and switch to kernel stack if not
51 GET_CURRENT_TASK(r8) // Arg 2: task pointer
52 jr CSYM(unexpected_reset)
53
541: st.w r20, RESET_GUARD // Turn on reset guard
55#endif /* CONFIG_RESET_GUARD */
56
57 // Setup a temporary stack for doing pre-initialization function calls.
58 //
59 // We can't use the initial kernel stack, because (1) it may be
60 // located in memory we're not allowed to touch, and (2) since
61 // it's in the data segment, calling memcpy to initialize that
62 // area from ROM will overwrite memcpy's return address.
63 mov hilo(CSYM(_init_stack_end) - 4), sp
64
65 // See if there's a platform-specific early-initialization routine
66 // defined; it's a weak symbol, so it will have an address of zero if
67 // there's not.
68 mov hilo(CSYM(mach_early_init)), r6
69 cmp r6, r0
70 bz 3f
71
72 // There is one, so call it. If this function is written in C, it
73 // should be very careful -- the stack pointer is valid, but very
74 // little else is (e.g., bss is not zeroed yet, and initialized data
75 // hasn't been).
76 jarl 2f, lp // first figure out return address
772: add 3f - ., lp
78 jmp [r6] // do call
793:
80
81#ifdef CONFIG_ROM_KERNEL
82 // Copy the data area from ROM to RAM
83 mov hilo(CSYM(_rom_copy_dst_start)), r6
84 mov hilo(CSYM(_rom_copy_src_start)), r7
85 mov hilo(CSYM(_rom_copy_dst_end)), r8
86 sub r6, r8
87 jarl CSYM(memcpy), lp
88#endif
89
90 // Load the initial thread's stack, and current task pointer (in r16)
91 mov hilo(CSYM(init_thread_union)), r19
92 movea THREAD_SIZE, r19, sp
93 ld.w TI_TASK[r19], CURRENT_TASK
94
95#ifdef CONFIG_TIME_BOOTUP
96 /* This stuff must come after mach_early_init, because interrupts may
97 not work until after its been called. */
98 jarl CSYM(highres_timer_reset), lp
99 jarl CSYM(highres_timer_start), lp
100#endif
101
102 // Kernel stack pointer save location
103 st.w sp, KSP
104
105 // Assert that we're in `kernel mode'
106 mov 1, r19
107 st.w r19, KM
108
109#ifdef CONFIG_ZERO_BSS
110 // Zero bss area, since we can't rely upon any loader to do so
111 mov hilo(CSYM(_sbss)), r6
112 mov r0, r7
113 mov hilo(CSYM(_ebss)), r8
114 sub r6, r8
115 jarl CSYM(memset), lp
116#endif
117
118 // What happens if the main kernel function returns (it shouldn't)
119 mov hilo(CSYM(machine_halt)), lp
120
121 // Start the linux kernel. We use an indirect jump to get extra
122 // range, because on some platforms this initial startup code
123 // (and the associated platform-specific code in mach_early_init)
124 // are located far away from the main kernel, e.g. so that they
125 // can initialize RAM first and copy the kernel or something.
126 mov hilo(CSYM(start_kernel)), r12
127 jmp [r12]
128C_END(start)
diff --git a/arch/v850/kernel/highres_timer.c b/arch/v850/kernel/highres_timer.c
deleted file mode 100644
index b16ad1eaf966..000000000000
--- a/arch/v850/kernel/highres_timer.c
+++ /dev/null
@@ -1,132 +0,0 @@
1/*
2 * arch/v850/kernel/highres_timer.c -- High resolution timing routines
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <asm/system.h>
15#include <asm/v850e_timer_d.h>
16#include <asm/highres_timer.h>
17
18#define HIGHRES_TIMER_USEC_SHIFT 12
19
20/* Pre-calculated constant used for converting ticks to real time
21 units. We initialize it to prevent it being put into BSS. */
22static u32 highres_timer_usec_prescale = 1;
23
24void highres_timer_slow_tick_irq (void) __attribute__ ((noreturn));
25void highres_timer_slow_tick_irq (void)
26{
27 /* This is an interrupt handler, so it must be very careful to
28 not to trash any registers. At this point, the stack-pointer
29 (r3) has been saved in the chip ram location ENTRY_SP by the
30 interrupt vector, so we can use it as a scratch register; we
31 must also restore it before returning. */
32 asm ("ld.w %0[r0], sp;"
33 "add 1, sp;"
34 "st.w sp, %0[r0];"
35 "ld.w %1[r0], sp;" /* restore pre-irq stack-pointer */
36 "reti"
37 ::
38 "i" (HIGHRES_TIMER_SLOW_TICKS_ADDR),
39 "i" (ENTRY_SP_ADDR)
40 : "memory");
41}
42
43void highres_timer_reset (void)
44{
45 V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT) = 0;
46 HIGHRES_TIMER_SLOW_TICKS = 0;
47}
48
49void highres_timer_start (void)
50{
51 u32 fast_tick_rate;
52
53 /* Start hardware timer. */
54 v850e_timer_d_configure (HIGHRES_TIMER_TIMER_D_UNIT,
55 HIGHRES_TIMER_SLOW_TICK_RATE);
56
57 fast_tick_rate =
58 (V850E_TIMER_D_BASE_FREQ
59 >> V850E_TIMER_D_DIVLOG2 (HIGHRES_TIMER_TIMER_D_UNIT));
60
61 /* The obvious way of calculating microseconds from fast ticks
62 is to do:
63
64 usec = fast_ticks * 10^6 / fast_tick_rate
65
66 However, divisions are much slower than multiplications, and
67 the above calculation can overflow, so we do this instead:
68
69 usec = fast_ticks * (10^6 * 2^12 / fast_tick_rate) / 2^12
70
71 since we can pre-calculate (10^6 * (2^12 / fast_tick_rate))
72 and use a shift for dividing by 2^12, this avoids division,
73 and is almost as accurate (it differs by about 2 microseconds
74 at the extreme value of the fast-tick counter's ranger). */
75 highres_timer_usec_prescale = ((1000000 << HIGHRES_TIMER_USEC_SHIFT)
76 / fast_tick_rate);
77
78 /* Enable the interrupt (which is hardwired to this use), and
79 give it the highest priority. */
80 V850E_INTC_IC (IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)) = 0;
81}
82
83void highres_timer_stop (void)
84{
85 /* Stop the timer. */
86 V850E_TIMER_D_TMCD (HIGHRES_TIMER_TIMER_D_UNIT) =
87 V850E_TIMER_D_TMCD_CAE;
88 /* Disable its interrupt, just in case. */
89 v850e_intc_disable_irq (IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT));
90}
91
92inline void highres_timer_read_ticks (u32 *slow_ticks, u32 *fast_ticks)
93{
94 int flags;
95 u32 fast_ticks_1, fast_ticks_2, _slow_ticks;
96
97 local_irq_save (flags);
98 fast_ticks_1 = V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT);
99 _slow_ticks = HIGHRES_TIMER_SLOW_TICKS;
100 fast_ticks_2 = V850E_TIMER_D_TMD (HIGHRES_TIMER_TIMER_D_UNIT);
101 local_irq_restore (flags);
102
103 if (fast_ticks_2 < fast_ticks_1)
104 _slow_ticks++;
105
106 *slow_ticks = _slow_ticks;
107 *fast_ticks = fast_ticks_2;
108}
109
110inline void highres_timer_ticks_to_timeval (u32 slow_ticks, u32 fast_ticks,
111 struct timeval *tv)
112{
113 unsigned long sec, sec_rem, usec;
114
115 usec = ((fast_ticks * highres_timer_usec_prescale)
116 >> HIGHRES_TIMER_USEC_SHIFT);
117
118 sec = slow_ticks / HIGHRES_TIMER_SLOW_TICK_RATE;
119 sec_rem = slow_ticks % HIGHRES_TIMER_SLOW_TICK_RATE;
120
121 usec += sec_rem * (1000000 / HIGHRES_TIMER_SLOW_TICK_RATE);
122
123 tv->tv_sec = sec;
124 tv->tv_usec = usec;
125}
126
127void highres_timer_read (struct timeval *tv)
128{
129 u32 fast_ticks, slow_ticks;
130 highres_timer_read_ticks (&slow_ticks, &fast_ticks);
131 highres_timer_ticks_to_timeval (slow_ticks, fast_ticks, tv);
132}
diff --git a/arch/v850/kernel/init_task.c b/arch/v850/kernel/init_task.c
deleted file mode 100644
index 44b274dff33f..000000000000
--- a/arch/v850/kernel/init_task.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * arch/v850/kernel/init_task.c -- Initial task/thread structures
3 *
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 */
11
12#include <linux/mm.h>
13#include <linux/module.h>
14#include <linux/sched.h>
15#include <linux/init.h>
16#include <linux/init_task.h>
17#include <linux/fs.h>
18#include <linux/mqueue.h>
19
20#include <asm/uaccess.h>
21#include <asm/pgtable.h>
22
23static struct fs_struct init_fs = INIT_FS;
24static struct signal_struct init_signals = INIT_SIGNALS (init_signals);
25static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
26struct mm_struct init_mm = INIT_MM (init_mm);
27
28EXPORT_SYMBOL(init_mm);
29
30/*
31 * Initial task structure.
32 *
33 * All other task structs will be allocated on slabs in fork.c
34 */
35struct task_struct init_task = INIT_TASK (init_task);
36
37EXPORT_SYMBOL(init_task);
38
39/*
40 * Initial thread structure.
41 *
42 * We need to make sure that this is 8192-byte aligned due to the
43 * way process stacks are handled. This is done by having a special
44 * "init_task" linker map entry.
45 */
46union thread_union init_thread_union
47 __attribute__((__section__(".data.init_task"))) =
48 { INIT_THREAD_INFO(init_task) };
diff --git a/arch/v850/kernel/intv.S b/arch/v850/kernel/intv.S
deleted file mode 100644
index 671e4c6150dd..000000000000
--- a/arch/v850/kernel/intv.S
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 * arch/v850/kernel/intv.S -- Interrupt vectors
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <asm/clinkage.h>
15#include <asm/irq.h>
16#include <asm/machdep.h>
17#include <asm/entry.h>
18
19#ifdef CONFIG_V850E_HIGHRES_TIMER
20#include <asm/highres_timer.h>
21#endif
22
23/* Jump to an interrupt/trap handler. These handlers (defined in entry.S)
24 expect the stack-pointer to be saved in ENTRY_SP, so we use sp to do an
25 indirect jump (which avoids problems when the handler is more than a signed
26 22-bit offset away). */
27#define JUMP_TO_HANDLER(name, sp_save_loc) \
28 st.w sp, sp_save_loc; \
29 mov hilo(name), sp; \
30 jmp [sp]
31
32
33 /* Reset vector. */
34 .section .intv.reset, "ax"
35 .org 0x0
36 mov hilo(C_SYMBOL_NAME(start)), r1;
37 jmp [r1]
38
39
40 /* Generic interrupt vectors. */
41 .section .intv.common, "ax"
42 .balign 0x10
43 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x10 - NMI0
44 .balign 0x10
45 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x20 - NMI1
46 .balign 0x10
47 JUMP_TO_HANDLER (nmi, NMI_ENTRY_SP) // 0x30 - NMI2
48
49 .balign 0x10
50 JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x40 - TRAP0n
51 .balign 0x10
52 JUMP_TO_HANDLER (trap, ENTRY_SP) // 0x50 - TRAP1n
53
54 .balign 0x10
55 JUMP_TO_HANDLER (dbtrap, ENTRY_SP) // 0x60 - Illegal op / DBTRAP insn
56
57
58 /* Hardware interrupt vectors. */
59 .section .intv.mach, "ax"
60 .org 0x0
61
62#if defined (CONFIG_V850E_HIGHRES_TIMER) && defined (IRQ_INTCMD)
63
64 /* Interrupts before the highres timer interrupt. */
65 .rept IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT)
66 .balign 0x10
67 JUMP_TO_HANDLER (irq, ENTRY_SP)
68 .endr
69
70 /* The highres timer interrupt. */
71 .balign 0x10
72 JUMP_TO_HANDLER (C_SYMBOL_NAME (highres_timer_slow_tick_irq), ENTRY_SP)
73
74 /* Interrupts after the highres timer interrupt. */
75 .rept NUM_CPU_IRQS - IRQ_INTCMD (HIGHRES_TIMER_TIMER_D_UNIT) - 1
76 .balign 0x10
77 JUMP_TO_HANDLER (irq, ENTRY_SP)
78 .endr
79
80#else /* No highres timer */
81
82 .rept NUM_CPU_IRQS
83 .balign 0x10
84 JUMP_TO_HANDLER (irq, ENTRY_SP)
85 .endr
86
87#endif /* Highres timer */
diff --git a/arch/v850/kernel/irq.c b/arch/v850/kernel/irq.c
deleted file mode 100644
index 858c45819aab..000000000000
--- a/arch/v850/kernel/irq.c
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * arch/v850/kernel/irq.c -- High-level interrupt handling
3 *
4 * Copyright (C) 2001,02,03,04,05 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03,04,05 Miles Bader <miles@gnu.org>
6 * Copyright (C) 1994-2000 Ralf Baechle
7 * Copyright (C) 1992 Linus Torvalds
8 *
9 * This file is subject to the terms and conditions of the GNU General
10 * Public License. See the file COPYING in the main directory of this
11 * archive for more details.
12 *
13 * This file was was derived from the mips version, arch/mips/kernel/irq.c
14 */
15
16#include <linux/kernel.h>
17#include <linux/module.h>
18#include <linux/irq.h>
19#include <linux/init.h>
20#include <linux/interrupt.h>
21#include <linux/kernel_stat.h>
22#include <linux/slab.h>
23#include <linux/mm.h>
24#include <linux/random.h>
25#include <linux/seq_file.h>
26
27#include <asm/system.h>
28
29/*
30 * 'what should we do if we get a hw irq event on an illegal vector'.
31 * each architecture has to answer this themselves, it doesn't deserve
32 * a generic callback i think.
33 */
34void ack_bad_irq(unsigned int irq)
35{
36 printk("received IRQ %d with unknown interrupt type\n", irq);
37}
38
39volatile unsigned long irq_err_count, spurious_count;
40
41/*
42 * Generic, controller-independent functions:
43 */
44
45int show_interrupts(struct seq_file *p, void *v)
46{
47 int irq = *(loff_t *) v;
48
49 if (irq == 0) {
50 int cpu;
51 seq_puts(p, " ");
52 for (cpu=0; cpu < 1 /*smp_num_cpus*/; cpu++)
53 seq_printf(p, "CPU%d ", cpu);
54 seq_putc(p, '\n');
55 }
56
57 if (irq < NR_IRQS) {
58 unsigned long flags;
59 struct irqaction *action;
60
61 spin_lock_irqsave(&irq_desc[irq].lock, flags);
62
63 action = irq_desc[irq].action;
64 if (action) {
65 int j;
66 int count = 0;
67 int num = -1;
68 const char *type_name = irq_desc[irq].chip->typename;
69
70 for (j = 0; j < NR_IRQS; j++)
71 if (irq_desc[j].chip->typename == type_name){
72 if (irq == j)
73 num = count;
74 count++;
75 }
76
77 seq_printf(p, "%3d: ",irq);
78 seq_printf(p, "%10u ", kstat_irqs(irq));
79 if (count > 1) {
80 int prec = (num >= 100 ? 3 : num >= 10 ? 2 : 1);
81 seq_printf(p, " %*s%d", 14 - prec,
82 type_name, num);
83 } else
84 seq_printf(p, " %14s", type_name);
85
86 seq_printf(p, " %s", action->name);
87 for (action=action->next; action; action = action->next)
88 seq_printf(p, ", %s", action->name);
89 seq_putc(p, '\n');
90 }
91
92 spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
93 } else if (irq == NR_IRQS)
94 seq_printf(p, "ERR: %10lu\n", irq_err_count);
95
96 return 0;
97}
98
99/* Handle interrupt IRQ. REGS are the registers at the time of ther
100 interrupt. */
101unsigned int handle_irq (int irq, struct pt_regs *regs)
102{
103 irq_enter();
104 __do_IRQ(irq, regs);
105 irq_exit();
106 return 1;
107}
108
109/* Initialize irq handling for IRQs.
110 BASE_IRQ, BASE_IRQ+INTERVAL, ..., BASE_IRQ+NUM*INTERVAL
111 to IRQ_TYPE. An IRQ_TYPE of 0 means to use a generic interrupt type. */
112void __init
113init_irq_handlers (int base_irq, int num, int interval,
114 struct hw_interrupt_type *irq_type)
115{
116 while (num-- > 0) {
117 irq_desc[base_irq].status = IRQ_DISABLED;
118 irq_desc[base_irq].action = NULL;
119 irq_desc[base_irq].depth = 1;
120 irq_desc[base_irq].chip = irq_type;
121 base_irq += interval;
122 }
123}
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c
deleted file mode 100644
index 143774de75e1..000000000000
--- a/arch/v850/kernel/ma.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * arch/v850/kernel/ma.c -- V850E/MA series of cpu chips
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/swap.h>
18#include <linux/bootmem.h>
19#include <linux/irq.h>
20
21#include <asm/atomic.h>
22#include <asm/page.h>
23#include <asm/machdep.h>
24#include <asm/v850e_timer_d.h>
25
26#include "mach.h"
27
28void __init mach_sched_init (struct irqaction *timer_action)
29{
30 /* Start hardware timer. */
31 v850e_timer_d_configure (0, HZ);
32 /* Install timer interrupt handler. */
33 setup_irq (IRQ_INTCMD(0), timer_action);
34}
35
36static struct v850e_intc_irq_init irq_inits[] = {
37 { "IRQ", 0, NUM_MACH_IRQS, 1, 7 },
38 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 },
39 { "DMA", IRQ_INTDMA(0), IRQ_INTDMA_NUM, 1, 2 },
40 { "CSI", IRQ_INTCSI(0), IRQ_INTCSI_NUM, 4, 4 },
41 { "SER", IRQ_INTSER(0), IRQ_INTSER_NUM, 4, 3 },
42 { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 4, 4 },
43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 },
44 { 0 }
45};
46#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
47
48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
49
50/* Initialize MA chip interrupts. */
51void __init ma_init_irqs (void)
52{
53 v850e_intc_init_irq_types (irq_inits, hw_itypes);
54}
55
56/* Called before configuring an on-chip UART. */
57void ma_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
58{
59 /* We only know about the first two UART channels (though
60 specific chips may have more). */
61 if (chan < 2) {
62 unsigned bits = 0x3 << (chan * 3);
63 /* Specify that the relevant pins on the chip should do
64 serial I/O, not direct I/O. */
65 MA_PORT4_PMC |= bits;
66 /* Specify that we're using the UART, not the CSI device. */
67 MA_PORT4_PFC |= bits;
68 }
69}
diff --git a/arch/v850/kernel/mach.c b/arch/v850/kernel/mach.c
deleted file mode 100644
index b9db278d2b71..000000000000
--- a/arch/v850/kernel/mach.c
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/v850/kernel/mach.c -- Defaults for some things defined by "mach.h"
3 *
4 * Copyright (C) 2001 NEC Corporation
5 * Copyright (C) 2001 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include "mach.h"
15
16/* Called with each timer tick, if non-zero. */
17void (*mach_tick)(void) = 0;
diff --git a/arch/v850/kernel/mach.h b/arch/v850/kernel/mach.h
deleted file mode 100644
index 9e0e4816ec56..000000000000
--- a/arch/v850/kernel/mach.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * arch/v850/kernel/mach.h -- Machine-dependent functions used by v850 port
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#ifndef __V850_MACH_H__
15#define __V850_MACH_H__
16
17#include <linux/kernel.h>
18#include <linux/time.h>
19#include <linux/spinlock.h>
20#include <linux/interrupt.h>
21#include <linux/fs.h>
22#include <linux/seq_file.h>
23
24#include <asm/ptrace.h>
25#include <asm/entry.h>
26#include <asm/clinkage.h>
27
28void mach_setup (char **cmdline);
29void mach_gettimeofday (struct timespec *tv);
30void mach_sched_init (struct irqaction *timer_action);
31void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len);
32void mach_init_irqs (void);
33
34/* If defined, is called very early in the kernel initialization. The
35 stack pointer is valid, but very little has been initialized (e.g.,
36 bss is not zeroed yet) when this is called, so care must taken. */
37void mach_early_init (void);
38
39/* If defined, called after the bootmem allocator has been initialized,
40 to allow the platform-dependent code to reserve any areas of RAM that
41 the kernel shouldn't touch. */
42void mach_reserve_bootmem (void) __attribute__ ((__weak__));
43
44/* Called with each timer tick, if non-zero. */
45extern void (*mach_tick) (void);
46
47/* The following establishes aliases for various mach_ functions to the
48 name by which the rest of the kernel calls them. These statements
49 should only have an effect in the file that defines the actual functions. */
50#define MACH_ALIAS(to, from) \
51 asm (".global " macrology_stringify (C_SYMBOL_NAME (to)) ";" \
52 macrology_stringify (C_SYMBOL_NAME (to)) \
53 " = " macrology_stringify (C_SYMBOL_NAME (from)))
54/* e.g.: MACH_ALIAS (kernel_name, arch_spec_name); */
55
56#endif /* __V850_MACH_H__ */
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c
deleted file mode 100644
index 007115dc9ce0..000000000000
--- a/arch/v850/kernel/me2.c
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * arch/v850/kernel/me2.c -- V850E/ME2 chip-specific support
3 *
4 * Copyright (C) 2003 NEC Corporation
5 * Copyright (C) 2003 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/swap.h>
18#include <linux/bootmem.h>
19#include <linux/irq.h>
20
21#include <asm/atomic.h>
22#include <asm/page.h>
23#include <asm/machdep.h>
24#include <asm/v850e_timer_d.h>
25
26#include "mach.h"
27
28void __init mach_sched_init (struct irqaction *timer_action)
29{
30 /* Start hardware timer. */
31 v850e_timer_d_configure (0, HZ);
32 /* Install timer interrupt handler. */
33 setup_irq (IRQ_INTCMD(0), timer_action);
34}
35
36static struct v850e_intc_irq_init irq_inits[] = {
37 { "IRQ", 0, NUM_CPU_IRQS, 1, 7 },
38 { "INTP", IRQ_INTP(0), IRQ_INTP_NUM, 1, 5 },
39 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 3 },
40 { "UBTIRE", IRQ_INTUBTIRE(0), IRQ_INTUBTIRE_NUM, 5, 4 },
41 { "UBTIR", IRQ_INTUBTIR(0), IRQ_INTUBTIR_NUM, 5, 4 },
42 { "UBTIT", IRQ_INTUBTIT(0), IRQ_INTUBTIT_NUM, 5, 4 },
43 { "UBTIF", IRQ_INTUBTIF(0), IRQ_INTUBTIF_NUM, 5, 4 },
44 { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 },
45 { 0 }
46};
47#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
48
49static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
50
51/* Initialize V850E/ME2 chip interrupts. */
52void __init me2_init_irqs (void)
53{
54 v850e_intc_init_irq_types (irq_inits, hw_itypes);
55}
56
57/* Called before configuring an on-chip UART. */
58void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
59{
60 if (chan == 0) {
61 /* Specify that the relevant pins on the chip should do
62 serial I/O, not direct I/O. */
63 ME2_PORT1_PMC |= 0xC;
64 /* Specify that we're using the UART, not the CSI device. */
65 ME2_PORT1_PFC |= 0xC;
66 } else if (chan == 1) {
67 /* Specify that the relevant pins on the chip should do
68 serial I/O, not direct I/O. */
69 ME2_PORT2_PMC |= 0x6;
70 /* Specify that we're using the UART, not the CSI device. */
71 ME2_PORT2_PFC |= 0x6;
72 }
73}
diff --git a/arch/v850/kernel/memcons.c b/arch/v850/kernel/memcons.c
deleted file mode 100644
index 92f514fdcc79..000000000000
--- a/arch/v850/kernel/memcons.c
+++ /dev/null
@@ -1,135 +0,0 @@
1/*
2 * arch/v850/kernel/memcons.c -- Console I/O to a memory buffer
3 *
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/console.h>
16#include <linux/tty.h>
17#include <linux/tty_driver.h>
18#include <linux/init.h>
19
20/* If this device is enabled, the linker map should define start and
21 end points for its buffer. */
22extern char memcons_output[], memcons_output_end;
23
24/* Current offset into the buffer. */
25static unsigned long memcons_offs = 0;
26
27/* Spinlock protecting memcons_offs. */
28static DEFINE_SPINLOCK(memcons_lock);
29
30
31static size_t write (const char *buf, size_t len)
32{
33 unsigned long flags;
34 char *point;
35
36 spin_lock_irqsave (memcons_lock, flags);
37
38 point = memcons_output + memcons_offs;
39 if (point + len >= &memcons_output_end) {
40 len = &memcons_output_end - point;
41 memcons_offs = 0;
42 } else
43 memcons_offs += len;
44
45 spin_unlock_irqrestore (memcons_lock, flags);
46
47 memcpy (point, buf, len);
48
49 return len;
50}
51
52
53/* Low-level console. */
54
55static void memcons_write (struct console *co, const char *buf, unsigned len)
56{
57 while (len > 0)
58 len -= write (buf, len);
59}
60
61static struct tty_driver *tty_driver;
62
63static struct tty_driver *memcons_device (struct console *co, int *index)
64{
65 *index = co->index;
66 return tty_driver;
67}
68
69static struct console memcons =
70{
71 .name = "memcons",
72 .write = memcons_write,
73 .device = memcons_device,
74 .flags = CON_PRINTBUFFER,
75 .index = -1,
76};
77
78void memcons_setup (void)
79{
80 register_console (&memcons);
81 printk (KERN_INFO "Console: static memory buffer (memcons)\n");
82}
83
84/* Higher level TTY interface. */
85
86int memcons_tty_open (struct tty_struct *tty, struct file *filp)
87{
88 return 0;
89}
90
91int memcons_tty_write (struct tty_struct *tty, const unsigned char *buf, int len)
92{
93 return write (buf, len);
94}
95
96int memcons_tty_write_room (struct tty_struct *tty)
97{
98 return &memcons_output_end - (memcons_output + memcons_offs);
99}
100
101int memcons_tty_chars_in_buffer (struct tty_struct *tty)
102{
103 /* We have no buffer. */
104 return 0;
105}
106
107static const struct tty_operations ops = {
108 .open = memcons_tty_open,
109 .write = memcons_tty_write,
110 .write_room = memcons_tty_write_room,
111 .chars_in_buffer = memcons_tty_chars_in_buffer,
112};
113
114int __init memcons_tty_init (void)
115{
116 int err;
117 struct tty_driver *driver = alloc_tty_driver(1);
118 if (!driver)
119 return -ENOMEM;
120
121 driver->name = "memcons";
122 driver->major = TTY_MAJOR;
123 driver->minor_start = 64;
124 driver->type = TTY_DRIVER_TYPE_SYSCONS;
125 driver->init_termios = tty_std_termios;
126 tty_set_operations(driver, &ops);
127 err = tty_register_driver(driver);
128 if (err) {
129 put_tty_driver(driver);
130 return err;
131 }
132 tty_driver = driver;
133 return 0;
134}
135__initcall (memcons_tty_init);
diff --git a/arch/v850/kernel/module.c b/arch/v850/kernel/module.c
deleted file mode 100644
index 64aeb3e37c52..000000000000
--- a/arch/v850/kernel/module.c
+++ /dev/null
@@ -1,237 +0,0 @@
1/*
2 * arch/v850/kernel/module.c -- Architecture-specific module functions
3 *
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
6 * Copyright (C) 2001,03 Rusty Russell
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 *
14 * Derived in part from arch/ppc/kernel/module.c
15 */
16
17#include <linux/kernel.h>
18#include <linux/vmalloc.h>
19#include <linux/moduleloader.h>
20#include <linux/elf.h>
21
22#if 0
23#define DEBUGP printk
24#else
25#define DEBUGP(fmt , ...)
26#endif
27
28void *module_alloc (unsigned long size)
29{
30 return size == 0 ? 0 : vmalloc (size);
31}
32
33void module_free (struct module *mod, void *module_region)
34{
35 vfree (module_region);
36 /* FIXME: If module_region == mod->init_region, trim exception
37 table entries. */
38}
39
40int module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
41 struct module *mod)
42{
43 return 0;
44}
45
46/* Count how many different relocations (different symbol, different
47 addend) */
48static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num)
49{
50 unsigned int i, j, ret = 0;
51
52 /* Sure, this is order(n^2), but it's usually short, and not
53 time critical */
54 for (i = 0; i < num; i++) {
55 for (j = 0; j < i; j++) {
56 /* If this addend appeared before, it's
57 already been counted */
58 if (ELF32_R_SYM(rela[i].r_info)
59 == ELF32_R_SYM(rela[j].r_info)
60 && rela[i].r_addend == rela[j].r_addend)
61 break;
62 }
63 if (j == i) ret++;
64 }
65 return ret;
66}
67
68/* Get the potential trampolines size required of the init and
69 non-init sections */
70static unsigned long get_plt_size(const Elf32_Ehdr *hdr,
71 const Elf32_Shdr *sechdrs,
72 const char *secstrings,
73 int is_init)
74{
75 unsigned long ret = 0;
76 unsigned i;
77
78 /* Everything marked ALLOC (this includes the exported
79 symbols) */
80 for (i = 1; i < hdr->e_shnum; i++) {
81 /* If it's called *.init*, and we're not init, we're
82 not interested */
83 if ((strstr(secstrings + sechdrs[i].sh_name, ".init") != 0)
84 != is_init)
85 continue;
86
87 if (sechdrs[i].sh_type == SHT_RELA) {
88 DEBUGP("Found relocations in section %u\n", i);
89 DEBUGP("Ptr: %p. Number: %u\n",
90 (void *)hdr + sechdrs[i].sh_offset,
91 sechdrs[i].sh_size / sizeof(Elf32_Rela));
92 ret += count_relocs((void *)hdr
93 + sechdrs[i].sh_offset,
94 sechdrs[i].sh_size
95 / sizeof(Elf32_Rela))
96 * sizeof(struct v850_plt_entry);
97 }
98 }
99
100 return ret;
101}
102
103int module_frob_arch_sections(Elf32_Ehdr *hdr,
104 Elf32_Shdr *sechdrs,
105 char *secstrings,
106 struct module *me)
107{
108 unsigned int i;
109
110 /* Find .plt and .pltinit sections */
111 for (i = 0; i < hdr->e_shnum; i++) {
112 if (strcmp(secstrings + sechdrs[i].sh_name, ".init.plt") == 0)
113 me->arch.init_plt_section = i;
114 else if (strcmp(secstrings + sechdrs[i].sh_name, ".plt") == 0)
115 me->arch.core_plt_section = i;
116 }
117 if (!me->arch.core_plt_section || !me->arch.init_plt_section) {
118 printk("Module doesn't contain .plt or .plt.init sections.\n");
119 return -ENOEXEC;
120 }
121
122 /* Override their sizes */
123 sechdrs[me->arch.core_plt_section].sh_size
124 = get_plt_size(hdr, sechdrs, secstrings, 0);
125 sechdrs[me->arch.init_plt_section].sh_size
126 = get_plt_size(hdr, sechdrs, secstrings, 1);
127 return 0;
128}
129
130int apply_relocate (Elf32_Shdr *sechdrs, const char *strtab,
131 unsigned int symindex, unsigned int relsec,
132 struct module *mod)
133{
134 printk ("Barf\n");
135 return -ENOEXEC;
136}
137
138/* Set up a trampoline in the PLT to bounce us to the distant function */
139static uint32_t do_plt_call (void *location, Elf32_Addr val,
140 Elf32_Shdr *sechdrs, struct module *mod)
141{
142 struct v850_plt_entry *entry;
143 /* Instructions used to do the indirect jump. */
144 uint32_t tramp[2];
145
146 /* We have to trash a register, so we assume that any control
147 transfer more than 21-bits away must be a function call
148 (so we can use a call-clobbered register). */
149 tramp[0] = 0x0621 + ((val & 0xffff) << 16); /* mov sym, r1 ... */
150 tramp[1] = ((val >> 16) & 0xffff) + 0x610000; /* ...; jmp r1 */
151
152 /* Init, or core PLT? */
153 if (location >= mod->module_core
154 && location < mod->module_core + mod->core_size)
155 entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr;
156 else
157 entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
158
159 /* Find this entry, or if that fails, the next avail. entry */
160 while (entry->tramp[0])
161 if (entry->tramp[0] == tramp[0] && entry->tramp[1] == tramp[1])
162 return (uint32_t)entry;
163 else
164 entry++;
165
166 entry->tramp[0] = tramp[0];
167 entry->tramp[1] = tramp[1];
168
169 return (uint32_t)entry;
170}
171
172int apply_relocate_add (Elf32_Shdr *sechdrs, const char *strtab,
173 unsigned int symindex, unsigned int relsec,
174 struct module *mod)
175{
176 unsigned int i;
177 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
178
179 DEBUGP ("Applying relocate section %u to %u\n", relsec,
180 sechdrs[relsec].sh_info);
181
182 for (i = 0; i < sechdrs[relsec].sh_size / sizeof (*rela); i++) {
183 /* This is where to make the change */
184 uint32_t *loc
185 = ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
186 + rela[i].r_offset);
187 /* This is the symbol it is referring to. Note that all
188 undefined symbols have been resolved. */
189 Elf32_Sym *sym
190 = ((Elf32_Sym *)sechdrs[symindex].sh_addr
191 + ELF32_R_SYM (rela[i].r_info));
192 uint32_t val = sym->st_value + rela[i].r_addend;
193
194 switch (ELF32_R_TYPE (rela[i].r_info)) {
195 case R_V850_32:
196 /* We write two shorts instead of a long because even
197 32-bit insns only need half-word alignment, but
198 32-bit data writes need to be long-word aligned. */
199 val += ((uint16_t *)loc)[0];
200 val += ((uint16_t *)loc)[1] << 16;
201 ((uint16_t *)loc)[0] = val & 0xffff;
202 ((uint16_t *)loc)[1] = (val >> 16) & 0xffff;
203 break;
204
205 case R_V850_22_PCREL:
206 /* Maybe jump indirectly via a PLT table entry. */
207 if ((int32_t)(val - (uint32_t)loc) > 0x1fffff
208 || (int32_t)(val - (uint32_t)loc) < -0x200000)
209 val = do_plt_call (loc, val, sechdrs, mod);
210
211 val -= (uint32_t)loc;
212
213 /* We write two shorts instead of a long because
214 even 32-bit insns only need half-word alignment,
215 but 32-bit data writes need to be long-word
216 aligned. */
217 ((uint16_t *)loc)[0] =
218 (*(uint16_t *)loc & 0xffc0) /* opcode + reg */
219 | ((val >> 16) & 0xffc03f); /* offs high */
220 ((uint16_t *)loc)[1] =
221 (val & 0xffff); /* offs low */
222 break;
223
224 default:
225 printk (KERN_ERR "module %s: Unknown reloc: %u\n",
226 mod->name, ELF32_R_TYPE (rela[i].r_info));
227 return -ENOEXEC;
228 }
229 }
230
231 return 0;
232}
233
234void
235module_arch_cleanup(struct module *mod)
236{
237}
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c
deleted file mode 100644
index e4a4b8e7d5a3..000000000000
--- a/arch/v850/kernel/process.c
+++ /dev/null
@@ -1,217 +0,0 @@
1/*
2 * arch/v850/kernel/process.c -- Arch-dependent process handling
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/errno.h>
15#include <linux/sched.h>
16#include <linux/kernel.h>
17#include <linux/mm.h>
18#include <linux/smp.h>
19#include <linux/stddef.h>
20#include <linux/unistd.h>
21#include <linux/ptrace.h>
22#include <linux/slab.h>
23#include <linux/user.h>
24#include <linux/a.out.h>
25#include <linux/reboot.h>
26
27#include <asm/uaccess.h>
28#include <asm/system.h>
29#include <asm/pgtable.h>
30
31void (*pm_power_off)(void) = NULL;
32EXPORT_SYMBOL(pm_power_off);
33
34extern void ret_from_fork (void);
35
36
37/* The idle loop. */
38static void default_idle (void)
39{
40 while (! need_resched ())
41 asm ("halt; nop; nop; nop; nop; nop" ::: "cc");
42}
43
44void (*idle)(void) = default_idle;
45
46/*
47 * The idle thread. There's no useful work to be
48 * done, so just try to conserve power and have a
49 * low exit latency (ie sit in a loop waiting for
50 * somebody to say that they'd like to reschedule)
51 */
52void cpu_idle (void)
53{
54 /* endless idle loop with no priority at all */
55 while (1) {
56 while (!need_resched())
57 (*idle) ();
58
59 preempt_enable_no_resched();
60 schedule();
61 preempt_disable();
62 }
63}
64
65/*
66 * This is the mechanism for creating a new kernel thread.
67 *
68 * NOTE! Only a kernel-only process (ie the swapper or direct descendants who
69 * haven't done an "execve()") should use this: it will work within a system
70 * call from a "real" process, but the process memory space will not be free'd
71 * until both the parent and the child have exited.
72 */
73int kernel_thread (int (*fn)(void *), void *arg, unsigned long flags)
74{
75 register mm_segment_t fs = get_fs ();
76 register unsigned long syscall asm (SYSCALL_NUM);
77 register unsigned long arg0 asm (SYSCALL_ARG0);
78 register unsigned long ret asm (SYSCALL_RET);
79
80 set_fs (KERNEL_DS);
81
82 /* Clone this thread. Note that we don't pass the clone syscall's
83 second argument -- it's ignored for calls from kernel mode (the
84 child's SP is always set to the top of the kernel stack). */
85 arg0 = flags | CLONE_VM;
86 syscall = __NR_clone;
87 asm volatile ("trap " SYSCALL_SHORT_TRAP
88 : "=r" (ret), "=r" (syscall)
89 : "1" (syscall), "r" (arg0)
90 : SYSCALL_SHORT_CLOBBERS);
91
92 if (ret == 0) {
93 /* In child thread, call FN and exit. */
94 arg0 = (*fn) (arg);
95 syscall = __NR_exit;
96 asm volatile ("trap " SYSCALL_SHORT_TRAP
97 : "=r" (ret), "=r" (syscall)
98 : "1" (syscall), "r" (arg0)
99 : SYSCALL_SHORT_CLOBBERS);
100 }
101
102 /* In parent. */
103 set_fs (fs);
104
105 return ret;
106}
107
108void flush_thread (void)
109{
110 set_fs (USER_DS);
111}
112
113int copy_thread (int nr, unsigned long clone_flags,
114 unsigned long stack_start, unsigned long stack_size,
115 struct task_struct *p, struct pt_regs *regs)
116{
117 /* Start pushing stuff from the top of the child's kernel stack. */
118 unsigned long orig_ksp = task_tos(p);
119 unsigned long ksp = orig_ksp;
120 /* We push two `state save' stack fames (see entry.S) on the new
121 kernel stack:
122 1) The innermost one is what switch_thread would have
123 pushed, and is used when we context switch to the child
124 thread for the first time. It's set up to return to
125 ret_from_fork in entry.S.
126 2) The outermost one (nearest the top) is what a syscall
127 trap would have pushed, and is set up to return to the
128 same location as the parent thread, but with a return
129 value of 0. */
130 struct pt_regs *child_switch_regs, *child_trap_regs;
131
132 /* Trap frame. */
133 ksp -= STATE_SAVE_SIZE;
134 child_trap_regs = (struct pt_regs *)(ksp + STATE_SAVE_PT_OFFSET);
135 /* Switch frame. */
136 ksp -= STATE_SAVE_SIZE;
137 child_switch_regs = (struct pt_regs *)(ksp + STATE_SAVE_PT_OFFSET);
138
139 /* First copy parent's register state to child. */
140 *child_switch_regs = *regs;
141 *child_trap_regs = *regs;
142
143 /* switch_thread returns to the restored value of the lp
144 register (r31), so we make that the place where we want to
145 jump when the child thread begins running. */
146 child_switch_regs->gpr[GPR_LP] = (v850_reg_t)ret_from_fork;
147
148 if (regs->kernel_mode)
149 /* Since we're returning to kernel-mode, make sure the child's
150 stored kernel stack pointer agrees with what the actual
151 stack pointer will be at that point (the trap return code
152 always restores the SP, even when returning to
153 kernel-mode). */
154 child_trap_regs->gpr[GPR_SP] = orig_ksp;
155 else
156 /* Set the child's user-mode stack-pointer (the name
157 `stack_start' is a misnomer, it's just the initial SP
158 value). */
159 child_trap_regs->gpr[GPR_SP] = stack_start;
160
161 /* Thread state for the child (everything else is on the stack). */
162 p->thread.ksp = ksp;
163
164 return 0;
165}
166
167/*
168 * sys_execve() executes a new program.
169 */
170int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs)
171{
172 char *filename = getname (name);
173 int error = PTR_ERR (filename);
174
175 if (! IS_ERR (filename)) {
176 error = do_execve (filename, argv, envp, regs);
177 putname (filename);
178 }
179
180 return error;
181}
182
183
184/*
185 * These bracket the sleeping functions..
186 */
187#define first_sched ((unsigned long)__sched_text_start)
188#define last_sched ((unsigned long)__sched_text_end)
189
190unsigned long get_wchan (struct task_struct *p)
191{
192#if 0 /* Barf. Figure out the stack-layout later. XXX */
193 unsigned long fp, pc;
194 int count = 0;
195
196 if (!p || p == current || p->state == TASK_RUNNING)
197 return 0;
198
199 pc = thread_saved_pc (p);
200
201 /* This quite disgusting function walks up the stack, following
202 saved return address, until it something that's out of bounds
203 (as defined by `first_sched' and `last_sched'). It then
204 returns the last PC that was in-bounds. */
205 do {
206 if (fp < stack_page + sizeof (struct task_struct) ||
207 fp >= 8184+stack_page)
208 return 0;
209 pc = ((unsigned long *)fp)[1];
210 if (pc < first_sched || pc >= last_sched)
211 return pc;
212 fp = *(unsigned long *) fp;
213 } while (count++ < 16);
214#endif
215
216 return 0;
217}
diff --git a/arch/v850/kernel/procfs.c b/arch/v850/kernel/procfs.c
deleted file mode 100644
index e433cde789b4..000000000000
--- a/arch/v850/kernel/procfs.c
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * arch/v850/kernel/procfs.c -- Introspection functions for /proc filesystem
3 *
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include "mach.h"
15
16static int cpuinfo_print (struct seq_file *m, void *v)
17{
18 extern unsigned long loops_per_jiffy;
19
20 seq_printf (m, "CPU-Family: v850\nCPU-Arch: %s\n", CPU_ARCH);
21
22#ifdef CPU_MODEL_LONG
23 seq_printf (m, "CPU-Model: %s (%s)\n", CPU_MODEL, CPU_MODEL_LONG);
24#else
25 seq_printf (m, "CPU-Model: %s\n", CPU_MODEL);
26#endif
27
28#ifdef CPU_CLOCK_FREQ
29 seq_printf (m, "CPU-Clock: %ld (%ld MHz)\n",
30 (long)CPU_CLOCK_FREQ,
31 (long)CPU_CLOCK_FREQ / 1000000);
32#endif
33
34 seq_printf (m, "BogoMips: %lu.%02lu\n",
35 loops_per_jiffy/(500000/HZ),
36 (loops_per_jiffy/(5000/HZ)) % 100);
37
38#ifdef PLATFORM_LONG
39 seq_printf (m, "Platform: %s (%s)\n", PLATFORM, PLATFORM_LONG);
40#elif defined (PLATFORM)
41 seq_printf (m, "Platform: %s\n", PLATFORM);
42#endif
43
44 return 0;
45}
46
47static void *cpuinfo_start (struct seq_file *m, loff_t *pos)
48{
49 return *pos < NR_CPUS ? ((void *) 0x12345678) : NULL;
50}
51
52static void *cpuinfo_next (struct seq_file *m, void *v, loff_t *pos)
53{
54 ++*pos;
55 return cpuinfo_start (m, pos);
56}
57
58static void cpuinfo_stop (struct seq_file *m, void *v)
59{
60}
61
62const struct seq_operations cpuinfo_op = {
63 .start = cpuinfo_start,
64 .next = cpuinfo_next,
65 .stop = cpuinfo_stop,
66 .show = cpuinfo_print
67};
diff --git a/arch/v850/kernel/ptrace.c b/arch/v850/kernel/ptrace.c
deleted file mode 100644
index a458ac941b25..000000000000
--- a/arch/v850/kernel/ptrace.c
+++ /dev/null
@@ -1,235 +0,0 @@
1/*
2 * arch/v850/kernel/ptrace.c -- `ptrace' system call
3 *
4 * Copyright (C) 2002,03,04 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04 Miles Bader <miles@gnu.org>
6 *
7 * Derived from arch/mips/kernel/ptrace.c:
8 *
9 * Copyright (C) 1992 Ross Biro
10 * Copyright (C) Linus Torvalds
11 * Copyright (C) 1994, 95, 96, 97, 98, 2000 Ralf Baechle
12 * Copyright (C) 1996 David S. Miller
13 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
14 * Copyright (C) 1999 MIPS Technologies, Inc.
15 *
16 * This file is subject to the terms and conditions of the GNU General
17 * Public License. See the file COPYING in the main directory of this
18 * archive for more details.
19 */
20
21#include <linux/kernel.h>
22#include <linux/mm.h>
23#include <linux/sched.h>
24#include <linux/ptrace.h>
25#include <linux/signal.h>
26
27#include <asm/errno.h>
28#include <asm/ptrace.h>
29#include <asm/processor.h>
30#include <asm/uaccess.h>
31
32/* Returns the address where the register at REG_OFFS in P is stashed away. */
33static v850_reg_t *reg_save_addr (unsigned reg_offs, struct task_struct *t)
34{
35 struct pt_regs *regs;
36
37 /* Three basic cases:
38
39 (1) A register normally saved before calling the scheduler, is
40 available in the kernel entry pt_regs structure at the top
41 of the kernel stack. The kernel trap/irq exit path takes
42 care to save/restore almost all registers for ptrace'd
43 processes.
44
45 (2) A call-clobbered register, where the process P entered the
46 kernel via [syscall] trap, is not stored anywhere; that's
47 OK, because such registers are not expected to be preserved
48 when the trap returns anyway (so we don't actually bother to
49 test for this case).
50
51 (3) A few registers not used at all by the kernel, and so
52 normally never saved except by context-switches, are in the
53 context switch state. */
54
55 if (reg_offs == PT_CTPC || reg_offs == PT_CTPSW || reg_offs == PT_CTBP)
56 /* Register saved during context switch. */
57 regs = thread_saved_regs (t);
58 else
59 /* Register saved during kernel entry (or not available). */
60 regs = task_pt_regs (t);
61
62 return (v850_reg_t *)((char *)regs + reg_offs);
63}
64
65/* Set the bits SET and clear the bits CLEAR in the v850e DIR
66 (`debug information register'). Returns the new value of DIR. */
67static inline v850_reg_t set_dir (v850_reg_t set, v850_reg_t clear)
68{
69 register v850_reg_t rval asm ("r10");
70 register v850_reg_t arg0 asm ("r6") = set;
71 register v850_reg_t arg1 asm ("r7") = clear;
72
73 /* The dbtrap handler has exactly this functionality when called
74 from kernel mode. 0xf840 is a `dbtrap' insn. */
75 asm (".short 0xf840" : "=r" (rval) : "r" (arg0), "r" (arg1));
76
77 return rval;
78}
79
80/* Makes sure hardware single-stepping is (globally) enabled.
81 Returns true if successful. */
82static inline int enable_single_stepping (void)
83{
84 static int enabled = 0; /* Remember whether we already did it. */
85 if (! enabled) {
86 /* Turn on the SE (`single-step enable') bit, 0x100, in the
87 DIR (`debug information register'). This may fail if a
88 processor doesn't support it or something. We also try
89 to clear bit 0x40 (`INI'), which is necessary to use the
90 debug stuff on the v850e2; on the v850e, clearing 0x40
91 shouldn't cause any problem. */
92 v850_reg_t dir = set_dir (0x100, 0x40);
93 /* Make sure it really got set. */
94 if (dir & 0x100)
95 enabled = 1;
96 }
97 return enabled;
98}
99
100/* Try to set CHILD's single-step flag to VAL. Returns true if successful. */
101static int set_single_step (struct task_struct *t, int val)
102{
103 v850_reg_t *psw_addr = reg_save_addr(PT_PSW, t);
104 if (val) {
105 /* Make sure single-stepping is enabled. */
106 if (! enable_single_stepping ())
107 return 0;
108 /* Set T's single-step flag. */
109 *psw_addr |= 0x800;
110 } else
111 *psw_addr &= ~0x800;
112 return 1;
113}
114
115long arch_ptrace(struct task_struct *child, long request, long addr, long data)
116{
117 int rval;
118
119 switch (request) {
120 unsigned long val;
121
122 case PTRACE_PEEKTEXT: /* read word at location addr. */
123 case PTRACE_PEEKDATA:
124 rval = generic_ptrace_peekdata(child, addr, data);
125 goto out;
126
127 case PTRACE_POKETEXT: /* write the word at location addr. */
128 case PTRACE_POKEDATA:
129 rval = generic_ptrace_pokedata(child, addr, data);
130 goto out;
131
132 /* Read/write the word at location ADDR in the registers. */
133 case PTRACE_PEEKUSR:
134 case PTRACE_POKEUSR:
135 rval = 0;
136 if (addr >= PT_SIZE && request == PTRACE_PEEKUSR) {
137 /* Special requests that don't actually correspond
138 to offsets in struct pt_regs. */
139 if (addr == PT_TEXT_ADDR)
140 val = child->mm->start_code;
141 else if (addr == PT_DATA_ADDR)
142 val = child->mm->start_data;
143 else if (addr == PT_TEXT_LEN)
144 val = child->mm->end_code
145 - child->mm->start_code;
146 else
147 rval = -EIO;
148 } else if (addr >= 0 && addr < PT_SIZE && (addr & 0x3) == 0) {
149 v850_reg_t *reg_addr = reg_save_addr(addr, child);
150 if (request == PTRACE_PEEKUSR)
151 val = *reg_addr;
152 else
153 *reg_addr = data;
154 } else
155 rval = -EIO;
156
157 if (rval == 0 && request == PTRACE_PEEKUSR)
158 rval = put_user (val, (unsigned long *)data);
159 goto out;
160
161 /* Continue and stop at next (return from) syscall */
162 case PTRACE_SYSCALL:
163 /* Restart after a signal. */
164 case PTRACE_CONT:
165 /* Execute a single instruction. */
166 case PTRACE_SINGLESTEP:
167 rval = -EIO;
168 if (!valid_signal(data))
169 break;
170
171 /* Turn CHILD's single-step flag on or off. */
172 if (! set_single_step (child, request == PTRACE_SINGLESTEP))
173 break;
174
175 if (request == PTRACE_SYSCALL)
176 set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
177 else
178 clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
179
180 child->exit_code = data;
181 wake_up_process(child);
182 rval = 0;
183 break;
184
185 /*
186 * make the child exit. Best I can do is send it a sigkill.
187 * perhaps it should be put in the status that it wants to
188 * exit.
189 */
190 case PTRACE_KILL:
191 rval = 0;
192 if (child->exit_state == EXIT_ZOMBIE) /* already dead */
193 break;
194 child->exit_code = SIGKILL;
195 wake_up_process(child);
196 break;
197
198 case PTRACE_DETACH: /* detach a process that was attached. */
199 set_single_step (child, 0); /* Clear single-step flag */
200 rval = ptrace_detach(child, data);
201 break;
202
203 default:
204 rval = -EIO;
205 goto out;
206 }
207 out:
208 return rval;
209}
210
211asmlinkage void syscall_trace(void)
212{
213 if (!test_thread_flag(TIF_SYSCALL_TRACE))
214 return;
215 if (!(current->ptrace & PT_PTRACED))
216 return;
217 /* The 0x80 provides a way for the tracing parent to distinguish
218 between a syscall stop and SIGTRAP delivery */
219 ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
220 ? 0x80 : 0));
221 /*
222 * this isn't the same as continuing with a signal, but it will do
223 * for normal use. strace only continues with a signal if the
224 * stopping signal is not SIGTRAP. -brl
225 */
226 if (current->exit_code) {
227 send_sig(current->exit_code, current, 1);
228 current->exit_code = 0;
229 }
230}
231
232void ptrace_disable (struct task_struct *child)
233{
234 /* nothing to do */
235}
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c
deleted file mode 100644
index 43018e1edebd..000000000000
--- a/arch/v850/kernel/rte_cb.c
+++ /dev/null
@@ -1,193 +0,0 @@
1/*
2 * include/asm-v850/rte_cb.c -- Midas lab RTE-CB series of evaluation boards
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/init.h>
15#include <linux/irq.h>
16#include <linux/fs.h>
17#include <linux/module.h>
18#include <linux/kernel.h>
19
20#include <asm/machdep.h>
21#include <asm/v850e_uart.h>
22
23#include "mach.h"
24
25static void led_tick (void);
26
27/* LED access routines. */
28extern unsigned read_leds (int pos, char *buf, int len);
29extern unsigned write_leds (int pos, const char *buf, int len);
30
31#ifdef CONFIG_RTE_CB_MULTI
32extern void multi_init (void);
33#endif
34
35
36void __init rte_cb_early_init (void)
37{
38 v850e_intc_disable_irqs ();
39
40#ifdef CONFIG_RTE_CB_MULTI
41 multi_init ();
42#endif
43}
44
45void __init mach_setup (char **cmdline)
46{
47#ifdef CONFIG_RTE_MB_A_PCI
48 /* Probe for Mother-A, and print a message if we find it. */
49 *(volatile unsigned long *)MB_A_SRAM_ADDR = 0xDEADBEEF;
50 if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0xDEADBEEF) {
51 *(volatile unsigned long *)MB_A_SRAM_ADDR = 0x12345678;
52 if (*(volatile unsigned long *)MB_A_SRAM_ADDR == 0x12345678)
53 printk (KERN_INFO
54 " NEC SolutionGear/Midas lab"
55 " RTE-MOTHER-A motherboard\n");
56 }
57#endif /* CONFIG_RTE_MB_A_PCI */
58
59 mach_tick = led_tick;
60}
61
62void machine_restart (char *__unused)
63{
64#ifdef CONFIG_RESET_GUARD
65 disable_reset_guard ();
66#endif
67 asm ("jmp r0"); /* Jump to the reset vector. */
68}
69
70/* This says `HALt.' in LEDese. */
71static unsigned char halt_leds_msg[] = { 0x76, 0x77, 0x38, 0xF8 };
72
73void machine_halt (void)
74{
75#ifdef CONFIG_RESET_GUARD
76 disable_reset_guard ();
77#endif
78
79 /* Ignore all interrupts. */
80 local_irq_disable ();
81
82 /* Write a little message. */
83 write_leds (0, halt_leds_msg, sizeof halt_leds_msg);
84
85 /* Really halt. */
86 for (;;)
87 asm ("halt; nop; nop; nop; nop; nop");
88}
89
90void machine_power_off (void)
91{
92 machine_halt ();
93}
94
95
96/* Animated LED display for timer tick. */
97
98#define TICK_UPD_FREQ 6
99static int tick_frames[][10] = {
100 { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, -1 },
101 { 0x63, 0x5c, -1 },
102 { 0x5c, 0x00, -1 },
103 { 0x63, 0x00, -1 },
104 { -1 }
105};
106
107static void led_tick ()
108{
109 static unsigned counter = 0;
110
111 if (++counter == (HZ / TICK_UPD_FREQ)) {
112 /* Which frame we're currently displaying for each digit. */
113 static unsigned frame_nums[LED_NUM_DIGITS] = { 0 };
114 /* Display image. */
115 static unsigned char image[LED_NUM_DIGITS] = { 0 };
116 unsigned char prev_image[LED_NUM_DIGITS];
117 int write_to_leds = 1; /* true if we should actually display */
118 int digit;
119
120 /* We check to see if the physical LEDs contains what we last
121 wrote to them; if not, we suppress display (this is so that
122 users can write to the LEDs, and not have their output
123 overwritten). As a special case, we start writing again if
124 all the LEDs are blank, or our display image is all zeros
125 (indicating that this is the initial update, when the actual
126 LEDs might contain random data). */
127 read_leds (0, prev_image, LED_NUM_DIGITS);
128 for (digit = 0; digit < LED_NUM_DIGITS; digit++)
129 if (image[digit] != prev_image[digit]
130 && image[digit] && prev_image[digit])
131 {
132 write_to_leds = 0;
133 break;
134 }
135
136 /* Update display image. */
137 for (digit = 0;
138 digit < LED_NUM_DIGITS && tick_frames[digit][0] >= 0;
139 digit++)
140 {
141 int frame = tick_frames[digit][frame_nums[digit]];
142 if (frame < 0) {
143 image[digit] = tick_frames[digit][0];
144 frame_nums[digit] = 1;
145 } else {
146 image[digit] = frame;
147 frame_nums[digit]++;
148 break;
149 }
150 }
151
152 if (write_to_leds)
153 /* Write the display image to the physical LEDs. */
154 write_leds (0, image, LED_NUM_DIGITS);
155
156 counter = 0;
157 }
158}
159
160
161/* Mother-A interrupts. */
162
163#ifdef CONFIG_RTE_GBUS_INT
164
165#define L GBUS_INT_PRIORITY_LOW
166#define M GBUS_INT_PRIORITY_MEDIUM
167#define H GBUS_INT_PRIORITY_HIGH
168
169static struct gbus_int_irq_init gbus_irq_inits[] = {
170#ifdef CONFIG_RTE_MB_A_PCI
171 { "MB_A_LAN", IRQ_MB_A_LAN, 1, 1, L },
172 { "MB_A_PCI1", IRQ_MB_A_PCI1(0), IRQ_MB_A_PCI1_NUM, 1, L },
173 { "MB_A_PCI2", IRQ_MB_A_PCI2(0), IRQ_MB_A_PCI2_NUM, 1, L },
174 { "MB_A_EXT", IRQ_MB_A_EXT(0), IRQ_MB_A_EXT_NUM, 1, L },
175 { "MB_A_USB_OC",IRQ_MB_A_USB_OC(0), IRQ_MB_A_USB_OC_NUM, 1, L },
176 { "MB_A_PCMCIA_OC",IRQ_MB_A_PCMCIA_OC, 1, 1, L },
177#endif
178 { 0 }
179};
180#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
181
182static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
183
184#endif /* CONFIG_RTE_GBUS_INT */
185
186
187void __init rte_cb_init_irqs (void)
188{
189#ifdef CONFIG_RTE_GBUS_INT
190 gbus_int_init_irqs ();
191 gbus_int_init_irq_types (gbus_irq_inits, gbus_hw_itypes);
192#endif /* CONFIG_RTE_GBUS_INT */
193}
diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c
deleted file mode 100644
index aa47ab1dcd87..000000000000
--- a/arch/v850/kernel/rte_cb_leds.c
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * include/asm-v850/rte_cb_leds.c -- Midas lab RTE-CB board LED device support
3 *
4 * Copyright (C) 2002,03 NEC Electronics Corporation
5 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/init.h>
15#include <linux/spinlock.h>
16#include <linux/fs.h>
17#include <linux/miscdevice.h>
18
19#include <asm/uaccess.h>
20
21#define LEDS_MINOR 169 /* Minor device number, using misc major. */
22
23/* The actual LED hardware is write-only, so we hold the contents here too. */
24static unsigned char leds_image[LED_NUM_DIGITS] = { 0 };
25
26/* Spinlock protecting the above leds. */
27static DEFINE_SPINLOCK(leds_lock);
28
29/* Common body of LED read/write functions, checks POS and LEN for
30 correctness, declares a variable using IMG_DECL, initialized pointing at
31 the POS position in the LED image buffer, and and iterates COPY_EXPR
32 until BUF is equal to the last buffer position; finally, sets LEN to be
33 the amount actually copied. IMG should be a variable declaration
34 (without an initializer or a terminating semicolon); POS, BUF, and LEN
35 should all be simple variables. */
36#define DO_LED_COPY(img_decl, pos, buf, len, copy_expr) \
37do { \
38 if (pos > LED_NUM_DIGITS) \
39 len = 0; \
40 else { \
41 if (pos + len > LED_NUM_DIGITS) \
42 len = LED_NUM_DIGITS - pos; \
43 \
44 if (len > 0) { \
45 unsigned long _flags; \
46 const char *_end = buf + len; \
47 img_decl = &leds_image[pos]; \
48 \
49 spin_lock_irqsave (leds_lock, _flags); \
50 do \
51 (copy_expr); \
52 while (buf != _end); \
53 spin_unlock_irqrestore (leds_lock, _flags); \
54 } \
55 } \
56} while (0)
57
58/* Read LEN bytes from LEDs at position POS, into BUF.
59 Returns actual amount read. */
60unsigned read_leds (unsigned pos, char *buf, unsigned len)
61{
62 DO_LED_COPY (const char *img, pos, buf, len, *buf++ = *img++);
63 return len;
64}
65
66/* Write LEN bytes to LEDs at position POS, from BUF.
67 Returns actual amount written. */
68unsigned write_leds (unsigned pos, const char *buf, unsigned len)
69{
70 /* We write the actual LED values backwards, because
71 increasing memory addresses reflect LEDs right-to-left. */
72 volatile char *led = &LED (LED_NUM_DIGITS - pos - 1);
73 /* We invert the value written to the hardware, because 1 = off,
74 and 0 = on. */
75 DO_LED_COPY (char *img, pos, buf, len,
76 *led-- = 0xFF ^ (*img++ = *buf++));
77 return len;
78}
79
80
81/* Device functions. */
82
83static ssize_t leds_dev_read (struct file *file, char *buf, size_t len,
84 loff_t *pos)
85{
86 char temp_buf[LED_NUM_DIGITS];
87 len = read_leds (*pos, temp_buf, len);
88 if (copy_to_user (buf, temp_buf, len))
89 return -EFAULT;
90 *pos += len;
91 return len;
92}
93
94static ssize_t leds_dev_write (struct file *file, const char *buf, size_t len,
95 loff_t *pos)
96{
97 char temp_buf[LED_NUM_DIGITS];
98 if (copy_from_user (temp_buf, buf, min_t(size_t, len, LED_NUM_DIGITS)))
99 return -EFAULT;
100 len = write_leds (*pos, temp_buf, len);
101 *pos += len;
102 return len;
103}
104
105static loff_t leds_dev_lseek (struct file *file, loff_t offs, int whence)
106{
107 if (whence == 1)
108 offs += file->f_pos; /* relative */
109 else if (whence == 2)
110 offs += LED_NUM_DIGITS; /* end-relative */
111
112 if (offs < 0 || offs > LED_NUM_DIGITS)
113 return -EINVAL;
114
115 file->f_pos = offs;
116
117 return 0;
118}
119
120static const struct file_operations leds_fops = {
121 .read = leds_dev_read,
122 .write = leds_dev_write,
123 .llseek = leds_dev_lseek
124};
125
126static struct miscdevice leds_miscdev = {
127 .name = "leds",
128 .minor = LEDS_MINOR,
129 .fops = &leds_fops
130};
131
132int __init leds_dev_init (void)
133{
134 return misc_register (&leds_miscdev);
135}
136
137__initcall (leds_dev_init);
diff --git a/arch/v850/kernel/rte_cb_multi.c b/arch/v850/kernel/rte_cb_multi.c
deleted file mode 100644
index 963d55ab34cc..000000000000
--- a/arch/v850/kernel/rte_cb_multi.c
+++ /dev/null
@@ -1,121 +0,0 @@
1/*
2 * include/asm-v850/rte_multi.c -- Support for Multi debugger monitor ROM
3 * on Midas lab RTE-CB series of evaluation boards
4 *
5 * Copyright (C) 2001,02,03 NEC Electronics Corporation
6 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/init.h>
16
17#include <asm/machdep.h>
18
19#define IRQ_ADDR(irq) (0x80 + (irq) * 0x10)
20
21/* A table of which interrupt vectors to install, since blindly
22 installing all of them makes the debugger stop working. This is a
23 list of offsets in the interrupt vector area; each entry means to
24 copy that particular 16-byte vector. An entry less than zero ends
25 the table. */
26static long multi_intv_install_table[] = {
27 /* Trap vectors */
28 0x40, 0x50,
29
30#ifdef CONFIG_RTE_CB_MULTI_DBTRAP
31 /* Illegal insn / dbtrap. These are used by multi, so only handle
32 them if configured to do so. */
33 0x60,
34#endif
35
36 /* GINT1 - GINT3 (note, not GINT0!) */
37 IRQ_ADDR (IRQ_GINT(1)),
38 IRQ_ADDR (IRQ_GINT(2)),
39 IRQ_ADDR (IRQ_GINT(3)),
40
41 /* Timer D interrupts (up to 4 timers) */
42 IRQ_ADDR (IRQ_INTCMD(0)),
43#if IRQ_INTCMD_NUM > 1
44 IRQ_ADDR (IRQ_INTCMD(1)),
45#if IRQ_INTCMD_NUM > 2
46 IRQ_ADDR (IRQ_INTCMD(2)),
47#if IRQ_INTCMD_NUM > 3
48 IRQ_ADDR (IRQ_INTCMD(3)),
49#endif
50#endif
51#endif
52
53 /* UART interrupts (up to 3 channels) */
54 IRQ_ADDR (IRQ_INTSER (0)), /* err */
55 IRQ_ADDR (IRQ_INTSR (0)), /* rx */
56 IRQ_ADDR (IRQ_INTST (0)), /* tx */
57#if IRQ_INTSR_NUM > 1
58 IRQ_ADDR (IRQ_INTSER (1)), /* err */
59 IRQ_ADDR (IRQ_INTSR (1)), /* rx */
60 IRQ_ADDR (IRQ_INTST (1)), /* tx */
61#if IRQ_INTSR_NUM > 2
62 IRQ_ADDR (IRQ_INTSER (2)), /* err */
63 IRQ_ADDR (IRQ_INTSR (2)), /* rx */
64 IRQ_ADDR (IRQ_INTST (2)), /* tx */
65#endif
66#endif
67
68 -1
69};
70
71/* Early initialization for kernel using Multi debugger ROM monitor. */
72void __init multi_init (void)
73{
74 /* We're using the Multi debugger monitor, so we have to install
75 the interrupt vectors. The monitor doesn't allow them to be
76 initially downloaded into their final destination because
77 it's in the monitor's scratch-RAM area. Unfortunately, Multi
78 also doesn't deal correctly with ELF sections where the LMA
79 and VMA differ -- it just ignores the LMA -- so we can't use
80 that feature to work around the problem. What we do instead
81 is just put the interrupt vectors into a normal section, and
82 do the necessary copying and relocation here. Since the
83 interrupt vector basically only contains `jr' instructions
84 and no-ops, it's not that hard. */
85 extern unsigned long _intv_load_start, _intv_start;
86 register unsigned long *src = &_intv_load_start;
87 register unsigned long *dst = (unsigned long *)INTV_BASE;
88 register unsigned long jr_fixup = (char *)&_intv_start - (char *)dst;
89 register long *ii;
90
91 /* Copy interrupt vectors as instructed by multi_intv_install_table. */
92 for (ii = multi_intv_install_table; *ii >= 0; ii++) {
93 /* Copy 16-byte interrupt vector at offset *ii. */
94 int boffs;
95 for (boffs = 0; boffs < 0x10; boffs += sizeof *src) {
96 /* Copy a single word, fixing up the jump offs
97 if it's a `jr' instruction. */
98 int woffs = (*ii + boffs) / sizeof *src;
99 unsigned long word = src[woffs];
100
101 if ((word & 0xFC0) == 0x780) {
102 /* A `jr' insn, fix up its offset (and yes, the
103 weird half-word swapping is intentional). */
104 unsigned short hi = word & 0xFFFF;
105 unsigned short lo = word >> 16;
106 unsigned long udisp22
107 = lo + ((hi & 0x3F) << 16);
108 long disp22 = (long)(udisp22 << 10) >> 10;
109
110 disp22 += jr_fixup;
111
112 hi = ((disp22 >> 16) & 0x3F) | 0x780;
113 lo = disp22 & 0xFFFF;
114
115 word = hi + (lo << 16);
116 }
117
118 dst[woffs] = word;
119 }
120 }
121}
diff --git a/arch/v850/kernel/rte_ma1_cb-rom.ld b/arch/v850/kernel/rte_ma1_cb-rom.ld
deleted file mode 100644
index 87b618f8253b..000000000000
--- a/arch/v850/kernel/rte_ma1_cb-rom.ld
+++ /dev/null
@@ -1,14 +0,0 @@
1/* Linker script for the Midas labs RTE-V850E/MA1-CB evaluation board
2 (CONFIG_RTE_CB_MA1), with kernel in ROM. */
3
4MEMORY {
5 ROM : ORIGIN = 0x00000000, LENGTH = 0x00100000
6 /* 1MB of SRAM. This memory is mirrored 4 times. */
7 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
8 /* 32MB of SDRAM. */
9 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
10}
11
12SECTIONS {
13 ROMK_SECTIONS(ROM, SRAM)
14}
diff --git a/arch/v850/kernel/rte_ma1_cb.c b/arch/v850/kernel/rte_ma1_cb.c
deleted file mode 100644
index 08abf3d5f8df..000000000000
--- a/arch/v850/kernel/rte_ma1_cb.c
+++ /dev/null
@@ -1,107 +0,0 @@
1/*
2 * arch/v850/kernel/rte_ma1_cb.c -- Midas labs RTE-V850E/MA1-CB board
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/bootmem.h>
17
18#include <asm/atomic.h>
19#include <asm/page.h>
20#include <asm/ma1.h>
21#include <asm/rte_ma1_cb.h>
22#include <asm/v850e_timer_c.h>
23
24#include "mach.h"
25
26
27/* SRAM and SDRAM are almost contiguous (with a small hole in between;
28 see mach_reserve_bootmem for details), so just use both as one big area. */
29#define RAM_START SRAM_ADDR
30#define RAM_END (SDRAM_ADDR + SDRAM_SIZE)
31
32
33void __init mach_early_init (void)
34{
35 rte_cb_early_init ();
36}
37
38void __init mach_get_physical_ram (unsigned long *ram_start,
39 unsigned long *ram_len)
40{
41 *ram_start = RAM_START;
42 *ram_len = RAM_END - RAM_START;
43}
44
45void __init mach_reserve_bootmem ()
46{
47#ifdef CONFIG_RTE_CB_MULTI
48 /* Prevent the kernel from touching the monitor's scratch RAM. */
49 reserve_bootmem(MON_SCRATCH_ADDR, MON_SCRATCH_SIZE,
50 BOOTMEM_DEFAULT);
51#endif
52
53 /* The space between SRAM and SDRAM is filled with duplicate
54 images of SRAM. Prevent the kernel from using them. */
55 reserve_bootmem (SRAM_ADDR + SRAM_SIZE,
56 SDRAM_ADDR - (SRAM_ADDR + SRAM_SIZE),
57 BOOTMEM_DEFAULT);
58}
59
60void mach_gettimeofday (struct timespec *tv)
61{
62 tv->tv_sec = 0;
63 tv->tv_nsec = 0;
64}
65
66/* Called before configuring an on-chip UART. */
67void rte_ma1_cb_uart_pre_configure (unsigned chan,
68 unsigned cflags, unsigned baud)
69{
70 /* The RTE-MA1-CB connects some general-purpose I/O pins on the
71 CPU to the RTS/CTS lines of UART 0's serial connection.
72 I/O pins P42 and P43 are RTS and CTS respectively. */
73 if (chan == 0) {
74 /* Put P42 & P43 in I/O port mode. */
75 MA_PORT4_PMC &= ~0xC;
76 /* Make P42 an output, and P43 an input. */
77 MA_PORT4_PM = (MA_PORT4_PM & ~0xC) | 0x8;
78 }
79
80 /* Do pre-configuration for the actual UART. */
81 ma_uart_pre_configure (chan, cflags, baud);
82}
83
84void __init mach_init_irqs (void)
85{
86 unsigned tc;
87
88 /* Initialize interrupts. */
89 ma_init_irqs ();
90 rte_cb_init_irqs ();
91
92 /* Use falling-edge-sensitivity for interrupts . */
93 V850E_TIMER_C_SESC (0) &= ~0xC;
94 V850E_TIMER_C_SESC (1) &= ~0xF;
95
96 /* INTP000-INTP011 are shared with `Timer C', so we have to set
97 up Timer C to pass them through as raw interrupts. */
98 for (tc = 0; tc < 2; tc++)
99 /* Turn on the timer. */
100 V850E_TIMER_C_TMCC0 (tc) |= V850E_TIMER_C_TMCC0_CAE;
101
102 /* Make sure the relevant port0/port1 pins are assigned
103 interrupt duty. We used INTP001-INTP011 (don't screw with
104 INTP000 because the monitor uses it). */
105 MA_PORT0_PMC |= 0x4; /* P02 (INTP001) in IRQ mode. */
106 MA_PORT1_PMC |= 0x6; /* P11 (INTP010) & P12 (INTP011) in IRQ mode.*/
107}
diff --git a/arch/v850/kernel/rte_ma1_cb.ld b/arch/v850/kernel/rte_ma1_cb.ld
deleted file mode 100644
index c8e16d16be41..000000000000
--- a/arch/v850/kernel/rte_ma1_cb.ld
+++ /dev/null
@@ -1,57 +0,0 @@
1/* Linker script for the Midas labs RTE-V850E/MA1-CB evaluation board
2 (CONFIG_RTE_CB_MA1), with kernel in SDRAM, under Multi debugger. */
3
4MEMORY {
5 /* 1MB of SRAM; we can't use the last 32KB, because it's used by
6 the monitor scratch-RAM. This memory is mirrored 4 times. */
7 SRAM : ORIGIN = SRAM_ADDR, LENGTH = (SRAM_SIZE - MON_SCRATCH_SIZE)
8 /* Monitor scratch RAM; only the interrupt vectors should go here. */
9 MRAM : ORIGIN = MON_SCRATCH_ADDR, LENGTH = MON_SCRATCH_SIZE
10 /* 32MB of SDRAM. */
11 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
12}
13
14#ifdef CONFIG_RTE_CB_MA1_KSRAM
15# define KRAM SRAM
16#else
17# define KRAM SDRAM
18#endif
19
20SECTIONS {
21 /* We can't use RAMK_KRAM_CONTENTS because that puts the whole
22 kernel in a single ELF segment, and the Multi debugger (which
23 we use to load the kernel) appears to have bizarre problems
24 dealing with it. */
25
26 .text : {
27 __kram_start = . ;
28 TEXT_CONTENTS
29 } > KRAM
30
31 .data : {
32 DATA_CONTENTS
33 BSS_CONTENTS
34 RAMK_INIT_CONTENTS
35 __kram_end = . ;
36 BOOTMAP_CONTENTS
37
38 /* The address at which the interrupt vectors are initially
39 loaded by the loader. We can't load the interrupt vectors
40 directly into their target location, because the monitor
41 ROM for the GHS Multi debugger barfs if we try.
42 Unfortunately, Multi also doesn't deal correctly with ELF
43 sections where the LMA and VMA differ (it just ignores the
44 LMA), so we can't use that feature to work around the
45 problem! What we do instead is just put the interrupt
46 vectors into a normal section, and have the
47 `mach_early_init' function for Midas boards do the
48 necessary copying and relocation at runtime (this section
49 basically only contains `jr' instructions, so it's not
50 that hard). */
51 . = ALIGN (0x10) ;
52 __intv_load_start = . ;
53 INTV_CONTENTS
54 } > KRAM
55
56 .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM
57}
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c
deleted file mode 100644
index 687e367d8b64..000000000000
--- a/arch/v850/kernel/rte_mb_a_pci.c
+++ /dev/null
@@ -1,819 +0,0 @@
1/*
2 * arch/v850/kernel/mb_a_pci.c -- PCI support for Midas lab RTE-MOTHER-A board
3 *
4 * Copyright (C) 2001,02,03,05 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/slab.h>
18#include <linux/spinlock.h>
19#include <linux/pci.h>
20
21#include <asm/machdep.h>
22
23/* __nomods_init is like __devinit, but is a no-op when modules are enabled.
24 This is used by some routines that can be called either during boot
25 or by a module. */
26#ifdef CONFIG_MODULES
27#define __nomods_init /*nothing*/
28#else
29#define __nomods_init __devinit
30#endif
31
32/* PCI devices on the Mother-A board can only do DMA to/from the MB SRAM
33 (the RTE-V850E/MA1-CB cpu board doesn't support PCI access to
34 CPU-board memory), and since linux DMA buffers are allocated in
35 normal kernel memory, we basically have to copy DMA blocks around
36 (this is like a `bounce buffer'). When a DMA block is `mapped', we
37 allocate an identically sized block in MB SRAM, and if we're doing
38 output to the device, copy the CPU-memory block to the MB-SRAM block.
39 When an active block is `unmapped', we will copy the block back to
40 CPU memory if necessary, and then deallocate the MB SRAM block.
41 Ack. */
42
43/* Where the motherboard SRAM is in the PCI-bus address space (the
44 first 512K of it is also mapped at PCI address 0). */
45#define PCI_MB_SRAM_ADDR 0x800000
46
47/* Convert CPU-view MB SRAM address to/from PCI-view addresses of the
48 same memory. */
49#define MB_SRAM_TO_PCI(mb_sram_addr) \
50 ((dma_addr_t)mb_sram_addr - MB_A_SRAM_ADDR + PCI_MB_SRAM_ADDR)
51#define PCI_TO_MB_SRAM(pci_addr) \
52 (void *)(pci_addr - PCI_MB_SRAM_ADDR + MB_A_SRAM_ADDR)
53
54static void pcibios_assign_resources (void);
55
56struct mb_pci_dev_irq {
57 unsigned dev; /* PCI device number */
58 unsigned irq_base; /* First IRQ */
59 unsigned query_pin; /* True if we should read the device's
60 Interrupt Pin info, and allocate
61 interrupt IRQ_BASE + PIN. */
62};
63
64/* PCI interrupts are mapped statically to GBUS interrupts. */
65static struct mb_pci_dev_irq mb_pci_dev_irqs[] = {
66 /* Motherboard SB82558 ethernet controller */
67 { 10, IRQ_MB_A_LAN, 0 },
68 /* PCI slot 1 */
69 { 8, IRQ_MB_A_PCI1(0), 1 },
70 /* PCI slot 2 */
71 { 9, IRQ_MB_A_PCI2(0), 1 }
72};
73#define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs)
74
75
76/* PCI configuration primitives. */
77
78#define CONFIG_DMCFGA(bus, devfn, offs) \
79 (0x80000000 \
80 | ((offs) & ~0x3) \
81 | ((devfn) << 8) \
82 | ((bus)->number << 16))
83
84static int
85mb_pci_read (struct pci_bus *bus, unsigned devfn, int offs, int size, u32 *rval)
86{
87 u32 addr;
88 int flags;
89
90 local_irq_save (flags);
91
92 MB_A_PCI_PCICR = 0x7;
93 MB_A_PCI_DMCFGA = CONFIG_DMCFGA (bus, devfn, offs);
94
95 addr = MB_A_PCI_IO_ADDR + (offs & 0x3);
96
97 switch (size) {
98 case 1: *rval = *(volatile u8 *)addr; break;
99 case 2: *rval = *(volatile u16 *)addr; break;
100 case 4: *rval = *(volatile u32 *)addr; break;
101 }
102
103 if (MB_A_PCI_PCISR & 0x2000) {
104 MB_A_PCI_PCISR = 0x2000;
105 *rval = ~0;
106 }
107
108 MB_A_PCI_DMCFGA = 0;
109
110 local_irq_restore (flags);
111
112 return PCIBIOS_SUCCESSFUL;
113}
114
115static int
116mb_pci_write (struct pci_bus *bus, unsigned devfn, int offs, int size, u32 val)
117{
118 u32 addr;
119 int flags;
120
121 local_irq_save (flags);
122
123 MB_A_PCI_PCICR = 0x7;
124 MB_A_PCI_DMCFGA = CONFIG_DMCFGA (bus, devfn, offs);
125
126 addr = MB_A_PCI_IO_ADDR + (offs & 0x3);
127
128 switch (size) {
129 case 1: *(volatile u8 *)addr = val; break;
130 case 2: *(volatile u16 *)addr = val; break;
131 case 4: *(volatile u32 *)addr = val; break;
132 }
133
134 if (MB_A_PCI_PCISR & 0x2000)
135 MB_A_PCI_PCISR = 0x2000;
136
137 MB_A_PCI_DMCFGA = 0;
138
139 local_irq_restore (flags);
140
141 return PCIBIOS_SUCCESSFUL;
142}
143
144static struct pci_ops mb_pci_config_ops = {
145 .read = mb_pci_read,
146 .write = mb_pci_write,
147};
148
149
150/* PCI Initialization. */
151
152static struct pci_bus *mb_pci_bus = 0;
153
154/* Do initial PCI setup. */
155static int __devinit pcibios_init (void)
156{
157 u32 id = MB_A_PCI_PCIHIDR;
158 u16 vendor = id & 0xFFFF;
159 u16 device = (id >> 16) & 0xFFFF;
160
161 if (vendor == PCI_VENDOR_ID_PLX && device == PCI_DEVICE_ID_PLX_9080) {
162 printk (KERN_INFO
163 "PCI: PLX Technology PCI9080 HOST/PCI bridge\n");
164
165 MB_A_PCI_PCICR = 0x147;
166
167 MB_A_PCI_PCIBAR0 = 0x007FFF00;
168 MB_A_PCI_PCIBAR1 = 0x0000FF00;
169 MB_A_PCI_PCIBAR2 = 0x00800000;
170
171 MB_A_PCI_PCILTR = 0x20;
172
173 MB_A_PCI_PCIPBAM |= 0x3;
174
175 MB_A_PCI_PCISR = ~0; /* Clear errors. */
176
177 /* Reprogram the motherboard's IO/config address space,
178 as we don't support the GCS7 address space that the
179 default uses. */
180
181 /* Significant address bits used for decoding PCI GCS5 space
182 accesses. */
183 MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1);
184
185 /* I don't understand this, but the SolutionGear example code
186 uses such an offset, and it doesn't work without it. XXX */
187#if GCS5_SIZE == 0x00800000
188#define GCS5_CFG_OFFS 0x00800000
189#else
190#define GCS5_CFG_OFFS 0
191#endif
192
193 /* Address bit values for matching. Note that we have to give
194 the address from the motherboard's point of view, which is
195 different than the CPU's. */
196 /* PCI memory space. */
197 MB_A_PCI_DMLBAM = GCS5_CFG_OFFS + 0x0;
198 /* PCI I/O space. */
199 MB_A_PCI_DMLBAI =
200 GCS5_CFG_OFFS + (MB_A_PCI_IO_ADDR - GCS5_ADDR);
201
202 mb_pci_bus = pci_scan_bus (0, &mb_pci_config_ops, 0);
203
204 pcibios_assign_resources ();
205 } else
206 printk (KERN_ERR "PCI: HOST/PCI bridge not found\n");
207
208 return 0;
209}
210
211subsys_initcall (pcibios_init);
212
213char __devinit *pcibios_setup (char *option)
214{
215 /* Don't handle any options. */
216 return option;
217}
218
219
220int __nomods_init pcibios_enable_device (struct pci_dev *dev, int mask)
221{
222 u16 cmd, old_cmd;
223 int idx;
224 struct resource *r;
225
226 pci_read_config_word(dev, PCI_COMMAND, &cmd);
227 old_cmd = cmd;
228 for (idx = 0; idx < 6; idx++) {
229 r = &dev->resource[idx];
230 if (!r->start && r->end) {
231 printk(KERN_ERR "PCI: Device %s not available because "
232 "of resource collisions\n", pci_name(dev));
233 return -EINVAL;
234 }
235 if (r->flags & IORESOURCE_IO)
236 cmd |= PCI_COMMAND_IO;
237 if (r->flags & IORESOURCE_MEM)
238 cmd |= PCI_COMMAND_MEMORY;
239 }
240 if (cmd != old_cmd) {
241 printk("PCI: Enabling device %s (%04x -> %04x)\n",
242 pci_name(dev), old_cmd, cmd);
243 pci_write_config_word(dev, PCI_COMMAND, cmd);
244 }
245 return 0;
246}
247
248
249/* Resource allocation. */
250static void __devinit pcibios_assign_resources (void)
251{
252 struct pci_dev *dev = NULL;
253 struct resource *r;
254
255 for_each_pci_dev(dev) {
256 unsigned di_num;
257 unsigned class = dev->class >> 8;
258
259 if (class && class != PCI_CLASS_BRIDGE_HOST) {
260 unsigned r_num;
261 for(r_num = 0; r_num < 6; r_num++) {
262 r = &dev->resource[r_num];
263 if (!r->start && r->end)
264 pci_assign_resource (dev, r_num);
265 }
266 }
267
268 /* Assign interrupts. */
269 for (di_num = 0; di_num < NUM_MB_PCI_DEV_IRQS; di_num++) {
270 struct mb_pci_dev_irq *di = &mb_pci_dev_irqs[di_num];
271
272 if (di->dev == PCI_SLOT (dev->devfn)) {
273 unsigned irq = di->irq_base;
274
275 if (di->query_pin) {
276 /* Find out which interrupt pin
277 this device uses (each PCI
278 slot has 4). */
279 u8 irq_pin;
280
281 pci_read_config_byte (dev,
282 PCI_INTERRUPT_PIN,
283 &irq_pin);
284
285 if (irq_pin == 0)
286 /* Doesn't use interrupts. */
287 continue;
288 else
289 irq += irq_pin - 1;
290 }
291
292 pcibios_update_irq (dev, irq);
293 }
294 }
295 }
296}
297
298void __devinit pcibios_update_irq (struct pci_dev *dev, int irq)
299{
300 dev->irq = irq;
301 pci_write_config_byte (dev, PCI_INTERRUPT_LINE, irq);
302}
303
304void __devinit
305pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
306 struct resource *res)
307{
308 unsigned long offset = 0;
309
310 if (res->flags & IORESOURCE_IO) {
311 offset = MB_A_PCI_IO_ADDR;
312 } else if (res->flags & IORESOURCE_MEM) {
313 offset = MB_A_PCI_MEM_ADDR;
314 }
315
316 region->start = res->start - offset;
317 region->end = res->end - offset;
318}
319
320
321/* Stubs for things we don't use. */
322
323/* Called after each bus is probed, but before its children are examined. */
324void pcibios_fixup_bus(struct pci_bus *b)
325{
326}
327
328void
329pcibios_align_resource (void *data, struct resource *res,
330 resource_size_t size, resource_size_t align)
331{
332}
333
334void pcibios_set_master (struct pci_dev *dev)
335{
336}
337
338
339/* Mother-A SRAM memory allocation. This is a simple first-fit allocator. */
340
341/* A memory free-list node. */
342struct mb_sram_free_area {
343 void *mem;
344 unsigned long size;
345 struct mb_sram_free_area *next;
346};
347
348/* The tail of the free-list, which starts out containing all the SRAM. */
349static struct mb_sram_free_area mb_sram_free_tail = {
350 (void *)MB_A_SRAM_ADDR, MB_A_SRAM_SIZE, 0
351};
352
353/* The free-list. */
354static struct mb_sram_free_area *mb_sram_free_areas = &mb_sram_free_tail;
355
356/* The free-list of free free-list nodes. (:-) */
357static struct mb_sram_free_area *mb_sram_free_free_areas = 0;
358
359/* Spinlock protecting the above globals. */
360static DEFINE_SPINLOCK(mb_sram_lock);
361
362/* Allocate a memory block at least SIZE bytes long in the Mother-A SRAM
363 space. */
364static void *alloc_mb_sram (size_t size)
365{
366 struct mb_sram_free_area *prev, *fa;
367 unsigned long flags;
368 void *mem = 0;
369
370 spin_lock_irqsave (mb_sram_lock, flags);
371
372 /* Look for a free area that can contain SIZE bytes. */
373 for (prev = 0, fa = mb_sram_free_areas; fa; prev = fa, fa = fa->next)
374 if (fa->size >= size) {
375 /* Found one! */
376 mem = fa->mem;
377
378 if (fa->size == size) {
379 /* In fact, it fits exactly, so remove
380 this node from the free-list. */
381 if (prev)
382 prev->next = fa->next;
383 else
384 mb_sram_free_areas = fa->next;
385 /* Put it on the free-list-entry-free-list. */
386 fa->next = mb_sram_free_free_areas;
387 mb_sram_free_free_areas = fa;
388 } else {
389 /* FA is bigger than SIZE, so just
390 reduce its size to account for this
391 allocation. */
392 fa->mem += size;
393 fa->size -= size;
394 }
395
396 break;
397 }
398
399 spin_unlock_irqrestore (mb_sram_lock, flags);
400
401 return mem;
402}
403
404/* Return the memory area MEM of size SIZE to the MB SRAM free pool. */
405static void free_mb_sram (void *mem, size_t size)
406{
407 struct mb_sram_free_area *prev, *fa, *new_fa;
408 unsigned long flags;
409 void *end = mem + size;
410
411 spin_lock_irqsave (mb_sram_lock, flags);
412
413 retry:
414 /* Find an adjacent free-list entry. */
415 for (prev = 0, fa = mb_sram_free_areas; fa; prev = fa, fa = fa->next)
416 if (fa->mem == end) {
417 /* FA is just after MEM, grow down to encompass it. */
418 fa->mem = mem;
419 fa->size += size;
420 goto done;
421 } else if (fa->mem + fa->size == mem) {
422 struct mb_sram_free_area *next_fa = fa->next;
423
424 /* FA is just before MEM, expand to encompass it. */
425 fa->size += size;
426
427 /* See if FA can now be merged with its successor. */
428 if (next_fa && fa->mem + fa->size == next_fa->mem) {
429 /* Yup; merge NEXT_FA's info into FA. */
430 fa->size += next_fa->size;
431 fa->next = next_fa->next;
432 /* Free NEXT_FA. */
433 next_fa->next = mb_sram_free_free_areas;
434 mb_sram_free_free_areas = next_fa;
435 }
436 goto done;
437 } else if (fa->mem > mem)
438 /* We've reached the right spot in the free-list
439 without finding an adjacent free-area, so add
440 a new free area to hold mem. */
441 break;
442
443 /* Make a new free-list entry. */
444
445 /* First, get a free-list entry. */
446 if (! mb_sram_free_free_areas) {
447 /* There are none, so make some. */
448 void *block;
449 size_t block_size = sizeof (struct mb_sram_free_area) * 8;
450
451 /* Don't hold the lock while calling kmalloc (I'm not
452 sure whether it would be a problem, since we use
453 GFP_ATOMIC, but it makes me nervous). */
454 spin_unlock_irqrestore (mb_sram_lock, flags);
455
456 block = kmalloc (block_size, GFP_ATOMIC);
457 if (! block)
458 panic ("free_mb_sram: can't allocate free-list entry");
459
460 /* Now get the lock back. */
461 spin_lock_irqsave (mb_sram_lock, flags);
462
463 /* Add the new free free-list entries. */
464 while (block_size > 0) {
465 struct mb_sram_free_area *nfa = block;
466 nfa->next = mb_sram_free_free_areas;
467 mb_sram_free_free_areas = nfa;
468 block += sizeof *nfa;
469 block_size -= sizeof *nfa;
470 }
471
472 /* Since we dropped the lock to call kmalloc, the
473 free-list could have changed, so retry from the
474 beginning. */
475 goto retry;
476 }
477
478 /* Remove NEW_FA from the free-list of free-list entries. */
479 new_fa = mb_sram_free_free_areas;
480 mb_sram_free_free_areas = new_fa->next;
481
482 /* NEW_FA initially holds only MEM. */
483 new_fa->mem = mem;
484 new_fa->size = size;
485
486 /* Insert NEW_FA in the free-list between PREV and FA. */
487 new_fa->next = fa;
488 if (prev)
489 prev->next = new_fa;
490 else
491 mb_sram_free_areas = new_fa;
492
493 done:
494 spin_unlock_irqrestore (mb_sram_lock, flags);
495}
496
497
498/* Maintainence of CPU -> Mother-A DMA mappings. */
499
500struct dma_mapping {
501 void *cpu_addr;
502 void *mb_sram_addr;
503 size_t size;
504 struct dma_mapping *next;
505};
506
507/* A list of mappings from CPU addresses to MB SRAM addresses for active
508 DMA blocks (that have been `granted' to the PCI device). */
509static struct dma_mapping *active_dma_mappings = 0;
510
511/* A list of free mapping objects. */
512static struct dma_mapping *free_dma_mappings = 0;
513
514/* Spinlock protecting the above globals. */
515static DEFINE_SPINLOCK(dma_mappings_lock);
516
517static struct dma_mapping *new_dma_mapping (size_t size)
518{
519 unsigned long flags;
520 struct dma_mapping *mapping;
521 void *mb_sram_block = alloc_mb_sram (size);
522
523 if (! mb_sram_block)
524 return 0;
525
526 spin_lock_irqsave (dma_mappings_lock, flags);
527
528 if (! free_dma_mappings) {
529 /* We're out of mapping structures, make more. */
530 void *mblock;
531 size_t mblock_size = sizeof (struct dma_mapping) * 8;
532
533 /* Don't hold the lock while calling kmalloc (I'm not
534 sure whether it would be a problem, since we use
535 GFP_ATOMIC, but it makes me nervous). */
536 spin_unlock_irqrestore (dma_mappings_lock, flags);
537
538 mblock = kmalloc (mblock_size, GFP_ATOMIC);
539 if (! mblock) {
540 free_mb_sram (mb_sram_block, size);
541 return 0;
542 }
543
544 /* Get the lock back. */
545 spin_lock_irqsave (dma_mappings_lock, flags);
546
547 /* Add the new mapping structures to the free-list. */
548 while (mblock_size > 0) {
549 struct dma_mapping *fm = mblock;
550 fm->next = free_dma_mappings;
551 free_dma_mappings = fm;
552 mblock += sizeof *fm;
553 mblock_size -= sizeof *fm;
554 }
555 }
556
557 /* Get a mapping struct from the freelist. */
558 mapping = free_dma_mappings;
559 free_dma_mappings = mapping->next;
560
561 /* Initialize the mapping. Other fields should be filled in by
562 caller. */
563 mapping->mb_sram_addr = mb_sram_block;
564 mapping->size = size;
565
566 /* Add it to the list of active mappings. */
567 mapping->next = active_dma_mappings;
568 active_dma_mappings = mapping;
569
570 spin_unlock_irqrestore (dma_mappings_lock, flags);
571
572 return mapping;
573}
574
575static struct dma_mapping *find_dma_mapping (void *mb_sram_addr)
576{
577 unsigned long flags;
578 struct dma_mapping *mapping;
579
580 spin_lock_irqsave (dma_mappings_lock, flags);
581
582 for (mapping = active_dma_mappings; mapping; mapping = mapping->next)
583 if (mapping->mb_sram_addr == mb_sram_addr) {
584 spin_unlock_irqrestore (dma_mappings_lock, flags);
585 return mapping;
586 }
587
588 panic ("find_dma_mapping: unmapped PCI DMA addr 0x%x",
589 MB_SRAM_TO_PCI (mb_sram_addr));
590}
591
592static struct dma_mapping *deactivate_dma_mapping (void *mb_sram_addr)
593{
594 unsigned long flags;
595 struct dma_mapping *mapping, *prev;
596
597 spin_lock_irqsave (dma_mappings_lock, flags);
598
599 for (prev = 0, mapping = active_dma_mappings;
600 mapping;
601 prev = mapping, mapping = mapping->next)
602 {
603 if (mapping->mb_sram_addr == mb_sram_addr) {
604 /* This is the MAPPING; deactivate it. */
605 if (prev)
606 prev->next = mapping->next;
607 else
608 active_dma_mappings = mapping->next;
609
610 spin_unlock_irqrestore (dma_mappings_lock, flags);
611
612 return mapping;
613 }
614 }
615
616 panic ("deactivate_dma_mapping: unmapped PCI DMA addr 0x%x",
617 MB_SRAM_TO_PCI (mb_sram_addr));
618}
619
620/* Return MAPPING to the freelist. */
621static inline void
622free_dma_mapping (struct dma_mapping *mapping)
623{
624 unsigned long flags;
625
626 free_mb_sram (mapping->mb_sram_addr, mapping->size);
627
628 spin_lock_irqsave (dma_mappings_lock, flags);
629
630 mapping->next = free_dma_mappings;
631 free_dma_mappings = mapping;
632
633 spin_unlock_irqrestore (dma_mappings_lock, flags);
634}
635
636
637/* Single PCI DMA mappings. */
638
639/* `Grant' to PDEV the memory block at CPU_ADDR, for doing DMA. The
640 32-bit PCI bus mastering address to use is returned. the device owns
641 this memory until either pci_unmap_single or pci_dma_sync_single is
642 performed. */
643dma_addr_t
644pci_map_single (struct pci_dev *pdev, void *cpu_addr, size_t size, int dir)
645{
646 struct dma_mapping *mapping = new_dma_mapping (size);
647
648 if (! mapping)
649 return 0;
650
651 mapping->cpu_addr = cpu_addr;
652
653 if (dir == PCI_DMA_BIDIRECTIONAL || dir == PCI_DMA_TODEVICE)
654 memcpy (mapping->mb_sram_addr, cpu_addr, size);
655
656 return MB_SRAM_TO_PCI (mapping->mb_sram_addr);
657}
658
659/* Return to the CPU the PCI DMA memory block previously `granted' to
660 PDEV, at DMA_ADDR. */
661void pci_unmap_single (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
662 int dir)
663{
664 void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr);
665 struct dma_mapping *mapping = deactivate_dma_mapping (mb_sram_addr);
666
667 if (size != mapping->size)
668 panic ("pci_unmap_single: size (%d) doesn't match"
669 " size of mapping at PCI DMA addr 0x%x (%d)\n",
670 size, dma_addr, mapping->size);
671
672 /* Copy back the DMA'd contents if necessary. */
673 if (dir == PCI_DMA_BIDIRECTIONAL || dir == PCI_DMA_FROMDEVICE)
674 memcpy (mapping->cpu_addr, mb_sram_addr, size);
675
676 /* Return mapping to the freelist. */
677 free_dma_mapping (mapping);
678}
679
680/* Make physical memory consistent for a single streaming mode DMA
681 translation after a transfer.
682
683 If you perform a pci_map_single() but wish to interrogate the
684 buffer using the cpu, yet do not wish to teardown the PCI dma
685 mapping, you must call this function before doing so. At the next
686 point you give the PCI dma address back to the card, you must first
687 perform a pci_dma_sync_for_device, and then the device again owns
688 the buffer. */
689void
690pci_dma_sync_single_for_cpu (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
691 int dir)
692{
693 void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr);
694 struct dma_mapping *mapping = find_dma_mapping (mb_sram_addr);
695
696 /* Synchronize the DMA buffer with the CPU buffer if necessary. */
697 if (dir == PCI_DMA_FROMDEVICE)
698 memcpy (mapping->cpu_addr, mb_sram_addr, size);
699 else if (dir == PCI_DMA_TODEVICE)
700 ; /* nothing to do */
701 else
702 panic("pci_dma_sync_single: unsupported sync dir: %d", dir);
703}
704
705void
706pci_dma_sync_single_for_device (struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
707 int dir)
708{
709 void *mb_sram_addr = PCI_TO_MB_SRAM (dma_addr);
710 struct dma_mapping *mapping = find_dma_mapping (mb_sram_addr);
711
712 /* Synchronize the DMA buffer with the CPU buffer if necessary. */
713 if (dir == PCI_DMA_FROMDEVICE)
714 ; /* nothing to do */
715 else if (dir == PCI_DMA_TODEVICE)
716 memcpy (mb_sram_addr, mapping->cpu_addr, size);
717 else
718 panic("pci_dma_sync_single: unsupported sync dir: %d", dir);
719}
720
721
722/* Scatter-gather PCI DMA mappings. */
723
724/* Do multiple DMA mappings at once. */
725int
726pci_map_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len, int dir)
727{
728 BUG ();
729 return 0;
730}
731
732/* Unmap multiple DMA mappings at once. */
733void
734pci_unmap_sg (struct pci_dev *pdev, struct scatterlist *sg, int sg_len,int dir)
735{
736 BUG ();
737}
738
739/* Make physical memory consistent for a set of streaming mode DMA
740 translations after a transfer. The same as pci_dma_sync_single_* but
741 for a scatter-gather list, same rules and usage. */
742
743void
744pci_dma_sync_sg_for_cpu (struct pci_dev *dev,
745 struct scatterlist *sg, int sg_len,
746 int dir)
747{
748 BUG ();
749}
750
751void
752pci_dma_sync_sg_for_device (struct pci_dev *dev,
753 struct scatterlist *sg, int sg_len,
754 int dir)
755{
756 BUG ();
757}
758
759
760/* PCI mem mapping. */
761
762/* Allocate and map kernel buffer using consistent mode DMA for PCI
763 device. Returns non-NULL cpu-view pointer to the buffer if
764 successful and sets *DMA_ADDR to the pci side dma address as well,
765 else DMA_ADDR is undefined. */
766void *
767pci_alloc_consistent (struct pci_dev *pdev, size_t size, dma_addr_t *dma_addr)
768{
769 void *mb_sram_mem = alloc_mb_sram (size);
770 if (mb_sram_mem)
771 *dma_addr = MB_SRAM_TO_PCI (mb_sram_mem);
772 return mb_sram_mem;
773}
774
775/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must
776 be values that were returned from pci_alloc_consistent. SIZE must be
777 the same as what as passed into pci_alloc_consistent. References to
778 the memory and mappings associated with CPU_ADDR or DMA_ADDR past
779 this call are illegal. */
780void
781pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr,
782 dma_addr_t dma_addr)
783{
784 void *mb_sram_mem = PCI_TO_MB_SRAM (dma_addr);
785 free_mb_sram (mb_sram_mem, size);
786}
787
788
789/* iomap/iomap */
790
791void __iomem *pci_iomap (struct pci_dev *dev, int bar, unsigned long max)
792{
793 resource_size_t start = pci_resource_start (dev, bar);
794 resource_size_t len = pci_resource_len (dev, bar);
795
796 if (!start || len == 0)
797 return 0;
798
799 /* None of the ioremap functions actually do anything, other than
800 re-casting their argument, so don't bother differentiating them. */
801 return ioremap (start, len);
802}
803
804void pci_iounmap (struct pci_dev *dev, void __iomem *addr)
805{
806 /* nothing */
807}
808
809
810/* symbol exports (for modules) */
811
812EXPORT_SYMBOL (pci_map_single);
813EXPORT_SYMBOL (pci_unmap_single);
814EXPORT_SYMBOL (pci_alloc_consistent);
815EXPORT_SYMBOL (pci_free_consistent);
816EXPORT_SYMBOL (pci_dma_sync_single_for_cpu);
817EXPORT_SYMBOL (pci_dma_sync_single_for_device);
818EXPORT_SYMBOL (pci_iomap);
819EXPORT_SYMBOL (pci_iounmap);
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c
deleted file mode 100644
index 46803d48dffe..000000000000
--- a/arch/v850/kernel/rte_me2_cb.c
+++ /dev/null
@@ -1,298 +0,0 @@
1/*
2 * arch/v850/kernel/rte_me2_cb.c -- Midas labs RTE-V850E/ME2-CB board
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/bootmem.h>
17#include <linux/irq.h>
18#include <linux/fs.h>
19#include <linux/major.h>
20#include <linux/sched.h>
21#include <linux/delay.h>
22
23#include <asm/atomic.h>
24#include <asm/page.h>
25#include <asm/me2.h>
26#include <asm/rte_me2_cb.h>
27#include <asm/machdep.h>
28#include <asm/v850e_intc.h>
29#include <asm/v850e_cache.h>
30#include <asm/irq.h>
31
32#include "mach.h"
33
34extern unsigned long *_intv_start;
35extern unsigned long *_intv_end;
36
37/* LED access routines. */
38extern unsigned read_leds (int pos, char *buf, int len);
39extern unsigned write_leds (int pos, const char *buf, int len);
40
41
42/* SDRAM are almost contiguous (with a small hole in between;
43 see mach_reserve_bootmem for details), so just use both as one big area. */
44#define RAM_START SDRAM_ADDR
45#define RAM_END (SDRAM_ADDR + SDRAM_SIZE)
46
47
48void __init mach_get_physical_ram (unsigned long *ram_start,
49 unsigned long *ram_len)
50{
51 *ram_start = RAM_START;
52 *ram_len = RAM_END - RAM_START;
53}
54
55void mach_gettimeofday (struct timespec *tv)
56{
57 tv->tv_sec = 0;
58 tv->tv_nsec = 0;
59}
60
61/* Called before configuring an on-chip UART. */
62void rte_me2_cb_uart_pre_configure (unsigned chan,
63 unsigned cflags, unsigned baud)
64{
65 /* The RTE-V850E/ME2-CB connects some general-purpose I/O
66 pins on the CPU to the RTS/CTS lines of UARTB channel 0's
67 serial connection.
68 I/O pins P21 and P22 are RTS and CTS respectively. */
69 if (chan == 0) {
70 /* Put P21 & P22 in I/O port mode. */
71 ME2_PORT2_PMC &= ~0x6;
72 /* Make P21 and output, and P22 an input. */
73 ME2_PORT2_PM = (ME2_PORT2_PM & ~0xC) | 0x4;
74 }
75
76 me2_uart_pre_configure (chan, cflags, baud);
77}
78
79void __init mach_init_irqs (void)
80{
81 /* Initialize interrupts. */
82 me2_init_irqs ();
83 rte_me2_cb_init_irqs ();
84}
85
86#ifdef CONFIG_ROM_KERNEL
87/* Initialization for kernel in ROM. */
88static inline rom_kernel_init (void)
89{
90 /* If the kernel is in ROM, we have to copy any initialized data
91 from ROM into RAM. */
92 extern unsigned long _data_load_start, _sdata, _edata;
93 register unsigned long *src = &_data_load_start;
94 register unsigned long *dst = &_sdata, *end = &_edata;
95
96 while (dst != end)
97 *dst++ = *src++;
98}
99#endif /* CONFIG_ROM_KERNEL */
100
101static void install_interrupt_vectors (void)
102{
103 unsigned long *p1, *p2;
104
105 ME2_IRAMM = 0x03; /* V850E/ME2 iRAM write mode */
106
107 /* vector copy to iRAM */
108 p1 = (unsigned long *)0; /* v85x vector start */
109 p2 = (unsigned long *)&_intv_start;
110 while (p2 < (unsigned long *)&_intv_end)
111 *p1++ = *p2++;
112
113 ME2_IRAMM = 0x00; /* V850E/ME2 iRAM read mode */
114}
115
116/* CompactFlash */
117
118static void cf_power_on (void)
119{
120 /* CF card detected? */
121 if (CB_CF_STS0 & 0x0030)
122 return;
123
124 CB_CF_REG0 = 0x0002; /* reest on */
125 mdelay (10);
126 CB_CF_REG0 = 0x0003; /* power on */
127 mdelay (10);
128 CB_CF_REG0 = 0x0001; /* reset off */
129 mdelay (10);
130}
131
132static void cf_power_off (void)
133{
134 CB_CF_REG0 = 0x0003; /* power on */
135 mdelay (10);
136 CB_CF_REG0 = 0x0002; /* reest on */
137 mdelay (10);
138}
139
140void __init mach_early_init (void)
141{
142 install_interrupt_vectors ();
143
144 /* CS1 SDRAM instruction cache enable */
145 v850e_cache_enable (0x04, 0x03, 0);
146
147 rte_cb_early_init ();
148
149 /* CompactFlash power on */
150 cf_power_on ();
151
152#if defined (CONFIG_ROM_KERNEL)
153 rom_kernel_init ();
154#endif
155}
156
157
158/* RTE-V850E/ME2-CB Programmable Interrupt Controller. */
159
160static struct cb_pic_irq_init cb_pic_irq_inits[] = {
161 { "CB_EXTTM0", IRQ_CB_EXTTM0, 1, 1, 6 },
162 { "CB_EXTSIO", IRQ_CB_EXTSIO, 1, 1, 6 },
163 { "CB_TOVER", IRQ_CB_TOVER, 1, 1, 6 },
164 { "CB_GINT0", IRQ_CB_GINT0, 1, 1, 6 },
165 { "CB_USB", IRQ_CB_USB, 1, 1, 6 },
166 { "CB_LANC", IRQ_CB_LANC, 1, 1, 6 },
167 { "CB_USB_VBUS_ON", IRQ_CB_USB_VBUS_ON, 1, 1, 6 },
168 { "CB_USB_VBUS_OFF", IRQ_CB_USB_VBUS_OFF, 1, 1, 6 },
169 { "CB_EXTTM1", IRQ_CB_EXTTM1, 1, 1, 6 },
170 { "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 },
171 { 0 }
172};
173#define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1)
174
175static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS];
176static unsigned char cb_pic_active_irqs = 0;
177
178void __init rte_me2_cb_init_irqs (void)
179{
180 cb_pic_init_irq_types (cb_pic_irq_inits, cb_pic_hw_itypes);
181
182 /* Initalize on board PIC1 (not PIC0) enable */
183 CB_PIC_INT0M = 0x0000;
184 CB_PIC_INT1M = 0x0000;
185 CB_PIC_INTR = 0x0000;
186 CB_PIC_INTEN |= CB_PIC_INT1EN;
187
188 ME2_PORT2_PMC |= 0x08; /* INTP23/SCK1 mode */
189 ME2_PORT2_PFC &= ~0x08; /* INTP23 mode */
190 ME2_INTR(2) &= ~0x08; /* INTP23 falling-edge detect */
191 ME2_INTF(2) &= ~0x08; /* " */
192
193 rte_cb_init_irqs (); /* gbus &c */
194}
195
196
197/* Enable interrupt handling for interrupt IRQ. */
198void cb_pic_enable_irq (unsigned irq)
199{
200 CB_PIC_INT1M |= 1 << (irq - CB_PIC_BASE_IRQ);
201}
202
203void cb_pic_disable_irq (unsigned irq)
204{
205 CB_PIC_INT1M &= ~(1 << (irq - CB_PIC_BASE_IRQ));
206}
207
208void cb_pic_shutdown_irq (unsigned irq)
209{
210 cb_pic_disable_irq (irq);
211
212 if (--cb_pic_active_irqs == 0)
213 free_irq (IRQ_CB_PIC, 0);
214
215 CB_PIC_INT1M &= ~(1 << (irq - CB_PIC_BASE_IRQ));
216}
217
218static irqreturn_t cb_pic_handle_irq (int irq, void *dev_id,
219 struct pt_regs *regs)
220{
221 irqreturn_t rval = IRQ_NONE;
222 unsigned status = CB_PIC_INTR;
223 unsigned enable = CB_PIC_INT1M;
224
225 /* Only pay attention to enabled interrupts. */
226 status &= enable;
227
228 CB_PIC_INTEN &= ~CB_PIC_INT1EN;
229
230 if (status) {
231 unsigned mask = 1;
232
233 irq = CB_PIC_BASE_IRQ;
234 do {
235 /* There's an active interrupt, find out which one,
236 and call its handler. */
237 while (! (status & mask)) {
238 irq++;
239 mask <<= 1;
240 }
241 status &= ~mask;
242
243 CB_PIC_INTR = mask;
244
245 /* Recursively call handle_irq to handle it. */
246 handle_irq (irq, regs);
247 rval = IRQ_HANDLED;
248 } while (status);
249 }
250
251 CB_PIC_INTEN |= CB_PIC_INT1EN;
252
253 return rval;
254}
255
256
257static void irq_nop (unsigned irq) { }
258
259static unsigned cb_pic_startup_irq (unsigned irq)
260{
261 int rval;
262
263 if (cb_pic_active_irqs == 0) {
264 rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq,
265 IRQF_DISABLED, "cb_pic_handler", 0);
266 if (rval != 0)
267 return rval;
268 }
269
270 cb_pic_active_irqs++;
271
272 cb_pic_enable_irq (irq);
273
274 return 0;
275}
276
277/* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array
278 INITS (which is terminated by an entry with the name field == 0). */
279void __init cb_pic_init_irq_types (struct cb_pic_irq_init *inits,
280 struct hw_interrupt_type *hw_irq_types)
281{
282 struct cb_pic_irq_init *init;
283 for (init = inits; init->name; init++) {
284 struct hw_interrupt_type *hwit = hw_irq_types++;
285
286 hwit->typename = init->name;
287
288 hwit->startup = cb_pic_startup_irq;
289 hwit->shutdown = cb_pic_shutdown_irq;
290 hwit->enable = cb_pic_enable_irq;
291 hwit->disable = cb_pic_disable_irq;
292 hwit->ack = irq_nop;
293 hwit->end = irq_nop;
294
295 /* Initialize kernel IRQ infrastructure for this interrupt. */
296 init_irq_handlers(init->base, init->num, init->interval, hwit);
297 }
298}
diff --git a/arch/v850/kernel/rte_me2_cb.ld b/arch/v850/kernel/rte_me2_cb.ld
deleted file mode 100644
index cf0766065ec6..000000000000
--- a/arch/v850/kernel/rte_me2_cb.ld
+++ /dev/null
@@ -1,30 +0,0 @@
1/* Linker script for the Midas labs RTE-V850E/ME2-CB evaluation board
2 (CONFIG_RTE_CB_ME2), with kernel in SDRAM. */
3
4MEMORY {
5 /* 128Kbyte of IRAM */
6 IRAM : ORIGIN = 0x00000000, LENGTH = 0x00020000
7
8 /* 32MB of SDRAM. */
9 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
10}
11
12#define KRAM SDRAM
13
14SECTIONS {
15 .text : {
16 __kram_start = . ;
17 TEXT_CONTENTS
18 INTV_CONTENTS /* copy to iRAM (0x0-0x620) */
19 } > KRAM
20
21 .data : {
22 DATA_CONTENTS
23 BSS_CONTENTS
24 RAMK_INIT_CONTENTS
25 __kram_end = . ;
26 BOOTMAP_CONTENTS
27 } > KRAM
28
29 .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM
30}
diff --git a/arch/v850/kernel/rte_nb85e_cb-multi.ld b/arch/v850/kernel/rte_nb85e_cb-multi.ld
deleted file mode 100644
index de347b4fffac..000000000000
--- a/arch/v850/kernel/rte_nb85e_cb-multi.ld
+++ /dev/null
@@ -1,57 +0,0 @@
1/* Linker script for the Midas labs RTE-NB85E-CB evaluation board
2 (CONFIG_RTE_CB_NB85E), with the Multi debugger ROM monitor . */
3
4MEMORY {
5 /* 1MB of SRAM; we can't use the last 96KB, because it's used by
6 the monitor scratch-RAM. This memory is mirrored 4 times. */
7 SRAM : ORIGIN = SRAM_ADDR, LENGTH = (SRAM_SIZE - MON_SCRATCH_SIZE)
8 /* Monitor scratch RAM; only the interrupt vectors should go here. */
9 MRAM : ORIGIN = MON_SCRATCH_ADDR, LENGTH = MON_SCRATCH_SIZE
10 /* 16MB of SDRAM. */
11 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
12}
13
14#ifdef CONFIG_RTE_CB_NB85E_KSRAM
15# define KRAM SRAM
16#else
17# define KRAM SDRAM
18#endif
19
20SECTIONS {
21 /* We can't use RAMK_KRAM_CONTENTS because that puts the whole
22 kernel in a single ELF segment, and the Multi debugger (which
23 we use to load the kernel) appears to have bizarre problems
24 dealing with it. */
25
26 .text : {
27 __kram_start = . ;
28 TEXT_CONTENTS
29 } > KRAM
30
31 .data : {
32 DATA_CONTENTS
33 BSS_CONTENTS
34 RAMK_INIT_CONTENTS
35 __kram_end = . ;
36 BOOTMAP_CONTENTS
37
38 /* The address at which the interrupt vectors are initially
39 loaded by the loader. We can't load the interrupt vectors
40 directly into their target location, because the monitor
41 ROM for the GHS Multi debugger barfs if we try.
42 Unfortunately, Multi also doesn't deal correctly with ELF
43 sections where the LMA and VMA differ (it just ignores the
44 LMA), so we can't use that feature to work around the
45 problem! What we do instead is just put the interrupt
46 vectors into a normal section, and have the
47 `mach_early_init' function for Midas boards do the
48 necessary copying and relocation at runtime (this section
49 basically only contains `jr' instructions, so it's not
50 that hard). */
51 . = ALIGN (0x10) ;
52 __intv_load_start = . ;
53 INTV_CONTENTS
54 } > KRAM
55
56 .root ALIGN (4096) : { ROOT_FS_CONTENTS } > SDRAM
57}
diff --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c
deleted file mode 100644
index b4a045da5d70..000000000000
--- a/arch/v850/kernel/rte_nb85e_cb.c
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * arch/v850/kernel/rte_nb85e_cb.c -- Midas labs RTE-V850E/NB85E-CB board
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/swap.h>
18#include <linux/bootmem.h>
19#include <linux/irq.h>
20
21#include <asm/atomic.h>
22#include <asm/page.h>
23#include <asm/v850e.h>
24#include <asm/rte_nb85e_cb.h>
25
26#include "mach.h"
27
28void __init mach_early_init (void)
29{
30 /* Configure caching; some possible settings:
31
32 BHC = 0x0000, DCC = 0x0000 -- all caching disabled
33 BHC = 0x0040, DCC = 0x0000 -- SDRAM: icache only
34 BHC = 0x0080, DCC = 0x0C00 -- SDRAM: write-back dcache only
35 BHC = 0x00C0, DCC = 0x0C00 -- SDRAM: icache + write-back dcache
36 BHC = 0x00C0, DCC = 0x0800 -- SDRAM: icache + write-thru dcache
37
38 We can only cache SDRAM (we can't use cache SRAM because it's in
39 the same memory region as the on-chip RAM and I/O space).
40
41 Unfortunately, the dcache seems to be buggy, so we only use the
42 icache for now. */
43 v850e_cache_enable (0x0040 /*BHC*/, 0x0003 /*ICC*/, 0x0000 /*DCC*/);
44
45 rte_cb_early_init ();
46}
47
48void __init mach_get_physical_ram (unsigned long *ram_start,
49 unsigned long *ram_len)
50{
51 /* We just use SDRAM here. */
52 *ram_start = SDRAM_ADDR;
53 *ram_len = SDRAM_SIZE;
54}
55
56void mach_gettimeofday (struct timespec *tv)
57{
58 tv->tv_sec = 0;
59 tv->tv_nsec = 0;
60}
61
62/* Called before configuring an on-chip UART. */
63void rte_nb85e_cb_uart_pre_configure (unsigned chan,
64 unsigned cflags, unsigned baud)
65{
66 /* The RTE-NB85E-CB connects some general-purpose I/O pins on the
67 CPU to the RTS/CTS lines the UART's serial connection, as follows:
68 P00 = CTS (in), P01 = DSR (in), P02 = RTS (out), P03 = DTR (out). */
69
70 TEG_PORT0_PM = 0x03; /* P00 and P01 inputs, P02 and P03 outputs */
71 TEG_PORT0_IO = 0x03; /* Accept input */
72
73 /* Do pre-configuration for the actual UART. */
74 teg_uart_pre_configure (chan, cflags, baud);
75}
76
77void __init mach_init_irqs (void)
78{
79 teg_init_irqs ();
80 rte_cb_init_irqs ();
81}
diff --git a/arch/v850/kernel/rte_nb85e_cb.ld b/arch/v850/kernel/rte_nb85e_cb.ld
deleted file mode 100644
index b672f484f085..000000000000
--- a/arch/v850/kernel/rte_nb85e_cb.ld
+++ /dev/null
@@ -1,22 +0,0 @@
1/* Linker script for the Midas labs RTE-NB85E-CB evaluation board
2 (CONFIG_RTE_CB_NB85E). */
3
4MEMORY {
5 LOW : ORIGIN = 0x0, LENGTH = 0x00100000
6 /* 1MB of SRAM This memory is mirrored 4 times. */
7 SRAM : ORIGIN = SRAM_ADDR, LENGTH = SRAM_SIZE
8 /* 16MB of SDRAM. */
9 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
10}
11
12#ifdef CONFIG_RTE_CB_NB85E_KSRAM
13# define KRAM SRAM
14#else
15# define KRAM SDRAM
16#endif
17
18SECTIONS {
19 .intv : { INTV_CONTENTS } > LOW
20 .sram : { RAMK_KRAM_CONTENTS } > KRAM
21 .root : { ROOT_FS_CONTENTS } > SDRAM
22}
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c
deleted file mode 100644
index a0a8456a8430..000000000000
--- a/arch/v850/kernel/setup.c
+++ /dev/null
@@ -1,330 +0,0 @@
1/*
2 * arch/v850/kernel/setup.c -- Arch-dependent initialization functions
3 *
4 * Copyright (C) 2001,02,03,05,06 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03,05,06 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/mm.h>
15#include <linux/bootmem.h>
16#include <linux/swap.h> /* we don't have swap, but for nr_free_pages */
17#include <linux/irq.h>
18#include <linux/reboot.h>
19#include <linux/personality.h>
20#include <linux/major.h>
21#include <linux/root_dev.h>
22#include <linux/mtd/mtd.h>
23#include <linux/init.h>
24
25#include <asm/irq.h>
26#include <asm/setup.h>
27
28#include "mach.h"
29
30/* These symbols are all defined in the linker map to delineate various
31 statically allocated regions of memory. */
32
33extern char _intv_start, _intv_end;
34/* `kram' is only used if the kernel uses part of normal user RAM. */
35extern char _kram_start __attribute__ ((__weak__));
36extern char _kram_end __attribute__ ((__weak__));
37extern char _init_start, _init_end;
38extern char _bootmap;
39extern char _stext, _etext, _sdata, _edata, _sbss, _ebss;
40/* Many platforms use an embedded root image. */
41extern char _root_fs_image_start __attribute__ ((__weak__));
42extern char _root_fs_image_end __attribute__ ((__weak__));
43
44
45char __initdata command_line[COMMAND_LINE_SIZE];
46
47/* Memory not used by the kernel. */
48static unsigned long total_ram_pages;
49
50/* System RAM. */
51static unsigned long ram_start = 0, ram_len = 0;
52
53
54#define ADDR_TO_PAGE_UP(x) ((((unsigned long)x) + PAGE_SIZE-1) >> PAGE_SHIFT)
55#define ADDR_TO_PAGE(x) (((unsigned long)x) >> PAGE_SHIFT)
56#define PAGE_TO_ADDR(x) (((unsigned long)x) << PAGE_SHIFT)
57
58static void init_mem_alloc (unsigned long ram_start, unsigned long ram_len);
59
60void set_mem_root (void *addr, size_t len, char *cmd_line);
61
62
63void __init setup_arch (char **cmdline)
64{
65 /* Keep a copy of command line */
66 *cmdline = command_line;
67 memcpy (boot_command_line, command_line, COMMAND_LINE_SIZE);
68 boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
69
70 console_verbose ();
71
72 init_mm.start_code = (unsigned long) &_stext;
73 init_mm.end_code = (unsigned long) &_etext;
74 init_mm.end_data = (unsigned long) &_edata;
75 init_mm.brk = (unsigned long) &_kram_end;
76
77 /* Find out what mem this machine has. */
78 mach_get_physical_ram (&ram_start, &ram_len);
79 /* ... and tell the kernel about it. */
80 init_mem_alloc (ram_start, ram_len);
81
82 printk (KERN_INFO "CPU: %s\nPlatform: %s\n",
83 CPU_MODEL_LONG, PLATFORM_LONG);
84
85 /* do machine-specific setups. */
86 mach_setup (cmdline);
87
88#ifdef CONFIG_MTD
89 if (!ROOT_DEV && &_root_fs_image_end > &_root_fs_image_start)
90 set_mem_root (&_root_fs_image_start,
91 &_root_fs_image_end - &_root_fs_image_start,
92 *cmdline);
93#endif
94}
95
96void __init trap_init (void)
97{
98}
99
100#ifdef CONFIG_MTD
101
102/* From drivers/mtd/devices/slram.c */
103#define SLRAM_BLK_SZ 0x4000
104
105/* Set the root filesystem to be the given memory region.
106 Some parameter may be appended to CMD_LINE. */
107void set_mem_root (void *addr, size_t len, char *cmd_line)
108{
109 /* Some sort of idiocy in MTD means we must supply a length that's
110 a multiple of SLRAM_BLK_SZ. We just round up the real length,
111 as the file system shouldn't attempt to access anything beyond
112 the end of the image anyway. */
113 len = (((len - 1) + SLRAM_BLK_SZ) / SLRAM_BLK_SZ) * SLRAM_BLK_SZ;
114
115 /* The only way to pass info to the MTD slram driver is via
116 the command line. */
117 if (*cmd_line) {
118 cmd_line += strlen (cmd_line);
119 *cmd_line++ = ' ';
120 }
121 sprintf (cmd_line, "slram=root,0x%x,+0x%x", (u32)addr, (u32)len);
122
123 ROOT_DEV = MKDEV (MTD_BLOCK_MAJOR, 0);
124}
125#endif
126
127
128static void irq_nop (unsigned irq) { }
129static unsigned irq_zero (unsigned irq) { return 0; }
130
131static void nmi_end (unsigned irq)
132{
133 if (irq != IRQ_NMI (0)) {
134 printk (KERN_CRIT "NMI %d is unrecoverable; restarting...",
135 irq - IRQ_NMI (0));
136 machine_restart (0);
137 }
138}
139
140static struct hw_interrupt_type nmi_irq_type = {
141 .typename = "NMI",
142 .startup = irq_zero, /* startup */
143 .shutdown = irq_nop, /* shutdown */
144 .enable = irq_nop, /* enable */
145 .disable = irq_nop, /* disable */
146 .ack = irq_nop, /* ack */
147 .end = nmi_end, /* end */
148};
149
150void __init init_IRQ (void)
151{
152 init_irq_handlers (0, NUM_MACH_IRQS, 1, 0);
153 init_irq_handlers (IRQ_NMI (0), NUM_NMIS, 1, &nmi_irq_type);
154 mach_init_irqs ();
155}
156
157
158void __init mem_init (void)
159{
160 max_mapnr = MAP_NR (ram_start + ram_len);
161
162 num_physpages = ADDR_TO_PAGE (ram_len);
163
164 total_ram_pages = free_all_bootmem ();
165
166 printk (KERN_INFO
167 "Memory: %luK/%luK available"
168 " (%luK kernel code, %luK data)\n",
169 PAGE_TO_ADDR (nr_free_pages()) / 1024,
170 ram_len / 1024,
171 ((unsigned long)&_etext - (unsigned long)&_stext) / 1024,
172 ((unsigned long)&_ebss - (unsigned long)&_sdata) / 1024);
173}
174
175void free_initmem (void)
176{
177 unsigned long ram_end = ram_start + ram_len;
178 unsigned long start = PAGE_ALIGN ((unsigned long)(&_init_start));
179
180 if (start >= ram_start && start < ram_end) {
181 unsigned long addr;
182 unsigned long end = PAGE_ALIGN ((unsigned long)(&_init_end));
183
184 if (end > ram_end)
185 end = ram_end;
186
187 printk("Freeing unused kernel memory: %ldK freed\n",
188 (end - start) / 1024);
189
190 for (addr = start; addr < end; addr += PAGE_SIZE) {
191 struct page *page = virt_to_page (addr);
192 ClearPageReserved (page);
193 init_page_count (page);
194 __free_page (page);
195 total_ram_pages++;
196 }
197 }
198}
199
200
201/* Initialize the `bootmem allocator'. RAM_START and RAM_LEN identify
202 what RAM may be used. */
203static void __init
204init_bootmem_alloc (unsigned long ram_start, unsigned long ram_len)
205{
206 /* The part of the kernel that's in the same managed RAM space
207 used for general allocation. */
208 unsigned long kram_start = (unsigned long)&_kram_start;
209 unsigned long kram_end = (unsigned long)&_kram_end;
210 /* End of the managed RAM space. */
211 unsigned long ram_end = ram_start + ram_len;
212 /* Address range of the interrupt vector table. */
213 unsigned long intv_start = (unsigned long)&_intv_start;
214 unsigned long intv_end = (unsigned long)&_intv_end;
215 /* True if the interrupt vectors are in the managed RAM area. */
216 int intv_in_ram = (intv_end > ram_start && intv_start < ram_end);
217 /* True if the interrupt vectors are inside the kernel's RAM. */
218 int intv_in_kram = (intv_end > kram_start && intv_start < kram_end);
219 /* A pointer to an optional function that reserves platform-specific
220 memory regions. We declare the pointer `volatile' to avoid gcc
221 turning the call into a static call (the problem is that since
222 it's a weak symbol, a static call may end up trying to reference
223 the location 0x0, which is not always reachable). */
224 void (*volatile mrb) (void) = mach_reserve_bootmem;
225 /* The bootmem allocator's allocation bitmap. */
226 unsigned long bootmap = (unsigned long)&_bootmap;
227 unsigned long bootmap_len;
228
229 /* Round bootmap location up to next page. */
230 bootmap = PAGE_TO_ADDR (ADDR_TO_PAGE_UP (bootmap));
231
232 /* Initialize bootmem allocator. */
233 bootmap_len = init_bootmem_node (NODE_DATA (0),
234 ADDR_TO_PAGE (bootmap),
235 ADDR_TO_PAGE (PAGE_OFFSET),
236 ADDR_TO_PAGE (ram_end));
237
238 /* Now make the RAM actually allocatable (it starts out `reserved'). */
239 free_bootmem (ram_start, ram_len);
240
241 if (kram_end > kram_start)
242 /* Reserve the RAM part of the kernel's address space, so it
243 doesn't get allocated. */
244 reserve_bootmem(kram_start, kram_end - kram_start,
245 BOOTMEM_DEFAULT);
246
247 if (intv_in_ram && !intv_in_kram)
248 /* Reserve the interrupt vector space. */
249 reserve_bootmem(intv_start, intv_end - intv_start,
250 BOOTMEM_DEFAULT);
251
252 if (bootmap >= ram_start && bootmap < ram_end)
253 /* Reserve the bootmap space. */
254 reserve_bootmem(bootmap, bootmap_len,
255 BOOTMEM_DEFAULT);
256
257 /* Reserve the memory used by the root filesystem image if it's
258 in RAM. */
259 if (&_root_fs_image_end > &_root_fs_image_start
260 && (unsigned long)&_root_fs_image_start >= ram_start
261 && (unsigned long)&_root_fs_image_start < ram_end)
262 reserve_bootmem ((unsigned long)&_root_fs_image_start,
263 &_root_fs_image_end - &_root_fs_image_start,
264 BOOTMEM_DEFAULT);
265
266 /* Let the platform-dependent code reserve some too. */
267 if (mrb)
268 (*mrb) ();
269}
270
271/* Tell the kernel about what RAM it may use for memory allocation. */
272static void __init
273init_mem_alloc (unsigned long ram_start, unsigned long ram_len)
274{
275 unsigned i;
276 unsigned long zones_size[MAX_NR_ZONES];
277
278 init_bootmem_alloc (ram_start, ram_len);
279
280 for (i = 0; i < MAX_NR_ZONES; i++)
281 zones_size[i] = 0;
282
283 /* We stuff all the memory into one area, which includes the
284 initial gap from PAGE_OFFSET to ram_start. */
285 zones_size[ZONE_DMA]
286 = ADDR_TO_PAGE (ram_len + (ram_start - PAGE_OFFSET));
287
288 /* The allocator is very picky about the address of the first
289 allocatable page -- it must be at least as aligned as the
290 maximum allocation -- so try to detect cases where it will get
291 confused and signal them at compile time (this is a common
292 problem when porting to a new platform with ). There is a
293 similar runtime check in free_area_init_core. */
294#if ((PAGE_OFFSET >> PAGE_SHIFT) & ((1UL << (MAX_ORDER - 1)) - 1))
295#error MAX_ORDER is too large for given PAGE_OFFSET (use CONFIG_FORCE_MAX_ZONEORDER to change it)
296#endif
297 NODE_DATA(0)->node_mem_map = NULL;
298 free_area_init_node (0, NODE_DATA(0), zones_size,
299 ADDR_TO_PAGE (PAGE_OFFSET), 0);
300}
301
302
303
304/* Taken from m68knommu */
305void show_mem(void)
306{
307 unsigned long i;
308 int free = 0, total = 0, reserved = 0, shared = 0;
309 int cached = 0;
310
311 printk(KERN_INFO "\nMem-info:\n");
312 show_free_areas();
313 i = max_mapnr;
314 while (i-- > 0) {
315 total++;
316 if (PageReserved(mem_map+i))
317 reserved++;
318 else if (PageSwapCache(mem_map+i))
319 cached++;
320 else if (!page_count(mem_map+i))
321 free++;
322 else
323 shared += page_count(mem_map+i) - 1;
324 }
325 printk(KERN_INFO "%d pages of RAM\n",total);
326 printk(KERN_INFO "%d free pages\n",free);
327 printk(KERN_INFO "%d reserved pages\n",reserved);
328 printk(KERN_INFO "%d pages shared\n",shared);
329 printk(KERN_INFO "%d pages swap cached\n",cached);
330}
diff --git a/arch/v850/kernel/signal.c b/arch/v850/kernel/signal.c
deleted file mode 100644
index bf166e7e762c..000000000000
--- a/arch/v850/kernel/signal.c
+++ /dev/null
@@ -1,523 +0,0 @@
1/*
2 * arch/v850/kernel/signal.c -- Signal handling
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 * Copyright (C) 1999,2000,2002 Niibe Yutaka & Kaz Kojima
7 * Copyright (C) 1991,1992 Linus Torvalds
8 *
9 * This file is subject to the terms and conditions of the GNU General
10 * Public License. See the file COPYING in the main directory of this
11 * archive for more details.
12 *
13 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
14 *
15 * This file was derived from the sh version, arch/sh/kernel/signal.c
16 */
17
18#include <linux/mm.h>
19#include <linux/smp.h>
20#include <linux/kernel.h>
21#include <linux/signal.h>
22#include <linux/errno.h>
23#include <linux/wait.h>
24#include <linux/ptrace.h>
25#include <linux/unistd.h>
26#include <linux/stddef.h>
27#include <linux/personality.h>
28#include <linux/tty.h>
29
30#include <asm/ucontext.h>
31#include <asm/uaccess.h>
32#include <asm/pgtable.h>
33#include <asm/pgalloc.h>
34#include <asm/thread_info.h>
35#include <asm/cacheflush.h>
36
37#define DEBUG_SIG 0
38
39#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
40
41asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset);
42
43/*
44 * Atomically swap in the new signal mask, and wait for a signal.
45 */
46asmlinkage int
47sys_sigsuspend(old_sigset_t mask, struct pt_regs *regs)
48{
49 sigset_t saveset;
50
51 mask &= _BLOCKABLE;
52 spin_lock_irq(&current->sighand->siglock);
53 saveset = current->blocked;
54 siginitset(&current->blocked, mask);
55 recalc_sigpending();
56 spin_unlock_irq(&current->sighand->siglock);
57
58 regs->gpr[GPR_RVAL] = -EINTR;
59 while (1) {
60 current->state = TASK_INTERRUPTIBLE;
61 schedule();
62 if (do_signal(regs, &saveset))
63 return -EINTR;
64 }
65}
66
67asmlinkage int
68sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize,
69 struct pt_regs *regs)
70{
71 sigset_t saveset, newset;
72
73 /* XXX: Don't preclude handling different sized sigset_t's. */
74 if (sigsetsize != sizeof(sigset_t))
75 return -EINVAL;
76
77 if (copy_from_user(&newset, unewset, sizeof(newset)))
78 return -EFAULT;
79 sigdelsetmask(&newset, ~_BLOCKABLE);
80 spin_lock_irq(&current->sighand->siglock);
81 saveset = current->blocked;
82 current->blocked = newset;
83 recalc_sigpending();
84 spin_unlock_irq(&current->sighand->siglock);
85
86 regs->gpr[GPR_RVAL] = -EINTR;
87 while (1) {
88 current->state = TASK_INTERRUPTIBLE;
89 schedule();
90 if (do_signal(regs, &saveset))
91 return -EINTR;
92 }
93}
94
95asmlinkage int
96sys_sigaction(int sig, const struct old_sigaction *act,
97 struct old_sigaction *oact)
98{
99 struct k_sigaction new_ka, old_ka;
100 int ret;
101
102 if (act) {
103 old_sigset_t mask;
104 if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
105 __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
106 __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
107 return -EFAULT;
108 __get_user(new_ka.sa.sa_flags, &act->sa_flags);
109 __get_user(mask, &act->sa_mask);
110 siginitset(&new_ka.sa.sa_mask, mask);
111 }
112
113 ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
114
115 if (!ret && oact) {
116 if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) ||
117 __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
118 __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
119 return -EFAULT;
120 __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
121 __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
122 }
123
124 return ret;
125}
126
127asmlinkage int
128sys_sigaltstack(const stack_t *uss, stack_t *uoss,
129 struct pt_regs *regs)
130{
131 return do_sigaltstack(uss, uoss, regs->gpr[GPR_SP]);
132}
133
134
135/*
136 * Do a signal return; undo the signal stack.
137 */
138
139struct sigframe
140{
141 struct sigcontext sc;
142 unsigned long extramask[_NSIG_WORDS-1];
143 unsigned long tramp[2]; /* signal trampoline */
144};
145
146struct rt_sigframe
147{
148 struct siginfo info;
149 struct ucontext uc;
150 unsigned long tramp[2]; /* signal trampoline */
151};
152
153static int
154restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *rval_p)
155{
156 unsigned int err = 0;
157
158#define COPY(x) err |= __get_user(regs->x, &sc->regs.x)
159 COPY(gpr[0]); COPY(gpr[1]); COPY(gpr[2]); COPY(gpr[3]);
160 COPY(gpr[4]); COPY(gpr[5]); COPY(gpr[6]); COPY(gpr[7]);
161 COPY(gpr[8]); COPY(gpr[9]); COPY(gpr[10]); COPY(gpr[11]);
162 COPY(gpr[12]); COPY(gpr[13]); COPY(gpr[14]); COPY(gpr[15]);
163 COPY(gpr[16]); COPY(gpr[17]); COPY(gpr[18]); COPY(gpr[19]);
164 COPY(gpr[20]); COPY(gpr[21]); COPY(gpr[22]); COPY(gpr[23]);
165 COPY(gpr[24]); COPY(gpr[25]); COPY(gpr[26]); COPY(gpr[27]);
166 COPY(gpr[28]); COPY(gpr[29]); COPY(gpr[30]); COPY(gpr[31]);
167 COPY(pc); COPY(psw);
168 COPY(ctpc); COPY(ctpsw); COPY(ctbp);
169#undef COPY
170
171 return err;
172}
173
174asmlinkage int sys_sigreturn(struct pt_regs *regs)
175{
176 struct sigframe *frame = (struct sigframe *)regs->gpr[GPR_SP];
177 sigset_t set;
178 int rval;
179
180 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
181 goto badframe;
182
183 if (__get_user(set.sig[0], &frame->sc.oldmask)
184 || (_NSIG_WORDS > 1
185 && __copy_from_user(&set.sig[1], &frame->extramask,
186 sizeof(frame->extramask))))
187 goto badframe;
188
189 sigdelsetmask(&set, ~_BLOCKABLE);
190 spin_lock_irq(&current->sighand->siglock);
191 current->blocked = set;
192 recalc_sigpending();
193 spin_unlock_irq(&current->sighand->siglock);
194
195 if (restore_sigcontext(regs, &frame->sc, &rval))
196 goto badframe;
197 return rval;
198
199badframe:
200 force_sig(SIGSEGV, current);
201 return 0;
202}
203
204asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
205{
206 struct rt_sigframe *frame = (struct rt_sigframe *)regs->gpr[GPR_SP];
207 sigset_t set;
208 stack_t st;
209 int rval;
210
211 if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
212 goto badframe;
213
214 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
215 goto badframe;
216
217 sigdelsetmask(&set, ~_BLOCKABLE);
218 spin_lock_irq(&current->sighand->siglock);
219 current->blocked = set;
220 recalc_sigpending();
221 spin_unlock_irq(&current->sighand->siglock);
222
223 if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &rval))
224 goto badframe;
225
226 if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
227 goto badframe;
228 /* It is more difficult to avoid calling this function than to
229 call it and ignore errors. */
230 do_sigaltstack(&st, NULL, regs->gpr[GPR_SP]);
231
232 return rval;
233
234badframe:
235 force_sig(SIGSEGV, current);
236 return 0;
237}
238
239/*
240 * Set up a signal frame.
241 */
242
243static int
244setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
245 unsigned long mask)
246{
247 int err = 0;
248
249#define COPY(x) err |= __put_user(regs->x, &sc->regs.x)
250 COPY(gpr[0]); COPY(gpr[1]); COPY(gpr[2]); COPY(gpr[3]);
251 COPY(gpr[4]); COPY(gpr[5]); COPY(gpr[6]); COPY(gpr[7]);
252 COPY(gpr[8]); COPY(gpr[9]); COPY(gpr[10]); COPY(gpr[11]);
253 COPY(gpr[12]); COPY(gpr[13]); COPY(gpr[14]); COPY(gpr[15]);
254 COPY(gpr[16]); COPY(gpr[17]); COPY(gpr[18]); COPY(gpr[19]);
255 COPY(gpr[20]); COPY(gpr[21]); COPY(gpr[22]); COPY(gpr[23]);
256 COPY(gpr[24]); COPY(gpr[25]); COPY(gpr[26]); COPY(gpr[27]);
257 COPY(gpr[28]); COPY(gpr[29]); COPY(gpr[30]); COPY(gpr[31]);
258 COPY(pc); COPY(psw);
259 COPY(ctpc); COPY(ctpsw); COPY(ctbp);
260#undef COPY
261
262 err |= __put_user(mask, &sc->oldmask);
263
264 return err;
265}
266
267/*
268 * Determine which stack to use..
269 */
270static inline void *
271get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
272{
273 /* Default to using normal stack */
274 unsigned long sp = regs->gpr[GPR_SP];
275
276 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
277 sp = current->sas_ss_sp + current->sas_ss_size;
278
279 return (void *)((sp - frame_size) & -8UL);
280}
281
282static void setup_frame(int sig, struct k_sigaction *ka,
283 sigset_t *set, struct pt_regs *regs)
284{
285 struct sigframe *frame;
286 int err = 0;
287 int signal;
288
289 frame = get_sigframe(ka, regs, sizeof(*frame));
290
291 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
292 goto give_sigsegv;
293
294 signal = current_thread_info()->exec_domain
295 && current_thread_info()->exec_domain->signal_invmap
296 && sig < 32
297 ? current_thread_info()->exec_domain->signal_invmap[sig]
298 : sig;
299
300 err |= setup_sigcontext(&frame->sc, regs, set->sig[0]);
301
302 if (_NSIG_WORDS > 1) {
303 err |= __copy_to_user(frame->extramask, &set->sig[1],
304 sizeof(frame->extramask));
305 }
306
307 /* Set up to return from userspace. If provided, use a stub
308 already in userspace. */
309 if (ka->sa.sa_flags & SA_RESTORER) {
310 regs->gpr[GPR_LP] = (unsigned long) ka->sa.sa_restorer;
311 } else {
312 /* Note, these encodings are _little endian_! */
313
314 /* addi __NR_sigreturn, r0, r12 */
315 err |= __put_user(0x6600 | (__NR_sigreturn << 16),
316 frame->tramp + 0);
317 /* trap 0 */
318 err |= __put_user(0x010007e0,
319 frame->tramp + 1);
320
321 regs->gpr[GPR_LP] = (unsigned long)frame->tramp;
322
323 flush_cache_sigtramp (regs->gpr[GPR_LP]);
324 }
325
326 if (err)
327 goto give_sigsegv;
328
329 /* Set up registers for signal handler. */
330 regs->pc = (v850_reg_t) ka->sa.sa_handler;
331 regs->gpr[GPR_SP] = (v850_reg_t)frame;
332 /* Signal handler args: */
333 regs->gpr[GPR_ARG0] = signal; /* arg 0: signum */
334 regs->gpr[GPR_ARG1] = (v850_reg_t)&frame->sc;/* arg 1: sigcontext */
335
336 set_fs(USER_DS);
337
338#if DEBUG_SIG
339 printk("SIG deliver (%s:%d): sp=%p pc=%08lx ra=%08lx\n",
340 current->comm, current->pid, frame, regs->pc, );
341#endif
342
343 return;
344
345give_sigsegv:
346 force_sigsegv(sig, current);
347}
348
349static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
350 sigset_t *set, struct pt_regs *regs)
351{
352 struct rt_sigframe *frame;
353 int err = 0;
354 int signal;
355
356 frame = get_sigframe(ka, regs, sizeof(*frame));
357
358 if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
359 goto give_sigsegv;
360
361 signal = current_thread_info()->exec_domain
362 && current_thread_info()->exec_domain->signal_invmap
363 && sig < 32
364 ? current_thread_info()->exec_domain->signal_invmap[sig]
365 : sig;
366
367 err |= copy_siginfo_to_user(&frame->info, info);
368
369 /* Create the ucontext. */
370 err |= __put_user(0, &frame->uc.uc_flags);
371 err |= __put_user(0, &frame->uc.uc_link);
372 err |= __put_user((void *)current->sas_ss_sp,
373 &frame->uc.uc_stack.ss_sp);
374 err |= __put_user(sas_ss_flags(regs->gpr[GPR_SP]),
375 &frame->uc.uc_stack.ss_flags);
376 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
377 err |= setup_sigcontext(&frame->uc.uc_mcontext,
378 regs, set->sig[0]);
379 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
380
381 /* Set up to return from userspace. If provided, use a stub
382 already in userspace. */
383 if (ka->sa.sa_flags & SA_RESTORER) {
384 regs->gpr[GPR_LP] = (unsigned long) ka->sa.sa_restorer;
385 } else {
386 /* Note, these encodings are _little endian_! */
387
388 /* addi __NR_sigreturn, r0, r12 */
389 err |= __put_user(0x6600 | (__NR_sigreturn << 16),
390 frame->tramp + 0);
391 /* trap 0 */
392 err |= __put_user(0x010007e0,
393 frame->tramp + 1);
394
395 regs->gpr[GPR_LP] = (unsigned long)frame->tramp;
396
397 flush_cache_sigtramp (regs->gpr[GPR_LP]);
398 }
399
400 if (err)
401 goto give_sigsegv;
402
403 /* Set up registers for signal handler. */
404 regs->pc = (v850_reg_t) ka->sa.sa_handler;
405 regs->gpr[GPR_SP] = (v850_reg_t)frame;
406 /* Signal handler args: */
407 regs->gpr[GPR_ARG0] = signal; /* arg 0: signum */
408 regs->gpr[GPR_ARG1] = (v850_reg_t)&frame->info; /* arg 1: siginfo */
409 regs->gpr[GPR_ARG2] = (v850_reg_t)&frame->uc; /* arg 2: ucontext */
410
411 set_fs(USER_DS);
412
413#if DEBUG_SIG
414 printk("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
415 current->comm, current->pid, frame, regs->pc, regs->pr);
416#endif
417
418 return;
419
420give_sigsegv:
421 force_sigsegv(sig, current);
422}
423
424/*
425 * OK, we're invoking a handler
426 */
427
428static void
429handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
430 sigset_t *oldset, struct pt_regs * regs)
431{
432 /* Are we from a system call? */
433 if (PT_REGS_SYSCALL (regs)) {
434 /* If so, check system call restarting.. */
435 switch (regs->gpr[GPR_RVAL]) {
436 case -ERESTART_RESTARTBLOCK:
437 current_thread_info()->restart_block.fn =
438 do_no_restart_syscall;
439 /* fall through */
440 case -ERESTARTNOHAND:
441 regs->gpr[GPR_RVAL] = -EINTR;
442 break;
443
444 case -ERESTARTSYS:
445 if (!(ka->sa.sa_flags & SA_RESTART)) {
446 regs->gpr[GPR_RVAL] = -EINTR;
447 break;
448 }
449 /* fallthrough */
450 case -ERESTARTNOINTR:
451 regs->gpr[12] = PT_REGS_SYSCALL (regs);
452 regs->pc -= 4; /* Size of `trap 0' insn. */
453 }
454
455 PT_REGS_SET_SYSCALL (regs, 0);
456 }
457
458 /* Set up the stack frame */
459 if (ka->sa.sa_flags & SA_SIGINFO)
460 setup_rt_frame(sig, ka, info, oldset, regs);
461 else
462 setup_frame(sig, ka, oldset, regs);
463
464 spin_lock_irq(&current->sighand->siglock);
465 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
466 if (!(ka->sa.sa_flags & SA_NODEFER))
467 sigaddset(&current->blocked,sig);
468 recalc_sigpending();
469 spin_unlock_irq(&current->sighand->siglock);
470}
471
472/*
473 * Note that 'init' is a special process: it doesn't get signals it doesn't
474 * want to handle. Thus you cannot kill init even with a SIGKILL even by
475 * mistake.
476 *
477 * Note that we go through the signals twice: once to check the signals that
478 * the kernel can handle, and then we build all the user-level signal handling
479 * stack-frames in one go after that.
480 */
481int do_signal(struct pt_regs *regs, sigset_t *oldset)
482{
483 siginfo_t info;
484 int signr;
485 struct k_sigaction ka;
486
487 /*
488 * We want the common case to go fast, which
489 * is why we may in certain cases get here from
490 * kernel mode. Just return without doing anything
491 * if so.
492 */
493 if (!user_mode(regs))
494 return 1;
495
496 if (!oldset)
497 oldset = &current->blocked;
498
499 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
500 if (signr > 0) {
501 /* Whee! Actually deliver the signal. */
502 handle_signal(signr, &info, &ka, oldset, regs);
503 return 1;
504 }
505
506 /* Did we come from a system call? */
507 if (PT_REGS_SYSCALL (regs)) {
508 int rval = (int)regs->gpr[GPR_RVAL];
509 /* Restart the system call - no handlers present */
510 if (rval == -ERESTARTNOHAND
511 || rval == -ERESTARTSYS
512 || rval == -ERESTARTNOINTR)
513 {
514 regs->gpr[12] = PT_REGS_SYSCALL (regs);
515 regs->pc -= 4; /* Size of `trap 0' insn. */
516 }
517 else if (rval == -ERESTART_RESTARTBLOCK) {
518 regs->gpr[12] = __NR_restart_syscall;
519 regs->pc -= 4; /* Size of `trap 0' insn. */
520 }
521 }
522 return 0;
523}
diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c
deleted file mode 100644
index 467b4aa0acdd..000000000000
--- a/arch/v850/kernel/sim.c
+++ /dev/null
@@ -1,172 +0,0 @@
1/*
2 * arch/v850/kernel/sim.c -- Machine-specific stuff for GDB v850e simulator
3 *
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/init.h>
17#include <linux/mm.h>
18#include <linux/swap.h>
19#include <linux/bootmem.h>
20#include <linux/irq.h>
21
22#include <asm/atomic.h>
23#include <asm/page.h>
24#include <asm/machdep.h>
25#include <asm/simsyscall.h>
26
27#include "mach.h"
28
29/* The name of a file containing the root filesystem. */
30#define ROOT_FS "rootfs.image"
31
32extern void simcons_setup (void);
33extern void simcons_poll_ttys (void);
34extern void set_mem_root (void *addr, size_t len, char *cmd_line);
35
36static int read_file (const char *name,
37 unsigned long *addr, unsigned long *len,
38 const char **err);
39
40void __init mach_setup (char **cmdline)
41{
42 const char *err;
43 unsigned long root_dev_addr, root_dev_len;
44
45 simcons_setup ();
46
47 printk (KERN_INFO "Reading root filesystem: %s", ROOT_FS);
48
49 if (read_file (ROOT_FS, &root_dev_addr, &root_dev_len, &err)) {
50 printk (" (size %luK)\n", root_dev_len / 1024);
51 set_mem_root ((void *)root_dev_addr, (size_t)root_dev_len,
52 *cmdline);
53 } else
54 printk ("...%s failed!\n", err);
55}
56
57void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len)
58{
59 *ram_start = RAM_ADDR;
60 *ram_len = RAM_SIZE;
61}
62
63void __init mach_sched_init (struct irqaction *timer_action)
64{
65 /* ...do magic timer initialization?... */
66 mach_tick = simcons_poll_ttys;
67 setup_irq (0, timer_action);
68}
69
70
71static void irq_nop (unsigned irq) { }
72static unsigned irq_zero (unsigned irq) { return 0; }
73
74static struct hw_interrupt_type sim_irq_type = {
75 .typename = "IRQ",
76 .startup = irq_zero, /* startup */
77 .shutdown = irq_nop, /* shutdown */
78 .enable = irq_nop, /* enable */
79 .disable = irq_nop, /* disable */
80 .ack = irq_nop, /* ack */
81 .end = irq_nop, /* end */
82};
83
84void __init mach_init_irqs (void)
85{
86 init_irq_handlers (0, NUM_MACH_IRQS, 1, &sim_irq_type);
87}
88
89
90void mach_gettimeofday (struct timespec *tv)
91{
92 long timeval[2], timezone[2];
93 int rval = V850_SIM_SYSCALL (gettimeofday, timeval, timezone);
94 if (rval == 0) {
95 tv->tv_sec = timeval[0];
96 tv->tv_nsec = timeval[1] * 1000;
97 }
98}
99
100void machine_restart (char *__unused)
101{
102 V850_SIM_SYSCALL (write, 1, "RESTART\n", 8);
103 V850_SIM_SYSCALL (exit, 0);
104}
105
106void machine_halt (void)
107{
108 V850_SIM_SYSCALL (write, 1, "HALT\n", 5);
109 V850_SIM_SYSCALL (exit, 0);
110}
111
112void machine_power_off (void)
113{
114 V850_SIM_SYSCALL (write, 1, "POWER OFF\n", 10);
115 V850_SIM_SYSCALL (exit, 0);
116}
117
118
119/* Load data from a file called NAME into ram. The address and length
120 of the data image are returned in ADDR and LEN. */
121static int __init
122read_file (const char *name,
123 unsigned long *addr, unsigned long *len,
124 const char **err)
125{
126 int rval, fd;
127 unsigned long cur, left;
128 /* Note this is not a normal stat buffer, it's an ad-hoc
129 structure defined by the simulator. */
130 unsigned long stat_buf[10];
131
132 /* Stat the file to find out the length. */
133 rval = V850_SIM_SYSCALL (stat, name, stat_buf);
134 if (rval < 0) {
135 if (err) *err = "stat";
136 return 0;
137 }
138 *len = stat_buf[4];
139
140 /* Open the file; `0' is O_RDONLY. */
141 fd = V850_SIM_SYSCALL (open, name, 0);
142 if (fd < 0) {
143 if (err) *err = "open";
144 return 0;
145 }
146
147 *addr = (unsigned long)alloc_bootmem(*len);
148 if (! *addr) {
149 V850_SIM_SYSCALL (close, fd);
150 if (err) *err = "alloc_bootmem";
151 return 0;
152 }
153
154 cur = *addr;
155 left = *len;
156 while (left > 0) {
157 int chunk = V850_SIM_SYSCALL (read, fd, cur, left);
158 if (chunk <= 0)
159 break;
160 cur += chunk;
161 left -= chunk;
162 }
163 V850_SIM_SYSCALL (close, fd);
164 if (left > 0) {
165 /* Some read failed. */
166 free_bootmem (*addr, *len);
167 if (err) *err = "read";
168 return 0;
169 }
170
171 return 1;
172}
diff --git a/arch/v850/kernel/sim.ld b/arch/v850/kernel/sim.ld
deleted file mode 100644
index 101885f3c9f0..000000000000
--- a/arch/v850/kernel/sim.ld
+++ /dev/null
@@ -1,13 +0,0 @@
1/* Linker script for the gdb v850e simulator (CONFIG_V850E_SIM). */
2
3MEMORY {
4 /* Interrupt vectors. */
5 INTV : ORIGIN = 0x0, LENGTH = 0xe0
6 /* Main RAM. */
7 RAM : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE
8}
9
10SECTIONS {
11 .intv : { INTV_CONTENTS } > INTV
12 .ram : { RAMK_KRAM_CONTENTS } > RAM
13}
diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c
deleted file mode 100644
index 566dde5e6070..000000000000
--- a/arch/v850/kernel/sim85e2.c
+++ /dev/null
@@ -1,195 +0,0 @@
1/*
2 * arch/v850/kernel/sim85e2.c -- Machine-specific stuff for
3 * V850E2 RTL simulator
4 *
5 * Copyright (C) 2002,03 NEC Electronics Corporation
6 * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/kernel.h>
16#include <linux/module.h>
17#include <linux/init.h>
18#include <linux/mm.h>
19#include <linux/swap.h>
20#include <linux/bootmem.h>
21#include <linux/irq.h>
22
23#include <asm/atomic.h>
24#include <asm/page.h>
25#include <asm/machdep.h>
26
27#include "mach.h"
28
29
30/* There are 4 possible areas we can use:
31
32 IRAM (1MB) is fast for instruction fetches, but slow for data
33 DRAM (1020KB) is fast for data, but slow for instructions
34 ERAM is cached, so should be fast for both insns and data
35 SDRAM is external DRAM, similar to ERAM
36*/
37
38#define INIT_MEMC_FOR_SDRAM
39#define USE_SDRAM_AREA
40#define KERNEL_IN_SDRAM_AREA
41
42#define DCACHE_MODE V850E2_CACHE_BTSC_DCM_WT
43/*#define DCACHE_MODE V850E2_CACHE_BTSC_DCM_WB_ALLOC*/
44
45#ifdef USE_SDRAM_AREA
46#define RAM_START SDRAM_ADDR
47#define RAM_END (SDRAM_ADDR + SDRAM_SIZE)
48#else
49/* When we use DRAM, we need to account for the fact that the end of it is
50 used for R0_RAM. */
51#define RAM_START DRAM_ADDR
52#define RAM_END R0_RAM_ADDR
53#endif
54
55
56extern void memcons_setup (void);
57
58
59#ifdef KERNEL_IN_SDRAM_AREA
60#define EARLY_INIT_SECTION_ATTR __attribute__ ((section (".early.text")))
61#else
62#define EARLY_INIT_SECTION_ATTR __init
63#endif
64
65void EARLY_INIT_SECTION_ATTR mach_early_init (void)
66{
67 /* The sim85e2 simulator tracks `undefined' values, so to make
68 debugging easier, we begin by zeroing out all otherwise
69 undefined registers. This is not strictly necessary.
70
71 The registers we zero are:
72 Every GPR except:
73 stack-pointer (r3)
74 task-pointer (r16)
75 our return addr (r31)
76 Every system register (SPR) that we know about except for
77 the PSW (SPR 5), which we zero except for the
78 disable-interrupts bit.
79 */
80
81 /* GPRs */
82 asm volatile (" mov r0, r1 ; mov r0, r2 ");
83 asm volatile ("mov r0, r4 ; mov r0, r5 ; mov r0, r6 ; mov r0, r7 ");
84 asm volatile ("mov r0, r8 ; mov r0, r9 ; mov r0, r10; mov r0, r11");
85 asm volatile ("mov r0, r12; mov r0, r13; mov r0, r14; mov r0, r15");
86 asm volatile (" mov r0, r17; mov r0, r18; mov r0, r19");
87 asm volatile ("mov r0, r20; mov r0, r21; mov r0, r22; mov r0, r23");
88 asm volatile ("mov r0, r24; mov r0, r25; mov r0, r26; mov r0, r27");
89 asm volatile ("mov r0, r28; mov r0, r29; mov r0, r30");
90
91 /* SPRs */
92 asm volatile ("ldsr r0, 0; ldsr r0, 1; ldsr r0, 2; ldsr r0, 3");
93 asm volatile ("ldsr r0, 4");
94 asm volatile ("addi 0x20, r0, r1; ldsr r1, 5"); /* PSW */
95 asm volatile ("ldsr r0, 16; ldsr r0, 17; ldsr r0, 18; ldsr r0, 19");
96 asm volatile ("ldsr r0, 20");
97
98
99#ifdef INIT_MEMC_FOR_SDRAM
100 /* Settings for SDRAM controller. */
101 V850E2_VSWC = 0x0042;
102 V850E2_BSC = 0x9286;
103 V850E2_BCT(0) = 0xb000; /* was: 0 */
104 V850E2_BCT(1) = 0x000b;
105 V850E2_ASC = 0;
106 V850E2_LBS = 0xa9aa; /* was: 0xaaaa */
107 V850E2_LBC(0) = 0;
108 V850E2_LBC(1) = 0; /* was: 0x3 */
109 V850E2_BCC = 0;
110 V850E2_RFS(4) = 0x800a; /* was: 0xf109 */
111 V850E2_SCR(4) = 0x2091; /* was: 0x20a1 */
112 V850E2_RFS(3) = 0x800c;
113 V850E2_SCR(3) = 0x20a1;
114 V850E2_DWC(0) = 0;
115 V850E2_DWC(1) = 0;
116#endif
117
118#if 0
119#ifdef CONFIG_V850E2_SIM85E2S
120 /* Turn on the caches. */
121 V850E2_CACHE_BTSC = V850E2_CACHE_BTSC_ICM | DCACHE_MODE;
122 V850E2_BHC = 0x1010;
123#elif CONFIG_V850E2_SIM85E2C
124 V850E2_CACHE_BTSC |= (V850E2_CACHE_BTSC_ICM | V850E2_CACHE_BTSC_DCM0);
125 V850E2_BUSM_BHC = 0xFFFF;
126#endif
127#else
128 V850E2_BHC = 0;
129#endif
130
131 /* Don't stop the simulator at `halt' instructions. */
132 SIM85E2_NOTHAL = 1;
133
134 /* Ensure that the simulator halts on a panic, instead of going
135 into an infinite loop inside the panic function. */
136 panic_timeout = -1;
137}
138
139void __init mach_setup (char **cmdline)
140{
141 memcons_setup ();
142}
143
144void mach_get_physical_ram (unsigned long *ram_start, unsigned long *ram_len)
145{
146 *ram_start = RAM_START;
147 *ram_len = RAM_END - RAM_START;
148}
149
150void __init mach_sched_init (struct irqaction *timer_action)
151{
152 /* The simulator actually cycles through all interrupts
153 periodically. We just pay attention to IRQ0, which gives us
154 1/64 the rate of the periodic interrupts. */
155 setup_irq (0, timer_action);
156}
157
158void mach_gettimeofday (struct timespec *tv)
159{
160 tv->tv_sec = 0;
161 tv->tv_nsec = 0;
162}
163
164/* Interrupts */
165
166struct v850e_intc_irq_init irq_inits[] = {
167 { "IRQ", 0, NUM_MACH_IRQS, 1, 7 },
168 { 0 }
169};
170struct hw_interrupt_type hw_itypes[1];
171
172/* Initialize interrupts. */
173void __init mach_init_irqs (void)
174{
175 v850e_intc_init_irq_types (irq_inits, hw_itypes);
176}
177
178
179void machine_halt (void) __attribute__ ((noreturn));
180void machine_halt (void)
181{
182 SIM85E2_SIMFIN = 0; /* Halt immediately. */
183 for (;;) {}
184}
185
186void machine_restart (char *__unused)
187{
188 machine_halt ();
189}
190
191void machine_power_off (void)
192{
193 machine_halt ();
194}
195
diff --git a/arch/v850/kernel/sim85e2.ld b/arch/v850/kernel/sim85e2.ld
deleted file mode 100644
index 7470fd2ffb5b..000000000000
--- a/arch/v850/kernel/sim85e2.ld
+++ /dev/null
@@ -1,36 +0,0 @@
1/* Linker script for the sim85e2c simulator, which is a verilog simulation of
2 the V850E2 NA85E2C cpu core (CONFIG_V850E2_SIM85E2C). */
3
4MEMORY {
5 /* 1MB of `instruction RAM', starting at 0.
6 Instruction fetches are much faster from IRAM than from DRAM. */
7 IRAM : ORIGIN = IRAM_ADDR, LENGTH = IRAM_SIZE
8
9 /* 1MB of `data RAM', below and contiguous with the I/O space.
10 Data fetches are much faster from DRAM than from IRAM. */
11 DRAM : ORIGIN = DRAM_ADDR, LENGTH = DRAM_SIZE
12
13 /* `external ram' (CS1 area), comes after IRAM. */
14 ERAM : ORIGIN = ERAM_ADDR, LENGTH = ERAM_SIZE
15
16 /* Dynamic RAM; uses memory controller. */
17 SDRAM : ORIGIN = SDRAM_ADDR, LENGTH = SDRAM_SIZE
18}
19
20SECTIONS {
21 .iram : {
22 INTV_CONTENTS
23 *arch/v850/kernel/head.o
24 *(.early.text)
25 } > IRAM
26 .dram : {
27 _memcons_output = . ;
28 . = . + 0x8000 ;
29 _memcons_output_end = . ;
30 } > DRAM
31 .sdram : {
32 /* We stick console output into a buffer here. */
33 RAMK_KRAM_CONTENTS
34 ROOT_FS_CONTENTS
35 } > SDRAM
36}
diff --git a/arch/v850/kernel/simcons.c b/arch/v850/kernel/simcons.c
deleted file mode 100644
index 9973596ae304..000000000000
--- a/arch/v850/kernel/simcons.c
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 * arch/v850/kernel/simcons.c -- Console I/O for GDB v850e simulator
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/console.h>
16#include <linux/tty.h>
17#include <linux/tty_flip.h>
18#include <linux/tty_driver.h>
19#include <linux/init.h>
20
21#include <asm/poll.h>
22#include <asm/string.h>
23#include <asm/simsyscall.h>
24
25
26/* Low-level console. */
27
28static void simcons_write (struct console *co, const char *buf, unsigned len)
29{
30 V850_SIM_SYSCALL (write, 1, buf, len);
31}
32
33static int simcons_read (struct console *co, char *buf, unsigned len)
34{
35 return V850_SIM_SYSCALL (read, 0, buf, len);
36}
37
38static struct tty_driver *tty_driver;
39static struct tty_driver *simcons_device (struct console *c, int *index)
40{
41 *index = c->index;
42 return tty_driver;
43}
44
45static struct console simcons =
46{
47 .name = "simcons",
48 .write = simcons_write,
49 .read = simcons_read,
50 .device = simcons_device,
51 .flags = CON_PRINTBUFFER,
52 .index = -1,
53};
54
55/* Higher level TTY interface. */
56
57int simcons_tty_open (struct tty_struct *tty, struct file *filp)
58{
59 return 0;
60}
61
62int simcons_tty_write (struct tty_struct *tty,
63 const unsigned char *buf, int count)
64{
65 return V850_SIM_SYSCALL (write, 1, buf, count);
66}
67
68int simcons_tty_write_room (struct tty_struct *tty)
69{
70 /* Completely arbitrary. */
71 return 0x100000;
72}
73
74int simcons_tty_chars_in_buffer (struct tty_struct *tty)
75{
76 /* We have no buffer. */
77 return 0;
78}
79
80static const struct tty_operations ops = {
81 .open = simcons_tty_open,
82 .write = simcons_tty_write,
83 .write_room = simcons_tty_write_room,
84 .chars_in_buffer = simcons_tty_chars_in_buffer,
85};
86
87int __init simcons_tty_init (void)
88{
89 struct tty_driver *driver = alloc_tty_driver(1);
90 int err;
91 if (!driver)
92 return -ENOMEM;
93 driver->name = "simcons";
94 driver->major = TTY_MAJOR;
95 driver->minor_start = 64;
96 driver->type = TTY_DRIVER_TYPE_SYSCONS;
97 driver->init_termios = tty_std_termios;
98 tty_set_operations(driver, &ops);
99 err = tty_register_driver(driver);
100 if (err) {
101 put_tty_driver(driver);
102 return err;
103 }
104 tty_driver = driver;
105 return 0;
106}
107/* We use `late_initcall' instead of just `__initcall' as a workaround for
108 the fact that (1) simcons_tty_init can't be called before tty_init,
109 (2) tty_init is called via `module_init', (3) if statically linked,
110 module_init == device_init, and (4) there's no ordering of init lists.
111 We can do this easily because simcons is always statically linked, but
112 other tty drivers that depend on tty_init and which must use
113 `module_init' to declare their init routines are likely to be broken. */
114late_initcall(simcons_tty_init);
115
116/* Poll for input on the console, and if there's any, deliver it to the
117 tty driver. */
118void simcons_poll_tty (struct tty_struct *tty)
119{
120 char buf[32]; /* Not the nicest way to do it but I need it correct first */
121 int flip = 0, send_break = 0;
122 struct pollfd pfd;
123 pfd.fd = 0;
124 pfd.events = POLLIN;
125
126 if (V850_SIM_SYSCALL (poll, &pfd, 1, 0) > 0) {
127 if (pfd.revents & POLLIN) {
128 /* Real block hardware knows the transfer size before
129 transfer so the new tty buffering doesn't try to handle
130 this rather weird simulator specific case well */
131 int rd = V850_SIM_SYSCALL (read, 0, buf, 32);
132 if (rd > 0) {
133 tty_insert_flip_string(tty, buf, rd);
134 flip = 1;
135 } else
136 send_break = 1;
137 } else if (pfd.revents & POLLERR)
138 send_break = 1;
139 }
140
141 if (send_break) {
142 tty_insert_flip_char (tty, 0, TTY_BREAK);
143 flip = 1;
144 }
145
146 if (flip)
147 tty_schedule_flip (tty);
148}
149
150void simcons_poll_ttys (void)
151{
152 if (tty_driver && tty_driver->ttys[0])
153 simcons_poll_tty (tty_driver->ttys[0]);
154}
155
156void simcons_setup (void)
157{
158 V850_SIM_SYSCALL (make_raw, 0);
159 register_console (&simcons);
160 printk (KERN_INFO "Console: GDB V850E simulator stdio\n");
161}
diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c
deleted file mode 100644
index 1a83daf8e24f..000000000000
--- a/arch/v850/kernel/syscalls.c
+++ /dev/null
@@ -1,196 +0,0 @@
1/*
2 * arch/v850/kernel/syscalls.c -- Various system-call definitions not
3 * defined in machine-independent code
4 *
5 * Copyright (C) 2001,02 NEC Corporation
6 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * This file was derived the ppc version, arch/ppc/kernel/syscalls.c
13 * ... which was derived from "arch/i386/kernel/sys_i386.c" by Gary Thomas;
14 * modified by Cort Dougan (cort@cs.nmt.edu)
15 * and Paul Mackerras (paulus@cs.anu.edu.au).
16 */
17
18#include <linux/errno.h>
19#include <linux/mm.h>
20#include <linux/smp.h>
21#include <linux/syscalls.h>
22#include <linux/sem.h>
23#include <linux/msg.h>
24#include <linux/shm.h>
25#include <linux/stat.h>
26#include <linux/mman.h>
27#include <linux/sys.h>
28#include <linux/ipc.h>
29#include <linux/utsname.h>
30#include <linux/file.h>
31
32#include <asm/uaccess.h>
33#include <asm/unistd.h>
34
35/*
36 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
37 *
38 * This is really horribly ugly.
39 */
40int
41sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
42{
43 int version, ret;
44
45 version = call >> 16; /* hack for backward compatibility */
46 call &= 0xffff;
47
48 ret = -EINVAL;
49 switch (call) {
50 case SEMOP:
51 ret = sys_semop (first, (struct sembuf *)ptr, second);
52 break;
53 case SEMGET:
54 ret = sys_semget (first, second, third);
55 break;
56 case SEMCTL:
57 {
58 union semun fourth;
59
60 if (!ptr)
61 break;
62 if ((ret = access_ok(VERIFY_READ, ptr, sizeof(long)) ? 0 : -EFAULT)
63 || (ret = get_user(fourth.__pad, (void **)ptr)))
64 break;
65 ret = sys_semctl (first, second, third, fourth);
66 break;
67 }
68 case MSGSND:
69 ret = sys_msgsnd (first, (struct msgbuf *) ptr, second, third);
70 break;
71 case MSGRCV:
72 switch (version) {
73 case 0: {
74 struct ipc_kludge tmp;
75
76 if (!ptr)
77 break;
78 if ((ret = access_ok(VERIFY_READ, ptr, sizeof(tmp)) ? 0 : -EFAULT)
79 || (ret = copy_from_user(&tmp,
80 (struct ipc_kludge *) ptr,
81 sizeof (tmp))))
82 break;
83 ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp,
84 third);
85 break;
86 }
87 default:
88 ret = sys_msgrcv (first, (struct msgbuf *) ptr,
89 second, fifth, third);
90 break;
91 }
92 break;
93 case MSGGET:
94 ret = sys_msgget ((key_t) first, second);
95 break;
96 case MSGCTL:
97 ret = sys_msgctl (first, second, (struct msqid_ds *) ptr);
98 break;
99 case SHMAT:
100 switch (version) {
101 default: {
102 ulong raddr;
103
104 if ((ret = access_ok(VERIFY_WRITE, (ulong*) third,
105 sizeof(ulong)) ? 0 : -EFAULT))
106 break;
107 ret = do_shmat (first, (char *) ptr, second, &raddr);
108 if (ret)
109 break;
110 ret = put_user (raddr, (ulong *) third);
111 break;
112 }
113 case 1: /* iBCS2 emulator entry point */
114 if (!segment_eq(get_fs(), get_ds()))
115 break;
116 ret = do_shmat (first, (char *) ptr, second,
117 (ulong *) third);
118 break;
119 }
120 break;
121 case SHMDT:
122 ret = sys_shmdt ((char *)ptr);
123 break;
124 case SHMGET:
125 ret = sys_shmget (first, second, third);
126 break;
127 case SHMCTL:
128 ret = sys_shmctl (first, second, (struct shmid_ds *) ptr);
129 break;
130 }
131
132 return ret;
133}
134
135static inline unsigned long
136do_mmap2 (unsigned long addr, size_t len,
137 unsigned long prot, unsigned long flags,
138 unsigned long fd, unsigned long pgoff)
139{
140 struct file * file = NULL;
141 int ret = -EBADF;
142
143 flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
144 if (! (flags & MAP_ANONYMOUS)) {
145 if (!(file = fget (fd)))
146 goto out;
147 }
148
149 down_write (&current->mm->mmap_sem);
150 ret = do_mmap_pgoff (file, addr, len, prot, flags, pgoff);
151 up_write (&current->mm->mmap_sem);
152 if (file)
153 fput (file);
154out:
155 return ret;
156}
157
158unsigned long sys_mmap2 (unsigned long addr, size_t len,
159 unsigned long prot, unsigned long flags,
160 unsigned long fd, unsigned long pgoff)
161{
162 return do_mmap2 (addr, len, prot, flags, fd, pgoff);
163}
164
165unsigned long sys_mmap (unsigned long addr, size_t len,
166 unsigned long prot, unsigned long flags,
167 unsigned long fd, off_t offset)
168{
169 int err = -EINVAL;
170
171 if (offset & ~PAGE_MASK)
172 goto out;
173
174 err = do_mmap2 (addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
175out:
176 return err;
177}
178
179/*
180 * Do a system call from kernel instead of calling sys_execve so we
181 * end up with proper pt_regs.
182 */
183int kernel_execve(const char *filename, char *const argv[], char *const envp[])
184{
185 register char *__a __asm__ ("r6") = filename;
186 register void *__b __asm__ ("r7") = argv;
187 register void *__c __asm__ ("r8") = envp;
188 register unsigned long __syscall __asm__ ("r12") = __NR_execve;
189 register unsigned long __ret __asm__ ("r10");
190 __asm__ __volatile__ ("trap 0"
191 : "=r" (__ret), "=r" (__syscall)
192 : "1" (__syscall), "r" (__a), "r" (__b), "r" (__c)
193 : "r1", "r5", "r11", "r13", "r14",
194 "r15", "r16", "r17", "r18", "r19");
195 return __ret;
196}
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c
deleted file mode 100644
index 699248f92aae..000000000000
--- a/arch/v850/kernel/teg.c
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * arch/v850/kernel/teg.c -- NB85E-TEG cpu chip
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/swap.h>
18#include <linux/bootmem.h>
19#include <linux/irq.h>
20
21#include <asm/atomic.h>
22#include <asm/page.h>
23#include <asm/machdep.h>
24#include <asm/v850e_timer_d.h>
25
26#include "mach.h"
27
28void __init mach_sched_init (struct irqaction *timer_action)
29{
30 /* Select timer interrupt instead of external pin. */
31 TEG_ISS |= 0x1;
32 /* Start hardware timer. */
33 v850e_timer_d_configure (0, HZ);
34 /* Install timer interrupt handler. */
35 setup_irq (IRQ_INTCMD(0), timer_action);
36}
37
38static struct v850e_intc_irq_init irq_inits[] = {
39 { "IRQ", 0, NUM_CPU_IRQS, 1, 7 },
40 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 },
41 { "SER", IRQ_INTSER(0), IRQ_INTSER_NUM, 1, 3 },
42 { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 1, 4 },
43 { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 },
44 { 0 }
45};
46#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
47
48static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
49
50/* Initialize MA chip interrupts. */
51void __init teg_init_irqs (void)
52{
53 v850e_intc_init_irq_types (irq_inits, hw_itypes);
54}
55
56/* Called before configuring an on-chip UART. */
57void teg_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
58{
59 /* Enable UART I/O pins instead of external interrupt pins, and
60 UART interrupts instead of external pin interrupts. */
61 TEG_ISS |= 0x4E;
62}
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c
deleted file mode 100644
index d810c93fe665..000000000000
--- a/arch/v850/kernel/time.c
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * linux/arch/v850/kernel/time.c -- Arch-dependent timer functions
3 *
4 * Copyright (C) 1991, 1992, 1995, 2001, 2002 Linus Torvalds
5 *
6 * This file contains the v850-specific time handling details.
7 * Most of the stuff is located in the machine specific files.
8 *
9 * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
10 * "A Kernel Model for Precision Timekeeping" by Dave Mills
11 */
12
13#include <linux/errno.h>
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/param.h>
17#include <linux/string.h>
18#include <linux/mm.h>
19#include <linux/interrupt.h>
20#include <linux/time.h>
21#include <linux/timex.h>
22#include <linux/profile.h>
23
24#include <asm/io.h>
25
26#include "mach.h"
27
28#define TICK_SIZE (tick_nsec / 1000)
29
30/*
31 * timer_interrupt() needs to keep up the real-time clock,
32 * as well as call the "do_timer()" routine every clocktick
33 */
34static irqreturn_t timer_interrupt (int irq, void *dummy, struct pt_regs *regs)
35{
36#if 0
37 /* last time the cmos clock got updated */
38 static long last_rtc_update=0;
39#endif
40
41 /* may need to kick the hardware timer */
42 if (mach_tick)
43 mach_tick ();
44
45 do_timer (1);
46#ifndef CONFIG_SMP
47 update_process_times(user_mode(regs));
48#endif
49 profile_tick(CPU_PROFILING, regs);
50#if 0
51 /*
52 * If we have an externally synchronized Linux clock, then update
53 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
54 * called as close as possible to 500 ms before the new second starts.
55 */
56 if (ntp_synced() &&
57 xtime.tv_sec > last_rtc_update + 660 &&
58 (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
59 (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
60 if (set_rtc_mmss (xtime.tv_sec) == 0)
61 last_rtc_update = xtime.tv_sec;
62 else
63 last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
64 }
65#ifdef CONFIG_HEARTBEAT
66 /* use power LED as a heartbeat instead -- much more useful
67 for debugging -- based on the version for PReP by Cort */
68 /* acts like an actual heart beat -- ie thump-thump-pause... */
69 if (mach_heartbeat) {
70 static unsigned cnt = 0, period = 0, dist = 0;
71
72 if (cnt == 0 || cnt == dist)
73 mach_heartbeat ( 1 );
74 else if (cnt == 7 || cnt == dist+7)
75 mach_heartbeat ( 0 );
76
77 if (++cnt > period) {
78 cnt = 0;
79 /* The hyperbolic function below modifies the heartbeat period
80 * length in dependency of the current (5min) load. It goes
81 * through the points f(0)=126, f(1)=86, f(5)=51,
82 * f(inf)->30. */
83 period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30;
84 dist = period / 4;
85 }
86 }
87#endif /* CONFIG_HEARTBEAT */
88#endif /* 0 */
89
90 return IRQ_HANDLED;
91}
92
93static int timer_dev_id;
94static struct irqaction timer_irqaction = {
95 .handler = timer_interrupt,
96 .flags = IRQF_DISABLED,
97 .mask = CPU_MASK_NONE,
98 .name = "timer",
99 .dev_id = &timer_dev_id,
100};
101
102void time_init (void)
103{
104 mach_gettimeofday (&xtime);
105 mach_sched_init (&timer_irqaction);
106}
diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c
deleted file mode 100644
index 8d386a5dbc4a..000000000000
--- a/arch/v850/kernel/v850_ksyms.c
+++ /dev/null
@@ -1,51 +0,0 @@
1#include <linux/module.h>
2#include <linux/linkage.h>
3#include <linux/sched.h>
4#include <linux/string.h>
5#include <linux/mm.h>
6#include <linux/user.h>
7#include <linux/elfcore.h>
8#include <linux/in6.h>
9#include <linux/interrupt.h>
10
11#include <asm/pgalloc.h>
12#include <asm/irq.h>
13#include <asm/io.h>
14#include <asm/checksum.h>
15#include <asm/current.h>
16
17
18extern void *trap_table;
19EXPORT_SYMBOL (trap_table);
20
21/* platform dependent support */
22EXPORT_SYMBOL (kernel_thread);
23EXPORT_SYMBOL (__bug);
24
25/* Networking helper routines. */
26EXPORT_SYMBOL (csum_partial_copy_nocheck);
27EXPORT_SYMBOL (csum_partial_copy_from_user);
28EXPORT_SYMBOL (ip_compute_csum);
29EXPORT_SYMBOL (ip_fast_csum);
30
31/* string / mem functions */
32EXPORT_SYMBOL (memset);
33EXPORT_SYMBOL (memcpy);
34EXPORT_SYMBOL (memmove);
35
36/*
37 * libgcc functions - functions that are used internally by the
38 * compiler... (prototypes are not correct though, but that
39 * doesn't really matter since they're not versioned).
40 */
41extern void __ashldi3 (void);
42extern void __ashrdi3 (void);
43extern void __lshrdi3 (void);
44extern void __muldi3 (void);
45extern void __negdi2 (void);
46
47EXPORT_SYMBOL (__ashldi3);
48EXPORT_SYMBOL (__ashrdi3);
49EXPORT_SYMBOL (__lshrdi3);
50EXPORT_SYMBOL (__muldi3);
51EXPORT_SYMBOL (__negdi2);
diff --git a/arch/v850/kernel/v850e2_cache.c b/arch/v850/kernel/v850e2_cache.c
deleted file mode 100644
index 4570312c689c..000000000000
--- a/arch/v850/kernel/v850e2_cache.c
+++ /dev/null
@@ -1,127 +0,0 @@
1/*
2 * arch/v850/kernel/v850e2_cache.c -- Cache control for V850E2 cache
3 * memories
4 *
5 * Copyright (C) 2003 NEC Electronics Corporation
6 * Copyright (C) 2003 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/mm.h>
16
17#include <asm/v850e2_cache.h>
18
19/* Cache operations we can do. The encoding corresponds directly to the
20 value we need to write into the COPR register. */
21enum cache_op {
22 OP_SYNC_IF_DIRTY = V850E2_CACHE_COPR_CFC(0), /* 000 */
23 OP_SYNC_IF_VALID = V850E2_CACHE_COPR_CFC(1), /* 001 */
24 OP_SYNC_IF_VALID_AND_CLEAR = V850E2_CACHE_COPR_CFC(3), /* 011 */
25 OP_WAY_CLEAR = V850E2_CACHE_COPR_CFC(4), /* 100 */
26 OP_FILL = V850E2_CACHE_COPR_CFC(5), /* 101 */
27 OP_CLEAR = V850E2_CACHE_COPR_CFC(6), /* 110 */
28 OP_CREATE_DIRTY = V850E2_CACHE_COPR_CFC(7) /* 111 */
29};
30
31/* Which cache to use. This encoding also corresponds directly to the
32 value we need to write into the COPR register. */
33enum cache {
34 ICACHE = 0,
35 DCACHE = V850E2_CACHE_COPR_LBSL
36};
37
38/* Returns ADDR rounded down to the beginning of its cache-line. */
39#define CACHE_LINE_ADDR(addr) \
40 ((addr) & ~(V850E2_CACHE_LINE_SIZE - 1))
41/* Returns END_ADDR rounded up to the `limit' of its cache-line. */
42#define CACHE_LINE_END_ADDR(end_addr) \
43 CACHE_LINE_ADDR(end_addr + (V850E2_CACHE_LINE_SIZE - 1))
44
45
46/* Low-level cache ops. */
47
48/* Apply cache-op OP to all entries in CACHE. */
49static inline void cache_op_all (enum cache_op op, enum cache cache)
50{
51 int cmd = op | cache | V850E2_CACHE_COPR_WSLE | V850E2_CACHE_COPR_STRT;
52
53 if (op != OP_WAY_CLEAR) {
54 /* The WAY_CLEAR operation does the whole way, but other
55 ops take begin-index and count params; we just indicate
56 the entire cache. */
57 V850E2_CACHE_CADL = 0;
58 V850E2_CACHE_CADH = 0;
59 V850E2_CACHE_CCNT = V850E2_CACHE_WAY_SIZE - 1;
60 }
61
62 V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(0); /* way 0 */
63 V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(1); /* way 1 */
64 V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(2); /* way 2 */
65 V850E2_CACHE_COPR = cmd | V850E2_CACHE_COPR_WSL(3); /* way 3 */
66}
67
68/* Apply cache-op OP to all entries in CACHE covering addresses ADDR
69 through ADDR+LEN. */
70static inline void cache_op_range (enum cache_op op, u32 addr, u32 len,
71 enum cache cache)
72{
73 u32 start = CACHE_LINE_ADDR (addr);
74 u32 end = CACHE_LINE_END_ADDR (addr + len);
75 u32 num_lines = (end - start) >> V850E2_CACHE_LINE_SIZE_BITS;
76
77 V850E2_CACHE_CADL = start & 0xFFFF;
78 V850E2_CACHE_CADH = start >> 16;
79 V850E2_CACHE_CCNT = num_lines - 1;
80
81 V850E2_CACHE_COPR = op | cache | V850E2_CACHE_COPR_STRT;
82}
83
84
85/* High-level ops. */
86
87static void cache_exec_after_store_all (void)
88{
89 cache_op_all (OP_SYNC_IF_DIRTY, DCACHE);
90 cache_op_all (OP_WAY_CLEAR, ICACHE);
91}
92
93static void cache_exec_after_store_range (u32 start, u32 len)
94{
95 cache_op_range (OP_SYNC_IF_DIRTY, start, len, DCACHE);
96 cache_op_range (OP_CLEAR, start, len, ICACHE);
97}
98
99
100/* Exported functions. */
101
102void flush_icache (void)
103{
104 cache_exec_after_store_all ();
105}
106
107void flush_icache_range (unsigned long start, unsigned long end)
108{
109 cache_exec_after_store_range (start, end - start);
110}
111
112void flush_icache_page (struct vm_area_struct *vma, struct page *page)
113{
114 cache_exec_after_store_range (page_to_virt (page), PAGE_SIZE);
115}
116
117void flush_icache_user_range (struct vm_area_struct *vma, struct page *page,
118 unsigned long addr, int len)
119{
120 cache_exec_after_store_range (addr, len);
121}
122
123void flush_cache_sigtramp (unsigned long addr)
124{
125 /* For the exact size, see signal.c, but 16 bytes should be enough. */
126 cache_exec_after_store_range (addr, 16);
127}
diff --git a/arch/v850/kernel/v850e_cache.c b/arch/v850/kernel/v850e_cache.c
deleted file mode 100644
index ea3e51cfb259..000000000000
--- a/arch/v850/kernel/v850e_cache.c
+++ /dev/null
@@ -1,174 +0,0 @@
1/*
2 * arch/v850/kernel/v850e_cache.c -- Cache control for V850E cache memories
3 *
4 * Copyright (C) 2003 NEC Electronics Corporation
5 * Copyright (C) 2003 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14/* This file implements cache control for the rather simple cache used on
15 some V850E CPUs, specifically the NB85E/TEG CPU-core and the V850E/ME2
16 CPU. V850E2 processors have their own (better) cache
17 implementation. */
18
19#include <asm/entry.h>
20#include <asm/cacheflush.h>
21#include <asm/v850e_cache.h>
22
23#define WAIT_UNTIL_CLEAR(value) while (value) {}
24
25/* Set caching params via the BHC and DCC registers. */
26void v850e_cache_enable (u16 bhc, u16 icc, u16 dcc)
27{
28 unsigned long *r0_ram = (unsigned long *)R0_RAM_ADDR;
29 register u16 bhc_val asm ("r6") = bhc;
30
31 /* Read the instruction cache control register (ICC) and confirm
32 that bits 0 and 1 (TCLR0, TCLR1) are all cleared. */
33 WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3);
34 V850E_CACHE_ICC = icc;
35
36#ifdef V850E_CACHE_DCC
37 /* Configure data-cache. */
38 V850E_CACHE_DCC = dcc;
39#endif /* V850E_CACHE_DCC */
40
41 /* Configure caching for various memory regions by writing the BHC
42 register. The documentation says that an instruction _cannot_
43 enable/disable caching for the memory region in which the
44 instruction itself exists; to work around this, we store
45 appropriate instructions into the on-chip RAM area (which is never
46 cached), and briefly jump there to do the work. */
47#ifdef V850E_CACHE_WRITE_IBS
48 *r0_ram++ = 0xf0720760; /* st.h r0, 0xfffff072[r0] */
49#endif
50 *r0_ram++ = 0xf06a3760; /* st.h r6, 0xfffff06a[r0] */
51 *r0_ram = 0x5640006b; /* jmp [r11] */
52
53 asm ("mov hilo(1f), r11; jmp [%1]; 1:;"
54 :: "r" (bhc_val), "r" (R0_RAM_ADDR) : "r11");
55}
56
57static void clear_icache (void)
58{
59 /* 1. Read the instruction cache control register (ICC) and confirm
60 that bits 0 and 1 (TCLR0, TCLR1) are all cleared. */
61 WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3);
62
63 /* 2. Read the ICC register and confirm that bit 12 (LOCK0) is
64 cleared. Bit 13 of the ICC register is always cleared. */
65 WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x1000);
66
67 /* 3. Set the TCLR0 and TCLR1 bits of the ICC register as follows,
68 when clearing way 0 and way 1 at the same time:
69 (a) Set the TCLR0 and TCLR1 bits.
70 (b) Read the TCLR0 and TCLR1 bits to confirm that these bits
71 are cleared.
72 (c) Perform (a) and (b) above again. */
73 V850E_CACHE_ICC |= 0x3;
74 WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3);
75
76#ifdef V850E_CACHE_REPEAT_ICC_WRITE
77 /* Do it again. */
78 V850E_CACHE_ICC |= 0x3;
79 WAIT_UNTIL_CLEAR (V850E_CACHE_ICC & 0x3);
80#endif
81}
82
83#ifdef V850E_CACHE_DCC
84/* Flush or clear (or both) the data cache, depending on the value of FLAGS;
85 the procedure is the same for both, just the control bits used differ (and
86 both may be performed simultaneously). */
87static void dcache_op (unsigned short flags)
88{
89 /* 1. Read the data cache control register (DCC) and confirm that bits
90 0, 1, 4, and 5 (DC00, DC01, DC04, DC05) are all cleared. */
91 WAIT_UNTIL_CLEAR (V850E_CACHE_DCC & 0x33);
92
93 /* 2. Clear DCC register bit 12 (DC12), bit 13 (DC13), or both
94 depending on the way for which tags are to be cleared. */
95 V850E_CACHE_DCC &= ~0xC000;
96
97 /* 3. Set DCC register bit 0 (DC00), bit 1 (DC01) or both depending on
98 the way for which tags are to be cleared.
99 ...
100 Set DCC register bit 4 (DC04), bit 5 (DC05), or both depending
101 on the way to be data flushed. */
102 V850E_CACHE_DCC |= flags;
103
104 /* 4. Read DCC register bit DC00, DC01 [DC04, DC05], or both depending
105 on the way for which tags were cleared [flushed] and confirm
106 that that bit is cleared. */
107 WAIT_UNTIL_CLEAR (V850E_CACHE_DCC & flags);
108}
109#endif /* V850E_CACHE_DCC */
110
111/* Flushes the contents of the dcache to memory. */
112static inline void flush_dcache (void)
113{
114#ifdef V850E_CACHE_DCC
115 /* We only need to do something if in write-back mode. */
116 if (V850E_CACHE_DCC & 0x0400)
117 dcache_op (0x30);
118#endif /* V850E_CACHE_DCC */
119}
120
121/* Flushes the contents of the dcache to memory, and then clears it. */
122static inline void clear_dcache (void)
123{
124#ifdef V850E_CACHE_DCC
125 /* We only need to do something if the dcache is enabled. */
126 if (V850E_CACHE_DCC & 0x0C00)
127 dcache_op (0x33);
128#endif /* V850E_CACHE_DCC */
129}
130
131/* Clears the dcache without flushing to memory first. */
132static inline void clear_dcache_no_flush (void)
133{
134#ifdef V850E_CACHE_DCC
135 /* We only need to do something if the dcache is enabled. */
136 if (V850E_CACHE_DCC & 0x0C00)
137 dcache_op (0x3);
138#endif /* V850E_CACHE_DCC */
139}
140
141static inline void cache_exec_after_store (void)
142{
143 flush_dcache ();
144 clear_icache ();
145}
146
147
148/* Exported functions. */
149
150void flush_icache (void)
151{
152 cache_exec_after_store ();
153}
154
155void flush_icache_range (unsigned long start, unsigned long end)
156{
157 cache_exec_after_store ();
158}
159
160void flush_icache_page (struct vm_area_struct *vma, struct page *page)
161{
162 cache_exec_after_store ();
163}
164
165void flush_icache_user_range (struct vm_area_struct *vma, struct page *page,
166 unsigned long adr, int len)
167{
168 cache_exec_after_store ();
169}
170
171void flush_cache_sigtramp (unsigned long addr)
172{
173 cache_exec_after_store ();
174}
diff --git a/arch/v850/kernel/v850e_intc.c b/arch/v850/kernel/v850e_intc.c
deleted file mode 100644
index 8d39a52ee6d1..000000000000
--- a/arch/v850/kernel/v850e_intc.c
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * arch/v850/kernel/v850e_intc.c -- V850E interrupt controller (INTC)
3 *
4 * Copyright (C) 2001,02,03 NEC Electronics Corporation
5 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/irq.h>
17
18#include <asm/v850e_intc.h>
19
20static void irq_nop (unsigned irq) { }
21
22static unsigned v850e_intc_irq_startup (unsigned irq)
23{
24 v850e_intc_clear_pending_irq (irq);
25 v850e_intc_enable_irq (irq);
26 return 0;
27}
28
29static void v850e_intc_end_irq (unsigned irq)
30{
31 unsigned long psw, temp;
32
33 /* Clear the highest-level bit in the In-service priority register
34 (ISPR), to allow this interrupt (or another of the same or
35 lesser priority) to happen again.
36
37 The `reti' instruction normally does this automatically when the
38 PSW bits EP and NP are zero, but we can't always rely on reti
39 being used consistently to return after an interrupt (another
40 process can be scheduled, for instance, which can delay the
41 associated reti for a long time, or this process may be being
42 single-stepped, which uses the `dbret' instruction to return
43 from the kernel).
44
45 We also set the PSW EP bit, which prevents reti from also
46 trying to modify the ISPR itself. */
47
48 /* Get PSW and disable interrupts. */
49 asm volatile ("stsr psw, %0; di" : "=r" (psw));
50 /* We don't want to do anything for NMIs (they don't use the ISPR). */
51 if (! (psw & 0xC0)) {
52 /* Transition to `trap' state, so that an eventual real
53 reti instruction won't modify the ISPR. */
54 psw |= 0x40;
55 /* Fake an interrupt return, which automatically clears the
56 appropriate bit in the ISPR. */
57 asm volatile ("mov hilo(1f), %0;"
58 "ldsr %0, eipc; ldsr %1, eipsw;"
59 "reti;"
60 "1:"
61 : "=&r" (temp) : "r" (psw));
62 }
63}
64
65/* Initialize HW_IRQ_TYPES for INTC-controlled irqs described in array
66 INITS (which is terminated by an entry with the name field == 0). */
67void __init v850e_intc_init_irq_types (struct v850e_intc_irq_init *inits,
68 struct hw_interrupt_type *hw_irq_types)
69{
70 struct v850e_intc_irq_init *init;
71 for (init = inits; init->name; init++) {
72 unsigned i;
73 struct hw_interrupt_type *hwit = hw_irq_types++;
74
75 hwit->typename = init->name;
76
77 hwit->startup = v850e_intc_irq_startup;
78 hwit->shutdown = v850e_intc_disable_irq;
79 hwit->enable = v850e_intc_enable_irq;
80 hwit->disable = v850e_intc_disable_irq;
81 hwit->ack = irq_nop;
82 hwit->end = v850e_intc_end_irq;
83
84 /* Initialize kernel IRQ infrastructure for this interrupt. */
85 init_irq_handlers(init->base, init->num, init->interval, hwit);
86
87 /* Set the interrupt priorities. */
88 for (i = 0; i < init->num; i++) {
89 unsigned irq = init->base + i * init->interval;
90
91 /* If the interrupt is currently enabled (all
92 interrupts are initially disabled), then
93 assume whoever enabled it has set things up
94 properly, and avoid messing with it. */
95 if (! v850e_intc_irq_enabled (irq))
96 /* This write also (1) disables the
97 interrupt, and (2) clears any pending
98 interrupts. */
99 V850E_INTC_IC (irq)
100 = (V850E_INTC_IC_PR (init->priority)
101 | V850E_INTC_IC_MK);
102 }
103 }
104}
diff --git a/arch/v850/kernel/v850e_timer_d.c b/arch/v850/kernel/v850e_timer_d.c
deleted file mode 100644
index d2a4ece2574c..000000000000
--- a/arch/v850/kernel/v850e_timer_d.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * include/asm-v850/v850e_timer_d.c -- `Timer D' component often used
3 * with V850E CPUs
4 *
5 * Copyright (C) 2001,02,03 NEC Electronics Corporation
6 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <linux/kernel.h>
16
17#include <asm/v850e_utils.h>
18#include <asm/v850e_timer_d.h>
19
20/* Start interval timer TIMER (0-3). The timer will issue the
21 corresponding INTCMD interrupt RATE times per second.
22 This function does not enable the interrupt. */
23void v850e_timer_d_configure (unsigned timer, unsigned rate)
24{
25 unsigned divlog2, count;
26
27 /* Calculate params for timer. */
28 if (! calc_counter_params (
29 V850E_TIMER_D_BASE_FREQ, rate,
30 V850E_TIMER_D_TMCD_CS_MIN, V850E_TIMER_D_TMCD_CS_MAX, 16,
31 &divlog2, &count))
32 printk (KERN_WARNING
33 "Cannot find interval timer %d setting suitable"
34 " for rate of %dHz.\n"
35 "Using rate of %dHz instead.\n",
36 timer, rate,
37 (V850E_TIMER_D_BASE_FREQ >> divlog2) >> 16);
38
39 /* Do the actual hardware timer initialization: */
40
41 /* Enable timer. */
42 V850E_TIMER_D_TMCD(timer) = V850E_TIMER_D_TMCD_CAE;
43 /* Set clock divider. */
44 V850E_TIMER_D_TMCD(timer)
45 = V850E_TIMER_D_TMCD_CAE
46 | V850E_TIMER_D_TMCD_CS(divlog2);
47 /* Set timer compare register. */
48 V850E_TIMER_D_CMD(timer) = count;
49 /* Start counting. */
50 V850E_TIMER_D_TMCD(timer)
51 = V850E_TIMER_D_TMCD_CAE
52 | V850E_TIMER_D_TMCD_CS(divlog2)
53 | V850E_TIMER_D_TMCD_CE;
54}
diff --git a/arch/v850/kernel/v850e_utils.c b/arch/v850/kernel/v850e_utils.c
deleted file mode 100644
index e6807ef8dee6..000000000000
--- a/arch/v850/kernel/v850e_utils.c
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * include/asm-v850/v850e_utils.h -- Utility functions associated with
3 * V850E CPUs
4 *
5 * Copyright (C) 2001,02,03 NEC Electronics Corporation
6 * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 *
12 * Written by Miles Bader <miles@gnu.org>
13 */
14
15#include <asm/v850e_utils.h>
16
17/* Calculate counter clock-divider and count values to attain the
18 desired frequency RATE from the base frequency BASE_FREQ. The
19 counter is expected to have a clock-divider, which can divide the
20 system cpu clock by a power of two value from MIN_DIVLOG2 to
21 MAX_DIV_LOG2, and a word-size of COUNTER_SIZE bits (the counter
22 counts up and resets whenever it's equal to the compare register,
23 generating an interrupt or whatever when it does so). The returned
24 values are: *DIVLOG2 -- log2 of the desired clock divider and *COUNT
25 -- the counter compare value to use. Returns true if it was possible
26 to find a reasonable value, otherwise false (and the other return
27 values will be set to be as good as possible). */
28int calc_counter_params (unsigned long base_freq,
29 unsigned long rate,
30 unsigned min_divlog2, unsigned max_divlog2,
31 unsigned counter_size,
32 unsigned *divlog2, unsigned *count)
33{
34 unsigned _divlog2;
35 int ok = 0;
36
37 /* Find the lowest clock divider setting that can represent RATE. */
38 for (_divlog2 = min_divlog2; _divlog2 <= max_divlog2; _divlog2++) {
39 /* Minimum interrupt rate possible using this divider. */
40 unsigned min_int_rate
41 = (base_freq >> _divlog2) >> counter_size;
42
43 if (min_int_rate <= rate) {
44 /* This setting is the highest resolution
45 setting that's slow enough enough to attain
46 RATE interrupts per second, so use it. */
47 ok = 1;
48 break;
49 }
50 }
51
52 if (_divlog2 > max_divlog2)
53 /* Can't find correct setting. */
54 _divlog2 = max_divlog2;
55
56 if (divlog2)
57 *divlog2 = _divlog2;
58 if (count)
59 *count = ((base_freq >> _divlog2) + rate/2) / rate;
60
61 return ok;
62}
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S
deleted file mode 100644
index d08cd1d27f27..000000000000
--- a/arch/v850/kernel/vmlinux.lds.S
+++ /dev/null
@@ -1,306 +0,0 @@
1/*
2 * arch/v850/vmlinux.lds.S -- kernel linker script for v850 platforms
3 *
4 * Copyright (C) 2002,03,04,05 NEC Electronics Corporation
5 * Copyright (C) 2002,03,04,05 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14
15#define VMLINUX_SYMBOL(_sym_) _##_sym_
16#include <asm-generic/vmlinux.lds.h>
17
18/* For most platforms, this will define useful things like RAM addr/size. */
19#include <asm/machdep.h>
20
21
22/* The following macros contain the usual definitions for various data areas.
23 The prefix `RAMK_' is used to indicate macros suitable for kernels loaded
24 into RAM, and similarly `ROMK_' for ROM-resident kernels. Note that all
25 symbols are prefixed with an extra `_' for compatibility with the v850
26 toolchain. */
27
28
29/* Interrupt vectors. */
30#define INTV_CONTENTS \
31 . = ALIGN (0x10) ; \
32 __intv_start = . ; \
33 *(.intv.reset) /* Reset vector */ \
34 . = __intv_start + 0x10 ; \
35 *(.intv.common) /* Vectors common to all v850e proc */\
36 . = __intv_start + 0x80 ; \
37 *(.intv.mach) /* Machine-specific int. vectors. */ \
38 __intv_end = . ;
39
40#define RODATA_CONTENTS \
41 . = ALIGN (16) ; \
42 *(.rodata) *(.rodata.*) \
43 *(__vermagic) /* Kernel version magic */ \
44 *(.rodata1) \
45 /* PCI quirks */ \
46 ___start_pci_fixups_early = . ; \
47 *(.pci_fixup_early) \
48 ___end_pci_fixups_early = . ; \
49 ___start_pci_fixups_header = . ; \
50 *(.pci_fixup_header) \
51 ___end_pci_fixups_header = . ; \
52 ___start_pci_fixups_final = . ; \
53 *(.pci_fixup_final) \
54 ___end_pci_fixups_final = . ; \
55 ___start_pci_fixups_enable = . ; \
56 *(.pci_fixup_enable) \
57 ___end_pci_fixups_enable = . ; \
58 /* Kernel symbol table: Normal symbols */ \
59 ___start___ksymtab = .; \
60 *(__ksymtab) \
61 ___stop___ksymtab = .; \
62 /* Kernel symbol table: GPL-only symbols */ \
63 ___start___ksymtab_gpl = .; \
64 *(__ksymtab_gpl) \
65 ___stop___ksymtab_gpl = .; \
66 /* Kernel symbol table: GPL-future symbols */ \
67 ___start___ksymtab_gpl_future = .; \
68 *(__ksymtab_gpl_future) \
69 ___stop___ksymtab_gpl_future = .; \
70 /* Kernel symbol table: strings */ \
71 *(__ksymtab_strings) \
72 /* Kernel symbol table: Normal symbols */ \
73 ___start___kcrctab = .; \
74 *(__kcrctab) \
75 ___stop___kcrctab = .; \
76 /* Kernel symbol table: GPL-only symbols */ \
77 ___start___kcrctab_gpl = .; \
78 *(__kcrctab_gpl) \
79 ___stop___kcrctab_gpl = .; \
80 /* Kernel symbol table: GPL-future symbols */ \
81 ___start___kcrctab_gpl_future = .; \
82 *(__kcrctab_gpl_future) \
83 ___stop___kcrctab_gpl_future = .; \
84 /* Built-in module parameters */ \
85 . = ALIGN (4) ; \
86 ___start___param = .; \
87 *(__param) \
88 ___stop___param = .;
89
90
91/* Kernel text segment, and some constant data areas. */
92#define TEXT_CONTENTS \
93 _text = .; \
94 __stext = . ; \
95 TEXT_TEXT \
96 SCHED_TEXT \
97 *(.exit.text) /* 2.5 convention */ \
98 *(.text.exit) /* 2.4 convention */ \
99 *(.text.lock) \
100 *(.exitcall.exit) \
101 __real_etext = . ; /* There may be data after here. */ \
102 RODATA_CONTENTS \
103 . = ALIGN (4) ; \
104 *(.call_table_data) \
105 *(.call_table_text) \
106 . = ALIGN (16) ; /* Exception table. */ \
107 ___start___ex_table = . ; \
108 *(__ex_table) \
109 ___stop___ex_table = . ; \
110 . = ALIGN (4) ; \
111 __etext = . ;
112
113/* Kernel data segment. */
114#define DATA_CONTENTS \
115 __sdata = . ; \
116 DATA_DATA \
117 EXIT_DATA /* 2.5 convention */ \
118 *(.data.exit) /* 2.4 convention */ \
119 . = ALIGN (16) ; \
120 *(.data.cacheline_aligned) \
121 . = ALIGN (0x2000) ; \
122 *(.data.init_task) \
123 . = ALIGN (0x2000) ; \
124 __edata = . ;
125
126/* Kernel BSS segment. */
127#define BSS_CONTENTS \
128 __sbss = . ; \
129 *(.bss) \
130 *(COMMON) \
131 . = ALIGN (4) ; \
132 __init_stack_end = . ; \
133 __ebss = . ;
134
135/* `initcall' tables. */
136#define INITCALL_CONTENTS \
137 . = ALIGN (16) ; \
138 ___setup_start = . ; \
139 *(.init.setup) /* 2.5 convention */ \
140 *(.setup.init) /* 2.4 convention */ \
141 ___setup_end = . ; \
142 ___initcall_start = . ; \
143 *(.initcall.init) \
144 INITCALLS \
145 . = ALIGN (4) ; \
146 ___initcall_end = . ; \
147 ___con_initcall_start = .; \
148 *(.con_initcall.init) \
149 ___con_initcall_end = .;
150
151/* Contents of `init' section for a kernel that's loaded into RAM. */
152#define RAMK_INIT_CONTENTS \
153 RAMK_INIT_CONTENTS_NO_END \
154 __init_end = . ;
155/* Same as RAMK_INIT_CONTENTS, but doesn't define the `__init_end' symbol. */
156#define RAMK_INIT_CONTENTS_NO_END \
157 . = ALIGN (4096) ; \
158 __init_start = . ; \
159 __sinittext = .; \
160 INIT_TEXT /* 2.5 convention */ \
161 __einittext = .; \
162 INIT_DATA \
163 *(.text.init) /* 2.4 convention */ \
164 *(.data.init) \
165 INITCALL_CONTENTS \
166 INITRAMFS_CONTENTS
167
168/* The contents of `init' section for a ROM-resident kernel which
169 should go into RAM. */
170#define ROMK_INIT_RAM_CONTENTS \
171 . = ALIGN (4096) ; \
172 __init_start = . ; \
173 INIT_DATA /* 2.5 convention */ \
174 *(.data.init) /* 2.4 convention */ \
175 __init_end = . ; \
176 . = ALIGN (4096) ;
177
178/* The contents of `init' section for a ROM-resident kernel which
179 should go into ROM. */
180#define ROMK_INIT_ROM_CONTENTS \
181 _sinittext = .; \
182 INIT_TEXT /* 2.5 convention */ \
183 _einittext = .; \
184 *(.text.init) /* 2.4 convention */ \
185 INITCALL_CONTENTS \
186 INITRAMFS_CONTENTS
187
188/* A root filesystem image, for kernels with an embedded root filesystem. */
189#define ROOT_FS_CONTENTS \
190 __root_fs_image_start = . ; \
191 *(.root) \
192 __root_fs_image_end = . ;
193
194#ifdef CONFIG_BLK_DEV_INITRD
195/* The initramfs archive. */
196#define INITRAMFS_CONTENTS \
197 . = ALIGN (4) ; \
198 ___initramfs_start = . ; \
199 *(.init.ramfs) \
200 ___initramfs_end = . ;
201#endif
202
203/* Where the initial bootmap (bitmap for the boot-time memory allocator)
204 should be place. */
205#define BOOTMAP_CONTENTS \
206 . = ALIGN (4096) ; \
207 __bootmap = . ; \
208 . = . + 4096 ; /* enough for 128MB. */
209
210/* The contents of a `typical' kram area for a kernel in RAM. */
211#define RAMK_KRAM_CONTENTS \
212 __kram_start = . ; \
213 TEXT_CONTENTS \
214 DATA_CONTENTS \
215 BSS_CONTENTS \
216 RAMK_INIT_CONTENTS \
217 __kram_end = . ; \
218 BOOTMAP_CONTENTS
219
220
221/* Define output sections normally used for a ROM-resident kernel.
222 ROM and RAM should be appropriate memory areas to use for kernel
223 ROM and RAM data. This assumes that ROM starts at 0 (and thus can
224 hold the interrupt vectors). */
225#define ROMK_SECTIONS(ROM, RAM) \
226 .rom : { \
227 INTV_CONTENTS \
228 TEXT_CONTENTS \
229 ROMK_INIT_ROM_CONTENTS \
230 ROOT_FS_CONTENTS \
231 } > ROM \
232 \
233 __rom_copy_src_start = . ; \
234 \
235 .data : { \
236 __kram_start = . ; \
237 __rom_copy_dst_start = . ; \
238 DATA_CONTENTS \
239 ROMK_INIT_RAM_CONTENTS \
240 __rom_copy_dst_end = . ; \
241 } > RAM AT> ROM \
242 \
243 .bss ALIGN (4) : { \
244 BSS_CONTENTS \
245 __kram_end = . ; \
246 BOOTMAP_CONTENTS \
247 } > RAM
248
249
250/* The 32-bit variable `jiffies' is just the lower 32-bits of `jiffies_64'. */
251_jiffies = _jiffies_64 ;
252
253
254/* Include an appropriate platform-dependent linker-script (which
255 usually should use the above macros to do most of the work). */
256
257#ifdef CONFIG_V850E_SIM
258# include "sim.ld"
259#endif
260
261#ifdef CONFIG_V850E2_SIM85E2
262# include "sim85e2.ld"
263#endif
264
265#ifdef CONFIG_V850E2_FPGA85E2C
266# include "fpga85e2c.ld"
267#endif
268
269#ifdef CONFIG_V850E2_ANNA
270# ifdef CONFIG_ROM_KERNEL
271# include "anna-rom.ld"
272# else
273# include "anna.ld"
274# endif
275#endif
276
277#ifdef CONFIG_V850E_AS85EP1
278# ifdef CONFIG_ROM_KERNEL
279# include "as85ep1-rom.ld"
280# else
281# include "as85ep1.ld"
282# endif
283#endif
284
285#ifdef CONFIG_RTE_CB_MA1
286# ifdef CONFIG_ROM_KERNEL
287# include "rte_ma1_cb-rom.ld"
288# else
289# include "rte_ma1_cb.ld"
290# endif
291#endif
292
293#ifdef CONFIG_RTE_CB_NB85E
294# ifdef CONFIG_ROM_KERNEL
295# include "rte_nb85e_cb-rom.ld"
296# elif defined(CONFIG_RTE_CB_MULTI)
297# include "rte_nb85e_cb-multi.ld"
298# else
299# include "rte_nb85e_cb.ld"
300# endif
301#endif
302
303#ifdef CONFIG_RTE_CB_ME2
304# include "rte_me2_cb.ld"
305#endif
306
diff --git a/arch/v850/lib/Makefile b/arch/v850/lib/Makefile
deleted file mode 100644
index 1c78b728a117..000000000000
--- a/arch/v850/lib/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# arch/v850/lib/Makefile
3#
4
5lib-y = ashrdi3.o ashldi3.o lshrdi3.o muldi3.o negdi2.o \
6 checksum.o memcpy.o memset.o
diff --git a/arch/v850/lib/ashldi3.c b/arch/v850/lib/ashldi3.c
deleted file mode 100644
index 9e792d53f0e4..000000000000
--- a/arch/v850/lib/ashldi3.c
+++ /dev/null
@@ -1,62 +0,0 @@
1/* ashldi3.c extracted from gcc-2.95.2/libgcc2.c which is: */
2/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21#define BITS_PER_UNIT 8
22
23typedef int SItype __attribute__ ((mode (SI)));
24typedef unsigned int USItype __attribute__ ((mode (SI)));
25typedef int DItype __attribute__ ((mode (DI)));
26typedef int word_type __attribute__ ((mode (__word__)));
27
28struct DIstruct {SItype high, low;};
29
30typedef union
31{
32 struct DIstruct s;
33 DItype ll;
34} DIunion;
35
36DItype
37__ashldi3 (DItype u, word_type b)
38{
39 DIunion w;
40 word_type bm;
41 DIunion uu;
42
43 if (b == 0)
44 return u;
45
46 uu.ll = u;
47
48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
49 if (bm <= 0)
50 {
51 w.s.low = 0;
52 w.s.high = (USItype)uu.s.low << -bm;
53 }
54 else
55 {
56 USItype carries = (USItype)uu.s.low >> bm;
57 w.s.low = (USItype)uu.s.low << b;
58 w.s.high = ((USItype)uu.s.high << b) | carries;
59 }
60
61 return w.ll;
62}
diff --git a/arch/v850/lib/ashrdi3.c b/arch/v850/lib/ashrdi3.c
deleted file mode 100644
index 78efb65e315a..000000000000
--- a/arch/v850/lib/ashrdi3.c
+++ /dev/null
@@ -1,63 +0,0 @@
1/* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
2/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21#define BITS_PER_UNIT 8
22
23typedef int SItype __attribute__ ((mode (SI)));
24typedef unsigned int USItype __attribute__ ((mode (SI)));
25typedef int DItype __attribute__ ((mode (DI)));
26typedef int word_type __attribute__ ((mode (__word__)));
27
28struct DIstruct {SItype high, low;};
29
30typedef union
31{
32 struct DIstruct s;
33 DItype ll;
34} DIunion;
35
36DItype
37__ashrdi3 (DItype u, word_type b)
38{
39 DIunion w;
40 word_type bm;
41 DIunion uu;
42
43 if (b == 0)
44 return u;
45
46 uu.ll = u;
47
48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
49 if (bm <= 0)
50 {
51 /* w.s.high = 1..1 or 0..0 */
52 w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1);
53 w.s.low = uu.s.high >> -bm;
54 }
55 else
56 {
57 USItype carries = (USItype)uu.s.high << bm;
58 w.s.high = uu.s.high >> b;
59 w.s.low = ((USItype)uu.s.low >> b) | carries;
60 }
61
62 return w.ll;
63}
diff --git a/arch/v850/lib/checksum.c b/arch/v850/lib/checksum.c
deleted file mode 100644
index 042158dfe17a..000000000000
--- a/arch/v850/lib/checksum.c
+++ /dev/null
@@ -1,155 +0,0 @@
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * MIPS specific IP/TCP/UDP checksumming routines
7 *
8 * Authors: Ralf Baechle, <ralf@waldorf-gmbh.de>
9 * Lots of code moved from tcp.c and ip.c; see those files
10 * for more names.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version.
16 *
17 * $Id: checksum.c,v 1.1 2002/09/28 14:58:40 gerg Exp $
18 */
19#include <net/checksum.h>
20#include <linux/module.h>
21#include <linux/types.h>
22#include <asm/byteorder.h>
23#include <asm/string.h>
24#include <asm/uaccess.h>
25
26static inline unsigned short from32to16 (unsigned long sum)
27{
28 unsigned int result;
29 /*
30 %0 %1
31 hsw %1, %0 H L L H
32 add %1, %0 H L H+L+C H+L
33 */
34 asm ("hsw %1, %0; add %1, %0" : "=&r" (result) : "r" (sum));
35 return result >> 16;
36}
37
38static inline unsigned int do_csum(const unsigned char * buff, int len)
39{
40 int odd, count;
41 unsigned int result = 0;
42
43 if (len <= 0)
44 goto out;
45 odd = 1 & (unsigned long) buff;
46 if (odd) {
47 result = be16_to_cpu(*buff);
48 len--;
49 buff++;
50 }
51 count = len >> 1; /* nr of 16-bit words.. */
52 if (count) {
53 if (2 & (unsigned long) buff) {
54 result += *(unsigned short *) buff;
55 count--;
56 len -= 2;
57 buff += 2;
58 }
59 count >>= 1; /* nr of 32-bit words.. */
60 if (count) {
61 unsigned int carry = 0;
62 do {
63 unsigned int w = *(unsigned int *) buff;
64 count--;
65 buff += 4;
66 result += carry;
67 result += w;
68 carry = (w > result);
69 } while (count);
70 result += carry;
71 result = (result & 0xffff) + (result >> 16);
72 }
73 if (len & 2) {
74 result += *(unsigned short *) buff;
75 buff += 2;
76 }
77 }
78 if (len & 1)
79 result += le16_to_cpu(*buff);
80 result = from32to16(result);
81 if (odd)
82 result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
83out:
84 return result;
85}
86
87/*
88 * This is a version of ip_compute_csum() optimized for IP headers,
89 * which always checksum on 4 octet boundaries.
90 */
91__sum16 ip_fast_csum(const void *iph, unsigned int ihl)
92{
93 return (__force __sum16)~do_csum(iph,ihl*4);
94}
95
96/*
97 * this routine is used for miscellaneous IP-like checksums, mainly
98 * in icmp.c
99 */
100__sum16 ip_compute_csum(const void *buff, int len)
101{
102 return (__force __sum16)~do_csum(buff,len);
103}
104
105/*
106 * computes a partial checksum, e.g. for TCP/UDP fragments
107 */
108__wsum csum_partial(const void *buff, int len, __wsum sum)
109{
110 unsigned int result = do_csum(buff, len);
111
112 /* add in old sum, and carry.. */
113 result += (__force u32)sum;
114 if ((__force u32)sum > result)
115 result += 1;
116 return (__force __wsum)result;
117}
118
119EXPORT_SYMBOL(csum_partial);
120
121/*
122 * copy while checksumming, otherwise like csum_partial
123 */
124__wsum csum_partial_copy_nocheck(const void *src, void *dst,
125 int len, __wsum sum)
126{
127 /*
128 * It's 2:30 am and I don't feel like doing it real ...
129 * This is lots slower than the real thing (tm)
130 */
131 sum = csum_partial(src, len, sum);
132 memcpy(dst, src, len);
133
134 return sum;
135}
136
137/*
138 * Copy from userspace and compute checksum. If we catch an exception
139 * then zero the rest of the buffer.
140 */
141__wsum csum_partial_copy_from_user (const void *src,
142 void *dst,
143 int len, __wsum sum,
144 int *err_ptr)
145{
146 int missing;
147
148 missing = copy_from_user(dst, src, len);
149 if (missing) {
150 memset(dst + len - missing, 0, missing);
151 *err_ptr = -EFAULT;
152 }
153
154 return csum_partial(dst, len, sum);
155}
diff --git a/arch/v850/lib/lshrdi3.c b/arch/v850/lib/lshrdi3.c
deleted file mode 100644
index 93b1cb6fdee8..000000000000
--- a/arch/v850/lib/lshrdi3.c
+++ /dev/null
@@ -1,62 +0,0 @@
1/* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
2/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21#define BITS_PER_UNIT 8
22
23typedef int SItype __attribute__ ((mode (SI)));
24typedef unsigned int USItype __attribute__ ((mode (SI)));
25typedef int DItype __attribute__ ((mode (DI)));
26typedef int word_type __attribute__ ((mode (__word__)));
27
28struct DIstruct {SItype high, low;};
29
30typedef union
31{
32 struct DIstruct s;
33 DItype ll;
34} DIunion;
35
36DItype
37__lshrdi3 (DItype u, word_type b)
38{
39 DIunion w;
40 word_type bm;
41 DIunion uu;
42
43 if (b == 0)
44 return u;
45
46 uu.ll = u;
47
48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b;
49 if (bm <= 0)
50 {
51 w.s.high = 0;
52 w.s.low = (USItype)uu.s.high >> -bm;
53 }
54 else
55 {
56 USItype carries = (USItype)uu.s.high << bm;
57 w.s.high = (USItype)uu.s.high >> b;
58 w.s.low = ((USItype)uu.s.low >> b) | carries;
59 }
60
61 return w.ll;
62}
diff --git a/arch/v850/lib/memcpy.c b/arch/v850/lib/memcpy.c
deleted file mode 100644
index 492847b3e612..000000000000
--- a/arch/v850/lib/memcpy.c
+++ /dev/null
@@ -1,92 +0,0 @@
1/*
2 * arch/v850/lib/memcpy.c -- Memory copying
3 *
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/types.h>
15#include <asm/string.h>
16
17#define CHUNK_SIZE 32 /* bytes */
18#define CHUNK_ALIGNED(addr) (((unsigned long)addr & 0x3) == 0)
19
20/* Note that this macro uses 8 call-clobbered registers (not including
21 R1), which are few enough so that the following functions don't need
22 to spill anything to memory. It also uses R1, which is nominally
23 reserved for the assembler, but here it should be OK. */
24#define COPY_CHUNK(src, dst) \
25 asm ("mov %0, ep;" \
26 "sld.w 0[ep], r1; sld.w 4[ep], r12;" \
27 "sld.w 8[ep], r13; sld.w 12[ep], r14;" \
28 "sld.w 16[ep], r15; sld.w 20[ep], r17;" \
29 "sld.w 24[ep], r18; sld.w 28[ep], r19;" \
30 "mov %1, ep;" \
31 "sst.w r1, 0[ep]; sst.w r12, 4[ep];" \
32 "sst.w r13, 8[ep]; sst.w r14, 12[ep];" \
33 "sst.w r15, 16[ep]; sst.w r17, 20[ep];" \
34 "sst.w r18, 24[ep]; sst.w r19, 28[ep]" \
35 :: "r" (src), "r" (dst) \
36 : "r1", "r12", "r13", "r14", "r15", \
37 "r17", "r18", "r19", "ep", "memory");
38
39void *memcpy (void *dst, const void *src, __kernel_size_t size)
40{
41 char *_dst = dst;
42 const char *_src = src;
43
44 if (size >= CHUNK_SIZE && CHUNK_ALIGNED(_src) && CHUNK_ALIGNED(_dst)) {
45 /* Copy large blocks efficiently. */
46 unsigned count;
47 for (count = size / CHUNK_SIZE; count; count--) {
48 COPY_CHUNK (_src, _dst);
49 _src += CHUNK_SIZE;
50 _dst += CHUNK_SIZE;
51 }
52 size %= CHUNK_SIZE;
53 }
54
55 if (size > 0)
56 do
57 *_dst++ = *_src++;
58 while (--size);
59
60 return dst;
61}
62
63void *memmove (void *dst, const void *src, __kernel_size_t size)
64{
65 if ((unsigned long)dst < (unsigned long)src
66 || (unsigned long)src + size < (unsigned long)dst)
67 return memcpy (dst, src, size);
68 else {
69 char *_dst = dst + size;
70 const char *_src = src + size;
71
72 if (size >= CHUNK_SIZE
73 && CHUNK_ALIGNED (_src) && CHUNK_ALIGNED (_dst))
74 {
75 /* Copy large blocks efficiently. */
76 unsigned count;
77 for (count = size / CHUNK_SIZE; count; count--) {
78 _src -= CHUNK_SIZE;
79 _dst -= CHUNK_SIZE;
80 COPY_CHUNK (_src, _dst);
81 }
82 size %= CHUNK_SIZE;
83 }
84
85 if (size > 0)
86 do
87 *--_dst = *--_src;
88 while (--size);
89
90 return _dst;
91 }
92}
diff --git a/arch/v850/lib/memset.c b/arch/v850/lib/memset.c
deleted file mode 100644
index d1b2ad821b15..000000000000
--- a/arch/v850/lib/memset.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/v850/lib/memset.c -- Memory initialization
3 *
4 * Copyright (C) 2001,02,04 NEC Corporation
5 * Copyright (C) 2001,02,04 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14#include <linux/types.h>
15
16void *memset (void *dst, int val, __kernel_size_t count)
17{
18 if (count) {
19 register unsigned loop;
20 register void *ptr asm ("ep") = dst;
21
22 /* replicate VAL into a long. */
23 val &= 0xff;
24 val |= val << 8;
25 val |= val << 16;
26
27 /* copy initial unaligned bytes. */
28 if ((long)ptr & 1) {
29 *(char *)ptr = val;
30 ptr = (void *)((char *)ptr + 1);
31 count--;
32 }
33 if (count > 2 && ((long)ptr & 2)) {
34 *(short *)ptr = val;
35 ptr = (void *)((short *)ptr + 1);
36 count -= 2;
37 }
38
39 /* 32-byte copying loop. */
40 for (loop = count / 32; loop; loop--) {
41 asm ("sst.w %0, 0[ep]; sst.w %0, 4[ep];"
42 "sst.w %0, 8[ep]; sst.w %0, 12[ep];"
43 "sst.w %0, 16[ep]; sst.w %0, 20[ep];"
44 "sst.w %0, 24[ep]; sst.w %0, 28[ep]"
45 :: "r" (val) : "memory");
46 ptr += 32;
47 }
48 count %= 32;
49
50 /* long copying loop. */
51 for (loop = count / 4; loop; loop--) {
52 *(long *)ptr = val;
53 ptr = (void *)((long *)ptr + 1);
54 }
55 count %= 4;
56
57 /* finish up with any trailing bytes. */
58 if (count & 2) {
59 *(short *)ptr = val;
60 ptr = (void *)((short *)ptr + 1);
61 }
62 if (count & 1) {
63 *(char *)ptr = val;
64 }
65 }
66
67 return dst;
68}
diff --git a/arch/v850/lib/muldi3.c b/arch/v850/lib/muldi3.c
deleted file mode 100644
index 277ca25c82c8..000000000000
--- a/arch/v850/lib/muldi3.c
+++ /dev/null
@@ -1,61 +0,0 @@
1/* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and
2 gcc-2.7.2.3/longlong.h which is: */
3/* Copyright (C) 1989, 1992, 1993, 1994, 1995, 2001 Free Software Foundation, Inc.
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */
21
22#define umul_ppmm(w1, w0, u, v) \
23 __asm__ ("mulu %3, %0, %1" \
24 : "=r" ((USItype)(w0)), \
25 "=r" ((USItype)(w1)) \
26 : "%0" ((USItype)(u)), \
27 "r" ((USItype)(v)))
28
29#define __umulsidi3(u, v) \
30 ({DIunion __w; \
31 umul_ppmm (__w.s.high, __w.s.low, u, v); \
32 __w.ll; })
33
34typedef int SItype __attribute__ ((mode (SI)));
35typedef unsigned int USItype __attribute__ ((mode (SI)));
36typedef int DItype __attribute__ ((mode (DI)));
37typedef int word_type __attribute__ ((mode (__word__)));
38
39struct DIstruct {SItype high, low;};
40
41typedef union
42{
43 struct DIstruct s;
44 DItype ll;
45} DIunion;
46
47DItype
48__muldi3 (DItype u, DItype v)
49{
50 DIunion w;
51 DIunion uu, vv;
52
53 uu.ll = u,
54 vv.ll = v;
55
56 w.ll = __umulsidi3 (uu.s.low, vv.s.low);
57 w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high
58 + (USItype) uu.s.high * (USItype) vv.s.low);
59
60 return w.ll;
61}
diff --git a/arch/v850/lib/negdi2.c b/arch/v850/lib/negdi2.c
deleted file mode 100644
index 571e04fc619a..000000000000
--- a/arch/v850/lib/negdi2.c
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * arch/v850/lib/negdi2.c -- 64-bit negation
3 *
4 * Copyright (C) 2001 NEC Corporation
5 * Copyright (C) 2001 Miles Bader <miles@gnu.org>
6 *
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
10 *
11 * Written by Miles Bader <miles@gnu.org>
12 */
13
14typedef int DItype __attribute__ ((mode (DI)));
15
16DItype __negdi2 (DItype x)
17{
18 __asm__ __volatile__
19 ("not r6, r10;"
20 "add 1, r10;"
21 "setf c, r6;"
22 "not r7, r11;"
23 "add r6, r11"
24 ::: "r6", "r7", "r10", "r11");
25}
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e32960c447a6..7d17421b2a2e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -21,6 +21,7 @@ config X86
21 select HAVE_UNSTABLE_SCHED_CLOCK 21 select HAVE_UNSTABLE_SCHED_CLOCK
22 select HAVE_IDE 22 select HAVE_IDE
23 select HAVE_OPROFILE 23 select HAVE_OPROFILE
24 select HAVE_IOREMAP_PROT
24 select HAVE_KPROBES 25 select HAVE_KPROBES
25 select HAVE_KRETPROBES 26 select HAVE_KRETPROBES
26 select HAVE_DYNAMIC_FTRACE 27 select HAVE_DYNAMIC_FTRACE
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 54b8c02c71e6..2c518fbc52ec 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -414,4 +414,4 @@ config X86_MINIMUM_CPU_FAMILY
414 414
415config X86_DEBUGCTLMSR 415config X86_DEBUGCTLMSR
416 def_bool y 416 def_bool y
417 depends on !(M586MMX || M586TSC || M586 || M486 || M386) 417 depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386)
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 23d146ce676b..e4bd1793a5e4 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -15,6 +15,16 @@
15#include <asm/irqflags.h> 15#include <asm/irqflags.h>
16#include <linux/linkage.h> 16#include <linux/linkage.h>
17 17
18/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
19#include <linux/elf-em.h>
20#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
21#define __AUDIT_ARCH_LE 0x40000000
22
23#ifndef CONFIG_AUDITSYSCALL
24#define sysexit_audit int_ret_from_sys_call
25#define sysretl_audit int_ret_from_sys_call
26#endif
27
18#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) 28#define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8)
19 29
20 .macro IA32_ARG_FIXUP noebp=0 30 .macro IA32_ARG_FIXUP noebp=0
@@ -148,13 +158,15 @@ ENTRY(ia32_sysenter_target)
148 ja ia32_badsys 158 ja ia32_badsys
149sysenter_do_call: 159sysenter_do_call:
150 IA32_ARG_FIXUP 1 160 IA32_ARG_FIXUP 1
161sysenter_dispatch:
151 call *ia32_sys_call_table(,%rax,8) 162 call *ia32_sys_call_table(,%rax,8)
152 movq %rax,RAX-ARGOFFSET(%rsp) 163 movq %rax,RAX-ARGOFFSET(%rsp)
153 GET_THREAD_INFO(%r10) 164 GET_THREAD_INFO(%r10)
154 DISABLE_INTERRUPTS(CLBR_NONE) 165 DISABLE_INTERRUPTS(CLBR_NONE)
155 TRACE_IRQS_OFF 166 TRACE_IRQS_OFF
156 testl $_TIF_ALLWORK_MASK,TI_flags(%r10) 167 testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
157 jnz int_ret_from_sys_call 168 jnz sysexit_audit
169sysexit_from_sys_call:
158 andl $~TS_COMPAT,TI_status(%r10) 170 andl $~TS_COMPAT,TI_status(%r10)
159 /* clear IF, that popfq doesn't enable interrupts early */ 171 /* clear IF, that popfq doesn't enable interrupts early */
160 andl $~0x200,EFLAGS-R11(%rsp) 172 andl $~0x200,EFLAGS-R11(%rsp)
@@ -170,9 +182,63 @@ sysenter_do_call:
170 TRACE_IRQS_ON 182 TRACE_IRQS_ON
171 ENABLE_INTERRUPTS_SYSEXIT32 183 ENABLE_INTERRUPTS_SYSEXIT32
172 184
173sysenter_tracesys: 185#ifdef CONFIG_AUDITSYSCALL
186 .macro auditsys_entry_common
187 movl %esi,%r9d /* 6th arg: 4th syscall arg */
188 movl %edx,%r8d /* 5th arg: 3rd syscall arg */
189 /* (already in %ecx) 4th arg: 2nd syscall arg */
190 movl %ebx,%edx /* 3rd arg: 1st syscall arg */
191 movl %eax,%esi /* 2nd arg: syscall number */
192 movl $AUDIT_ARCH_I386,%edi /* 1st arg: audit arch */
193 call audit_syscall_entry
194 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall number */
195 cmpl $(IA32_NR_syscalls-1),%eax
196 ja ia32_badsys
197 movl %ebx,%edi /* reload 1st syscall arg */
198 movl RCX-ARGOFFSET(%rsp),%esi /* reload 2nd syscall arg */
199 movl RDX-ARGOFFSET(%rsp),%edx /* reload 3rd syscall arg */
200 movl RSI-ARGOFFSET(%rsp),%ecx /* reload 4th syscall arg */
201 movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */
202 .endm
203
204 .macro auditsys_exit exit
205 testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
206 jnz int_ret_from_sys_call
207 TRACE_IRQS_ON
208 sti
209 movl %eax,%esi /* second arg, syscall return value */
210 cmpl $0,%eax /* is it < 0? */
211 setl %al /* 1 if so, 0 if not */
212 movzbl %al,%edi /* zero-extend that into %edi */
213 inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
214 call audit_syscall_exit
215 GET_THREAD_INFO(%r10)
216 movl RAX-ARGOFFSET(%rsp),%eax /* reload syscall return value */
217 movl RBP-ARGOFFSET(%rsp),%ebp /* reload user register value */
218 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
219 cli
220 TRACE_IRQS_OFF
221 testl %edi,TI_flags(%r10)
222 jnz int_with_check
223 jmp \exit
224 .endm
225
226sysenter_auditsys:
174 CFI_RESTORE_STATE 227 CFI_RESTORE_STATE
228 auditsys_entry_common
229 movl %ebp,%r9d /* reload 6th syscall arg */
230 jmp sysenter_dispatch
231
232sysexit_audit:
233 auditsys_exit sysexit_from_sys_call
234#endif
235
236sysenter_tracesys:
175 xchgl %r9d,%ebp 237 xchgl %r9d,%ebp
238#ifdef CONFIG_AUDITSYSCALL
239 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
240 jz sysenter_auditsys
241#endif
176 SAVE_REST 242 SAVE_REST
177 CLEAR_RREGS 243 CLEAR_RREGS
178 movq %r9,R9(%rsp) 244 movq %r9,R9(%rsp)
@@ -252,13 +318,15 @@ cstar_do_call:
252 cmpl $IA32_NR_syscalls-1,%eax 318 cmpl $IA32_NR_syscalls-1,%eax
253 ja ia32_badsys 319 ja ia32_badsys
254 IA32_ARG_FIXUP 1 320 IA32_ARG_FIXUP 1
321cstar_dispatch:
255 call *ia32_sys_call_table(,%rax,8) 322 call *ia32_sys_call_table(,%rax,8)
256 movq %rax,RAX-ARGOFFSET(%rsp) 323 movq %rax,RAX-ARGOFFSET(%rsp)
257 GET_THREAD_INFO(%r10) 324 GET_THREAD_INFO(%r10)
258 DISABLE_INTERRUPTS(CLBR_NONE) 325 DISABLE_INTERRUPTS(CLBR_NONE)
259 TRACE_IRQS_OFF 326 TRACE_IRQS_OFF
260 testl $_TIF_ALLWORK_MASK,TI_flags(%r10) 327 testl $_TIF_ALLWORK_MASK,TI_flags(%r10)
261 jnz int_ret_from_sys_call 328 jnz sysretl_audit
329sysretl_from_sys_call:
262 andl $~TS_COMPAT,TI_status(%r10) 330 andl $~TS_COMPAT,TI_status(%r10)
263 RESTORE_ARGS 1,-ARG_SKIP,1,1,1 331 RESTORE_ARGS 1,-ARG_SKIP,1,1,1
264 movl RIP-ARGOFFSET(%rsp),%ecx 332 movl RIP-ARGOFFSET(%rsp),%ecx
@@ -270,8 +338,23 @@ cstar_do_call:
270 CFI_RESTORE rsp 338 CFI_RESTORE rsp
271 USERGS_SYSRET32 339 USERGS_SYSRET32
272 340
273cstar_tracesys: 341#ifdef CONFIG_AUDITSYSCALL
342cstar_auditsys:
274 CFI_RESTORE_STATE 343 CFI_RESTORE_STATE
344 movl %r9d,R9-ARGOFFSET(%rsp) /* register to be clobbered by call */
345 auditsys_entry_common
346 movl R9-ARGOFFSET(%rsp),%r9d /* reload 6th syscall arg */
347 jmp cstar_dispatch
348
349sysretl_audit:
350 auditsys_exit sysretl_from_sys_call
351#endif
352
353cstar_tracesys:
354#ifdef CONFIG_AUDITSYSCALL
355 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
356 jz cstar_auditsys
357#endif
275 xchgl %r9d,%ebp 358 xchgl %r9d,%ebp
276 SAVE_REST 359 SAVE_REST
277 CLEAR_RREGS 360 CLEAR_RREGS
@@ -743,4 +826,10 @@ ia32_sys_call_table:
743 .quad sys32_fallocate 826 .quad sys32_fallocate
744 .quad compat_sys_timerfd_settime /* 325 */ 827 .quad compat_sys_timerfd_settime /* 325 */
745 .quad compat_sys_timerfd_gettime 828 .quad compat_sys_timerfd_gettime
829 .quad compat_sys_signalfd4
830 .quad sys_eventfd2
831 .quad sys_epoll_create1
832 .quad sys_dup3 /* 330 */
833 .quad sys_pipe2
834 .quad sys_inotify_init1
746ia32_syscall_end: 835ia32_syscall_end:
diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
index f00afdf61e67..d3c64088b981 100644
--- a/arch/x86/ia32/sys_ia32.c
+++ b/arch/x86/ia32/sys_ia32.c
@@ -238,7 +238,7 @@ asmlinkage long sys32_pipe(int __user *fd)
238 int retval; 238 int retval;
239 int fds[2]; 239 int fds[2];
240 240
241 retval = do_pipe(fds); 241 retval = do_pipe_flags(fds, 0);
242 if (retval) 242 if (retval)
243 goto out; 243 goto out;
244 if (copy_to_user(fd, fds, sizeof(fds))) 244 if (copy_to_user(fd, fds, sizeof(fds)))
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index c2502eb9aa83..9220cf46aa10 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -73,6 +73,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
73 struct cpuinfo_x86 *c = &cpu_data(cpu); 73 struct cpuinfo_x86 *c = &cpu_data(cpu);
74 74
75 cpumask_t saved_mask; 75 cpumask_t saved_mask;
76 cpumask_of_cpu_ptr(new_mask, cpu);
76 int retval; 77 int retval;
77 unsigned int eax, ebx, ecx, edx; 78 unsigned int eax, ebx, ecx, edx;
78 unsigned int edx_part; 79 unsigned int edx_part;
@@ -91,7 +92,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu,
91 92
92 /* Make sure we are running on right CPU */ 93 /* Make sure we are running on right CPU */
93 saved_mask = current->cpus_allowed; 94 saved_mask = current->cpus_allowed;
94 retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 95 retval = set_cpus_allowed_ptr(current, new_mask);
95 if (retval) 96 if (retval)
96 return -1; 97 return -1;
97 98
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index a3ddad18aaa3..fa2161d5003b 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -150,6 +150,10 @@ static int __init acpi_sleep_setup(char *str)
150 acpi_realmode_flags |= 2; 150 acpi_realmode_flags |= 2;
151 if (strncmp(str, "s3_beep", 7) == 0) 151 if (strncmp(str, "s3_beep", 7) == 0)
152 acpi_realmode_flags |= 4; 152 acpi_realmode_flags |= 4;
153#ifdef CONFIG_HIBERNATION
154 if (strncmp(str, "s4_nohwsig", 10) == 0)
155 acpi_no_s4_hw_signature();
156#endif
153 if (strncmp(str, "old_ordering", 12) == 0) 157 if (strncmp(str, "old_ordering", 12) == 0)
154 acpi_old_suspend_ordering(); 158 acpi_old_suspend_ordering();
155 str = strchr(str, ','); 159 str = strchr(str, ',');
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index bf9b441331e9..9ee24e6bc4b0 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -219,7 +219,6 @@
219#include <linux/time.h> 219#include <linux/time.h>
220#include <linux/sched.h> 220#include <linux/sched.h>
221#include <linux/pm.h> 221#include <linux/pm.h>
222#include <linux/pm_legacy.h>
223#include <linux/capability.h> 222#include <linux/capability.h>
224#include <linux/device.h> 223#include <linux/device.h>
225#include <linux/kernel.h> 224#include <linux/kernel.h>
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index b0c8208df9fa..ff2fff56f0a8 100644
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -200,10 +200,12 @@ static void drv_read(struct drv_cmd *cmd)
200static void drv_write(struct drv_cmd *cmd) 200static void drv_write(struct drv_cmd *cmd)
201{ 201{
202 cpumask_t saved_mask = current->cpus_allowed; 202 cpumask_t saved_mask = current->cpus_allowed;
203 cpumask_of_cpu_ptr_declare(cpu_mask);
203 unsigned int i; 204 unsigned int i;
204 205
205 for_each_cpu_mask(i, cmd->mask) { 206 for_each_cpu_mask_nr(i, cmd->mask) {
206 set_cpus_allowed_ptr(current, &cpumask_of_cpu(i)); 207 cpumask_of_cpu_ptr_next(cpu_mask, i);
208 set_cpus_allowed_ptr(current, cpu_mask);
207 do_drv_write(cmd); 209 do_drv_write(cmd);
208 } 210 }
209 211
@@ -267,11 +269,12 @@ static unsigned int get_measured_perf(unsigned int cpu)
267 } aperf_cur, mperf_cur; 269 } aperf_cur, mperf_cur;
268 270
269 cpumask_t saved_mask; 271 cpumask_t saved_mask;
272 cpumask_of_cpu_ptr(cpu_mask, cpu);
270 unsigned int perf_percent; 273 unsigned int perf_percent;
271 unsigned int retval; 274 unsigned int retval;
272 275
273 saved_mask = current->cpus_allowed; 276 saved_mask = current->cpus_allowed;
274 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 277 set_cpus_allowed_ptr(current, cpu_mask);
275 if (get_cpu() != cpu) { 278 if (get_cpu() != cpu) {
276 /* We were not able to run on requested processor */ 279 /* We were not able to run on requested processor */
277 put_cpu(); 280 put_cpu();
@@ -337,6 +340,7 @@ static unsigned int get_measured_perf(unsigned int cpu)
337 340
338static unsigned int get_cur_freq_on_cpu(unsigned int cpu) 341static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
339{ 342{
343 cpumask_of_cpu_ptr(cpu_mask, cpu);
340 struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu); 344 struct acpi_cpufreq_data *data = per_cpu(drv_data, cpu);
341 unsigned int freq; 345 unsigned int freq;
342 unsigned int cached_freq; 346 unsigned int cached_freq;
@@ -349,7 +353,7 @@ static unsigned int get_cur_freq_on_cpu(unsigned int cpu)
349 } 353 }
350 354
351 cached_freq = data->freq_table[data->acpi_data->state].frequency; 355 cached_freq = data->freq_table[data->acpi_data->state].frequency;
352 freq = extract_freq(get_cur_val(&cpumask_of_cpu(cpu)), data); 356 freq = extract_freq(get_cur_val(cpu_mask), data);
353 if (freq != cached_freq) { 357 if (freq != cached_freq) {
354 /* 358 /*
355 * The dreaded BIOS frequency change behind our back. 359 * The dreaded BIOS frequency change behind our back.
@@ -451,7 +455,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
451 455
452 freqs.old = perf->states[perf->state].core_frequency * 1000; 456 freqs.old = perf->states[perf->state].core_frequency * 1000;
453 freqs.new = data->freq_table[next_state].frequency; 457 freqs.new = data->freq_table[next_state].frequency;
454 for_each_cpu_mask(i, cmd.mask) { 458 for_each_cpu_mask_nr(i, cmd.mask) {
455 freqs.cpu = i; 459 freqs.cpu = i;
456 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 460 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
457 } 461 }
@@ -466,7 +470,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
466 } 470 }
467 } 471 }
468 472
469 for_each_cpu_mask(i, cmd.mask) { 473 for_each_cpu_mask_nr(i, cmd.mask) {
470 freqs.cpu = i; 474 freqs.cpu = i;
471 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 475 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
472 } 476 }
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
index 199e4e05e5dc..f1685fb91fbd 100644
--- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c
@@ -122,7 +122,7 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
122 return 0; 122 return 0;
123 123
124 /* notifiers */ 124 /* notifiers */
125 for_each_cpu_mask(i, policy->cpus) { 125 for_each_cpu_mask_nr(i, policy->cpus) {
126 freqs.cpu = i; 126 freqs.cpu = i;
127 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 127 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
128 } 128 }
@@ -130,11 +130,11 @@ static int cpufreq_p4_target(struct cpufreq_policy *policy,
130 /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software 130 /* run on each logical CPU, see section 13.15.3 of IA32 Intel Architecture Software
131 * Developer's Manual, Volume 3 131 * Developer's Manual, Volume 3
132 */ 132 */
133 for_each_cpu_mask(i, policy->cpus) 133 for_each_cpu_mask_nr(i, policy->cpus)
134 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index); 134 cpufreq_p4_setdc(i, p4clockmod_table[newstate].index);
135 135
136 /* notifiers */ 136 /* notifiers */
137 for_each_cpu_mask(i, policy->cpus) { 137 for_each_cpu_mask_nr(i, policy->cpus) {
138 freqs.cpu = i; 138 freqs.cpu = i;
139 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 139 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
140 } 140 }
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 206791eb46e3..53c7b6936973 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -479,11 +479,12 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi
479static int check_supported_cpu(unsigned int cpu) 479static int check_supported_cpu(unsigned int cpu)
480{ 480{
481 cpumask_t oldmask; 481 cpumask_t oldmask;
482 cpumask_of_cpu_ptr(cpu_mask, cpu);
482 u32 eax, ebx, ecx, edx; 483 u32 eax, ebx, ecx, edx;
483 unsigned int rc = 0; 484 unsigned int rc = 0;
484 485
485 oldmask = current->cpus_allowed; 486 oldmask = current->cpus_allowed;
486 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 487 set_cpus_allowed_ptr(current, cpu_mask);
487 488
488 if (smp_processor_id() != cpu) { 489 if (smp_processor_id() != cpu) {
489 printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu); 490 printk(KERN_ERR PFX "limiting to cpu %u failed\n", cpu);
@@ -966,7 +967,7 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned i
966 freqs.old = find_khz_freq_from_fid(data->currfid); 967 freqs.old = find_khz_freq_from_fid(data->currfid);
967 freqs.new = find_khz_freq_from_fid(fid); 968 freqs.new = find_khz_freq_from_fid(fid);
968 969
969 for_each_cpu_mask(i, *(data->available_cores)) { 970 for_each_cpu_mask_nr(i, *(data->available_cores)) {
970 freqs.cpu = i; 971 freqs.cpu = i;
971 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 972 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
972 } 973 }
@@ -974,7 +975,7 @@ static int transition_frequency_fidvid(struct powernow_k8_data *data, unsigned i
974 res = transition_fid_vid(data, fid, vid); 975 res = transition_fid_vid(data, fid, vid);
975 freqs.new = find_khz_freq_from_fid(data->currfid); 976 freqs.new = find_khz_freq_from_fid(data->currfid);
976 977
977 for_each_cpu_mask(i, *(data->available_cores)) { 978 for_each_cpu_mask_nr(i, *(data->available_cores)) {
978 freqs.cpu = i; 979 freqs.cpu = i;
979 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 980 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
980 } 981 }
@@ -997,7 +998,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
997 freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); 998 freqs.old = find_khz_freq_from_pstate(data->powernow_table, data->currpstate);
998 freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); 999 freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
999 1000
1000 for_each_cpu_mask(i, *(data->available_cores)) { 1001 for_each_cpu_mask_nr(i, *(data->available_cores)) {
1001 freqs.cpu = i; 1002 freqs.cpu = i;
1002 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 1003 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
1003 } 1004 }
@@ -1005,7 +1006,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
1005 res = transition_pstate(data, pstate); 1006 res = transition_pstate(data, pstate);
1006 freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate); 1007 freqs.new = find_khz_freq_from_pstate(data->powernow_table, pstate);
1007 1008
1008 for_each_cpu_mask(i, *(data->available_cores)) { 1009 for_each_cpu_mask_nr(i, *(data->available_cores)) {
1009 freqs.cpu = i; 1010 freqs.cpu = i;
1010 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 1011 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
1011 } 1012 }
@@ -1016,6 +1017,7 @@ static int transition_frequency_pstate(struct powernow_k8_data *data, unsigned i
1016static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation) 1017static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsigned relation)
1017{ 1018{
1018 cpumask_t oldmask; 1019 cpumask_t oldmask;
1020 cpumask_of_cpu_ptr(cpu_mask, pol->cpu);
1019 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu); 1021 struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
1020 u32 checkfid; 1022 u32 checkfid;
1021 u32 checkvid; 1023 u32 checkvid;
@@ -1030,7 +1032,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1030 1032
1031 /* only run on specific CPU from here on */ 1033 /* only run on specific CPU from here on */
1032 oldmask = current->cpus_allowed; 1034 oldmask = current->cpus_allowed;
1033 set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu)); 1035 set_cpus_allowed_ptr(current, cpu_mask);
1034 1036
1035 if (smp_processor_id() != pol->cpu) { 1037 if (smp_processor_id() != pol->cpu) {
1036 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); 1038 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
@@ -1105,6 +1107,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1105{ 1107{
1106 struct powernow_k8_data *data; 1108 struct powernow_k8_data *data;
1107 cpumask_t oldmask; 1109 cpumask_t oldmask;
1110 cpumask_of_cpu_ptr_declare(newmask);
1108 int rc; 1111 int rc;
1109 1112
1110 if (!cpu_online(pol->cpu)) 1113 if (!cpu_online(pol->cpu))
@@ -1156,7 +1159,8 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1156 1159
1157 /* only run on specific CPU from here on */ 1160 /* only run on specific CPU from here on */
1158 oldmask = current->cpus_allowed; 1161 oldmask = current->cpus_allowed;
1159 set_cpus_allowed_ptr(current, &cpumask_of_cpu(pol->cpu)); 1162 cpumask_of_cpu_ptr_next(newmask, pol->cpu);
1163 set_cpus_allowed_ptr(current, newmask);
1160 1164
1161 if (smp_processor_id() != pol->cpu) { 1165 if (smp_processor_id() != pol->cpu) {
1162 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu); 1166 printk(KERN_ERR PFX "limiting to cpu %u failed\n", pol->cpu);
@@ -1178,7 +1182,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1178 set_cpus_allowed_ptr(current, &oldmask); 1182 set_cpus_allowed_ptr(current, &oldmask);
1179 1183
1180 if (cpu_family == CPU_HW_PSTATE) 1184 if (cpu_family == CPU_HW_PSTATE)
1181 pol->cpus = cpumask_of_cpu(pol->cpu); 1185 pol->cpus = *newmask;
1182 else 1186 else
1183 pol->cpus = per_cpu(cpu_core_map, pol->cpu); 1187 pol->cpus = per_cpu(cpu_core_map, pol->cpu);
1184 data->available_cores = &(pol->cpus); 1188 data->available_cores = &(pol->cpus);
@@ -1244,6 +1248,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
1244{ 1248{
1245 struct powernow_k8_data *data; 1249 struct powernow_k8_data *data;
1246 cpumask_t oldmask = current->cpus_allowed; 1250 cpumask_t oldmask = current->cpus_allowed;
1251 cpumask_of_cpu_ptr(newmask, cpu);
1247 unsigned int khz = 0; 1252 unsigned int khz = 0;
1248 unsigned int first; 1253 unsigned int first;
1249 1254
@@ -1253,7 +1258,7 @@ static unsigned int powernowk8_get (unsigned int cpu)
1253 if (!data) 1258 if (!data)
1254 return -EINVAL; 1259 return -EINVAL;
1255 1260
1256 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 1261 set_cpus_allowed_ptr(current, newmask);
1257 if (smp_processor_id() != cpu) { 1262 if (smp_processor_id() != cpu) {
1258 printk(KERN_ERR PFX 1263 printk(KERN_ERR PFX
1259 "limiting to CPU %d failed in powernowk8_get\n", cpu); 1264 "limiting to CPU %d failed in powernowk8_get\n", cpu);
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
index 908dd347c67e..ca2ac13b7af2 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -28,7 +28,8 @@
28#define PFX "speedstep-centrino: " 28#define PFX "speedstep-centrino: "
29#define MAINTAINER "cpufreq@lists.linux.org.uk" 29#define MAINTAINER "cpufreq@lists.linux.org.uk"
30 30
31#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg) 31#define dprintk(msg...) \
32 cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "speedstep-centrino", msg)
32 33
33#define INTEL_MSR_RANGE (0xffff) 34#define INTEL_MSR_RANGE (0xffff)
34 35
@@ -66,11 +67,12 @@ struct cpu_model
66 67
67 struct cpufreq_frequency_table *op_points; /* clock/voltage pairs */ 68 struct cpufreq_frequency_table *op_points; /* clock/voltage pairs */
68}; 69};
69static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct cpu_id *x); 70static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c,
71 const struct cpu_id *x);
70 72
71/* Operating points for current CPU */ 73/* Operating points for current CPU */
72static struct cpu_model *centrino_model[NR_CPUS]; 74static DEFINE_PER_CPU(struct cpu_model *, centrino_model);
73static const struct cpu_id *centrino_cpu[NR_CPUS]; 75static DEFINE_PER_CPU(const struct cpu_id *, centrino_cpu);
74 76
75static struct cpufreq_driver centrino_driver; 77static struct cpufreq_driver centrino_driver;
76 78
@@ -255,7 +257,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
255 return -ENOENT; 257 return -ENOENT;
256 } 258 }
257 259
258 centrino_model[policy->cpu] = model; 260 per_cpu(centrino_model, policy->cpu) = model;
259 261
260 dprintk("found \"%s\": max frequency: %dkHz\n", 262 dprintk("found \"%s\": max frequency: %dkHz\n",
261 model->model_name, model->max_freq); 263 model->model_name, model->max_freq);
@@ -264,10 +266,14 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
264} 266}
265 267
266#else 268#else
267static inline int centrino_cpu_init_table(struct cpufreq_policy *policy) { return -ENODEV; } 269static inline int centrino_cpu_init_table(struct cpufreq_policy *policy)
270{
271 return -ENODEV;
272}
268#endif /* CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE */ 273#endif /* CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE */
269 274
270static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c, const struct cpu_id *x) 275static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c,
276 const struct cpu_id *x)
271{ 277{
272 if ((c->x86 == x->x86) && 278 if ((c->x86 == x->x86) &&
273 (c->x86_model == x->x86_model) && 279 (c->x86_model == x->x86_model) &&
@@ -286,23 +292,28 @@ static unsigned extract_clock(unsigned msr, unsigned int cpu, int failsafe)
286 * for centrino, as some DSDTs are buggy. 292 * for centrino, as some DSDTs are buggy.
287 * Ideally, this can be done using the acpi_data structure. 293 * Ideally, this can be done using the acpi_data structure.
288 */ 294 */
289 if ((centrino_cpu[cpu] == &cpu_ids[CPU_BANIAS]) || 295 if ((per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_BANIAS]) ||
290 (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_A1]) || 296 (per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_DOTHAN_A1]) ||
291 (centrino_cpu[cpu] == &cpu_ids[CPU_DOTHAN_B0])) { 297 (per_cpu(centrino_cpu, cpu) == &cpu_ids[CPU_DOTHAN_B0])) {
292 msr = (msr >> 8) & 0xff; 298 msr = (msr >> 8) & 0xff;
293 return msr * 100000; 299 return msr * 100000;
294 } 300 }
295 301
296 if ((!centrino_model[cpu]) || (!centrino_model[cpu]->op_points)) 302 if ((!per_cpu(centrino_model, cpu)) ||
303 (!per_cpu(centrino_model, cpu)->op_points))
297 return 0; 304 return 0;
298 305
299 msr &= 0xffff; 306 msr &= 0xffff;
300 for (i=0;centrino_model[cpu]->op_points[i].frequency != CPUFREQ_TABLE_END; i++) { 307 for (i = 0;
301 if (msr == centrino_model[cpu]->op_points[i].index) 308 per_cpu(centrino_model, cpu)->op_points[i].frequency
302 return centrino_model[cpu]->op_points[i].frequency; 309 != CPUFREQ_TABLE_END;
310 i++) {
311 if (msr == per_cpu(centrino_model, cpu)->op_points[i].index)
312 return per_cpu(centrino_model, cpu)->
313 op_points[i].frequency;
303 } 314 }
304 if (failsafe) 315 if (failsafe)
305 return centrino_model[cpu]->op_points[i-1].frequency; 316 return per_cpu(centrino_model, cpu)->op_points[i-1].frequency;
306 else 317 else
307 return 0; 318 return 0;
308} 319}
@@ -313,9 +324,10 @@ static unsigned int get_cur_freq(unsigned int cpu)
313 unsigned l, h; 324 unsigned l, h;
314 unsigned clock_freq; 325 unsigned clock_freq;
315 cpumask_t saved_mask; 326 cpumask_t saved_mask;
327 cpumask_of_cpu_ptr(new_mask, cpu);
316 328
317 saved_mask = current->cpus_allowed; 329 saved_mask = current->cpus_allowed;
318 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 330 set_cpus_allowed_ptr(current, new_mask);
319 if (smp_processor_id() != cpu) 331 if (smp_processor_id() != cpu)
320 return 0; 332 return 0;
321 333
@@ -347,7 +359,8 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
347 int i; 359 int i;
348 360
349 /* Only Intel makes Enhanced Speedstep-capable CPUs */ 361 /* Only Intel makes Enhanced Speedstep-capable CPUs */
350 if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) 362 if (cpu->x86_vendor != X86_VENDOR_INTEL ||
363 !cpu_has(cpu, X86_FEATURE_EST))
351 return -ENODEV; 364 return -ENODEV;
352 365
353 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC)) 366 if (cpu_has(cpu, X86_FEATURE_CONSTANT_TSC))
@@ -361,9 +374,9 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
361 break; 374 break;
362 375
363 if (i != N_IDS) 376 if (i != N_IDS)
364 centrino_cpu[policy->cpu] = &cpu_ids[i]; 377 per_cpu(centrino_cpu, policy->cpu) = &cpu_ids[i];
365 378
366 if (!centrino_cpu[policy->cpu]) { 379 if (!per_cpu(centrino_cpu, policy->cpu)) {
367 dprintk("found unsupported CPU with " 380 dprintk("found unsupported CPU with "
368 "Enhanced SpeedStep: send /proc/cpuinfo to " 381 "Enhanced SpeedStep: send /proc/cpuinfo to "
369 MAINTAINER "\n"); 382 MAINTAINER "\n");
@@ -386,23 +399,26 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
386 /* check to see if it stuck */ 399 /* check to see if it stuck */
387 rdmsr(MSR_IA32_MISC_ENABLE, l, h); 400 rdmsr(MSR_IA32_MISC_ENABLE, l, h);
388 if (!(l & (1<<16))) { 401 if (!(l & (1<<16))) {
389 printk(KERN_INFO PFX "couldn't enable Enhanced SpeedStep\n"); 402 printk(KERN_INFO PFX
403 "couldn't enable Enhanced SpeedStep\n");
390 return -ENODEV; 404 return -ENODEV;
391 } 405 }
392 } 406 }
393 407
394 freq = get_cur_freq(policy->cpu); 408 freq = get_cur_freq(policy->cpu);
395 409 policy->cpuinfo.transition_latency = 10000;
396 policy->cpuinfo.transition_latency = 10000; /* 10uS transition latency */ 410 /* 10uS transition latency */
397 policy->cur = freq; 411 policy->cur = freq;
398 412
399 dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur); 413 dprintk("centrino_cpu_init: cur=%dkHz\n", policy->cur);
400 414
401 ret = cpufreq_frequency_table_cpuinfo(policy, centrino_model[policy->cpu]->op_points); 415 ret = cpufreq_frequency_table_cpuinfo(policy,
416 per_cpu(centrino_model, policy->cpu)->op_points);
402 if (ret) 417 if (ret)
403 return (ret); 418 return (ret);
404 419
405 cpufreq_frequency_table_get_attr(centrino_model[policy->cpu]->op_points, policy->cpu); 420 cpufreq_frequency_table_get_attr(
421 per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu);
406 422
407 return 0; 423 return 0;
408} 424}
@@ -411,12 +427,12 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
411{ 427{
412 unsigned int cpu = policy->cpu; 428 unsigned int cpu = policy->cpu;
413 429
414 if (!centrino_model[cpu]) 430 if (!per_cpu(centrino_model, cpu))
415 return -ENODEV; 431 return -ENODEV;
416 432
417 cpufreq_frequency_table_put_attr(cpu); 433 cpufreq_frequency_table_put_attr(cpu);
418 434
419 centrino_model[cpu] = NULL; 435 per_cpu(centrino_model, cpu) = NULL;
420 436
421 return 0; 437 return 0;
422} 438}
@@ -430,17 +446,26 @@ static int centrino_cpu_exit(struct cpufreq_policy *policy)
430 */ 446 */
431static int centrino_verify (struct cpufreq_policy *policy) 447static int centrino_verify (struct cpufreq_policy *policy)
432{ 448{
433 return cpufreq_frequency_table_verify(policy, centrino_model[policy->cpu]->op_points); 449 return cpufreq_frequency_table_verify(policy,
450 per_cpu(centrino_model, policy->cpu)->op_points);
434} 451}
435 452
436/** 453/**
437 * centrino_setpolicy - set a new CPUFreq policy 454 * centrino_setpolicy - set a new CPUFreq policy
438 * @policy: new policy 455 * @policy: new policy
439 * @target_freq: the target frequency 456 * @target_freq: the target frequency
440 * @relation: how that frequency relates to achieved frequency (CPUFREQ_RELATION_L or CPUFREQ_RELATION_H) 457 * @relation: how that frequency relates to achieved frequency
458 * (CPUFREQ_RELATION_L or CPUFREQ_RELATION_H)
441 * 459 *
442 * Sets a new CPUFreq policy. 460 * Sets a new CPUFreq policy.
443 */ 461 */
462struct allmasks {
463 cpumask_t online_policy_cpus;
464 cpumask_t saved_mask;
465 cpumask_t set_mask;
466 cpumask_t covered_cpus;
467};
468
444static int centrino_target (struct cpufreq_policy *policy, 469static int centrino_target (struct cpufreq_policy *policy,
445 unsigned int target_freq, 470 unsigned int target_freq,
446 unsigned int relation) 471 unsigned int relation)
@@ -448,48 +473,55 @@ static int centrino_target (struct cpufreq_policy *policy,
448 unsigned int newstate = 0; 473 unsigned int newstate = 0;
449 unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu; 474 unsigned int msr, oldmsr = 0, h = 0, cpu = policy->cpu;
450 struct cpufreq_freqs freqs; 475 struct cpufreq_freqs freqs;
451 cpumask_t online_policy_cpus;
452 cpumask_t saved_mask;
453 cpumask_t set_mask;
454 cpumask_t covered_cpus;
455 int retval = 0; 476 int retval = 0;
456 unsigned int j, k, first_cpu, tmp; 477 unsigned int j, k, first_cpu, tmp;
457 478 CPUMASK_ALLOC(allmasks);
458 if (unlikely(centrino_model[cpu] == NULL)) 479 CPUMASK_PTR(online_policy_cpus, allmasks);
459 return -ENODEV; 480 CPUMASK_PTR(saved_mask, allmasks);
481 CPUMASK_PTR(set_mask, allmasks);
482 CPUMASK_PTR(covered_cpus, allmasks);
483
484 if (unlikely(allmasks == NULL))
485 return -ENOMEM;
486
487 if (unlikely(per_cpu(centrino_model, cpu) == NULL)) {
488 retval = -ENODEV;
489 goto out;
490 }
460 491
461 if (unlikely(cpufreq_frequency_table_target(policy, 492 if (unlikely(cpufreq_frequency_table_target(policy,
462 centrino_model[cpu]->op_points, 493 per_cpu(centrino_model, cpu)->op_points,
463 target_freq, 494 target_freq,
464 relation, 495 relation,
465 &newstate))) { 496 &newstate))) {
466 return -EINVAL; 497 retval = -EINVAL;
498 goto out;
467 } 499 }
468 500
469#ifdef CONFIG_HOTPLUG_CPU 501#ifdef CONFIG_HOTPLUG_CPU
470 /* cpufreq holds the hotplug lock, so we are safe from here on */ 502 /* cpufreq holds the hotplug lock, so we are safe from here on */
471 cpus_and(online_policy_cpus, cpu_online_map, policy->cpus); 503 cpus_and(*online_policy_cpus, cpu_online_map, policy->cpus);
472#else 504#else
473 online_policy_cpus = policy->cpus; 505 *online_policy_cpus = policy->cpus;
474#endif 506#endif
475 507
476 saved_mask = current->cpus_allowed; 508 *saved_mask = current->cpus_allowed;
477 first_cpu = 1; 509 first_cpu = 1;
478 cpus_clear(covered_cpus); 510 cpus_clear(*covered_cpus);
479 for_each_cpu_mask(j, online_policy_cpus) { 511 for_each_cpu_mask_nr(j, *online_policy_cpus) {
480 /* 512 /*
481 * Support for SMP systems. 513 * Support for SMP systems.
482 * Make sure we are running on CPU that wants to change freq 514 * Make sure we are running on CPU that wants to change freq
483 */ 515 */
484 cpus_clear(set_mask); 516 cpus_clear(*set_mask);
485 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) 517 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
486 cpus_or(set_mask, set_mask, online_policy_cpus); 518 cpus_or(*set_mask, *set_mask, *online_policy_cpus);
487 else 519 else
488 cpu_set(j, set_mask); 520 cpu_set(j, *set_mask);
489 521
490 set_cpus_allowed_ptr(current, &set_mask); 522 set_cpus_allowed_ptr(current, set_mask);
491 preempt_disable(); 523 preempt_disable();
492 if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) { 524 if (unlikely(!cpu_isset(smp_processor_id(), *set_mask))) {
493 dprintk("couldn't limit to CPUs in this domain\n"); 525 dprintk("couldn't limit to CPUs in this domain\n");
494 retval = -EAGAIN; 526 retval = -EAGAIN;
495 if (first_cpu) { 527 if (first_cpu) {
@@ -500,7 +532,7 @@ static int centrino_target (struct cpufreq_policy *policy,
500 break; 532 break;
501 } 533 }
502 534
503 msr = centrino_model[cpu]->op_points[newstate].index; 535 msr = per_cpu(centrino_model, cpu)->op_points[newstate].index;
504 536
505 if (first_cpu) { 537 if (first_cpu) {
506 rdmsr(MSR_IA32_PERF_CTL, oldmsr, h); 538 rdmsr(MSR_IA32_PERF_CTL, oldmsr, h);
@@ -517,7 +549,7 @@ static int centrino_target (struct cpufreq_policy *policy,
517 dprintk("target=%dkHz old=%d new=%d msr=%04x\n", 549 dprintk("target=%dkHz old=%d new=%d msr=%04x\n",
518 target_freq, freqs.old, freqs.new, msr); 550 target_freq, freqs.old, freqs.new, msr);
519 551
520 for_each_cpu_mask(k, online_policy_cpus) { 552 for_each_cpu_mask_nr(k, *online_policy_cpus) {
521 freqs.cpu = k; 553 freqs.cpu = k;
522 cpufreq_notify_transition(&freqs, 554 cpufreq_notify_transition(&freqs,
523 CPUFREQ_PRECHANGE); 555 CPUFREQ_PRECHANGE);
@@ -536,11 +568,11 @@ static int centrino_target (struct cpufreq_policy *policy,
536 break; 568 break;
537 } 569 }
538 570
539 cpu_set(j, covered_cpus); 571 cpu_set(j, *covered_cpus);
540 preempt_enable(); 572 preempt_enable();
541 } 573 }
542 574
543 for_each_cpu_mask(k, online_policy_cpus) { 575 for_each_cpu_mask_nr(k, *online_policy_cpus) {
544 freqs.cpu = k; 576 freqs.cpu = k;
545 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 577 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
546 } 578 }
@@ -553,10 +585,12 @@ static int centrino_target (struct cpufreq_policy *policy,
553 * Best effort undo.. 585 * Best effort undo..
554 */ 586 */
555 587
556 if (!cpus_empty(covered_cpus)) { 588 if (!cpus_empty(*covered_cpus)) {
557 for_each_cpu_mask(j, covered_cpus) { 589 cpumask_of_cpu_ptr_declare(new_mask);
558 set_cpus_allowed_ptr(current, 590
559 &cpumask_of_cpu(j)); 591 for_each_cpu_mask_nr(j, *covered_cpus) {
592 cpumask_of_cpu_ptr_next(new_mask, j);
593 set_cpus_allowed_ptr(current, new_mask);
560 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h); 594 wrmsr(MSR_IA32_PERF_CTL, oldmsr, h);
561 } 595 }
562 } 596 }
@@ -564,19 +598,22 @@ static int centrino_target (struct cpufreq_policy *policy,
564 tmp = freqs.new; 598 tmp = freqs.new;
565 freqs.new = freqs.old; 599 freqs.new = freqs.old;
566 freqs.old = tmp; 600 freqs.old = tmp;
567 for_each_cpu_mask(j, online_policy_cpus) { 601 for_each_cpu_mask_nr(j, *online_policy_cpus) {
568 freqs.cpu = j; 602 freqs.cpu = j;
569 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 603 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
570 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 604 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
571 } 605 }
572 } 606 }
573 set_cpus_allowed_ptr(current, &saved_mask); 607 set_cpus_allowed_ptr(current, saved_mask);
574 return 0; 608 retval = 0;
609 goto out;
575 610
576migrate_end: 611migrate_end:
577 preempt_enable(); 612 preempt_enable();
578 set_cpus_allowed_ptr(current, &saved_mask); 613 set_cpus_allowed_ptr(current, saved_mask);
579 return 0; 614out:
615 CPUMASK_FREE(allmasks);
616 return retval;
580} 617}
581 618
582static struct freq_attr* centrino_attr[] = { 619static struct freq_attr* centrino_attr[] = {
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
index 1b50244b1fdf..2f3728dc24f6 100644
--- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
+++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c
@@ -244,7 +244,8 @@ static unsigned int _speedstep_get(const cpumask_t *cpus)
244 244
245static unsigned int speedstep_get(unsigned int cpu) 245static unsigned int speedstep_get(unsigned int cpu)
246{ 246{
247 return _speedstep_get(&cpumask_of_cpu(cpu)); 247 cpumask_of_cpu_ptr(newmask, cpu);
248 return _speedstep_get(newmask);
248} 249}
249 250
250/** 251/**
@@ -279,7 +280,7 @@ static int speedstep_target (struct cpufreq_policy *policy,
279 280
280 cpus_allowed = current->cpus_allowed; 281 cpus_allowed = current->cpus_allowed;
281 282
282 for_each_cpu_mask(i, policy->cpus) { 283 for_each_cpu_mask_nr(i, policy->cpus) {
283 freqs.cpu = i; 284 freqs.cpu = i;
284 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 285 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
285 } 286 }
@@ -292,7 +293,7 @@ static int speedstep_target (struct cpufreq_policy *policy,
292 /* allow to be run on all CPUs */ 293 /* allow to be run on all CPUs */
293 set_cpus_allowed_ptr(current, &cpus_allowed); 294 set_cpus_allowed_ptr(current, &cpus_allowed);
294 295
295 for_each_cpu_mask(i, policy->cpus) { 296 for_each_cpu_mask_nr(i, policy->cpus) {
296 freqs.cpu = i; 297 freqs.cpu = i;
297 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 298 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
298 } 299 }
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index ff517f0b8cc4..650d40f7912b 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -489,7 +489,7 @@ static void __cpuinit cache_remove_shared_cpu_map(unsigned int cpu, int index)
489 int sibling; 489 int sibling;
490 490
491 this_leaf = CPUID4_INFO_IDX(cpu, index); 491 this_leaf = CPUID4_INFO_IDX(cpu, index);
492 for_each_cpu_mask(sibling, this_leaf->shared_cpu_map) { 492 for_each_cpu_mask_nr(sibling, this_leaf->shared_cpu_map) {
493 sibling_leaf = CPUID4_INFO_IDX(sibling, index); 493 sibling_leaf = CPUID4_INFO_IDX(sibling, index);
494 cpu_clear(cpu, sibling_leaf->shared_cpu_map); 494 cpu_clear(cpu, sibling_leaf->shared_cpu_map);
495 } 495 }
@@ -516,6 +516,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
516 unsigned long j; 516 unsigned long j;
517 int retval; 517 int retval;
518 cpumask_t oldmask; 518 cpumask_t oldmask;
519 cpumask_of_cpu_ptr(newmask, cpu);
519 520
520 if (num_cache_leaves == 0) 521 if (num_cache_leaves == 0)
521 return -ENOENT; 522 return -ENOENT;
@@ -526,7 +527,7 @@ static int __cpuinit detect_cache_attributes(unsigned int cpu)
526 return -ENOMEM; 527 return -ENOMEM;
527 528
528 oldmask = current->cpus_allowed; 529 oldmask = current->cpus_allowed;
529 retval = set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 530 retval = set_cpus_allowed_ptr(current, newmask);
530 if (retval) 531 if (retval)
531 goto out; 532 goto out;
532 533
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index c4a7ec31394c..65a339678ece 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -580,7 +580,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
580 char __user *buf = ubuf; 580 char __user *buf = ubuf;
581 int i, err; 581 int i, err;
582 582
583 cpu_tsc = kmalloc(NR_CPUS * sizeof(long), GFP_KERNEL); 583 cpu_tsc = kmalloc(nr_cpu_ids * sizeof(long), GFP_KERNEL);
584 if (!cpu_tsc) 584 if (!cpu_tsc)
585 return -ENOMEM; 585 return -ENOMEM;
586 586
@@ -762,10 +762,14 @@ DEFINE_PER_CPU(struct sys_device, device_mce);
762 762
763/* Why are there no generic functions for this? */ 763/* Why are there no generic functions for this? */
764#define ACCESSOR(name, var, start) \ 764#define ACCESSOR(name, var, start) \
765 static ssize_t show_ ## name(struct sys_device *s, char *buf) { \ 765 static ssize_t show_ ## name(struct sys_device *s, \
766 struct sysdev_attribute *attr, \
767 char *buf) { \
766 return sprintf(buf, "%lx\n", (unsigned long)var); \ 768 return sprintf(buf, "%lx\n", (unsigned long)var); \
767 } \ 769 } \
768 static ssize_t set_ ## name(struct sys_device *s,const char *buf,size_t siz) { \ 770 static ssize_t set_ ## name(struct sys_device *s, \
771 struct sysdev_attribute *attr, \
772 const char *buf, size_t siz) { \
769 char *end; \ 773 char *end; \
770 unsigned long new = simple_strtoul(buf, &end, 0); \ 774 unsigned long new = simple_strtoul(buf, &end, 0); \
771 if (end == buf) return -EINVAL; \ 775 if (end == buf) return -EINVAL; \
@@ -786,14 +790,16 @@ ACCESSOR(bank3ctl,bank[3],mce_restart())
786ACCESSOR(bank4ctl,bank[4],mce_restart()) 790ACCESSOR(bank4ctl,bank[4],mce_restart())
787ACCESSOR(bank5ctl,bank[5],mce_restart()) 791ACCESSOR(bank5ctl,bank[5],mce_restart())
788 792
789static ssize_t show_trigger(struct sys_device *s, char *buf) 793static ssize_t show_trigger(struct sys_device *s, struct sysdev_attribute *attr,
794 char *buf)
790{ 795{
791 strcpy(buf, trigger); 796 strcpy(buf, trigger);
792 strcat(buf, "\n"); 797 strcat(buf, "\n");
793 return strlen(trigger) + 1; 798 return strlen(trigger) + 1;
794} 799}
795 800
796static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz) 801static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr,
802 const char *buf,size_t siz)
797{ 803{
798 char *p; 804 char *p;
799 int len; 805 int len;
@@ -806,12 +812,12 @@ static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz)
806} 812}
807 813
808static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger); 814static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger);
809ACCESSOR(tolerant,tolerant,) 815static SYSDEV_INT_ATTR(tolerant, 0644, tolerant);
810ACCESSOR(check_interval,check_interval,mce_restart()) 816ACCESSOR(check_interval,check_interval,mce_restart())
811static struct sysdev_attribute *mce_attributes[] = { 817static struct sysdev_attribute *mce_attributes[] = {
812 &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl, 818 &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl,
813 &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl, 819 &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl,
814 &attr_tolerant, &attr_check_interval, &attr_trigger, 820 &attr_tolerant.attr, &attr_check_interval, &attr_trigger,
815 NULL 821 NULL
816}; 822};
817 823
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
index 7c9a813e1193..88736cadbaa6 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c
@@ -527,7 +527,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)
527 if (err) 527 if (err)
528 goto out_free; 528 goto out_free;
529 529
530 for_each_cpu_mask(i, b->cpus) { 530 for_each_cpu_mask_nr(i, b->cpus) {
531 if (i == cpu) 531 if (i == cpu)
532 continue; 532 continue;
533 533
@@ -617,7 +617,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)
617#endif 617#endif
618 618
619 /* remove all sibling symlinks before unregistering */ 619 /* remove all sibling symlinks before unregistering */
620 for_each_cpu_mask(i, b->cpus) { 620 for_each_cpu_mask_nr(i, b->cpus) {
621 if (i == cpu) 621 if (i == cpu)
622 continue; 622 continue;
623 623
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 1f4cc48c14c6..d5ae2243f0b9 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -35,6 +35,7 @@ atomic_t therm_throt_en = ATOMIC_INIT(0);
35 35
36#define define_therm_throt_sysdev_show_func(name) \ 36#define define_therm_throt_sysdev_show_func(name) \
37static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ 37static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \
38 struct sysdev_attribute *attr, \
38 char *buf) \ 39 char *buf) \
39{ \ 40{ \
40 unsigned int cpu = dev->id; \ 41 unsigned int cpu = dev->id; \
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 0d0d9057e7c0..a26c480b9491 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
160{ 160{
161 if (*pos == 0) /* just in case, cpu 0 is not the first */ 161 if (*pos == 0) /* just in case, cpu 0 is not the first */
162 *pos = first_cpu(cpu_online_map); 162 *pos = first_cpu(cpu_online_map);
163 if ((*pos) < NR_CPUS && cpu_online(*pos)) 163 if ((*pos) < nr_cpu_ids && cpu_online(*pos))
164 return &cpu_data(*pos); 164 return &cpu_data(*pos);
165 return NULL; 165 return NULL;
166} 166}
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 2de5fa2bbf77..14b11b3be31c 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -141,8 +141,8 @@ static __cpuinit int cpuid_device_create(int cpu)
141{ 141{
142 struct device *dev; 142 struct device *dev;
143 143
144 dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), 144 dev = device_create_drvdata(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu),
145 "cpu%d", cpu); 145 NULL, "cpu%d", cpu);
146 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 146 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
147} 147}
148 148
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index cdfd94cc6b14..109792bc7cfa 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -54,6 +54,16 @@
54#include <asm/ftrace.h> 54#include <asm/ftrace.h>
55#include <asm/irq_vectors.h> 55#include <asm/irq_vectors.h>
56 56
57/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
58#include <linux/elf-em.h>
59#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
60#define __AUDIT_ARCH_LE 0x40000000
61
62#ifndef CONFIG_AUDITSYSCALL
63#define sysenter_audit syscall_trace_entry
64#define sysexit_audit syscall_exit_work
65#endif
66
57/* 67/*
58 * We use macros for low-level operations which need to be overridden 68 * We use macros for low-level operations which need to be overridden
59 * for paravirtualization. The following will never clobber any registers: 69 * for paravirtualization. The following will never clobber any registers:
@@ -333,7 +343,8 @@ sysenter_past_esp:
333 343
334 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ 344 /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */
335 testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) 345 testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp)
336 jnz syscall_trace_entry 346 jnz sysenter_audit
347sysenter_do_call:
337 cmpl $(nr_syscalls), %eax 348 cmpl $(nr_syscalls), %eax
338 jae syscall_badsys 349 jae syscall_badsys
339 call *sys_call_table(,%eax,4) 350 call *sys_call_table(,%eax,4)
@@ -343,7 +354,8 @@ sysenter_past_esp:
343 TRACE_IRQS_OFF 354 TRACE_IRQS_OFF
344 movl TI_flags(%ebp), %ecx 355 movl TI_flags(%ebp), %ecx
345 testw $_TIF_ALLWORK_MASK, %cx 356 testw $_TIF_ALLWORK_MASK, %cx
346 jne syscall_exit_work 357 jne sysexit_audit
358sysenter_exit:
347/* if something modifies registers it must also disable sysexit */ 359/* if something modifies registers it must also disable sysexit */
348 movl PT_EIP(%esp), %edx 360 movl PT_EIP(%esp), %edx
349 movl PT_OLDESP(%esp), %ecx 361 movl PT_OLDESP(%esp), %ecx
@@ -351,6 +363,45 @@ sysenter_past_esp:
351 TRACE_IRQS_ON 363 TRACE_IRQS_ON
3521: mov PT_FS(%esp), %fs 3641: mov PT_FS(%esp), %fs
353 ENABLE_INTERRUPTS_SYSEXIT 365 ENABLE_INTERRUPTS_SYSEXIT
366
367#ifdef CONFIG_AUDITSYSCALL
368sysenter_audit:
369 testw $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
370 jnz syscall_trace_entry
371 addl $4,%esp
372 CFI_ADJUST_CFA_OFFSET -4
373 /* %esi already in 8(%esp) 6th arg: 4th syscall arg */
374 /* %edx already in 4(%esp) 5th arg: 3rd syscall arg */
375 /* %ecx already in 0(%esp) 4th arg: 2nd syscall arg */
376 movl %ebx,%ecx /* 3rd arg: 1st syscall arg */
377 movl %eax,%edx /* 2nd arg: syscall number */
378 movl $AUDIT_ARCH_I386,%eax /* 1st arg: audit arch */
379 call audit_syscall_entry
380 pushl %ebx
381 CFI_ADJUST_CFA_OFFSET 4
382 movl PT_EAX(%esp),%eax /* reload syscall number */
383 jmp sysenter_do_call
384
385sysexit_audit:
386 testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
387 jne syscall_exit_work
388 TRACE_IRQS_ON
389 ENABLE_INTERRUPTS(CLBR_ANY)
390 movl %eax,%edx /* second arg, syscall return value */
391 cmpl $0,%eax /* is it < 0? */
392 setl %al /* 1 if so, 0 if not */
393 movzbl %al,%eax /* zero-extend that */
394 inc %eax /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
395 call audit_syscall_exit
396 DISABLE_INTERRUPTS(CLBR_ANY)
397 TRACE_IRQS_OFF
398 movl TI_flags(%ebp), %ecx
399 testw $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT), %cx
400 jne syscall_exit_work
401 movl PT_EAX(%esp),%eax /* reload syscall return value */
402 jmp sysenter_exit
403#endif
404
354 CFI_ENDPROC 405 CFI_ENDPROC
355.pushsection .fixup,"ax" 406.pushsection .fixup,"ax"
3562: movl $0,PT_FS(%esp) 4072: movl $0,PT_FS(%esp)
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 8410e26f4183..89434d439605 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -53,6 +53,12 @@
53#include <asm/paravirt.h> 53#include <asm/paravirt.h>
54#include <asm/ftrace.h> 54#include <asm/ftrace.h>
55 55
56/* Avoid __ASSEMBLER__'ifying <linux/audit.h> just for this. */
57#include <linux/elf-em.h>
58#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
59#define __AUDIT_ARCH_64BIT 0x80000000
60#define __AUDIT_ARCH_LE 0x40000000
61
56 .code64 62 .code64
57 63
58#ifdef CONFIG_FTRACE 64#ifdef CONFIG_FTRACE
@@ -351,6 +357,7 @@ ENTRY(system_call_after_swapgs)
351 GET_THREAD_INFO(%rcx) 357 GET_THREAD_INFO(%rcx)
352 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%rcx) 358 testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%rcx)
353 jnz tracesys 359 jnz tracesys
360system_call_fastpath:
354 cmpq $__NR_syscall_max,%rax 361 cmpq $__NR_syscall_max,%rax
355 ja badsys 362 ja badsys
356 movq %r10,%rcx 363 movq %r10,%rcx
@@ -402,16 +409,16 @@ sysret_careful:
402sysret_signal: 409sysret_signal:
403 TRACE_IRQS_ON 410 TRACE_IRQS_ON
404 ENABLE_INTERRUPTS(CLBR_NONE) 411 ENABLE_INTERRUPTS(CLBR_NONE)
405 testl $_TIF_DO_NOTIFY_MASK,%edx 412#ifdef CONFIG_AUDITSYSCALL
406 jz 1f 413 bt $TIF_SYSCALL_AUDIT,%edx
407 414 jc sysret_audit
408 /* Really a signal */ 415#endif
409 /* edx: work flags (arg3) */ 416 /* edx: work flags (arg3) */
410 leaq do_notify_resume(%rip),%rax 417 leaq do_notify_resume(%rip),%rax
411 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1 418 leaq -ARGOFFSET(%rsp),%rdi # &pt_regs -> arg1
412 xorl %esi,%esi # oldset -> arg2 419 xorl %esi,%esi # oldset -> arg2
413 call ptregscall_common 420 call ptregscall_common
4141: movl $_TIF_WORK_MASK,%edi 421 movl $_TIF_WORK_MASK,%edi
415 /* Use IRET because user could have changed frame. This 422 /* Use IRET because user could have changed frame. This
416 works because ptregscall_common has called FIXUP_TOP_OF_STACK. */ 423 works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
417 DISABLE_INTERRUPTS(CLBR_NONE) 424 DISABLE_INTERRUPTS(CLBR_NONE)
@@ -422,8 +429,45 @@ badsys:
422 movq $-ENOSYS,RAX-ARGOFFSET(%rsp) 429 movq $-ENOSYS,RAX-ARGOFFSET(%rsp)
423 jmp ret_from_sys_call 430 jmp ret_from_sys_call
424 431
432#ifdef CONFIG_AUDITSYSCALL
433 /*
434 * Fast path for syscall audit without full syscall trace.
435 * We just call audit_syscall_entry() directly, and then
436 * jump back to the normal fast path.
437 */
438auditsys:
439 movq %r10,%r9 /* 6th arg: 4th syscall arg */
440 movq %rdx,%r8 /* 5th arg: 3rd syscall arg */
441 movq %rsi,%rcx /* 4th arg: 2nd syscall arg */
442 movq %rdi,%rdx /* 3rd arg: 1st syscall arg */
443 movq %rax,%rsi /* 2nd arg: syscall number */
444 movl $AUDIT_ARCH_X86_64,%edi /* 1st arg: audit arch */
445 call audit_syscall_entry
446 LOAD_ARGS 0 /* reload call-clobbered registers */
447 jmp system_call_fastpath
448
449 /*
450 * Return fast path for syscall audit. Call audit_syscall_exit()
451 * directly and then jump back to the fast path with TIF_SYSCALL_AUDIT
452 * masked off.
453 */
454sysret_audit:
455 movq %rax,%rsi /* second arg, syscall return value */
456 cmpq $0,%rax /* is it < 0? */
457 setl %al /* 1 if so, 0 if not */
458 movzbl %al,%edi /* zero-extend that into %edi */
459 inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
460 call audit_syscall_exit
461 movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
462 jmp sysret_check
463#endif /* CONFIG_AUDITSYSCALL */
464
425 /* Do syscall tracing */ 465 /* Do syscall tracing */
426tracesys: 466tracesys:
467#ifdef CONFIG_AUDITSYSCALL
468 testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%rcx)
469 jz auditsys
470#endif
427 SAVE_REST 471 SAVE_REST
428 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */ 472 movq $-ENOSYS,RAX(%rsp) /* ptrace can change this for a bad syscall */
429 FIXUP_TOP_OF_STACK %rdi 473 FIXUP_TOP_OF_STACK %rdi
@@ -448,6 +492,7 @@ tracesys:
448 * Has correct top of stack, but partial stack frame. 492 * Has correct top of stack, but partial stack frame.
449 */ 493 */
450 .globl int_ret_from_sys_call 494 .globl int_ret_from_sys_call
495 .globl int_with_check
451int_ret_from_sys_call: 496int_ret_from_sys_call:
452 DISABLE_INTERRUPTS(CLBR_NONE) 497 DISABLE_INTERRUPTS(CLBR_NONE)
453 TRACE_IRQS_OFF 498 TRACE_IRQS_OFF
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c
index 1740b83329f6..9eca5ba7a6b1 100644
--- a/arch/x86/kernel/genapic_flat_64.c
+++ b/arch/x86/kernel/genapic_flat_64.c
@@ -223,7 +223,7 @@ static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask)
223 * May as well be the first. 223 * May as well be the first.
224 */ 224 */
225 cpu = first_cpu(cpumask); 225 cpu = first_cpu(cpumask);
226 if ((unsigned)cpu < NR_CPUS) 226 if ((unsigned)cpu < nr_cpu_ids)
227 return per_cpu(x86_cpu_to_apicid, cpu); 227 return per_cpu(x86_cpu_to_apicid, cpu);
228 else 228 else
229 return BAD_APICID; 229 return BAD_APICID;
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c
index 169388c4cce9..3fe472223a99 100644
--- a/arch/x86/kernel/genx2apic_uv_x.c
+++ b/arch/x86/kernel/genx2apic_uv_x.c
@@ -127,7 +127,7 @@ static void uv_send_IPI_mask(cpumask_t mask, int vector)
127{ 127{
128 unsigned int cpu; 128 unsigned int cpu;
129 129
130 for (cpu = 0; cpu < NR_CPUS; ++cpu) 130 for_each_possible_cpu(cpu)
131 if (cpu_isset(cpu, mask)) 131 if (cpu_isset(cpu, mask))
132 uv_send_IPI_one(cpu, vector); 132 uv_send_IPI_one(cpu, vector);
133} 133}
@@ -165,7 +165,7 @@ static unsigned int uv_cpu_mask_to_apicid(cpumask_t cpumask)
165 * May as well be the first. 165 * May as well be the first.
166 */ 166 */
167 cpu = first_cpu(cpumask); 167 cpu = first_cpu(cpumask);
168 if ((unsigned)cpu < NR_CPUS) 168 if ((unsigned)cpu < nr_cpu_ids)
169 return per_cpu(x86_cpu_to_apicid, cpu); 169 return per_cpu(x86_cpu_to_apicid, cpu);
170 else 170 else
171 return BAD_APICID; 171 return BAD_APICID;
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 0ea6a19bfdfe..ad2b15a1334d 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -468,7 +468,7 @@ void hpet_disable(void)
468#define RTC_NUM_INTS 1 468#define RTC_NUM_INTS 1
469 469
470static unsigned long hpet_rtc_flags; 470static unsigned long hpet_rtc_flags;
471static unsigned long hpet_prev_update_sec; 471static int hpet_prev_update_sec;
472static struct rtc_time hpet_alarm_time; 472static struct rtc_time hpet_alarm_time;
473static unsigned long hpet_pie_count; 473static unsigned long hpet_pie_count;
474static unsigned long hpet_t1_cmp; 474static unsigned long hpet_t1_cmp;
@@ -575,6 +575,9 @@ int hpet_set_rtc_irq_bit(unsigned long bit_mask)
575 575
576 hpet_rtc_flags |= bit_mask; 576 hpet_rtc_flags |= bit_mask;
577 577
578 if ((bit_mask & RTC_UIE) && !(oldbits & RTC_UIE))
579 hpet_prev_update_sec = -1;
580
578 if (!oldbits) 581 if (!oldbits)
579 hpet_rtc_timer_init(); 582 hpet_rtc_timer_init();
580 583
@@ -652,7 +655,7 @@ static void hpet_rtc_timer_reinit(void)
652 if (hpet_rtc_flags & RTC_PIE) 655 if (hpet_rtc_flags & RTC_PIE)
653 hpet_pie_count += lost_ints; 656 hpet_pie_count += lost_ints;
654 if (printk_ratelimit()) 657 if (printk_ratelimit())
655 printk(KERN_WARNING "rtc: lost %d interrupts\n", 658 printk(KERN_WARNING "hpet1: lost %d rtc interrupts\n",
656 lost_ints); 659 lost_ints);
657 } 660 }
658} 661}
@@ -670,7 +673,8 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
670 673
671 if (hpet_rtc_flags & RTC_UIE && 674 if (hpet_rtc_flags & RTC_UIE &&
672 curr_time.tm_sec != hpet_prev_update_sec) { 675 curr_time.tm_sec != hpet_prev_update_sec) {
673 rtc_int_flag = RTC_UF; 676 if (hpet_prev_update_sec >= 0)
677 rtc_int_flag = RTC_UF;
674 hpet_prev_update_sec = curr_time.tm_sec; 678 hpet_prev_update_sec = curr_time.tm_sec;
675 } 679 }
676 680
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 116aac365981..b9950dae59b7 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -805,7 +805,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
805 return 0; 805 return 0;
806 } 806 }
807 807
808 for_each_cpu_mask(cpu, mask) { 808 for_each_cpu_mask_nr(cpu, mask) {
809 cpumask_t domain, new_mask; 809 cpumask_t domain, new_mask;
810 int new_cpu; 810 int new_cpu;
811 int vector, offset; 811 int vector, offset;
@@ -826,7 +826,7 @@ next:
826 continue; 826 continue;
827 if (vector == IA32_SYSCALL_VECTOR) 827 if (vector == IA32_SYSCALL_VECTOR)
828 goto next; 828 goto next;
829 for_each_cpu_mask(new_cpu, new_mask) 829 for_each_cpu_mask_nr(new_cpu, new_mask)
830 if (per_cpu(vector_irq, new_cpu)[vector] != -1) 830 if (per_cpu(vector_irq, new_cpu)[vector] != -1)
831 goto next; 831 goto next;
832 /* Found one! */ 832 /* Found one! */
@@ -836,7 +836,7 @@ next:
836 cfg->move_in_progress = 1; 836 cfg->move_in_progress = 1;
837 cfg->old_domain = cfg->domain; 837 cfg->old_domain = cfg->domain;
838 } 838 }
839 for_each_cpu_mask(new_cpu, new_mask) 839 for_each_cpu_mask_nr(new_cpu, new_mask)
840 per_cpu(vector_irq, new_cpu)[vector] = irq; 840 per_cpu(vector_irq, new_cpu)[vector] = irq;
841 cfg->vector = vector; 841 cfg->vector = vector;
842 cfg->domain = domain; 842 cfg->domain = domain;
@@ -868,7 +868,7 @@ static void __clear_irq_vector(int irq)
868 868
869 vector = cfg->vector; 869 vector = cfg->vector;
870 cpus_and(mask, cfg->domain, cpu_online_map); 870 cpus_and(mask, cfg->domain, cpu_online_map);
871 for_each_cpu_mask(cpu, mask) 871 for_each_cpu_mask_nr(cpu, mask)
872 per_cpu(vector_irq, cpu)[vector] = -1; 872 per_cpu(vector_irq, cpu)[vector] = -1;
873 873
874 cfg->vector = 0; 874 cfg->vector = 0;
@@ -1520,12 +1520,10 @@ static unsigned int startup_ioapic_irq(unsigned int irq)
1520static int ioapic_retrigger_irq(unsigned int irq) 1520static int ioapic_retrigger_irq(unsigned int irq)
1521{ 1521{
1522 struct irq_cfg *cfg = &irq_cfg[irq]; 1522 struct irq_cfg *cfg = &irq_cfg[irq];
1523 cpumask_t mask;
1524 unsigned long flags; 1523 unsigned long flags;
1525 1524
1526 spin_lock_irqsave(&vector_lock, flags); 1525 spin_lock_irqsave(&vector_lock, flags);
1527 mask = cpumask_of_cpu(first_cpu(cfg->domain)); 1526 send_IPI_mask(cpumask_of_cpu(first_cpu(cfg->domain)), cfg->vector);
1528 send_IPI_mask(mask, cfg->vector);
1529 spin_unlock_irqrestore(&vector_lock, flags); 1527 spin_unlock_irqrestore(&vector_lock, flags);
1530 1528
1531 return 1; 1529 return 1;
diff --git a/arch/x86/kernel/irqinit_64.c b/arch/x86/kernel/irqinit_64.c
index 0373e88de95a..1f26fd9ec4f4 100644
--- a/arch/x86/kernel/irqinit_64.c
+++ b/arch/x86/kernel/irqinit_64.c
@@ -43,10 +43,11 @@
43 43
44#define BUILD_IRQ(nr) \ 44#define BUILD_IRQ(nr) \
45 asmlinkage void IRQ_NAME(nr); \ 45 asmlinkage void IRQ_NAME(nr); \
46 asm("\n.p2align\n" \ 46 asm("\n.text\n.p2align\n" \
47 "IRQ" #nr "_interrupt:\n\t" \ 47 "IRQ" #nr "_interrupt:\n\t" \
48 "push $~(" #nr ") ; " \ 48 "push $~(" #nr ") ; " \
49 "jmp common_interrupt"); 49 "jmp common_interrupt\n" \
50 ".previous");
50 51
51#define BI(x,y) \ 52#define BI(x,y) \
52 BUILD_IRQ(x##y) 53 BUILD_IRQ(x##y)
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index a8449571858a..3fee2aa50f3f 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -62,12 +62,12 @@ static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
62 62
63 if (reload) { 63 if (reload) {
64#ifdef CONFIG_SMP 64#ifdef CONFIG_SMP
65 cpumask_t mask; 65 cpumask_of_cpu_ptr_declare(mask);
66 66
67 preempt_disable(); 67 preempt_disable();
68 load_LDT(pc); 68 load_LDT(pc);
69 mask = cpumask_of_cpu(smp_processor_id()); 69 cpumask_of_cpu_ptr_next(mask, smp_processor_id());
70 if (!cpus_equal(current->mm->cpu_vm_mask, mask)) 70 if (!cpus_equal(current->mm->cpu_vm_mask, *mask))
71 smp_call_function(flush_ldt, current->mm, 1); 71 smp_call_function(flush_ldt, current->mm, 1);
72 preempt_enable(); 72 preempt_enable();
73#else 73#else
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 56b933119a04..6994c751590e 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -388,6 +388,7 @@ static int do_microcode_update (void)
388 void *new_mc = NULL; 388 void *new_mc = NULL;
389 int cpu; 389 int cpu;
390 cpumask_t old; 390 cpumask_t old;
391 cpumask_of_cpu_ptr_declare(newmask);
391 392
392 old = current->cpus_allowed; 393 old = current->cpus_allowed;
393 394
@@ -404,7 +405,8 @@ static int do_microcode_update (void)
404 405
405 if (!uci->valid) 406 if (!uci->valid)
406 continue; 407 continue;
407 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 408 cpumask_of_cpu_ptr_next(newmask, cpu);
409 set_cpus_allowed_ptr(current, newmask);
408 error = get_maching_microcode(new_mc, cpu); 410 error = get_maching_microcode(new_mc, cpu);
409 if (error < 0) 411 if (error < 0)
410 goto out; 412 goto out;
@@ -574,6 +576,7 @@ static int apply_microcode_check_cpu(int cpu)
574 struct cpuinfo_x86 *c = &cpu_data(cpu); 576 struct cpuinfo_x86 *c = &cpu_data(cpu);
575 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 577 struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
576 cpumask_t old; 578 cpumask_t old;
579 cpumask_of_cpu_ptr(newmask, cpu);
577 unsigned int val[2]; 580 unsigned int val[2];
578 int err = 0; 581 int err = 0;
579 582
@@ -582,7 +585,7 @@ static int apply_microcode_check_cpu(int cpu)
582 return 0; 585 return 0;
583 586
584 old = current->cpus_allowed; 587 old = current->cpus_allowed;
585 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 588 set_cpus_allowed_ptr(current, newmask);
586 589
587 /* Check if the microcode we have in memory matches the CPU */ 590 /* Check if the microcode we have in memory matches the CPU */
588 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 || 591 if (c->x86_vendor != X86_VENDOR_INTEL || c->x86 < 6 ||
@@ -620,11 +623,12 @@ static int apply_microcode_check_cpu(int cpu)
620static void microcode_init_cpu(int cpu, int resume) 623static void microcode_init_cpu(int cpu, int resume)
621{ 624{
622 cpumask_t old; 625 cpumask_t old;
626 cpumask_of_cpu_ptr(newmask, cpu);
623 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 627 struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
624 628
625 old = current->cpus_allowed; 629 old = current->cpus_allowed;
626 630
627 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 631 set_cpus_allowed_ptr(current, newmask);
628 mutex_lock(&microcode_mutex); 632 mutex_lock(&microcode_mutex);
629 collect_cpu_info(cpu); 633 collect_cpu_info(cpu);
630 if (uci->valid && system_state == SYSTEM_RUNNING && !resume) 634 if (uci->valid && system_state == SYSTEM_RUNNING && !resume)
@@ -644,7 +648,9 @@ static void microcode_fini_cpu(int cpu)
644 mutex_unlock(&microcode_mutex); 648 mutex_unlock(&microcode_mutex);
645} 649}
646 650
647static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) 651static ssize_t reload_store(struct sys_device *dev,
652 struct sysdev_attribute *attr,
653 const char *buf, size_t sz)
648{ 654{
649 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; 655 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id;
650 char *end; 656 char *end;
@@ -656,11 +662,12 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz)
656 return -EINVAL; 662 return -EINVAL;
657 if (val == 1) { 663 if (val == 1) {
658 cpumask_t old; 664 cpumask_t old;
665 cpumask_of_cpu_ptr(newmask, cpu);
659 666
660 old = current->cpus_allowed; 667 old = current->cpus_allowed;
661 668
662 get_online_cpus(); 669 get_online_cpus();
663 set_cpus_allowed_ptr(current, &cpumask_of_cpu(cpu)); 670 set_cpus_allowed_ptr(current, newmask);
664 671
665 mutex_lock(&microcode_mutex); 672 mutex_lock(&microcode_mutex);
666 if (uci->valid) 673 if (uci->valid)
@@ -674,14 +681,16 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz)
674 return sz; 681 return sz;
675} 682}
676 683
677static ssize_t version_show(struct sys_device *dev, char *buf) 684static ssize_t version_show(struct sys_device *dev,
685 struct sysdev_attribute *attr, char *buf)
678{ 686{
679 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; 687 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id;
680 688
681 return sprintf(buf, "0x%x\n", uci->rev); 689 return sprintf(buf, "0x%x\n", uci->rev);
682} 690}
683 691
684static ssize_t pf_show(struct sys_device *dev, char *buf) 692static ssize_t pf_show(struct sys_device *dev,
693 struct sysdev_attribute *attr, char *buf)
685{ 694{
686 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; 695 struct ucode_cpu_info *uci = ucode_cpu_info + dev->id;
687 696
diff --git a/arch/x86/kernel/module_64.c b/arch/x86/kernel/module_64.c
index 0e867676b5a5..6ba87830d4b1 100644
--- a/arch/x86/kernel/module_64.c
+++ b/arch/x86/kernel/module_64.c
@@ -22,6 +22,7 @@
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/string.h> 23#include <linux/string.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25#include <linux/mm.h>
25#include <linux/slab.h> 26#include <linux/slab.h>
26#include <linux/bug.h> 27#include <linux/bug.h>
27 28
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index a153b3905f60..9fd809552447 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -149,8 +149,8 @@ static int __cpuinit msr_device_create(int cpu)
149{ 149{
150 struct device *dev; 150 struct device *dev;
151 151
152 dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), 152 dev = device_create_drvdata(msr_class, NULL, MKDEV(MSR_MAJOR, cpu),
153 "msr%d", cpu); 153 NULL, "msr%d", cpu);
154 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 154 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
155} 155}
156 156
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index 00c53a049756..5744789a78f4 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -441,7 +441,7 @@ struct pv_mmu_ops pv_mmu_ops = {
441#endif /* PAGETABLE_LEVELS >= 3 */ 441#endif /* PAGETABLE_LEVELS >= 3 */
442 442
443 .pte_val = native_pte_val, 443 .pte_val = native_pte_val,
444 .pte_flags = native_pte_val, 444 .pte_flags = native_pte_flags,
445 .pgd_val = native_pgd_val, 445 .pgd_val = native_pgd_val,
446 446
447 .make_pte = native_make_pte, 447 .make_pte = native_make_pte,
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index a4213c00dffc..cbecb05551bb 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -314,8 +314,7 @@ int dma_supported(struct device *dev, u64 mask)
314{ 314{
315#ifdef CONFIG_PCI 315#ifdef CONFIG_PCI
316 if (mask > 0xffffffff && forbid_dac > 0) { 316 if (mask > 0xffffffff && forbid_dac > 0) {
317 printk(KERN_INFO "PCI: Disallowing DAC for device %s\n", 317 dev_info(dev, "PCI: Disallowing DAC for device\n");
318 dev->bus_id);
319 return 0; 318 return 0;
320 } 319 }
321#endif 320#endif
@@ -342,8 +341,7 @@ int dma_supported(struct device *dev, u64 mask)
342 type. Normally this doesn't make any difference, but gives 341 type. Normally this doesn't make any difference, but gives
343 more gentle handling of IOMMU overflow. */ 342 more gentle handling of IOMMU overflow. */
344 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { 343 if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) {
345 printk(KERN_INFO "%s: Force SAC with mask %Lx\n", 344 dev_info(dev, "Force SAC with mask %Lx\n", mask);
346 dev->bus_id, mask);
347 return 0; 345 return 0;
348 } 346 }
349 347
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index be60961f8695..df5f142657d2 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -198,9 +198,7 @@ static void iommu_full(struct device *dev, size_t size, int dir)
198 * out. Hopefully no network devices use single mappings that big. 198 * out. Hopefully no network devices use single mappings that big.
199 */ 199 */
200 200
201 printk(KERN_ERR 201 dev_err(dev, "PCI-DMA: Out of IOMMU space for %lu bytes\n", size);
202 "PCI-DMA: Out of IOMMU space for %lu bytes at device %s\n",
203 size, dev->bus_id);
204 202
205 if (size > PAGE_SIZE*EMERGENCY_PAGES) { 203 if (size > PAGE_SIZE*EMERGENCY_PAGES) {
206 if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) 204 if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 0c3927accb00..53bc653ed5ca 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -128,7 +128,7 @@ void cpu_idle(void)
128 128
129 /* endless idle loop with no priority at all */ 129 /* endless idle loop with no priority at all */
130 while (1) { 130 while (1) {
131 tick_nohz_stop_sched_tick(); 131 tick_nohz_stop_sched_tick(1);
132 while (!need_resched()) { 132 while (!need_resched()) {
133 133
134 check_pgt_cache(); 134 check_pgt_cache();
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index e8a8e1b99817..3fb62a7d9a16 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -120,7 +120,7 @@ void cpu_idle(void)
120 current_thread_info()->status |= TS_POLLING; 120 current_thread_info()->status |= TS_POLLING;
121 /* endless idle loop with no priority at all */ 121 /* endless idle loop with no priority at all */
122 while (1) { 122 while (1) {
123 tick_nohz_stop_sched_tick(); 123 tick_nohz_stop_sched_tick(1);
124 while (!need_resched()) { 124 while (!need_resched()) {
125 125
126 rmb(); 126 rmb();
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 9dcf39c02972..06a9f643817e 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -411,24 +411,28 @@ void native_machine_shutdown(void)
411{ 411{
412 /* Stop the cpus and apics */ 412 /* Stop the cpus and apics */
413#ifdef CONFIG_SMP 413#ifdef CONFIG_SMP
414 int reboot_cpu_id;
415 414
416 /* The boot cpu is always logical cpu 0 */ 415 /* The boot cpu is always logical cpu 0 */
417 reboot_cpu_id = 0; 416 int reboot_cpu_id = 0;
417 cpumask_of_cpu_ptr(newmask, reboot_cpu_id);
418 418
419#ifdef CONFIG_X86_32 419#ifdef CONFIG_X86_32
420 /* See if there has been given a command line override */ 420 /* See if there has been given a command line override */
421 if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) && 421 if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) &&
422 cpu_online(reboot_cpu)) 422 cpu_online(reboot_cpu)) {
423 reboot_cpu_id = reboot_cpu; 423 reboot_cpu_id = reboot_cpu;
424 cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id);
425 }
424#endif 426#endif
425 427
426 /* Make certain the cpu I'm about to reboot on is online */ 428 /* Make certain the cpu I'm about to reboot on is online */
427 if (!cpu_online(reboot_cpu_id)) 429 if (!cpu_online(reboot_cpu_id)) {
428 reboot_cpu_id = smp_processor_id(); 430 reboot_cpu_id = smp_processor_id();
431 cpumask_of_cpu_ptr_next(newmask, reboot_cpu_id);
432 }
429 433
430 /* Make certain I only run on the appropriate processor */ 434 /* Make certain I only run on the appropriate processor */
431 set_cpus_allowed_ptr(current, &cpumask_of_cpu(reboot_cpu_id)); 435 set_cpus_allowed_ptr(current, newmask);
432 436
433 /* O.K Now that I'm on the appropriate processor, 437 /* O.K Now that I'm on the appropriate processor,
434 * stop all of the others. 438 * stop all of the others.
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a50f9550cbec..792b87853a76 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -597,11 +597,11 @@ void __init setup_arch(char **cmdline_p)
597 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); 597 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
598 visws_early_detect(); 598 visws_early_detect();
599 pre_setup_arch_hook(); 599 pre_setup_arch_hook();
600 early_cpu_init();
601#else 600#else
602 printk(KERN_INFO "Command line: %s\n", boot_command_line); 601 printk(KERN_INFO "Command line: %s\n", boot_command_line);
603#endif 602#endif
604 603
604 early_cpu_init();
605 early_ioremap_init(); 605 early_ioremap_init();
606 606
607 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); 607 ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
@@ -665,9 +665,6 @@ void __init setup_arch(char **cmdline_p)
665 bss_resource.start = virt_to_phys(&__bss_start); 665 bss_resource.start = virt_to_phys(&__bss_start);
666 bss_resource.end = virt_to_phys(&__bss_stop)-1; 666 bss_resource.end = virt_to_phys(&__bss_stop)-1;
667 667
668#ifdef CONFIG_X86_64
669 early_cpu_init();
670#endif
671 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); 668 strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
672 *cmdline_p = command_line; 669 *cmdline_p = command_line;
673 670
@@ -680,7 +677,7 @@ void __init setup_arch(char **cmdline_p)
680#ifdef CONFIG_X86_LOCAL_APIC 677#ifdef CONFIG_X86_LOCAL_APIC
681 disable_apic = 1; 678 disable_apic = 1;
682#endif 679#endif
683 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 680 setup_clear_cpu_cap(X86_FEATURE_APIC);
684 } 681 }
685 682
686#ifdef CONFIG_PCI 683#ifdef CONFIG_PCI
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 07faaa5109cb..6fb5bcdd8933 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -661,8 +661,5 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
661 if (thread_info_flags & _TIF_SIGPENDING) 661 if (thread_info_flags & _TIF_SIGPENDING)
662 do_signal(regs); 662 do_signal(regs);
663 663
664 if (thread_info_flags & _TIF_HRTICK_RESCHED)
665 hrtick_resched();
666
667 clear_thread_flag(TIF_IRET); 664 clear_thread_flag(TIF_IRET);
668} 665}
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index bf87684474f1..b45ef8ddd651 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -53,6 +53,59 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
53 return do_sigaltstack(uss, uoss, regs->sp); 53 return do_sigaltstack(uss, uoss, regs->sp);
54} 54}
55 55
56/*
57 * Signal frame handlers.
58 */
59
60static inline int save_i387(struct _fpstate __user *buf)
61{
62 struct task_struct *tsk = current;
63 int err = 0;
64
65 BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
66 sizeof(tsk->thread.xstate->fxsave));
67
68 if ((unsigned long)buf % 16)
69 printk("save_i387: bad fpstate %p\n", buf);
70
71 if (!used_math())
72 return 0;
73 clear_used_math(); /* trigger finit */
74 if (task_thread_info(tsk)->status & TS_USEDFPU) {
75 err = save_i387_checking((struct i387_fxsave_struct __user *)
76 buf);
77 if (err)
78 return err;
79 task_thread_info(tsk)->status &= ~TS_USEDFPU;
80 stts();
81 } else {
82 if (__copy_to_user(buf, &tsk->thread.xstate->fxsave,
83 sizeof(struct i387_fxsave_struct)))
84 return -1;
85 }
86 return 1;
87}
88
89/*
90 * This restores directly out of user space. Exceptions are handled.
91 */
92static inline int restore_i387(struct _fpstate __user *buf)
93{
94 struct task_struct *tsk = current;
95 int err;
96
97 if (!used_math()) {
98 err = init_fpu(tsk);
99 if (err)
100 return err;
101 }
102
103 if (!(task_thread_info(current)->status & TS_USEDFPU)) {
104 clts();
105 task_thread_info(current)->status |= TS_USEDFPU;
106 }
107 return restore_fpu_checking((__force struct i387_fxsave_struct *)buf);
108}
56 109
57/* 110/*
58 * Do a signal return; undo the signal stack. 111 * Do a signal return; undo the signal stack.
@@ -496,9 +549,6 @@ void do_notify_resume(struct pt_regs *regs, void *unused,
496 /* deal with pending signal delivery */ 549 /* deal with pending signal delivery */
497 if (thread_info_flags & _TIF_SIGPENDING) 550 if (thread_info_flags & _TIF_SIGPENDING)
498 do_signal(regs); 551 do_signal(regs);
499
500 if (thread_info_flags & _TIF_HRTICK_RESCHED)
501 hrtick_resched();
502} 552}
503 553
504void signal_fault(struct pt_regs *regs, void __user *frame, char *where) 554void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 52eb1484a48a..626618bf2f81 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -439,7 +439,7 @@ void __cpuinit set_cpu_sibling_map(int cpu)
439 cpu_set(cpu, cpu_sibling_setup_map); 439 cpu_set(cpu, cpu_sibling_setup_map);
440 440
441 if (smp_num_siblings > 1) { 441 if (smp_num_siblings > 1) {
442 for_each_cpu_mask(i, cpu_sibling_setup_map) { 442 for_each_cpu_mask_nr(i, cpu_sibling_setup_map) {
443 if (c->phys_proc_id == cpu_data(i).phys_proc_id && 443 if (c->phys_proc_id == cpu_data(i).phys_proc_id &&
444 c->cpu_core_id == cpu_data(i).cpu_core_id) { 444 c->cpu_core_id == cpu_data(i).cpu_core_id) {
445 cpu_set(i, per_cpu(cpu_sibling_map, cpu)); 445 cpu_set(i, per_cpu(cpu_sibling_map, cpu));
@@ -462,7 +462,7 @@ void __cpuinit set_cpu_sibling_map(int cpu)
462 return; 462 return;
463 } 463 }
464 464
465 for_each_cpu_mask(i, cpu_sibling_setup_map) { 465 for_each_cpu_mask_nr(i, cpu_sibling_setup_map) {
466 if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && 466 if (per_cpu(cpu_llc_id, cpu) != BAD_APICID &&
467 per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { 467 per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) {
468 cpu_set(i, c->llc_shared_map); 468 cpu_set(i, c->llc_shared_map);
@@ -1219,7 +1219,7 @@ static void remove_siblinginfo(int cpu)
1219 int sibling; 1219 int sibling;
1220 struct cpuinfo_x86 *c = &cpu_data(cpu); 1220 struct cpuinfo_x86 *c = &cpu_data(cpu);
1221 1221
1222 for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { 1222 for_each_cpu_mask_nr(sibling, per_cpu(cpu_core_map, cpu)) {
1223 cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); 1223 cpu_clear(cpu, per_cpu(cpu_core_map, sibling));
1224 /*/ 1224 /*/
1225 * last thread sibling in this cpu core going down 1225 * last thread sibling in this cpu core going down
@@ -1228,7 +1228,7 @@ static void remove_siblinginfo(int cpu)
1228 cpu_data(sibling).booted_cores--; 1228 cpu_data(sibling).booted_cores--;
1229 } 1229 }
1230 1230
1231 for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) 1231 for_each_cpu_mask_nr(sibling, per_cpu(cpu_sibling_map, cpu))
1232 cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); 1232 cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling));
1233 cpus_clear(per_cpu(cpu_sibling_map, cpu)); 1233 cpus_clear(per_cpu(cpu_sibling_map, cpu));
1234 cpus_clear(per_cpu(cpu_core_map, cpu)); 1234 cpus_clear(per_cpu(cpu_core_map, cpu));
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S
index adff5562f5fd..d44395ff34c3 100644
--- a/arch/x86/kernel/syscall_table_32.S
+++ b/arch/x86/kernel/syscall_table_32.S
@@ -326,3 +326,9 @@ ENTRY(sys_call_table)
326 .long sys_fallocate 326 .long sys_fallocate
327 .long sys_timerfd_settime /* 325 */ 327 .long sys_timerfd_settime /* 325 */
328 .long sys_timerfd_gettime 328 .long sys_timerfd_gettime
329 .long sys_signalfd4
330 .long sys_eventfd2
331 .long sys_epoll_create1
332 .long sys_dup3 /* 330 */
333 .long sys_pipe2
334 .long sys_inotify_init1
diff --git a/arch/x86/mach-es7000/es7000plat.c b/arch/x86/mach-es7000/es7000plat.c
index 4354ce804889..50189af14b85 100644
--- a/arch/x86/mach-es7000/es7000plat.c
+++ b/arch/x86/mach-es7000/es7000plat.c
@@ -130,10 +130,10 @@ parse_unisys_oem (char *oemptr)
130 mip_addr = val; 130 mip_addr = val;
131 mip = (struct mip_reg *)val; 131 mip = (struct mip_reg *)val;
132 mip_reg = __va(mip); 132 mip_reg = __va(mip);
133 Dprintk("es7000_mipcfg: host_reg = 0x%lx \n", 133 pr_debug("es7000_mipcfg: host_reg = 0x%lx \n",
134 (unsigned long)host_reg); 134 (unsigned long)host_reg);
135 Dprintk("es7000_mipcfg: mip_reg = 0x%lx \n", 135 pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n",
136 (unsigned long)mip_reg); 136 (unsigned long)mip_reg);
137 success++; 137 success++;
138 break; 138 break;
139 case MIP_PSAI_REG: 139 case MIP_PSAI_REG:
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 5dfef9fa061a..62fa440678d8 100644
--- a/arch/x86/mm/discontig_32.c
+++ b/arch/x86/mm/discontig_32.c
@@ -42,7 +42,6 @@
42 42
43struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 43struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
44EXPORT_SYMBOL(node_data); 44EXPORT_SYMBOL(node_data);
45static bootmem_data_t node0_bdata;
46 45
47/* 46/*
48 * numa interface - we expect the numa architecture specific code to have 47 * numa interface - we expect the numa architecture specific code to have
@@ -385,7 +384,7 @@ void __init initmem_init(unsigned long start_pfn,
385 for_each_online_node(nid) 384 for_each_online_node(nid)
386 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 385 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
387 386
388 NODE_DATA(0)->bdata = &node0_bdata; 387 NODE_DATA(0)->bdata = &bootmem_node_data[0];
389 setup_bootmem_allocator(); 388 setup_bootmem_allocator();
390} 389}
391 390
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 0bb0caed8971..a20d1fa64b4e 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -148,8 +148,8 @@ static void note_page(struct seq_file *m, struct pg_state *st,
148 * we have now. "break" is either changing perms, levels or 148 * we have now. "break" is either changing perms, levels or
149 * address space marker. 149 * address space marker.
150 */ 150 */
151 prot = pgprot_val(new_prot) & ~(PTE_MASK); 151 prot = pgprot_val(new_prot) & ~(PTE_PFN_MASK);
152 cur = pgprot_val(st->current_prot) & ~(PTE_MASK); 152 cur = pgprot_val(st->current_prot) & ~(PTE_PFN_MASK);
153 153
154 if (!st->level) { 154 if (!st->level) {
155 /* First entry */ 155 /* First entry */
@@ -221,7 +221,7 @@ static void walk_pmd_level(struct seq_file *m, struct pg_state *st, pud_t addr,
221 for (i = 0; i < PTRS_PER_PMD; i++) { 221 for (i = 0; i < PTRS_PER_PMD; i++) {
222 st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); 222 st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT);
223 if (!pmd_none(*start)) { 223 if (!pmd_none(*start)) {
224 pgprotval_t prot = pmd_val(*start) & ~PTE_MASK; 224 pgprotval_t prot = pmd_val(*start) & PTE_FLAGS_MASK;
225 225
226 if (pmd_large(*start) || !pmd_present(*start)) 226 if (pmd_large(*start) || !pmd_present(*start))
227 note_page(m, st, __pgprot(prot), 3); 227 note_page(m, st, __pgprot(prot), 3);
@@ -253,7 +253,7 @@ static void walk_pud_level(struct seq_file *m, struct pg_state *st, pgd_t addr,
253 for (i = 0; i < PTRS_PER_PUD; i++) { 253 for (i = 0; i < PTRS_PER_PUD; i++) {
254 st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); 254 st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT);
255 if (!pud_none(*start)) { 255 if (!pud_none(*start)) {
256 pgprotval_t prot = pud_val(*start) & ~PTE_MASK; 256 pgprotval_t prot = pud_val(*start) & PTE_FLAGS_MASK;
257 257
258 if (pud_large(*start) || !pud_present(*start)) 258 if (pud_large(*start) || !pud_present(*start))
259 note_page(m, st, __pgprot(prot), 2); 259 note_page(m, st, __pgprot(prot), 2);
@@ -288,7 +288,7 @@ static void walk_pgd_level(struct seq_file *m)
288 for (i = 0; i < PTRS_PER_PGD; i++) { 288 for (i = 0; i < PTRS_PER_PGD; i++) {
289 st.current_address = normalize_addr(i * PGD_LEVEL_MULT); 289 st.current_address = normalize_addr(i * PGD_LEVEL_MULT);
290 if (!pgd_none(*start)) { 290 if (!pgd_none(*start)) {
291 pgprotval_t prot = pgd_val(*start) & ~PTE_MASK; 291 pgprotval_t prot = pgd_val(*start) & PTE_FLAGS_MASK;
292 292
293 if (pgd_large(*start) || !pgd_present(*start)) 293 if (pgd_large(*start) || !pgd_present(*start))
294 note_page(m, &st, __pgprot(prot), 1); 294 note_page(m, &st, __pgprot(prot), 1);
diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
index 0b3d567e686d..8f307d914c2e 100644
--- a/arch/x86/mm/hugetlbpage.c
+++ b/arch/x86/mm/hugetlbpage.c
@@ -124,7 +124,8 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
124 return 1; 124 return 1;
125} 125}
126 126
127pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) 127pte_t *huge_pte_alloc(struct mm_struct *mm,
128 unsigned long addr, unsigned long sz)
128{ 129{
129 pgd_t *pgd; 130 pgd_t *pgd;
130 pud_t *pud; 131 pud_t *pud;
@@ -133,9 +134,14 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
133 pgd = pgd_offset(mm, addr); 134 pgd = pgd_offset(mm, addr);
134 pud = pud_alloc(mm, pgd, addr); 135 pud = pud_alloc(mm, pgd, addr);
135 if (pud) { 136 if (pud) {
136 if (pud_none(*pud)) 137 if (sz == PUD_SIZE) {
137 huge_pmd_share(mm, addr, pud); 138 pte = (pte_t *)pud;
138 pte = (pte_t *) pmd_alloc(mm, pud, addr); 139 } else {
140 BUG_ON(sz != PMD_SIZE);
141 if (pud_none(*pud))
142 huge_pmd_share(mm, addr, pud);
143 pte = (pte_t *) pmd_alloc(mm, pud, addr);
144 }
139 } 145 }
140 BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte)); 146 BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte));
141 147
@@ -151,8 +157,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
151 pgd = pgd_offset(mm, addr); 157 pgd = pgd_offset(mm, addr);
152 if (pgd_present(*pgd)) { 158 if (pgd_present(*pgd)) {
153 pud = pud_offset(pgd, addr); 159 pud = pud_offset(pgd, addr);
154 if (pud_present(*pud)) 160 if (pud_present(*pud)) {
161 if (pud_large(*pud))
162 return (pte_t *)pud;
155 pmd = pmd_offset(pud, addr); 163 pmd = pmd_offset(pud, addr);
164 }
156 } 165 }
157 return (pte_t *) pmd; 166 return (pte_t *) pmd;
158} 167}
@@ -188,6 +197,11 @@ int pmd_huge(pmd_t pmd)
188 return 0; 197 return 0;
189} 198}
190 199
200int pud_huge(pud_t pud)
201{
202 return 0;
203}
204
191struct page * 205struct page *
192follow_huge_pmd(struct mm_struct *mm, unsigned long address, 206follow_huge_pmd(struct mm_struct *mm, unsigned long address,
193 pmd_t *pmd, int write) 207 pmd_t *pmd, int write)
@@ -208,6 +222,11 @@ int pmd_huge(pmd_t pmd)
208 return !!(pmd_val(pmd) & _PAGE_PSE); 222 return !!(pmd_val(pmd) & _PAGE_PSE);
209} 223}
210 224
225int pud_huge(pud_t pud)
226{
227 return !!(pud_val(pud) & _PAGE_PSE);
228}
229
211struct page * 230struct page *
212follow_huge_pmd(struct mm_struct *mm, unsigned long address, 231follow_huge_pmd(struct mm_struct *mm, unsigned long address,
213 pmd_t *pmd, int write) 232 pmd_t *pmd, int write)
@@ -216,9 +235,22 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address,
216 235
217 page = pte_page(*(pte_t *)pmd); 236 page = pte_page(*(pte_t *)pmd);
218 if (page) 237 if (page)
219 page += ((address & ~HPAGE_MASK) >> PAGE_SHIFT); 238 page += ((address & ~PMD_MASK) >> PAGE_SHIFT);
239 return page;
240}
241
242struct page *
243follow_huge_pud(struct mm_struct *mm, unsigned long address,
244 pud_t *pud, int write)
245{
246 struct page *page;
247
248 page = pte_page(*(pte_t *)pud);
249 if (page)
250 page += ((address & ~PUD_MASK) >> PAGE_SHIFT);
220 return page; 251 return page;
221} 252}
253
222#endif 254#endif
223 255
224/* x86_64 also uses this file */ 256/* x86_64 also uses this file */
@@ -228,6 +260,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
228 unsigned long addr, unsigned long len, 260 unsigned long addr, unsigned long len,
229 unsigned long pgoff, unsigned long flags) 261 unsigned long pgoff, unsigned long flags)
230{ 262{
263 struct hstate *h = hstate_file(file);
231 struct mm_struct *mm = current->mm; 264 struct mm_struct *mm = current->mm;
232 struct vm_area_struct *vma; 265 struct vm_area_struct *vma;
233 unsigned long start_addr; 266 unsigned long start_addr;
@@ -240,7 +273,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
240 } 273 }
241 274
242full_search: 275full_search:
243 addr = ALIGN(start_addr, HPAGE_SIZE); 276 addr = ALIGN(start_addr, huge_page_size(h));
244 277
245 for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { 278 for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
246 /* At this point: (!vma || addr < vma->vm_end). */ 279 /* At this point: (!vma || addr < vma->vm_end). */
@@ -262,7 +295,7 @@ full_search:
262 } 295 }
263 if (addr + mm->cached_hole_size < vma->vm_start) 296 if (addr + mm->cached_hole_size < vma->vm_start)
264 mm->cached_hole_size = vma->vm_start - addr; 297 mm->cached_hole_size = vma->vm_start - addr;
265 addr = ALIGN(vma->vm_end, HPAGE_SIZE); 298 addr = ALIGN(vma->vm_end, huge_page_size(h));
266 } 299 }
267} 300}
268 301
@@ -270,6 +303,7 @@ static unsigned long hugetlb_get_unmapped_area_topdown(struct file *file,
270 unsigned long addr0, unsigned long len, 303 unsigned long addr0, unsigned long len,
271 unsigned long pgoff, unsigned long flags) 304 unsigned long pgoff, unsigned long flags)
272{ 305{
306 struct hstate *h = hstate_file(file);
273 struct mm_struct *mm = current->mm; 307 struct mm_struct *mm = current->mm;
274 struct vm_area_struct *vma, *prev_vma; 308 struct vm_area_struct *vma, *prev_vma;
275 unsigned long base = mm->mmap_base, addr = addr0; 309 unsigned long base = mm->mmap_base, addr = addr0;
@@ -290,7 +324,7 @@ try_again:
290 goto fail; 324 goto fail;
291 325
292 /* either no address requested or cant fit in requested address hole */ 326 /* either no address requested or cant fit in requested address hole */
293 addr = (mm->free_area_cache - len) & HPAGE_MASK; 327 addr = (mm->free_area_cache - len) & huge_page_mask(h);
294 do { 328 do {
295 /* 329 /*
296 * Lookup failure means no vma is above this address, 330 * Lookup failure means no vma is above this address,
@@ -321,7 +355,7 @@ try_again:
321 largest_hole = vma->vm_start - addr; 355 largest_hole = vma->vm_start - addr;
322 356
323 /* try just below the current vma->vm_start */ 357 /* try just below the current vma->vm_start */
324 addr = (vma->vm_start - len) & HPAGE_MASK; 358 addr = (vma->vm_start - len) & huge_page_mask(h);
325 } while (len <= vma->vm_start); 359 } while (len <= vma->vm_start);
326 360
327fail: 361fail:
@@ -359,22 +393,23 @@ unsigned long
359hugetlb_get_unmapped_area(struct file *file, unsigned long addr, 393hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
360 unsigned long len, unsigned long pgoff, unsigned long flags) 394 unsigned long len, unsigned long pgoff, unsigned long flags)
361{ 395{
396 struct hstate *h = hstate_file(file);
362 struct mm_struct *mm = current->mm; 397 struct mm_struct *mm = current->mm;
363 struct vm_area_struct *vma; 398 struct vm_area_struct *vma;
364 399
365 if (len & ~HPAGE_MASK) 400 if (len & ~huge_page_mask(h))
366 return -EINVAL; 401 return -EINVAL;
367 if (len > TASK_SIZE) 402 if (len > TASK_SIZE)
368 return -ENOMEM; 403 return -ENOMEM;
369 404
370 if (flags & MAP_FIXED) { 405 if (flags & MAP_FIXED) {
371 if (prepare_hugepage_range(addr, len)) 406 if (prepare_hugepage_range(file, addr, len))
372 return -EINVAL; 407 return -EINVAL;
373 return addr; 408 return addr;
374 } 409 }
375 410
376 if (addr) { 411 if (addr) {
377 addr = ALIGN(addr, HPAGE_SIZE); 412 addr = ALIGN(addr, huge_page_size(h));
378 vma = find_vma(mm, addr); 413 vma = find_vma(mm, addr);
379 if (TASK_SIZE - len >= addr && 414 if (TASK_SIZE - len >= addr &&
380 (!vma || addr + len <= vma->vm_start)) 415 (!vma || addr + len <= vma->vm_start))
@@ -390,3 +425,20 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
390 425
391#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ 426#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/
392 427
428#ifdef CONFIG_X86_64
429static __init int setup_hugepagesz(char *opt)
430{
431 unsigned long ps = memparse(opt, &opt);
432 if (ps == PMD_SIZE) {
433 hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT);
434 } else if (ps == PUD_SIZE && cpu_has_gbpages) {
435 hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
436 } else {
437 printk(KERN_ERR "hugepagesz: Unsupported page size %lu M\n",
438 ps >> 20);
439 return 0;
440 }
441 return 1;
442}
443__setup("hugepagesz=", setup_hugepagesz);
444#endif
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 24c1d3c30186..016f335bbeea 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -330,6 +330,14 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,
330 return (void __iomem *)ret; 330 return (void __iomem *)ret;
331} 331}
332 332
333void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size,
334 unsigned long prot_val)
335{
336 return __ioremap_caller(phys_addr, size, (prot_val & _PAGE_CACHE_MASK),
337 __builtin_return_address(0));
338}
339EXPORT_SYMBOL(ioremap_prot);
340
333/** 341/**
334 * iounmap - Free a IO remapping 342 * iounmap - Free a IO remapping
335 * @addr: virtual address from ioremap_* 343 * @addr: virtual address from ioremap_*
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 9782f42dd319..a4dd793d6003 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -23,8 +23,6 @@
23struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 23struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
24EXPORT_SYMBOL(node_data); 24EXPORT_SYMBOL(node_data);
25 25
26static bootmem_data_t plat_node_bdata[MAX_NUMNODES];
27
28struct memnode memnode; 26struct memnode memnode;
29 27
30s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = { 28s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
@@ -198,7 +196,7 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
198 nodedata_phys + pgdat_size - 1); 196 nodedata_phys + pgdat_size - 1);
199 197
200 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); 198 memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t));
201 NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; 199 NODE_DATA(nodeid)->bdata = &bootmem_node_data[nodeid];
202 NODE_DATA(nodeid)->node_start_pfn = start_pfn; 200 NODE_DATA(nodeid)->node_start_pfn = start_pfn;
203 NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn; 201 NODE_DATA(nodeid)->node_spanned_pages = last_pfn - start_pfn;
204 202
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 7f3329b55d2e..3f90289410e6 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -369,20 +369,34 @@ static int __init ppro_init(char **cpu_type)
369{ 369{
370 __u8 cpu_model = boot_cpu_data.x86_model; 370 __u8 cpu_model = boot_cpu_data.x86_model;
371 371
372 if (cpu_model == 14) 372 switch (cpu_model) {
373 case 0 ... 2:
374 *cpu_type = "i386/ppro";
375 break;
376 case 3 ... 5:
377 *cpu_type = "i386/pii";
378 break;
379 case 6 ... 8:
380 *cpu_type = "i386/piii";
381 break;
382 case 9:
383 *cpu_type = "i386/p6_mobile";
384 break;
385 case 10 ... 13:
386 *cpu_type = "i386/p6";
387 break;
388 case 14:
373 *cpu_type = "i386/core"; 389 *cpu_type = "i386/core";
374 else if (cpu_model == 15 || cpu_model == 23) 390 break;
391 case 15: case 23:
392 *cpu_type = "i386/core_2";
393 break;
394 case 26:
375 *cpu_type = "i386/core_2"; 395 *cpu_type = "i386/core_2";
376 else if (cpu_model > 0xd) 396 break;
397 default:
398 /* Unknown */
377 return 0; 399 return 0;
378 else if (cpu_model == 9) {
379 *cpu_type = "i386/p6_mobile";
380 } else if (cpu_model > 5) {
381 *cpu_type = "i386/piii";
382 } else if (cpu_model > 2) {
383 *cpu_type = "i386/pii";
384 } else {
385 *cpu_type = "i386/ppro";
386 } 400 }
387 401
388 model = &op_ppro_spec; 402 model = &op_ppro_spec;
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 2aafb67dc5f1..a09505806b82 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -280,6 +280,7 @@ static void pci_track_mmap_page_range(struct vm_area_struct *vma)
280static struct vm_operations_struct pci_mmap_ops = { 280static struct vm_operations_struct pci_mmap_ops = {
281 .open = pci_track_mmap_page_range, 281 .open = pci_track_mmap_page_range,
282 .close = pci_unmap_page_range, 282 .close = pci_unmap_page_range,
283 .access = generic_access_phys,
283}; 284};
284 285
285int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, 286int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index c910345860c3..8d28925ebed9 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1465,7 +1465,7 @@ static unsigned long m2p(phys_addr_t maddr)
1465{ 1465{
1466 phys_addr_t paddr; 1466 phys_addr_t paddr;
1467 1467
1468 maddr &= PTE_MASK; 1468 maddr &= PTE_PFN_MASK;
1469 paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT; 1469 paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT;
1470 1470
1471 return paddr; 1471 return paddr;
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index a44d56e38bd1..aa37469da696 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -343,8 +343,8 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr,
343static pteval_t pte_mfn_to_pfn(pteval_t val) 343static pteval_t pte_mfn_to_pfn(pteval_t val)
344{ 344{
345 if (val & _PAGE_PRESENT) { 345 if (val & _PAGE_PRESENT) {
346 unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT; 346 unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
347 pteval_t flags = val & ~PTE_MASK; 347 pteval_t flags = val & PTE_FLAGS_MASK;
348 val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; 348 val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags;
349 } 349 }
350 350
@@ -354,8 +354,8 @@ static pteval_t pte_mfn_to_pfn(pteval_t val)
354static pteval_t pte_pfn_to_mfn(pteval_t val) 354static pteval_t pte_pfn_to_mfn(pteval_t val)
355{ 355{
356 if (val & _PAGE_PRESENT) { 356 if (val & _PAGE_PRESENT) {
357 unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT; 357 unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT;
358 pteval_t flags = val & ~PTE_MASK; 358 pteval_t flags = val & PTE_FLAGS_MASK;
359 val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; 359 val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags;
360 } 360 }
361 361
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index e693812ac59a..d8faf79a0a1d 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -367,7 +367,7 @@ static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector)
367 367
368 cpus_and(mask, mask, cpu_online_map); 368 cpus_and(mask, mask, cpu_online_map);
369 369
370 for_each_cpu_mask(cpu, mask) 370 for_each_cpu_mask_nr(cpu, mask)
371 xen_send_IPI_one(cpu, vector); 371 xen_send_IPI_one(cpu, vector);
372} 372}
373 373
@@ -378,7 +378,7 @@ static void xen_smp_send_call_function_ipi(cpumask_t mask)
378 xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR); 378 xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
379 379
380 /* Make sure other vcpus get a chance to run if they need to. */ 380 /* Make sure other vcpus get a chance to run if they need to. */
381 for_each_cpu_mask(cpu, mask) { 381 for_each_cpu_mask_nr(cpu, mask) {
382 if (xen_vcpu_stolen(cpu)) { 382 if (xen_vcpu_stolen(cpu)) {
383 HYPERVISOR_sched_op(SCHEDOP_yield, 0); 383 HYPERVISOR_sched_op(SCHEDOP_yield, 0);
384 break; 384 break;
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S
index 4038cbfe3331..7f58304fafb3 100644
--- a/arch/x86/xen/xen-asm_64.S
+++ b/arch/x86/xen/xen-asm_64.S
@@ -173,7 +173,7 @@ ENTRY(xen_sysexit)
173 pushq $__USER32_CS 173 pushq $__USER32_CS
174 pushq %rdx 174 pushq %rdx
175 175
176 pushq $VGCF_in_syscall 176 pushq $0
1771: jmp hypercall_iret 1771: jmp hypercall_iret
178ENDPATCH(xen_sysexit) 178ENDPATCH(xen_sysexit)
179RELOC(xen_sysexit, 1b+1) 179RELOC(xen_sysexit, 1b+1)
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 9fc8551a1cf6..02e417d3d8e9 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -194,8 +194,8 @@ config HOTPLUG
194 plugged into slots found on all modern laptop computers. Another 194 plugged into slots found on all modern laptop computers. Another
195 example, used on modern desktops as well as laptops, is USB. 195 example, used on modern desktops as well as laptops, is USB.
196 196
197 Enable HOTPLUG and KMOD, and build a modular kernel. Get agent 197 Enable HOTPLUG and build a modular kernel. Get agent software
198 software (at <http://linux-hotplug.sourceforge.net/>) and install it. 198 (from <http://linux-hotplug.sourceforge.net/>) and install it.
199 Then your kernel will automatically call out to a user mode "policy 199 Then your kernel will automatically call out to a user mode "policy
200 agent" (/sbin/hotplug) to load modules and set up software needed 200 agent" (/sbin/hotplug) to load modules and set up software needed
201 to use devices as you hotplug them. 201 to use devices as you hotplug them.
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 5e6d75c9f92b..a00359e8f7a8 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/mm.h>
19#include <linux/proc_fs.h> 20#include <linux/proc_fs.h>
20#include <linux/screen_info.h> 21#include <linux/screen_info.h>
21#include <linux/bootmem.h> 22#include <linux/bootmem.h>
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index f3e16efcd47a..ac15ecbdf919 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -49,7 +49,7 @@ asmlinkage long xtensa_pipe(int __user *userfds)
49 int fd[2]; 49 int fd[2];
50 int error; 50 int error;
51 51
52 error = do_pipe(fd); 52 error = do_pipe_flags(fd, 0);
53 if (!error) { 53 if (!error) {
54 if (copy_to_user(userfds, fd, 2 * sizeof(int))) 54 if (copy_to_user(userfds, fd, 2 * sizeof(int)))
55 error = -EFAULT; 55 error = -EFAULT;